Fix a crash when edit settings if NetSurf is running on the WB screen
Rename use_pubscreen to make it clearer what the option is for
This commit is contained in:
parent
864762cbe6
commit
8b586b2d67
|
@ -455,13 +455,13 @@ STATIC VOID rx_pubscreen(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__
|
||||||
{
|
{
|
||||||
cmd->ac_RC = 0;
|
cmd->ac_RC = 0;
|
||||||
|
|
||||||
if(nsoption_charp(use_pubscreen) == NULL)
|
if(nsoption_charp(pubscreen_name) == NULL)
|
||||||
{
|
{
|
||||||
strcpy(result,"NetSurf");
|
strcpy(result,"NetSurf");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(result, nsoption_charp(use_pubscreen));
|
strcpy(result, nsoption_charp(pubscreen_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd->ac_Result = result;
|
cmd->ac_Result = result;
|
||||||
|
|
|
@ -558,7 +558,7 @@
|
||||||
(help @textfile-help)
|
(help @textfile-help)
|
||||||
(dest #user-options)
|
(dest #user-options)
|
||||||
(append "theme:" #theme "\n")
|
(append "theme:" #theme "\n")
|
||||||
(append "use_pubscreen:Workbench\n")
|
(append "pubscreen_name:Workbench\n")
|
||||||
)
|
)
|
||||||
|
|
||||||
(if (= #hotlist-exist 0)
|
(if (= #hotlist-exist 0)
|
||||||
|
|
|
@ -55,7 +55,7 @@ void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
|
||||||
{
|
{
|
||||||
const char *filetype = NULL;
|
const char *filetype = NULL;
|
||||||
|
|
||||||
if(strcmp(nsoption_charp(use_pubscreen), "Workbench")) return;
|
if(strcmp(nsoption_charp(pubscreen_name), "Workbench")) return;
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ void ami_drag_save(struct Window *win)
|
||||||
ami_drag_icon_close(NULL);
|
ami_drag_icon_close(NULL);
|
||||||
ami_autoscroll = FALSE;
|
ami_autoscroll = FALSE;
|
||||||
|
|
||||||
if(nsoption_charp(use_pubscreen) && (strcmp(nsoption_charp(use_pubscreen),"Workbench") == 0))
|
if(nsoption_charp(pubscreen_name) && (strcmp(nsoption_charp(pubscreen_name),"Workbench") == 0))
|
||||||
{
|
{
|
||||||
which = WhichWorkbenchObject(NULL,scrn->MouseX,scrn->MouseY,
|
which = WhichWorkbenchObject(NULL,scrn->MouseX,scrn->MouseY,
|
||||||
WBOBJA_Type,&type,
|
WBOBJA_Type,&type,
|
||||||
|
|
12
amiga/gui.c
12
amiga/gui.c
|
@ -690,7 +690,7 @@ void ami_openscreen(void)
|
||||||
compositing = ~0UL;
|
compositing = ~0UL;
|
||||||
else compositing = nsoption_int(screen_compositing);
|
else compositing = nsoption_int(screen_compositing);
|
||||||
|
|
||||||
if (nsoption_charp(use_pubscreen) == NULL)
|
if (nsoption_charp(pubscreen_name) == NULL)
|
||||||
{
|
{
|
||||||
if((nsoption_charp(screen_modeid)) &&
|
if((nsoption_charp(screen_modeid)) &&
|
||||||
(strncmp(nsoption_charp(screen_modeid), "0x", 2) == 0))
|
(strncmp(nsoption_charp(screen_modeid), "0x", 2) == 0))
|
||||||
|
@ -739,15 +739,15 @@ void ami_openscreen(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nsoption_set_charp(use_pubscreen,
|
nsoption_set_charp(pubscreen_name,
|
||||||
strdup("Workbench"));
|
strdup("Workbench"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nsoption_charp(use_pubscreen) != NULL)
|
if (nsoption_charp(pubscreen_name) != NULL)
|
||||||
{
|
{
|
||||||
scrn = LockPubScreen(nsoption_charp(use_pubscreen));
|
scrn = LockPubScreen(nsoption_charp(pubscreen_name));
|
||||||
|
|
||||||
if(scrn == NULL)
|
if(scrn == NULL)
|
||||||
{
|
{
|
||||||
|
@ -3275,9 +3275,9 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||||
ULONG addtabclosegadget = TAG_IGNORE;
|
ULONG addtabclosegadget = TAG_IGNORE;
|
||||||
ULONG iconifygadget = FALSE;
|
ULONG iconifygadget = FALSE;
|
||||||
|
|
||||||
if (nsoption_charp(use_pubscreen) &&
|
if (nsoption_charp(pubscreen_name) &&
|
||||||
(locked_screen == TRUE) &&
|
(locked_screen == TRUE) &&
|
||||||
(strcmp(nsoption_charp(use_pubscreen), "Workbench") == 0))
|
(strcmp(nsoption_charp(pubscreen_name), "Workbench") == 0))
|
||||||
iconifygadget = TRUE;
|
iconifygadget = TRUE;
|
||||||
ami_create_menu(g->shared);
|
ami_create_menu(g->shared);
|
||||||
|
|
||||||
|
|
|
@ -415,9 +415,9 @@ void ami_gui_opts_open(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nsoption_charp(use_pubscreen))
|
if(nsoption_charp(pubscreen_name))
|
||||||
{
|
{
|
||||||
if(strcmp(nsoption_charp(use_pubscreen),"Workbench") == 0)
|
if(strcmp(nsoption_charp(pubscreen_name),"Workbench") == 0)
|
||||||
{
|
{
|
||||||
screenoptsselected = 1;
|
screenoptsselected = 1;
|
||||||
screennamedisabled = TRUE;
|
screennamedisabled = TRUE;
|
||||||
|
@ -694,7 +694,7 @@ void ami_gui_opts_open(void)
|
||||||
GA_ID, GID_OPTS_SCREENNAME,
|
GA_ID, GID_OPTS_SCREENNAME,
|
||||||
GA_RelVerify, TRUE,
|
GA_RelVerify, TRUE,
|
||||||
GA_Disabled,screennamedisabled,
|
GA_Disabled,screennamedisabled,
|
||||||
STRINGA_TextVal, nsoption_bool(use_pubscreen),
|
STRINGA_TextVal, nsoption_charp(pubscreen_name),
|
||||||
STRINGA_BufferPos,0,
|
STRINGA_BufferPos,0,
|
||||||
StringEnd,
|
StringEnd,
|
||||||
LayoutEnd,
|
LayoutEnd,
|
||||||
|
@ -1573,16 +1573,16 @@ void ami_gui_opts_use(bool save)
|
||||||
switch(data)
|
switch(data)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
nsoption_set_charp(use_pubscreen, strdup("\0"));
|
nsoption_set_charp(pubscreen_name, strdup("\0"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
nsoption_set_charp(use_pubscreen, (char *)strdup("Workbench"));
|
nsoption_set_charp(pubscreen_name, (char *)strdup("Workbench"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_SCREENNAME],(ULONG *)&data);
|
GetAttr(STRINGA_TextVal,gow->objects[GID_OPTS_SCREENNAME],(ULONG *)&data);
|
||||||
nsoption_set_charp(use_pubscreen, (char *)strdup((char *)data));
|
nsoption_set_charp(pubscreen_name, (char *)strdup((char *)data));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
NSOPTION_STRING(url_file, NULL)
|
NSOPTION_STRING(url_file, NULL)
|
||||||
NSOPTION_STRING(hotlist_file, NULL)
|
NSOPTION_STRING(hotlist_file, NULL)
|
||||||
NSOPTION_STRING(use_pubscreen, NULL)
|
NSOPTION_STRING(pubscreen_name, NULL)
|
||||||
NSOPTION_STRING(screen_modeid, NULL)
|
NSOPTION_STRING(screen_modeid, NULL)
|
||||||
NSOPTION_INTEGER(screen_compositing, -1)
|
NSOPTION_INTEGER(screen_compositing, -1)
|
||||||
NSOPTION_INTEGER(screen_ydpi, 85)
|
NSOPTION_INTEGER(screen_ydpi, 85)
|
||||||
|
|
Loading…
Reference in New Issue