From 87775f164ac392c99a65e046e658cdda6a510d09 Mon Sep 17 00:00:00 2001 From: Jonathan Stafford Date: Sun, 15 Jan 2012 17:08:08 +0800 Subject: [PATCH] Migrate Wrap Setting to Slide Advance Setting --- openlp/core/ui/mainwindow.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 3490dfada..75312f3d5 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -38,6 +38,7 @@ from openlp.core.lib import Renderer, build_icon, OpenLPDockWidget, \ PluginManager, Receiver, translate, ImageManager, PluginStatus from openlp.core.lib.ui import UiStrings, base_action, checkable_action, \ icon_action, shortcut_action +from openlp.core.lib.serviceitem import SlideAdvance from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \ ThemeManager, SlideController, PluginForm, MediaDockManager, \ ShortcutListForm, FormattingTagForm @@ -1307,6 +1308,18 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): Load the main window settings. """ log.debug(u'Loading QSettings') + # Migrate Wrap Settings to Slide Advance Settings + if QtCore.QSettings().contains(self.generalSettingsSection + + u'/enable slide loop'): + if QtCore.QSettings().value(self.generalSettingsSection + + u'/enable slide loop', QtCore.QVariant(True)).toBool(): + slide_advance = SlideAdvance.Wrap + else: + slide_advance = SlideAdvance.End + QtCore.QSettings().setValue(self.generalSettingsSection + + u'/slide advance', QtCore.QVariant(slide_advance)) + QtCore.QSettings().remove(self.generalSettingsSection + + u'/enable slide loop') settings = QtCore.QSettings() # Remove obsolete entries. settings.remove(u'custom slide')