2 Copyright (C) 2004-2005 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #include <SOGoUI/UIxComponent.h>
24 @interface UIxMailAccountView : UIxComponent
32 @interface NSString(DotCutting)
34 - (NSString *)titleForSOGoIMAP4String;
38 @implementation UIxMailAccountView
42 - (NSString *)objectTitle {
43 return [[[self clientObject] nameInContainer] titleForSOGoIMAP4String];
46 - (BOOL)isShareAccount {
47 return [[[self clientObject] nameInContainer] rangeOfString:@".-."].length >0
51 - (NSString *)fullSharePath {
55 s = [[self clientObject] nameInContainer];
56 r = [s rangeOfString:@".-."];
57 if (r.length == 0) return nil;
59 s = [s substringFromIndex:(r.location + r.length)];
60 r = [s rangeOfString:@"@"];
61 if (r.length == 0) return s;
63 return [s substringToIndex:r.location];
66 - (NSString *)panelTitle {
69 s = [self labelForKey:@"Mail Account"];
70 s = [s stringByAppendingString:@": "];
71 s = [s stringByAppendingString:[self objectTitle]];
75 @end /* UIxMailAccountView */