From b6f6cc916ef266fb95f59515125ee8da1a50b3df Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Tue, 19 Feb 2013 10:56:36 +0100 Subject: [PATCH] added listView shortkeys --- openlp/core/lib/mediamanageritem.py | 13 +++++++----- openlp/core/lib/settings.py | 33 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index ba272bf69..2218bc1ae 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -221,7 +221,6 @@ class MediaManagerItem(QtGui.QWidget): self.pageLayout.addWidget(self.listView) # define and add the context menu self.listView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) - # FIXME: Look for better objectNames. if self.hasEditIcon: create_widget_action(self.listView, text=self.plugin.getString(StringContent.Edit)[u'title'], @@ -229,22 +228,26 @@ class MediaManagerItem(QtGui.QWidget): triggers=self.onEditClick) create_widget_action(self.listView, separator=True) if self.hasDeleteIcon: - create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Delete), + create_widget_action(self.listView, + u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Delete.title()), text=self.plugin.getString(StringContent.Delete)[u'title'], icon=u':/general/general_delete.png', can_shortcuts=True, triggers=self.onDeleteClick) create_widget_action(self.listView, separator=True) - create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Preview), + create_widget_action(self.listView, + u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Preview.title()), text=self.plugin.getString(StringContent.Preview)[u'title'], icon=u':/general/general_preview.png', can_shortcuts=True, triggers=self.onPreviewClick) - create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Live), + create_widget_action(self.listView, + u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Live.title()), text=self.plugin.getString(StringContent.Live)[u'title'], icon=u':/general/general_live.png', can_shortcuts=True, triggers=self.onLiveClick) - create_widget_action(self.listView, u'%s%s' % (self.plugin.name, StringContent.Service), + create_widget_action(self.listView, + u'listView%s%sItem' % (self.plugin.name.title(), StringContent.Service.title()), can_shortcuts=True, text=self.plugin.getString(StringContent.Service)[u'title'], icon=u':/general/general_add.png', diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index ff0a6fbb1..c2abbe443 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -240,6 +240,39 @@ class Settings(QtCore.QSettings): u'shortcuts/viewLivePanel': [QtGui.QKeySequence(u'F12')], u'shortcuts/viewServiceManagerItem': [QtGui.QKeySequence(u'F9')], u'shortcuts/webSiteItem': [], + + # FIXME: To be sorted. + u'shortcuts/listViewSongsDeleteItem': [QtCore.Qt.Key_Delete], + u'shortcuts/listViewSongsPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return], + u'shortcuts/listViewSongsLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter, + QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return], + u'shortcuts/listViewSongsServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal], + u'shortcuts/listViewBiblesDeleteItem': [QtCore.Qt.Key_Delete], + u'shortcuts/listViewBiblesPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return], + u'shortcuts/listViewBiblesLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter, + QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return], + u'shortcuts/listViewBiblesServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal], + u'shortcuts/listViewPresentationsDeleteItem': [QtCore.Qt.Key_Delete], + u'shortcuts/listViewPresentationsPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return], + u'shortcuts/listViewPresentationsLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter, + QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return], + u'shortcuts/listViewPresentationsServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal], + u'shortcuts/listViewImagesDeleteItem': [QtCore.Qt.Key_Delete], + u'shortcuts/listViewImagesPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return], + u'shortcuts/listViewImagesLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter, + QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return], + u'shortcuts/listViewImagesServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal], + u'shortcuts/listViewMediaDeleteItem': [QtCore.Qt.Key_Delete], + u'shortcuts/listViewMediaPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return], + u'shortcuts/listViewMediaLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter, + QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return], + u'shortcuts/listViewMediaServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal], + u'shortcuts/listViewCustomDeleteItem': [QtCore.Qt.Key_Delete], + u'shortcuts/listViewCustomPreviewItem': [QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return], + u'shortcuts/listViewCustomLiveItem': [QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Enter, + QtCore.Qt.ShiftModifier | QtCore.Qt.Key_Return], + u'shortcuts/listViewCustomServiceItem': [QtCore.Qt.Key_Plus, QtCore.Qt.Key_Equal], + u'themes/global theme': u'', u'themes/last directory': u'', u'themes/last directory export': u'',