View Single Post
Old 11-16-2014, 02:55 PM   #18
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,760
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by JimmXinu View Post
For those following along at home, a bit more testing showed that what I posted before didn't work with calibre 2.9 and earlier. This, however, does appear to work in 2.9 and 1.48:

Code:
from calibre.constants import numeric_version as calibre_version
...
            for action in self.menu_actions:
                self.gui.keyboard.unregister_shortcut(action.calibre_shortcut_unique_name)
                # starting in calibre 2.10.0, actions are registers at
                # the top gui level for OSX' benefit.
                if calibre_version >= (2,10,0):
                    self.gui.removeAction(action)
            self.menu_actions = []

            # rebuild menus...

            self.gui.keyboard.finalize()
@JimmXinu - where is that code, in the PI or the core. If in the PI, which one and what source file ? And does it work for 2.10 ?

BR
BetterRed is offline