[rhythmbox] podcast: create confirmation dialogs on the main thread
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] podcast: create confirmation dialogs on the main thread
- Date: Fri, 6 Dec 2013 06:12:43 +0000 (UTC)
commit d352298258d92b3e6e490dddb57555313af34418
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Dec 6 16:12:18 2013 +1000
podcast: create confirmation dialogs on the main thread
podcast/rb-podcast-manager.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/podcast/rb-podcast-manager.c b/podcast/rb-podcast-manager.c
index 7b5031d..2a5088a 100644
--- a/podcast/rb-podcast-manager.c
+++ b/podcast/rb-podcast-manager.c
@@ -1104,7 +1104,9 @@ confirm_bad_mime_type_response_cb (GtkDialog *dialog, int response, RBPodcastThr
if (response == GTK_RESPONSE_YES) {
/* set the 'existing feed' flag to avoid the mime type check */
info->existing_feed = TRUE;
- rb_podcast_manager_thread_parse_feed (info);
+ g_thread_new ("podcast-parse",
+ (GThreadFunc) rb_podcast_manager_thread_parse_feed,
+ info);
} else {
g_free (info->url);
g_free (info);
@@ -1113,7 +1115,7 @@ confirm_bad_mime_type_response_cb (GtkDialog *dialog, int response, RBPodcastThr
gtk_widget_destroy (GTK_WIDGET (dialog));
}
-static void
+static gboolean
confirm_bad_mime_type (RBPodcastThreadInfo *info)
{
GtkWidget *dialog;
@@ -1129,6 +1131,7 @@ confirm_bad_mime_type (RBPodcastThreadInfo *info)
gtk_widget_show_all (dialog);
g_signal_connect (dialog, "response", G_CALLBACK (confirm_bad_mime_type_response_cb), info);
GDK_THREADS_LEAVE ();
+ return FALSE;
}
static gpointer
@@ -1149,7 +1152,7 @@ rb_podcast_manager_thread_parse_feed (RBPodcastThreadInfo *info)
if (g_error_matches (result->error,
RB_PODCAST_PARSE_ERROR,
RB_PODCAST_PARSE_ERROR_MIME_TYPE)) {
- confirm_bad_mime_type (info);
+ g_idle_add ((GSourceFunc) confirm_bad_mime_type, info);
return NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]