[epiphany/overview] ephy-frecent-store: add a method to mark a row as hidden
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/overview] ephy-frecent-store: add a method to mark a row as hidden
- Date: Sun, 12 Aug 2012 16:48:12 +0000 (UTC)
commit 5dc2c50b265d5618e11f1c9011773eea6abaaa22
Author: Claudio Saavedra <csaavedra igalia com>
Date: Sun Aug 12 19:44:48 2012 +0300
ephy-frecent-store: add a method to mark a row as hidden
src/ephy-frecent-store.c | 34 ++++++++++++++++++++++++++++++++++
src/ephy-frecent-store.h | 5 ++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-frecent-store.c b/src/ephy-frecent-store.c
index 4ef4993..80ffe62 100644
--- a/src/ephy-frecent-store.c
+++ b/src/ephy-frecent-store.c
@@ -270,3 +270,37 @@ ephy_frecent_store_new (void)
return g_object_new (EPHY_TYPE_FRECENT_STORE,
NULL);
}
+
+static void
+set_url_hidden_cb (EphyHistoryService *service,
+ gboolean success,
+ gpointer result_data,
+ EphyFrecentStore *store)
+{
+ if (!success)
+ return;
+
+ ephy_frecent_store_fetch_urls (store, service);
+}
+
+void
+ephy_frecent_store_set_hidden (EphyFrecentStore *store,
+ GtkTreeIter *iter)
+{
+ EphyHistoryService *service;
+ char *uri;
+
+ g_return_if_fail (EPHY_IS_FRECENT_STORE (store));
+ g_return_if_fail (iter != NULL);
+
+ gtk_tree_model_get (GTK_TREE_MODEL (store), iter,
+ EPHY_OVERVIEW_STORE_URI, &uri,
+ -1);
+ g_object_get (store, "history-service", &service, NULL);
+
+ ephy_history_service_set_url_hidden (service,
+ uri, TRUE, NULL,
+ (EphyHistoryJobCallback) set_url_hidden_cb,
+ store);
+ g_free (uri);
+}
diff --git a/src/ephy-frecent-store.h b/src/ephy-frecent-store.h
index cbdb08c..16e4ef6 100644
--- a/src/ephy-frecent-store.h
+++ b/src/ephy-frecent-store.h
@@ -51,7 +51,10 @@ struct _EphyFrecentStoreClass
GType ephy_frecent_store_get_type (void) G_GNUC_CONST;
-EphyFrecentStore* ephy_frecent_store_new (void);
+EphyFrecentStore* ephy_frecent_store_new (void);
+
+void ephy_frecent_store_set_hidden (EphyFrecentStore *store,
+ GtkTreeIter *iter);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]