View Single Post
Old 08-29-2011, 03:20 PM   #24
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thanks. I need to think about this a bit more.

For instance, say I have an action with a default keyboard shortcut. It is almost as if I should be calling register_shortcut completely independently of creating the menu item. Because the first time I create the menu item, I will want along the way to register my default. However the second time I create the menu item (after the app has started up), I don't want a shortcut specified, because the keyboard manager should be managing it after a replace_action() call. Is that how you see it?

Also, how do I handle the situation of an action which no longer should exist? (Such as a user deleting the list example above). Presumably the keyboard manager is still holding a reference to this in it's shortcuts dictionary.
kiwidude is offline   Reply With Quote