[Commits] (morgen) Added a dialog which allows the user to specify
a url to publish a collection
commits at osafoundation.org
commits at osafoundation.org
Mon Aug 23 13:35:49 PDT 2004
Commit by: morgen
Modified files:
chandler/parcels/osaf/framework/sharing/Sharing.py 1.2 1.3
chandler/parcels/osaf/framework/webdav/Sync.py 1.10 1.11
Log message:
Added a dialog which allows the user to specify a url to publish a collection
to.
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/sharing/Sharing.py.diff?r1=text&tr1=1.2&r2=text&tr2=1.3
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/webdav/Sync.py.diff?r1=text&tr1=1.10&r2=text&tr2=1.11
Index: chandler/parcels/osaf/framework/webdav/Sync.py
diff -u chandler/parcels/osaf/framework/webdav/Sync.py:1.10 chandler/parcels/osaf/framework/webdav/Sync.py:1.11
--- chandler/parcels/osaf/framework/webdav/Sync.py:1.10 Fri Aug 20 11:20:26 2004
+++ chandler/parcels/osaf/framework/webdav/Sync.py Mon Aug 23 13:35:48 2004
@@ -126,8 +126,8 @@
elif acard == 'single':
if isinstance(value, Item):
- defaultURL = dav.url.join(i.itsUUID.str16())
- durl = i.getAttributeValue('sharedURL', default=defaultURL)
+ defaultURL = dav.url.join(value.itsUUID.str16())
+ durl = value.getAttributeValue('sharedURL', default=defaultURL)
DAV(durl).put(value)
props += makePropString(name, namespace, '<itemref>%s</itemref>' % (unicode(durl)))
else:
Index: chandler/parcels/osaf/framework/sharing/Sharing.py
diff -u chandler/parcels/osaf/framework/sharing/Sharing.py:1.2 chandler/parcels/osaf/framework/sharing/Sharing.py:1.3
--- chandler/parcels/osaf/framework/sharing/Sharing.py:1.2 Mon Aug 23 12:32:38 2004
+++ chandler/parcels/osaf/framework/sharing/Sharing.py Mon Aug 23 13:35:47 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.2 $"
-__date__ = "$Date: 2004/08/23 19:32:38 $"
+__version__ = "$Revision: 1.3 $"
+__date__ = "$Date: 2004/08/23 20:35:47 $"
__copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -38,10 +38,6 @@
event.Post({'collection':collection})
Globals.repository.commit()
-def publishWebDavCollection(collection):
- """ Given a collection, tell the webdav subsystem to publish it, and
- return the url for it. """
- return ""
def sendInvites(addresses, url):
""" Tell the email subsystem to send a sharing invite to the given
@@ -68,11 +64,16 @@
def manualPublishCollection(collection):
print 'Share collection "%s"' % collection.displayName
- addresses = application.dialogs.Util.promptUser( \
+ url = application.dialogs.Util.promptUser( \
Globals.wxApplication.mainFrame, "Publish Collection...",
- "Email address to send invites: (comma separated)", "")
- url = publishWebDavCollection(collection)
- if addresses is not None:
- addresses = addresses.split(",")
- sendInvites(addresses, url)
+ "URL to publish collection to:",
+ "http://code-bear.com/dav/%s" % collection.itsUUID)
+ if url is not None:
+ addresses = application.dialogs.Util.promptUser( \
+ Globals.wxApplication.mainFrame, "Publish Collection...",
+ "Email address to send invites: (comma separated)", "")
+ osaf.framework.webdav.Dav.DAV(url).put(collection)
+ if addresses is not None:
+ addresses = addresses.split(",")
+ sendInvites(addresses, url)
More information about the Commits
mailing list