← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/bugfixes into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/bugfixes into lp:openlp.

Requested reviews:
    openlp.org Core (openlp-core)

Changes which have been stacked up for the last week and are still valid.
-- 
https://code.launchpad.net/~trb143/openlp/bugfixes/+merge/10577
Your team openlp.org Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/event.py'
--- openlp/core/lib/event.py	2009-08-12 04:57:24 +0000
+++ openlp/core/lib/event.py	2009-08-15 07:33:01 +0000
@@ -45,7 +45,7 @@
     """
     Provides an Event class to encapsulate events within openlp.org.
     """
-    def __init__(self, event_type, sender, payload=None):
+    def __init__(self, sender, event_type=EventType.Default,  payload=None):
         self.event_type = event_type
         self.payload = payload
         self.sender = sender

=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py	2009-08-12 04:57:24 +0000
+++ openlp/core/lib/plugin.py	2009-08-15 11:02:24 +0000
@@ -122,7 +122,6 @@
         self.log = logging.getLogger(self.name)
         self.preview_controller = plugin_helpers[u'preview']
         self.live_controller = plugin_helpers[u'live']
-        self.theme_manager = plugin_helpers[u'theme']
         self.event_manager = plugin_helpers[u'event']
         self.render_manager = plugin_helpers[u'render']
         self.service_manager = plugin_helpers[u'service']
@@ -132,6 +131,7 @@
     def check_pre_conditions(self):
         """
         Provides the Plugin with a handle to check if it can be loaded.
+        Failing Preconditions does not stop a settings Tab being created
 
         Returns True or False.
         """

=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py	2009-08-13 20:02:38 +0000
+++ openlp/core/lib/pluginmanager.py	2009-08-15 07:55:16 +0000
@@ -93,18 +93,20 @@
         for p in plugin_classes:
             try:
                 plugin = p(self.plugin_helpers)
-                log.debug(u'loaded plugin %s with helpers', unicode(p))
-                log.debug(u'Plugin: %s', unicode(p))
-                pList = {u'name': plugin.name, u'version':plugin.version, u'status': u'Inactive'}
-                if plugin.check_pre_conditions():
-                    log.debug(u'Appending %s ', unicode(p))
-                    plugin_objects.append(plugin)
-                    eventmanager.register(plugin)
-                    pList[u'status'] = u'Active'
-                self.plugin_list.append(pList)
+                log.debug(u'Loaded plugin %s with helpers', unicode(p))
+
+                plugin_objects.append(plugin)
             except TypeError:
                 log.error(u'loaded plugin %s has no helpers', unicode(p))
-        self.plugins = sorted(plugin_objects, self.order_by_weight)
+        plugins_list = sorted(plugin_objects, self.order_by_weight)
+        for plugin in plugins_list:
+            pList = {u'plugin': plugin,  u'status': u'Inactive'}
+            if plugin.check_pre_conditions():
+                log.debug(u'Plugin %s active', unicode(plugin.name))
+                eventmanager.register(plugin)
+                pList[u'status'] = u'Active'
+            self.plugins.append(pList)
+
 
     def order_by_weight(self, x, y):
         """
@@ -127,10 +129,11 @@
             The Media Manager itself.
         """
         for plugin in self.plugins:
-            media_manager_item = plugin.get_media_manager_item()
-            if media_manager_item is not None:
-                log.debug(u'Inserting media manager item from %s' % plugin.name)
-                mediatoolbox.addItem(media_manager_item, plugin.icon, media_manager_item.title)
+            if plugin[u'status'] == u'Active':
+                media_manager_item = plugin[u'plugin'].get_media_manager_item()
+                if media_manager_item is not None:
+                    log.debug(u'Inserting media manager item from %s' % plugin[u'plugin'].name)
+                    mediatoolbox.addItem(media_manager_item, plugin[u'plugin'].icon, media_manager_item.title)
 
     def hook_settings_tabs(self, settingsform=None):
         """
@@ -141,12 +144,12 @@
             Defaults to *None*. The settings form to add tabs to.
         """
         for plugin in self.plugins:
-            settings_tab = plugin.get_settings_tab()
+            settings_tab = plugin[u'plugin'].get_settings_tab()
             if settings_tab is not None:
-                log.debug(u'Inserting settings tab item from %s' % plugin.name)
+                log.debug(u'Inserting settings tab item from %s' % plugin[u'plugin'].name)
                 settingsform.addTab(settings_tab)
             else:
-                log.debug(u'No settings in %s' % plugin.name)
+                log.debug(u'No settings in %s' % plugin[u'plugin'].name)
 
     def hook_import_menu(self, import_menu):
         """
@@ -157,7 +160,8 @@
             The Import menu.
         """
         for plugin in self.plugins:
-            plugin.add_import_menu_item(import_menu)
+            if plugin[u'status'] == u'Active':
+                plugin[u'plugin'].add_import_menu_item(import_menu)
 
     def hook_export_menu(self, export_menu):
         """
@@ -168,7 +172,8 @@
             The Export menu.
         """
         for plugin in self.plugins:
-            plugin.add_export_menu_item(export_menu)
+            if plugin[u'status'] == u'Active':
+                plugin[u'plugin'].add_export_menu_item(export_menu)
 
     def initialise_plugins(self):
         """
@@ -176,7 +181,8 @@
         initialise themselves.
         """
         for plugin in self.plugins:
-            plugin.initialise()
+            if plugin[u'status'] == u'Active':
+                plugin[u'plugin'].initialise()
 
     def finalise_plugins(self):
         """
@@ -184,4 +190,5 @@
         clean themselves up
         """
         for plugin in self.plugins:
-            plugin.finalise()
+            if plugin[u'status'] == u'Active':
+                plugin[u'plugin'].finalise()

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2009-08-14 19:12:14 +0000
+++ openlp/core/ui/mainwindow.py	2009-08-15 11:02:24 +0000
@@ -468,7 +468,6 @@
         self.plugin_helpers[u'preview'] = self.PreviewController
         self.plugin_helpers[u'live'] = self.LiveController
         self.plugin_helpers[u'event'] = self.EventManager
-        self.plugin_helpers[u'theme'] = self.ThemeManagerContents
         self.plugin_helpers[u'render'] = self.RenderManager
         self.plugin_helpers[u'service'] = self.ServiceManagerContents
         self.plugin_helpers[u'settings'] = self.settingsForm
@@ -596,8 +595,7 @@
 
     def handle_event(self, event):
         if event.event_type == EventType.ThemeListChanged:
-            themes = self.ThemeManagerContents.getThemes()
-            self.ServiceManagerContents.updateThemeList(themes)
-            self.settingsForm.ThemesTab.updateThemeList(themes)
+            self.ServiceManagerContents.updateThemeList(event.payload)
+            self.settingsForm.ThemesTab.updateThemeList(event.payload)
             self.DefaultThemeLabel.setText(self.defaultThemeText + \
                 self.ThemeManagerContents.getDefault())

=== modified file 'openlp/core/ui/plugindialoglistform.py'
--- openlp/core/ui/plugindialoglistform.py	2009-08-14 16:26:22 +0000
+++ openlp/core/ui/plugindialoglistform.py	2009-08-15 19:10:59 +0000
@@ -58,12 +58,14 @@
         """
         Load the plugin details into the screen
         """
-        for plugin in self.parent.plugin_manager.plugin_list:
+        #self.PluginViewList.clear()
+        self.PluginViewList.setRowCount(0)
+        for plugin in self.parent.plugin_manager.plugins:
             row = self.PluginViewList.rowCount()
             self.PluginViewList.setRowCount(row + 1)
-            item1 = QtGui.QTableWidgetItem(plugin[u'name'])
+            item1 = QtGui.QTableWidgetItem(plugin[u'plugin'].name)
             item1.setTextAlignment(QtCore.Qt.AlignVCenter)
