diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-06-09 00:41:02 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-06-09 12:06:19 +0200 |
commit | d8cc59e18d6bf90c91e5d9cf1f9c36587f4ab26c (patch) | |
tree | f004320e757660cbefb02559ea7a902575c84e1c /src/uicmd.cc | |
parent | e89a2293ebb3331dca46f5edf0108231b1007402 (diff) |
Add new_tab_page option
Adds support to load a custom page when a new tab is opened. The current
behavior is set as the default, load a blank page. The location bar is
only selected when the new tab page is the blank page, otherwise the
page loaded gets the focus.
Co-authored-by: Alex <a1ex@dismail.de>
Fixes: https://github.com/dillo-browser/dillo/issues/124
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r-- | src/uicmd.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index 88bc9b7d..d7822e47 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -770,6 +770,11 @@ void a_UIcmd_open_url(BrowserWindow *bw, const DilloUrl *url) static void UIcmd_open_url_nbw(BrowserWindow *new_bw, const DilloUrl *url) { + if (!url && prefs.new_tab_page) { + if (strcmp(URL_STR(prefs.new_tab_page), "about:blank") != 0) + url = prefs.new_tab_page; + } + /* When opening a new BrowserWindow (tab or real window) we focus * Location if we don't yet have an URL, main otherwise. */ |