forked from openlp/openlp
Fix Message popup on windows , load last service
This commit is contained in:
parent
efec5e1e95
commit
2f618d8504
@ -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):
|
||||||
"""
|
"""
|
||||||
|
@ -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):
|
||||||
|
|
||||||
|
@ -420,16 +420,19 @@ 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.
|
||||||
"""
|
"""
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
if lastService:
|
||||||
translate(u'ThemeManager', u'Open Service'),
|
filename = self.config.get_last_dir()
|
||||||
self.config.get_last_dir(),
|
else:
|
||||||
u'Services (*.osz)')
|
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||||
|
translate(u'ThemeManager', u'Open Service'),
|
||||||
|
self.config.get_last_dir(),
|
||||||
|
u'Services (*.osz)')
|
||||||
filename = unicode(filename)
|
filename = unicode(filename)
|
||||||
name = filename.split(os.path.sep)
|
name = filename.split(os.path.sep)
|
||||||
if filename != u'':
|
if filename != u'':
|
||||||
|
Loading…
Reference in New Issue
Block a user