diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-03-28 16:42:33 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-03-28 16:42:33 +0000 |
commit | 74108d1e09f42c61d48219edc578d04c8df9cd13 (patch) | |
tree | 5d885ced5732af2360c559c46e222b18e4cb5b7a /amiga | |
parent | 8effd1cb98bb9291ed732509ec1e81e2a2436360 (diff) | |
download | netsurf-74108d1e09f42c61d48219edc578d04c8df9cd13.tar.gz netsurf-74108d1e09f42c61d48219edc578d04c8df9cd13.tar.bz2 |
Allow NetSurf to be opened from the CLI without a URL specified.
Add new switch FORCE which will force a new instance of NetSurf to open rather than
opening a new window in the already-running application (intended for debugging when
NetSurf has crashed)
svn path=/trunk/netsurf/; revision=10189
Diffstat (limited to 'amiga')
-rwxr-xr-x | amiga/gui.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 8d989c5c8..52484930e 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -549,15 +549,16 @@ void ami_openscreenfirst(void) void gui_init2(int argc, char** argv) { struct browser_window *bw = NULL; - long rarray[] = {0}; + long rarray[] = {0,0}; struct RDArgs *args; - STRPTR template = "URL/A"; + STRPTR template = "URL,FORCE/S"; STRPTR temp_homepage_url = NULL; BOOL notalreadyrunning; enum { - A_URL + A_URL, + A_FORCE }; notalreadyrunning = ami_arexx_init(); @@ -582,6 +583,12 @@ void gui_init2(int argc, char** argv) free(temp_homepage_url); } } + + if(rarray[A_FORCE]) + { + notalreadyrunning = TRUE; + } + FreeArgs(args); } } @@ -679,7 +686,7 @@ void gui_init2(int argc, char** argv) } GetApplicationAttrs(ami_appid, APPATTR_Port, (ULONG)&applibport, TAG_DONE); - applibsig = (1L << applibport->mp_SigBit); + if(applibport) applibsig = (1L << applibport->mp_SigBit); } if(!bw && (option_startup_no_window == false)) @@ -1627,6 +1634,8 @@ void ami_handle_applib(void) struct ApplicationMsg *applibmsg; struct browser_window *bw; + if(!applibport) return; + while((applibmsg=(struct ApplicationMsg *)GetMsg(applibport))) { switch (applibmsg->type) |