示例#1
0
 def __init__(self, parent, *args, **kwargs):
     """"""
     AddonCore.__init__(self)
     self.name = _("Clipboard")
     self.event_id = None
     self.clipboard_monitor = Clipboard(parent)
     self.parent = parent
     self.config = conf
示例#2
0
 def __init__(self, parent, *args, **kwargs):
     """"""
     AddonCore.__init__(self)
     self.name = _("Clipboard")
     self.event_id = None
     self.clipboard_monitor = Clipboard(parent)
     self.parent = parent
     self.config = conf
示例#3
0
class Addon(AddonCore):
    """"""
    def __init__(self, parent, *args, **kwargs):
        """"""
        AddonCore.__init__(self)
        self.name = _("Clipboard")
        self.event_id = None
        self.clipboard_monitor = Clipboard(parent)
        self.parent = parent
        self.config = conf
    
    def set_menu_item(self):
        self.action = self.parent.menu.addAction(_("Clipboard watcher"), self.on_toggle) #can toggle
        self.action.setCheckable(True)
        if self.config.get_clipboard_active():
            self.action.setChecked(True)
            self.clipboard_monitor.enable()

    def get_preferences(self):
        """"""
        return Preferences()
    
    def on_toggle(self):
        if self.action.isChecked(): #se activo
            self.config.set_clipboard_active("True")
            self.clipboard_monitor.enable()
        else:
            self.config.set_clipboard_active("False")
            self.clipboard_monitor.disable()
示例#4
0
class Addon(AddonCore):
    """"""
    def __init__(self, parent, *args, **kwargs):
        """"""
        AddonCore.__init__(self)
        self.name = _("Clipboard")
        self.event_id = None
        self.clipboard_monitor = Clipboard(parent)
        self.parent = parent
        self.config = conf

    def set_menu_item(self):
        self.action = self.parent.menu.addAction(_("Clipboard watcher"),
                                                 self.on_toggle)  #can toggle
        self.action.setCheckable(True)
        if self.config.get_clipboard_active():
            self.action.setChecked(True)
            self.clipboard_monitor.enable()

    def get_preferences(self):
        """"""
        return Preferences()

    def on_toggle(self):
        if self.action.isChecked():  #se activo
            self.config.set_clipboard_active("True")
            self.clipboard_monitor.enable()
        else:
            self.config.set_clipboard_active("False")
            self.clipboard_monitor.disable()
示例#5
0
 def __init__(self, parent, *args, **kwargs):
     """"""
     AddonCore.__init__(self, parent)
     self.name = _("Clipboard")
     self.clipboard_monitor = Clipboard()