From 41ba4ee86b8d84ba176dee1fde4e827f55732f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laci=20b=C3=A1?= Date: Sun, 5 Dec 2021 11:48:31 +0100 Subject: [PATCH] Fix that POST card's message is disappearing when language/iconset change occurs --- src/include/86box/ui.h | 1 + src/unix/unix.c | 6 ++++++ src/win/win_preferences.c | 3 ++- src/win/win_stbar.c | 8 +++++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/include/86box/ui.h b/src/include/86box/ui.h index 8b4e77fcd..256ae6002 100644 --- a/src/include/86box/ui.h +++ b/src/include/86box/ui.h @@ -66,6 +66,7 @@ extern void ui_status_update(void); extern int ui_sb_find_part(int tag); extern void ui_sb_set_ready(int ready); extern void ui_sb_update_panes(void); +extern void ui_sb_update_text(void); extern void ui_sb_update_tip(int meaning); extern void ui_sb_timer_callback(int pane); extern void ui_sb_update_icon(int tag, int val); diff --git a/src/unix/unix.c b/src/unix/unix.c index 2b949ea5f..47a65944d 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -453,6 +453,12 @@ ui_sb_update_panes() } +void +ui_sb_update_text() +{ + +} + void plat_get_dirname(char *dest, const char *path) { diff --git a/src/win/win_preferences.c b/src/win/win_preferences.c index 6bec48282..0c3e95892 100644 --- a/src/win/win_preferences.c +++ b/src/win/win_preferences.c @@ -193,8 +193,9 @@ preferences_settings_save(void) /* Update status bar */ config_changed = 1; - ui_sb_set_ready(0); + ui_sb_set_ready(-1); ui_sb_update_panes(); + ui_sb_update_text(); /* Save the language changes */ config_save(); diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c index 17178a6bf..4eb4b98a1 100644 --- a/src/win/win_stbar.c +++ b/src/win/win_stbar.c @@ -485,6 +485,9 @@ StatusBarDestroyTips(void) /* API: mark the status bar as not ready. */ +/* Values: -1 - not ready, but don't clear POST text + 0 - not ready + 1 - ready */ void ui_sb_set_ready(int ready) { @@ -493,6 +496,9 @@ ui_sb_set_ready(int ready) ui_sb_set_text(NULL); } + if (ready == -1) + ready = 0; + sb_ready = ready; } @@ -1022,7 +1028,7 @@ StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst) } -static void +void ui_sb_update_text() { uint8_t part = 0xff;