[GRASS-SVN] r72532 - grass/trunk/gui/wxpython/dbmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 23 10:47:05 PDT 2018
Author: martinl
Date: 2018-03-23 10:47:05 -0700 (Fri, 23 Mar 2018)
New Revision: 72532
Modified:
grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
Log:
dbmgr: don't show db info connection by default, it's just occupying space in the dialog
Modified: grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py 2018-03-23 17:41:02 UTC (rev 72531)
+++ grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py 2018-03-23 17:47:05 UTC (rev 72532)
@@ -87,24 +87,25 @@
self.SetClientSize(self.panel.GetSize())
self.CenterOnParent()
- def _doLayout(self, modeChoices):
+ def _doLayout(self, modeChoices, showDbInfo=False):
"""Do dialog layout"""
self.pagesizer = wx.BoxSizer(wx.VERTICAL)
# dbInfo
- databasebox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
+ if showDbInfo:
+ databasebox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
label=" %s " % _("Database connection"))
- databaseboxsizer = wx.StaticBoxSizer(databasebox, wx.VERTICAL)
- databaseboxsizer.Add(
- CreateDbInfoDesc(
- self.panel,
- self.dbInfo,
- layer=self.layer),
- proportion=1,
- flag=wx.EXPAND | wx.ALL,
- border=3)
-
+ databaseboxsizer = wx.StaticBoxSizer(databasebox, wx.VERTICAL)
+ databaseboxsizer.Add(
+ CreateDbInfoDesc(
+ self.panel,
+ self.dbInfo,
+ layer=self.layer),
+ proportion=1,
+ flag=wx.EXPAND | wx.ALL,
+ border=3)
+
#
# text areas
#
@@ -298,8 +299,9 @@
label=_("Close dialog on apply"))
self.close_onapply.SetValue(True)
- self.pagesizer.Add(databaseboxsizer,
- flag=wx.ALL | wx.EXPAND, border=5)
+ if showDbInfo:
+ self.pagesizer.Add(databaseboxsizer,
+ flag=wx.ALL | wx.EXPAND, border=5)
self.pagesizer.Add(
modesizer,
proportion=0,
More information about the grass-commit
mailing list