mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-12 00:38:51 +00:00
Monotone-Parent: f2fe2bb08a995eb4ae8043ab64aef1f18a8b3823
Monotone-Revision: d9282e066f50fa8c916a17d4f28da3eb6ffc1411 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-03-24T20:50:31 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user