aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-06 20:17:27 +0800
committerXan Lopez <xan@igalia.com>2012-03-07 04:49:46 +0800
commitb280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8 (patch)
tree6518ca14ba4fe1654ea91b2c43bd046cbcdc33a0 /lib
parent6642280f75ddc3a60a93f1618ce00abb4d0a74a7 (diff)
downloadgsoc2013-epiphany-b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8.tar
gsoc2013-epiphany-b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8.tar.gz
gsoc2013-epiphany-b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8.tar.bz2
gsoc2013-epiphany-b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8.tar.lz
gsoc2013-epiphany-b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8.tar.xz
gsoc2013-epiphany-b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8.tar.zst
gsoc2013-epiphany-b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8.zip
ephy-profile-migration: only create ad-hoc hosts for non-default zoom levels.
Otherwise the default code path is enough. Also, the host is always going to be NULL for newly created URLs, so double check this is the case and don't try to handle anything else.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-profile-migrator.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index d4d4afbfd..55fa8a2f8 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -511,14 +511,12 @@ history_parse_end_element (GMarkupParseContext *context,
g_free (visit->url->title);
visit->url->title = g_strdup (parse_data->title);
- if (parse_data->zoom_level) {
+ if (parse_data->zoom_level != 1.0) {
/* Zoom levels are only stored per host in the old history, so
* creating a new host here is OK. */
- if (!visit->url->host)
- visit->url->host = ephy_history_host_new (parse_data->location, parse_data->title,
- parse_data->visit_count, parse_data->zoom_level);
- else
- visit->url->host->zoom_level = parse_data->zoom_level;
+ g_assert (!visit->url->host);
+ visit->url->host = ephy_history_host_new (parse_data->location, parse_data->title,
+ parse_data->visit_count, parse_data->zoom_level);
}
parse_data->visits = g_list_append (parse_data->visits, visit);