Quote:
Originally Posted by feuille
Code:
d = error_dialog(self.gui, 'MyGuiPlugin', _('No book selected!'))
d.exec()
|
I usually do it like this:
Code:
from calibre.gui2 import error_dialog
def some_function():
do_stuff
if some_condition:
return error_dialog(self.gui, 'MyGuiPlugin', _('No book selected!'), show_copy_button=False, show=True)
This will exit some_function.