diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 023c460e1..fc494c5fe 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -136,7 +136,9 @@ class Settings(QtCore.QSettings): **Note**, this method only converts a few types and might need to be extended if a certain type is missing! """ - # Check for none as u'' is passed as default and is valid! + # Check for none as u'' is passed as default and is valid! This is + # needed because the settings export does not know the default values, + # thus just passes None. if defaultValue is None and not super(Settings, self).contains(key): return None setting = super(Settings, self).value(key, defaultValue) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index f02a64229..811173ae2 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -1000,8 +1000,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): return # We have a good file, import it. for section_key in import_keys: - value = import_settings.value(section_key) - settings.setValue(u'%s' % (section_key), value) + value = import_settings.value(section_key, None) + if value is not None: + settings.setValue(u'%s' % (section_key), value) now = datetime.now() settings.beginGroup(self.headerSection) settings.setValue(u'file_imported', import_file_name) diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 2b618bddf..86a6e1531 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -497,10 +497,8 @@ def locale_compare(string1, string2): is equal to it. Comparison is case insensitive. """ # Function locale.strcoll() from standard Python library does not work - # properly on Windows and probably somewhere else. + # properly on Windows. return locale.strcoll(string1.lower(), string2.lower()) - # TODO: check code - #return QtCore.QString.localeAwareCompare(string1.lower(), string2.lower()) # For performance reasons provide direct reference to compare function diff --git a/openlp/core/utils/actions.py b/openlp/core/utils/actions.py index b4c4070ae..01ba34a26 100644 --- a/openlp/core/utils/actions.py +++ b/openlp/core/utils/actions.py @@ -213,11 +213,11 @@ class ActionList(object): empty ``objectName``. ``category`` - The category this action belongs to. The category can be a QString - or python unicode string. **Note**, if the category is ``None``, the - category and its actions are being hidden in the shortcut dialog. - However, if they are added, it is possible to avoid assigning - shortcuts twice, which is important. + The category this action belongs to. The category has to be a python + string. . **Note**, if the category is ``None``, the category and + its actions are being hidden in the shortcut dialog. However, if + they are added, it is possible to avoid assigning shortcuts twice, + which is important. ``weight`` The weight specifies how important a category is. However, this only