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

Mike Massonnet mmassonnet at xfce.org
Mon Mar 30 23:38:15 CEST 2009


Author: mmassonnet
Date: 2009-03-30 21:38:15 +0000 (Mon, 30 Mar 2009)
New Revision: 7062

Modified:
   xfce4-clipman-plugin/trunk/ChangeLog
   xfce4-clipman-plugin/trunk/TODO
   xfce4-clipman-plugin/trunk/panel-plugin/panel-plugin.c
   xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade
   xfce4-clipman-plugin/trunk/panel-plugin/xfce4-clipman-actions.xml.in
Log:
Redesign the actions settings dialog

Modified: xfce4-clipman-plugin/trunk/ChangeLog
===================================================================
--- xfce4-clipman-plugin/trunk/ChangeLog	2009-03-30 21:08:03 UTC (rev 7061)
+++ xfce4-clipman-plugin/trunk/ChangeLog	2009-03-30 21:38:15 UTC (rev 7062)
@@ -1,3 +1,17 @@
+2009-03-30	Mike Massonnet
+Redesign the actions settings dialog
+
+	- panel-plugin/settings-dialog.glade:
+		Unify the commands and the actions dialog.  Add a refresh
+		button for the command (makes the commands editable).
+	- panel-plugin/panel-plugin.c:
+		Implement the new callbacks.  Set the settings dialog
+		back to transient and put it inside a window group (cause
+		gtk_dialog_run makes the dialog modal, cf. bug #4977).
+		group + make it transient
+	- panel-plugin/xfce4-clipman-actions.xml.in:
+		Change the regex' a little bit.
+
 2009-02-11	Mike Massonnet
 Add i18n support for the default XML actions file.
 

Modified: xfce4-clipman-plugin/trunk/TODO
===================================================================
--- xfce4-clipman-plugin/trunk/TODO	2009-03-30 21:08:03 UTC (rev 7061)
+++ xfce4-clipman-plugin/trunk/TODO	2009-03-30 21:38:15 UTC (rev 7062)
@@ -1,10 +1,7 @@
 Deps:
 - Check deps versions
 Actions:
-- Finish the Glade rewrite
-- ?Set sensitivity of "ok" buttons in the actions settings dialogs
-- Sanity check for action_name on "add action"
-- Sanity check on the regex
+- Set sensitivity of "ok" button in the actions settings dialogs
 - A regex validator dialog
 Collector:
 - Drop the restore code and push the clipboard data inside the plugin so it's the owner

Modified: xfce4-clipman-plugin/trunk/panel-plugin/panel-plugin.c
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/panel-plugin.c	2009-03-30 21:08:03 UTC (rev 7061)
+++ xfce4-clipman-plugin/trunk/panel-plugin/panel-plugin.c	2009-03-30 21:38:15 UTC (rev 7062)
@@ -123,6 +123,8 @@
                                                          MyPlugin *plugin);
 static void             cb_add_command                  (GtkButton *button,
                                                          MyPlugin *plugin);
+static void             cb_refresh_command              (GtkButton *button,
+                                                         MyPlugin *plugin);
 static void             cb_delete_command               (GtkButton *button,
                                                          MyPlugin *plugin);
 
@@ -228,19 +230,16 @@
                         MyPlugin *plugin)
 {
   GtkWidget *dialog;
+  GtkWindowGroup *group;
 
   /* GladeXML */
   plugin->gxml = glade_xml_new_from_buffer (settings_dialog_glade, settings_dialog_glade_length, NULL, NULL);
 
   /* Settings dialog */
   dialog = glade_xml_get_widget (plugin->gxml, "settings-dialog");
-  /* NOTE Normally the dialog should be set transient for the top level widget
-   * of the panel plugin, but it renders weird bugs doing so with either glade
-   * or glade+xfce_titled_dialog. */
-  /*
-  gtk_window_set_transient_for (GTK_WINDOW (dialog),
-                                GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (panel_plugin))));
-  */
+  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (panel_plugin))));
+  group = gtk_window_group_new ();
+  gtk_window_group_add_window (group, GTK_WINDOW (dialog));
 
   /* General settings */
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (plugin->gxml, "save-on-quit")),
@@ -251,7 +250,6 @@
                                 (gboolean)DEFAULT_MAX_IMAGES_IN_HISTORY);
   gtk_spin_button_set_value (GTK_SPIN_BUTTON (glade_xml_get_widget (plugin->gxml, "max-texts-in-history")),
                              (gdouble)DEFAULT_MAX_TEXTS_IN_HISTORY);
