From b32ac59e21a607fcb335b44e83abc8c184722b50 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 20 Sep 2006 21:38:48 +0000 Subject: [PATCH] Monotone-Parent: 4ada043f711dccb4b52526f8e7a63883fef5b173 Monotone-Revision: 88bc4b91cbdc12f93b03cf7a821e80e3b5cb523b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-20T21:38:48 Monotone-Branch: ca.inverse.sogo --- UI/MailerUI/UIxMailView.m | 50 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/UI/MailerUI/UIxMailView.m b/UI/MailerUI/UIxMailView.m index 9e5731ab8..26142d93d 100644 --- a/UI/MailerUI/UIxMailView.m +++ b/UI/MailerUI/UIxMailView.m @@ -67,52 +67,49 @@ static NSString *mailETag = nil; } - (void)dealloc { - [self->currentAddress release]; [super dealloc]; } -/* notifications */ - -- (void)sleep { - [self->currentAddress release]; self->currentAddress = nil; - [super sleep]; -} - /* accessors */ -- (void)setCurrentAddress:(id)_addr { - ASSIGN(self->currentAddress, _addr); -} -- (id)currentAddress { - return self->currentAddress; +- (void) setCurrentAddress: (id) _addr +{ + currentAddress = _addr; } -- (NSString *)objectTitle { +- (id) currentAddress +{ + return currentAddress; +} + +- (NSString *) objectTitle +{ return [[self clientObject] subject]; } -- (NSString *)panelTitle { - NSString *s; - - s = [self labelForKey:@"View Mail"]; - s = [s stringByAppendingString:@": "]; - s = [s stringByAppendingString:[self objectTitle]]; - return s; + +- (NSString *) panelTitle +{ + return [NSString stringWithFormat: @"%@: %@", + [self labelForKey: @"View Mail"], + [self objectTitle]]; } /* expunge / delete setup and permissions */ -- (BOOL)isTrashingAllowed { +- (BOOL) isTrashingAllowed +{ id trash; trash = [[[self clientObject] mailAccountFolder] - trashFolderInContext:[self context]]; + trashFolderInContext:[self context]]; if ([trash isKindOfClass:[NSException class]]) return NO; - + return [trash isWriteAllowed]; } -- (BOOL)showMarkDeletedButton { +- (BOOL) showMarkDeletedButton +{ // TODO: we might also want to add a default to always show delete if (![[self clientObject] isDeletionAllowed]) return NO; @@ -120,7 +117,8 @@ static NSString *mailETag = nil; return [self isTrashingAllowed] ? NO : YES; } -- (BOOL)showTrashButton { +- (BOOL) showTrashButton +{ if (![[self clientObject] isDeletionAllowed]) return NO;