mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-21 23:12:40 +00:00
New feature : 1496; Unknown outgoing email addresses can now be automatically be added to your address books.
This commit is contained in:
1 parent
31ace947cb
commit
76307cfaaf
13 files changed
+405
-94
No files matched your search
@@ -139,6 +139,8 @@
|
||||
"messagecheck_every_20_minutes" = "Every 20 minutes";
|
||||
"messagecheck_every_30_minutes" = "Every 30 minutes";
|
||||
"messagecheck_once_per_hour" = "Once per hour";
|
||||
"PersonalAddressBook" = "Personal address book";
|
||||
"CollectedAddressBook" = "Collected addresses";
|
||||
|
||||
"Forward messages:" = "Forward messages:";
|
||||
"messageforward_inline" = "Inline";
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
#import <Mailer/SOGoMailAccounts.h>
|
||||
#import <Mailer/SOGoMailLabel.h>
|
||||
|
||||
#import <Contacts/SOGoContactGCSFolder.h>
|
||||
|
||||
#import "UIxPreferences.h"
|
||||
|
||||
#warning this class is not finished
|
||||
@@ -656,6 +658,16 @@ static NSArray *reminderValues = nil;
|
||||
}
|
||||
|
||||
/* Mailer */
|
||||
- (void) setAddOutgoingAddresses: (BOOL) addOutgoingAddresses
|
||||
{
|
||||
[userDefaults setMailAddOutgoingAddresses: addOutgoingAddresses];
|
||||
}
|
||||
|
||||
- (BOOL) addOutgoingAddresses
|
||||
{
|
||||
return [userDefaults mailAddOutgoingAddresses];
|
||||
}
|
||||
|
||||
- (void) setShowSubscribedFoldersOnly: (BOOL) showSubscribedFoldersOnly
|
||||
{
|
||||
[userDefaults setMailShowSubscribedFoldersOnly: showSubscribedFoldersOnly];
|
||||
@@ -676,6 +688,58 @@ static NSArray *reminderValues = nil;
|
||||
return [userDefaults mailSortByThreads];
|
||||
}
|
||||
|
||||
- (NSArray *) addressBookList
|
||||
{
|
||||
/* We want all the SourceIDS */
|
||||
NSMutableArray *folders;
|
||||
NSMutableArray *contactFolders;
|
||||
|
||||
contactFolders = [[[context activeUser] homeFolderInContext: context]
|
||||
lookupName: @"Contacts"
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
|
||||
folders = [NSMutableArray arrayWithArray: [contactFolders subFolders]];
|
||||
|
||||
int i, count;
|
||||
|
||||
count = [folders count]-1;
|
||||
|
||||
// Inside this loop we remove all the public or shared addressbooks
|
||||
for (count; count >= 0; count--)
|
||||
{
|
||||
if (![[folders objectAtIndex: count] isKindOfClass: [SOGoContactGCSFolder class]])
|
||||
[folders removeObjectAtIndex: count];
|
||||
}
|
||||
|
||||
// Parse the objects in order to have only the displayName of the addressbooks to be displayed on the preferences interface
|
||||
NSMutableArray *availableAddressBooks = [NSMutableArray new];
|
||||
NSMutableArray *availableAddressBooksName = [NSMutableArray new];
|
||||
|
||||
count = [folders count]-1;
|
||||
for (i=0; i <= count ; i++) {
|
||||
[availableAddressBooks addObject:[[folders objectAtIndex:i] realNameInContainer]];
|
||||
[availableAddressBooksName addObject:[[folders objectAtIndex:i] displayName]];
|
||||
}
|
||||
|
||||
return availableAddressBooks;
|
||||
|
||||
}
|
||||
- (NSString *) itemAddressBookText
|
||||
{
|
||||
return [self labelForKey:[NSString stringWithFormat: item]];
|
||||
}
|
||||
|
||||
- (NSString *) userAddressBook
|
||||
{
|
||||
return [userDefaults selectedAddressBook];
|
||||
}
|
||||
|
||||
- (void) setUserAddressBook: (NSString *) newSelectedAddressBook
|
||||
{
|
||||
[userDefaults setSelectedAddressBook: newSelectedAddressBook];
|
||||
}
|
||||
|
||||
- (NSArray *) messageCheckList
|
||||
{
|
||||
NSArray *intervalsList;
|
||||
|
||||
Reference in new issue
Block a user