mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Show an error message if the user tries to edit books on the device instead of editing the last selected book in the library
This commit is contained in:
parent
26656583fc
commit
5da59094c9
@ -97,6 +97,9 @@ class TweakEpubAction(InterfaceAction):
|
|||||||
self.do_tweak(book_id)
|
self.do_tweak(book_id)
|
||||||
|
|
||||||
def do_tweak(self, book_id):
|
def do_tweak(self, book_id):
|
||||||
|
if self.gui.current_view() is not self.gui.library_view:
|
||||||
|
return error_dialog(self.gui, _('Cannot Edit Book'), _(
|
||||||
|
'Editing of books on the device is not supported'), show=True)
|
||||||
from calibre.ebooks.oeb.polish.main import SUPPORTED
|
from calibre.ebooks.oeb.polish.main import SUPPORTED
|
||||||
db = self.gui.library_view.model().db
|
db = self.gui.library_view.model().db
|
||||||
fmts = db.formats(book_id, index_is_id=True) or ''
|
fmts = db.formats(book_id, index_is_id=True) or ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user