<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>English.lproj/AboutDialog.nib/classes.nib</filename>
    </added>
    <added>
      <filename>English.lproj/AboutDialog.nib/info.nib</filename>
    </added>
    <added>
      <filename>English.lproj/AboutDialog.nib/keyedobjects.nib</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -26,6 +26,9 @@
 /// Central controller. Reacts to incoming and outgoing messages, and uses the other classes to encrypt/decrypt these.
 @interface FiSHController : NSObject &lt;MVChatPlugin, FiSHKeyExchangerDelegate&gt;
 {
+   IBOutlet NSWindow *aboutWindow_;
+   IBOutlet NSTextField *aboutVersionField_;
+   
    FiSHKeyExchanger *keyExchanger_;
    FiSHBlowfish *blowFisher_;
    
@@ -33,4 +36,6 @@
    
    NSMutableDictionary *urlToConnectionCache_;
 }
+
+- (IBAction) showAboutWindow:(id)sender;
 @end</diff>
      <filename>FiSHController.h</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,8 @@ NSString *FiSHPreferEncCommand = @&quot;enableEnc&quot;;
 NSString *FiSHAvoidEncCommand = @&quot;disableEnc&quot;;
 // Command to override encryption for a single message
 NSString *FiSHOverrideEncCommand = @&quot;+p&quot;;
+// Command to print out FiSHys version.
+NSString *FiSHAboutFiSHyCommand = @&quot;aboutfishy&quot;;
 
 
 
@@ -66,6 +68,13 @@ NSString *FiSHOverrideEncCommand = @&quot;+p&quot;;
    if (self = [super init])
    {
       DLog(@&quot;Loading FiSHy.&quot;);
+      
+      // Prepare the About Window to use the version as specified in the main bundle
+      NSBundle *fishyBundle = [NSBundle bundleForClass:[self class]];
+      NSNib *aboutNib = [[[NSNib alloc] initWithNibNamed:@&quot;AboutDialog&quot; bundle:fishyBundle] autorelease];
+      [aboutNib instantiateNibWithOwner:self topLevelObjects:nil];
+      NSString *aboutVersion = [fishyBundle objectForInfoDictionaryKey:@&quot;CFBundleShortVersionString&quot;];
+      [aboutVersionField_ setStringValue:[NSString stringWithFormat:[aboutVersionField_ stringValue], aboutVersion]];
 
       keyExchanger_ = [[FiSHKeyExchanger alloc] initWithDelegate:self];
       urlToConnectionCache_ = [[NSMutableDictionary alloc] init];
@@ -95,7 +104,16 @@ NSString *FiSHOverrideEncCommand = @&quot;+p&quot;;
 }
 
 
+#pragma mark Action methods
+
+- (IBAction) showAboutWindow:(id)sender;
+{
+   [aboutWindow_ orderFront:sender];
+}
+
+
 #pragma mark FiSHKeyExchangerDelegate
+
 - (void)sendPrivateMessage:(NSString *)message to:(NSString *)receiver on:(id)connectionURL;
 {
    MVChatConnection *theConnection = [urlToConnectionCache_ objectForKey:connectionURL];
@@ -525,6 +543,11 @@ bail:
       return [self processEncryptionPreferenceCommandWithArguments:arguments toConnection:connection inDirectChatPanel:view pref:FiSHEncPrefPreferEncrypted];
    if ([command isCaseInsensitiveEqualToString:FiSHAvoidEncCommand])
       return [self processEncryptionPreferenceCommandWithArguments:arguments toConnection:connection inDirectChatPanel:view pref:FiSHEncPrefAvoidEncrypted];
+   if ([command isCaseInsensitiveEqualToString:FiSHAboutFiSHyCommand])
+   {
+      [self showAboutWindow:aView];
+      return YES;
+   }
    
    return NO;
 }</diff>
      <filename>FiSHController.m</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,7 @@
 /* Begin PBXBuildFile section */
 		8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
 		8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
