From 75a86f05ee3780bef067a5f7fd6bbcb691459111 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 11 Jan 2013 13:43:18 +0100 Subject: [PATCH] fixed removed plugin --- openlp/core/lib/settings.py | 2 +- openlp/core/ui/mainwindow.py | 3 +-- openlp/plugins/remotes/lib/remotetab.py | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index 3384195e2..47ec8692c 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -81,7 +81,7 @@ class Settings(QtCore.QSettings): u'advanced/default image': u':/graphics/openlp-splash-screen.png', u'advanced/expand service item': False, u'advanced/recent file count': 4, - # TODO: Check if translate already works at this stage. If not move the string to Ui String class. + # FIXME: Does not work: u'advanced/default service name': UiStrings().DefaultServiceName, u'advanced/default service minute': 0, u'advanced/slide limits': SlideLimits.End, diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 7883bff7b..16ae98633 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -923,8 +923,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): export_settings.beginGroup(self.headerSection) export_settings.setValue(u'Make_Changes', u'At_Own_RISK') export_settings.setValue(u'type', u'OpenLP_settings_export') - export_settings.setValue(u'file_date_created', - now.strftime("%Y-%m-%d %H:%M")) + export_settings.setValue(u'file_date_created', now.strftime("%Y-%m-%d %H:%M")) export_settings.setValue(u'version', application_version[u'full']) export_settings.endGroup() # Write all the sections and keys. diff --git a/openlp/plugins/remotes/lib/remotetab.py b/openlp/plugins/remotes/lib/remotetab.py index 6056c5bdb..bd3e14ff2 100644 --- a/openlp/plugins/remotes/lib/remotetab.py +++ b/openlp/plugins/remotes/lib/remotetab.py @@ -31,7 +31,6 @@ from PyQt4 import QtCore, QtGui, QtNetwork from openlp.core.lib import Settings, SettingsTab, translate, Receiver -ZERO_URL = u'0.0.0.0' class RemoteTab(SettingsTab): """ @@ -115,7 +114,7 @@ class RemoteTab(SettingsTab): def setUrls(self): ipAddress = u'localhost' - if self.addressEdit.text() == ZERO_URL: + if self.addressEdit.text() == Settings().value(self.settingsSection + u'/ip address'): ifaces = QtNetwork.QNetworkInterface.allInterfaces() for iface in ifaces: if not iface.isValid(): @@ -136,7 +135,6 @@ class RemoteTab(SettingsTab): def load(self): self.portSpinBox.setValue(Settings().value(self.settingsSection + u'/port')) - # Check constant: ZERO_URL self.addressEdit.setText(Settings().value(self.settingsSection + u'/ip address')) self.twelveHour = Settings().value(self.settingsSection + u'/twelve hour') self.twelveHourCheckBox.setChecked(self.twelveHour) @@ -144,9 +142,8 @@ class RemoteTab(SettingsTab): def save(self): changed = False - # FIXME: What's going on here? - if Settings().value(self.settingsSection + u'/ip address', ZERO_URL != self.addressEdit.text() or - Settings().value(self.settingsSection + u'/port', 4316) != self.portSpinBox.value()): + if Settings().value(self.settingsSection + u'/ip address') != self.addressEdit.text() or \ + Settings().value(self.settingsSection + u'/port') != self.portSpinBox.value(): changed = True Settings().setValue(self.settingsSection + u'/port', self.portSpinBox.value()) Settings().setValue(self.settingsSection + u'/ip address', self.addressEdit.text())