From 45e64e1465969bb1918005255ab87864235409f8 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 5 Sep 2007 14:55:58 +0000 Subject: [PATCH] Monotone-Parent: ec985fb9e6b66a8966484429823a42e99822facc Monotone-Revision: 9710a1d0cb659a58b931bdacad52d1d28dbbbe47 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-05T14:55:58 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ UI/SOGoUI/UIxComponent.h | 1 - UI/SOGoUI/UIxComponent.m | 28 +--------------------------- 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index d542f488f..c36be425e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-05 Wolfgang Sourdeau + + * UI/SOGoUI/UIxComponent.m ([UIxComponent + -shortUserNameForDisplay]): simplified method. + ([-user]): removed method since [context activeUser] is as useful. + 2007-09-04 Wolfgang Sourdeau * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]): diff --git a/UI/SOGoUI/UIxComponent.h b/UI/SOGoUI/UIxComponent.h index ff5996842..4435c7303 100644 --- a/UI/SOGoUI/UIxComponent.h +++ b/UI/SOGoUI/UIxComponent.h @@ -75,7 +75,6 @@ - (UIxComponent *) jsCloseWithRefreshMethod: (NSString *) methodName; /* SoUser */ -- (SoUser *)user; - (NSString *)shortUserNameForDisplay; /* labels */ diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 0e8e45cdb..83eb9b18f 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -418,35 +418,9 @@ static BOOL uixDebugEnabled = NO; /* SoUser */ -- (SoUser *) user -{ - WOContext *ctx; - - ctx = context; - - return [[[self clientObject] authenticatorInContext: ctx] userInContext: ctx]; -} - - (NSString *) shortUserNameForDisplay { - // TODO: better use a SoUser formatter? - // TODO: who calls that? - NSString *s; - NSRange r; - - // TODO: USE USER MANAGER INSTEAD! - - s = [[self user] login]; - if ([s length] < 10) - return s; - - // TODO: algorithm might be inappropriate, depends on the actual UID - - r = [s rangeOfString:@"."]; - if (r.length == 0) - return s; - - return [s substringToIndex:r.location]; + return [[context activeUser] login]; } /* labels */