From: znek Date: Fri, 22 Oct 2004 15:46:56 +0000 (+0000) Subject: some progress in the mailer X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3690ab4d4a475d6cd534dff62ca33b75ca7b879;p=scalable-opengroupware.org some progress in the mailer git-svn-id: http://svn.opengroupware.org/SOGo/trunk@419 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index 90a66e60..dc17567c 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,3 +1,15 @@ +2004-10-22 Marcus Mueller + + * v0.9.42 + + * UIxMailListView.wox: sorting, proper handling of sort keys. + NOTE: there's still an unidentified bug of sort keys failing to be + retained on successive paging. + + * UIxMailListView.m: sorting + + * Images/title_*: corrected alpha values + 2004-10-20 Marcus Mueller * v0.9.41 diff --git a/SOGo/UI/Mailer/Images/title_attachment_14x14.png b/SOGo/UI/Mailer/Images/title_attachment_14x14.png index d8af1b02..b9e46675 100644 Binary files a/SOGo/UI/Mailer/Images/title_attachment_14x14.png and b/SOGo/UI/Mailer/Images/title_attachment_14x14.png differ diff --git a/SOGo/UI/Mailer/Images/title_config.png b/SOGo/UI/Mailer/Images/title_config.png index 34e76e06..eb5d46fd 100644 Binary files a/SOGo/UI/Mailer/Images/title_config.png and b/SOGo/UI/Mailer/Images/title_config.png differ diff --git a/SOGo/UI/Mailer/Images/title_junk.png b/SOGo/UI/Mailer/Images/title_junk.png index b62fec9a..4fdeb5d2 100644 Binary files a/SOGo/UI/Mailer/Images/title_junk.png and b/SOGo/UI/Mailer/Images/title_junk.png differ diff --git a/SOGo/UI/Mailer/Images/title_read_14x14.png b/SOGo/UI/Mailer/Images/title_read_14x14.png index 31fc9c3e..1c3e45cf 100644 Binary files a/SOGo/UI/Mailer/Images/title_read_14x14.png and b/SOGo/UI/Mailer/Images/title_read_14x14.png differ diff --git a/SOGo/UI/Mailer/Images/title_sortdown_12x12.png b/SOGo/UI/Mailer/Images/title_sortdown_12x12.png index 1a77d1ee..30ff16f8 100644 Binary files a/SOGo/UI/Mailer/Images/title_sortdown_12x12.png and b/SOGo/UI/Mailer/Images/title_sortdown_12x12.png differ diff --git a/SOGo/UI/Mailer/Images/title_sortup_12x12.png b/SOGo/UI/Mailer/Images/title_sortup_12x12.png new file mode 100644 index 00000000..404d527d Binary files /dev/null and b/SOGo/UI/Mailer/Images/title_sortup_12x12.png differ diff --git a/SOGo/UI/Mailer/Images/title_thread.png b/SOGo/UI/Mailer/Images/title_thread.png index 8762589e..aed73319 100644 Binary files a/SOGo/UI/Mailer/Images/title_thread.png and b/SOGo/UI/Mailer/Images/title_thread.png differ diff --git a/SOGo/UI/Mailer/UIxMailListView.m b/SOGo/UI/Mailer/UIxMailListView.m index c1014889..cc5c9230 100644 --- a/SOGo/UI/Mailer/UIxMailListView.m +++ b/SOGo/UI/Mailer/UIxMailListView.m @@ -31,6 +31,12 @@ id message; } +- (NSString *)defaultSortKey; +- (NSString *)imap4SortKey; +- (NSString *)imap4SortOrdering; + +- (BOOL)isSortedDescending; + @end #include "common.h" @@ -115,13 +121,24 @@ static int attachmentFlagSize = 8096; sort = [[[self context] request] formValueForKey:@"sort"]; - // TODO: reversed sorts - if ([sort length] == 0) sort = [self defaultSortKey]; return [sort uppercaseString]; } +- (BOOL)isSortedDescending { + return [[[self context] request] formValueForKey:@"desc"] ? YES : NO; +} + +- (NSString *)imap4SortOrdering { + NSString *sort; + + sort = [self imap4SortKey]; + if(![self isSortedDescending]) + return sort; + return [@"REVERSE " stringByAppendingString:sort]; +} + - (NSRange)fetchRange { if (self->firstMessageNumber == 0) return NSMakeRange(0, 50); @@ -134,7 +151,7 @@ static int attachmentFlagSize = 8096; self->sortedUIDs = [[[self clientObject] fetchUIDsMatchingQualifier:[self qualifier] - sortOrdering:[self imap4SortKey]] retain]; + sortOrdering:[self imap4SortOrdering]] retain]; return self->sortedUIDs; } - (unsigned int)totalMessageCount { diff --git a/SOGo/UI/Mailer/UIxMailListView.wox b/SOGo/UI/Mailer/UIxMailListView.wox index d33fa476..21456504 100644 --- a/SOGo/UI/Mailer/UIxMailListView.wox +++ b/SOGo/UI/Mailer/UIxMailListView.wox @@ -10,7 +10,8 @@ title="name" >
- :, + :,