Merge lp:~googol-deactivatedaccount/openlp/bug-718797-2.0 into lp:openlp/2.0

Proposed by Andreas Preikschat
Status: Rejected
Rejected by: Andreas Preikschat
Proposed branch: lp:~googol-deactivatedaccount/openlp/bug-718797-2.0
Merge into: lp:openlp/2.0
Diff against target: 82 lines (+44/-0)
1 file modified
openlp/core/ui/slidecontroller.py (+44/-0)
To merge this branch: bzr merge lp:~googol-deactivatedaccount/openlp/bug-718797-2.0
Reviewer Review Type Date Requested Status
OpenLP Core Pending
Review via email: mp+185670@code.launchpad.net

Description of the change

Hello,

- separate blank buttons again (#718797)

I backported this, because we were asked often to do this. This can be a little "surprise feature".

Is it alright for you to merge this eventhough it is a new feature?

To post a comment you must log in.
Revision history for this message
Jonathan Corwin (j-corwin) wrote :

I fear this could be the start of a slippery slope. We managed to introduce a bug into 2.0.2 without adding new features. If we start adding a little surprise feature here and there, no matter how small, then more little bugs could creep in.
My personal opinion is that we should stick to bug fixes in 2.0.

Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote :

Thanks for your comment. You are probably right.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

I agree with Jonathan. If we want to include more features we should be releasing more often (think Chrome/Firefox).
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Revision history for this message
Andreas Preikschat (googol-deactivatedaccount) wrote :

Okay, accepted.

Unmerged revisions

2170. By Andreas Preikschat

fixed bug 718797 (RFE Separate blank buttons)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/ui/slidecontroller.py'
2--- openlp/core/ui/slidecontroller.py 2013-02-10 12:21:59 +0000
3+++ openlp/core/ui/slidecontroller.py 2013-09-15 13:23:21 +0000
4@@ -44,6 +44,10 @@
5
6 log = logging.getLogger(__name__)
7
8+
9+HIDE_MENU_THRESHOLD = 40
10+
11+
12 class SlideList(QtGui.QTableWidget):
13 """
14 Customised version of QTableWidget which can respond to keyboard
15@@ -104,6 +108,14 @@
16 u'audioPauseItem',
17 u'audioTimeLabel'
18 ]
19+ self.wideMenu = [
20+ u'blankScreenButton',
21+ u'themeScreenButton',
22+ u'desktopScreenButton'
23+ ]
24+ self.narrowMenu = [
25+ u'hideMenu'
26+ ]
27 self.timer_id = 0
28 self.songEdit = False
29 self.selectedRow = 0
30@@ -220,6 +232,19 @@
31 self.hideMenu.menu().addAction(self.blankScreen)
32 self.hideMenu.menu().addAction(self.themeScreen)
33 self.hideMenu.menu().addAction(self.desktopScreen)
34+ # Wide menu of display control buttons.
35+ self.blankScreenButton = QtGui.QToolButton(self.toolbar)
36+ self.blankScreenButton.setObjectName(u'blankScreenButton')
37+ self.toolbar.addToolbarWidget(self.blankScreenButton)
38+ self.blankScreenButton.setDefaultAction(self.blankScreen)
39+ self.themeScreenButton = QtGui.QToolButton(self.toolbar)
40+ self.themeScreenButton.setObjectName(u'themeScreenButton')
41+ self.toolbar.addToolbarWidget(self.themeScreenButton)
42+ self.themeScreenButton.setDefaultAction(self.themeScreen)
43+ self.desktopScreenButton = QtGui.QToolButton(self.toolbar)
44+ self.desktopScreenButton.setObjectName(u'desktopScreenButton')
45+ self.toolbar.addToolbarWidget(self.desktopScreenButton)
46+ self.desktopScreenButton.setDefaultAction(self.desktopScreen)
47 self.toolbar.addToolbarAction(u'loopSeparator', separator=True)
48 # Play Slides Menu
49 self.playSlidesMenu = QtGui.QToolButton(self.toolbar)
50@@ -399,6 +424,7 @@
51 QtCore.SIGNAL(u'slidecontroller_toggle_display'),
52 self.toggleDisplay)
53 self.toolbar.setWidgetVisible(self.loopList, False)
54+ self.toolbar.setWidgetVisible(self.wideMenu, False)
55 else:
56 QtCore.QObject.connect(self.previewListWidget,
57 QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
58@@ -649,6 +675,24 @@
59 for framenumber in range(len(self.serviceItem.get_frames())):
60 self.previewListWidget.setRowHeight(
61 framenumber, width / self.ratio)
62+ self.onControllerSizeChanged()
63+
64+ def onControllerSizeChanged(self):
65+ """
66+ Change layout of display control buttons on controller size change
67+ """
68+ if self.isLive:
69+ # Space used by the toolbar.
70+ used_space = self.toolbar.size().width() + self.hideMenu.size().width()
71+ width = self.controller.width()
72+ # Add the threshold to prevent flickering.
73+ if width > used_space + HIDE_MENU_THRESHOLD and self.hideMenu.isVisible():
74+ self.toolbar.setWidgetVisible(self.narrowMenu, False)
75+ self.toolbar.setWidgetVisible(self.wideMenu)
76+ # Take away a threshold to prevent flickering.
77+ elif width < used_space - HIDE_MENU_THRESHOLD and not self.hideMenu.isVisible():
78+ self.toolbar.setWidgetVisible(self.wideMenu, False)
79+ self.toolbar.setWidgetVisible(self.narrowMenu)
80
81 def onSongBarHandler(self):
82 request = unicode(self.sender().text())

Subscribers

People subscribed via source and target branches