[network-manager-applet/lr/gtk-deprecations] ui: drop rest of GtkAlignments



commit aa19382ef55851e629e64d0918a3694ad0fcd25d
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon Feb 23 15:25:23 2015 +0100

    ui: drop rest of GtkAlignments
    
    Use VBoxes and margin properties on the children.
    
    Alignments are deprecated since 3.14.

 src/applet-dialogs.c                        |   15 ++++++++-------
 src/connection-editor/ce-page-ethernet.ui   |    3 +--
 src/connection-editor/ce-page-general.ui    |    2 +-
 src/connection-editor/ce-page-infiniband.ui |    3 +--
 src/connection-editor/ce-page-vlan.ui       |    2 +-
 src/connection-editor/ce-page-wifi.ui       |    6 ++----
 src/connection-editor/ce-page-wimax.ui      |    3 +--
 src/connection-editor/page-ethernet.c       |    7 ++++---
 src/connection-editor/page-general.c        |    6 +++---
 src/connection-editor/page-infiniband.c     |    7 ++++---
 src/connection-editor/page-vlan.c           |    6 +++---
 src/connection-editor/page-wifi.c           |   12 +++++++-----
 src/connection-editor/page-wimax.c          |    7 ++++---
 src/gsm-unlock.ui                           |    3 +--
 14 files changed, 41 insertions(+), 41 deletions(-)