-            item2 = QtGui.QTableWidgetItem(plugin[u'version'])
+            item2 = QtGui.QTableWidgetItem(plugin[u'plugin'].version)
             item2.setTextAlignment(QtCore.Qt.AlignVCenter)
             item3 = QtGui.QTableWidgetItem(translate(u'PluginForm', plugin[u'status']))
             item3.setTextAlignment(QtCore.Qt.AlignVCenter)

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2009-08-12 04:57:24 +0000
+++ openlp/core/ui/servicemanager.py	2009-08-15 07:33:01 +0000
@@ -488,7 +488,7 @@
         link = event.mimeData()
         if link.hasText():
             plugin = event.mimeData().text()
-            self.parent.EventManager.post_event(Event(EventType.LoadServiceItem, u'ServiceManager', plugin))
+            self.parent.EventManager.post_event(Event(u'ServiceManager', EventType.LoadServiceItem, plugin))
 
     def updateThemeList(self, theme_list):
         """

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2009-08-12 04:57:24 +0000
+++ openlp/core/ui/thememanager.py	2009-08-15 07:33:01 +0000
@@ -184,7 +184,7 @@
         self.pushThemes()
 
     def pushThemes(self):
-        self.parent.EventManager.post_event(Event(EventType.ThemeListChanged,u'ThemeManager'))
+        self.parent.EventManager.post_event(Event(u'ThemeManager', EventType.ThemeListChanged, self.getThemes()))
 
     def getThemes(self):
         return self.themelist

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2009-08-12 04:57:24 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2009-08-15 07:33:01 +0000
@@ -81,5 +81,5 @@
         log.debug(u'Handle event called with event %s with payload %s'%(event.event_type, event.payload))
         if event.event_type == EventType.ThemeListChanged:
             log.debug(u'New Theme request received')
-            self.bibles_tab.updateThemeList(self.theme_manager.getThemes())
+            self.bibles_tab.updateThemeList(event.payload)
         return Plugin.handle_event(self, event)

=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
--- openlp/plugins/bibles/forms/bibleimportform.py	2009-07-09 05:15:26 +0000
+++ openlp/plugins/bibles/forms/bibleimportform.py	2009-08-15 07:55:16 +0000
@@ -47,6 +47,7 @@
         self.bibleplugin = bibleplugin
         self.bible_type = None
         self.barmax = 0
+        self.tabWidget.setCurrentIndex(0)
         self.AddressEdit.setText(self.config.get_config(u'proxy_address', u''))
         self.UsernameEdit.setText(self.config.get_config(u'proxy_username',u''))
         self.PasswordEdit.setText(self.config.get_config(u'proxy_password',u''))

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2009-08-05 17:59:37 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2009-08-15 11:02:24 +0000
@@ -25,30 +25,14 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import translate, ServiceItem, MediaManagerItem, \
-    Receiver, contextMenuAction, contextMenuSeparator
+    Receiver, contextMenuAction, contextMenuSeparator,  BaseListWithDnD
 from openlp.plugins.bibles.forms import BibleImportForm
 from openlp.plugins.bibles.lib.manager import BibleMode
 
-class BibleList(QtGui.QListWidget):
-
-    def __init__(self,parent=None,name=None):
-        QtGui.QListView.__init__(self,parent)
-
-    def mouseMoveEvent(self, event):
-        """
-        Drag and drop event does not care what data is selected
-        as the recepient will use events to request the data move
-        just tell it what plugin to call
-        """
-        if event.buttons() != QtCore.Qt.LeftButton:
-            return
-        drag = QtGui.QDrag(self)
-        mimeData = QtCore.QMimeData()
-        drag.setMimeData(mimeData)
-        mimeData.setText(u'Bibles')
-        dropAction = drag.start(QtCore.Qt.CopyAction)
-        if dropAction == QtCore.Qt.CopyAction:
-            self.close()
+class BibleListView(BaseListWithDnD):
+    def __init__(self, parent=None):
+        self.PluginName = u'Bibles'
+        BaseListWithDnD.__init__(self, parent)
 
 class BibleMediaItem(MediaManagerItem):
     """
