Skip to content

Commit

Permalink
Add radio buttons to show which of the highlightings (all or any) in …
Browse files Browse the repository at this point in the history
…groups menu
  • Loading branch information
simonharrer committed Mar 10, 2016
1 parent 72754e3 commit 4a5f497
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ to [sourceforge feature requests](https://sourceforge.net/p/jabref/features/) by
### Fixed
- Fixed [#598](https://github.com/JabRef/jabref/issues/598) and [#402](https://github.com/JabRef/jabref/issues/402): No more issues with invalid icons for ExternalFileTypes in global search or after editing the settings
- Fixed [#883](https://github.com/JabRef/jabref/issues/883): No NPE during cleanup
- Fixed [#845](https://github.com/JabRef/jabref/issues/845): Add checkboxes for highlighting in groups menu, fixes other toggle highlighting as well for all toggle buttons
- Fixed [#890](https://github.com/JabRef/jabref/issues/890): No NPE when renaming file
- Fixed [#466](https://github.com/JabRef/jabref/issues/466): Rename PDF cleanup now also changes case of file name
- Fixed [#621](https://github.com/JabRef/jabref/issues/621) and [#669](https://github.com/JabRef/jabref/issues/669): Encoding and preamble now end with newline.
Expand Down
17 changes: 11 additions & 6 deletions src/main/java/net/sf/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ public void actionPerformed(ActionEvent e) {
Localization.lang("Toggle entry preview"),
Globals.getKeyPrefs().getKey(KeyBinding.TOGGLE_ENTRY_PREVIEW),
IconTheme.JabRefIcon.TOGGLE_ENTRY_PREVIEW.getIcon()));
private final Action toggleHighlightAny = new GeneralAction(Actions.TOGGLE_HIGHLIGHTS_GROUPS_MATCHING_ANY,
private final Action toggleHighlightAny = enableToggle(new GeneralAction(Actions.TOGGLE_HIGHLIGHTS_GROUPS_MATCHING_ANY,
Localization.menuTitle("Highlight groups matching any selected entry"),
Localization.lang("Highlight groups matching any selected entry"));
private final Action toggleHighlightAll = new GeneralAction(Actions.TOGGLE_HIGHLIGHTS_GROUPS_MATCHING_ALL,
Localization.lang("Highlight groups matching any selected entry")));
private final Action toggleHighlightAll = enableToggle(new GeneralAction(Actions.TOGGLE_HIGHLIGHTS_GROUPS_MATCHING_ALL,
Localization.menuTitle("Highlight groups matching all selected entries"),
Localization.lang("Highlight groups matching all selected entries"));
Localization.lang("Highlight groups matching all selected entries")));
private final AbstractAction switchPreview = new GeneralAction(Actions.SWITCH_PREVIEW,
Localization.menuTitle("Switch preview layout"),
Globals.getKeyPrefs().getKey(KeyBinding.SWITCH_PREVIEW_LAYOUT));
Expand Down Expand Up @@ -1253,8 +1253,13 @@ private void fillMenu() {
groups.add(removeFromGroup);
groups.add(moveToGroup);
groups.addSeparator();
groups.add(toggleHighlightAny);
groups.add(toggleHighlightAll);
JRadioButtonMenuItem toggleHighlightAnyItem = new JRadioButtonMenuItem(toggleHighlightAny);
groups.add(toggleHighlightAnyItem);
JRadioButtonMenuItem toggleHighlightAllItem = new JRadioButtonMenuItem(toggleHighlightAll);
groups.add(toggleHighlightAllItem);
ButtonGroup highlightButtonGroup = new ButtonGroup();
highlightButtonGroup.add(toggleHighlightAnyItem);
highlightButtonGroup.add(toggleHighlightAllItem);
mb.add(groups);

view.add(getBackAction());
Expand Down

0 comments on commit 4a5f497

Please sign in to comment.