Don't ask for a screenmode when one is not set unless we actually need it.

Immediately save Options once the user has selected a screenmode.
This now makes it possible to ask whether they want NetSurf to run on the Workbench or
a new NetSurf screen during installation.

svn path=/trunk/netsurf/; revision=7895
This commit is contained in:
Chris Young 2009-06-20 13:29:30 +00:00
parent 98092d7f16
commit 856fde9a4e
2 changed files with 39 additions and 23 deletions

15
amiga/dist/Install vendored
View File

@ -283,6 +283,20 @@
(set #theme "Resources/Themes/Default")
(set #theme "Resources/Themes/AISS")
)
(set #screen
(askchoice
(prompt "Please select whether to start NetSurf on a new screen or on Workbench")
(help @askchoice-help)
(choices "Own screen" "Workbench")
(default 0)
)
)
(select #screen
(set #pubscreen "")
(set #pubscreen "Workbench")
)
)
)
@ -369,6 +383,7 @@
(help @textfile-help)
(dest (tackon @default-dest "Resources/Options"))
(append "theme:" #theme "\n")
(append "use_pubscreen:" #pubscreen "\n")
)
)
)

View File

@ -486,31 +486,32 @@ void gui_init2(int argc, char** argv)
if(notalreadyrunning)
{
if((option_modeid) && (strncmp(option_modeid,"0x",2) == 0))
{
id = strtoul(option_modeid,NULL,0);
}
else
{
struct ScreenModeRequester *screenmodereq = NULL;
if(screenmodereq = AllocAslRequest(ASL_ScreenModeRequest,NULL))
{
AslRequestTags(screenmodereq,
ASLSM_MinDepth,24,
ASLSM_MaxDepth,32,
TAG_DONE);
id = screenmodereq->sm_DisplayID;
option_modeid = malloc(20);
sprintf(option_modeid,"0x%lx",id);
FreeAslRequest(screenmodereq);
}
}
if(!option_use_pubscreen || option_use_pubscreen[0] == '\0')
{
if((option_modeid) && (strncmp(option_modeid,"0x",2) == 0))
{
id = strtoul(option_modeid,NULL,0);
}
else
{
struct ScreenModeRequester *screenmodereq = NULL;
if(screenmodereq = AllocAslRequest(ASL_ScreenModeRequest,NULL))
{
AslRequestTags(screenmodereq,
ASLSM_MinDepth,24,
ASLSM_MaxDepth,32,
TAG_DONE);
id = screenmodereq->sm_DisplayID;
option_modeid = malloc(20);
sprintf(option_modeid,"0x%lx",id);
FreeAslRequest(screenmodereq);
options_write("PROGDIR:Resources/Options");
}
}
scrn = OpenScreenTags(NULL,
// SA_Width,option_window_screen_width,
// SA_Height,option_window_screen_height,