do some of the clean ups even when we just imported settings

This commit is contained in:
Andreas Preikschat 2012-05-27 12:58:10 +02:00
parent 612500c677
commit d5f1c54669

View File

@ -1185,9 +1185,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.imageManager.stop_manager = True self.imageManager.stop_manager = True
while self.imageManager.imageThread.isRunning(): while self.imageManager.imageThread.isRunning():
time.sleep(0.1) time.sleep(0.1)
if save_settings:
# Clean temporary files used by services # Clean temporary files used by services
self.serviceManagerContents.cleanUp() self.serviceManagerContents.cleanUp()
if save_settings:
if QtCore.QSettings().value(u'advanced/save current plugin', if QtCore.QSettings().value(u'advanced/save current plugin',
QtCore.QVariant(False)).toBool(): QtCore.QVariant(False)).toBool():
QtCore.QSettings().setValue(u'advanced/current media plugin', QtCore.QSettings().setValue(u'advanced/current media plugin',
@ -1195,6 +1195,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
# Call the cleanup method to shutdown plugins. # Call the cleanup method to shutdown plugins.
log.info(u'cleanup plugins') log.info(u'cleanup plugins')
self.pluginManager.finalise_plugins() self.pluginManager.finalise_plugins()
if save_settings:
# Save settings # Save settings
self.saveSettings() self.saveSettings()
# Close down the display # Close down the display