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

macosx: fixed too early reset when scrolling the credits

parent 25974670
......@@ -57,7 +57,7 @@ static VLAboutBox *_o_sharedInstance = nil;
} else {
_o_sharedInstance = [super init];
}
return _o_sharedInstance;
}
......@@ -68,8 +68,8 @@ static VLAboutBox *_o_sharedInstance = nil;
}
/*****************************************************************************
* VLC About Window
*****************************************************************************/
* VLC About Window
*****************************************************************************/
- (void)showAbout
{
......@@ -93,25 +93,25 @@ static VLAboutBox *_o_sharedInstance = nil;
/* setup the creator / revision field */
NSString *compiler;
#ifdef __clang__
#ifdef __clang__
compiler = [NSString stringWithFormat:@"clang %s", __clang_version__];
#elif __llvm__
#elif __llvm__
compiler = [NSString stringWithFormat:@"llvm-gcc %s", __VERSION__];
#else
#else
compiler = [NSString stringWithFormat:@"gcc %s", __VERSION__];
#endif
#endif
[o_revision_field setStringValue:
[NSString stringWithFormat: _NS("Compiled by %s with %@"), VLC_CompileBy(), compiler]];
[NSString stringWithFormat: _NS("Compiled by %s with %@"), VLC_CompileBy(), compiler]];
/* Setup the nameversion field */
[o_name_version_field setStringValue: [NSString stringWithFormat:@"Version %s (%s)", VLC_Version(), PLATFORM]];
/* setup the authors and thanks field */
[o_credits_textview setString: [NSString stringWithFormat: @"%@\n\n\n\n%@\n%@\n\n%@",
_NS(INTF_ABOUT_MSG),
_NS("VLC was brought to you by:"),
[NSString stringWithUTF8String: psz_authors],
[NSString stringWithUTF8String: psz_thanks]]];
_NS(INTF_ABOUT_MSG),
_NS("VLC was brought to you by:"),
[NSString stringWithUTF8String: psz_authors],
[NSString stringWithUTF8String: psz_thanks]]];
/* Setup the window */
[o_credits_textview setDrawsBackground: NO];
......@@ -123,7 +123,7 @@ static VLAboutBox *_o_sharedInstance = nil;
b_isSetUp = YES;
}
/* Show the window */
b_restart = YES;
[o_credits_textview scrollPoint:NSMakePoint( 0, 0 )];
......@@ -159,15 +159,21 @@ static VLAboutBox *_o_sharedInstance = nil;
{
/* Scroll to the position */
[o_credits_textview scrollPoint:NSMakePoint( 0, f_current )];
/* Increment the scroll position */
f_current += 0.005;
/* If at end, restart at the top */
if( f_current >= f_end )
{
[o_credits_textview scrollPoint:NSMakePoint( 0, 0 )];
b_restart = YES;
/* f_end may be wrong on first run, so don't trust it too much */
if( f_end == [o_credits_textview bounds].size.height - [o_credits_scrollview bounds].size.height )
{
b_restart = YES;
[o_credits_textview scrollPoint:NSMakePoint( 0, 0 )];
}
else
f_end = [o_credits_textview bounds].size.height - [o_credits_scrollview bounds].size.height;
}
}
}
......@@ -179,8 +185,8 @@ static VLAboutBox *_o_sharedInstance = nil;
}
/*****************************************************************************
* VLC GPL Window, action called from the about window and the help menu
*****************************************************************************/
* VLC GPL Window, action called from the about window and the help menu
*****************************************************************************/
- (IBAction)showGPL:(id)sender
{
......@@ -192,8 +198,8 @@ static VLAboutBox *_o_sharedInstance = nil;
}
/*****************************************************************************
* VLC Generic Help Window
*****************************************************************************/
* VLC Generic Help Window
*****************************************************************************/
- (void)showHelp
{
......@@ -203,7 +209,7 @@ static VLAboutBox *_o_sharedInstance = nil;
[o_help_home_btn setToolTip: _NS("Index")];
[o_help_window makeKeyAndOrderFront: self];
[[o_help_web_view mainFrame] loadHTMLString: _NS(I_LONGHELP)
baseURL: [NSURL URLWithString:@"http://videolan.org"]];
}
......
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