Files
new_install/python/mine/ri_cmd.py
lizhi-rocky d1760bad48 10% work
complete most xml relax ng work.
work on real interface xml
work on python scripts for parsing interface xml
2010-07-08 11:52:50 +08:00

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])