openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05016
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#693150 Custom Slide Display footer option
https://bugs.launchpad.net/bugs/693150
#693202 delete theme
https://bugs.launchpad.net/bugs/693202
For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/44663
Fix a number of bugs in the Theme management following last merge.
Copy / Rename / Delete should work correctly now.
Change Plugin Manager to use Singular names instead of Plural.
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/44663
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/core/lib/rendermanager.py'
--- openlp/core/lib/rendermanager.py 2010-12-20 20:22:21 +0000
+++ openlp/core/lib/rendermanager.py 2010-12-24 14:21:13 +0000
@@ -214,7 +214,7 @@
if self.force_page:
verse = verse + verse + verse
else:
- self.image_manager.del_image(self.theme_data.theme_name)
+ self.image_manager.del_image(theme_data.theme_name)
footer = []
footer.append(u'Arky Arky (Unknown)' )
footer.append(u'Public Domain')
=== modified file 'openlp/core/ui/filerenamedialog.py'
--- openlp/core/ui/filerenamedialog.py 2010-12-16 16:08:10 +0000
+++ openlp/core/ui/filerenamedialog.py 2010-12-24 14:21:13 +0000
@@ -53,7 +53,5 @@
QtCore.QMetaObject.connectSlotsByName(FileRenameDialog)
def retranslateUi(self, FileRenameDialog):
- FileRenameDialog.setWindowTitle(translate('OpenLP.FileRenameForm',
- 'File Rename'))
self.fileRenameLabel.setText(translate('OpenLP.FileRenameForm',
'New File Name:'))
=== modified file 'openlp/core/ui/filerenameform.py'
--- openlp/core/ui/filerenameform.py 2010-10-21 15:31:22 +0000
+++ openlp/core/ui/filerenameform.py 2010-12-24 14:21:13 +0000
@@ -28,6 +28,8 @@
from filerenamedialog import Ui_FileRenameDialog
+from openlp.core.lib import translate
+
class FileRenameForm(QtGui.QDialog, Ui_FileRenameDialog):
"""
The exception dialog
@@ -39,3 +41,15 @@
self.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
self.reject)
+
+ def exec_(self, copy=False):
+ """
+ Run the Dialog with correct heading.
+ """
+ if copy:
+ self.setWindowTitle(translate('OpenLP.FileRenameForm',
+ 'File Copy'))
+ else:
+ self.setWindowTitle(translate('OpenLP.FileRenameForm',
+ 'File Rename'))
+ return QtGui.QDialog.exec_(self)
=== modified file 'openlp/core/ui/pluginform.py'
--- openlp/core/ui/pluginform.py 2010-12-11 20:49:50 +0000
+++ openlp/core/ui/pluginform.py 2010-12-24 14:21:13 +0000
@@ -79,7 +79,7 @@
status_text = unicode(
translate('OpenLP.PluginForm', '%s (Disabled)'))
name_string = plugin.getString(StringContent.Name)
- item.setText(status_text % name_string[u'plural'])
+ item.setText(status_text % name_string[u'singular'])
# If the plugin has an icon, set it!
if plugin.icon:
item.setIcon(plugin.icon)
@@ -107,12 +107,12 @@
if self.pluginListWidget.currentItem() is None:
self._clearDetails()
return
- plugin_name_plural = \
+ plugin_name_singular = \
self.pluginListWidget.currentItem().text().split(u' ')[0]
self.activePlugin = None
for plugin in self.parent.pluginManager.plugins:
name_string = plugin.getString(StringContent.Name)
- if name_string[u'plural'] == plugin_name_plural:
+ if name_string[u'singular'] == plugin_name_singular:
self.activePlugin = plugin
break
if self.activePlugin:
@@ -142,4 +142,4 @@
translate('OpenLP.PluginForm', '%s (Disabled)'))
name_string = self.activePlugin.getString(StringContent.Name)
self.pluginListWidget.currentItem().setText(
- status_text % name_string[u'plural'])
+ status_text % name_string[u'singular'])
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2010-12-22 18:49:01 +0000
+++ openlp/core/ui/thememanager.py 2010-12-24 14:21:13 +0000
@@ -224,11 +224,11 @@
Renames an existing theme to a new name
"""
action = unicode(translate('OpenLP.ThemeManager', 'Rename'))
- if self._validate_theme_action(action):
+ if self._validate_theme_action(action, False):
item = self.themeListWidget.currentItem()
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
- self.saveThemeName = u''
+ self.saveThemeName = oldThemeName
if self.fileRenameForm.exec_():
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
oldThemeData = self.getThemeData(oldThemeName)
@@ -243,7 +243,7 @@
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
self.saveThemeName = u''
- if self.fileRenameForm.exec_():
+ if self.fileRenameForm.exec_(True):
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
themeData = self.getThemeData(oldThemeName)
self.cloneThemeData(themeData, newThemeName)
@@ -636,7 +636,6 @@
plugin.renameTheme(self.saveThemeName, name)
if unicode(self.serviceComboBox.currentText()) == name:
editedServiceTheme = True
- self.deleteTheme(self.saveThemeName)
if result == QtGui.QMessageBox.Yes:
# Save the theme, overwriting the existing theme if necessary.
if imageTo and self.oldBackgroundImage and \
@@ -751,7 +750,7 @@
theme.extend_image_filename(path)
return theme
- def _validate_theme_action(self, action):
+ def _validate_theme_action(self, action, testPlugin=True):
"""
Check to see if theme has been selected and the destructive action
is allowed.
@@ -781,14 +780,15 @@
translate('OpenLP.ThemeManager',
'You are unable to delete the default theme.'))
else:
- for plugin in self.parent.pluginManager.plugins:
- if plugin.usesTheme(theme):
- QtGui.QMessageBox.critical(self,
- translate('OpenLP.ThemeManager', 'Error'),
- unicode(translate('OpenLP.ThemeManager',
- 'Theme %s is used in the %s plugin.')) % \
- (theme, plugin.name))
- return False
+ if testPlugin:
+ for plugin in self.parent.pluginManager.plugins:
+ if plugin.usesTheme(theme):
+ QtGui.QMessageBox.critical(self,
+ translate('OpenLP.ThemeManager', 'Error'),
+ unicode(translate('OpenLP.ThemeManager',
+ 'Theme %s is used in the %s plugin.')) % \
+ (theme, plugin.name))
+ return False
if unicode(self.serviceComboBox.currentText()) == theme:
QtGui.QMessageBox.critical(self,
translate('OpenLP.ThemeManager', 'Error'),
=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py 2010-12-13 14:24:16 +0000
+++ openlp/plugins/remotes/remoteplugin.py 2010-12-24 14:21:13 +0000
@@ -89,5 +89,5 @@
}
## Name for MediaDockManager, SettingsManager ##
self.textStrings[StringContent.VisibleName] = {
- u'title': translate('RemotePlugin', 'Remotes')
- }
\ No newline at end of file
+ u'title': translate('RemotePlugin', 'Remote')
+ }
Follow ups