From: znek Date: Fri, 22 Oct 2004 18:18:37 +0000 (+0000) Subject: improvements X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0b522ee670ac6602e6ea67c1fd8799aface7071;p=scalable-opengroupware.org improvements git-svn-id: http://svn.opengroupware.org/SOGo/trunk@421 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SOGo.xcode/project.pbxproj b/SOGo/SOGo.xcode/project.pbxproj index e579c534..e42edc91 100644 --- a/SOGo/SOGo.xcode/project.pbxproj +++ b/SOGo/SOGo.xcode/project.pbxproj @@ -1569,6 +1569,23 @@ refType = 4; sourceTree = ""; }; + ADBE446607297BA9000FEA6A = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxMailSortableTableHeader.wox; + refType = 4; + sourceTree = ""; + }; + ADBE446707297BA9000FEA6A = { + fileEncoding = 5; + indentWidth = 2; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxMailSortableTableHeader.m; + refType = 4; + sourceTree = ""; + }; ADCDE53106ADA8AC00BFCE2B = { fileEncoding = 5; indentWidth = 8; @@ -2468,6 +2485,8 @@ AD2C76D7071BF4EB0087E027, ADDF4DCC06DE0E9A00C4E7F8, ADDF4DCD06DE0E9A00C4E7F8, + ADBE446707297BA9000FEA6A, + ADBE446607297BA9000FEA6A, ADDF4DCE06DE0E9A00C4E7F8, ADDF4DCF06DE0E9A00C4E7F8, ); diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index e5fca484..c9999d70 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,5 +1,11 @@ 2004-10-22 Marcus Mueller + * v0.9.44 + + * UIxMailSortableTableHeader.[wox|m]: new component for doing sorting + + * UIxMailListView.wox: uses UIxMailSortableTableHeader for sorting + * UIxMailListView.wox: bugfixes (v0.9.43) * v0.9.42 diff --git a/SOGo/UI/Mailer/GNUmakefile b/SOGo/UI/Mailer/GNUmakefile index e41a60da..fe9ba40c 100644 --- a/SOGo/UI/Mailer/GNUmakefile +++ b/SOGo/UI/Mailer/GNUmakefile @@ -21,15 +21,16 @@ MailerUI_OBJC_FILES += \ UIxMailTree.m \ UIxMailToolbar.m \ \ - UIxMailAccountsView.m \ - UIxMailAccountView.m \ - UIxMailListView.m \ - UIxMailView.m \ + UIxMailAccountsView.m \ + UIxMailAccountView.m \ + UIxMailListView.m \ + UIxMailView.m \ + UIxMailSortableTableHeader.m \ \ - UIxMailEditor.m \ - UIxMailEditorAction.m \ - UIxMailToSelection.m \ - UIxMailAddressbook.m \ + UIxMailEditor.m \ + UIxMailEditorAction.m \ + UIxMailToSelection.m \ + UIxMailAddressbook.m \ \ UIxMailPartViewer.m \ UIxMailPartTextViewer.m \ @@ -46,14 +47,15 @@ MailerUI_RESOURCE_FILES += \ UIxMailTree.wox \ UIxMailToolbar.wox \ \ - UIxMailAccountsView.wox \ - UIxMailAccountView.wox \ - UIxMailListView.wox \ - UIxMailView.wox \ + UIxMailAccountsView.wox \ + UIxMailAccountView.wox \ + UIxMailListView.wox \ + UIxMailView.wox \ + UIxMailSortableTableHeader.wox \ \ - UIxMailEditor.wox \ - UIxMailToSelection.wox \ - UIxMailAddressbook.wox \ + UIxMailEditor.wox \ + UIxMailToSelection.wox \ + UIxMailAddressbook.wox \ \ UIxMailPartTextViewer.wox \ UIxMailPartMixedViewer.wox \ diff --git a/SOGo/UI/Mailer/UIxMailListView.wox b/SOGo/UI/Mailer/UIxMailListView.wox index 7d800cf6..669958c1 100644 --- a/SOGo/UI/Mailer/UIxMailListView.wox +++ b/SOGo/UI/Mailer/UIxMailListView.wox @@ -34,104 +34,29 @@ - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - + @@ -141,37 +66,13 @@ - - - - - - - - - - - - - - - + diff --git a/SOGo/UI/Mailer/UIxMailSortableTableHeader.m b/SOGo/UI/Mailer/UIxMailSortableTableHeader.m new file mode 100644 index 00000000..00781f7a --- /dev/null +++ b/SOGo/UI/Mailer/UIxMailSortableTableHeader.m @@ -0,0 +1,104 @@ +/* + Copyright (C) 2000-2004 SKYRIX Software AG + + This file is part of OGo + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + */ +// $Id$ + + +#include + +@interface UIxMailSortableTableHeader : WOComponent +{ + NSString *label; + NSString *sortKey; + NSString *href; + NSDictionary *queryDictionary; + BOOL isDefault; +} + +@end + +#include "common.h" + +@implementation UIxMailSortableTableHeader + +- (void)dealloc { + [self->label release]; + [self->sortKey release]; + [self->href release]; + [self->queryDictionary release]; + [super dealloc]; +} + +/* Accessors */ + +- (void)setLabel:(NSString *)_label { + ASSIGN(self->label, _label); +} +- (NSString *)label { + return self->label; +} + +- (void)setSortKey:(NSString *)_sortKey { + ASSIGN(self->sortKey, _sortKey); +} +- (NSString *)sortKey { + return self->sortKey; +} + +- (void)setHref:(NSString *)_href { + ASSIGN(self->href, _href); +} +- (NSString *)href { + return self->href; +} + +- (void)setQueryDictionary:(NSDictionary *)_queryDictionary { + ASSIGN(self->queryDictionary, _queryDictionary); +} +- (NSDictionary *)queryDictionary { + return self->queryDictionary; +} + +- (void)setIsDefault:(BOOL)_isDefault { + self->isDefault = _isDefault; +} +- (BOOL)isDefault { + return self->isDefault; +} + +- (BOOL)isSelected { + NSString *so; + so = [self->queryDictionary objectForKey:@"sort"]; + if(!so) { + return self->isDefault; + } + return [so isEqualToString:self->sortKey]; +} + +- (BOOL)isSortedDescending { + NSString *desc; + + desc = [self->queryDictionary objectForKey:@"desc"]; + if(!desc) + return NO; + return [desc boolValue] ? YES : NO; +} + +@end diff --git a/SOGo/UI/Mailer/UIxMailSortableTableHeader.wox b/SOGo/UI/Mailer/UIxMailSortableTableHeader.wox new file mode 100644 index 00000000..c983234c --- /dev/null +++ b/SOGo/UI/Mailer/UIxMailSortableTableHeader.wox @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index af3bd22b..5ddff4f0 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=43 +SUBMINOR_VERSION:=44 # v0.9.43 requires NGObjWeb v4.3.73 # v0.9.42 requires NGObjWeb v4.3.72