This commit is contained in:
Kovid Goyal 2016-04-12 06:41:31 +05:30
parent 69faca466c
commit 5b9e52906a

View File

@ -316,14 +316,12 @@ class MainWindowMixin(object): # {{{
smw.setAutoFillBackground(True) smw.setAutoFillBackground(True)
smw.setStyleSheet('QLabel { background-color: rgba(200, 200, 200, 200); color: black }') smw.setStyleSheet('QLabel { background-color: rgba(200, 200, 200, 200); color: black }')
def show_shutdown_message(self, message): def show_shutdown_message(self, message=''):
smw = self.shutdown_message_widget smw = self.shutdown_message_widget
smw.setGeometry(0, 0, self.width(), self.height()) smw.setGeometry(0, 0, self.width(), self.height())
smw.setVisible(True) smw.setVisible(True)
smw.raise_() smw.raise_()
txt = smw.text() smw.setText(_('<h2>Shutting down</h2><div>') + message)
txt += '\n' + message
smw.setText(txt)
# Force processing the events needed to show the message # Force processing the events needed to show the message
QCoreApplication.processEvents() QCoreApplication.processEvents()
# }}} # }}}