modified: ri_cmd.py

modified:   ri_oper.py
	modified:   ri_tk.py
	modified:   ri_tk_cmd.py
	modified:   ri_widget.py
    add network check ip and hostname update
This commit is contained in:
fling
2010-12-09 12:23:48 +08:00
parent d8d7bb036d
commit 3093360d0c
5 changed files with 17 additions and 21 deletions

View File

@@ -154,21 +154,18 @@ def create_widget_sub(w, p_win):
# while destroying a widget, only destroy one. Tk functions will
# destroy all descendant.
# so init is a little different from quit.
def process_action_quit(w,step=''):
def process_action_quit(w):
''' process action quit '''
if 'action' in dir(w) and 'quit' in w.action.dict:
if step == 'network':
getattr(sys.modules['ri_cmd'], w.action.dict['quit'])(step)
else:
getattr(sys.modules['ri_cmd'], w.action.dict['quit'])()
getattr(sys.modules['ri_cmd'], w.action.dict['quit'])()
if 'widgets' in dir(w):
for sub_w in w.widgets:
process_action_quit(sub_w)
def destroy_widget(w,step=''):
def destroy_widget(w):
''' w - Widget instance '''
process_action_quit(w,step)
process_action_quit(w)
w.tk_widget.destroy()
def create_message_box(w):