From 2d3745f39b262116ccbdc968f582c14df91d7c21 Mon Sep 17 00:00:00 2001 From: Andrew Psaltis Date: Wed, 11 Mar 2009 10:21:20 -0400 Subject: [PATCH] Fixed some bugs/usability issues Enter is no longer mapped to anything Arrow left is no longer mapped to anything Edit text when it is unfocusable is now brown. Fixed problem where scrolling up on the Preferences Dialog would somehow shift the dab over one. --- curses/curses_misc.py | 2 +- curses/wicd-curses.py | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/curses/curses_misc.py b/curses/curses_misc.py index b55163e..399c512 100644 --- a/curses/curses_misc.py +++ b/curses/curses_misc.py @@ -206,13 +206,13 @@ class TabColumns(urwid.WidgetWrap): return True def keypress(self,size,key): - key = self._w.keypress(size,key) if key == "meta [" or key == "meta ]": self._w.get_body().set_focus(0) newK = 'left' if key[-1] == '[' else 'right' self.keypress(size,newK) self._w.get_body().set_focus(1) else: + key = self._w.keypress(size,key) wid = self.pile.get_focus().get_body() if wid == self.columns: # lw = self.listbox.body diff --git a/curses/wicd-curses.py b/curses/wicd-curses.py index 1d08fe2..52bbab6 100755 --- a/curses/wicd-curses.py +++ b/curses/wicd-curses.py @@ -206,7 +206,7 @@ def help_dialog(body): text1 = urwid.Text([ ('bold','H h ?'),": Display this help dialog\n", -('bold','enter'),": Connect to selected network\n", +('bold',' C'),": Connect to selected network\n", ('bold',' D'),": Disconnect from all networks\n", ('bold',' ESC'),": Stop a network connection in progress\n", ('bold',' F5 R'),": Refresh network list\n", @@ -596,7 +596,7 @@ class appGUI(): ('meta ]','Tab Right')],self.handle_keys ) self.confCols = OptCols( [ - ('left','OK'), + ('meta enter','OK'), ('esc','Cancel') ],self.handle_keys) @@ -831,14 +831,15 @@ class appGUI(): # Guess what! I actually need to put this here, else I'll have # tons of references to self.frame lying around. ^_^ if "enter" in keys: - focus = self.frame.body.get_focus() - if focus == self.wiredCB: - self.special = focus - self.connect("wired",0) - else: - # wless list only other option - wid,pos = self.thePile.get_focus().get_focus() - self.connect("wireless",pos) + pass + #focus = self.frame.body.get_focus() + #if focus == self.wiredCB: + # self.special = focus + # self.connect("wired",0) + #else: + # # wless list only other option + # wid,pos = self.thePile.get_focus().get_focus() + # self.connect("wireless",pos) if "esc" in keys: # Force disconnect here if connection in progress @@ -898,7 +899,7 @@ class appGUI(): if self.diag: if 'esc' in keys: self.restore_primary() - if ('left' in keys and issubclass(self.diag.__class__,AdvancedSettingsDialog)) or 'meta enter' in keys: + if 'meta enter' in keys: self.diag.save_settings() self.restore_primary() for k in keys: @@ -976,7 +977,7 @@ def main(): ('editcp', 'default', 'default', 'standout'), ('editbx', 'light gray', 'dark blue'), ('editfc', 'white','dark blue', 'bold'), - ('editnfc','dark gray','default','bold'), + ('editnfc','brown','default','bold'), ('tab active','dark green','light gray'), ('infobar','light gray','dark blue'), ('timebar','dark gray','default'),