def copyLink(self, widget, fileNumber, linkType=-1): """copies link with given fileNumber to clipboard. If linkType is negative type is fetched from widget""" #copyToClipBoard(None, self.links[fileNumber][widget.get_active()]) if linkType < 0: # 0 also give false linkType = widget.get_active() #get selected combo box item copyToClipBoard(None, self.links[fileNumber][linkType]) self.__pbars[fileNumber].set_text(_("copied to clipboard")) #somehow don't want to work with gtk lock, but works without it, no thread read from __pbars so that shouldn't be important
def copyAllLinks(self, widget, linkType=-1): """copies all links with selected widget type to clipboard""" if linkType < 0: # 0 also give false linkType = widget.get_active() # get selected combo box item allLinks = '' for link in self.links: if link: allLinks += link[linkType] + "\n" # to lazy for .join ;p copyToClipBoard(None, allLinks)
def copyLink(self, widget, fileNumber, linkType=-1): """copy link to clipboard""" if linkType < 0: linkType = widget.get_active() copyToClipBoard(None, self.links[fileNumber][linkType])