From 856fde9a4e5a2c6514c7abaef1cdefc9315eb045 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 20 Jun 2009 13:29:30 +0000 Subject: 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 --- amiga/dist/Install | 15 +++++++++++++++ amiga/gui.c | 39 ++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 19 deletions(-) (limited to 'amiga') diff --git a/amiga/dist/Install b/amiga/dist/Install index 8b3b53430..db9f18c90 100755 --- a/amiga/dist/Install +++ b/amiga/dist/Install @@ -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") ) ) ) diff --git a/amiga/gui.c b/amiga/gui.c index 53ca914d7..23b5d0311 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -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 + if(!option_use_pubscreen || option_use_pubscreen[0] == '\0') { - struct ScreenModeRequester *screenmodereq = NULL; - - if(screenmodereq = AllocAslRequest(ASL_ScreenModeRequest,NULL)) + if((option_modeid) && (strncmp(option_modeid,"0x",2) == 0)) { - AslRequestTags(screenmodereq, - ASLSM_MinDepth,24, - ASLSM_MaxDepth,32, - TAG_DONE); + 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); + id = screenmodereq->sm_DisplayID; + option_modeid = malloc(20); + sprintf(option_modeid,"0x%lx",id); - FreeAslRequest(screenmodereq); + FreeAslRequest(screenmodereq); + options_write("PROGDIR:Resources/Options"); + } } - } - if(!option_use_pubscreen || option_use_pubscreen[0] == '\0') - { scrn = OpenScreenTags(NULL, // SA_Width,option_window_screen_width, // SA_Height,option_window_screen_height, -- cgit v1.2.3