forked from openlp/openlp
Head and merge fixes
This commit is contained in:
commit
72920494a6
@ -98,6 +98,7 @@ class Settings(QtCore.QSettings):
|
|||||||
u'advanced/hide mouse': True,
|
u'advanced/hide mouse': True,
|
||||||
u'advanced/current media plugin': -1,
|
u'advanced/current media plugin': -1,
|
||||||
u'advanced/double click live': False,
|
u'advanced/double click live': False,
|
||||||
|
u'advanced/data path': u'',
|
||||||
u'advanced/default service hour': 11,
|
u'advanced/default service hour': 11,
|
||||||
u'advanced/default color': u'#ffffff',
|
u'advanced/default color': u'#ffffff',
|
||||||
u'advanced/default image': u':/graphics/openlp-splash-screen.png',
|
u'advanced/default image': u':/graphics/openlp-splash-screen.png',
|
||||||
@ -140,7 +141,6 @@ class Settings(QtCore.QSettings):
|
|||||||
u'general/blank warning': False,
|
u'general/blank warning': False,
|
||||||
u'players/background color': u'#000000',
|
u'players/background color': u'#000000',
|
||||||
u'servicemanager/service theme': u'',
|
u'servicemanager/service theme': u'',
|
||||||
u'servicemanager/last directory': u'',
|
|
||||||
u'servicemanager/last file': u'',
|
u'servicemanager/last file': u'',
|
||||||
u'SettingsImport/Make_Changes': u'At_Own_RISK',
|
u'SettingsImport/Make_Changes': u'At_Own_RISK',
|
||||||
u'SettingsImport/type': u'OpenLP_settings_export',
|
u'SettingsImport/type': u'OpenLP_settings_export',
|
||||||
@ -227,7 +227,10 @@ class Settings(QtCore.QSettings):
|
|||||||
u'user interface/live splitter geometry': QtCore.QByteArray(),
|
u'user interface/live splitter geometry': QtCore.QByteArray(),
|
||||||
u'user interface/main window state': QtCore.QByteArray(),
|
u'user interface/main window state': QtCore.QByteArray(),
|
||||||
u'media/players': u'webkit',
|
u'media/players': u'webkit',
|
||||||
u'media/override player': QtCore.Qt.Unchecked
|
u'media/override player': QtCore.Qt.Unchecked,
|
||||||
|
# Old settings (not used anymore). Have to be here, so that old setting.config backups can be imported.
|
||||||
|
u'advanced/stylesheet fix': u'',
|
||||||
|
u'servicemanager/last directory': u''
|
||||||
}
|
}
|
||||||
__file_path__ = u''
|
__file_path__ = u''
|
||||||
__obsolete_settings__ = [
|
__obsolete_settings__ = [
|
||||||
@ -239,7 +242,9 @@ class Settings(QtCore.QSettings):
|
|||||||
(u'songs/last directory 1', u'songs/last directory import', []),
|
(u'songs/last directory 1', u'songs/last directory import', []),
|
||||||
(u'bibles/last directory 1', u'bibles/last directory import', []),
|
(u'bibles/last directory 1', u'bibles/last directory import', []),
|
||||||
(u'songusage/last directory 1', u'songusage/last directory export', []),
|
(u'songusage/last directory 1', u'songusage/last directory export', []),
|
||||||
(u'shortcuts/makeLive', u'shortcuts/make_live', [])
|
(u'shortcuts/makeLive', u'shortcuts/make_live', []),
|
||||||
|
(u'advanced/stylesheet fix', u'', []),
|
||||||
|
(u'media/background color', u'players/background color', [])
|
||||||
]
|
]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -921,7 +921,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
# Write all the sections and keys.
|
# Write all the sections and keys.
|
||||||
for section_key in keys:
|
for section_key in keys:
|
||||||
# FIXME: We are conflicting with the standard "General" section.
|
# FIXME: We are conflicting with the standard "General" section.
|
||||||
section_key = section_key.lower()
|
if u'eneral' in section_key:
|
||||||
|
section_key = section_key.lower()
|
||||||
key_value = settings.value(section_key)
|
key_value = settings.value(section_key)
|
||||||
if key_value is not None:
|
if key_value is not None:
|
||||||
export_settings.setValue(section_key, key_value)
|
export_settings.setValue(section_key, key_value)
|
||||||
@ -939,7 +940,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
temp_conf.close()
|
temp_conf.close()
|
||||||
export_conf.close()
|
export_conf.close()
|
||||||
os.remove(temp_file)
|
os.remove(temp_file)
|
||||||
return
|
|
||||||
|
|
||||||
def onModeDefaultItemClicked(self):
|
def onModeDefaultItemClicked(self):
|
||||||
"""
|
"""
|
||||||
|
@ -872,9 +872,11 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog):
|
|||||||
service_item.auto_play_slides_loop = False
|
service_item.auto_play_slides_loop = False
|
||||||
self.auto_play_slides_loop.setChecked(False)
|
self.auto_play_slides_loop.setChecked(False)
|
||||||
if service_item.auto_play_slides_once and service_item.timed_slide_interval == 0:
|
if service_item.auto_play_slides_once and service_item.timed_slide_interval == 0:
|
||||||
service_item.timed_slide_interval = Settings().value(u'loop delay')
|
service_item.timed_slide_interval = Settings().value(
|
||||||
|
self.main_window.generalSettingsSection + u'/loop delay')
|
||||||
self.set_modified()
|
self.set_modified()
|
||||||
|
|
||||||
|
|
||||||
def toggle_auto_play_slides_loop(self):
|
def toggle_auto_play_slides_loop(self):
|
||||||
"""
|
"""
|
||||||
Toggle Auto play slide loop.
|
Toggle Auto play slide loop.
|
||||||
@ -886,9 +888,11 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog):
|
|||||||
service_item.auto_play_slides_once = False
|
service_item.auto_play_slides_once = False
|
||||||
self.auto_play_slides_once.setChecked(False)
|
self.auto_play_slides_once.setChecked(False)
|
||||||
if service_item.auto_play_slides_loop and service_item.timed_slide_interval == 0:
|
if service_item.auto_play_slides_loop and service_item.timed_slide_interval == 0:
|
||||||
service_item.timed_slide_interval = Settings().value(u'loop delay')
|
service_item.timed_slide_interval = Settings().value(
|
||||||
|
self.main_window.generalSettingsSection + u'/loop delay')
|
||||||
self.set_modified()
|
self.set_modified()
|
||||||
|
|
||||||
|
|
||||||
def on_timed_slide_interval(self):
|
def on_timed_slide_interval(self):
|
||||||
"""
|
"""
|
||||||
Shows input dialog for enter interval in seconds for delay
|
Shows input dialog for enter interval in seconds for delay
|
||||||
@ -896,7 +900,7 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog):
|
|||||||
item = self.find_service_item()[0]
|
item = self.find_service_item()[0]
|
||||||
service_item = self.service_items[item][u'service_item']
|
service_item = self.service_items[item][u'service_item']
|
||||||
if service_item.timed_slide_interval == 0:
|
if service_item.timed_slide_interval == 0:
|
||||||
timed_slide_interval = Settings().value(u'loop delay')
|
timed_slide_interval = Settings().value(self.mainwindow.generalSettingsSection + u'/loop delay')
|
||||||
else:
|
else:
|
||||||
timed_slide_interval = service_item.timed_slide_interval
|
timed_slide_interval = service_item.timed_slide_interval
|
||||||
timed_slide_interval, ok = QtGui.QInputDialog.getInteger(self, translate('OpenLP.ServiceManager',
|
timed_slide_interval, ok = QtGui.QInputDialog.getInteger(self, translate('OpenLP.ServiceManager',
|
||||||
|
@ -48,7 +48,7 @@ class TestAppLocation(TestCase):
|
|||||||
data_path = AppLocation.get_data_path()
|
data_path = AppLocation.get_data_path()
|
||||||
# THEN: the mocked Settings methods were called and the value returned was our set up value
|
# THEN: the mocked Settings methods were called and the value returned was our set up value
|
||||||
mocked_settings.contains.assert_called_with(u'advanced/data path')
|
mocked_settings.contains.assert_called_with(u'advanced/data path')
|
||||||
mocked_settings.value.assert_called_with(u'advanced/data path', u'')
|
mocked_settings.value.assert_called_with(u'advanced/data path')
|
||||||
assert data_path == u'custom/dir', u'Result should be "custom/dir"'
|
assert data_path == u'custom/dir', u'Result should be "custom/dir"'
|
||||||
|
|
||||||
def get_section_data_path_test(self):
|
def get_section_data_path_test(self):
|
||||||
@ -76,7 +76,7 @@ class TestAppLocation(TestCase):
|
|||||||
directory = AppLocation.get_directory(AppLocation.AppDir)
|
directory = AppLocation.get_directory(AppLocation.AppDir)
|
||||||
# THEN:
|
# THEN:
|
||||||
assert directory == u'app/dir', u'Directory should be "app/dir"'
|
assert directory == u'app/dir', u'Directory should be "app/dir"'
|
||||||
|
|
||||||
def get_directory_for_plugins_dir_test(self):
|
def get_directory_for_plugins_dir_test(self):
|
||||||
"""
|
"""
|
||||||
Test the AppLocation.get_directory() method for AppLocation.PluginsDir
|
Test the AppLocation.get_directory() method for AppLocation.PluginsDir
|
||||||
@ -94,4 +94,4 @@ class TestAppLocation(TestCase):
|
|||||||
directory = AppLocation.get_directory(AppLocation.PluginsDir)
|
directory = AppLocation.get_directory(AppLocation.PluginsDir)
|
||||||
# THEN:
|
# THEN:
|
||||||
assert directory == u'plugins/dir', u'Directory should be "plugins/dir"'
|
assert directory == u'plugins/dir', u'Directory should be "plugins/dir"'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user