[maemo-commits] [maemo-commits] r16096 - in projects/haf/branches/hildon-thumbnail/daemonize: . daemon thumbs
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Sep 11 16:38:50 EEST 2008
- Previous message: [maemo-commits] r16095 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16097 - projects/haf/branches/hildon-thumbnail/daemonize/thumbs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof Date: 2008-09-11 16:38:47 +0300 (Thu, 11 Sep 2008) New Revision: 16096 Modified: projects/haf/branches/hildon-thumbnail/daemonize/ChangeLog projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c Log: 2008-09-11 Philip Van Hoof <pvanhoof at gnome.org> * thumbs/hildon-thumbnail-factory.c * daemon/thumbnailer.c: Various fixes that make hildon-thumbnail -factory.h actually work Modified: projects/haf/branches/hildon-thumbnail/daemonize/ChangeLog =================================================================== --- projects/haf/branches/hildon-thumbnail/daemonize/ChangeLog 2008-09-11 09:40:08 UTC (rev 16095) +++ projects/haf/branches/hildon-thumbnail/daemonize/ChangeLog 2008-09-11 13:38:47 UTC (rev 16096) @@ -1,3 +1,9 @@ +2008-09-11 Philip Van Hoof <pvanhoof at gnome.org> + + * thumbs/hildon-thumbnail-factory.c + * daemon/thumbnailer.c: Various fixes that make hildon-thumbnail + -factory.h actually work + 2008-09-10 Philip Van Hoof <pvanhoof at gnome.org> * daemon/hildon-thumbnail-daemon.c Modified: projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c =================================================================== --- projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c 2008-09-11 09:40:08 UTC (rev 16095) +++ projects/haf/branches/hildon-thumbnail/daemonize/daemon/thumbnailer.c 2008-09-11 13:38:47 UTC (rev 16096) @@ -176,7 +176,7 @@ dbus_async_return_if_fail (urls != NULL, context); task->unqueued = FALSE; - task->num = num++; + task->num = ++num; task->object = g_object_ref (object); task->urls = g_strdupv (urls); Modified: projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c =================================================================== --- projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c 2008-09-11 09:40:08 UTC (rev 16095) +++ projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-thumbnail-factory.c 2008-09-11 13:38:47 UTC (rev 16096) @@ -105,7 +105,8 @@ guint handle, gpointer user_data) { - ThumbsItem *item = g_hash_table_lookup (tasks, (gpointer) handle); + gchar *key = g_strdup_printf ("%d", handle); + ThumbsItem *item = g_hash_table_lookup (tasks, key); if (item) { GdkPixbuf *pixbuf = NULL; @@ -160,8 +161,11 @@ g_free (normal); g_free (large); - g_hash_table_remove (tasks, (gpointer) handle); + g_hash_table_remove (tasks, key); } + + g_free (key); + } static void @@ -294,8 +298,9 @@ on_got_handle (DBusGProxy *proxy, guint OUT_handle, GError *error, gpointer userdata) { ThumbsItem *item = userdata; + gchar *key = g_strdup_printf ("%d", OUT_handle); item->handle_id = OUT_handle; - g_hash_table_replace (tasks, (gpointer) OUT_handle, item); + g_hash_table_replace (tasks, key, item); } HildonThumbnailFactoryHandle hildon_thumbnail_factory_load_custom( @@ -368,7 +373,9 @@ on_cancelled (DBusGProxy *proxy, GError *error, gpointer userdata) { ThumbsItem *item = userdata; - g_hash_table_remove (tasks, (gpointer) item->handle_id); + gchar *key = g_strdup_printf ("%d", item->handle_id); + g_hash_table_remove (tasks, key); + g_free (key); } void hildon_thumbnail_factory_cancel(HildonThumbnailFactoryHandle handle) @@ -493,8 +500,8 @@ if (!had_init) { GError *error = NULL; - tasks = g_hash_table_new_full (g_int_hash, g_int_equal, - (GDestroyNotify) NULL, + tasks = g_hash_table_new_full (g_str_hash, g_str_equal, + (GDestroyNotify) g_free, (GDestroyNotify) thumb_item_free); connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); @@ -515,6 +522,9 @@ THUMBNAILER_PATH, THUMBNAILER_INTERFACE); + dbus_g_proxy_add_signal (proxy, "Finished", + G_TYPE_UINT, G_TYPE_INVALID); + dbus_g_proxy_connect_signal (proxy, "Finished", G_CALLBACK (on_task_finished), NULL,
- Previous message: [maemo-commits] r16095 - projects/haf/branches/hildon-thumbnail/daemonize/daemon
- Next message: [maemo-commits] r16097 - projects/haf/branches/hildon-thumbnail/daemonize/thumbs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]