From: helge Date: Fri, 8 Jul 2005 14:27:38 +0000 (+0000) Subject: added emitter selection to mail compose panel X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c190e28fc5255623a38ba55d8301569bcbd1a09;p=scalable-opengroupware.org added emitter selection to mail compose panel git-svn-id: http://svn.opengroupware.org/SOGo/trunk@706 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/Main/SOGoAuthenticator.m b/SOGo/Main/SOGoAuthenticator.m index 52de901c..e40cec1a 100644 --- a/SOGo/Main/SOGoAuthenticator.m +++ b/SOGo/Main/SOGoAuthenticator.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include "SOGoAuthenticator.h" #include "common.h" @@ -33,10 +32,6 @@ static SOGoAuthenticator *auth = nil; // THREAD return auth; } -- (void)dealloc { - [super dealloc]; -} - /* check credentials */ - (BOOL)checkLogin:(NSString *)_login password:(NSString *)_pwd { diff --git a/SOGo/UI/MailerUI/ChangeLog b/SOGo/UI/MailerUI/ChangeLog index e16806c5..9a712bfe 100644 --- a/SOGo/UI/MailerUI/ChangeLog +++ b/SOGo/UI/MailerUI/ChangeLog @@ -1,3 +1,8 @@ +2005-07-08 Helge Hess + + * UIxMailEditor.m: added from-selection popup, list discovery via + AgenorUserManager (aka LDAP) (v0.9.135) + 2005-07-08 Helge Hess * UIxMailEditor.m: use WOContext method from libSOGo to detect diff --git a/SOGo/UI/MailerUI/UIxMailEditor.m b/SOGo/UI/MailerUI/UIxMailEditor.m index 551d2491..b9277bcc 100644 --- a/SOGo/UI/MailerUI/UIxMailEditor.m +++ b/SOGo/UI/MailerUI/UIxMailEditor.m @@ -37,6 +37,8 @@ NSArray *bcc; NSString *subject; NSString *text; + NSArray *fromEMails; + NSString *from; SOGoMailFolder *sentFolder; } @@ -46,6 +48,7 @@ #include #include #include +#include #include #include #include "common.h" @@ -104,6 +107,8 @@ static NSArray *infoKeys = nil; - (void)dealloc { [self->sentFolder release]; + [self->fromEMails release]; + [self->from release]; [self->text release]; [self->subject release]; [self->to release]; @@ -114,11 +119,15 @@ static NSArray *infoKeys = nil; /* accessors */ -- (void)setFrom:(NSString *)_ignore { +- (void)setFrom:(NSString *)_value { + ASSIGNCOPY(self->from, _value); } - (NSString *)from { - return [self emailForUser]; + if (![self->from isNotNull]) + return [self emailForUser]; + return self->from; } + - (void)setReplyTo:(NSString *)_ignore { } - (NSString *)replyTo { @@ -161,6 +170,36 @@ static NSArray *infoKeys = nil; return [self->bcc isNotNull] ? self->bcc : [NSArray array]; } +/* from addresses */ + +- (NSArray *)fromEMails { + NSString *primary, *uid; + NSArray *shares; + + if (self->fromEMails != nil) + return self->fromEMails; + + uid = [[self user] login]; + primary = [self emailForUser]; + if (![[self context] isAccessFromIntranet]) { + self->fromEMails = [[NSArray alloc] initWithObjects:&primary count:1]; + return self->fromEMails; + } + + shares = + [[AgenorUserManager sharedUserManager] getSharedMailboxEMailsForUID:uid]; + if ([shares count] == 0) + self->fromEMails = [[NSArray alloc] initWithObjects:&primary count:1]; + else { + id tmp; + + tmp = [[NSArray alloc] initWithObjects:&primary count:1]; + self->fromEMails = [[tmp arrayByAddingObjectsFromArray:shares] copy]; + [tmp release]; tmp = nil; + } + return self->fromEMails; +} + /* title */ - (NSString *)panelTitle { diff --git a/SOGo/UI/MailerUI/Version b/SOGo/UI/MailerUI/Version index 2b0ec3eb..ebc04838 100644 --- a/SOGo/UI/MailerUI/Version +++ b/SOGo/UI/MailerUI/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=134 +SUBMINOR_VERSION:=135 # v0.9.134 requires libSOGo v0.9.41 # v0.9.100 requires libNGMime v4.5.213 diff --git a/SOGo/UI/Templates/MailerUI/UIxMailEditor.wox b/SOGo/UI/Templates/MailerUI/UIxMailEditor.wox index 5196c0e6..df3b8dcb 100644 --- a/SOGo/UI/Templates/MailerUI/UIxMailEditor.wox +++ b/SOGo/UI/Templates/MailerUI/UIxMailEditor.wox @@ -12,16 +12,6 @@ >
- -
+ +
+ + + + + +
+ : + + +
+
+
- -
+ :