|
From: John H. <jdh...@ac...> - 2006-05-18 21:03:06
|
>>>>> "Frederic" == Frederic Back <fre...@gm...> writes:
Frederic> Hello, I'm developing a plugin in pygtk, which
Frederic> indirectly (via networkx) uses matplotlib to display
Frederic> graphs.
Frederic> Now, I have the following problem: When I import pylab,
Frederic> my window icon (the small icon in the window decoration)
Frederic> gets replaced by the matplotlib icon. I pasted a sample
Frederic> script below to illustrate.
Frederic> This is amazingly annoying for me since I am merely
Frederic> writing a plugin for an existing application and cannot
Frederic> simply replace the original window icon.
Frederic> Is there any way to supress this behaviour?
You can comment out the code in backends/backend_gtk.py
try:
gtk.window_set_default_icon_from_file (
os.path.join (matplotlib.rcParams['datapath'], 'matplotlib.svg'))
except:
verbose.report('Could not load matplotlib icon: %s' % sys.exc_info()[1])
or physically remove the icon in which case you'll just get a report
that it is missing.
You can also set the icon yourself after import matplotlib/backend_gtk
using the same code.
|