← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~suutari-olli/openlp/show-no-logo-or-background-when-starting into lp:openlp

 

Azaziah has proposed merging lp:~suutari-olli/openlp/show-no-logo-or-background-when-starting into lp:openlp.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~suutari-olli/openlp/show-no-logo-or-background-when-starting/+merge/290507

In this re-proposal:

Now using self.setVisible(False) instead of transparency for hiding the logo.

Renamed the visual text for the setting to: "Don't show Logo"

I think the default image settings should be moved to general tab and renamed to "Logo settings" or something similar.

--------------------------------------------------------------

Added: "Show no logo" as an option for
disabling default image and background.

(By default OpenLP logo and white bg color are shown on primary Live monitor
At the moment it's only possible to change the color/image but not disable them.)

I think this and the other "Default image" settings should be moved to General options tab under Startup options rather than having them separately at advanced tab and the title renamed to something more describing. Should I do this?

Jenkis passes but this does not have a test yet.
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py	2016-03-15 21:34:58 +0000
+++ openlp/core/common/settings.py	2016-03-30 17:25:20 +0000
@@ -121,6 +121,7 @@
         'advanced/double click live': False,
         'advanced/enable exit confirmation': True,
         'advanced/expand service item': False,
+        'advanced/default show nothing': False,
         'advanced/hide mouse': True,
         'advanced/is portable': False,
         'advanced/max recent files': 20,

=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py	2016-01-19 06:52:23 +0000
+++ openlp/core/ui/advancedtab.py	2016-03-30 17:25:20 +0000
@@ -199,6 +199,9 @@
         self.default_file_layout.addWidget(self.default_browse_button)
         self.default_file_layout.addWidget(self.default_revert_button)
         self.default_image_layout.addRow(self.default_file_label, self.default_file_layout)
+        self.default_show_nothing_check_box = QtWidgets.QCheckBox(self.ui_group_box)
+        self.default_show_nothing_check_box.setObjectName('default_default_show_nothing_check_box')
+        self.default_image_layout.addRow(self.default_show_nothing_check_box)
         self.right_layout.addWidget(self.default_image_group_box)
         # Hide mouse
         self.hide_mouse_group_box = QtWidgets.QGroupBox(self.right_column)
@@ -304,6 +307,7 @@
         self.default_file_label.setText(translate('OpenLP.AdvancedTab', 'Image file:'))
         self.default_browse_button.setToolTip(translate('OpenLP.AdvancedTab', 'Browse for an image file to display.'))
         self.default_revert_button.setToolTip(translate('OpenLP.AdvancedTab', 'Revert to the default OpenLP logo.'))
+        self.default_show_nothing_check_box.setText(translate('OpenLP.AdvancedTab', 'Don\'t show Logo  '))
         self.data_directory_current_label.setText(translate('OpenLP.AdvancedTab', 'Current path:'))
         self.data_directory_new_label.setText(translate('OpenLP.AdvancedTab', 'Custom path:'))
         self.data_directory_browse_button.setToolTip(translate('OpenLP.AdvancedTab',
@@ -359,6 +363,7 @@
         self.x11_bypass_check_box.setChecked(settings.value('x11 bypass wm'))
         self.default_color = settings.value('default color')
         self.default_file_edit.setText(settings.value('default image'))
+        self.default_show_nothing_check_box.setChecked(settings.value('default show nothing'))
         self.slide_limits = settings.value('slide limits')
         self.is_search_as_you_type_enabled = settings.value('search as type')
         self.search_as_type_check_box.setChecked(self.is_search_as_you_type_enabled)
@@ -433,6 +438,7 @@
         settings.setValue('alternate rows', self.alternate_rows_check_box.isChecked())
         settings.setValue('default color', self.default_color)
         settings.setValue('default image', self.default_file_edit.text())
+        settings.setValue('default show nothing', self.default_show_nothing_check_box.isChecked())
         settings.setValue('slide limits', self.slide_limits)
         if self.x11_bypass_check_box.isChecked() != settings.value('x11 bypass wm'):
             settings.setValue('x11 bypass wm', self.x11_bypass_check_box.isChecked())

=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2016-02-20 21:42:31 +0000
+++ openlp/core/ui/maindisplay.py	2016-03-30 17:25:20 +0000
@@ -251,7 +251,10 @@
         self.screen = self.screens.current
         self.setVisible(False)
         Display.setup(self)
+        # If "Show no Logo or Image on startup" is enabled, keep display hidden instead.
         if self.is_live:
+            if Settings().value('advanced/default show nothing'):
+                self.setVisible(False)
             # Build the initial frame.
             background_color = QtGui.QColor()
             background_color.setNamedColor(Settings().value('advanced/default color'))
@@ -523,7 +526,9 @@
             if not Settings().value('core/display on monitor'):
                 return
         self.frame.evaluateJavaScript('show_blank("show");')
-        if self.isHidden():
+        # Check if setting for hiding default background image and color is enabled.
+        # If so, display should remain hidden, otherwise default logo is shown. (from def setup)
+        if self.isHidden() and not Settings().value('advanced/default show nothing'):
             self.setVisible(True)
         self.hide_mode = None
         # Trigger actions when display is active again.


Follow ups