Commit a62b9f8c authored by Christian Hergert's avatar Christian Hergert

threads: use g_idle_add_full() or g_timeout_add_full()

gdk_threads_* is no longer available, so use the equivalent from GLib.
parent ddcc8121
......@@ -268,8 +268,7 @@ gtk_source_completion_words_populate (GtkSourceCompletionProvider *provider,
if (add_in_idle (words))
{
gtk_source_completion_words_library_lock (priv->library);
priv->idle_id = gdk_threads_add_idle ((GSourceFunc)add_in_idle,
words);
priv->idle_id = g_idle_add ((GSourceFunc)add_in_idle, words);
}
}
......
......@@ -961,11 +961,11 @@ queue_bracket_highlighting_update (GtkSourceBuffer *buffer)
* ::update() or ::after-paint() to synchronize this.
*/
priv->bracket_highlighting_timeout_id =
gdk_threads_add_timeout_full (G_PRIORITY_LOW,
UPDATE_BRACKET_DELAY,
bracket_highlighting_timeout_cb,
buffer,
NULL);
g_timeout_add_full (G_PRIORITY_LOW,
UPDATE_BRACKET_DELAY,
bracket_highlighting_timeout_cb,
buffer,
NULL);
}
/* Although this function is not really useful
......
......@@ -2391,8 +2391,9 @@ install_idle_worker (GtkSourceContextEngine *ce)
{
if (ce->first_update == 0 && ce->incremental_update == 0)
ce->incremental_update =
gdk_threads_add_idle_full (INCREMENTAL_UPDATE_PRIORITY,
(GSourceFunc) idle_worker, ce, NULL);
g_idle_add_full (INCREMENTAL_UPDATE_PRIORITY,
(GSourceFunc) idle_worker,
ce, NULL);
}
/**
......@@ -2414,9 +2415,9 @@ install_first_update (GtkSourceContextEngine *ce)
}
ce->first_update =
gdk_threads_add_idle_full (FIRST_UPDATE_PRIORITY,
(GSourceFunc) first_update_callback,
ce, NULL);
g_idle_add_full (FIRST_UPDATE_PRIORITY,
(GSourceFunc) first_update_callback,
ce, NULL);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment