aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-14 14:21:16 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-21 14:04:51 +0800
commit13f51b97e97fafb7199a26e7abc171c7a5c40c46 (patch)
tree1e92fffae08f3951e34fc7e36455efe5b676b2b6 /src
parent59f4a5e422744f5eda6f1143f297fdb579ecdf23 (diff)
downloadgsoc2013-empathy-13f51b97e97fafb7199a26e7abc171c7a5c40c46.tar
gsoc2013-empathy-13f51b97e97fafb7199a26e7abc171c7a5c40c46.tar.gz
gsoc2013-empathy-13f51b97e97fafb7199a26e7abc171c7a5c40c46.tar.bz2
gsoc2013-empathy-13f51b97e97fafb7199a26e7abc171c7a5c40c46.tar.lz
gsoc2013-empathy-13f51b97e97fafb7199a26e7abc171c7a5c40c46.tar.xz
gsoc2013-empathy-13f51b97e97fafb7199a26e7abc171c7a5c40c46.tar.zst
gsoc2013-empathy-13f51b97e97fafb7199a26e7abc171c7a5c40c46.zip
Don't need to prepare balance feature, already prepared by client factory
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 4f3abbde9..9da6b9ced 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -3120,24 +3120,21 @@ empathy_call_window_video_stream_error (TpyCallChannel *call,
#endif
static void
-show_balance_error (GObject *object,
- GAsyncResult *res,
- gpointer user_data)
+show_balance_error (EmpathyCallWindow *self)
{
- EmpathyCallWindow *self = user_data;
- TpConnection *conn = TP_CONNECTION (object);
- GError *error = NULL;
+ TpChannel *call;
+ TpConnection *conn;
gchar *balance, *tmp;
const gchar *uri, *currency;
gint amount;
guint scale;
- if (!tp_proxy_prepare_finish (conn, res, &error))
- {
- DEBUG ("Failed to prepare Balance: %s", error->message);
- g_error_free (error);
- return;
- }
+ g_object_get (self->priv->handler,
+ "call-channel", &call,
+ NULL);
+
+ conn = tp_channel_borrow_connection (call);
+ g_object_unref (call);
uri = tp_connection_get_balance_uri (conn);
@@ -3182,14 +3179,7 @@ empathy_call_window_state_changed_cb (EmpathyCallHandler *handler,
if (state == TPY_CALL_STATE_ENDED &&
!tp_strdiff (reason, TP_ERROR_STR_INSUFFICIENT_BALANCE))
{
- TpConnection *conn;
- GQuark features[] = { TP_CONNECTION_FEATURE_BALANCE, 0 };
-
- g_object_get (self->priv->handler, "call-channel", &call, NULL);
- conn = tp_channel_borrow_connection (TP_CHANNEL (call));
- g_object_unref (call);
-
- tp_proxy_prepare_async (conn, features, show_balance_error, self);
+ show_balance_error (self);
return;
}