mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add an option in Preferences->Saving to disk to not show files in file browser after saving to disk
This commit is contained in:
parent
6481127a18
commit
47efdc1d04
@ -100,7 +100,7 @@ gprefs.defaults['default_author_link'] = 'http://en.wikipedia.org/w/index.php?se
|
||||
gprefs.defaults['preserve_date_on_ctl'] = True
|
||||
gprefs.defaults['cb_fullscreen'] = False
|
||||
gprefs.defaults['worker_max_time'] = 0
|
||||
|
||||
gprefs.defaults['show_files_after_save'] = True
|
||||
# }}}
|
||||
|
||||
NONE = QVariant() #: Null value to return from the data function of item models
|
||||
|
@ -11,8 +11,8 @@ from functools import partial
|
||||
from PyQt4.Qt import QMenu, pyqtSignal
|
||||
|
||||
from calibre.utils.config import prefs
|
||||
from calibre.gui2 import error_dialog, Dispatcher, \
|
||||
choose_dir, warning_dialog, open_local_file
|
||||
from calibre.gui2 import (error_dialog, Dispatcher, gprefs,
|
||||
choose_dir, warning_dialog, open_local_file)
|
||||
from calibre.gui2.actions import InterfaceAction
|
||||
from calibre.ebooks import BOOK_EXTENSIONS
|
||||
|
||||
@ -141,6 +141,7 @@ class SaveToDiskAction(InterfaceAction):
|
||||
_('Could not save some books') + ', ' +
|
||||
_('Click the show details button to see which ones.'),
|
||||
u'\n\n'.join(failures), show=True)
|
||||
if gprefs['show_files_after_save']:
|
||||
open_local_file(path)
|
||||
|
||||
def books_saved(self, job):
|
||||
|
@ -12,6 +12,7 @@ from calibre.gui2.preferences import ConfigWidgetBase, test_widget, \
|
||||
from calibre.gui2.preferences.saving_ui import Ui_Form
|
||||
from calibre.utils.config import ConfigProxy
|
||||
from calibre.library.save_to_disk import config
|
||||
from calibre.gui2 import gprefs
|
||||
|
||||
class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
|
||||
@ -24,6 +25,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
for x in ('asciiize', 'update_metadata', 'save_cover', 'write_opf',
|
||||
'replace_whitespace', 'to_lowercase', 'formats', 'timefmt'):
|
||||
r(x, self.proxy)
|
||||
r('show_files_after_save', gprefs)
|
||||
|
||||
self.save_template.changed_signal.connect(self.changed_signal.emit)
|
||||
|
||||
|
@ -95,6 +95,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="opt_show_files_after_save">
|
||||
<property name="text">
|
||||
<string>&Show files in file browser after saving to disk</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
Loading…
x
Reference in New Issue
Block a user