Skip to content

Commit

Permalink
Help button leaves dialog opened
Browse files Browse the repository at this point in the history
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
  • Loading branch information
koppor and calixtus committed Dec 22, 2023
1 parent 11bf127 commit cc6ee70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 8 additions & 6 deletions src/main/java/org/jabref/gui/groups/GroupDialogView.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,18 @@ public GroupDialogView(BibDatabaseContext currentDatabase,
final Button helpButton = (Button) getDialogPane().lookupButton(helpButtonType);

ActionFactory actionFactory = new ActionFactory(Globals.getKeyPrefs());
HelpAction helpAction = new HelpAction(HelpFile.GROUPS, dialogService, preferencesService.getFilePreferences());
actionFactory.configureIconButton(
StandardActions.HELP_GROUPS,
new HelpAction(HelpFile.GROUPS, dialogService, preferencesService.getFilePreferences()),
helpAction,
helpButton);

// Consume the dialog close event, but execute the help action
helpButton.addEventFilter(ActionEvent.ACTION, event -> {
helpAction.execute();
event.consume();
});

confirmDialogButton.disableProperty().bind(viewModel.validationStatus().validProperty().not());
// handle validation before closing dialog and calling resultConverter
confirmDialogButton.addEventFilter(ActionEvent.ACTION, viewModel::validationHandler);
Expand Down Expand Up @@ -274,11 +281,6 @@ private void texGroupBrowse() {
viewModel.texGroupBrowse();
}

@FXML
private void openHelp() {
viewModel.openHelpPage();
}

@FXML
private void openIconPicker() {
ObservableList<Ikon> ikonList = FXCollections.observableArrayList();
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/org/jabref/gui/groups/GroupDialogViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
import javafx.scene.paint.Color;

import org.jabref.gui.DialogService;
import org.jabref.gui.help.HelpAction;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.util.FileDialogConfiguration;
import org.jabref.logic.auxparser.DefaultAuxParser;
import org.jabref.logic.groups.DefaultGroupsFactory;
import org.jabref.logic.help.HelpFile;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.util.StandardFileType;
import org.jabref.logic.util.io.FileUtil;
Expand Down Expand Up @@ -494,10 +492,6 @@ public void texGroupBrowse() {
));
}

public void openHelpPage() {

}

private List<Path> getFileDirectoriesAsPaths() {
List<Path> fileDirs = new ArrayList<>();
MetaData metaData = currentDatabase.getMetaData();
Expand Down

0 comments on commit cc6ee70

Please sign in to comment.