fe-gtk: Only escape notification bodies for notification servers that support "body-markup".
This commit is contained in:
parent
863dc2e841
commit
ac5771377e
@ -180,13 +180,23 @@ fe_tray_set_balloon (const char *title, const char *text)
|
||||
return;
|
||||
|
||||
#ifdef USE_LIBNOTIFY
|
||||
static int notify_text_strip_flags = STRIP_ALL;
|
||||
NotifyNotification *notification;
|
||||
char *notify_text, *notify_title;
|
||||
|
||||
if (!notify_is_initted())
|
||||
{
|
||||
notify_init(PACKAGE_NAME);
|
||||
|
||||
notify_text = strip_color (text, -1, STRIP_ALL|STRIP_ESCMARKUP);
|
||||
GList* server_caps = notify_get_server_caps ();
|
||||
if (g_list_find_custom (server_caps, "body-markup", (GCompareFunc)strcmp))
|
||||
{
|
||||
notify_text_strip_flags |= STRIP_ESCMARKUP;
|
||||
}
|
||||
g_list_free_full (server_caps, g_free);
|
||||
}
|
||||
|
||||
notify_text = strip_color (text, -1, notify_text_strip_flags);
|
||||
notify_title = strip_color (title, -1, STRIP_ALL);
|
||||
|
||||
notification = XC_NOTIFY_NEW (notify_title, notify_text, HEXCHATSHAREDIR "/icons/hicolor/scalable/apps/hexchat.svg", NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user