diff options
author | TingPing <tingping@tingping.se> | 2014-02-05 01:00:06 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-02-05 01:00:06 -0500 |
commit | e64aa93f8570f9abb96a5758b08b75256eef239e (patch) | |
tree | 03b8265b0e837e5cee94d92956fdf459677f48e0 /src/fe-gtk/plugin-tray.c | |
parent | 4c1fd3ee67de89dc0dce314df94470fe2ad48868 (diff) |
Use persitance with libnotify
This will keep notifications in gnomes tray similar to a tray icon.
Diffstat (limited to 'src/fe-gtk/plugin-tray.c')
-rw-r--r-- | src/fe-gtk/plugin-tray.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 911e804a..959c5c1e 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -181,6 +181,7 @@ fe_tray_set_balloon (const char *title, const char *text) #ifdef USE_LIBNOTIFY static int notify_text_strip_flags = STRIP_ALL; + static gboolean notify_persistant = FALSE; NotifyNotification *notification; char *notify_text, *notify_title; @@ -193,6 +194,10 @@ fe_tray_set_balloon (const char *title, const char *text) { notify_text_strip_flags |= STRIP_ESCMARKUP; } + if (g_list_find_custom (server_caps, "persistance", (GCompareFunc)strcmp)) + { + notify_persistant = TRUE; + } g_list_free_full (server_caps, g_free); } @@ -203,6 +208,9 @@ fe_tray_set_balloon (const char *title, const char *text) #if NOTIFY_CHECK_VERSION(0,7,0) notify_notification_set_hint (notification, "desktop-entry", g_variant_new_string ("hexchat")); + + if (notify_persistant && !prefs.hex_gui_tray) + notify_notification_set_hint (notification, "persistant", g_variant_new_boolean (TRUE)); #endif g_free ((char *)notify_title); |