The 'Replace recipe?' question_dialog preference gets saved.

This commit is contained in:
ingkebil 2014-04-02 15:46:26 +02:00
parent b891882126
commit 989f919a40

View File

@ -10,12 +10,11 @@ from calibre.web.feeds.news import AutomaticNewsRecipe
from calibre.gui2.dialogs.user_profiles_ui import Ui_Dialog from calibre.gui2.dialogs.user_profiles_ui import Ui_Dialog
from calibre.gui2 import error_dialog, question_dialog, open_url, \ from calibre.gui2 import error_dialog, question_dialog, open_url, \
choose_files, ResizableDialog, NONE, open_local_file, \ choose_files, ResizableDialog, NONE, open_local_file, \
info_dialog info_dialog, gprefs
from calibre.gui2.widgets import PythonHighlighter from calibre.gui2.widgets import PythonHighlighter
from calibre.ptempfile import PersistentTemporaryFile from calibre.ptempfile import PersistentTemporaryFile
from calibre.utils.icu import sort_key from calibre.utils.icu import sort_key
from calibre.utils.opml import OPML from calibre.utils.opml import OPML
from calibre.utils.config import JSONConfig
class CustomRecipeModel(QAbstractListModel): class CustomRecipeModel(QAbstractListModel):
@ -356,7 +355,6 @@ class %(classname)s(%(base_class)s):
self.clear() self.clear()
def opml_import(self): def opml_import(self):
opml_files = choose_files(self, 'OPML chooser dialog', opml_files = choose_files(self, 'OPML chooser dialog',
_('Select OPML file'), filters=[(_('OPML'), ['opml'])] ) _('Select OPML file'), filters=[(_('OPML'), ['opml'])] )
@ -398,7 +396,6 @@ class %(classname)s(%(base_class)s):
self.clear() self.clear()
# reset the question_dialog # reset the question_dialog
gprefs = JSONConfig('gui')
auto_skip = gprefs.get('questions_to_auto_skip', []) auto_skip = gprefs.get('questions_to_auto_skip', [])
if skip_dialog_name in auto_skip: if skip_dialog_name in auto_skip:
auto_skip.remove(skip_dialog_name) auto_skip.remove(skip_dialog_name)