Skip to content

Commit

Permalink
Moved a few more initialization to GUIGlobals.init() (JabRef#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus authored and ayanai1 committed Sep 5, 2016
1 parent 183e5bb commit c9a81a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/main/java/net/sf/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package net.sf.jabref;

import java.awt.Font;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -117,8 +116,6 @@ private void openWindow() {
}

GUIGlobals.init();
GUIGlobals.currentFont = new Font(Globals.prefs.get(JabRefPreferences.FONT_FAMILY),
Globals.prefs.getInt(JabRefPreferences.FONT_STYLE), Globals.prefs.getInt(JabRefPreferences.FONT_SIZE));

LOGGER.debug("Initializing frame");
JabRefGUI.mainFrame = new JabRefFrame();
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/net/sf/jabref/gui/GUIGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ public class GUIGlobals {
public static final int WIDTH_ICON_COL = 26;
public static final int WIDTH_ICON_COL_RANKING = 80; // Width of Ranking Icon Column

static {
// Set up entry editor colors, first time:
GUIGlobals.updateEntryEditorColors();
}

public static JLabel getTableIcon(String fieldType) {
JLabel label = GUIGlobals.TABLE_ICONS.get(fieldType);
if (label == null) {
Expand Down Expand Up @@ -164,6 +159,13 @@ public static void init() {
if (Globals.prefs.getBoolean(JabRefPreferences.EDITOR_EMACS_KEYBINDINGS)) {
EmacsKeyBindings.load();
}

// Set up entry editor colors, first time:
GUIGlobals.updateEntryEditorColors();

GUIGlobals.currentFont = new Font(Globals.prefs.get(JabRefPreferences.FONT_FAMILY),
Globals.prefs.getInt(JabRefPreferences.FONT_STYLE), Globals.prefs.getInt(JabRefPreferences.FONT_SIZE));

}

}

0 comments on commit c9a81a1

Please sign in to comment.