[network-manager-applet] connection-editor: remove redundant casts



commit 2f537f4e5a6c122bba04cc2b043134f6c887cf55
Author: Dan Winship <danw gnome org>
Date:   Tue Feb 19 09:32:28 2013 -0500

    connection-editor: remove redundant casts
    
    In the libglade -> gtkbuilder migration, lots of places ended up with
    double typecasts. (eg, GTK_BUTTON (GTK_WIDGET (...))). Fix those.

 src/connection-editor/ip4-routes-dialog.c  |    2 +-
 src/connection-editor/ip6-routes-dialog.c  |    2 +-
 src/connection-editor/page-bridge-port.c   |    6 +++---
 src/connection-editor/page-dsl.c           |    6 +++---
 src/connection-editor/page-ethernet.c      |   14 +++++++-------
 src/connection-editor/page-general.c       |    2 +-
 src/connection-editor/page-infiniband.c    |    4 ++--
 src/connection-editor/page-ip4.c           |   18 +++++++++---------
 src/connection-editor/page-ip6.c           |   16 ++++++++--------
 src/connection-editor/page-mobile.c        |   18 +++++++++---------
 src/connection-editor/page-ppp.c           |   20 ++++++++++----------
 src/connection-editor/page-vlan.c          |   10 +++++-----
 src/connection-editor/page-wifi-security.c |    2 +-
 src/connection-editor/page-wifi.c          |   18 +++++++++---------
 src/connection-editor/page-wimax.c         |    2 +-
 15 files changed, 70 insertions(+), 70 deletions(-)
---
diff --git a/src/connection-editor/ip4-routes-dialog.c b/src/connection-editor/ip4-routes-dialog.c
index c23e241..586dd0a 100644
--- a/src/connection-editor/ip4-routes-dialog.c
+++ b/src/connection-editor/ip4-routes-dialog.c
@@ -247,7 +247,7 @@ route_delete_clicked (GtkButton *button, gpointer user_data)
        GtkTreeIter iter;
        int num_rows;
 
-       treeview = GTK_TREE_VIEW (GTK_WIDGET (gtk_builder_get_object (builder, "ip4_routes")));
+       treeview = GTK_TREE_VIEW (gtk_builder_get_object (builder, "ip4_routes"));
 
        selection = gtk_tree_view_get_selection (treeview);
        if (gtk_tree_selection_count_selected_rows (selection) != 1)
diff --git a/src/connection-editor/ip6-routes-dialog.c b/src/connection-editor/ip6-routes-dialog.c
index c332147..dd50c86 100644
--- a/src/connection-editor/ip6-routes-dialog.c
+++ b/src/connection-editor/ip6-routes-dialog.c
@@ -198,7 +198,7 @@ route_delete_clicked (GtkButton *button, gpointer user_data)
        GtkTreeIter iter;
        int num_rows;
 
-       treeview = GTK_TREE_VIEW (GTK_WIDGET (gtk_builder_get_object (builder, "ip6_routes")));
+       treeview = GTK_TREE_VIEW (gtk_builder_get_object (builder, "ip6_routes"));
 
        selection = gtk_tree_view_get_selection (treeview);
        if (gtk_tree_selection_count_selected_rows (selection) != 1)
diff --git a/src/connection-editor/page-bridge-port.c b/src/connection-editor/page-bridge-port.c
index a1e34d3..6383d15 100644
--- a/src/connection-editor/page-bridge-port.c
+++ b/src/connection-editor/page-bridge-port.c
@@ -54,9 +54,9 @@ bridge_port_private_init (CEPageBridgePort *self)
 
        builder = CE_PAGE (self)->builder;
 
-       priv->priority = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"bridge_port_priority")));
-       priv->path_cost = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"bridge_port_path_cost")));
-       priv->hairpin_mode = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"bridge_port_hairpin_mode")));
+       priv->priority = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "bridge_port_priority"));
+       priv->path_cost = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "bridge_port_path_cost"));
+       priv->hairpin_mode = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "bridge_port_hairpin_mode"));
 }
 
 static void
