[gnome-control-center] network: Use a GtkSwitch to control the flight mode



commit ebedc3ac94cb35bad83c47b7f011644f46466624
Author: Richard Hughes <richard hughsie com>
Date:   Wed Dec 15 21:37:31 2010 +0000

    network: Use a GtkSwitch to control the flight mode

 panels/network/cc-network-panel.c |    2 +-
 panels/network/network.ui         |   34 +++++++++++++++++++++++++++-------
 2 files changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 00c50bf..cfd3e14 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -1288,7 +1288,7 @@ cc_network_panel_init (CcNetworkPanel *panel)
 						     "button_unlock"));
 	gtk_widget_set_sensitive (widget, FALSE);
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
-						     "togglebutton_flightmode"));
+						     "switch_flight_mode"));
 	gtk_widget_set_sensitive (widget, FALSE);
 
 	widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
diff --git a/panels/network/network.ui b/panels/network/network.ui
index f34fa1d..5822e27 100644
--- a/panels/network/network.ui
+++ b/panels/network/network.ui
@@ -1396,16 +1396,36 @@
               </packing>
             </child>
             <child>
-              <object class="GtkToggleButton" id="togglebutton_flightmode">
-                <property name="label" translatable="yes">Flight Mode</property>
+              <object class="GtkHBox" id="hbox_flight_mode">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
+                <property name="spacing">3</property>
+                <child>
+                  <object class="GtkLabel" id="label_flight_mode">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Airplane Mode</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="GtkSwitch" id="switch_flight_mode">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="pack_type">end</property>
                 <property name="position">1</property>
               </packing>
             </child>



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