Added support for dynamic mail labels/tags management.

The CSS in the UIxPreferences remains to be done.
This commit is contained in:
Ludovic Marcotte
2013-11-11 10:49:58 -05:00
parent 6a9bcfda68
commit 37d3234b60
24 changed files with 625 additions and 230 deletions
+36 -5
View File
@@ -1,9 +1,5 @@
/*
Copyright (C) 2007-2011 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
Ludovic Marcotte <lmarcotte@inverse.ca>
Copyright (C) 2007-2013 Inverse inc.
This file is part of SOGo.
@@ -48,6 +44,7 @@
#import <Mailer/SOGoMailAccount.h>
#import <Mailer/SOGoMailAccounts.h>
#import <Mailer/SOGoMailFolder.h>
#import <Mailer/SOGoMailLabel.h>
#import <Mailer/SOGoMailObject.h>
#import <Mailer/SOGoSentFolder.h>
#import <SOGo/NSDictionary+URL.h>
@@ -84,6 +81,12 @@
return self;
}
- (void) dealloc
{
RELEASE(_currentLabel);
[super dealloc];
}
- (void) _setupContext
{
SOGoUser *activeUser;
@@ -687,4 +690,32 @@
return [folders jsonRepresentation];
}
//
// Standard mapping done by Thunderbird:
//
// label1 => Important
// label2 => Work
// label3 => Personal
// label4 => To Do
// label5 => Later
//
- (NSArray *) availableLabels
{
NSDictionary *v;
v = [[[context activeUser] userDefaults] mailLabelsColors];
return [SOGoMailLabel labelsFromDefaults: v component: self];
}
- (void) setCurrentLabel: (SOGoMailLabel *) theCurrentLabel
{
ASSIGN(_currentLabel, theCurrentLabel);
}
- (SOGoMailLabel *) currentLabel
{
return _currentLabel;
}
@end /* UIxMailMainFrame */