modified: ri_cmd.py

modified:   ri_data.py
	modified:   ri_tk.py
	modified:   ri_tk_cmd.py
	modified:   ri_widget.py
    add network check ip and hostname funcation
This commit is contained in:
fling
2010-12-09 09:17:52 +08:00
parent e332f9de9c
commit d8d7bb036d
5 changed files with 23 additions and 34 deletions

View File

@@ -154,18 +154,21 @@ 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):
def process_action_quit(w,step=''):
''' process action quit '''
if 'action' in dir(w) and 'quit' in w.action.dict:
getattr(sys.modules['ri_cmd'], w.action.dict['quit'])()
if step == 'network':
getattr(sys.modules['ri_cmd'], w.action.dict['quit'])(step)
else:
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):
def destroy_widget(w,step=''):
''' w - Widget instance '''
process_action_quit(w)
process_action_quit(w,step)
w.tk_widget.destroy()
def create_message_box(w):