def OnIconClicked(self, widget = None): response = self.filechooser.run() if response == gtk.RESPONSE_OK: path = self.filechooser.get_filename() image = gtk.Image() image.set_from_file(path) self.icon.set_image(image) self.filechooser.destroy()