Skip to content

Commit

Permalink
Use Main.webBrowse in help button
Browse files Browse the repository at this point in the history
  • Loading branch information
awidesky committed May 7, 2021
1 parent 15d60f7 commit 0cf4799
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/com/awidesky/YoutubeClipboardAutoDownloader/gui/GUI.java
Expand Up @@ -218,7 +218,7 @@ private void addButtons() {
});
cleanCompleted.addActionListener((e) -> { TaskStatusModel.getinstance().clearDone(); });
cleanAll.addActionListener((e) -> { TaskStatusModel.getinstance().clearAll(); });
nameFormatHelp.addActionListener((e) -> { showNameFormatPage(); });
nameFormatHelp.addActionListener((e) -> { Main.webBrowse("https://github.com/ytdl-org/youtube-dl#output-template"); });

browse.setBounds(523, 75, browse.getPreferredSize().width, browse.getPreferredSize().height);
cleanCompleted.setBounds(14, 418, cleanCompleted.getPreferredSize().width, cleanCompleted.getPreferredSize().height);
Expand Down Expand Up @@ -310,20 +310,6 @@ private void disposeLoadingFrame() {

}

private void showNameFormatPage() {

try {
if(!Desktop.isDesktopSupported()) { throw new IOException("Desktop.isDesktopSupported() is false"); }
Desktop.getDesktop().browse(new URI("https://github.com/ytdl-org/youtube-dl#output-template"));
} catch (IOException e) {
GUI.warning("Cannot open default web browser!", "Please visit https://github.com/ytdl-org/youtube-dl#output-template\n%e%", e);
} catch (URISyntaxException e) {
GUI.error("Invalid url!", "%e%", e);
}

}


public void setLoadingStat(LoadingStatus stat) {

loadingStatus.setText(stat.getStatus());
Expand Down

0 comments on commit 0cf4799

Please sign in to comment.