Mantis 139: dialog boxes of webcalendar

Monotone-Parent: fe1684747671de5019121d2155b79f89a2f376eb
Monotone-Revision: 525ded69698841a7e49b579ace037c3eca060d31

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-09-21T14:10:16
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert committed 2009-09-21 14:10:16 +00:00
1 parent 78cf07608f
commit facfdaadd3
17 files changed
+74 -3

No files matched your search

@@ -536,3 +536,4 @@ vtodo_class2 = "(Tarefa Confidencial)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Důvěrný úkol)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Vertrouwelijke taak)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Confidential task)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Tâche confidentielle)";
"Subscribe to a web calendar..." = "S'inscrire à un agenda en ligne...";
"URL of the Calendar" = "URL de l'agenda";
"Web Calendar" = "Calendrier web";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Vertrauliche Aufgabe)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Bizalmas feladat)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Attività confidenziale)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Confidential task)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
@@ -536,3 +536,4 @@ vtodo_class2 = "(Tarea confidencial)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";
+18 -3
View File
@@ -42,7 +42,7 @@
WOResponse *response;
SOGoWebAppointmentFolder *folder;
NSURL *url;
NSString *name;
NSString *name, *displayName;
NSMutableDictionary *rc;
int imported = 0;
@@ -53,7 +53,8 @@
url = [NSURL URLWithString: [r formValueForKey: @"url"]];
if (url)
{
[[self clientObject] newFolderWithName: @"Web Calendar"
displayName = [self displayNameForUrl: [r formValueForKey: @"url"]];
[[self clientObject] newFolderWithName: displayName
nameInContainer: &name];
[self saveUrl: url forCalendar: name];
folder = [[self clientObject] lookupName: name
@@ -65,7 +66,7 @@
if (imported >= 0)
{
[rc setObject: @"Web Calendar" forKey: @"displayname"];
[rc setObject: displayName forKey: @"displayname"];
[rc setObject: name forKey: @"name"];
}
else
@@ -82,6 +83,20 @@
return response;
}
- (NSString *) displayNameForUrl: (NSString *) calendarURL
{
NSString *rc, *tmp;
tmp = [calendarURL lastPathComponent];
if (tmp)
rc = [tmp stringByDeletingSuffix: @".ics"];
else
rc = [self labelForKey: @"Web Calendar"];
return rc;
}
- (void) saveUrl: (NSURL *) calendarURL
forCalendar: (NSString *) calendarName
{
+25
View File
@@ -172,6 +172,31 @@
[calendar setShowCalendarTasks: new];
}
- (NSString *) webCalendarURL
{
NSUserDefaults *settings;
NSMutableDictionary *calendarSettings;
NSMutableDictionary *webCalendars;
NSString *rc;
settings = [[context activeUser] userSettings];
calendarSettings = [settings objectForKey: @"Calendar"];
if (calendarSettings)
{
webCalendars = [calendarSettings objectForKey: @"WebCalendars"];
if (webCalendars)
rc = [webCalendars objectForKey: [calendar nameInContainer]];
}
return rc;
}
- (BOOL) isWebCalendar
{
return ([self webCalendarURL] != nil);
}
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
inContext: (WOContext*) context
{
@@ -536,3 +536,4 @@ vtodo_class2 = "(Tasg gyhoeddus)";
"Subscribe to a web calendar..." = "Subscribe to a web calendar...";
"URL of the Calendar" = "URL of the Calendar";
"Web Calendar" = "Web Calendar";