mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Monotone-Parent: 2fdf0ead0781ef2362dd389811d5db44ca4cc84a
Monotone-Revision: c91eef7edcfd08d414664c25a590b6268a7e58e2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-29T04:19:32 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -27,15 +27,34 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||
#import <SoObjects/Appointments/SOGoWebAppointmentFolder.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolders.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
#import <Appointments/SOGoWebAppointmentFolder.h>
|
||||
#import <Appointments/SOGoAppointmentFolders.h>
|
||||
|
||||
#import "UIxCalMainActions.h"
|
||||
|
||||
@implementation UIxCalMainActions
|
||||
|
||||
- (NSString *) displayNameForUrl: (NSString *) calendarURL
|
||||
{
|
||||
NSString *rc, *tmp;
|
||||
|
||||
tmp = [calendarURL lastPathComponent];
|
||||
if (tmp)
|
||||
{
|
||||
if ([[tmp pathExtension] caseInsensitiveCompare: @"ics"] == NSOrderedSame)
|
||||
rc = [tmp substringToIndex: [tmp length] - 4];
|
||||
else
|
||||
rc = tmp;
|
||||
}
|
||||
else
|
||||
rc = [self labelForKey: @"Web Calendar"];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (WOResponse *) addWebCalendarAction
|
||||
{
|
||||
WORequest *r;
|
||||
@@ -85,29 +104,10 @@
|
||||
return response;
|
||||
}
|
||||
|
||||
- (NSString *) displayNameForUrl: (NSString *) calendarURL
|
||||
{
|
||||
NSString *rc, *tmp;
|
||||
|
||||
tmp = [calendarURL lastPathComponent];
|
||||
if (tmp)
|
||||
{
|
||||
if ([[tmp pathExtension] caseInsensitiveCompare: @"ics"] == NSOrderedSame)
|
||||
rc = [tmp substringToIndex: [tmp length] - 4];
|
||||
else
|
||||
rc = tmp;
|
||||
}
|
||||
else
|
||||
rc = [self labelForKey: @"Web Calendar"];
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (void) saveUrl: (NSURL *) calendarURL
|
||||
forCalendar: (NSString *) calendarName
|
||||
{
|
||||
NSUserDefaults *settings;
|
||||
SOGoUserSettings *settings;
|
||||
NSMutableDictionary *calSettings, *webCalendars;
|
||||
|
||||
settings = [[context activeUser] userSettings];
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
- (WOResponse *) reloadWebCalendarsAction
|
||||
{
|
||||
NSUserDefaults *settings;
|
||||
SOGoUserSettings *settings;
|
||||
NSMutableDictionary *calSettings, *webCalendars;
|
||||
NSArray *calendarIds;
|
||||
SOGoWebAppointmentFolder *folder;
|
||||
@@ -154,6 +154,4 @@
|
||||
return [self responseWith204];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user