summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscos/hotlist.c2
-rw-r--r--riscos/toolbar.c15
-rw-r--r--riscos/toolbar.h7
3 files changed, 24 insertions, 0 deletions
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index 3350ffb8b..714744043 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -241,6 +241,7 @@ void ro_gui_hotlist_toolbar_click(button_bar_action action)
switch (action) {
case TOOLBAR_BUTTON_DELETE:
hotlist_keypress(KEY_DELETE_LEFT);
+ ro_toolbar_update_all_hotlists();
break;
case TOOLBAR_BUTTON_EXPAND:
@@ -410,6 +411,7 @@ bool ro_gui_hotlist_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
return true;
case TREE_SELECTION_DELETE:
hotlist_keypress(KEY_DELETE_LEFT);
+ ro_toolbar_update_all_hotlists();
return true;
case TREE_SELECT_ALL:
hotlist_keypress(KEY_SELECT_ALL);
diff --git a/riscos/toolbar.c b/riscos/toolbar.c
index d0c68c2b7..93c4438c3 100644
--- a/riscos/toolbar.c
+++ b/riscos/toolbar.c
@@ -1620,6 +1620,21 @@ const char *ro_toolbar_get_url(struct toolbar *toolbar)
/* This is an exported interface documented in toolbar.h */
+void ro_toolbar_update_all_hotlists(void)
+{
+ struct toolbar *bar;
+
+ bar = ro_toolbar_bars;
+ while (bar != NULL) {
+ ro_toolbar_update_hotlist(bar);
+
+ bar = bar->next;
+ }
+}
+
+
+/* This is an exported interface documented in toolbar.h */
+
void ro_toolbar_update_hotlist(struct toolbar *toolbar)
{
if (toolbar == NULL || toolbar->url == NULL)
diff --git a/riscos/toolbar.h b/riscos/toolbar.h
index e568b8c23..336f95d15 100644
--- a/riscos/toolbar.h
+++ b/riscos/toolbar.h
@@ -386,6 +386,13 @@ const char *ro_toolbar_get_url(struct toolbar *toolbar);
/**
+ * Update the state of the URL Bar hotlist icons in all open toolbars.
+ */
+
+void ro_toolbar_update_all_hotlists(void);
+
+
+/**
* Update the state of a toolbar's URL Bar hotlist icon to reflect any changes
* to the URL or the hotlist contents.
*