merge of 'd75ed56bb85ad0c1c37621595267a590aa9b60db'
and 'dbc2fb47336e631355604e1c4273613997a2bb90' Monotone-Parent: d75ed56bb85ad0c1c37621595267a590aa9b60db Monotone-Parent: dbc2fb47336e631355604e1c4273613997a2bb90 Monotone-Revision: 8efad85108b102663bde58065393dff21ca233c4 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-10-13T01:29:13 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
0125ed5372
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,11 @@
|
|||
2011-10-13 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* Tools/SOGoToolUserPreferences.m (-run): added possibility to
|
||||
specify a file (-f filename) when setting a user
|
||||
default/setting. Removed the constraint of specifying
|
||||
administrative credentials of the SIeve server when not setting a
|
||||
parameter related to Sieve.
|
||||
|
||||
2011-10-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreAppointmentWrapper.m
|
||||
|
@ -48,6 +56,8 @@
|
|||
(-getPidLidReminderFileParameter:inMemCtx:): new alarm-related
|
||||
forwarders to homonymous methods in MAPIStoreAppointmentWrapper.
|
||||
|
||||
2011-10-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMailFolder.m (-synchroniseCache): improved
|
||||
method to only fetch non-deleted messages in part 1, and to
|
||||
automatically remove message records in part 2, so that we know
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
|
@ -61,8 +62,13 @@ typedef enum
|
|||
|
||||
- (void) usage
|
||||
{
|
||||
fprintf (stderr, "user-preferences get|set|unset defaults|settings user [authname:authpassword] key value\n\n"
|
||||
" user the user of whom to set the defaults/settings key/value\n");
|
||||
fprintf (stderr, "user-preferences get|set|unset defaults|settings user [authname:authpassword] key [value|-f filename]\n\n"
|
||||
" user the user of whom to set the defaults/settings key/value\n"
|
||||
" value the JSON-formatted value of the key\n\n"
|
||||
" Examples:\n"
|
||||
" sogo-tool user-preferences get defaults janedoe SOGoLanguage\n"
|
||||
" sogo-tool user-preferences unset settings janedoe Mail\n"
|
||||
" sogo-tool user-preferences set defaults janedoe SOGoTimeFormat '{\"SOGoTimeFormat\":\"%%I:%%M %%p\"}'\n");
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -164,7 +170,9 @@ typedef enum
|
|||
else
|
||||
{
|
||||
NSString *authname, *authpwd, *value;
|
||||
|
||||
NSData *data;
|
||||
int i;
|
||||
|
||||
authname = @"";
|
||||
authpwd = @"";
|
||||
value = @"";
|
||||
|
@ -172,12 +180,34 @@ typedef enum
|
|||
if (max > 4)
|
||||
{
|
||||
r = [[arguments objectAtIndex: 3] rangeOfString: @":"];
|
||||
authname = [[arguments objectAtIndex: 3] substringToIndex: r.location];
|
||||
authpwd = [[arguments objectAtIndex: 3] substringFromIndex: r.location+1];
|
||||
key = [arguments objectAtIndex: 4];
|
||||
|
||||
if (max > 5)
|
||||
value = [arguments objectAtIndex: 5];
|
||||
if (r.location == NSNotFound)
|
||||
{
|
||||
i = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
authname = [[arguments objectAtIndex: 3] substringToIndex: r.location];
|
||||
authpwd = [[arguments objectAtIndex: 3] substringFromIndex: r.location+1];
|
||||
i = 4;
|
||||
}
|
||||
|
||||
key = [arguments objectAtIndex: i++];
|
||||
value = [arguments objectAtIndex: i++];
|
||||
|
||||
if (max > i)
|
||||
{
|
||||
if ([value caseInsensitiveCompare: @"-f"] == NSOrderedSame)
|
||||
{
|
||||
if (max > i)
|
||||
{
|
||||
data = [NSData dataWithContentsOfFile: [arguments objectAtIndex: i]];
|
||||
value = [[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding];
|
||||
[value autorelease];
|
||||
}
|
||||
}
|
||||
else
|
||||
value = [arguments objectAtIndex: i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue