Add open in browser to context menu of thumb overviews
This commit is contained in:
parent
052758b11e
commit
d15a851a3a
|
@ -1,3 +1,7 @@
|
|||
4.2.0
|
||||
========================
|
||||
* Added open in browser to context menu of thumb overviews
|
||||
|
||||
4.1.0
|
||||
========================
|
||||
* Added dark mode for the server web interface (improvements on the CSS
|
||||
|
|
|
@ -516,6 +516,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
|||
openRecDir.setOnAction(e -> new OpenRecordingsDir(cell, model).execute());
|
||||
|
||||
MenuItem copyUrl = createCopyUrlMenuItem(cell);
|
||||
MenuItem openInBrowser = createOpenInBrowser(cell);
|
||||
MenuItem sendTip = createTipMenuItem(cell);
|
||||
|
||||
configureItemsForSelection(cell, openInPlayer, copyUrl, sendTip);
|
||||
|
@ -539,7 +540,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
|||
if (site.supportsTips()) {
|
||||
contextMenu.getItems().add(sendTip);
|
||||
}
|
||||
contextMenu.getItems().addAll(copyUrl, ignore, refresh, openRecDir);
|
||||
contextMenu.getItems().addAll(copyUrl, openInBrowser, ignore, refresh, openRecDir);
|
||||
if (model instanceof MyFreeCamsModel && Objects.equals(System.getenv("CTBREC_DEV"), "1")) {
|
||||
MenuItem debug = new MenuItem("debug");
|
||||
debug.setOnAction(e -> MyFreeCamsClient.getInstance().getSessionState(model));
|
||||
|
@ -589,6 +590,12 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
|||
}
|
||||
}
|
||||
|
||||
private MenuItem createOpenInBrowser(ThumbCell cell) {
|
||||
MenuItem openInBrowser = new MenuItem("Open in browser");
|
||||
openInBrowser.setOnAction(e -> DesktopIntegration.open(cell.getModel().getUrl()));
|
||||
return openInBrowser;
|
||||
}
|
||||
|
||||
private MenuItem createCopyUrlMenuItem(ThumbCell cell) {
|
||||
MenuItem copyUrl = new MenuItem("Copy URL");
|
||||
copyUrl.setOnAction(e -> {
|
||||
|
|
Loading…
Reference in New Issue