This commit is contained in:
Tim Bentley 2013-03-15 08:40:16 +00:00
commit 1c76353cba
4 changed files with 9 additions and 9 deletions

View File

@ -31,8 +31,8 @@ import logging
from PyQt4 import QtGui, QtCore, QtWebKit from PyQt4 import QtGui, QtCore, QtWebKit
from openlp.core.lib import FormattingTags, ImageSource, ItemCapabilities, Registry, ScreenList, ServiceItem, \ from openlp.core.lib import Settings, FormattingTags, ImageSource, ItemCapabilities, Registry, ScreenList, \
expand_tags, build_lyrics_format_css, build_lyrics_outline_css ServiceItem, expand_tags, build_lyrics_format_css, build_lyrics_outline_css
from openlp.core.lib.theme import ThemeLevel from openlp.core.lib.theme import ThemeLevel
from openlp.core.ui import MainDisplay from openlp.core.ui import MainDisplay
@ -171,13 +171,14 @@ class Renderer(object):
""" """
self.theme_level = theme_level self.theme_level = theme_level
def set_global_theme(self, global_theme_name): def set_global_theme(self):
""" """
Set the global-level theme name. Set the global-level theme name.
``global_theme_name`` ``global_theme_name``
The global-level theme's name. The global-level theme's name.
""" """
global_theme_name = Settings().value(u'themes/global theme')
self._set_theme(global_theme_name) self._set_theme(global_theme_name)
self.global_theme_name = global_theme_name self.global_theme_name = global_theme_name

View File

@ -1231,7 +1231,7 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog):
Settings().setValue(self.main_window.serviceManagerSettingsSection + u'/service theme', self.service_theme) Settings().setValue(self.main_window.serviceManagerSettingsSection + u'/service theme', self.service_theme)
self.regenerate_service_Items(True) self.regenerate_service_Items(True)
def theme_change(self, global_theme): def theme_change(self):
""" """
The theme may have changed in the settings dialog so make The theme may have changed in the settings dialog so make
sure the theme combo box is in the correct state. sure the theme combo box is in the correct state.

View File

@ -606,11 +606,11 @@ class SlideController(DisplayController):
self.__updatePreviewSelection(slide_no) self.__updatePreviewSelection(slide_no)
self.slideSelected() self.slideSelected()
def receive_spin_delay(self, value): def receive_spin_delay(self):
""" """
Adjusts the value of the ``delay_spin_box`` to the given one. Adjusts the value of the ``delay_spin_box`` to the given one.
""" """
self.delay_spin_box.setValue(int(value)) self.delay_spin_box.setValue(Settings().value(u'general/loop delay'))
def update_slide_limits(self): def update_slide_limits(self):
""" """

View File

@ -149,7 +149,6 @@ class ThemesTab(SettingsTab):
settings.setValue(u'theme level', self.theme_level) settings.setValue(u'theme level', self.theme_level)
settings.setValue(u'global theme', self.global_theme) settings.setValue(u'global theme', self.global_theme)
settings.endGroup() settings.endGroup()
self.renderer.set_global_theme(self.global_theme)
self.renderer.set_theme_level(self.theme_level) self.renderer.set_theme_level(self.theme_level)
self.settings_form.register_post_process(u'theme_update_global') self.settings_form.register_post_process(u'theme_update_global')
@ -182,7 +181,7 @@ class ThemesTab(SettingsTab):
Set the global default theme Set the global default theme
""" """
self.global_theme = self.DefaultComboBox.currentText() self.global_theme = self.DefaultComboBox.currentText()
self.renderer.set_global_theme(self.global_theme) self.renderer.set_global_theme()
self.__previewGlobalTheme() self.__previewGlobalTheme()
def update_theme_list(self, theme_list): def update_theme_list(self, theme_list):
@ -199,7 +198,7 @@ class ThemesTab(SettingsTab):
self.DefaultComboBox.clear() self.DefaultComboBox.clear()
self.DefaultComboBox.addItems(theme_list) self.DefaultComboBox.addItems(theme_list)
find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme) find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme)
self.renderer.set_global_theme(self.global_theme) self.renderer.set_global_theme()
self.renderer.set_theme_level(self.theme_level) self.renderer.set_theme_level(self.theme_level)
if self.global_theme is not u'': if self.global_theme is not u'':
self.__previewGlobalTheme() self.__previewGlobalTheme()