diff options
author | Jonathan Kang <jonathan121537@gmail.com> | 2015-10-14 23:12:56 +0800 |
---|---|---|
committer | Jonathan Kang <jonathan121537@gmail.com> | 2015-10-14 23:12:56 +0800 |
commit | 7de0c549017dcb544c2b5c4405a9cd187c0aac95 (patch) | |
tree | 9739839338cfc13561077e3e8fbe8b635e3fe570 /src | |
parent | adaa2cef4f758ee8f4acf5fd18de2477b7c6ea06 (diff) | |
download | gnome-logs-7de0c549017dcb544c2b5c4405a9cd187c0aac95.tar.gz |
Make the Support link in detail view clickable
Allow users to click the Support link directly to visit it.
https://bugzilla.gnome.org/show_bug.cgi?id=756575
Diffstat (limited to 'src')
-rw-r--r-- | src/gl-eventviewdetail.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/gl-eventviewdetail.c b/src/gl-eventviewdetail.c index bf5906c..b86ce01 100644 --- a/src/gl-eventviewdetail.c +++ b/src/gl-eventviewdetail.c @@ -249,10 +249,18 @@ gl_event_view_detail_create_detail (GlEventViewDetail *detail) if (str_message && *str_message) { - gtk_label_set_text (GTK_LABEL (priv->support_label), - str_message); + gchar *str_link; + + /* According to the spec, this should be a URI */ + str_link = g_strdup_printf ("<a href=\"%s\">%s</a>", + str_message, str_message); + + gtk_label_set_markup (GTK_LABEL (priv->support_label), + str_link); gtk_widget_show (priv->support_field_label); gtk_widget_show (priv->support_label); + + g_free (str_link); } } else @@ -263,10 +271,18 @@ gl_event_view_detail_create_detail (GlEventViewDetail *detail) if (str && *str) { - gtk_label_set_text (GTK_LABEL (priv->support_label), - str); + gchar *str_link; + + /* According to the spec, this should be a URI */ + str_link = g_strdup_printf ("<a href=\"%s\">%s</a>", + str, str); + + gtk_label_set_markup (GTK_LABEL (priv->support_label), + str_link); gtk_widget_show (priv->support_field_label); gtk_widget_show (priv->support_label); + + g_free (str_link); } g_free (str); |