Пример #1
0
 def OnCopy(self, event):
     gotClipboard = wx.TheClipboard.Open()
     if gotClipboard:
         share = sharing.getShare(self.collection)
         urlString = (os.linesep * 2).join(sharing.getLabeledUrls(share))
         wx.TheClipboard.SetData(wx.TextDataObject(unicode(urlString)))
         wx.TheClipboard.Close()
Пример #2
0
    def update(self, tryToFetch=True):
        share = sharing.getShare(self.collection)

        if tryToFetch:
            url = share.getLocation(privilege='ticketdiscovery')
            self.CopyButton.Enable(False)
            urlText = ''
            self.getInviteURLs(share, url)
        else:
            urlText = _(u"Give out the URL(s) below to invite others to "
                         "subscribe to '%(collection)s':") % {
                            'collection' : self.collection.displayName
                        }
            urlString = (os.linesep * 2).join(sharing.getLabeledUrls(share))

            urlText = "%s%s%s" % (urlText, (os.linesep * 2), urlString)

            self.CopyButton.Enable(True)
            
        self._setURLText(urlText)