summaryrefslogtreecommitdiffstats
path: root/src/applet
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2011-03-28 15:23:01 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2011-03-28 15:23:01 +0200
commit78304637542f455b4a00ab32c418b00d2ee17781 (patch)
treec0a1eb5eac27ab0044f470b211390c5fdf3f5723 /src/applet
parent42ab4016ea8901108a22233a1b4a44a995e9a194 (diff)
downloadabrt-78304637542f455b4a00ab32c418b00d2ee17781.tar.gz
abrt-78304637542f455b4a00ab32c418b00d2ee17781.tar.xz
abrt-78304637542f455b4a00ab32c418b00d2ee17781.zip
applet: really fixed: don't show status icon when server support persistence trac#127
Diffstat (limited to 'src/applet')
-rw-r--r--src/applet/applet_gtk.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/applet/applet_gtk.c b/src/applet/applet_gtk.c
index 78719efe..0ba94994 100644
--- a/src/applet/applet_gtk.c
+++ b/src/applet/applet_gtk.c
@@ -21,26 +21,26 @@
static gboolean persistent_notification;
-#if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7)
+#if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR >= 6)
static gboolean server_has_persistence (void)
{
- gboolean has;
- GList *caps;
- GList *l;
-
- caps = notify_get_server_caps ();
- if (caps == NULL) {
- fprintf (stderr, "Failed to receive server caps.\n");
- return FALSE;
- }
-
- l = g_list_find_custom (caps, "persistence", (GCompareFunc)strcmp);
- has = l != NULL;
+ gboolean has;
+ GList *caps;
+ GList *l;
+
+ caps = notify_get_server_caps ();
+ if (caps == NULL) {
+ fprintf (stderr, "Failed to receive server caps.\n");
+ return FALSE;
+ }
- g_list_foreach (caps, (GFunc) g_free, NULL);
- g_list_free (caps);
+ l = g_list_find_custom (caps, "persistence", (GCompareFunc)strcmp);
+ has = l != NULL;
- return has;
+ g_list_foreach (caps, (GFunc) g_free, NULL);
+ g_list_free (caps);
+ VERB1 log("notify server %s support pesistence\n", has ? "DOES" : "DOESN'T");
+ return has;
}
#endif
@@ -328,7 +328,7 @@ struct applet *applet_new(const char* app_name)
{
struct applet *applet = (struct applet*)xzalloc(sizeof(struct applet));
applet->ap_daemon_running = true;
-#if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7)
+#if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR >= 6)
persistent_notification = server_has_persistence();
#endif
@@ -398,11 +398,11 @@ void show_crash_notification(struct applet *applet, const char* crash_dir, const
notify_notification_add_action(notification, "REPORT", _("Report"),
NOTIFY_ACTION_CALLBACK(action_report),
applet, NULL);
- notify_notification_add_action(notification, "OPEN_MAIN_WINDOW", _("Open ABRT"),
+ notify_notification_add_action(notification, "default", _("Show"),
NOTIFY_ACTION_CALLBACK(action_open_gui),
applet, NULL);
- notify_notification_update(notification, _("Warning"), buf, NULL);
+ notify_notification_update(notification, _("A Problem has Occurred"), buf, NULL);
free(buf);
GError *err = NULL;
notify_notification_show(notification, &err);
@@ -429,7 +429,7 @@ void show_msg_notification(struct applet *applet, const char *format, ...)
notify_notification_add_action(notification, "OPEN_MAIN_WINDOW", _("Open ABRT"),
NOTIFY_ACTION_CALLBACK(action_open_gui),
applet, NULL);
- notify_notification_update(notification, _("Warning"), buf, NULL);
+ notify_notification_update(notification, _("A Problem has Occurred"), buf, NULL);
free(buf);
GError *err = NULL;
notify_notification_show(notification, &err);