diff --git a/ChangeLog b/ChangeLog index fef696382..0708e0cdc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,12 @@ (-fetchFreeBusyInfosFrom:to:): we must fetch the c_content in order to flatten cyclic events. + * SoObjects/SOGo/SOGoSystemDefaults.m (-pageTitle): new method to + retrieve the Web page title from the new system defaults "SOGoPageTitle". + + * UI/Common/UIxPageFrame.m (-title): consider the new system + default attribute "SOGoPageTitle". + 2011-03-29 Francis Lachapelle * SoObjects/Appointments/iCalEvent+SOGo.m diff --git a/SoObjects/SOGo/SOGoSystemDefaults.h b/SoObjects/SOGo/SOGoSystemDefaults.h index a543cdfba..138d9f86a 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.h +++ b/SoObjects/SOGo/SOGoSystemDefaults.h @@ -58,6 +58,7 @@ - (BOOL) uixAdditionalPreferences; - (BOOL) uixDebugEnabled; +- (NSString *) pageTitle; - (NSArray *) supportedLanguages; - (NSString *) loginSuffix; diff --git a/SoObjects/SOGo/SOGoSystemDefaults.m b/SoObjects/SOGo/SOGoSystemDefaults.m index 8b20b5838..7b4d680fc 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.m +++ b/SoObjects/SOGo/SOGoSystemDefaults.m @@ -271,6 +271,11 @@ BootstrapNSUserDefaults () return [self boolForKey: @"SOGoUIxDebugEnabled"]; } +- (NSString *) pageTitle +{ + return [self stringForKey: @"SOGoPageTitle"]; +} + - (NSArray *) supportedLanguages { return [self stringArrayForKey: @"SOGoSupportedLanguages"]; diff --git a/UI/Common/UIxPageFrame.m b/UI/Common/UIxPageFrame.m index 9a4c52564..d7a278d31 100644 --- a/UI/Common/UIxPageFrame.m +++ b/UI/Common/UIxPageFrame.m @@ -78,10 +78,20 @@ - (NSString *) title { - if ([self isUIxDebugEnabled]) - return title; + NSString *pageTitle; + SOGoSystemDefaults *sd; - return [self labelForKey: @"SOGo"]; + if ([self isUIxDebugEnabled]) + pageTitle = title; + else + { + sd = [SOGoSystemDefaults sharedSystemDefaults]; + pageTitle = [sd pageTitle]; + if (pageTitle == nil || ![pageTitle length]) + pageTitle = [self labelForKey: @"SOGo"]; + } + + return pageTitle; } - (void) setItem: (id) _item