Opened 10 years ago

Closed 6 years ago

#2028 closed defect (fixed)

SetVirtualSizeHints is deprecated in wxWidgets 2.9

Reported by: marisn Owned by: grass-dev@…
Priority: minor Milestone: 7.0.5
Component: wxGUI Version: svn-trunk
Keywords: wxPython 3, FitInside Cc:
CPU: Unspecified Platform: Unspecified


"This is exactly the same as FitInside() in wxWidgets 2.9 and later, please replace calls to it with FitInside()."

Current code just generates warnings when running with wxPython

Change History (3)

comment:1 by wenzeslaus, 8 years ago

Keywords: wxPython 3 FitInside added

The only occurrences of this warning in trunk r64634 are:

dbmgr/        layerSizer.SetVirtualSizeHints(self.addPanel)
gui_core/                self.outputSizer.SetVirtualSizeHints)(self.panelOutput)

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

.../gui/wxpython/dbmgr/ wxPyDeprecationWarning:
Call to deprecated item 'SetVirtualSizeHints'.

Using the following code from gui_core/

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

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                                                                   
Platform: Linux-3.16.0-30-generic-x86_64-with-Ubuntu-14.10-utopic               

comment:2 by martinl, 7 years ago


comment:3 by martinl, 6 years ago

Resolution: fixed
Status: newclosed

Already backported to relbr70, closing.

Note: See TracTickets for help on using tickets.