]> git.sesse.net Git - vlc/commitdiff
* added navigation controls to the Help window (implemented with minimal affords...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 16 Dec 2007 02:20:14 +0000 (02:20 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 16 Dec 2007 02:20:14 +0000 (02:20 +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
modules/gui/macosx/about.h
modules/gui/macosx/about.m

index d2f98b633dbce65c9f408c647173b3805db308fe..52f98737e28778176c462da2f1e20d978cfa414d 100644 (file)
@@ -3,7 +3,7 @@
         {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
         {CLASS = MPSlider; LANGUAGE = ObjC; SUPERCLASS = NSSlider; }, 
         {
-            ACTIONS = {showGPL = id; }; 
+            ACTIONS = {helpGoHome = id; showGPL = id; }; 
             CLASS = VLAboutBox; 
             LANGUAGE = ObjC; 
             OUTLETS = {
@@ -14,6 +14,9 @@
                 "o_gpl_btn" = id; 
                 "o_gpl_field" = id; 
                 "o_gpl_window" = id; 
+                "o_help_bwd_btn" = id; 
+                "o_help_fwd_btn" = id; 
+                "o_help_home_btn" = id; 
                 "o_help_web_view" = id; 
                 "o_help_window" = id; 
                 "o_name_field" = id; 
index bc51bafec2ce1ca04d5991e87f77be705ab828c3..ee716ae6531cfda5ffa2df150e2dddcb85e01c9d 100644 (file)
@@ -10,9 +10,9 @@
        <array/>
        <key>IBOpenObjects</key>
        <array>
+               <integer>2245</integer>
                <integer>2239</integer>
                <integer>1345</integer>
-               <integer>2245</integer>
        </array>
        <key>IBSystem Version</key>
        <string>8S2167</string>
index a5a5b3e2d3480095da1831ba53681f1635525ff5..622e42d077a69da99b3aed587631d2fda6d092dd 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 7ef8f44aab826b2b37b97c72d026a03b8617c165..6ba19818a0f04319c0f6f53a88dc81715225b6e6 100644 (file)
@@ -22,6 +22,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#import <WebKit/WebKit.h>
+
 /*****************************************************************************
  * VLAboutBox interface
  *****************************************************************************/
     NSTimeInterval i_start;
     BOOL b_restart;
     BOOL b_isSetUp;
-
+    
     /* generic help window */
     IBOutlet id o_help_window;
-    IBOutlet id o_help_web_view;
+    IBOutlet WebView *o_help_web_view; //we may _not_ use id here because of method name collisions
+    IBOutlet id o_help_bwd_btn;
+    IBOutlet id o_help_fwd_btn;
+    IBOutlet id o_help_home_btn;
 
     /* licence window */
     IBOutlet id o_gpl_window;
@@ -57,5 +62,6 @@
 - (void)showAbout;
 - (void)showHelp;
 - (IBAction)showGPL:(id)sender;
+- (IBAction)helpGoHome:(id)sender;
 
 @end
index f2e236cfb7c314a9303732b1fc9970054eba27a1..cd5ef28019156bcde99f9f263a699cfdccbaa093 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "intf.h"
-#include "about.h"
-#include <vlc_intf_strings.h>
-#include <vlc_about.h>
-#import <WebKit/WebKit.h>
+#import "intf.h"
+#import "about.h"
+#import <vlc_intf_strings.h>
+#import <vlc_about.h>
 
 #ifdef __x86_64__
 #define PLATFORM "Intel"
@@ -180,10 +179,28 @@ static VLAboutBox *_o_sharedInstance = nil;
 - (void)showHelp
 {
     [o_help_window setTitle: _NS("VLC media player Help")];
+    [o_help_fwd_btn setToolTip: _NS("Next")];
+    [o_help_bwd_btn setToolTip: _NS("Previous")];
+    [o_help_home_btn setToolTip: _NS("Index")];
+
     [o_help_window makeKeyAndOrderFront: self];
+    
+    [[o_help_web_view mainFrame] loadHTMLString: [NSString stringWithString: _NS(I_LONGHELP)]
+                                        baseURL: [NSURL URLWithString:@"http://videolan.org"]];
+}
 
+- (IBAction)helpGoHome:(id)sender
+{
+    /* go home */
     [[o_help_web_view mainFrame] loadHTMLString: [NSString stringWithString: _NS(I_LONGHELP)]
                                         baseURL: [NSURL URLWithString:@"http://videolan.org"]];
 }
 
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+    /* delegate to update button states (we're the frameLoadDelegate for our help's webview */
+    [o_help_fwd_btn setEnabled: [o_help_web_view canGoForward]]; 
+    [o_help_bwd_btn setEnabled: [o_help_web_view canGoBack]];
+}
+
 @end