[epiphany] ephy-history-service: Let ephy_history_service_find_urls() take a sorting type



commit b4045491948c376058b203add358a328b7ab90b6
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Tue Feb 4 21:50:28 2014 +0200

    ephy-history-service: Let ephy_history_service_find_urls() take a sorting type

 lib/history/ephy-history-service.c |    3 ++-
 lib/history/ephy-history-service.h |    2 +-
 src/ephy-completion-model.c        |    4 +++-
 src/ephy-history-window.c          |    3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 1dba634..675b2ac 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -1294,6 +1294,7 @@ ephy_history_service_find_urls (EphyHistoryService *self,
                                 gint64 from, gint64 to,
                                 guint limit, gint host,
                                 GList *substring_list,
+                                EphyHistorySortType sort_type,
                                 GCancellable *cancellable,
                                 EphyHistoryJobCallback callback,
                                 gpointer user_data)
@@ -1306,7 +1307,7 @@ ephy_history_service_find_urls (EphyHistoryService *self,
   query->from = from;
   query->to = to;
   query->substring_list = substring_list;
-  query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
+  query->sort_type = sort_type;
   query->host = host;
 
   if (limit != 0)
diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
index 07cc348..c20f2c4 100644
--- a/lib/history/ephy-history-service.h
+++ b/lib/history/ephy-history-service.h
@@ -75,7 +75,7 @@ void                     ephy_history_service_query_hosts             (EphyHisto
 void                     ephy_history_service_delete_host             (EphyHistoryService *self, 
EphyHistoryHost *host, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_get_url                 (EphyHistoryService *self, const char 
*url, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_delete_urls             (EphyHistoryService *self, GList 
*urls, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
-void                     ephy_history_service_find_urls               (EphyHistoryService *self, gint64 
from, gint64 to, guint limit, gint host, GList *substring_list, GCancellable *cancellable, 
EphyHistoryJobCallback callback, gpointer user_data);
+void                     ephy_history_service_find_urls               (EphyHistoryService *self, gint64 
from, gint64 to, guint limit, gint host, GList *substring_list, EphyHistorySortType sort_type, GCancellable 
*cancellable, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_visit_url               (EphyHistoryService *self, const char 
*orig_url, EphyHistoryPageVisitType visit_type);
 void                     ephy_history_service_clear                   (EphyHistoryService *self, 
GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_find_hosts              (EphyHistoryService *self, gint64 
from, gint64 to, GCancellable *cancellable, EphyHistoryJobCallback callback, gpointer user_data);
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 5bf408b..46f20dc 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -577,7 +577,9 @@ ephy_completion_model_update_for_string (EphyCompletionModel *model,
   ephy_history_service_find_urls (priv->history_service,
                                   0, 0,
                                   MAX_COMPLETION_HISTORY_URLS, 0,
-                                  query, priv->cancellable,
+                                  query,
+                                  EPHY_HISTORY_SORT_MOST_VISITED,
+                                  priv->cancellable,
                                   (EphyHistoryJobCallback)query_completed_cb,
                                   user_data);
 }
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 34fe4ea..9dc3abc 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -1072,7 +1072,8 @@ filter_now (EphyHistoryWindow *editor,
                ephy_history_service_find_urls (editor->priv->history_service,
                                                from, to,
                                                0, host ? host->id : 0,
-                                               substrings, editor->priv->cancellable,
+                                               substrings, EPHY_HISTORY_SORT_MOST_VISITED,
+                                               editor->priv->cancellable,
                                                (EphyHistoryJobCallback)on_find_urls_cb, editor);
                ephy_history_host_free (host);
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]