[empathy: 39/99] Only change the UI in the main thread
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 39/99] Only change the UI in the main thread
- Date: Thu, 9 Jun 2011 09:52:37 +0000 (UTC)
commit c850d9b17d93c4e964c95bbaa526008f2431f912
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date: Wed Feb 23 11:39:35 2011 +0000
Only change the UI in the main thread
src/empathy-call-window.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 0a349d8..ad4e5bc 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2442,6 +2442,16 @@ empathy_call_window_connected (gpointer user_data)
return FALSE;
}
+static gboolean
+emapthy_call_window_show_video_output_cb (gpointer user_data)
+{
+ EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data);
+
+ gtk_widget_hide (self->priv->remote_user_avatar_widget);
+ gtk_widget_show (self->priv->video_output);
+
+ return FALSE;
+}
/* Called from the streaming thread */
static gboolean
@@ -2469,8 +2479,7 @@ empathy_call_window_src_added_cb (EmpathyCallHandler *handler,
pad = empathy_call_window_get_audio_sink_pad (self);
break;
case TP_MEDIA_STREAM_TYPE_VIDEO:
- gtk_widget_hide (priv->remote_user_avatar_widget);
- gtk_widget_show (priv->video_output);
+ g_idle_add (emapthy_call_window_show_video_output_cb, self);
pad = empathy_call_window_get_video_sink_pad (self);
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]