mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-15 11:53:17 +00:00
Monotone-Parent: 3d8ebb80a2f9e64a537f7a46aaadd8fcc1d801e8
Monotone-Revision: 4bc7d1bcd8cf57366a454fb7814accb19d6121c8 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-28T20:37:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -42,13 +42,6 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (searchText)
|
||||
[searchText release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void) setCurrentContact: (NSDictionary *) _contact
|
||||
@@ -61,19 +54,6 @@
|
||||
return currentContact;
|
||||
}
|
||||
|
||||
- (void) setSearchText: (NSString *) _txt
|
||||
{
|
||||
ASSIGNCOPY (searchText, _txt);
|
||||
}
|
||||
|
||||
- (id) searchText
|
||||
{
|
||||
if (!searchText)
|
||||
[self setSearchText: [self queryParameterForKey:@"search"]];
|
||||
|
||||
return searchText;
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) mailerContactsAction
|
||||
{
|
||||
selectorComponentClass = @"UIxContactsMailerSelection";
|
||||
@@ -126,45 +106,33 @@
|
||||
NSString *s;
|
||||
|
||||
s = [self queryParameterForKey: @"sort"];
|
||||
if ([s length] == 0)
|
||||
if (![s length])
|
||||
s = [self defaultSortKey];
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
- (NSComparisonResult) sortOrdering
|
||||
{
|
||||
return ([[self queryParameterForKey:@"desc"] boolValue]
|
||||
? NSOrderedDescending
|
||||
: NSOrderedAscending);
|
||||
}
|
||||
|
||||
- (NSArray *) contactInfos
|
||||
{
|
||||
id <SOGoContactFolder> folder;
|
||||
NSString *ascending, *searchText, *valueText;
|
||||
NSComparisonResult ordering;
|
||||
|
||||
folder = [self clientObject];
|
||||
|
||||
return [folder lookupContactsWithFilter: [self searchText]
|
||||
ascending = [self queryParameterForKey: @"asc"];
|
||||
ordering = ((![ascending length] || [ascending boolValue])
|
||||
? NSOrderedAscending : NSOrderedDescending);
|
||||
|
||||
searchText = [self queryParameterForKey: @"search"];
|
||||
if ([searchText length] > 0)
|
||||
valueText = [self queryParameterForKey: @"value"];
|
||||
else
|
||||
valueText = nil;
|
||||
|
||||
return [folder lookupContactsWithFilter: valueText
|
||||
sortBy: [self sortKey]
|
||||
ordering: [self sortOrdering]];
|
||||
}
|
||||
|
||||
/* notifications */
|
||||
|
||||
- (void) sleep
|
||||
{
|
||||
if (searchText)
|
||||
{
|
||||
[searchText release];
|
||||
searchText = nil;
|
||||
}
|
||||
currentContact = nil;
|
||||
// [allRecords release];
|
||||
// allRecords = nil;
|
||||
// [filteredRecords release];
|
||||
// filteredRecords = nil;
|
||||
[super sleep];
|
||||
ordering: ordering];
|
||||
}
|
||||
|
||||
/* actions */
|
||||
|
||||
Reference in New Issue
Block a user