From 04d96bafee20762a87b6ed9d17b9c3f6950cf607 Mon Sep 17 00:00:00 2001 From: Dan O'Reilly Date: Mon, 22 Dec 2008 21:28:31 -0500 Subject: [PATCH 1/8] Fix problem where combobox entries would get screwed up when the preferences window was opened more than once. --- wicd/prefs.py | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/wicd/prefs.py b/wicd/prefs.py index 95a517f..162729a 100644 --- a/wicd/prefs.py +++ b/wicd/prefs.py @@ -94,21 +94,10 @@ class PreferencesDialog(object): self.entryWirelessInterface.set_text(daemon.GetWirelessInterface()) self.entryWiredInterface.set_text(daemon.GetWiredInterface()) - found = False def_driver = daemon.GetWPADriver() - for i, x in enumerate(self.wpadrivers): - if x == def_driver: #and not found: - found = True - user_driver_index = i - self.wpadrivercombo.remove_text(i) - self.wpadrivercombo.append_text(x) - - # Set the active choice here. Doing it before all the items are - # added the combobox causes the choice to be reset. - if found: - self.wpadrivercombo.set_active(user_driver_index) - else: - # Use wext as default, since normally it is the correct driver. + try: + self.wpadrivercombo.set_active(self.wpadrivers.index(def_driver)) + except ValueError: self.wpadrivercombo.set_active(0) self.useGlobalDNSCheckbox.connect("toggled", checkboxTextboxToggle, @@ -128,22 +117,12 @@ class PreferencesDialog(object): self.dns2Entry.set_sensitive(False) self.dns3Entry.set_sensitive(False) - # Load backend combobox - self.backends = daemon.GetBackendList() - # "" is included as a hack for DBus limitations, so we remove it. - self.backends.remove("") - found = False cur_backend = daemon.GetSavedBackend() - for i, x in enumerate(self.backends): - if x == cur_backend: - found = True - backend_index = i - self.backendcombo.remove_text(i) - self.backendcombo.append_text(x) - - if found: - self.backendcombo.set_active(backend_index) - else: + self.backendcombo.set_active(0) + + try: + self.backendcombo.set_active(self.backends.index(cur_backend)) + except ValueError: self.backendcombo.set_active(0) self.wTree.get_widget("notebook2").set_current_page(0) @@ -315,6 +294,9 @@ class PreferencesDialog(object): "ndiswrapper", "ipw"] self.wpadrivers = wireless.GetWpaSupplicantDrivers(self.wpadrivers) self.wpadrivers.append("ralink_legacy") + + for x in self.wpadrivers: + self.wpadrivercombo.append_text(x) self.entryWirelessInterface = self.wTree.get_widget("pref_wifi_entry") self.entryWiredInterface = self.wTree.get_widget("pref_wired_entry") @@ -327,4 +309,13 @@ class PreferencesDialog(object): self.dns2Entry = self.wTree.get_widget("pref_dns2_entry") self.dns3Entry = self.wTree.get_widget("pref_dns3_entry") - self.backendcombo = build_combobox("pref_backend_combobox") \ No newline at end of file + self.backendcombo = build_combobox("pref_backend_combobox") + # Load backend combobox + self.backends = daemon.GetBackendList() + # "" is included as a hack for DBus limitations, so we remove it. + self.backends.remove("") + + cur_backend = daemon.GetSavedBackend() + for x in self.backends: + self.backendcombo.append_text(x) + \ No newline at end of file From cd8e27b416d47188bb6f1bc2cca33f34809859f5 Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Mon, 22 Dec 2008 21:25:51 -0600 Subject: [PATCH 2/8] 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 3/8] 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 4/8] 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 + From 43d6acfc4717c8f139f2dcffbbb7c98d9705888f Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Tue, 23 Dec 2008 11:39:55 -0600 Subject: [PATCH 5/8] Updated Preferences dialog and added test cases for wnettools --- data/wicd.glade | 1090 ++++++++++++++++++++-------------------- setup.py | 21 +- tests/__init__.py | 9 + tests/testwnettools.py | 66 +++ wicd/wicd-client.py | 3 +- 5 files changed, 641 insertions(+), 548 deletions(-) create mode 100644 tests/__init__.py create mode 100644 tests/testwnettools.py diff --git a/data/wicd.glade b/data/wicd.glade index 7aa264e..234fd4a 100644 --- a/data/wicd.glade +++ b/data/wicd.glade @@ -1,6 +1,6 @@ - + 450 @@ -429,14 +429,15 @@ 4 4 - + True - 12 + 24 - + True True - Automatically reconnect on wireless network connection loss + 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 @@ -444,67 +445,255 @@ 2 - 15 - 16 + 3 + 4 - + + True + True + + + 1 + 2 + 6 + 7 + + + + + + True + True + + + 1 + 2 + 7 + 8 + + + + + + True + True + + + 1 + 2 + 8 + 9 + + + + + True 0 - <b>Wireless automatic connection</b> + <b>Global DNS Servers</b> True 2 - 14 - 15 + 4 + 5 - + True 12 - + True True - Use last wired network profile + Use global DNS servers 0 - True True 2 - 13 - 14 + 5 + 6 - + True - 12 + 24 - + True - True - Prompt for wired network profile - 0 - True - True - pref_use_last_radio + 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 - 12 - 13 + 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 @@ -532,187 +721,73 @@ - - True - 0 - <b>Wired automatic connection</b> - True - - - 2 - 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 - Use global DNS servers + 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 connect to on network connection loss 0 True @@ -720,83 +795,8 @@ 2 - 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 + 15 + 16 @@ -841,146 +841,13 @@ True 6 - + True 0 - <b>Route Table Flushing</b> + <b>DHCP Client</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 @@ -1059,13 +926,146 @@ - + + 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 + + + + + + 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>DHCP Client</b> + <b>Wired Link Detection</b> True + 2 + 3 + + + + + + True + 0 + <b>Route Table Flushing</b> + True + + + 4 + 5 @@ -1104,41 +1104,131 @@ 9 2 - + + True + + + 2 + 3 + + + + + + True + 0 + You should almost always use wext as the WPA supplicant driver. + True + + + 1 + 2 + 2 + 3 + + + + + True - 12 - + True - 0 - Driver: + + False + + 1 + 2 1 2 - + + True + 0 + <b>Backend</b> + True + + + 2 + 3 + 4 + + + + + + True + + + 1 + 2 + 4 + 5 + + + + + True 12 - + True - True - Use dBm to measure signal strength - 0 - True + 0 + Backend: + + 4 + 5 + + + + + + True + 0 + <b>Debugging</b> + True + 2 - 8 - 9 + 5 + 6 + + + + + + True + 0 + <b>WPA Supplicant</b> + True + + + 2 + + + + + + True + 0 + <b>Wireless Interface</b> + True + + + 2 + 7 + 8 @@ -1164,134 +1254,44 @@ - - 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 + True + Use dBm to measure signal strength + 0 + True + + + + + 2 + 8 + 9 + + + + + + True + 12 + + True 0 - Backend: + Driver: - 4 - 5 - - - - - - True - - - 1 - 2 - 4 - 5 - - - - - - True - 0 - <b>Backend</b> - True - - - 2 - 3 - 4 - - - - - - True - - - True - - - False - - - - - 1 - 2 1 2 - - - True - 0 - You should almost always use wext as the WPA supplicant driver. - True - - - 1 - 2 - 2 - 3 - - - - - - True - - - 2 - 3 - - - diff --git a/setup.py b/setup.py index 521e7dd..16644e5 100755 --- a/setup.py +++ b/setup.py @@ -219,7 +219,24 @@ class configure(Command): item_out.close() item_in.close() shutil.copymode(original_name, final_name) + +class test(Command): + description = "run Wicd's unit tests" + + user_options = [] + + def initialize_options(self): + pass + def finalize_options(self): + pass + + def run(self): + print "importing tests" + import tests + print 'running tests' + tests.run_tests() + class get_translations(Command): description = "download the translations from the online translator" @@ -330,7 +347,7 @@ try: data.append(( wpath.suspend, ['other/50-wicd-suspend.sh' ])) if not wpath.no_install_pmutils: data.append(( wpath.pmutils, ['other/55wicd' ])) - print 'Creating pid path', os.path.basename(wpath.pidfile) + print 'Using pid path', os.path.basename(wpath.pidfile) print 'Language support for', for language in os.listdir('translations/'): if not language.startswith('.'): @@ -354,7 +371,7 @@ iwscan_ext = Extension(name = 'iwscan', libraries = ['iw'], sources = ['depends/python-iwscan/pyiwscan.c']) -setup(cmdclass={'configure' : configure, 'get_translations' : get_translations, 'uninstall' : uninstall}, +setup(cmdclass={'configure' : configure, 'get_translations' : get_translations, 'uninstall' : uninstall, 'test' : test}, name="Wicd", version=VERSION_NUM, description="A wireless and wired network manager", diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..369c462 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,9 @@ + +def run_tests(): + import unittest + test_suite = unittest.TestSuite() + + import testwnettools + test_suite.addTest(testwnettools.suite()) + + unittest.TextTestRunner(verbosity=5).run(test_suite) diff --git a/tests/testwnettools.py b/tests/testwnettools.py new file mode 100644 index 0000000..2ace308 --- /dev/null +++ b/tests/testwnettools.py @@ -0,0 +1,66 @@ +import unittest +from wicd import wnettools + +class TestWnettools(unittest.TestCase): + def setUp(self): + self.interface = wnettools.BaseInterface('eth0') + + def test_find_wireless_interface(self): + interfaces = wnettools.GetWirelessInterfaces() + # wlan0 may change depending on your system + self.assertTrue('wlan0' in interfaces) + + def test_find_wired_interface(self): + interfaces = wnettools.GetWiredInterfaces() + # eth0 may change depending on your system + self.assertTrue('eth0' in interfaces) + + def test_wext_is_valid_wpasupplicant_driver(self): + self.assertTrue(wnettools.IsValidWpaSuppDriver('wext')) + + def test_needs_external_calls_not_implemented(self): + self.assertRaises(NotImplementedError, wnettools.NeedsExternalCalls) + + def test_get_ip_not_implemented(self): + self.assertRaises(NotImplementedError, self.interface.GetIP) + + def test_is_up_not_implemented(self): + self.assertRaises(NotImplementedError, self.interface.IsUp) + + def test_enable_debug_mode(self): + self.interface.SetDebugMode(True) + self.assertTrue(self.interface.verbose) + + def test_disable_debug_mode(self): + self.interface.SetDebugMode(False) + self.assertFalse(self.interface.verbose) + + def test_interface_name_sanitation(self): + interface = wnettools.BaseInterface('blahblah; uptime > /tmp/blah | cat') + self.assertEquals(interface.iface, 'blahblahuptimetmpblahcat') + + def test_freq_translation_low(self): + freq = '2.412 GHz' + interface = wnettools.BaseWirelessInterface('wlan0') + self.assertEquals(interface._FreqToChannel(freq), 1) + + def test_freq_translation_high(self): + freq = '2.484 GHz' + interface = wnettools.BaseWirelessInterface('wlan0') + self.assertEquals(interface._FreqToChannel(freq), 14) + + def test_generate_psk(self): + interface = wnettools.BaseWirelessInterface('wlan0') + psk = interface.GeneratePSK({'essid' : 'Network 1', 'key' : 'arandompassphrase'}) + self.assertEquals(psk, 'd70463014514f4b4ebb8e3aebbdec13f4437ac3a9af084b3433f3710e658a7be') + +def suite(): + suite = unittest.TestSuite() + tests = [] + [ tests.append(test) for test in dir(TestWnettools) if test.startswith('test') ] + for test in tests: + suite.addTest(TestWnettools(test)) + return suite + +if __name__ == '__main__': + unittest.main() diff --git a/wicd/wicd-client.py b/wicd/wicd-client.py index 40114de..743b9e8 100755 --- a/wicd/wicd-client.py +++ b/wicd/wicd-client.py @@ -364,7 +364,8 @@ class TrayIcon(object): if DBUS_AVAIL: self.toggle_wicd_gui() else: - gui.error(None, language["daemon_unavailable"]) + # gui.error(None, language["daemon_unavailable"]) + pass def on_quit(self, widget=None): """ Closes the tray icon. """ From d4a0b8d366c814fd67e659cb4f017f76c3d53096 Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Tue, 23 Dec 2008 16:55:15 -0600 Subject: [PATCH 6/8] Added the wpa-psk template and change the wpa one to wpa passphrase --- encryption/templates/active | 1 + encryption/templates/wpa | 2 +- encryption/templates/wpa-psk | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 encryption/templates/wpa-psk diff --git a/encryption/templates/active b/encryption/templates/active index 3be3271..aee3d84 100644 --- a/encryption/templates/active +++ b/encryption/templates/active @@ -1,4 +1,5 @@ wpa +wpa-psk wep-hex wep-passphrase wep-shared diff --git a/encryption/templates/wpa b/encryption/templates/wpa index c618bcb..20b36a7 100644 --- a/encryption/templates/wpa +++ b/encryption/templates/wpa @@ -1,4 +1,4 @@ -name = WPA 1/2 +name = WPA 1/2 (Passphrase) author = Adam Blackburn version = 1 require key *Key diff --git a/encryption/templates/wpa-psk b/encryption/templates/wpa-psk new file mode 100644 index 0000000..3685610 --- /dev/null +++ b/encryption/templates/wpa-psk @@ -0,0 +1,15 @@ +name = WPA 1/2 (Preshared Key) +author = Adam Blackburn +version = 1 +require apsk *Preshared_Key +----- +ctrl_interface=/var/run/wpa_supplicant +network={ + ssid="$_ESSID" + scan_ssid=$_SCAN + proto=WPA RSN + key_mgmt=WPA-PSK + pairwise=CCMP TKIP + group=CCMP TKIP + psk="$_APSK" +} From 92300133b83211a34ebefde2ba1098ced9b8b4a4 Mon Sep 17 00:00:00 2001 From: Dan O'Reilly Date: Tue, 23 Dec 2008 18:23:38 -0500 Subject: [PATCH 7/8] Fix "_" getting stripped from interface names. --- wicd/wnettools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wicd/wnettools.py b/wicd/wnettools.py index 0a0b9c2..5c70c75 100644 --- a/wicd/wnettools.py +++ b/wicd/wnettools.py @@ -41,7 +41,7 @@ import misc RALINK_DRIVER = 'ralink legacy' -blacklist_strict = punctuation.replace("-", "") + " " +blacklist_strict = '!"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ ' blacklist_norm = ";`$!*|><&\\" blank_trans = maketrans("", "") From 10df01a9c2a63f161b6c5043b206ed3c05572b5f Mon Sep 17 00:00:00 2001 From: Dan O'Reilly Date: Tue, 23 Dec 2008 21:10:17 -0500 Subject: [PATCH 8/8] Tweak misc.to_unicode() so that it is more likely to encode to utf-8 correctly. --- wicd/misc.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/wicd/misc.py b/wicd/misc.py index d7e65e7..f3e2abe 100644 --- a/wicd/misc.py +++ b/wicd/misc.py @@ -302,13 +302,22 @@ def get_gettext(): def to_unicode(x): """ Attempts to convert a string to utf-8. """ # If this is a unicode string, encode it and return - if type(x) == unicode: + if type(x) not in [unicode, str]: + return x + if isinstance(x, unicode): return x.encode('utf-8') encoding = locale.getpreferredencoding() try: - ret = x.decode(encoding, 'replace').encode('utf-8') - except: - ret = x.decode('utf-8', 'replace').encode('utf-8') + ret = x.decode(encoding).encode('utf-8') + except UnicodeError: + try: + ret = x.decode('utf-8').encode('utf-8') + except UnicodeError: + try: + ret = x.decode('latin-1').encode('utf-8') + except UnicodeError: + ret = x.decode('utf-8', 'replace').encode('utf-8') + return ret def RenameProcess(new_name): @@ -509,8 +518,8 @@ def get_language_list_gui(): language['bad_pass'] = _('Connection Failed: Could not authenticate (bad password?)') language['done'] = _('Done connecting...') language['scanning'] = _('Scanning') - language['cannot_start_daemon'] = _("Unable to connect to wicd daemon DBus interface." + \ - "This typically means there was a problem starting the daemon." + \ + language['cannot_start_daemon'] = _("Unable to connect to wicd daemon DBus interface. " + \ + "This typically means there was a problem starting the daemon. " + \ "Check the wicd log for more info") language['lost_dbus'] = _("The wicd daemon has shut down, the UI will not function properly until it is restarted.")