diff --git a/src/connection-editor/page-dsl.c b/src/connection-editor/page-dsl.c
index b7d8157..f2394eb 100644
--- a/src/connection-editor/page-dsl.c
+++ b/src/connection-editor/page-dsl.c
@@ -57,9 +57,9 @@ dsl_private_init (CEPageDsl *self)
 
        builder = CE_PAGE (self)->builder;
 
-       priv->username = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "dsl_username")));
-       priv->password = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "dsl_password")));
-       priv->service = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "dsl_service")));
+       priv->username = GTK_ENTRY (gtk_builder_get_object (builder, "dsl_username"));
+       priv->password = GTK_ENTRY (gtk_builder_get_object (builder, "dsl_password"));
+       priv->service = GTK_ENTRY (gtk_builder_get_object (builder, "dsl_service"));
 }
 
 static void
diff --git a/src/connection-editor/page-ethernet.c b/src/connection-editor/page-ethernet.c
index 69263a0..74d6bd3 100644
--- a/src/connection-editor/page-ethernet.c
+++ b/src/connection-editor/page-ethernet.c
@@ -94,15 +94,15 @@ ethernet_private_init (CEPageEthernet *self)
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
-       label = GTK_LABEL (GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_device_mac_label")));
+       label = GTK_LABEL (gtk_builder_get_object (builder, "ethernet_device_mac_label"));
        gtk_label_set_mnemonic_widget (label, GTK_WIDGET (priv->device_mac));
 
-       priv->cloned_mac = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_cloned_mac")));
-       priv->port = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_port")));
-       priv->speed = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_speed")));
-       priv->duplex = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_duplex")));
-       priv->autonegotiate = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ethernet_autonegotiate")));
-       priv->mtu = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ethernet_mtu")));
+       priv->cloned_mac = GTK_ENTRY (gtk_builder_get_object (builder, "ethernet_cloned_mac"));
+       priv->port = GTK_COMBO_BOX (gtk_builder_get_object (builder, "ethernet_port"));
+       priv->speed = GTK_COMBO_BOX (gtk_builder_get_object (builder, "ethernet_speed"));
+       priv->duplex = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ethernet_duplex"));
+       priv->autonegotiate = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ethernet_autonegotiate"));
+       priv->mtu = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "ethernet_mtu"));
 }
 
 static void
diff --git a/src/connection-editor/page-general.c b/src/connection-editor/page-general.c
index 607e21c..bc13f73 100644
--- a/src/connection-editor/page-general.c
+++ b/src/connection-editor/page-general.c
@@ -142,7 +142,7 @@ general_private_init (CEPageGeneral *self)
        get_zones_from_firewall (self);
 
        /* Set mnemonic widget for device Firewall zone label */
-       label = GTK_LABEL (GTK_WIDGET (gtk_builder_get_object (builder, "firewall_zone_label")));
+       label = GTK_LABEL (gtk_builder_get_object (builder, "firewall_zone_label"));
        gtk_label_set_mnemonic_widget (label, GTK_WIDGET (priv->firewall_zone));
 
        /*-- Dependent VPN connection --*/
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index be54a37..aa2fe09 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -78,11 +78,11 @@ infiniband_private_init (CEPageInfiniband *self)
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
-       label = GTK_LABEL (GTK_WIDGET (gtk_builder_get_object (builder, "infiniband_device_mac_label")));
+       label = GTK_LABEL (gtk_builder_get_object (builder, "infiniband_device_mac_label"));
        gtk_label_set_mnemonic_widget (label, GTK_WIDGET (priv->device_mac));
 
        priv->transport_mode = GTK_COMBO_BOX (gtk_builder_get_object (builder, "infiniband_mode"));
-       priv->mtu = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "infiniband_mtu")));
+       priv->mtu = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "infiniband_mtu"));
 }
 
 static void
diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c
index 282392d..73d97d8 100644
--- a/src/connection-editor/page-ip4.c
+++ b/src/connection-editor/page-ip4.c
@@ -144,7 +144,7 @@ ip4_private_init (CEPageIP4 *self, NMConnection *connection)
                str_auto_only = _("Automatic (DHCP) addresses only");
        }
 
-       priv->method = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "ip4_method")));
+       priv->method = GTK_COMBO_BOX (gtk_builder_get_object (builder, "ip4_method"));
 
        priv->method_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_UINT);
 
@@ -201,18 +201,18 @@ ip4_private_init (CEPageIP4 *self, NMConnection *connection)
        gtk_combo_box_set_model (priv->method, GTK_TREE_MODEL (priv->method_store));
 
        priv->addr_label = GTK_WIDGET (gtk_builder_get_object (builder, "ip4_addr_label"));
-       priv->addr_add = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ip4_addr_add_button")));
-       priv->addr_delete = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip4_addr_delete_button")));
-       priv->addr_list = GTK_TREE_VIEW (GTK_WIDGET (gtk_builder_get_object (builder, "ip4_addresses")));
+       priv->addr_add = GTK_BUTTON (gtk_builder_get_object (builder, "ip4_addr_add_button"));
+       priv->addr_delete = GTK_BUTTON (gtk_builder_get_object (builder, "ip4_addr_delete_button"));
+       priv->addr_list = GTK_TREE_VIEW (gtk_builder_get_object (builder, "ip4_addresses"));
 
        priv->dns_servers_label = GTK_WIDGET (gtk_builder_get_object (builder, "ip4_dns_servers_label"));
-       priv->dns_servers = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip4_dns_servers_entry")));
+       priv->dns_servers = GTK_ENTRY (gtk_builder_get_object (builder, "ip4_dns_servers_entry"));
 
        priv->dns_searches_label = GTK_WIDGET (gtk_builder_get_object (builder, "ip4_dns_searches_label"));
-       priv->dns_searches = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip4_dns_searches_entry")));
+       priv->dns_searches = GTK_ENTRY (gtk_builder_get_object (builder, "ip4_dns_searches_entry"));
 
        priv->dhcp_client_id_label = GTK_WIDGET (gtk_builder_get_object (builder, 
"ip4_dhcp_client_id_label"));
-       priv->dhcp_client_id = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip4_dhcp_client_id_entry")));
+       priv->dhcp_client_id = GTK_ENTRY (gtk_builder_get_object (builder, "ip4_dhcp_client_id_entry"));
 
        /* Hide DHCP stuff if it'll never be used for a particular method */
        if (   priv->connection_type == NM_TYPE_SETTING_VPN
@@ -223,7 +223,7 @@ ip4_private_init (CEPageIP4 *self, NMConnection *connection)
                gtk_widget_hide (GTK_WIDGET (priv->dhcp_client_id));
        }
 
-       priv->ip4_required = GTK_CHECK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip4_required_checkbutton")));
+       priv->ip4_required = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "ip4_required_checkbutton"));
        /* Hide IP4-require button if it'll never be used for a particular method */
        if (   priv->connection_type == NM_TYPE_SETTING_VPN
            || priv->connection_type == NM_TYPE_SETTING_GSM
@@ -231,7 +231,7 @@ ip4_private_init (CEPageIP4 *self, NMConnection *connection)
            || priv->connection_type == NM_TYPE_SETTING_PPPOE)
                gtk_widget_hide (GTK_WIDGET (priv->ip4_required));
 
-       priv->routes_button = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ip4_routes_button")));
+       priv->routes_button = GTK_BUTTON (gtk_builder_get_object (builder, "ip4_routes_button"));
 }
 
 static void
diff --git a/src/connection-editor/page-ip6.c b/src/connection-editor/page-ip6.c
index 7ce09ee..4697491 100644
--- a/src/connection-editor/page-ip6.c
+++ b/src/connection-editor/page-ip6.c
@@ -143,7 +143,7 @@ ip6_private_init (CEPageIP6 *self, NMConnection *connection)
                str_auto_only = _("Automatic, addresses only");
        }
 
