Skip to content

Commit

Permalink
MacGUI: make the help menu documentation item point to the initial do…
Browse files Browse the repository at this point in the history
…cs page again.
  • Loading branch information
galad87 committed Apr 24, 2022
1 parent 94c0a86 commit 25df9c5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion macosx/HBAddPresetController.m
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ - (IBAction)cancel:(id)sender

- (IBAction)openUserGuide:(id)sender
{
[[NSWorkspace sharedWorkspace] openURL:[HBUtilities.documentationURL URLByAppendingPathComponent:@"advanced/custom-presets.html"]];
[[NSWorkspace sharedWorkspace] openURL:[HBUtilities.documentationBaseURL URLByAppendingPathComponent:@"advanced/custom-presets.html"]];
}

@end
Expand Down
2 changes: 1 addition & 1 deletion macosx/HBAudioDefaultsController.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ - (IBAction)cancel:(id)sender

- (IBAction)openUserGuide:(id)sender
{
[NSWorkspace.sharedWorkspace openURL:[HBUtilities.documentationURL URLByAppendingPathComponent:@"advanced/audio-subtitle-defaults.html"]];
[NSWorkspace.sharedWorkspace openURL:[HBUtilities.documentationBaseURL URLByAppendingPathComponent:@"advanced/audio-subtitle-defaults.html"]];
}

@end
2 changes: 1 addition & 1 deletion macosx/HBSubtitlesDefaultsController.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ - (IBAction)cancel:(id)sender

- (IBAction)openUserGuide:(id)sender
{
[NSWorkspace.sharedWorkspace openURL:[HBUtilities.documentationURL URLByAppendingPathComponent:@"advanced/audio-subtitle-defaults.html"]];
[NSWorkspace.sharedWorkspace openURL:[HBUtilities.documentationBaseURL URLByAppendingPathComponent:@"advanced/audio-subtitle-defaults.html"]];
}

@end
8 changes: 7 additions & 1 deletion macosx/HBUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ NS_ASSUME_NONNULL_BEGIN


/**
* Returns the url of the current version documentation.
* Returns the url of the documentation.
*/
@property (nonatomic, readonly, class) NSURL *documentationURL;


/**
* Returns the url of the current English version documentation.
*/
@property (nonatomic, readonly, class) NSURL *documentationBaseURL;

/**
* Writes a message to standard error.
* The message will show up in the output panel and in the activity log.
Expand Down
5 changes: 5 additions & 0 deletions macosx/HBUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ + (NSURL *)defaultDestinationFolderURL
}

+ (NSURL *)documentationURL
{
return [NSURL URLWithString:@"https://handbrake.fr/docs/"];
}

+ (NSURL *)documentationBaseURL
{
return [NSURL URLWithString:@"https://handbrake.fr/docs/en/latest/"];
}
Expand Down

0 comments on commit 25df9c5

Please sign in to comment.