aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2011-12-04 00:08:37 +0800
committerXan Lopez <xan@igalia.com>2011-12-04 00:11:34 +0800
commitbea26fc30ac9ff3def2d18d237509a18b3829e27 (patch)
tree5da1657cf6b218587e4df68d7f3acfc1ac95edd8
parent0caf7b0f44349cbfd072cb49dbdc609de317a971 (diff)
downloadgsoc2013-epiphany-bea26fc30ac9ff3def2d18d237509a18b3829e27.tar
gsoc2013-epiphany-bea26fc30ac9ff3def2d18d237509a18b3829e27.tar.gz
gsoc2013-epiphany-bea26fc30ac9ff3def2d18d237509a18b3829e27.tar.bz2
gsoc2013-epiphany-bea26fc30ac9ff3def2d18d237509a18b3829e27.tar.lz
gsoc2013-epiphany-bea26fc30ac9ff3def2d18d237509a18b3829e27.tar.xz
gsoc2013-epiphany-bea26fc30ac9ff3def2d18d237509a18b3829e27.tar.zst
gsoc2013-epiphany-bea26fc30ac9ff3def2d18d237509a18b3829e27.zip
Remove homepage preference from GSettings
Hardcode it to be "about:blank". The final step could be completely remove the rest of the code, but it might be useful for the future Overview page (if we consider it the new "homepage"). https://bugzilla.gnome.org/show_bug.cgi?id=665469
-rw-r--r--data/org.gnome.epiphany.gschema.xml.in5
-rw-r--r--embed/ephy-web-view.c21
-rw-r--r--embed/ephy-web-view.h2
-rw-r--r--lib/ephy-prefs.h1
-rw-r--r--src/ephy-home-action.c7
-rw-r--r--src/ephy-shell.c3
6 files changed, 8 insertions, 31 deletions
diff --git a/data/org.gnome.epiphany.gschema.xml.in b/data/org.gnome.epiphany.gschema.xml.in
index ca04fea95..7a0beb61d 100644
--- a/data/org.gnome.epiphany.gschema.xml.in
+++ b/data/org.gnome.epiphany.gschema.xml.in
@@ -9,11 +9,6 @@
<default>false</default>
<summary>Browse with caret</summary>
</key>
- <key type="s" name="homepage-url">
- <default>'http://www.google.com'</default>
- <summary>Home page</summary>
- <description>Address of the user's home page.</description>
- </key>
<key type="s" name="keyword-search-url">
<default>'http://www.google.com/search?q=%s&amp;ie=UTF-8&amp;oe=UTF-8'</default>
<summary>URL Search</summary>
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 7a9a49b62..f4c5c1953 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -3697,34 +3697,21 @@ ephy_web_view_save (EphyWebView *view, const char *uri)
* ephy_web_view_load_homepage:
* @view: an #EphyWebView
*
- * Loads the homepage set by the user in @view.
+ * Loads the homepage, which is hardcoded to be "about:blank"
*
- * Returns: %TRUE if there was a homepage set to be loaded in the user
- * preferences, %FALSE otherwise
**/
-gboolean
+void
ephy_web_view_load_homepage (EphyWebView *view)
{
char *home;
- gboolean is_empty;
g_signal_emit_by_name (view, "loading-homepage");
- home = g_settings_get_string (EPHY_SETTINGS_MAIN, EPHY_PREFS_HOMEPAGE_URL);
+ home = g_strdup ("about:blank");
- if (home == NULL || home[0] == '\0')
- {
- g_free (home);
-
- home = g_strdup ("about:blank");
- }
-
- is_empty = ephy_embed_utils_url_is_empty (home);
- ephy_web_view_load_url (view, home);
+ ephy_web_view_load_url (view, "about:blank");
g_free (home);
-
- return is_empty;
}
/**
diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h
index de0392187..6b3559dcc 100644
--- a/embed/ephy-web-view.h
+++ b/embed/ephy-web-view.h
@@ -191,7 +191,7 @@ void ephy_web_view_set_loading_title (EphyWebView
void ephy_web_view_popups_manager_reset (EphyWebView *view);
void ephy_web_view_save (EphyWebView *view,
const char *uri);
-gboolean ephy_web_view_load_homepage (EphyWebView *view);
+void ephy_web_view_load_homepage (EphyWebView *view);
char *
ephy_web_view_create_web_application (EphyWebView *view, const char *title, GdkPixbuf *icon);
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index c5a954c45..1f8a347b2 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -91,7 +91,6 @@ typedef enum
#define EPHY_PREFS_WEB_DEFAULT_ENCODING "default-encoding"
#define EPHY_PREFS_SCHEMA "org.gnome.Epiphany"
-#define EPHY_PREFS_HOMEPAGE_URL "homepage-url"
#define EPHY_PREFS_USER_AGENT "user-agent"
#define EPHY_PREFS_CACHE_SIZE "cache-size"
#define EPHY_PREFS_NEW_WINDOWS_IN_TABS "new-windows-in-tabs"
diff --git a/src/ephy-home-action.c b/src/ephy-home-action.c
index 0fb0967aa..483d02c28 100644
--- a/src/ephy-home-action.c
+++ b/src/ephy-home-action.c
@@ -158,16 +158,11 @@ static void
ephy_home_action_activate (GtkAction *action)
{
char *action_name;
- char *address;
g_object_get (G_OBJECT (action), "name", &action_name, NULL);
- address = g_settings_get_string (EPHY_SETTINGS_MAIN,
- EPHY_PREFS_HOMEPAGE_URL);
+ action_name_association (action, action_name, "about:blank", FALSE);
- action_name_association (action, action_name, address, FALSE);
-
- g_free (address);
g_free (action_name);
}
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index fe6b04c23..f454acc84 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -703,7 +703,8 @@ ephy_shell_new_tab_full (EphyShell *shell,
EphyWebView *view = ephy_embed_get_web_view (embed);
ephy_web_view_set_typed_address (view, "");
ephy_toolbar_activate_location (toolbar);
- is_empty = ephy_web_view_load_homepage (view);
+ ephy_web_view_load_homepage (view);
+ is_empty = TRUE;
} else if (flags & EPHY_NEW_TAB_OPEN_PAGE) {
ephy_web_view_load_request (ephy_embed_get_web_view (embed),
request);