[eog] Don't call gdk_threads_init()
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Don't call gdk_threads_init()
- Date: Sat, 11 Jan 2014 17:29:10 +0000 (UTC)
commit 757128bc3792cca59115df3b956bffedd3732214
Author: Lars Uebernickel <lars uebernickel canonical com>
Date: Tue Jan 7 12:18:19 2014 +0100
Don't call gdk_threads_init()
Accessing gdk from outside the main thread is deprecated.
This also replaces an occurence of gdk_threads_add_idle_full() with an
idle source that is dispatched to the main thread.
https://bugzilla.gnome.org/show_bug.cgi?id=721755
src/eog-image.c | 6 +++---
src/main.c | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/eog-image.c b/src/eog-image.c
index 08b7173..2b646f5 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -493,9 +493,9 @@ do_emit_size_prepared_signal (EogImage *img)
static void
eog_image_emit_size_prepared (EogImage *img)
{
- gdk_threads_add_idle_full (G_PRIORITY_DEFAULT_IDLE,
- (GSourceFunc) do_emit_size_prepared_signal,
- g_object_ref (img), g_object_unref);
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
+ (GSourceFunc) do_emit_size_prepared_signal,
+ g_object_ref (img), g_object_unref);
}
static gboolean
diff --git a/src/main.c b/src/main.c
index 187015b..9c9cbfc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -122,7 +122,6 @@ main (int argc, char **argv)
g_option_context_free (ctx);
set_startup_flags ();
- gdk_threads_init ();
EOG_APP->priv->flags = flags;
if (force_new_instance) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]