[GRASS-SVN] r51832 - grass/branches/releasebranch_6_4/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun May 27 08:24:21 PDT 2012
Author: martinl
Date: 2012-05-27 08:24:21 -0700 (Sun, 27 May 2012)
New Revision: 51832
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py
Log:
wxGUI/about: simplify LANG detection (use grass.gisenv())
first page scrollable
(merge r51830 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py 2012-05-27 15:18:44 UTC (rev 51831)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py 2012-05-27 15:24:21 UTC (rev 51832)
@@ -379,10 +379,8 @@
class AboutWindow(wx.Frame):
"""!Create custom About Window
-
- @todo improve styling
"""
- def __init__(self, parent, size = (750, 460),
+ def __init__(self, parent, size = (650, 460),
title = _('About GRASS GIS'), **kwargs):
wx.Frame.__init__(self, parent = parent, id = wx.ID_ANY, title = title, size = size, **kwargs)
@@ -394,7 +392,8 @@
# get version and web site
vInfo = grass.version()
- infoTxt = wx.Panel(parent = panel, id = wx.ID_ANY)
+ infoTxt = ScrolledPanel(parent = panel)
+ infoTxt.SetupScrolling()
infoSizer = wx.BoxSizer(wx.VERTICAL)
infoGridSizer = wx.GridBagSizer(vgap = 5, hgap = 5)
infoGridSizer.AddGrowableCol(0)
@@ -404,14 +403,14 @@
bitmap = wx.Bitmap(name = logo,
type = wx.BITMAP_TYPE_PNG))
infoSizer.Add(item = logoBitmap, proportion = 0,
- flag = wx.ALL | wx.ALIGN_CENTER, border = 25)
+ flag = wx.ALL | wx.ALIGN_CENTER, border = 20)
info = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
label = 'GRASS GIS ' + vInfo['version'] + '\n\n')
info.SetFont(wx.Font(13, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
info.SetForegroundColour(wx.Colour(35, 142, 35))
infoSizer.Add(item = info, proportion = 0,
- flag = wx.BOTTOM | wx.ALIGN_CENTER, border = 15)
+ flag = wx.BOTTOM | wx.ALIGN_CENTER, border = 1)
row = 0
infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
@@ -478,13 +477,7 @@
label = _('Language:')),
pos = (row, 0),
flag = wx.ALIGN_RIGHT)
- rcfile = open(os.path.join(os.getenv('HOME'), ".grassrc6"))
- lines = rcfile.readlines()
- rcfile.close()
- lang = None
- for line in lines:
- if 'LANG' in line:
- lang = line.split(':')[1].strip()
+ lang = grass.gisenv().get('LANG', None)
if not lang:
import locale
lang = '.'.join(locale.getdefaultlocale())
@@ -527,7 +520,7 @@
panel.SetSizer(sizer)
self.Layout()
- self.SetMinSize((500, 400))
+ self.SetMinSize((400, 400))
def _pageCopyright(self):
"""Copyright information"""
More information about the grass-commit
mailing list