From 5dc73b6a65ba1d6a9db361d6fefaf5df3a2f28cb Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 29 Apr 2011 13:33:04 +0200 Subject: [PATCH 01/12] started work --- openlp/plugins/bibles/lib/mediaitem.py | 47 +++++++++++++++----------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index c7e1f0bc2..cd4b8d11b 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -72,6 +72,32 @@ class BibleMediaItem(MediaManagerItem): self.hasDeleteIcon = False self.addToServiceItem = False + def add(self, prefix): + """ + """ + tab = QtGui.QWidget() + tab.setObjectName(prefix + u'Tab') + layout = QtGui.QGridLayout(tab) + layout.setObjectName(prefix + u'Layout') + versionLabel = QtGui.QLabel(tab) + versionLabel.setObjectName(prefix + u'VersionLabel') + layout.addWidget(versionLabel, 0, 0, QtCore.Qt.AlignRight) + versionComboBox = media_item_combo_box(tab, prefix + u'VersionComboBox') + versionLabel.setBuddy(versionComboBox) + layout.addWidget(versionComboBox, 0, 1, 1, 2) + secondLabel = QtGui.QLabel(tab) + secondLabel.setObjectName(prefix + u'SecondLabel') + layout.addWidget(secondLabel, 1, 0, QtCore.Qt.AlignRight) + secondComboBox = media_item_combo_box(tab, prefix + u'SecondComboBox') + versionLabel.setBuddy(secondComboBox) + layout.addWidget(secondComboBox, 1, 1, 1, 2) + setattr(self, prefix + u'Tab', tab) + setattr(self, prefix + u'Layout', layout) + setattr(self, prefix + u'VersionLabel', versionLabel) + setattr(self, prefix + u'VersionComboBox', versionComboBox) + setattr(self, prefix + u'SecondLabel', secondLabel) + setattr(self, prefix + u'SecondComboBox', secondComboBox) + def addEndHeaderBar(self): self.searchTabWidget = QtGui.QTabWidget(self) self.searchTabWidget.setSizePolicy( @@ -122,26 +148,7 @@ class BibleMediaItem(MediaManagerItem): self.searchTabWidget.addTab(self.quickTab, translate('BiblesPlugin.MediaItem', 'Quick')) # Add the Advanced Search tab. - self.advancedTab = QtGui.QWidget() - self.advancedTab.setObjectName(u'advancedTab') - self.advancedLayout = QtGui.QGridLayout(self.advancedTab) - self.advancedLayout.setObjectName(u'advancedLayout') - self.advancedVersionLabel = QtGui.QLabel(self.advancedTab) - self.advancedVersionLabel.setObjectName(u'advancedVersionLabel') - self.advancedLayout.addWidget(self.advancedVersionLabel, 0, 0, - QtCore.Qt.AlignRight) - self.advancedVersionComboBox = media_item_combo_box(self.advancedTab, - u'advancedVersionComboBox') - self.advancedVersionLabel.setBuddy(self.advancedVersionComboBox) - self.advancedLayout.addWidget(self.advancedVersionComboBox, 0, 1, 1, 2) - self.advancedSecondLabel = QtGui.QLabel(self.advancedTab) - self.advancedSecondLabel.setObjectName(u'advancedSecondLabel') - self.advancedLayout.addWidget(self.advancedSecondLabel, 1, 0, - QtCore.Qt.AlignRight) - self.advancedSecondComboBox = media_item_combo_box(self.advancedTab, - u'advancedSecondComboBox') - self.advancedSecondLabel.setBuddy(self.advancedSecondComboBox) - self.advancedLayout.addWidget(self.advancedSecondComboBox, 1, 1, 1, 2) + self.add(u'advanced') self.advancedBookLabel = QtGui.QLabel(self.advancedTab) self.advancedBookLabel.setObjectName(u'advancedBookLabel') self.advancedLayout.addWidget(self.advancedBookLabel, 2, 0, From 54a3dd8412f1d1c6ad403d598f629ea986babb16 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 30 Apr 2011 09:37:28 +0100 Subject: [PATCH 02/12] Remove not needed var and fix 195 strings --- openlp/core/lib/ui.py | 1 + openlp/plugins/media/lib/mediaitem.py | 17 ++++++----------- openlp/plugins/presentations/lib/mediaitem.py | 4 +--- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/openlp/core/lib/ui.py b/openlp/core/lib/ui.py index b544efab9..8f33720c6 100644 --- a/openlp/core/lib/ui.py +++ b/openlp/core/lib/ui.py @@ -124,6 +124,7 @@ class UiStrings(object): self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural') self.Tools = translate('OpenLP.Ui', 'Tools') self.Top = translate('OpenLP.Ui', 'Top') + self.UnsupportedFile = translate('OpenLP.Ui', 'Unsupported File') self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide') self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line') self.Version = translate('OpenLP.Ui', 'Version') diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index e494b9e5e..3bfd5b773 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -138,10 +138,8 @@ class MediaMediaItem(MediaManagerItem): if not self.mediaStateWait(Phonon.StoppedState): # Due to string freeze, borrow a message from presentations # This will be corrected in 1.9.6 - critical_error_message_box( - translate('PresentationPlugin.MediaItem', 'Unsupported File'), - unicode(translate('PresentationPlugin.MediaItem', - 'Unsupported File'))) + critical_error_message_box(UiStrings().UnsupportedFile, + UiStrings().UnsupportedFile) return False # File too big for processing if os.path.getsize(filename) <= 52428800: # 50MiB @@ -152,15 +150,12 @@ class MediaMediaItem(MediaManagerItem): # Due to string freeze, borrow a message from presentations # This will be corrected in 1.9.6 self.mediaObject.stop() - critical_error_message_box( - translate('PresentationPlugin.MediaItem', - 'Unsupported File'), - unicode(translate('PresentationPlugin.MediaItem', - 'Unsupported File'))) + critical_error_message_box(UiStrings().UnsupportedFile, + UiStrings().UnsupportedFile) return False - self.mediaLength = self.mediaObject.totalTime() / 1000 + #self.mediaLength = self.mediaObject.totalTime() / 1000 self.mediaObject.stop() - service_item.media_length = self.mediaLength + service_item.media_length = self.mediaObject.totalTime() / 1000 service_item.add_capability( ItemCapabilities.AllowsVariableStartTime) service_item.title = unicode(self.plugin.nameStrings[u'singular']) diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 22db8f39f..bc4241b18 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -193,9 +193,7 @@ class PresentationMediaItem(MediaManagerItem): if initialLoad: icon = build_icon(u':/general/general_delete.png') else: - critical_error_message_box( - translate('PresentationPlugin.MediaItem', - 'Unsupported File'), + critical_error_message_box(UiStrings().UnsupportedFile, translate('PresentationPlugin.MediaItem', 'This type of presentation is not supported.')) continue From f472807251e6926bcefd3fd3dabe8984085dba67 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Sat, 30 Apr 2011 17:11:28 +0100 Subject: [PATCH 03/12] os.path.splitext includes the . in the extension! --- openlp/plugins/presentations/lib/mediaitem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 22db8f39f..c3a62e32a 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -293,7 +293,7 @@ class PresentationMediaItem(MediaManagerItem): "supports" the extension. If none found, then look for a controller which "also supports" it instead. """ - filetype = os.path.splitext(filename)[1] + filetype = os.path.splitext(filename)[1][1:] if not filetype: return None for controller in self.controllers: From f6537acbf4dbcc80706df843d4edda9265af8729 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 30 Apr 2011 18:36:13 +0100 Subject: [PATCH 04/12] Updates --- openlp/core/lib/mediamanageritem.py | 18 ++++++++++++++++-- openlp/core/lib/ui.py | 1 + openlp/plugins/images/lib/mediaitem.py | 2 -- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 8b63963a0..e5e8ed3b1 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -34,7 +34,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import SettingsManager, OpenLPToolbar, ServiceItem, \ StringContent, build_icon, translate, Receiver, ListWidgetWithDnD from openlp.core.lib.ui import UiStrings, context_menu_action, \ - context_menu_separator + context_menu_separator, critical_error_message_box log = logging.getLogger(__name__) @@ -333,7 +333,21 @@ class MediaManagerItem(QtGui.QWidget): log.info(u'New files(s) %s', unicode(files)) if files: Receiver.send_message(u'cursor_busy') - self.loadList(files) + names = [] + for count in range(0, self.listView.count()): + names.append(self.listView.item(count).text()) + newFiles = [] + for file in files: + filename = os.path.split(unicode(file))[1] + if filename in names: + critical_error_message_box( + UiStrings().Duplicate, + unicode(translate('OpenLP.MediaManagerItem', + 'Duplicate file name %s.\nFilename already exists in ' + 'list')) % filename) + else: + newFiles.append(file) + self.loadList(newFiles) lastDir = os.path.split(unicode(files[0]))[0] SettingsManager.set_last_dir(self.settingsSection, lastDir) SettingsManager.set_list(self.settingsSection, diff --git a/openlp/core/lib/ui.py b/openlp/core/lib/ui.py index 8f33720c6..47776a64b 100644 --- a/openlp/core/lib/ui.py +++ b/openlp/core/lib/ui.py @@ -67,6 +67,7 @@ class UiStrings(object): self.Default = unicode(translate('OpenLP.Ui', 'Default')) self.Delete = translate('OpenLP.Ui', '&Delete') self.DisplayStyle = translate('OpenLP.Ui', 'Display style:') + self.Duplicate = translate('OpenLP.Ui', 'Duplicate Error') self.Edit = translate('OpenLP.Ui', '&Edit') self.EmptyField = translate('OpenLP.Ui', 'Empty Field') self.Error = translate('OpenLP.Ui', 'Error') diff --git a/openlp/plugins/images/lib/mediaitem.py b/openlp/plugins/images/lib/mediaitem.py index 68da7fbe1..21b81128d 100644 --- a/openlp/plugins/images/lib/mediaitem.py +++ b/openlp/plugins/images/lib/mediaitem.py @@ -108,7 +108,6 @@ class ImageMediaItem(MediaManagerItem): self.settingsSection, self.getFileList()) def loadList(self, list, initialLoad=False): - Receiver.send_message(u'cursor_busy') if not initialLoad: self.parent.formparent.displayProgressBar(len(list)) for imageFile in list: @@ -127,7 +126,6 @@ class ImageMediaItem(MediaManagerItem): item_name.setIcon(icon) item_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(imageFile)) self.listView.addItem(item_name) - Receiver.send_message(u'cursor_normal') if not initialLoad: self.parent.formparent.finishedProgressBar() From f8fdcf8fba6c23acf43a3605dbadd116f2fec815 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 1 May 2011 09:17:30 +0200 Subject: [PATCH 05/12] allow to empty shortcuts; allow 'space' to be used as shortcut --- openlp/core/ui/shortcutlistdialog.py | 25 +++++++++++++++++++++---- openlp/core/ui/shortcutlistform.py | 15 +++++++++++++-- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/openlp/core/ui/shortcutlistdialog.py b/openlp/core/ui/shortcutlistdialog.py index 288086cba..449f60509 100644 --- a/openlp/core/ui/shortcutlistdialog.py +++ b/openlp/core/ui/shortcutlistdialog.py @@ -28,6 +28,25 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import translate, build_icon +class CaptureShortcutButton(QtGui.QPushButton): + """ + A class to encapsulate a ``QPushButton``. + """ + def __init__(self, *args): + QtGui.QPushButton.__init__(self, *args) + self.setCheckable(True) + + def keyPressEvent(self, event): + """ + Block the ``Key_Space`` key, so that the button will not change the + checked state. + """ + if event.key() == QtCore.Qt.Key_Space and self.isChecked(): + event.ignore() + else: + self.setChecked(True) + + class Ui_ShortcutListDialog(object): def setupUi(self, shortcutListDialog): shortcutListDialog.setObjectName(u'shortcutListDialog') @@ -56,12 +75,11 @@ class Ui_ShortcutListDialog(object): self.detailsLayout.addWidget(self.customRadioButton, 1, 0, 1, 1) self.primaryLayout = QtGui.QHBoxLayout() self.primaryLayout.setObjectName(u'primaryLayout') - self.primaryPushButton = QtGui.QPushButton(shortcutListDialog) + self.primaryPushButton = CaptureShortcutButton(shortcutListDialog) self.primaryPushButton.setObjectName(u'primaryPushButton') self.primaryPushButton.setMinimumSize(QtCore.QSize(84, 0)) self.primaryPushButton.setIcon( build_icon(u':/system/system_configure_shortcuts.png')) - self.primaryPushButton.setCheckable(True) self.primaryLayout.addWidget(self.primaryPushButton) self.clearPrimaryButton = QtGui.QToolButton(shortcutListDialog) self.clearPrimaryButton.setObjectName(u'clearPrimaryButton') @@ -72,9 +90,8 @@ class Ui_ShortcutListDialog(object): self.detailsLayout.addLayout(self.primaryLayout, 1, 1, 1, 1) self.alternateLayout = QtGui.QHBoxLayout() self.alternateLayout.setObjectName(u'alternateLayout') - self.alternatePushButton = QtGui.QPushButton(shortcutListDialog) + self.alternatePushButton = CaptureShortcutButton(shortcutListDialog) self.alternatePushButton.setObjectName(u'alternatePushButton') - self.alternatePushButton.setCheckable(True) self.alternatePushButton.setIcon( build_icon(u':/system/system_configure_shortcuts.png')) self.alternateLayout.addWidget(self.alternatePushButton) diff --git a/openlp/core/ui/shortcutlistform.py b/openlp/core/ui/shortcutlistform.py index 3136c9b1f..99b9e0f07 100644 --- a/openlp/core/ui/shortcutlistform.py +++ b/openlp/core/ui/shortcutlistform.py @@ -71,7 +71,9 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): QtCore.SIGNAL(u'clicked(bool)'), self.onCustomRadioButtonClicked) def keyPressEvent(self, event): - if self.primaryPushButton.isChecked() or \ + if event.key() == QtCore.Qt.Key_Space: + self.keyReleaseEvent(event) + elif self.primaryPushButton.isChecked() or \ self.alternatePushButton.isChecked(): event.ignore() elif event.key() == QtCore.Qt.Key_Escape: @@ -163,6 +165,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): self.customRadioButton.setChecked(True) if toggled: self.alternatePushButton.setChecked(False) + self.primaryPushButton.setText(u'') return action = self._currentItemAction() if action is None: @@ -181,6 +184,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): self.customRadioButton.setChecked(True) if toggled: self.primaryPushButton.setChecked(False) + self.alternatePushButton.setText(u'') return action = self._currentItemAction() if action is None: @@ -211,10 +215,11 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): self.primaryPushButton.setChecked(column in [0, 1]) self.alternatePushButton.setChecked(column not in [0, 1]) if column in [0, 1]: + self.primaryPushButton.setText(u'') self.primaryPushButton.setFocus(QtCore.Qt.OtherFocusReason) else: + self.alternatePushButton.setText(u'') self.alternatePushButton.setFocus(QtCore.Qt.OtherFocusReason) - self.onCurrentItemChanged(item) def onCurrentItemChanged(self, item=None, previousItem=None): """ @@ -247,6 +252,12 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): elif len(shortcuts) == 2: primary_text = shortcuts[0].toString() alternate_text = shortcuts[1].toString() + # When we are capturing a new shortcut, we do not want, that the buttons + # display the current shortcut. + if self.primaryPushButton.isChecked(): + primary_text = u'' + if self.alternatePushButton.isChecked(): + alternate_text = u'' self.primaryPushButton.setText(primary_text) self.alternatePushButton.setText(alternate_text) self.primaryLabel.setText(primary_label_text) From 8085ffee74775b1209ec6b4961ff3037bf084cc9 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 1 May 2011 08:21:55 +0100 Subject: [PATCH 06/12] Remove line --- openlp/plugins/media/lib/mediaitem.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openlp/plugins/media/lib/mediaitem.py b/openlp/plugins/media/lib/mediaitem.py index 3bfd5b773..aa574d029 100644 --- a/openlp/plugins/media/lib/mediaitem.py +++ b/openlp/plugins/media/lib/mediaitem.py @@ -153,7 +153,6 @@ class MediaMediaItem(MediaManagerItem): critical_error_message_box(UiStrings().UnsupportedFile, UiStrings().UnsupportedFile) return False - #self.mediaLength = self.mediaObject.totalTime() / 1000 self.mediaObject.stop() service_item.media_length = self.mediaObject.totalTime() / 1000 service_item.add_capability( From 53fe9666d2aa05b503934a38cb70914b678041b2 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 1 May 2011 15:27:19 +0200 Subject: [PATCH 07/12] fixed long line --- openlp/plugins/bibles/lib/mediaitem.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index d6d166882..7d21b57c4 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -140,7 +140,8 @@ class BibleMediaItem(MediaManagerItem): self.quickLayout.addWidget(self.quickLayoutComboBox, 3, 1, 1, 2) self.quickClearLabel = QtGui.QLabel(self.quickTab) self.quickClearLabel.setObjectName(u'quickClearLabel') - self.quickLayout.addWidget(self.quickClearLabel, 4, 0, QtCore.Qt.AlignRight) + self.quickLayout.addWidget( + self.quickClearLabel, 4, 0, QtCore.Qt.AlignRight) self.quickClearComboBox = media_item_combo_box(self.quickTab, u'quickClearComboBox') self.quickLayout.addWidget(self.quickClearComboBox, 4, 1, 1, 2) From 7436621316d55af38db9634460d7c5b1077c1a56 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 1 May 2011 14:58:28 +0100 Subject: [PATCH 08/12] Fix incorrect colour specification Fixes: https://launchpad.net/bugs/774853 --- openlp/core/lib/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index 687c49094..ea08281cd 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -37,6 +37,7 @@ log = logging.getLogger(__name__) base_html_expands = [] +# Hex Color tags from http://www.w3schools.com/html/html_colornames.asp base_html_expands.append({u'desc': u'Red', u'start tag': u'{r}', u'start html': u'', u'end tag': u'{/r}', u'end html': u'', u'protected': True}) @@ -53,13 +54,13 @@ base_html_expands.append({u'desc': u'Green', u'start tag': u'{g}', u'start html': u'', u'end tag': u'{/g}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Pink', u'start tag': u'{pk}', - u'start html': u'', + u'start html': u'', u'end tag': u'{/pk}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Orange', u'start tag': u'{o}', - u'start html': u'', + u'start html': u'', u'end tag': u'{/o}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Purple', u'start tag': u'{pp}', - u'start html': u'', + u'start html': u'', u'end tag': u'{/pp}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'White', u'start tag': u'{w}', u'start html': u'', From 19bd7536c35f064c2971fe188ab49821ebd4a3c1 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 1 May 2011 16:15:08 +0100 Subject: [PATCH 09/12] Need Glasses --- openlp/core/lib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index ea08281cd..cc2a2d9ae 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -54,7 +54,7 @@ base_html_expands.append({u'desc': u'Green', u'start tag': u'{g}', u'start html': u'', u'end tag': u'{/g}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Pink', u'start tag': u'{pk}', - u'start html': u'', + u'start html': u'', u'end tag': u'{/pk}', u'end html': u'', u'protected': True}) base_html_expands.append({u'desc': u'Orange', u'start tag': u'{o}', u'start html': u'', From 6c1e66de994377f916d7c3aa8793fd0992f7f522 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 1 May 2011 17:50:48 +0200 Subject: [PATCH 10/12] do not check the button --- openlp/core/ui/shortcutlistdialog.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/openlp/core/ui/shortcutlistdialog.py b/openlp/core/ui/shortcutlistdialog.py index 449f60509..55ac694f1 100644 --- a/openlp/core/ui/shortcutlistdialog.py +++ b/openlp/core/ui/shortcutlistdialog.py @@ -43,8 +43,6 @@ class CaptureShortcutButton(QtGui.QPushButton): """ if event.key() == QtCore.Qt.Key_Space and self.isChecked(): event.ignore() - else: - self.setChecked(True) class Ui_ShortcutListDialog(object): From 76bd8241143ecc0a3e46a750ef6a2f723fe66004 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 1 May 2011 17:54:05 +0200 Subject: [PATCH 11/12] added comment --- openlp/core/ui/shortcutlistdialog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openlp/core/ui/shortcutlistdialog.py b/openlp/core/ui/shortcutlistdialog.py index 55ac694f1..e22bf1241 100644 --- a/openlp/core/ui/shortcutlistdialog.py +++ b/openlp/core/ui/shortcutlistdialog.py @@ -42,6 +42,7 @@ class CaptureShortcutButton(QtGui.QPushButton): checked state. """ if event.key() == QtCore.Qt.Key_Space and self.isChecked(): + # Ignore the event, so that the parent can take care of this. event.ignore() From 9a997afd81d74b741d7ec3bb492b9d7c266be54c Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sun, 1 May 2011 18:03:42 +0200 Subject: [PATCH 12/12] fixed wording --- openlp/core/ui/shortcutlistform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/ui/shortcutlistform.py b/openlp/core/ui/shortcutlistform.py index 99b9e0f07..8e38ebff5 100644 --- a/openlp/core/ui/shortcutlistform.py +++ b/openlp/core/ui/shortcutlistform.py @@ -252,7 +252,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): elif len(shortcuts) == 2: primary_text = shortcuts[0].toString() alternate_text = shortcuts[1].toString() - # When we are capturing a new shortcut, we do not want, that the buttons + # When we are capturing a new shortcut, we do not want, the buttons to # display the current shortcut. if self.primaryPushButton.isChecked(): primary_text = u''