aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-08-27 22:25:51 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-01 02:34:01 +0800
commit68c462736befcc1a84929a48b1ccfb09de8655ba (patch)
tree2029fba4bbe283acd79812c1a0881c83f38e2aa3
parentc1fbb17c2337941973386c1c06dc3ab414d73062 (diff)
downloadgsoc2013-epiphany-68c462736befcc1a84929a48b1ccfb09de8655ba.tar
gsoc2013-epiphany-68c462736befcc1a84929a48b1ccfb09de8655ba.tar.gz
gsoc2013-epiphany-68c462736befcc1a84929a48b1ccfb09de8655ba.tar.bz2
gsoc2013-epiphany-68c462736befcc1a84929a48b1ccfb09de8655ba.tar.lz
gsoc2013-epiphany-68c462736befcc1a84929a48b1ccfb09de8655ba.tar.xz
gsoc2013-epiphany-68c462736befcc1a84929a48b1ccfb09de8655ba.tar.zst
gsoc2013-epiphany-68c462736befcc1a84929a48b1ccfb09de8655ba.zip
ephy-web-view: define the special-cased title for the overview
-rw-r--r--embed/ephy-web-view.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 6a307e43c..7805b785c 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1100,6 +1100,9 @@ get_title_from_address (const char *address)
return g_strdup (address + 7);
else if (!strcmp (address, EPHY_ABOUT_SCHEME":plugins"))
return g_strdup (_("Plugins"));
+ else if (!strcmp (address, EPHY_ABOUT_SCHEME":overview") ||
+ !strcmp (address, "about:overview"))
+ return g_strdup (_("Most visited"));
else
return ephy_string_get_host_name (address);
}
@@ -2087,6 +2090,21 @@ ephy_web_view_is_history_frozen (EphyWebView *view)
return view->priv->history_frozen;
}
+static gboolean
+web_view_check_snapshot (WebKitWebView *web_view)
+{
+ EphyOverviewStore *store;
+ GtkTreeIter iter;
+
+ store = EPHY_OVERVIEW_STORE (ephy_embed_shell_get_frecent_store (embed_shell));
+ if (ephy_overview_store_find_url (store, webkit_web_view_get_uri (web_view), &iter) &&
+ ephy_overview_store_needs_snapshot (store, &iter))
+ ephy_overview_store_set_snapshot (store, &iter,
+ webkit_web_view_get_snapshot (web_view));
+
+ return FALSE;
+}
+
#ifdef HAVE_WEBKIT2
static void
load_changed_cb (WebKitWebView *web_view,
@@ -2328,8 +2346,6 @@ load_status_cb (WebKitWebView *web_view,
}
case WEBKIT_LOAD_FINISHED: {
SoupURI *uri;
- EphyOverviewStore *store;
- GtkTreeIter iter;
priv->loading_homepage = FALSE;
@@ -2379,12 +2395,7 @@ load_status_cb (WebKitWebView *web_view,
/* Reset visit type. */
priv->visit_type = EPHY_PAGE_VISIT_NONE;
- store = EPHY_OVERVIEW_STORE (ephy_embed_shell_get_frecent_store (embed_shell));
- if (ephy_overview_store_find_url (store, webkit_web_view_get_uri (web_view), &iter) &&
- ephy_overview_store_needs_snapshot (store, &iter))
- ephy_overview_store_set_snapshot (store, &iter,
- webkit_web_view_get_snapshot (web_view));
-
+ g_idle_add ((GSourceFunc) web_view_check_snapshot, web_view);
break;
}