mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-16 17:22:44 +03:00
Correct checkbox logic
This commit is contained in:
parent
6a00255855
commit
eb366fa0d8
@ -1372,7 +1372,7 @@ void ami_gui_opts_open(void)
|
||||
GA_ID, GID_OPTS_SELECTMENU,
|
||||
GA_RelVerify, TRUE,
|
||||
GA_Text, gadlab[GID_OPTS_SELECTMENU],
|
||||
GA_Selected, nsoption_bool(core_select_menu),
|
||||
GA_Selected, !nsoption_bool(core_select_menu),
|
||||
GA_Disabled, !ami_selectmenu_is_safe(),
|
||||
CheckBoxEnd,
|
||||
#endif
|
||||
@ -1858,9 +1858,9 @@ static void ami_gui_opts_use(bool save)
|
||||
|
||||
GetAttr(GA_Selected,gow->objects[GID_OPTS_SELECTMENU],(ULONG *)&data);
|
||||
if (data) {
|
||||
nsoption_set_bool(core_select_menu, true);
|
||||
} else {
|
||||
nsoption_set_bool(core_select_menu, false);
|
||||
} else {
|
||||
nsoption_set_bool(core_select_menu, true);
|
||||
}
|
||||
|
||||
GetAttr(GA_Selected,gow->objects[GID_OPTS_STARTUP_NO_WIN],(ULONG *)&data);
|
||||
|
@ -67,7 +67,7 @@ void gui_create_form_select_menu(struct gui_window *g,
|
||||
{
|
||||
struct Library *PopupMenuBase = NULL;
|
||||
struct PopupMenuIFace *IPopupMenu = NULL;
|
||||
struct Hook ctxmenuhook;
|
||||
struct Hook selectmenuhook;
|
||||
Object *selectmenuobj;
|
||||
struct form_option *opt = form_select_get_option(control, 0);
|
||||
ULONG i = 0;
|
||||
@ -80,17 +80,17 @@ void gui_create_form_select_menu(struct gui_window *g,
|
||||
|
||||
if(IPopupMenu == NULL) return;
|
||||
|
||||
ctxmenuhook.h_Entry = ami_popup_hook;
|
||||
ctxmenuhook.h_SubEntry = NULL;
|
||||
ctxmenuhook.h_Data = g;
|
||||
selectmenuhook.h_Entry = ami_popup_hook;
|
||||
selectmenuhook.h_SubEntry = NULL;
|
||||
selectmenuhook.h_Data = g;
|
||||
|
||||
g->shared->control = control;
|
||||
|
||||
/**\todo PMIA_Title memory leaks as we don't free the strings.
|
||||
*/
|
||||
|
||||
selectmenuobj = PMMENU(ami_utf8_easy(form_control_get_name(control))),
|
||||
PMA_MenuHandler, &ctxmenuhook, End;
|
||||
selectmenuobj = PMMENU(form_control_get_name(control)),
|
||||
PMA_MenuHandler, &selectmenuhook, End;
|
||||
|
||||
while(opt) {
|
||||
IDoMethod(selectmenuobj, PM_INSERT,
|
||||
@ -123,5 +123,10 @@ void gui_create_form_select_menu(struct gui_window *g,
|
||||
void gui_create_form_select_menu(struct gui_window *g, struct form_control *control)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL ami_selectmenu_is_safe()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user