-       priv->method = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "ip6_method")));
+       priv->method = GTK_COMBO_BOX (gtk_builder_get_object (builder, "ip6_method"));
        cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (priv->method));
        gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->method), cells->data,
                                                                   "sensitive", METHOD_COL_ENABLED);
@@ -217,17 +217,17 @@ ip6_private_init (CEPageIP6 *self, NMConnection *connection)
        gtk_combo_box_set_model (priv->method, GTK_TREE_MODEL (priv->method_store));
 
        priv->addr_label = GTK_WIDGET (gtk_builder_get_object (builder, "ip6_addr_label"));
-       priv->addr_add = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ip6_addr_add_button")));
-       priv->addr_delete = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip6_addr_delete_button")));
-       priv->addr_list = GTK_TREE_VIEW (GTK_WIDGET (gtk_builder_get_object (builder, "ip6_addresses")));
+       priv->addr_add = GTK_BUTTON (gtk_builder_get_object (builder, "ip6_addr_add_button"));
+       priv->addr_delete = GTK_BUTTON (gtk_builder_get_object (builder, "ip6_addr_delete_button"));
+       priv->addr_list = GTK_TREE_VIEW (gtk_builder_get_object (builder, "ip6_addresses"));
 
        priv->dns_servers_label = GTK_WIDGET (gtk_builder_get_object (builder, "ip6_dns_servers_label"));
-       priv->dns_servers = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip6_dns_servers_entry")));
+       priv->dns_servers = GTK_ENTRY (gtk_builder_get_object (builder, "ip6_dns_servers_entry"));
 
        priv->dns_searches_label = GTK_WIDGET (gtk_builder_get_object (builder, "ip6_dns_searches_label"));
-       priv->dns_searches = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip6_dns_searches_entry")));
+       priv->dns_searches = GTK_ENTRY (gtk_builder_get_object (builder, "ip6_dns_searches_entry"));
 
-       priv->ip6_required = GTK_CHECK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ip6_required_checkbutton")));
+       priv->ip6_required = GTK_CHECK_BUTTON (gtk_builder_get_object (builder, "ip6_required_checkbutton"));
        /* Hide IP6-require button if it'll never be used for a particular method */
        if (   priv->connection_type == NM_TYPE_SETTING_VPN
            || priv->connection_type == NM_TYPE_SETTING_GSM
@@ -235,7 +235,7 @@ ip6_private_init (CEPageIP6 *self, NMConnection *connection)
            || priv->connection_type == NM_TYPE_SETTING_PPPOE)
                gtk_widget_hide (GTK_WIDGET (priv->ip6_required));
 
-       priv->routes_button = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ip6_routes_button")));
+       priv->routes_button = GTK_BUTTON (gtk_builder_get_object (builder, "ip6_routes_button"));
 }
 
 static void
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index e01f8a1..9000e5f 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -80,17 +80,17 @@ mobile_private_init (CEPageMobile *self)
 
        builder = CE_PAGE (self)->builder;
 
-       priv->number = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "mobile_number")));
-       priv->username = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "mobile_username")));
-       priv->password = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "mobile_password")));
+       priv->number = GTK_ENTRY (gtk_builder_get_object (builder, "mobile_number"));
+       priv->username = GTK_ENTRY (gtk_builder_get_object (builder, "mobile_username"));
+       priv->password = GTK_ENTRY (gtk_builder_get_object (builder, "mobile_password"));
 
