def trigger_configuration(self):
     (text, ok) = QInputDialog.getText(self._widget,
         'Settings for %s' % self._widget.windowTitle(),
         'Command to edit launch files (vim, gedit, ...), can accept args:',
         text = self._widget.editor
     )
     if ok:
         self._widget.editor = text
 def paste_from_clipboard(self):
     '''
     Copy the file or folder to new position...
     '''
     if QApplication.clipboard().mimeData().hasText() and self.currentPath:
         text = QApplication.clipboard().mimeData().text()
         if text.startswith('file://'):
             path = text.replace('file://', '')
             basename = os.path.basename(text)
             ok = True
             if os.path.exists(os.path.join(self.currentPath, basename)):
                 basename, ok = QInputDialog.getText(None, 'File exists', 'New name (or override):', QLineEdit.Normal, basename)
             if ok and basename:
                 if os.path.isdir(path):
                     shutil.copytree(path, os.path.join(self.currentPath, basename))
                 elif os.path.isfile(path):
                     shutil.copy2(path, os.path.join(self.currentPath, basename))
                 self.reloadCurrentPath()
 def paste_from_clipboard(self):
     '''
     Copy the file or folder to new position...
     '''
     if QApplication.clipboard().mimeData().hasText() and self.currentPath:
         text = QApplication.clipboard().mimeData().text()
         if text.startswith('file://'):
             path = text.replace('file://', '')
             basename = os.path.basename(text)
             ok = True
             if os.path.exists(os.path.join(self.currentPath, basename)):
                 basename, ok = QInputDialog.getText(None, 'File exists', 'New name (or override):', QLineEdit.Normal, basename)
             if ok and basename:
                 if os.path.isdir(path):
                     shutil.copytree(path, os.path.join(self.currentPath, basename))
                 elif os.path.isfile(path):
                     shutil.copy2(path, os.path.join(self.currentPath, basename))
                 self.reloadCurrentPath()