]> git.sesse.net Git - vlc/commitdiff
* display the GPL in a separate window linked in the About window and the Help menu...
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 5 Dec 2007 16:25:41 +0000 (16:25 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 5 Dec 2007 16:25:41 +0000 (16:25 +0000)
extras/MacOSX/Resources/English.lproj/About.nib/classes.nib
extras/MacOSX/Resources/English.lproj/About.nib/info.nib
extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
modules/gui/macosx/about.h
modules/gui/macosx/about.m
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m

index d1002e2f1dc249c003c47977df12221ebce7175f..d2f98b633dbce65c9f408c647173b3805db308fe 100644 (file)
@@ -3,6 +3,7 @@
         {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
         {CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; }, 
         {
+            ACTIONS = {showGPL = id; }; 
             CLASS = VLAboutBox; 
             LANGUAGE = ObjC; 
             OUTLETS = {
                 "o_copyright_field" = id; 
                 "o_credits_scrollview" = id; 
                 "o_credits_textview" = id; 
+                "o_gpl_btn" = id; 
+                "o_gpl_field" = id; 
+                "o_gpl_window" = id; 
                 "o_help_web_view" = id; 
                 "o_help_window" = id; 
+                "o_name_field" = id; 
                 "o_name_version_field" = id; 
                 "o_revision_field" = id; 
             }; 
index 39174cc5ffd6c1d0f1b6f7f84571fa7b2cfb1e47..bc51bafec2ce1ca04d5991e87f77be705ab828c3 100644 (file)
        <array/>
        <key>IBOpenObjects</key>
        <array>
-               <integer>1345</integer>
                <integer>2239</integer>
+               <integer>1345</integer>
+               <integer>2245</integer>
        </array>
        <key>IBSystem Version</key>
-       <string>8R3032</string>
+       <string>8S2167</string>
 </dict>
 </plist>
index d85cdd4abd9e22c27a509d35383e9bcd59ffa4a4..a5a5b3e2d3480095da1831ba53681f1635525ff5 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib and b/extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib differ
index 4fc386f68c5f9297f386056cddea2d2376eb9ace..3be064b011928c9d63858b7fb9578356b77a925b 100644 (file)
                 openWebsite = id; 
                 showBookmarks = id; 
                 showExtended = id; 
+                showLicense = id; 
                 showMessagesPanel = id; 
                 showSFilters = id; 
                 showWizard = id; 
                 "o_dmi_stop" = id; 
                 "o_embedded_window" = id; 
                 "o_info" = id; 
+                "o_license_mi" = id; 
                 "o_main_pgbar" = id; 
                 "o_messages" = id; 
                 "o_mi_about" = id; 
index de226787e87827b365f48fac281d27dc5e22c184..4ee97cfcfe64388a42d7c8001682e6a7905fcaa2 100644 (file)
        <key>IBOpenObjects</key>
        <array>
                <integer>21</integer>
-               <integer>2416</integer>
                <integer>2769</integer>
-               <integer>2730</integer>
-               <integer>1789</integer>
+               <integer>2416</integer>
                <integer>29</integer>
+               <integer>1789</integer>
+               <integer>2730</integer>
        </array>
        <key>IBSystem Version</key>
        <string>8S2167</string>
index 93d1223fc7febd50969293f1f17e3e02e0dfd21c..fcc94511b380dad007141ef6c3e283f1a245bccd 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ
index c5b6a15121a1ad3faaf0a1a2ebab06ef1e3dbc50..7ef8f44aab826b2b37b97c72d026a03b8617c165 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
  * about.h: MacOS X About Panel
  *****************************************************************************
- * Copyright (C) 2001-2005 the VideoLAN team
+ * Copyright (C) 2001-2007 the VideoLAN team
  * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
+ *          Felix Paul K\9fhne <fkuehne -at- videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
     IBOutlet id o_copyright_field;
     IBOutlet id o_credits_textview;
     IBOutlet id o_credits_scrollview;
+    IBOutlet id o_gpl_btn;
+    IBOutlet id o_name_field;
 
     NSTimer *o_scroll_timer;
     float f_current;
     float f_end;
     NSTimeInterval i_start;
     BOOL b_restart;
+    BOOL b_isSetUp;
 
-    NSString *o_credits_path;
-    NSString *o_credits;
-    NSString *o_thanks;
-    NSString *o_copyright;
-    NSDictionary *o_info_dict;
-    CFBundleRef localInfoBundle;
-    NSDictionary *o_local_dict;
-    
     /* generic help window */
     IBOutlet id o_help_window;
     IBOutlet id o_help_web_view;
+
+    /* licence window */
+    IBOutlet id o_gpl_window;
+    IBOutlet id o_gpl_field;
 }
 
 + (VLAboutBox *)sharedInstance;
 - (void)showAbout;
 - (void)showHelp;
+- (IBAction)showGPL:(id)sender;
 
 @end
index 5c1dcf6aa27778d7712b1e382381a3e109de8ed3..54dc7f207fa57f1c95bf3388143e7dcc8a3c1892 100644 (file)
@@ -5,6 +5,7 @@
  * $Id$
  *
  * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
+ *          Felix Paul K\9fhne <fkuehne -at- videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -67,21 +68,15 @@ static VLAboutBox *_o_sharedInstance = nil;
 
 - (void)showAbout
 {
-    if (!o_credits_path)
+    if(! b_isSetUp )
     {
-        NSString *o_name;
-        NSString *o_version;
+        NSDictionary *o_local_dict;
 
-        /* Get the info dictionary (Info.plist) */
-        o_info_dict = [[NSBundle mainBundle] infoDictionary];
         /* Get the localized info dictionary (InfoPlist.strings) */
-        localInfoBundle = CFBundleGetMainBundle();
-        o_local_dict = (NSDictionary *)
-                        CFBundleGetLocalInfoDictionary( localInfoBundle );
+        o_local_dict = [[NSBundle mainBundle] localizedInfoDictionary];
+
         /* Setup the name field */
-        o_name = [o_local_dict objectForKey:@"CFBundleName"];
+        o_name_field = [o_local_dict objectForKey:@"CFBundleName"];
  
         /* Set the about box title */
         [o_about_window setTitle:_NS("About VLC media player")];
@@ -106,8 +101,7 @@ static VLAboutBox *_o_sharedInstance = nil;
                                             [NSString stringWithUTF8String: psz_thanks]]];
  
         /* Setup the copyright field */
-        o_copyright = [o_local_dict objectForKey:@"NSHumanReadableCopyright"];
-        [o_copyright_field setStringValue:o_copyright];
+        [o_copyright_field setStringValue: [o_local_dict objectForKey:@"NSHumanReadableCopyright"]];
 
         /* Setup the window */
         [o_credits_textview setDrawsBackground: NO];
@@ -115,20 +109,23 @@ 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")];
+        
+        b_isSetUp = YES;
     }
  
     /* Show the window */
     b_restart = YES;
-    [o_about_window makeKeyAndOrderFront:nil];
+    [o_about_window makeKeyAndOrderFront: nil];
 }
 
 - (void)windowDidBecomeKey:(NSNotification *)notification
 {
-    o_scroll_timer = [NSTimer scheduledTimerWithTimeInterval:1/6
-                           target:self
-                           selector:@selector(scrollCredits:)
-                           userInfo:nil
-                           repeats:YES];
+    o_scroll_timer = [NSTimer scheduledTimerWithTimeInterval: 1/6
+                                                      target:self
+                                                    selector:@selector(scrollCredits:)
+                                                    userInfo:nil
+                                                     repeats:YES];
 }
 
 - (void)windowDidResignKey:(NSNotification *)notification
