forked from openlp/openlp
- Hide the theme menu when theme level is not 'Song'.
- clean ups bzr-revno: 1583
This commit is contained in:
commit
78404882d9
@ -677,7 +677,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.timeAction.setVisible(True)
|
||||
self.themeMenu.menuAction().setVisible(False)
|
||||
# Set up the theme menu.
|
||||
if serviceItem[u'service_item'].is_text():
|
||||
if serviceItem[u'service_item'].is_text() and \
|
||||
self.mainwindow.renderer.theme_level == ThemeLevel.Song:
|
||||
self.themeMenu.menuAction().setVisible(True)
|
||||
# The service item does not have a theme, check the "Default".
|
||||
if serviceItem[u'service_item'].theme is None:
|
||||
|
@ -57,8 +57,6 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.settingsSection = u'themes'
|
||||
self.themeForm = ThemeForm(self)
|
||||
self.fileRenameForm = FileRenameForm(self)
|
||||
self.serviceComboBox = \
|
||||
self.mainwindow.serviceManagerContents.themeComboBox
|
||||
# start with the layout
|
||||
self.layout = QtGui.QVBoxLayout(self)
|
||||
self.layout.setSpacing(0)
|
||||
|
@ -145,10 +145,8 @@ class ThemesTab(SettingsTab):
|
||||
def save(self):
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
settings.setValue(u'theme level',
|
||||
QtCore.QVariant(self.theme_level))
|
||||
settings.setValue(u'global theme',
|
||||
QtCore.QVariant(self.global_theme))
|
||||
settings.setValue(u'theme level', QtCore.QVariant(self.theme_level))
|
||||
settings.setValue(u'global theme', QtCore.QVariant(self.global_theme))
|
||||
settings.endGroup()
|
||||
self.mainwindow.renderer.set_global_theme(
|
||||
self.global_theme, self.theme_level)
|
||||
@ -186,8 +184,7 @@ class ThemesTab(SettingsTab):
|
||||
self.settingsSection + u'/global theme',
|
||||
QtCore.QVariant(u'')).toString())
|
||||
self.DefaultComboBox.clear()
|
||||
for theme in theme_list:
|
||||
self.DefaultComboBox.addItem(theme)
|
||||
self.DefaultComboBox.addItems(theme_list)
|
||||
find_and_set_in_combo_box(self.DefaultComboBox, self.global_theme)
|
||||
self.mainwindow.renderer.set_global_theme(
|
||||
self.global_theme, self.theme_level)
|
||||
|
Loading…
Reference in New Issue
Block a user