From 67c62fe85caa569a57099f1e0e84891540af2171 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 12 Feb 2015 15:08:59 -0500 Subject: [PATCH] Fix compilation of UIxComponentEditor.m --- UI/Scheduler/UIxComponentEditor.m | 34 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index c7ef07f2e..81fff249b 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -243,26 +243,24 @@ static NSArray *reminderValues = nil; //} // TODO: Expose this method to the JSON API or centralize in UIxPreferences -// - (NSArray *) categoryList -// { -// NSMutableArray *categoryList; -// NSArray *categoryLabels; -// SOGoUserDefaults *defaults; +- (NSArray *) categoryList +{ + NSMutableArray *categoryList; + NSArray *categoryLabels; + SOGoUserDefaults *defaults; -// defaults = [[context activeUser] userDefaults]; -// categoryLabels = [defaults calendarCategories]; -// if (!categoryLabels) -// categoryLabels = [[self labelForKey: @"category_labels"] -// componentsSeparatedByString: @","]; -// categoryList = [NSMutableArray arrayWithCapacity: [categoryLabels count] + 1]; -// if ([category length] && ![categoryLabels containsObject: category]) -// [categoryList addObject: category]; -// [categoryList addObjectsFromArray: -// [categoryLabels sortedArrayUsingSelector: -// @selector (localizedCaseInsensitiveCompare:)]]; + defaults = [[context activeUser] userDefaults]; + categoryLabels = [defaults calendarCategories]; + if (!categoryLabels) + categoryLabels = [[self labelForKey: @"category_labels"] + componentsSeparatedByString: @","]; + categoryList = [NSMutableArray arrayWithCapacity: [categoryLabels count] + 1]; + [categoryList addObjectsFromArray: + [categoryLabels sortedArrayUsingSelector: + @selector (localizedCaseInsensitiveCompare:)]]; -// return categoryList; -// } + return categoryList; +} //- (NSArray *) repeatList //{