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