[epiphany/history-rewrite: 24/26] EphyHistoryURL: Add a zoom_level field and update accordingly



commit 2a7908f21bc0a25146075f0277ecb7e1cb785c96
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Tue Jul 5 20:15:25 2011 +0300

    EphyHistoryURL: Add a zoom_level field and update accordingly

 lib/history/ephy-history-service-urls-table.c |    2 +-
 lib/history/ephy-history-service.c            |    2 +-
 lib/history/ephy-history-types.c              |    8 +++++---
 lib/history/ephy-history-types.h              |    3 ++-
 4 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c
index c552d43..b48467f 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -100,7 +100,7 @@ ephy_history_service_get_url_row (EphyHistoryService *self, const char *url_stri
   }
 
   if (url == NULL) {
-    url = ephy_history_url_new (NULL, NULL, 0, 0, 0);
+    url = ephy_history_url_new (NULL, NULL, 0, 0, 0, 1.0);
   } else {
     if (url->url)
       g_free (url->url);
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 61e43ea..804aa12 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -537,7 +537,7 @@ ephy_history_service_set_url_title (EphyHistoryService *self,
                                     EphyHistoryJobCallback callback,
                                     gpointer user_data)
 {
-  EphyHistoryURL *url = ephy_history_url_new (orig_url, title, 0, 0, 0);
+  EphyHistoryURL *url = ephy_history_url_new (orig_url, title, 0, 0, 0, 1.0);
 
   EphyHistoryThreadJobDetails *details =
     ephy_history_thread_job_details_new (self,
diff --git a/lib/history/ephy-history-types.c b/lib/history/ephy-history-types.c
index 7f1cff0..b21a83c 100644
--- a/lib/history/ephy-history-types.c
+++ b/lib/history/ephy-history-types.c
@@ -36,7 +36,7 @@ ephy_history_page_visit_new_with_url (EphyHistoryURL *url, gint64 visit_time, Ep
 EphyHistoryPageVisit *
 ephy_history_page_visit_new (const char *url, gint64 visit_time, EphyHistoryPageVisitType visit_type)
 {
-  return ephy_history_page_visit_new_with_url (ephy_history_url_new (url, "", 0, 0, 0),
+  return ephy_history_page_visit_new_with_url (ephy_history_url_new (url, "", 0, 0, 0, 1.0),
                                                visit_time, visit_type);
 }
 
@@ -78,7 +78,7 @@ ephy_history_page_visit_list_free (GList *list)
 }
 
 EphyHistoryURL *
-ephy_history_url_new (const char *url, const char *title, int visit_count, int typed_count, int last_visit_time)
+ephy_history_url_new (const char *url, const char *title, int visit_count, int typed_count, int last_visit_time, double zoom_level)
 {
   EphyHistoryURL *history_url = g_slice_alloc0 (sizeof (EphyHistoryURL));
   history_url->id = -1;
@@ -87,6 +87,7 @@ ephy_history_url_new (const char *url, const char *title, int visit_count, int t
   history_url->visit_count = visit_count;
   history_url->typed_count = typed_count;
   history_url->last_visit_time = last_visit_time;
+  history_url->zoom_level = zoom_level;
   return history_url;
 }
 
@@ -101,7 +102,8 @@ ephy_history_url_copy (EphyHistoryURL *url)
                                url->title,
                                url->visit_count,
                                url->typed_count,
-                               url->last_visit_time);
+                               url->last_visit_time,
+                               url->zoom_level);
   copy->id = url->id;
   return copy;
 }
diff --git a/lib/history/ephy-history-types.h b/lib/history/ephy-history-types.h
index 4b6e966..3696866 100644
--- a/lib/history/ephy-history-types.h
+++ b/lib/history/ephy-history-types.h
@@ -45,6 +45,7 @@ typedef struct _EphyHistoryURL
   int visit_count;
   int typed_count;
   int last_visit_time;
+  double zoom_level;
 } EphyHistoryURL;
 
 typedef struct _EphyHistoryPageVisit
@@ -71,7 +72,7 @@ void                            ephy_history_page_visit_free (EphyHistoryPageVis
 GList *                         ephy_history_page_visit_list_copy (GList* original);
 void                            ephy_history_page_visit_list_free (GList* list);
 
-EphyHistoryURL *                ephy_history_url_new (const char *url, const char* title, int visit_count, int typed_count, int last_visit_time);
+EphyHistoryURL *                ephy_history_url_new (const char *url, const char* title, int visit_count, int typed_count, int last_visit_time, double zoom_level);
 EphyHistoryURL *                ephy_history_url_copy (EphyHistoryURL *url);
 void                            ephy_history_url_free (EphyHistoryURL *url);
 



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