aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-07 05:25:05 +0800
committerXan Lopez <xan@igalia.com>2012-03-07 05:25:05 +0800
commit7d56d43b180e1c24a5114b778e6898e126118f07 (patch)
tree4edc5719d289322f0912410b2b72d0195ad1e88c
parentb19b4ce1eca123804d8d87bd12e1ba98a5f09683 (diff)
downloadgsoc2013-epiphany-7d56d43b180e1c24a5114b778e6898e126118f07.tar.gz
gsoc2013-epiphany-7d56d43b180e1c24a5114b778e6898e126118f07.tar.zst
gsoc2013-epiphany-7d56d43b180e1c24a5114b778e6898e126118f07.zip
ephy-bookmarks: use the new history service when possible
The 'cleared' stuff is easy to port. The rest, not so much, because the API to get the visit count is async.
-rw-r--r--src/bookmarks/Makefile.am1
-rw-r--r--src/bookmarks/ephy-bookmarks.c12
2 files changed, 10 insertions, 3 deletions
diff --git a/src/bookmarks/Makefile.am b/src/bookmarks/Makefile.am
index 7231932a0..5843ec918 100644
--- a/src/bookmarks/Makefile.am
+++ b/src/bookmarks/Makefile.am
@@ -104,6 +104,7 @@ libephybookmarks_la_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/embed \
-I$(top_srcdir)/lib/widgets \
+ -I$(top_srcdir)/lib/history \
-I$(top_srcdir)/lib/egg \
-DDATADIR=\""$(pkgdatadir)"\" \
$(AM_CPPFLAGS)
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 76e717d7f..3b854cb86 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -30,6 +30,7 @@
#include "ephy-embed-shell.h"
#include "ephy-file-helpers.h"
#include "ephy-history.h"
+#include "ephy-history-service.h"
#include "ephy-node-common.h"
#include "ephy-prefs.h"
#include "ephy-settings.h"
@@ -371,7 +372,7 @@ clear_favorites (EphyBookmarks *bookmarks)
}
static void
-history_cleared_cb (EphyHistory *history,
+history_cleared_cb (EphyHistoryService *history,
EphyBookmarks *bookmarks)
{
clear_favorites (bookmarks);
@@ -475,6 +476,7 @@ static void
ephy_setup_history_notifiers (EphyBookmarks *eb)
{
EphyHistory *history;
+ EphyHistoryService *history_service;
history = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
@@ -483,10 +485,14 @@ ephy_setup_history_notifiers (EphyBookmarks *eb)
clear_favorites (eb);
}
- g_signal_connect (history, "visited",
- G_CALLBACK (history_site_visited_cb), eb);
+ history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (embed_shell));
+ /* FIXME: do we want an enable/disable API for the new history? */
+
g_signal_connect (history, "cleared",
G_CALLBACK (history_cleared_cb), eb);
+
+ g_signal_connect (history, "visited",
+ G_CALLBACK (history_site_visited_cb), eb);
g_signal_connect (history, "redirect",
G_CALLBACK (redirect_cb), eb);
g_signal_connect (history, "icon-updated",