57 lines
997 B
Python
57 lines
997 B
Python
# Bryan Schumaker (8/13/2010)
|
|
|
|
import gtk
|
|
import libsaria
|
|
|
|
# Lazy loaded modules
|
|
window = None
|
|
tabs = None
|
|
|
|
|
|
# Global variables for some objects
|
|
main_window = None
|
|
main_tabs = None
|
|
|
|
|
|
def startup():
|
|
global gtk
|
|
import gtk
|
|
gtk.main()
|
|
|
|
|
|
def exit(widget, event):
|
|
gtk.main_quit()
|
|
|
|
|
|
def get_main_tabs_init():
|
|
global tabs
|
|
import tabs
|
|
global get_main_tabs
|
|
get_main_tabs = get_main_tabs_always
|
|
return get_main_tabs_always()
|
|
def get_main_tabs_always():
|
|
global tabs
|
|
global main_tabs
|
|
if main_tabs == None:
|
|
main_tabs = tabs.Tabs()
|
|
return main_tabs
|
|
get_main_tabs = get_main_tabs_init
|
|
|
|
|
|
def get_window_init(size):
|
|
global window
|
|
import window
|
|
global get_window
|
|
get_window = get_window_always
|
|
return get_window_always(size)
|
|
def get_window_always(size=None):
|
|
global window
|
|
global main_window
|
|
if main_window == None:
|
|
main_window = window.Window()
|
|
main_window.add(get_main_tabs())
|
|
if size != None:
|
|
main_window.resize(size[0], size[1])
|
|
return main_window
|
|
get_window = get_window_init
|