[gnome-control-center] mouse panel: Remove superfluous GtkListBoxRow



commit 9a43229ec2867f122ae51da943519cdbbb0649e6
Author: Timm Bäder <mail baedert org>
Date:   Sat Apr 2 18:17:27 2016 +0200

    mouse panel: Remove superfluous GtkListBoxRow
    
    The GtkBox>GtkListBoxRow>GtkListBox hierarchy is unnecessary, also
    remove the GtkSeparator from the GtkListBox and move it into the GtkBox,
    so the width matches that of the GtkListBox (it missed 2px on either
    side before).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764503

 panels/mouse/gnome-mouse-properties.c  |    3 +-
 panels/mouse/gnome-mouse-properties.ui |  413 +++++++++++++++-----------------
 2 files changed, 201 insertions(+), 215 deletions(-)
---
diff --git a/panels/mouse/gnome-mouse-properties.c b/panels/mouse/gnome-mouse-properties.c
index a648b9d..049db0e 100644
--- a/panels/mouse/gnome-mouse-properties.c
+++ b/panels/mouse/gnome-mouse-properties.c
@@ -210,6 +210,7 @@ setup_dialog (CcMousePropertiesPrivate *d)
                         G_SETTINGS_BIND_DEFAULT);
 
        gtk_list_box_set_header_func (GTK_LIST_BOX (WID ("general-listbox")), cc_list_box_update_header_func, 
NULL, NULL);
+       gtk_list_box_set_header_func (GTK_LIST_BOX (WID ("touchpad-listbox")), 
cc_list_box_update_header_func, NULL, NULL);
 
        /* Mouse section */
        gtk_widget_set_visible (WID ("mouse-frame"), d->have_mouse);
