#NEWLINE# def set_notifier_icon( self , notifier , icon ) : #NEWLINE# #INDENT# 'Used to attach an icon on a notifier object.' #NEWLINE# try : #NEWLINE# #INDENT# from gtk import gdk #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# raise RuntimeError ( 'The gtk.gdk module is required to set an icon.' ) #NEWLINE# #UNINDENT# if ( icon is not None ) : #NEWLINE# #INDENT# if ( not isinstance ( icon , gdk . Pixbuf ) ) : #NEWLINE# #INDENT# icon = gdk . pixbuf_new_from_file ( notifier ) #NEWLINE# #UNINDENT# notifier . set_icon_from_pixbuf ( icon )