Hi all,
I've got bored with the generic application icon in the wx backend so
I added the same icon as GTK backend uses (it is anyway bundled with
matplotlib). I have tested this on Windows (XP, Python 2.6.4,
matplotlib 0.99.1, wxPython 2.8.10.1) and on Linux (Fedora8, Python
2.5.1, matplotlib 0.98.3, wxPython 0.8.9.1)
may be somebody from developers can integrate this patch into the source...
*** backend_wx.py 2010-02-04 13:17:59.954259000 +0100
--- backend_wx.py 2010-02-04 16:00:45.251283000 +0100
···
***************
*** 1454,1460 ****
self.figmgr = FigureManagerWx(self.canvas, num, self)
bind(self, wx.EVT_CLOSE, self._onClose)
!
def _get_toolbar(self, statbar):
if matplotlib.rcParams['toolbar']=='classic':
toolbar = NavigationToolbarWx(self.canvas, True)
--- 1454,1473 ----
self.figmgr = FigureManagerWx(self.canvas, num, self)
bind(self, wx.EVT_CLOSE, self._onClose)
!
! # setting window icon to replace the generic one
! self.SetIcon(self._load_icon())
!
! def _load_icon(self):
! # since wxPython does not support SVG, only PNG image is used
! icon = wx.IconFromBitmap(_load_bitmap('matplotlib.png'))
! # on Windows wxPython can not use one icon size for all sizes,
! # with only exception of 32px -> 16px auto conversion
! if wx.Platform == '__WXMSW__':
! icon.SetHeight(32)
! icon.SetWidth(32)
! return icon
!
def _get_toolbar(self, statbar):
if matplotlib.rcParams['toolbar']=='classic':
toolbar = NavigationToolbarWx(self.canvas, True)