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 UIxMailMainFrame : UIxComponent
28 NSString *userRootURL;
33 - (NSString *)rootURL;
34 - (NSString *)userRootURL;
35 - (NSString *)calendarRootURL;
40 #include <NGObjWeb/SoComponent.h>
42 @implementation UIxMailMainFrame
46 [self->title release];
47 [self->rootURL release];
48 [self->userRootURL release];
54 - (void)setHideFolderTree:(BOOL)_flag {
55 self->hideFolderTree = _flag;
57 - (BOOL)hideFolderTree {
58 return self->hideFolderTree;
61 - (void)setTitle:(NSString *)_value {
62 ASSIGNCOPY(self->title, _value);
65 if ([self->title length] == 0)
66 return @"OpenGroupware.org";
71 - (void)setItem:(id)_item {
72 ASSIGN(self->item, _item);
81 [self->item release]; self->item = nil;
86 // TODO: I think all this should be done by the clientObject?!
87 // TODO: is the stuff below necessary at all in the mailer frame?
89 - (NSString *)rootURL {
91 NSArray *traversalObjects;
93 if (self->rootURL != nil)
97 traversalObjects = [ctx objectTraversalStack];
98 self->rootURL = [[[traversalObjects objectAtIndex:0]
101 return self->rootURL;
104 - (NSString *)userRootURL {
106 NSArray *traversalObjects;
108 if (self->userRootURL)
109 return self->userRootURL;
111 ctx = [self context];
112 traversalObjects = [ctx objectTraversalStack];
113 self->userRootURL = [[[[traversalObjects objectAtIndex:1]
114 baseURLInContext:ctx]
115 stringByAppendingString:@"/"]
117 return self->userRootURL;
120 - (NSString *)calendarRootURL {
121 return [[self userRootURL] stringByAppendingString:@"Calendar/"];
123 - (NSString *)contactsRootURL {
124 return [[self userRootURL] stringByAppendingString:@"Contacts/"];
127 @end /* UIxMailMainFrame */