[Xfce4-commits] <xfce4-clipman-plugin:master> New option 'ignore selections'

Mike Massonnet mmassonnet at xfce.org
Sat Sep 12 03:28:01 CEST 2009


Updating branch refs/heads/master
         to 7f5f497b97d557e79f22787836be9496926fb031 (commit)
       from 761c1cbd616049c35f53396a9a02694b455c3d80 (commit)

commit 7f5f497b97d557e79f22787836be9496926fb031
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Sat Sep 12 03:26:52 2009 +0200

    New option 'ignore selections'

 ChangeLog                             |   15 ++++++++++
 panel-plugin/collector.c              |    6 +++-
 panel-plugin/menu.c                   |    1 -
 panel-plugin/settings-dialog.glade    |   46 ++++++++++++++++++---------------
 panel-plugin/xfce4-clipman-settings.c |    2 -
 5 files changed, 45 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 746221d..d08e47b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2009-09-11	Mike Massonnet
+New option 'ignore selections'
+
+	- panel-plugin/settings-dialog.glade:
+		Detached the Exclude selections from history option from the
+		Sync selections and move it down to the History frame as
+		Ignore selections.
+	- panel-plugin/xfce4-clipman-settings.c:
+		Drop the binding between sync selections and the ignore
+		selections checkbox sensitivity.
+	- panel-plugin/collector.c:
+		Catch the selections in addition if the ignore selections is
+		false as it is now independant from the sync selections
+		option.
+
 2009-09-03	Mike Massonnet
 === Release 1.1.0 ===
 
diff --git a/panel-plugin/collector.c b/panel-plugin/collector.c
index bcd939a..4b3eafb 100644
--- a/panel-plugin/collector.c
+++ b/panel-plugin/collector.c
@@ -129,7 +129,9 @@ cb_clipboard_owner_change (ClipmanCollector *collector,
        * actually check inside a delayed timeout if the mouse is still pressed
        * or if the shift key is hold down, and once both are released the
        * content will go to the history. */
-      if (collector->priv->add_primary_clipboard || collector->priv->enable_actions)
+      if (collector->priv->add_primary_clipboard
+          || !collector->priv->history_ignore_primary_clipboard
+          || collector->priv->enable_actions)
         {
           if (collector->priv->primary_clipboard_timeout == 0)
             collector->priv->primary_clipboard_timeout =
@@ -158,6 +160,8 @@ cb_check_primary_clipboard (ClipmanCollector *collector)
           if (collector->priv->add_primary_clipboard
               && collector->priv->history_ignore_primary_clipboard)
             collector->priv->internal_change = TRUE;
+          else if (!collector->priv->history_ignore_primary_clipboard)
+            clipman_history_add_text (collector->priv->history, text);
 
           /* Make a copy inside the default clipboard */
           if (collector->priv->add_primary_clipboard)
diff --git a/panel-plugin/menu.c b/panel-plugin/menu.c
index 98f18dd..c11d1c3 100644
--- a/panel-plugin/menu.c
+++ b/panel-plugin/menu.c
@@ -260,7 +260,6 @@ static void
 clipman_menu_init (ClipmanMenu *menu)
 {
   GtkWidget *mi;
-  ClipmanCollector *collector;
 
   menu->priv = GET_PRIVATE (menu);
 
diff --git a/panel-plugin/settings-dialog.glade b/panel-plugin/settings-dialog.glade
index 482401e..7a87107 100644
--- a/panel-plugin/settings-dialog.glade
+++ b/panel-plugin/settings-dialog.glade
@@ -17,6 +17,7 @@
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child>
           <widget class="GtkNotebook" id="notebook1">
@@ -27,6 +28,7 @@
               <widget class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">2</property>
                 <child>
                   <widget class="GtkFrame" id="frame2">
@@ -59,26 +61,6 @@
                                 <property name="position">0</property>
                               </packing>
                             </child>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment4">
-                                <property name="visible">True</property>
-                                <property name="left_padding">12</property>
-                                <child>
-                                  <widget class="GtkCheckButton" id="history-ignore-selections">
-                                    <property name="label" translatable="yes">E_xclude from history</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="tooltip" translatable="yes">If checked, the selections won't affect the history except the manual copies</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -114,6 +96,7 @@
                         <child>
                           <widget class="GtkVBox" id="vbox2">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">6</property>
                             <child>
                               <widget class="GtkCheckButton" id="save-on-quit">
@@ -144,6 +127,21 @@
                               </packing>
                             </child>
                             <child>
+                              <widget class="GtkCheckButton" id="history-ignore-selections">
+                                <property name="label" translatable="yes">Ignore s_elections</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="has_tooltip">True</property>
+                                <property name="tooltip" translatable="yes">If checked, the selections won't affect the history except the manual copies</property>
+                                <property name="use_underline">True</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
                               <widget class="GtkHBox" id="hbox1">
                                 <property name="visible">True</property>
                                 <property name="spacing">6</property>
@@ -165,6 +163,7 @@
                                   <widget class="GtkSpinButton" id="max-texts-in-history">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
+                                    <property name="invisible_char">&#x2022;</property>
                                     <property name="adjustment">6 5 1000 1 10 0</property>
                                   </widget>
                                   <packing>
@@ -175,7 +174,7 @@
                                 </child>
                               </widget>
                               <packing>
-                                <property name="position">2</property>
+                                <property name="position">3</property>
                               </packing>
                             </child>
                           </widget>
@@ -215,6 +214,7 @@
               <widget class="GtkVBox" id="vbox3">
                 <property name="visible">True</property>
                 <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
                   <widget class="GtkCheckButton" id="enable-actions">
@@ -260,6 +260,7 @@
                     <child>
                       <widget class="GtkVBox" id="vbox4">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <widget class="GtkButton" id="button-add-action">
@@ -415,6 +416,7 @@
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox2">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">6</property>
         <child>
           <widget class="GtkHBox" id="hbox3">
@@ -594,6 +596,7 @@
                     <child>
                       <widget class="GtkVBox" id="vbox1">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <widget class="GtkTable" id="table2">
@@ -683,6 +686,7 @@
                     <child>
                       <widget class="GtkVBox" id="vbox4">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">6</property>
                         <child>
                           <widget class="GtkButton" id="button-add-command">
diff --git a/panel-plugin/xfce4-clipman-settings.c b/panel-plugin/xfce4-clipman-settings.c
index 283764b..12f43be 100644
--- a/panel-plugin/xfce4-clipman-settings.c
+++ b/panel-plugin/xfce4-clipman-settings.c
@@ -94,8 +94,6 @@ prop_dialog_run ()
                              (gdouble)DEFAULT_MAX_TEXTS_IN_HISTORY);
   xfconf_g_property_bind (xfconf_channel, "/settings/add-primary-clipboard", G_TYPE_BOOLEAN,
                           G_OBJECT (glade_xml_get_widget (gxml, "add-selections")), "active");
-  xfconf_g_property_bind (xfconf_channel, "/settings/add-primary-clipboard", G_TYPE_BOOLEAN,
-                          G_OBJECT (glade_xml_get_widget (gxml, "history-ignore-selections")), "sensitive");
   xfconf_g_property_bind (xfconf_channel, "/settings/history-ignore-primary-clipboard", G_TYPE_BOOLEAN,
                           G_OBJECT (glade_xml_get_widget (gxml, "history-ignore-selections")), "active");
   xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,



More information about the Xfce4-commits mailing list