Bug 901 - (int-90636) osso_thumbnail_factory_load() needs destroy callback
(int-90636)
: osso_thumbnail_factory_load() needs destroy callback
Status: RESOLVED FIXED
Product: Desktop platform
hildon-thumbnail
: 4.1.3 (5.2008.43-7)
: All Maemo
: Medium normal (vote)
: 5.0-alpha
Assigned To: Marius Vollmer
: HAF QA mailing list
:
: community-diablo, patch
:
:
  Show dependency tree
 
Reported: 2006-12-07 13:17 UTC by Murray Cumming
Modified: 2009-10-22 07:56 UTC (History)
5 users (show)

See Also:


Attachments
Proposed patch (6.76 KB, patch)
2008-09-18 16:42 UTC, Armin Burgmeier
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Murray Cumming (reporter) 2006-12-07 13:17:27 UTC
This is actually in the osso-thumbnail module, but I can't find a bugzilla
product or component for that.

osso_thumbnail_factory_load() needs a destroy callback, which would be called
when the user_data should be destroyed.

Usually the user_data would be released in the regular
OssoThumbnailFactoryFinishedCallback callback (assuming it is called only once,
which should be documented), but that might never be called if I call
osso_thumbnail_factory_cancel().

Here is an example of a GTK+ function that has that:
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeViewColumn.html#gtk-tree-view-column-set-cell-data-func
Comment 1 Kimmo Hämäläinen nokia 2006-12-21 10:49:03 UTC
osso-thumbnail is now Marius' package.
Comment 2 Natalia Dobrovolskaya nokia 2006-12-21 12:37:33 UTC
Reassign the bug to the correct component (osso-thumbnail)
Comment 3 Murray Cumming (reporter) 2007-10-02 10:24:47 UTC
Note that the osso-thumbnail bugzilla component needs to be renamed to  a
hildon-thumbnail component.
Comment 4 Andre Klapper maemo.org 2008-06-23 13:14:44 UTC
Marius: any news here?
Comment 5 Andre Klapper maemo.org 2008-06-23 13:26:36 UTC
(In reply to comment #3)
> Note that the osso-thumbnail bugzilla component needs to be renamed to a
> hildon-thumbnail component.

renamed the component and updated its description. (osso-thumbnail was renamed
to hildon-thumbnail for version 0.9) Thanks for the heads up.
Comment 6 Andre Klapper maemo.org 2008-08-04 15:56:51 UTC
Marius: any news here?
Comment 7 Armin Burgmeier 2008-09-18 16:42:35 UTC
Created an attachment (id=939) [details]
Proposed patch

This patch adds two functions, hildon_thumbnail_factory_load_full and
hildon_thumbnail_factor_load_custom_full that add a GDestroyNotify parameter.
It is called to free the user_data when the corresponding thumb item is freed.
Comment 8 Andre Klapper maemo.org 2009-02-24 17:44:01 UTC
WONTFIX for Diablo (no ressources currently).

hildon-thumbnail has received some refactoring in Fremantle, so it's worth to
recheck if the patch still applies and makes sense in
http://repository.maemo.org/pool/fremantle/free/h/hildon-thumbnail/
so I can ping again to get this in for Fremantle.
Comment 9 Armin Burgmeier 2009-02-25 22:14:44 UTC
The patch does not apply against hildon-thumbnail from SVN. However,
hildon_thumbnail_factory_load() has been deprecated anyway, in favor of
hildon_thumbnail_factory_request_pixbuf() and
hildon_thumbnail_factory_request_uri() both of which have a destroy notify
callback.

I could update the patch of course, but I wonder whether it is even needed.
Comment 10 Murray Cumming (reporter) 2009-02-25 23:54:09 UTC
Agreed. The new function and the deprecation correct this problem.

We will just not wrap the deprecated functions in the C++ bindings.
Comment 11 Andre Klapper maemo.org 2009-03-24 15:36:28 UTC
(In reply to comment #9 by Armin)
> However, hildon_thumbnail_factory_load() has been deprecated anyway, in favor
> of [...] which have a destroy notify callback.

(In reply to comment #10 by Murray)
> Agreed. The new function and the deprecation correct this problem.


--> Closing as FIXED for Fremantle; thanks for updating the ticket.
Comment 12 Lucas Maneos 2009-10-22 07:56:30 UTC
Marking patches of interest to Diablo (Maemo4) community updates, please excuse
the noise.