[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 01/01: settings: Further UI tweaks

noreply at xfce.org noreply at xfce.org
Fri Mar 27 01:19:04 CET 2020


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-clipman-plugin.

commit 5bd044ee70bde444f8ae9b25e91a7eea6bfdfc67
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Fri Mar 27 01:18:50 2020 +0100

    settings: Further UI tweaks
---
 panel-plugin/settings-dialog.ui       | 210 ++++++++++++++++++++--------------
 panel-plugin/xfce4-clipman-settings.c |  17 ++-
 2 files changed, 137 insertions(+), 90 deletions(-)

diff --git a/panel-plugin/settings-dialog.ui b/panel-plugin/settings-dialog.ui
index 349502a..5420328 100644
--- a/panel-plugin/settings-dialog.ui
+++ b/panel-plugin/settings-dialog.ui
@@ -361,7 +361,7 @@ Otherwise the menu will only appear when calling "xfce4-popup-clipman-actions" (
                       <object class="GtkBox">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="margin_left">6</property>
+                        <property name="margin_left">12</property>
                         <property name="orientation">vertical</property>
                         <child>
                           <object class="GtkRadioButton" id="skip-action-1">
@@ -566,14 +566,34 @@ Otherwise the menu will only appear when calling "xfce4-popup-clipman-actions" (
                 <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
-                  <object class="GtkCheckButton" id="save-on-quit">
-                    <property name="label" translatable="yes">Remember history</property>
+                  <object class="GtkBox">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">If checked, this option will restore the history on every new Xfce session</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes"><b>Remember history</b></property>
+                        <property name="use_markup">True</property>
+                        <property name="xalign">0</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSwitch" id="save-on-quit">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -582,111 +602,125 @@ Otherwise the menu will only appear when calling "xfce4-popup-clipman-actions" (
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="store-an-image">
-                    <property name="label" translatable="yes">Remember last copied _image</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">If checked, this option allows to store one image inside the history</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="reorder-items">
-                    <property name="label" translatable="yes">_Reorder history items</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Push last copied text to the top of the history, useful to reorder old items</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="reverse-order">
-                    <property name="label" translatable="yes">Re_verse history order</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Reverse order of the history shown in the menu</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkCheckButton" id="history-ignore-selections">
-                    <property name="label" translatable="yes">Ignore mouse 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_text" 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>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkBox" id="hbox-history-size">
+                  <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="spacing">4</property>
+                    <property name="margin_left">12</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
                     <child>
-                      <object class="GtkLabel" id="label-history-size">
+                      <object class="GtkCheckButton" id="store-an-image">
+                        <property name="label" translatable="yes">Remember last copied _image</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Size of the _history:</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">If checked, this option allows to store one image inside the history</property>
                         <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">max-texts-in-history</property>
-                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
-                        <property name="fill">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkSpinButton" id="max-texts-in-history">
+                      <object class="GtkCheckButton" id="reorder-items">
+                        <property name="label" translatable="yes">_Reorder history items</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="invisible_char">•</property>
-                        <property name="text" translatable="yes">5</property>
-                        <property name="adjustment">adjustment1</property>
-                        <property name="value">5</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Push last copied text to the top of the history, useful to reorder old items</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_indicator">True</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="pack_type">end</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkCheckButton" id="reverse-order">
+                        <property name="label" translatable="yes">Re_verse history order</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="tooltip_text" translatable="yes">Reverse order of the history shown in the menu</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="history-ignore-selections">
+                        <property name="label" translatable="yes">Ignore mouse 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_text" 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>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="hbox-history-size">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">4</property>
+                        <child>
+                          <object class="GtkLabel" id="label-history-size">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Size of the _history:</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">max-texts-in-history</property>
+                            <property name="xalign">0</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="max-texts-in-history">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">•</property>
+                            <property name="text" translatable="yes">5</property>
+                            <property name="adjustment">adjustment1</property>
+                            <property name="value">100</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="pack_type">end</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">4</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">5</property>
+                    <property name="position">6</property>
                   </packing>
                 </child>
               </object>
diff --git a/panel-plugin/xfce4-clipman-settings.c b/panel-plugin/xfce4-clipman-settings.c
index 975562a..135f7ca 100644
--- a/panel-plugin/xfce4-clipman-settings.c
+++ b/panel-plugin/xfce4-clipman-settings.c
@@ -169,8 +169,8 @@ prop_dialog_run (void)
                              G_CALLBACK (gtk_dialog_response), action_dialog);
 
   /* History tab */
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "save-on-quit")),
-                                DEFAULT_SAVE_ON_QUIT);
+  gtk_switch_set_state (GTK_SWITCH (gtk_builder_get_object (builder, "save-on-quit")),
+                        DEFAULT_SAVE_ON_QUIT);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "store-an-image")),
                                 (gboolean)DEFAULT_MAX_IMAGES_IN_HISTORY);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "reorder-items")),
@@ -194,6 +194,19 @@ prop_dialog_run (void)
                           gtk_builder_get_object (builder, "history-ignore-selections"), "active");
   xfconf_g_property_bind (xfconf_channel, "/settings/max-texts-in-history", G_TYPE_UINT,
                           gtk_builder_get_object (builder, "max-texts-in-history"), "value");
+  xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
+                          gtk_builder_get_object (builder, "store-an-image"), "sensitive");
+  xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
+                          gtk_builder_get_object (builder, "reorder-items"), "sensitive");
+  xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
+                          gtk_builder_get_object (builder, "reverse-order"), "sensitive");
+  xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
+                          gtk_builder_get_object (builder, "history-ignore-selections"), "sensitive");
+  xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
+                          gtk_builder_get_object (builder, "max-texts-in-history"), "sensitive");
+  xfconf_g_property_bind (xfconf_channel, "/settings/save-on-quit", G_TYPE_BOOLEAN,
+                          gtk_builder_get_object (builder, "label-history-size"), "sensitive");
+
   /* Run the dialog */
   while ((gtk_dialog_run (GTK_DIALOG (settings_dialog))) == 2);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list