summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/browser.c2
-rw-r--r--riscos/gui/status_bar.c25
2 files changed, 3 insertions, 24 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 2a3d8d7ea..4986176d7 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -936,7 +936,7 @@ void browser_window_set_status(struct browser_window *bw, const char *text)
}
bw->status_miss++;
- gui_window_set_status(bw->window, text);
+ gui_window_set_status(bw->window, bw->status_text);
}
diff --git a/riscos/gui/status_bar.c b/riscos/gui/status_bar.c
index 087fd861b..75208ff64 100644
--- a/riscos/gui/status_bar.c
+++ b/riscos/gui/status_bar.c
@@ -314,31 +314,10 @@ void ro_gui_status_bar_set_text(struct status_bar *sb, const char *text)
{
assert(sb);
- /* check for no change */
- if (sb->text) {
- /* strings match */
- if (!strcmp(text, sb->text))
- return;
- } else {
- /* still no string */
- if (!text)
- return;
- }
-
- /* release the old text */
- if (sb->text)
- free(sb->text);
-
- /* copy new text if required. we don't abort on the string duplication
- * failing as it would just cause the visible display to be out of
- * sync with the (failed) text */
- if (text)
- sb->text = strdup(text);
- else
- sb->text = NULL;
+ sb->text = text;
/* redraw the window */
- if (sb->visible)
+ if ((sb->visible) && (text != NULL))
xwimp_force_redraw(sb->w, 0, 0, sb->width - WIDGET_WIDTH, 65536);
}