From: Guillaume Desmottes Date: Mon, 11 Jan 2010 14:47:47 +0000 (+0000) Subject: factor out start_call X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=f9f6639f8f1cee0cb49fbe607cb00bb59fc02208 factor out start_call --- diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index d78016ac..564d904c 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -2052,6 +2052,15 @@ empathy_call_window_remove_video_input (EmpathyCallWindow *self) gtk_widget_show (priv->self_user_avatar_widget); } +static void +start_call (EmpathyCallWindow *self) +{ + EmpathyCallWindowPriv *priv = GET_PRIV (self); + + priv->call_started = TRUE; + empathy_call_handler_start_call (priv->handler); + gst_element_set_state (priv->pipeline, GST_STATE_PLAYING); +} static gboolean empathy_call_window_bus_message (GstBus *bus, GstMessage *message, @@ -2078,9 +2087,7 @@ empathy_call_window_bus_message (GstBus *bus, GstMessage *message, gst_message_parse_state_changed (message, NULL, &newstate, NULL); if (newstate == GST_STATE_PAUSED) { - priv->call_started = TRUE; - empathy_call_handler_start_call (priv->handler); - gst_element_set_state (priv->pipeline, GST_STATE_PLAYING); + start_call (self); } } break; @@ -2474,10 +2481,8 @@ empathy_call_window_restart_call (EmpathyCallWindow *window) priv->outgoing = TRUE; empathy_call_window_set_state_connecting (window); - priv->call_started = TRUE; - empathy_call_handler_start_call (priv->handler); + start_call (window); empathy_call_window_setup_avatars (window, priv->handler); - gst_element_set_state (priv->pipeline, GST_STATE_PLAYING); gtk_action_set_sensitive (priv->redial, FALSE); gtk_widget_set_sensitive (priv->redial_button, FALSE);