mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 06:33:18 +00:00
New button to reset Calendar categories
Also added default colors to categories.
This commit is contained in:
@@ -1212,6 +1212,27 @@ static NSArray *reminderValues = nil;
|
||||
return [uniqueAddressesList componentsJoinedByString: @", "];
|
||||
}
|
||||
|
||||
//
|
||||
// Used by templates
|
||||
//
|
||||
- (NSString *) defaultCalendarCategoriesColors
|
||||
{
|
||||
NSArray *labels, *colors;
|
||||
NSMutableDictionary *defaultCategoriesColors;
|
||||
unsigned int i;
|
||||
|
||||
labels = [[self labelForKey: @"calendar_category_labels"] componentsSeparatedByString: @","];
|
||||
colors = [[[SOGoSystemDefaults sharedSystemDefaults] calendarCategoriesColors] allValues];
|
||||
defaultCategoriesColors = [NSMutableDictionary dictionary];
|
||||
for (i = 0; i < [colors count]; i++)
|
||||
{
|
||||
[defaultCategoriesColors setObject: [colors objectAtIndex: i]
|
||||
forKey: [labels objectAtIndex: i]];
|
||||
}
|
||||
|
||||
return [defaultCategoriesColors jsonRepresentation];
|
||||
}
|
||||
|
||||
//
|
||||
// Used by templates
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user