complete most xml relax ng work. work on real interface xml work on python scripts for parsing interface xml
29 lines
704 B
Python
29 lines
704 B
Python
#!/usr/bin/python
|
|
''' handle gui button related commands.'''
|
|
|
|
import ri_tk
|
|
import ri_seq
|
|
import ri_widget
|
|
|
|
def quit():
|
|
''' correspond to quit button '''
|
|
ri_tk.quit()
|
|
|
|
def previous():
|
|
''' correspond to previous button '''
|
|
if 'current_window' in dir(ri_tk):
|
|
ri_tk.kill_widget(ri_tk.current_window)
|
|
|
|
wid_name = ri_seq.previous()
|
|
if wid_name is not None:
|
|
ri_tk.display_widget(ri_widget.Widget.dict[wid_name])
|
|
|
|
def next():
|
|
''' correspond to next button '''
|
|
if 'current_window' in dir(ri_tk):
|
|
ri_tk.kill_widget(ri_tk.current_window)
|
|
|
|
wid_name = ri_seq.next()
|
|
if wid_name is not None:
|
|
ri_tk.display_widget(ri_widget.Widget.dict[wid_name])
|