[frogr] Use gdk_threads_add_timeout instead of just g_timeout_add
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Use gdk_threads_add_timeout instead of just g_timeout_add
- Date: Thu, 13 Jan 2011 10:14:14 +0000 (UTC)
commit 666f202661f6e7e9a4bd725e40cb6fe9f340273b
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Thu Jan 13 11:13:38 2011 +0100
Use gdk_threads_add_timeout instead of just g_timeout_add
src/frogr-controller.c | 14 +++++++-------
src/main.c | 2 ++
2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 96c5bbc..dbeab69 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -543,13 +543,13 @@ _upload_picture_cb (GObject *object, GAsyncResult *res, gpointer data)
if (g_slist_length (groups) > 0)
{
up_st->groups = groups;
- g_timeout_add (DEFAULT_TIMEOUT, _add_picture_to_groups_on_idle, up_st);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, _add_picture_to_groups_on_idle, up_st);
}
}
/* Complete the upload process when possible */
up_st->error = error;
- g_timeout_add (DEFAULT_TIMEOUT, _complete_picture_upload_on_idle, up_st);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, _complete_picture_upload_on_idle, up_st);
}
static gboolean
@@ -1962,7 +1962,7 @@ frogr_controller_show_details_dialog (FrogrController *self,
_fetch_tags (self);
/* Show the dialog when possible */
- g_timeout_add (DEFAULT_TIMEOUT, (GSourceFunc) _show_details_dialog_on_idle, pictures);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_details_dialog_on_idle, pictures);
}
void
@@ -1982,7 +1982,7 @@ frogr_controller_show_add_tags_dialog (FrogrController *self,
_fetch_tags (self);
/* Show the dialog when possible */
- g_timeout_add (DEFAULT_TIMEOUT, (GSourceFunc) _show_add_tags_dialog_on_idle, pictures);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_add_tags_dialog_on_idle, pictures);
}
void
@@ -2002,7 +2002,7 @@ frogr_controller_show_create_new_album_dialog (FrogrController *self,
_fetch_albums (self);
/* Show the dialog when possible */
- g_timeout_add (DEFAULT_TIMEOUT, (GSourceFunc) _show_create_new_album_dialog_on_idle, pictures);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_create_new_album_dialog_on_idle, pictures);
}
void
@@ -2022,7 +2022,7 @@ frogr_controller_show_add_to_album_dialog (FrogrController *self,
_fetch_albums (self);
/* Show the dialog when possible */
- g_timeout_add (DEFAULT_TIMEOUT, (GSourceFunc) _show_add_to_album_dialog_on_idle, pictures);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_add_to_album_dialog_on_idle, pictures);
}
void
@@ -2042,7 +2042,7 @@ frogr_controller_show_add_to_group_dialog (FrogrController *self,
_fetch_groups (self);
/* Show the dialog when possible */
- g_timeout_add (DEFAULT_TIMEOUT, (GSourceFunc) _show_add_to_group_dialog_on_idle, pictures);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_add_to_group_dialog_on_idle, pictures);
}
void
diff --git a/src/main.c b/src/main.c
index 565b183..e524bda 100644
--- a/src/main.c
+++ b/src/main.c
@@ -32,6 +32,8 @@ main (int argc, char **argv)
{
FrogrController *fcontroller = NULL;
+ gdk_threads_init ();
+
gtk_init (&argc, &argv);
g_set_application_name(PACKAGE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]