diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index aae0a632b..0f4815103 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -224,6 +224,14 @@ /* folder type */ +- (BOOL) isEqual: (id) otherFolder +{ + return ([otherFolder class] == [self class] + && [container isEqual: [otherFolder container]] + && [nameInContainer + isEqualToString: [otherFolder nameInContainer]]); +} + - (NSString *) outlookFolderClass { [self subclassResponsibility: _cmd]; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 9322f247f..728d3c303 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -48,6 +48,7 @@ #import "NSString+Utilities.h" #import "SOGoContentObject.h" +#import "SOGoParentFolder.h" #import "SOGoPermissions.h" #import "SOGoUser.h" @@ -109,11 +110,16 @@ static NSString *defaultUserID = @""; - (void) _setDisplayNameFromRow: (NSDictionary *) row { - NSString *currentLogin, *ownerLogin; + NSString *currentLogin, *ownerLogin, *primaryDN; NSDictionary *ownerIdentity; - displayName - = [NSMutableString stringWithString: [row objectForKey: @"c_foldername"]]; + primaryDN = [row objectForKey: @"c_foldername"]; + displayName = [NSMutableString string]; + if ([primaryDN isEqualToString: [container defaultFolderName]]) + [displayName appendString: [self labelForKey: primaryDN]]; + else + [displayName appendString: primaryDN]; + currentLogin = [[context activeUser] login]; ownerLogin = [self ownerInContext: context]; if (![currentLogin isEqualToString: ownerLogin]) diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index bc62ee224..3b8f9ca27 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -995,11 +995,13 @@ static BOOL kontactGroupDAV = YES; userLanguage = [[context activeUser] language]; paths = [bundle pathsForResourcesOfType: @"strings" - inDirectory: [NSString stringWithFormat: @"%@.lproj", userLanguage] + inDirectory: [NSString stringWithFormat: @"%@.lproj", + userLanguage] forLocalization: userLanguage]; if ([paths count] > 0) { - strings = [NSDictionary dictionaryFromStringsFile: [paths objectAtIndex: 0]]; + strings = [NSDictionary + dictionaryFromStringsFile: [paths objectAtIndex: 0]]; label = [strings objectForKey: key]; if (!label) label = key; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 28afec224..49083d4ea 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -478,6 +478,21 @@ return calendarList; } +- (NSString *) calendarDisplayName +{ + NSString *fDisplayName; + SOGoAppointmentFolder *folder; + SOGoAppointmentFolders *parentFolder; + + fDisplayName = [item displayName]; + folder = [[self clientObject] container]; + parentFolder = [folder container]; + if ([fDisplayName isEqualToString: [parentFolder defaultFolderName]]) + fDisplayName = [self labelForKey: fDisplayName]; + + return fDisplayName; +} + - (NSString *) calendarsFoldersList { NSArray *calendars; diff --git a/UI/Templates/SchedulerUI/UIxComponentEditor.wox b/UI/Templates/SchedulerUI/UIxComponentEditor.wox index d5c1e9761..2c01d63ec 100644 --- a/UI/Templates/SchedulerUI/UIxComponentEditor.wox +++ b/UI/Templates/SchedulerUI/UIxComponentEditor.wox @@ -47,7 +47,7 @@ />