diff options
author | Philip Van Hoof <philip@codeminded.be> | 2009-12-03 12:02:43 +0200 |
---|---|---|
committer | Jannis Pohlmann <jannis@xfce.org> | 2009-12-05 12:31:19 +0100 |
commit | abe6e07d39b503b454614ba9664d2ccfd536f691 (patch) | |
tree | 305044b112306a9070c2ca615326747bc3acfe05 /tumblerd/tumbler-specialized-thumbnailer.c | |
parent | 0c91d6c388206b60d071c72aacaf1c9995f82958 (diff) | |
download | tumbler-abe6e07d39b503b454614ba9664d2ccfd536f691.tar.gz |
Fixed a bug in the specialized thumbnailer support:
- Repeating signals
- Error reporting on timeout
Signed-off-by: Jannis Pohlmann <jannis@xfce.org>
Diffstat (limited to 'tumblerd/tumbler-specialized-thumbnailer.c')
-rw-r--r-- | tumblerd/tumbler-specialized-thumbnailer.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tumblerd/tumbler-specialized-thumbnailer.c b/tumblerd/tumbler-specialized-thumbnailer.c index fd7cac0..5377bff 100644 --- a/tumblerd/tumbler-specialized-thumbnailer.c +++ b/tumblerd/tumbler-specialized-thumbnailer.c @@ -454,8 +454,14 @@ tumbler_specialized_thumbnailer_create (TumblerThumbnailer *thumbnailer, /* we are a thread, so the mainloop will still be * be running to receive the error and ready signals */ if (!sinfo.had_callback) - g_cond_timed_wait (sinfo.condition, sinfo.mutex, &timev); - + { + if (!g_cond_timed_wait (sinfo.condition, sinfo.mutex, &timev)) + { + message = g_strdup ("Failed to call the specialized thumbnailer: timeout"); + g_signal_emit_by_name (thumbnailer, "error", uri, 1, message); + g_free (message); + } + } g_mutex_unlock (sinfo.mutex); } else @@ -466,6 +472,18 @@ tumbler_specialized_thumbnailer_create (TumblerThumbnailer *thumbnailer, g_free (message); g_clear_error (&error); } + + dbus_g_proxy_disconnect_signal (s->proxy, "Finished", + G_CALLBACK (specialized_finished), + &sinfo); + + dbus_g_proxy_disconnect_signal (s->proxy, "Ready", + G_CALLBACK (specialized_ready), + &sinfo); + + dbus_g_proxy_disconnect_signal (s->proxy, "Error", + G_CALLBACK (specialized_error), + &sinfo); } static void |