Update JS menu check state when prefs option is toggled

This commit is contained in:
Chris Young 2017-01-15 16:10:23 +00:00
parent 606cc0c219
commit 8e7603e6a2
3 changed files with 12 additions and 2 deletions

View File

@ -598,12 +598,20 @@ static void ami_gui_menu_set_checked_mc(struct Menu *menu, int item, bool check)
check_state = 0;
}
if(menu == NULL) {
menu = gui_menu;
}
IDoMethod((Object *)menu, MM_SETSTATE, 0, item, MS_CHECKED, check_state);
}
#endif
static void ami_gui_menu_set_checked_gt(struct Menu *menu, int item, bool check)
{
if(menu == NULL) {
return;
}
if(check == true) {
if((ItemAddress(menu, ami_gui_menu_number(item))->Flags & CHECKED) == 0)
ItemAddress(menu, ami_gui_menu_number(item))->Flags ^= CHECKED;

View File

@ -1727,7 +1727,9 @@ static void ami_gui_opts_use(bool save)
} else {
nsoption_set_bool(enable_javascript, false);
}
ami_gui_menu_set_checked(NULL, M_JS, nsoption_bool(enable_javascript));
GetAttr(GA_Selected,gow->objects[GID_OPTS_DONOTTRACK],(ULONG *)&data);
if (data) {
nsoption_set_bool(do_not_track, true);

View File

@ -39,7 +39,7 @@
#include <reaction/reaction_macros.h>
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "amiga/gui.h"
#include "amiga/libs.h"