diff --git a/curses/curses_misc.py b/curses/curses_misc.py index 4affdd6..f34afcb 100644 --- a/curses/curses_misc.py +++ b/curses/curses_misc.py @@ -211,9 +211,9 @@ class TabColumns(urwid.WidgetWrap): return True def keypress(self,size,key): - if key == "meta [" or key == "meta ]": + if key == "page up" or key == "page down": self._w.get_body().set_focus(0) - newK = 'left' if key[-1] == '[' else 'right' + newK = 'left' if key == "page up" else 'right' self.keypress(size,newK) self._w.get_body().set_focus(1) else: @@ -564,26 +564,11 @@ class OptCols(urwid.WidgetWrap): # callbacks map the text contents to its assigned callback. self.callbacks = [] for cmd in tuples: - splitcmd = cmd[0].split() - key = '' - for part in splitcmd: - if part == 'ctrl': - key+='Ctrl+' - elif part == 'meta': - # If anyone has a problem with this, they can bother me - # about it. - key+='Alt+' - else: - if part == 'left': - key += '<-' - elif part == 'right': - key += '->' - elif part == 'esc': - key += 'ESC' - elif part == 'enter': - key += 'Enter' - else: - key += part + key = reduce(lambda s,(f,t):s.replace(f,t), [ \ + ('ctrl ', 'Ctrl+'), ('meta ', 'Alt+'), \ + ('left', '<-'), ('right', '->'), \ + ('page up', 'Page Up'), ('page down', 'Page Down'), \ + ('esc', 'ESC'), ('enter', 'Enter'), ('f10','F10')], cmd[0]) if debug: callback = self.debugClick diff --git a/curses/wicd-curses.py b/curses/wicd-curses.py index 6ba6846..ef50da8 100755 --- a/curses/wicd-curses.py +++ b/curses/wicd-curses.py @@ -3,8 +3,8 @@ """ wicd-curses. (curses/urwid-based) console interface to wicd -Provides the a console UI for wicd, so that people with broken X servers can -at least get a network connection. Or those who don't like using X. ;-) +Provides a console UI for wicd, so that people with broken X servers can +at least get a network connection. Or those who don't like using X and/or GTK. """ @@ -583,11 +583,11 @@ class appGUI(): def init_other_optcols(self): # The "tabbed" preferences dialog - self.prefCols = OptCols( [ ('meta enter','OK'), - ('meta [','Tab Left',), - ('meta ]','Tab Right'), + self.prefCols = OptCols( [ ('f10','OK'), + ('page up','Tab Left',), + ('page down', 'Tab Right'), ('esc','Cancel') ], self.handle_keys) - self.confCols = OptCols( [ ('meta enter','OK'), + self.confCols = OptCols( [ ('f10','OK'), ('esc','Cancel') ],self.handle_keys) # Does what it says it does @@ -902,7 +902,7 @@ class appGUI(): if k == 'esc' or k == 'q' or k == 'Q': self.restore_primary() break - if k == 'meta enter': + if k == 'f10': self.diag.save_settings() self.restore_primary() break diff --git a/in/man=wicd-curses.8.in b/in/man=wicd-curses.8.in index 7381627..a730c62 100644 --- a/in/man=wicd-curses.8.in +++ b/in/man=wicd-curses.8.in @@ -60,8 +60,6 @@ Delete the selected wired network profile (from the wired network combo box at t .TP .BR F2 Rename the selected wired network profile (from the wired network combo box at the top) -.\".PP -.\"The following are not implemented yet: .TP .BR S .\"Bring up the script selector for the selected network (requires superuser privileges) @@ -75,13 +73,6 @@ Raise the Ad-Hoc network creation dialog .I ~/.wicd/WHEREAREMYFILES Reminder that your network configuration files are not here ;-) .PP -These following are not used yet: -.TP -.I %LIB%colors.py -Tentative location of the system color schemes -.TP -.I ~/.wicd/colors.py -Custom color schemes. .SH "SEE ALSO" .BR wicd-client (1), .BR wicd (8)