Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grand unified preferences dialog #7384

Merged
merged 24 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
29920df
Introduced SimplePreferencesDialog and converted CustomizeGeneralFiel…
calixtus Jan 25, 2021
7e83e3f
Moved preferences tabs to their own packages
calixtus Jan 25, 2021
00a13b8
Removed SetupGeneralFieldsAction
calixtus Jan 25, 2021
0477242
Converted ImportCustomizationDialog
calixtus Jan 25, 2021
a038042
Converted ExportCustomizationDialog
calixtus Jan 25, 2021
57c49e1
Cleanups and l10m
calixtus Jan 25, 2021
a4f29dd
Checkstyle
calixtus Jan 25, 2021
1fda9c3
Cleanups
calixtus Jan 25, 2021
ffeb239
Converted ManageJournalAbbreviations
calixtus Jan 26, 2021
30b435d
l10n
calixtus Jan 26, 2021
d42670d
Converted KeyBindingsDialog
calixtus Jan 26, 2021
0af42f4
l10n
calixtus Jan 26, 2021
280aed7
Fixed checkstyle and tests
calixtus Jan 26, 2021
97a1146
Converted ManageProtectedTermsDialog
calixtus Jan 27, 2021
ee19398
Simplified call to CitationKeyPatternPanel in markup
calixtus Jan 29, 2021
fd0f821
Removed hardwired width settings
calixtus Jan 29, 2021
784eb5d
Renamed files for consistent naming scheme
calixtus Jan 29, 2021
0d4205d
Fixed dependency injection and renamed variables for consistency
calixtus Jan 29, 2021
2e186f5
CHANGELOG.md
calixtus Jan 29, 2021
d1ca90b
Final cleanups
calixtus Jan 29, 2021
0c7cd39
Merge remote-tracking branch 'upstream/master' into grupd
calixtus Jan 29, 2021
bdb1560
Fixed simple remarks
calixtus Jan 30, 2021
cc29b5f
Fixed localization tests
calixtus Jan 30, 2021
3823490
Merge remote-tracking branch 'upstream/master' into grupd
calixtus Feb 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 0 additions & 15 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -855,15 +849,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))
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -27,23 +29,25 @@ public class CitationKeyPatternPanel extends TableView<CitationKeyPatternPanelIt
@FXML public TableColumn<CitationKeyPatternPanelItemModel, String> patternColumn;
@FXML public TableColumn<CitationKeyPatternPanelItemModel, EntryType> actionsColumn;

@Inject private PreferencesService preferences;

private CitationKeyPatternPanelViewModel viewModel;

private long lastKeyPressTime;
private String tableSearchTerm;

public CitationKeyPatternPanel(PreferencesService preferences, Collection<BibEntryType> entryTypeList, AbstractCitationKeyPattern keyPattern) {
public CitationKeyPatternPanel() {
super();

viewModel = new CitationKeyPatternPanelViewModel(preferences, entryTypeList, keyPattern);

ViewLoader.view(this)
.root(this)
.load();
}

@FXML
private void initialize() {
viewModel = new CitationKeyPatternPanelViewModel(preferences);

this.setEditable(true);

entryTypeColumn.setSortable(true);
Expand Down Expand Up @@ -80,8 +84,8 @@ private void initialize() {
this.itemsProperty().bindBidirectional(viewModel.patternListProperty());
}

public void setValues() {
viewModel.setValues();
public void setValues(Collection<BibEntryType> entryTypeList, AbstractCitationKeyPattern keyPattern) {
viewModel.setValues(entryTypeList, keyPattern);
}

public void resetAll() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@ public class CitationKeyPatternPanelViewModel {

private final ListProperty<CitationKeyPatternPanelItemModel> patternListProperty = new SimpleListProperty<>();
private final ObjectProperty<CitationKeyPatternPanelItemModel> defaultItemProperty = new SimpleObjectProperty<>();
private final AbstractCitationKeyPattern initialKeyPattern;
private final Collection<BibEntryType> bibEntryTypeList;

private final PreferencesService preferences;

public CitationKeyPatternPanelViewModel(PreferencesService preferences, Collection<BibEntryType> entryTypeList, AbstractCitationKeyPattern initialKeyPattern) {
public CitationKeyPatternPanelViewModel(PreferencesService preferences) {
this.preferences = preferences;
this.bibEntryTypeList = entryTypeList;
this.initialKeyPattern = initialKeyPattern;
}

public void setValues() {
public void setValues(Collection<BibEntryType> entryTypeList, AbstractCitationKeyPattern initialKeyPattern) {
String defaultPattern;
if ((initialKeyPattern.getDefaultValue() == null) || initialKeyPattern.getDefaultValue().isEmpty()) {
defaultPattern = "";
Expand All @@ -58,7 +55,7 @@ public void setValues() {
patternListProperty.setValue(FXCollections.observableArrayList());
patternListProperty.add(defaultItemProperty.getValue());

bibEntryTypeList.stream()
entryTypeList.stream()
calixtus marked this conversation as resolved.
Show resolved Hide resolved
.map(BibEntryType::getType)
.forEach(entryType -> {
String pattern;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading