/*****************************************************************************
* about.m: MacOS X About Panel
*****************************************************************************
- * Copyright (C) 2001-2003 VideoLAN
- * $Id: about.m,v 1.2 2003/05/11 23:17:30 hartman Exp $
+ * Copyright (C) 2001-2005 the VideoLAN team
+ * $Id$
*
* Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
return _o_sharedInstance;
}
-- (IBAction)showPanel:(id)sender
+- (void)showPanel
{
if (!o_credits_path)
{
NSString *o_name;
NSString *o_version;
NSString *o_thanks_path;
-
+
/* Get the info dictionary (Info.plist) */
o_info_dict = [[NSBundle mainBundle] infoDictionary];
/* Setup the version field */
o_version = [o_info_dict objectForKey:@"CFBundleVersion"];
+
+ /* setup the creator / revision field */
+ if( VLC_Changeset() != "exported" )
+ [o_revision_field setStringValue: [NSString stringWithFormat: \
+ _NS("Compiled by %s, based on SVN revision %s"), VLC_CompileBy(), \
+ VLC_Changeset()]];
+ else
+ [o_revision_field setStringValue: [NSString stringWithFormat: \
+ _NS("Compiled by %s"), VLC_CompileBy()]];
/* Setup the nameversion field */
- o_name_version = [NSString stringWithFormat:@"%@ - Version %@", o_name, o_version];
+ o_name_version = [NSString stringWithFormat:@"Version %@", o_version];
[o_name_version_field setStringValue: o_name_version];
/* Setup our credits */
o_credits_path = [[NSBundle mainBundle] pathForResource:@"AUTHORS" ofType:nil];
- o_credits = [[NSString alloc] initWithData: [NSData dataWithContentsOfFile: o_credits_path ] encoding:NSWindowsCP1252StringEncoding];
+ o_credits = [[NSString alloc] initWithData: [NSData dataWithContentsOfFile: o_credits_path ] encoding:NSUTF8StringEncoding];
/* Parse the authors string */
- NSMutableString *o_outString = [NSMutableString string];
+ NSMutableString *o_outString = [NSMutableString stringWithFormat: @"%@\n\n", _NS(INTF_ABOUT_MSG)];
NSScanner *o_scan_credits = [NSScanner scannerWithString: o_credits];
NSCharacterSet *o_stopSet = [NSCharacterSet characterSetWithCharactersInString:@"\n\r"];
/* Parse the thanks string */
o_thanks_path = [[NSBundle mainBundle] pathForResource:@"THANKS" ofType:nil];
o_thanks = [[NSString alloc] initWithData: [NSData dataWithContentsOfFile:
- o_thanks_path ] encoding:NSWindowsCP1252StringEncoding];
+ o_thanks_path ] encoding:NSUTF8StringEncoding];
NSScanner *o_scan_thanks = [NSScanner scannerWithString: o_thanks];
[o_scan_thanks scanUpToCharactersFromSet: o_stopSet intoString: nil];