From 7aec71e853423ad9e201b61636bb3ef6a6408d38 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 17 Sep 2009 14:28:50 +0000 Subject: [PATCH] Monotone-Parent: dfc37996359ac82f92b30c492175c516f038aa35 Monotone-Revision: 9dddcc8446007077ebc41dfa9cec3972bcc03cc5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-17T14:28:50 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ UI/PreferencesUI/UIxPreferences.m | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 44c33e957..32769c50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-09-17 Wolfgang Sourdeau + + * UI/PreferencesUI/UIxPreferences.m (-userComposeMessagesType): + return a default value of @"text" if the default compose type has + never been changed by the user. Otherwise, saving the preferences + will never enable the window to be closed since the new value will + always be different from nil. + 2009-09-17 Cyril Robert * UI/Contacts/UIxListEditor.m: Renamed "name" to "listName" diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 12c62520c..2d0703adb 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -627,7 +627,14 @@ static BOOL defaultShowSubscribedFoldersOnly = NO; - (NSString *) userComposeMessagesType { - return [userDefaults stringForKey: @"ComposeMessagesType"]; + NSString *userComposeMessagesType; + + userComposeMessagesType + = [userDefaults stringForKey: @"ComposeMessagesType"]; + if (!userComposeMessagesType) + userComposeMessagesType = @"text"; + + return userComposeMessagesType; } - (void) setUserComposeMessagesType: (NSString *) newType