@@ -231,7 +232,7 @@ setup_dialog (CcMousePropertiesPrivate *d)
                                      touchpad_enabled_set_mapping,
                                      NULL, NULL);
        g_settings_bind_with_mapping (d->touchpad_settings, "send-events",
-                                     WID ("touchpad-options-box"), "sensitive",
+                                     WID ("touchpad-options-listbox"), "sensitive",
                                      G_SETTINGS_BIND_GET,
                                      touchpad_enabled_get_mapping,
                                      touchpad_enabled_set_mapping,
diff --git a/panels/mouse/gnome-mouse-properties.ui b/panels/mouse/gnome-mouse-properties.ui
index 74658c6..0c58fcb 100644
--- a/panels/mouse/gnome-mouse-properties.ui
+++ b/panels/mouse/gnome-mouse-properties.ui
@@ -422,263 +422,248 @@
                             </child>
                           </object>
                         </child>
-                        <child>
-                          <object class="GtkListBoxRow" id="touchpad-separator-row1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="activatable">False</property>
-                            <property name="selectable">False</property>
-                            <child>
-                              <object class="GtkSeparator" id="touchpad-separator1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkListBoxRow" id="touchpad-options-box">
+                      <object class="GtkSeparator">
+                        <property name="visible">true</property>
+                        <property name="orientation">horizontal</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkListBox" id="touchpad-options-listbox">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="activatable">false</property>
+                        <property name="can_focus">True</property>
+                        <property name="selection_mode">none</property>
                         <child>
-                          <object class="GtkListBox" id="touchpad-options-listbox">
+                          <object class="GtkListBoxRow" id="touchpad-natural-scrolling-row">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="selection_mode">none</property>
+                            <property name="activatable">false</property>
                             <child>
-                              <object class="GtkListBoxRow" id="touchpad-natural-scrolling-row">
+                              <object class="GtkGrid" id="touchpad-natural-scrolling-grid">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="activatable">false</property>
+                                <property name="can_focus">False</property>
+                                <property name="row_spacing">0</property>
+                                <property name="column_spacing">16</property>
+                                <property name="margin_start">12</property>
+                                <property name="margin_end">6</property>
+                                <property name="margin_top">6</property>
+                                <property name="margin_bottom">6</property>
+                                <property name="valign">center</property>
                                 <child>
-                                  <object class="GtkGrid" id="touchpad-natural-scrolling-grid">
+                                  <object class="GtkLabel" id="touchpad-natural-scrolling-label">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="row_spacing">0</property>
-                                    <property name="column_spacing">16</property>
-                                    <property name="margin_start">12</property>
-                                    <property name="margin_end">6</property>
-                                    <property name="margin_top">6</property>
-                                    <property name="margin_bottom">6</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes" comments="Translators: This 
switch reverses the scrolling direction for touchpads. The term used comes from OS X so use the same 
translation if possible. ">Natural Scrolling</property>
+                                    <property name="use_underline">True</property>
+                                    <property 
name="mnemonic_widget">touchpad-natural-scrolling-switch</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="touchpad-natural-scrolling-description">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Scrolling moves the content, 
not the view.</property>
+                                    <style>
+                                      <class name="dim-label"/>
+                                    </style>
+                                    <attributes>
+                                      <attribute name="scale" value="0.9"/>
+                                    </attributes>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSwitch" id="touchpad-natural-scrolling-switch">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="halign">end</property>
                                     <property name="valign">center</property>
-                                    <child>
-                                      <object class="GtkLabel" id="touchpad-natural-scrolling-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="hexpand">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes" comments="Translators: 
This switch reverses the scrolling direction for touchpads. The term used comes from OS X so use the same 
translation if possible. ">Natural Scrolling</property>
-                                        <property name="use_underline">True</property>
-                                        <property 
name="mnemonic_widget">touchpad-natural-scrolling-switch</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">0</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkLabel" id="touchpad-natural-scrolling-description">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Scrolling moves the 
content, not the view.</property>
-                                        <style>
-                                          <class name="dim-label"/>
-                                        </style>
-                                        <attributes>
-                                          <attribute name="scale" value="0.9"/>
-                                        </attributes>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">0</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkSwitch" id="touchpad-natural-scrolling-switch">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="halign">end</property>
-                                        <property name="valign">center</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">2</property>
-                                      </packing>
-                                    </child>
                                   </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">2</property>
+                                  </packing>
                                 </child>
                               </object>
                             </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkListBoxRow" id="touchpad-speed-row">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="activatable">false</property>
                             <child>
-                              <object class="GtkListBoxRow" id="touchpad-speed-row">
+                              <object class="GtkGrid" id="touchpad-speed-grid">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="activatable">false</property>
+                                <property name="can_focus">False</property>
+                                <property name="row_spacing">0</property>
+                                <property name="column_spacing">16</property>
+                                <property name="margin_start">12</property>
+                                <property name="margin_end">6</property>
+                                <property name="margin_top">8</property>
+                                <property name="margin_bottom">8</property>
+                                <property name="valign">center</property>
                                 <child>
-                                  <object class="GtkGrid" id="touchpad-speed-grid">
+                                  <object class="GtkLabel" id="touchpad-speed-label">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="row_spacing">0</property>
-                                    <property name="column_spacing">16</property>
-                                    <property name="margin_start">12</property>
-                                    <property name="margin_end">6</property>
-                                    <property name="margin_top">8</property>
-                                    <property name="margin_bottom">8</property>
-                                    <property name="valign">center</property>
-                                    <child>
-                                      <object class="GtkLabel" id="touchpad-speed-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="xalign">0</property>
-                                        <property name="valign">end</property>
-                                        <property name="label" translatable="yes">Touchpad Speed</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="mnemonic_widget">touchpad-speed-scale</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">0</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkScale" id="touchpad-speed-scale">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="adjustment">adjustment11</property>
-                                        <property name="draw_value">False</property>
-                                        <property name="expand">True</property>
-                                        <property name="halign">end</property>
-                                        <child internal-child="accessible">
-                                          <object class="AtkObject" id="touchpad_speed_scale-atkobject">
-                                            <property name="AtkObject::accessible-description" 
translatable="yes">Double-click timeout</property>
-                                          </object>
-                                        </child>
+                                    <property name="xalign">0</property>
+                                    <property name="valign">end</property>
+                                    <property name="label" translatable="yes">Touchpad Speed</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">touchpad-speed-scale</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkScale" id="touchpad-speed-scale">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment11</property>
+                                    <property name="draw_value">False</property>
+                                    <property name="expand">True</property>
+                                    <property name="halign">end</property>
+                                    <child internal-child="accessible">
+                                      <object class="AtkObject" id="touchpad_speed_scale-atkobject">
+                                        <property name="AtkObject::accessible-description" 
translatable="yes">Double-click timeout</property>
                                       </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">2</property>
-                                      </packing>
                                     </child>
                                   </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">2</property>
+                                  </packing>
                                 </child>
                               </object>
                             </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkListBoxRow" id="tap-to-click-row">
+                            <property name="visible">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="activatable">false</property>
                             <child>
-                              <object class="GtkListBoxRow" id="tap-to-click-row">
-                                <property name="visible">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="activatable">false</property>
+                              <object class="GtkGrid" id="tap-to-click-grid">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="row_spacing">0</property>
+                                <property name="column_spacing">32</property>
+                                <property name="margin_start">12</property>
+                                <property name="margin_end">6</property>
+                                <property name="margin_top">6</property>
+                                <property name="margin_bottom">6</property>
+                                <property name="valign">center</property>
                                 <child>
-                                  <object class="GtkGrid" id="tap-to-click-grid">
+                                  <object class="GtkLabel" id="tap-to-click-label">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="row_spacing">0</property>
-                                    <property name="column_spacing">32</property>
-                                    <property name="margin_start">12</property>
-                                    <property name="margin_end">6</property>
-                                    <property name="margin_top">6</property>
-                                    <property name="margin_bottom">6</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="valign">end</property>
+                                    <property name="label" translatable="yes">Tap to Click</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">tap-to-click-switch</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSwitch" id="tap-to-click-switch">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="halign">end</property>
                                     <property name="valign">center</property>
-                                    <child>
-                                      <object class="GtkLabel" id="tap-to-click-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="hexpand">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="valign">end</property>
-                                        <property name="label" translatable="yes">Tap to Click</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="mnemonic_widget">tap-to-click-switch</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">0</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkSwitch" id="tap-to-click-switch">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="halign">end</property>
-                                        <property name="valign">center</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">2</property>
-                                      </packing>
-                                    </child>
                                   </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">2</property>
+                                  </packing>
                                 </child>
                               </object>
                             </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkListBoxRow" id="edge-scrolling-row">
+                            <property name="visible">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="no_show_all">True</property>
+                            <property name="activatable">false</property>
                             <child>
-                              <object class="GtkListBoxRow" id="edge-scrolling-row">
-                                <property name="visible">False</property>
-                                <property name="can_focus">True</property>
-                                <property name="no_show_all">True</property>
-                                <property name="activatable">false</property>
+                              <object class="GtkGrid" id="edge-scrolling-grid">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="row_spacing">0</property>
+                                <property name="column_spacing">32</property>
+                                <property name="margin_start">12</property>
+                                <property name="margin_end">6</property>
+                                <property name="margin_top">6</property>
+                                <property name="margin_bottom">6</property>
+                                <property name="valign">center</property>
                                 <child>
-                                  <object class="GtkGrid" id="edge-scrolling-grid">
+                                  <object class="GtkLabel" id="edge-scrolling-label">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="row_spacing">0</property>
-                                    <property name="column_spacing">32</property>
-                                    <property name="margin_start">12</property>
-                                    <property name="margin_end">6</property>
-                                    <property name="margin_top">6</property>
-                                    <property name="margin_bottom">6</property>
+                                    <property name="hexpand">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="valign">end</property>
+                                    <property name="label" translatable="yes">Edge Scrolling</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="mnemonic_widget">edge-scrolling-switch</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">0</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSwitch" id="edge-scrolling-switch">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="halign">end</property>
                                     <property name="valign">center</property>
-                                    <child>
-                                      <object class="GtkLabel" id="edge-scrolling-label">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">False</property>
-                                        <property name="hexpand">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="valign">end</property>
-                                        <property name="label" translatable="yes">Edge Scrolling</property>
-                                        <property name="use_underline">True</property>
-                                        <property name="mnemonic_widget">edge-scrolling-switch</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">0</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkSwitch" id="edge-scrolling-switch">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="halign">end</property>
-                                        <property name="valign">center</property>
-                                      </object>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="top_attach">0</property>
-                                        <property name="width">1</property>
-                                        <property name="height">2</property>
-                                      </packing>
-                                    </child>
                                   </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="top_attach">0</property>
+                                    <property name="width">1</property>
+                                    <property name="height">2</property>
+                                  </packing>
                                 </child>
                               </object>
                             </child>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]