summaryrefslogtreecommitdiff
path: root/src/trg-general-panel.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <alan@eth0.org.uk>2012-08-03 18:30:23 +0100
committerGravatar Alan Fitton <alan@eth0.org.uk>2012-08-03 19:32:07 +0100
commit5cdd067dde50ed9083248a0f262167017b3742f5 (patch)
tree22a176232d5fdd0153845b96de712ad6966a0b4a /src/trg-general-panel.c
parent3f4881bff67d41c0dfb175e50c81185b44b79cf0 (diff)
issue 208 - escape URL for pango markup. issue 206 - minimize on tray click.
Diffstat (limited to 'src/trg-general-panel.c')
-rw-r--r--src/trg-general-panel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/trg-general-panel.c b/src/trg-general-panel.c
index e91a837..79df46d 100644
--- a/src/trg-general-panel.c
+++ b/src/trg-general-panel.c
@@ -113,7 +113,7 @@ trg_general_panel_update(TrgGeneralPanel * panel, JsonObject * t,
TrgGeneralPanelPrivate *priv;
gchar buf[32];
gint sizeOfBuf;
- gchar *statusString, *fullStatusString, *completedAtString, *comment;
+ gchar *statusString, *fullStatusString, *completedAtString, *comment, *markup;
const gchar *errorStr;
gint64 eta, uploaded, haveValid, completedAt;
GtkLabel *keyLabel;
@@ -180,14 +180,16 @@ trg_general_panel_update(TrgGeneralPanel * panel, JsonObject * t,
torrent_get_download_dir(t));
comment = add_links_to_text(torrent_get_comment(t));
- gtk_label_set_markup(GTK_LABEL(priv->gen_comment_label), comment);
+ markup = g_markup_printf_escaped("%s", comment);
+ gtk_label_set_markup(GTK_LABEL(priv->gen_comment_label), markup);
g_free(comment);
+ g_free(markup);
errorStr = torrent_get_errorstr(t);
keyLabel =
gen_panel_label_get_key_label(GTK_LABEL(priv->gen_error_label));
if (strlen(errorStr) > 0) {
- gchar *markup =
+ markup =
g_markup_printf_escaped("<span fgcolor=\"red\">%s</span>",
errorStr);
gtk_label_set_markup(GTK_LABEL(priv->gen_error_label), markup);