[Commits] (morgen) Adding a Sync Collection menu item

commits at osafoundation.org commits at osafoundation.org
Mon Aug 23 16:28:04 PDT 2004


Commit by: morgen
Modified files:
chandler/parcels/osaf/views/main/Main.py 1.40 1.41
chandler/parcels/osaf/views/main/parcel.xml 1.90 1.91

Log message:
Adding a Sync Collection menu item


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/views/main/Main.py.diff?r1=text&tr1=1.40&r2=text&tr2=1.41
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/views/main/parcel.xml.diff?r1=text&tr1=1.90&r2=text&tr2=1.91

Index: chandler/parcels/osaf/views/main/Main.py
diff -u chandler/parcels/osaf/views/main/Main.py:1.40 chandler/parcels/osaf/views/main/Main.py:1.41
--- chandler/parcels/osaf/views/main/Main.py:1.40	Mon Aug 23 12:32:39 2004
+++ chandler/parcels/osaf/views/main/Main.py	Mon Aug 23 16:28:03 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.40 $"
-__date__ = "$Date: 2004/08/23 19:32:39 $"
+__version__ = "$Revision: 1.41 $"
+__date__ = "$Date: 2004/08/23 23:28:03 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -220,6 +220,12 @@
         if collection is not None:
             osaf.framework.sharing.Sharing.manualPublishCollection(collection)
 
+    def onSyncCollectionEvent (self, notification):
+        # Triggered from "Test | Sync collection..."
+        collection = self.getSidebarSelectedCollection ()
+        if collection is not None:
+            osaf.framework.sharing.Sharing.syncCollection(collection)
+
     def onShareCollectionEventUpdateUI (self, notification):
         """
         Update the menu to reflect the selected collection name

Index: chandler/parcels/osaf/views/main/parcel.xml
diff -u chandler/parcels/osaf/views/main/parcel.xml:1.90 chandler/parcels/osaf/views/main/parcel.xml:1.91
--- chandler/parcels/osaf/views/main/parcel.xml:1.90	Thu Aug 19 11:27:55 2004
+++ chandler/parcels/osaf/views/main/parcel.xml	Mon Aug 23 16:28:03 2004
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<!-- $Revision: 1.90 $ -->
-<!-- $Date: 2004/08/19 18:27:55 $ -->
+<!-- $Revision: 1.91 $ -->
+<!-- $Date: 2004/08/23 23:28:03 $ -->
 <!-- Copyright (c) 2003 Open Source Applications Foundation -->
 <!-- License: http://osafoundation.org/Chandler_0.1_license_terms.htm -->
 
@@ -152,6 +152,11 @@
     <dispatchToBlock itemref="doc:MainView"/>
   </BlockEvent>
   
+  <BlockEvent itsName="SyncCollection">
+    <dispatchEnum>SendToBlock</dispatchEnum>
+    <dispatchToBlock itemref="doc:MainView"/>
+  </BlockEvent>
+  
   <ModifyContentsEvent itsName="AddAllAdditionalViews">
     <dispatchEnum>SendToBlock</dispatchEnum>
     <dispatchToBlock itemref="doc:Sidebar"/>
@@ -321,6 +326,7 @@
     <childrenBlocks itemref="doc:ImportContactItem"/>
     <childrenBlocks itemref="doc:SharingSubscribeToCollectionItem"/>
     <childrenBlocks itemref="doc:ShareCollectionItem"/>
+    <childrenBlocks itemref="doc:SyncCollectionItem"/>
     <childrenBlocks itemref="doc:GetNewMailItem"/>
     <childrenBlocks itemref="doc:CheckRepositoryItem"/>
     <childrenBlocks itemref="doc:ShowPyCrustItem"/>
@@ -838,6 +844,13 @@
     <helpString>Enable sharing a collection</helpString>
   </MenuItem>
 
+  <MenuItem itsName="SyncCollectionItem">
+    <blockName>SyncCollectionItem</blockName>
+    <title>Sync collection</title>
+    <event itemref="doc:SyncCollection"/>
+    <helpString>Synchronize a shared collection</helpString>
+  </MenuItem>
+
   <MenuItem itsName="SharingSubscribeToCollectionItem">
     <blockName>SharingSubscribeToCollection</blockName>
     <title>Subscribe to Collection...</title>
@@ -1485,6 +1498,7 @@
     <subscribeWhenVisibleEvents itemref="doc:NewNote"/>
     <subscribeWhenVisibleEvents itemref="doc:NewContact"/>
     <subscribeWhenVisibleEvents itemref="doc:ShareCollection"/>
+    <subscribeWhenVisibleEvents itemref="doc:SyncCollection"/>
 
     <!-- Attributes -->
     <orientationEnum>Vertical</orientationEnum>



More information about the Commits mailing list