summaryrefslogtreecommitdiff
path: root/gtk/gtksearchenginesimple.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-11-01 21:06:09 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-11-01 21:06:09 -0400
commit4ac4a1bee352eefec217012b8597cc1845044fea (patch)
tree309665c2f6bc204ff5f77051ec9b03b3b24bb716 /gtk/gtksearchenginesimple.c
parentd808daccc1abed9759381c9bb46ad1061d3166b7 (diff)
downloadgtk+-4ac4a1bee352eefec217012b8597cc1845044fea.tar.gz
GtkSearchEngineSimple: adapt the GLib thread api changes
Diffstat (limited to 'gtk/gtksearchenginesimple.c')
-rw-r--r--gtk/gtksearchenginesimple.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtksearchenginesimple.c b/gtk/gtksearchenginesimple.c
index 20698b2543..515dd687cf 100644
--- a/gtk/gtksearchenginesimple.c
+++ b/gtk/gtksearchenginesimple.c
@@ -194,7 +194,7 @@ send_batch (SearchThreadData *data)
data->uri_hits = NULL;
}
-static GStaticPrivate search_thread_data = G_STATIC_PRIVATE_INIT;
+static GPrivate search_thread_data;
#ifdef HAVE_FTW_H
static int
@@ -205,13 +205,13 @@ search_visit_func (const char *fpath,
{
SearchThreadData *data;
gint i;
- const gchar *name;
+ const gchar *name;
gchar *lower_name;
gchar *uri;
gboolean hit;
gboolean is_hidden;
-
- data = (SearchThreadData*)g_static_private_get (&search_thread_data);
+
+ data = (SearchThreadData*)g_private_get (&search_thread_data);
if (data->cancelled)
#ifdef HAVE_GNU_FTW
@@ -276,7 +276,7 @@ search_thread_func (gpointer user_data)
data = user_data;
- g_static_private_set (&search_thread_data, data, NULL);
+ g_private_set (&search_thread_data, data);
nftw (data->path, search_visit_func, 20,
#ifdef HAVE_GNU_FTW
@@ -308,7 +308,7 @@ gtk_search_engine_simple_start (GtkSearchEngine *engine)
data = search_thread_data_new (simple, simple->priv->query);
- g_thread_create (search_thread_func, data, FALSE, NULL);
+ g_thread_unref (g_thread_new ("file-search", search_thread_func, data));
simple->priv->active_search = data;
}