From a2033cc5d053e7a56b3f8d89b003636021cde482 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 1 Dec 2009 16:54:24 +0000 Subject: [PATCH] Monotone-Parent: b0d54fb9b69827b08042c1be219b87648b1a9df2 Monotone-Revision: 4a94a09737a35d0774170a9dea9d614507de203a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-12-01T16:54:24 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/Scheduler/UIxComponentEditor.m | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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; }