Skip to content

Commit

Permalink
Merge pull request #1770 from JabRef/help-findduplicates
Browse files Browse the repository at this point in the history
Implements #1767: Add Help Button to access new help page
  • Loading branch information
oscargus authored Aug 18, 2016
2 parents 742ec4f + a6564cb commit c2da5b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/java/net/sf/jabref/gui/DuplicateResolverDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
import javax.swing.JDialog;
import javax.swing.JPanel;

import net.sf.jabref.gui.help.HelpAction;
import net.sf.jabref.gui.importer.ImportInspectionDialog;
import net.sf.jabref.gui.mergeentries.MergeEntries;
import net.sf.jabref.gui.util.PositionWindow;
import net.sf.jabref.logic.help.HelpFile;
import net.sf.jabref.logic.l10n.Localization;
import net.sf.jabref.model.entry.BibEntry;
import net.sf.jabref.preferences.JabRefPreferences;
Expand Down Expand Up @@ -55,6 +57,7 @@ public enum DuplicateResolverResult {

private final JButton cancel = new JButton(Localization.lang("Cancel"));
private final JButton merge = new JButton(Localization.lang("Keep merged entry only"));
JButton helpButton = new HelpAction(Localization.lang("Help"), HelpFile.FIND_DUPLICATES).getHelpButton();
private final JabRefFrame frame;
private final JPanel options = new JPanel();
private DuplicateResolverResult status = DuplicateResolverResult.NOT_CHOSEN;
Expand Down Expand Up @@ -117,6 +120,7 @@ private void init(BibEntry one, BibEntry two, DuplicateResolverType type) {
options.add(merge);
options.add(Box.createHorizontalStrut(5));
options.add(cancel);
options.add(helpButton);

first.addActionListener(e -> buttonPressed(DuplicateResolverResult.KEEP_LEFT));
second.addActionListener(e -> buttonPressed(DuplicateResolverResult.KEEP_RIGHT));
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/sf/jabref/logic/help/HelpFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public enum HelpFile {
FETCHER_SPRINGER("SpringerHelp"),
FETCHER_SCIENCEDIRECT(""),
FETCHER_BIBSONOMY_SCRAPER(""),
DATABASE_PROPERTIES("DatabaseProperties");
DATABASE_PROPERTIES("DatabaseProperties"),
FIND_DUPLICATES("FindDuplicates");

private final String pageName;

Expand Down

0 comments on commit c2da5b0

Please sign in to comment.