Commit debf610d authored by Felix Paul Kühne's avatar Felix Paul Kühne

* added navigation controls to the Help window (implemented with minimal...

* added navigation controls to the Help window (implemented with minimal affords by using WebKit's builtin methods). We need a nicer home button graphic, though ;-)
parent 5aad31ca
......@@ -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;
......
......@@ -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>
......
......@@ -22,6 +22,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <WebKit/WebKit.h>
/*****************************************************************************
* VLAboutBox interface
*****************************************************************************/
......@@ -43,10 +45,13 @@
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
......@@ -25,11 +25,10 @@
/*****************************************************************************
* 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
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