From ce6c8b3627d1d420f4188fced8708963064a8b78 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 5 Aug 2008 00:32:26 +0000 Subject: [PATCH] Monotone-Parent: fad4af384953bf77b8c1da664d7deab40e8cfdc5 Monotone-Revision: 42bfc0613859467f595a2bdb349908a8f8d602f2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-05T00:32:26 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ Main/SOGo.m | 10 +++++++--- SoObjects/SOGo/SOGoUser.m | 12 +++++++++++- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e6dfd8a9..6da979ca6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-04 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoUser.m ([SOGoUser +initialize]): same as + below. + + * Main/SOGo.m ([SOGo -run]): rename AgenorProfileURL to + SOGoProfileURL automagically. + 2008-07-29 Wolfgang Sourdeau * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions diff --git a/Main/SOGo.m b/Main/SOGo.m index 69fdd5641..841fdb516 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -242,9 +242,13 @@ static BOOL debugObjectAllocation = NO; { value = [ud stringForKey: @"AgenorProfileURL"]; if (value) - [self warnWithFormat: @"the user defaults key 'AgenorProfileURL'" - @" was renamed to 'SOGoProfileURL', please update your" - @" configuration accordingly"]; + { + [ud setObject: value forKey: *urlString]; + [ud removeObjectForKey: @"AgenorProfileURL"]; + [ud synchronize]; + [self warnWithFormat: @"the user defaults key 'AgenorProfileURL'" + @" was renamed to 'SOGoProfileURL'"]; + } } if (value) diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index d321d08a5..a38f76187 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -127,7 +127,17 @@ _timeValue (NSString *key) { profileURL = [ud stringForKey: @"SOGoProfileURL"]; if (!profileURL) - profileURL = [ud stringForKey: @"AgenorProfileURL"]; + { + profileURL = [ud stringForKey: @"AgenorProfileURL"]; + if (profileURL) + { + [ud setObject: profileURL forKey: @"SOGoProfileURL"]; + [ud removeObjectForKey: @"AgenorProfileURL"]; + [ud synchronize]; + [self warnWithFormat: @"the user defaults key 'AgenorProfileURL'" + @" was renamed to 'SOGoProfileURL'"]; + } + } SOGoProfileURL = [[NSURL alloc] initWithString: profileURL]; } if (!fallbackIMAP4Server)