]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/about.m
Remove the deprecated vlc_atomic_t type.
[vlc] / modules / gui / macosx / about.m
index 677170868f3259cb42f18b576dcfce159af9b3af..34447992e676e396e7ea4e717ede342f087adfc8 100644 (file)
@@ -88,8 +88,20 @@ static VLAboutBox *_o_sharedInstance = nil;
         /* Setup the copyright field */
         [o_copyright_field setStringValue: [o_local_dict objectForKey:@"NSHumanReadableCopyright"]];
 
-        /* Set the box title */
+        /* l10n */
         [o_about_window setTitle: _NS("About VLC media player")];
+        NSDictionary *stringAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:NSUnderlineStyleSingle], NSUnderlineStyleAttributeName, [NSColor colorWithCalibratedRed:0. green:0.3411 blue:0.6824 alpha:1.], NSForegroundColorAttributeName, [NSFont systemFontOfSize:13], NSFontAttributeName, nil];
+        NSAttributedString *attrStr;
+        attrStr = [[NSAttributedString alloc] initWithString:_NS("Credits") attributes:stringAttributes];
+        [o_credits_btn setAttributedTitle:attrStr];
+        [attrStr release];
+        attrStr = [[NSAttributedString alloc] initWithString:_NS("License") attributes:stringAttributes];
+        [o_gpl_btn setAttributedTitle:attrStr];
+        [attrStr release];
+        attrStr = [[NSAttributedString alloc] initWithString:_NS("Authors") attributes:stringAttributes];
+        [o_authors_btn setAttributedTitle:attrStr];
+        [attrStr release];
+        [o_trademarks_txt setStringValue:_NS("VLC media player and VideoLAN are trademarks of the VideoLAN Association.")];
 
         /* setup the creator / revision field */
         NSString *compiler;
@@ -105,7 +117,7 @@ static VLAboutBox *_o_sharedInstance = nil;
         /* Setup the nameversion field */
         [o_name_version_field setStringValue: [NSString stringWithFormat:@"Version %s (%s)", VERSION_MESSAGE, PLATFORM]];
 
-        NSMutableArray *tmpArray = [NSMutableArray arrayWithArray: [[NSString stringWithUTF8String: psz_authors]componentsSeparatedByString:@"\n\n"]];
+        NSMutableArray *tmpArray = [NSMutableArray arrayWithArray: [[NSString stringWithUTF8String:psz_authors] componentsSeparatedByString:@"\n\n"]];
         NSUInteger count = [tmpArray count];
         for (NSUInteger i = 0; i < count; i++) {
             [tmpArray replaceObjectAtIndex:i withObject:[[tmpArray objectAtIndex:i]stringByReplacingOccurrencesOfString:@"\n" withString:@", "]];
@@ -117,13 +129,16 @@ static VLAboutBox *_o_sharedInstance = nil;
         [o_authors retain];
 
         /* setup join us! */
-        NSString *joinus = [NSString stringWithString:_NS("<p>VLC media player is a free and open source media player, encoder and streamer made by the volunteers of the "
-                               "<a href=\"http://www.videolan.org/\"><span style=\" text-decoration: underline; color:#0057ae;\">VideoLAN</span>"
-                               "</a> community.</p><p>VLC uses its internal codecs and works on essentially every popular platform and can read"
-                               "almost every files, CDs, DVDs, network streams, capture cards and other media formats!</p><p>"
-                               "<a href=\"http://www.videolan.org/contribute/\"><span style=\" text-decoration: underline; color:#0057ae;\">Help "
-                               "and join us!</span></a>")];
-        NSAttributedString *joinus_readytorender = [[NSAttributedString alloc] initWithHTML:[joinus dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES] documentAttributes:NULL];
+        NSString *joinus = [NSString stringWithUTF8String:_(""
+                                                            "<p>VLC media player is a free and open source media player, encoder, and "
+                                                            "streamer made by the volunteers of the <a href=\"http://www.videolan.org/"
+                                                            "\"><span style=\" text-decoration: underline; color:#0057ae;\">VideoLAN</"
+                                                            "span></a> community.</p><p>VLC uses its internal codecs, works on "
+                                                            "essentially every popular platform, and can read almost all files, CDs, "
+                                                            "DVDs, network streams, capture cards and other media formats!</p><p><a href="
+                                                            "\"http://www.videolan.org/contribute/\"><span style=\" text-decoration: "
+                                                            "underline; color:#0057ae;\">Help and join us!</span></a>")];
+        NSAttributedString *joinus_readytorender = [[NSAttributedString alloc] initWithHTML:[joinus dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES] options:[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:NSUTF8StringEncoding] forKey:NSCharacterEncodingDocumentOption] documentAttributes:NULL];
         [o_joinus_txt setAllowsEditingTextAttributes: YES];
         [o_joinus_txt setSelectable: YES];
         [o_joinus_txt setAttributedStringValue:joinus_readytorender];
@@ -137,7 +152,7 @@ static VLAboutBox *_o_sharedInstance = nil;
         [o_about_window setExcludedFromWindowsMenu:YES];
         [o_about_window setMenu:nil];
         [o_about_window center];
-        [o_gpl_btn setTitle: _NS("License")];
+        [o_about_window setBackgroundColor: [NSColor colorWithCalibratedWhite:.96 alpha:1.]];
 
         if (config_GetInt(VLCIntf, "macosx-icon-change")) {
             /* After day 354 of the year, the usual VLC cone is replaced by another cone
@@ -224,9 +239,9 @@ static VLAboutBox *_o_sharedInstance = nil;
     if (sender == o_authors_btn)
         [o_credits_textview setString:o_authors];
     else if (sender == o_credits_btn)
-        [o_credits_textview setString:[[NSString stringWithUTF8String: psz_thanks] stringByReplacingOccurrencesOfString:@"\n" withString:@" " options:0 range:NSRangeFromString(@"680 2")]];
+        [o_credits_textview setString:[[NSString stringWithUTF8String:psz_thanks] stringByReplacingOccurrencesOfString:@"\n" withString:@" " options:0 range:NSRangeFromString(@"680 2")]];
     else
-        [o_credits_textview setString:[NSString stringWithUTF8String: psz_license]];
+        [o_credits_textview setString:[NSString stringWithUTF8String:psz_license]];
 
     [o_credits_textview scrollPoint:NSMakePoint(0, 0)];
     b_restart = YES;
@@ -243,7 +258,7 @@ static VLAboutBox *_o_sharedInstance = nil;
     [o_credits_textview setHidden:NO];
     [o_joinus_txt setHidden:YES];
 
-    [o_credits_textview setString:[NSString stringWithUTF8String: psz_license]];
+    [o_credits_textview setString:[NSString stringWithUTF8String:psz_license]];
 
     [o_credits_textview scrollPoint:NSMakePoint(0, 0)];
     b_restart = YES;