[epiphany] prefs: Remove homepage-loads-in-new-tabs setting
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] prefs: Remove homepage-loads-in-new-tabs setting
- Date: Mon, 5 Dec 2016 14:16:34 +0000 (UTC)
commit 5e462f8de91ab55fdcb4eb520e5207c12e1519e3
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Sat Dec 3 13:20:54 2016 +0100
prefs: Remove homepage-loads-in-new-tabs setting
This is very confusing setting, it's only considered when homepage-url
is set and only applies to new tabs, but not to new windows. It's a lot
simpler to just use homepage-url always for new tabs and windows if
present.
data/org.gnome.epiphany.gschema.xml | 5 -----
embed/ephy-web-view.c | 11 +++++------
lib/ephy-prefs.h | 1 -
src/window-commands.c | 11 ++---------
4 files changed, 7 insertions(+), 21 deletions(-)
---
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index a7b8e43..d694482 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -14,11 +14,6 @@
<summary>Home page</summary>
<description>Address of the user’s home page.</description>
</key>
- <key type="b" name="homepage-loads-in-new-tabs">
- <default>false</default>
- <summary>Whether homepage loads in new tabs</summary>
- <description>This key does nothing unless the homepage-url key is set. If
homepage-url is set, then this key determines whether the homepage should be displayed in newly-created tabs.
If you want to have no new tab page at all, then enable this setting and then set homepage-url to
about:blank.</description>
- </key>
<key type="s" name="keyword-search-url">
<!-- DuckDuckGo is the default search engine. Must exactly match the URL used
in the preferences dialog, except this string is surrounded by single quotes
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 574b105..8fc0884 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -3202,13 +3202,12 @@ ephy_web_view_load_homepage (EphyWebView *view)
ephy_web_view_load_url (view, "about:incognito");
} else {
char *home;
- home = g_settings_get_string (EPHY_SETTINGS_MAIN, EPHY_PREFS_HOMEPAGE_URL);
- if (home == NULL || home[0] == '\0') {
- g_free (home);
- home = g_strdup ("about:overview");
- }
- ephy_web_view_load_url (view, home);
+ home = g_settings_get_string (EPHY_SETTINGS_MAIN, EPHY_PREFS_HOMEPAGE_URL);
+ if (home == NULL || home[0] == '\0')
+ ephy_web_view_load_url (view, "about:overview");
+ else
+ ephy_web_view_load_url (view, home);
g_free (home);
}
}
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index 9aa9bcd..683732b 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -87,7 +87,6 @@ typedef enum
#define EPHY_PREFS_SCHEMA "org.gnome.Epiphany"
#define EPHY_PREFS_HOMEPAGE_URL "homepage-url"
-#define EPHY_PREFS_HOMEPAGE_LOADS_IN_NEW_TABS "homepage-loads-in-new-tabs"
#define EPHY_PREFS_USER_AGENT "user-agent"
#define EPHY_PREFS_NEW_WINDOWS_IN_TABS "new-windows-in-tabs"
#define EPHY_PREFS_AUTO_DOWNLOADS "automatic-downloads"
diff --git a/src/window-commands.c b/src/window-commands.c
index 4def32b..05e5f76 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -865,17 +865,10 @@ window_cmd_new_tab (GSimpleAction *action,
gpointer user_data)
{
EphyWindow *window = user_data;
- EphyLinkFlags flags = EPHY_LINK_NEW_TAB | EPHY_LINK_JUMP_TO;
- gboolean load_homepage;
-
- load_homepage = g_settings_get_boolean (EPHY_SETTINGS_MAIN,
- EPHY_PREFS_HOMEPAGE_LOADS_IN_NEW_TABS);
- if (load_homepage)
- flags |= EPHY_LINK_HOME_PAGE;
ephy_link_open (EPHY_LINK (window),
- "about:overview", /* Ignored when EPHY_LINK_HOME_PAGE is passed */
- NULL, flags);
+ "about:overview",
+ NULL, EPHY_LINK_NEW_TAB | EPHY_LINK_JUMP_TO);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]