merge of 'c5a0687be6e6c2cb000143fcd5eeaaf90730097d'
and 'd9282e066f50fa8c916a17d4f28da3eb6ffc1411' Monotone-Parent: c5a0687be6e6c2cb000143fcd5eeaaf90730097d Monotone-Parent: d9282e066f50fa8c916a17d4f28da3eb6ffc1411 Monotone-Revision: 3e59e0c43d322ac5fbc4016256ca84d3ea3a48f4 Monotone-Author: flachapelle@inverse.ca Monotone-Author: ludovic@Sophos.ca Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-03-24T20:51:43 Monotone-Date: 2009-03-24T20:52:59 Monotone-Date: 2009-03-24T20:56:17 Monotone-Branch: ca.inverse.sogo Monotone-Branch: ca.inverse.sogo Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
279d87a2bd
|
@ -1,5 +1,9 @@
|
|||
2009-03-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
|
||||
-takeValuesFromRequest:_rqinContext:_ctx]): ensure the values
|
||||
meant to construct the custom recurrence rule are consistent.
|
||||
|
||||
* UI/Scheduler/UIxCalMainView.m: if the module settings key
|
||||
exists, do not reset it.
|
||||
|
||||
|
|
|
@ -1438,19 +1438,22 @@ RANGE(2);
|
|||
//
|
||||
case 0:
|
||||
{
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceDaily];
|
||||
if ([[self repeat2] intValue] > 0)
|
||||
{
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceDaily];
|
||||
|
||||
if ([[self repeat1] intValue] == 0)
|
||||
{
|
||||
[theRule setInterval: [self repeat2]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[theRule setByDayMask: (iCalWeekDayMonday
|
||||
|iCalWeekDayTuesday
|
||||
|iCalWeekDayWednesday
|
||||
|iCalWeekDayThursday
|
||||
|iCalWeekDayFriday)];
|
||||
if ([[self repeat1] intValue] == 0)
|
||||
{
|
||||
[theRule setInterval: [self repeat2]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[theRule setByDayMask: (iCalWeekDayMonday
|
||||
|iCalWeekDayTuesday
|
||||
|iCalWeekDayWednesday
|
||||
|iCalWeekDayThursday
|
||||
|iCalWeekDayFriday)];
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1465,20 +1468,23 @@ RANGE(2);
|
|||
// The list is separated by commas, like: 1,3,4
|
||||
case 1:
|
||||
{
|
||||
NSArray *v;
|
||||
int c, mask;
|
||||
if ([[self repeat1] intValue] > 0)
|
||||
{
|
||||
NSArray *v;
|
||||
int c, mask;
|
||||
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceWeekly];
|
||||
[theRule setInterval: [self repeat1]];
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceWeekly];
|
||||
[theRule setInterval: [self repeat1]];
|
||||
|
||||
v = [[self repeat2] componentsSeparatedByString: @","];
|
||||
c = [v count];
|
||||
mask = 0;
|
||||
v = [[self repeat2] componentsSeparatedByString: @","];
|
||||
c = [v count];
|
||||
mask = 0;
|
||||
|
||||
while (c--)
|
||||
mask |= 1 << ([[v objectAtIndex: c] intValue]);
|
||||
while (c--)
|
||||
mask |= 1 << ([[v objectAtIndex: c] intValue]);
|
||||
|
||||
[theRule setByDayMask: mask];
|
||||
[theRule setByDayMask: mask];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1504,17 +1510,21 @@ RANGE(2);
|
|||
//
|
||||
case 2:
|
||||
{
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceMonthly];
|
||||
[theRule setInterval: [self repeat1]];
|
||||
if ([[self repeat1] intValue] > 0)
|
||||
{
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceMonthly];
|
||||
[theRule setInterval: [self repeat1]];
|
||||
|
||||
// We recur on specific days...
|
||||
if ([[self repeat2] intValue] == 1)
|
||||
{
|
||||
[theRule setNamedValue: @"bymonthday" to: [self repeat5]];
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
// We recur on specific days...
|
||||
if ([[self repeat2] intValue] == 1
|
||||
&& [[self repeat5] intValue] > 0)
|
||||
{
|
||||
[theRule setNamedValue: @"bymonthday" to: [self repeat5]];
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1538,19 +1548,27 @@ RANGE(2);
|
|||
case 3:
|
||||
default:
|
||||
{
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceYearly];
|
||||
[theRule setInterval: [self repeat1]];
|
||||
if ([[self repeat1] intValue] > 0)
|
||||
{
|
||||
[theRule setFrequency: iCalRecurrenceFrequenceYearly];
|
||||
[theRule setInterval: [self repeat1]];
|
||||
|
||||
// We recur Every .. of ..
|
||||
if ([[self repeat2] intValue] == 1)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
else
|
||||
{
|
||||
[theRule setNamedValue: @"bymonthday" to: [self repeat3]];
|
||||
[theRule setNamedValue: @"bymonth"
|
||||
to: [NSString stringWithFormat: @"%d", ([[self repeat4] intValue]+1)]];
|
||||
// We recur Every .. of ..
|
||||
if ([[self repeat2] intValue] == 1)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([[self repeat3] intValue] > 0
|
||||
&& [[self repeat4] intValue] > 0)
|
||||
{
|
||||
[theRule setNamedValue: @"bymonthday"
|
||||
to: [self repeat3]];
|
||||
[theRule setNamedValue: @"bymonth"
|
||||
to: [NSString stringWithFormat: @"%d", ([[self repeat4] intValue]+1)]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue