From 52a0d24d40b26f4cae80f09bca19ea40c429cf84 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Tue, 10 Jan 2012 19:17:51 +0200 Subject: EphyHistoryQuery: add a EphyHistorySortType parameter to the query --- lib/history/ephy-history-types.c | 1 + lib/history/ephy-history-types.h | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/history/ephy-history-types.c b/lib/history/ephy-history-types.c index ad91e409b..bb8321653 100644 --- a/lib/history/ephy-history-types.c +++ b/lib/history/ephy-history-types.c @@ -209,6 +209,7 @@ ephy_history_query_copy (EphyHistoryQuery *query) copy->from = query->from; copy->to = query->to; copy->limit = query->limit; + copy->sort_type = query->sort_type; for (iter = query->substring_list; iter != NULL; iter = iter->next) { copy->substring_list = g_list_prepend (copy->substring_list, g_strdup (iter->data)); diff --git a/lib/history/ephy-history-types.h b/lib/history/ephy-history-types.h index 0f50ec1f9..8d32c5e6c 100644 --- a/lib/history/ephy-history-types.h +++ b/lib/history/ephy-history-types.h @@ -42,6 +42,14 @@ typedef enum { EPHY_HISTORY_URL_ZOOM_LEVEL } EphyHistoryURLProperty; +typedef enum { + EPHY_HISTORY_SORT_NONE = 0, + EPHY_HISTORY_SORT_MRV, /* Most recently visited first. */ + EPHY_HISTORY_SORT_LRV, /* Least recently visited first. */ + EPHY_HISTORY_SORT_MV, /* Most visited first. */ + EPHY_HISTORY_SORT_LV /* Least visited first. */ +} EphyHistorySortType; + typedef struct { int id; @@ -76,6 +84,7 @@ typedef struct _EphyHistoryQuery gint64 to; guint limit; GList* substring_list; + EphyHistorySortType sort_type; } EphyHistoryQuery; EphyHistoryPageVisit * ephy_history_page_visit_new (const char *url, gint64 visit_time, EphyHistoryPageVisitType visit_type); -- cgit