def __init__(self, aParentWindow, pointOfAttach): # call superclass ViewComponent.__init__(self, pointOfAttach, 'attachment_box', 'ObjectEditor.glade') self.theParentWindow = aParentWindow self.updateInProgress = False self.theInfoBuffer = gtk.TextBuffer() self.theDescriptionBuffer = gtk.TextBuffer() self['classname_desc'].set_buffer(self.theDescriptionBuffer) self['user_info'].set_buffer(self.theInfoBuffer) # add handlers self.addHandlers({ 'on_combo-entry_changed' : self.__change_class, \ 'on_editor_notebook_switch_page' : self.__select_page, 'on_ID_entry_editing_done' : self.__change_name, 'on_user_info_move_focus' : self.__change_info }) # initate Editors self.thePropertyList = PropertyList(self.theParentWindow, self['PropertyListFrame']) self['vbox4'].remove(self['hbox3']) #self['hbox3'] = None # make sensitive change class button for process self['class_combo'].set_sensitive(True) self.theModelEditor = self.theParentWindow.theModelEditor self.setDisplayedStepper(None)
def __init__(self, aParentWindow, pointOfAttach): # call superclass ViewComponent.__init__(self, pointOfAttach, 'attachment_box', 'ObjectEditor.glade') self.theParentWindow = aParentWindow self.updateInProgress = False self.theInfoBuffer = gtk.TextBuffer() self.theDescriptionBuffer = gtk.TextBuffer() self['classname_desc'].set_buffer(self.theDescriptionBuffer) self['user_info'].set_buffer(self.theInfoBuffer) # add handlers self.addHandlers({ 'on_combo-entry_changed' : self.__change_class, \ 'on_editor_notebook_switch_page' : self.__select_page, 'on_ID_entry_editing_done' : self.__change_name, 'on_user_info_move_focus' : self.__change_info }) # initate Editors self.thePropertyList = PropertyList(self.theParentWindow, self['PropertyListFrame']) aNoteBook = ViewComponent.getWidget(self, 'editor_notebook') self['ids'].remove(self['hbox3']) #self['hbox3'] = None aNoteBook.set_tab_pos(gtk.POS_TOP) desc_horizontal = self['desc_horizontal'] desc_vertical = self['desc_vertical'] proplist = self['PropertyListFrame'] infoDesc = self['info_desc'] vertical = self['vertical_holder'] horizontal = self['horizontal_holder'] horizontal.remove(proplist) desc_horizontal.remove(infoDesc) vertical.pack_end(proplist) vertical.child_set_property(proplist, "expand", True) vertical.child_set_property(proplist, "fill", True) vertical.child_set_property(horizontal, "expand", False) desc_vertical.pack_end(infoDesc) vertical.show_all() desc_vertical.show_all() # make sensitive change class button for process self['class_combo'].set_sensitive(True) self.theModelEditor = self.theParentWindow.theModelEditor self.setDisplayedStepper(None)
def __init__(self, aParentWindow, pointOfAttach, anEntityType, aThirdFrame=None): # call superclass ViewComponent.__init__(self, pointOfAttach, 'attachment_box', 'ObjectEditor.glade') self.theParentWindow = aParentWindow self.theModelEditor = self.theParentWindow.theModelEditor self.theType = anEntityType self.updateInProgress = False self.theInfoBuffer = gtk.TextBuffer() self.theDescriptionBuffer = gtk.TextBuffer() self['classname_desc'].set_buffer(self.theDescriptionBuffer) self['user_info'].set_buffer(self.theInfoBuffer) # add handlers self.addHandlers({ 'on_combo-entry_changed': self.__change_class, 'on_editor_notebook_switch_page': self.__select_page, 'on_ID_entry_editing_done': self.__change_name, 'on_user_info_move_focus': self.__change_info }) # initate Editors self.thePropertyList = PropertyList(self.theParentWindow, self['PropertyListFrame']) aNoteBook = ViewComponent.getWidget(self, 'editor_notebook') if aThirdFrame != None: #Add the ShapePropertyComponent aShapeFrame = gtk.VBox() aShapeFrame.show() aShapeLabel = gtk.Label('ShapeProperty') aShapeLabel.show() aNoteBook.append_page(aShapeFrame, aShapeLabel) self.theShapeProperty = ShapePropertyComponent( self.theParentWindow, aShapeFrame) self.thePropertyList.hideButtons() else: aNoteBook.set_tab_pos(gtk.POS_TOP) desc_vertical = self['desc_vertical'] desc_horizontal = self['desc_horizontal'] infoDesc = self['info_desc'] proplist = self['PropertyListFrame'] vertical = self['vertical_holder'] horizontal = self['horizontal_holder'] horizontal.remove(proplist) desc_horizontal.remove(infoDesc) vertical.pack_end(proplist) vertical.child_set_property(proplist, "expand", True) vertical.child_set_property(proplist, "fill", True) vertical.child_set_property(horizontal, "expand", False) desc_vertical.pack_end(infoDesc) vertical.show_all() desc_vertical.show_all() # make sensitive change class button for process if self.theType == ME_PROCESS_TYPE: self['class_combo'].set_sensitive(True) self.setDisplayedEntity(None)