This commit is contained in:
Kovid Goyal 2010-08-19 12:04:15 -06:00
parent 8da3be6284
commit 88618d085c
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ __license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
from PyQt4.Qt import QMenu from PyQt4.Qt import QMenu, QToolButton
from calibre.gui2.actions import InterfaceAction from calibre.gui2.actions import InterfaceAction
@ -14,6 +14,7 @@ class CopyToLibraryAction(InterfaceAction):
name = 'Copy To Library' name = 'Copy To Library'
action_spec = (_('Copy to library'), 'lt.png', action_spec = (_('Copy to library'), 'lt.png',
_('Copy selected books to the specified library'), None) _('Copy selected books to the specified library'), None)
popup_type = QToolButton.InstantPopup
def genesis(self): def genesis(self):
self.menu = QMenu(self.gui) self.menu = QMenu(self.gui)

View File

@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
from functools import partial from functools import partial
from PyQt4.Qt import QMenu from PyQt4.Qt import QMenu, QToolButton
from calibre.gui2.actions import InterfaceAction from calibre.gui2.actions import InterfaceAction
@ -15,6 +15,7 @@ class SimilarBooksAction(InterfaceAction):
name = 'Similar Books' name = 'Similar Books'
action_spec = (_('Similar books...'), None, None, None) action_spec = (_('Similar books...'), None, None, None)
popup_type = QToolButton.InstantPopup
def genesis(self): def genesis(self):
m = QMenu(self.gui) m = QMenu(self.gui)