Improved and applied your patch. Thanks for making wicd more stable!
=== modified file 'curses/wicd-curses.py'
--- curses/wicd-curses.py 2014-12-19 14:40:39 +0000
+++ curses/wicd-curses.py 2014-12-20 09:30:43 +0000
@@ -872,7 +872,8 @@ get_body().set_focus(self.focusloc[1]) else: if self.wlessLB != self.no_wlan:
- self.thePile.get_focus().set_focus(self.focusloc[1])
+ # Set the focus to the last selected item, but never past the length of the list
+ self.thePile.get_focus().set_focus(min(self.focusloc[1], len(wlessL) - 1)) else: self.thePile.set_focus(self.wiredCB)
else:
@@ -885,7 +886,8 @@
if self.focusloc[1] is None: self.focusloc[1] = 0
if self.wlessLB != self.no_wlan:
- self.wlessLB.set_focus(self.focusloc[1])
+ # Set the focus to the last selected item, but never past the length of the list
+ self.wlessLB.set_focus(min(self.focusloc[1], len(wlessL) - 1))
Improved and applied your patch. Thanks for making wicd more stable!
=== modified file 'curses/ wicd-curses. py' wicd-curses. py 2014-12-19 14:40:39 +0000 wicd-curses. py 2014-12-20 09:30:43 +0000
get_ body(). set_focus( self.focusloc[ 1])
else:
if self.wlessLB != self.no_wlan: get_focus( ).set_focus( self.focusloc[ 1]) get_focus( ).set_focus( min(self. focusloc[ 1], len(wlessL) - 1))
else:
self. thePile. set_focus( self.wiredCB)
self.focusloc[ 1] = 0 set_focus( self.focusloc[ 1]) set_focus( min(self. focusloc[ 1], len(wlessL) - 1))
--- curses/
+++ curses/
@@ -872,7 +872,8 @@
- self.thePile.
+ # Set the focus to the last selected item, but never past the length of the list
+ self.thePile.
else:
@@ -885,7 +886,8 @@
if self.focusloc[1] is None:
if self.wlessLB != self.no_wlan:
- self.wlessLB.
+ # Set the focus to the last selected item, but never past the length of the list
+ self.wlessLB.
if not firstrun: