From 407045be4927e6e22c2f204f4a242ae1260e42ba Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 24 Feb 2004 23:34:21 +0000 Subject: fix float type pane position keys (we migrated these improperly in the 2004-02-24 JP Rosevear * gui/migration.c (migrate_calendars): fix float type pane position keys (we migrated these improperly in the past), just use the default value Fixes #53087 svn path=/trunk/; revision=24860 --- calendar/gui/migration.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'calendar/gui') diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index b735460d2e..a960e10e0a 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -33,6 +33,7 @@ #include #include #include +#include "calendar-config-keys.h" #include "migration.h" static e_gconf_map_t calendar_display_map[] = { @@ -602,6 +603,30 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis e_source_list_sync (calendar_component_peek_source_list (component), NULL); } + if (minor == 5 && revision < 5) { + GConfClient *gconf; + GConfValue *gconf_val; + int i; + const char *keys[] = { + CALENDAR_CONFIG_HPANE_POS, + CALENDAR_CONFIG_VPANE_POS, + CALENDAR_CONFIG_MONTH_HPANE_POS, + CALENDAR_CONFIG_MONTH_VPANE_POS, + NULL + }; + + gconf = gconf_client_get_default (); + + for (i = 0; keys[i]; i++) { + gconf_val = gconf_client_get (gconf, keys[i], NULL); + if (gconf_val->type != GCONF_VALUE_INT) + gconf_client_unset (gconf, keys[i], NULL); + gconf_value_free (gconf_val); + } + + g_object_unref (gconf); + } + } return retval; -- cgit