Commit by: john Modified files: chandler/parcels/osaf/framework/sharing/ShareTool.py 1.7 1.8 chandler/parcels/osaf/framework/blocks/parcel.xml 1.141 1.142 chandler/parcels/osaf/views/main/parcel.xml 1.152 1.153
Log message: * ShareTool can now add item collections to the sidebar ViewCVS links: http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/ShareTool.py.diff?r1=text&tr1=1.7&r2=text&tr2=1.8 http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/parcel.xml.diff?r1=text&tr1=1.141&r2=text&tr2=1.142 http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/views/main/parcel.xml.diff?r1=text&tr1=1.152&r2=text&tr2=1.153 Index: chandler/parcels/osaf/framework/sharing/ShareTool.py diff -u chandler/parcels/osaf/framework/sharing/ShareTool.py:1.7 chandler/parcels/osaf/framework/sharing/ShareTool.py:1.8 --- chandler/parcels/osaf/framework/sharing/ShareTool.py:1.7 Mon Jan 24 16:07:19 2005 +++ chandler/parcels/osaf/framework/sharing/ShareTool.py Mon Jan 24 16:38:54 2005 @@ -97,29 +97,13 @@ resources=self.resources, view=self.view, join=True) if share is not None: share.get() - - # @@@MOR apparently the sidebar code has changed. the following - # doesn't work: - """ - # Add the collection to the sidebar by... - event = self.view.findPath("//parcels/osaf/views/main/NewItemCollection") - args = { 'collection' : share.contents } - # ...creating a new view (which gets returned as args['view'])... - event.Post(args) - self.view.commit() - # ...and selecting that view in the sidebar - Globals.mainView.selectView(args['view'], showInDetailView=share.contents) - - # Here's my best guess about how it should work, although I couldn't figure out - # how to test it -- DJA collection = share.contents mainView = Globals.views[0] - mainView.postEventByName ("AddToSidebar", {'items':[collection]}) + mainView.postEventByName ("AddToSidebarWithoutCopying", {'items':[collection]}) self.view.commit() # ...and selecting that view in the sidebar mainView.postEventByName('RequestSelectSidebarItem', {'item':collection}) mainView.postEventByName ('SelectItemBroadcastInsideActiveView', {'item':collection}) - """ self._populateSharesList() def OnEditShare(self, evt): Index: chandler/parcels/osaf/framework/blocks/parcel.xml diff -u chandler/parcels/osaf/framework/blocks/parcel.xml:1.141 chandler/parcels/osaf/framework/blocks/parcel.xml:1.142 --- chandler/parcels/osaf/framework/blocks/parcel.xml:1.141 Mon Jan 24 14:40:05 2005 +++ chandler/parcels/osaf/framework/blocks/parcel.xml Mon Jan 24 16:38:54 2005 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.141 $ --> -<!-- $Date: 2005/01/24 22:40:05 $ --> +<!-- $Revision: 1.142 $ --> +<!-- $Date: 2005/01/25 00:38:54 $ --> <!-- Copyright (c) 2003-2005 Open Source Applications Foundation --> <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm --> @@ -261,7 +261,7 @@ <Attribute itsName="items"> <type itemref="SingleRef"/> <cardinality>list</cardinality> - <required>True</required> + <initialValue /> </Attribute> <Enumeration itsName="operationType"> Index: chandler/parcels/osaf/views/main/parcel.xml diff -u chandler/parcels/osaf/views/main/parcel.xml:1.152 chandler/parcels/osaf/views/main/parcel.xml:1.153 --- chandler/parcels/osaf/views/main/parcel.xml:1.152 Mon Jan 24 15:49:29 2005 +++ chandler/parcels/osaf/views/main/parcel.xml Mon Jan 24 16:38:54 2005 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.152 $ --> -<!-- $Date: 2005/01/24 23:49:29 $ --> +<!-- $Revision: 1.153 $ --> +<!-- $Date: 2005/01/25 00:38:54 $ --> <!-- Copyright (c) 2003-2004 Open Source Applications Foundation --> <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm --> @@ -28,11 +28,12 @@ Block Events --> - <ModifyContentsEvent itsName="AddToSidebar"> - <blockName>AddToSidebar</blockName> + <ModifyContentsEvent itsName="AddToSidebarWithoutCopying"> + <blockName>AddToSidebarWithoutCopying</blockName> <methodName>onModifyContentsEvent</methodName> <dispatchEnum>SendToBlockByName</dispatchEnum> <dispatchToBlockName>Sidebar</dispatchToBlockName> + <copyItems>False</copyItems> </ModifyContentsEvent> <BlockEvent itsName="EditAccountPreferences"> @@ -1606,6 +1607,7 @@ <eventsForNamedDispatch itemref="doc:RequestSelectSidebarItem"/> <eventsForNamedDispatch itemref="doc:SendMail"/> <eventsForNamedDispatch itemref="doc:ShareItem"/> + <eventsForNamedDispatch itemref="doc:AddToSidebarWithoutCopying"/> <orientationEnum>Vertical</orientationEnum> <size>1024,720</size> @@ -1629,7 +1631,7 @@ <eventsForNamedDispatch itemref="doc:RequestSelectSidebarItem"/> <eventsForNamedDispatch itemref="doc:SendMail"/> <eventsForNamedDispatch itemref="doc:ShareItem"/> - <eventsForNamedDispatch itemref="doc:AddToSidebar"/> + <eventsForNamedDispatch itemref="doc:AddToSidebarWithoutCopying"/> <orientationEnum>Vertical</orientationEnum> <size>1024,720</size> _______________________________________________ Commits mailing list Commits@osafoundation.org http://lists.osafoundation.org/mailman/listinfo/commits