[epiphany] ephy-history-types: make the history sort type enum readable



commit 4339644c32e7c600d9c5e22212c04d5c2045e88b
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Tue Feb 4 21:46:55 2014 +0200

    ephy-history-types: make the history sort type enum readable

 lib/history/ephy-history-service-urls-table.c |    4 ++--
 lib/history/ephy-history-service.c            |    2 +-
 lib/history/ephy-history-types.h              |    8 ++++----
 lib/widgets/ephy-frecent-store.c              |    2 +-
 tests/ephy-history-test.c                     |    6 +++---
 5 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c
index b37d58f..752ddfa 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -274,10 +274,10 @@ ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery *
   statement_str = g_string_append (statement_str, "1 ");
 
   switch (query->sort_type) {
-  case EPHY_HISTORY_SORT_MV:
+  case EPHY_HISTORY_SORT_MOST_VISITED:
     statement_str = g_string_append (statement_str, "ORDER BY urls.visit_count DESC ");
     break;
-  case EPHY_HISTORY_SORT_LV:
+  case EPHY_HISTORY_SORT_LEAST_VISITED:
     statement_str = g_string_append (statement_str, "ORDER BY urls.visit_count ");
     break;
   default:
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 7ae37e3..1dba634 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -1306,7 +1306,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_MV;
+  query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
   query->host = host;
 
   if (limit != 0)
diff --git a/lib/history/ephy-history-types.h b/lib/history/ephy-history-types.h
index d8c22ae..ecfd821 100644
--- a/lib/history/ephy-history-types.h
+++ b/lib/history/ephy-history-types.h
@@ -48,10 +48,10 @@ typedef enum {
 
 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. */
+  EPHY_HISTORY_SORT_MOST_RECENTLY_VISITED,
+  EPHY_HISTORY_SORT_LEAST_RECENTLY_VISITED,
+  EPHY_HISTORY_SORT_MOST_VISITED,
+  EPHY_HISTORY_SORT_LEAST_VISITED
 } EphyHistorySortType;
 
 typedef struct
diff --git a/lib/widgets/ephy-frecent-store.c b/lib/widgets/ephy-frecent-store.c
index 8ea1a48..fba926e 100644
--- a/lib/widgets/ephy-frecent-store.c
+++ b/lib/widgets/ephy-frecent-store.c
@@ -118,7 +118,7 @@ ephy_frecent_store_fetch_urls (EphyFrecentStore *store,
   EphyHistoryQuery *query;
 
   query = ephy_history_query_new ();
-  query->sort_type = EPHY_HISTORY_SORT_MV;
+  query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
   query->limit = store->priv->history_length;
   query->ignore_hidden = TRUE;
 
diff --git a/tests/ephy-history-test.c b/tests/ephy-history-test.c
index 57006db..83962ab 100644
--- a/tests/ephy-history-test.c
+++ b/tests/ephy-history-test.c
@@ -373,7 +373,7 @@ perform_complex_url_query (EphyHistoryService *service,
   query = ephy_history_query_new ();
   query->substring_list = g_list_prepend (query->substring_list, "k");
   query->limit = 1;
-  query->sort_type = EPHY_HISTORY_SORT_MV;
+  query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
 
   /* The expected result. */
   url = ephy_history_url_new ("http://www.wikipedia.org";,
@@ -412,7 +412,7 @@ perform_complex_url_query_with_time_range (EphyHistoryService *service,
   query = ephy_history_query_new ();
   query->substring_list = g_list_prepend (query->substring_list, "k");
   query->limit = 1;
-  query->sort_type = EPHY_HISTORY_SORT_MV;
+  query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
   query->from = 500;
 
   /* The expected result. */
@@ -467,7 +467,7 @@ perform_query_after_clear (EphyHistoryService *service,
   query = ephy_history_query_new ();
   query->substring_list = g_list_prepend (query->substring_list, "gnome");
   query->limit = 10;
-  query->sort_type = EPHY_HISTORY_SORT_MV;
+  query->sort_type = EPHY_HISTORY_SORT_MOST_VISITED;
 
   ephy_history_service_query_urls (service, query, NULL, verify_query_after_clear, NULL);
 }


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