import gtk import gtk.glade import os import net.Lliurex.Amic.Render class Editor: def __init__(self): print "[Editor] init" self.rsrc_path=None self.rsrc_lookup() uitree=gtk.glade.XML(self.rsrc_path+"/ui_editor.glade") self.wineditor=uitree.get_widget("winEditor") self.wineditor.connect("destroy",self.OnDestroy) uitree.get_widget("btnPlay").connect("clicked",self.OnBtnPlayClick) uitree.get_widget("btnNew").connect("clicked",self.OnBtnNewClick) uitree.get_widget("btnOpen").connect("clicked",self.OnBtnOpenClick) uitree.get_widget("btnSave").connect("clicked",self.OnBtnSaveClick) uitree.get_widget("btnPrefs").connect("clicked",self.OnBtnPrefsClick) self.wineditor.show_all() self.render=net.Lliurex.Amic.Render.Render(uitree.get_widget("drawingarea")) def rsrc_lookup(self): print(os.getcwd()) if os.path.exists(os.getcwd()+"/../rsrc"): self.rsrc_path=os.getcwd()+"/../rsrc/" print "[Editor] rsrc path: " + self.rsrc_path else: self.rsrc_path="/usr/share/lliurex-amic-2.0/rsrc/" def OnDestroy(self,data): gtk.main_quit() def OnBtnPlayClick(self,data): pass def OnBtnNewClick(self,data): pass def OnBtnOpenClick(self,data): pass def OnBtnSaveClick(self,data): pass def OnBtnPrefsClick(self,data): pass