[Commits] (morgen) Publish collections even if no invitees given in dialog

commits at osafoundation.org commits at osafoundation.org
Wed Aug 25 16:03:28 PDT 2004


Commit by: morgen
Modified files:
chandler/application/dialogs/PublishCollection.py 1.3 1.4

Log message:
Publish collections even if no invitees given in dialog


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/application/dialogs/PublishCollection.py.diff?r1=text&tr1=1.3&r2=text&tr2=1.4

Index: chandler/application/dialogs/PublishCollection.py
diff -u chandler/application/dialogs/PublishCollection.py:1.3 chandler/application/dialogs/PublishCollection.py:1.4
--- chandler/application/dialogs/PublishCollection.py:1.3	Wed Aug 25 15:34:02 2004
+++ chandler/application/dialogs/PublishCollection.py	Wed Aug 25 16:03:27 2004
@@ -20,7 +20,7 @@
         self.collection = collection
 
         self.urlLabel = wx.xrc.XRCCTRL(self, "ID_URL_LABEL")
-        self.urlLabel.SetLabel("Publish Collection '%s' to:" % \
+        self.urlLabel.SetLabel("Publish collection '%s' to:" % \
          collection.displayName)
 
         self.urlText = wx.xrc.XRCCTRL(self, "ID_URL")
@@ -42,26 +42,29 @@
         invitees = self.inviteesText.GetValue()
         if invitees:
             invitees = invitees.split(",")
-            bad_addrs = []
+            badAddresses = []
 
             for invitee in invitees:
                 if not osaf.mail.message.isValidEmailAddress(invitee):
-                    bad_addrs.append(invitee)
+                    badAddresses.append(invitee)
 
-            size = len(bad_addrs)
+            size = len(badAddresses)
 
             if size > 0:
                 a = size > 1 and "addresses" or "address"
-                self.waitLabel.SetLabel("Invalid %s: %s" % (a, ', '.join(bad_addrs)))
+                self.waitLabel.SetLabel("Invalid %s: %s" % \
+                 (a, ', '.join(badAddresses)))
                 return
 
-            url = self.urlText.GetValue()
-            self.waitLabel.SetLabel("Publishing, Please Wait...")
+        url = self.urlText.GetValue()
+        self.waitLabel.SetLabel("Publishing, Please Wait...")
 
-            osaf.framework.webdav.Dav.DAV(url).put(self.collection)
+        osaf.framework.webdav.Dav.DAV(url).put(self.collection)
+
+        if invitees:
             osaf.mail.sharing.sendInvitation(url, invitees)
 
-            self.EndModal(True)
+        self.EndModal(True)
 
     def OnCancel(self, evt):
         self.EndModal(False)



More information about the Commits mailing list