diff --git a/.eric4project/openlp.org 2.0.e4q b/.eric4project/openlp.org 2.0.e4q
index c28395f1e..1aafd8913 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 72e817567..7ca1164c2 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 a6b703b46..51a526e9b 100644
--- a/openlp.org 2.0.e4p
+++ b/openlp.org 2.0.e4p
@@ -1,7 +1,7 @@
-
+
Python
@@ -80,6 +80,8 @@
+
+
diff --git a/openlp/core/pluginmanager.py b/openlp/core/pluginmanager.py
index 778e620d2..e6e14faf7 100644
--- a/openlp/core/pluginmanager.py
+++ b/openlp/core/pluginmanager.py
@@ -65,8 +65,8 @@ class PluginManager(object):
log.debug("Importing %s from %s." % (modulename, path))
try:
__import__(modulename, globals(), locals(), [])
- except ImportError:
- pass
+ except ImportError, e:
+ print e.message
self.plugin_classes = Plugin.__subclasses__()
self.plugins = []
plugin_objects = []
diff --git a/openlp/core/utils/confighelper.py b/openlp/core/utils/confighelper.py
index 5eae42851..b3ce011b0 100644
--- a/openlp/core/utils/confighelper.py
+++ b/openlp/core/utils/confighelper.py
@@ -24,12 +24,14 @@ class ConfigHelper(object):
"""
Utility Helper to allow classes to find directories in a standard manner.
"""
+ @staticmethod
def get_registry_value(reg, key, value_name):
k = _winreg.OpenKey(reg, key)
value = _winreg.QueryValueEx(k, value_name)[0]
_winreg.CloseKey(k)
return value
+ @staticmethod
def getConfigPath():
if os.name == 'nt':
import _winreg
@@ -38,17 +40,19 @@ class ConfigHelper(object):
path = get_registry_value(reg, key, "Common AppData")
elif os.name == 'posix':
path = os.path.join(os.getenv('HOME'), ".openlp.org")
- if os.path.exists(path) == False :
- raise Exception ('Configuration Directory does not Exist ')
+ #if os.path.exists(path) == False :
+ # raise Exception ('Configuration Directory does not Exist ')
return path
+ @staticmethod
def getSongsFile():
- path = getConfigPath()
+ path = ConfigHelper.getConfigPath()
songfile = os.path.join(path, ".openlp.org", "Data", "songs.olp")
if os.path.exists(songfile):
filename.set_filename(songfile)
print songfile
+ @staticmethod
def getBiblePath():
- return os.path.join(getConfigPath(), "Data","Bibles")
+ return os.path.join(ConfigHelper.getConfigPath(), "Data","Bibles")
diff --git a/openlp/core/utils/linregistry.py b/openlp/core/utils/linregistry.py
new file mode 100644
index 000000000..f9b37a118
--- /dev/null
+++ b/openlp/core/utils/linregistry.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+"""
+OpenLP - Open Source Lyrics Projection
+Copyright (c) 2008 Raoul Snyman
+Portions copyright (c) 2008 Martin Thompson, Tim Bentley
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+"""
+
+from openlp.core.utils import Registry
+
+class LinRegistry(Registry):
+ """
+ The LinRegistry class is a high-level class for working with Linux and
+ Unix configurations.
+ """
+ def __init__(self):
+ pass
diff --git a/openlp/core/utils/registry.py b/openlp/core/utils/registry.py
new file mode 100644
index 000000000..b520b05be
--- /dev/null
+++ b/openlp/core/utils/registry.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
+"""
+OpenLP - Open Source Lyrics Projection
+Copyright (c) 2008 Raoul Snyman
+Portions copyright (c) 2008 Martin Thompson, Tim Bentley
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+"""
+
+class Registry(object):
+ """
+ The Registry class is a generic class for the accessing configurations.
+ """
+ def __init__(self):
+ pass
diff --git a/openlp/core/utils/winregistry.py b/openlp/core/utils/winregistry.py
index a574d5de9..4b7a7f822 100644
--- a/openlp/core/utils/winregistry.py
+++ b/openlp/core/utils/winregistry.py
@@ -18,7 +18,7 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
"""
-import _winreg
+from openlp.core.utils import Registry
class WinRegistry(Registry):
"""
@@ -26,4 +26,4 @@ class WinRegistry(Registry):
functions in Python.
"""
def __init__(self):
- pass
+ import _winreg