mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-09 10:25:08 +00:00
merge of 'a116eb415302838655699ddf23cdf5a3930aef29'
and 'a7e7282f1911ceaff2a7f4f96320407cba1085cc' Monotone-Parent: a116eb415302838655699ddf23cdf5a3930aef29 Monotone-Parent: a7e7282f1911ceaff2a7f4f96320407cba1085cc Monotone-Revision: d4ca3a4c3a9c4a3555eeb728fdf776d6f9615287 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-10-03T19:33:37 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -88,6 +88,8 @@
|
||||
- (SOGoComponentOccurence *) occurence: (iCalRepeatableEntityObject *) component;
|
||||
- (iCalRepeatableEntityObject *) newOccurenceWithID: (NSString *) recID;
|
||||
|
||||
- (void) snoozeAlarm: (unsigned int) minutes;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGOCALENDARCOMPONENT_H */
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
@@ -41,6 +42,7 @@
|
||||
#import <NGMime/NGMimeBodyPart.h>
|
||||
#import <NGMime/NGMimeMultipartBody.h>
|
||||
#import <NGMail/NGMimeMessage.h>
|
||||
#import <GDLContentStore/GCSFolder.h>
|
||||
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
@@ -1211,6 +1213,29 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence,
|
||||
return roles;
|
||||
}
|
||||
|
||||
- (void) snoozeAlarm: (unsigned int) minutes
|
||||
{
|
||||
NSDictionary *quickFields;
|
||||
GCSFolder *folder;
|
||||
unsigned int nextAlarm;
|
||||
|
||||
folder = [[self container] ocsFolder];
|
||||
if (!folder)
|
||||
{
|
||||
[self errorWithFormat:@"(%s): missing folder for fetch!",
|
||||
__PRETTY_FUNCTION__];
|
||||
return;
|
||||
}
|
||||
|
||||
nextAlarm = [[NSCalendarDate calendarDate] timeIntervalSince1970] + minutes * 60;
|
||||
quickFields = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: nextAlarm]
|
||||
forKey: @"c_nextalarm"];
|
||||
|
||||
[folder updateQuickFields: quickFields
|
||||
whereColumn: @"c_name"
|
||||
isEqualTo: nameInContainer];
|
||||
}
|
||||
|
||||
/* SOGoComponentOccurence protocol */
|
||||
|
||||
- (iCalRepeatableEntityObject *) occurence
|
||||
|
||||
@@ -242,8 +242,7 @@
|
||||
NSString *webstatus;
|
||||
|
||||
anAlarm = [[self alarms] objectAtIndex: 0];
|
||||
if ([[anAlarm action] caseInsensitiveCompare: @"DISPLAY"]
|
||||
== NSOrderedSame)
|
||||
if ([[anAlarm action] caseInsensitiveCompare: @"DISPLAY"] == NSOrderedSame)
|
||||
{
|
||||
webstatus = [[anAlarm trigger] value: 0 ofAttribute: @"x-webstatus"];
|
||||
if (!webstatus
|
||||
|
||||
Reference in New Issue
Block a user