First go at adding events support to Browser
This commit is contained in:
@@ -19,7 +19,7 @@ headers
|
||||
extern Pycairo_CAPI_t *Pycairo_CAPI;
|
||||
|
||||
%%
|
||||
modulename gecko
|
||||
modulename _sugar
|
||||
%%
|
||||
import gobject.GObject as PyGObject_Type
|
||||
import gtk.Entry as PyGtkEntry_Type
|
||||
@@ -179,3 +179,17 @@ _wrap_sugar_cairo_surface_from_gdk_pixbuf(PyGObject *self, PyObject *args, PyObj
|
||||
return PycairoSurface_FromSurface(surface, NULL);
|
||||
}
|
||||
%%
|
||||
override-slot SugarBrowserEvent.tp_getattr
|
||||
static PyObject *
|
||||
_wrap_sugar_browser_event_tp_getattr(PyObject *self, char *attr)
|
||||
{
|
||||
SugarBrowserEvent *event = pyg_boxed_get(self, SugarBrowserEvent);
|
||||
|
||||
if (!strcmp(attr, "__members__"))
|
||||
return Py_BuildValue("[s]", "image_uri");
|
||||
if (!strcmp(attr, "image_uri"))
|
||||
return PyString_FromString(event->image_uri);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
%%
|
||||
|
||||
Reference in New Issue
Block a user