Skip to content

Commit fe50900

Browse files
author
subhra74
committed
fixed 204 response
1 parent 9ba8261 commit fe50900

File tree

7 files changed

+22
-12
lines changed

7 files changed

+22
-12
lines changed

app/src/main/java/xdman/XDMApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
public class XDMApp implements DownloadListener, DownloadWindowListener, Comparator<String> {
6565
public static final String GLOBAL_LOCK_FILE = ".xdm-global-lock";
66-
public static final String APP_VERSION = "7.2.10";
66+
public static final String APP_VERSION = "7.2.11";
6767
public static final String XDM_WINDOW_TITLE = "XDM 2020";
6868
public static final String APP_UPDAT_URL = "https://api.github.com/repos/subhra74/xdm/releases/latest";
6969
public static final String APP_UPDATE_CHK_URL = "https://subhra74.github.io/xdm/update-checker.html?v=";

app/src/main/java/xdman/monitoring/MonitoringSession.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ private void on204(Request request, Response res) {
128128
HeaderCollection headers = new HeaderCollection();
129129
headers.setValue("Cache-Control", "max-age=0, no-cache, must-revalidate");
130130
res.setHeaders(headers);
131+
Logger.log("Response set for 204");
131132
}
132133

133134
private void onVideo(Request request, Response res) throws UnsupportedEncodingException {

app/src/main/java/xdman/monitoring/Response.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public void write(OutputStream out) throws IOException {
3131
if (body != null && body.length > 0) {
3232
out.write(body);
3333
}
34+
} else {
35+
out.write(buf.toString().getBytes());
3436
}
3537

3638
out.flush();

app/src/main/java/xdman/ui/components/AboutPage.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,16 @@ public AboutPage(XDMFrame xframe) {
3232
JLabel lblTitle = new JLabel(StringResource.get("FULL_NAME"));
3333
lblTitle.setFont(FontResource.getBiggerFont());
3434
lblTitle.setForeground(Color.WHITE);
35-
lblTitle.setBounds(getScaledInt(15), y,
36-
getScaledInt(350) - getScaledInt(30), h);
35+
lblTitle.setBounds(getScaledInt(15), y, getScaledInt(350) - getScaledInt(30), h);
3736
panel.add(lblTitle);
3837

3938
y += h;
4039
y += getScaledInt(20);
4140

4241
String details = String.format(
43-
"App version %s with runtime %s on %s\n\nCreated by: Subhra Das Gupta\n\n%s\nCopyright (C) 2020, All rights reserved.",
44-
XDMApp.APP_VERSION, System.getProperty("java.version"),
45-
System.getProperty("os.name"),
46-
"https://github.com/subhra74/xdm");
42+
"Version %s with Java %s on %s\n\nCreated by: Subhra Das Gupta\n\n%s\nCopyright (C) 2020, All rights reserved.",
43+
XDMApp.APP_VERSION, (System.getProperty("java.vendor") + " " + System.getProperty("java.version")),
44+
System.getProperty("os.name"), "https://github.com/subhra74/xdm");
4745

4846
h = getScaledInt(250);
4947
JTextArea lblDetails = new JTextArea();
@@ -54,8 +52,7 @@ public AboutPage(XDMFrame xframe) {
5452
lblDetails.setForeground(Color.WHITE);
5553
lblDetails.setText(details);
5654
lblDetails.setFont(FontResource.getBigFont());
57-
lblDetails.setBounds(getScaledInt(15), y,
58-
getScaledInt(350) - getScaledInt(30), h);
55+
lblDetails.setBounds(getScaledInt(15), y, getScaledInt(350) - getScaledInt(30), h);
5956
panel.add(lblDetails);
6057
y += h;
6158

app/src/main/java/xdman/ui/components/MainWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,7 @@ private void optimizeRWin() {
14451445
}
14461446

14471447
private void openTranslationPage() {
1448-
XDMUtils.browseURL("https://github.com/subhra74/xdm/translations");
1448+
XDMUtils.browseURL("https://github.com/subhra74/xdm/wiki/Submitting-translations-for-XDM");
14491449
}
14501450

14511451
private void openSupportPage() {

app/src/main/java/xdman/util/BrowserLauncher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ public class BrowserLauncher {
66
public static boolean launchFirefox(String args) {
77
int os = XDMUtils.detectOS();
88
if (os == XDMUtils.WINDOWS) {
9-
File[] ffPaths = { new File(System.getenv("PROGRAMFILES"), "Mozilla Firefox\\firefox.exe"),
9+
File[] ffPaths = { new File(System.getenv("ProgramW6432"), "Mozilla Firefox\\firefox.exe"),
10+
new File(System.getenv("PROGRAMFILES"), "Mozilla Firefox\\firefox.exe"),
1011
new File(System.getenv("PROGRAMFILES(X86)"), "Mozilla Firefox\\firefox.exe") };
1112
for (int i = 0; i < ffPaths.length; i++) {
1213
System.out.println(ffPaths[i]);
@@ -23,7 +24,7 @@ public static boolean launchFirefox(String args) {
2324
}
2425
}
2526
}
26-
if(os==XDMUtils.LINUX) {
27+
if (os == XDMUtils.LINUX) {
2728
File[] ffPaths = { new File("/usr/bin/firefox") };
2829
for (int i = 0; i < ffPaths.length; i++) {
2930
if (ffPaths[i].exists()) {

app/src/main/java/xdman/util/NativeMessagingHostInstaller.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ private static final void installNativeMessagingHostForChrome(int os, boolean ch
6565
return;
6666
}
6767
} else {
68+
File manifestFolder = new File(os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION)
69+
: (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION));
70+
if (!manifestFolder.exists()) {
71+
manifestFolder.mkdirs();
72+
}
6873
File manifestFile = new File(
6974
os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION)
7075
: (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION),
@@ -104,6 +109,10 @@ public static final void installNativeMessagingHostForFireFox(int os) {
104109
return;
105110
}
106111
} else {
112+
File manifestFolder = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION);
113+
if (!manifestFolder.exists()) {
114+
manifestFolder.mkdirs();
115+
}
107116
File manifestFile = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION,
108117
"xdmff.native_host.json");
109118
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(),

0 commit comments

Comments
 (0)