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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
|
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
|
||||||
<!-- eric4 user project file for project openlp.org 2.0 -->
|
<!-- 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 -->
|
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||||
<UserProject version="4.0">
|
<UserProject version="4.0">
|
||||||
</UserProject>
|
</UserProject>
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
|
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
|
||||||
<!-- eric4 tasks file for project openlp.org 2.0 -->
|
<!-- 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">
|
<Tasks version="4.2">
|
||||||
<Task priority="1" completed="False" bugfix="False">
|
<Task priority="1" completed="False" bugfix="False">
|
||||||
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>
|
<Summary>TODO: what is the tags for bridge, pre-chorus?</Summary>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE Project SYSTEM "Project-4.4.dtd">
|
<!DOCTYPE Project SYSTEM "Project-4.4.dtd">
|
||||||
<!-- eric4 project file for project openlp.org 2.0 -->
|
<!-- 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 -->
|
<!-- Copyright (C) 2008 Raoul Snyman, raoulsnyman@openlp.org -->
|
||||||
<Project version="4.4">
|
<Project version="4.4">
|
||||||
<ProgLanguage mixed="0">Python</ProgLanguage>
|
<ProgLanguage mixed="0">Python</ProgLanguage>
|
||||||
@ -21,8 +21,6 @@
|
|||||||
<Source>openlp/__init__.py</Source>
|
<Source>openlp/__init__.py</Source>
|
||||||
<Source>demo.py</Source>
|
<Source>demo.py</Source>
|
||||||
<Source>openlp/core/settingsmanager.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/__init__.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/test/__init__.py</Source>
|
<Source>openlp/plugins/biblemanager/test/__init__.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/test/test_bibleManager.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/test/test_mediamanageritem.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/test/test_bibleManagerOSIS.py</Source>
|
<Source>openlp/plugins/biblemanager/test/test_bibleManagerOSIS.py</Source>
|
||||||
<Source>openlp/core/pluginmanager.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/__init__.py</Source>
|
||||||
<Source>openlp/core/ui/mainwindow.py</Source>
|
<Source>openlp/core/ui/mainwindow.py</Source>
|
||||||
<Source>openlp/core/ui/splashscreen.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_verse.py</Source>
|
||||||
<Source>openlp/plugins/songs/test/test_song_text.py</Source>
|
<Source>openlp/plugins/songs/test/test_song_text.py</Source>
|
||||||
<Source>openlp/core/theme/test/test_theme.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/core/resources.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/bibleplugin.py</Source>
|
<Source>openlp/plugins/biblemanager/bibleplugin.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/bibleOSISImpl.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/bibleimportform.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/forms/bibleimportprogressform.py</Source>
|
<Source>openlp/plugins/biblemanager/forms/bibleimportprogressform.py</Source>
|
||||||
<Source>openlp/plugins/biblemanager/forms/bibleimportprogressdialog.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>
|
</Sources>
|
||||||
<Forms>
|
<Forms>
|
||||||
<Form>resources/forms/bibleimport.ui</Form>
|
<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
|
Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from openlp.core.render import Renderer
|
from render import Renderer
|
||||||
from openlp.core.settingsmanager import SettingsManager
|
from settingsmanager import SettingsManager
|
||||||
from openlp.core.plugin import Plugin
|
from pluginmanager import PluginManager
|
||||||
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', 'PluginManager']
|
||||||
'SettingsTab', 'MediaManagerItem']
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||||
"""
|
"""
|
||||||
OpenLP - Open Source Lyrics Projection
|
OpenLP - Open Source Lyrics Projection
|
||||||
Copyright (c) 2008 Raoul Snyman
|
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
|
OpenLP - Open Source Lyrics Projection
|
||||||
Copyright (c) 2008 Raoul Snyman
|
Copyright (c) 2008 Raoul Snyman
|
||||||
|
@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
import os, sys
|
import os, sys
|
||||||
import logging
|
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.
|
# 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]
|
mypath=os.path.split(os.path.abspath(__file__))[0]
|
||||||
@ -76,7 +76,7 @@ class PluginManager(object):
|
|||||||
plugin = p()
|
plugin = p()
|
||||||
self.plugin_by_name[plugin.Name] = plugin;
|
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,
|
Loop through all the plugins. If a plugin has a valid media manager item,
|
||||||
add it to the media manager.
|
add it to the media manager.
|
||||||
@ -86,5 +86,7 @@ class PluginManager(object):
|
|||||||
media_manager_item = plugin.getMediaManagerItem()
|
media_manager_item = plugin.getMediaManagerItem()
|
||||||
if media_manager_item is not None:
|
if media_manager_item 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(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
|
OpenLP - Open Source Lyrics Projection
|
||||||
Copyright (c) 2008 Raoul Snyman
|
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
|
OpenLP - Open Source Lyrics Projection
|
||||||
Copyright (c) 2008 Raoul Snyman
|
Copyright (c) 2008 Raoul Snyman
|
||||||
@ -22,7 +24,7 @@ import os
|
|||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
sys.path.append(os.path.abspath("./../.."))
|
sys.path.append(os.path.abspath("./../.."))
|
||||||
|
|
||||||
from openlp.core.xmlrootclass import XmlRootClass
|
from openlp.core.lib import XmlRootClass
|
||||||
|
|
||||||
blankstylexml=\
|
blankstylexml=\
|
||||||
'''<?xml version="1.0" encoding="iso-8859-1"?>
|
'''<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
@ -160,7 +160,7 @@ class MainWindow(object):
|
|||||||
self.MediaToolBox.setObjectName("MediaToolBox")
|
self.MediaToolBox.setObjectName("MediaToolBox")
|
||||||
# This is where we will eventually get the Plugin Manager to pull in
|
# This is where we will eventually get the Plugin Manager to pull in
|
||||||
# the media manager items.
|
# the media manager items.
|
||||||
self.plugin_manager.hook_media_manager(self.MediaToolBox)
|
self.plugin_manager.hookMediaManager(self.MediaToolBox)
|
||||||
# End adding media manager items.
|
# End adding media manager items.
|
||||||
self.MediaManagerLayout.addWidget(self.MediaToolBox)
|
self.MediaManagerLayout.addWidget(self.MediaToolBox)
|
||||||
self.MediaManagerDock.setWidget(self.MediaManagerContents)
|
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
|
OpenLP - Open Source Lyrics Projection
|
||||||
Copyright (c) 2008 Raoul Snyman
|
Copyright (c) 2008 Raoul Snyman
|
||||||
@ -18,33 +20,35 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
import os
|
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]
|
||||||
|
_winreg.CloseKey(k)
|
||||||
|
return value
|
||||||
|
|
||||||
def get_registry_value(reg, key, value_name):
|
def getConfigPath():
|
||||||
k = _winreg.OpenKey(reg, key)
|
if os.name == 'nt':
|
||||||
value = _winreg.QueryValueEx(k, value_name)[0]
|
import _winreg
|
||||||
_winreg.CloseKey(k)
|
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
|
||||||
return value
|
key = r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
|
||||||
|
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 ')
|
||||||
|
return path
|
||||||
|
|
||||||
def getConfigPath():
|
def getSongsFile():
|
||||||
if os.name == 'nt':
|
path = getConfigPath()
|
||||||
import _winreg
|
songfile = os.path.join(path, ".openlp.org", "Data", "songs.olp")
|
||||||
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
|
if os.path.exists(songfile):
|
||||||
key = r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
|
filename.set_filename(songfile)
|
||||||
path = get_registry_value(reg, key, "Common AppData")
|
print songfile
|
||||||
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 ')
|
|
||||||
return path
|
|
||||||
|
|
||||||
def getSongsFile():
|
def getBiblePath():
|
||||||
path = getConfigPath()
|
return os.path.join(getConfigPath(), "Data","Bibles")
|
||||||
songfile = os.path.join(path, ".openlp.org", "Data", "songs.olp")
|
|
||||||
if os.path.exists(songfile):
|
|
||||||
filename.set_filename(songfile)
|
|
||||||
print songfile
|
|
||||||
|
|
||||||
def getBiblePath():
|
|
||||||
return os.path.join(getConfigPath(), "Data","Bibles")
|
|
||||||
|
|
||||||
|
@ -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 -*-
|
# -*- 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'
|
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
|
||||||
# Created: Wed Nov 05 20:55:02 2008
|
Foundation; version 2 of the License.
|
||||||
# by: PyQt4 UI code generator 4.4.4-snapshot-20080918
|
|
||||||
#
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# WARNING! All changes made in this file will be lost!
|
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 PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.resources import *
|
from openlp.core.resources import *
|
||||||
|
|
||||||
class EditSongForm(object):
|
class EditSongForm(object):
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- 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
|
OpenLP - Open Source Lyrics Projection
|
||||||
Copyright (c) 2008 Raoul Snyman
|
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
|
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
|
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 PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.resources import *
|
from openlp.core.resources import *
|
||||||
from openlp.core import Plugin, MediaManagerItem
|
from openlp.core import Plugin, MediaManagerItem
|
||||||
|
from forms import EditSongForm
|
||||||
|
|
||||||
class SongsPlugin(Plugin):
|
class SongsPlugin(Plugin):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Call the parent constructor
|
# Call the parent constructor
|
||||||
Plugin.__init__(self, 'Songs', '1.9.0')
|
Plugin.__init__(self, 'Songs', '1.9.0')
|
||||||
|
self.edit_song_form = EditSongForm()
|
||||||
|
|
||||||
def getMediaManagerItem(self):
|
def getMediaManagerItem(self):
|
||||||
# Create the plugin icon
|
# Create the plugin icon
|
||||||
@ -70,7 +72,7 @@ class SongsPlugin(Plugin):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def onSongEditClick(self):
|
def onSongEditClick(self):
|
||||||
pass
|
self.edit_song_form.show()
|
||||||
|
|
||||||
def onSongDeleteClick(self):
|
def onSongDeleteClick(self):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user