diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-06-30 22:37:05 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-06-30 22:37:05 +0100 |
commit | 846b53485474211a24248c9b0d5cc4205104a772 (patch) | |
tree | 8700086c923f5df423735c68707059af31710fa6 /amiga | |
parent | 01271f4061bbc8f8b26492a26e04bdbb8b9746c9 (diff) | |
download | netsurf-846b53485474211a24248c9b0d5cc4205104a772.tar.gz netsurf-846b53485474211a24248c9b0d5cc4205104a772.tar.bz2 |
Recreate the entire menu when the hotlist window is closed.
This ensures the hotlist entries in the menu are in sync with reality, and mirrors the existing hotlist toolbar update.
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/gui.c | 6 | ||||
-rwxr-xr-x | amiga/gui.h | 2 | ||||
-rw-r--r-- | amiga/menu.c | 8 | ||||
-rw-r--r-- | amiga/options.h | 2 | ||||
-rw-r--r-- | amiga/tree.c | 2 |
5 files changed, 7 insertions, 13 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 6e84e7077..543a77479 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3030,7 +3030,10 @@ void ami_gui_hotlist_toolbar_update(struct gui_window_2 *gwin) } } -void ami_gui_hotlist_toolbar_update_all(void) +/** + * Update hotlist toolbar and recreate the menu for all windows + */ +void ami_gui_hotlist_update_all(void) { struct nsObject *node; struct nsObject *nnode; @@ -3047,6 +3050,7 @@ void ami_gui_hotlist_toolbar_update_all(void) if(node->Type == AMINS_WINDOW) { ami_gui_hotlist_toolbar_update(gwin); + ami_menu_refresh(gwin); } } while(node = nnode); } diff --git a/amiga/gui.h b/amiga/gui.h index 87258a1e4..c106455d1 100755 --- a/amiga/gui.h +++ b/amiga/gui.h @@ -162,7 +162,7 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie); bool ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y); BOOL ami_gadget_hit(Object *obj, int x, int y); void ami_gui_history(struct gui_window_2 *gwin, bool back); -void ami_gui_hotlist_toolbar_update_all(void); +void ami_gui_hotlist_update_all(void); void ami_gui_tabs_toggle_all(void); bool ami_locate_resource(char *fullpath, const char *file); void ami_gui_update_hotlist_button(struct gui_window_2 *gwin); diff --git a/amiga/menu.c b/amiga/menu.c index c6258be6f..784fec163 100644 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -485,14 +485,6 @@ struct NewMenu *ami_create_menu(struct gui_window_2 *gwin) if(nsoption_bool(background_images) == true) gwin->menu[M_IMGBACK].nm_Flags |= CHECKED; - /* Set up scheduler to refresh the hotlist menu */ - if(nsoption_int(menu_refresh) > 0) - { - ami_schedule(nsoption_int(menu_refresh) * 10, - (void *)ami_menu_refresh, - gwin); - } - return(gwin->menu); } diff --git a/amiga/options.h b/amiga/options.h index e383dcf9a..868e28fdb 100644 --- a/amiga/options.h +++ b/amiga/options.h @@ -86,6 +86,4 @@ NSOPTION_INTEGER(redraw_tile_size_y, 0) NSOPTION_INTEGER(monitor_aspect_x, 0) NSOPTION_INTEGER(monitor_aspect_y, 0) NSOPTION_BOOL(accept_lang_locale, true) -NSOPTION_INTEGER(menu_refresh, 0) - diff --git a/amiga/tree.c b/amiga/tree.c index 04c799603..18b071de3 100644 --- a/amiga/tree.c +++ b/amiga/tree.c @@ -711,7 +711,7 @@ void ami_tree_close(struct treeview_window *twin) ami_ssl_free(twin); } - ami_gui_hotlist_toolbar_update_all(); + ami_gui_hotlist_update_all(); } void ami_tree_update_quals(struct treeview_window *twin) |