diff --git a/app/src/main/java/xdman/XDMApp.java b/app/src/main/java/xdman/XDMApp.java index ed776cd..9c70e14 100644 --- a/app/src/main/java/xdman/XDMApp.java +++ b/app/src/main/java/xdman/XDMApp.java @@ -63,7 +63,7 @@ import xdman.util.XDMUtils; public class XDMApp implements DownloadListener, DownloadWindowListener, Comparator { public static final String GLOBAL_LOCK_FILE = ".xdm-global-lock"; - public static final String APP_VERSION = "7.2.10"; + public static final String APP_VERSION = "7.2.11"; public static final String XDM_WINDOW_TITLE = "XDM 2020"; public static final String APP_UPDAT_URL = "https://api.github.com/repos/subhra74/xdm/releases/latest"; public static final String APP_UPDATE_CHK_URL = "https://subhra74.github.io/xdm/update-checker.html?v="; diff --git a/app/src/main/java/xdman/monitoring/MonitoringSession.java b/app/src/main/java/xdman/monitoring/MonitoringSession.java index a5da48a..2ba8a37 100644 --- a/app/src/main/java/xdman/monitoring/MonitoringSession.java +++ b/app/src/main/java/xdman/monitoring/MonitoringSession.java @@ -128,6 +128,7 @@ public class MonitoringSession implements Runnable { HeaderCollection headers = new HeaderCollection(); headers.setValue("Cache-Control", "max-age=0, no-cache, must-revalidate"); res.setHeaders(headers); + Logger.log("Response set for 204"); } private void onVideo(Request request, Response res) throws UnsupportedEncodingException { diff --git a/app/src/main/java/xdman/monitoring/Response.java b/app/src/main/java/xdman/monitoring/Response.java index 9b8d25d..1ba908f 100644 --- a/app/src/main/java/xdman/monitoring/Response.java +++ b/app/src/main/java/xdman/monitoring/Response.java @@ -31,6 +31,8 @@ public class Response { if (body != null && body.length > 0) { out.write(body); } + } else { + out.write(buf.toString().getBytes()); } out.flush(); diff --git a/app/src/main/java/xdman/ui/components/AboutPage.java b/app/src/main/java/xdman/ui/components/AboutPage.java index c80d0e0..07ec39e 100644 --- a/app/src/main/java/xdman/ui/components/AboutPage.java +++ b/app/src/main/java/xdman/ui/components/AboutPage.java @@ -32,18 +32,16 @@ public class AboutPage extends Page { JLabel lblTitle = new JLabel(StringResource.get("FULL_NAME")); lblTitle.setFont(FontResource.getBiggerFont()); lblTitle.setForeground(Color.WHITE); - lblTitle.setBounds(getScaledInt(15), y, - getScaledInt(350) - getScaledInt(30), h); + lblTitle.setBounds(getScaledInt(15), y, getScaledInt(350) - getScaledInt(30), h); panel.add(lblTitle); y += h; y += getScaledInt(20); String details = String.format( - "App version %s with runtime %s on %s\n\nCreated by: Subhra Das Gupta\n\n%s\nCopyright (C) 2020, All rights reserved.", - XDMApp.APP_VERSION, System.getProperty("java.version"), - System.getProperty("os.name"), - "https://github.com/subhra74/xdm"); + "Version %s with Java %s on %s\n\nCreated by: Subhra Das Gupta\n\n%s\nCopyright (C) 2020, All rights reserved.", + XDMApp.APP_VERSION, (System.getProperty("java.vendor") + " " + System.getProperty("java.version")), + System.getProperty("os.name"), "https://github.com/subhra74/xdm"); h = getScaledInt(250); JTextArea lblDetails = new JTextArea(); @@ -54,8 +52,7 @@ public class AboutPage extends Page { lblDetails.setForeground(Color.WHITE); lblDetails.setText(details); lblDetails.setFont(FontResource.getBigFont()); - lblDetails.setBounds(getScaledInt(15), y, - getScaledInt(350) - getScaledInt(30), h); + lblDetails.setBounds(getScaledInt(15), y, getScaledInt(350) - getScaledInt(30), h); panel.add(lblDetails); y += h; diff --git a/app/src/main/java/xdman/ui/components/MainWindow.java b/app/src/main/java/xdman/ui/components/MainWindow.java index 76f03f3..88d22b2 100644 --- a/app/src/main/java/xdman/ui/components/MainWindow.java +++ b/app/src/main/java/xdman/ui/components/MainWindow.java @@ -1445,7 +1445,7 @@ public class MainWindow extends XDMFrame implements ActionListener { } private void openTranslationPage() { - XDMUtils.browseURL("https://github.com/subhra74/xdm/translations"); + XDMUtils.browseURL("https://github.com/subhra74/xdm/wiki/Submitting-translations-for-XDM"); } private void openSupportPage() { diff --git a/app/src/main/java/xdman/util/BrowserLauncher.java b/app/src/main/java/xdman/util/BrowserLauncher.java index 3bd753b..121550d 100644 --- a/app/src/main/java/xdman/util/BrowserLauncher.java +++ b/app/src/main/java/xdman/util/BrowserLauncher.java @@ -6,7 +6,8 @@ public class BrowserLauncher { public static boolean launchFirefox(String args) { int os = XDMUtils.detectOS(); if (os == XDMUtils.WINDOWS) { - File[] ffPaths = { new File(System.getenv("PROGRAMFILES"), "Mozilla Firefox\\firefox.exe"), + File[] ffPaths = { new File(System.getenv("ProgramW6432"), "Mozilla Firefox\\firefox.exe"), + new File(System.getenv("PROGRAMFILES"), "Mozilla Firefox\\firefox.exe"), new File(System.getenv("PROGRAMFILES(X86)"), "Mozilla Firefox\\firefox.exe") }; for (int i = 0; i < ffPaths.length; i++) { System.out.println(ffPaths[i]); @@ -23,7 +24,7 @@ public class BrowserLauncher { } } } - if(os==XDMUtils.LINUX) { + if (os == XDMUtils.LINUX) { File[] ffPaths = { new File("/usr/bin/firefox") }; for (int i = 0; i < ffPaths.length; i++) { if (ffPaths[i].exists()) { diff --git a/app/src/main/java/xdman/util/NativeMessagingHostInstaller.java b/app/src/main/java/xdman/util/NativeMessagingHostInstaller.java index faa19dc..7ab276b 100644 --- a/app/src/main/java/xdman/util/NativeMessagingHostInstaller.java +++ b/app/src/main/java/xdman/util/NativeMessagingHostInstaller.java @@ -65,6 +65,11 @@ public class NativeMessagingHostInstaller { return; } } else { + File manifestFolder = new File(os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION) + : (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION)); + if (!manifestFolder.exists()) { + manifestFolder.mkdirs(); + } File manifestFile = new File( os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION) : (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION), @@ -104,6 +109,10 @@ public class NativeMessagingHostInstaller { return; } } else { + File manifestFolder = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION); + if (!manifestFolder.exists()) { + manifestFolder.mkdirs(); + } File manifestFile = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION, "xdmff.native_host.json"); File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(),