+		D4391C3C0BAAD9A600C12ED9 /* AboutDialog.nib in Resources */ = {isa = PBXBuildFile; fileRef = D4391C3A0BAAD9A600C12ED9 /* AboutDialog.nib */; };
 		D4423DD90B84AE2B0039DCB9 /* FiSHBlowfish.mm in Sources */ = {isa = PBXBuildFile; fileRef = D4423DD80B84AE2B0039DCB9 /* FiSHBlowfish.mm */; };
 		D4423E190B84B8630039DCB9 /* fish.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4D8D8930B824922000FA9F8 /* fish.cpp */; };
 		D4423E1A0B84B8630039DCB9 /* dh1080.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4D8D8980B824922000FA9F8 /* dh1080.cpp */; };
@@ -83,6 +84,7 @@
 		8D5B49B6048680CD000E48DA /* FiSHy.plugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FiSHy.plugin; sourceTree = BUILT_PRODUCTS_DIR; };
 		8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; };
 		D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = &quot;&lt;absolute&gt;&quot;; };
+		D4391C3B0BAAD9A600C12ED9 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/AboutDialog.nib; sourceTree = &quot;&lt;group&gt;&quot;; };
 		D4423DD70B84AE2B0039DCB9 /* FiSHBlowfish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FiSHBlowfish.h; sourceTree = &quot;&lt;group&gt;&quot;; };
 		D4423DD80B84AE2B0039DCB9 /* FiSHBlowfish.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FiSHBlowfish.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
 		D4423E020B84B7DF0039DCB9 /* SHA256.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SHA256.c; sourceTree = &quot;&lt;group&gt;&quot;; };
@@ -167,6 +169,7 @@
 		089C167CFE841241C02AAC07 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				D4391C3A0BAAD9A600C12ED9 /* AboutDialog.nib */,
 				D4E2816C0B8D0E0F0095A792 /* READ ME.rtf */,
 				D4B700740B91F87900E6FF65 /* CHANGELOG.txt */,
 				D4BD4B070B8CD64A0016D3B9 /* LICENSE.txt */,
@@ -392,6 +395,7 @@
 				D4BD4B080B8CD64A0016D3B9 /* LICENSE.txt in Resources */,
 				D4B700750B91F87900E6FF65 /* CHANGELOG.txt in Resources */,
 				D4E84DE10BA8BAAE000FE317 /* Localizable.strings in Resources */,
+				D4391C3C0BAAD9A600C12ED9 /* AboutDialog.nib in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -411,7 +415,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /usr/bin/ruby;
-			shellScript = &quot;#! /usr/bin/ruby\n# \n# human_version_to_cfbundle_version.rb 1.0d1 (or 01000.00.01 ;-)\n#   Based on &lt;http://www.dribin.org/dave/blog/archives/2006/08/02/versioning_os_x_apps/&gt;\n#   Copyright (c) 2006 Jonathan 'Wolf' Rentzsch.\n#   Some rights reserved: &lt;http://creativecommons.org/licenses/by/2.0/&gt;\n#   Changes by Henning Kiel to make it work inside XCode Shell Phases by looking for an APPLICATION_VERSION variable, and\n#     replacing the computed value into the CFBundleVersion.\n#\n# A tool that generates CFVersionNumber+Launch Services-happy version numbers given a human version number.\n# For example, 1.2.3b4 =&gt; becomes 01020.32.04.\n# All information is encoded -- no information is lost. It's thus reversible, which this tool also does.\n\nclass VersionNumber\n  DEVELOPMENT = 'd'\n  ALPHA = 'a'\n  BETA = 'b'\n  FINAL_CANDIDATE = 'fc'\n  FINAL = ''\n  CFBUNDLEVERSION_MAP = {DEVELOPMENT=&gt;0,ALPHA=&gt;1,BETA=&gt;2,FINAL_CANDIDATE=&gt;3,FINAL=&gt;9}\n  def initialize(version_string)\n    # First try to match CFBundleVersion's format ('01031.08.04').\n    m = version_string.strip.match(/^(\\d\\d)(\\d\\d)(\\d\\.\\d)([01239])\\.(\\d\\d)$/)\n    if m.nil?\n      # Nope, try human-style ('1.3.10b4').\n      # Man, where's RCR 237 (Named capture) when I need it?\n      m = version_string.gsub(/\\s/,'').match(/^(\\d{1,2})(\\.(\\d{1,2}))?(\\.(\\d{1,2}))?((d|a|b|fc)(\\d{1,2}))?$/)\n      raise ArgumentError, \&quot;can't parse '#{version_string}'\&quot; if m.nil?\n      @major = $1.to_i\n      @minor = $3.to_i\n      @bug = $5.to_i\n      if $7.nil?\n        @stage = FINAL\n        @stageNum = 0\n      else\n        @stage = $7 # Kept as a string.\n        @stageNum = $8.to_i\n      end\n      @original_version_string_was_human = true\n    else\n      @major = $1.to_i\n      @minor = $2.to_i\n      @bug = $3.delete('.').to_i\n      @stage = CFBUNDLEVERSION_MAP.invert[$4.to_i]\n      @stageNum = $5.to_i\n      @original_version_string_was_human = false\n    end\n  end\n  def human_version\n    result = \&quot;#{@major}.#{@minor}\&quot;\n    result += \&quot;.#{@bug}\&quot; if @bug != 0\n    result += \&quot;#{@stage}\&quot;+\&quot;#{@stageNum}\&quot; if @stage != FINAL\n    result\n  end\n  alias to_s human_version\n  def cfbundle_version\n    result = sprintf('%02d%02d%02d%s.%02d',\n      @major.to_i,\n      @minor.to_i,\n      @bug.to_i,\n      CFBUNDLEVERSION_MAP[@stage],\n      @stageNum.to_i)\n    result.insert(5,'.') # Weird placement for the first decimal: it lands in the middle of the 2-digit bug number.\n  end\n  def other_version\n    @original_version_string_was_human ? cfbundle_version : human_version\n  end\nend\n\nif ENV['APPLICATION_VERSION']\n  lsVersionNumber = VersionNumber.new(ENV['APPLICATION_VERSION']).other_version\n  infoFilePath = ENV['BUILT_PRODUCTS_DIR']+'/'+ENV['WRAPPER_NAME']+'/Contents/Info.plist'\n  infoLineArray = IO.readlines(infoFilePath)\n  info = infoLineArray.join(\&quot;\&quot;)\n  newInfo = info.sub(/([\\t ]+&lt;key&gt;CFBundleVersion&lt;\\/key&gt;\\n[\\t ]+&lt;string&gt;).*?(&lt;\\/string&gt;)/, '\\1' + lsVersionNumber + '\\2')\n  infoFile = File.open(infoFilePath, 'w')\n  infoFile.puts(newInfo)\n  infoFile.close\nelse\n  puts 'Must be run from Xcode'\nend\n&quot;;
+			shellScript = &quot;#! /usr/bin/ruby\n# \n# human_version_to_cfbundle_version.rb 1.0d1 (or 01000.00.01 ;-)\n#   Based on &lt;http://www.dribin.org/dave/blog/archives/2006/08/02/versioning_os_x_apps/&gt;\n#   Copyright (c) 2006 Jonathan 'Wolf' Rentzsch.\n#   Some rights reserved: &lt;http://creativecommons.org/licenses/by/2.0/&gt;\n#   Changes by Henning Kiel to make it work inside XCode Shell Phases by looking for an APPLICATION_VERSION variable, and\n#     replacing the computed value into the CFBundleVersion.\n#\n# A tool that generates CFVersionNumber+Launch Services-happy version numbers given a human version number.\n# For example, 1.2.3b4 =&gt; becomes 01020.32.04.\n# All information is encoded -- no information is lost. It's thus reversible, which this tool also does.\n\nputs 'Set LS Version'\n\nclass VersionNumber\n  DEVELOPMENT = 'd'\n  ALPHA = 'a'\n  BETA = 'b'\n  FINAL_CANDIDATE = 'fc'\n  FINAL = ''\n  CFBUNDLEVERSION_MAP = {DEVELOPMENT=&gt;0,ALPHA=&gt;1,BETA=&gt;2,FINAL_CANDIDATE=&gt;3,FINAL=&gt;9}\n  def initialize(version_string)\n    # First try to match CFBundleVersion's format ('01031.08.04').\n    m = version_string.strip.match(/^(\\d\\d)(\\d\\d)(\\d\\.\\d)([01239])\\.(\\d\\d)$/)\n    if m.nil?\n      # Nope, try human-style ('1.3.10b4').\n      # Man, where's RCR 237 (Named capture) when I need it?\n      m = version_string.gsub(/\\s/,'').match(/^(\\d{1,2})(\\.(\\d{1,2}))?(\\.(\\d{1,2}))?((d|a|b|fc)(\\d{1,2}))?$/)\n      raise ArgumentError, \&quot;can't parse '#{version_string}'\&quot; if m.nil?\n      @major = $1.to_i\n      @minor = $3.to_i\n      @bug = $5.to_i\n      if $7.nil?\n        @stage = FINAL\n        @stageNum = 0\n      else\n        @stage = $7 # Kept as a string.\n        @stageNum = $8.to_i\n      end\n      @original_version_string_was_human = true\n    else\n      @major = $1.to_i\n      @minor = $2.to_i\n      @bug = $3.delete('.').to_i\n      @stage = CFBUNDLEVERSION_MAP.invert[$4.to_i]\n      @stageNum = $5.to_i\n      @original_version_string_was_human = false\n    end\n  end\n  def human_version\n    result = \&quot;#{@major}.#{@minor}\&quot;\n    result += \&quot;.#{@bug}\&quot; if @bug != 0\n    result += \&quot;#{@stage}\&quot;+\&quot;#{@stageNum}\&quot; if @stage != FINAL\n    result\n  end\n  alias to_s human_version\n  def cfbundle_version\n    result = sprintf('%02d%02d%02d%s.%02d',\n      @major.to_i,\n      @minor.to_i,\n      @bug.to_i,\n      CFBUNDLEVERSION_MAP[@stage],\n      @stageNum.to_i)\n    result.insert(5,'.') # Weird placement for the first decimal: it lands in the middle of the 2-digit bug number.\n  end\n  def other_version\n    @original_version_string_was_human ? cfbundle_version : human_version\n  end\nend\n\nif ENV['APPLICATION_VERSION']\n  lsVersionNumber = VersionNumber.new(ENV['APPLICATION_VERSION']).other_version\n  infoFilePath = ENV['BUILT_PRODUCTS_DIR']+'/'+ENV['WRAPPER_NAME']+'/Contents/Info.plist'\n  infoLineArray = IO.readlines(infoFilePath)\n  info = infoLineArray.join(\&quot;\&quot;)\n  newInfo = info.sub(/([\\t ]+&lt;key&gt;CFBundleVersion&lt;\\/key&gt;\\n[\\t ]+&lt;string&gt;).*?(&lt;\\/string&gt;)/, '\\1' + lsVersionNumber + '\\2')\n  infoFile = File.open(infoFilePath, 'w')\n  infoFile.puts(newInfo)\n  infoFile.close\nelse\n  puts 'Must be run from Xcode'\nend\n&quot;;
 		};
 		D4AA13600B812D3F00558C3A /* Remove Headers */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -440,7 +444,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = &quot;/usr/bin/perl -w&quot;;
-			shellScript = &quot;# Xcode auto-versioning script for Subversion\n# by Axel Andersson, modified by Daniel Jalkut to add\n# \&quot;--revision HEAD\&quot; to the svn info line, which allows\n# the latest revision to always be used.\n        \nuse strict;\n        \ndie \&quot;$0: Must be run from Xcode\&quot; unless $ENV{\&quot;BUILT_PRODUCTS_DIR\&quot;};\n        \n# Get the current subversion revision number and use it to set the CFBundleVersion value\nmy $REV = `$ENV{SUBVERSION_INSTALL_DIR}/svnversion -n ./`;\nmy $INFO = \&quot;$ENV{BUILT_PRODUCTS_DIR}/$ENV{WRAPPER_NAME}/Contents/Info.plist\&quot;;\n        \nmy $version = $REV;\n$version =~ s/([\\d]*:)(\\d+[M|S]*).*/$2/;\ndie \&quot;$0: No Subversion revision found\&quot; unless $version;\n        \nopen(FH, \&quot;$INFO\&quot;) or die \&quot;$0: $INFO: $!\&quot;;\nmy $info = join(\&quot;\&quot;, &lt;FH&gt;);\nclose(FH);\n        \n$info =~ s/([\\t ]+&lt;key&gt;CFBundleShortVersionString&lt;\\/key&gt;\\n[\\t ]+&lt;string&gt;).*?(&lt;\\/string&gt;)/$1$ENV{\&quot;APPLICATION_VERSION\&quot;} ($version)$2/;\n        \nopen(FH, \&quot;&gt;$INFO\&quot;) or die \&quot;$0: $INFO: $!\&quot;;\nprint FH $info;\nclose(FH);\n&quot;;
+			shellScript = &quot;# Xcode auto-versioning script for Subversion\n# by Axel Andersson, modified by Daniel Jalkut to add\n# \&quot;--revision HEAD\&quot; to the svn info line, which allows\n# the latest revision to always be used.\n\nprint \&quot;Set SVN revision\&quot;;\n\nuse strict;\n\ndie \&quot;$0: Must be run from Xcode\&quot; unless $ENV{\&quot;BUILT_PRODUCTS_DIR\&quot;};\n        \n# Get the current subversion revision number and use it to set the CFBundleVersion value\nmy $REV = `$ENV{SUBVERSION_INSTALL_DIR}/svnversion -n ./`;\nmy $INFO = \&quot;$ENV{BUILT_PRODUCTS_DIR}/$ENV{WRAPPER_NAME}/Contents/Info.plist\&quot;;\n        \nmy $version = $REV;\n$version =~ s/([\\d]*:)(\\d+[M|S]*).*/$2/;\ndie \&quot;$0: No Subversion revision found\&quot; unless $version;\n        \nopen(FH, \&quot;$INFO\&quot;) or die \&quot;$0: $INFO: $!\&quot;;\nmy $info = join(\&quot;\&quot;, &lt;FH&gt;);\nclose(FH);\n        \n$info =~ s/([\\t ]+&lt;key&gt;CFBundleShortVersionString&lt;\\/key&gt;\\n[\\t ]+&lt;string&gt;).*?(&lt;\\/string&gt;)/$1$ENV{\&quot;APPLICATION_VERSION\&quot;} ($version)$2/;\n        \nopen(FH, \&quot;&gt;$INFO\&quot;) or die \&quot;$0: $INFO: $!\&quot;;\nprint FH $info;\nclose(FH);\n&quot;;
 		};
 		D4E281530B8D06690095A792 /* Make Disk Image */ = {
 			isa = PBXShellScriptBuildPhase;
@@ -499,6 +503,14 @@
 			name = InfoPlist.strings;
 			sourceTree = &quot;&lt;group&gt;&quot;;
 		};
