summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2017-01-16 22:24:05 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2017-01-16 22:24:05 (GMT)
commit2083375ec45d159a916caee3b7b570aa6670684c (patch)
tree74861e0c1c0a1e00e999a2e23d96cf9a30360190
parent53ce28c170ac5264405a7a12a718cf57a382518d (diff)
downloadnetsurf-2083375ec45d159a916caee3b7b570aa6670684c.tar.gz
netsurf-2083375ec45d159a916caee3b7b570aa6670684c.tar.bz2
Perform dynamic update of Hotlist menu when using MenuClass menus
Currently updates on closing the Hotlist window, but could be persuaded to update on every hotlist drag if deemed necessary.
-rw-r--r--frontends/amiga/gui.c2
-rw-r--r--frontends/amiga/menu.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index bee7a8d..b2a489e 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -3327,7 +3327,7 @@ void ami_gui_hotlist_update_all(void)
if(IsMinListEmpty(window_list)) return;
- //ami_gui_menu_refresh_hotlist(); /**\todo disabled as menuclass isn't updating correctly */
+ ami_gui_menu_refresh_hotlist();
node = (struct nsObject *)GetHead((struct List *)window_list);
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index 2d2ec4e..4fe4ce3 100644
--- a/frontends/amiga/menu.c
+++ b/frontends/amiga/menu.c
@@ -240,6 +240,7 @@ static int ami_menu_layout_mc_recursive(Object *menu_parent, struct ami_menu_dat
if(level == NM_TITLE) {
menu_item = NewObject(NULL, "menuclass",
MA_Type, T_MENU,
+ MA_ID, j,
MA_Label, md[j]->menulab,
TAG_DONE);
} else {
@@ -446,7 +447,7 @@ void ami_menu_refresh(struct Menu *menu, struct ami_menu_data **md, int menu_ite
if(LIB_IS_AT_LEAST((struct Library *)IntuitionBase, 54, 6)) {
/* find the address of the menu */
menu_item_obj = (Object *)IDoMethod((Object *)menu, MM_FINDID, 0, menu_item);
-
+printf("%lx\n", menu_item_obj);
/* remove all children */
while((obj = (Object *)IDoMethod(menu_item_obj, MM_NEXTCHILD, 0, NULL)) != NULL) {
IDoMethod(menu_item_obj, OM_REMMEMBER, obj);