]> Dogcows Code - chaz/thecheat/blobdiff - AboutBoxController.m
update contact information and project URL
[chaz/thecheat] / AboutBoxController.m
index e499ef829bedddeb3d140007dc1a93ffe8f504b7..0c652fde23afe783dec2837081ef9bf9bf474fb6 100644 (file)
@@ -1,19 +1,16 @@
 
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Project:   The Cheat
-//
-// File:      AboutBoxController.m
-// Created:   Mon Nov 24 2003
-//
-// Copyright: 2003 Chaz McGarvey.  All rights reserved.
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/*
+ * The Cheat - The legendary universal game trainer for Mac OS X.
+ * http://www.brokenzipper.com/trac/wiki/TheCheat
+ *
+ * Copyright (c) 2003-2011, Charles McGarvey et al.
+ *
+ * Distributable under the terms and conditions of the 2-clause BSD
+ * license; see the file COPYING for the legal text of the license.
+ */
 
 #import "AboutBoxController.h"
 
-#include "cheat_shared.h"
-
-#import <Chaz/CMUpdateCheck.h>
-
 
 @implementation AboutBoxController
 
 
 - (void)windowDidLoad
 {
-       [nameVersionText setStringValue:[NSString stringWithFormat:@"%@ %@", [CMUpdateCheck appName], [CMUpdateCheck appVersion]]];
-       [aboutWindow center];
+       NSDictionary *attributes;
+       NSAttributedString *string;
+       
+       // set the version string
+       [ibNameVersionText setStringValue:[NSString stringWithFormat:@"Version %@", ChazAppVersion()]];
+       // set the built string
+       [ibDateText setStringValue:[NSString stringWithFormat:@"Built %@", [ChazAppBuildDate() description]]];
+       
+       // set the attributes for the website and email links
+       attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor blueColor], NSForegroundColorAttributeName,
+               [NSNumber numberWithBool:YES], NSUnderlineStyleAttributeName,
+               [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]], NSFontAttributeName, nil];
+       
+       string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
+       [ibWebsiteButton setAttributedTitle:string];
+       [string release];
+       string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
+       [ibEmailButton setAttributedTitle:string];
+       [string release];
+       
+       attributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSColor redColor], NSForegroundColorAttributeName,
+               [NSNumber numberWithBool:YES], NSUnderlineStyleAttributeName,
+               [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]], NSFontAttributeName, nil];
+       
+       string = [[NSAttributedString alloc] initWithString:[ibWebsiteButton title] attributes:attributes];
+       [ibWebsiteButton setAttributedAlternateTitle:string];
+       [string release];
+       string = [[NSAttributedString alloc] initWithString:[ibEmailButton title] attributes:attributes];
+       [ibEmailButton setAttributedAlternateTitle:string];
+       [string release];
+       
+       [[self window] center];
 }
 
-- (IBAction)launchWebsiteButton:(id)sender
+
+- (IBAction)ibWebsiteButton:(id)sender
 {
        LaunchWebsite();
 }
 
-- (IBAction)launchEmailButton:(id)sender
+- (IBAction)ibEmailButton:(id)sender
 {
        LaunchEmail();
 }
This page took 0.017775 seconds and 4 git commands to generate.