From 8074e67b84377ba294ec1781ea628534a78d944b Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 28 Apr 2015 15:15:42 -0400 Subject: [PATCH] (fix) default calendar category colors --- UI/PreferencesUI/UIxJSONPreferences.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/UI/PreferencesUI/UIxJSONPreferences.m b/UI/PreferencesUI/UIxJSONPreferences.m index 55764218b..9ac86347a 100644 --- a/UI/PreferencesUI/UIxJSONPreferences.m +++ b/UI/PreferencesUI/UIxJSONPreferences.m @@ -130,6 +130,19 @@ static SoProduct *preferencesProduct = nil; [defaults setCalendarCategories: categoryLabels]; } + if (![defaults calendarCategoriesColors]) + { + NSMutableDictionary *colors; + int i; + + categoryLabels = [defaults calendarCategories]; + colors = [NSMutableDictionary dictionaryWithCapacity: [categoryLabels count]]; + + for (i = 0; i < [categoryLabels count]; i++) + [colors setObject: @"#aaa" forKey: [categoryLabels objectAtIndex: i]]; + + [defaults setCalendarCategoriesColors: colors]; + } // // Default Contacts preferences