On Sat, Apr 04, 2009 at 05:01:16PM +0200, Simon Paillard wrote: > On Fri, Dec 28, 2007 at 10:12:09AM +0100, Fabian Greffrath wrote: > > found 402177 2.20.2-1 > > thanks > > Actually, the patch 08_load_on_new_tab.patch is disabled (see > debian/patches/series) since 02 Jun 2007, so not applied during the > build.
The patch currently provided doesn't apply correctly. Please find attached the same, modified to apply correctly (though I didn't test the build). -- Simon Paillard
diff -ur epiphany-2.24.3/data/epiphany.schemas.in epiphany-browser-patched/data/epiphany.schemas.in --- epiphany-2.24.3/data/epiphany.schemas.in 2008-03-28 15:59:45.000000000 +0100 +++ epiphany-browser-patched/data/epiphany.schemas.in 2009-04-04 17:04:30.206597649 +0200 @@ -178,6 +178,21 @@ </locale> </schema> <schema> + <key>/schemas/apps/epiphany/general/load_on_new_tab</key> + <applyto>/apps/epiphany/general/load_on_new_tab</applyto> + <owner>epiphany</owner> + <type>int</type> + <default>1</default> + <locale name="C"> + <short>Page to open when opening a new tab</short> + <long>Page to open when opening a new tab. Allowed values are -1 + (browser startup page), 0 (blank page), 1 (homepage), 2 (last visited + page), as defined for mozilla's browser.tab.loadOnNewTab about:config + option. Both -1 and 1 are implemented the same way; 2 is not + implemented.</long> + </locale> + </schema> + <schema> <key>/schemas/apps/epiphany/general/show_bookmarks_bar</key> <applyto>/apps/epiphany/general/show_bookmarks_bar</applyto> <owner>epiphany</owner> Seulement dans epiphany-browser-patched/data: epiphany.schemas.in.orig Seulement dans epiphany-browser-patched/: debian diff -ur epiphany-2.24.3/lib/ephy-prefs.h epiphany-browser-patched/lib/ephy-prefs.h --- epiphany-2.24.3/lib/ephy-prefs.h 2008-03-28 15:59:46.000000000 +0100 +++ epiphany-browser-patched/lib/ephy-prefs.h 2009-04-04 17:15:07.009827954 +0200 @@ -39,6 +39,7 @@ #define CONF_NETWORK_MANAGED "/apps/epiphany/general/managed_network" #define CONF_DOWNLOADS_HIDDEN "/apps/epiphany/dialogs/downloads_hidden" #define CONF_WARN_ON_CLOSE_UNSUBMITTED_DATA "/apps/epiphany/dialogs/warn_on_close_unsubmitted_data" +#define CONF_BROWSER_TABS_LOADONNEWTAB "/apps/epiphany/general/load_on_new_tab" /* i18n pref */ #define CONF_GECKO_ENABLE_PANGO "/apps/epiphany/web/enable_pango" Seulement dans epiphany-browser-patched/lib: ephy-prefs.h.orig Seulement dans epiphany-browser-patched/lib: ephy-prefs.h.rej diff -ur epiphany-2.24.3/src/ephy-shell.c epiphany-browser-patched/src/ephy-shell.c --- epiphany-2.24.3/src/ephy-shell.c 2008-08-03 14:23:09.000000000 +0200 +++ epiphany-browser-patched/src/ephy-shell.c 2009-04-04 17:13:48.204390984 +0200 @@ -509,14 +509,45 @@ gtk_window_fullscreen (GTK_WINDOW (window)); } - if (flags & EPHY_NEW_TAB_HOME_PAGE || - flags & EPHY_NEW_TAB_NEW_PAGE) ++ if (flags & EPHY_NEW_TAB_HOME_PAGE) { ephy_embed_set_typed_address (embed, "", EPHY_EMBED_ADDRESS_EXPIRE_NEXT); ephy_toolbar_activate_location (toolbar); is_empty = load_homepage (embed); } + else if (flags & EPHY_NEW_TAB_NEW_PAGE) + { + /* Simulate mozilla's browser.tabs.loadOnNewTab option through + * a gconf option. + * + * Documentation at: http://kb.mozillazine.org/About:config_entries + * + * To ensure that no blank page is displayed by default, this key + * is set to 1 by default in the schema (see data/epiphany.schema.in) + */ + int load_on_new_tab = eel_gconf_get_integer (CONF_BROWSER_TABS_LOADONNEWTAB); + + switch (load_on_new_tab) + { + case 0: /* Blank page */ + ephy_embed_load_url (embed, "about:blank"); + is_empty = url_is_empty ("about:blank"); + break; + + case 2: /* Last visited */ + /* NOT IMPLEMENTED */ + + case -1: /* Start-up page */ + case 1: /* Homepage */ + default: + /* Same as in the previous 'if' test */ + ephy_tab_set_typed_address (tab, "", + EPHY_TAB_ADDRESS_EXPIRE_NEXT); + ephy_toolbar_activate_location (toolbar); + is_empty = load_homepage (embed); + } + } else if (flags & EPHY_NEW_TAB_OPEN_PAGE) { EphyEmbedLoadFlags load_flags = 0;