From 57f54173ecb4b618fb1b48a9c70aa482ce3efe49 Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@linux.intel.com>
Date: Tue, 11 Oct 2011 17:51:14 +0100
Subject: [PATCH] interactive/threads: Fix up after deprecations

The GThread API has undergone a massive restructuring, and the fallout
is still being processed.
---
 tests/interactive/test-threads.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/interactive/test-threads.c b/tests/interactive/test-threads.c
index fd73eafea..4327d53be 100644
--- a/tests/interactive/test-threads.c
+++ b/tests/interactive/test-threads.c
@@ -52,7 +52,7 @@ test_thread_done_idle (gpointer user_data)
   return FALSE;
 }
 
-static GStaticPrivate test_thread_data = G_STATIC_PRIVATE_INIT;
+static GPrivate test_thread_data;
 
 typedef struct
 {
@@ -93,7 +93,7 @@ do_something_very_slow (void)
   TestThreadData *data;
   gint i;
 
-  data = (TestThreadData *) g_static_private_get (&test_thread_data);
+  data = g_private_get (&test_thread_data);
   if (data->cancelled)
     return;
 
@@ -124,10 +124,9 @@ do_something_very_slow (void)
 static gpointer
 test_thread_func (gpointer user_data)
 {
-  TestThreadData *data;
+  TestThreadData *data = user_data;
 
-  data = user_data;
-  g_static_private_set (&test_thread_data, data, NULL);
+  g_private_set (&test_thread_data, data);
 
   do_something_very_slow ();
 
@@ -162,11 +161,14 @@ on_key_press_event (ClutterStage *stage,
       data->label = g_object_ref (count_label);
       data->progress = g_object_ref (progress_rect);
       data->timeline = g_object_ref (timeline);
-      g_thread_create (test_thread_func, data, FALSE, NULL);
+
+      g_thread_new ("counter", test_thread_func, data, FALSE, NULL);
+
       return TRUE;
 
     case CLUTTER_KEY_q:
       clutter_main_quit ();
+
       return TRUE;
 
     default: