Tim Bentley has proposed merging lp:~trb143/openlp/svg into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~trb143/openlp/svg/+merge/343242
--
Your team OpenLP Core is requested to review the proposed merge of
lp:~trb143/openlp/svg into lp:openlp.
=== modified file 'openlp/core/api/tab.py'
--- openlp/core/api/tab.py 2018-02-11 21:52:04 +
+++ openlp/core/api/tab.py 2018-04-13 20:29:40 +
@@ -41,8 +41,6 @@
self.icon_path = ':/plugins/plugin_remote.png'
advanced_translated = translate('OpenLP.AdvancedTab', 'Advanced')
super(ApiTab, self).__init__(parent, 'api', advanced_translated)
-self.define_main_window_icon()
-self.generate_icon()
def setupUi(self):
self.setObjectName('ApiTab')
@@ -155,24 +153,6 @@
self.thumbnails_check_box.stateChanged.connect(self.on_thumbnails_check_box_changed)
self.address_edit.textChanged.connect(self.set_urls)
-def define_main_window_icon(self):
-"""
-Define an icon on the main window to show the state of the server
-:return:
-"""
-self.remote_server_icon = QtWidgets.QLabel(self.main_window.status_bar)
-size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
-size_policy.setHorizontalStretch(0)
-size_policy.setVerticalStretch(0)
-size_policy.setHeightForWidth(self.remote_server_icon.sizePolicy().hasHeightForWidth())
-self.remote_server_icon.setSizePolicy(size_policy)
-self.remote_server_icon.setFrameShadow(QtWidgets.QFrame.Plain)
-self.remote_server_icon.setLineWidth(1)
-self.remote_server_icon.setScaledContents(True)
-self.remote_server_icon.setFixedSize(20, 20)
-self.remote_server_icon.setObjectName('remote_server_icon')
-self.main_window.status_bar.insertPermanentWidget(2, self.remote_server_icon)
-
def retranslateUi(self):
self.tab_title_visible = translate('RemotePlugin.RemoteTab', 'Remote Interface')
self.server_settings_group_box.setTitle(translate('RemotePlugin.RemoteTab', 'Server Settings'))
@@ -280,19 +260,3 @@
# we have a set value convert to True/False
if check_state == QtCore.Qt.Checked:
self.thumbnails = True
-
-def generate_icon(self):
-"""
-Generate icon for main window
-"""
-self.remote_server_icon.hide()
-icon = QtGui.QImage(':/remote/network_server.png')
-icon = icon.scaled(80, 80, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
-if Settings().value(self.settings_section + '/authentication enabled'):
-overlay = QtGui.QImage(':/remote/network_auth.png')
-overlay = overlay.scaled(60, 60, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
-painter = QtGui.QPainter(icon)
-painter.drawImage(20, 0, overlay)
-painter.end()
-self.remote_server_icon.setPixmap(QtGui.QPixmap.fromImage(icon))
-self.remote_server_icon.show()
=== modified file 'openlp/core/app.py'
--- openlp/core/app.py 2018-03-29 16:25:10 +
+++ openlp/core/app.py 2018-04-13 20:29:40 +
@@ -404,6 +404,7 @@
if not Settings().value('core/has run wizard'):
if not FirstTimeLanguageForm().exec():
# if cancel then stop processing
+server.close_server()
sys.exit()
# i18n Set Language
language = LanguageManager.get_language()
=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py 2018-03-29 15:16:55 +
+++ openlp/core/common/i18n.py 2018-04-13 20:29:40 +
@@ -339,9 +339,10 @@
"""
if not cls.__instance__:
cls.__instance__ = object.__new__(cls)
+cls.load(cls)
return cls.__instance__
-def __init__(self):
+def load(self):
"""
These strings should need a good reason to be retranslated elsewhere.
Should some/more/less of these have an & attached?
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2017-12-29 09:15:48 +
+++ openlp/core/lib/mediamanageritem.py 2018-04-13 20:29:40 +
@@ -28,6 +28,7 @@
from PyQt5 import QtCore, QtWidgets
from openlp.core.common.i18n import UiStrings, translate
+from openlp.core.ui.icons import UiIcons
from openlp.core.common.mixins import RegistryProperties
from openlp.core.common.path import path_to_str, str_to_path
from openlp.core.common.registry import Registry
@@ -165,28 +166,25 @@
toolbar_actions = []
# Import Button
if self.has_import_icon:
-toolbar_actions.append(['Import', StringContent.Import,
-':/general/general_import.png', self.on_import_click])
+toolbar_actions.append(['Import', StringContent.Import, UiIcons().download, self.on_impo