# HG changeset patch # User Thinker K.F. Li # Date 1294836151 -28800 # Node ID 2318a094a2774580c43098a0584b5227bdabc851 # Parent d4559e7f82cd1ffd77877a8be74b4962bab44027 Move function around to separate do_* from others diff -r d4559e7f82cd -r 2318a094a277 pyink/MBScene.py --- a/pyink/MBScene.py Wed Jan 12 20:40:21 2011 +0800 +++ b/pyink/MBScene.py Wed Jan 12 20:42:31 2011 +0800 @@ -168,11 +168,12 @@ self._director.show_scene(frame_idx) pass - def do_changeObjectLabel(self,w): - o = self.desktop.selection.list()[0] - o.setAttribute("inkscape:label", self.nameEditor.get_text()) - pass - + def markUndo(self, msg): + #self._domviewui.mark_undo(msg) + # FIXME: move into domview latter when the inkscpae-pybind is modified + # to support the sp_document_done. + self.desktop.doc().done("None",msg) + def addNameEditor(self,hbox): self.nameEditor = gtk.Entry(max=40) hbox.pack_start(self.nameEditor,expand=False,fill=False) @@ -195,6 +196,20 @@ self.tweenTypeSelector.connect('changed', self.do_TweenTypeChange) pass + def lock(self): + self._domviewui.lock() + pass + + def unlock(self): + self._domviewui.unlock() + pass + + + def do_changeObjectLabel(self,w): + o = self.desktop.selection.list()[0] + o.setAttribute("inkscape:label", self.nameEditor.get_text()) + pass + def do_selection(self,w,obj): objs = self.desktop.selection.list() try: @@ -222,12 +237,6 @@ self.selectSceneObject(layer_idx, frame_idx) pass - def markUndo(self, msg): - #self._domviewui.mark_undo(msg) - # FIXME: move into domview latter when the inkscpae-pybind is modified - # to support the sp_document_done. - self.desktop.doc().done("None",msg) - def doInsertKeyScene(self,w): layer_idx, frame_idx = self._domviewui.get_active_layer_frame() self.insertKeyScene(layer_idx, frame_idx) @@ -246,15 +255,6 @@ self.markUndo("remove key") return - def lock(self): - self._domviewui.lock() - pass - - def unlock(self): - self._domviewui.unlock() - pass - - def doExtendScene(self,w): self.extendScene() self.markUndo("extend key")