Monotone-Parent: 53787a178138e23c283a66af023cbddab3f3c417
Monotone-Revision: d74fd5d68d5fae10363904ec274b94033ae33c2c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-19T22:44:12 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
e357be66f1
commit
2cbc2ba742
16
ChangeLog
16
ChangeLog
|
@ -1,5 +1,21 @@
|
||||||
2007-11-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2007-11-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* UI/PreferencesUI/UIxPreferences.m ([UIxPreferences -signature]):
|
||||||
|
returns the signature for the default identity of the default
|
||||||
|
accouunt...
|
||||||
|
([UIxPreferences -setSignature:newSignature]): accessor that sets
|
||||||
|
the default signature.
|
||||||
|
|
||||||
|
* UI/MailerUI/UIxMailAccountActions.m ([UIxMailAccountActions
|
||||||
|
-composeAction]): append the message signature to the new draft.
|
||||||
|
|
||||||
|
* SoObjects/Mailer/SOGoMailReply.m ([SOGoMailReply -signature]):
|
||||||
|
same as above.
|
||||||
|
|
||||||
|
* SoObjects/Mailer/SOGoMailForward.m ([SOGoMailForward
|
||||||
|
-signature]): new method that takes the user's signature and put
|
||||||
|
it at the end of the message, if exists.
|
||||||
|
|
||||||
* UI/Common/UIxPageFrame.m ([UIxPageFrame -isSuperUser]): new
|
* UI/Common/UIxPageFrame.m ([UIxPageFrame -isSuperUser]): new
|
||||||
accessor that forwards the call to the active user.
|
accessor that forwards the call to the active user.
|
||||||
|
|
||||||
|
|
|
@ -6,3 +6,5 @@ From: <#from/>
|
||||||
<#hasCc>CC: <#cc/></#hasCc><#hasNewsGroups>Newsgroups: <#newsgroups/></#hasNewsGroups><#hasReferences>References: <#references/></#hasReferences>
|
<#hasCc>CC: <#cc/></#hasCc><#hasNewsGroups>Newsgroups: <#newsgroups/></#hasNewsGroups><#hasReferences>References: <#references/></#hasReferences>
|
||||||
|
|
||||||
<#messageBody/>
|
<#messageBody/>
|
||||||
|
|
||||||
|
<#signature/>
|
||||||
|
|
|
@ -67,3 +67,8 @@ messageBody: WOString {
|
||||||
value = messageBody;
|
value = messageBody;
|
||||||
escapeHTML = NO;
|
escapeHTML = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signature: WOString {
|
||||||
|
value = signature;
|
||||||
|
escapeHTML = NO;
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
On <#date/>, <#from/> wrote:
|
On <#date/>, <#from/> wrote:
|
||||||
|
|
||||||
<#messageBody/>
|
<#messageBody/>
|
||||||
|
|
||||||
|
<#signature/>
|
||||||
|
|
|
@ -12,3 +12,8 @@ messageBody: WOString {
|
||||||
value = messageBody;
|
value = messageBody;
|
||||||
escapeHTML = NO;
|
escapeHTML = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signature: WOString {
|
||||||
|
value = signature;
|
||||||
|
escapeHTML = NO;
|
||||||
|
}
|
||||||
|
|
|
@ -149,6 +149,19 @@
|
||||||
return [sourceMail contentForEditing];
|
return [sourceMail contentForEditing];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) signature
|
||||||
|
{
|
||||||
|
NSString *signature, *mailSignature;
|
||||||
|
|
||||||
|
signature = [[context activeUser] signature];
|
||||||
|
if ([signature length])
|
||||||
|
mailSignature = [NSString stringWithFormat: @"--\r\n%@", signature];
|
||||||
|
else
|
||||||
|
mailSignature = @"";
|
||||||
|
|
||||||
|
return mailSignature;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation SOGoMailEnglishForward
|
@implementation SOGoMailEnglishForward
|
||||||
|
|
|
@ -6,3 +6,5 @@ De: <#from/>
|
||||||
<#hasCc>Copie: <#cc/></#hasCc><#hasNewsGroups>Forums de discussion: <#newsgroups/></#hasNewsGroups><#hasReferences>Références: <#references/></#hasReferences>
|
<#hasCc>Copie: <#cc/></#hasCc><#hasNewsGroups>Forums de discussion: <#newsgroups/></#hasNewsGroups><#hasReferences>Références: <#references/></#hasReferences>
|
||||||
|
|
||||||
<#messageBody/>
|
<#messageBody/>
|
||||||
|
|
||||||
|
<#signature/>
|
||||||
|
|
|
@ -67,3 +67,8 @@ messageBody: WOString {
|
||||||
value = messageBody;
|
value = messageBody;
|
||||||
escapeHTML = NO;
|
escapeHTML = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signature: WOString {
|
||||||
|
value = signature;
|
||||||
|
escapeHTML = NO;
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
Le <#date/>, <#from/> a écrit:
|
Le <#date/>, <#from/> a écrit:
|
||||||
|
|
||||||
<#messageBody/>
|
<#messageBody/>
|
||||||
|
|
||||||
|
<#signature/>
|
||||||
|
|
|
@ -12,3 +12,8 @@ messageBody: WOString {
|
||||||
value = messageBody;
|
value = messageBody;
|
||||||
escapeHTML = NO;
|
escapeHTML = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signature: WOString {
|
||||||
|
value = signature;
|
||||||
|
escapeHTML = NO;
|
||||||
|
}
|
||||||
|
|
|
@ -6,3 +6,5 @@ Sender: <#from/>
|
||||||
<#hasCc>Kopie: <#cc/></#hasCc><#hasNewsGroups>Newsgroup: <#newsgroups/></#hasNewsGroups><#hasReferences>Referenzen: <#references/></#hasReferences>
|
<#hasCc>Kopie: <#cc/></#hasCc><#hasNewsGroups>Newsgroup: <#newsgroups/></#hasNewsGroups><#hasReferences>Referenzen: <#references/></#hasReferences>
|
||||||
|
|
||||||
<#messageBody/>
|
<#messageBody/>
|
||||||
|
|
||||||
|
<#signature/>
|
||||||
|
|
|
@ -67,3 +67,8 @@ messageBody: WOString {
|
||||||
value = messageBody;
|
value = messageBody;
|
||||||
escapeHTML = NO;
|
escapeHTML = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signature: WOString {
|
||||||
|
value = signature;
|
||||||
|
escapeHTML = NO;
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
On <#date/>, <#from/> wrote:
|
On <#date/>, <#from/> wrote:
|
||||||
|
|
||||||
<#messageBody/>
|
<#messageBody/>
|
||||||
|
|
||||||
|
<#signature/>
|
||||||
|
|
|
@ -12,3 +12,8 @@ messageBody: WOString {
|
||||||
value = messageBody;
|
value = messageBody;
|
||||||
escapeHTML = NO;
|
escapeHTML = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signature: WOString {
|
||||||
|
value = signature;
|
||||||
|
escapeHTML = NO;
|
||||||
|
}
|
||||||
|
|
|
@ -73,6 +73,19 @@
|
||||||
return [[sourceMail contentForEditing] stringByApplyingMailQuoting];
|
return [[sourceMail contentForEditing] stringByApplyingMailQuoting];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) signature
|
||||||
|
{
|
||||||
|
NSString *signature, *mailSignature;
|
||||||
|
|
||||||
|
signature = [[context activeUser] signature];
|
||||||
|
if ([signature length])
|
||||||
|
mailSignature = [NSString stringWithFormat: @"--\r\n%@", signature];
|
||||||
|
else
|
||||||
|
mailSignature = @"";
|
||||||
|
|
||||||
|
return mailSignature;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation SOGoMailEnglishReply
|
@implementation SOGoMailEnglishReply
|
||||||
|
|
|
@ -24,16 +24,18 @@
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSEnumerator.h>
|
#import <Foundation/NSEnumerator.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
#import <NGObjWeb/WOResponse.h>
|
#import <NGObjWeb/WOResponse.h>
|
||||||
#import <NGImap4/NGImap4Connection.h>
|
#import <NGImap4/NGImap4Connection.h>
|
||||||
|
|
||||||
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
||||||
#import <SoObjects/Mailer/SOGoDraftObject.h>
|
#import <SoObjects/Mailer/SOGoDraftObject.h>
|
||||||
#import <SoObjects/Mailer/SOGoDraftsFolder.h>
|
#import <SoObjects/Mailer/SOGoDraftsFolder.h>
|
||||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||||
|
#import <SoObjects/SOGo/SOGoUser.h>
|
||||||
|
|
||||||
#import "../Common/WODirectAction+SOGo.h"
|
#import "../Common/WODirectAction+SOGo.h"
|
||||||
|
|
||||||
|
@ -143,22 +145,35 @@
|
||||||
{
|
{
|
||||||
SOGoDraftsFolder *drafts;
|
SOGoDraftsFolder *drafts;
|
||||||
SOGoDraftObject *newDraftMessage;
|
SOGoDraftObject *newDraftMessage;
|
||||||
NSString *urlBase, *url, *value;
|
NSString *urlBase, *url, *value, *signature;
|
||||||
NSArray *mailTo;
|
NSArray *mailTo;
|
||||||
|
BOOL save;
|
||||||
|
|
||||||
drafts = [[self clientObject] draftsFolderInContext: context];
|
drafts = [[self clientObject] draftsFolderInContext: context];
|
||||||
newDraftMessage = [drafts newDraft];
|
newDraftMessage = [drafts newDraft];
|
||||||
|
|
||||||
|
save = NO;
|
||||||
|
|
||||||
value = [[self request] formValueForKey: @"mailto"];
|
value = [[self request] formValueForKey: @"mailto"];
|
||||||
if ([value length] > 0)
|
if ([value length] > 0)
|
||||||
{
|
{
|
||||||
mailTo = [NSArray arrayWithObject: value];
|
mailTo = [NSArray arrayWithObject: value];
|
||||||
[newDraftMessage setHeaders: [NSDictionary dictionaryWithObject: mailTo
|
[newDraftMessage
|
||||||
|
setHeaders: [NSDictionary dictionaryWithObject: mailTo
|
||||||
forKey: @"to"]];
|
forKey: @"to"]];
|
||||||
[newDraftMessage storeInfo];
|
save = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signature = [[context activeUser] signature];
|
||||||
|
if ([signature length])
|
||||||
|
{
|
||||||
|
[newDraftMessage
|
||||||
|
setText: [NSString stringWithFormat: @"\r\n--\r\n%@", signature]];
|
||||||
|
save = YES;
|
||||||
|
}
|
||||||
|
if (save)
|
||||||
|
[newDraftMessage storeInfo];
|
||||||
|
|
||||||
urlBase = [newDraftMessage baseURLInContext: context];
|
urlBase = [newDraftMessage baseURLInContext: context];
|
||||||
url = [urlBase composeURLWithAction: @"edit"
|
url = [urlBase composeURLWithAction: @"edit"
|
||||||
parameters: nil
|
parameters: nil
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#import <NGObjWeb/WOContext.h>
|
#import <NGObjWeb/WOContext.h>
|
||||||
#import <NGObjWeb/WORequest.h>
|
#import <NGObjWeb/WORequest.h>
|
||||||
|
|
||||||
|
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||||
#import <SoObjects/SOGo/SOGoUser.h>
|
#import <SoObjects/SOGo/SOGoUser.h>
|
||||||
|
|
||||||
|
@ -472,7 +473,12 @@ static BOOL shouldDisplayPasswordChange = NO;
|
||||||
// string="itemIdentityText" selection="defaultIdentity"/></label>
|
// string="itemIdentityText" selection="defaultIdentity"/></label>
|
||||||
- (NSArray *) identitiesList
|
- (NSArray *) identitiesList
|
||||||
{
|
{
|
||||||
return [user allIdentities];
|
NSDictionary *primaryAccount;
|
||||||
|
|
||||||
|
#warning we manage only one account per user at this time...
|
||||||
|
primaryAccount = [[user mailAccounts] objectAtIndex: 0];
|
||||||
|
|
||||||
|
return [primaryAccount objectForKey: @"identities"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) itemIdentityText
|
- (NSString *) itemIdentityText
|
||||||
|
@ -480,9 +486,9 @@ static BOOL shouldDisplayPasswordChange = NO;
|
||||||
return [item keysWithFormat: @"%{fullName} <%{email}>"];
|
return [item keysWithFormat: @"%{fullName} <%{email}>"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *) defaultIdentity
|
- (NSMutableDictionary *) defaultIdentity
|
||||||
{
|
{
|
||||||
NSDictionary *currentIdentity, *defaultIdentity;
|
NSMutableDictionary *currentIdentity, *defaultIdentity;
|
||||||
NSEnumerator *identities;
|
NSEnumerator *identities;
|
||||||
|
|
||||||
defaultIdentity = nil;
|
defaultIdentity = nil;
|
||||||
|
@ -496,6 +502,19 @@ static BOOL shouldDisplayPasswordChange = NO;
|
||||||
return defaultIdentity;
|
return defaultIdentity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) signature
|
||||||
|
{
|
||||||
|
return [[self defaultIdentity] objectForKey: @"signature"];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) setSignature: (NSString *) newSignature
|
||||||
|
{
|
||||||
|
[[self defaultIdentity] setObject: newSignature
|
||||||
|
forKey: @"signature"];
|
||||||
|
[userDefaults setObject: [user mailAccounts]
|
||||||
|
forKey: @"MailAccounts"];
|
||||||
|
}
|
||||||
|
|
||||||
- (id <WOActionResults>) defaultAction
|
- (id <WOActionResults>) defaultAction
|
||||||
{
|
{
|
||||||
id <WOActionResults> results;
|
id <WOActionResults> results;
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
label:value="Calendar Options"/></li>
|
label:value="Calendar Options"/></li>
|
||||||
<li target="mailOptionsView"><var:string
|
<li target="mailOptionsView"><var:string
|
||||||
label:value="Mail Options"/></li>
|
label:value="Mail Options"/></li>
|
||||||
<!-- <li target="identitiesView"><var:string
|
<li target="identitiesView"><var:string
|
||||||
label:value="Identities"/></li> -->
|
label:value="Identities"/></li>
|
||||||
<var:if condition="shouldDisplayPasswordChange">
|
<var:if condition="shouldDisplayPasswordChange">
|
||||||
<li target="passwordView"><var:string label:value="Password"/></li>
|
<li target="passwordView"><var:string label:value="Password"/></li>
|
||||||
</var:if>
|
</var:if>
|
||||||
|
@ -97,10 +97,13 @@
|
||||||
</label> -->
|
</label> -->
|
||||||
</div>
|
</div>
|
||||||
<div id="identitiesView" class="tab">
|
<div id="identitiesView" class="tab">
|
||||||
<var:multiselection id="identitiesList" item="item"
|
<!--<var:multiselection const:id="identitiesList" item="item"
|
||||||
string="itemIdentityText" selection="defaultIdentity">
|
list="identitiesList" displayString="itemIdentityText">
|
||||||
</var:multiselection>
|
</var:multiselection>
|
||||||
<br/>
|
<br/>-->
|
||||||
|
<var:string label:value="Signature:"/><br/>
|
||||||
|
<textarea const:id="signature" const:name="signature"
|
||||||
|
var:value="signature"/>
|
||||||
</div>
|
</div>
|
||||||
<var:if condition="shouldDisplayPasswordChange">
|
<var:if condition="shouldDisplayPasswordChange">
|
||||||
<div id="passwordView" class="tab">
|
<div id="passwordView" class="tab">
|
||||||
|
|
|
@ -22,3 +22,11 @@ DIV#mailOptionsView TEXTAREA
|
||||||
DIV#passwordView
|
DIV#passwordView
|
||||||
{ padding-top: 3em;
|
{ padding-top: 3em;
|
||||||
padding-right: 10em; }
|
padding-right: 10em; }
|
||||||
|
|
||||||
|
DIV#identitiesView
|
||||||
|
{ padding-top: 5px;
|
||||||
|
padding-left: 5px; }
|
||||||
|
|
||||||
|
#signature
|
||||||
|
{ width: 380px;
|
||||||
|
height: 125px; }
|
||||||
|
|
Loading…
Reference in New Issue