This commit is contained in:
Tim Bentley 2017-06-11 20:41:34 +01:00
parent aa9891612b
commit 33fe52cae1
4 changed files with 11 additions and 8 deletions

View File

@ -254,6 +254,9 @@ class ApiTab(SettingsTab):
self.user_id.setText(Settings().value(self.settings_section + '/user id'))
self.password.setText(Settings().value(self.settings_section + '/password'))
self.current_version_value.setText(Settings().value('remotes/download version'))
self.master_version_value.setText(Registry().get_flag('website_version'))
if self.master_version_value.text() == self.current_version_value.text():
self.update_site_group_box.setEnabled(False)
self.set_urls()
def save(self):
@ -311,6 +314,4 @@ class ApiTab(SettingsTab):
Update the website version when it has been downloaded
:return:
"""
self.master_version_value.setText(Registry().get_flag('website_version'))
if self.master_version_value.text() == self.current_version_value.text():
self.update_site_group_box.setEnabled(False)
self.load()

View File

@ -152,6 +152,7 @@ class UiStrings(object):
self.Split = translate('OpenLP.Ui', 'Optional &Split')
self.SplitToolTip = translate('OpenLP.Ui',
'Split a slide into two only if it does not fit on the screen as one slide.')
self.StartingImport = translate('OpenLP.Ui', 'Starting import...')
self.StopPlaySlidesInLoop = translate('OpenLP.Ui', 'Stop Play Slides in Loop')
self.StopPlaySlidesToEnd = translate('OpenLP.Ui', 'Stop Play Slides to End')
self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular')

View File

@ -26,7 +26,7 @@ import os
from PyQt5 import QtCore, QtWidgets
from openlp.core.api.http import register_endpoint
from openlp.core.common import AppLocation, Registry, Settings, OpenLPMixin, check_directory_exists
from openlp.core.common import AppLocation, Registry, Settings, OpenLPMixin, UiStrings, check_directory_exists
from openlp.core.lib import Plugin, StringContent, translate, build_icon
from openlp.plugins.remotes.endpoint import remote_endpoint
from openlp.plugins.remotes.deploy import download_and_check, download_sha256
@ -100,6 +100,7 @@ class RemotesPlugin(Plugin, OpenLPMixin):
self.application.process_events()
progress.close()
Settings().setValue('remotes/download version', Registry().set_flag('website_version'))
Registry().execute('set_website_version')
def website_version(self):
"""
@ -120,8 +121,8 @@ class Progress(QtWidgets.QProgressDialog):
super(Progress, self).__init__(parent.main_window)
self.parent = parent
self.setWindowModality(QtCore.Qt.WindowModal)
self.setWindowTitle(translate('OpenLP.Ui', 'Importing Website'))
self.setLabelText(translate('OpenLP.Ui', 'Starting import...'))
self.setWindowTitle(translate('RemotePlugin', 'Importing Website'))
self.setLabelText(UiStrings().StartingImport)
self.setCancelButton(None)
self.setRange(0, 1)
self.setMinimumDuration(0)

View File

@ -332,8 +332,8 @@ class SongsPlugin(Plugin):
self.application.process_events()
progress = QtWidgets.QProgressDialog(self.main_window)
progress.setWindowModality(QtCore.Qt.WindowModal)
progress.setWindowTitle(translate('OpenLP.Ui', 'Importing Songs'))
progress.setLabelText(translate('OpenLP.Ui', 'Starting import...'))
progress.setWindowTitle(translate('SongsPlugin', 'Importing Songs'))
progress.setLabelText(UiStrings().StartingImport)
progress.setCancelButton(None)
progress.setRange(0, song_count)
progress.setMinimumDuration(0)