Переглянути джерело

wxGUI/locationWizard: help opens in web browser now (g.manual)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52867 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 роки тому
батько
коміт
a76a6c5ffb

+ 2 - 9
gui/wxpython/gis_set.py

@@ -878,16 +878,9 @@ class GRASSStartup(wx.Frame):
 
     def OnHelp(self, event):
         """'Help' button clicked"""
-        # help text in lib/init/helptext.html
-        file = os.path.join(self.gisbase, "docs", "html", "helptext.html")
-
-        helpFrame = HelpFrame(parent = None, id = wx.ID_ANY,
-                              title = _("GRASS Quickstart"),
-                              size = (640, 480),
-                              file = file)
-        helpFrame.Show(True)
 
-        event.Skip()
+        # help text in lib/init/helptext.html
+        RunCommand('g.manual', entry = 'helptext')
 
     def OnCloseWindow(self, event):
         """!Close window event"""

+ 3 - 0
gui/wxpython/gui_core/ghelp.py

@@ -880,6 +880,9 @@ class HelpFrame(wx.Dialog):
     As a base class wx.Dialog is used, because of not working
     close button with wx.Frame when dialog is called from wizard.
     If parent is None, application TopLevelWindow is used (wxPython standard behaviour).
+
+    Currently not used (was in location wizard before)
+    due to unsolved problems - window sometimes does not respond.
     """
     def __init__(self, parent, id, title, size, file):
         wx.Dialog.__init__(self, parent = parent, id = id, title = title,

+ 2 - 9
gui/wxpython/location_wizard/wizard.py

@@ -41,7 +41,6 @@ import wx.lib.scrolledpanel as scrolled
 from core                    import globalvar
 from core                    import utils
 from core.gcmd               import RunCommand, GError, GMessage, GWarning
-from gui_core.ghelp          import HelpFrame
 from location_wizard.base    import BaseClass
 from location_wizard.dialogs import SelectTransformDialog
 
@@ -2113,15 +2112,9 @@ class LocationWizard(wx.Object):
 
     def OnHelp(self, event):
         """'Help' button clicked"""
-        # help text in lib/init/helptext.html
-        filePath = os.path.join(os.getenv('GISBASE'), "docs", "html", "helptext.html")
-
-        helpFrame = HelpFrame(parent = None, id = wx.ID_ANY,
-                              title = _("GRASS Quickstart"),
-                              size = (640, 480),
-                              file = filePath)
-        helpFrame.Show(True)
 
+        # help text in lib/init/helptext.html
+        RunCommand('g.manual', entry = 'helptext')
 
 class WizardWithHelpButton(wiz.Wizard):
     def __init__(self, parent, id, title, bitmap):