[GRASS-dev] [GRASS GIS] #2028: SetVirtualSizeHints is deprecated in wxWidgets 2.9

#2028: SetVirtualSizeHints is deprecated in wxWidgets 2.9
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
"This is exactly the same as FitInside() in wxWidgets 2.9 and later,
please replace calls to it with FitInside()."
http://docs.wxwidgets.org/trunk/deprecated.html#_deprecated000046

Current code just generates warnings when running with wxPython 2.9.4.1

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2028&gt;
GRASS GIS <http://grass.osgeo.org>

#2028: SetVirtualSizeHints is deprecated in wxWidgets 2.9
-----------------------------------+----------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: wxPython 3, FitInside | Platform: Unspecified
      Cpu: Unspecified |
-----------------------------------+----------------------------------------
Changes (by wenzeslaus):

  * keywords: => wxPython 3, FitInside

Comment:

The only occurrences of this warning in trunk r64634 are:

{{{
dbmgr/base.py:2895: layerSizer.SetVirtualSizeHints(self.addPanel)
gui_core/goutput.py:231:
self.outputSizer.SetVirtualSizeHints)(self.panelOutput)
}}}

where only the first one is an issue causing following output when dbmgr
is started:

{{{
.../gui/wxpython/dbmgr/base.py:2895: wxPyDeprecationWarning:
Call to deprecated item 'SetVirtualSizeHints'.
   layerSizer.SetVirtualSizeHints(self.addPanel)
}}}

Using the following code from `gui_core/goutput.py`:

{{{
         # eliminate gtk_widget_size_allocate() warnings
         # avoid to use a deprecated method in wxPython >= 2.9
         getattr(self.outputSizer, 'FitInside',
                 self.outputSizer.SetVirtualSizeHints)(self.panelOutput)
}}}

fixed in r64635 for trunk. This is very safe, but anyway I would backport
it between 7.0.0 and 7.0.1 just to be sure. Close afterwards.

No warning generated when starting dbmgr. Tested with wxPython 3.0
(Lubuntu):

{{{
GRASS version: 7.1.svn
GRASS SVN revision: 64565M
Build date: 2015-01-11
Build platform: x86_64-unknown-linux-gnu
GDAL: 1.10.1
PROJ.4: 4.8.0
GEOS: 3.4.2
SQLite: 3.8.6
Python: 2.7.8
wxPython: 3.0.0.0
Platform: Linux-3.16.0-30-generic-x86_64-with-Ubuntu-14.10-utopic
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2028#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>