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

Mike Massonnet mmassonnet at xfce.org
Thu Jan 15 09:53:11 CET 2009


Author: mmassonnet
Date: 2009-01-15 08:53:11 +0000 (Thu, 15 Jan 2009)
New Revision: 6462

Modified:
   xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog
   xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c
   xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c
   xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/settings-dialog.glade
Log:
Some minor changes.

Modified: xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog	2009-01-15 07:55:19 UTC (rev 6461)
+++ xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog	2009-01-15 08:53:11 UTC (rev 6462)
@@ -1,3 +1,17 @@
+2009-01-15	Mike Massonnet
+Some minor changes.
+
+	- panel-plugin/panel-plugin.c(panel_plugin_configure),
+	panel-plugin/settings-dialog.glade:
+		The menu is blocked while the dialog is shown.  Set the dialog
+		transient for the panel plugin toplevel window and destroy with
+		the parent (this introduces a bug: the panel button remains
+		unclickable but dunno why).
+	- panel-plugin/collector.c(cb_check_primary_clipboard):
+		Change the behavior of the "add-primary-selection" option to
+		copy the text to the default clipboard, so that it now behaves
+		like "what you select can be pasted".
+
 2009-01-14	Mike Massonnet
 The settings dialog is in.
 

Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c	2009-01-15 07:55:19 UTC (rev 6461)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c	2009-01-15 08:53:11 UTC (rev 6462)
@@ -177,7 +177,13 @@
     {
       text = gtk_clipboard_wait_for_text (collector->priv->primary_clipboard);
       if (text != NULL && text[0] != '\0')
-        clipman_history_add_text (collector->priv->history, text, collector->priv->primary_clipboard);
+        {
+          clipman_history_add_text (collector->priv->history, text, collector->priv->primary_clipboard);
+
+          /* Make a copy inside the default clipboard */
+          collector->priv->restoring = TRUE;
+          gtk_clipboard_set_text (collector->priv->default_clipboard, text, -1);
+        }
       g_free (text);
     }
   else

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-15 07:55:19 UTC (rev 6461)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c	2009-01-15 08:53:11 UTC (rev 6462)
@@ -186,6 +186,10 @@
   /* Get GladeXML and the dialog */
   gxml = glade_xml_new_from_buffer (settings_dialog_glade, settings_dialog_glade_length, NULL, NULL);
   dialog = glade_xml_get_widget (gxml, "settings-dialog");
+  /* FIXME Doing this with Glade makes the panel button unclickable... but
+   * still we need to destroy the dialog when the panel quits, so keep it. */
+  gtk_window_set_transient_for (GTK_WINDOW (dialog),
+                                GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (panel_plugin))));
 
   /* Set default values */
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (gxml, "save-on-quit")),
@@ -197,7 +201,7 @@
   gtk_spin_button_set_value (GTK_SPIN_BUTTON (glade_xml_get_widget (gxml, "max-texts-in-history")),
                              (gdouble)DEFAULT_MAX_TEXTS_IN_HISTORY);
 
-  /* Bind the properties to Xfconf */
+  /* Bind the Xfconf properties to the widgets */
   xfconf_g_property_bind (plugin->channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
                           G_OBJECT (glade_xml_get_widget (gxml, "save-on-quit")), "active");
   xfconf_g_property_bind (plugin->channel, "/settings/add-primary-clipboard", G_TYPE_BOOLEAN,
@@ -208,7 +212,9 @@
                           G_OBJECT (glade_xml_get_widget (gxml, "max-texts-in-history")), "value");
 
   /* Run the dialog */
+  xfce_panel_plugin_block_menu (panel_plugin);
   gtk_dialog_run (GTK_DIALOG (dialog));
+  xfce_panel_plugin_unblock_menu (panel_plugin);
 
   gtk_widget_destroy (dialog);
   g_object_unref (gxml);

Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/settings-dialog.glade
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/settings-dialog.glade	2009-01-15 07:55:19 UTC (rev 6461)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/settings-dialog.glade	2009-01-15 08:53:11 UTC (rev 6462)
@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Wed Jan 14 20:13:28 2009 -->
+<!--Generated with glade3 3.4.5 on Thu Jan 15 09:34:53 2009 -->
 <glade-interface>
   <requires lib="xfce4"/>
   <widget class="XfceTitledDialog" id="settings-dialog">
     <property name="title">Clipman</property>
     <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="destroy_with_parent">True</property>
     <property name="icon_name">gtk-paste</property>
     <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
     <property name="has_separator">False</property>




More information about the Goodies-commits mailing list