From d8cc59e18d6bf90c91e5d9cf1f9c36587f4ab26c Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Sun, 9 Jun 2024 00:41:02 +0200 Subject: 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 Fixes: https://github.com/dillo-browser/dillo/issues/124 --- src/prefs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/prefs.c') 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); } -- cgit v1.2.3