diff --git a/ChangeLog b/ChangeLog index 7a10a3f2f..7e6c7297e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ 2009-12-01 Wolfgang Sourdeau + * UI/Scheduler/UIxComponentEditor.m (-categoryList): the returned + list is now sorted, except if the category of the event was not + always present in the list (kept on top). + * UI/PreferencesUI/UIxPreferences.m (-categoryList): simplified method by returning only the array of defined categories from the user defaults or those defined in the Localizable.strings and sort diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 2bfe06b62..13989c335 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -840,7 +840,9 @@ iRANGE(2); = [NSMutableArray arrayWithCapacity: [categoryLabels count] + 1]; if ([category length] && ![categoryLabels containsObject: category]) [categoryList addObject: category]; - [categoryList addObjectsFromArray: categoryLabels]; + [categoryList addObjectsFromArray: + [categoryLabels sortedArrayUsingSelector: + @selector (localizedCaseInsensitiveCompare:)]]; return categoryList; }