Subversion Repositories TruePreview

[/] [trunk/] [Source/] [TruePreviewMessageViewer.m] - Diff between revs 14 and 23

Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | View Log

Rev 14 Rev 23
Line 51... Line 51...
  [self truePreviewReset];
  [self truePreviewReset];
  [[[self class] truePreviewTimers]
  [[[self class] truePreviewTimers]
    removeObjectForKey:[NSNumber numberWithUnsignedLong:(unsigned long)self]
    removeObjectForKey:[NSNumber numberWithUnsignedLong:(unsigned long)self]
  ];
  ];
  [self truePreviewDealloc];
  [self truePreviewDealloc];
 
}
 
 
 
- (void)truePreviewForwardAsAttachment:(id)inSender {
 
  id theMessage = [self currentDisplayedMessage];
 
 
 
  if ([theMessage isKindOfClass:NSClassFromString(@"LibraryMessage")]) {
 
    NSDictionary* theSettings = [theMessage truePreviewSettings];
 
   
 
    if ([[theSettings objectForKey:@"forward"] boolValue]) {
 
      [self truePreviewReset];
 
      [theMessage truePreviewMarkAsViewed];
 
    }
 
  }
 
 
 
  [self truePreviewForwardAsAttachment:inSender];
 
}
 
 
 
- (void)truePreviewForwardMessage:(id)inSender {
 
  id theMessage = [self currentDisplayedMessage];
 
 
 
  if ([theMessage isKindOfClass:NSClassFromString(@"LibraryMessage")]) {
 
    NSDictionary* theSettings = [theMessage truePreviewSettings];
 
   
 
    if ([[theSettings objectForKey:@"forward"] boolValue]) {
 
      [self truePreviewReset];
 
      [theMessage truePreviewMarkAsViewed];
 
    }
 
  }
 
 
 
  [self truePreviewForwardMessage:inSender];
}
}
 
 
- (void)truePreviewMarkAsRead:(id)inSender {
- (void)truePreviewMarkAsRead:(id)inSender {
  [self truePreviewReset];
  [self truePreviewReset];
  [self truePreviewMarkAsRead:inSender];
  [self truePreviewMarkAsRead:inSender];
}
}
 
 
- (void)truePreviewMarkAsUnread:(id)inSender {
- (void)truePreviewMarkAsUnread:(id)inSender {
  [self truePreviewReset];
  [self truePreviewReset];
  [self truePreviewMarkAsUnread:inSender];
  [self truePreviewMarkAsUnread:inSender];
 
}
 
 
 
- (void)truePreviewMessageNoLongerDisplayedInTextView:(NSNotification*)inNotification {
 
  [self truePreviewMessageNoLongerDisplayedInTextView:inNotification];
 
 
 
  // we receive notifications from all MessageContentControllers
 
  if ([inNotification object] != object_getIvar(self, class_getInstanceVariable([self class], "_contentController"))) {
 
    return;
 
  }
 
 
 
  [self truePreviewReset];
}
}
 
 
- (void)truePreviewMessageWasDisplayedInTextView:(NSNotification*)inNotification {
- (void)truePreviewMessageWasDisplayedInTextView:(NSNotification*)inNotification {
  [self truePreviewMessageWasDisplayedInTextView:inNotification];
  [self truePreviewMessageWasDisplayedInTextView:inNotification];
 
 
 
  // we receive notifications from all MessageContentControllers
 
  if ([inNotification object] != object_getIvar(self, class_getInstanceVariable([self class], "_contentController"))) {
 
    return;
 
  }
 
 
  id theMessage = [[inNotification userInfo] objectForKey:@"MessageKey"];
  id theMessage = [[inNotification userInfo] objectForKey:@"MessageKey"];
 
 
  if ([theMessage isKindOfClass:NSClassFromString(@"LibraryMessage")]) {
  if ([theMessage isKindOfClass:NSClassFromString(@"LibraryMessage")]) {
    NSDictionary* theSettings = [theMessage truePreviewSettings];
    NSDictionary* theSettings = [theMessage truePreviewSettings];
Line 99... Line 145...
          repeats:NO
          repeats:NO
        ]
        ]
      ];
      ];
    }
    }
   
   
    if ([[theSettings objectForKey:@"scroll"] boolValue]) {
    if (
 
      ![self isKindOfClass:NSClassFromString(@"SingleMessageViewer")]
 
      && [[theSettings objectForKey:@"scroll"] boolValue]
 
    ) {
      // listen for bounds change notification on the message's clip view
      // listen for bounds change notification on the message's clip view
      [[NSNotificationCenter defaultCenter]
      [[NSNotificationCenter defaultCenter]
       addObserver:self
        addObserver:self
       selector:@selector(truePreviewBoundsDidChange:)
        selector:@selector(truePreviewBoundsDidChange:)
       name:NSViewBoundsDidChangeNotification
        name:NSViewBoundsDidChangeNotification
       object:[[[[object_getIvar(self, class_getInstanceVariable([self class], "_contentController")) currentDisplay] contentView] enclosingScrollView] contentView]
        object:[[[[object_getIvar(self, class_getInstanceVariable([self class], "_contentController")) currentDisplay] contentView] enclosingScrollView] contentView]
       ];
      ];
    }    
    }    
  }
  }
}
}
 
 
- (void)truePreviewMessageNoLongerDisplayedInTextView:(NSNotification*)inNotification {
- (void)truePreviewReplyAllMessage:(id)inSender {
  [self truePreviewMessageNoLongerDisplayedInTextView:inNotification];
  id theMessage = [self currentDisplayedMessage];
  [self truePreviewReset];
 
 
  if ([theMessage isKindOfClass:NSClassFromString(@"LibraryMessage")]) {
 
    NSDictionary* theSettings = [theMessage truePreviewSettings];
 
   
 
    if ([[theSettings objectForKey:@"reply"] boolValue]) {
 
      [self truePreviewReset];
 
      [theMessage truePreviewMarkAsViewed];
 
    }
 
  }
 
 
 
  [self truePreviewReplyAllMessage:inSender];
 
}
 
 
 
- (void)truePreviewReplyMessage:(id)inSender {
 
  id theMessage = [self currentDisplayedMessage];
 
 
 
  if ([theMessage isKindOfClass:NSClassFromString(@"LibraryMessage")]) {
 
    NSDictionary* theSettings = [theMessage truePreviewSettings];
 
 
 
    if ([[theSettings objectForKey:@"reply"] boolValue]) {
 
      [self truePreviewReset];
 
      [theMessage truePreviewMarkAsViewed];
 
    }
 
  }
 
 
 
  [self truePreviewReplyMessage:inSender];
}
}
 
 
#pragma mark Accessors
#pragma mark Accessors
 
 
- (NSTimer*)truePreviewTimer {
- (NSTimer*)truePreviewTimer {