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

Enable help button for editor Search dialog #12715

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Changes from all commits
Commits
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
14 changes: 13 additions & 1 deletion vassal-app/src/main/java/VASSAL/configure/ConfigureTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import VASSAL.launch.EditorWindow;
import VASSAL.preferences.Prefs;
import VASSAL.search.SearchTarget;
import VASSAL.tools.BrowserSupport;
import VASSAL.tools.ErrorDialog;
import VASSAL.tools.NamedKeyStroke;
import VASSAL.tools.ReadErrorDialog;
Expand Down Expand Up @@ -126,6 +127,7 @@
import java.io.IOException;
import java.io.Writer;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -2241,7 +2243,17 @@ public void actionPerformed(ActionEvent e) {
}

private void showSearchHelp() {
// FIXME - Add Help ref
File dir = VASSAL.build.module.Documentation.getDocumentationBaseDir();
dir = new File(dir, "ReferenceManual"); //$NON-NLS-1$
final File theFile = new File(dir, "Search.html"); //$NON-NLS-1$
HelpFile h = null;
try {
h = new HelpFile(null, theFile, "#top"); //$NON-NLS-1$
}
catch (MalformedURLException e) {
ErrorDialog.bug(e);
}
BrowserSupport.openURL(h.getContents().toString());
}

/**
Expand Down