Commit 782ce201 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* use the hard-coded authors and thanks lists instead of bundled files and...

* use the hard-coded authors and thanks lists instead of bundled files and incorporate [22938] for trunk
parent f54452de
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
NSString *o_credits_path; NSString *o_credits_path;
NSString *o_credits; NSString *o_credits;
NSString *o_thanks; NSString *o_thanks;
NSString *o_name_version;
NSString *o_copyright; NSString *o_copyright;
NSDictionary *o_info_dict; NSDictionary *o_info_dict;
CFBundleRef localInfoBundle; CFBundleRef localInfoBundle;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "intf.h" #include "intf.h"
#include "about.h" #include "about.h"
#include <vlc_intf_strings.h> #include <vlc_intf_strings.h>
#include <vlc_about.h>
#import <WebKit/WebKit.h> #import <WebKit/WebKit.h>
/***************************************************************************** /*****************************************************************************
...@@ -62,7 +63,7 @@ static VLAboutBox *_o_sharedInstance = nil; ...@@ -62,7 +63,7 @@ static VLAboutBox *_o_sharedInstance = nil;
{ {
NSString *o_name; NSString *o_name;
NSString *o_version; NSString *o_version;
NSString *o_thanks_path; NSString *o_platform;
/* Get the info dictionary (Info.plist) */ /* Get the info dictionary (Info.plist) */
o_info_dict = [[NSBundle mainBundle] infoDictionary]; o_info_dict = [[NSBundle mainBundle] infoDictionary];
...@@ -78,8 +79,11 @@ static VLAboutBox *_o_sharedInstance = nil; ...@@ -78,8 +79,11 @@ static VLAboutBox *_o_sharedInstance = nil;
/* Set the about box title */ /* Set the about box title */
[o_about_window setTitle:_NS("About VLC media player")]; [o_about_window setTitle:_NS("About VLC media player")];
/* Setup the version field */ #ifdef __powerpc__ || __ppc__ || __ppc64__
o_version = [o_info_dict objectForKey:@"CFBundleVersion"]; o_platform = @"PowerPC";
#else
o_platform = @"Intel";
#endif
/* setup the creator / revision field */ /* setup the creator / revision field */
if( VLC_Changeset() != "exported" ) if( VLC_Changeset() != "exported" )
...@@ -91,71 +95,14 @@ static VLAboutBox *_o_sharedInstance = nil; ...@@ -91,71 +95,14 @@ static VLAboutBox *_o_sharedInstance = nil;
_NS("Compiled by %s"), VLC_CompileBy()]]; _NS("Compiled by %s"), VLC_CompileBy()]];
/* Setup the nameversion field */ /* Setup the nameversion field */
o_name_version = [NSString stringWithFormat:@"Version %@", o_version]; [o_name_version_field setStringValue: [NSString stringWithFormat:@"Version %s (%@)", VLC_Version(), o_platform]];
[o_name_version_field setStringValue: o_name_version];
/* setup the authors and thanks field */
/* Setup our credits */ [o_credits_textview setString: [NSString stringWithFormat: @"%@\n\n\n\n%@\n%@\n\n%@",
o_credits_path = [[NSBundle mainBundle] pathForResource:@"AUTHORS" ofType:nil]; _NS(INTF_ABOUT_MSG),
o_credits = [[NSString alloc] initWithData: [NSData dataWithContentsOfFile: o_credits_path ] encoding:NSUTF8StringEncoding]; _NS("VLC was brought to you by:"),
[NSString stringWithUTF8String: psz_authors],
/* Parse the authors string */ [NSString stringWithUTF8String: psz_thanks]]];
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"];
while( ![o_scan_credits isAtEnd] )
{
NSString *o_person;
NSScanner *o_scan_person;
[o_scan_credits scanUpToString:@"N:" intoString: nil];
[o_scan_credits scanString:@"N:" intoString: nil];
[o_scan_credits scanUpToString:@"N:" intoString: &o_person];
o_scan_person = [NSScanner scannerWithString: o_person];
NSString *o_name;
NSString *o_email;
NSMutableString *o_jobs = [NSMutableString string];
NSString *o_next;
[o_scan_person scanUpToCharactersFromSet: o_stopSet intoString: &o_name];
[o_scan_person scanString:@"E:" intoString: nil];
[o_scan_person scanUpToCharactersFromSet: o_stopSet intoString: &o_email];
[o_scan_person scanUpToString:@"D:" intoString: &o_next];
[o_scan_person scanUpToString:@":" intoString: &o_next];
[o_scan_person scanString:@":" intoString: nil];
while ( [o_next characterAtIndex:[o_next length] - 1] == 'D' )
{
NSString *o_job;
[o_scan_person scanUpToCharactersFromSet: o_stopSet intoString: &o_job ];
[o_jobs appendFormat: @"%@, ", o_job];
[o_scan_person scanUpToString:@":" intoString: &o_next];
[o_scan_person scanString:@":" intoString: nil];
}
[o_outString appendFormat: @"%@ <%@>\n%@\n\n", o_name, o_email, o_jobs];
}
/* Parse the thanks string */
o_thanks_path = [[NSBundle mainBundle] pathForResource:@"THANKS" ofType:nil];
o_thanks = [[NSString alloc] initWithData: [NSData dataWithContentsOfFile:
o_thanks_path ] encoding:NSUTF8StringEncoding];
NSScanner *o_scan_thanks = [NSScanner scannerWithString: o_thanks];
[o_scan_thanks scanUpToCharactersFromSet: o_stopSet intoString: nil];
while( ![o_scan_thanks isAtEnd] )
{
NSString *o_person;
NSString *o_job;
[o_scan_thanks scanUpToString:@" - " intoString: &o_person];
[o_scan_thanks scanString:@" - " intoString: nil];
[o_scan_thanks scanUpToCharactersFromSet: o_stopSet intoString: &o_job];
[o_outString appendFormat: @"%@\n%@\n\n", o_person, o_job];
}
[o_credits_textview setString:o_outString];
/* Setup the copyright field */ /* Setup the copyright field */
o_copyright = [o_local_dict objectForKey:@"NSHumanReadableCopyright"]; o_copyright = [o_local_dict objectForKey:@"NSHumanReadableCopyright"];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment