Monotone-Parent: 4bd5f430f07481a1a60f5793472c59de68d874f8

Monotone-Revision: f235c20d3054724f04e5f5e59f919e5d18b90c82

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-21T22:24:34
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2006-08-21 22:24:34 +00:00
parent e0cc39c7dd
commit 2a5b0bbaeb
2 changed files with 9 additions and 17 deletions

View File

@ -1,5 +1,8 @@
2006-08-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Common/UIxToolbar.m ([UIxToolbar -buttonLabel]): reduced the
code by invoking UIxComponent's labelForKey:.
* UI/SOGoUI/UIxComponent.m ([UIxComponent -labelForKey:]): use
[self pageResourceManager] instead of [self resourceManager].

View File

@ -165,24 +165,13 @@
/* labels */
- (NSString *)buttonLabel {
WOResourceManager *rm;
NSString *key, *label;
- (NSString *) buttonLabel
{
NSString *key;
key = [[self buttonInfo] valueForKey:@"label"];
/* lookup resource manager */
if ((rm = [self pageResourceManager]) == nil)
rm = [[WOApplication application] resourceManager];
if (rm == nil)
[self warnWithFormat:@"missing resource manager!"];
/* lookup string */
label = [rm stringForKey:key inTableNamed:nil withDefaultValue:key
languages:[[self context] resourceLookupLanguages]];
return label;
key = [[self buttonInfo] valueForKey: @"label"];
return [self labelForKey: key];
}
- (id) buttonImage