summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-08-15 17:51:01 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-08-15 17:51:01 +0100
commit923cc06f98d32946d384016f385fad47525a269f (patch)
treeacf8b83e7d3e63ccae8b68f927203906ffa52f1b
parent02360ec7be6b061513f07638d015da066afef7dc (diff)
downloadnetsurf-923cc06f98d32946d384016f385fad47525a269f.tar.gz
netsurf-923cc06f98d32946d384016f385fad47525a269f.tar.bz2
Allow a second-run NetSurf to open passed URL in a new tab rather than a new window.
-rwxr-xr-xfrontends/amiga/dist/NetSurf.guide8
-rw-r--r--frontends/amiga/gui.c9
-rw-r--r--frontends/amiga/options.h1
3 files changed, 12 insertions, 6 deletions
diff --git a/frontends/amiga/dist/NetSurf.guide b/frontends/amiga/dist/NetSurf.guide
index a1c3941df..ec1df8d72 100755
--- a/frontends/amiga/dist/NetSurf.guide
+++ b/frontends/amiga/dist/NetSurf.guide
@@ -129,8 +129,8 @@ The user directories contain user-specific preferences and cache data. Always l
Current user. Defaults to the value of the USER env-var, or Default.
@endnode
-@node options "Options file"
-The options file is stored in @{"Users/Default/Choices" link Users/Default/Choices/Main} by default. Most of the settings can be changed from within NetSurf by selecting Edit preferences from the Settings menu.
+@node options "Choices file"
+The Choices file is stored in @{"Users/Default/Choices" link Users/Default/Choices/Main} by default. Most of the settings can be changed from within NetSurf by selecting Edit preferences from the Settings menu.
There are a couple of Amiga-specific options which can only be changed directly in the file. These are:
@@ -143,8 +143,8 @@ There are a couple of Amiga-specific options which can only be changed directly
@{b}reformat_delay@{ub} Sets a delay on performing content reformats (eg. if the window has been resized). Set to a higher value to make "resize with contents" more responsive. Defaults to 0 (immediate).
@{b}redraw_tile_size_x@{ub}/@{b}redraw_tile_size_y@{ub} Specify the size of the off-screen bitmap. Higher will speed up redraws at the expense of memory. 0 disables tiling (will use a bitmap at least the size of the screen NetSurf is running on)
@{b}web_search_width@{ub} Defaults to 0. Larger values will increase the size of the web search gadget next to the URL bar.
-
-@{b}mask_alpha@{ub} Threshold to use when determining which alpha values to convert to full transparency (0 - 255, where 255 will convert even opaque pixels to transparent). Defaults to 50 (0x32). This is only used in palette-mapped modes where alpha blending is not currently supported.
+@{b}mask_alpha@{ub} Threshold to use when determining which alpha values to convert to full transparency (0 - 255, where 255 will convert even opaque pixels to transparent). Defaults to 0. This is only used in palette-mapped modes where alpha blending is not currently supported.
+@{b}tab_new_session{ub} If NetSurf is already running, this will cause any passed URLs to open in a new tab rather than a new window.
@{b}url_file@{ub} Path to URL database file
@{b}hotlist_file@{ub} Path to Hotlist file
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 0f2f33c70..b0aeb20db 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -1079,12 +1079,17 @@ static void gui_init2(int argc, char** argv)
if(!notalreadyrunning)
{
STRPTR sendcmd = NULL;
+ char newtab[4] = "\0";
+
+ if(nsoption_bool(tab_new_session) == true) {
+ strcpy(newtab, "TAB");
+ }
if(temp_homepage_url) {
- sendcmd = ASPrintf("OPEN \"%s\" NEW",temp_homepage_url);
+ sendcmd = ASPrintf("OPEN \"%s\" NEW%s", temp_homepage_url, newtab);
free(temp_homepage_url);
} else {
- sendcmd = ASPrintf("OPEN \"%s\" NEW",nsoption_charp(homepage_url));
+ sendcmd = ASPrintf("OPEN \"%s\" NEW%s", nsoption_charp(homepage_url), newtab);
}
ami_arexx_self(sendcmd);
diff --git a/frontends/amiga/options.h b/frontends/amiga/options.h
index 6f5c91906..3aa845140 100644
--- a/frontends/amiga/options.h
+++ b/frontends/amiga/options.h
@@ -41,6 +41,7 @@ NSOPTION_BOOL(new_tab_is_active, false)
NSOPTION_BOOL(new_tab_last, false)
NSOPTION_BOOL(tab_close_warn, true)
NSOPTION_BOOL(tab_always_show, false)
+NSOPTION_BOOL(tab_new_session, false) /* When NetSurf is already running, open new tab */
NSOPTION_BOOL(kiosk_mode, false)
NSOPTION_STRING(search_engines_file, "PROGDIR:Resources/SearchEngines")
NSOPTION_STRING(arexx_dir, "PROGDIR:Rexx")