From f69376cc824c5eecf9fadc078d16e486c97adb96 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 28 May 2007 13:16:51 +0000 Subject: [PATCH] Monotone-Parent: b96dba727aa69371c7559cd35197a0904e11b368 Monotone-Revision: 25301be77706f7c3801e36031343c4b9a772df83 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-28T13:16:51 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 ++++ UI/MailerUI/UIxMailListView.m | 51 ----------------------------------- 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9bfae31f0..c324a3569 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-05-28 Wolfgang Sourdeau + * UI/MailerUI/UIxMailListView.m ([-createFolderAction]): removed + method, replaced with a similar method in the new + UIxMailFolderAction class module. + ([-deleteFolderAction]): idem. + * UI/MailerUI/UIxMailFolderActions.m ([UIxMailFolderActions -createFolderAction]): new method implementing subfolder creation. ([UIxMailFolderActions -renameFolderAction]): new method diff --git a/UI/MailerUI/UIxMailListView.m b/UI/MailerUI/UIxMailListView.m index 8411b0e1b..f9eb19a21 100644 --- a/UI/MailerUI/UIxMailListView.m +++ b/UI/MailerUI/UIxMailListView.m @@ -579,57 +579,6 @@ static int attachmentFlagSize = 8096; return [self redirectToLocation:@"view"]; } -/* folder operations */ - -- (id) createFolderAction -{ - NSException *error; - NSString *folderName; - id client; - - folderName = [[[self context] request] formValueForKey:@"name"]; - if ([folderName length] == 0) { - error = [NSException exceptionWithHTTPStatus:400 /* Bad Request */ - reason:@"missing 'name' query parameter!"]; - return [self redirectToViewWithError:error]; - } - - if ((client = [self clientObject]) == nil) { - error = [NSException exceptionWithHTTPStatus:404 /* Not Found */ - reason:@"did not find mail folder"]; - return [self redirectToViewWithError:error]; - } - - if ((error = [[self clientObject] davCreateCollection:folderName - inContext:[self context]]) != nil) { - return [self redirectToViewWithError:error]; - } - - return [self redirectToLocation:[folderName stringByAppendingString:@"/"]]; -} - -- (id) deleteFolderAction -{ - NSException *error; - NSString *url; - id client; - - if ((client = [self clientObject]) == nil) { - error = [NSException exceptionWithHTTPStatus:404 /* Not Found */ - reason:@"did not find mail folder"]; - return [self redirectToViewWithError:error]; - } - - /* jump to parent folder afterwards */ - url = [[client container] baseURLInContext:[self context]]; - if (![url hasSuffix:@"/"]) url = [url stringByAppendingString:@"/"]; - - if ((error = [[self clientObject] delete]) != nil) - return [self redirectToViewWithError:error]; - - return [self redirectToLocation:url]; -} - @end /* UIxMailListView */