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

Merge r345 of 1.6-nacl.

This commit is contained in:
Andrew Psaltis
2009-06-07 15:01:01 -04:00
6 changed files with 93 additions and 27 deletions

View File

@@ -560,7 +560,8 @@ class appGUI():
self.prev_state = False
self.connecting = False
self.screen_locked = False
self.do_diag_lock = False
self.do_diag_lock = False #Whether the screen is locked beneath a dialog
self.diag_type = 'none' # The type of dialog that is up
self.scanning = False
self.pref = None
@@ -573,7 +574,6 @@ class appGUI():
self.scanning = True
wireless.Scan(False)
def init_other_optcols(self):
# The "tabbed" preferences dialog
self.prefCols = OptCols( [ ('meta enter','OK'),
@@ -585,7 +585,7 @@ class appGUI():
# Does what it says it does
def lock_screen(self):
if self.diag:
if self.diag_type == 'pref':
self.do_diag_lock = True
return True
self.frame.set_body(self.screen_locker)
@@ -784,9 +784,12 @@ class appGUI():
#@wrap_exceptions
def dbus_scan_started(self):
self.scanning = True
if self.diag_type == 'conf':
self.restore_primary()
self.lock_screen()
def restore_primary(self):
self.diag_type = 'none'
if self.do_diag_lock or self.scanning:
self.frame.set_body(self.screen_locker)
self.do_diag_lock = False
@@ -822,6 +825,7 @@ class appGUI():
self.diag = WirelessSettingsDialog(pos,self.frame)
self.diag.ready_widgets(ui,self.frame)
self.frame.set_body(self.diag)
self.diag_type = 'conf'
# 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:
@@ -848,13 +852,13 @@ class appGUI():
self.pref.ready_widgets(ui,self.frame)
self.frame.set_footer(urwid.Pile([self.prefCols,self.footer2]))
self.diag = self.pref
self.diag_type = 'pref'
self.frame.set_body(self.diag)
# Halt here, keypress gets passed to the dialog otherwise
return True
if "A" in keys:
about_dialog(self.frame)
if "C" in keys:
# Same as "enter" for now
focus = self.frame.body.get_focus()
if focus == self.wiredCB:
self.special = focus