Subversion Repositories TruePreview

[/] [trunk/] [Source/] [TruePreviewLibraryMessage.m] - Diff between revs 17 and 23

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

Rev 17 Rev 23
Line 42... Line 42...
#pragma mark Instance methods
#pragma mark Instance methods
 
 
- (NSMutableDictionary*)truePreviewSettings {
- (NSMutableDictionary*)truePreviewSettings {
  NSMutableDictionary* theSettings = [NSMutableDictionary dictionaryWithObjectsAndKeys:
  NSMutableDictionary* theSettings = [NSMutableDictionary dictionaryWithObjectsAndKeys:
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewDelay"], @"delay",
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewDelay"], @"delay",
 
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewReply"], @"reply",
 
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewForward"], @"forward",
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewWindow"], @"window",
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewWindow"], @"window",
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewScroll"], @"scroll",
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewScroll"], @"scroll",
    nil
    nil
  ];
  ];
  NSMutableDictionary* theAccountSettings = [
  NSMutableDictionary* theAccountSettings = [
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewAccountSettings"]
    [[NSUserDefaults standardUserDefaults] objectForKey:@"TruePreviewAccountSettings"]
    objectForKey:[[self account] displayName]
    objectForKey:[[self account] displayName]
  ];
  ];
 
 
  if (theAccountSettings != nil) {
  if (theAccountSettings != nil) {
    for (id theKey in [NSArray arrayWithObjects:@"delay", @"window", @"scroll", nil]) {
    for (id theKey in [NSArray arrayWithObjects:@"delay", @"reply", @"forward", @"window", @"scroll", nil]) {
      id theValue = [theAccountSettings objectForKey:theKey];
      id theValue = [theAccountSettings objectForKey:theKey];
     
     
      if ((theValue != nil) && ([theValue intValue] != TRUEPREVIEW_DELAY_DEFAULT)) {
      if ((theValue != nil) && ([theValue intValue] != TRUEPREVIEW_DELAY_DEFAULT)) {
        [theSettings setObject:theValue forKey:theKey];
        [theSettings setObject:theValue forKey:theKey];
      }
      }