mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:25:41 +02:00
Dont show an error message when trying to use quick open with no book open
This commit is contained in:
parent
905e1b5e86
commit
3cb0d29170
1 changed files with 3 additions and 0 deletions
|
|
@ -1093,6 +1093,9 @@ def edit_file_requested(self, name, syntax, mime):
|
|||
|
||||
def quick_open(self):
|
||||
c = current_container()
|
||||
if c is None:
|
||||
return error_dialog(self.gui, _('No open book'), _(
|
||||
'No book is currently open. You must first open a book to edit.'), show=True)
|
||||
files = [name for name, mime in c.mime_map.iteritems() if c.exists(name) and syntax_from_mime(name, mime) is not None]
|
||||
d = QuickOpen(files, parent=self.gui)
|
||||
if d.exec_() == d.Accepted and d.selected_result is not None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue