mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Update JS menu check state when prefs option is toggled
This commit is contained in:
parent
606cc0c219
commit
8e7603e6a2
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user