def __init__(self, parent): super(type(self), self).__init__(parent) self.ACTIONS_COMBOBOX_WIDTH = 200 self._actions = [ (_(u'Insert link'), AttachConfig.ACTION_INSERT_LINK), (_(u'Open file'), AttachConfig.ACTION_OPEN), ] self._config = AttachConfig(Application.config) self._createGui()
def __onDoubleClick(self, event): config = AttachConfig(Application.config) if config.doubleClickAction.value == AttachConfig.ACTION_INSERT_LINK: self.__pasteLink() elif config.doubleClickAction.value == AttachConfig.ACTION_OPEN: self.__executeFile()