mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Suggest a filename when using the Save a Copy action
This commit is contained in:
parent
c1ef4b0294
commit
384678163a
@ -1037,8 +1037,10 @@ class Boss(QObject):
|
|||||||
return error_dialog(self.gui, _('Cannot save a copy'), _(
|
return error_dialog(self.gui, _('Cannot save a copy'), _(
|
||||||
'Saving a copy of a folder based book is not supported'), show=True)
|
'Saving a copy of a folder based book is not supported'), show=True)
|
||||||
ext = c.path_to_ebook.rpartition('.')[-1]
|
ext = c.path_to_ebook.rpartition('.')[-1]
|
||||||
path = choose_save_file(self.gui, 'tweak_book_save_copy', _(
|
path = choose_save_file(
|
||||||
'Choose path'), filters=[(_('Book (%s)') % ext.upper(), [ext.lower()])], all_files=False)
|
self.gui, 'tweak_book_save_copy', _('Choose path'),
|
||||||
|
initial_filename=self.current_metadata.title + '.' + ext,
|
||||||
|
filters=[(_('Book (%s)') % ext.upper(), [ext.lower()])], all_files=False)
|
||||||
if not path:
|
if not path:
|
||||||
return
|
return
|
||||||
tdir = self.mkdtemp(prefix='save-copy-')
|
tdir = self.mkdtemp(prefix='save-copy-')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user