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:
Kovid Goyal 2017-06-19 11:46:59 +05:30
parent a5414ff115
commit 263e3fee5f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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'))