-
   xfconf_g_property_bind (plugin->channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
                           G_OBJECT (glade_xml_get_widget (plugin->gxml, "save-on-quit")), "active");
   xfconf_g_property_bind (plugin->channel, "/settings/add-primary-clipboard", G_TYPE_BOOLEAN,
@@ -272,6 +270,7 @@
   glade_xml_signal_connect_data (plugin->gxml, "cb_delete_action", G_CALLBACK (cb_delete_action), plugin);
   glade_xml_signal_connect_data (plugin->gxml, "cb_actions_row_activated", G_CALLBACK (cb_actions_row_activated), plugin);
   glade_xml_signal_connect_data (plugin->gxml, "cb_add_command", G_CALLBACK (cb_add_command), plugin);
+  glade_xml_signal_connect_data (plugin->gxml, "cb_refresh_command", G_CALLBACK (cb_refresh_command), plugin);
   glade_xml_signal_connect_data (plugin->gxml, "cb_delete_command", G_CALLBACK (cb_delete_command), plugin);
 
   setup_actions_treeview (GTK_TREE_VIEW (glade_xml_get_widget (plugin->gxml, "actions")), plugin);
@@ -283,6 +282,7 @@
   xfce_panel_plugin_unblock_menu (panel_plugin);
 
   gtk_widget_destroy (dialog);
+  g_object_unref (group);
   g_object_unref (plugin->gxml);
   plugin->gxml = NULL;
 
@@ -775,52 +775,97 @@
                                MyPlugin *plugin)
 {
   GtkTreeModel *model;
+  GtkTreeIter iter;
   gboolean sensitive;
+  gchar *command_name = NULL;
+  gchar *command = NULL;
 
-  sensitive = gtk_tree_selection_get_selected (selection, &model, NULL);
+  sensitive = gtk_tree_selection_get_selected (selection, &model, &iter);
 
+  gtk_widget_set_sensitive (glade_xml_get_widget (plugin->gxml, "button-refresh-command"), sensitive);
   gtk_widget_set_sensitive (glade_xml_get_widget (plugin->gxml, "button-delete-command"), sensitive);
+
+  if (sensitive)
+    {
+      gtk_tree_model_get (model, &iter, 1, &command_name, 2, &command, -1);
+      gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (plugin->gxml, "command-name")), command_name);
+      gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (plugin->gxml, "command")), command);
+      g_free (command_name);
+      g_free (command);
+    }
+  else
+    {
+      gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (plugin->gxml, "command-name")), "");
+      gtk_entry_set_text (GTK_ENTRY (glade_xml_get_widget (plugin->gxml, "command")), "");
+    }
 }
 
 static void
 cb_add_command (GtkButton *button,
                 MyPlugin *plugin)
 {
-  GtkWidget *dialog;
   GtkWidget *command_name;
   GtkWidget *command;
   GtkTreeModel *model;
   GtkTreeIter iter;
   gchar *title;
-  gint res;
 
-  dialog = glade_xml_get_widget (plugin->gxml, "command-dialog");
   command_name = glade_xml_get_widget (plugin->gxml, "command-name");
   command = glade_xml_get_widget (plugin->gxml, "command");
 
-  res = gtk_dialog_run (GTK_DIALOG (dialog));
-  gtk_widget_hide (dialog);
+  if (gtk_entry_get_text (GTK_ENTRY (command_name))[0] == '\0'
+      && gtk_entry_get_text (GTK_ENTRY (command))[0] == '\0')
+    return;
 
-  /* TODO remove the get_text checks once the sensitivity of ok button is handled */
-  if (res == 1 && gtk_entry_get_text (GTK_ENTRY (command_name))[0] != '\0'
-      && gtk_entry_get_text (GTK_ENTRY (command))[0] != '\0')
-    {
-      model = gtk_tree_view_get_model (GTK_TREE_VIEW (glade_xml_get_widget (plugin->gxml, "commands")));
-      title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>",
-                               gtk_entry_get_text (GTK_ENTRY (command_name)),
-                               gtk_entry_get_text (GTK_ENTRY (command)));
-      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 (title);
-    }
+  model = gtk_tree_view_get_model (GTK_TREE_VIEW (glade_xml_get_widget (plugin->gxml, "commands")));
+  title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>",
+                           gtk_entry_get_text (GTK_ENTRY (command_name)),
+                           gtk_entry_get_text (GTK_ENTRY (command)));
+  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 (title);
 
   gtk_entry_set_text (GTK_ENTRY (command_name), "");
   gtk_entry_set_text (GTK_ENTRY (command), "");
 }
 
 static void
