diff --git a/ChangeLog b/ChangeLog index 8ccc98d20..8d7da08b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-09-28 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoMailFolder.m (-displayName): fixed accessor + to return the real folder name rather than the nameInContainer, + which is escaped and prefixed with "folder". + (-create): new method intented to align the operations on this + class to the ones in SOGoGCSFolder. + * SoObjects/Contacts/SOGoContactGCSEntry.m (-displayName): new accessor. diff --git a/SoObjects/Mailer/SOGoMailFolder.h b/SoObjects/Mailer/SOGoMailFolder.h index 1be729e49..5e18ad095 100644 --- a/SoObjects/Mailer/SOGoMailFolder.h +++ b/SoObjects/Mailer/SOGoMailFolder.h @@ -72,6 +72,8 @@ - (void) markForExpunge; - (void) expungeLastMarkedFolder; +- (BOOL) create; + - (NSException *) expunge; /* flags */ diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index e34323650..75f1a95b8 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -697,6 +697,25 @@ static NSString *defaultUserID = @"anyone"; return [[self imap4Connection] createMailbox:_name atURL:[self imap4URL]]; } +- (BOOL) create +{ + NSException *error; + BOOL rc; + + [self imap4Connection]; + error = [imap4 createMailbox: [self relativeImap4Name] + atURL: [container imap4URL]]; + if (error) + rc = NO; + else + { + [[imap4 client] subscribe: [self absoluteImap4Name]]; + rc = YES; + } + + return rc; +} + - (NSException *) delete { return [[self imap4Connection] deleteMailboxAtURL:[self imap4URL]]; @@ -1140,7 +1159,7 @@ static NSString *defaultUserID = @"anyone"; - (NSString *) displayName { - return [self nameInContainer]; + return [self relativeImap4Name]; } - (NSDictionary *) davIMAPFieldsTable