mirror of https://github.com/odrling/Aegisub
Fix manual path generation
Originally committed to SVN as r6935.
This commit is contained in:
parent
1ff1a57bdc
commit
291a4050d8
|
@ -59,9 +59,9 @@ static void init_static() {
|
||||||
pages = new std::map<wxString, wxString>;
|
pages = new std::map<wxString, wxString>;
|
||||||
std::map<wxString, wxString> &page = *pages;
|
std::map<wxString, wxString> &page = *pages;
|
||||||
page["Attachment Manager"] = "Attachment_Manager";
|
page["Attachment Manager"] = "Attachment_Manager";
|
||||||
page["Automation Manager"] = "Automation_Manager";
|
page["Automation Manager"] = "Automation/Manager";
|
||||||
page["Colour Picker"] = "Colour_Picker";
|
page["Colour Picker"] = "Colour_Picker";
|
||||||
page["Dummy Video"] = "Dummy_video";
|
page["Dummy Video"] = "Video#dummyvideo";
|
||||||
page["Export"] = "Exporting";
|
page["Export"] = "Exporting";
|
||||||
page["Fonts Collector"] = "Fonts_Collector";
|
page["Fonts Collector"] = "Fonts_Collector";
|
||||||
page["Kanji Timer"] = "Kanji_Timer";
|
page["Kanji Timer"] = "Kanji_Timer";
|
||||||
|
@ -95,6 +95,8 @@ void HelpButton::OpenPage(wxString const& pageID) {
|
||||||
init_static();
|
init_static();
|
||||||
|
|
||||||
wxString page = (*pages)[pageID];
|
wxString page = (*pages)[pageID];
|
||||||
|
wxString section;
|
||||||
|
page = page.BeforeFirst('#', §ion);
|
||||||
|
|
||||||
wxFileName docFile(StandardPaths::DecodePath("?data/docs/"), page, "html", wxPATH_NATIVE);
|
wxFileName docFile(StandardPaths::DecodePath("?data/docs/"), page, "html", wxPATH_NATIVE);
|
||||||
|
|
||||||
|
@ -106,7 +108,7 @@ void HelpButton::OpenPage(wxString const& pageID) {
|
||||||
// is safe with everything everyone uses. Blame Microsoft.
|
// is safe with everything everyone uses. Blame Microsoft.
|
||||||
url = wxString("file://") + docFile.GetFullPath(wxPATH_NATIVE);
|
url = wxString("file://") + docFile.GetFullPath(wxPATH_NATIVE);
|
||||||
else
|
else
|
||||||
url = wxString::Format("http://docs.aegisub.org/manual/%s", page);
|
url = wxString::Format("http://docs.aegisub.org/manual/%s/#%s", page, section);
|
||||||
|
|
||||||
wxLaunchDefaultBrowser(url);
|
wxLaunchDefaultBrowser(url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue