From 7cdd7fe2651810501e239352d7ce9d08563b3749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Fri, 1 Mar 2019 11:25:39 +0100 Subject: [PATCH 1/8] Group and reorder the Main Menu (tabs & icons) --- CHANGELOG.md | 1 + src/main/java/org/jabref/gui/Base.css | 4 +- src/main/java/org/jabref/gui/JabRefFrame.java | 101 +++++++----------- .../org/jabref/gui/actions/ActionFactory.java | 8 ++ .../jabref/gui/actions/StandardActions.java | 49 +++++---- .../java/org/jabref/gui/icon/IconTheme.java | 8 +- src/main/resources/l10n/JabRef_en.properties | 25 +++-- 7 files changed, 100 insertions(+), 96 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 560b2236e0a..646ffbe4bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We added the ability to add field names from the Preferences Dialog [#4546](https://github.com/JabRef/jabref/issues/4546) - We added the ability change the column widths directly in the main table. [#4546](https://github.com/JabRef/jabref/issues/4546) - We added the ability to execute default action in dialog by using with Ctrl + Enter combination [#4496](https://github.com/JabRef/jabref/issues/4496) +- We grouped and reordered the Main Menu (File, Edit, Library, Quality, Tools, and View tabs & icons). [#4666](https://github.com/JabRef/jabref/issues/4666) [#4667](https://github.com/JabRef/jabref/issues/4667) [#4668](https://github.com/JabRef/jabref/issues/4668) [#4669](https://github.com/JabRef/jabref/issues/4669) [#4670](https://github.com/JabRef/jabref/issues/4670) [#4671](https://github.com/JabRef/jabref/issues/4671) [#4672](https://github.com/JabRef/jabref/issues/4672) [#4673](https://github.com/JabRef/jabref/issues/4673) diff --git a/src/main/java/org/jabref/gui/Base.css b/src/main/java/org/jabref/gui/Base.css index ab4097899cc..e9c36458ba8 100644 --- a/src/main/java/org/jabref/gui/Base.css +++ b/src/main/java/org/jabref/gui/Base.css @@ -818,8 +818,8 @@ .separator:horizontal .line { -fx-border-color: -jr-separator; - -fx-border-width: 0; - -fx-border-insets: 1 0 0 0; + -fx-border-width: 0.3; + -fx-border-insets: 1 15 0 20; } .separator:vertical .line { diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 8346fe58e7f..a00379f6d8e 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -126,7 +126,6 @@ import org.jabref.model.database.shared.DatabaseLocation; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.BiblatexEntryTypes; -import org.jabref.model.entry.BibtexEntryTypes; import org.jabref.model.entry.FieldName; import org.jabref.model.entry.specialfields.SpecialField; import org.jabref.preferences.JabRefPreferences; @@ -735,35 +734,35 @@ private MenuBar createMenu() { Menu help = new Menu(Localization.lang("Help")); file.getItems().addAll( - factory.createMenuItem(StandardActions.NEW_LIBRARY_BIBTEX, new NewDatabaseAction(this, BibDatabaseMode.BIBTEX)), - factory.createMenuItem(StandardActions.NEW_LIBRARY_BIBLATEX, new NewDatabaseAction(this, BibDatabaseMode.BIBLATEX)), + factory.createSubMenu(StandardActions.NEW_LIBRARY, + factory.createMenuItem(StandardActions.NEW_LIBRARY_BIBTEX, new NewDatabaseAction(this, BibDatabaseMode.BIBTEX)), + factory.createMenuItem(StandardActions.NEW_LIBRARY_BIBLATEX, new NewDatabaseAction(this, BibDatabaseMode.BIBLATEX))), + factory.createMenuItem(StandardActions.OPEN_LIBRARY, getOpenDatabaseAction()), + fileHistory, factory.createMenuItem(StandardActions.SAVE_LIBRARY, new OldDatabaseCommandWrapper(Actions.SAVE, this, Globals.stateManager)), factory.createMenuItem(StandardActions.SAVE_LIBRARY_AS, new OldDatabaseCommandWrapper(Actions.SAVE_AS, this, Globals.stateManager)), factory.createMenuItem(StandardActions.SAVE_ALL, new SaveAllAction(this)), - factory.createSubMenu(StandardActions.IMPORT_EXPORT, + new SeparatorMenuItem(), + + factory.createSubMenu(StandardActions.IMPORT, factory.createMenuItem(StandardActions.MERGE_DATABASE, new OldDatabaseCommandWrapper(Actions.MERGE_DATABASE, this, Globals.stateManager)), // TODO: merge with import factory.createMenuItem(StandardActions.IMPORT_INTO_CURRENT_LIBRARY, new ImportCommand(this, false)), - factory.createMenuItem(StandardActions.IMPORT_INTO_NEW_LIBRARY, new ImportCommand(this, true)), + factory.createMenuItem(StandardActions.IMPORT_INTO_NEW_LIBRARY, new ImportCommand(this, true))), + + factory.createSubMenu(StandardActions.EXPORT, factory.createMenuItem(StandardActions.EXPORT_ALL, new ExportCommand(this, false, Globals.prefs)), factory.createMenuItem(StandardActions.EXPORT_SELECTED, new ExportCommand(this, true, Globals.prefs)), factory.createMenuItem(StandardActions.SAVE_SELECTED_AS_PLAIN_BIBTEX, new OldDatabaseCommandWrapper(Actions.SAVE_SELECTED_AS_PLAIN, this, Globals.stateManager))), - new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.CONNECT_TO_SHARED_DB, new ConnectToSharedDatabaseCommand(this)), factory.createMenuItem(StandardActions.PULL_CHANGES_FROM_SHARED_DB, new OldDatabaseCommandWrapper(Actions.PULL_CHANGES_FROM_SHARED_DATABASE, this, Globals.stateManager)), new SeparatorMenuItem(), - fileHistory, - - new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.CLOSE_LIBRARY, new CloseDatabaseAction()), factory.createMenuItem(StandardActions.QUIT, new CloseAction()) - ); edit.getItems().addAll( @@ -788,18 +787,15 @@ private MenuBar createMenu() { new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.SEND_AS_EMAIL, new OldDatabaseCommandWrapper(Actions.SEND_AS_EMAIL, this, Globals.stateManager)), - - new SeparatorMenuItem() - + factory.createMenuItem(StandardActions.MANAGE_KEYWORDS, new ManageKeywordsAction(this)) ); if (Globals.prefs.getBoolean(JabRefPreferences.SPECIALFIELDSENABLED)) { boolean menuItemAdded = false; - if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RANKING)) { + /*if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RANKING)) { edit.getItems().add(SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.RANKING, factory, undoManager)); menuItemAdded = true; - } + }*/ if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RELEVANCE)) { edit.getItems().add(SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.RELEVANCE, factory)); @@ -831,28 +827,18 @@ private MenuBar createMenu() { } } - edit.getItems().addAll( - factory.createMenuItem(StandardActions.MANAGE_KEYWORDS, new ManageKeywordsAction(this)), - factory.createMenuItem(StandardActions.REPLACE_ALL, new OldDatabaseCommandWrapper(Actions.REPLACE_ALL, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.MASS_SET_FIELDS, new MassSetFieldsAction(this)) - - ); - library.getItems().addAll( - factory.createMenuItem(StandardActions.NEW_ARTICLE, new NewEntryAction(this, BibtexEntryTypes.ARTICLE, dialogService, Globals.prefs)), factory.createMenuItem(StandardActions.NEW_ENTRY, new NewEntryAction(this, dialogService, Globals.prefs)), factory.createMenuItem(StandardActions.NEW_ENTRY_FROM_PLAINTEX, new NewEntryFromPlainTextAction(this, Globals.prefs.getUpdateFieldPreferences(), dialogService, Globals.prefs)), - - new SeparatorMenuItem(), - + factory.createMenuItem(StandardActions.NEW_SUB_LIBRARY_FROM_AUX, new NewSubLibraryAction(this)), factory.createMenuItem(StandardActions.DELETE_ENTRY, new OldDatabaseCommandWrapper(Actions.DELETE, this, Globals.stateManager)), new SeparatorMenuItem(), factory.createMenuItem(StandardActions.LIBRARY_PROPERTIES, new DatabasePropertiesAction(this)), factory.createMenuItem(StandardActions.EDIT_PREAMBLE, new PreambleEditor(this)), - factory.createMenuItem(StandardActions.EDIT_STRINGS, new BibtexStringEditorAction(this)) - + factory.createMenuItem(StandardActions.EDIT_STRINGS, new BibtexStringEditorAction(this)), + factory.createMenuItem(StandardActions.MASS_SET_FIELDS, new MassSetFieldsAction(this)) ); Menu lookupIdentifiers = factory.createSubMenu(StandardActions.LOOKUP_DOC_IDENTIFIER); @@ -865,19 +851,12 @@ private MenuBar createMenu() { quality.getItems().addAll( factory.createMenuItem(StandardActions.FIND_DUPLICATES, new DuplicateSearch(this, dialogService)), factory.createMenuItem(StandardActions.MERGE_ENTRIES, new MergeEntriesAction(this)), - - new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.CHECK_INTEGRITY, new IntegrityCheckAction(this)), factory.createMenuItem(StandardActions.CLEANUP_ENTRIES, new OldDatabaseCommandWrapper(Actions.CLEANUP, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, Globals.stateManager)), new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.SET_FILE_LINKS, new AutoLinkFilesAction()), - factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this)), - lookupIdentifiers, - factory.createMenuItem(StandardActions.DOWNLOAD_FULL_TEXT, new OldDatabaseCommandWrapper(Actions.DOWNLOAD_FULL_TEXT, this, Globals.stateManager)) + factory.createMenuItem(StandardActions.SET_FILE_LINKS, new AutoLinkFilesAction()) ); SidePaneComponent webSearch = sidePaneManager.getComponent(SidePaneType.WEB_SEARCH); @@ -885,44 +864,44 @@ private MenuBar createMenu() { SidePaneComponent openOffice = sidePaneManager.getComponent(SidePaneType.OPEN_OFFICE); view.getItems().addAll( - factory.createMenuItem(webSearch.getToggleAction(), webSearch.getToggleCommand()), - factory.createMenuItem(groups.getToggleAction(), groups.getToggleCommand()), - factory.createMenuItem(StandardActions.TOGGLE_PREVIEW, new OldDatabaseCommandWrapper(Actions.TOGGLE_PREVIEW, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.EDIT_ENTRY, new OldDatabaseCommandWrapper(Actions.EDIT, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.SHOW_PDV_VIEWER, new ShowDocumentViewerAction()), + factory.createCheckMenuItem(webSearch.getToggleAction(), webSearch.getToggleCommand()), + factory.createCheckMenuItem(groups.getToggleAction(), groups.getToggleCommand()), - new SeparatorMenuItem(), + factory.createSubMenu(StandardActions.TOGGLE_PREVIEW, + factory.createMenuItem(StandardActions.NEXT_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.NEXT_PREVIEW_STYLE, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.PREVIOUS_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.PREVIOUS_PREVIEW_STYLE, this, Globals.stateManager))), - factory.createMenuItem(StandardActions.SELECT_ALL, new OldDatabaseCommandWrapper(Actions.SELECT_ALL, this, Globals.stateManager)), + factory.createCheckMenuItem(openOffice.getToggleAction(), openOffice.getToggleCommand()), new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.NEXT_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.NEXT_PREVIEW_STYLE, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.PREVIOUS_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.PREVIOUS_PREVIEW_STYLE, this, Globals.stateManager)) + factory.createMenuItem(StandardActions.SHOW_PDV_VIEWER, new ShowDocumentViewerAction()), + factory.createMenuItem(StandardActions.EDIT_ENTRY, new OldDatabaseCommandWrapper(Actions.EDIT, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.OPEN_CONSOLE, new OldDatabaseCommandWrapper(Actions.OPEN_CONSOLE, this, Globals.stateManager)) ); PushToApplicationButton pushToExternal = new PushToApplicationButton(this, pushApplications.getApplications()); tools.getItems().addAll( - factory.createMenuItem(StandardActions.NEW_SUB_LIBRARY_FROM_AUX, new NewSubLibraryAction(this)), + factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this)), factory.createMenuItem(StandardActions.WRITE_XMP, new OldDatabaseCommandWrapper(Actions.WRITE_XMP, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.COPY_LINKED_FILES, new CopyFilesAction(this)), new SeparatorMenuItem(), - factory.createMenuItem(openOffice.getToggleAction(), openOffice.getToggleCommand()), - factory.createMenuItem(pushToExternal.getMenuAction(), pushToExternal), + lookupIdentifiers, + factory.createMenuItem(StandardActions.DOWNLOAD_FULL_TEXT, new OldDatabaseCommandWrapper(Actions.DOWNLOAD_FULL_TEXT, this, Globals.stateManager)), new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.OPEN_FOLDER, new OldDatabaseCommandWrapper(Actions.OPEN_FOLDER, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.OPEN_FILE, new OldDatabaseCommandWrapper(Actions.OPEN_EXTERNAL_FILE, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.OPEN_URL, new OldDatabaseCommandWrapper(Actions.OPEN_URL, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.OPEN_CONSOLE, new OldDatabaseCommandWrapper(Actions.OPEN_CONSOLE, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.COPY_LINKED_FILES, new CopyFilesAction(this)), + factory.createMenuItem(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.REPLACE_ALL, new OldDatabaseCommandWrapper(Actions.REPLACE_ALL, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.SEND_AS_EMAIL, new OldDatabaseCommandWrapper(Actions.SEND_AS_EMAIL, this, Globals.stateManager)), + factory.createMenuItem(pushToExternal.getMenuAction(), pushToExternal), - new SeparatorMenuItem(), + factory.createSubMenu(StandardActions.ABBREVIATE, + factory.createMenuItem(StandardActions.ABBREVIATE_ISO, new OldDatabaseCommandWrapper(Actions.ABBREVIATE_ISO, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.ABBREVIATE_MEDLINE, new OldDatabaseCommandWrapper(Actions.ABBREVIATE_MEDLINE, this, Globals.stateManager))), - factory.createMenuItem(StandardActions.ABBREVIATE_ISO, new OldDatabaseCommandWrapper(Actions.ABBREVIATE_ISO, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.ABBREVIATE_MEDLINE, new OldDatabaseCommandWrapper(Actions.ABBREVIATE_MEDLINE, this, Globals.stateManager)), factory.createMenuItem(StandardActions.UNABBREVIATE, new OldDatabaseCommandWrapper(Actions.UNABBREVIATE, this, Globals.stateManager)) ); @@ -943,7 +922,8 @@ private MenuBar createMenu() { factory.createMenuItem(StandardActions.MANAGE_CONTENT_SELECTORS, new ManageContentSelectorAction(this)), factory.createMenuItem(StandardActions.CUSTOMIZE_ENTRY_TYPES, new CustomizeEntryAction(this)), - factory.createMenuItem(StandardActions.MANAGE_CITE_KEY_PATTERNS, new BibtexKeyPatternAction(this))); + factory.createMenuItem(StandardActions.MANAGE_CITE_KEY_PATTERNS, new BibtexKeyPatternAction(this)) + ); help.getItems().addAll( factory.createMenuItem(StandardActions.HELP, HelpAction.getMainHelpPageCommand()), @@ -975,6 +955,7 @@ private MenuBar createMenu() { ), factory.createMenuItem(StandardActions.ABOUT, new AboutAction()) ); + //@formatter:on MenuBar menu = new MenuBar(); menu.getStyleClass().add("mainMenu"); diff --git a/src/main/java/org/jabref/gui/actions/ActionFactory.java b/src/main/java/org/jabref/gui/actions/ActionFactory.java index 51c77f1f8d2..d27028c7cd3 100644 --- a/src/main/java/org/jabref/gui/actions/ActionFactory.java +++ b/src/main/java/org/jabref/gui/actions/ActionFactory.java @@ -5,6 +5,7 @@ import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.ButtonBase; +import javafx.scene.control.CheckMenuItem; import javafx.scene.control.Menu; import javafx.scene.control.MenuItem; @@ -43,6 +44,13 @@ public MenuItem createMenuItem(Action action, Command command) { return menuItem; } + public CheckMenuItem createCheckMenuItem(Action action, Command command) { + CheckMenuItem checkMenuItem = ActionUtils.createCheckMenuItem(new JabRefAction(action, command, keyBindingRepository)); + setGraphic(checkMenuItem, action); + + return checkMenuItem; + } + public Menu createMenu(Action action) { Menu menu = ActionUtils.createMenu(new JabRefAction(action, keyBindingRepository)); diff --git a/src/main/java/org/jabref/gui/actions/StandardActions.java b/src/main/java/org/jabref/gui/actions/StandardActions.java index 69321ed5766..c9fcdd0f2af 100644 --- a/src/main/java/org/jabref/gui/actions/StandardActions.java +++ b/src/main/java/org/jabref/gui/actions/StandardActions.java @@ -60,10 +60,12 @@ public enum StandardActions implements Action { SKIMMED(Localization.lang("Set read status to skimmed"), IconTheme.JabRefIcons.READ_STATUS_SKIMMED), RELEVANCE(Localization.lang("Relevance"), IconTheme.JabRefIcons.RELEVANCE), RELEVANT(Localization.lang("Toggle relevance"), IconTheme.JabRefIcons.RELEVANCE), - NEW_LIBRARY_BIBTEX(Localization.lang("New %0 library", BibDatabaseMode.BIBTEX.getFormattedName()), IconTheme.JabRefIcons.NEW), - NEW_LIBRARY_BIBLATEX(Localization.lang("New %0 library", BibDatabaseMode.BIBLATEX.getFormattedName()), IconTheme.JabRefIcons.NEW), + NEW_LIBRARY(Localization.lang("New library"), IconTheme.JabRefIcons.NEW), + NEW_LIBRARY_BIBTEX(Localization.lang("New %0 library", BibDatabaseMode.BIBTEX.getFormattedName())), + NEW_LIBRARY_BIBLATEX(Localization.lang("New %0 library", BibDatabaseMode.BIBLATEX.getFormattedName())), OPEN_LIBRARY(Localization.lang("Open library"), IconTheme.JabRefIcons.OPEN, KeyBinding.OPEN_DATABASE), - IMPORT_EXPORT(Localization.lang("Import & Export"), IconTheme.JabRefIcons.IMPORT_EXPORT), + IMPORT(Localization.lang("Import"), IconTheme.JabRefIcons.IMPORT), + EXPORT(Localization.lang("Export"), IconTheme.JabRefIcons.EXPORT), MERGE_DATABASE(Localization.lang("Append library"), Localization.lang("Append contents from a BibTeX library into the currently viewed library")), SAVE_LIBRARY(Localization.lang("Save library"), IconTheme.JabRefIcons.SAVE, KeyBinding.SAVE_DATABASE), SAVE_LIBRARY_AS(Localization.lang("Save library as..."), KeyBinding.SAVE_DATABASE_AS), @@ -71,19 +73,19 @@ public enum StandardActions implements Action { SAVE_ALL(Localization.lang("Save all"), Localization.lang("Save all open libraries"), IconTheme.JabRefIcons.SAVE_ALL, KeyBinding.SAVE_ALL), IMPORT_INTO_NEW_LIBRARY(Localization.lang("Import into new library"), KeyBinding.IMPORT_INTO_NEW_DATABASE), IMPORT_INTO_CURRENT_LIBRARY(Localization.lang("Import into current library"), KeyBinding.IMPORT_INTO_CURRENT_DATABASE), - EXPORT_ALL(Localization.lang("Export")), + EXPORT_ALL(Localization.lang("Export all entries")), EXPORT_SELECTED(Localization.lang("Export selected entries")), - CONNECT_TO_SHARED_DB(Localization.lang("Connect to shared database")), - PULL_CHANGES_FROM_SHARED_DB(Localization.lang("Pull changes from shared database"), IconTheme.JabRefIcons.PULL, KeyBinding.PULL_CHANGES_FROM_SHARED_DATABASE), + CONNECT_TO_SHARED_DB(Localization.lang("Connect to shared database"), IconTheme.JabRefIcons.CONNECT_DB), + PULL_CHANGES_FROM_SHARED_DB(Localization.lang("Pull changes from shared database"), KeyBinding.PULL_CHANGES_FROM_SHARED_DATABASE), CLOSE_LIBRARY(Localization.lang("Close library"), Localization.lang("Close the current library"), IconTheme.JabRefIcons.CLOSE, KeyBinding.CLOSE_DATABASE), QUIT(Localization.lang("Quit"), Localization.lang("Quit JabRef"), IconTheme.JabRefIcons.CLOSE_JABREF, KeyBinding.QUIT_JABREF), UNDO(Localization.lang("Undo"), IconTheme.JabRefIcons.UNDO, KeyBinding.UNDO), REDO(Localization.lang("Redo"), IconTheme.JabRefIcons.REDO, KeyBinding.REDO), REPLACE_ALL(Localization.lang("Replace string"), KeyBinding.REPLACE_STRING), MANAGE_KEYWORDS(Localization.lang("Manage keywords")), - MASS_SET_FIELDS(Localization.lang("Set/clear/append/rename fields")), - TOGGLE_GROUPS(Localization.lang("Toggle groups interface"), IconTheme.JabRefIcons.TOGGLE_GROUPS, KeyBinding.TOGGLE_GROUPS_INTERFACE), - TOOGLE_OO(Localization.lang("OpenOffice/LibreOffice connection"), IconTheme.JabRefIcons.FILE_OPENOFFICE, KeyBinding.OPEN_OPEN_OFFICE_LIBRE_OFFICE_CONNECTION), + MASS_SET_FIELDS(Localization.lang("Manage field names & content")), + TOGGLE_GROUPS(Localization.lang("Groups interface"), IconTheme.JabRefIcons.TOGGLE_GROUPS, KeyBinding.TOGGLE_GROUPS_INTERFACE), + TOOGLE_OO(Localization.lang("OpenOffice/LibreOffice"), IconTheme.JabRefIcons.FILE_OPENOFFICE, KeyBinding.OPEN_OPEN_OFFICE_LIBRE_OFFICE_CONNECTION), TOGGLE_WEB_SEARCH(Localization.lang("Web search"), Localization.lang("Toggle web search interface"), IconTheme.JabRefIcons.WWW, KeyBinding.WEB_SEARCH), NEW_SUB_LIBRARY_FROM_AUX(Localization.lang("New sublibrary based on AUX file") + "...", Localization.lang("New BibTeX sublibrary") + Localization.lang("This feature generates a new library based on which entries are needed in an existing LaTeX document."), IconTheme.JabRefIcons.NEW), @@ -92,8 +94,9 @@ public enum StandardActions implements Action { OPEN_FILE(Localization.lang("Open file"), Localization.lang("Open file"), IconTheme.JabRefIcons.FILE, KeyBinding.OPEN_FILE), OPEN_CONSOLE(Localization.lang("Open terminal here"), Localization.lang("Open terminal here"), IconTheme.JabRefIcons.CONSOLE, KeyBinding.OPEN_CONSOLE), COPY_LINKED_FILES(Localization.lang("Copy linked files to folder...")), - ABBREVIATE_ISO(Localization.lang("Abbreviate journal names (ISO)"), Localization.lang("Abbreviate journal names of the selected entries (ISO abbreviation)"), KeyBinding.ABBREVIATE), - ABBREVIATE_MEDLINE(Localization.lang("Abbreviate journal names (MEDLINE)"), Localization.lang("Abbreviate journal names of the selected entries (MEDLINE abbreviation)")), + ABBREVIATE(Localization.lang("Abbreviate journal names")), + ABBREVIATE_ISO(Localization.lang("ISO"), Localization.lang("Abbreviate journal names of the selected entries (ISO abbreviation)"), KeyBinding.ABBREVIATE), + ABBREVIATE_MEDLINE(Localization.lang("MEDLINE"), Localization.lang("Abbreviate journal names of the selected entries (MEDLINE abbreviation)")), UNABBREVIATE(Localization.lang("Unabbreviate journal names"), Localization.lang("Unabbreviate journal names of the selected entries"), KeyBinding.UNABBREVIATE), MANAGE_CUSTOM_EXPORTS(Localization.lang("Manage custom exports")), @@ -109,11 +112,11 @@ public enum StandardActions implements Action { MANAGE_CONTENT_SELECTORS(Localization.lang("Manage content selectors"), IconTheme.JabRefIcons.PREFERENCES), MANAGE_CITE_KEY_PATTERNS(Localization.lang("BibTeX key patterns")), - TOGGLE_PREVIEW(Localization.lang("Toggle entry preview"), IconTheme.JabRefIcons.TOGGLE_ENTRY_PREVIEW, KeyBinding.TOGGLE_ENTRY_PREVIEW), - EDIT_ENTRY(Localization.lang("Edit entry"), IconTheme.JabRefIcons.EDIT_ENTRY, KeyBinding.EDIT_ENTRY), - SHOW_PDV_VIEWER(Localization.lang("Show document viewer"), IconTheme.JabRefIcons.PDF_FILE), - NEXT_PREVIEW_STYLE(Localization.lang("Next preview layout"), KeyBinding.NEXT_PREVIEW_LAYOUT), - PREVIOUS_PREVIEW_STYLE(Localization.lang("Previous preview layout"), KeyBinding.PREVIOUS_PREVIEW_LAYOUT), + EDIT_ENTRY(Localization.lang("Open entry editor"), IconTheme.JabRefIcons.EDIT_ENTRY, KeyBinding.EDIT_ENTRY), + SHOW_PDV_VIEWER(Localization.lang("Open document viewer"), IconTheme.JabRefIcons.PDF_FILE), + TOGGLE_PREVIEW(Localization.lang("Entry preview"), IconTheme.JabRefIcons.TOGGLE_ENTRY_PREVIEW, KeyBinding.TOGGLE_ENTRY_PREVIEW), + NEXT_PREVIEW_STYLE(Localization.lang("Next citation style"), KeyBinding.NEXT_PREVIEW_LAYOUT), + PREVIOUS_PREVIEW_STYLE(Localization.lang("Previous citation style"), KeyBinding.PREVIOUS_PREVIEW_LAYOUT), SELECT_ALL(Localization.lang("Select all"), KeyBinding.SELECT_ALL), NEW_ENTRY(Localization.lang("New entry"), IconTheme.JabRefIcons.ADD_ENTRY, KeyBinding.NEW_ENTRY), @@ -121,21 +124,21 @@ public enum StandardActions implements Action { NEW_ENTRY_FROM_PLAINTEX(Localization.lang("New entry from plain text"), KeyBinding.NEW_FROM_PLAIN_TEXT), LIBRARY_PROPERTIES(Localization.lang("Library properties")), EDIT_PREAMBLE(Localization.lang("Edit preamble")), - EDIT_STRINGS(Localization.lang("Edit strings"), IconTheme.JabRefIcons.EDIT_STRINGS, KeyBinding.EDIT_STRINGS), + EDIT_STRINGS(Localization.lang("Edit string constants"), IconTheme.JabRefIcons.EDIT_STRINGS, KeyBinding.EDIT_STRINGS), FIND_DUPLICATES(Localization.lang("Find duplicates"), IconTheme.JabRefIcons.FIND_DUPLICATES), MERGE_ENTRIES(Localization.lang("Merge entries"), IconTheme.JabRefIcons.MERGE_ENTRIES), RESOLVE_DUPLICATE_KEYS(Localization.lang("Resolve duplicate BibTeX keys"), Localization.lang("Find and remove duplicate BibTeX keys"), KeyBinding.RESOLVE_DUPLICATE_BIBTEX_KEYS), CHECK_INTEGRITY(Localization.lang("Check integrity"), KeyBinding.CHECK_INTEGRITY), - FIND_UNLINKED_FILES(Localization.lang("Find unlinked files"), Localization.lang("Searches for unlinked PDF files on the file system"), KeyBinding.FIND_UNLINKED_FILES), + FIND_UNLINKED_FILES(Localization.lang("Search for unlinked local files"), IconTheme.JabRefIcons.SEARCH, KeyBinding.FIND_UNLINKED_FILES), AUTO_LINK_FILES(Localization.lang("Automatically set file links"), IconTheme.JabRefIcons.AUTO_FILE_LINK, KeyBinding.AUTOMATICALLY_LINK_FILES), - LOOKUP_DOC_IDENTIFIER(Localization.lang("Look up document identifier")), - LOOKUP_FULLTEXT(Localization.lang("Look up full text documents"), KeyBinding.DOWNLOAD_FULL_TEXT), + LOOKUP_DOC_IDENTIFIER(Localization.lang("Search document identifier online")), + LOOKUP_FULLTEXT(Localization.lang("Search full text documents online"), IconTheme.JabRefIcons.FILE_SEARCH, KeyBinding.DOWNLOAD_FULL_TEXT), GENERATE_CITE_KEY(Localization.lang("Generate BibTeX key"), IconTheme.JabRefIcons.MAKE_KEY, KeyBinding.AUTOGENERATE_BIBTEX_KEYS), - GENERATE_CITE_KEYS(Localization.lang("Autogenerate BibTeX keys"), IconTheme.JabRefIcons.MAKE_KEY, KeyBinding.AUTOGENERATE_BIBTEX_KEYS), - DOWNLOAD_FULL_TEXT(Localization.lang("Look up full text documents"), KeyBinding.DOWNLOAD_FULL_TEXT), + GENERATE_CITE_KEYS(Localization.lang("Generate BibTeX keys"), IconTheme.JabRefIcons.MAKE_KEY, KeyBinding.AUTOGENERATE_BIBTEX_KEYS), + DOWNLOAD_FULL_TEXT(Localization.lang("Search full text documents online"), IconTheme.JabRefIcons.FILE_SEARCH, KeyBinding.DOWNLOAD_FULL_TEXT), CLEANUP_ENTRIES(Localization.lang("Cleanup entries"), IconTheme.JabRefIcons.CLEANUP_ENTRIES, KeyBinding.CLEANUP), - SET_FILE_LINKS(Localization.lang("Automatically set file links"), IconTheme.JabRefIcons.AUTO_FILE_LINK, KeyBinding.AUTOMATICALLY_LINK_FILES), + SET_FILE_LINKS(Localization.lang("Automatically set file links"), KeyBinding.AUTOMATICALLY_LINK_FILES), HELP(Localization.lang("Online help"), IconTheme.JabRefIcons.HELP, KeyBinding.HELP), WEB_MENU(Localization.lang("JabRef resources")), diff --git a/src/main/java/org/jabref/gui/icon/IconTheme.java b/src/main/java/org/jabref/gui/icon/IconTheme.java index 5c0510f862a..49cfe8ba53a 100644 --- a/src/main/java/org/jabref/gui/icon/IconTheme.java +++ b/src/main/java/org/jabref/gui/icon/IconTheme.java @@ -205,6 +205,7 @@ public enum JabRefIcons implements JabRefIcon { REFRESH(MaterialDesignIcon.REFRESH), DELETE_ENTRY(MaterialDesignIcon.DELETE), SEARCH(MaterialDesignIcon.MAGNIFY), + FILE_SEARCH(MaterialDesignIcon.FILE_FIND), ADVANCED_SEARCH(Color.CYAN, MaterialDesignIcon.MAGNIFY), PREFERENCES(MaterialDesignIcon.SETTINGS), HELP(MaterialDesignIcon.HELP_CIRCLE), @@ -238,7 +239,7 @@ public enum JabRefIcons implements JabRefIcon { AUTO_FILE_LINK(MaterialDesignIcon.FILE_FIND) /*css: file-find */, QUALITY_ASSURED(MaterialDesignIcon.CERTIFICATE), /*css: certificate */ QUALITY(MaterialDesignIcon.CERTIFICATE),/*css: certificate */ - OPEN(MaterialDesignIcon.FOLDER) /*css: folder */, + OPEN(MaterialDesignIcon.FOLDER_OUTLINE) /*css: folder-outline */, ADD_ROW(MaterialDesignIcon.SERVER_PLUS) /* css: server-plus*/, REMOVE_ROW(MaterialDesignIcon.SERVER_MINUS) /*css: server-minus */, PICTURE(MaterialDesignIcon.FILE_IMAGE) /*css: file-image */, @@ -276,7 +277,7 @@ public enum JabRefIcons implements JabRefIcon { APPLICATION_WINEDT(JabRefMaterialDesignIcon.WINEDT), KEY_BINDINGS(MaterialDesignIcon.KEYBOARD), /*css: keyboard */ FIND_DUPLICATES(MaterialDesignIcon.CODE_EQUAL), /*css: code-equal */ - PULL(MaterialDesignIcon.SOURCE_PULL), /*source-pull*/ + CONNECT_DB(MaterialDesignIcon.CLOUD_UPLOAD), /*cloud-upload*/ SUCCESS(MaterialDesignIcon.CHECK_CIRCLE), WARNING(MaterialDesignIcon.ALERT), ERROR(MaterialDesignIcon.ALERT_CIRCLE), @@ -293,7 +294,8 @@ public enum JabRefIcons implements JabRefIcon { DEFAULT_GROUP_ICON_COLORED(MaterialDesignIcon.PLAY), DEFAULT_GROUP_ICON(MaterialDesignIcon.LABEL_OUTLINE), ALL_ENTRIES_GROUP_ICON(DefaultGroupsFactory.ALL_ENTRIES_GROUP_DEFAULT_ICON), - IMPORT_EXPORT(MaterialDesignIcon.SWAP_VERTICAL), + IMPORT(MaterialDesignIcon.CALL_RECEIVED), + EXPORT(MaterialDesignIcon.CALL_MADE), PREVIOUS_LEFT(MaterialDesignIcon.CHEVRON_LEFT), PREVIOUS_UP(MaterialDesignIcon.CHEVRON_UP), NEXT_RIGHT(MaterialDesignIcon.CHEVRON_RIGHT), diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index e38d7c151da..bf9b6e8ef98 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -1167,7 +1167,6 @@ No\ full\ text\ document\ found=No full text document found Update\ to\ current\ column\ order=Update to current column order Download\ from\ URL=Download from URL Rename\ field=Rename field -Set/clear/append/rename\ fields=Set/clear/append/rename fields Append\ field=Append field Append\ to\ fields=Append to fields Rename\ field\ to=Rename field to @@ -1300,7 +1299,6 @@ No\ valid\ style\ file\ defined=No valid style file defined Choose\ pattern=Choose pattern Use\ the\ BIB\ file\ location\ as\ primary\ file\ directory=Use the BIB file location as primary file directory Could\ not\ run\ the\ gnuclient/emacsclient\ program.\ Make\ sure\ you\ have\ the\ emacsclient/gnuclient\ program\ installed\ and\ available\ in\ the\ PATH.=Could not run the gnuclient/emacsclient program. Make sure you have the emacsclient/gnuclient program installed and available in the PATH. -OpenOffice/LibreOffice\ connection=OpenOffice/LibreOffice connection You\ must\ select\ either\ a\ valid\ style\ file,\ or\ use\ one\ of\ the\ default\ styles.=You must select either a valid style file, or use one of the default styles. This\ is\ a\ simple\ copy\ and\ paste\ dialog.\ First\ load\ or\ paste\ some\ text\ into\ the\ text\ input\ area.
After\ that,\ you\ can\ mark\ text\ and\ assign\ it\ to\ a\ BibTeX\ field.=This is a simple copy and paste dialog. First load or paste some text into the text input area.
After that, you can mark text and assign it to a BibTeX field. @@ -1450,7 +1448,6 @@ Rebind\ C-a,\ too=Rebind C-a, too Rebind\ C-f,\ too=Rebind C-f, too Open\ folder=Open folder -Searches\ for\ unlinked\ PDF\ files\ on\ the\ file\ system=Searches for unlinked PDF files on the file system Export\ entries\ ordered\ as\ specified=Export entries ordered as specified Export\ sort\ order=Export sort order Export\ sorting=Export sorting @@ -2010,7 +2007,6 @@ Next\ page=Next page Document\ viewer=Document viewer Live=Live Locked=Locked -Show\ document\ viewer=Show document viewer Show\ the\ document\ of\ the\ currently\ selected\ entry.=Show the document of the currently selected entry. Show\ this\ document\ until\ unlocked.=Show this document until unlocked. Set\ current\ user\ name\ as\ owner.=Set current user name as owner. @@ -2067,8 +2063,6 @@ No\ linked\ files\ found\ for\ export.=No linked files found for export. No\ full\ text\ document\ found\ for\ entry\ %0.=No full text document found for entry %0. Delete\ Entry=Delete Entry -Import\ &\ Export=Import & Export -Look\ up\ document\ identifier=Look up document identifier Next\ library=Next library Previous\ library=Previous library add\ group=add group @@ -2108,8 +2102,6 @@ Toggle\ intersection=Toggle intersection Toggle\ union=Toggle union Jump\ to\ entry=Jump to entry The\ group\ name\ contains\ the\ keyword\ separator\ "%0"\ and\ thus\ probably\ does\ not\ work\ as\ expected.=The group name contains the keyword separator "%0" and thus probably does not work as expected. -Abbreviate\ journal\ names\ (ISO)=Abbreviate journal names (ISO) -Abbreviate\ journal\ names\ (MEDLINE)=Abbreviate journal names (MEDLINE) Blog=Blog Check\ integrity=Check integrity Cleanup\ URL\ link=Cleanup URL link @@ -2184,3 +2176,20 @@ Keyword\:=Keyword: Keyword\ \"%0\"\ already\ exists=Keyword "%0" already exists Remove\ keyword=Remove keyword Are\ you\ sure\ you\ want\ to\ remove\ keyword\:\ \"%0\"?=Are you sure you want to remove keyword: "%0"? + +Edit\ string\ constants=Edit string constants +Export\ all\ entries=Export all entries +Generate\ BibTeX\ keys=Generate BibTeX keys +Groups\ interface=Groups interface +ISO=ISO +MEDLINE=MEDLINE +Manage\ field\ names\ &\ content=Manage field names & content +New\ library=New library +Next\ citation\ style=Next citation style +OpenOffice/LibreOffice=OpenOffice/LibreOffice +Open\ document\ viewer=Open document viewer +Open\ entry\ editor=Open entry editor +Previous\ citation\ style=Previous citation style +Search\ document\ identifier\ online=Search document identifier online +Search\ for\ unlinked\ local\ files=Search for unlinked local files +Search\ full\ text\ documents\ online=Search full text documents online From 1f3ffebc60ba43df00ed6215c6d8b2c2af0f8ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Fri, 1 Mar 2019 14:11:52 +0100 Subject: [PATCH 2/8] Remove 'ISO' and 'MEDLINE' localizations --- src/main/java/org/jabref/gui/actions/StandardActions.java | 4 ++-- src/main/resources/l10n/JabRef_en.properties | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/actions/StandardActions.java b/src/main/java/org/jabref/gui/actions/StandardActions.java index c9fcdd0f2af..767df65c181 100644 --- a/src/main/java/org/jabref/gui/actions/StandardActions.java +++ b/src/main/java/org/jabref/gui/actions/StandardActions.java @@ -95,8 +95,8 @@ public enum StandardActions implements Action { OPEN_CONSOLE(Localization.lang("Open terminal here"), Localization.lang("Open terminal here"), IconTheme.JabRefIcons.CONSOLE, KeyBinding.OPEN_CONSOLE), COPY_LINKED_FILES(Localization.lang("Copy linked files to folder...")), ABBREVIATE(Localization.lang("Abbreviate journal names")), - ABBREVIATE_ISO(Localization.lang("ISO"), Localization.lang("Abbreviate journal names of the selected entries (ISO abbreviation)"), KeyBinding.ABBREVIATE), - ABBREVIATE_MEDLINE(Localization.lang("MEDLINE"), Localization.lang("Abbreviate journal names of the selected entries (MEDLINE abbreviation)")), + ABBREVIATE_ISO("ISO", Localization.lang("Abbreviate journal names of the selected entries (ISO abbreviation)"), KeyBinding.ABBREVIATE), + ABBREVIATE_MEDLINE("MEDLINE", Localization.lang("Abbreviate journal names of the selected entries (MEDLINE abbreviation)")), UNABBREVIATE(Localization.lang("Unabbreviate journal names"), Localization.lang("Unabbreviate journal names of the selected entries"), KeyBinding.UNABBREVIATE), MANAGE_CUSTOM_EXPORTS(Localization.lang("Manage custom exports")), diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index bf9b6e8ef98..d5432a8bf32 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2181,8 +2181,6 @@ Edit\ string\ constants=Edit string constants Export\ all\ entries=Export all entries Generate\ BibTeX\ keys=Generate BibTeX keys Groups\ interface=Groups interface -ISO=ISO -MEDLINE=MEDLINE Manage\ field\ names\ &\ content=Manage field names & content New\ library=New library Next\ citation\ style=Next citation style From 8983c471611e513ba49e60022ea3f9ac916b94ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Fri, 1 Mar 2019 14:14:18 +0100 Subject: [PATCH 3/8] Fix possible typo: 'PDV_VIEWER' to 'PDF_VIEWER' --- src/main/java/org/jabref/gui/JabRefFrame.java | 2 +- src/main/java/org/jabref/gui/actions/StandardActions.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index a00379f6d8e..96ef8c26d93 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -875,7 +875,7 @@ private MenuBar createMenu() { new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.SHOW_PDV_VIEWER, new ShowDocumentViewerAction()), + factory.createMenuItem(StandardActions.SHOW_PDF_VIEWER, new ShowDocumentViewerAction()), factory.createMenuItem(StandardActions.EDIT_ENTRY, new OldDatabaseCommandWrapper(Actions.EDIT, this, Globals.stateManager)), factory.createMenuItem(StandardActions.OPEN_CONSOLE, new OldDatabaseCommandWrapper(Actions.OPEN_CONSOLE, this, Globals.stateManager)) ); diff --git a/src/main/java/org/jabref/gui/actions/StandardActions.java b/src/main/java/org/jabref/gui/actions/StandardActions.java index 767df65c181..4d968e113e0 100644 --- a/src/main/java/org/jabref/gui/actions/StandardActions.java +++ b/src/main/java/org/jabref/gui/actions/StandardActions.java @@ -113,7 +113,7 @@ public enum StandardActions implements Action { MANAGE_CITE_KEY_PATTERNS(Localization.lang("BibTeX key patterns")), EDIT_ENTRY(Localization.lang("Open entry editor"), IconTheme.JabRefIcons.EDIT_ENTRY, KeyBinding.EDIT_ENTRY), - SHOW_PDV_VIEWER(Localization.lang("Open document viewer"), IconTheme.JabRefIcons.PDF_FILE), + SHOW_PDF_VIEWER(Localization.lang("Open document viewer"), IconTheme.JabRefIcons.PDF_FILE), TOGGLE_PREVIEW(Localization.lang("Entry preview"), IconTheme.JabRefIcons.TOGGLE_ENTRY_PREVIEW, KeyBinding.TOGGLE_ENTRY_PREVIEW), NEXT_PREVIEW_STYLE(Localization.lang("Next citation style"), KeyBinding.NEXT_PREVIEW_LAYOUT), PREVIOUS_PREVIEW_STYLE(Localization.lang("Previous citation style"), KeyBinding.PREVIOUS_PREVIEW_LAYOUT), From 7a1e13bf6c1bebde69e2ac3a75eb7851a9c42816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Fri, 1 Mar 2019 14:34:50 +0100 Subject: [PATCH 4/8] Put 'Rank' back on the menu --- src/main/java/org/jabref/gui/JabRefFrame.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 96ef8c26d93..e51c66f87b3 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -792,10 +792,10 @@ private MenuBar createMenu() { if (Globals.prefs.getBoolean(JabRefPreferences.SPECIALFIELDSENABLED)) { boolean menuItemAdded = false; - /*if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RANKING)) { + if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RANKING)) { edit.getItems().add(SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.RANKING, factory, undoManager)); menuItemAdded = true; - }*/ + } if (Globals.prefs.getBoolean(JabRefPreferences.SHOWCOLUMN_RELEVANCE)) { edit.getItems().add(SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.RELEVANCE, factory)); From d3dda16246829af8149ba91438f90a3dfcfb0e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Sat, 2 Mar 2019 05:14:19 +0100 Subject: [PATCH 5/8] Fix synchronization checks-panels & reorder entry preview items --- src/main/java/org/jabref/gui/JabRefFrame.java | 46 ++++++++++--------- .../org/jabref/gui/actions/ActionFactory.java | 3 +- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index e51c66f87b3..532fde3af8c 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -859,27 +859,6 @@ private MenuBar createMenu() { factory.createMenuItem(StandardActions.SET_FILE_LINKS, new AutoLinkFilesAction()) ); - SidePaneComponent webSearch = sidePaneManager.getComponent(SidePaneType.WEB_SEARCH); - SidePaneComponent groups = sidePaneManager.getComponent(SidePaneType.GROUPS); - SidePaneComponent openOffice = sidePaneManager.getComponent(SidePaneType.OPEN_OFFICE); - - view.getItems().addAll( - factory.createCheckMenuItem(webSearch.getToggleAction(), webSearch.getToggleCommand()), - factory.createCheckMenuItem(groups.getToggleAction(), groups.getToggleCommand()), - - factory.createSubMenu(StandardActions.TOGGLE_PREVIEW, - factory.createMenuItem(StandardActions.NEXT_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.NEXT_PREVIEW_STYLE, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.PREVIOUS_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.PREVIOUS_PREVIEW_STYLE, this, Globals.stateManager))), - - factory.createCheckMenuItem(openOffice.getToggleAction(), openOffice.getToggleCommand()), - - new SeparatorMenuItem(), - - factory.createMenuItem(StandardActions.SHOW_PDF_VIEWER, new ShowDocumentViewerAction()), - factory.createMenuItem(StandardActions.EDIT_ENTRY, new OldDatabaseCommandWrapper(Actions.EDIT, this, Globals.stateManager)), - factory.createMenuItem(StandardActions.OPEN_CONSOLE, new OldDatabaseCommandWrapper(Actions.OPEN_CONSOLE, this, Globals.stateManager)) - ); - PushToApplicationButton pushToExternal = new PushToApplicationButton(this, pushApplications.getApplications()); tools.getItems().addAll( factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this)), @@ -905,6 +884,31 @@ private MenuBar createMenu() { factory.createMenuItem(StandardActions.UNABBREVIATE, new OldDatabaseCommandWrapper(Actions.UNABBREVIATE, this, Globals.stateManager)) ); + SidePaneComponent webSearch = sidePaneManager.getComponent(SidePaneType.WEB_SEARCH); + SidePaneComponent groups = sidePaneManager.getComponent(SidePaneType.GROUPS); + SidePaneComponent openOffice = sidePaneManager.getComponent(SidePaneType.OPEN_OFFICE); + + view.setOnShowing(event -> { + view.getItems().clear(); + view.getItems().addAll( + factory.createCheckMenuItem(webSearch.getToggleAction(), webSearch.getToggleCommand(), sidePaneManager.isComponentVisible(SidePaneType.WEB_SEARCH)), + factory.createCheckMenuItem(groups.getToggleAction(), groups.getToggleCommand(), sidePaneManager.isComponentVisible(SidePaneType.GROUPS)), + factory.createCheckMenuItem(openOffice.getToggleAction(), openOffice.getToggleCommand(), sidePaneManager.isComponentVisible(SidePaneType.OPEN_OFFICE)), + + new SeparatorMenuItem(), + + factory.createCheckMenuItem(StandardActions.TOGGLE_PREVIEW, new OldDatabaseCommandWrapper(Actions.TOGGLE_PREVIEW, this, Globals.stateManager), Globals.prefs.getPreviewPreferences().isPreviewPanelEnabled()), + factory.createMenuItem(StandardActions.NEXT_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.NEXT_PREVIEW_STYLE, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.PREVIOUS_PREVIEW_STYLE, new OldDatabaseCommandWrapper(Actions.PREVIOUS_PREVIEW_STYLE, this, Globals.stateManager)), + + new SeparatorMenuItem(), + + factory.createMenuItem(StandardActions.SHOW_PDF_VIEWER, new ShowDocumentViewerAction()), + factory.createMenuItem(StandardActions.EDIT_ENTRY, new OldDatabaseCommandWrapper(Actions.EDIT, this, Globals.stateManager)), + factory.createMenuItem(StandardActions.OPEN_CONSOLE, new OldDatabaseCommandWrapper(Actions.OPEN_CONSOLE, this, Globals.stateManager)) + ); + }); + options.getItems().addAll( factory.createMenuItem(StandardActions.SHOW_PREFS, new ShowPreferencesAction(this, Globals.TASK_EXECUTOR)), diff --git a/src/main/java/org/jabref/gui/actions/ActionFactory.java b/src/main/java/org/jabref/gui/actions/ActionFactory.java index d27028c7cd3..69c5531db65 100644 --- a/src/main/java/org/jabref/gui/actions/ActionFactory.java +++ b/src/main/java/org/jabref/gui/actions/ActionFactory.java @@ -44,8 +44,9 @@ public MenuItem createMenuItem(Action action, Command command) { return menuItem; } - public CheckMenuItem createCheckMenuItem(Action action, Command command) { + public CheckMenuItem createCheckMenuItem(Action action, Command command, boolean selected) { CheckMenuItem checkMenuItem = ActionUtils.createCheckMenuItem(new JabRefAction(action, command, keyBindingRepository)); + checkMenuItem.setSelected(selected); setGraphic(checkMenuItem, action); return checkMenuItem; From f763eebb71f0610930a69e8507ab04a3d1807f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Sat, 2 Mar 2019 11:05:55 +0100 Subject: [PATCH 6/8] Fix code line --- src/main/java/org/jabref/gui/JabRefFrame.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 532fde3af8c..10d0e15b3a2 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -888,6 +888,7 @@ private MenuBar createMenu() { SidePaneComponent groups = sidePaneManager.getComponent(SidePaneType.GROUPS); SidePaneComponent openOffice = sidePaneManager.getComponent(SidePaneType.OPEN_OFFICE); + view.getItems().add(new SeparatorMenuItem()); view.setOnShowing(event -> { view.getItems().clear(); view.getItems().addAll( From e482a821879066a9b949548d44ed9bfcba3affd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Mon, 4 Mar 2019 23:53:55 +0100 Subject: [PATCH 7/8] Rename 'Replace string' to 'Find and replace' --- src/main/java/org/jabref/gui/actions/StandardActions.java | 2 +- src/main/resources/l10n/JabRef_en.properties | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/actions/StandardActions.java b/src/main/java/org/jabref/gui/actions/StandardActions.java index 4d968e113e0..b3b10e3aeaa 100644 --- a/src/main/java/org/jabref/gui/actions/StandardActions.java +++ b/src/main/java/org/jabref/gui/actions/StandardActions.java @@ -81,7 +81,7 @@ public enum StandardActions implements Action { QUIT(Localization.lang("Quit"), Localization.lang("Quit JabRef"), IconTheme.JabRefIcons.CLOSE_JABREF, KeyBinding.QUIT_JABREF), UNDO(Localization.lang("Undo"), IconTheme.JabRefIcons.UNDO, KeyBinding.UNDO), REDO(Localization.lang("Redo"), IconTheme.JabRefIcons.REDO, KeyBinding.REDO), - REPLACE_ALL(Localization.lang("Replace string"), KeyBinding.REPLACE_STRING), + REPLACE_ALL(Localization.lang("Find and replace"), KeyBinding.REPLACE_STRING), MANAGE_KEYWORDS(Localization.lang("Manage keywords")), MASS_SET_FIELDS(Localization.lang("Manage field names & content")), TOGGLE_GROUPS(Localization.lang("Groups interface"), IconTheme.JabRefIcons.TOGGLE_GROUPS, KeyBinding.TOGGLE_GROUPS_INTERFACE), diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index d5432a8bf32..82877424a5c 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2191,3 +2191,4 @@ Previous\ citation\ style=Previous citation style Search\ document\ identifier\ online=Search document identifier online Search\ for\ unlinked\ local\ files=Search for unlinked local files Search\ full\ text\ documents\ online=Search full text documents online +Find\ and\ replace=Find and replace \ No newline at end of file From c8aec89b8874cec1ee11d879d5be7b90c2c7ac6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=A9ndez?= Date: Mon, 4 Mar 2019 23:54:15 +0100 Subject: [PATCH 8/8] Move 'New sublibrary based on AUX file' to 'Tools' --- src/main/java/org/jabref/gui/JabRefFrame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 10d0e15b3a2..15870d22e41 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -830,7 +830,6 @@ private MenuBar createMenu() { library.getItems().addAll( factory.createMenuItem(StandardActions.NEW_ENTRY, new NewEntryAction(this, dialogService, Globals.prefs)), factory.createMenuItem(StandardActions.NEW_ENTRY_FROM_PLAINTEX, new NewEntryFromPlainTextAction(this, Globals.prefs.getUpdateFieldPreferences(), dialogService, Globals.prefs)), - factory.createMenuItem(StandardActions.NEW_SUB_LIBRARY_FROM_AUX, new NewSubLibraryAction(this)), factory.createMenuItem(StandardActions.DELETE_ENTRY, new OldDatabaseCommandWrapper(Actions.DELETE, this, Globals.stateManager)), new SeparatorMenuItem(), @@ -861,6 +860,7 @@ private MenuBar createMenu() { PushToApplicationButton pushToExternal = new PushToApplicationButton(this, pushApplications.getApplications()); tools.getItems().addAll( + factory.createMenuItem(StandardActions.NEW_SUB_LIBRARY_FROM_AUX, new NewSubLibraryAction(this)), factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this)), factory.createMenuItem(StandardActions.WRITE_XMP, new OldDatabaseCommandWrapper(Actions.WRITE_XMP, this, Globals.stateManager)), factory.createMenuItem(StandardActions.COPY_LINKED_FILES, new CopyFilesAction(this)),