Andreas Preikschat has proposed merging lp:~googol/openlp/bug-1112587 into lp:openlp.
Requested reviews: Raoul Snyman (raoul-snyman) Related bugs: Bug #1112587 in OpenLP: ""Display verses on live tool bar" ignored" https://bugs.launchpad.net/openlp/+bug/1112587 For more details, see: https://code.launchpad.net/~googol/openlp/bug-1112587/+merge/149211 Hello, - fixed bug #1112587 ('Display verses on live tool bar' ignored) - improved hide menu behaviour when resizing -- https://code.launchpad.net/~googol/openlp/bug-1112587/+merge/149211 Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py' --- openlp/core/ui/slidecontroller.py 2013-02-07 11:33:47 +0000 +++ openlp/core/ui/slidecontroller.py 2013-02-19 07:41:20 +0000 @@ -90,7 +90,6 @@ u'delaySpinBox' ] self.audioList = [ - u'songMenu', u'audioPauseItem', u'audioTimeLabel' ] @@ -293,6 +292,7 @@ self.audioTimeLabel.setObjectName(u'audioTimeLabel') self.toolbar.addToolbarWidget(self.audioTimeLabel) self.toolbar.setWidgetVisible(self.audioList, False) + self.toolbar.setWidgetVisible([u'songMenu'], False) # Screen preview area self.previewFrame = QtGui.QFrame(self.splitter) self.previewFrame.setGeometry(QtCore.QRect(0, 0, 300, 300 * self.ratio)) @@ -592,10 +592,14 @@ Change layout of display control buttons on controller size change """ if self.isLive: - if width > 300 and self.hideMenu.isVisible(): + # Space used by the toolbar. + used_space = self.toolbar.size().width() + self.hideMenu.size().width() + # The + 40 is needed to prevent flickering. This can be considered a "buffer". + if width > used_space + 40 and self.hideMenu.isVisible(): self.toolbar.setWidgetVisible(self.hideMenuList, False) self.toolbar.setWidgetVisible(self.wideMenu) - elif width < 300 and not self.hideMenu.isVisible(): + # The - 40 is needed to prevent flickering. This can be considered a "buffer". + elif width < used_space - 40 and not self.hideMenu.isVisible(): self.toolbar.setWidgetVisible(self.wideMenu, False) self.toolbar.setWidgetVisible(self.hideMenuList) @@ -640,6 +644,7 @@ self.mediabar.hide() self.songMenu.hide() self.toolbar.setWidgetVisible(self.loopList, False) + self.toolbar.setWidgetVisible([u'songMenu'], False) # Reset the button self.playSlidesOnce.setChecked(False) self.playSlidesOnce.setIcon(build_icon(u':/media/media_time.png')) @@ -647,7 +652,7 @@ self.playSlidesLoop.setIcon(build_icon(u':/media/media_time.png')) if item.is_text(): if Settings().value(self.parent().songsSettingsSection + u'/display songbar') and self.slideList: - self.songMenu.show() + self.toolbar.setWidgetVisible([u'songMenu'], True) if item.is_capable(ItemCapabilities.CanLoop) and len(item.get_frames()) > 1: self.toolbar.setWidgetVisible(self.loopList) if item.is_media(): === modified file 'tests/functional/openlp_core_lib/test_formattingtags.py' --- tests/functional/openlp_core_lib/test_formattingtags.py 2013-02-16 18:11:22 +0000 +++ tests/functional/openlp_core_lib/test_formattingtags.py 2013-02-19 07:41:20 +0000 @@ -50,7 +50,7 @@ def get_html_tags_with_user_tags_test(self): """ - Test the FormattingTags class' get_html_tags static method in combination with user tags. + FormattingTags class - test the get_html_tags(), add_html_tags() and remove_html_tag() methods. """ with patch(u'openlp.core.lib.translate') as mocked_translate, \ patch(u'openlp.core.lib.settings') as mocked_settings, \ @@ -67,7 +67,7 @@ # WHEN: Add our tag and get the tags again. FormattingTags.load_tags() FormattingTags.add_html_tags([TAG]) - new_tags_list = FormattingTags.get_html_tags() + new_tags_list = copy.deepcopy(FormattingTags.get_html_tags()) # THEN: Lists should not be identically. assert old_tags_list != new_tags_list, u'The lists should be different.' @@ -76,3 +76,9 @@ new_tag = new_tags_list.pop() assert TAG == new_tag, u'Tags should be identically.' + # WHEN: Remove the new tag. + FormattingTags.remove_html_tag(len(new_tags_list)) + + # THEN: The lists should now be identically. + assert old_tags_list == FormattingTags.get_html_tags(), u'The lists should be identically.' +
_______________________________________________ Mailing list: https://launchpad.net/~openlp-core Post to : openlp-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp