diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-01-11 22:47:47 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-01-11 23:23:56 +0800 |
commit | f9f6639f8f1cee0cb49fbe607cb00bb59fc02208 (patch) | |
tree | 8f1e37d7ea20b117734ee6885b9a309b06ae5eb0 /src | |
parent | 3c31c5f856635a1a50c4fb107abd6d1871b48df7 (diff) | |
download | gsoc2013-empathy-f9f6639f8f1cee0cb49fbe607cb00bb59fc02208.tar gsoc2013-empathy-f9f6639f8f1cee0cb49fbe607cb00bb59fc02208.tar.gz gsoc2013-empathy-f9f6639f8f1cee0cb49fbe607cb00bb59fc02208.tar.bz2 gsoc2013-empathy-f9f6639f8f1cee0cb49fbe607cb00bb59fc02208.tar.lz gsoc2013-empathy-f9f6639f8f1cee0cb49fbe607cb00bb59fc02208.tar.xz gsoc2013-empathy-f9f6639f8f1cee0cb49fbe607cb00bb59fc02208.tar.zst gsoc2013-empathy-f9f6639f8f1cee0cb49fbe607cb00bb59fc02208.zip |
factor out start_call
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-call-window.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index d78016ac7..564d904ca 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); |