From cd8e27b416d47188bb6f1bc2cca33f34809859f5 Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Mon, 22 Dec 2008 21:25:51 -0600 Subject: [PATCH 1/3] Fixed hidden network icon --- data/wicd.glade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/wicd.glade b/data/wicd.glade index a5eea9f..ad4e02f 100644 --- a/data/wicd.glade +++ b/data/wicd.glade @@ -1,6 +1,6 @@ - + 450 @@ -62,7 +62,7 @@ True - wicd + network-wireless From 19df8ecbca7847c30e998215c460062f2bc6af99 Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Mon, 22 Dec 2008 23:08:12 -0600 Subject: [PATCH 2/3] Updated Preferences dialog to conform to the GNOME HIG better --- data/wicd.glade | 1462 ++++++++++++++++++++++++++--------------------- 1 file changed, 810 insertions(+), 652 deletions(-) diff --git a/data/wicd.glade b/data/wicd.glade index ad4e02f..5542c38 100644 --- a/data/wicd.glade +++ b/data/wicd.glade @@ -1,6 +1,6 @@ - + 450 @@ -391,735 +391,893 @@ - Preferences - 125 - 560 + 5 + GTK_WIN_POS_CENTER_ON_PARENT GDK_WINDOW_TYPE_HINT_DIALOG + False - + True + 2 - + True True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE + 12 + 12 + 12 + 12 - + True True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE - + True + 16 + 2 + 4 + 4 - - 260 + True - Wireless Interface: - - - - - 200 - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 24 + + + True + True + If enabled, the wired network interface will always be displayed in the main window. This can be useful if your wired network card does not detect when the interface is connected to a cable. + Always show wired interface + 0 + True + + - False - False - 1 - - - - - False - False - - - - - True - - - 260 - True - Wired Interface: - - - - - 200 - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - False - False - 1 - - - - - False - False - 1 - - - - - True - True - Use global DNS servers - True - 0 - True - - - False - 2 - - - - - True - - - 170 - True - Search Domain - - - False - False + 2 + 3 + 4 + - 200 True True - False - False - 1 - - - - - False - False - 3 - - - - - True - - - 170 - True - DNS 1 - - - False - False + 1 + 2 + 6 + 7 + - 200 True True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - False - 1 - - - - - False - False - 4 - - - - - True - - - 170 - True - DNS 2 - - - False - False + 1 + 2 + 7 + 8 + - 200 True True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - False - 1 + 1 + 2 + 8 + 9 + - - - False - False - 5 - - - - - True - - 170 + True - DNS 3 + 0 + <b>Global DNS Servers</b> + True - False - False + 2 + 4 + 5 + + + + + + True + 12 + + + True + True + Use global DNS servers + 0 + True + + + + + 2 + 5 + 6 + + + + + + True + 24 + + + True + 0 + Search domain: + + + + + 6 + 7 + + + + + + True + 24 + + + True + 0 + DNS server 1: + + + + + 7 + 8 + + + + + + True + 24 + + + True + 0 + DNS server 2: + + + + + 8 + 9 + - 200 True True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - False - 1 + 1 + 2 + 9 + 10 + + + + + + True + 24 + + + True + 0 + DNS server 3: + + + + + 9 + 10 + + + + + + True + 0 + <b>Network Interfaces</b> + True + + + 2 + + + + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + True + True + + + 1 + 2 + 2 + 3 + + + + + + True + 12 + + + True + 0 + Wireless interface: + + + + + 1 + 2 + + + + + + True + 12 + + + True + 0 + Wired interface: + + + + + 2 + 3 + + + + + + True + 0 + <b>Wired automatic connection</b> + True + + + 2 + 10 + 11 + + + + + + True + 12 + + + True + True + Use default wired network profile + 0 + True + True + pref_use_last_radio + + + + + 2 + 11 + 12 + + + + + + True + 12 + + + True + True + Prompt for wired network profile + 0 + True + True + pref_use_last_radio + + + + + 2 + 12 + 13 + + + + + + True + 12 + + + True + True + Use last wired network profile + 0 + True + True + + + + + 2 + 13 + 14 + + + + + + True + 0 + <b>Wireless automatic connection</b> + True + + + 2 + 14 + 15 + + + + + + True + 12 + + + True + True + Automatically reconnect on wireless network connection loss + 0 + True + + + + + 2 + 15 + 16 + - - False - 6 - - - - - True - True - Always show wired interface - True - 0 - True - - - False - False - 7 - - - - - True - True - Automatically reconnect on connection loss - True - 0 - True - - - False - False - 8 - - - - - True - True - Use dBm to measure signal strength - True - 0 - True - - - False - False - 9 - - - - - 2 - 8 - True - - - False - 10 - - - - - True - Wired Autoconnect Setting: - True - - - False - False - 11 - - - - - True - True - Use default profile on wired autoconnect - True - 0 - True - True - - - False - 12 - - - - - True - True - Prompt for profile on wired autoconnect - True - 0 - True - True - pref_use_def_radio - - - False - 13 - - - - - True - True - Use last profile on wired autoconnect - True - 0 - True - True - pref_use_def_radio - - - False - 14 - - - - True - General Settings - - - tab - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - DHCP Client: - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Automatic (recommended) - 0 - True - True - - - 1 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - dhclient - 0 - True - True - dhcp_auto_radio - - - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - dhcpcd - 0 - True - True - dhcp_auto_radio - - - 3 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - pump - 0 - True - True - dhcp_auto_radio - - - 4 - - - - - False - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - False - 4 - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Wired Link Detection: - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Automatic (recommended) - 0 - True - True - - - 1 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - ethtool - 0 - True - True - link_auto_radio - - - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - mii-tool - 0 - True - True - link_auto_radio - - - 3 - - - - - False - False - 2 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - False - 4 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Route Table Flushing: - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Automatic (recommended) - 0 - True - True - - - 1 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - ip - 0 - True - True - flush_auto_radio - - - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - route - 0 - True - True - flush_auto_radio - - - 3 - - - - - False - False - 4 - - - - - 1 - - - - - True - External Programs - - - tab - 1 - False - - - - - True - - - True - - - 75 - True - Sets the wpa_supplicant driver. In almost every case the correct choice is wext. Only consider switching if you're having trouble with encrypted networks. - WPA Supplicant Driver: - - - - - True - Sets the wpa_supplicant driver. In almost every case the correct choice is wext. Only consider switching if you're having trouble with encrypted networks. - - - 1 - - - - - False - False - 1 - - - - - True - - - True - Backend: - - - - - True - - - 1 - - - - - False - False - 3 - 1 - - - - - True - True - Enable Debug Mode - True - 0 - True - - - False - False - 3 - 2 - - - - - 2 - - - - - True - Advanced Settings - - - tab - 2 - False - - - - - 2 - - - - - True - GTK_BUTTONBOX_END - + True - True - True - gtk-cancel - True - 0 + General Settings + + tab + False + - + True - True - True - gtk-ok - True - 1 + 12 + 12 + 12 + 12 + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE + + + True + 6 + + + True + 0 + <b>DHCP Client</b> + True + + + + + + + + True + 12 + + + True + + + True + True + Automatic (recommended) + 0 + True + True + dhclient_radio + + + False + + + + + True + True + dhclient + 0 + True + True + + + False + 1 + + + + + True + True + dhcpcd + 0 + True + True + dhclient_radio + + + False + 2 + + + + + True + True + pump + 0 + True + True + dhclient_radio + + + False + 3 + + + + + + + 1 + 2 + + + + + + True + 12 + + + True + + + True + True + Automatic (recommended) + 0 + True + True + + + False + + + + + True + True + ethtool + 0 + True + True + radiobutton8 + + + False + 1 + + + + + True + True + mii-tool + 0 + True + True + radiobutton8 + + + False + 2 + + + + + + + 3 + 4 + + + + + + True + 12 + + + True + + + True + True + Automatic (recommended) + 0 + True + True + + + False + + + + + True + True + ip + 0 + True + True + flush_auto_radio + + + False + 1 + + + + + True + True + route + 0 + True + True + flush_auto_radio + + + False + 2 + + + + + + + 5 + 6 + + + + + + True + 0 + <b>Wired Link Detection</b> + True + + + 2 + 3 + + + + + + True + 0 + <b>Route Table Flushing</b> + True + + + 4 + 5 + + + + + + + + + 1 + + + True + External Programs + + + tab + 1 + False + + + + + True + 12 + 12 + 12 + 12 + + + True + 7 + 2 + + + True + + + 2 + 3 + + + + + + True + 0 + You should almost always use wext as the WPA supplicant driver. + True + + + 1 + 2 + 2 + 3 + + + + + + True + 0 + Driver: + + + 1 + 2 + + + + + + True + + + True + + + False + + + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + <b>Backend</b> + True + + + 2 + 3 + 4 + + + + + + True + + + 1 + 2 + 4 + 5 + + + + + + True + 12 + + + True + 0 + Backend: + + + + + 4 + 5 + + + + + + True + 0 + <b>Debugging</b> + True + + + 2 + 5 + 6 + + + + + + True + True + Enable debug mode + 0 + True + + + 2 + 6 + 7 + + + + + + True + 0 + <b>WPA Supplicant</b> + True + + + 2 + + + + + + + + 2 + + + + + True + Advanced Settings + + + tab + 2 + False + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + + + + False From c737a5d7d2197fe94470b1f36af9a06007ecf52f Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Mon, 22 Dec 2008 23:30:52 -0600 Subject: [PATCH 3/3] Updated Preferences dialog more and commented out translations in prefs.py --- data/wicd.glade | 1076 +++++++++++++++++++++++++---------------------- wicd/prefs.py | 47 ++- 2 files changed, 595 insertions(+), 528 deletions(-) diff --git a/data/wicd.glade b/data/wicd.glade index 5542c38..7aa264e 100644 --- a/data/wicd.glade +++ b/data/wicd.glade @@ -1,6 +1,6 @@ - + 450 @@ -400,7 +400,7 @@ True 2 - + True True @@ -429,15 +429,14 @@ 4 4 - + True - 24 + 12 - + True True - If enabled, the wired network interface will always be displayed in the main window. This can be useful if your wired network card does not detect when the interface is connected to a cable. - Always show wired interface + Automatically reconnect on wireless network connection loss 0 True @@ -445,278 +444,44 @@ 2 - 3 - 4 + 15 + 16 - - True - True - - - 1 - 2 - 6 - 7 - - - - - - True - True - - - 1 - 2 - 7 - 8 - - - - - - True - True - - - 1 - 2 - 8 - 9 - - - - - + True 0 - <b>Global DNS Servers</b> + <b>Wireless automatic connection</b> True 2 - 4 - 5 + 14 + 15 - + True 12 - + True True - Use global DNS servers - 0 - True - - - - - 2 - 5 - 6 - - - - - - True - 24 - - - True - 0 - Search domain: - - - - - 6 - 7 - - - - - - True - 24 - - - True - 0 - DNS server 1: - - - - - 7 - 8 - - - - - - True - 24 - - - True - 0 - DNS server 2: - - - - - 8 - 9 - - - - - - True - True - - - 1 - 2 - 9 - 10 - - - - - - True - 24 - - - True - 0 - DNS server 3: - - - - - 9 - 10 - - - - - - True - 0 - <b>Network Interfaces</b> - True - - - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - - - 1 - 2 - 2 - 3 - - - - - - True - 12 - - - True - 0 - Wireless interface: - - - - - 1 - 2 - - - - - - True - 12 - - - True - 0 - Wired interface: - - - - - 2 - 3 - - - - - - True - 0 - <b>Wired automatic connection</b> - True - - - 2 - 10 - 11 - - - - - - True - 12 - - - True - True - Use default wired network profile + Use last wired network profile 0 True True - pref_use_last_radio 2 - 11 - 12 + 13 + 14 @@ -744,50 +509,210 @@ - + True 12 - + True True - Use last wired network profile + Use default wired network profile 0 True True + pref_use_last_radio 2 - 13 - 14 + 11 + 12 - + True 0 - <b>Wireless automatic connection</b> + <b>Wired automatic connection</b> True 2 - 14 - 15 + 10 + 11 - + True 12 - + + True + 0 + Wired interface: + + + + + 2 + 3 + + + + + + True + 12 + + + True + 0 + Wireless interface: + + + + + 1 + 2 + + + + + + True + True + + + 1 + 2 + 2 + 3 + + + + + + True + True + + + 1 + 2 + 1 + 2 + + + + + + True + 0 + <b>Network Interfaces</b> + True + + + 2 + + + + + + True + 24 + + + True + 0 + DNS server 3: + + + + + 9 + 10 + + + + + + True + True + + + 1 + 2 + 9 + 10 + + + + + + True + 24 + + + True + 0 + DNS server 2: + + + + + 8 + 9 + + + + + + True + 24 + + + True + 0 + DNS server 1: + + + + + 7 + 8 + + + + + + True + 24 + + + True + 0 + Search domain: + + + + + 6 + 7 + + + + + + True + 12 + + True True - Automatically reconnect on wireless network connection loss + Use global DNS servers 0 True @@ -795,8 +720,83 @@ 2 - 15 - 16 + 5 + 6 + + + + + + True + 0 + <b>Global DNS Servers</b> + True + + + 2 + 4 + 5 + + + + + + True + True + + + 1 + 2 + 8 + 9 + + + + + + True + True + + + 1 + 2 + 7 + 8 + + + + + + True + True + + + 1 + 2 + 6 + 7 + + + + + + True + 24 + + + True + True + If enabled, the wired network interface will always be displayed in the main window. This can be useful if your wired network card does not detect when the interface is connected to a cable. + Always show wired interface + 0 + True + + + + + 2 + 3 + 4 @@ -809,7 +809,7 @@ - + True General Settings @@ -841,13 +841,146 @@ True 6 - + True 0 - <b>DHCP Client</b> + <b>Route Table Flushing</b> True + 4 + 5 + + + + + + True + 0 + <b>Wired Link Detection</b> + True + + + 2 + 3 + + + + + + True + 12 + + + True + + + True + True + Automatic (recommended) + 0 + True + True + + + False + + + + + True + True + ip + 0 + True + True + flush_auto_radio + + + False + 1 + + + + + True + True + route + 0 + True + True + flush_auto_radio + + + False + 2 + + + + + + + 5 + 6 + + + + + + True + 12 + + + True + + + True + True + Automatic (recommended) + 0 + True + True + + + False + + + + + True + True + ethtool + 0 + True + True + link_auto_radio + + + False + 1 + + + + + True + True + mii-tool + 0 + True + True + link_auto_radio + + + False + 2 + + + + + + + 3 + 4 @@ -859,7 +992,7 @@ True - + True True Automatic (recommended) @@ -926,146 +1059,13 @@ - - True - 12 - - - True - - - True - True - Automatic (recommended) - 0 - True - True - - - False - - - - - True - True - ethtool - 0 - True - True - radiobutton8 - - - False - 1 - - - - - True - True - mii-tool - 0 - True - True - radiobutton8 - - - False - 2 - - - - - - - 3 - 4 - - - - - - True - 12 - - - True - - - True - True - Automatic (recommended) - 0 - True - True - - - False - - - - - True - True - ip - 0 - True - True - flush_auto_radio - - - False - 1 - - - - - True - True - route - 0 - True - True - flush_auto_radio - - - False - 2 - - - - - - - 5 - 6 - - - - - + True 0 - <b>Wired Link Detection</b> + <b>DHCP Client</b> True - 2 - 3 - - - - - - True - 0 - <b>Route Table Flushing</b> - True - - - 4 - 5 @@ -1081,7 +1081,7 @@ - + True External Programs @@ -1101,38 +1101,19 @@ True - 7 + 9 2 - + True - - - 2 - 3 - - - - - - True - 0 - You should almost always use wext as the WPA supplicant driver. - True - - - 1 - 2 - 2 - 3 - - - - - - True - 0 - Driver: + 12 + + + True + 0 + Driver: + + 1 @@ -1140,6 +1121,132 @@ + + + True + 12 + + + True + True + Use dBm to measure signal strength + 0 + True + + + + + 2 + 8 + 9 + + + + + + True + 12 + + + True + True + Enable debug mode + 0 + True + + + + + 2 + 6 + 7 + + + + + + True + 0 + <b>Wireless Interface</b> + True + + + 2 + 7 + 8 + + + + + + True + 0 + <b>WPA Supplicant</b> + True + + + 2 + + + + + + True + 0 + <b>Debugging</b> + True + + + 2 + 5 + 6 + + + + + + True + 12 + + + True + 0 + Backend: + + + + + 4 + 5 + + + + + + True + + + 1 + 2 + 4 + 5 + + + + + + True + 0 + <b>Backend</b> + True + + + 2 + 3 + 4 + + + True @@ -1161,87 +1268,27 @@ - + True 0 - <b>Backend</b> - True - - - 2 - 3 - 4 - - - - - - True + You should almost always use wext as the WPA supplicant driver. + True 1 2 - 4 - 5 + 2 + 3 - + True - 12 - - - True - 0 - Backend: - - - 4 - 5 - - - - - - True - 0 - <b>Debugging</b> - True - - - 2 - 5 - 6 - - - - - - True - True - Enable debug mode - 0 - True - - - 2 - 6 - 7 - - - - - - True - 0 - <b>WPA Supplicant</b> - True - - - 2 + 2 + 3 @@ -1253,7 +1300,7 @@ - + True Advanced Settings @@ -1273,10 +1320,27 @@ True GTK_BUTTONBOX_END - + + True + True + True + gtk-cancel + True + 0 + - + + True + True + True + gtk-ok + True + 1 + + + 1 + diff --git a/wicd/prefs.py b/wicd/prefs.py index 162729a..c8ca2c0 100644 --- a/wicd/prefs.py +++ b/wicd/prefs.py @@ -71,6 +71,7 @@ class PreferencesDialog(object): dhcp_list = [self.dhcpautoradio, self.dhclientradio, self.dhcpcdradio, self.pumpradio] dhcp_method = daemon.GetDHCPClient() + print 'DHCP method is %s' % daemon.GetDHCPClient() dhcp_list[dhcp_method].set_active(True) wired_link_list = [self.linkautoradio, self.ethtoolradio, @@ -213,32 +214,34 @@ class PreferencesDialog(object): def setup_label(name, lbl=""): """ Sets up a label for the given widget name. """ widget = self.wTree.get_widget(name) - if lbl: - widget.set_label(language[lbl]) + # if lbl: + # widget.set_label(language[lbl]) + if widget is None: + raise ValueError('widget %s does not exist' % name) return widget # External Programs tab - self.wTree.get_widget("gen_settings_label").set_label(language["gen_settings"]) - self.wTree.get_widget("ext_prog_label").set_label(language["ext_programs"]) - self.wTree.get_widget("dhcp_client_label").set_label(language["dhcp_client"]) - self.wTree.get_widget("wired_detect_label").set_label(language["wired_detect"]) - self.wTree.get_widget("route_flush_label").set_label(language["route_flush"]) - self.wTree.get_widget("pref_backend_label").set_label(language["backend"] + ":") + # self.wTree.get_widget("gen_settings_label").set_label(language["gen_settings"]) + # self.wTree.get_widget("ext_prog_label").set_label(language["ext_programs"]) + # self.wTree.get_widget("dhcp_client_label").set_label(language["dhcp_client"]) + # self.wTree.get_widget("wired_detect_label").set_label(language["wired_detect"]) + # self.wTree.get_widget("route_flush_label").set_label(language["route_flush"]) + # self.wTree.get_widget("pref_backend_label").set_label(language["backend"] + ":") - entryWiredAutoMethod = self.wTree.get_widget("pref_wired_auto_label") - entryWiredAutoMethod.set_label('Wired Autoconnect Setting:') - entryWiredAutoMethod.set_alignment(0, 0) - atrlist = pango.AttrList() - atrlist.insert(pango.AttrWeight(pango.WEIGHT_BOLD, 0, 50)) - entryWiredAutoMethod.set_attributes(atrlist) + # entryWiredAutoMethod = self.wTree.get_widget("pref_wired_auto_label") + # entryWiredAutoMethod.set_label('Wired Autoconnect Setting:') + # entryWiredAutoMethod.set_alignment(0, 0) + # atrlist = pango.AttrList() + # atrlist.insert(pango.AttrWeight(pango.WEIGHT_BOLD, 0, 50)) + # entryWiredAutoMethod.set_attributes(atrlist) - self.set_label("pref_dns1_label", "%s %s" % (language['dns'], language['1'])) - self.set_label("pref_dns2_label", "%s %s" % (language['dns'], language['2'])) - self.set_label("pref_dns3_label", "%s %s" % (language['dns'], language['3'])) - self.set_label("pref_search_dom_label", "%s:" % language['search_domain']) - self.set_label("pref_wifi_label", "%s:" % language['wireless_interface']) - self.set_label("pref_wired_label", "%s:" % language['wired_interface']) - self.set_label("pref_driver_label", "%s:" % language['wpa_supplicant_driver']) + # self.set_label("pref_dns1_label", "%s %s" % (language['dns'], language['1'])) + # self.set_label("pref_dns2_label", "%s %s" % (language['dns'], language['2'])) + # self.set_label("pref_dns3_label", "%s %s" % (language['dns'], language['3'])) + # self.set_label("pref_search_dom_label", "%s:" % language['search_domain']) + # self.set_label("pref_wifi_label", "%s:" % language['wireless_interface']) + # self.set_label("pref_wired_label", "%s:" % language['wired_interface']) + # self.set_label("pref_driver_label", "%s:" % language['wpa_supplicant_driver']) self.dialog = self.wTree.get_widget("pref_dialog") self.dialog.set_title(language['preferences']) @@ -318,4 +321,4 @@ class PreferencesDialog(object): cur_backend = daemon.GetSavedBackend() for x in self.backends: self.backendcombo.append_text(x) - \ No newline at end of file +