Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def copyLink(self, widget, fileNumber, linkType=-1):
     """copy link to clipboard"""
     if linkType < 0:
         linkType = widget.get_active()
     copyToClipBoard(None, self.links[fileNumber][linkType])