From 2083375ec45d159a916caee3b7b570aa6670684c Mon Sep 17 00:00:00 2001 From: Chris Young Date: Mon, 16 Jan 2017 22:24:05 +0000 Subject: 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. --- frontends/amiga/gui.c | 2 +- frontends/amiga/menu.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'frontends') diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c index bee7a8dd7..b2a489e72 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 2d2ec4e30..4fe4ce397 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); -- cgit v1.2.3