mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
69faca466c
commit
5b9e52906a
@ -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()
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user