From 1cb189096fdf3351a767d2997685812626e8c67d Mon Sep 17 00:00:00 2001 From: Tieqiong <123656525+Tieqiong@users.noreply.github.com> Date: Tue, 14 Jan 2025 09:27:22 -0500 Subject: [PATCH] docs: correct manual link (#249) * docs: correct manual link * [pre-commit.ci] auto fixes from pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- news/doctab.rst | 23 +++++++++++++++++++++++ src/diffpy/pdfgui/gui/mainframe.py | 4 +--- src/diffpy/pdfgui/gui/pdfguiglobals.py | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 news/doctab.rst diff --git a/news/doctab.rst b/news/doctab.rst new file mode 100644 index 00000000..fec2f635 --- /dev/null +++ b/news/doctab.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Changed the removed local manual link to the online page. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/pdfgui/gui/mainframe.py b/src/diffpy/pdfgui/gui/mainframe.py index 16ed9551..6bbd2676 100644 --- a/src/diffpy/pdfgui/gui/mainframe.py +++ b/src/diffpy/pdfgui/gui/mainframe.py @@ -2528,10 +2528,8 @@ def onSaveCalc(self, event): def onDocumentation(self, event): """Show information about the documentation.""" import webbrowser - from urllib.request import pathname2url - url = "file://" + pathname2url(docMainFile) - webbrowser.open(url) + webbrowser.open(docMainFile) return # MISC INTERACTION ITEMS diff --git a/src/diffpy/pdfgui/gui/pdfguiglobals.py b/src/diffpy/pdfgui/gui/pdfguiglobals.py index 573a5c0c..cae1fa74 100644 --- a/src/diffpy/pdfgui/gui/pdfguiglobals.py +++ b/src/diffpy/pdfgui/gui/pdfguiglobals.py @@ -54,7 +54,7 @@ APPDATADIR = os.path.abspath(APPDATADIR) # Location of the HTML manual -docMainFile = os.path.join(APPDATADIR, "doc/manual/pdfgui.html") +docMainFile = "https://diffpy.github.io/diffpy.pdfgui/manual.html" del _upbasedir del _development_mode