Fix that POST card's message is disappearing when language/iconset change occurs

This commit is contained in:
Laci bá
2021-12-05 11:48:31 +01:00
parent c208cc4283
commit 41ba4ee86b
4 changed files with 16 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ extern void ui_status_update(void);
extern int ui_sb_find_part(int tag); extern int ui_sb_find_part(int tag);
extern void ui_sb_set_ready(int ready); extern void ui_sb_set_ready(int ready);
extern void ui_sb_update_panes(void); 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_update_tip(int meaning);
extern void ui_sb_timer_callback(int pane); extern void ui_sb_timer_callback(int pane);
extern void ui_sb_update_icon(int tag, int val); extern void ui_sb_update_icon(int tag, int val);

View File

@@ -453,6 +453,12 @@ ui_sb_update_panes()
} }
void
ui_sb_update_text()
{
}
void void
plat_get_dirname(char *dest, const char *path) plat_get_dirname(char *dest, const char *path)
{ {

View File

@@ -193,8 +193,9 @@ preferences_settings_save(void)
/* Update status bar */ /* Update status bar */
config_changed = 1; config_changed = 1;
ui_sb_set_ready(0); ui_sb_set_ready(-1);
ui_sb_update_panes(); ui_sb_update_panes();
ui_sb_update_text();
/* Save the language changes */ /* Save the language changes */
config_save(); config_save();

View File

@@ -485,6 +485,9 @@ StatusBarDestroyTips(void)
/* API: mark the status bar as not ready. */ /* API: mark the status bar as not ready. */
/* Values: -1 - not ready, but don't clear POST text
0 - not ready
1 - ready */
void void
ui_sb_set_ready(int ready) ui_sb_set_ready(int ready)
{ {
@@ -493,6 +496,9 @@ ui_sb_set_ready(int ready)
ui_sb_set_text(NULL); ui_sb_set_text(NULL);
} }
if (ready == -1)
ready = 0;
sb_ready = ready; sb_ready = ready;
} }
@@ -1022,7 +1028,7 @@ StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst)
} }
static void void
ui_sb_update_text() ui_sb_update_text()
{ {
uint8_t part = 0xff; uint8_t part = 0xff;