[gnome-control-center/wifi-refinements: 18/20] network: Remove references to no-longer existing widgets
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wifi-refinements: 18/20] network: Remove references to no-longer existing widgets
- Date: Sun, 9 Sep 2012 01:10:52 +0000 (UTC)
commit 70ddfc1c0a02cd42b71ba0a05967ae2b5f3d70c7
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 8 20:10:26 2012 -0400
network: Remove references to no-longer existing widgets
And also make sure the initial focus on the details page is
always on the back button.
panels/network/net-device-wifi.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 355b35e..01b1cfd 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1659,9 +1659,6 @@ update_saved_last_used (NetDeviceWifi *device_wifi)
last_used = g_strdup_printf (ngettext ("%i day ago", "%i days ago", days), days);
out:
panel_set_device_widget_details (device_wifi->priv->builder,
- "saved_last_used",
- last_used);
- panel_set_device_widget_details (device_wifi->priv->builder,
"last_used",
last_used);
if (now != NULL)
@@ -1882,6 +1879,21 @@ set_draw_separator (GtkCellLayout *layout,
}
static void
+switch_page_cb (GtkNotebook *notebook,
+ GtkWidget *page,
+ guint page_num,
+ NetDeviceWifi *device_wifi)
+{
+ GtkWidget *widget;
+
+ if (page_num == 1) {
+ widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
+ "button_back1"));
+ gtk_widget_grab_focus (widget);
+ }
+}
+
+static void
net_device_wifi_constructed (GObject *object)
{
NetDeviceWifi *device_wifi = NET_DEVICE_WIFI (object);
@@ -1998,19 +2010,11 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
"button_options1"));
g_signal_connect (widget, "clicked",
G_CALLBACK (edit_connection), device_wifi);
- widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
- "button_options4"));
- g_signal_connect (widget, "clicked",
- G_CALLBACK (edit_connection), device_wifi);
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
"button_forget1"));
g_signal_connect (widget, "clicked",
G_CALLBACK (forget_button_clicked_cb), device_wifi);
- widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
- "button_forget4"));
- g_signal_connect (widget, "clicked",
- G_CALLBACK (forget_button_clicked_cb), device_wifi);
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
"button_disconnect1"));
@@ -2130,16 +2134,14 @@ net_device_wifi_init (NetDeviceWifi *device_wifi)
"button_back1"));
g_signal_connect_swapped (widget, "clicked",
G_CALLBACK (show_wifi_list), device_wifi);
- widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
- "button_back4"));
- g_signal_connect_swapped (widget, "clicked",
- G_CALLBACK (show_wifi_list), device_wifi);
/* setup view */
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
"notebook_view"));
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 0);
+ g_signal_connect_after (widget, "switch-page",
+ G_CALLBACK (switch_page_cb), device_wifi);
widget = GTK_WIDGET (gtk_builder_get_object (device_wifi->priv->builder,
"start_hotspot_button"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]