Skip to content

Commit

Permalink
- do not open website link from edit dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
derreisende77 committed Aug 25, 2024
1 parent 413dd25 commit 7397cc9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
22 changes: 1 addition & 21 deletions src/main/java/mediathek/javafx/bookmark/BookmarkNoteDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import javafx.fxml.Initializable;
import javafx.scene.control.*;
import javafx.stage.Stage;
import mediathek.gui.actions.UrlHyperlinkAction;
import mediathek.tool.http.MVHttpClient;
import okhttp3.Request;
import okhttp3.Response;
Expand All @@ -16,7 +15,6 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
Expand Down Expand Up @@ -47,8 +45,6 @@ public class BookmarkNoteDialog implements Initializable
@FXML
protected Button btnWebDate;
@FXML
protected Button btnWebLink;
@FXML
private ProgressIndicator fxProgress;
@FXML
private Label fxStatus;
Expand Down Expand Up @@ -138,21 +134,6 @@ protected String call() {
new Thread(task).start();
}

/**
* Opens the linked webpage Webpage
* @param e (unused)
*/
@FXML
private void btnOpenWebLink(Event e) {
try {
if (hasWebURL) {
UrlHyperlinkAction.openURL(null,data.getWebUrl());
}
}
catch (URISyntaxException ignored) {}
}


public final boolean SetandShow(Stage dlgstage, BookmarkData data) {
this.dlgstage = dlgstage;
this.data = data;
Expand All @@ -172,8 +153,7 @@ public final boolean SetandShow(Stage dlgstage, BookmarkData data) {
catch (Exception ignored) {}
}
btnWebDate.setDisable(!hasWebURL);
btnWebLink.setDisable(!hasWebURL);
}
}
handleChange();
// Display the Dialog and wait
this.dlgstage.showAndWait();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@
<Tooltip text="Verfügbar bis Datum auf der Webseite suchen"/>
</tooltip>
</Button>
<Button fx:id="btnWebLink" layoutX="15.0" layoutY="109.0" mnemonicParsing="false" onAction="#btnOpenWebLink"
AnchorPane.leftAnchor="15.0" AnchorPane.topAnchor="109.0">
<graphic>
<Glyph fontFamily="FontAwesome" icon="LINK"/>
</graphic>
<tooltip>
<Tooltip text="Film Webseite öffnen"/>
</tooltip>
</Button>
<Button fx:id="CancelButton" cancelButton="true" layoutX="289.0" layoutY="133.0" mnemonicParsing="false"
onAction="#handleCancel" onMouseClicked="#handleCancel" text="Abbruch" textAlignment="CENTER"
AnchorPane.bottomAnchor="20.0" AnchorPane.rightAnchor="120.0">
Expand Down

0 comments on commit 7397cc9

Please sign in to comment.