From 23eaa3112c3fd8db5a7421b3c5bcc0ca7deee03f Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 7 Feb 2022 20:26:34 +0600 Subject: [PATCH 1/2] qt: Text update behaviour now identical to Win32 --- src/qt/qt_ui.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/qt/qt_ui.cpp b/src/qt/qt_ui.cpp index c2ea294c8..b3150a0ec 100644 --- a/src/qt/qt_ui.cpp +++ b/src/qt/qt_ui.cpp @@ -28,6 +28,8 @@ MainWindow* main_window = nullptr; +static QString sb_text, sb_buguitext; + extern "C" { #include <86box/plat.h> @@ -96,12 +98,18 @@ int ui_msgbox(int flags, void *message) { return ui_msgbox_header(flags, nullptr, message); } +void ui_sb_update_text() { + main_window->statusBar()->showMessage(sb_text.isEmpty() ? sb_buguitext : sb_text); +} + void ui_sb_set_text_w(wchar_t *wstr) { - main_window->statusBar()->showMessage(QString::fromWCharArray(wstr)); + sb_text = QString::fromWCharArray(wstr); + ui_sb_update_text(); } void ui_sb_set_text(char *str) { - main_window->statusBar()->showMessage(QString(str)); + sb_text = str; + ui_sb_update_text(); } void @@ -115,7 +123,8 @@ ui_sb_update_panes() { } void ui_sb_bugui(char *str) { - main_window->statusBarMessage(str); + sb_buguitext = str; + ui_sb_update_text();; } void ui_sb_set_ready(int ready) { From 0fa87edebbd15e471f690bc13fdc31fa5add1671 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 7 Feb 2022 20:31:56 +0600 Subject: [PATCH 2/2] Fix missing semicolons --- src/qt/qt_mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 9f7f845ea..6fe6a15b3 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -113,7 +113,7 @@ MainWindow::MainWindow(QWidget *parent) : #ifdef RELEASE_BUILD this->setWindowIcon(QIcon(":/settings/win/icons/86Box-green.ico")); #elif defined ALPHA_BUILD - this->setWindowIcon(QIcon(":/settings/win/icons/86Box-red.ico")) + this->setWindowIcon(QIcon(":/settings/win/icons/86Box-red.ico")); #elif defined BETA_BUILD this->setWindowIcon(QIcon(":/settings/win/icons/86Box-yellow.ico")); #else @@ -1439,7 +1439,7 @@ void MainWindow::on_actionAbout_86Box_triggered() #ifdef RELEASE_BUILD msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-green.ico").pixmap(32, 32)); #elif defined ALPHA_BUILD - msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-red.ico").pixmap(32, 32)) + msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-red.ico").pixmap(32, 32)); #elif defined BETA_BUILD msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-yellow.ico").pixmap(32, 32)); #else