Monotone-Parent: f844c722fbaf58bf1e6166c82175c6ca3aca9074

Monotone-Revision: f463d17bed09b78de002a4dfc873a1f45b6aa7b7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-03-22T19:02:45
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-03-22 19:02:45 +00:00
parent 3abf38778d
commit 520249ebb7
3 changed files with 88 additions and 23 deletions
+33 -7
View File
@@ -46,25 +46,39 @@
- (void) dealloc
{
[snapshot release];
[errorText release];
[preferredEmail release];
[super dealloc];
}
/* accessors */
- (void) setErrorText: (NSString *) _txt
- (NSArray *) htmlMailFormatList
{
ASSIGNCOPY(errorText, _txt);
static NSArray *htmlMailFormatItems = nil;
if (!htmlMailFormatItems)
{
htmlMailFormatItems = [NSArray arrayWithObjects: @"FALSE", @"TRUE", nil];
[htmlMailFormatItems retain];
}
return htmlMailFormatItems;
}
- (NSString *) errorText
- (NSString *) itemHtmlMailFormatText
{
return errorText;
return [self labelForKey:
[NSString stringWithFormat: @"htmlMailFormat_%@", item]];
}
- (BOOL) hasErrorText
- (void) setItem: (NSString *) newItem
{
return [errorText length] > 0 ? YES : NO;
item = newItem;
}
- (NSString *) item
{
return item;
}
/* load/store content format */
@@ -214,6 +228,9 @@
[self _setSnapshotValue: @"workMail" to: workMail];
[self _setSnapshotValue: @"homeMail" to: homeMail];
[self _setSnapshotValue: @"mozillaUseHtmlMail"
to: [[card uniqueChildWithTag: @"x-mozilla-html"] value: 0]];
}
- (void) _setupOrgFields
@@ -291,6 +308,9 @@
[self _setupEmailFields];
[self _setSnapshotValue: @"screenName"
to: [[card uniqueChildWithTag: @"x-aim"] value: 0]];
elements = [card childrenWithTag: @"adr"
andAttribute: @"type" havingValue: @"work"];
if (elements && [elements count] > 0)
@@ -425,6 +445,10 @@
else
[card setPreferred: homeMail];
}
[[card uniqueChildWithTag: @"x-mozilla-html"]
setValue: 0
to: [snapshot objectForKey: @"mozillaUseHtmlMail"]];
}
- (void) _saveSnapshot
@@ -463,6 +487,8 @@
[self _savePhoneValues];
[self _saveEmails];
[[card uniqueChildWithTag: @"x-aim"]
setValue: 0 to: [snapshot objectForKey: @"screenName"]];
}
- (id <WOActionResults>) saveAction