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['preserve_date_on_ctl'] = True
|
||||||
gprefs.defaults['cb_fullscreen'] = False
|
gprefs.defaults['cb_fullscreen'] = False
|
||||||
gprefs.defaults['worker_max_time'] = 0
|
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
|
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 PyQt4.Qt import QMenu, pyqtSignal
|
||||||
|
|
||||||
from calibre.utils.config import prefs
|
from calibre.utils.config import prefs
|
||||||
from calibre.gui2 import error_dialog, Dispatcher, \
|
from calibre.gui2 import (error_dialog, Dispatcher, gprefs,
|
||||||
choose_dir, warning_dialog, open_local_file
|
choose_dir, warning_dialog, open_local_file)
|
||||||
from calibre.gui2.actions import InterfaceAction
|
from calibre.gui2.actions import InterfaceAction
|
||||||
from calibre.ebooks import BOOK_EXTENSIONS
|
from calibre.ebooks import BOOK_EXTENSIONS
|
||||||
|
|
||||||
@ -141,7 +141,8 @@ class SaveToDiskAction(InterfaceAction):
|
|||||||
_('Could not save some books') + ', ' +
|
_('Could not save some books') + ', ' +
|
||||||
_('Click the show details button to see which ones.'),
|
_('Click the show details button to see which ones.'),
|
||||||
u'\n\n'.join(failures), show=True)
|
u'\n\n'.join(failures), show=True)
|
||||||
open_local_file(path)
|
if gprefs['show_files_after_save']:
|
||||||
|
open_local_file(path)
|
||||||
|
|
||||||
def books_saved(self, job):
|
def books_saved(self, job):
|
||||||
if job.failed:
|
if job.failed:
|
||||||
|
@ -12,6 +12,7 @@ from calibre.gui2.preferences import ConfigWidgetBase, test_widget, \
|
|||||||
from calibre.gui2.preferences.saving_ui import Ui_Form
|
from calibre.gui2.preferences.saving_ui import Ui_Form
|
||||||
from calibre.utils.config import ConfigProxy
|
from calibre.utils.config import ConfigProxy
|
||||||
from calibre.library.save_to_disk import config
|
from calibre.library.save_to_disk import config
|
||||||
|
from calibre.gui2 import gprefs
|
||||||
|
|
||||||
class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
for x in ('asciiize', 'update_metadata', 'save_cover', 'write_opf',
|
for x in ('asciiize', 'update_metadata', 'save_cover', 'write_opf',
|
||||||
'replace_whitespace', 'to_lowercase', 'formats', 'timefmt'):
|
'replace_whitespace', 'to_lowercase', 'formats', 'timefmt'):
|
||||||
r(x, self.proxy)
|
r(x, self.proxy)
|
||||||
|
r('show_files_after_save', gprefs)
|
||||||
|
|
||||||
self.save_template.changed_signal.connect(self.changed_signal.emit)
|
self.save_template.changed_signal.connect(self.changed_signal.emit)
|
||||||
|
|
||||||
|
@ -95,6 +95,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user