@@ -201,7 +185,7 @@
         self.SearchTabWidget.addTab(self.AdvancedTab, u'Advanced')
         # Add the search tab widget to the page layout
         self.PageLayout.addWidget(self.SearchTabWidget)
-        self.ListView = BibleList()
+        self.ListView = BibleListView()
         self.ListView.setAlternatingRowColors(True)
         self.ListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
         self.ListView.setDragEnabled(True)

=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py	2009-08-12 04:57:24 +0000
+++ openlp/plugins/custom/customplugin.py	2009-08-15 07:33:01 +0000
@@ -57,5 +57,5 @@
         log.debug(u'Handle event called with event %s with payload %s'%(event.event_type, event.payload))
         if event.event_type == EventType.ThemeListChanged:
             log.debug(u'New Theme request received')
-            self.edit_custom_form.loadThemes(self.theme_manager.getThemes())
+            self.edit_custom_form.loadThemes(event.payload)
         return Plugin.handle_event(self, event)

=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py	2009-07-04 05:52:30 +0000
+++ openlp/plugins/custom/lib/mediaitem.py	2009-08-15 11:02:24 +0000
@@ -21,28 +21,12 @@
 
 from PyQt4 import QtCore, QtGui
 
-from openlp.core.lib import MediaManagerItem,  SongXMLParser,  ServiceItem,  translate, contextMenuAction, contextMenuSeparator
-
-class CustomList(QtGui.QListWidget):
-
-    def __init__(self,parent=None,name=None):
-        QtGui.QListView.__init__(self,parent)
-
-    def mouseMoveEvent(self, event):
-        """
-        Drag and drop event does not care what data is selected
-        as the recepient will use events to request the data move
-        just tell it what plugin to call
-        """
-        if event.buttons() != QtCore.Qt.LeftButton:
-            return
-        drag = QtGui.QDrag(self)
-        mimeData = QtCore.QMimeData()
-        drag.setMimeData(mimeData)
-        mimeData.setText(u'Custom')
-        dropAction = drag.start(QtCore.Qt.CopyAction)
-        if dropAction == QtCore.Qt.CopyAction:
-            self.close()
+from openlp.core.lib import MediaManagerItem,  SongXMLParser,  ServiceItem,  translate, contextMenuAction, contextMenuSeparator, BaseListWithDnD
+
+class CustomListView(BaseListWithDnD):
+    def __init__(self, parent=None):
+        self.PluginName = u'Custom'
+        BaseListWithDnD.__init__(self, parent)
 
 class CustomMediaItem(MediaManagerItem):
     """
@@ -95,7 +79,7 @@
             translate(u'CustomMediaItem',u'Add Custom To Service'),
             translate(u'CustomMediaItem',u'Add the selected Custom(s) to the service'),
             u':/system/system_add.png', self.onCustomAddClick, u'CustomAddItem')
-        # Add the Customlist widget
+        # Add the CustomListView widget
         self.CustomWidget = QtGui.QWidget(self)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
         sizePolicy.setHorizontalStretch(0)
@@ -105,7 +89,7 @@
         self.CustomWidget.setObjectName(u'CustomWidget')
         # Add the Custom widget to the page layout
         self.PageLayout.addWidget(self.CustomWidget)
-        self.ListView = CustomList()
+        self.ListView = CustomListView()
         self.ListView.setAlternatingRowColors(True)
         self.ListView.setDragEnabled(True)
         self.PageLayout.addWidget(self.ListView)
@@ -129,9 +113,9 @@
             translate(u'CustomMediaItem',u'&Add to Service'), self.onCustomAddClick))
 
     def initialise(self):
-        self.loadCustomList(self.parent.custommanager.get_all_slides())
+        self.loadCustomListView(self.parent.custommanager.get_all_slides())
 
-    def loadCustomList(self, list):
+    def loadCustomListView(self, list):
         self.ListView.clear()
         for CustomSlide in list:
             custom_name = QtGui.QListWidgetItem(CustomSlide.title)

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2009-07-04 05:52:30 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2009-08-15 11:02:24 +0000
@@ -32,7 +32,6 @@
 
 from openlp.plugins.media.lib import MediaTab
 from openlp.plugins.media.lib import FileListData
-# from listwithpreviews import ListWithPreviews
 from openlp.core.lib import MediaManagerItem, ServiceItem, translate, BaseListWithDnD, buildIcon
 
 class MediaListView(BaseListWithDnD):

=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py	2009-08-14 19:12:14 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py	2009-08-15 19:10:59 +0000
@@ -93,4 +93,3 @@
     def save(self):
         self.config.set_config(u'Powerpoint', unicode(self.PowerpointCheckBox.checkState()))
         self.config.set_config(u'Impress', unicode(self.ImpressCheckBox.checkState()))
-        print self.PowerpointCheckBox.checkState(), unicode(self.PowerpointCheckBox.checkState())

=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py	2009-08-14 19:12:14 +0000
+++ openlp/plugins/presentations/presentationplugin.py	2009-08-15 19:10:59 +0000
@@ -67,12 +67,12 @@
         """
         log.debug('check_pre_conditions')
 
-        if int(self.config.get_config(u'Powerpoint', 0)) == 2:
+        if int(self.config.get_config(u'Impress', 0)) == 2:
             try:
                 #Check to see if we have uno installed
                 import uno
-                #openoffice = impressController()
-                self.registerControllers(u'Impress', None)
+                openoffice = impressController()
+                self.registerControllers(u'Impress', openoffice)
             except:
                 pass
         #If we have no controllers disable plugin
@@ -80,3 +80,10 @@
             return True
         else:
             return False
+
+    def finalise(self):
+        log.debug(u'Finalise')
+        print self.controllers
+        for controller in self.controllers:
+            print controller
+            self.controllers[controller].kill()

=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py	2009-08-14 17:41:29 +0000
+++ openlp/plugins/remotes/remoteplugin.py	2009-08-15 07:33:01 +0000
@@ -56,9 +56,9 @@
         log.info(u'Sending event %s ',  datagram)
         pos = datagram.find(u':')
         event = unicode(datagram[:pos].lower())
-        payload = unicode(datagram[pos + 1:])
+
         if event == u'alert':
-            self.event_manager.post_event(Event(EventType.TriggerAlert, u'RemotePlugin', payload))
+            self.event_manager.post_event(Event(u'RemotePlugin', EventType.TriggerAlert , unicode(datagram[pos + 1:])))
 
 
 

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2009-08-14 16:12:40 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2009-08-15 19:19:34 +0000
@@ -23,7 +23,7 @@
 from PyQt4 import Qt, QtCore, QtGui
 
 from openlp.core.lib import SongXMLBuilder, SongXMLParser, Event, \
-    EventType, EventManager
+    EventType, EventManager,  translate
 from openlp.plugins.songs.forms import EditVerseForm
 from openlp.plugins.songs.lib.models import Song
 from editsongdialog import Ui_EditSongDialog
@@ -299,22 +299,26 @@
         log.debug(u'Validate Song')
         # Lets be nice and assume the data is correct.
         valid = True
+        message = u''
         if len(self.TitleEditItem.displayText()) == 0:
             valid = False
             self.TitleEditItem.setStyleSheet(u'background-color: red; color: white')
+            message = translate(u'SongFormDialog', u'You need to enter a song title \n')
         else:
             self.TitleEditItem.setStyleSheet(u'')
         if self.VerseListWidget.count() == 0:
             valid = False
             self.VerseListWidget.setStyleSheet(u'background-color: red; color: white')
+            message = message + translate(u'SongFormDialog', u'You need to enter some verse text \n')
         else:
             self.VerseListWidget.setStyleSheet(u'')
         if self.AuthorsListView.count() == 0:
             valid = False
             self.AuthorsListView.setStyleSheet(u'background-color: red; color: white')
+            message = message + translate(u'SongFormDialog', u'You need to provide an author')
         else:
             self.AuthorsListView.setStyleSheet(u'')
