[epiphany] ephy-profile-migration: only create ad-hoc hosts for non-default zoom levels.
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-profile-migration: only create ad-hoc hosts for non-default zoom levels.
- Date: Tue, 6 Mar 2012 20:54:33 +0000 (UTC)
commit b280014f2b9d3fa94854dbf9c2d7ad4b155fd5d8
Author: Xan Lopez <xan igalia com>
Date: Tue Mar 6 13:17:27 2012 +0100
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 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index d4d4afb..55fa8a2 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]