[Goodies-commits] r7263 - in xfce4-clipman-plugin/trunk: . panel-plugin

Mike Massonnet mmassonnet at xfce.org
Tue Apr 21 20:24:33 CEST 2009


Author: mmassonnet
Date: 2009-04-21 18:24:33 +0000 (Tue, 21 Apr 2009)
New Revision: 7263

Modified:
   xfce4-clipman-plugin/trunk/ChangeLog
   xfce4-clipman-plugin/trunk/panel-plugin/main.c
Log:
Same commit for the regex and the command that are also displayed

Modified: xfce4-clipman-plugin/trunk/ChangeLog
===================================================================
--- xfce4-clipman-plugin/trunk/ChangeLog	2009-04-21 18:16:57 UTC (rev 7262)
+++ xfce4-clipman-plugin/trunk/ChangeLog	2009-04-21 18:24:33 UTC (rev 7263)
@@ -1,4 +1,7 @@
 2009-04-21	Mike Massonnet
+Same commit for the regex and the command that are also displayed
+
+2009-04-21	Mike Massonnet
 Markup escape for action name and command name in the treeview
 
 2009-04-21	Mike Massonnet

Modified: xfce4-clipman-plugin/trunk/panel-plugin/main.c
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/main.c	2009-04-21 18:16:57 UTC (rev 7262)
+++ xfce4-clipman-plugin/trunk/panel-plugin/main.c	2009-04-21 18:24:33 UTC (rev 7263)
@@ -1039,7 +1039,8 @@
   const GSList *entries;
   GtkTreeModel *model;
   GtkTreeIter iter;
-  gchar *action_name_escaped, *title;
+  gchar *title;
+  gchar *action_name_escaped, *regex_escaped;
 
   model = gtk_tree_view_get_model (treeview);
   gtk_list_store_clear (GTK_LIST_STORE (model));
@@ -1048,12 +1049,15 @@
   for (; entries != NULL; entries = entries->next)
     {
       entry = entries->data;
+
       action_name_escaped = g_markup_escape_text (entry->action_name, -1);
-
-      title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>", action_name_escaped, g_regex_get_pattern (entry->regex));
+      regex_escaped = g_markup_escape_text (g_regex_get_pattern (entry->regex), -1);
+      title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>",
+                               action_name_escaped, regex_escaped);
       gtk_list_store_append (GTK_LIST_STORE (model), &iter);
       gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, entry, 1, title, -1);
       g_free (action_name_escaped);
+      g_free (regex_escaped);
       g_free (title);
     }
 }
@@ -1316,7 +1320,8 @@
   GtkWidget *command;
   GtkTreeModel *model;
   GtkTreeIter iter;
-  gchar *command_name_escaped, *title;
+  gchar *title;
+  gchar *command_name_escaped, *command_escaped;
 
   command_name = glade_xml_get_widget (plugin->gxml, "command-name");
   command = glade_xml_get_widget (plugin->gxml, "command");
@@ -1326,15 +1331,16 @@
     return;
 
   command_name_escaped = g_markup_escape_text (gtk_entry_get_text (GTK_ENTRY (command_name)), -1);
+  command_escaped = g_markup_escape_text (gtk_entry_get_text (GTK_ENTRY (command)), -1);
   title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>",
-                           command_name_escaped,
-                           gtk_entry_get_text (GTK_ENTRY (command)));
+                           command_name_escaped, command_escaped);
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (glade_xml_get_widget (plugin->gxml, "commands")));
   gtk_list_store_append (GTK_LIST_STORE (model), &iter);
   gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, title,
                       1, gtk_entry_get_text (GTK_ENTRY (command_name)),
                       2, gtk_entry_get_text (GTK_ENTRY (command)), -1);
   g_free (command_name_escaped);
+  g_free (command_escaped);
   g_free (title);
 
   gtk_entry_set_text (GTK_ENTRY (command_name), "");
@@ -1351,7 +1357,8 @@
   GtkTreeIter iter;
   GtkWidget *command_name;
   GtkWidget *command;
-  gchar *command_name_escaped, *title;
+  gchar *title;
+  gchar *command_name_escaped, *command_escaped;
 
   command_name = glade_xml_get_widget (plugin->gxml, "command-name");
   command = glade_xml_get_widget (plugin->gxml, "command");
@@ -1369,13 +1376,14 @@
     }
 
   command_name_escaped = g_markup_escape_text (gtk_entry_get_text (GTK_ENTRY (command_name)), -1);
+  command_escaped = g_markup_escape_text (gtk_entry_get_text (GTK_ENTRY (command)), -1);
   title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>",
-                           command_name_escaped,
-                           gtk_entry_get_text (GTK_ENTRY (command)));
+                           command_name_escaped, command_escaped);
   gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, title,
                       1, gtk_entry_get_text (GTK_ENTRY (command_name)),
                       2, gtk_entry_get_text (GTK_ENTRY (command)), -1);
   g_free (command_name_escaped);
+  g_free (command_escaped);
   g_free (title);
 
   gtk_tree_selection_unselect_all (selection);




More information about the Goodies-commits mailing list