From b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Tue, 6 Mar 2012 13:17:27 +0100 Subject: 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. --- lib/ephy-profile-migrator.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') 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); -- cgit v1.2.3