[Xfce4-commits] <tumbler:master> Fixed a bug in the specialized thumbnailer support: - Repeating signals - Error reporting on timeout

Jannis Pohlmann noreply at xfce.org
Sat Dec 5 12:44:02 CET 2009


Updating branch refs/heads/master
         to abe6e07d39b503b454614ba9664d2ccfd536f691 (commit)
       from 0c91d6c388206b60d071c72aacaf1c9995f82958 (commit)

commit abe6e07d39b503b454614ba9664d2ccfd536f691
Author: Philip Van Hoof <philip at codeminded.be>
Date:   Thu Dec 3 12:02:43 2009 +0200

    Fixed a bug in the specialized thumbnailer support:
      - Repeating signals
      - Error reporting on timeout
    
    Signed-off-by: Jannis Pohlmann <jannis at xfce.org>

 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



More information about the Xfce4-commits mailing list