[Xfce4-commits] [xfce/xfce4-panel] 04/12: Update preferences dialog for intelligent autohide

noreply at xfce.org noreply at xfce.org
Mon Feb 27 22:51:45 CET 2017


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

ochosi pushed a commit to branch master
in repository xfce/xfce4-panel.

commit ca5846f28a53370cfb603ccd3ad2f5bdd6cd2b54
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Mon Feb 27 00:27:25 2017 +0100

    Update preferences dialog for intelligent autohide
    
    Instead of a single "Show/hide panel automatically" check box, we now
    use a "Automatically hide the panel" combo box with the options "Never",
    "Intelligently" and "Always".
    
    Rebased for the Gtk3 port by Simon Steinbeiss <simon at xfce.org>
---
 panel/panel-preferences-dialog.c     |  2 +-
 panel/panel-preferences-dialog.glade | 53 ++++++++++++++++++++++++++++++------
 2 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/panel/panel-preferences-dialog.c b/panel/panel-preferences-dialog.c
index 1e3292a..07569fb 100644
--- a/panel/panel-preferences-dialog.c
+++ b/panel/panel-preferences-dialog.c
@@ -437,7 +437,7 @@ panel_preferences_dialog_bindings_update (PanelPreferencesDialog *dialog)
   panel_preferences_dialog_bindings_add (dialog, "mode", "active", 0);
   panel_preferences_dialog_bindings_add (dialog, "span-monitors", "active", 0);
   panel_preferences_dialog_bindings_add (dialog, "position-locked", "active", 0);
-  panel_preferences_dialog_bindings_add (dialog, "autohide", "active", 0);
+  panel_preferences_dialog_bindings_add (dialog, "autohide-behavior", "active");
   panel_preferences_dialog_bindings_add (dialog, "disable-struts", "active", 0);
   panel_preferences_dialog_bindings_add (dialog, "size", "value", 0);
   panel_preferences_dialog_bindings_add (dialog, "nrows", "value", 0);
diff --git a/panel/panel-preferences-dialog.glade b/panel/panel-preferences-dialog.glade
index 7b889b0..47e2319 100644
--- a/panel/panel-preferences-dialog.glade
+++ b/panel/panel-preferences-dialog.glade
@@ -3,6 +3,23 @@
 <interface>
   <requires lib="gtk+" version="3.20"/>
   <requires lib="libxfce4ui-2" version="4.12"/>
+  <object class="GtkListStore" id="autohide-behavior-store">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Never</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Intelligently</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Always</col>
+      </row>
+    </data>
+  </object>
   <object class="GtkAdjustment" id="enter-opacity">
     <property name="upper">100</property>
     <property name="value">100</property>
@@ -410,14 +427,35 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkCheckButton" id="autohide">
-                                    <property name="label" translatable="yes">Automatically show and _hide the panel</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">Select this option to hide the panel when the pointer is not above it. This only works when the panel is attached to a screen edge.</property>
-                                    <property name="use_underline">True</property>
-                                    <property name="draw_indicator">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">12</property>
+                                    <child>
+                                      <object class="GtkLabel" id="autohide_label">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label" translatable="yes">Automatically hide the panel:</property>
+                                        <property name="xalign">0</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkComboBox" id="autohide-behavior">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="model">autohide-behavior-store</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
                                   </object>
                                   <packing>
                                     <property name="expand">False</property>
@@ -1124,7 +1162,6 @@
   <object class="GtkSizeGroup" id="bg-sizegroup">
     <widgets>
       <widget name="label7"/>
-      <widget name="label15"/>
       <widget name="label16"/>
       <widget name="label19"/>
     </widgets>

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


More information about the Xfce4-commits mailing list