[Xfce4-commits] <tumbler:master> Add the handle to the Ready signal

Jannis Pohlmann noreply at xfce.org
Thu Oct 15 16:46:01 CEST 2009


Updating branch refs/heads/master
         to bd3e532015c67ac908340b9654b4208b9f2e4961 (commit)
       from 8014615d2a684a005d6e276bdc4502263a67c0a0 (commit)

commit bd3e532015c67ac908340b9654b4208b9f2e4961
Author: Philip Van Hoof <philip at codeminded.be>
Date:   Thu Oct 15 15:57:38 2009 +0200

    Add the handle to the Ready signal
    
    Signed-off-by: Jannis Pohlmann <jannis at xfce.org>

 tumbler/tumbler-marshal.list       |    2 +-
 tumblerd/tumbler-group-scheduler.c |    7 ++++---
 tumblerd/tumbler-lifo-scheduler.c  |    6 ++++--
 tumblerd/tumbler-scheduler.c       |    5 +++--
 tumblerd/tumbler-service.c         |    5 +++++
 5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/tumbler/tumbler-marshal.list b/tumbler/tumbler-marshal.list
index 7037f40..9c82ff1 100644
--- a/tumbler/tumbler-marshal.list
+++ b/tumbler/tumbler-marshal.list
@@ -1,6 +1,6 @@
 VOID:STRING,INT,STRING
 VOID:UINT,POINTER,INT,STRING,STRING
 VOID:STRING,INT,STRING
-VOID:POINTER,STRING
+VOID:UINT,POINTER,STRING
 VOID:UINT,STRING
 VOID:UINT,POINTER,INT,STRING
diff --git a/tumblerd/tumbler-group-scheduler.c b/tumblerd/tumbler-group-scheduler.c
index d7b6b68..6cbfd2d 100644
--- a/tumblerd/tumbler-group-scheduler.c
+++ b/tumblerd/tumbler-group-scheduler.c
@@ -545,7 +545,8 @@ tumbler_group_scheduler_thread (gpointer data,
       uris[n] = NULL;
 
       /* notify others that the cached thumbnails are ready */
-      g_signal_emit_by_name (scheduler, "ready", uris, request->origin);
+      g_signal_emit_by_name (scheduler, "ready", request->handle, uris, 
+                             request->origin);
 
       /* free string array and cached list */
       g_list_free (cached_uris);
@@ -662,8 +663,8 @@ tumbler_group_scheduler_thread (gpointer data,
       success_uris[n] = NULL;
 
       /* emit a grouped ready signal */
-      g_signal_emit_by_name (request->scheduler, "ready", success_uris, 
-                             request->origin);
+      g_signal_emit_by_name (request->scheduler, "ready", request->handle, 
+                             success_uris, request->origin);
 
       /* free the success URI array. Its contents are owned by the ready URI list */
       g_free (success_uris);
diff --git a/tumblerd/tumbler-lifo-scheduler.c b/tumblerd/tumbler-lifo-scheduler.c
index 2501f92..19fb31e 100644
--- a/tumblerd/tumbler-lifo-scheduler.c
+++ b/tumblerd/tumbler-lifo-scheduler.c
@@ -478,7 +478,8 @@ tumbler_lifo_scheduler_thread (gpointer data,
       uris[n] = NULL;
 
       /* notify others that the cached thumbnails are ready */
-      g_signal_emit_by_name (scheduler, "ready", uris, request->origin);
+      g_signal_emit_by_name (scheduler, "ready", request->handle, uris, 
+                             request->origin);
 
       /* free string array and cached list */
       g_list_free (cached_uris);
@@ -570,7 +571,8 @@ tumbler_lifo_scheduler_thumbnailer_ready (TumblerThumbnailer      *thumbnailer,
 
     
   /* forward the ready signal */
-  g_signal_emit_by_name (request->scheduler, "ready", uris, request->origin);
+  g_signal_emit_by_name (request->scheduler, "ready", request->handle, uris, 
+                         request->origin);
 }
 
 
diff --git a/tumblerd/tumbler-scheduler.c b/tumblerd/tumbler-scheduler.c
index 60aad77..2e6caba 100644
--- a/tumblerd/tumbler-scheduler.c
+++ b/tumblerd/tumbler-scheduler.c
@@ -151,9 +151,10 @@ tumbler_scheduler_class_init (TumblerSchedulerIface *klass)
                   G_STRUCT_OFFSET (TumblerSchedulerIface, ready),
                   NULL,
                   NULL,
-                  tumbler_marshal_VOID__POINTER_STRING,
+                  tumbler_marshal_VOID__UINT_POINTER_STRING,
                   G_TYPE_NONE,
-                  2,
+                  3,
+                  G_TYPE_UINT,
                   G_TYPE_STRV,
                   G_TYPE_STRING);
 
diff --git a/tumblerd/tumbler-service.c b/tumblerd/tumbler-service.c
index d027add..3873e6d 100644
--- a/tumblerd/tumbler-service.c
+++ b/tumblerd/tumbler-service.c
@@ -91,6 +91,7 @@ static void tumbler_service_scheduler_finished (TumblerScheduler *scheduler,
                                                 const gchar      *origin,
                                                 TumblerService   *service);
 static void tumbler_service_scheduler_ready    (TumblerScheduler *scheduler,
+                                                guint             handle,
                                                 const GStrv       uris,
                                                 const gchar      *origin,
                                                 TumblerService   *service);
@@ -425,6 +426,7 @@ tumbler_service_scheduler_finished (TumblerScheduler *scheduler,
 
 static void
 tumbler_service_scheduler_ready (TumblerScheduler *scheduler,
+                                 guint             handle,
                                  const GStrv       uris,
                                  const gchar      *origin,
                                  TumblerService   *service)
@@ -443,6 +445,9 @@ tumbler_service_scheduler_ready (TumblerScheduler *scheduler,
 
   dbus_message_iter_init_append (message, &iter);
 
+  /* append the request handle */
+  dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &handle);
+
   /* start the URI string array */
   dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY,
                                     DBUS_TYPE_STRING_AS_STRING, &strv_iter);



More information about the Xfce4-commits mailing list