Use gtk_status_icon_set_name() only if it is available.
authorDaiki Ueno <daiki.ueno@gmail.com>
Tue, 29 Mar 2011 13:39:44 +0000 (09:39 -0400)
committerPeng Huang <shawn.p.huang@gmail.com>
Tue, 29 Mar 2011 13:39:44 +0000 (09:39 -0400)
commitef2be0415bbe948ce4be39b8a5d2bc60c3384bb2
treead1c4476d033eaaf2eea04c663ba659ab3dba136
parent5ef29602141945ed1255662576c2e8194af78325
Use gtk_status_icon_set_name() only if it is available.

gtk_status_icon_set_name() is not exported to python through pygtk2 <= 2.17,
which is the version from Debian sid and Fedora 14.

>>> import gtk
>>> gtk.pygtk_version
(2, 17, 0)
>>> hasattr(gtk.StatusIcon, 'set_name')
False

This patch checks the availability.

BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/4327042
Patch from Daiki Ueno <daiki.ueno@gmail.com>.
ui/gtk/panel.py