[Xfce4-commits] <xfce4-panel:devel> Use g_markup_printf_escaped when making markup strings.
Nick Schermer
noreply at xfce.org
Mon Oct 5 17:48:02 CEST 2009
Updating branch refs/heads/devel
to 187d36a086f5b34b3ad5229af8b99965f5bbff66 (commit)
from ec12ba5fbd3bfd3df017b44e3d76457319de8c99 (commit)
commit 187d36a086f5b34b3ad5229af8b99965f5bbff66
Author: Nick Schermer <nick at xfce.org>
Date: Mon Oct 5 17:45:36 2009 +0200
Use g_markup_printf_escaped when making markup strings.
panel/panel-item-dialog.c | 4 +++-
plugins/launcher/launcher-dialog.c | 4 ++--
plugins/launcher/launcher.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/panel/panel-item-dialog.c b/panel/panel-item-dialog.c
index 4c5145f..88b0fb1 100644
--- a/panel/panel-item-dialog.c
+++ b/panel/panel-item-dialog.c
@@ -698,7 +698,9 @@ panel_item_dialog_text_renderer (GtkTreeViewColumn *column,
comment = panel_module_get_comment (module);
/* create the markup string */
- markup = g_strdup_printf ("<b>%s</b>\n%s", name, comment ? comment : "");
+ if (exo_str_is_empty (comment))
+ comment = "";
+ markup = g_markup_printf_escaped ("<b>%s</b>\n%s", name, comment);
/* release module */
g_object_unref (G_OBJECT (module));
diff --git a/plugins/launcher/launcher-dialog.c b/plugins/launcher/launcher-dialog.c
index 71cf15c..ca7e7f7 100644
--- a/plugins/launcher/launcher-dialog.c
+++ b/plugins/launcher/launcher-dialog.c
@@ -643,9 +643,9 @@ launcher_dialog_items_set_item (GtkTreeModel *model,
comment = garcon_menu_item_get_comment (item);
if (!exo_str_is_empty (comment))
- markup = g_strdup_printf ("<b>%s</b>\n%s", name, comment);
+ markup = g_markup_printf_escaped ("<b>%s</b>\n%s", name, comment);
else
- markup = g_strdup_printf ("<b>%s</b>", name);
+ markup = g_markup_printf_escaped ("<b>%s</b>", name);
gtk_list_store_set (GTK_LIST_STORE (model), iter,
COL_ICON, garcon_menu_item_get_icon_name (item),
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 548f9a0..8530cd8 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1636,7 +1636,7 @@ launcher_plugin_item_query_tooltip (GtkWidget *widget,
comment = garcon_menu_item_get_comment (item);
if (!exo_str_is_empty (comment))
{
- markup = g_strdup_printf ("<b>%s</b>\n%s", name, comment);
+ markup = g_markup_printf_escaped ("<b>%s</b>\n%s", name, comment);
gtk_tooltip_set_markup (tooltip, markup);
g_free (markup);
}
More information about the Xfce4-commits
mailing list