[GRASS-SVN] r38834 - in grass/branches/develbranch_6/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 22 12:36:29 EDT 2009


Author: martinl
Date: 2009-08-22 12:36:28 -0400 (Sat, 22 Aug 2009)
New Revision: 38834

Added:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/help.py
Modified:
   grass/branches/develbranch_6/gui/wxpython/gis_set.py
Log:
wxGUI: HelpWindow moved to help.py
       (merge from trunk, r38833)


Modified: grass/branches/develbranch_6/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gis_set.py	2009-08-22 16:33:37 UTC (rev 38833)
+++ grass/branches/develbranch_6/gui/wxpython/gis_set.py	2009-08-22 16:36:28 UTC (rev 38834)
@@ -8,7 +8,6 @@
 
 Classes:
  - GRASSStartup
- - HelpWindow
  - StartUp
 
 (C) 2006-2009 by the GRASS Development Team
@@ -34,6 +33,8 @@
 if not os.getenv("GRASS_WXBUNDLED"):
     globalvar.CheckForWx()
 
+from gui_modules import help
+
 import wx
 import wx.html
 import wx.lib.rcsizer as rcs
@@ -720,10 +721,10 @@
         # help text in lib/init/helptext.html
         file=os.path.join(self.gisbase, "docs", "html", "helptext.html")
 
-        helpFrame = HelpWindow(parent=self, id=wx.ID_ANY,
-                               title=_("GRASS Quickstart"),
-                               size=(640, 480),
-                               file=file)
+        helpFrame = help.HelpWindow(parent=self, id=wx.ID_ANY,
+                                    title=_("GRASS Quickstart"),
+                                    size=(640, 480),
+                                    file=file)
         helpFrame.Show(True)
 
         event.Skip()
@@ -733,31 +734,6 @@
         event.Skip()
         sys.exit(2)
 
-class HelpWindow(wx.Frame):
-    """!GRASS Quickstart help window"""
-    def __init__(self, parent, id, title, size, file):
-
-        wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size)
-
-        sizer = wx.BoxSizer(wx.VERTICAL)
-
-        # text
-        helpFrame = wx.html.HtmlWindow(parent=self, id=wx.ID_ANY)
-        helpFrame.SetStandardFonts (size = 10)
-        helpFrame.SetBorders(10)
-        wx.InitAllImageHandlers()
-
-        helpFrame.LoadFile(file)
-        self.Ok = True
-
-        sizer.Add(item=helpFrame, proportion=1, flag=wx.EXPAND)
-
-        self.SetAutoLayout(True)
-        self.SetSizer(sizer)
-        #        sizer.Fit(self)
-        #        sizer.SetSizeHints(self)
-        self.Layout()
-
 class GListBox(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
     """!Use wx.ListCtrl instead of wx.ListBox, different style for
     non-selectable items (e.g. mapsets with denied permission)"""

Copied: grass/branches/develbranch_6/gui/wxpython/gui_modules/help.py (from rev 38833, grass/trunk/gui/wxpython/gui_modules/help.py)
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/help.py	                        (rev 0)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/help.py	2009-08-22 16:36:28 UTC (rev 38834)
@@ -0,0 +1,45 @@
+"""!
+ at package help.py
+
+ at brief Help window
+
+ at todo Needs improvements...
+
+Classes:
+ - HelpWindow
+
+(C) 2008-2009 by the GRASS Development Team
+
+This program is free software under the GNU General Public
+License (>=v2). Read the file COPYING that comes with GRASS
+for details.
+
+ at author Martin Landa <landa.martin gmail.com>
+"""
+
+import wx
+
+class HelpWindow(wx.Frame):
+    """!GRASS Quickstart help window"""
+    def __init__(self, parent, id, title, size, file):
+
+        wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size)
+
+        sizer = wx.BoxSizer(wx.VERTICAL)
+
+        # text
+        helpFrame = wx.html.HtmlWindow(parent=self, id=wx.ID_ANY)
+        helpFrame.SetStandardFonts (size = 10)
+        helpFrame.SetBorders(10)
+        wx.InitAllImageHandlers()
+
+        helpFrame.LoadFile(file)
+        self.Ok = True
+
+        sizer.Add(item=helpFrame, proportion=1, flag=wx.EXPAND)
+
+        self.SetAutoLayout(True)
+        self.SetSizer(sizer)
+        #        sizer.Fit(self)
+        #        sizer.SetSizeHints(self)
+        self.Layout()



More information about the grass-commit mailing list