forked from openlp/openlp
Added a WinRegistry helper class, made a few changes.
bzr-revno: 150
This commit is contained in:
parent
0179ffc6bd
commit
026388ce18
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
|
||||
<!-- eric4 user project file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2008-11-30, 21:56:54 -->
|
||||
<!-- Saved: 2008-12-01, 15:10:04 -->
|
||||
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||
<UserProject version="4.0">
|
||||
</UserProject>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
|
||||
<!-- eric4 tasks file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2008-11-30, 21:56:54 -->
|
||||
<!-- Saved: 2008-12-01, 15:10:04 -->
|
||||
<Tasks version="4.2">
|
||||
<Task priority="1" completed="False" bugfix="False">
|
||||
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Project SYSTEM "Project-4.4.dtd">
|
||||
<!-- eric4 project file for project openlp.org 2.0 -->
|
||||
<!-- Saved: 2008-11-30, 21:56:54 -->
|
||||
<!-- Saved: 2008-12-01, 15:10:04 -->
|
||||
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||
<Project version="4.4">
|
||||
<ProgLanguage mixed="0">Python</ProgLanguage>
|
||||
@ -21,8 +21,6 @@
|
||||
<Source>openlp/__init__.py</Source>
|
||||
<Source>demo.py</Source>
|
||||
<Source>openlp/core/settingsmanager.py</Source>
|
||||
<Source>openlp/core/plugin.py</Source>
|
||||
<Source>openlp/core/xmlrootclass.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/__init__.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/test/__init__.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/test/test_bibleManager.py</Source>
|
||||
@ -38,8 +36,6 @@
|
||||
<Source>openlp/plugins/test/test_mediamanageritem.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/test/test_bibleManagerOSIS.py</Source>
|
||||
<Source>openlp/core/pluginmanager.py</Source>
|
||||
<Source>openlp/core/mediamanageritem.py</Source>
|
||||
<Source>openlp/core/settingstab.py</Source>
|
||||
<Source>openlp/core/ui/__init__.py</Source>
|
||||
<Source>openlp/core/ui/mainwindow.py</Source>
|
||||
<Source>openlp/core/ui/splashscreen.py</Source>
|
||||
@ -64,7 +60,6 @@
|
||||
<Source>openlp/plugins/songs/test/test_song_verse.py</Source>
|
||||
<Source>openlp/plugins/songs/test/test_song_text.py</Source>
|
||||
<Source>openlp/core/theme/test/test_theme.py</Source>
|
||||
<Source>openlp/core/event.py</Source>
|
||||
<Source>openlp/core/resources.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/bibleplugin.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/bibleOSISImpl.py</Source>
|
||||
@ -78,6 +73,13 @@
|
||||
<Source>openlp/plugins/biblemanager/forms/bibleimportform.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/forms/bibleimportprogressform.py</Source>
|
||||
<Source>openlp/plugins/biblemanager/forms/bibleimportprogressdialog.py</Source>
|
||||
<Source>openlp/core/lib/__init__.py</Source>
|
||||
<Source>openlp/core/lib/xmlrootclass.py</Source>
|
||||
<Source>openlp/core/lib/settingstab.py</Source>
|
||||
<Source>openlp/core/lib/plugin.py</Source>
|
||||
<Source>openlp/core/lib/mediamanageritem.py</Source>
|
||||
<Source>openlp/core/lib/event.py</Source>
|
||||
<Source>openlp/core/lib/winregistry.py</Source>
|
||||
</Sources>
|
||||
<Forms>
|
||||
<Form>resources/forms/bibleimport.ui</Form>
|
||||
|
@ -18,12 +18,8 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
|
||||
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
|
||||
from render import Renderer
|
||||
from settingsmanager import SettingsManager
|
||||
from pluginmanager import PluginManager
|
||||
|
||||
__all__ = ['Renderer', 'SettingsManager', 'Plugin', 'PluginManager',
|
||||
'SettingsTab', 'MediaManagerItem']
|
||||
__all__ = ['Renderer', 'SettingsManager', 'PluginManager']
|
||||
|
@ -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
|
||||
|
@ -1 +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 plugin import Plugin
|
||||
from settingstab import SettingsTab
|
||||
from mediamanageritem import MediaManagerItem
|
||||
from event import Event
|
||||
from xmlrootclass import XmlRootClass
|
||||
from winregistry import WinRegistry
|
||||
|
||||
__all__ = ['Plugin', 'SettingsTab', 'MediaManagerItem', 'Event', 'XmlRootClass',
|
||||
'WinRegistry']
|
||||
|
29
openlp/core/lib/winregistry.py
Normal file
29
openlp/core/lib/winregistry.py
Normal file
@ -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
|
||||
"""
|
||||
|
||||
import _winreg
|
||||
|
||||
class WinRegistry(object):
|
||||
"""
|
||||
The WinRegistry class is a high-level wrapper class for the Windows registry
|
||||
functions in Python.
|
||||
"""
|
||||
def __init__(self):
|
||||
pass
|
@ -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
|
||||
|
@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
import os, sys
|
||||
import logging
|
||||
|
||||
from openlp.core import Plugin
|
||||
from openlp.core.lib import Plugin, Event
|
||||
|
||||
# Not sure what this is for. I prefer keeping as much code in the class as possible.
|
||||
mypath=os.path.split(os.path.abspath(__file__))[0]
|
||||
@ -76,7 +76,7 @@ class PluginManager(object):
|
||||
plugin = p()
|
||||
self.plugin_by_name[plugin.Name] = plugin;
|
||||
|
||||
def hook_media_manager(self, MediaToolBox):
|
||||
def hookMediaManager(self, mediatoolbox):
|
||||
"""
|
||||
Loop through all the plugins. If a plugin has a valid media manager item,
|
||||
add it to the media manager.
|
||||
@ -86,5 +86,7 @@ class PluginManager(object):
|
||||
media_manager_item = plugin.getMediaManagerItem()
|
||||
if media_manager_item is not None:
|
||||
log.debug('Inserting media manager item from %s' % plugin.Name)
|
||||
MediaToolBox.addItem(media_manager_item, plugin.Icon, plugin.Name)
|
||||
mediatoolbox.addItem(media_manager_item, plugin.Icon, plugin.Name)
|
||||
|
||||
def hookHandleEvent(self, event):
|
||||
pass
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -22,7 +24,7 @@ import os
|
||||
from PyQt4 import QtGui
|
||||
sys.path.append(os.path.abspath("./../.."))
|
||||
|
||||
from openlp.core.xmlrootclass import XmlRootClass
|
||||
from openlp.core.lib import XmlRootClass
|
||||
|
||||
blankstylexml=\
|
||||
'''<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
@ -160,7 +160,7 @@ class MainWindow(object):
|
||||
self.MediaToolBox.setObjectName("MediaToolBox")
|
||||
# This is where we will eventually get the Plugin Manager to pull in
|
||||
# the media manager items.
|
||||
self.plugin_manager.hook_media_manager(self.MediaToolBox)
|
||||
self.plugin_manager.hookMediaManager(self.MediaToolBox)
|
||||
# End adding media manager items.
|
||||
self.MediaManagerLayout.addWidget(self.MediaToolBox)
|
||||
self.MediaManagerDock.setWidget(self.MediaManagerContents)
|
||||
|
@ -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
|
||||
@ -18,8 +20,10 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
import os
|
||||
|
||||
# Utility Helper to allow classes to find directories in a standard manner
|
||||
|
||||
class ConfigHelper(object):
|
||||
"""
|
||||
Utility Helper to allow classes to find directories in a standard manner.
|
||||
"""
|
||||
def get_registry_value(reg, key, value_name):
|
||||
k = _winreg.OpenKey(reg, key)
|
||||
value = _winreg.QueryValueEx(k, value_name)[0]
|
||||
|
@ -0,0 +1,22 @@
|
||||
# -*- 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 editsongform import EditSongForm
|
||||
|
@ -1,15 +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,
|
||||
|
||||
# Form implementation generated from reading ui file 'C:\Project Folders\Personal Projects\openlp-2\trunk\openlp\resources\forms\editsongform.ui'
|
||||
#
|
||||
# Created: Wed Nov 05 20:55:02 2008
|
||||
# by: PyQt4 UI code generator 4.4.4-snapshot-20080918
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
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 PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.resources import *
|
||||
from openlp.core.resources import *
|
||||
|
||||
class EditSongForm(object):
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
# -*- 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
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
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
|
||||
@ -21,11 +21,13 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.resources import *
|
||||
from openlp.core import Plugin, MediaManagerItem
|
||||
from forms import EditSongForm
|
||||
|
||||
class SongsPlugin(Plugin):
|
||||
def __init__(self):
|
||||
# Call the parent constructor
|
||||
Plugin.__init__(self, 'Songs', '1.9.0')
|
||||
self.edit_song_form = EditSongForm()
|
||||
|
||||
def getMediaManagerItem(self):
|
||||
# Create the plugin icon
|
||||
@ -70,7 +72,7 @@ class SongsPlugin(Plugin):
|
||||
pass
|
||||
|
||||
def onSongEditClick(self):
|
||||
pass
|
||||
self.edit_song_form.show()
|
||||
|
||||
def onSongDeleteClick(self):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user