openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00468
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
Raoul Snyman (raoul-snyman)
Tim Bentley (trb143)
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/12585
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw 2009-09-25 23:06:54 +0000
+++ openlp.pyw 2009-09-29 13:00:32 +0000
@@ -25,8 +25,8 @@
import sys
import logging
-import logging.handlers
+from logging.handlers import RotatingFileHandler
from optparse import OptionParser
from PyQt4 import QtCore, QtGui
@@ -94,10 +94,9 @@
action="store_true", help="set logging to DEBUG level")
# Set up logging
filename = u'openlp.log'
- logfile = logging.handlers.RotatingFileHandler(
- filename, maxBytes=200000, backupCount=5)
- logfile.setFormatter(
- logging.Formatter(u'%(asctime)s %(name)-15s %(levelname)-8s %(message)s'))
+ logfile = RotatingFileHandler(filename, maxBytes=200000, backupCount=5)
+ logfile.setFormatter(logging.Formatter(
+ u'%(asctime)s %(name)-15s %(levelname)-8s %(message)s'))
log.addHandler(logfile)
# Parse command line options and deal with them.
(options, args) = parser.parse_args()
=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py 2009-09-25 23:06:54 +0000
+++ openlp/core/lib/__init__.py 2009-09-29 13:00:32 +0000
@@ -44,8 +44,8 @@
``text``
The text to put into the translation tables for translation.
"""
- return QtGui.QApplication.translate(context, text, None,
- QtGui.QApplication.UnicodeUTF8)
+ return QtGui.QApplication.translate(
+ context, text, None, QtGui.QApplication.UnicodeUTF8)
def file_to_xml(xmlfile):
"""
@@ -84,15 +84,15 @@
elif type(icon) is types.StringType or type(icon) is types.UnicodeType:
ButtonIcon = QtGui.QIcon()
if icon.startswith(u':/'):
- ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
- QtGui.QIcon.Off)
+ ButtonIcon.addPixmap(
+ QtGui.QPixmap(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
else:
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
QtGui.QIcon.Normal, QtGui.QIcon.Off)
elif type(icon) is QtGui.QImage:
ButtonIcon = QtGui.QIcon()
- ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(icon),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ ButtonIcon.addPixmap(
+ QtGui.QPixmap.fromImage(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
return ButtonIcon
def contextMenuAction(base, icon, text, slot):
@@ -100,7 +100,7 @@
Utility method to help build context menus for plugins
"""
action = QtGui.QAction(text, base)
- action .setIcon(buildIcon(icon))
+ action.setIcon(buildIcon(icon))
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
return action
=== modified file 'openlp/core/lib/dockwidget.py'
--- openlp/core/lib/dockwidget.py 2009-09-25 00:43:42 +0000
+++ openlp/core/lib/dockwidget.py 2009-09-29 13:00:32 +0000
@@ -38,6 +38,7 @@
self.parent = parent
if name is not None:
self.setObjectName(name)
+ self.setFloating(False)
self.log = logging.getLogger(u'OpenLPDockWidget')
self.log.debug(u'Init done')
=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py 2009-09-19 19:31:18 +0000
+++ openlp/core/lib/eventreceiver.py 2009-09-29 13:00:32 +0000
@@ -141,5 +141,3 @@
Get the global ``eventreceiver`` instance.
"""
return Receiver.eventreceiver
-
-
=== modified file 'openlp/core/lib/settingsmanager.py'
--- openlp/core/lib/settingsmanager.py 2009-09-19 11:25:01 +0000
+++ openlp/core/lib/settingsmanager.py 2009-09-29 13:00:32 +0000
@@ -1,24 +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-2009 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
-"""
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2009 Raoul Snyman #
+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
+# --------------------------------------------------------------------------- #
+# 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.lib import str_to_bool
from openlp.core.utils import ConfigHelper
=== modified file 'openlp/core/lib/themexmlhandler.py'
--- openlp/core/lib/themexmlhandler.py 2009-09-26 18:22:10 +0000
+++ openlp/core/lib/themexmlhandler.py 2009-09-29 13:00:32 +0000
@@ -372,8 +372,8 @@
"""
Return a string representation of this object.
"""
- s = u''
- for k in dir(self):
- if k[0:1] != u'_':
- s += u'%30s: %s\n' %(k, getattr(self, k))
- return s
+ theme_strings = []
+ for key in dir(self):
+ if key[0:1] != u'_':
+ theme_strings.append(u'%30s: %s' % (key, getattr(self, key)))
+ return u'\n'.join(theme_strings)
=== modified file 'openlp/core/lib/toolbar.py'
--- openlp/core/lib/toolbar.py 2009-09-15 18:56:56 +0000
+++ openlp/core/lib/toolbar.py 2009-09-29 13:00:32 +0000
@@ -22,11 +22,12 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-import types
import logging
from PyQt4 import QtCore, QtGui
+from openlp.core.lib import buildIcon
+
class OpenLPToolbar(QtGui.QToolBar):
"""
Lots of toolbars around the place, so it makes sense to have a common way
@@ -66,17 +67,7 @@
``objectname``
The name of the object, as used in `<button>.setObjectName()`.
"""
- ButtonIcon = None
- if type(icon) is QtGui.QIcon:
- ButtonIcon = icon
- elif type(icon) is types.StringType or type(icon) is types.UnicodeType:
- ButtonIcon = QtGui.QIcon()
- if icon.startswith(u':/'):
- ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
- QtGui.QIcon.Off)
- else:
- ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(
- QtGui.QImage(icon)), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ ButtonIcon = buildIcon(icon)
if ButtonIcon is not None:
if slot is not None:
ToolbarButton = self.addAction(ButtonIcon, title, slot)
=== modified file 'openlp/core/theme/theme.py'
--- openlp/core/theme/theme.py 2009-09-26 18:22:10 +0000
+++ openlp/core/theme/theme.py 2009-09-29 13:00:32 +0000
@@ -54,7 +54,7 @@
</Theme>
'''
-class Theme:
+class Theme(object):
def __init__(self, xml):
""" stores the info about a theme
attributes:
@@ -100,13 +100,13 @@
self._set_from_XML(xml)
def _get_as_string(self):
- s = u''
- keys=dir(self)
+ theme_strings = []
+ keys = dir(self)
keys.sort()
- for k in keys:
- if k[0:1] != u'_':
- s += u'_%s_' %(getattr(self,k))
- return s
+ for key in keys:
+ if key[0:1] != u'_':
+ theme_strings.append(u'_%s_' % (getattr(self, key)))
+ return u''.join(theme_strings)
def _set_from_XML(self, xml):
root = ElementTree(element=XML(xml))
@@ -135,12 +135,12 @@
if (element.tag.find(u'Color') > 0 or
(element.tag.find(u'BackgroundParameter') == 0 and type(val) == type(0))):
# convert to a wx.Colour
- val= QtGui.QColor((val>>16) & 0xFF, (val>>8)&0xFF, val&0xFF)
+ val = QtGui.QColor((val>>16) & 0xFF, (val>>8)&0xFF, val&0xFF)
setattr(self, element.tag, val)
def __str__(self):
- s = u''
- for k in dir(self):
- if k[0:1] != u'_':
- s += u'%30s : %s\n' %(k, getattr(self, k))
- return s
+ theme_strings = []
+ for key in dir(self):
+ if key[0:1] != u'_':
+ theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
+ return u'\n'.join(theme_strings)
=== modified file 'openlp/core/ui/about.py'
--- openlp/core/ui/about.py 2009-09-08 19:58:05 +0000
+++ openlp/core/ui/about.py 2009-09-29 13:00:32 +0000
@@ -24,7 +24,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class AboutForm(QtGui.QDialog):
"""
@@ -44,8 +44,7 @@
"""
AboutForm.setObjectName(u'AboutForm')
AboutForm.resize(470, 481)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
AboutForm.setWindowIcon(icon)
AboutFormLayout = QtGui.QVBoxLayout(AboutForm)
AboutFormLayout.setSpacing(8)
=== modified file 'openlp/core/ui/alertform.py'
--- openlp/core/ui/alertform.py 2009-09-08 19:58:05 +0000
+++ openlp/core/ui/alertform.py 2009-09-29 13:00:32 +0000
@@ -24,7 +24,7 @@
import logging
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class AlertForm(QtGui.QDialog):
global log
@@ -39,8 +39,7 @@
def setupUi(self, AlertForm):
AlertForm.setObjectName(u'AlertForm')
AlertForm.resize(370, 110)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
AlertForm.setWindowIcon(icon)
self.AlertFormLayout = QtGui.QVBoxLayout(AlertForm)
self.AlertFormLayout.setSpacing(8)
=== modified file 'openlp/core/ui/amendthemedialog.py'
--- openlp/core/ui/amendthemedialog.py 2009-09-08 19:58:05 +0000
+++ openlp/core/ui/amendthemedialog.py 2009-09-29 13:00:32 +0000
@@ -23,15 +23,14 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class Ui_AmendThemeDialog(object):
def setupUi(self, AmendThemeDialog):
AmendThemeDialog.setObjectName(u'AmendThemeDialog')
AmendThemeDialog.setWindowModality(QtCore.Qt.ApplicationModal)
AmendThemeDialog.resize(586, 651)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
AmendThemeDialog.setWindowIcon(icon)
AmendThemeDialog.setModal(True)
self.AmendThemeLayout = QtGui.QVBoxLayout(AmendThemeDialog)
@@ -116,8 +115,7 @@
self.ImageLineEdit.setObjectName(u'ImageLineEdit')
self.horizontalLayout_2.addWidget(self.ImageLineEdit)
self.ImageToolButton = QtGui.QToolButton(self.ImageFilenameWidget)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/images/image_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/images/image_load.png')
self.ImageToolButton.setIcon(icon1)
self.ImageToolButton.setObjectName(u'ImageToolButton')
self.horizontalLayout_2.addWidget(self.ImageToolButton)
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2009-09-25 00:43:42 +0000
+++ openlp/core/ui/mainwindow.py 2009-09-29 13:00:32 +0000
@@ -31,7 +31,7 @@
ServiceManager, ThemeManager, MainDisplay, SlideController, \
PluginForm
from openlp.core.lib import translate, RenderManager, PluginConfig, \
- OpenLPDockWidget, SettingsManager, PluginManager, Receiver
+ OpenLPDockWidget, SettingsManager, PluginManager, Receiver, buildIcon
class Ui_MainWindow(object):
@@ -49,10 +49,8 @@
sizePolicy.setHeightForWidth(
MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
- main_icon = QtGui.QIcon()
- main_icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
- MainWindow.setWindowIcon(main_icon)
+ MainIcon = buildIcon(u':/icon/openlp-logo-16x16.png')
+ MainWindow.setWindowIcon(MainIcon)
# Set up the main container, which contains all the other form widgets
self.MainContent = QtGui.QWidget(MainWindow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
@@ -106,11 +104,8 @@
self.StatusBar.addPermanentWidget(self.DefaultThemeLabel)
# Create the MediaManager
self.MediaManagerDock = OpenLPDockWidget(MainWindow)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/system/system_mediamanager.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.MediaManagerDock.setWindowIcon(icon)
- self.MediaManagerDock.setFloating(False)
+ MediaManagerIcon = buildIcon(u':/system/system_mediamanager.png')
+ self.MediaManagerDock.setWindowIcon(MediaManagerIcon)
self.MediaManagerDock.setObjectName(u'MediaManagerDock')
self.MediaManagerDock.setMinimumWidth(
self.settingsmanager.mainwindow_left)
@@ -136,13 +131,8 @@
self.MediaManagerDock.setVisible(self.settingsmanager.showMediaManager)
# Create the service manager
self.ServiceManagerDock = OpenLPDockWidget(MainWindow)
- ServiceManagerIcon = QtGui.QIcon()
- ServiceManagerIcon.addPixmap(
- QtGui.QPixmap(u':/system/system_servicemanager.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ ServiceManagerIcon = buildIcon(u':/system/system_servicemanager.png')
self.ServiceManagerDock.setWindowIcon(ServiceManagerIcon)
- self.ServiceManagerDock.setFeatures(
- QtGui.QDockWidget.AllDockWidgetFeatures)
self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
self.ServiceManagerDock.setMinimumWidth(
self.settingsmanager.mainwindow_right)
@@ -154,12 +144,8 @@
self.settingsmanager.showServiceManager)
# Create the theme manager
self.ThemeManagerDock = OpenLPDockWidget(MainWindow)
- ThemeManagerIcon = QtGui.QIcon()
- ThemeManagerIcon.addPixmap(
- QtGui.QPixmap(u':/system/system_thememanager.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ ThemeManagerIcon = buildIcon(u':/system/system_thememanager.png')
self.ThemeManagerDock.setWindowIcon(ThemeManagerIcon)
- self.ThemeManagerDock.setFloating(False)
self.ThemeManagerDock.setObjectName(u'ThemeManagerDock')
self.ThemeManagerContents = ThemeManager(self)
self.ThemeManagerDock.setWidget(self.ThemeManagerContents)
@@ -185,9 +171,7 @@
self.FileSaveAsItem = QtGui.QAction(MainWindow)
self.FileSaveAsItem.setObjectName(u'FileSaveAsItem')
self.FileExitItem = QtGui.QAction(MainWindow)
- ExitIcon = QtGui.QIcon()
- ExitIcon.addPixmap(QtGui.QPixmap(u':/system/system_exit.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ ExitIcon = buildIcon(u':/system/system_exit.png')
self.FileExitItem.setIcon(ExitIcon)
self.FileExitItem.setObjectName(u'FileExitItem')
self.ImportThemeItem = QtGui.QAction(MainWindow)
@@ -201,16 +185,14 @@
self.actionLook_Feel = QtGui.QAction(MainWindow)
self.actionLook_Feel.setObjectName(u'actionLook_Feel')
self.OptionsSettingsItem = QtGui.QAction(MainWindow)
- SettingsIcon = QtGui.QIcon()
- SettingsIcon.addPixmap(QtGui.QPixmap(u':/system/system_settings.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ SettingsIcon = buildIcon(u':/system/system_settings.png')
self.OptionsSettingsItem.setIcon(SettingsIcon)
self.OptionsSettingsItem.setObjectName(u'OptionsSettingsItem')
self.ViewMediaManagerItem = QtGui.QAction(MainWindow)
self.ViewMediaManagerItem.setCheckable(True)
self.ViewMediaManagerItem.setChecked(
self.settingsmanager.showMediaManager)
- self.ViewMediaManagerItem.setIcon(icon)
+ self.ViewMediaManagerItem.setIcon(MediaManagerIcon)
self.ViewMediaManagerItem.setObjectName(u'ViewMediaManagerItem')
self.ViewThemeManagerItem = QtGui.QAction(MainWindow)
self.ViewThemeManagerItem.setCheckable(True)
@@ -225,28 +207,19 @@
self.ViewServiceManagerItem.setIcon(ServiceManagerIcon)
self.ViewServiceManagerItem.setObjectName(u'ViewServiceManagerItem')
self.ToolsAlertItem = QtGui.QAction(MainWindow)
- AlertIcon = QtGui.QIcon()
- AlertIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ AlertIcon = buildIcon(u':/tools/tools_alert.png')
self.ToolsAlertItem.setIcon(AlertIcon)
self.ToolsAlertItem.setObjectName(u'ToolsAlertItem')
self.PluginItem = QtGui.QAction(MainWindow)
- PluginIcon = QtGui.QIcon()
- PluginIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ #PluginIcon = buildIcon(u':/tools/tools_alert.png')
self.PluginItem.setIcon(AlertIcon)
self.PluginItem.setObjectName(u'PluginItem')
self.HelpDocumentationItem = QtGui.QAction(MainWindow)
- ContentsIcon = QtGui.QIcon()
- ContentsIcon.addPixmap(QtGui.QPixmap(
- u':/system/system_help_contents.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ ContentsIcon = buildIcon(u':/system/system_help_contents.png')
self.HelpDocumentationItem.setIcon(ContentsIcon)
self.HelpDocumentationItem.setObjectName(u'HelpDocumentationItem')
self.HelpAboutItem = QtGui.QAction(MainWindow)
- AboutIcon = QtGui.QIcon()
- AboutIcon.addPixmap(QtGui.QPixmap(u':/system/system_about.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ AboutIcon = buildIcon(u':/system/system_about.png')
self.HelpAboutItem.setIcon(AboutIcon)
self.HelpAboutItem.setObjectName(u'HelpAboutItem')
self.HelpOnlineHelpItem = QtGui.QAction(MainWindow)
@@ -258,9 +231,7 @@
self.LanguageEnglishItem = QtGui.QAction(MainWindow)
self.LanguageEnglishItem.setObjectName(u'LanguageEnglishItem')
self.ToolsAddToolItem = QtGui.QAction(MainWindow)
- AddToolIcon = QtGui.QIcon()
- AddToolIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_add.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ AddToolIcon = buildIcon(u':/tools/tools_add.png')
self.ToolsAddToolItem.setIcon(AddToolIcon)
self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem')
self.action_Preview_Panel = QtGui.QAction(MainWindow)
@@ -457,7 +428,7 @@
self.generalConfig = PluginConfig(u'General')
self.alertForm = AlertForm(self)
self.pluginForm = PluginForm(self)
- self.aboutForm = AboutForm()
+ self.aboutForm = AboutForm(self)
self.settingsForm = SettingsForm(self.screenList, self)
# Set up the path with plugins
pluginpath = os.path.split(os.path.abspath(__file__))[0]
=== modified file 'openlp/core/ui/splashscreen.py'
--- openlp/core/ui/splashscreen.py 2009-09-21 17:56:36 +0000
+++ openlp/core/ui/splashscreen.py 2009-09-29 13:00:32 +0000
@@ -23,7 +23,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class SplashScreen(object):
def __init__(self, version):
@@ -45,11 +45,9 @@
self.splash_screen.sizePolicy().hasHeightForWidth())
self.splash_screen.setSizePolicy(sizePolicy)
self.splash_screen.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
+ self.splash_screen.setWindowIcon(icon)
splash_image = QtGui.QPixmap(u':/graphics/openlp-splash-screen.png')
- self.splash_screen.setWindowIcon(icon)
self.splash_screen.setPixmap(splash_image)
self.splash_screen.setMask(splash_image.mask())
self.splash_screen.setWindowFlags(
=== modified file 'openlp/core/utils/confighelper.py'
--- openlp/core/utils/confighelper.py 2009-09-08 19:58:05 +0000
+++ openlp/core/utils/confighelper.py 2009-09-29 13:00:32 +0000
@@ -45,7 +45,7 @@
path = os.path.join(BaseDirectory.xdg_data_home, u'openlp')
except ImportError:
path = os.path.join(os.getenv(u'HOME'), u'.openlp', u'data')
- reg = ConfigHelper.get_registry()
+ #reg = ConfigHelper.get_registry()
#path = ConfigHelper.get_config(u'main', 'data path', path)
if not os.path.exists(path):
os.makedirs(path)
=== modified file 'openlp/plugins/audit/auditplugin.py'
--- openlp/plugins/audit/auditplugin.py 2009-09-25 20:12:35 +0000
+++ openlp/plugins/audit/auditplugin.py 2009-09-29 13:00:32 +0000
@@ -27,7 +27,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Plugin, Receiver, translate, str_to_bool
+from openlp.core.lib import Plugin, Receiver, translate, str_to_bool, buildIcon
from openlp.plugins.audit.lib import AuditTab, AuditManager
from openlp.plugins.audit.forms import AuditDetailForm, AuditDeleteForm
from openlp.plugins.audit.lib.models import AuditItem
@@ -42,9 +42,7 @@
Plugin.__init__(self, u'Audit', u'1.9.0', plugin_helpers)
self.weight = -4
# Create the plugin icon
- self.icon = QtGui.QIcon()
- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_image.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.icon = buildIcon(u':/media/media_image.png')
self.auditfile = None
def check_pre_conditions(self):
@@ -93,9 +91,7 @@
translate(u'AuditPlugin', u'Generate Reports on Audit Data'))
self.AuditReport.setObjectName(u'AuditReport')
#Audit activation
- AuditIcon = QtGui.QIcon()
- AuditIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ AuditIcon = buildIcon(u':/tools/tools_alert.png')
self.AuditStatus = QtGui.QAction(tools_menu)
self.AuditStatus.setIcon(AuditIcon)
self.AuditStatus.setCheckable(True)
=== modified file 'openlp/plugins/audit/forms/auditdeleteform.py'
--- openlp/plugins/audit/forms/auditdeleteform.py 2009-09-26 14:36:08 +0000
+++ openlp/plugins/audit/forms/auditdeleteform.py 2009-09-29 13:00:32 +0000
@@ -24,11 +24,11 @@
from datetime import date
-from PyQt4 import QtCore, QtGui
+from PyQt4 import QtGui
from auditdeletedialog import Ui_AuditDeleteDialog
from openlp.core.lib import translate
-from openlp.plugins.audit.lib import AuditManager
+#from openlp.plugins.audit.lib import AuditManager
class AuditDeleteForm(QtGui.QDialog, Ui_AuditDeleteDialog):
"""
@@ -43,7 +43,7 @@
self.setupUi(self)
def accept(self):
- ret = QtGui.QMessageBox.question(None,
+ ret = QtGui.QMessageBox.question(self,
translate(u'mainWindow', u'Delete Selected Audit Events?'),
translate(u'mainWindow', u'Are you sure you want to delete selected Audit Data?'),
QtGui.QMessageBox.StandardButtons(
=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py 2009-09-21 17:56:36 +0000
+++ openlp/plugins/bibles/bibleplugin.py 2009-09-29 13:00:32 +0000
@@ -26,8 +26,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Plugin, translate
-
+from openlp.core.lib import Plugin, translate, buildIcon
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
class BiblePlugin(Plugin):
@@ -40,9 +39,7 @@
Plugin.__init__(self, u'Bibles', u'1.9.0', plugin_helpers)
self.weight = -9
# Create the plugin icon
- self.icon = QtGui.QIcon()
- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_bible.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.icon = buildIcon(u':/media/media_bible.png')
#Register the bible Manager
self.biblemanager = BibleManager(self.config)
=== modified file 'openlp/plugins/bibles/forms/bibleimportdialog.py'
--- openlp/plugins/bibles/forms/bibleimportdialog.py 2009-09-08 19:58:05 +0000
+++ openlp/plugins/bibles/forms/bibleimportdialog.py 2009-09-29 13:00:32 +0000
@@ -24,12 +24,13 @@
from PyQt4 import QtCore, QtGui
+from openlp.core.lib import buildIcon
+
class Ui_BibleImportDialog(object):
def setupUi(self, BibleImportDialog):
BibleImportDialog.setObjectName(u'BibleImportDialog')
BibleImportDialog.resize(500, 686)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp.org-icon-32.bmp')
BibleImportDialog.setWindowIcon(icon)
self.LicenceDetailsGroupBox = QtGui.QGroupBox(BibleImportDialog)
self.LicenceDetailsGroupBox.setGeometry(QtCore.QRect(10, 400, 480, 151))
@@ -110,8 +111,7 @@
self.OSISLocationEdit.setObjectName(u'OSISLocationEdit')
self.horizontalLayout_3.addWidget(self.OSISLocationEdit)
self.OsisFileButton = QtGui.QPushButton(self.OSISGroupBox)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/imports/import_load.png')
self.OsisFileButton.setIcon(icon1)
self.OsisFileButton.setObjectName(u'OsisFileButton')
self.horizontalLayout_3.addWidget(self.OsisFileButton)
=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py 2009-09-26 18:22:10 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py 2009-09-29 13:00:32 +0000
@@ -28,7 +28,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate, MediaManagerItem, Receiver, \
- contextMenuAction, BaseListWithDnD
+ BaseListWithDnD
from openlp.plugins.bibles.forms import BibleImportForm
from openlp.plugins.bibles.lib.manager import BibleMode
=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py 2009-09-25 00:43:42 +0000
+++ openlp/plugins/custom/customplugin.py 2009-09-29 13:00:32 +0000
@@ -24,10 +24,8 @@
import logging
-from PyQt4 import QtGui
-
from forms import EditCustomForm
-from openlp.core.lib import Plugin
+from openlp.core.lib import Plugin, buildIcon
from openlp.plugins.custom.lib import CustomManager, CustomMediaItem
@@ -52,9 +50,7 @@
self.custommanager = CustomManager(self.config)
self.edit_custom_form = EditCustomForm(self.custommanager)
# Create the plugin icon
- self.icon = QtGui.QIcon()
- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_custom.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.icon = buildIcon(u':/media/media_custom.png')
def get_media_manager_item(self):
# Create the CustomManagerItem object
=== modified file 'openlp/plugins/custom/forms/editcustomdialog.py'
--- openlp/plugins/custom/forms/editcustomdialog.py 2009-09-12 18:27:17 +0000
+++ openlp/plugins/custom/forms/editcustomdialog.py 2009-09-29 13:00:32 +0000
@@ -22,14 +22,13 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class Ui_customEditDialog(object):
def setupUi(self, customEditDialog):
customEditDialog.setObjectName(u'customEditDialog')
customEditDialog.resize(590, 541)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp.org-icon-32.bmp')
customEditDialog.setWindowIcon(icon)
self.gridLayout = QtGui.QGridLayout(customEditDialog)
self.gridLayout.setObjectName(u'gridLayout')
@@ -51,16 +50,14 @@
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName(u'verticalLayout')
self.UpButton = QtGui.QPushButton(customEditDialog)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/services/service_up.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/services/service_up.png')
self.UpButton.setIcon(icon1)
self.UpButton.setObjectName(u'UpButton')
self.verticalLayout.addWidget(self.UpButton)
spacerItem = QtGui.QSpacerItem(20, 128, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.DownButton = QtGui.QPushButton(customEditDialog)
- icon2 = QtGui.QIcon()
- icon2.addPixmap(QtGui.QPixmap(u':/services/service_down.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon2 = buildIcon(u':/services/service_down.png')
self.DownButton.setIcon(icon2)
self.DownButton.setObjectName(u'DownButton')
self.verticalLayout.addWidget(self.DownButton)
=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py 2009-09-25 00:43:42 +0000
+++ openlp/plugins/images/imageplugin.py 2009-09-29 13:00:32 +0000
@@ -24,9 +24,7 @@
import logging
-from PyQt4 import QtGui
-
-from openlp.core.lib import Plugin
+from openlp.core.lib import Plugin, buildIcon
from openlp.plugins.images.lib import ImageMediaItem, ImageTab
class ImagePlugin(Plugin):
@@ -39,9 +37,7 @@
Plugin.__init__(self, u'Images', u'1.9.0', plugin_helpers)
self.weight = -7
# Create the plugin icon
- self.icon = QtGui.QIcon()
- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_image.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.icon = buildIcon(u':/media/media_image.png')
def get_settings_tab(self):
self.ImageTab = ImageTab()
=== modified file 'openlp/plugins/media/lib/__init__.py'
--- openlp/plugins/media/lib/__init__.py 2009-09-08 19:58:05 +0000
+++ openlp/plugins/media/lib/__init__.py 2009-09-29 13:00:32 +0000
@@ -22,8 +22,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from filelistdata import FileListData
from mediatab import MediaTab
from mediaitem import MediaMediaItem
-__all__ = ['MediaTab', 'MediaMediaItem', 'FileListData']
+__all__ = ['MediaTab', 'MediaMediaItem']
=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py 2009-09-25 14:13:33 +0000
+++ openlp/plugins/media/mediaplugin.py 2009-09-29 13:00:32 +0000
@@ -22,9 +22,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from PyQt4 import QtGui
-
-from openlp.core.lib import Plugin
+from openlp.core.lib import Plugin, buildIcon
from openlp.plugins.media.lib import MediaTab, MediaMediaItem
class MediaPlugin(Plugin):
@@ -34,11 +32,9 @@
Plugin.__init__(self, u'Media', u'1.9.0', plugin_helpers)
self.weight = -6
# Create the plugin icon
- self.icon = QtGui.QIcon()
- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_video.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.icon = buildIcon(u':/media/media_video.png')
# passed with drag and drop messages
- self.dnd_id=u'Media'
+ self.dnd_id = u'Media'
def get_settings_tab(self):
self.MediaTab = MediaTab()
=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py 2009-09-26 20:51:05 +0000
+++ openlp/plugins/presentations/presentationplugin.py 2009-09-29 13:00:32 +0000
@@ -22,12 +22,11 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-import os
import logging
-from PyQt4 import QtCore, QtGui
+from PyQt4 import QtCore
-from openlp.core.lib import Plugin
+from openlp.core.lib import Plugin, buildIcon
from openlp.plugins.presentations.lib import *
class PresentationPlugin(Plugin):
@@ -42,9 +41,7 @@
Plugin.__init__(self, u'Presentations', u'1.9.0', plugin_helpers)
self.weight = -8
# Create the plugin icon
- self.icon = QtGui.QIcon()
- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_presentation.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.icon = buildIcon(u':/media/media_presentation.png')
def get_settings_tab(self):
"""
=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py 2009-09-08 19:58:05 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py 2009-09-29 13:00:32 +0000
@@ -24,15 +24,13 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class Ui_EditSongDialog(object):
def setupUi(self, EditSongDialog):
EditSongDialog.setObjectName(u'EditSongDialog')
EditSongDialog.resize(645, 417)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp.org-icon-32.bmp')
EditSongDialog.setWindowIcon(icon)
EditSongDialog.setModal(True)
self.verticalLayout = QtGui.QVBoxLayout(EditSongDialog)
=== modified file 'openlp/plugins/songs/forms/openlpexportform.py'
--- openlp/plugins/songs/forms/openlpexportform.py 2009-09-08 19:58:05 +0000
+++ openlp/plugins/songs/forms/openlpexportform.py 2009-09-29 13:00:32 +0000
@@ -23,7 +23,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class OpenLPExportForm(object):
@@ -34,8 +34,7 @@
def setupUi(self):
self.OpenLPExportForm.setObjectName(u'OpenLPExportForm')
self.OpenLPExportForm.resize(473, 459)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
self.OpenLPExportForm.setWindowIcon(icon)
self.verticalLayout_5 = QtGui.QVBoxLayout(self.OpenLPExportForm)
self.verticalLayout_5.setMargin(8)
@@ -58,8 +57,7 @@
self.ExportFileLineEdit.setObjectName(u'ExportFileLineEdit')
self.horizontalLayout.addWidget(self.ExportFileLineEdit)
self.ExportFileSelectPushButton = QtGui.QPushButton(self.ExportFileWidget)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/exports/export_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/exports/export_load.png')
self.ExportFileSelectPushButton.setIcon(icon1)
self.ExportFileSelectPushButton.setObjectName(u'ExportFileSelectPushButton')
self.horizontalLayout.addWidget(self.ExportFileSelectPushButton)
@@ -117,8 +115,7 @@
sizePolicy.setHeightForWidth(self.ExportSelectAllPushButton.sizePolicy().hasHeightForWidth())
self.ExportSelectAllPushButton.setSizePolicy(sizePolicy)
self.ExportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
- icon2 = QtGui.QIcon()
- icon2.addPixmap(QtGui.QPixmap(u':/exports/export_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon2 = buildIcon(u':/exports/export_selectall.png')
self.ExportSelectAllPushButton.setIcon(icon2)
self.ExportSelectAllPushButton.setObjectName(u'ExportSelectAllPushButton')
self.horizontalLayout_2.addWidget(self.ExportSelectAllPushButton)
@@ -167,8 +164,7 @@
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
- icon3 = QtGui.QIcon()
- icon3.addPixmap(QtGui.QPixmap(u':/exports/export_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon3 = buildIcon(u':/exports/export_move_to_list.png')
self.AddSelectedPushButton.setIcon(icon3)
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
@@ -237,8 +233,7 @@
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
- icon4 = QtGui.QIcon()
- icon4.addPixmap(QtGui.QPixmap(u':/exports/export_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon4 = buildIcon(u':/exports/export_remove.png')
self.SelectedRemoveSelectedButton.setIcon(icon4)
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
=== modified file 'openlp/plugins/songs/forms/openlpimportform.py'
--- openlp/plugins/songs/forms/openlpimportform.py 2009-09-08 19:58:05 +0000
+++ openlp/plugins/songs/forms/openlpimportform.py 2009-09-29 13:00:32 +0000
@@ -23,7 +23,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class OpenLPImportForm(object):
@@ -34,8 +34,7 @@
def setupUi(self):
self.OpenLPImportForm.setObjectName(u'OpenLPImportForm')
self.OpenLPImportForm.resize(473, 459)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
self.OpenLPImportForm.setWindowIcon(icon)
self.verticalLayout_5 = QtGui.QVBoxLayout(self.OpenLPImportForm)
self.verticalLayout_5.setMargin(8)
@@ -58,8 +57,7 @@
self.ImportFileLineEdit.setObjectName(u'ImportFileLineEdit')
self.horizontalLayout.addWidget(self.ImportFileLineEdit)
self.ImportFileSelectPushButton = QtGui.QPushButton(self.ImportFileWidget)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/imports/import_load.png')
self.ImportFileSelectPushButton.setIcon(icon1)
self.ImportFileSelectPushButton.setObjectName(u'ImportFileSelectPushButton')
self.horizontalLayout.addWidget(self.ImportFileSelectPushButton)
@@ -117,8 +115,7 @@
sizePolicy.setHeightForWidth(self.ImportSelectAllPushButton.sizePolicy().hasHeightForWidth())
self.ImportSelectAllPushButton.setSizePolicy(sizePolicy)
self.ImportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
- icon2 = QtGui.QIcon()
- icon2.addPixmap(QtGui.QPixmap(u':/imports/import_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon2 = buildIcon(u':/imports/import_selectall.png')
self.ImportSelectAllPushButton.setIcon(icon2)
self.ImportSelectAllPushButton.setObjectName(u'ImportSelectAllPushButton')
self.horizontalLayout_2.addWidget(self.ImportSelectAllPushButton)
@@ -167,8 +164,7 @@
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
- icon3 = QtGui.QIcon()
- icon3.addPixmap(QtGui.QPixmap(u':/imports/import_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon3 = buildIcon(u':/imports/import_move_to_list.png')
self.AddSelectedPushButton.setIcon(icon3)
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
@@ -237,8 +233,7 @@
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
- icon4 = QtGui.QIcon()
- icon4.addPixmap(QtGui.QPixmap(u':/imports/import_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon4 = buildIcon(u':/imports/import_remove.png')
self.SelectedRemoveSelectedButton.setIcon(icon4)
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
=== modified file 'openlp/plugins/songs/forms/opensongexportform.py'
--- openlp/plugins/songs/forms/opensongexportform.py 2009-09-08 19:58:05 +0000
+++ openlp/plugins/songs/forms/opensongexportform.py 2009-09-29 13:00:32 +0000
@@ -23,7 +23,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class OpenSongExportForm(object):
@@ -34,8 +34,7 @@
def setupUi(self):
self.OpenSongExportForm.setObjectName(u'OpenSongExportForm')
self.OpenSongExportForm.resize(473, 459)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
self.OpenSongExportForm.setWindowIcon(icon)
self.verticalLayout_5 = QtGui.QVBoxLayout(self.OpenSongExportForm)
self.verticalLayout_5.setMargin(8)
@@ -58,8 +57,7 @@
self.ExportFileLineEdit.setObjectName(u'ExportFileLineEdit')
self.horizontalLayout.addWidget(self.ExportFileLineEdit)
self.ExportFileSelectPushButton = QtGui.QPushButton(self.ExportFileWidget)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/exports/export_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/exports/export_load.png')
self.ExportFileSelectPushButton.setIcon(icon1)
self.ExportFileSelectPushButton.setObjectName(u'ExportFileSelectPushButton')
self.horizontalLayout.addWidget(self.ExportFileSelectPushButton)
@@ -117,8 +115,7 @@
sizePolicy.setHeightForWidth(self.ExportSelectAllPushButton.sizePolicy().hasHeightForWidth())
self.ExportSelectAllPushButton.setSizePolicy(sizePolicy)
self.ExportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
- icon2 = QtGui.QIcon()
- icon2.addPixmap(QtGui.QPixmap(u':/exports/export_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon2 = buildIcon(u':/exports/export_selectall.png')
self.ExportSelectAllPushButton.setIcon(icon2)
self.ExportSelectAllPushButton.setObjectName(u'ExportSelectAllPushButton')
self.horizontalLayout_2.addWidget(self.ExportSelectAllPushButton)
@@ -167,8 +164,7 @@
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
- icon3 = QtGui.QIcon()
- icon3.addPixmap(QtGui.QPixmap(u':/exports/export_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon3 = buildIcon(u':/exports/export_move_to_list.png')
self.AddSelectedPushButton.setIcon(icon3)
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
@@ -237,8 +233,7 @@
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
- icon4 = QtGui.QIcon()
- icon4.addPixmap(QtGui.QPixmap(u':/exports/export_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon4 = buildIcon(u':/exports/export_remove.png')
self.SelectedRemoveSelectedButton.setIcon(icon4)
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
=== modified file 'openlp/plugins/songs/forms/opensongimportform.py'
--- openlp/plugins/songs/forms/opensongimportform.py 2009-09-08 19:58:05 +0000
+++ openlp/plugins/songs/forms/opensongimportform.py 2009-09-29 13:00:32 +0000
@@ -23,7 +23,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import translate
+from openlp.core.lib import translate, buildIcon
class OpenSongImportForm(object):
@@ -34,8 +34,7 @@
def setupUi(self):
self.OpenSongImportForm.setObjectName(u'OpenSongImportForm')
self.OpenSongImportForm.resize(481, 153)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/icon/openlp-logo-16x16.png')
self.OpenSongImportForm.setWindowIcon(icon)
self.verticalLayout = QtGui.QVBoxLayout(self.OpenSongImportForm)
self.verticalLayout.setSpacing(6)
@@ -59,8 +58,7 @@
self.ImportFileLineEdit.setObjectName(u'ImportFileLineEdit')
self.horizontalLayout.addWidget(self.ImportFileLineEdit)
self.ImportFileSelectPushButton = QtGui.QPushButton(self.ImportFileWidget)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/imports/import_load.png')
self.ImportFileSelectPushButton.setIcon(icon1)
self.ImportFileSelectPushButton.setObjectName(u'ImportFileSelectPushButton')
self.horizontalLayout.addWidget(self.ImportFileSelectPushButton)
=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
--- openlp/plugins/songs/forms/songmaintenancedialog.py 2009-09-10 18:15:40 +0000
+++ openlp/plugins/songs/forms/songmaintenancedialog.py 2009-09-29 13:00:32 +0000
@@ -1,24 +1,30 @@
# -*- 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-2009 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
-"""
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2009 Raoul Snyman #
+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
+# --------------------------------------------------------------------------- #
+# 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.core.lib import translate
+
+from openlp.core.lib import translate, buildIcon
class Ui_SongMaintenanceDialog(object):
def setupUi(self, SongMaintenanceDialog):
@@ -51,19 +57,13 @@
self.TypeListWidget.setSortingEnabled(False)
self.TypeListWidget.setUniformItemSizes(True)
self.TypeListWidget.setObjectName(u'TypeListWidget')
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap(u':/songs/author_maintenance.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon = buildIcon(u':/songs/author_maintenance.png')
item = QtGui.QListWidgetItem(self.TypeListWidget)
item.setIcon(icon)
- icon1 = QtGui.QIcon()
- icon1.addPixmap(QtGui.QPixmap(u':/songs/topic_maintenance.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon1 = buildIcon(u':/songs/topic_maintenance.png')
item = QtGui.QListWidgetItem(self.TypeListWidget)
item.setIcon(icon1)
- icon2 = QtGui.QIcon()
- icon2.addPixmap(QtGui.QPixmap(u':/songs/book_maintenance.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon2 = buildIcon(u':/songs/book_maintenance.png')
item = QtGui.QListWidgetItem(self.TypeListWidget)
item.setIcon(icon2)
self.ContentLayout.addWidget(self.TypeListWidget)
@@ -88,23 +88,17 @@
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.AuthorButtonsLayout.addItem(spacerItem)
self.AuthorAddButton = QtGui.QPushButton(self.AuthorButtonWidget)
- icon3 = QtGui.QIcon()
- icon3.addPixmap(QtGui.QPixmap(u':/songs/author_add.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon3 = buildIcon(u':/songs/author_add.png')
self.AuthorAddButton.setIcon(icon3)
self.AuthorAddButton.setObjectName(u'AuthorAddButton')
self.AuthorButtonsLayout.addWidget(self.AuthorAddButton)
self.AuthorEditButton = QtGui.QPushButton(self.AuthorButtonWidget)
- icon4 = QtGui.QIcon()
- icon4.addPixmap(QtGui.QPixmap(u':/songs/author_edit.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon4 = buildIcon(u':/songs/author_edit.png')
self.AuthorEditButton.setIcon(icon4)
self.AuthorEditButton.setObjectName(u'AuthorEditButton')
self.AuthorButtonsLayout.addWidget(self.AuthorEditButton)
self.AuthorDeleteButton = QtGui.QPushButton(self.AuthorButtonWidget)
- icon5 = QtGui.QIcon()
- icon5.addPixmap(QtGui.QPixmap(u':/songs/author_delete.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon5 = buildIcon(u':/songs/author_delete.png')
self.AuthorDeleteButton.setIcon(icon5)
self.AuthorDeleteButton.setObjectName(u'AuthorDeleteButton')
self.AuthorButtonsLayout.addWidget(self.AuthorDeleteButton)
@@ -134,23 +128,17 @@
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.TopicButtonLayout.addItem(TopicSpacerItem)
self.TopicAddButton = QtGui.QPushButton(self.TopicButtonWidget)
- icon6 = QtGui.QIcon()
- icon6.addPixmap(QtGui.QPixmap(u':/songs/topic_add.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon6 = buildIcon(u':/songs/topic_add.png')
self.TopicAddButton.setIcon(icon6)
self.TopicAddButton.setObjectName(u'TopicAddButton')
self.TopicButtonLayout.addWidget(self.TopicAddButton)
self.TopicEditButton = QtGui.QPushButton(self.TopicButtonWidget)
- icon7 = QtGui.QIcon()
- icon7.addPixmap(QtGui.QPixmap(u':/songs/topic_edit.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon7 = buildIcon(u':/songs/topic_edit.png')
self.TopicEditButton.setIcon(icon7)
self.TopicEditButton.setObjectName(u'TopicEditButton')
self.TopicButtonLayout.addWidget(self.TopicEditButton)
self.TopicDeleteButton = QtGui.QPushButton(self.TopicButtonWidget)
- icon8 = QtGui.QIcon()
- icon8.addPixmap(QtGui.QPixmap(u':/songs/topic_delete.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon8 = buildIcon(u':/songs/topic_delete.png')
self.TopicDeleteButton.setIcon(icon8)
self.TopicDeleteButton.setObjectName(u'TopicDeleteButton')
self.TopicButtonLayout.addWidget(self.TopicDeleteButton)
@@ -180,23 +168,17 @@
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.BookButtonLayout.addItem(spacerItem2)
self.BookAddButton = QtGui.QPushButton(self.BookButtonWidget)
- icon9 = QtGui.QIcon()
- icon9.addPixmap(QtGui.QPixmap(u':/songs/book_add.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon9 = buildIcon(u':/songs/book_add.png')
self.BookAddButton.setIcon(icon9)
self.BookAddButton.setObjectName(u'BookAddButton')
self.BookButtonLayout.addWidget(self.BookAddButton)
self.BookEditButton = QtGui.QPushButton(self.BookButtonWidget)
- icon10 = QtGui.QIcon()
- icon10.addPixmap(QtGui.QPixmap(u':/songs/book_edit.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon10 = buildIcon(u':/songs/book_edit.png')
self.BookEditButton.setIcon(icon10)
self.BookEditButton.setObjectName(u'BookEditButton')
self.BookButtonLayout.addWidget(self.BookEditButton)
self.BookDeleteButton = QtGui.QPushButton(self.BookButtonWidget)
- icon11 = QtGui.QIcon()
- icon11.addPixmap(QtGui.QPixmap(u':/songs/book_delete.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ icon11 = buildIcon(u':/songs/book_delete.png')
self.BookDeleteButton.setIcon(icon11)
self.BookDeleteButton.setObjectName(u'BookDeleteButton')
self.BookButtonLayout.addWidget(self.BookDeleteButton)
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2009-09-26 12:10:41 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2009-09-29 13:00:32 +0000
@@ -27,7 +27,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, translate, SongXMLParser, \
- contextMenuAction, contextMenuSeparator, BaseListWithDnD, Receiver
+ BaseListWithDnD, Receiver
from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm
class SongListView(BaseListWithDnD):
=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py 2009-09-25 00:43:42 +0000
+++ openlp/plugins/songs/songsplugin.py 2009-09-29 13:00:32 +0000
@@ -26,7 +26,7 @@
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Plugin, translate
+from openlp.core.lib import Plugin, translate, buildIcon
from openlp.plugins.songs.lib import SongManager, SongMediaItem
from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \
OpenSongImportForm, OpenLPExportForm
@@ -57,9 +57,7 @@
self.openlp_export_form = OpenLPExportForm()
self.opensong_export_form = OpenSongExportForm()
# Create the plugin icon
- self.icon = QtGui.QIcon()
- self.icon.addPixmap(QtGui.QPixmap(u':/media/media_song.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.icon = buildIcon(u':/media/media_song.png')
def get_media_manager_item(self):
"""
Follow ups