summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xamiga/gui.c26
-rwxr-xr-xamiga/gui_options.c2
-rwxr-xr-xamiga/menu.c5
-rwxr-xr-xamiga/menu.h2
4 files changed, 33 insertions, 2 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index d92a5c25a..e1fc19d7f 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -1191,6 +1191,27 @@ void ami_gui_trap_mouse(struct gui_window_2 *gwin)
}
}
+void ami_gui_menu_update_all(void)
+{
+ struct nsObject *node;
+ struct nsObject *nnode;
+ struct gui_window_2 *gwin;
+
+ if(IsMinListEmpty(window_list)) return;
+
+ node = (struct nsObject *)GetHead((struct List *)window_list);
+
+ do {
+ nnode=(struct nsObject *)GetSucc((struct Node *)node);
+ gwin = node->objstruct;
+
+ if(node->Type == AMINS_WINDOW)
+ {
+ ami_menu_update_checked(gwin);
+ }
+ } while(node = nnode);
+}
+
void ami_handle_msg(void)
{
struct IntuiMessage *message = NULL;
@@ -1944,6 +1965,11 @@ void ami_handle_msg(void)
ami_menu_window_close = NULL;
}
+
+ if(ami_menu_check_toggled) {
+ ami_gui_menu_update_all();
+ ami_menu_check_toggled = false;
+ }
}
void ami_gui_appicon_remove(struct gui_window_2 *gwin)
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 092bb4cb3..66e47d8ad 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -1861,6 +1861,8 @@ void ami_gui_opts_use(bool save)
ami_font_savescanner(); /* just in case it has changed and been used only */
}
+ ami_menu_check_toggled = true;
+
SetWindowPointer(gow->win,
WA_Pointer, NULL,
TAG_DONE);
diff --git a/amiga/menu.c b/amiga/menu.c
index 76fa9e001..58a4d5115 100755
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -693,8 +693,6 @@ void ami_menu_update_disabled(struct gui_window *g, hlcache_handle *c)
OffMenu(win,AMI_MENU_SAVEAS_IFF);
}
}
-
- ami_menu_update_checked(g->shared);
}
/*
@@ -905,6 +903,7 @@ static void ami_menu_item_browser_foreimg(struct Hook *hook, APTR window, struct
if(ItemAddress(menustrip, msg->Code)->Flags & CHECKED) checked = true;
nsoption_set_bool(foreground_images, checked);
+ ami_menu_check_toggled = true;
}
static void ami_menu_item_browser_backimg(struct Hook *hook, APTR window, struct IntuiMessage *msg)
@@ -916,6 +915,7 @@ static void ami_menu_item_browser_backimg(struct Hook *hook, APTR window, struct
if(ItemAddress(menustrip, msg->Code)->Flags & CHECKED) checked = true;
nsoption_set_bool(background_images, checked);
+ ami_menu_check_toggled = true;
}
static void ami_menu_item_browser_enablejs(struct Hook *hook, APTR window, struct IntuiMessage *msg)
@@ -927,6 +927,7 @@ static void ami_menu_item_browser_enablejs(struct Hook *hook, APTR window, struc
if(ItemAddress(menustrip, msg->Code)->Flags & CHECKED) checked = true;
nsoption_set_bool(enable_javascript, checked);
+ ami_menu_check_toggled = true;
}
static void ami_menu_item_browser_scale_decrease(struct Hook *hook, APTR window, struct IntuiMessage *msg)
diff --git a/amiga/menu.h b/amiga/menu.h
index 58628ac48..8cff2d539 100755
--- a/amiga/menu.h
+++ b/amiga/menu.h
@@ -73,9 +73,11 @@ struct gui_window;
struct gui_window_2;
struct gui_window_2 *ami_menu_window_close;
+bool ami_menu_check_toggled;
void ami_free_menulabs(struct gui_window_2 *gwin);
struct NewMenu *ami_create_menu(struct gui_window_2 *gwin);
void ami_menu_refresh(struct gui_window_2 *gwin);
+void ami_menu_update_checked(struct gui_window_2 *gwin);
void ami_menu_update_disabled(struct gui_window *g, hlcache_handle *c);
#endif