#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
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):