Author: reinhard Date: 2011-06-18 04:17:58 -0500 (Sat, 18 Jun 2011) New Revision: 10324
Modified: trunk/gnue-designer/ trunk/gnue-designer/src/base/Incubator.py trunk/gnue-designer/src/base/document.py Log: Use dispatch-event rather than unnecessarily different. With form-simple-wizard, labels & entries show up in Object Navigator, but not on page canvas. Property changes on: trunk/gnue-designer ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2011-05-27 16:58:20.556999922 -0700 committer: whizman properties: branch-nick: designer + timestamp: 2011-06-01 15:22:22.130000114 -0700 committer: whizman properties: branch-nick: designer Name: bzr:file-ids - src/base/TemplateBase.py 1413@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fbase%2FTemplateBase.py src/base/document.py 8929@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fbase%2Fdocument.py src/base/tools/SchemaNavigator.py 4174@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fbase%2Ftools%2FSchemaNavigator.py src/base/tools/SchemaViewer.py 2344@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fbase%2Ftools%2FSchemaViewer.py + src/base/Incubator.py 1368@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fbase%2FIncubator.py src/base/document.py 8929@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:src%2Fbase%2Fdocument.py Name: bzr:revision-id:v4 - 937 reinhard.muel...@bytewise.at-20100426083744-iq5ahvdxf38ltx6r 938 whizman_software_solutions_www.whizman.com-20110131201023-bmx4kgkf4erlim85 939 whizman_software_solutions_www.whizman.com-20110226005239-cn6eioyybe5p62rh 940 whizman-20110504201148-w669gtbff176vhop 941 whizman-20110505231025-243w4sfxhzqcbzt2 942 whizman-20110509181949-gnbxobve89qk8pr5 943 whizman-20110509204654-xx9cb9tiuszib409 944 whizman-20110519181636-ighctsn5h1uftknz 945 whizman-20110527230256-kqjr2eb33a29zy9o 946 whizman-20110527235820-zqeownp0345308ww + 937 reinhard.muel...@bytewise.at-20100426083744-iq5ahvdxf38ltx6r 938 whizman_software_solutions_www.whizman.com-20110131201023-bmx4kgkf4erlim85 939 whizman_software_solutions_www.whizman.com-20110226005239-cn6eioyybe5p62rh 940 whizman-20110504201148-w669gtbff176vhop 941 whizman-20110505231025-243w4sfxhzqcbzt2 942 whizman-20110509181949-gnbxobve89qk8pr5 943 whizman-20110509204654-xx9cb9tiuszib409 944 whizman-20110519181636-ighctsn5h1uftknz 945 whizman-20110527230256-kqjr2eb33a29zy9o 946 whizman-20110527235820-zqeownp0345308ww 947 whizman-20110601222222-rvg8tu47q0x6y6rf Name: bzr:text-parents - src/base/TemplateBase.py svn-v3-single1-dHJ1bmsvZ251ZS1kZXNpZ25lcg..:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:9955 src/base/tools/SchemaNavigator.py svn-v3-single1-dHJ1bmsvZ251ZS1kZXNpZ25lcg..:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:9955 src/base/tools/SchemaViewer.py svn-v3-single1-dHJ1bmsvZ251ZS1kZXNpZ25lcg..:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-designer:9955 + src/base/Incubator.py whizman-20110527230256-kqjr2eb33a29zy9o Modified: trunk/gnue-designer/src/base/Incubator.py =================================================================== --- trunk/gnue-designer/src/base/Incubator.py 2011-06-18 09:17:56 UTC (rev 10323) +++ trunk/gnue-designer/src/base/Incubator.py 2011-06-18 09:17:58 UTC (rev 10324) @@ -95,7 +95,7 @@ # AttributeError: "'GFDataSource' object has no attribute 'dispatch_designer_event'" # chicken-and-egg circular-precondition with BaseDocument.__object_created_event # o.dispatch_designer_event('ObjectCreated') - self.document.onAddedObject(o) + self.document.dispatch_event('ObjectCreated', object=o, originator=__name__) if select: o.dispatch_designer_event('ObjectSelected') return o Modified: trunk/gnue-designer/src/base/document.py =================================================================== --- trunk/gnue-designer/src/base/document.py 2011-06-18 09:17:56 UTC (rev 10323) +++ trunk/gnue-designer/src/base/document.py 2011-06-18 09:17:58 UTC (rev 10324) @@ -247,7 +247,7 @@ self.ui.setTitle( u_("Untitled %s*") % self.properties.nickname) else: self.ui.setTitle(self._path + "*") - self.dispatchEvent('MakeDirty') + self.dispatch_event('MakeDirty') # Mark our form as "clean" (no unsaved changes) @@ -258,7 +258,7 @@ self.ui.setTitle( u_("Untitled %s") % self.properties.nickname) else: self.ui.setTitle( self._path) - self.dispatchEvent('MakeClean') + self.dispatch_event('MakeClean') # --------------------------------------------------------------- @@ -332,15 +332,7 @@ self.objectLists[tag] = list return list - # --------------------------------------------------------------- - # On-add-object method needs be called before attr dispatch_designer_event - # --------------------------------------------------------------- - def onAddedObject(self, object): - # See __object_created_event, BaseIncubator.createObject - self.__inventory(object) - self.makeDirty() - # ================================================================ # Private functions # ================================================================ @@ -489,14 +481,14 @@ # TODO: for actions we've yet to implement for action in ('RequestRevert','RequestRedo','RequestCopy', 'RequestPaste','RequestPasteSpecial','RequestCut'): - self.dispatchEvent('Disable:%s' % action) + self.dispatch_event('Disable:%s' % action) # Add ourselve to the main app's instance list self.app.addDocument(self) - self.dispatchEvent('ObjectSelected', originator=self, + self.dispatch_event('ObjectSelected', originator=self, object=self.rootObject) # Inventory the objects @@ -711,8 +703,8 @@ conn = event.connection try: tempDO = self.connections.getConnection(conn, 'object') - self.dispatchEvent('ConnectionEstablished',connection=conn) - self.dispatchEvent('Disable:Connect:%s' % conn) + self.dispatch_event('ConnectionEstablished',connection=conn) + self.dispatch_event('Disable:Connect:%s' % conn) except: print u_("Unable to connect to %s") % conn @@ -780,7 +772,7 @@ self.app.mru.removeMenu( self.menubar.getMenu('File|Open Recent|'), self) self.app.removeDocument(self) - self.dispatchEvent('DocumentClosing') + self.dispatch_event('DocumentClosing') self.ui.close() @@ -849,11 +841,11 @@ will automatically cause ObjectModified events to fire. Also, add a .dispatch_designer_event method that calls the - Document.dispatchEvent method, automatically passing in + Document.dispatch_event method, automatically passing in object=self """ - object._dispatch_designer_event = document.dispatchEvent + object._dispatch_designer_event = document.dispatch_event object.dispatch_designer_event = new.instancemethod( _gobject_dispatch_event, object, object.__class__) object._setItemHook = new.instancemethod(_gobject_set_item_hook, _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org https://lists.gnu.org/mailman/listinfo/commit-gnue