forked from openlp/openlp
General Tab Changes
bzr-revno: 611
This commit is contained in:
commit
2f153475f9
@ -136,4 +136,4 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
pushButton.setCheckable(True)
|
||||
pushButton.setFlat(True)
|
||||
self.addWidget(pushButton)
|
||||
return pushButton
|
||||
return pushButton
|
||||
|
@ -173,7 +173,7 @@ class GeneralTab(SettingsTab):
|
||||
self.MonitorComboBox.addItem(screen_name)
|
||||
# Get the configs
|
||||
self.MonitorNumber = int(self.config.get_config(u'Monitor', u'0'))
|
||||
self.Warning = str_to_bool(self.config.get_config(u'Warning', u'False'))
|
||||
self.Warning = str_to_bool(self.config.get_config(u'Blank Warning', u'False'))
|
||||
self.AutoOpen = str_to_bool(self.config.get_config(u'Auto Open', u'False'))
|
||||
self.ShowSplash = str_to_bool(self.config.get_config(u'show splash', u'True'))
|
||||
self.CCLNumber = unicode(self.config.get_config(u'CCL Number', u'XXX'))
|
||||
@ -190,7 +190,7 @@ class GeneralTab(SettingsTab):
|
||||
|
||||
def save(self):
|
||||
self.config.set_config(u'Monitor', self.MonitorNumber)
|
||||
self.config.set_config(u'Warning', self.Warning)
|
||||
self.config.set_config(u'Blank Warning', self.Warning)
|
||||
self.config.set_config(u'Auto Open', self.AutoOpen)
|
||||
self.config.set_config(u'show splash', self.ShowSplash)
|
||||
self.config.set_config(u'CCL Number', self.CCLNumber)
|
||||
|
@ -182,6 +182,7 @@ class MainDisplay(DisplayLabel):
|
||||
self.displayBlank = False
|
||||
if self.frame is not None:
|
||||
self.frameView(self.frame)
|
||||
self.parent.generalConfig.set_config(u'Screen Blank',self.displayBlank)
|
||||
|
||||
def displayAlert(self, text=u''):
|
||||
"""
|
||||
|
@ -32,7 +32,7 @@ from openlp.core.ui import AboutForm, SettingsForm, AlertForm, \
|
||||
PluginForm, MediaDockManager
|
||||
from openlp.core.lib import translate, RenderManager, PluginConfig, \
|
||||
OpenLPDockWidget, SettingsManager, PluginManager, Receiver, \
|
||||
buildIcon
|
||||
buildIcon, str_to_bool
|
||||
from openlp.core.utils import check_latest_version
|
||||
|
||||
media_manager_style = """
|
||||
@ -540,7 +540,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.ThemeManagerContents.loadThemes()
|
||||
log.info(u'Load data from Settings')
|
||||
self.settingsForm.postSetUp()
|
||||
self.versionCheck()
|
||||
|
||||
def versionCheck(self):
|
||||
applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-595')
|
||||
@ -569,7 +568,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
monitor_exists = True
|
||||
if not monitor_exists:
|
||||
screen_number = 0
|
||||
|
||||
return screen_number
|
||||
|
||||
def show(self):
|
||||
@ -580,6 +578,17 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
screen_number = self.getMonitorNumber()
|
||||
self.mainDisplay.setup(screen_number)
|
||||
self.setFocus()
|
||||
self.versionCheck()
|
||||
if str_to_bool(self.generalConfig.get_config(u'Auto Open', False)):
|
||||
self.ServiceManagerContents.onLoadService(True)
|
||||
if str_to_bool(self.generalConfig.get_config(u'Screen Blank', False)) \
|
||||
and str_to_bool(self.generalConfig.get_config(u'Blank Warning', False)):
|
||||
QtGui.QMessageBox.question(None,
|
||||
translate(u'mainWindow', u'OpenLP Main Display Blanked'),
|
||||
translate(u'mainWindow', u'The Main Display has been blanked out'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
self.LiveController.blackPushButton.setChecked(True)
|
||||
|
||||
def onHelpAboutItemClicked(self):
|
||||
"""
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(u'media_dockManager')
|
||||
log = logging.getLogger(u'MediaDockManager')
|
||||
|
||||
class MediaDockManager(object):
|
||||
|
||||
|
@ -420,16 +420,19 @@ class ServiceManager(QtGui.QWidget):
|
||||
def onQuickSaveService(self):
|
||||
self.onSaveService(True)
|
||||
|
||||
def onLoadService(self):
|
||||
def onLoadService(self, lastService = False):
|
||||
"""
|
||||
Load an existing service from disk and rebuild the serviceitems. All
|
||||
files retrieved from the zip file are placed in a temporary directory
|
||||
and will only be used for this service.
|
||||
"""
|
||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||
translate(u'ThemeManager', u'Open Service'),
|
||||
self.config.get_last_dir(),
|
||||
u'Services (*.osz)')
|
||||
if lastService:
|
||||
filename = self.config.get_last_dir()
|
||||
else:
|
||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||
translate(u'ThemeManager', u'Open Service'),
|
||||
self.config.get_last_dir(),
|
||||
u'Services (*.osz)')
|
||||
filename = unicode(filename)
|
||||
name = filename.split(os.path.sep)
|
||||
if filename != u'':
|
||||
|
Loading…
Reference in New Issue
Block a user