[epiphany/gnome-3-18] overview: Do not show local files on the overview
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-18] overview: Do not show local files on the overview
- Date: Mon, 8 Feb 2016 03:58:46 +0000 (UTC)
commit 1a04403c1387673ed841d7c9933580b2085304cc
Author: Lorenzo Tilve <ltilve igalia com>
Date: Tue Dec 29 13:40:27 2015 +0100
overview: Do not show local files on the overview
embed/ephy-about-handler.c | 1 +
embed/ephy-embed-shell.c | 1 +
lib/history/ephy-history-service-urls-table.c | 3 +++
lib/history/ephy-history-types.c | 1 +
lib/history/ephy-history-types.h | 1 +
5 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index 495d5f3..f9744cb 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -534,6 +534,7 @@ ephy_about_handler_handle_html_overview (EphyAboutHandler *handler,
query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
query->limit = EPHY_ABOUT_OVERVIEW_MAX_ITEMS;
query->ignore_hidden = TRUE;
+ query->ignore_local = TRUE;
ephy_history_service_query_urls (history, query, NULL,
(EphyHistoryJobCallback)history_service_query_urls_cb,
g_object_ref (request));
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 5371744..b8fddf2 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -203,6 +203,7 @@ ephy_embed_shell_update_overview_urls (EphyEmbedShell *shell)
query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
query->limit = EPHY_ABOUT_OVERVIEW_MAX_ITEMS;
query->ignore_hidden = TRUE;
+ query->ignore_local = TRUE;
ephy_history_service_query_urls (shell->priv->global_history_service, query, NULL,
(EphyHistoryJobCallback) history_service_query_urls_cb,
diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c
index fa9142d..7332e6e 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -267,6 +267,9 @@ ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery *
if (query->ignore_hidden)
statement_str = g_string_append (statement_str, "urls.hidden_from_overview = 0 AND ");
+ if (query->ignore_local)
+ statement_str = g_string_append (statement_str, "urls.url LIKE 'http%' AND ");
+
if (query->host > 0)
statement_str = g_string_append (statement_str, "urls.host = ? AND ");
diff --git a/lib/history/ephy-history-types.c b/lib/history/ephy-history-types.c
index fe3b951..2bb78c4 100644
--- a/lib/history/ephy-history-types.c
+++ b/lib/history/ephy-history-types.c
@@ -214,6 +214,7 @@ ephy_history_query_copy (EphyHistoryQuery *query)
copy->limit = query->limit;
copy->sort_type = query->sort_type;
copy->ignore_hidden = query->ignore_hidden;
+ copy->ignore_local = query->ignore_local;
copy->host = query->host;
for (iter = query->substring_list; iter != NULL; iter = iter->next) {
diff --git a/lib/history/ephy-history-types.h b/lib/history/ephy-history-types.h
index 5f5f5fe..61da2d9 100644
--- a/lib/history/ephy-history-types.h
+++ b/lib/history/ephy-history-types.h
@@ -95,6 +95,7 @@ typedef struct _EphyHistoryQuery
guint limit;
GList* substring_list;
gboolean ignore_hidden;
+ gboolean ignore_local;
gint host;
EphyHistorySortType sort_type;
} EphyHistoryQuery;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]