[Commits] (bkirsch) added fromAddress and collectionName to sharing
commits at osafoundation.org
commits at osafoundation.org
Fri Aug 27 12:22:43 PDT 2004
Commit by: bkirsch
Modified files:
chandler/parcels/osaf/framework/sharing/Sharing.py 1.10 1.11
Log message:
added fromAddress and collectionName to sharing
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/Sharing.py.diff?r1=text&tr1=1.10&r2=text&tr2=1.11
Index: chandler/parcels/osaf/framework/sharing/Sharing.py
diff -u chandler/parcels/osaf/framework/sharing/Sharing.py:1.10 chandler/parcels/osaf/framework/sharing/Sharing.py:1.11
--- chandler/parcels/osaf/framework/sharing/Sharing.py:1.10 Wed Aug 25 18:09:33 2004
+++ chandler/parcels/osaf/framework/sharing/Sharing.py Fri Aug 27 12:22:42 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.10 $"
-__date__ = "$Date: 2004/08/26 01:09:33 $"
+__version__ = "$Revision: 1.11 $"
+__date__ = "$Date: 2004/08/27 19:22:42 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -29,6 +29,10 @@
def _sharingUpdateCallback(self, notification):
# When we receive the event, display a dialog
url = notification.data['share']
+ collectionName = notification.data['name']
+ fromAddress = notification.data['from']
+ print "Received invite from %s; collection '%s' at %s" % (fromAddress,
+ collectionName, url)
collection = collectionFromSharedUrl(url)
if collection is not None:
application.dialogs.Util.showAlert( \
@@ -104,15 +108,17 @@
# Non-blocking methods that the mail thread can call to post events to the
# main thread:
-def announceSharingUrl(url):
+def announceSharingInvitation(url, collectionName, fromAddress):
""" Call this method to announce that an inbound sharing invitation has
arrived. This method is non-blocking. """
- def _announceSharingUrl(url):
+ def _announceSharingInvitation(url, collectionName, fromAddress):
event = Globals.parcelManager.lookup(SHARING, 'sharingUpdateEvent')
- event.Post( { 'share' : url } )
+ event.Post( { 'share' : url, 'name' : collectionName,
+ 'from' : fromAddress } )
- Globals.wxApplication.PostAsyncEvent(_announceSharingUrl, url)
+ Globals.wxApplication.PostAsyncEvent(_announceSharingInvitation, url,
+ collectionName, fromAddress)
def announceError(error):
""" Call this method to announce an error. This method is non-blocking. """
More information about the Commits
mailing list