From b79eed9a7cbe8b3cfa8c81df7ab74d242507043b Mon Sep 17 00:00:00 2001 From: mairdl Date: Thu, 2 Jun 2016 16:36:04 +0200 Subject: [PATCH 01/18] Revised hotkey system --- .../java/net/sf/jabref/gui/JabRefFrame.java | 3 ++- .../java/net/sf/jabref/gui/PreviewPanel.java | 5 ---- .../sf/jabref/gui/keyboard/KeyBinding.java | 25 ++++++++++--------- .../gui/keyboard/KeyBindingsDialog.java | 2 +- .../jabref/gui/menus/ChangeEntryTypeMenu.java | 1 + .../gui/openoffice/OpenOfficePanel.java | 1 + 6 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index 338f5803d8d..da1b5a73205 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -1906,7 +1906,8 @@ public EditAction(String command, String menuTitle, String description, KeyStrok putValue(Action.SHORT_DESCRIPTION, description); } - @Override public void actionPerformed(ActionEvent e) { + @Override + public void actionPerformed(ActionEvent e) { LOGGER.debug(Globals.getFocusListener().getFocused().toString()); JComponent source = Globals.getFocusListener().getFocused(); diff --git a/src/main/java/net/sf/jabref/gui/PreviewPanel.java b/src/main/java/net/sf/jabref/gui/PreviewPanel.java index 95245075fe6..8ef03648eed 100644 --- a/src/main/java/net/sf/jabref/gui/PreviewPanel.java +++ b/src/main/java/net/sf/jabref/gui/PreviewPanel.java @@ -187,10 +187,6 @@ private void createKeyBindings(){ final String copy = "copy"; inputMap.put(Globals.getKeyPrefs().getKey(KeyBinding.COPY_PREVIEW), copy); actionMap.put(copy, this.copyPreviewAction); - - final String print = "print"; - inputMap.put(Globals.getKeyPrefs().getKey(KeyBinding.PRINT_ENTRY_PREVIEW), print); - actionMap.put(print, this.printAction); } private JPopupMenu createPopupMenu() { @@ -332,7 +328,6 @@ public PrintAction() { super(Localization.lang("Print entry preview"), IconTheme.JabRefIcon.PRINTED.getIcon()); putValue(Action.SHORT_DESCRIPTION, Localization.lang("Print entry preview")); - putValue(Action.ACCELERATOR_KEY, Globals.getKeyPrefs().getKey(KeyBinding.PRINT_ENTRY_PREVIEW)); } diff --git a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java index d4253125a80..a9126cac353 100644 --- a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java @@ -8,10 +8,10 @@ public enum KeyBinding { "Abbreviate", Localization.lang("Abbreviate journal names"), "ctrl alt A"), AUTOGENERATE_BIBTEX_KEYS("Autogenerate BibTeX keys", Localization.lang("Autogenerate BibTeX keys"), "ctrl G"), AUTOMATICALLY_LINK_FILES( - "Automatically link files", Localization.lang("Automatically set file links"), "alt F"), + "Automatically link files", Localization.lang("Automatically set file links"), "F7"), BACK("Back", Localization.lang("Back"), "alt LEFT"), CLEANUP( - "Cleanup", Localization.lang("Cleanup entries"), "ctrl shift F7"), + "Cleanup", Localization.lang("Cleanup entries"), "F8"), CLEAR_SEARCH("Clear search", Localization.lang("Clear search"), "ESCAPE"), CLOSE_DATABASE("Close database", Localization.lang("Close database"), "ctrl W"), CLOSE_DIALOG("Close dialog", Localization.lang("Close dialog"), "ESCAPE"), @@ -25,7 +25,7 @@ public enum KeyBinding { DECREASE_TABLE_FONT_SIZE("Decrease table font size", Localization.lang("Decrease table font size"), "ctrl MINUS"), DELETE_ENTRY("Delete entry", Localization.lang("Delete entry"), "DELETE"), EDIT_ENTRY("Edit entry", Localization.lang("Edit entry"), "ctrl E"), - EDIT_PREAMBLE("Edit preamble", Localization.lang("Edit preamble"), "ctrl P"), + EDIT_PREAMBLE("Edit preamble", Localization.lang("Edit preamble"), "alt S"), EDIT_STRINGS("Edit strings", Localization.lang("Edit strings"), "ctrl T"), ENTRY_EDITOR_NEXT_ENTRY("Entry editor, next entry", Localization.lang("Entry editor, next entry"), "ctrl shift DOWN"), ENTRY_EDITOR_NEXT_PANEL("Entry editor, next panel", Localization.lang("Entry editor, next panel"), "ctrl TAB"), @@ -37,10 +37,10 @@ public enum KeyBinding { FILE_LIST_EDITOR_MOVE_ENTRY_DOWN("File list editor, move entry down", Localization.lang("File list editor, move entry down"), "ctrl DOWN"), FILE_LIST_EDITOR_MOVE_ENTRY_UP("File list editor, move entry up", Localization.lang("File list editor, move entry up"), "ctrl UP"), FIND_UNLINKED_FILES("Find unlinked files", Localization.lang("Find unlinked files"), "shift F7"), - FOCUS_ENTRY_TABLE("Focus entry table", Localization.lang("Focus entry table"), "ctrl shift E"), + FOCUS_ENTRY_TABLE("Focus entry table", Localization.lang("Focus entry table"), "alt 1"), FORWARD("Forward", Localization.lang("Forward"), "alt RIGHT"), HELP("Help", Localization.lang("Help"), "F1"), - HIDE_SHOW_TOOLBAR("Hide/show toolbar", Localization.lang("Hide/show toolbar"), "ctrl alt T"), + HIDE_SHOW_TOOLBAR("Hide/show toolbar", Localization.lang("Hide/show toolbar"), "alt 6"), IMPORT_INTO_CURRENT_DATABASE("Import into current database", Localization.lang("Import into current database"), "ctrl I"), IMPORT_INTO_NEW_DATABASE("Import into new database", Localization.lang("Import into new database"), "ctrl alt I"), INCREASE_TABLE_FONT_SIZE("Increase table font size", Localization.lang("Increase table font size"), "ctrl PLUS"), @@ -54,8 +54,9 @@ public enum KeyBinding { NEW_PHDTHESIS("New phdthesis", Localization.lang("New phdthesis"), "ctrl shift T"), NEW_PROCEEDINGS("New proceedings", Localization.lang("New proceedings"), "ctrl shift P"), NEW_UNPUBLISHED("New unpublished", Localization.lang("New unpublished"), "ctrl shift U"), + NEW_TECHREPORT("New technical report", Localization.lang("New technical report"), "ctrl shift R"), NEXT_TAB("Next tab", Localization.lang("Next tab"), "ctrl PAGE_DOWN"), - OPEN_CONSOLE("Open terminal here", Localization.lang("Open terminal here"), "ctrl shift J"), + OPEN_CONSOLE("Open terminal here", Localization.lang("Open terminal here"), "ctrl shift L"), OPEN_DATABASE("Open database", Localization.lang("Open database"), "ctrl O"), OPEN_FILE("Open file", Localization.lang("Open file"), "F4"), OPEN_FOLDER("Open folder", Localization.lang("Open folder"), "ctrl shift O"), @@ -64,7 +65,6 @@ public enum KeyBinding { PULL_CHANGES_FROM_SHARED_DATABASE("Pull changes from shared database", Localization.lang("Pull changes from shared database"), "ctrl shift R"), PREAMBLE_EDITOR_STORE_CHANGES("Preamble editor, store changes", Localization.lang("Preamble editor, store changes"), "alt S"), PREVIOUS_TAB("Previous tab", Localization.lang("Previous tab"), "ctrl PAGE_UP"), - PRINT_ENTRY_PREVIEW("Print entry preview", Localization.lang("Print entry preview"), "alt P"), PUSH_TO_APPLICATION("Push to application", Localization.lang("Push to application"), "ctrl L"), QUIT_JABREF("Quit JabRef", Localization.lang("Quit JabRef"), "ctrl Q"), REDO("Redo", Localization.lang("Redo"), "ctrl Y"), @@ -81,14 +81,15 @@ public enum KeyBinding { STRING_DIALOG_ADD_STRING("String dialog, add string", Localization.lang("String dialog, add string"), "ctrl N"), STRING_DIALOG_REMOVE_STRING("String dialog, remove string", Localization.lang("String dialog, remove string"), "shift DELETE"), SWITCH_PREVIEW_LAYOUT("Switch preview layout", Localization.lang("Switch preview layout"), "F9"), - SYNCHRONIZE_FILES("Synchronize files", Localization.lang("Synchronize files"), "ctrl F4"), - TOGGLE_ENTRY_PREVIEW("Toggle entry preview", Localization.lang("Toggle entry preview"), "ctrl F9"), - TOGGLE_GROUPS_INTERFACE("Toggle groups interface", Localization.lang("Toggle groups interface"), "ctrl shift G"), + SYNCHRONIZE_FILES("Synchronize files", Localization.lang("Synchronize files"), "ctrl shift F7"), + TOGGLE_ENTRY_PREVIEW("Toggle entry preview", Localization.lang("Toggle entry preview"), "alt 2"), + TOGGLE_GROUPS_INTERFACE("Toggle groups interface", Localization.lang("Toggle groups interface"), "alt 3"), UNABBREVIATE("Unabbreviate", Localization.lang("Unabbreviate"), "ctrl alt shift A"), UNDO("Undo", Localization.lang("Undo"), "ctrl Z"), UNMARK_ENTRIES("Unmark entries", Localization.lang("Unmark entries"), "ctrl shift M"), - WEB_SEARCH("Web search", Localization.lang("Web search"), "F5"), - WRITE_XMP("Write XMP", Localization.lang("Write XMP"), "ctrl F7"),; + WEB_SEARCH("Web search", Localization.lang("Web search"), "alt + 5"), + WRITE_XMP("Write XMP", Localization.lang("Write XMP"), "F6"), + OPEN_OFFICE_LIBRE_CONNECTION("Open office/libre connection", Localization.lang("Open office/libre connection"), "alt 4"),; private final String key; private final String localization; diff --git a/src/main/java/net/sf/jabref/gui/keyboard/KeyBindingsDialog.java b/src/main/java/net/sf/jabref/gui/keyboard/KeyBindingsDialog.java index 3eeb6d79346..65df79a18f6 100644 --- a/src/main/java/net/sf/jabref/gui/keyboard/KeyBindingsDialog.java +++ b/src/main/java/net/sf/jabref/gui/keyboard/KeyBindingsDialog.java @@ -63,7 +63,7 @@ public KeyBindingsDialog(KeyBindingRepository keyBindingRepository) { updateTableData(); //JScrollPane listScroller = new JScrollPane(list); JScrollPane listScroller = new JScrollPane(table); - listScroller.setPreferredSize(new Dimension(250, 400)); + listScroller.setPreferredSize(new Dimension(500, 500)); getContentPane().add(listScroller, BorderLayout.CENTER); grabB.addKeyListener(new KeyBindingsListener(table)); diff --git a/src/main/java/net/sf/jabref/gui/menus/ChangeEntryTypeMenu.java b/src/main/java/net/sf/jabref/gui/menus/ChangeEntryTypeMenu.java index ba43dfeae22..73a9106d01c 100644 --- a/src/main/java/net/sf/jabref/gui/menus/ChangeEntryTypeMenu.java +++ b/src/main/java/net/sf/jabref/gui/menus/ChangeEntryTypeMenu.java @@ -32,6 +32,7 @@ public ChangeEntryTypeMenu () { entryShortCuts.put(BibtexEntryTypes.INBOOK.getName(), Globals.getKeyPrefs().getKey(KeyBinding.NEW_INBOOK)); entryShortCuts.put(BibtexEntryTypes.PROCEEDINGS.getName(), Globals.getKeyPrefs().getKey(KeyBinding.NEW_PROCEEDINGS)); entryShortCuts.put(BibtexEntryTypes.UNPUBLISHED.getName(), Globals.getKeyPrefs().getKey(KeyBinding.NEW_UNPUBLISHED)); + entryShortCuts.put(BibtexEntryTypes.TECHREPORT.getName(), Globals.getKeyPrefs().getKey(KeyBinding.NEW_TECHREPORT)); } public JMenu getChangeEntryTypeMenu(BasePanel panel) { diff --git a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java index 01049bfa9d9..5c79a4ec2d3 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java @@ -178,6 +178,7 @@ public JMenuItem getMenuItem() { JMenuItem item = new JMenuItem(Localization.lang("OpenOffice/LibreOffice connection"), IconTheme.getImage("openoffice")); item.addActionListener(event -> manager.show(getName())); + item.setAccelerator(Globals.getKeyPrefs().getKey(KeyBinding.OPEN_OFFICE_LIBRE_CONNECTION)); return item; } From 8fbd1e53a77a63af45c2b35a83e3ea8f057ac127 Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 4 Jul 2016 13:51:39 +0200 Subject: [PATCH 02/18] Add changes to Changelog.md and fixed localization issues --- CHANGELOG.md | 1 + src/main/resources/l10n/JabRef_da.properties | 3 +++ src/main/resources/l10n/JabRef_de.properties | 3 +++ src/main/resources/l10n/JabRef_en.properties | 2 ++ src/main/resources/l10n/JabRef_es.properties | 3 +++ src/main/resources/l10n/JabRef_fa.properties | 3 +++ src/main/resources/l10n/JabRef_fr.properties | 3 +++ src/main/resources/l10n/JabRef_in.properties | 3 +++ src/main/resources/l10n/JabRef_it.properties | 3 +++ src/main/resources/l10n/JabRef_ja.properties | 3 +++ src/main/resources/l10n/JabRef_nl.properties | 3 +++ src/main/resources/l10n/JabRef_no.properties | 3 +++ src/main/resources/l10n/JabRef_pt_BR.properties | 3 +++ src/main/resources/l10n/JabRef_ru.properties | 3 +++ src/main/resources/l10n/JabRef_sv.properties | 3 +++ src/main/resources/l10n/JabRef_tr.properties | 3 +++ src/main/resources/l10n/JabRef_vi.properties | 3 +++ src/main/resources/l10n/JabRef_zh.properties | 3 +++ 18 files changed, 51 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f854f497e1..8b35dc8c553 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - [#970](https://github.com/JabRef/jabref/issues/970): Implementation of shared database support (full system) with event based synchronization for MySQL, PostgreSQL and Oracle database systems. - Externally fetched information can be merged for entries with an ISBN - Externally fetched information can be merged for entries with an ArXiv eprint +- [#1225](https://github.com/JabRef/jabref/issues/1225): Hotkey-system should be consistent - [#462](https://github.com/JabRef/jabref/issues/462) Extend the OpenConsoleFeature by offering a selection between default terminal emulator and configurable command execution. - [#1516](https://github.com/JabRef/jabref/issues/1516) Selected field names are written in uppercase in the entry editor - For developers: Moved the bst package into logic. This requires the regeneration of antlr sources, execute: gradlew generateSource diff --git a/src/main/resources/l10n/JabRef_da.properties b/src/main/resources/l10n/JabRef_da.properties index a283c1df083..1027cd9dcfb 100644 --- a/src/main/resources/l10n/JabRef_da.properties +++ b/src/main/resources/l10n/JabRef_da.properties @@ -1742,3 +1742,6 @@ Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index 5c55bac9ed1..a44ba445f8b 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -2456,3 +2456,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?=Durch_einen_Abbruch_dieser_Operation_werden_die_Änderungen_nicht_synchronisiert._Trotzdem_abbrechen? The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.=Der_Eintrag,_welchen_Sie_zur_Zeit_bearbeiten,_ist_auf_der_gemeinsam_genutzen_Datenbank_nicht_mehr_vorhanden._Klicken_Sie_auf_"Behalten",_um_den_Eintrag_wiederherzustellen. Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 80a1f297046..050b65ad3f8 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2008,6 +2008,7 @@ New_mastersthesis=New_mastersthesis New_phdthesis=New_phdthesis New_proceedings=New_proceedings New_unpublished=New_unpublished +New_technical_report=New_technical_report Next_tab=Next_tab Preamble_editor,_store_changes=Preamble_editor,_store_changes Previous_tab=Previous_tab @@ -2285,3 +2286,4 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?=Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway? The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.=The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry. Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?=Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now? +Open_office/libre_connection=Open_OpenOffice/LibreOffice_connection diff --git a/src/main/resources/l10n/JabRef_es.properties b/src/main/resources/l10n/JabRef_es.properties index e1ef92e9ad0..a4b3ff95656 100644 --- a/src/main/resources/l10n/JabRef_es.properties +++ b/src/main/resources/l10n/JabRef_es.properties @@ -1643,3 +1643,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_fa.properties b/src/main/resources/l10n/JabRef_fa.properties index 32bd9a4491b..fa2d505e82b 100644 --- a/src/main/resources/l10n/JabRef_fa.properties +++ b/src/main/resources/l10n/JabRef_fa.properties @@ -2424,3 +2424,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_fr.properties b/src/main/resources/l10n/JabRef_fr.properties index 90088ecd193..737f8d1fb87 100644 --- a/src/main/resources/l10n/JabRef_fr.properties +++ b/src/main/resources/l10n/JabRef_fr.properties @@ -1684,3 +1684,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_in.properties b/src/main/resources/l10n/JabRef_in.properties index 149bcd654b3..9dc3d18ed73 100644 --- a/src/main/resources/l10n/JabRef_in.properties +++ b/src/main/resources/l10n/JabRef_in.properties @@ -1659,3 +1659,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_it.properties b/src/main/resources/l10n/JabRef_it.properties index 6a92f5a1ab0..dbb0f2e34c6 100644 --- a/src/main/resources/l10n/JabRef_it.properties +++ b/src/main/resources/l10n/JabRef_it.properties @@ -1760,3 +1760,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_ja.properties b/src/main/resources/l10n/JabRef_ja.properties index 98d278b40ac..6a230ee2244 100644 --- a/src/main/resources/l10n/JabRef_ja.properties +++ b/src/main/resources/l10n/JabRef_ja.properties @@ -2401,3 +2401,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_nl.properties b/src/main/resources/l10n/JabRef_nl.properties index 9de4da703ef..b0abdda1b55 100644 --- a/src/main/resources/l10n/JabRef_nl.properties +++ b/src/main/resources/l10n/JabRef_nl.properties @@ -2433,3 +2433,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_no.properties b/src/main/resources/l10n/JabRef_no.properties index 9ca1e6a0653..9669270776c 100644 --- a/src/main/resources/l10n/JabRef_no.properties +++ b/src/main/resources/l10n/JabRef_no.properties @@ -2825,3 +2825,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_pt_BR.properties b/src/main/resources/l10n/JabRef_pt_BR.properties index 75e38793463..1d6a4efa7a1 100644 --- a/src/main/resources/l10n/JabRef_pt_BR.properties +++ b/src/main/resources/l10n/JabRef_pt_BR.properties @@ -1656,3 +1656,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_ru.properties b/src/main/resources/l10n/JabRef_ru.properties index 25b2b238bc4..467d2932602 100644 --- a/src/main/resources/l10n/JabRef_ru.properties +++ b/src/main/resources/l10n/JabRef_ru.properties @@ -2402,3 +2402,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_sv.properties b/src/main/resources/l10n/JabRef_sv.properties index 56bd2d129d9..8c65c943e43 100644 --- a/src/main/resources/l10n/JabRef_sv.properties +++ b/src/main/resources/l10n/JabRef_sv.properties @@ -1601,3 +1601,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?=Kan_inte_citera_poster_utan_BibTeX-nycklar._Generera_nycklar_nu? +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_tr.properties b/src/main/resources/l10n/JabRef_tr.properties index 93b7f767323..465d670b3af 100644 --- a/src/main/resources/l10n/JabRef_tr.properties +++ b/src/main/resources/l10n/JabRef_tr.properties @@ -1674,3 +1674,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_vi.properties b/src/main/resources/l10n/JabRef_vi.properties index 71d2a47a27b..a0088b4b13f 100644 --- a/src/main/resources/l10n/JabRef_vi.properties +++ b/src/main/resources/l10n/JabRef_vi.properties @@ -2428,3 +2428,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= diff --git a/src/main/resources/l10n/JabRef_zh.properties b/src/main/resources/l10n/JabRef_zh.properties index 5621e203da8..9995f75e9ad 100644 --- a/src/main/resources/l10n/JabRef_zh.properties +++ b/src/main/resources/l10n/JabRef_zh.properties @@ -1668,3 +1668,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?= The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.= Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= +New_technical_report= + +Open_office/libre_connection= From fbb6e762f168d676ad7bc283228f75e6ce4076ec Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 4 Jul 2016 14:38:43 +0200 Subject: [PATCH 03/18] Discard format changes and clean up --- src/main/java/net/sf/jabref/gui/JabRefFrame.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index da1b5a73205..338f5803d8d 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -1906,8 +1906,7 @@ public EditAction(String command, String menuTitle, String description, KeyStrok putValue(Action.SHORT_DESCRIPTION, description); } - @Override - public void actionPerformed(ActionEvent e) { + @Override public void actionPerformed(ActionEvent e) { LOGGER.debug(Globals.getFocusListener().getFocused().toString()); JComponent source = Globals.getFocusListener().getFocused(); From f2228d8b90225828582dc60453b5f3eafb291095 Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 4 Jul 2016 14:38:43 +0200 Subject: [PATCH 04/18] Discard format changes and clean up --- src/main/java/net/sf/jabref/gui/JabRefFrame.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index 338f5803d8d..da1b5a73205 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -1906,7 +1906,8 @@ public EditAction(String command, String menuTitle, String description, KeyStrok putValue(Action.SHORT_DESCRIPTION, description); } - @Override public void actionPerformed(ActionEvent e) { + @Override + public void actionPerformed(ActionEvent e) { LOGGER.debug(Globals.getFocusListener().getFocused().toString()); JComponent source = Globals.getFocusListener().getFocused(); From 05b7fcf1a245fe00219e0d6e07d3ef9d96e6aef0 Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 4 Jul 2016 13:51:39 +0200 Subject: [PATCH 05/18] Add changes to Changelog.md and fixed localization issues --- src/main/resources/l10n/JabRef_de.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index a44ba445f8b..d766b2b0ac0 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -2363,7 +2363,6 @@ Latest_version=Neueste_Version Please_open_%0_manually.=Bitte_öffnen_Sie_%0_manuell. The_link_has_been_copied_to_the_clipboard.=Der_Link_wurde_in_die_Zwischenablage_kopiert. - Online_help_forum=Online-Hilfeforum Custom= From eecc73bc5dac3327cc0f8392d2e4c4132d3f0b92 Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 4 Jul 2016 14:38:43 +0200 Subject: [PATCH 06/18] Discard format changes --- src/main/java/net/sf/jabref/gui/JabRefFrame.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index da1b5a73205..338f5803d8d 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -1906,8 +1906,7 @@ public EditAction(String command, String menuTitle, String description, KeyStrok putValue(Action.SHORT_DESCRIPTION, description); } - @Override - public void actionPerformed(ActionEvent e) { + @Override public void actionPerformed(ActionEvent e) { LOGGER.debug(Globals.getFocusListener().getFocused().toString()); JComponent source = Globals.getFocusListener().getFocused(); From 7c31a80ba7308b3cbdf8ead83be31f18bdb4d1e1 Mon Sep 17 00:00:00 2001 From: mairdl Date: Thu, 21 Jul 2016 17:08:40 +0200 Subject: [PATCH 07/18] Remove toggle toolbar shortcut and add print preview to rightclickmenu --- src/main/java/net/sf/jabref/gui/JabRefFrame.java | 1 - src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java | 5 ++--- src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index 338f5803d8d..aa53b77595f 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -336,7 +336,6 @@ public class JabRefFrame extends JFrame implements OutputPrinter { private final Action toggleToolbar = enableToggle(new AbstractAction(Localization.menuTitle("Hide/show toolbar")) { { - putValue(Action.ACCELERATOR_KEY, Globals.getKeyPrefs().getKey(KeyBinding.HIDE_SHOW_TOOLBAR)); putValue(Action.SHORT_DESCRIPTION, Localization.lang("Hide/show toolbar")); } diff --git a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java index a9126cac353..50d942c87ce 100644 --- a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java @@ -40,7 +40,6 @@ public enum KeyBinding { FOCUS_ENTRY_TABLE("Focus entry table", Localization.lang("Focus entry table"), "alt 1"), FORWARD("Forward", Localization.lang("Forward"), "alt RIGHT"), HELP("Help", Localization.lang("Help"), "F1"), - HIDE_SHOW_TOOLBAR("Hide/show toolbar", Localization.lang("Hide/show toolbar"), "alt 6"), IMPORT_INTO_CURRENT_DATABASE("Import into current database", Localization.lang("Import into current database"), "ctrl I"), IMPORT_INTO_NEW_DATABASE("Import into new database", Localization.lang("Import into new database"), "ctrl alt I"), INCREASE_TABLE_FONT_SIZE("Increase table font size", Localization.lang("Increase table font size"), "ctrl PLUS"), @@ -87,9 +86,9 @@ public enum KeyBinding { UNABBREVIATE("Unabbreviate", Localization.lang("Unabbreviate"), "ctrl alt shift A"), UNDO("Undo", Localization.lang("Undo"), "ctrl Z"), UNMARK_ENTRIES("Unmark entries", Localization.lang("Unmark entries"), "ctrl shift M"), - WEB_SEARCH("Web search", Localization.lang("Web search"), "alt + 5"), + WEB_SEARCH("Web search", Localization.lang("Web search"), "alt + 4"), WRITE_XMP("Write XMP", Localization.lang("Write XMP"), "F6"), - OPEN_OFFICE_LIBRE_CONNECTION("Open office/libre connection", Localization.lang("Open office/libre connection"), "alt 4"),; + OPEN_OFFICE_LIBRE_CONNECTION("Open office/libre connection", Localization.lang("Open office/libre connection"), "alt 0"),; private final String key; private final String localization; diff --git a/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java b/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java index b4ef5215f5b..fc1b0301ed6 100644 --- a/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java +++ b/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java @@ -97,6 +97,8 @@ public RightClickMenu(JabRefFrame frame, BasePanel panel) { add(new GeneralAction(Actions.CUT, Localization.lang("Cut"), IconTheme.JabRefIcon.CUT.getSmallIcon())); add(new GeneralAction(Actions.DELETE, Localization.lang("Delete"), IconTheme.JabRefIcon.DELETE_ENTRY.getSmallIcon())); addSeparator(); + add(new GeneralAction(Actions.PRINT, Localization.lang("Print entry preview"), IconTheme.JabRefIcon.PRINTED.getSmallIcon())); + add(new GeneralAction(Actions.SEND_AS_EMAIL, Localization.lang("Send as email"), IconTheme.JabRefIcon.EMAIL.getSmallIcon())); addSeparator(); From f60cac8de36a96aabcd317a1ea187b8654e3260c Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 25 Jul 2016 13:58:38 +0200 Subject: [PATCH 08/18] Fix changelog, make group focusable, revert KeyBinding changes regarding edit preamble --- CHANGELOG.md | 2 +- src/main/java/net/sf/jabref/gui/groups/GroupsTree.java | 1 + src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b35dc8c553..d924b361912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - [#970](https://github.com/JabRef/jabref/issues/970): Implementation of shared database support (full system) with event based synchronization for MySQL, PostgreSQL and Oracle database systems. - Externally fetched information can be merged for entries with an ISBN - Externally fetched information can be merged for entries with an ArXiv eprint -- [#1225](https://github.com/JabRef/jabref/issues/1225): Hotkey-system should be consistent +- [#1225](https://github.com/JabRef/jabref/issues/1225): Hotkey-system is now consistent - [#462](https://github.com/JabRef/jabref/issues/462) Extend the OpenConsoleFeature by offering a selection between default terminal emulator and configurable command execution. - [#1516](https://github.com/JabRef/jabref/issues/1516) Selected field names are written in uppercase in the entry editor - For developers: Moved the bst package into logic. This requires the regeneration of antlr sources, execute: gradlew generateSource diff --git a/src/main/java/net/sf/jabref/gui/groups/GroupsTree.java b/src/main/java/net/sf/jabref/gui/groups/GroupsTree.java index 88527afa3c4..682a816b018 100644 --- a/src/main/java/net/sf/jabref/gui/groups/GroupsTree.java +++ b/src/main/java/net/sf/jabref/gui/groups/GroupsTree.java @@ -116,6 +116,7 @@ public GroupsTree(GroupSelector groupSelector) { setShowsRootHandles(false); getSelectionModel().setSelectionMode( TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); + this.setFocusable(true); } @Override diff --git a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java index 50d942c87ce..88b88f6184d 100644 --- a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java @@ -25,7 +25,7 @@ public enum KeyBinding { DECREASE_TABLE_FONT_SIZE("Decrease table font size", Localization.lang("Decrease table font size"), "ctrl MINUS"), DELETE_ENTRY("Delete entry", Localization.lang("Delete entry"), "DELETE"), EDIT_ENTRY("Edit entry", Localization.lang("Edit entry"), "ctrl E"), - EDIT_PREAMBLE("Edit preamble", Localization.lang("Edit preamble"), "alt S"), + EDIT_PREAMBLE("Edit preamble", Localization.lang("Edit preamble"), "alt P"), EDIT_STRINGS("Edit strings", Localization.lang("Edit strings"), "ctrl T"), ENTRY_EDITOR_NEXT_ENTRY("Entry editor, next entry", Localization.lang("Entry editor, next entry"), "ctrl shift DOWN"), ENTRY_EDITOR_NEXT_PANEL("Entry editor, next panel", Localization.lang("Entry editor, next panel"), "ctrl TAB"), @@ -86,7 +86,7 @@ public enum KeyBinding { UNABBREVIATE("Unabbreviate", Localization.lang("Unabbreviate"), "ctrl alt shift A"), UNDO("Undo", Localization.lang("Undo"), "ctrl Z"), UNMARK_ENTRIES("Unmark entries", Localization.lang("Unmark entries"), "ctrl shift M"), - WEB_SEARCH("Web search", Localization.lang("Web search"), "alt + 4"), + WEB_SEARCH("Web search", Localization.lang("Web search"), "alt 4"), WRITE_XMP("Write XMP", Localization.lang("Write XMP"), "F6"), OPEN_OFFICE_LIBRE_CONNECTION("Open office/libre connection", Localization.lang("Open office/libre connection"), "alt 0"),; From c421e24067302a6583a4e590d63d211a2fed74ad Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 25 Jul 2016 16:31:23 +0200 Subject: [PATCH 09/18] Tab in the maintable makes the selection go to the next entry --- .../sf/jabref/gui/maintable/MainTable.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTable.java b/src/main/java/net/sf/jabref/gui/maintable/MainTable.java index f0563672cd1..ecf015a6475 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTable.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTable.java @@ -20,11 +20,15 @@ import java.awt.Dimension; import java.awt.Point; import java.awt.Rectangle; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.Comparator; +import java.util.HashSet; import java.util.List; import java.util.Optional; +import java.util.Set; import javax.swing.BorderFactory; import javax.swing.JLabel; @@ -641,6 +645,28 @@ private TableComparatorChooser createTableComparatorChooser(JTable tab return TableComparatorChooser.install(table, list, sortingStrategy); } + /** + * KeyEvent handling of Tab + */ + private class TableKeyListener extends KeyAdapter { + + private final Set pressed = new HashSet<>(); + + @Override + public void keyPressed(KeyEvent e) { + pressed.add(e.getExtendedKeyCode()); + if (pressed.contains(KeyEvent.VK_TAB)) { + int change = pressed.contains(KeyEvent.VK_SHIFT) ? -1 : 1; + setSelected((getSelectedRow() + change + getRowCount()) % getRowCount()); + } + } + + @Override + public void keyReleased(KeyEvent e) { + pressed.remove(e.getExtendedKeyCode()); + } + } + /** * Morten Alver: This override is a workaround NullPointerException when * dragging stuff into the table. I found this in a forum, but have no idea From 1904aa9d351ff8f638e2d338fba598575d2368f9 Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 25 Jul 2016 17:16:21 +0200 Subject: [PATCH 10/18] Add KeyListener to the Table --- src/main/java/net/sf/jabref/gui/maintable/MainTable.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTable.java b/src/main/java/net/sf/jabref/gui/maintable/MainTable.java index ecf015a6475..dfb13b1ebaa 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTable.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTable.java @@ -179,6 +179,8 @@ public MainTable(MainTableFormat tableFormat, MainTableDataModel model, JabRefFr setupComparatorChooser(); model.updateMarkingState(Globals.prefs.getBoolean(JabRefPreferences.FLOAT_MARKED_ENTRIES)); setWidths(); + + addKeyListener(new TableKeyListener()); } public void addSelectionListener(ListEventListener listener) { From d5a923c87b6bf7b9d48cfbd5d8b7de41a727c2e6 Mon Sep 17 00:00:00 2001 From: mairdl Date: Wed, 27 Jul 2016 15:03:18 +0200 Subject: [PATCH 11/18] Rename Open/Libre Office into OpenOffice/LibreOffice --- src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java | 2 +- src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java index 88b88f6184d..0509fdf63ea 100644 --- a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java @@ -88,7 +88,7 @@ public enum KeyBinding { UNMARK_ENTRIES("Unmark entries", Localization.lang("Unmark entries"), "ctrl shift M"), WEB_SEARCH("Web search", Localization.lang("Web search"), "alt 4"), WRITE_XMP("Write XMP", Localization.lang("Write XMP"), "F6"), - OPEN_OFFICE_LIBRE_CONNECTION("Open office/libre connection", Localization.lang("Open office/libre connection"), "alt 0"),; + OPEN_OPEN_OFFICE_LIBRE_OFFICE_CONNECTION("Open OpenOffice/LibreOffice connection", Localization.lang("Open office/libre connection"), "alt 0"),; private final String key; private final String localization; diff --git a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java index 5c79a4ec2d3..e7bb8691461 100644 --- a/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java @@ -178,7 +178,7 @@ public JMenuItem getMenuItem() { JMenuItem item = new JMenuItem(Localization.lang("OpenOffice/LibreOffice connection"), IconTheme.getImage("openoffice")); item.addActionListener(event -> manager.show(getName())); - item.setAccelerator(Globals.getKeyPrefs().getKey(KeyBinding.OPEN_OFFICE_LIBRE_CONNECTION)); + item.setAccelerator(Globals.getKeyPrefs().getKey(KeyBinding.OPEN_OPEN_OFFICE_LIBRE_OFFICE_CONNECTION)); return item; } From 6f2b1fb079935b88bf113a72c1bbc88859bc0f84 Mon Sep 17 00:00:00 2001 From: mairdl Date: Wed, 27 Jul 2016 16:11:13 +0200 Subject: [PATCH 12/18] Added print entry preview to the right click menu --- CHANGELOG.md | 1 + src/main/java/net/sf/jabref/gui/BasePanel.java | 9 +++++++++ src/main/java/net/sf/jabref/gui/PreviewPanel.java | 4 ++++ src/main/java/net/sf/jabref/gui/actions/Actions.java | 1 + .../java/net/sf/jabref/gui/menus/RightClickMenu.java | 3 +-- 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d924b361912..f35093a83f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - Externally fetched information can be merged for entries with an ISBN - Externally fetched information can be merged for entries with an ArXiv eprint - [#1225](https://github.com/JabRef/jabref/issues/1225): Hotkey-system is now consistent +- Added print entry preview to the right click menu - [#462](https://github.com/JabRef/jabref/issues/462) Extend the OpenConsoleFeature by offering a selection between default terminal emulator and configurable command execution. - [#1516](https://github.com/JabRef/jabref/issues/1516) Selected field names are written in uppercase in the entry editor - For developers: Moved the bst package into logic. This requires the regeneration of antlr sources, execute: gradlew generateSource diff --git a/src/main/java/net/sf/jabref/gui/BasePanel.java b/src/main/java/net/sf/jabref/gui/BasePanel.java index f1bfe851f0e..4d9af64c786 100644 --- a/src/main/java/net/sf/jabref/gui/BasePanel.java +++ b/src/main/java/net/sf/jabref/gui/BasePanel.java @@ -339,6 +339,8 @@ private void setupActions() { // The action for copying selected entries. actions.put(Actions.COPY, (BaseAction) () -> copy()); + actions.put(Actions.PRINT_PREVIEW, new PrintPreviewAction()); + //when you modify this action be sure to adjust Actions.DELETE //they are the same except of the Localization, delete confirmation and Actions.COPY call actions.put(Actions.CUT, (BaseAction) () -> { @@ -2063,6 +2065,13 @@ public void action() { } } + private class PrintPreviewAction implements BaseAction { + + @Override + public void action() throws Throwable { + currentPreview.getPrintAction().actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null)); + } + } // Method pertaining to the ClipboardOwner interface. @Override diff --git a/src/main/java/net/sf/jabref/gui/PreviewPanel.java b/src/main/java/net/sf/jabref/gui/PreviewPanel.java index 8ef03648eed..991ebed89f7 100644 --- a/src/main/java/net/sf/jabref/gui/PreviewPanel.java +++ b/src/main/java/net/sf/jabref/gui/PreviewPanel.java @@ -381,7 +381,11 @@ public void actionPerformed(ActionEvent e) { previewPane.copy(); previewPane.select(0, -1); } + } + public PrintAction getPrintAction() { + return printAction; } + } diff --git a/src/main/java/net/sf/jabref/gui/actions/Actions.java b/src/main/java/net/sf/jabref/gui/actions/Actions.java index ce5d68eb69b..74e8ecebaef 100644 --- a/src/main/java/net/sf/jabref/gui/actions/Actions.java +++ b/src/main/java/net/sf/jabref/gui/actions/Actions.java @@ -64,4 +64,5 @@ public class Actions { public static final String UNMARK_ALL = "unmarkAll"; public static final String UNMARK_ENTRIES = "unmarkEntries"; public static final String WRITE_XMP = "writeXMP"; + public static final String PRINT_PREVIEW = "printPreview"; } diff --git a/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java b/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java index fc1b0301ed6..12f834bf178 100644 --- a/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java +++ b/src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java @@ -96,9 +96,8 @@ public RightClickMenu(JabRefFrame frame, BasePanel panel) { add(new GeneralAction(Actions.PASTE, Localization.lang("Paste"), IconTheme.JabRefIcon.PASTE.getSmallIcon())); add(new GeneralAction(Actions.CUT, Localization.lang("Cut"), IconTheme.JabRefIcon.CUT.getSmallIcon())); add(new GeneralAction(Actions.DELETE, Localization.lang("Delete"), IconTheme.JabRefIcon.DELETE_ENTRY.getSmallIcon())); + add(new GeneralAction(Actions.PRINT_PREVIEW, Localization.lang("Print entry preview"), IconTheme.JabRefIcon.PRINTED.getSmallIcon())); addSeparator(); - add(new GeneralAction(Actions.PRINT, Localization.lang("Print entry preview"), IconTheme.JabRefIcon.PRINTED.getSmallIcon())); - add(new GeneralAction(Actions.SEND_AS_EMAIL, Localization.lang("Send as email"), IconTheme.JabRefIcon.EMAIL.getSmallIcon())); addSeparator(); From 7109f2c471af206e2c042d205d8d3da7dae9f4be Mon Sep 17 00:00:00 2001 From: mairdl Date: Wed, 27 Jul 2016 17:05:57 +0200 Subject: [PATCH 13/18] Fix duplicate keys --- src/main/resources/l10n/JabRef_en.properties | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 050b65ad3f8..b941445328c 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2221,9 +2221,6 @@ Unable_to_generate_new_database=Unable_to_generate_new_database Open_console=Open_console Use_default_terminal_emulator=Use_default_terminal_emulator Execute_command=Execute_command -Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.=Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file. -Executing_command_\"%0\"...=Executing_command_\"%0\"... -Error_occured_while_executing_the_command_\"%0\".=Error_occured_while_executing_the_command_\"%0\". Reformat_ISSN=Reformat_ISSN Countries_and_territories_in_English=Countries_and_territories_in_English From 9aee565c30839ecfd7787e6770746e1ba7464694 Mon Sep 17 00:00:00 2001 From: mairdl Date: Thu, 28 Jul 2016 12:41:09 +0200 Subject: [PATCH 14/18] Rename Open/Libre Office into OpenOffice/LibreOffice in .proberties --- src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java | 2 +- src/main/resources/l10n/JabRef_da.properties | 2 +- src/main/resources/l10n/JabRef_de.properties | 8 +++----- src/main/resources/l10n/JabRef_en.properties | 6 +++++- src/main/resources/l10n/JabRef_es.properties | 2 +- src/main/resources/l10n/JabRef_fa.properties | 2 +- src/main/resources/l10n/JabRef_fr.properties | 2 +- src/main/resources/l10n/JabRef_in.properties | 2 +- src/main/resources/l10n/JabRef_it.properties | 2 +- src/main/resources/l10n/JabRef_ja.properties | 2 +- src/main/resources/l10n/JabRef_nl.properties | 2 +- src/main/resources/l10n/JabRef_no.properties | 2 +- src/main/resources/l10n/JabRef_pt_BR.properties | 2 +- src/main/resources/l10n/JabRef_ru.properties | 2 +- src/main/resources/l10n/JabRef_sv.properties | 2 +- src/main/resources/l10n/JabRef_tr.properties | 2 +- src/main/resources/l10n/JabRef_vi.properties | 2 +- src/main/resources/l10n/JabRef_zh.properties | 2 +- 18 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java index 0509fdf63ea..dc23c1effbd 100644 --- a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java @@ -88,7 +88,7 @@ public enum KeyBinding { UNMARK_ENTRIES("Unmark entries", Localization.lang("Unmark entries"), "ctrl shift M"), WEB_SEARCH("Web search", Localization.lang("Web search"), "alt 4"), WRITE_XMP("Write XMP", Localization.lang("Write XMP"), "F6"), - OPEN_OPEN_OFFICE_LIBRE_OFFICE_CONNECTION("Open OpenOffice/LibreOffice connection", Localization.lang("Open office/libre connection"), "alt 0"),; + OPEN_OPEN_OFFICE_LIBRE_OFFICE_CONNECTION("Open OpenOffice/LibreOffice connection", Localization.lang("Open OpenOffice/LibreOffice connection"), "alt 0"),; private final String key; private final String localization; diff --git a/src/main/resources/l10n/JabRef_da.properties b/src/main/resources/l10n/JabRef_da.properties index 1027cd9dcfb..39111c62ffa 100644 --- a/src/main/resources/l10n/JabRef_da.properties +++ b/src/main/resources/l10n/JabRef_da.properties @@ -1744,4 +1744,4 @@ Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index d766b2b0ac0..a987cd7ddce 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -2373,14 +2373,12 @@ Execute_command=Befehl_ausführen Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.=Hinweis\:_%0_als_Platzhalter_für_den_Speicherort_der_Datenbank_benutzen. Executing_command_\"%0\"...=Ausführung_des_Kommandos_\"%0\"... Error_occured_while_executing_the_command_\"%0\".=Während_der_Ausführung_des_Befehls_\"%0\"_ist_ein_Fehler_aufgetreten. - - - Reformat_ISSN= Unable_to_generate_new_database= Export_cited= +<<<<<<< HEAD Countries_and_territories_in_English= Electrical_engineering_terms= Enabled= @@ -2455,6 +2453,6 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?=Durch_einen_Abbruch_dieser_Operation_werden_die_Änderungen_nicht_synchronisiert._Trotzdem_abbrechen? The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.=Der_Eintrag,_welchen_Sie_zur_Zeit_bearbeiten,_ist_auf_der_gemeinsam_genutzen_Datenbank_nicht_mehr_vorhanden._Klicken_Sie_auf_"Behalten",_um_den_Eintrag_wiederherzustellen. Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= -New_technical_report= +New_technical_report=Neuer_technischer_Bericht -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection=Öffne_OpenOffice/LibreOffice_Verbindung diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index b941445328c..c7463b002d5 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2221,8 +2221,12 @@ Unable_to_generate_new_database=Unable_to_generate_new_database Open_console=Open_console Use_default_terminal_emulator=Use_default_terminal_emulator Execute_command=Execute_command +Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file.=Note\:_Use_the_placeholder_%0_for_the_location_of_the_opened_database_file. +Executing_command_\"%0\"...=Executing_command_\"%0\"... +Error_occured_while_executing_the_command_\"%0\".=Error_occured_while_executing_the_command_\"%0\". Reformat_ISSN=Reformat_ISSN +<<<<<<< HEAD Countries_and_territories_in_English=Countries_and_territories_in_English Electrical_engineering_terms=Electrical_engineering_terms Enabled=Enabled @@ -2283,4 +2287,4 @@ Please_merge_the_shared_entry_with_yours_and_press_"Merge_entries"_to_resolve_th Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway?=Canceling_this_operation_will_leave_your_changes_unsynchronized._Cancel_anyway? The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry.=The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Keep"_to_recover_the_entry. Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?=Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now? -Open_office/libre_connection=Open_OpenOffice/LibreOffice_connection +Open_OpenOffice/LibreOffice_connection=Open_OpenOffice/LibreOffice_connection diff --git a/src/main/resources/l10n/JabRef_es.properties b/src/main/resources/l10n/JabRef_es.properties index a4b3ff95656..e4eeac3222d 100644 --- a/src/main/resources/l10n/JabRef_es.properties +++ b/src/main/resources/l10n/JabRef_es.properties @@ -1645,4 +1645,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_fa.properties b/src/main/resources/l10n/JabRef_fa.properties index fa2d505e82b..ea3ff0b8acf 100644 --- a/src/main/resources/l10n/JabRef_fa.properties +++ b/src/main/resources/l10n/JabRef_fa.properties @@ -2426,4 +2426,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_fr.properties b/src/main/resources/l10n/JabRef_fr.properties index 737f8d1fb87..3cd7a4ea3d4 100644 --- a/src/main/resources/l10n/JabRef_fr.properties +++ b/src/main/resources/l10n/JabRef_fr.properties @@ -1686,4 +1686,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_in.properties b/src/main/resources/l10n/JabRef_in.properties index 9dc3d18ed73..e6718e00bbe 100644 --- a/src/main/resources/l10n/JabRef_in.properties +++ b/src/main/resources/l10n/JabRef_in.properties @@ -1661,4 +1661,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_it.properties b/src/main/resources/l10n/JabRef_it.properties index dbb0f2e34c6..5e388e4e526 100644 --- a/src/main/resources/l10n/JabRef_it.properties +++ b/src/main/resources/l10n/JabRef_it.properties @@ -1762,4 +1762,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_ja.properties b/src/main/resources/l10n/JabRef_ja.properties index 6a230ee2244..b4f172ecfb9 100644 --- a/src/main/resources/l10n/JabRef_ja.properties +++ b/src/main/resources/l10n/JabRef_ja.properties @@ -2403,4 +2403,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_nl.properties b/src/main/resources/l10n/JabRef_nl.properties index b0abdda1b55..fa50236d368 100644 --- a/src/main/resources/l10n/JabRef_nl.properties +++ b/src/main/resources/l10n/JabRef_nl.properties @@ -2435,4 +2435,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_no.properties b/src/main/resources/l10n/JabRef_no.properties index 9669270776c..1cc397279cf 100644 --- a/src/main/resources/l10n/JabRef_no.properties +++ b/src/main/resources/l10n/JabRef_no.properties @@ -2827,4 +2827,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_pt_BR.properties b/src/main/resources/l10n/JabRef_pt_BR.properties index 1d6a4efa7a1..561e9ece2e5 100644 --- a/src/main/resources/l10n/JabRef_pt_BR.properties +++ b/src/main/resources/l10n/JabRef_pt_BR.properties @@ -1658,4 +1658,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_ru.properties b/src/main/resources/l10n/JabRef_ru.properties index 467d2932602..fb1c62e0229 100644 --- a/src/main/resources/l10n/JabRef_ru.properties +++ b/src/main/resources/l10n/JabRef_ru.properties @@ -2404,4 +2404,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_sv.properties b/src/main/resources/l10n/JabRef_sv.properties index 8c65c943e43..fa4549c82cf 100644 --- a/src/main/resources/l10n/JabRef_sv.properties +++ b/src/main/resources/l10n/JabRef_sv.properties @@ -1603,4 +1603,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?=Kan_inte_citera_poster_utan_BibTeX-nycklar._Generera_nycklar_nu? New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_tr.properties b/src/main/resources/l10n/JabRef_tr.properties index 465d670b3af..8d97a0f4de1 100644 --- a/src/main/resources/l10n/JabRef_tr.properties +++ b/src/main/resources/l10n/JabRef_tr.properties @@ -1676,4 +1676,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_vi.properties b/src/main/resources/l10n/JabRef_vi.properties index a0088b4b13f..e81876fd612 100644 --- a/src/main/resources/l10n/JabRef_vi.properties +++ b/src/main/resources/l10n/JabRef_vi.properties @@ -2430,4 +2430,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= diff --git a/src/main/resources/l10n/JabRef_zh.properties b/src/main/resources/l10n/JabRef_zh.properties index 9995f75e9ad..5343311ced6 100644 --- a/src/main/resources/l10n/JabRef_zh.properties +++ b/src/main/resources/l10n/JabRef_zh.properties @@ -1670,4 +1670,4 @@ The_BibEntry_you_currently_work_on_has_been_deleted_on_the_shared_side._Hit_"Kee Cannot_cite_entries_without_BibTeX_keys._Generate_keys_now?= New_technical_report= -Open_office/libre_connection= +Open_OpenOffice/LibreOffice_connection= From c057f7cd22962409c532a49bfb5052178de5e075 Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 1 Aug 2016 14:34:05 +0200 Subject: [PATCH 15/18] PrintEntryPreview now opens the EntryPreview if it's not active --- src/main/java/net/sf/jabref/gui/BasePanel.java | 12 ++++++++---- .../gui/maintable/MainTableSelectionListener.java | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/BasePanel.java b/src/main/java/net/sf/jabref/gui/BasePanel.java index 4d9af64c786..ad89c8f31e6 100644 --- a/src/main/java/net/sf/jabref/gui/BasePanel.java +++ b/src/main/java/net/sf/jabref/gui/BasePanel.java @@ -2067,11 +2067,15 @@ public void action() { private class PrintPreviewAction implements BaseAction { - @Override - public void action() throws Throwable { + @Override + public void action() throws Throwable { + if (currentPreview == null) { + selectionListener.setPreviewActive(true); + showPreview(selectionListener.getPreview()); + } currentPreview.getPrintAction().actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null)); - } - } + } + } // Method pertaining to the ClipboardOwner interface. @Override diff --git a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java index 32a1e494b73..cfa8465217b 100644 --- a/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java +++ b/src/main/java/net/sf/jabref/gui/maintable/MainTableSelectionListener.java @@ -575,4 +575,8 @@ public void focusGained(FocusEvent e) { public void focusLost(FocusEvent e) { lastPressedCount = 0; // Reset quick jump when focus is lost. } + + public PreviewPanel getPreview() { + return preview; + } } From 05feb276c039275f5f5e7402b247f7190ad0940a Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 1 Aug 2016 17:27:34 +0200 Subject: [PATCH 16/18] Change throwable into Exception --- src/main/java/net/sf/jabref/gui/BasePanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/sf/jabref/gui/BasePanel.java b/src/main/java/net/sf/jabref/gui/BasePanel.java index ad89c8f31e6..16adce2909f 100644 --- a/src/main/java/net/sf/jabref/gui/BasePanel.java +++ b/src/main/java/net/sf/jabref/gui/BasePanel.java @@ -2068,7 +2068,7 @@ public void action() { private class PrintPreviewAction implements BaseAction { @Override - public void action() throws Throwable { + public void action() throws Exception { if (currentPreview == null) { selectionListener.setPreviewActive(true); showPreview(selectionListener.getPreview()); From ec8a1d82c1413e990866a49cf76506bb012196f9 Mon Sep 17 00:00:00 2001 From: mairdl Date: Wed, 3 Aug 2016 16:35:29 +0200 Subject: [PATCH 17/18] Remove the hotkey for edit preamble --- src/main/java/net/sf/jabref/gui/JabRefFrame.java | 3 +-- src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index aa53b77595f..9f5c10414a8 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -325,8 +325,7 @@ public class JabRefFrame extends JFrame implements OutputPrinter { private final AbstractAction editPreamble = new GeneralAction(Actions.EDIT_PREAMBLE, Localization.menuTitle("Edit preamble"), - Localization.lang("Edit preamble"), - Globals.getKeyPrefs().getKey(KeyBinding.EDIT_PREAMBLE)); + Localization.lang("Edit preamble")); private final AbstractAction editStrings = new GeneralAction(Actions.EDIT_STRINGS, Localization.menuTitle("Edit strings"), Localization.lang("Edit strings"), diff --git a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java index dc23c1effbd..6e39a1222f7 100644 --- a/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java +++ b/src/main/java/net/sf/jabref/gui/keyboard/KeyBinding.java @@ -25,7 +25,6 @@ public enum KeyBinding { DECREASE_TABLE_FONT_SIZE("Decrease table font size", Localization.lang("Decrease table font size"), "ctrl MINUS"), DELETE_ENTRY("Delete entry", Localization.lang("Delete entry"), "DELETE"), EDIT_ENTRY("Edit entry", Localization.lang("Edit entry"), "ctrl E"), - EDIT_PREAMBLE("Edit preamble", Localization.lang("Edit preamble"), "alt P"), EDIT_STRINGS("Edit strings", Localization.lang("Edit strings"), "ctrl T"), ENTRY_EDITOR_NEXT_ENTRY("Entry editor, next entry", Localization.lang("Entry editor, next entry"), "ctrl shift DOWN"), ENTRY_EDITOR_NEXT_PANEL("Entry editor, next panel", Localization.lang("Entry editor, next panel"), "ctrl TAB"), From f1a3bdbe24c2c6573dd66386eb51798ac0c38f4b Mon Sep 17 00:00:00 2001 From: mairdl Date: Mon, 8 Aug 2016 13:35:39 +0200 Subject: [PATCH 18/18] Remove merge marker --- src/main/resources/l10n/JabRef_de.properties | 1 - src/main/resources/l10n/JabRef_en.properties | 1 - 2 files changed, 2 deletions(-) diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index a987cd7ddce..a7385c24090 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -2378,7 +2378,6 @@ Reformat_ISSN= Unable_to_generate_new_database= Export_cited= -<<<<<<< HEAD Countries_and_territories_in_English= Electrical_engineering_terms= Enabled= diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index c7463b002d5..a20e6173ec2 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2226,7 +2226,6 @@ Executing_command_\"%0\"...=Executing_command_\"%0\"... Error_occured_while_executing_the_command_\"%0\".=Error_occured_while_executing_the_command_\"%0\". Reformat_ISSN=Reformat_ISSN -<<<<<<< HEAD Countries_and_territories_in_English=Countries_and_territories_in_English Electrical_engineering_terms=Electrical_engineering_terms Enabled=Enabled