View Single Post
Old 09-24-2011, 12:14 PM   #36
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
Hi Kovid,

I’ve been sitting here for over an hour experimenting trying to work out the cause of an issue and finally figured out the symptoms at least.

When my menu text that I pass into create_menu_action() starts with numeric digits (rather than alphabetic characters), AND if I have a triggered=xxx value assigned, then while everything works correctly, when I close Calibre it is taking around 30 seconds to actually exit the process (Win 7).

The text I am trying to display in the menu is “450(w) x 680(h)”
  • If I do not assign a triggered action to that menu item, it works fine.
  • If I set shortcut=False, it works fine
  • If I rename my menu item text to start with alphabetic characters, it works fine – ie. “New size: 450(w) x 680(h)”
Any ideas? The fact that setting shortcut=False alone avoids the problem implies it lies with some kind of interaction with the menu code. All the rest of my code is the same as other plugins. So I start calibre, click on the menu to drop it down (no need to click any items on it) then exit calibre. The main window closes immediately, but the process appears to take at least 30 secs to exit. As soon as I do one of those alternate workarounds above (of which only the third is workable albeit cosmetically undesired) then calibre exits in it's usual second or so.
kiwidude is offline   Reply With Quote