[epiphany] overview: Do not show local files on the overview
- From: Lorenzo Tilve <ltilve src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] overview: Do not show local files on the overview
- Date: Sun, 7 Feb 2016 22:29:59 +0000 (UTC)
commit 9d20f64253526d0f5b5464d66095a66db66c73ed
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 7773210..ff2fa46 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -550,6 +550,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 090645b..6a3abcf 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -202,6 +202,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 (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 ad39bff..529d320 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -266,6 +266,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 9dccfa7..af7821c 100644
--- a/lib/history/ephy-history-types.c
+++ b/lib/history/ephy-history-types.c
@@ -213,6 +213,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 61fdf96..18ee968 100644
--- a/lib/history/ephy-history-types.h
+++ b/lib/history/ephy-history-types.h
@@ -94,6 +94,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]