← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/trivialfixes into lp:openlp

 

Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)


Add an advanced setting to enable double clicking in media manager and preview controller to send items live.
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/29807
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2010-07-10 22:28:59 +0000
+++ openlp/core/lib/mediamanageritem.py	2010-07-13 16:04:43 +0000
@@ -323,9 +323,15 @@
                     translate('MediaManagerItem',
                         '&Add to selected Service Item'),
                     self.onAddEditClick))
-        QtCore.QObject.connect(
-            self.listView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
-            self.onPreviewClick)
+        if QtCore.QSettings().value(u'advanced/double click live',
+            QtCore.QVariant(False)).toBool():
+            QtCore.QObject.connect(self.listView,
+                QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
+                self.onLiveClick)
+        else:
+            QtCore.QObject.connect(self.listView,
+                QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
+                self.onPreviewClick)
 
     def initialise(self):
         """

=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py	2010-07-12 14:32:48 +0000
+++ openlp/core/ui/advancedtab.py	2010-07-13 16:04:43 +0000
@@ -55,7 +55,7 @@
         self.leftLayout.setMargin(0)
         self.uiGroupBox = QtGui.QGroupBox(self.leftWidget)
         self.uiGroupBox.setObjectName(u'uiGroupBox')
-        self.uiGroupBox.setMaximumWidth(260)
+        self.uiGroupBox.setMaximumWidth(320)
         self.uiLayout = QtGui.QVBoxLayout(self.uiGroupBox)
         self.uiLayout.setSpacing(8)
         self.uiLayout.setMargin(6)
@@ -78,6 +78,9 @@
         self.mediaPluginCheckBox = QtGui.QCheckBox(self.uiGroupBox)
         self.mediaPluginCheckBox.setObjectName(u'mediaPluginCheckBox')
         self.uiLayout.addWidget(self.mediaPluginCheckBox)
+        self.doubleClickLiveCheckBox = QtGui.QCheckBox(self.uiGroupBox)
+        self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox')
+        self.uiLayout.addWidget(self.doubleClickLiveCheckBox)
         self.leftLayout.addWidget(self.uiGroupBox)
 #        self.sharedDirGroupBox = QtGui.QGroupBox(self.leftWidget)
 #        self.sharedDirGroupBox.setObjectName(u'sharedDirGroupBox')
@@ -133,6 +136,8 @@
             translate('AdvancedTab', 'Number of recent files to display:'))
         self.mediaPluginCheckBox.setText(translate('AdvancedTab',
             'Save currently selected media manager plugin'))
+        self.doubleClickLiveCheckBox.setText(translate('AdvancedTab',
+            'Double-click to send items straight to live (requires restart)'))
 #        self.sharedDirGroupBox.setTitle(
 #            translate('AdvancedTab', 'Central Data Store'))
 #        self.sharedCheckBox.setText(
@@ -157,6 +162,9 @@
         self.mediaPluginCheckBox.setChecked(
             settings.value(u'save current plugin',
             QtCore.QVariant(False)).toBool())
+        self.doubleClickLiveCheckBox.setChecked(
+            settings.value(u'double click live',
+            QtCore.QVariant(False)).toBool())
         settings.endGroup()
 
     def save(self):
@@ -169,6 +177,8 @@
             QtCore.QVariant(self.recentSpinBox.value()))
         settings.setValue(u'save current plugin',
             QtCore.QVariant(self.mediaPluginCheckBox.isChecked()))
+        settings.setValue(u'double click live',
+            QtCore.QVariant(self.doubleClickLiveCheckBox.isChecked()))
         settings.endGroup()
 
     def onSharedCheckBoxChanged(self, checked):
@@ -178,4 +188,3 @@
         self.sharedLabel.setEnabled(checked)
         self.sharedTextEdit.setEnabled(checked)
         self.sharedPushButton.setEnabled(checked)
-

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2010-07-02 05:16:30 +0000
+++ openlp/core/ui/slidecontroller.py	2010-07-13 16:04:43 +0000
@@ -202,15 +202,21 @@
             self.Toolbar.addToolbarWidget(u'Hide Menu', self.HideMenu)
             self.HideMenu.setMenu(QtGui.QMenu(
                 translate('SlideController', 'Hide'), self.Toolbar))
-            self.BlankScreen = QtGui.QAction(QtGui.QIcon( u':/slides/slide_blank.png'), u'Blank Screen', self.HideMenu)
+            self.BlankScreen = QtGui.QAction(QtGui.QIcon(
+                u':/slides/slide_blank.png'), u'Blank Screen', self.HideMenu)
             self.BlankScreen.setCheckable(True)
-            QtCore.QObject.connect(self.BlankScreen, QtCore.SIGNAL("triggered(bool)"), self.onBlankDisplay)
-            self.ThemeScreen = QtGui.QAction(QtGui.QIcon(u':/slides/slide_theme.png'), u'Blank to Theme', self.HideMenu)
+            QtCore.QObject.connect(self.BlankScreen,
+                QtCore.SIGNAL("triggered(bool)"), self.onBlankDisplay)
+            self.ThemeScreen = QtGui.QAction(QtGui.QIcon(
+                u':/slides/slide_theme.png'), u'Blank to Theme', self.HideMenu)
             self.ThemeScreen.setCheckable(True)
-            QtCore.QObject.connect(self.ThemeScreen, QtCore.SIGNAL("triggered(bool)"), self.onThemeDisplay)
-            self.DesktopScreen = QtGui.QAction(QtGui.QIcon(u':/slides/slide_desktop.png'), u'Show Desktop', self.HideMenu)
+            QtCore.QObject.connect(self.ThemeScreen,
+                QtCore.SIGNAL("triggered(bool)"), self.onThemeDisplay)
+            self.DesktopScreen = QtGui.QAction(QtGui.QIcon(
+                u':/slides/slide_desktop.png'), u'Show Desktop', self.HideMenu)
             self.DesktopScreen.setCheckable(True)
-            QtCore.QObject.connect(self.DesktopScreen, QtCore.SIGNAL("triggered(bool)"), self.onHideDisplay)
+            QtCore.QObject.connect(self.DesktopScreen,
+                QtCore.SIGNAL("triggered(bool)"), self.onHideDisplay)
             self.HideMenu.setDefaultAction(self.BlankScreen)
             self.HideMenu.menu().addAction(self.BlankScreen)
             self.HideMenu.menu().addAction(self.ThemeScreen)
@@ -241,9 +247,8 @@
             self.Toolbar.addToolbarWidget(
                 u'Image SpinBox', self.DelaySpinBox)
             self.DelaySpinBox.setSuffix(translate('SlideController', 's'))
-            self.DelaySpinBox.setToolTip(
-                translate('SlideController',
-                    'Delay between slides in seconds'))
+            self.DelaySpinBox.setToolTip(translate('SlideController',
+                'Delay between slides in seconds'))
         self.ControllerLayout.addWidget(self.Toolbar)
         #Build a Media ToolBar
         self.Mediabar = OpenLPToolbar(self)
@@ -268,8 +273,7 @@
         self.volumeSlider = Phonon.VolumeSlider()
         self.volumeSlider.setGeometry(QtCore.QRect(90, 260, 221, 24))
         self.volumeSlider.setObjectName(u'volumeSlider')
-        self.Mediabar.addToolbarWidget(
-            u'Audio Volume', self.volumeSlider)
+        self.Mediabar.addToolbarWidget(u'Audio Volume', self.volumeSlider)
         self.ControllerLayout.addWidget(self.Mediabar)
         # Build the Song Toolbar
         if isLive:
@@ -328,6 +332,10 @@
         # Signals
         QtCore.QObject.connect(self.PreviewListWidget,
             QtCore.SIGNAL(u'clicked(QModelIndex)'), self.onSlideSelected)
+        if QtCore.QSettings().value(u'advanced/double click live',
+            QtCore.QVariant(False)).toBool():
+            QtCore.QObject.connect(self.PreviewListWidget,
+                QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onGoLive)
         if isLive:
             QtCore.QObject.connect(Receiver.get_receiver(),
                 QtCore.SIGNAL(u'slidecontroller_live_spin_delay'),


Follow ups