[gnome-control-center/wip/gbsneto/wifi-dialog: 2/3] network: Make connection editor dialog use a headerbar



commit f80c107d98ec01751653ac2883ae4332abca61d4
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Mar 3 20:55:49 2017 -0300

    network: Make connection editor dialog use a headerbar
    
    In order to start moving towards the new redesigned connection
    editor [1], it is necessary to make the dialog use a headerbar.
    
    Currently, however, it doesn't, making the connection editor
    dialog inconsistent with the rest of the panels, and the GNOME
    desktop as a whole.
    
    Fix that by exporting the buttons as action buttons, and setting
    the use-header-bar property to TRUE.
    
    [1] 
https://github.com/gnome-design-team/gnome-mockups/blob/master/system-settings/network/aday2/network-wires.png
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779841

 .../network/connection-editor/connection-editor.ui |   65 +++++++-------------
 1 files changed, 22 insertions(+), 43 deletions(-)
---
diff --git a/panels/network/connection-editor/connection-editor.ui 
b/panels/network/connection-editor/connection-editor.ui
index 3ddb3ad..4629461 100644
--- a/panels/network/connection-editor/connection-editor.ui
+++ b/panels/network/connection-editor/connection-editor.ui
@@ -9,52 +9,31 @@
     <property name="default_width">600</property>
     <property name="default_height">300</property>
     <property name="type_hint">dialog</property>
+    <property name="use_header_bar">1</property>
+    <child type="action">
+      <object class="GtkButton" id="details_cancel_button">
+        <property name="label" translatable="yes">_Cancel</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">True</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
+    <child type="action">
+      <object class="GtkButton" id="details_apply_button">
+        <property name="label" translatable="yes">_Apply</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="can_default">True</property>
+        <property name="receives_default">True</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox">
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area">
-            <property name="can_focus">False</property>
-            <property name="valign">end</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="details_cancel_button">
-                <property name="label" translatable="yes">_Cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="details_apply_button">
-                <property name="label" translatable="yes">_Apply</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">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>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
         <child>
           <object class="GtkNotebook" id="details_toplevel_notebook">
             <property name="visible">True</property>
@@ -192,8 +171,8 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="0">details_cancel_button</action-widget>
-      <action-widget response="0">details_apply_button</action-widget>
+      <action-widget response="cancel">details_cancel_button</action-widget>
+      <action-widget response="apply" default="true">details_apply_button</action-widget>
     </action-widgets>
   </object>
   <object class="GtkListStore" id="details_store">


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