def __init__(self, app, presenter): gtk.VBox.__init__(self) self.app = app self.presenter = presenter self.toolbar = OIToolbar(self.app) self.pack_start(self.toolbar, False, True) self.show_all()
def __init__(self, app, presenter): gtk.VBox.__init__(self) self.app = app self.presenter = presenter self.toolbar = OIToolbar(self.app) self.pack_start(self.toolbar, False, True) self.spacer = gtk.HBox() self.pack_end(self.spacer, False, True, 5) self.viewer = OIViewer(app, presenter) self.pack_end(self.viewer, True, True) self.show_all()
def __init__(self, app, presenter): gtk.VBox.__init__(self) self.app = app self.presenter = presenter entries = [] if presenter.doc_presenter.model_type == uc2const.BINARY_MODEL: entries = [ None, 'EDIT_OBJ', 'UPDATE_OBJ', ] self.toolbar = OIToolbar(self.app, entries) self.pack_start(self.toolbar, False, True) self.spacer = gtk.HBox() self.pack_end(self.spacer, False, True, 5) if presenter.doc_presenter.model_type == uc2const.TEXT_MODEL: self.viewer = TextDataViewer(self, app, presenter) self.pack_end(self.viewer, True, True) if presenter.doc_presenter.model_type == uc2const.TAGGED_MODEL: self.viewer = TaggedDataViewer(self, app, presenter) self.pack_end(self.viewer, True, True) try: if presenter.doc_presenter.model_type == uc2const.BINARY_MODEL: self.viewer = BinaryDataViewer(self, app, presenter) self.pack_end(self.viewer, True, True) except: import sys, traceback print sys.exc_info()[1].__str__() + '\n' + traceback.format_tb( sys.exc_info()[2])[0] self.show_all()