mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Nicer error message when clicking new file if no book has been opened.
This commit is contained in:
parent
6c0269b940
commit
cd01049c6e
@ -201,6 +201,11 @@ class Boss(QObject):
|
||||
editors[c.opf_name].replace_data(c.raw_data(c.opf_name))
|
||||
|
||||
def add_file(self):
|
||||
if current_container() is None:
|
||||
return error_dialog(self.gui, _('No open book'), _(
|
||||
'You must first open a book to tweak, before trying to create new files'
|
||||
' in it.'), show=True)
|
||||
|
||||
if not self.check_opf_dirtied():
|
||||
return
|
||||
d = NewFileDialog(self.gui)
|
||||
|
Loading…
x
Reference in New Issue
Block a user