[Goodies-commits] r6602 - in xfce4-clipman-plugin/branches/xfce-4-6: . panel-plugin

Mike Massonnet mmassonnet at xfce.org
Fri Jan 30 10:19:15 CET 2009


Author: mmassonnet
Date: 2009-01-30 09:19:14 +0000 (Fri, 30 Jan 2009)
New Revision: 6602

Modified:
   xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog
   xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.c
   xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.h
   xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c
Log:
Drop the idea of an icon for an action.

Modified: xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog	2009-01-30 07:49:36 UTC (rev 6601)
+++ xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog	2009-01-30 09:19:14 UTC (rev 6602)
@@ -1,4 +1,13 @@
 2009-01-30	Mike Massonnet
+Drop the idea of an icon for an action.
+
+	- panel-plugin/panel-plugin.c, panel-plugin/actions.c,
+	panel-plugin/actions.h:
+		Remove the code that was intended to show an icon for an
+		action.  It is more a waste of time to set it, and not that
+		useful inside the menu.
+
+2009-01-30	Mike Massonnet
 Add support for GLib < 2.16 for the commands treeview.
 
 	- panel-plugin/panel-plugin.c:

Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.c
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.c	2009-01-30 07:49:36 UTC (rev 6601)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.c	2009-01-30 09:19:14 UTC (rev 6602)
@@ -109,7 +109,6 @@
   START,
   ACTIONS,
   ACTION,
-  ICON_NAME,
   ACTION_NAME,
   REGEX,
   COMMANDS,
@@ -123,7 +122,6 @@
 {
   ClipmanActions *actions;
   ParserState state;
-  gchar *icon_name;
   gchar *action_name;
   gchar *regex;
   gchar *command_name;
@@ -159,8 +157,6 @@
       break;
 
     case ACTION:
-      if (!g_ascii_strcasecmp (element_name, "icon"))
-        parser->state = ICON_NAME;
       if (!g_ascii_strcasecmp (element_name, "name"))
         parser->state = ACTION_NAME;
       else if (!g_ascii_strcasecmp (element_name, "regex"))
@@ -205,7 +201,6 @@
       parser->state = ACTIONS;
       break;
 
-    case ICON_NAME:
     case ACTION_NAME:
     case REGEX:
     case COMMANDS:
@@ -246,10 +241,6 @@
 
   switch (parser->state)
     {
-    case ICON_NAME:
-      parser->icon_name = g_strdup (text);
-      break;
-
     case ACTION_NAME:
       parser->action_name = g_strdup (text);
       break;
@@ -712,9 +703,6 @@
 
       g_string_append (output, "\t<action>\n");
 
-      if (entry->icon_name != NULL)
-        g_string_append_printf (output, "\t\t<icon>%s</icon>\n", entry->icon_name);
-
       tmp = g_markup_escape_text (entry->action_name, -1);
       g_string_append_printf (output, "\t\t<name>%s</name>\n", tmp);
       g_free (tmp);

Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.h
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.h	2009-01-30 07:49:36 UTC (rev 6601)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/actions.h	2009-01-30 09:19:14 UTC (rev 6602)
@@ -28,7 +28,6 @@
 typedef struct _ClipmanActionsEntry ClipmanActionsEntry;
 struct _ClipmanActionsEntry
 {
-  gchar                *icon_name;
   gchar                *action_name;
   GRegex               *regex;
   GHashTable           *commands;

Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c	2009-01-30 07:49:36 UTC (rev 6601)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c	2009-01-30 09:19:14 UTC (rev 6602)
@@ -512,19 +512,14 @@
   GtkCellRenderer *cell;
 
   /* Define the model */
-  model = gtk_list_store_new (3, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING);
+  model = gtk_list_store_new (2, G_TYPE_POINTER, G_TYPE_STRING);
   gtk_tree_view_set_model (treeview, GTK_TREE_MODEL (model));
   g_object_unref (model);
 
   /* Define the columns */
-  cell = gtk_cell_renderer_pixbuf_new ();
-  /* TODO Drop the comment once the icon is supported */
-  //g_object_set (cell, "width", 32, "height", 32, NULL);
-  gtk_tree_view_insert_column_with_attributes (treeview, -1, "Icon", cell, "icon-name", 1, NULL);
-
   cell = gtk_cell_renderer_text_new ();
   g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-  gtk_tree_view_insert_column_with_attributes (treeview, -1, "Action", cell, "markup", 2, NULL);
+  gtk_tree_view_insert_column_with_attributes (treeview, -1, "Action", cell, "markup", 1, NULL);
 
   refresh_actions_treeview (treeview, plugin);
 
@@ -552,7 +547,7 @@
 
       title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>", entry->action_name, g_regex_get_pattern (entry->regex));
       gtk_list_store_append (GTK_LIST_STORE (model), &iter);
-      gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, entry, 1, entry->icon_name, 2, title, -1);
+      gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, entry, 1, title, -1);
       g_free (title);
     }
 }




More information about the Goodies-commits mailing list