diff options
author | Xan Lopez <xan@igalia.com> | 2012-02-29 23:35:32 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-03-07 04:49:44 +0800 |
commit | 92dec4e47d68bfb77be9ff256fcf44d1407d4ef4 (patch) | |
tree | ce2d1e7a37a200d7ca714761c4a44685d11f594f /lib/history/ephy-history-types.c | |
parent | 8ad6302a3f9e1a867f3dd61605196d22e9bd2f86 (diff) | |
download | gsoc2013-epiphany-92dec4e47d68bfb77be9ff256fcf44d1407d4ef4.tar gsoc2013-epiphany-92dec4e47d68bfb77be9ff256fcf44d1407d4ef4.tar.gz gsoc2013-epiphany-92dec4e47d68bfb77be9ff256fcf44d1407d4ef4.tar.bz2 gsoc2013-epiphany-92dec4e47d68bfb77be9ff256fcf44d1407d4ef4.tar.lz gsoc2013-epiphany-92dec4e47d68bfb77be9ff256fcf44d1407d4ef4.tar.xz gsoc2013-epiphany-92dec4e47d68bfb77be9ff256fcf44d1407d4ef4.tar.zst gsoc2013-epiphany-92dec4e47d68bfb77be9ff256fcf44d1407d4ef4.zip |
Store zoom levels per host, not per URL
Zoom levels have always been stored per host in Epiphany, not per URL
(otherwise you'd have to re-apply the zoom level again and again when
visiting, say, every news entry in your favorite newspaper). Change
things to work like that.
Note: this changes the SQL table format for the history, so you'll
need to re-migrate your history.
Diffstat (limited to 'lib/history/ephy-history-types.c')
-rw-r--r-- | lib/history/ephy-history-types.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/history/ephy-history-types.c b/lib/history/ephy-history-types.c index bb8321653..84e83e72e 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, 1.0), + return ephy_history_page_visit_new_with_url (ephy_history_url_new (url, "", 0, 0, 0), visit_time, visit_type); } @@ -78,7 +78,7 @@ ephy_history_page_visit_list_free (GList *list) } EphyHistoryHost * -ephy_history_host_new (const char *url, const char *title, int visit_count) +ephy_history_host_new (const char *url, const char *title, int visit_count, double zoom_level) { EphyHistoryHost *host = g_slice_alloc0 (sizeof (EphyHistoryHost)); @@ -86,6 +86,7 @@ ephy_history_host_new (const char *url, const char *title, int visit_count) host->url = g_strdup (url); host->title = g_strdup (title); host->visit_count = visit_count; + host->zoom_level = zoom_level; return host; } @@ -100,7 +101,8 @@ ephy_history_host_copy (EphyHistoryHost *original) host = ephy_history_host_new (original->url, original->title, - original->visit_count); + original->visit_count, + original->zoom_level); host->id = original->id; return host; @@ -119,7 +121,7 @@ ephy_history_host_free (EphyHistoryHost *host) } EphyHistoryURL * -ephy_history_url_new (const char *url, const char *title, int visit_count, int typed_count, int last_visit_time, double zoom_level) +ephy_history_url_new (const char *url, const char *title, int visit_count, int typed_count, int last_visit_time) { EphyHistoryURL *history_url = g_slice_alloc0 (sizeof (EphyHistoryURL)); history_url->id = -1; @@ -128,7 +130,6 @@ 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; history_url->host = NULL; return history_url; } @@ -144,8 +145,7 @@ ephy_history_url_copy (EphyHistoryURL *url) url->title, url->visit_count, url->typed_count, - url->last_visit_time, - url->zoom_level); + url->last_visit_time); copy->id = url->id; copy->host = ephy_history_host_copy (url->host); return copy; |