diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index 46980463b..e337f6eb0 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -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). diff --git a/NEWS b/NEWS index de9c157b5..00e308a60 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/SoObjects/SOGo/SOGoDefaults.plist b/SoObjects/SOGo/SOGoDefaults.plist index e804095f0..d0557c666 100644 --- a/SoObjects/SOGo/SOGoDefaults.plist +++ b/SoObjects/SOGo/SOGoDefaults.plist @@ -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}>)"; } diff --git a/SoObjects/SOGo/SOGoDomainDefaults.h b/SoObjects/SOGo/SOGoDomainDefaults.h index fbc665852..7dea88121 100644 --- a/SoObjects/SOGo/SOGoDomainDefaults.h +++ b/SoObjects/SOGo/SOGoDomainDefaults.h @@ -68,8 +68,6 @@ - (NSArray *) refreshViewIntervals; - (NSString *) subscriptionFolderFormat; -- (NSString *) calendarDefaultCategoryColor; - - (NSArray *) freeBusyDefaultInterval; - (int) davCalendarStartTimeLimit; diff --git a/SoObjects/SOGo/SOGoDomainDefaults.m b/SoObjects/SOGo/SOGoDomainDefaults.m index ff02b6a96..b55cc0851 100644 --- a/SoObjects/SOGo/SOGoDomainDefaults.m +++ b/SoObjects/SOGo/SOGoDomainDefaults.m @@ -294,11 +294,6 @@ return [self stringForKey: @"SOGoLDAPContactInfoAttribute"]; } -- (NSString *) calendarDefaultCategoryColor -{ - return [self stringForKey: @"SOGoCalendarDefaultCategoryColor"]; -} - - (NSArray *) freeBusyDefaultInterval { return [self arrayForKey: @"SOGoFreeBusyDefaultInterval"]; diff --git a/SoObjects/SOGo/SOGoUserDefaults.m b/SoObjects/SOGo/SOGoUserDefaults.m index 5d975f146..9cc4b38e2 100644 --- a/SoObjects/SOGo/SOGoUserDefaults.m +++ b/SoObjects/SOGo/SOGoUserDefaults.m @@ -702,7 +702,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; - (NSDictionary *) calendarCategoriesColors { - return [self dictionaryForKey: @"SOGoCalendarCategoriesColors"]; + return [self objectForKey: @"SOGoCalendarCategoriesColors"]; } - (void) setCalendarShouldDisplayWeekend: (BOOL) newValue diff --git a/UI/PreferencesUI/UIxPreferences.h b/UI/PreferencesUI/UIxPreferences.h index bbbb0a2b1..51607c9a1 100644 --- a/UI/PreferencesUI/UIxPreferences.h +++ b/UI/PreferencesUI/UIxPreferences.h @@ -44,7 +44,6 @@ NSDictionary *calendarCategoriesColors; NSArray *contactsCategories; - NSString *defaultCategoryColor; NSCalendarDate *today; // Mail labels/tags diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 990fda1ed..c73206d0b 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -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; }