mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'all-actions-all-menu' of https://github.com/un-pogaz/calibre
This commit is contained in:
commit
60bc1b2b68
@ -125,7 +125,7 @@ class AllGUIActions(InterfaceAction):
|
|||||||
menu_text = f'{display_name}{shortcuts}'
|
menu_text = f'{display_name}{shortcuts}'
|
||||||
icon = name_data[display_name]['icon']
|
icon = name_data[display_name]['icon']
|
||||||
if act.popup_type == QToolButton.ToolButtonPopupMode.MenuButtonPopup:
|
if act.popup_type == QToolButton.ToolButtonPopupMode.MenuButtonPopup:
|
||||||
if act.action_add_menu:
|
if act.action_add_menu or act.qaction.menu() and act.qaction.menu().children():
|
||||||
# The action offers both a 'click' and a menu. Use the menu.
|
# The action offers both a 'click' and a menu. Use the menu.
|
||||||
menu.addAction(icon, menu_text, partial(self._do_menu, display_name, act))
|
menu.addAction(icon, menu_text, partial(self._do_menu, display_name, act))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user