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()
    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)