openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #29200
[Merge] lp:~suutari-olli/openlp/default-visibility-preset-fixes into lp:openlp
Azaziah has proposed merging lp:~suutari-olli/openlp/default-visibility-preset-fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1565447 in OpenLP: "Unable to save Panel visibility If View > Mode is set to "Setup" or "Live""
https://bugs.launchpad.net/openlp/+bug/1565447
For more details, see:
https://code.launchpad.net/~suutari-olli/openlp/default-visibility-preset-fixes/+merge/292042
This branch introduces the following fixes/features:
- Fixed bug 1565447 (Unable to save panel visibility if View mode is used)
(Added a hidden setting for controlling this)
- Locking Panels now also locks “View” menu so view menu can’t
be set if panels are locked.
- Panels are now locked by default, this prevents users from
totally messing their UI so easily.
- Added a checkbox for disabling/enabling Projectors during first time wizard
(By default disabled, added a hidden setting for controlling this.)
- Improved UI messages on 1st time wizard Enable/Disable plugins page
lp:~suutari-olli/openlp/default-visibility-preset-fixes (revision 2646)
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-01-Pull/1430/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-02-Functional-Tests/1347/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-03-Interface-Tests/1286/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1093/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/684/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-05a-Code_Analysis/751/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-05b-Test_Coverage/619/
--
Your team OpenLP Core is requested to review the proposed merge of lp:~suutari-olli/openlp/default-visibility-preset-fixes into lp:openlp.
=== modified file 'openlp/core/common/settings.py'
--- openlp/core/common/settings.py 2016-03-20 15:00:15 +0000
+++ openlp/core/common/settings.py 2016-04-15 19:16:33 +0000
@@ -180,13 +180,15 @@
'themes/wrap footer': False,
'user interface/live panel': True,
'user interface/live splitter geometry': QtCore.QByteArray(),
- 'user interface/lock panel': False,
+ 'user interface/lock panel': True,
'user interface/main window geometry': QtCore.QByteArray(),
'user interface/main window position': QtCore.QPoint(0, 0),
'user interface/main window splitter geometry': QtCore.QByteArray(),
'user interface/main window state': QtCore.QByteArray(),
'user interface/preview panel': True,
'user interface/preview splitter geometry': QtCore.QByteArray(),
+ 'user interface/layout preset enabled': False,
+ 'projector/show after wizard': False,
'projector/db type': 'sqlite',
'projector/db username': '',
'projector/db password': '',
=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py 2016-03-23 11:55:54 +0000
+++ openlp/core/ui/firsttimewizard.py 2016-04-15 19:16:33 +0000
@@ -24,7 +24,7 @@
"""
from PyQt5 import QtCore, QtGui, QtWidgets
-from openlp.core.common import translate, is_macosx, clean_button_text
+from openlp.core.common import translate, is_macosx, clean_button_text, Settings
from openlp.core.lib import build_icon
from openlp.core.lib.ui import add_welcome_page
@@ -136,6 +136,13 @@
self.alert_check_box.setChecked(True)
self.alert_check_box.setObjectName('alert_check_box')
self.plugin_layout.addWidget(self.alert_check_box)
+ self.projectors_check_box = QtWidgets.QCheckBox(self.plugin_page)
+ # If visibility setting for projector panel is True, check the box.
+ if Settings().value('projector/show after wizard'):
+ self.projectors_check_box.setChecked(True)
+ self.projectors_check_box.setObjectName('projectors_check_box')
+ self.projectors_check_box.clicked.connect(self.on_projectors_check_box_clicked)
+ self.plugin_layout.addWidget(self.projectors_check_box)
first_time_wizard.setPage(FirstTimePage.Plugins, self.plugin_page)
# The song samples page
self.songs_page = QtWidgets.QWizardPage()
@@ -232,17 +239,28 @@
'downloaded.'))
self.download_label.setText(translate('OpenLP.FirstTimeWizard', 'Please wait while OpenLP downloads the '
'resource index file...'))
- self.plugin_page.setTitle(translate('OpenLP.FirstTimeWizard', 'Activate required Plugins'))
- self.plugin_page.setSubTitle(translate('OpenLP.FirstTimeWizard', 'Select the Plugins you wish to use. '))
+ self.plugin_page.setTitle(translate('OpenLP.FirstTimeWizard', 'Select parts of the program you wish to use'))
+ self.plugin_page.setSubTitle(translate('OpenLP.FirstTimeWizard',
+ 'You can also change these settings after the Wizard.'))
self.songs_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Songs'))
- self.custom_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Custom Slides'))
- self.bible_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Bible'))
- self.image_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Images'))
- self.presentation_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Presentations'))
- self.media_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Media (Audio and Video)'))
- self.remote_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Allow remote access'))
- self.song_usage_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Monitor Song Usage'))
- self.alert_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Allow Alerts'))
+ self.custom_check_box.setText(translate('OpenLP.FirstTimeWizard',
+ 'Custom Slides – Easier to manage than songs and they have their own'
+ ' list of slides'))
+ self.bible_check_box.setText(translate('OpenLP.FirstTimeWizard',
+ 'Bibles – Import and show Bibles'))
+ self.image_check_box.setText(translate('OpenLP.FirstTimeWizard',
+ 'Images – Show images or replace background with them'))
+ self.presentation_check_box.setText(translate('OpenLP.FirstTimeWizard',
+ 'Presentations – Show .ppt, .odp and .pdf presentations'))
+ self.media_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Media – Playback of Audio and Video files'))
+ self.remote_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Remote – Control OpenLP via browser or smart'
+ 'phone app'))
+ self.song_usage_check_box.setText(translate('OpenLP.FirstTimeWizard', 'Song Usage Monitor'))
+ self.alert_check_box.setText(translate('OpenLP.FirstTimeWizard',
+ 'Alerts – Display informative messages while showing other slides'))
+ self.projectors_check_box.setText(translate('OpenLP.FirstTimeWizard',
+ 'Projectors – Allows OpenLP to control PJLink compatible projectors'
+ ' in your network'))
self.no_internet_page.setTitle(translate('OpenLP.FirstTimeWizard', 'No Internet Connection'))
self.no_internet_page.setSubTitle(
translate('OpenLP.FirstTimeWizard', 'Unable to detect an Internet connection.'))
@@ -277,3 +295,10 @@
clean_button_text(first_time_wizard.buttonText(QtWidgets.QWizard.FinishButton)))
first_time_wizard.setButtonText(QtWidgets.QWizard.CustomButton2,
clean_button_text(first_time_wizard.buttonText(QtWidgets.QWizard.CancelButton)))
+
+ def on_projectors_check_box_clicked(self):
+ # When clicking projectors_check box, change the visibility setting for Projectors panel.
+ if Settings().value('projector/show after wizard'):
+ Settings().setValue('projector/show after wizard', False)
+ else:
+ Settings().setValue('projector/show after wizard', True)
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2016-04-04 19:53:54 +0000
+++ openlp/core/ui/mainwindow.py 2016-04-15 19:16:33 +0000
@@ -638,13 +638,15 @@
self.open_cmd_line_files(self.arguments)
elif Settings().value(self.general_settings_section + '/auto open'):
self.service_manager_contents.load_last_file()
+ # This will store currently used layout preset so it remains enabled on next startup.
+ # If any panel is enabled/disabled after preset is set, this setting is not saved.
view_mode = Settings().value('%s/view mode' % self.general_settings_section)
- if view_mode == 'default':
+ if view_mode == 'default' and Settings().value('user interface/layout preset enabled'):
self.mode_default_item.setChecked(True)
- elif view_mode == 'setup':
+ elif view_mode == 'setup' and Settings().value('user interface/layout preset enabled'):
self.set_view_mode(True, True, False, True, False, True)
self.mode_setup_item.setChecked(True)
- elif view_mode == 'live':
+ elif view_mode == 'live' and Settings().value('user interface/layout preset enabled'):
self.set_view_mode(False, True, False, False, True, True)
self.mode_live_item.setChecked(True)
@@ -696,6 +698,11 @@
return
self.application.set_busy_cursor()
self.first_time()
+ # Check if Projectors panel should be visible or not after wizard.
+ if Settings().value('projector/show after wizard'):
+ self.projector_manager_dock.setVisible(True)
+ else:
+ self.projector_manager_dock.setVisible(False)
for plugin in self.plugin_manager.plugins:
self.active_plugin = plugin
old_status = self.active_plugin.status
@@ -1027,18 +1034,24 @@
Put OpenLP into "Default" view mode.
"""
self.set_view_mode(True, True, True, True, True, True, 'default')
+ Settings().setValue('user interface/layout preset enabled', True)
+ Settings().setValue('projector/show after wizard', True)
def on_mode_setup_item_clicked(self):
"""
Put OpenLP into "Setup" view mode.
"""
self.set_view_mode(True, True, False, True, False, True, 'setup')
+ Settings().setValue('user interface/layout preset enabled', True)
+ Settings().setValue('projector/show after wizard', True)
def on_mode_live_item_clicked(self):
"""
Put OpenLP into "Live" view mode.
"""
self.set_view_mode(False, True, False, False, True, True, 'live')
+ Settings().setValue('user interface/layout preset enabled', True)
+ Settings().setValue('projector/show after wizard', True)
def set_view_mode(self, media=True, service=True, theme=True, preview=True, live=True, projector=True, mode=''):
"""
@@ -1176,24 +1189,33 @@
Toggle the visibility of the media manager
"""
self.media_manager_dock.setVisible(not self.media_manager_dock.isVisible())
+ Settings().setValue('user interface/layout preset enabled', False)
def toggle_projector_manager(self):
"""
Toggle visibility of the projector manager
"""
self.projector_manager_dock.setVisible(not self.projector_manager_dock.isVisible())
+ Settings().setValue('user interface/layout preset enabled', False)
+ # Check/uncheck checkbox on First time wizard based on visibility of this panel.
+ if not Settings().value('projector/show after wizard'):
+ Settings().setValue('projector/show after wizard', True)
+ else:
+ Settings().setValue('projector/show after wizard', False)
def toggle_service_manager(self):
"""
Toggle the visibility of the service manager
"""
self.service_manager_dock.setVisible(not self.service_manager_dock.isVisible())
+ Settings().setValue('user interface/layout preset enabled', False)
def toggle_theme_manager(self):
"""
Toggle the visibility of the theme manager
"""
self.theme_manager_dock.setVisible(not self.theme_manager_dock.isVisible())
+ Settings().setValue('user interface/layout preset enabled', False)
def set_preview_panel_visibility(self, visible):
"""
@@ -1207,6 +1229,7 @@
self.preview_controller.panel.setVisible(visible)
Settings().setValue('user interface/preview panel', visible)
self.view_preview_panel.setChecked(visible)
+ Settings().setValue('user interface/layout preset enabled', False)
def set_lock_panel(self, lock):
"""
@@ -1217,6 +1240,7 @@
self.service_manager_dock.setFeatures(QtWidgets.QDockWidget.NoDockWidgetFeatures)
self.media_manager_dock.setFeatures(QtWidgets.QDockWidget.NoDockWidgetFeatures)
self.projector_manager_dock.setFeatures(QtWidgets.QDockWidget.NoDockWidgetFeatures)
+ self.view_mode_menu.setEnabled(False)
self.view_media_manager_item.setEnabled(False)
self.view_service_manager_item.setEnabled(False)
self.view_theme_manager_item.setEnabled(False)
@@ -1228,6 +1252,7 @@
self.service_manager_dock.setFeatures(QtWidgets.QDockWidget.AllDockWidgetFeatures)
self.media_manager_dock.setFeatures(QtWidgets.QDockWidget.AllDockWidgetFeatures)
self.projector_manager_dock.setFeatures(QtWidgets.QDockWidget.AllDockWidgetFeatures)
+ self.view_mode_menu.setEnabled(True)
self.view_media_manager_item.setEnabled(True)
self.view_service_manager_item.setEnabled(True)
self.view_theme_manager_item.setEnabled(True)
@@ -1248,6 +1273,7 @@
self.live_controller.panel.setVisible(visible)
Settings().setValue('user interface/live panel', visible)
self.view_live_panel.setChecked(visible)
+ Settings().setValue('user interface/layout preset enabled', False)
def load_settings(self):
"""
References