Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into exportPdf
Browse files Browse the repository at this point in the history
* upstream/master:
  Set WM_CLASS to org-jabref-JabRefMain (#3273)
  Terminate JavaFX thread when running with "nogui" option (#3274)
  • Loading branch information
Siedlerchr committed Oct 11, 2017
2 parents 6b02e9c + 1b030b4 commit edec73d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- Updated French translation
- We added support for pasting entries in different formats [#3143](https://github.com/JabRef/jabref/issues/3143)
- Crossreferenced entries are now used when a BibTex key is generated for an entry with empty fields. [#2811](https://github.com/JabRef/jabref/issues/2811)
- We now set the WM_CLASS of the UI to org-jabref-JabRefMain to allow certain Un*x window managers to properly identify its windows

### Fixed
- We fixed an issue where JabRef would not terminated after asking to collect anonymous statistics [#2955 comment](https://github.com/JabRef/jabref/issues/2955#issuecomment-334591123)
- We fixed an issue where JabRef would not shut down when started with the '-n' (No GUI) option.

### Removed

Expand Down Expand Up @@ -82,7 +84,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We added drag and drop support for adding files directly in the `General`-Tab. The dragged files are currently only linked from their existing directory. For more advanced features use the `Add files` dialog. [#koppor#244](https://github.com/koppor/jabref/issues/244)
- We added the file description filed back to the list of files in the `General`-Tab [#2930, comment](https://github.com/JabRef/jabref/issues/2930#issuecomment-328328172)
- Added an error dialog if the file is open in another process and cannot be renamed. [#3229]
- On Windows, the `JabRef.exe` executable can now be used to start JabRef from the command line. By default, no output is shown unless the new "-console" option is specified.
- On Windows, the `JabRef.exe` executable can now be used to start JabRef from the command line. By default, no output is shown unless the new "-console" option is specified.

### Fixed

Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/jabref/JabRefMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ private static void start(String[] args) {
// See if we should shut down now
if (argumentProcessor.shouldShutDown()) {
Globals.shutdownThreadPools();
Platform.exit();
return;
}

Expand Down
14 changes: 14 additions & 0 deletions src/main/java/org/jabref/gui/GUIGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.awt.Color;
import java.awt.Font;
import java.awt.Toolkit;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -13,6 +14,7 @@
import org.jabref.gui.keyboard.EmacsKeyBindings;
import org.jabref.gui.specialfields.SpecialFieldViewModel;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.util.OS;
import org.jabref.model.entry.FieldName;
import org.jabref.model.entry.specialfields.SpecialField;
import org.jabref.preferences.JabRefPreferences;
Expand Down Expand Up @@ -156,6 +158,18 @@ public static void init() {
GUIGlobals.currentFont = new Font(Globals.prefs.get(JabRefPreferences.FONT_FAMILY),
Globals.prefs.getInt(JabRefPreferences.FONT_STYLE), Globals.prefs.getInt(JabRefPreferences.FONT_SIZE));

// Set WM_CLASS using reflection for certain Un*x window managers
if (!OS.WINDOWS && !OS.OS_X) {
try {
Toolkit xToolkit = Toolkit.getDefaultToolkit();
java.lang.reflect.Field awtAppClassNameField = xToolkit.getClass().getDeclaredField("awtAppClassName");
awtAppClassNameField.setAccessible(true);
awtAppClassNameField.set(xToolkit, "org-jabref-JabRefMain");
} catch (Exception e) {
// ignore any error since this code only works for certain toolkits
}
}

}

public static void setFont(int size) {
Expand Down

0 comments on commit edec73d

Please sign in to comment.