aboutsummaryrefslogtreecommitdiff
path: root/src/prefs.c
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-06-09 00:41:02 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-06-09 12:06:19 +0200
commitd8cc59e18d6bf90c91e5d9cf1f9c36587f4ab26c (patch)
treef004320e757660cbefb02559ea7a902575c84e1c /src/prefs.c
parente89a2293ebb3331dca46f5edf0108231b1007402 (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/prefs.c')
-rw-r--r--src/prefs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/prefs.c b/src/prefs.c
index 8d25ef18..e7f735ed 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -14,6 +14,7 @@
#define PREFS_START_PAGE "about:splash"
#define PREFS_HOME "https://dillo-browser.github.io/"
+#define PREFS_NEW_TAB_PAGE "about:blank"
#define PREFS_FONT_SERIF "DejaVu Serif"
#define PREFS_FONT_SANS_SERIF "DejaVu Sans"
#define PREFS_FONT_CURSIVE "DejaVu Sans"
@@ -110,6 +111,7 @@ void a_Prefs_init(void)
prefs.show_ui_tooltip = TRUE;
prefs.small_icons = FALSE;
prefs.start_page = a_Url_new(PREFS_START_PAGE, NULL);
+ prefs.new_tab_page = a_Url_new(PREFS_NEW_TAB_PAGE, NULL);
prefs.theme = dStrdup(PREFS_THEME);
prefs.ui_button_highlight_color = -1;
prefs.ui_fg_color = -1;
@@ -155,5 +157,6 @@ void a_Prefs_freeall(void)
dFree(dList_nth_data(prefs.search_urls, i));
dList_free(prefs.search_urls);
a_Url_free(prefs.start_page);
+ a_Url_free(prefs.new_tab_page);
dFree(prefs.theme);
}