-       priv->apn = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "mobile_apn")));
-       priv->apn_button = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "mobile_apn_button")));
-       priv->network_id = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "mobile_network_id")));
-       priv->network_type = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, 
"mobile_network_type")));
-       priv->roaming_allowed = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"mobile_roaming_allowed")));
+       priv->apn = GTK_ENTRY (gtk_builder_get_object (builder, "mobile_apn"));
+       priv->apn_button = GTK_BUTTON (gtk_builder_get_object (builder, "mobile_apn_button"));
+       priv->network_id = GTK_ENTRY (gtk_builder_get_object (builder, "mobile_network_id"));
+       priv->network_type = GTK_COMBO_BOX (gtk_builder_get_object (builder, "mobile_network_type"));
+       priv->roaming_allowed = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, 
"mobile_roaming_allowed"));
 
-       priv->pin = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "mobile_pin")));
+       priv->pin = GTK_ENTRY (gtk_builder_get_object (builder, "mobile_pin"));
 
        priv->window_group = gtk_window_group_new ();
 }
diff --git a/src/connection-editor/page-ppp.c b/src/connection-editor/page-ppp.c
index f688782..dfb0a3b 100644
--- a/src/connection-editor/page-ppp.c
+++ b/src/connection-editor/page-ppp.c
@@ -84,16 +84,16 @@ ppp_private_init (CEPagePpp *self)
 
        builder = CE_PAGE (self)->builder;
 
-       priv->auth_methods_label = GTK_LABEL (GTK_WIDGET (gtk_builder_get_object (builder, 
"auth_methods_label")));
-       priv->auth_methods_button = GTK_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"auth_methods_button")));
-
-       priv->use_mppe = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ppp_use_mppe")));
-       priv->mppe_require_128 = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ppp_require_mppe_128")));
-       priv->use_mppe_stateful = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ppp_use_stateful_mppe")));
-       priv->allow_bsdcomp = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ppp_allow_bsdcomp")));
-       priv->allow_deflate = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ppp_allow_deflate")));
-       priv->use_vj_comp = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "ppp_usevj")));
-       priv->send_ppp_echo = GTK_TOGGLE_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, 
"ppp_send_echo_packets")));
+       priv->auth_methods_label = GTK_LABEL (gtk_builder_get_object (builder, "auth_methods_label"));
+       priv->auth_methods_button = GTK_BUTTON (gtk_builder_get_object (builder, "auth_methods_button"));
+
+       priv->use_mppe = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ppp_use_mppe"));
+       priv->mppe_require_128 = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ppp_require_mppe_128"));
+       priv->use_mppe_stateful = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, 
"ppp_use_stateful_mppe"));
+       priv->allow_bsdcomp = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ppp_allow_bsdcomp"));
+       priv->allow_deflate = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ppp_allow_deflate"));
+       priv->use_vj_comp = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ppp_usevj"));
+       priv->send_ppp_echo = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "ppp_send_echo_packets"));
 }
 
 static void
diff --git a/src/connection-editor/page-vlan.c b/src/connection-editor/page-vlan.c
index 3e5537b..ef55327 100644
--- a/src/connection-editor/page-vlan.c
+++ b/src/connection-editor/page-vlan.c
@@ -86,13 +86,13 @@ vlan_private_init (CEPageVlan *self)
        gtk_widget_show_all (GTK_WIDGET (priv->parent));
 
        /* Set mnemonic widget for parent label */
-       label = GTK_LABEL (GTK_WIDGET (gtk_builder_get_object (builder, "vlan_parent_label")));
+       label = GTK_LABEL (gtk_builder_get_object (builder, "vlan_parent_label"));
        gtk_label_set_mnemonic_widget (label, GTK_WIDGET (priv->parent));
 
-       priv->id_entry = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "vlan_id_entry")));
-       priv->name_entry = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "vlan_name_entry")));
-       priv->cloned_mac = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "vlan_cloned_mac_entry")));
-       priv->mtu = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "vlan_mtu")));
+       priv->id_entry = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "vlan_id_entry"));
+       priv->name_entry = GTK_ENTRY (gtk_builder_get_object (builder, "vlan_name_entry"));
+       priv->cloned_mac = GTK_ENTRY (gtk_builder_get_object (builder, "vlan_cloned_mac_entry"));
+       priv->mtu = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "vlan_mtu"));
 }
 
 static void