+		D4391C3A0BAAD9A600C12ED9 /* AboutDialog.nib */ = {
+			isa = PBXVariantGroup;
+			children = (
+				D4391C3B0BAAD9A600C12ED9 /* English */,
+			);
+			name = AboutDialog.nib;
+			sourceTree = &quot;&lt;group&gt;&quot;;
+		};
 		D4E84DDF0BA8BAAE000FE317 /* Localizable.strings */ = {
 			isa = PBXVariantGroup;
 			children = (</diff>
      <filename>FiSHy.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@
 	&lt;key&gt;CFBundlePackageType&lt;/key&gt;
 	&lt;string&gt;BNDL&lt;/string&gt;
 	&lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
-	&lt;string&gt;&lt;/string&gt;
+	&lt;string&gt;APPLICATION_VERSION plus SVN Revision&lt;/string&gt;
 	&lt;key&gt;CFBundleSignature&lt;/key&gt;
 	&lt;string&gt;????&lt;/string&gt;
 	&lt;key&gt;CFBundleVersion&lt;/key&gt;</diff>
      <filename>Info.plist</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6c652ef31c54a8bbafe1dc3f776df1012bed10bd</id>
    </parent>
  </parents>
  <author>
    <name>hkiel</name>
    <email>hkiel</email>
  </author>
  <url>http://github.com/hennk/fishy/commit/9b96c7bb93426ca723cb7767ac3db141d1e64386</url>
  <id>9b96c7bb93426ca723cb7767ac3db141d1e64386</id>
  <committed-date>2007-03-16T07:23:57-07:00</committed-date>
  <authored-date>2007-03-16T07:23:57-07:00</authored-date>
  <message>Fixed setting the SVN revision build phase. Apparently it doesn't like an empty field in the info.plist, so the ShortVersionString now contains some dummy text.

Added a /aboutFiSHy command, which displays a simple about dialog containing the version number, svn revision, gpl text and copyright notice.</message>
  <tree>d2dafb20c3da7e1f28ac703d4da53f0f3827c75d</tree>
  <committer>
    <name>hkiel</name>
    <email>hkiel</email>
  </committer>
</commit>
