1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-20 21:08:06 +01:00

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.
This commit is contained in:
Andrew Psaltis
2009-03-11 10:21:20 -04:00
parent df6955b963
commit 2d3745f39b
2 changed files with 14 additions and 13 deletions

View File

@@ -206,13 +206,13 @@ class TabColumns(urwid.WidgetWrap):
return True return True
def keypress(self,size,key): def keypress(self,size,key):
key = self._w.keypress(size,key)
if key == "meta [" or key == "meta ]": if key == "meta [" or key == "meta ]":
self._w.get_body().set_focus(0) self._w.get_body().set_focus(0)
newK = 'left' if key[-1] == '[' else 'right' newK = 'left' if key[-1] == '[' else 'right'
self.keypress(size,newK) self.keypress(size,newK)
self._w.get_body().set_focus(1) self._w.get_body().set_focus(1)
else: else:
key = self._w.keypress(size,key)
wid = self.pile.get_focus().get_body() wid = self.pile.get_focus().get_body()
if wid == self.columns: if wid == self.columns:
# lw = self.listbox.body # lw = self.listbox.body

View File

@@ -206,7 +206,7 @@ def help_dialog(body):
text1 = urwid.Text([ text1 = urwid.Text([
('bold','H h ?'),": Display this help dialog\n", ('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',' D'),": Disconnect from all networks\n",
('bold',' ESC'),": Stop a network connection in progress\n", ('bold',' ESC'),": Stop a network connection in progress\n",
('bold',' F5 R'),": Refresh network list\n", ('bold',' F5 R'),": Refresh network list\n",
@@ -596,7 +596,7 @@ class appGUI():
('meta ]','Tab Right')],self.handle_keys ('meta ]','Tab Right')],self.handle_keys
) )
self.confCols = OptCols( [ self.confCols = OptCols( [
('left','OK'), ('meta enter','OK'),
('esc','Cancel') ('esc','Cancel')
],self.handle_keys) ],self.handle_keys)
@@ -831,14 +831,15 @@ class appGUI():
# Guess what! I actually need to put this here, else I'll have # Guess what! I actually need to put this here, else I'll have
# tons of references to self.frame lying around. ^_^ # tons of references to self.frame lying around. ^_^
if "enter" in keys: if "enter" in keys:
focus = self.frame.body.get_focus() pass
if focus == self.wiredCB: #focus = self.frame.body.get_focus()
self.special = focus #if focus == self.wiredCB:
self.connect("wired",0) # self.special = focus
else: # self.connect("wired",0)
# wless list only other option #else:
wid,pos = self.thePile.get_focus().get_focus() # # wless list only other option
self.connect("wireless",pos) # wid,pos = self.thePile.get_focus().get_focus()
# self.connect("wireless",pos)
if "esc" in keys: if "esc" in keys:
# Force disconnect here if connection in progress # Force disconnect here if connection in progress
@@ -898,7 +899,7 @@ class appGUI():
if self.diag: if self.diag:
if 'esc' in keys: if 'esc' in keys:
self.restore_primary() 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.diag.save_settings()
self.restore_primary() self.restore_primary()
for k in keys: for k in keys:
@@ -976,7 +977,7 @@ def main():
('editcp', 'default', 'default', 'standout'), ('editcp', 'default', 'default', 'standout'),
('editbx', 'light gray', 'dark blue'), ('editbx', 'light gray', 'dark blue'),
('editfc', 'white','dark blue', 'bold'), ('editfc', 'white','dark blue', 'bold'),
('editnfc','dark gray','default','bold'), ('editnfc','brown','default','bold'),
('tab active','dark green','light gray'), ('tab active','dark green','light gray'),
('infobar','light gray','dark blue'), ('infobar','light gray','dark blue'),
('timebar','dark gray','default'), ('timebar','dark gray','default'),