← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/service-theme-menu into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/service-theme-menu into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/service-theme-menu/+merge/62648

Hello,

- Hide the theme menu when theme level is not 'Song'.
- clean ups
-- 
https://code.launchpad.net/~googol-hush/openlp/service-theme-menu/+merge/62648
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/service-theme-menu into lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2011-05-27 07:02:02 +0000
+++ openlp/core/ui/servicemanager.py	2011-05-27 10:40:23 +0000
@@ -677,7 +677,8 @@
             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:

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2011-05-26 17:11:22 +0000
+++ openlp/core/ui/thememanager.py	2011-05-27 10:40:23 +0000
@@ -57,8 +57,6 @@
         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)

=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py	2011-05-26 17:11:22 +0000
+++ openlp/core/ui/themestab.py	2011-05-27 10:40:23 +0000
@@ -145,10 +145,8 @@
     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 @@
             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)


Follow ups