mirror of
https://github.com/gryf/wicd.git
synced 2026-03-13 13:15:47 +01:00
Various fixes.
curses/curses_misc.py:
Simplified changing the "arrow" on the ComboBox, if I decide to do so.
curses/prefs_curses.py: Added a docstring
curses/wicd-curses.py:
'q' or 'Q' quits a dialog without saving now.
Fixed a bug where a scan run while a dialog is up would lock the screen and
half-close the dialog when it is done.
This commit is contained in:
@@ -581,6 +581,7 @@ class appGUI():
|
||||
self.prev_state = False
|
||||
self.connecting = False
|
||||
self.screen_locked = False
|
||||
self.do_diag_lock = False
|
||||
|
||||
self.pref = None
|
||||
|
||||
@@ -602,11 +603,17 @@ class appGUI():
|
||||
|
||||
# Does what it says it does
|
||||
def lock_screen(self):
|
||||
if self.diag:
|
||||
self.do_diag_lock = True
|
||||
return True
|
||||
self.frame.set_body(self.screen_locker)
|
||||
self.screen_locked = True
|
||||
self.update_ui()
|
||||
|
||||
def unlock_screen(self):
|
||||
if self.do_diag_lock:
|
||||
self.do_diag_lock = False
|
||||
return True
|
||||
self.update_netlist(force_check=True)
|
||||
self.frame.set_body(self.thePile)
|
||||
self.screen_locked = False
|
||||
@@ -810,7 +817,11 @@ class appGUI():
|
||||
self.lock_screen()
|
||||
|
||||
def restore_primary(self):
|
||||
self.frame.set_body(self.thePile)
|
||||
if self.do_diag_lock:
|
||||
self.frame.set_body(self.screen_locker)
|
||||
self.do_diag_lock = False
|
||||
else:
|
||||
self.frame.set_body(self.thePile)
|
||||
self.diag = None
|
||||
self.frame.set_footer(urwid.Pile([self.primaryCols,self.footer2]))
|
||||
self.update_ui()
|
||||
@@ -916,7 +927,7 @@ class appGUI():
|
||||
focus=True)
|
||||
continue
|
||||
if self.diag:
|
||||
if k == 'esc':
|
||||
if k == 'esc' or k == 'q' or k == 'Q':
|
||||
self.restore_primary()
|
||||
break
|
||||
if k == 'meta enter':
|
||||
|
||||
Reference in New Issue
Block a user