@@ -138,7 +135,7 @@ static VLAboutBox *_o_sharedInstance = nil;
 
 - (void)scrollCredits:(NSTimer *)timer
 {
-    if (b_restart)
+    if( b_restart )
     {
         /* Reset the starttime */
         i_start = [NSDate timeIntervalSinceReferenceDate] + 3.0;
@@ -147,7 +144,7 @@ static VLAboutBox *_o_sharedInstance = nil;
         b_restart = NO;
     }
 
-    if ([NSDate timeIntervalSinceReferenceDate] >= i_start)
+    if( [NSDate timeIntervalSinceReferenceDate] >= i_start )
     {
         /* Scroll to the position */
         [o_credits_textview scrollPoint:NSMakePoint( 0, f_current )];
@@ -156,13 +153,26 @@ static VLAboutBox *_o_sharedInstance = nil;
         f_current += 0.005;
  
         /* If at end, restart at the top */
-        if ( f_current >= f_end )
+        if( f_current >= f_end )
         {
             b_restart = YES;
         }
     }
 }
 
+/*****************************************************************************
+* VLC GPL Window, action called from the about window and the help menu
+*****************************************************************************/
+
+- (IBAction)showGPL:(id)sender
+{
+    [o_gpl_window setTitle: _NS("License")];
+    [o_gpl_field setString: [NSString stringWithUTF8String: psz_license]];
+    
+    [o_gpl_window center];
+    [o_gpl_window makeKeyAndOrderFront: sender];
+}
+
 /*****************************************************************************
 * VLC Generic Help Window
 *****************************************************************************/
