From 2e3ff9706f7770480d6e39d11c21557a1dfe6d23 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 29 Nov 2008 05:36:16 +0000 Subject: [PATCH] Fixed up things that were broken due to the move. bzr-revno: 140 --- .eric4project/openlp.org 2.0.e4q | 2 +- .eric4project/openlp.org 2.0.e4t | 2 +- openlp.org 2.0.e4p | 31 +++++++++++++++++----- openlp.pyw | 1 + openlp/core/__init__.py | 7 ++++- openlp/core/mediamanageritem.py | 4 +-- openlp/core/plugin.py | 2 +- openlp/core/pluginmanager.py | 6 ++--- openlp/core/settingsmanager.py | 2 ++ openlp/core/settingstab.py | 4 +-- openlp/core/ui/mainwindow.py | 2 +- openlp/plugins/biblemanager/bibleplugin.py | 7 +++-- openlp/plugins/songs/songsplugin.py | 4 +-- 13 files changed, 49 insertions(+), 25 deletions(-) diff --git a/.eric4project/openlp.org 2.0.e4q b/.eric4project/openlp.org 2.0.e4q index a4532917d..00dc839b0 100644 --- a/.eric4project/openlp.org 2.0.e4q +++ b/.eric4project/openlp.org 2.0.e4q @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/.eric4project/openlp.org 2.0.e4t b/.eric4project/openlp.org 2.0.e4t index d6a468db6..b013a216f 100644 --- a/.eric4project/openlp.org 2.0.e4t +++ b/.eric4project/openlp.org 2.0.e4t @@ -1,7 +1,7 @@ - + TODO: what is the tags for bridge, pre-chorus? diff --git a/openlp.org 2.0.e4p b/openlp.org 2.0.e4p index 2f3cb0da6..c72c4f9fb 100644 --- a/openlp.org 2.0.e4p +++ b/openlp.org 2.0.e4p @@ -1,7 +1,7 @@ - + Python @@ -24,9 +24,6 @@ openlp/core/plugin.py openlp/core/xmlrootclass.py openlp/plugins/biblemanager/__init__.py - openlp/plugins/biblemanager/BibleDBImpl.py - openlp/plugins/biblemanager/BibleManager.py - openlp/plugins/biblemanager/BibleHTTPImpl.py openlp/plugins/biblemanager/test/__init__.py openlp/plugins/biblemanager/test/test_bibleManager.py openlp/plugins/__init__.py @@ -34,14 +31,11 @@ openlp/plugins/testplugin2/__init__.py openlp/plugins/testplugin2/testplugin2.py openlp/plugins/test/test_plugin_manager.py - openlp/plugins/biblemanager/BibleCommon.py openlp/libraries/pptviewlib/ppttest.py - openlp/plugins/biblemanager/BibleCSVImpl.py openlp/plugins/biblemanager/test/test_bibleManagerAPI.py openlp/plugins/biblemanager/test/test_bibleManagerCSV.py openlp/plugins/mediamanageritem.py openlp/plugins/test/test_mediamanageritem.py - openlp/plugins/biblemanager/BibleOSISImpl.py openlp/plugins/biblemanager/test/test_bibleManagerOSIS.py openlp/core/pluginmanager.py openlp/core/mediamanageritem.py @@ -71,12 +65,35 @@ openlp/plugins/songs/test/test_song_text.py openlp/core/theme/test/test_theme.py openlp/core/event.py + openlp/core/resources.py + openlp/plugins/biblemanager/bibleplugin.py + openlp/plugins/biblemanager/bibleOSISImpl.py + openlp/plugins/biblemanager/bibleHTTPImpl.py + openlp/plugins/biblemanager/bibleDBImpl.py + openlp/plugins/biblemanager/bibleCSVImpl.py + openlp/plugins/biblemanager/bibleCommon.py + openlp/plugins/biblemanager/bibleManager.py + resources/__init__.py +
resources/forms/bibleimport.ui
+
resources/forms/openlpexportform.ui
+
resources/forms/editsongform.ui
+
resources/forms/opensongexportform.ui
+
resources/forms/about.ui
+
resources/forms/settings.ui
+
resources/forms/themewizard.ui
+
resources/forms/opensongimportform.ui
+
resources/forms/alertform.ui
+
resources/forms/mainwindow.ui
+
resources/forms/songexport.ui
+
resources/forms/openlpimportform.ui
+
resources/forms/splashscreen.ui
+ resources/images/openlp-2.qrc diff --git a/openlp.pyw b/openlp.pyw index 5f576bf9d..fc72c8273 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -1,5 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 """ OpenLP - Open Source Lyrics Projection Copyright (c) 2008 Raoul Snyman diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index c860a9519..7becad326 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 """ OpenLP - Open Source Lyrics Projection Copyright (c) 2008 Raoul Snyman @@ -20,5 +22,8 @@ from openlp.core.render import Renderer from openlp.core.settingsmanager import SettingsManager from openlp.core.plugin import Plugin from openlp.core.pluginmanager import PluginManager +from openlp.core.settingstab import SettingsTab +from openlp.core.mediamanageritem import MediaManagerItem -__all__ = ['Renderer', 'SettingsManager', 'Plugin', 'PluginManager'] +__all__ = ['Renderer', 'SettingsManager', 'Plugin', 'PluginManager', + 'SettingsTab', 'MediaManagerItem'] diff --git a/openlp/core/mediamanageritem.py b/openlp/core/mediamanageritem.py index 957401c24..667097858 100644 --- a/openlp/core/mediamanageritem.py +++ b/openlp/core/mediamanageritem.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=80 +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 """ OpenLP - Open Source Lyrics Projection Copyright (c) 2008 Raoul Snyman @@ -20,7 +20,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA import types from PyQt4 import QtCore, QtGui -from openlp.resources import * +from openlp.core.resources import * class MediaManagerItem(QtGui.QWidget): """ diff --git a/openlp/core/plugin.py b/openlp/core/plugin.py index 35c4359d4..29a671411 100644 --- a/openlp/core/plugin.py +++ b/openlp/core/plugin.py @@ -61,7 +61,7 @@ class Plugin(object): be overridden, like so: class MyPlugin(Plugin): def __init__(self): - Plugin.__init('MyPlugin', '0.1') + Plugin.__init(self, 'MyPlugin', '0.1') ... """ if name is not None: diff --git a/openlp/core/pluginmanager.py b/openlp/core/pluginmanager.py index 0ab14a68a..8d16fe073 100644 --- a/openlp/core/pluginmanager.py +++ b/openlp/core/pluginmanager.py @@ -27,7 +27,7 @@ from openlp.core import Plugin mypath=os.path.split(os.path.abspath(__file__))[0] sys.path.insert(0,(os.path.join(mypath, '..' ,'..'))) -class PluginManager: +class PluginManager(object): """ This is the Plugin manager, which loads all the plugins, and executes all the hooks, as and when necessary. @@ -72,7 +72,7 @@ class PluginManager: self.plugins = Plugin.__subclasses__() self.plugin_by_name = {} for p in self.plugins: - self.plugin_by_name[p.name] = p; + self.plugin_by_name[p.Name] = p; def hook_media_manager(self, MediaToolBox): """ @@ -81,6 +81,6 @@ class PluginManager: """ for plugin in self.plugins: if plugin.MediaManagerItem is not None: - log.debug('Inserting media manager item from %s' % plugin.name) + log.debug('Inserting media manager item from %s' % plugin.Name) MediaToolBox.addItem(plugin.MediaManagerItem, plugin.Icon, plugin.Name) diff --git a/openlp/core/settingsmanager.py b/openlp/core/settingsmanager.py index 43fa145dc..84ff69765 100644 --- a/openlp/core/settingsmanager.py +++ b/openlp/core/settingsmanager.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 """ OpenLP - Open Source Lyrics Projection Copyright (c) 2008 Raoul Snyman diff --git a/openlp/core/settingstab.py b/openlp/core/settingstab.py index 27e437f82..a769c81a7 100644 --- a/openlp/core/settingstab.py +++ b/openlp/core/settingstab.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=80 +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 """ OpenLP - Open Source Lyrics Projection Copyright (c) 2008 Raoul Snyman @@ -19,7 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA """ from PyQt4 import QtCore, QtGui -from openlp.resources import * +from openlp.core.resources import * class SettingsTab(QtGui.QWidget): pass diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 005f555ec..4450fd822 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -40,7 +40,7 @@ class MainWindow(object): #self.opensongexportform = OpenSongExportForm() #self.opensongimportform = OpenSongImportForm() self.settings_form = SettingsDialog() - self.plugin_manager = PluginManager() + self.plugin_manager = PluginManager('/home/raoul/Projects/openlp-2/openlp/plugins') def setupUi(self): self.main_window.setObjectName("main_window") diff --git a/openlp/plugins/biblemanager/bibleplugin.py b/openlp/plugins/biblemanager/bibleplugin.py index 4ba271228..cddf47b37 100644 --- a/openlp/plugins/biblemanager/bibleplugin.py +++ b/openlp/plugins/biblemanager/bibleplugin.py @@ -19,13 +19,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA """ from PyQt4 import QtCore, QtGui -#from openlp.resources import * +from openlp.core.resources import * from openlp.core import Plugin class BiblePlugin(Plugin): def __init__(self): # Call the parent constructor - Plugin.__init__('Bible', '1.9.0') + Plugin.__init__(self, 'Bible', '1.9.0') # Create the plugin icon self.Icon = QtGui.QIcon() self.Icon.addPixmap(QtGui.QPixmap(':/media/media_Bible.png'), @@ -75,14 +75,13 @@ class BiblePlugin(Plugin): class runner(QtGui.QApplication): - def run(self): values = ["Genesis","Matthew","Revelation"] self.bim = BibleImportDialog() self.bim.show() self.processEvents() sys.exit(app.exec_()) - + if __name__ == '__main__': app = runner(sys.argv) app.run() diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index ce60faa0d..9cb9538c8 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -19,13 +19,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA """ from PyQt4 import QtCore, QtGui -from openlp.resources import * +from openlp.core.resources import * from openlp.core import Plugin, MediaManagerItem class SongsPlugin(Plugin): def __init__(self): # Call the parent constructor - Plugin.__init__('Song', '1.9.0') + Plugin.__init__(self, 'Song', '1.9.0') # Create the plugin icon self.Icon = QtGui.QIcon() self.Icon.addPixmap(QtGui.QPixmap(':/media/media_song.png'),