diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-06-20 13:29:30 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2009-06-20 13:29:30 +0000 |
commit | 856fde9a4e5a2c6514c7abaef1cdefc9315eb045 (patch) | |
tree | 11ba4933724b70f1df1ee248e4a5ac50d05e0d5b /amiga | |
parent | 98092d7f16a10e5c55659942909bc797c09a2389 (diff) | |
download | netsurf-856fde9a4e5a2c6514c7abaef1cdefc9315eb045.tar.gz netsurf-856fde9a4e5a2c6514c7abaef1cdefc9315eb045.tar.bz2 |
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
Diffstat (limited to 'amiga')
-rwxr-xr-x | amiga/dist/Install | 15 | ||||
-rwxr-xr-x | amiga/gui.c | 39 |
2 files changed, 35 insertions, 19 deletions
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, |