From af4d97822b9055fd8a7670b53b28c7c1f820ec65 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 14 Nov 2011 11:23:57 +0100 Subject: Remove tp-yell and use TpCallChannel --- src/Makefile.am | 2 - src/empathy-call-factory.c | 112 ++++++------------------ src/empathy-call-handler.c | 160 ++++++----------------------------- src/empathy-call-handler.h | 4 +- src/empathy-call-observer.c | 12 ++- src/empathy-call-window.c | 63 +++++++------- src/empathy-call-window.h | 2 +- src/empathy-call.c | 6 +- src/empathy-event-manager.c | 45 +++++----- src/empathy-notifications-approver.c | 11 ++- src/empathy.c | 3 - 11 files changed, 121 insertions(+), 299 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 06eaf1733..4b42fd11d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/tools/flymake.mk CPPFLAGS_COMMON = \ - $(YELL_CFLAGS) \ $(EMPATHY_CFLAGS) \ $(EDS_CFLAGS) \ $(ERROR_CFLAGS) \ @@ -24,7 +23,6 @@ LDADD = \ $(top_builddir)/extensions/libemp-extensions.la \ $(GCR_LIBS) \ $(EMPATHY_LIBS) \ - $(YELL_LIBS) \ $(LIBCHAMPLAIN_LIBS) \ $(NULL) diff --git a/src/empathy-call-factory.c b/src/empathy-call-factory.c index b3c85f4b0..4ff8ebe51 100644 --- a/src/empathy-call-factory.c +++ b/src/empathy-call-factory.c @@ -27,8 +27,6 @@ #include #include -#include - #include #include #include @@ -76,32 +74,32 @@ empathy_call_factory_init (EmpathyCallFactory *obj) tp_base_client_take_approver_filter (client, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TPY_IFACE_CHANNEL_TYPE_CALL, + TP_IFACE_CHANNEL_TYPE_CALL, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, NULL)); tp_base_client_take_handler_filter (client, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TPY_IFACE_CHANNEL_TYPE_CALL, + TP_IFACE_CHANNEL_TYPE_CALL, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, NULL)); tp_base_client_take_handler_filter (client, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TPY_IFACE_CHANNEL_TYPE_CALL, + TP_IFACE_CHANNEL_TYPE_CALL, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, - TPY_PROP_CHANNEL_TYPE_CALL_INITIAL_AUDIO, G_TYPE_BOOLEAN, TRUE, + TP_PROP_CHANNEL_TYPE_CALL_INITIAL_AUDIO, G_TYPE_BOOLEAN, TRUE, NULL)); tp_base_client_take_handler_filter (client, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TPY_IFACE_CHANNEL_TYPE_CALL, + TP_IFACE_CHANNEL_TYPE_CALL, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, - TPY_PROP_CHANNEL_TYPE_CALL_INITIAL_VIDEO, G_TYPE_BOOLEAN, TRUE, + TP_PROP_CHANNEL_TYPE_CALL_INITIAL_VIDEO, G_TYPE_BOOLEAN, TRUE, NULL)); tp_base_client_add_handler_capabilities_varargs (client, @@ -151,7 +149,7 @@ empathy_call_factory_class_init (EmpathyCallFactoryClass *klass) NULL, NULL, g_cclosure_marshal_generic, G_TYPE_BOOLEAN, - 4, G_TYPE_UINT, TPY_TYPE_CALL_CHANNEL, + 4, G_TYPE_UINT, TP_TYPE_CALL_CHANNEL, TP_TYPE_CHANNEL_DISPATCH_OPERATION, TP_TYPE_ADD_DISPATCH_OPERATION_CONTEXT); } @@ -188,66 +186,6 @@ empathy_call_factory_get (void) return EMPATHY_CALL_FACTORY (call_factory); } -static void -call_channel_got_contact (TpConnection *connection, - EmpathyContact *contact, - const GError *error, - gpointer user_data, - GObject *weak_object) -{ - EmpathyCallFactory *factory = EMPATHY_CALL_FACTORY (weak_object); - EmpathyCallHandler *handler; - TpyCallChannel *call = TPY_CALL_CHANNEL (user_data); - - if (contact == NULL) - { - /* FIXME use hangup with an appropriate error */ - tp_channel_close_async (TP_CHANNEL (call), NULL, NULL); - return; - } - - handler = empathy_call_handler_new_for_channel (call, contact); - - g_signal_emit (factory, signals[NEW_CALL_HANDLER], 0, - handler, FALSE); - - g_object_unref (handler); -} - -static void -call_channel_ready (EmpathyCallFactory *factory, - TpyCallChannel *call) -{ - TpChannel *channel = TP_CHANNEL (call); - const gchar *id; - - id = tp_channel_get_identifier (channel); - - /* The ready callback has a reference, so pass that on */ - empathy_tp_contact_factory_get_from_id ( - tp_channel_borrow_connection (channel), - id, - call_channel_got_contact, - channel, - g_object_unref, - (GObject *) factory); -} - -static void -call_channel_ready_cb (TpyCallChannel *call, - GParamSpec *spec, - EmpathyCallFactory *factory) -{ - gboolean ready; - - g_object_get (call, "ready", &ready, NULL); - if (!ready) - return; - - call_channel_ready (factory, call); -} - - static void handle_channels (TpBaseClient *client, TpAccount *account, @@ -263,36 +201,38 @@ handle_channels (TpBaseClient *client, for (l = channels; l != NULL; l = g_list_next (l)) { TpChannel *channel = l->data; - TpyCallChannel *call; - gboolean ready; + TpCallChannel *call; + TpContact *tp_contact; + EmpathyContact *contact; + EmpathyCallHandler *handler; if (tp_proxy_get_invalidated (channel) != NULL) continue; if (tp_channel_get_channel_type_id (channel) != - TPY_IFACE_QUARK_CHANNEL_TYPE_CALL) + TP_IFACE_QUARK_CHANNEL_TYPE_CALL) continue; - if (!TPY_IS_CALL_CHANNEL (channel)) + if (!TP_IS_CALL_CHANNEL (channel)) continue; - call = TPY_CALL_CHANNEL (channel); + call = TP_CALL_CHANNEL (channel); + + tp_contact = tp_channel_get_target_contact (channel); + contact = empathy_contact_dup_from_tp_contact (tp_contact); + handler = empathy_call_handler_new_for_channel (call, contact); - /* Take a ref to keep while hopping through the async callbacks */ - g_object_ref (call); - g_object_get (call, "ready", &ready, NULL); + g_signal_emit (self, signals[NEW_CALL_HANDLER], 0, + handler, FALSE); - if (!ready) - tp_g_signal_connect_object (call, "notify::ready", - G_CALLBACK (call_channel_ready_cb), self, 0); - else - call_channel_ready (self, call); + g_object_unref (handler); + g_object_unref (contact); } tp_handle_channels_context_accept (context); } -static TpyCallChannel * +static TpCallChannel * find_call_channel (GList *channels) { GList *l; @@ -307,8 +247,8 @@ find_call_channel (GList *channels) channel_type = tp_channel_get_channel_type_id (channel); - if (channel_type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL) - return TPY_CALL_CHANNEL (channel); + if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) + return TP_CALL_CHANNEL (channel); } return NULL; @@ -323,7 +263,7 @@ approve_channels (TpBaseClient *client, TpAddDispatchOperationContext *context) { EmpathyCallFactory *self = EMPATHY_CALL_FACTORY (client); - TpyCallChannel *channel; + TpCallChannel *channel; guint handle; GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "" }; gboolean handled = FALSE; diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c index 4014ad6c6..119746657 100644 --- a/src/empathy-call-handler.c +++ b/src/empathy-call-handler.c @@ -26,8 +26,6 @@ #include #include -#include - #include #include @@ -63,7 +61,6 @@ enum { PROP_CALL_CHANNEL = 1, PROP_GST_BUS, PROP_CONTACT, - PROP_MEMBERS, PROP_INITIAL_AUDIO, PROP_INITIAL_VIDEO, PROP_SEND_AUDIO_CODEC, @@ -79,11 +76,9 @@ enum { /* private structure */ struct _EmpathyCallHandlerPriv { - TpyCallChannel *call; + TpCallChannel *call; EmpathyContact *contact; - /* GArray of TpContacts */ - GArray *members; TfChannel *tfchannel; gboolean initial_audio; gboolean initial_video; @@ -109,8 +104,6 @@ empathy_call_handler_dispose (GObject *object) tp_clear_object (&priv->call); tp_clear_object (&priv->contact); - tp_clear_pointer (&priv->members, g_array_unref); - G_OBJECT_CLASS (empathy_call_handler_parent_class)->dispose (object); } @@ -141,36 +134,7 @@ empathy_call_handler_init (EmpathyCallHandler *obj) } static void -on_get_contacts_cb (TpConnection *connection, - guint n_contacts, - EmpathyContact * const * contacts, - guint n_failed, - const TpHandle *failed, - const GError *error, - gpointer user_data, - GObject *weak_object) -{ - EmpathyCallHandler *self = EMPATHY_CALL_HANDLER (weak_object); - EmpathyCallHandlerPriv *priv = GET_PRIV (self); - guint i; - - if (n_failed > 0) - g_warning ("Failed to get %d EmpathyContacts: %s", - n_failed, error->message); - - priv->members = g_array_sized_new (FALSE, TRUE, - sizeof (EmpathyContact *), n_contacts); - - for (i = 0; i < n_contacts; i++) - g_object_ref (contacts[i]); - - g_array_append_vals (priv->members, contacts, n_contacts); - - g_object_notify (G_OBJECT (self), "members"); -} - -static void -on_call_invalidated_cb (TpyCallChannel *call, +on_call_invalidated_cb (TpCallChannel *call, guint domain, gint code, gchar *message, @@ -182,30 +146,26 @@ on_call_invalidated_cb (TpyCallChannel *call, { /* Invalidated unexpectedly? Fake call ending */ g_signal_emit (self, signals[STATE_CHANGED], 0, - TPY_CALL_STATE_ENDED, NULL); + TP_CALL_STATE_ENDED, NULL); tp_clear_object (&priv->call); tp_clear_object (&priv->tfchannel); } } static void -on_call_state_changed_cb (TpyCallChannel *call, - TpyCallState state, - TpyCallFlags flags, - const GValueArray *call_state_reason, - GHashTable *call_state_details, +on_call_state_changed_cb (TpCallChannel *call, + TpCallState state, + TpCallFlags flags, + TpCallStateReason *reason, + GHashTable *details, EmpathyCallHandler *handler) { EmpathyCallHandlerPriv *priv = handler->priv; - gchar *dbus_reason; - guint actor, reason; - - tp_value_array_unpack ((GValueArray *) call_state_reason, 3, - &actor, &reason, &dbus_reason); - g_signal_emit (handler, signals[STATE_CHANGED], 0, state, dbus_reason); + g_signal_emit (handler, signals[STATE_CHANGED], 0, state, + reason->dbus_reason); - if (state == TPY_CALL_STATE_ENDED) + if (state == TP_CALL_STATE_ENDED) { tp_channel_close_async (TP_CHANNEL (call), NULL, NULL); @@ -214,58 +174,6 @@ on_call_state_changed_cb (TpyCallChannel *call, } } -static void -on_members_changed_cb (TpyCallChannel *call, - GHashTable *members, - EmpathyCallHandler *self) -{ - EmpathyCallHandlerPriv *priv = GET_PRIV (self); - GHashTableIter iter; - gpointer key, value; - TpHandle *handles; - guint n_handles; - guint i = 0; - - if (members == NULL) - return; - - n_handles = g_hash_table_size (members); - if (n_handles == 0) - return; - - handles = g_new0 (TpHandle, n_handles); - - g_hash_table_iter_init (&iter, members); - while (g_hash_table_iter_next (&iter, &key, &value)) - handles[i++] = GPOINTER_TO_UINT (key); - - empathy_tp_contact_factory_get_from_handles ( - tp_channel_borrow_connection (TP_CHANNEL (priv->call)), - n_handles, handles, - on_get_contacts_cb, - NULL, NULL, G_OBJECT (self)); - - g_free (handles); -} - -static void -empathy_call_handler_constructed (GObject *object) -{ - EmpathyCallHandler *self = EMPATHY_CALL_HANDLER (object); - EmpathyCallHandlerPriv *priv = GET_PRIV (self); -// GHashTable *members; - - g_signal_connect (priv->call, "members-changed", - G_CALLBACK (on_members_changed_cb), object); - -/* FIXME - g_object_get (priv->call, "members", &members, NULL); - - if (members) - on_members_changed_cb (priv->call, members, self); -*/ -} - static void empathy_call_handler_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) @@ -277,9 +185,6 @@ empathy_call_handler_set_property (GObject *object, case PROP_CONTACT: priv->contact = g_value_dup_object (value); break; - case PROP_MEMBERS: - priv->members = g_value_get_boxed (value); - break; case PROP_CALL_CHANNEL: g_return_if_fail (priv->call == NULL); @@ -312,9 +217,6 @@ empathy_call_handler_get_property (GObject *object, case PROP_CONTACT: g_value_set_object (value, priv->contact); break; - case PROP_MEMBERS: - g_value_set_boxed (value, priv->members); - break; case PROP_CALL_CHANNEL: g_value_set_object (value, priv->call); break; @@ -362,7 +264,6 @@ empathy_call_handler_class_init (EmpathyCallHandlerClass *klass) g_type_class_add_private (klass, sizeof (EmpathyCallHandlerPriv)); - object_class->constructed = empathy_call_handler_constructed; object_class->set_property = empathy_call_handler_set_property; object_class->get_property = empathy_call_handler_get_property; object_class->dispose = empathy_call_handler_dispose; @@ -374,15 +275,9 @@ empathy_call_handler_class_init (EmpathyCallHandlerClass *klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_CONTACT, param_spec); - param_spec = g_param_spec_boxed ("members", - "call members", "The call participants", - G_TYPE_ARRAY, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_MEMBERS, param_spec); - param_spec = g_param_spec_object ("call-channel", "call channel", "The call channel", - TPY_TYPE_CALL_CHANNEL, + TP_TYPE_CALL_CHANNEL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_CALL_CHANNEL, param_spec); @@ -529,12 +424,12 @@ empathy_call_handler_class_init (EmpathyCallHandlerClass *klass) } EmpathyCallHandler * -empathy_call_handler_new_for_channel (TpyCallChannel *call, +empathy_call_handler_new_for_channel (TpCallChannel *call, EmpathyContact *contact) { return EMPATHY_CALL_HANDLER (g_object_new (EMPATHY_TYPE_CALL_HANDLER, "call-channel", call, - "initial-video", tpy_call_channel_has_initial_video (call), + "initial-video", tp_call_channel_has_initial_video (call, NULL), "target-contact", contact, NULL)); } @@ -748,8 +643,7 @@ src_pad_added_error_idle (gpointer data) { TfContent *content = data; - tf_content_error (content, 0 /* FIXME */, - "Could not link sink", NULL); + tf_content_error_literal (content, "Could not link sink"); g_object_unref (content); return FALSE; @@ -822,8 +716,7 @@ on_tf_channel_content_added_cb (TfChannel *tfchannel, content, &retval); if (!retval) - tf_content_error (content, 0 /* FIXME */, - "Could not link source", NULL); + tf_content_error_literal (content, "Could not link source"); /* Get sending codec */ g_object_get (content, "fs-session", &session, NULL); @@ -891,8 +784,7 @@ on_tf_channel_content_removed_cb (TfChannel *tfchannel, { g_warning ("Could not remove content!"); - tf_content_error (content, 0 /* FIXME */, - "Could not link source", NULL); + tf_content_error_literal (content, "Could not link source"); } } @@ -949,10 +841,10 @@ on_call_accepted_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { - TpyCallChannel *call = TPY_CALL_CHANNEL (source_object); + TpCallChannel *call = TP_CALL_CHANNEL (source_object); GError *error = NULL; - if (!tpy_call_channel_accept_finish (call, res, &error)) + if (!tp_call_channel_accept_finish (call, res, &error)) { g_warning ("could not accept Call: %s", error->message); g_error_free (error); @@ -979,13 +871,13 @@ empathy_call_handler_request_cb (GObject *source, return; } - if (!TPY_IS_CALL_CHANNEL (channel)) + if (!TP_IS_CALL_CHANNEL (channel)) { DEBUG ("The channel is not a Call channel!"); return; } - priv->call = TPY_CALL_CHANNEL (channel); + priv->call = TP_CALL_CHANNEL (channel); tp_g_signal_connect_object (priv->call, "state-changed", G_CALLBACK (on_call_state_changed_cb), self, 0); tp_g_signal_connect_object (priv->call, "invalidated", @@ -994,7 +886,7 @@ empathy_call_handler_request_cb (GObject *source, g_object_notify (G_OBJECT (self), "call-channel"); empathy_call_handler_start_tpfs (self); - tpy_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); + tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); } void @@ -1009,11 +901,11 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler, if (priv->call != NULL) { empathy_call_handler_start_tpfs (handler); - tpy_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); + tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); return; } - /* No TpyCallChannel (we are redialing). Request a new call channel */ + /* No TpCallChannel (we are redialing). Request a new call channel */ g_assert (priv->contact != NULL); account = empathy_contact_get_account (priv->contact); @@ -1043,8 +935,8 @@ empathy_call_handler_stop_call (EmpathyCallHandler *handler) if (priv->call != NULL) { - tpy_call_channel_hangup_async (priv->call, - TPY_CALL_STATE_CHANGE_REASON_USER_REQUESTED, + tp_call_channel_hangup_async (priv->call, + TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED, "", "", NULL, NULL); tp_channel_close_async (TP_CHANNEL (priv->call), NULL, NULL); diff --git a/src/empathy-call-handler.h b/src/empathy-call-handler.h index 330d368a5..3586f1584 100644 --- a/src/empathy-call-handler.h +++ b/src/empathy-call-handler.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include @@ -68,7 +68,7 @@ EmpathyCallHandler * empathy_call_handler_new_for_contact ( EmpathyContact *contact); EmpathyCallHandler * empathy_call_handler_new_for_channel ( - TpyCallChannel *call, + TpCallChannel *call, EmpathyContact *contact); void empathy_call_handler_start_call (EmpathyCallHandler *handler, diff --git a/src/empathy-call-observer.c b/src/empathy-call-observer.c index 0fecbdca6..2019cd02f 100644 --- a/src/empathy-call-observer.c +++ b/src/empathy-call-observer.c @@ -24,8 +24,6 @@ #include -#include - #include #include @@ -185,7 +183,7 @@ find_main_channel (GList *channels) channel_type = tp_channel_get_channel_type_id (channel); if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA || - channel_type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL) + channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) return channel; } @@ -203,9 +201,9 @@ has_ongoing_calls (EmpathyCallObserver *self) GQuark type = tp_channel_get_channel_type_id (channel); /* Check that Call channels are not ended */ - if (type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL && - tpy_call_channel_get_state (TPY_CALL_CHANNEL (channel), NULL, NULL) - == TPY_CALL_STATE_ENDED) + if (type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL && + tp_call_channel_get_state (TP_CALL_CHANNEL (channel), + NULL, NULL, NULL) == TP_CALL_STATE_ENDED) continue; return TRUE; @@ -372,7 +370,7 @@ empathy_call_observer_init (EmpathyCallObserver *self) tp_base_client_take_observer_filter (self->priv->observer, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TPY_IFACE_CHANNEL_TYPE_CALL, + TP_IFACE_CHANNEL_TYPE_CALL, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, NULL)); diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index a89d220c4..1802b01a8 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -53,6 +53,7 @@ #include #include #include +#include #define DEBUG_FLAG EMPATHY_DEBUG_VOIP #include @@ -194,7 +195,7 @@ struct _EmpathyCallWindowPriv /* These are used to accept or reject an incoming call when the status is RINGING. */ GtkWidget *incoming_call_dialog; - TpyCallChannel *pending_channel; + TpCallChannel *pending_channel; TpChannelDispatchOperation *pending_cdo; TpAddDispatchOperationContext *pending_context; @@ -1550,7 +1551,7 @@ empathy_call_window_set_state_ringing (EmpathyCallWindow *self) g_assert (self->priv->call_state != CONNECTED); - video = tpy_call_channel_has_initial_video (self->priv->pending_channel); + video = tp_call_channel_has_initial_video (self->priv->pending_channel, NULL); empathy_call_window_status_message (self, _("Incoming call")); self->priv->call_state = RINGING; @@ -1594,7 +1595,7 @@ empathy_call_window_cdo_invalidated_cb (TpProxy *channel, void empathy_call_window_start_ringing (EmpathyCallWindow *self, - TpyCallChannel *channel, + TpCallChannel *channel, TpChannelDispatchOperation *dispatch_operation, TpAddDispatchOperationContext *context) { @@ -2247,14 +2248,14 @@ empathy_call_window_constructed (GObject *object) { EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (object); EmpathyCallWindowPriv *priv = GET_PRIV (self); - TpyCallChannel *call; - TpyCallState state; + TpCallChannel *call; + TpCallState state; g_assert (priv->handler != NULL); g_object_get (priv->handler, "call-channel", &call, NULL); - state = tpy_call_channel_get_state (call, NULL, NULL); - priv->outgoing = (state == TPY_CALL_STATE_PENDING_INITIATOR); + state = tp_call_channel_get_state (call, NULL, NULL, NULL); + priv->outgoing = (state == TP_CALL_STATE_PENDING_INITIATOR); tp_clear_object (&call); g_object_get (priv->handler, "target-contact", &priv->contact, NULL); @@ -3055,7 +3056,7 @@ display_error (EmpathyCallWindow *self, #if 0 static gchar * media_stream_error_to_txt (EmpathyCallWindow *self, - TpyCallChannel *call, + TpCallChannel *call, gboolean audio, TpMediaStreamError error) { @@ -3127,7 +3128,7 @@ media_stream_error_to_txt (EmpathyCallWindow *self, static void empathy_call_window_stream_error (EmpathyCallWindow *self, - TpyCallChannel *call, + TpCallChannel *call, gboolean audio, guint code, const gchar *msg, @@ -3151,7 +3152,7 @@ empathy_call_window_stream_error (EmpathyCallWindow *self, } static void -empathy_call_window_audio_stream_error (TpyCallChannel *call, +empathy_call_window_audio_stream_error (TpCallChannel *call, guint code, const gchar *msg, EmpathyCallWindow *self) @@ -3161,7 +3162,7 @@ empathy_call_window_audio_stream_error (TpyCallChannel *call, } static void -empathy_call_window_video_stream_error (TpyCallChannel *call, +empathy_call_window_video_stream_error (TpCallChannel *call, guint code, const gchar *msg, EmpathyCallWindow *self) @@ -3220,22 +3221,22 @@ show_balance_error (EmpathyCallWindow *self) static void empathy_call_window_state_changed_cb (EmpathyCallHandler *handler, - TpyCallState state, + TpCallState state, gchar *reason, EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); - TpyCallChannel *call; + TpCallChannel *call; gboolean can_send_video; - if (state == TPY_CALL_STATE_ENDED && + if (state == TP_CALL_STATE_ENDED && !tp_strdiff (reason, TP_ERROR_STR_INSUFFICIENT_BALANCE)) { show_balance_error (self); return; } - if (state != TPY_CALL_STATE_ACCEPTED) + if (state != TP_CALL_STATE_ACCEPTED) return; if (priv->call_state == CONNECTED) @@ -3252,7 +3253,7 @@ empathy_call_window_state_changed_cb (EmpathyCallHandler *handler, g_object_get (priv->handler, "call-channel", &call, NULL); - if (tpy_call_channel_has_dtmf (call)) + if (tp_call_channel_has_dtmf (call)) gtk_widget_set_sensitive (priv->dtmf_panel, TRUE); if (priv->video_input == NULL) @@ -3597,20 +3598,20 @@ start_call (EmpathyCallWindow *self) if (empathy_call_handler_has_initial_video (priv->handler)) { - TpyCallChannel *call; - TpySendingState s; + TpCallChannel *call; + TpSendingState s; g_object_get (priv->handler, "call-channel", &call, NULL); /* If the call channel isn't set yet we're requesting it, if we're * requesting it with initial video it should be PENDING_SEND when we get * it */ if (call == NULL) - s = TPY_SENDING_STATE_PENDING_SEND; + s = TP_SENDING_STATE_PENDING_SEND; else - s = tpy_call_channel_get_video_state (call); + s = empathy_call_channel_get_video_state (call); - if (s == TPY_SENDING_STATE_PENDING_SEND || - s == TPY_SENDING_STATE_SENDING) + if (s == TP_SENDING_STATE_PENDING_SEND || + s == TP_SENDING_STATE_SENDING) { /* Enable 'send video' buttons and display the preview */ gtk_toggle_tool_button_set_active ( @@ -3726,8 +3727,10 @@ empathy_call_window_bus_message (GstBus *bus, GstMessage *message, } static void -empathy_call_window_members_changed_cb (TpyCallChannel *call, - GHashTable *members, +empathy_call_window_members_changed_cb (TpCallChannel *call, + GHashTable *updates, + GPtrArray *removed, + TpCallStateReason *reason, EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); @@ -3735,10 +3738,10 @@ empathy_call_window_members_changed_cb (TpyCallChannel *call, gpointer key, value; gboolean held = FALSE; - g_hash_table_iter_init (&iter, members); + g_hash_table_iter_init (&iter, updates); while (g_hash_table_iter_next (&iter, &key, &value)) { - if (GPOINTER_TO_INT (value) & TPY_CALL_MEMBER_FLAG_HELD) + if (GPOINTER_TO_INT (value) & TP_CALL_MEMBER_FLAG_HELD) { /* This assumes this is a 1-1 call, otherwise one participant * putting the call on hold wouldn't mean the call is on hold @@ -3760,7 +3763,7 @@ call_handler_notify_call_cb (EmpathyCallHandler *handler, EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); - TpyCallChannel *call; + TpCallChannel *call; g_object_get (priv->handler, "call-channel", &call, NULL); if (call == NULL) @@ -3787,7 +3790,7 @@ static void empathy_call_window_connect_handler (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); - TpyCallChannel *call; + TpCallChannel *call; g_signal_connect (priv->handler, "state-changed", G_CALLBACK (empathy_call_window_state_changed_cb), self); @@ -4000,7 +4003,7 @@ empathy_call_window_set_send_video (EmpathyCallWindow *window, CameraState state) { EmpathyCallWindowPriv *priv = GET_PRIV (window); - TpyCallChannel *call; + TpCallChannel *call; priv->sending_video = (state == CAMERA_STATE_ON); @@ -4020,7 +4023,7 @@ empathy_call_window_set_send_video (EmpathyCallWindow *window, g_object_get (priv->handler, "call-channel", &call, NULL); DEBUG ("%s sending video", priv->sending_video ? "start": "stop"); - tpy_call_channel_send_video (call, priv->sending_video); + empathy_call_channel_send_video (call, priv->sending_video); g_object_unref (call); } diff --git a/src/empathy-call-window.h b/src/empathy-call-window.h index abaae2763..a5df2dac4 100644 --- a/src/empathy-call-window.h +++ b/src/empathy-call-window.h @@ -66,7 +66,7 @@ EmpathyCallWindow *empathy_call_window_new (EmpathyCallHandler *handler); void empathy_call_window_present (EmpathyCallWindow *window, EmpathyCallHandler *handler); void empathy_call_window_start_ringing (EmpathyCallWindow *self, - TpyCallChannel *channel, + TpCallChannel *channel, TpChannelDispatchOperation *dispatch_operation, TpAddDispatchOperationContext *context); diff --git a/src/empathy-call.c b/src/empathy-call.c index 2ff49a81b..21b751df9 100644 --- a/src/empathy-call.c +++ b/src/empathy-call.c @@ -32,8 +32,6 @@ #include -#include - #include #include @@ -87,7 +85,7 @@ find_window_for_handle (gpointer key, static gboolean incoming_call_cb (EmpathyCallFactory *factory, guint handle, - TpyCallChannel *channel, + TpCallChannel *channel, TpChannelDispatchOperation *dispatch_operation, TpAddDispatchOperationContext *context, gpointer user_data) @@ -209,8 +207,6 @@ main (int argc, g_option_context_free (optcontext); - tpy_cli_init (); - gtk_clutter_init (&argc, &argv); clutter_gst_init (&argc, &argv); diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index 321cd1cca..c6b3e29ed 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -29,8 +29,6 @@ #include #include -#include - #include #include #include @@ -45,6 +43,7 @@ #include #include #include +#include #include "empathy-event-manager.h" #include "empathy-roster-window.h" @@ -413,10 +412,10 @@ reject_channel_claim_cb (GObject *source, { empathy_tp_streamed_media_close (user_data); } - else if (TPY_IS_CALL_CHANNEL (user_data)) + else if (TP_IS_CALL_CHANNEL (user_data)) { - tpy_call_channel_hangup_async (user_data, - TPY_CALL_STATE_CHANGE_REASON_USER_REQUESTED, + tp_call_channel_hangup_async (user_data, + TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED, "", "", NULL, NULL); tp_channel_close_async (user_data, NULL, NULL); } @@ -474,7 +473,7 @@ event_manager_call_window_confirmation_dialog_response_cb (GtkDialog *dialog, } else if (response == ACCEPT_WITHOUT_VIDEO) { - tpy_call_channel_send_video (TPY_CALL_CHANNEL (approval->main_channel), + empathy_call_channel_send_video (TP_CALL_CHANNEL (approval->main_channel), FALSE); event_manager_approval_approve (approval); } @@ -508,9 +507,9 @@ event_channel_process_voip_func (EventPriv *event) } else if (etype == EMPATHY_EVENT_TYPE_CALL) { - TpyCallChannel *call; - call = TPY_CALL_CHANNEL (event->approval->handler_instance); - g_object_get (G_OBJECT (call), "initial-video", &video, NULL); + TpCallChannel *call; + call = TP_CALL_CHANNEL (event->approval->handler_instance); + video = tp_call_channel_has_initial_video (call, NULL); } else { @@ -638,7 +637,7 @@ event_manager_approval_done (EventManagerApproval *approval) channel_type = tp_channel_get_channel_type_id (approval->main_channel); if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA || - channel_type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL) + channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) { priv->ringing--; if (priv->ringing == 0) @@ -676,14 +675,14 @@ cdo_invalidated_cb (TpProxy *cdo, } static void -event_manager_call_state_changed_cb (TpyCallChannel *call, - TpyCallState state, - TpyCallFlags flags, - const GValueArray *call_state_reason, - GHashTable *call_state_details, +event_manager_call_state_changed_cb (TpCallChannel *call, + TpCallState state, + TpCallFlags flags, + TpCallStateReason *reason, + GHashTable *details, EventManagerApproval *approval) { - if (state == TPY_CALL_STATE_ENDED) + if (state == TP_CALL_STATE_ENDED) { DEBUG ("Call ended, seems we missed it :/"); reject_approval (approval); @@ -700,11 +699,11 @@ event_manager_call_channel_got_contact_cb (TpConnection *connection, EventManagerApproval *approval = (EventManagerApproval *) user_data; EmpathyEventManagerPriv *priv = GET_PRIV (approval->manager); GtkWidget *window; - TpyCallChannel *call; + TpCallChannel *call; gchar *header; gboolean video; - call = TPY_CALL_CHANNEL (approval->handler_instance); + call = TP_CALL_CHANNEL (approval->handler_instance); if (error != NULL) { @@ -713,7 +712,7 @@ event_manager_call_channel_got_contact_cb (TpConnection *connection, return; } - if (tpy_call_channel_get_state (call, NULL, NULL) == TPY_CALL_STATE_ENDED) + if (tp_call_channel_get_state (call, NULL, NULL, NULL) == TP_CALL_STATE_ENDED) { DEBUG ("Call already ended, seems we missed it :/"); reject_approval (approval); @@ -982,7 +981,7 @@ find_main_channel (GList *channels) channel_type = tp_channel_get_channel_type_id (channel); if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA || - channel_type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL || + channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL || channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER || channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION) return channel; @@ -1104,9 +1103,9 @@ approve_channels (TpSimpleApprover *approver, } } - else if (channel_type == TPY_IFACE_QUARK_CHANNEL_TYPE_CALL) + else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_CALL) { - TpyCallChannel *call = TPY_CALL_CHANNEL (channel); + TpCallChannel *call = TP_CALL_CHANNEL (channel); const gchar *id; approval->handler_instance = g_object_ref (call); @@ -1510,7 +1509,7 @@ empathy_event_manager_init (EmpathyEventManager *manager) tp_base_client_take_approver_filter (priv->approver, tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, - TPY_IFACE_CHANNEL_TYPE_CALL, + TP_IFACE_CHANNEL_TYPE_CALL, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_CONTACT, NULL)); diff --git a/src/empathy-notifications-approver.c b/src/empathy-notifications-approver.c index ac51459fb..7a4f03731 100644 --- a/src/empathy-notifications-approver.c +++ b/src/empathy-notifications-approver.c @@ -25,11 +25,10 @@ #include #include -#include - #include #include +#include #include "empathy-event-manager.h" @@ -127,8 +126,8 @@ notification_approve_no_video_cb (NotifyNotification *notification, { if (self->priv->event) { - tpy_call_channel_send_video ( - TPY_CALL_CHANNEL (self->priv->event->handler_instance), + empathy_call_channel_send_video ( + TP_CALL_CHANNEL (self->priv->event->handler_instance), FALSE); empathy_event_approve (self->priv->event); } @@ -197,8 +196,8 @@ add_notification_actions (EmpathyNotificationsApprover *self, video = empathy_tp_streamed_media_has_initial_video ( EMPATHY_TP_STREAMED_MEDIA (self->priv->event->handler_instance)); else - video = tpy_call_channel_has_initial_video ( - TPY_CALL_CHANNEL (self->priv->event->handler_instance)); + video = tp_call_channel_has_initial_video ( + TP_CALL_CHANNEL (self->priv->event->handler_instance), NULL); notify_notification_add_action (notification, "reject", _("Reject"), (NotifyActionCallback) notification_decline_cb, diff --git a/src/empathy.c b/src/empathy.c index f59a54f17..766ffaa2c 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -44,8 +44,6 @@ #include #include -#include - #include #include @@ -854,7 +852,6 @@ main (int argc, char *argv[]) #endif g_type_init (); - tpy_cli_init (); empathy_init (); gtk_init (&argc, &argv); empathy_gtk_init (); -- cgit v1.2.3 From 03a2ddbde7bd15e6601f3b3e6bd2b5cc269df498 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 10 Jan 2012 15:17:39 +0100 Subject: Wait for call state to be INITIALISED before accepting incoming call --- src/empathy-call-handler.c | 47 +++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c index 119746657..614b470c6 100644 --- a/src/empathy-call-handler.c +++ b/src/empathy-call-handler.c @@ -91,6 +91,7 @@ struct _EmpathyCallHandlerPriv { FsCandidate *video_remote_candidate; FsCandidate *audio_local_candidate; FsCandidate *video_local_candidate; + gboolean accept_when_initialised; }; #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyCallHandler) @@ -133,6 +134,21 @@ empathy_call_handler_init (EmpathyCallHandler *obj) obj->priv = priv; } +static void +on_call_accepted_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + TpCallChannel *call = TP_CALL_CHANNEL (source_object); + GError *error = NULL; + + if (!tp_call_channel_accept_finish (call, res, &error)) + { + g_warning ("could not accept Call: %s", error->message); + g_error_free (error); + } +} + static void on_call_invalidated_cb (TpCallChannel *call, guint domain, @@ -147,6 +163,7 @@ on_call_invalidated_cb (TpCallChannel *call, /* Invalidated unexpectedly? Fake call ending */ g_signal_emit (self, signals[STATE_CHANGED], 0, TP_CALL_STATE_ENDED, NULL); + priv->accept_when_initialised = FALSE; tp_clear_object (&priv->call); tp_clear_object (&priv->tfchannel); } @@ -165,10 +182,17 @@ on_call_state_changed_cb (TpCallChannel *call, g_signal_emit (handler, signals[STATE_CHANGED], 0, state, reason->dbus_reason); + if (state == TP_CALL_STATE_INITIALISED && + priv->accept_when_initialised) + { + tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); + priv->accept_when_initialised = FALSE; + } + if (state == TP_CALL_STATE_ENDED) { tp_channel_close_async (TP_CHANNEL (call), NULL, NULL); - + priv->accept_when_initialised = FALSE; tp_clear_object (&priv->call); tp_clear_object (&priv->tfchannel); } @@ -836,21 +860,6 @@ empathy_call_handler_start_tpfs (EmpathyCallHandler *self) on_tf_channel_ready, self); } -static void -on_call_accepted_cb (GObject *source_object, - GAsyncResult *res, - gpointer user_data) -{ - TpCallChannel *call = TP_CALL_CHANNEL (source_object); - GError *error = NULL; - - if (!tp_call_channel_accept_finish (call, res, &error)) - { - g_warning ("could not accept Call: %s", error->message); - g_error_free (error); - } -} - static void empathy_call_handler_request_cb (GObject *source, GAsyncResult *result, @@ -901,7 +910,7 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler, if (priv->call != NULL) { empathy_call_handler_start_tpfs (handler); - tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); + priv->accept_when_initialised = TRUE; return; } @@ -938,10 +947,6 @@ empathy_call_handler_stop_call (EmpathyCallHandler *handler) tp_call_channel_hangup_async (priv->call, TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED, "", "", NULL, NULL); - tp_channel_close_async (TP_CHANNEL (priv->call), - NULL, NULL); - tp_clear_object (&priv->call); - tp_clear_object (&priv->tfchannel); } } -- cgit v1.2.3 From ab7a79c4f87cee1ae9811da921c2a03abacec7b5 Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Thu, 12 Jan 2012 16:59:45 +1100 Subject: call-handler: check the state before deferring the accept() Xavier's previous patch delayed calling accept() until the channel was in the INITIALISED state, however, if the channel is already in the INITIALISED state by the time we receive it, we should just accept immediately. Otherwise we'll spend our lives waiting for a state transition that will never occur. --- src/empathy-call-handler.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c index 614b470c6..703ed3299 100644 --- a/src/empathy-call-handler.c +++ b/src/empathy-call-handler.c @@ -910,7 +910,13 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler, if (priv->call != NULL) { empathy_call_handler_start_tpfs (handler); - priv->accept_when_initialised = TRUE; + + if (tp_call_channel_get_state (priv->call, NULL, NULL, NULL) == + TP_CALL_STATE_INITIALISED) + tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); + else + priv->accept_when_initialised = TRUE; + return; } -- cgit v1.2.3 From f17363e49737c2ad6bf304d7ed1dd2ccf8ca2b4c Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Fri, 13 Jan 2012 13:15:46 +1100 Subject: call-handler: also accept outgoing calls immediately Outgoing calls are in PENDING_INITIATOR until you accept them, So Empathy would never actually start dialing an outgoing call until you redialled and it got picked up by the other codepath, which accepts immediately. --- src/empathy-call-handler.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c index 703ed3299..3389c8374 100644 --- a/src/empathy-call-handler.c +++ b/src/empathy-call-handler.c @@ -911,11 +911,22 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler, { empathy_call_handler_start_tpfs (handler); - if (tp_call_channel_get_state (priv->call, NULL, NULL, NULL) == - TP_CALL_STATE_INITIALISED) - tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL); + if (tp_channel_get_requested (TP_CHANNEL (priv->call))) + { + /* accept outgoing channels immediately */ + tp_call_channel_accept_async (priv->call, + on_call_accepted_cb, NULL); + } else - priv->accept_when_initialised = TRUE; + { + /* accepting incoming channels when they are INITIALISED */ + if (tp_call_channel_get_state (priv->call, NULL, NULL, NULL) == + TP_CALL_STATE_INITIALISED) + tp_call_channel_accept_async (priv->call, + on_call_accepted_cb, NULL); + else + priv->accept_when_initialised = TRUE; + } return; } -- cgit v1.2.3 From 1af2b9b657046268d0a44fd2aa588ea281ad1f20 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 20 Jan 2012 14:32:43 +0100 Subject: Port DTMF code to new tp-glib API --- src/empathy-call-window.c | 71 ++++++----------------------------------------- 1 file changed, 8 insertions(+), 63 deletions(-) (limited to 'src') diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 1802b01a8..dc3c65358 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -202,10 +202,6 @@ struct _EmpathyCallWindowPriv gulong video_output_motion_handler_id; guint bus_message_source_id; - /* String that contains the queued tones to send after the current ones - are sent */ - GString *tones; - gboolean sending_tones; GtkWidget *dtmf_panel; /* Details vbox */ @@ -347,61 +343,21 @@ empathy_call_window_video_call_cb (GtkToggleToolButton *button, empathy_call_window_restart_call (self); } -static void -empathy_call_window_emit_tones (EmpathyCallWindow *self) -{ - TpChannel *channel; - - if (tp_str_empty (self->priv->tones->str)) - return; - - g_object_get (self->priv->handler, "call-channel", &channel, NULL); - - DEBUG ("Emitting multiple tones: %s", self->priv->tones->str); - - tp_cli_channel_interface_dtmf_call_multiple_tones (channel, -1, - self->priv->tones->str, - NULL, NULL, NULL, NULL); - - self->priv->sending_tones = TRUE; - - g_string_set_size (self->priv->tones, 0); - - g_object_unref (channel); -} - -static void -empathy_call_window_maybe_emit_tones (EmpathyCallWindow *self) -{ - if (self->priv->sending_tones) - return; - - empathy_call_window_emit_tones (self); -} - -static void -empathy_call_window_tones_stopped_cb (TpChannel *proxy, - gboolean arg_cancelled, - gpointer user_data, - GObject *weak_object) -{ - EmpathyCallWindow *self = EMPATHY_CALL_WINDOW (user_data); - - self->priv->sending_tones = FALSE; - - empathy_call_window_emit_tones (self); -} - static void dtmf_start_tone_cb (EmpathyDialpadWidget *dialpad, TpDTMFEvent event, EmpathyCallWindow *self) { - EmpathyCallWindowPriv *priv = GET_PRIV (self); + TpCallChannel *call; + gchar tones[2]; - g_string_append_c (priv->tones, tp_dtmf_event_to_char (event)); + g_object_get (self->priv->handler, "call-channel", &call, NULL); - empathy_call_window_maybe_emit_tones (self); + tones[0] = tp_dtmf_event_to_char (event); + tones[1] = '\0'; + tp_call_channel_send_tones_async (call, tones, NULL, NULL, NULL); + + g_object_unref (call); } static void @@ -1819,8 +1775,6 @@ empathy_call_window_init (EmpathyCallWindow *self) g_signal_connect (priv->dtmf_panel, "start-tone", G_CALLBACK (dtmf_start_tone_cb), self); - priv->tones = g_string_new (""); - gtk_box_pack_start (GTK_BOX (priv->pane), priv->dtmf_panel, FALSE, FALSE, 6); @@ -2445,8 +2399,6 @@ empathy_call_window_finalize (GObject *object) g_timer_destroy (priv->timer); - g_string_free (priv->tones, TRUE); - G_OBJECT_CLASS (empathy_call_window_parent_class)->finalize (object); } @@ -2598,9 +2550,6 @@ empathy_call_window_disconnected (EmpathyCallWindow *self, gtk_action_set_sensitive (priv->menu_fullscreen, FALSE); gtk_widget_set_sensitive (priv->dtmf_panel, FALSE); - priv->sending_tones = FALSE; - g_string_set_size (priv->tones, 0); - could_reset_pipeline = empathy_call_window_reset_pipeline (self); if (priv->call_state == CONNECTING) @@ -3779,10 +3728,6 @@ call_handler_notify_call_cb (EmpathyCallHandler *handler, tp_g_signal_connect_object (call, "members-changed", G_CALLBACK (empathy_call_window_members_changed_cb), self, 0); - tp_cli_channel_interface_dtmf_connect_to_stopped_tones (TP_CHANNEL (call), - empathy_call_window_tones_stopped_cb, self, NULL, - G_OBJECT (call), NULL); - g_object_unref (call); } -- cgit v1.2.3