Fix Message popup on windows , load last service

This commit is contained in:
Tim Bentley 2009-10-18 15:53:04 +01:00
parent efec5e1e95
commit 2f618d8504
3 changed files with 13 additions and 9 deletions

View File

@ -32,7 +32,7 @@ from openlp.core.ui import AboutForm, SettingsForm, AlertForm, \
PluginForm, MediaDockManager PluginForm, MediaDockManager
from openlp.core.lib import translate, RenderManager, PluginConfig, \ from openlp.core.lib import translate, RenderManager, PluginConfig, \
OpenLPDockWidget, SettingsManager, PluginManager, Receiver, \ OpenLPDockWidget, SettingsManager, PluginManager, Receiver, \
buildIcon buildIcon, str_to_bool
from openlp.core.utils import check_latest_version from openlp.core.utils import check_latest_version
media_manager_style = """ media_manager_style = """
@ -540,7 +540,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.ThemeManagerContents.loadThemes() self.ThemeManagerContents.loadThemes()
log.info(u'Load data from Settings') log.info(u'Load data from Settings')
self.settingsForm.postSetUp() self.settingsForm.postSetUp()
self.versionCheck()
def versionCheck(self): def versionCheck(self):
applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-595') 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 monitor_exists = True
if not monitor_exists: if not monitor_exists:
screen_number = 0 screen_number = 0
return screen_number return screen_number
def show(self): def show(self):
@ -580,6 +578,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
screen_number = self.getMonitorNumber() screen_number = self.getMonitorNumber()
self.mainDisplay.setup(screen_number) self.mainDisplay.setup(screen_number)
self.setFocus() self.setFocus()
self.versionCheck()
if str_to_bool(self.generalConfig.get_config(u'Auto Open', False)):
self.ServiceManagerContents.onLoadService(True)
def onHelpAboutItemClicked(self): def onHelpAboutItemClicked(self):
""" """

View File

@ -24,7 +24,7 @@
import logging import logging
log = logging.getLogger(u'media_dockManager') log = logging.getLogger(u'MediaDockManager')
class MediaDockManager(object): class MediaDockManager(object):

View File

@ -420,12 +420,15 @@ class ServiceManager(QtGui.QWidget):
def onQuickSaveService(self): def onQuickSaveService(self):
self.onSaveService(True) self.onSaveService(True)
def onLoadService(self): def onLoadService(self, lastService = False):
""" """
Load an existing service from disk and rebuild the serviceitems. All Load an existing service from disk and rebuild the serviceitems. All
files retrieved from the zip file are placed in a temporary directory files retrieved from the zip file are placed in a temporary directory
and will only be used for this service. and will only be used for this service.
""" """
if lastService:
filename = self.config.get_last_dir()
else:
filename = QtGui.QFileDialog.getOpenFileName(self, filename = QtGui.QFileDialog.getOpenFileName(self,
translate(u'ThemeManager', u'Open Service'), translate(u'ThemeManager', u'Open Service'),
self.config.get_last_dir(), self.config.get_last_dir(),