openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #28190
[Merge] lp:~thelinuxguy/openlp/fix-1490184 into lp:openlp
Simon Hanna has proposed merging lp:~thelinuxguy/openlp/fix-1490184 into lp:openlp.
Requested reviews:
Tomas Groth (tomasgroth)
Tim Bentley (trb143)
Related bugs:
Bug #1490184 in OpenLP: "‘?’ help buttons not working"
https://bugs.launchpad.net/openlp/+bug/1490184
For more details, see:
https://code.launchpad.net/~thelinuxguy/openlp/fix-1490184/+merge/281696
Modify all forms to remove the help button from their status bar.
I don't think I missed a form. The Wizards remain untouched as the help button works there
--
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file '.bzrignore'
--- .bzrignore 2015-05-07 21:29:43 +0000
+++ .bzrignore 2016-01-05 21:38:21 +0000
@@ -43,3 +43,5 @@
.coverage
cover
*.kdev4
+./.coveragerc
+./coverage
=== modified file 'openlp/core/ui/aboutform.py'
--- openlp/core/ui/aboutform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/aboutform.py 2016-01-05 21:38:21 +0000
@@ -24,7 +24,7 @@
"""
import webbrowser
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.lib import translate
from openlp.core.utils import get_application_version
@@ -40,7 +40,8 @@
"""
Do some initialisation stuff
"""
- super(AboutForm, self).__init__(parent)
+ super(AboutForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self._setup()
def _setup(self):
=== modified file 'openlp/core/ui/exceptionform.py'
--- openlp/core/ui/exceptionform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/exceptionform.py 2016-01-05 21:38:21 +0000
@@ -89,7 +89,8 @@
"""
Constructor.
"""
- super(ExceptionForm, self).__init__()
+ super(ExceptionForm, self).__init__(None, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.settings_section = 'crashreport'
self.report_text = '**OpenLP Bug Report**\n' \
=== modified file 'openlp/core/ui/filerenameform.py'
--- openlp/core/ui/filerenameform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/filerenameform.py 2016-01-05 21:38:21 +0000
@@ -23,7 +23,7 @@
The file rename dialog.
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from .filerenamedialog import Ui_FileRenameDialog
@@ -38,7 +38,8 @@
"""
Constructor
"""
- super(FileRenameForm, self).__init__(Registry().get('main_window'))
+ super(FileRenameForm, self).__init__(Registry().get('main_window'),
+ QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self._setup()
def _setup(self):
=== modified file 'openlp/core/ui/firsttimelanguageform.py'
--- openlp/core/ui/firsttimelanguageform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/firsttimelanguageform.py 2016-01-05 21:38:21 +0000
@@ -22,7 +22,7 @@
"""
The language selection dialog.
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.lib.ui import create_action
from openlp.core.utils import LanguageManager
@@ -37,7 +37,8 @@
"""
Constructor
"""
- super(FirstTimeLanguageForm, self).__init__(parent)
+ super(FirstTimeLanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.qm_list = LanguageManager.get_qm_list()
self.language_combo_box.addItem('Autodetect')
=== modified file 'openlp/core/ui/formattingtagform.py'
--- openlp/core/ui/formattingtagform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/formattingtagform.py 2016-01-05 21:38:21 +0000
@@ -25,7 +25,7 @@
Base Tags cannot be changed.
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import translate
from openlp.core.lib import FormattingTags
@@ -51,7 +51,8 @@
"""
Constructor
"""
- super(FormattingTagForm, self).__init__(parent)
+ super(FormattingTagForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self._setup()
=== modified file 'openlp/core/ui/pluginform.py'
--- openlp/core/ui/pluginform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/pluginform.py 2016-01-05 21:38:21 +0000
@@ -24,7 +24,7 @@
"""
import logging
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import RegistryProperties, translate
from openlp.core.lib import PluginStatus
@@ -41,7 +41,8 @@
"""
Constructor
"""
- super(PluginForm, self).__init__(parent)
+ super(PluginForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.active_plugin = None
self.programatic_change = False
self.setupUi(self)
=== modified file 'openlp/core/ui/printserviceform.py'
--- openlp/core/ui/printserviceform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/printserviceform.py 2016-01-05 21:38:21 +0000
@@ -112,7 +112,8 @@
"""
Constructor
"""
- super(PrintServiceForm, self).__init__(Registry().get('main_window'))
+ super(PrintServiceForm, self).__init__(Registry().get('main_window'),
+ QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.printer = QtPrintSupport.QPrinter()
self.print_dialog = QtPrintSupport.QPrintDialog(self.printer, self)
self.document = QtGui.QTextDocument()
=== modified file 'openlp/core/ui/projector/editform.py'
--- openlp/core/ui/projector/editform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/projector/editform.py 2016-01-05 21:38:21 +0000
@@ -144,7 +144,8 @@
editProjector = pyqtSignal(object)
def __init__(self, parent=None, projectordb=None):
- super(ProjectorEditForm, self).__init__(parent=parent)
+ super(ProjectorEditForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.projectordb = projectordb
self.setupUi(self)
self.button_box.accepted.connect(self.accept_me)
=== modified file 'openlp/core/ui/projector/sourceselectform.py'
--- openlp/core/ui/projector/sourceselectform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/projector/sourceselectform.py 2016-01-05 21:38:21 +0000
@@ -236,7 +236,8 @@
:param projectordb: ProjectorDB session to use
"""
log.debug('Initializing SourceSelectTabs()')
- super(SourceSelectTabs, self).__init__(parent)
+ super(SourceSelectTabs, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setMinimumWidth(350)
self.projectordb = projectordb
self.edit = edit
@@ -385,7 +386,8 @@
"""
log.debug('Initializing SourceSelectSingle()')
self.projectordb = projectordb
- super(SourceSelectSingle, self).__init__(parent)
+ super(SourceSelectSingle, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.edit = edit
if self.edit:
title = translate('OpenLP.SourceSelectForm', 'Edit Projector Source Text')
=== modified file 'openlp/core/ui/serviceitemeditform.py'
--- openlp/core/ui/serviceitemeditform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/serviceitemeditform.py 2016-01-05 21:38:21 +0000
@@ -22,7 +22,7 @@
"""
The service item edit dialog
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import Registry, RegistryProperties
@@ -37,7 +37,8 @@
"""
Constructor
"""
- super(ServiceItemEditForm, self).__init__(Registry().get('main_window'))
+ super(ServiceItemEditForm, self).__init__(Registry().get('main_window'),
+ QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.item_list = []
self.list_widget.currentRowChanged.connect(self.on_current_row_changed)
=== modified file 'openlp/core/ui/servicenoteform.py'
--- openlp/core/ui/servicenoteform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/servicenoteform.py 2016-01-05 21:38:21 +0000
@@ -22,7 +22,7 @@
"""
The :mod:`~openlp.core.ui.servicenoteform` module contains the `ServiceNoteForm` class.
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import Registry, RegistryProperties, translate
from openlp.core.lib import SpellTextEdit
@@ -37,7 +37,8 @@
"""
Constructor
"""
- super(ServiceNoteForm, self).__init__(Registry().get('main_window'))
+ super(ServiceNoteForm, self).__init__(Registry().get('main_window'),
+ QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.setupUi()
self.retranslateUi()
=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/settingsform.py 2016-01-05 21:38:21 +0000
@@ -46,7 +46,8 @@
"""
Registry().register('settings_form', self)
Registry().register_function('bootstrap_post_set_up', self.bootstrap_post_set_up)
- super(SettingsForm, self).__init__(parent)
+ super(SettingsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.processes = []
self.setupUi(self)
self.setting_list_widget.currentRowChanged.connect(self.list_item_changed)
=== modified file 'openlp/core/ui/shortcutlistform.py'
--- openlp/core/ui/shortcutlistform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/shortcutlistform.py 2016-01-05 21:38:21 +0000
@@ -44,7 +44,8 @@
"""
Constructor
"""
- super(ShortcutListForm, self).__init__(parent)
+ super(ShortcutListForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.changed_actions = {}
self.action_list = ActionList.get_instance()
=== modified file 'openlp/core/ui/starttimeform.py'
--- openlp/core/ui/starttimeform.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/starttimeform.py 2016-01-05 21:38:21 +0000
@@ -22,7 +22,7 @@
"""
The actual start time form.
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from .starttimedialog import Ui_StartTimeDialog
@@ -38,7 +38,8 @@
"""
Constructor
"""
- super(StartTimeForm, self).__init__(Registry().get('main_window'))
+ super(StartTimeForm, self).__init__(Registry().get('main_window'),
+ QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
def exec(self):
=== modified file 'openlp/plugins/alerts/forms/alertform.py'
--- openlp/plugins/alerts/forms/alertform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/alerts/forms/alertform.py 2016-01-05 21:38:21 +0000
@@ -36,10 +36,11 @@
"""
Initialise the alert form
"""
+ super(AlertForm, self).__init__(Registry().get('main_window'),
+ QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.manager = plugin.manager
self.plugin = plugin
self.item_id = None
- super(AlertForm, self).__init__(Registry().get('main_window'))
self.setupUi(self)
self.display_button.clicked.connect(self.on_display_clicked)
self.display_close_button.clicked.connect(self.on_display_close_clicked)
=== modified file 'openlp/plugins/bibles/forms/booknameform.py'
--- openlp/plugins/bibles/forms/booknameform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/bibles/forms/booknameform.py 2016-01-05 21:38:21 +0000
@@ -49,7 +49,8 @@
"""
Constructor
"""
- super(BookNameForm, self).__init__(parent)
+ super(BookNameForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.custom_signals()
self.book_names = BibleStrings().BookNames
=== modified file 'openlp/plugins/bibles/forms/editbibleform.py'
--- openlp/plugins/bibles/forms/editbibleform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/bibles/forms/editbibleform.py 2016-01-05 21:38:21 +0000
@@ -24,7 +24,7 @@
import os
import re
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import RegistryProperties, UiStrings, translate
from openlp.core.lib.ui import critical_error_message_box
@@ -45,7 +45,8 @@
"""
Constructor
"""
- super(EditBibleForm, self).__init__(parent)
+ super(EditBibleForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.media_item = media_item
self.book_names = BibleStrings().BookNames
self.setupUi(self)
=== modified file 'openlp/plugins/bibles/forms/languageform.py'
--- openlp/plugins/bibles/forms/languageform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/bibles/forms/languageform.py 2016-01-05 21:38:21 +0000
@@ -26,6 +26,7 @@
import logging
from PyQt5.QtWidgets import QDialog
+from PyQt5 import QtCore
from openlp.core.common import translate
from openlp.core.lib.ui import critical_error_message_box
@@ -46,7 +47,8 @@
"""
Constructor
"""
- super(LanguageForm, self).__init__(parent)
+ super(LanguageForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
def exec(self, bible_name):
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2016-01-05 21:38:21 +0000
@@ -22,7 +22,7 @@
import logging
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import Registry, translate
from openlp.core.lib.ui import critical_error_message_box, find_and_set_in_combo_box
@@ -44,7 +44,8 @@
"""
Constructor
"""
- super(EditCustomForm, self).__init__(parent)
+ super(EditCustomForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.manager = manager
self.media_item = media_item
self.setupUi(self)
=== modified file 'openlp/plugins/custom/forms/editcustomslideform.py'
--- openlp/plugins/custom/forms/editcustomslideform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/custom/forms/editcustomslideform.py 2016-01-05 21:38:21 +0000
@@ -22,7 +22,7 @@
import logging
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from .editcustomslidedialog import Ui_CustomSlideEditDialog
@@ -39,7 +39,8 @@
"""
Constructor
"""
- super(EditCustomSlideForm, self).__init__(parent)
+ super(EditCustomSlideForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
# Connecting signals and slots
self.insert_button.clicked.connect(self.on_insert_button_clicked)
=== modified file 'openlp/plugins/images/forms/addgroupform.py'
--- openlp/plugins/images/forms/addgroupform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/images/forms/addgroupform.py 2016-01-05 21:38:21 +0000
@@ -20,7 +20,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import translate
from openlp.core.lib.ui import critical_error_message_box
@@ -35,7 +35,8 @@
"""
Constructor
"""
- super(AddGroupForm, self).__init__(parent)
+ super(AddGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
def exec(self, clear=True, show_top_level_group=False, selected_group=None):
=== modified file 'openlp/plugins/images/forms/choosegroupform.py'
--- openlp/plugins/images/forms/choosegroupform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/images/forms/choosegroupform.py 2016-01-05 21:38:21 +0000
@@ -20,7 +20,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.plugins.images.forms.choosegroupdialog import Ui_ChooseGroupDialog
@@ -33,7 +33,8 @@
"""
Constructor
"""
- super(ChooseGroupForm, self).__init__(parent)
+ super(ChooseGroupForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
def exec(self, selected_group=None):
=== modified file 'openlp/plugins/media/forms/mediaclipselectorform.py'
--- openlp/plugins/media/forms/mediaclipselectorform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/media/forms/mediaclipselectorform.py 2016-01-05 21:38:21 +0000
@@ -52,7 +52,8 @@
"""
Constructor
"""
- super(MediaClipSelectorForm, self).__init__(parent)
+ super(MediaClipSelectorForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.vlc_instance = None
self.vlc_media_player = None
self.vlc_media = None
=== modified file 'openlp/plugins/songs/forms/authorsform.py'
--- openlp/plugins/songs/forms/authorsform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/authorsform.py 2016-01-05 21:38:21 +0000
@@ -20,7 +20,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.lib import translate
from openlp.core.lib.ui import critical_error_message_box
@@ -35,7 +35,8 @@
"""
Set up the screen and common data
"""
- super(AuthorsForm, self).__init__(parent)
+ super(AuthorsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.auto_display_name = False
self.first_name_edit.textEdited.connect(self.on_first_name_edited)
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2016-01-05 21:38:21 +0000
@@ -55,7 +55,8 @@
"""
Constructor
"""
- super(EditSongForm, self).__init__(parent)
+ super(EditSongForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.media_item = media_item
self.song = None
# can this be automated?
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/editverseform.py 2016-01-05 21:38:21 +0000
@@ -23,7 +23,7 @@
import re
import logging
-from PyQt5 import QtGui, QtWidgets
+from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.plugins.songs.lib import VerseType
from .editversedialog import Ui_EditVerseDialog
@@ -41,7 +41,8 @@
"""
Constructor
"""
- super(EditVerseForm, self).__init__(parent)
+ super(EditVerseForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.has_single_verse = False
self.insert_button.clicked.connect(self.on_insert_button_clicked)
=== modified file 'openlp/plugins/songs/forms/mediafilesform.py'
--- openlp/plugins/songs/forms/mediafilesform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/mediafilesform.py 2016-01-05 21:38:21 +0000
@@ -37,7 +37,8 @@
log.info('%s MediaFilesForm loaded', __name__)
def __init__(self, parent):
- super(MediaFilesForm, self).__init__()
+ super(MediaFilesForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
def populate_files(self, files):
=== modified file 'openlp/plugins/songs/forms/songbookform.py'
--- openlp/plugins/songs/forms/songbookform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/songbookform.py 2016-01-05 21:38:21 +0000
@@ -23,7 +23,7 @@
This module contains the song book form
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.lib import translate
from openlp.core.lib.ui import critical_error_message_box
@@ -38,7 +38,8 @@
"""
Constructor
"""
- super(SongBookForm, self).__init__(parent)
+ super(SongBookForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
def exec(self, clear=True):
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py 2016-01-05 21:38:21 +0000
@@ -44,7 +44,8 @@
"""
Constructor
"""
- super(SongMaintenanceForm, self).__init__(parent)
+ super(SongMaintenanceForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.manager = manager
self.author_form = AuthorsForm(self)
=== modified file 'openlp/plugins/songs/forms/songselectform.py'
--- openlp/plugins/songs/forms/songselectform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/songselectform.py 2016-01-05 21:38:21 +0000
@@ -81,7 +81,8 @@
"""
def __init__(self, parent=None, plugin=None, db_manager=None):
- QtWidgets.QDialog.__init__(self, parent)
+ QtWidgets.QDialog.__init__(self, parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.plugin = plugin
self.db_manager = db_manager
self.setup_ui(self)
=== modified file 'openlp/plugins/songs/forms/topicsform.py'
--- openlp/plugins/songs/forms/topicsform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songs/forms/topicsform.py 2016-01-05 21:38:21 +0000
@@ -23,7 +23,7 @@
This module contains the topic edit form.
"""
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.lib import translate
from openlp.core.lib.ui import critical_error_message_box
@@ -38,7 +38,8 @@
"""
Constructor
"""
- super(TopicsForm, self).__init__(parent)
+ super(TopicsForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
def exec(self, clear=True):
=== modified file 'openlp/plugins/songusage/forms/songusagedeleteform.py'
--- openlp/plugins/songusage/forms/songusagedeleteform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songusage/forms/songusagedeleteform.py 2016-01-05 21:38:21 +0000
@@ -20,7 +20,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from openlp.core.common import RegistryProperties, translate
from openlp.plugins.songusage.lib.db import SongUsageItem
@@ -36,7 +36,8 @@
Constructor
"""
self.manager = manager
- super(SongUsageDeleteForm, self).__init__(parent)
+ super(SongUsageDeleteForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.setupUi(self)
self.button_box.clicked.connect(self.on_button_box_clicked)
=== modified file 'openlp/plugins/songusage/forms/songusagedetailform.py'
--- openlp/plugins/songusage/forms/songusagedetailform.py 2015-12-31 22:46:06 +0000
+++ openlp/plugins/songusage/forms/songusagedetailform.py 2016-01-05 21:38:21 +0000
@@ -23,7 +23,7 @@
import logging
import os
-from PyQt5 import QtWidgets
+from PyQt5 import QtCore, QtWidgets
from sqlalchemy.sql import and_
from openlp.core.common import RegistryProperties, Settings, check_directory_exists, translate
@@ -44,7 +44,8 @@
"""
Initialise the form
"""
- super(SongUsageDetailForm, self).__init__(parent)
+ super(SongUsageDetailForm, self).__init__(parent, QtCore.Qt.WindowSystemMenuHint
+ | QtCore.Qt.WindowTitleHint)
self.plugin = plugin
self.setupUi(self)
=== added file 'tests/functional/openlp_plugins/songs/test_songformat.py'
--- tests/functional/openlp_plugins/songs/test_songformat.py 1970-01-01 00:00:00 +0000
+++ tests/functional/openlp_plugins/songs/test_songformat.py 2016-01-05 21:38:21 +0000
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
+
+###############################################################################
+# OpenLP - Open Source Lyrics Projection #
+# --------------------------------------------------------------------------- #
+# Copyright (c) 2008-2015 OpenLP Developers #
+# --------------------------------------------------------------------------- #
+# This program is free software; you can redistribute it and/or modify it #
+# under the terms of the GNU General Public License as published by the Free #
+# Software Foundation; version 2 of the License. #
+# #
+# This program is distributed in the hope that it will be useful, but WITHOUT #
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
+# more details. #
+# #
+# You should have received a copy of the GNU General Public License along #
+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+###############################################################################
+"""
+This module contains tests for the SongFormat class
+"""
+from unittest import TestCase
+
+from openlp.plugins.songs.lib.importer import SongFormat
+
+
+class TestSongFormat(TestCase):
+ """
+ Test the functions in the :class:`SongFormat` class.
+ """
+
+ def test_get_format_list(self):
+ """
+ Test that get_format_list() returns all available formats
+ """
+ # GIVEN: The SongFormat class
+ # WHEN: Retrieving the format list
+ # THEN: All SongFormats should be returned
+ self.assertEquals(len(SongFormat.get_format_list()), len(SongFormat.__attributes__),
+ "The returned SongFormats don't match the stored ones")
+
+ def test_get_attributed_no_attributes(self):
+ """
+ Test that SongFormat.get(song_format) returns all attributes associated with the given song_format
+ """
+ # GIVEN: A SongFormat
+ # WHEN: Retrieving all attributes of a SongFormat
+ for song_format in SongFormat.get_format_list():
+ # THEN: All attributes associated with the SongFormat should be returned
+ self.assertEquals(SongFormat.get(song_format), SongFormat.__attributes__[song_format],
+ "The returned attributes don't match the stored ones")
+
+ def test_get_attributed_single_attribute(self):
+ """
+ Test that SongFormat.get(song_format, attribute) returns only one -and the correct- attribute
+ """
+ # GIVEN: A SongFormat
+ for song_format in SongFormat.get_format_list():
+ # WHEN: Retrieving an attribute that overrides the default values
+ for attribute in SongFormat.get(song_format).keys():
+ # THEN: Return the attribute
+ self.assertEquals(SongFormat.get(song_format, attribute), SongFormat.get(song_format)[attribute],
+ "The returned attribute doesn't match the stored one")
+ # WHEN: Retrieving an attribute that was not overridden
+ for attribute in SongFormat.__defaults__.keys():
+ if attribute not in SongFormat.get(song_format).keys():
+ # THEN: Return the default value
+ self.assertEquals(SongFormat.get(song_format, attribute), SongFormat.__defaults__[attribute],
+ "The returned attribute does not match the default values stored")
+
+ def test_get_attributed_multiple_attributes(self):
+ """
+ Test that multiple attributes can be retrieved for a song_format
+ """
+ # GIVEN: A SongFormat
+ # WHEN: Retrieving multiple attributes at the same time
+ for song_format in SongFormat.get_format_list():
+ # THEN: Return all attributes that were specified
+ self.assertEquals(len(SongFormat.get(song_format, 'canDisable', 'availability')), 2,
+ "Did not return the correct number of attributes when retrieving multiple attributes at once")
+
Follow ups