from gi.repository import Gtk
from gi.repository import GObject

class Icon(Gtk.Image):
    __gtype_name__ = 'SugarIcon'

    def __init__(self, **kwargs):
        GObject.GObject.__init__(self, **kwargs)
        self._file = None

    def get_file(self):
        return self._file

    def set_file(self, file_name):
        self._file = file_name
        self._buffer.file_name = file_name

    file = GObject.property(type=object, setter=set_file, getter=get_file)

icon = Icon()
icon.props.file

