diff options
| author | Todd Zullinger <tmz@pobox.com> | 2008-07-14 23:06:45 -0400 |
|---|---|---|
| committer | Todd Zullinger <tmz@pobox.com> | 2008-07-14 23:06:45 -0400 |
| commit | 5486a8db411919d65100eaa65ba804f76ae8b801 (patch) | |
| tree | 957bf2600670149b43630471d1c5cefdda557e80 /bindings/python/gpod.i.in | |
| parent | 8d102ec17fcaadfdfab35ee06e09f56acd192088 (diff) | |
Update python bindings to work with new thumbnail API
Diffstat (limited to 'bindings/python/gpod.i.in')
| -rw-r--r-- | bindings/python/gpod.i.in | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/bindings/python/gpod.i.in b/bindings/python/gpod.i.in index e74d3d9..1b5d5f5 100644 --- a/bindings/python/gpod.i.in +++ b/bindings/python/gpod.i.in @@ -82,7 +82,6 @@ PyObject* sw_get_photoalbums(Itdb_PhotoDB *db); PyObject* sw_get_photoalbum(GList *list, gint index); PyObject* sw_get_photos(Itdb_PhotoDB *db); PyObject* sw_get_photo(GList *list, gint index); -PyObject* sw_get_artwork_thumbnails(Itdb_Artwork *artwork); PyObject* sw_get_photoalbum_members(Itdb_PhotoAlbum *album); PyObject* sw_ipod_device_to_dict(Itdb_Device *device); void sw__track_extra_destroy (PyObject *data); @@ -208,18 +207,6 @@ SWIGTYPE_p__Itdb_PhotoAlbum, 0)); return list; } - PyObject* sw_get_artwork_thumbnails(Itdb_Artwork *artwork) { - PyObject *list; - gint i; - GList *l; - list = PyList_New(g_list_length(artwork->thumbnails)); - for (l = artwork->thumbnails, i = 0; l; l = l->next, ++i) { - PyList_SET_ITEM(list, i, SWIG_NewPointerObj((void*)(l->data), SWIGTYPE_p__Itdb_Thumb, 0)); - } - return list; - } - - PyObject* sw_get_photoalbum(GList *list, gint index) { GList *position; if ( (index >= g_list_length(list)) || index < 0 ) { @@ -487,9 +474,11 @@ typedef int gint; #ifdef HAVE_GDKPIXBUF #ifdef HAVE_PYGOBJECT -%typemap(out) gpointer itdb_thumb_get_gdk_pixbuf { +%typemap(out) gpointer itdb_artwork_get_pixbuf { $result = pygobject_new((GObject *)$1); - g_object_unref($1); + if ($1) { + g_object_unref($1); + } } %typemap(in) gpointer pixbuf { @@ -515,7 +504,6 @@ PyObject* sw_get_photoalbum(GList *list, gint index); PyObject* sw_get_photos(Itdb_PhotoDB *db); PyObject* sw_get_photo(GList *list, gint index); PyObject* sw_get_photoalbum_members(Itdb_PhotoAlbum *album); -PyObject* sw_get_artwork_thumbnails(Itdb_Artwork *artwork); PyObject* sw_ipod_device_to_dict(Itdb_Device *device); %include "@top_srcdir@/src/itdb.h" |
