Beispiel #1
0
 def __init__(self, gui, quickview_manager):
     self.qv = quickview_manager
     qaction = quickview_manager.qaction
     LayoutButton.__init__(self, I('quickview.png'), _('Quickview'),
                           parent=gui, shortcut=qaction.shortcut().toString())
     self.toggled.connect(self.update_state)
     self.action_toggle = qaction
     self.action_toggle.triggered.connect(self.toggle)
     self.action_toggle.changed.connect(self.update_shortcut)
Beispiel #2
0
 def __init__(self, gui):
     sc = 'Shift+Alt+G'
     LayoutButton.__init__(self, I('grid.png'), _('Cover Grid'), parent=gui, shortcut=sc)
     self.set_state_to_show()
     self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
     gui.addAction(self.action_toggle)
     gui.keyboard.register_shortcut('grid view toggle' + self.label, unicode(self.action_toggle.text()),
                                 default_keys=(sc,), action=self.action_toggle)
     self.action_toggle.triggered.connect(self.toggle)
     self.toggled.connect(self.update_state)
Beispiel #3
0
 def __init__(self, gui):
     sc = 'Shift+Alt+G'
     LayoutButton.__init__(self, I('grid.png'), _('Cover Grid'), parent=gui, shortcut=sc)
     self.set_state_to_show()
     self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
     gui.addAction(self.action_toggle)
     gui.keyboard.register_shortcut('grid view toggle' + self.label, unicode(self.action_toggle.text()),
                                 default_keys=(sc,), action=self.action_toggle)
     self.action_toggle.triggered.connect(self.toggle)
     self.toggled.connect(self.update_state)
Beispiel #4
0
 def __init__(self, gui):
     sc = 'Alt+Shift+F'
     LayoutButton.__init__(self, I('search.png'), _('Search bar'), parent=gui, shortcut=sc)
     self.set_state_to_hide()
     self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
     gui.addAction(self.action_toggle)
     gui.keyboard.register_shortcut('search bar toggle' + self.label, str(self.action_toggle.text()),
                                 default_keys=(sc,), action=self.action_toggle)
     self.action_toggle.triggered.connect(self.toggle)
     self.action_toggle.changed.connect(self.update_shortcut)
     self.toggled.connect(self.update_state)
Beispiel #5
0
 def __init__(self, gui):
     sc = 'Alt+Shift+F'
     LayoutButton.__init__(self, I('search.png'), _('Search bar'), parent=gui, shortcut=sc)
     self.set_state_to_show()
     self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
     gui.addAction(self.action_toggle)
     gui.keyboard.register_shortcut('search bar toggle' + self.label, unicode(self.action_toggle.text()),
                                 default_keys=(sc,), action=self.action_toggle)
     self.action_toggle.triggered.connect(self.toggle)
     self.action_toggle.changed.connect(self.update_shortcut)
     self.toggled.connect(self.update_state)
Beispiel #6
0
 def __init__(self, gui, quickview_manager):
     self.qv = quickview_manager
     qaction = quickview_manager.qaction
     LayoutButton.__init__(self,
                           I('quickview.png'),
                           _('Quickview'),
                           parent=gui,
                           shortcut=qaction.shortcut().toString())
     self.toggled.connect(self.update_state)
     self.action_toggle = qaction
     self.action_toggle.triggered.connect(self.toggle)
     self.action_toggle.changed.connect(self.update_shortcut)
Beispiel #7
0
 def __init__(self, gui):
     sc = _('Shift+Alt+G')
     LayoutButton.__init__(self, I('grid.png'), _('Cover Grid'), parent=gui, shortcut=sc)
     if tweaks.get('use_new_db', False):
         self.set_state_to_show()
         self.action_toggle = QAction(self.icon(), _('Toggle') + ' ' + self.label, self)
         gui.addAction(self.action_toggle)
         gui.keyboard.register_shortcut('grid view toggle' + self.label, unicode(self.action_toggle.text()),
                                     default_keys=(sc,), action=self.action_toggle)
         self.action_toggle.triggered.connect(self.toggle)
         self.toggled.connect(self.update_state)
         self.grid_enabled = True
     else:
         self.setVisible(False)
         self.grid_enabled = False
Beispiel #8
0
 def __init__(self, gui):
     sc = _('Shift+Alt+G')
     LayoutButton.__init__(self,
                           I('grid.png'),
                           _('Cover Grid'),
                           parent=gui,
                           shortcut=sc)
     if tweaks.get('use_new_db', False):
         self.set_state_to_show()
         self.action_toggle = QAction(self.icon(),
                                      _('Toggle') + ' ' + self.label, self)
         gui.addAction(self.action_toggle)
         gui.keyboard.register_shortcut('grid view toggle' + self.label,
                                        unicode(self.action_toggle.text()),
                                        default_keys=(sc, ),
                                        action=self.action_toggle)
         self.action_toggle.triggered.connect(self.toggle)
         self.toggled.connect(self.update_state)
         self.grid_enabled = True
     else:
         self.setVisible(False)
         self.grid_enabled = False