(fix) improved the handling of default calendar categories/colors (#3200)

pull/89/head
Ludovic Marcotte 2015-06-09 20:30:22 -04:00
parent 76360958a2
commit a56dbeb6a9
8 changed files with 16 additions and 25 deletions

View File

@ -1920,10 +1920,11 @@ events. This parameter is an array of arbitrary strings.
Defaults to a list that depends on the language.
|U |SOGoCalendarDefaultCategoryColor
|Parameter used to define the default colour of categories.
|U |SOGoCalendarCategoriesColors
|Parameter used to define the colour of categories. This parameter
is a dictionary of category name/color.
Defaults to `#F0F0F0` when unset.
Defaults to `#F0F0F0` for all categories when unset.
|U |SOGoCalendarEventsDefaultClassification
|Parameter used to defined the default classification for new events.
@ -2712,6 +2713,11 @@ current version of SOGo from the previous release.
[cols="100a"]
|=======================================================================
h|2.3.1
|The SOGoCalendarDefaultCategoryColor default has been removed. If you
want to customize the color of calendar categories, use the
SOGoCalendarCategories and SOGoCalendarCategoriesColors defaults.
h|2.3.0
|Run the shell script `sql-update-2.2.17_to_2.3.0.sh` or
`sql-update-2.2.17_to_2.3.0-mysql.sh` (if you use MySQL).

1
NEWS
View File

@ -4,6 +4,7 @@
Enhancements
- improved EAS speed, especially when fetching big attachments
- now always enforce the organizer's default identity in appointments
- improved the handling of default calendar categories/colors (#3200)
Bug fixes
- EAS's GetItemEstimate/ItemOperations now support fetching mails and empty folders

View File

@ -70,7 +70,6 @@
SOGoMailAutoSave = "5";
SOGoCalendarDefaultCategoryColor = "#aaa";
SOGoCalendarShouldDisplayWeekend = YES;
SOGoCalendarEventsDefaultClassification = "PUBLIC";
SOGoCalendarTasksDefaultClassification = "PUBLIC";
@ -87,6 +86,10 @@
$label4 = ("To Do", "#3333FF");
$label5 = ("Later", "#993399");
};
SOGoCalendarCategories = ("Customer", "Calls", "Favorites", "Meeting", "Ideas", "Miscellaneous", "Birthday", "Anniversary", "Vacation", "Travel", "Projects", "Suppliers", "Gifts", "Clients", "Issues", "Business", "Holidays", "Personal", "Status", "Competition", "Follow up", "Public Holiday");
SOGoCalendarCategoriesColors = { "Customer" = "#F0F0F0"; "Calls" = "#F0F0F0"; "Favorites" = "#F0F0F0"; "Meeting" = "#F0F0F0"; "Ideas" = "#F0F0F0"; "Miscellaneous" = "#F0F0F0"; "Birthday" = "#F0F0F0"; "Anniversary" = "#F0F0F0"; "Vacation" = "#F0F0F0"; "Travel" = "#F0F0F0"; "Projects" = "#F0F0F0"; "Suppliers" = "#F0F0F0"; "Gifts" = "#F0F0F0"; "Clients" = "#F0F0F0"; "Issues" = "#F0F0F0"; "Business" = "#F0F0F0"; "Holidays" = "#F0F0F0"; "Personal" = "#F0F0F0"; "Status" = "#F0F0F0"; "Competition" = "#F0F0F0"; "Follow up" = "#F0F0F0"; "Public Holiday" = "#F0F0F0"; };
SOGoSubscriptionFolderFormat = "%{FolderName} (%{UserName} <%{Email}>)";
}

View File

@ -68,8 +68,6 @@
- (NSArray *) refreshViewIntervals;
- (NSString *) subscriptionFolderFormat;
- (NSString *) calendarDefaultCategoryColor;
- (NSArray *) freeBusyDefaultInterval;
- (int) davCalendarStartTimeLimit;

View File

@ -294,11 +294,6 @@
return [self stringForKey: @"SOGoLDAPContactInfoAttribute"];
}
- (NSString *) calendarDefaultCategoryColor
{
return [self stringForKey: @"SOGoCalendarDefaultCategoryColor"];
}
- (NSArray *) freeBusyDefaultInterval
{
return [self arrayForKey: @"SOGoFreeBusyDefaultInterval"];

View File

@ -702,7 +702,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
- (NSDictionary *) calendarCategoriesColors
{
return [self dictionaryForKey: @"SOGoCalendarCategoriesColors"];
return [self objectForKey: @"SOGoCalendarCategoriesColors"];
}
- (void) setCalendarShouldDisplayWeekend: (BOOL) newValue

View File

@ -44,7 +44,6 @@
NSDictionary *calendarCategoriesColors;
NSArray *contactsCategories;
NSString *defaultCategoryColor;
NSCalendarDate *today;
// Mail labels/tags

View File

@ -128,7 +128,6 @@ static NSArray *reminderValues = nil;
calendarCategories = nil;
calendarCategoriesColors = nil;
defaultCategoryColor = nil;
category = nil;
label = nil;
@ -175,7 +174,6 @@ static NSArray *reminderValues = nil;
[vacationOptions release];
[calendarCategories release];
[calendarCategoriesColors release];
[defaultCategoryColor release];
[category release];
[label release];
[mailLabels release];
@ -1521,15 +1519,6 @@ static NSArray *reminderValues = nil;
ASSIGN (calendarCategoriesColors, [userDefaults calendarCategoriesColors]);
categoryColor = [calendarCategoriesColors objectForKey: category];
if (!categoryColor)
{
if (!defaultCategoryColor)
{
dd = [[context activeUser] domainDefaults];
ASSIGN (defaultCategoryColor, [dd calendarDefaultCategoryColor]);
}
categoryColor = defaultCategoryColor;
}
return categoryColor;
}