---
diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index 22d9bb9..693bb7e 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -1307,7 +1307,7 @@ void
 applet_mobile_pin_dialog_start_spinner (GtkWidget *dialog, const char *text)
 {
        GtkBuilder *builder;
-       GtkWidget *spinner, *widget, *hbox, *align;
+       GtkWidget *spinner, *widget, *hbox, *vbox;
 
        g_return_if_fail (dialog != NULL);
        g_return_if_fail (text != NULL);
@@ -1319,8 +1319,9 @@ applet_mobile_pin_dialog_start_spinner (GtkWidget *dialog, const char *text)
        g_return_if_fail (spinner != NULL);
        g_object_set_data (G_OBJECT (dialog), "spinner", spinner);
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "spinner_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), spinner);
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "spinner_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), spinner);
+       gtk_widget_set_halign (spinner, GTK_ALIGN_FILL);
        gtk_spinner_start (GTK_SPINNER (spinner));
 
        widget = GTK_WIDGET (gtk_builder_get_object (builder, "progress_label"));
@@ -1350,7 +1351,7 @@ void
 applet_mobile_pin_dialog_stop_spinner (GtkWidget *dialog, const char *text)
 {
        GtkBuilder *builder;
-       GtkWidget *spinner, *widget, *align;
+       GtkWidget *spinner, *widget, *vbox;
 
        g_return_if_fail (dialog != NULL);
 
@@ -1362,9 +1363,9 @@ applet_mobile_pin_dialog_stop_spinner (GtkWidget *dialog, const char *text)
        gtk_spinner_stop (GTK_SPINNER (spinner));
        g_object_set_data (G_OBJECT (dialog), "spinner", NULL);
 
-       /* Remove it from the alignment */
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "spinner_alignment"));
-       gtk_container_remove (GTK_CONTAINER (align), spinner);
+       /* Remove it from the vbox */
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "spinner_vbox"));
+       gtk_container_remove (GTK_CONTAINER (vbox), spinner);
 
        widget = GTK_WIDGET (gtk_builder_get_object (builder, "progress_label"));
        if (text) {
diff --git a/src/connection-editor/ce-page-ethernet.ui b/src/connection-editor/ce-page-ethernet.ui
index 327a8e9..8e2fcb4 100644
--- a/src/connection-editor/ce-page-ethernet.ui
+++ b/src/connection-editor/ce-page-ethernet.ui
@@ -178,10 +178,9 @@
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="ethernet_device_mac_alignment">
+      <object class="GtkVBox" id="ethernet_device_mac_vbox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="xalign">0</property>
         <child>
           <placeholder/>
         </child>
diff --git a/src/connection-editor/ce-page-general.ui b/src/connection-editor/ce-page-general.ui
index 1944997..c47b10e 100644
--- a/src/connection-editor/ce-page-general.ui
+++ b/src/connection-editor/ce-page-general.ui
@@ -104,7 +104,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkAlignment" id="firewall_zone_alignment">
+          <object class="GtkVBox" id="firewall_zone_vbox">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
           </object>
diff --git a/src/connection-editor/ce-page-infiniband.ui b/src/connection-editor/ce-page-infiniband.ui
index 7773eee..4bb2fba 100644
--- a/src/connection-editor/ce-page-infiniband.ui
+++ b/src/connection-editor/ce-page-infiniband.ui
@@ -43,10 +43,9 @@
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="infiniband_device_mac_alignment">
+      <object class="GtkVBox" id="infiniband_device_mac_vbox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="xalign">0</property>
         <child>
           <placeholder/>
         </child>
diff --git a/src/connection-editor/ce-page-vlan.ui b/src/connection-editor/ce-page-vlan.ui
index 27b5265..2ea15e2 100644
--- a/src/connection-editor/ce-page-vlan.ui
+++ b/src/connection-editor/ce-page-vlan.ui
@@ -153,7 +153,7 @@
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="vlan_parent_alignment">
+      <object class="GtkVBox" id="vlan_parent_vbox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <child>
diff --git a/src/connection-editor/ce-page-wifi.ui b/src/connection-editor/ce-page-wifi.ui
index e2e544b..beaeb9c 100644
--- a/src/connection-editor/ce-page-wifi.ui
+++ b/src/connection-editor/ce-page-wifi.ui
@@ -118,10 +118,9 @@
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="wifi_device_mac_alignment">
+      <object class="GtkVBox" id="wifi_device_mac_vbox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="xalign">0</property>
         <child>
           <placeholder/>
         </child>
@@ -294,10 +293,9 @@
       </packing>
     </child>
     <child>
-      <object class="GtkAlignment" id="wifi_bssid_alignment">
+      <object class="GtkVBox" id="wifi_bssid_vbox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="xalign">0</property>
       </object>
       <packing>
         <property name="left_attach">1</property>
diff --git a/src/connection-editor/ce-page-wimax.ui b/src/connection-editor/ce-page-wimax.ui
index 5d7468b..bdd4682 100644
--- a/src/connection-editor/ce-page-wimax.ui
+++ b/src/connection-editor/ce-page-wimax.ui
@@ -10,10 +10,9 @@
     <property name="column_spacing">12</property>
     <property name="row_spacing">6</property>
     <child>
-      <object class="GtkAlignment" id="wimax_device_mac_alignment">
+      <object class="GtkVBox" id="wimax_device_mac_vbox">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="xalign">0</property>
         <child>
           <placeholder/>
         </child>
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index 16c8204..cef00de 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -68,7 +68,7 @@ ethernet_private_init (CEPageEthernet *self)
 {
        CEPageEthernetPrivate *priv = CE_PAGE_ETHERNET_GET_PRIVATE (self);
        GtkBuilder *builder;
-       GtkWidget *align;
+       GtkWidget *vbox;
        GtkLabel *label;
 
        builder = CE_PAGE (self)->builder;
@@ -78,8 +78,9 @@ ethernet_private_init (CEPageEthernet *self)
        gtk_widget_set_tooltip_text (GTK_WIDGET (priv->device_mac),
                                     _("This option locks this connection to the network device specified by 
its permanent MAC address entered here.  Example: 00:11:22:33:44:55"));
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_device_mac_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (priv->device_mac));
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_device_mac_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (priv->device_mac));
+       gtk_widget_set_halign (GTK_WIDGET (priv->device_mac), GTK_ALIGN_FILL);
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
diff --git a/src/connection-editor/page-general.c b/src/connection-editor/page-general.c
index 37fb8c2..dfac92e 100644
--- a/src/connection-editor/page-general.c
+++ b/src/connection-editor/page-general.c
@@ -121,7 +121,7 @@ general_private_init (CEPageGeneral *self)
 {
        CEPageGeneralPrivate *priv = CE_PAGE_GENERAL_GET_PRIVATE (self);
        GtkBuilder *builder;
-       GtkWidget *align;
+       GtkWidget *vbox;
        GtkLabel *label;
 
        builder = CE_PAGE (self)->builder;
@@ -129,8 +129,8 @@ general_private_init (CEPageGeneral *self)
        /*-- Firewall zone --*/
        priv->firewall_zone = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "firewall_zone_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (priv->firewall_zone));
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "firewall_zone_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (priv->firewall_zone));
        gtk_widget_show_all (GTK_WIDGET (priv->firewall_zone));
 
        /* Get zones from FirewallD */
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index f85e453..4e82cee 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -54,7 +54,7 @@ infiniband_private_init (CEPageInfiniband *self)
 {
        CEPageInfinibandPrivate *priv = CE_PAGE_INFINIBAND_GET_PRIVATE (self);
        GtkBuilder *builder;
-       GtkWidget *align;
+       GtkWidget *vbox;
        GtkLabel *label;
 
        builder = CE_PAGE (self)->builder;
@@ -64,8 +64,9 @@ infiniband_private_init (CEPageInfiniband *self)
        gtk_widget_set_tooltip_text (GTK_WIDGET (priv->device_mac),
                                     _("This option locks this connection to the network device specified by 
its permanent MAC address entered here.  Example: 00:11:22:33:44:55"));
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "infiniband_device_mac_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (priv->device_mac));
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "infiniband_device_mac_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (priv->device_mac));
+       gtk_widget_set_halign (GTK_WIDGET (priv->device_mac), GTK_ALIGN_FILL);
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 6fa6cc5..fd7ce4f 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -67,7 +67,7 @@ vlan_private_init (CEPageVlan *self)
 {
        CEPageVlanPrivate *priv = CE_PAGE_VLAN_GET_PRIVATE (self);
        GtkBuilder *builder;
-       GtkWidget *align;
+       GtkWidget *vbox;
        GtkLabel *label;
 
        builder = CE_PAGE (self)->builder;
@@ -76,8 +76,8 @@ vlan_private_init (CEPageVlan *self)
        gtk_combo_box_set_entry_text_column (priv->parent, 0);
        priv->parent_entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->parent)));
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "vlan_parent_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (priv->parent));
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "vlan_parent_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (priv->parent));
        gtk_widget_show_all (GTK_WIDGET (priv->parent));
 
        /* Set mnemonic widget for parent label */
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index dbf4e20..77fa58b 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -64,7 +64,7 @@ wifi_private_init (CEPageWifi *self)
        CEPageWifiPrivate *priv = CE_PAGE_WIFI_GET_PRIVATE (self);
        GtkBuilder *builder;
        GtkWidget *widget;
-       GtkWidget *align;
+       GtkWidget *vbox;
        GtkLabel *label;
 
        builder = CE_PAGE (self)->builder;
@@ -83,8 +83,9 @@ wifi_private_init (CEPageWifi *self)
        gtk_widget_set_tooltip_text (GTK_WIDGET (priv->bssid),
                                     _("This option locks this connection to the Wi-Fi access point (AP) 
specified by the BSSID entered here.  Example: 00:11:22:33:44:55"));
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "wifi_bssid_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (priv->bssid));
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "wifi_bssid_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (priv->bssid));
+       gtk_widget_set_halign (GTK_WIDGET (priv->bssid), GTK_ALIGN_FILL);
        gtk_widget_show_all (GTK_WIDGET (priv->bssid));
 
        /* Device MAC */
@@ -93,8 +94,9 @@ wifi_private_init (CEPageWifi *self)
        gtk_widget_set_tooltip_text (GTK_WIDGET (priv->device_mac),
                                     _("This option locks this connection to the network device specified by 
its permanent MAC address entered here.  Example: 00:11:22:33:44:55"));
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "wifi_device_mac_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (priv->device_mac));
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "wifi_device_mac_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (priv->device_mac));
+       gtk_widget_set_halign (GTK_WIDGET (priv->device_mac), GTK_ALIGN_FILL);
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
diff --git a/src/connection-editor/page-wimax.c b/src/connection-editor/page-wimax.c
index 3b786c2..17ddae9 100644
--- a/src/connection-editor/page-wimax.c
+++ b/src/connection-editor/page-wimax.c
@@ -46,7 +46,7 @@ wimax_private_init (CEPageWimax *self)
 {
        CEPageWimaxPrivate *priv = CE_PAGE_WIMAX_GET_PRIVATE (self);
        GtkBuilder *builder;
-       GtkWidget *align;
+       GtkWidget *vbox;
        GtkLabel *label;
 
        builder = CE_PAGE (self)->builder;
@@ -58,8 +58,9 @@ wimax_private_init (CEPageWimax *self)
        gtk_widget_set_tooltip_text (GTK_WIDGET (priv->device_mac),
                                     _("This option locks this connection to the network device specified by 
its permanent MAC address entered here.  Example: 00:11:22:33:44:55"));
 
-       align = GTK_WIDGET (gtk_builder_get_object (builder, "wimax_device_mac_alignment"));
-       gtk_container_add (GTK_CONTAINER (align), GTK_WIDGET (priv->device_mac));
+       vbox = GTK_WIDGET (gtk_builder_get_object (builder, "wimax_device_mac_vbox"));
+       gtk_container_add (GTK_CONTAINER (vbox), GTK_WIDGET (priv->device_mac));
+       gtk_widget_set_halign (GTK_WIDGET (priv->device_mac), GTK_ALIGN_FILL);
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
diff --git a/src/gsm-unlock.ui b/src/gsm-unlock.ui
index 3848f16..6ccc98b 100644
--- a/src/gsm-unlock.ui
+++ b/src/gsm-unlock.ui
@@ -223,10 +223,9 @@
                         <property name="margin_bottom">6</property>
                         <property name="spacing">6</property>
                         <child>
-                          <object class="GtkAlignment" id="spinner_alignment">
+                          <object class="GtkVBox" id="spinner_vbox">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
                             <child>
                               <placeholder/>
                             </child>


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