diff --git a/src/connection-editor/page-wifi-security.c b/src/connection-editor/page-wifi-security.c
index ee9af72..d9d771f 100644
--- a/src/connection-editor/page-wifi-security.c
+++ b/src/connection-editor/page-wifi-security.c
@@ -235,7 +235,7 @@ finish_setup (CEPageWifiSecurity *self, gpointer unused, GError *error, gpointer
        s_wireless = nm_connection_get_setting_wireless (connection);
        g_assert (s_wireless);
 
-       combo = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (parent->builder, "wifi_security_combo")));
+       combo = GTK_COMBO_BOX (gtk_builder_get_object (parent->builder, "wifi_security_combo"));
 
        dev_caps =   NM_WIFI_DEVICE_CAP_CIPHER_WEP40
                   | NM_WIFI_DEVICE_CAP_CIPHER_WEP104
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index 69550ab..aa26a82 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -80,11 +80,11 @@ wifi_private_init (CEPageWifi *self)
 
        priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
-       priv->ssid     = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_ssid")));
-       priv->cloned_mac = GTK_ENTRY (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_cloned_mac")));
-       priv->mode     = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_mode")));
-       priv->band     = GTK_COMBO_BOX (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_band")));
-       priv->channel  = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_channel")));
+       priv->ssid     = GTK_ENTRY (gtk_builder_get_object (builder, "wifi_ssid"));
+       priv->cloned_mac = GTK_ENTRY (gtk_builder_get_object (builder, "wifi_cloned_mac"));
+       priv->mode     = GTK_COMBO_BOX (gtk_builder_get_object (builder, "wifi_mode"));
+       priv->band     = GTK_COMBO_BOX (gtk_builder_get_object (builder, "wifi_band"));
+       priv->channel  = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "wifi_channel"));
 
        /* BSSID */
 #if GTK_CHECK_VERSION(2,24,0)
@@ -117,18 +117,18 @@ wifi_private_init (CEPageWifi *self)
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
-       label = GTK_LABEL (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_device_mac_label")));
+       label = GTK_LABEL (gtk_builder_get_object (builder, "wifi_device_mac_label"));
        gtk_label_set_mnemonic_widget (label, GTK_WIDGET (priv->device_mac));
 
-       priv->rate     = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_rate")));
+       priv->rate     = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "wifi_rate"));
        widget = GTK_WIDGET (gtk_builder_get_object (builder, "rate_units"));
        gtk_size_group_add_widget (priv->group, widget);
 
-       priv->tx_power = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_tx_power")));
+       priv->tx_power = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "wifi_tx_power"));
        widget = GTK_WIDGET (gtk_builder_get_object (builder, "tx_power_units"));
        gtk_size_group_add_widget (priv->group, widget);
 
-       priv->mtu      = GTK_SPIN_BUTTON (GTK_WIDGET (gtk_builder_get_object (builder, "wifi_mtu")));
+       priv->mtu      = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "wifi_mtu"));
        widget = GTK_WIDGET (gtk_builder_get_object (builder, "mtu_units"));
        gtk_size_group_add_widget (priv->group, widget);
 }
diff --git a/src/connection-editor/page-wimax.c b/src/connection-editor/page-wimax.c
index 71d3120..9b92a5c 100644
--- a/src/connection-editor/page-wimax.c
+++ b/src/connection-editor/page-wimax.c
@@ -74,7 +74,7 @@ wimax_private_init (CEPageWimax *self)
        gtk_widget_show_all (GTK_WIDGET (priv->device_mac));
 
        /* Set mnemonic widget for device MAC label */
-       label = GTK_LABEL (GTK_WIDGET (gtk_builder_get_object (builder, "wimax_device_mac_label")));
+       label = GTK_LABEL (gtk_builder_get_object (builder, "wimax_device_mac_label"));
        gtk_label_set_mnemonic_widget (label, GTK_WIDGET (priv->device_mac));
 }
 


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