From 6d7c19256b0992203d26d477d06e30e7217e3e0a Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Fri, 15 Feb 2019 20:22:02 +0000 Subject: [PATCH] Fixes --- openlp/core/ui/firsttimeform.py | 7 ++++--- openlp/core/ui/firsttimewizard.py | 2 +- tests/interfaces/openlp_core/ui/test_firsttimeform.py | 4 +--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py index da9e38381..536f9e845 100644 --- a/openlp/core/ui/firsttimeform.py +++ b/openlp/core/ui/firsttimeform.py @@ -88,6 +88,7 @@ class ThemeListWidgetItem(QtWidgets.QListWidgetItem): """ self.setIcon(build_icon(thumbnail_path)) + class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties): """ This is the Theme Import Wizard, which allows easy creation and editing of OpenLP themes. @@ -172,9 +173,9 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties): try: web_config = get_web_page('{host}{name}'.format(host=self.web, name='download_3.0.json'), headers={'User-Agent': user_agent}) - web_config = Path( - 'C:\\Users\\sroom\\Documents\\Phill Ridout\\play_ground\\openlp\\ftw-json\\download_3.0.json' - ).read_text(encoding='utf-8') # TODO: Remove!!!!! + # web_config = Path( + # 'C:\\Users\\sroom\\Documents\\Phill Ridout\\play_ground\\openlp\\ftw-json\\download_3.0.json' + # ).read_text(encoding='utf-8') # TODO: Remove!!!!! except ConnectionError as e: QtWidgets.QMessageBox.critical(self, translate('OpenLP.FirstTimeWizard', 'Network Error'), translate('OpenLP.FirstTimeWizard', 'There was a network error attempting ' diff --git a/openlp/core/ui/firsttimewizard.py b/openlp/core/ui/firsttimewizard.py index 4424dfca4..8388c915d 100644 --- a/openlp/core/ui/firsttimewizard.py +++ b/openlp/core/ui/firsttimewizard.py @@ -220,7 +220,7 @@ class UiFirstTimeWizard(object): self.theme_combo_box.setEditable(False) self.default_theme_layout.addWidget(self.theme_combo_box, stretch=1) self.theme_options_layout.addLayout(self.default_theme_layout, stretch=1) - self.select_buttons_layout = QtWidgets.QHBoxLayout(self.themes_page) + self.select_buttons_layout = QtWidgets.QHBoxLayout() self.themes_select_all_button = QtWidgets.QToolButton(self.themes_page) self.themes_select_all_button.setIcon(UiIcons().plus) self.select_buttons_layout.addWidget(self.themes_select_all_button, stretch=1, alignment=QtCore.Qt.AlignRight) diff --git a/tests/interfaces/openlp_core/ui/test_firsttimeform.py b/tests/interfaces/openlp_core/ui/test_firsttimeform.py index 62242e8a2..5aa7e1741 100644 --- a/tests/interfaces/openlp_core/ui/test_firsttimeform.py +++ b/tests/interfaces/openlp_core/ui/test_firsttimeform.py @@ -4,7 +4,7 @@ ############################################################################### # OpenLP - Open Source Lyrics Projection # # --------------------------------------------------------------------------- # -# Copyright (c) 2008-2017 OpenLP Developers # +# Copyright (c) 2008-2019 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 # @@ -31,8 +31,6 @@ from openlp.core.ui.firsttimeform import ThemeListWidgetItem from openlp.core.ui.icons import UiIcons from tests.helpers.testmixin import TestMixin -# TODO: BZR ADD!!!!!!!!!!!!! - class TestThemeListWidgetItem(TestCase, TestMixin): def setUp(self):