diff --git a/CHANGELOG.md b/CHANGELOG.md index 42da6cc6765..ea2b0bf2a19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - The JabRef specific meta-data content in the main field such as priorities (prio1, prio2, ...) are migrated to their respective fields. They are removed from the keywords. [#6840](https://github.com/jabref/jabref/issues/6840) - We fixed an issue where groups generated from authors' last names did not include all entries of the authors' [#5833](https://github.com/JabRef/jabref/issues/5833) - The export to MS Office XML now uses the month name for the field `MonthAcessed` instead of the two digit number [#7354](https://github.com/JabRef/jabref/issues/7354) +- We included some standalone dialogs from the options menu in the main preference dialog and fixed some visual issues in the preferences dialog. [#7384](https://github.com/JabRef/jabref/pull/7384) ### Fixed diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 7e412efcff5..89be3494a67 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -60,7 +60,6 @@ import org.jabref.gui.contentselector.ManageContentSelectorAction; import org.jabref.gui.copyfiles.CopyFilesAction; import org.jabref.gui.customentrytypes.CustomizeEntryAction; -import org.jabref.gui.customizefields.SetupGeneralFieldsAction; import org.jabref.gui.desktop.JabRefDesktop; import org.jabref.gui.dialogs.AutosaveUiManager; import org.jabref.gui.documentviewer.ShowDocumentViewerAction; @@ -75,7 +74,6 @@ import org.jabref.gui.entryeditor.PreviewSwitchAction; import org.jabref.gui.exporter.ExportCommand; import org.jabref.gui.exporter.ExportToClipboardAction; -import org.jabref.gui.exporter.ManageCustomExportsAction; import org.jabref.gui.exporter.SaveAction; import org.jabref.gui.exporter.SaveAllAction; import org.jabref.gui.exporter.SaveDatabaseAction; @@ -90,15 +88,12 @@ import org.jabref.gui.help.SearchForUpdateAction; import org.jabref.gui.importer.ImportCommand; import org.jabref.gui.importer.ImportEntriesDialog; -import org.jabref.gui.importer.ManageCustomImportsAction; import org.jabref.gui.importer.NewDatabaseAction; import org.jabref.gui.importer.NewEntryAction; import org.jabref.gui.importer.actions.OpenDatabaseAction; import org.jabref.gui.importer.fetcher.LookupIdentifierAction; import org.jabref.gui.integrity.IntegrityCheckAction; import org.jabref.gui.journals.AbbreviateAction; -import org.jabref.gui.journals.ManageJournalsAction; -import org.jabref.gui.keyboard.CustomizeKeyBindingAction; import org.jabref.gui.keyboard.KeyBinding; import org.jabref.gui.keyboard.KeyBindingRepository; import org.jabref.gui.libraryproperties.LibraryPropertiesAction; @@ -108,7 +103,6 @@ import org.jabref.gui.metadata.PreambleEditor; import org.jabref.gui.preferences.ShowPreferencesAction; import org.jabref.gui.preview.CopyCitationAction; -import org.jabref.gui.protectedterms.ManageProtectedTermsAction; import org.jabref.gui.push.PushToApplicationAction; import org.jabref.gui.push.PushToApplicationsManager; import org.jabref.gui.search.GlobalSearchBar; @@ -851,15 +845,6 @@ private MenuBar createMenu() { new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.SETUP_GENERAL_FIELDS, new SetupGeneralFieldsAction()), - factory.createMenuItem(StandardActions.MANAGE_CUSTOM_IMPORTS, new ManageCustomImportsAction()), - factory.createMenuItem(StandardActions.MANAGE_CUSTOM_EXPORTS, new ManageCustomExportsAction()), - factory.createMenuItem(StandardActions.MANAGE_JOURNALS, new ManageJournalsAction()), - factory.createMenuItem(StandardActions.CUSTOMIZE_KEYBINDING, new CustomizeKeyBindingAction()), - factory.createMenuItem(StandardActions.MANAGE_PROTECTED_TERMS, new ManageProtectedTermsAction()), - - new SeparatorMenuItem(), - factory.createMenuItem(StandardActions.MANAGE_CONTENT_SELECTORS, new ManageContentSelectorAction(this, stateManager)), factory.createMenuItem(StandardActions.CUSTOMIZE_ENTRY_TYPES, new CustomizeEntryAction(stateManager, Globals.entryTypesManager)) ); diff --git a/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanel.java b/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanel.java index ac61606744c..4d004e980c3 100644 --- a/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanel.java +++ b/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanel.java @@ -2,6 +2,8 @@ import java.util.Collection; +import javax.inject.Inject; + import javafx.beans.property.ListProperty; import javafx.beans.property.ObjectProperty; import javafx.fxml.FXML; @@ -27,16 +29,16 @@ public class CitationKeyPatternPanel extends TableView patternColumn; @FXML public TableColumn actionsColumn; + @Inject private PreferencesService preferences; + private CitationKeyPatternPanelViewModel viewModel; private long lastKeyPressTime; private String tableSearchTerm; - public CitationKeyPatternPanel(PreferencesService preferences, Collection entryTypeList, AbstractCitationKeyPattern keyPattern) { + public CitationKeyPatternPanel() { super(); - viewModel = new CitationKeyPatternPanelViewModel(preferences, entryTypeList, keyPattern); - ViewLoader.view(this) .root(this) .load(); @@ -44,6 +46,8 @@ public CitationKeyPatternPanel(PreferencesService preferences, Collection entryTypeList, AbstractCitationKeyPattern keyPattern) { + viewModel.setValues(entryTypeList, keyPattern); } public void resetAll() { diff --git a/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanelViewModel.java b/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanelViewModel.java index fa3a1978b29..95416561b23 100644 --- a/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanelViewModel.java +++ b/src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanelViewModel.java @@ -36,17 +36,14 @@ public class CitationKeyPatternPanelViewModel { private final ListProperty patternListProperty = new SimpleListProperty<>(); private final ObjectProperty defaultItemProperty = new SimpleObjectProperty<>(); - private final AbstractCitationKeyPattern initialKeyPattern; - private final Collection bibEntryTypeList; + private final PreferencesService preferences; - public CitationKeyPatternPanelViewModel(PreferencesService preferences, Collection entryTypeList, AbstractCitationKeyPattern initialKeyPattern) { + public CitationKeyPatternPanelViewModel(PreferencesService preferences) { this.preferences = preferences; - this.bibEntryTypeList = entryTypeList; - this.initialKeyPattern = initialKeyPattern; } - public void setValues() { + public void setValues(Collection entryTypeList, AbstractCitationKeyPattern initialKeyPattern) { String defaultPattern; if ((initialKeyPattern.getDefaultValue() == null) || initialKeyPattern.getDefaultValue().isEmpty()) { defaultPattern = ""; @@ -58,17 +55,17 @@ public void setValues() { patternListProperty.setValue(FXCollections.observableArrayList()); patternListProperty.add(defaultItemProperty.getValue()); - bibEntryTypeList.stream() - .map(BibEntryType::getType) - .forEach(entryType -> { - String pattern; - if (initialKeyPattern.isDefaultValue(entryType)) { - pattern = ""; - } else { - pattern = initialKeyPattern.getPatterns().get(entryType).get(0); - } - patternListProperty.add(new CitationKeyPatternPanelItemModel(entryType, pattern)); - }); + entryTypeList.stream() + .map(BibEntryType::getType) + .forEach(entryType -> { + String pattern; + if (initialKeyPattern.isDefaultValue(entryType)) { + pattern = ""; + } else { + pattern = initialKeyPattern.getPatterns().get(entryType).get(0); + } + patternListProperty.add(new CitationKeyPatternPanelItemModel(entryType, pattern)); + }); } public void setItemToDefaultPattern(CitationKeyPatternPanelItemModel item) { diff --git a/src/main/java/org/jabref/gui/customizefields/CustomizeGeneralFieldsDialog.fxml b/src/main/java/org/jabref/gui/customizefields/CustomizeGeneralFieldsDialog.fxml deleted file mode 100644 index fe006e915c4..00000000000 --- a/src/main/java/org/jabref/gui/customizefields/CustomizeGeneralFieldsDialog.fxml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - -