← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/trivial into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/trivial into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/59802

Hello,

- fixed a traceback when pressing the delete button in the theme manager when no theme has been selected
- fixed the delete button being hidden/visible although a theme was selected (using the down/up keys)


Here the lines I changed in context:

        if check_item_selected(self.themeListWidget, select_text):
            # More validation done...
            # More validation done...
            return True
        return False
-- 
https://code.launchpad.net/~googol-hush/openlp/trivial/+merge/59802
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/trivial into lp:openlp.
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2011-04-26 18:52:46 +0000
+++ openlp/core/ui/thememanager.py	2011-05-03 17:14:25 +0000
@@ -127,8 +127,8 @@
         QtCore.QObject.connect(self.themeListWidget,
             QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
             self.changeGlobalFromScreen)
-        QtCore.QObject.connect(self.themeListWidget,
-            QtCore.SIGNAL(u'itemClicked(QListWidgetItem *)'),
+        QtCore.QObject.connect(self.themeListWidget, QtCore.SIGNAL(
+            u'currentItemChanged(QListWidgetItem *, QListWidgetItem *)'),
             self.checkListState)
         QtCore.QObject.connect(Receiver.get_receiver(),
             QtCore.SIGNAL(u'theme_update_global'), self.changeGlobalFromTab)
@@ -170,6 +170,8 @@
         """
         If Default theme selected remove delete button.
         """
+        if item is None:
+            return
         realThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
         themeName = unicode(item.text())
         # If default theme restrict actions
@@ -748,7 +750,8 @@
                             'Theme %s is used in the %s plugin.')) % \
                             (theme, plugin.name))
                         return False
-        return True
+            return True
+        return False
 
     def _migrateVersion122(self, xml_data):
         """
@@ -806,4 +809,5 @@
             vAlignCorrection = VerticalType.Bottom
         newtheme.display_horizontal_align = theme.HorizontalAlign
         newtheme.display_vertical_align = vAlignCorrection
-        return newtheme.extract_xml()
\ No newline at end of file
+        return newtheme.extract_xml()
+


Follow ups