[epiphany/history-rewrite-second: 8/26] ephy-profile-migrator: update to migrate also zoom level preferences
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/history-rewrite-second: 8/26] ephy-profile-migrator: update to migrate also zoom level preferences
- Date: Fri, 27 Jan 2012 12:10:34 +0000 (UTC)
commit 523bc2c359b65e25c9fe501388e0ee26d4a22333
Author: Claudio Saavedra <csaavedra igalia com>
Date: Tue Jul 5 20:17:07 2011 +0300
ephy-profile-migrator: update to migrate also zoom level preferences
lib/ephy-profile-migrator.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index aefc0df..f660d93 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -408,6 +408,7 @@ typedef struct {
long long int visit_count;
long long int last_visit;
long long int first_visit;
+ double zoom_level;
GList *visits;
} HistoryParseData;
@@ -432,6 +433,7 @@ history_parse_start_element (GMarkupParseContext *context,
parse_data->visit_count = 0;
parse_data->last_visit = 0;
parse_data->first_visit = 0;
+ parse_data->zoom_level = 1.0;
} else if (g_str_equal (element_name, "property")) {
const char **name, **value;
@@ -477,6 +479,10 @@ history_parse_text (GMarkupParseContext *context,
GString *data = g_string_new_len (text, text_len);
sscanf(data->str, "%lld", &parse_data->first_visit);
g_string_free (data, TRUE);
+ } else if (g_str_equal (parse_data->current, "10")) {
+ GString *data = g_string_new_len (text, text_len);
+ sscanf(data->str, "%lf", &parse_data->zoom_level);
+ g_string_free (data, TRUE);
}
g_free (parse_data->current);
@@ -502,6 +508,7 @@ history_parse_end_element (GMarkupParseContext *context,
EphyHistoryPageVisit *visit = ephy_history_page_visit_new (parse_data->location ? parse_data->location : "", parse_data->last_visit, EPHY_PAGE_VISIT_TYPED);
g_free (visit->url->title);
visit->url->title = g_strdup (parse_data->title);
+ visit->url->zoom_level = 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]