Skip to content

Commit

Permalink
[fix] Rename EmacsKeyBindings and reorder imports
Browse files Browse the repository at this point in the history
The old EmacsKeyBindings class is now removed and replaced with a working one. Missing localization keys were also added.

[Issue: #9]
  • Loading branch information
krisgun committed Feb 27, 2020
1 parent d8baf24 commit 86ab7a3
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 905 deletions.
11 changes: 2 additions & 9 deletions src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
//import java.util.Optional;

import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.stage.Screen;
import javafx.stage.Stage;
//import javafx.scene.control.TextField;
import javafx.scene.input.KeyEvent;
import javafx.stage.Screen;
import javafx.stage.Stage;
Expand All @@ -24,7 +20,7 @@
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.importer.ParserResultWarningDialog;
import org.jabref.gui.importer.actions.OpenDatabaseAction;
import org.jabref.gui.keyboard.KeyBinding;
import org.jabref.gui.keyboard.EmacsKeyBindings;
import org.jabref.gui.keyboard.KeyBindingRepository;
import org.jabref.gui.shared.SharedDatabaseUIManager;
import org.jabref.logic.autosaveandbackup.BackupManager;
Expand All @@ -35,9 +31,6 @@
import org.jabref.logic.shared.exception.NotASharedDatabaseException;
import org.jabref.model.database.shared.DatabaseNotSupportedException;
import org.jabref.preferences.JabRefPreferences;
import org.jabref.gui.keyboard.KeyBindingRepository;
//import org.jabref.gui.keyboard.KeyBinding;
import org.jabref.gui.keyboard.EmacsKeyBindings2;

import impl.org.controlsfx.skin.DecorationPane;
import org.slf4j.Logger;
Expand Down Expand Up @@ -105,7 +98,7 @@ private void openWindow(Stage mainStage) {
boolean CNFlag = Globals.prefs.getBoolean(JabRefPreferences.EDITOR_EMACS_KEYBINDINGS_REBIND_CN);
boolean AUFlag = Globals.prefs.getBoolean(JabRefPreferences.EDITOR_EMACS_KEYBINDINGS_REBIND_AU);
KeyBindingRepository keyBindingRepository = Globals.getKeyPrefs();
EmacsKeyBindings2.executeEmac(scene, event, EmacsFlag, CAFlag, CFFlag, CNFlag, AUFlag, keyBindingRepository);
EmacsKeyBindings.executeEmac(scene, event, EmacsFlag, CAFlag, CFFlag, CNFlag, AUFlag, keyBindingRepository);
});

Globals.getThemeLoader().installCss(scene, Globals.prefs);
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/jabref/gui/GUIGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import org.jabref.Globals;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.keyboard.EmacsKeyBindings;
import org.jabref.gui.util.CustomLocalDragboard;
import org.jabref.logic.l10n.Localization;
import org.jabref.preferences.JabRefPreferences;
Expand Down Expand Up @@ -41,9 +40,6 @@ public static void updateEntryEditorColors() {
* on Un*x is unavailable.
*/
public static void init() {
if (Globals.prefs.getBoolean(JabRefPreferences.EDITOR_EMACS_KEYBINDINGS)) {
EmacsKeyBindings.load();
}
// Set up entry editor colors, first time:
GUIGlobals.updateEntryEditorColors();

Expand Down
Loading

0 comments on commit 86ab7a3

Please sign in to comment.