summary refs log tree commit diff
path: root/gnu/packages/patches/wicd-bitrate-none-fix.patch
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-08-12 00:20:16 -0400
committerMark H Weaver <mhw@netris.org>2015-08-12 00:22:02 -0400
commitae4784af544a9d667c95cae6af5b6e5d146af66b (patch)
tree8a75658d052f482010ab3c00cc0d6d09bd551e93 /gnu/packages/patches/wicd-bitrate-none-fix.patch
parent1e738fc8a59580c1fb7fd2d437ce78f8a70412db (diff)
downloadguix-ae4784af544a9d667c95cae6af5b6e5d146af66b.tar.gz
gnu: wicd: Fix bugs in curses interface program.
* gnu/packages/patches/wicd-bitrate-none-fix.patch,
  gnu/packages/patches/wicd-get-selected-profile-fix.patch: New files.
* gnu-system.am (dist_patch_DATA): Add them.
* gnu/packages/wicd.scm (wicd)[source]: Add patches.
Diffstat (limited to 'gnu/packages/patches/wicd-bitrate-none-fix.patch')
-rw-r--r--gnu/packages/patches/wicd-bitrate-none-fix.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/patches/wicd-bitrate-none-fix.patch b/gnu/packages/patches/wicd-bitrate-none-fix.patch
new file mode 100644
index 0000000000..1809b7217d
--- /dev/null
+++ b/gnu/packages/patches/wicd-bitrate-none-fix.patch
@@ -0,0 +1,24 @@
+Fix copied from https://bugs.launchpad.net/wicd/+bug/1432423/comments/1
+
+--- wicd-1.7.3/curses/netentry_curses.py	1969-12-31 19:00:00.000000000 -0500
++++ wicd-1.7.3/curses/netentry_curses.py	2015-08-11 23:26:19.999999649 -0400
+@@ -538,11 +538,16 @@
+         self.bitrates = wireless.GetAvailableBitrates()
+         self.bitrates.append('auto')
+         self.bitrate_combo.set_list(self.bitrates)
++
++        # bitrate property is sometimes None
++        chosen_bitrate = wireless.GetWirelessProperty(networkID, 'bitrate')
++        if chosen_bitrate not in self.bitrates:
++            chosen_bitrate = 'auto'
++
+         self.bitrate_combo.set_focus(
+-            self.bitrates.index(
+-                wireless.GetWirelessProperty(networkID, 'bitrate')
+-            )
++            self.bitrates.index(chosen_bitrate)
+         )
++
+         self.allow_lower_bitrates_chkbox.set_state(
+             to_bool(self.format_entry(networkID, 'allow_lower_bitrates'))
+         )