diff --git a/app/src/main/java/xdman/XDMApp.java b/app/src/main/java/xdman/XDMApp.java index ed776cdd..9c70e14f 100644 --- a/app/src/main/java/xdman/XDMApp.java +++ b/app/src/main/java/xdman/XDMApp.java @@ -63,7 +63,7 @@ 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 a5da48a3..2ba8a376 100644 --- a/app/src/main/java/xdman/monitoring/MonitoringSession.java +++ b/app/src/main/java/xdman/monitoring/MonitoringSession.java @@ -128,6 +128,7 @@ private void on204(Request request, Response res) { 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 9b8d25d1..1ba908f8 100644 --- a/app/src/main/java/xdman/monitoring/Response.java +++ b/app/src/main/java/xdman/monitoring/Response.java @@ -31,6 +31,8 @@ public void write(OutputStream out) throws IOException { 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 c80d0e03..07ec39e3 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 AboutPage(XDMFrame xframe) { 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 AboutPage(XDMFrame xframe) { 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 76f03f37..88d22b2b 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 @@ private void optimizeRWin() { } 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 3bd753b7..121550d6 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 static boolean launchFirefox(String args) { } } } - 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 faa19dc5..7ab276bf 100644 --- a/app/src/main/java/xdman/util/NativeMessagingHostInstaller.java +++ b/app/src/main/java/xdman/util/NativeMessagingHostInstaller.java @@ -65,6 +65,11 @@ private static final void installNativeMessagingHostForChrome(int os, boolean ch 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 static final void installNativeMessagingHostForFireFox(int os) { 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(),