+cb_refresh_command (GtkButton *button,
+                    MyPlugin *plugin)
+{
+  GtkWidget *treeview;
+  GtkTreeSelection *selection;
+  GtkTreeModel *model;
+  GtkTreeIter iter;
+  GtkWidget *command_name;
+  GtkWidget *command;
+  gchar *title;
+
+  treeview = glade_xml_get_widget (plugin->gxml, "commands");
+
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
+  if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+    {
+      g_critical ("Trying to refresh a command but got no selection");
+      return;
+    }
+
+  command_name = glade_xml_get_widget (plugin->gxml, "command-name");
+  command = glade_xml_get_widget (plugin->gxml, "command");
+  title = g_strdup_printf ("<b>%s</b>\n<small>%s</small>",
+                           gtk_entry_get_text (GTK_ENTRY (command_name)),
+                           gtk_entry_get_text (GTK_ENTRY (command)));
+  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)));
+  g_free (title);
+
+  gtk_tree_selection_unselect_all (selection);
+}
+
+static void
 cb_delete_command (GtkButton *button,
                    MyPlugin *plugin)
 {

Modified: xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade	2009-03-30 21:08:03 UTC (rev 7061)
+++ xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade	2009-03-30 21:38:15 UTC (rev 7062)
@@ -303,7 +303,7 @@
             <property name="layout_style">edge</property>
             <child>
               <widget class="GtkButton" id="button2">
-                <property name="label" translatable="yes">gtk-help</property>
+                <property name="label">gtk-help</property>
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
                 <property name="can_focus">True</property>
@@ -311,18 +311,22 @@
                 <property name="use_stock">True</property>
               </widget>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <widget class="GtkButton" id="button1">
-                <property name="label" translatable="yes">gtk-close</property>
+                <property name="label">gtk-close</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </widget>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
@@ -340,8 +344,8 @@
     <property name="title" translatable="yes">Edit Action</property>
     <property name="modal">True</property>
     <property name="window_position">center-on-parent</property>
-    <property name="default_width">300</property>
-    <property name="default_height">380</property>
+    <property name="default_width">400</property>
+    <property name="default_height">440</property>
     <property name="destroy_with_parent">True</property>
     <property name="icon_name">system-run</property>
     <property name="type_hint">dialog</property>
@@ -351,8 +355,42 @@
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
-        <property name="spacing">2</property>
+        <property name="spacing">6</property>
         <child>
+          <widget class="GtkHBox" id="hbox3">
+            <property name="visible">True</property>
+            <property name="spacing">6</property>
+            <child>
+              <widget class="GtkImage" id="image2">
+                <property name="visible">True</property>
+                <property name="stock">gtk-dialog-info</property>
+                <property name="icon-size">6</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label8">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">You can use the matching regex parameters "\1", "\2" and so on in the command to replace it against the matched sub-texts. The parameter "\0" represents the complete text. If you don't know how to write regex' have a look at the documentation of Clipman, it introduces them.</property>
+                <property name="wrap">True</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
           <widget class="GtkFrame" id="frame-action">
             <property name="visible">True</property>
             <property name="label_xalign">0</property>
@@ -368,20 +406,9 @@
                     <property name="visible">True</property>
                     <property name="n_rows">2</property>
                     <property name="n_columns">2</property>
+                    <property name="column_spacing">2</property>
                     <property name="row_spacing">6</property>
                     <child>
-                      <widget class="GtkEntry" id="regex">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
                       <widget class="GtkLabel" id="label4">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
@@ -413,6 +440,46 @@
                         <property name="right_attach">2</property>
                       </packing>
                     </child>
+                    <child>
+                      <widget class="GtkHBox" id="hbox2">
+                        <property name="visible">True</property>
+                        <property name="spacing">4</property>
+                        <child>
+                          <widget class="GtkEntry" id="regex">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">&#x2022;</property>
+                          </widget>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkButton" id="button1">
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <child>
+                              <widget class="GtkImage" id="image5">
+                                <property name="visible">True</property>
+                                <property name="stock">gtk-edit</property>
+                                <property name="icon-size">1</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                      </packing>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -431,7 +498,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
-            <property name="position">1</property>
+            <property name="position">2</property>
           </packing>
         </child>
         <child>
@@ -450,19 +517,88 @@
                     <property name="visible">True</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                      <widget class="GtkVBox" id="vbox1">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">in</property>
+                        <property name="spacing">6</property>
                         <child>
-                          <widget class="GtkTreeView" id="commands">
+                          <widget class="GtkTable" id="table2">
                             <property name="visible">True</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">2</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <widget class="GtkLabel" id="label6">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Name:</property>
+                              </widget>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Command:</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="command-name">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkEntry" id="command">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkScrolledWindow" id="scrolledwindow3">
+                            <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="headers_visible">False</property>
-                            <property name="rules_hint">True</property>
+                            <property name="hscrollbar_policy">automatic</property>
+                            <property name="vscrollbar_policy">automatic</property>
+                            <property name="shadow_type">in</property>
+                            <child>
+                              <widget class="GtkTreeView" id="commands">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="headers_visible">False</property>
+                                <property name="rules_hint">True</property>
+                              </widget>
+                            </child>
                           </widget>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
                         </child>
                       </widget>
                       <packing>
@@ -494,6 +630,27 @@
                           </packing>
                         </child>
                         <child>
+                          <widget class="GtkButton" id="button-refresh-command">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <signal name="clicked" handler="cb_refresh_command"/>
+                            <child>
+                              <widget class="GtkImage" id="image4">
+                                <property name="visible">True</property>
+                                <property name="stock">gtk-refresh</property>
+                                <property name="icon-size">1</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
                           <widget class="GtkButton" id="button-delete-command">
                             <property name="visible">True</property>
                             <property name="sensitive">False</property>
@@ -511,7 +668,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">1</property>
+                            <property name="position">3</property>
                           </packing>
                         </child>
                       </widget>
@@ -537,7 +694,7 @@
             </child>
           </widget>
           <packing>
-            <property name="position">2</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child internal-child="action_area">
@@ -546,19 +703,21 @@
             <property name="layout_style">end</property>
             <child>
               <widget class="GtkButton" id="button2">
-                <property name="label" translatable="yes">gtk-cancel</property>
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </widget>
               <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <widget class="GtkButton" id="entry-dialogbutton-ok1">
-                <property name="label" translatable="yes">gtk-apply</property>
+                <property name="label">gtk-ok</property>
                 <property name="response_id">1</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -566,157 +725,13 @@
                 <property name="use_stock">True</property>
               </widget>
               <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="command-dialog">
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Edit Command</property>
-    <property name="resizable">False</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="destroy_with_parent">True</property>
-    <property name="icon_name">system-run</property>
-    <property name="type_hint">dialog</property>
-    <property name="skip_taskbar_hint">True</property>
-    <property name="transient_for">entry-dialog</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox3">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <property name="spacing">6</property>
-            <child>
-              <widget class="GtkImage" id="image1">
-                <property name="visible">True</property>
-                <property name="stock">gtk-dialog-info</property>
-                <property name="icon-size">5</property>
-              </widget>
-              <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">You can use the matching regex parameters "\1", "\2" and so on in the command to replace it against the matched sub-texts. The parameter "\0" represents the complete text.</property>
-                <property name="wrap">True</property>
-              </widget>
-              <packing>
                 <property name="position">1</property>
               </packing>
             </child>
           </widget>
           <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkTable" id="table1">
-            <property name="visible">True</property>
-            <property name="border_width">6</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <widget class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Name:</property>
-              </widget>
-              <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Command:</property>
-              </widget>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="command-name">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="command">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area3">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="label" translatable="yes">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button2">
-                <property name="label" translatable="yes">gtk-ok</property>
-                <property name="response_id">1</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
             <property name="expand">False</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>

Modified: xfce4-clipman-plugin/trunk/panel-plugin/xfce4-clipman-actions.xml.in
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/xfce4-clipman-actions.xml.in	2009-03-30 21:08:03 UTC (rev 7061)
+++ xfce4-clipman-plugin/trunk/panel-plugin/xfce4-clipman-actions.xml.in	2009-03-30 21:38:15 UTC (rev 7062)
@@ -19,7 +19,7 @@
 <actions>
 	<action>
 		<_name>Image</_name>
-		<regex>(/|http|ftp).+\.(jpg|png|gif)</regex>
+		<regex>(http|ftp).+\.(jpg|png|gif)</regex>
 		<commands>
 			<command>
 				<_name>View with Ristretto</_name>
@@ -33,7 +33,7 @@
 	</action>
 	<action>
 		<_name>Bugz</_name>
-		<regex>.*bug #?([0-9]+).*</regex>
+		<regex>bug ?#?([0-9]+)</regex>
 		<commands>
 			<command>
 				<_name>Xfce Bug</_name>




More information about the Goodies-commits mailing list