diff options
author | rbuj <[email protected]> | 2020-03-11 11:20:54 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-04-16 14:37:03 +0200 |
commit | c835ece90b74fd31d8c6d60652861e43305c0c2d (patch) | |
tree | b503b7d3f4d4b8be39bfdcc55d8695582e403f0f /src/themes/standard | |
parent | 1f631e3f58d83642de382761564ff8677882280a (diff) | |
download | mate-notification-daemon-c835ece90b74fd31d8c6d60652861e43305c0c2d.tar.bz2 mate-notification-daemon-c835ece90b74fd31d8c6d60652861e43305c0c2d.tar.xz |
The body of a notification may also contain hyperlinks
Diffstat (limited to 'src/themes/standard')
-rw-r--r-- | src/themes/standard/theme.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c index d36bda3..c81ac34 100644 --- a/src/themes/standard/theme.c +++ b/src/themes/standard/theme.c @@ -844,6 +844,7 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body) { char* str; char* quoted; + const char *body_label_text; GtkRequisition req; WindowData* windata; @@ -857,22 +858,15 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body) gtk_label_set_markup(GTK_LABEL(windata->summary_label), str); g_free(str); - if (pango_parse_markup (body, -1, 0, NULL, NULL, NULL, NULL)) - { - gtk_label_set_markup (GTK_LABEL (windata->body_label), body); - } - else { + gtk_label_set_markup (GTK_LABEL (windata->body_label), body); + body_label_text = gtk_label_get_text (GTK_LABEL (windata->body_label)); + if ((body_label_text == NULL) || (strlen (body_label_text) == 0)) gtk_label_set_text (GTK_LABEL (windata->body_label), body); - } if (body == NULL || *body == '\0') - { gtk_widget_hide(windata->body_label); - } else - { gtk_widget_show(windata->body_label); - } update_content_hbox_visibility(windata); |