index 6215d8ee734bf122c0502d68580ffff8ba58bea9..6376c7cbd477a12cae8b288857512b3f3b84508b 100644 (file)
@@ -256,6 +256,7 @@ struct intf_sys_t
     IBOutlet id o_mi_help;
     IBOutlet id o_mi_readme;
     IBOutlet id o_mi_documentation;
+    IBOutlet id o_mi_license;
     IBOutlet id o_mi_website;
     IBOutlet id o_mi_donation;
     IBOutlet id o_mi_forum;
@@ -346,6 +347,7 @@ struct intf_sys_t
 - (IBAction)showSFilters:(id)sender;
 
 - (IBAction)viewAbout:(id)sender;
+- (IBAction)showLicense:(id)sender;
 - (IBAction)viewPreferences:(id)sender;
 - (IBAction)checkForUpdate:(id)sender;
 - (IBAction)viewHelp:(id)sender;
index eeec7776ae02af3ea12ee6bf8efaa9dbe2349066..d9a3442cbed5016dba1ee4f82328aa62213c8b2a 100644 (file)
@@ -669,6 +669,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     [o_mu_help setTitle: _NS("Help")];
     [o_mi_help setTitle: _NS("VLC media player Help...")];
     [o_mi_readme setTitle: _NS("ReadMe / FAQ...")];
+    [o_mi_license setTitle: _NS("License")];
     [o_mi_documentation setTitle: _NS("Online Documentation...")];
     [o_mi_website setTitle: _NS("VideoLAN Website...")];
     [o_mi_donation setTitle: _NS("Make a donation...")];
@@ -1878,25 +1879,27 @@ static VLCMain *_o_sharedMainInstance = nil;
     }
  
     if ( !nib_bookmarks_loaded )
-    {
         nib_bookmarks_loaded = [NSBundle loadNibNamed:@"Bookmarks" owner:self];
-        [o_bookmarks showBookmarks];
-    } else {
-        [o_bookmarks showBookmarks];
-    }
+
+    [o_bookmarks showBookmarks];
 }
 
 - (IBAction)viewAbout:(id)sender
 {
     if( !nib_about_loaded )
-    {
         nib_about_loaded = [NSBundle loadNibNamed:@"About" owner:self];
-        [o_about showAbout];
-    } else {
-        [o_about showAbout];
-    }
+
+    [o_about showAbout];
 }
 
+- (IBAction)showLicense:(id)sender
+{
+    if( !nib_about_loaded )
+        nib_about_loaded = [NSBundle loadNibNamed:@"About" owner:self];
+
+    [o_about showGPL: sender];
+}
+    
 - (IBAction)viewPreferences:(id)sender
 {
 /* GRUIIIIIIIK */