File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1275,11 +1275,16 @@ def on_dialog_lineprops_cancelbutton_clicked(self, button):
12751275 self .dlg .hide ()
12761276
12771277# set icon used when windows are minimized
1278- # Unfortunately, the SVG renderer (rsvg) leaks memory like a sieve,
1279- # so we use a PNG file instead.
1278+ # Unfortunately, the SVG renderer (rsvg) leaks memory under earlier
1279+ # versions of pygtk, so we have to use a PNG file instead.
12801280try :
1281+
1282+ if gtk .pygtk_version < (2 , 8 , 0 ):
1283+ icon_filename = 'matplotlib.png'
1284+ else :
1285+ icon_filename = 'matplotlib.svg'
12811286 gtk .window_set_default_icon_from_file (
1282- os .path .join (matplotlib .rcParams ['datapath' ], 'images' , 'matplotlib.png' ))
1287+ os .path .join (matplotlib .rcParams ['datapath' ], 'images' , icon_filename ))
12831288except :
12841289 verbose .report ('Could not load matplotlib icon: %s' % sys .exc_info ()[1 ])
12851290
You can’t perform that action at this time.
0 commit comments