mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow adding the sort button to the main toolbars as well
Also change its icon to match that of the cover grid sort button
This commit is contained in:
parent
a5414ff115
commit
263e3fee5f
@ -28,13 +28,13 @@ class SortAction(QAction):
|
|||||||
class SortByAction(InterfaceAction):
|
class SortByAction(InterfaceAction):
|
||||||
|
|
||||||
name = 'Sort By'
|
name = 'Sort By'
|
||||||
action_spec = (_('Sort by'), 'arrow-up.png', _('Sort the list of books'), None)
|
action_spec = (_('Sort by'), 'sort.png', _('Sort the list of books'), None)
|
||||||
action_type = 'current'
|
action_type = 'current'
|
||||||
popup_type = QToolButton.InstantPopup
|
popup_type = QToolButton.InstantPopup
|
||||||
action_add_menu = True
|
action_add_menu = True
|
||||||
dont_add_to = frozenset([
|
dont_add_to = frozenset([
|
||||||
'toolbar', 'toolbar-device', 'context-menu-device', 'toolbar-child',
|
'toolbar-device', 'context-menu-device', 'menubar', 'menubar-device',
|
||||||
'menubar', 'menubar-device', 'context-menu-cover-browser'])
|
'context-menu-cover-browser'])
|
||||||
|
|
||||||
def genesis(self):
|
def genesis(self):
|
||||||
self.sorted_icon = QIcon(I('ok.png'))
|
self.sorted_icon = QIcon(I('ok.png'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user