-        return valid
+        return valid,  message
 
     def on_TitleEditItem_lostFocus(self):
         self.song.title = self.TitleEditItem.text()
@@ -345,7 +349,11 @@
 
     def accept(self):
         log.debug(u'accept')
-        if not self._validate_song():
+        valid ,  message = self._validate_song()
+        if not valid:
+            QtGui.QMessageBox.critical(self,
+            translate(u'SongFormDialog', u'Error'), message,
+            QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
             return
         self.song.title = unicode(self.TitleEditItem.displayText())
         self.song.copyright = unicode(self.CopyrightEditItem.displayText())
@@ -356,7 +364,7 @@
         self.processTitle()
         self.songmanager.save_song(self.song)
         if self.title_change:
-            self.eventmanager.post_event(Event(EventType.LoadSongList, u'EditSongForm'))
+            self.eventmanager.post_event(Event(u'EditSongForm', EventType.LoadSongList))
         self.close()
 
     def processLyrics(self):

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2009-08-06 13:17:36 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2009-08-15 11:02:24 +0000
@@ -22,29 +22,13 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import MediaManagerItem, translate, ServiceItem, \
-    SongXMLParser, contextMenuAction, contextMenuSeparator
+    SongXMLParser, contextMenuAction, contextMenuSeparator, BaseListWithDnD
 from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm
 
-class SongList(QtGui.QListWidget):
-
-    def __init__(self, parent=None, name=None):
-        QtGui.QListWidget.__init__(self,parent)
-
-    def mouseMoveEvent(self, event):
-        """
-        Drag and drop event does not care what data is selected
-        as the recepient will use events to request the data move
-        just tell it what plugin to call
-        """
-        if event.buttons() != QtCore.Qt.LeftButton:
-            return
-        drag = QtGui.QDrag(self)
-        mimeData = QtCore.QMimeData()
-        drag.setMimeData(mimeData)
-        mimeData.setText(u'Song')
-        dropAction = drag.start(QtCore.Qt.CopyAction)
-        if dropAction == QtCore.Qt.CopyAction:
-            self.close()
+class SongListView(BaseListWithDnD):
+    def __init__(self, parent=None):
+        self.PluginName = u'Song'
+        BaseListWithDnD.__init__(self, parent)
 
 class SongMediaItem(MediaManagerItem):
     """
@@ -97,7 +81,7 @@
         self.addToolbarButton(translate(u'SongMediaItem', u'Song Maintenance'),
             translate(u'SongMediaItem', u'Maintain the lists of authors, topics and books'),
             ':/songs/song_maintenance.png', self.onSongMaintenanceClick, 'SongMaintenanceItem')
-        ## Add the songlist widget ##
+        ## Add the SongListView widget ##
         # Create the tab widget
         self.SongWidget = QtGui.QWidget(self)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
@@ -128,7 +112,7 @@
         self.SearchLayout.addWidget(self.SearchTextButton, 3, 2, 1, 1)
         # Add the song widget to the page layout
         self.PageLayout.addWidget(self.SongWidget)
-        self.ListView = SongList()
+        self.ListView = SongListView()
         self.ListView.setAlternatingRowColors(True)
         self.ListView.setDragEnabled(True)
         self.ListView.setObjectName(u'ListView')

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2009-08-12 04:57:24 +0000
+++ openlp/plugins/songs/songsplugin.py	2009-08-15 07:33:01 +0000
@@ -136,7 +136,7 @@
         log.debug(u'Handle event called with event %s' % event.event_type)
         if event.event_type == EventType.ThemeListChanged:
             log.debug(u'New Theme request received')
-            self.media_item.edit_song_form.loadThemes(self.theme_manager.getThemes())
+            self.media_item.edit_song_form.loadThemes(event.payload)
         if event.event_type == EventType.LoadSongList :
             log.debug(u'Load Load Song List Item received')
             self.media_item.displayResultsSong(self.songmanager.get_songs())


Follow ups