diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index e9ca9ecd7..560450741 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -273,7 +273,6 @@ def resize_image(image, width, height, background=QtCore.Qt.black): painter = QtGui.QPainter(new_image) painter.drawImage((width - realw) / 2, (height - realh) / 2, preview) image_cache[image_cache_key] = new_image - print image_cache return new_image def check_item_selected(list_widget, message): diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 33d7676ca..def6f01cc 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -91,7 +91,7 @@ boolean_list = [u'italics', u'override', u'outline', u'shadow', \ u'slide_transition'] integer_list =[u'proportion', u'line_adjustment', u'x', u'height', u'y', \ -u'width', u'shadow_size', u'outline_size', u'horizontal_align',\ +u'width', u'shadow_size', u'outline_size', u'horizontal_align', \ u'vertical_align', u'wrap_style' ] class ThemeXML(object): diff --git a/openlp/core/ui/filerenamedialog.py b/openlp/core/ui/filerenamedialog.py new file mode 100644 index 000000000..8632ef37a --- /dev/null +++ b/openlp/core/ui/filerenamedialog.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'filerenamedialog.ui' +# +# Created: Sat Sep 25 16:20:30 2010 +# by: PyQt4 UI code generator 4.7.3 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_FileRenameDialog(object): + def setupUi(self, FileRenameDialog): + FileRenameDialog.setObjectName("FileRenameDialog") + FileRenameDialog.resize(400, 87) + self.buttonBox = QtGui.QDialogButtonBox(FileRenameDialog) + self.buttonBox.setGeometry(QtCore.QRect(210, 50, 171, 25)) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.widget = QtGui.QWidget(FileRenameDialog) + self.widget.setGeometry(QtCore.QRect(10, 10, 381, 35)) + self.widget.setObjectName("widget") + self.horizontalLayout = QtGui.QHBoxLayout(self.widget) + self.horizontalLayout.setObjectName("horizontalLayout") + self.FileRenameLabel = QtGui.QLabel(self.widget) + self.FileRenameLabel.setObjectName("FileRenameLabel") + self.horizontalLayout.addWidget(self.FileRenameLabel) + self.FileNameEdit = QtGui.QLineEdit(self.widget) + self.FileNameEdit.setObjectName("FileNameEdit") + self.horizontalLayout.addWidget(self.FileNameEdit) + + self.retranslateUi(FileRenameDialog) + QtCore.QMetaObject.connectSlotsByName(FileRenameDialog) + + def retranslateUi(self, FileRenameDialog): + FileRenameDialog.setWindowTitle(QtGui.QApplication.translate("FileRenameDialog", "File Rename", None, QtGui.QApplication.UnicodeUTF8)) + self.FileRenameLabel.setText(QtGui.QApplication.translate("FileRenameDialog", "New File Name:", None, QtGui.QApplication.UnicodeUTF8)) + diff --git a/openlp/core/ui/filerenameform.py b/openlp/core/ui/filerenameform.py new file mode 100644 index 000000000..d1c339811 --- /dev/null +++ b/openlp/core/ui/filerenameform.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 + +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008-2010 Raoul Snyman # +# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # +# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian # +# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # +# Carsten Tinggaard, Frode Woldsund # +# --------------------------------------------------------------------------- # +# 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 filerenamedialog import Ui_FileRenameDialog +from openlp.core.lib import translate + +class FileRenameForm(QtGui.QDialog, Ui_FileRenameDialog): + """ + The exception dialog + """ + def __init__(self, parent): + QtGui.QDialog.__init__(self, parent) + self.setupUi(self) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'), + self.accept) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'), + self.reject) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index f1c0ebd83..2e6fb8602 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -142,9 +142,12 @@ class ThemeManager(QtGui.QWidget): themeName = unicode(item.text()) self.deleteAction.setVisible(False) self.renameAction.setVisible(False) + self.globalAction.setVisible(False) + # If default theme restrict actions if realThemeName == themeName: self.deleteAction.setVisible(True) self.renameAction.setVisible(True) + self.globalAction.setVisible(True) action = self.menu.exec_(self.themeListWidget.mapToGlobal(point)) if action == self.editAction: self.onEditTheme() @@ -155,9 +158,9 @@ class ThemeManager(QtGui.QWidget): if action == self.deleteAction: self.onDeleteTheme() if action == self.globalAction: - self. self.changeGlobalFromScreen() + self.changeGlobalFromScreen() if action == self.exportAction: - self. self.onExportTheme() + self.onExportTheme() def changeGlobalFromTab(self, themeName): """ @@ -323,7 +326,7 @@ class ThemeManager(QtGui.QWidget): item.data(QtCore.Qt.UserRole).toString()) self.amendThemeForm.exec_() - def onDeleteTheme(self, onlyDelete=True): + def onDeleteTheme(self): """ Delete a theme """ diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index 7f910f395..711000191 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -35,7 +35,7 @@ class ImagePlugin(Plugin): log.info(u'Image Plugin loaded') def __init__(self, plugin_helpers): - Plugin.__init__(self, u'Images', u'1.9.3', plugin_helpers) + Plugin.__init__(self, u'Images', u'1.9.4', plugin_helpers) self.weight = -7 self.icon_path = u':/plugins/plugin_images.png' self.icon = build_icon(self.icon_path) diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 147e2fffc..4caf5bfc2 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -187,7 +187,6 @@ class ImageMediaItem(MediaManagerItem): for item in items: bitem = self.listView.item(item.row()) filename = unicode(bitem.data(QtCore.Qt.UserRole).toString()) - frame = QtGui.QImage(unicode(filename)) self.parent.liveController.display.image(filename) self.resetButton.setVisible(True) diff --git a/resources/forms/filerenamedialog.ui b/resources/forms/filerenamedialog.ui new file mode 100644 index 000000000..fb2d8780d --- /dev/null +++ b/resources/forms/filerenamedialog.ui @@ -0,0 +1,54 @@ + + + FileRenameDialog + + + + 0 + 0 + 400 + 87 + + + + File Rename + + + + + 210 + 50 + 171 + 25 + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 10 + 10 + 381 + 27 + + + + + + + New File Name: + + + + + + + + + + + +