aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-19 18:12:22 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-19 18:51:43 +0800
commit010b9fefd050ad4d4c2627cad084b55573a455a3 (patch)
tree314e882ce1aea3ec68e412146ab635d6cbeb5f46 /src/empathy-main-window.c
parent7684cbad9c0b6f0ac8b9640b1b74e0dafc058e84 (diff)
downloadgsoc2013-empathy-010b9fefd050ad4d4c2627cad084b55573a455a3.tar
gsoc2013-empathy-010b9fefd050ad4d4c2627cad084b55573a455a3.tar.gz
gsoc2013-empathy-010b9fefd050ad4d4c2627cad084b55573a455a3.tar.bz2
gsoc2013-empathy-010b9fefd050ad4d4c2627cad084b55573a455a3.tar.lz
gsoc2013-empathy-010b9fefd050ad4d4c2627cad084b55573a455a3.tar.xz
gsoc2013-empathy-010b9fefd050ad4d4c2627cad084b55573a455a3.tar.zst
gsoc2013-empathy-010b9fefd050ad4d4c2627cad084b55573a455a3.zip
main-window: use tp_connection_get_account()
https://bugzilla.gnome.org/show_bug.cgi?id=656866
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index e3588c26c..167e338d6 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -901,7 +901,7 @@ static void
main_window_balance_update_balance (GtkAction *action,
TpConnection *conn)
{
- TpAccount *account = g_object_get_data (G_OBJECT (action), "account");
+ TpAccount *account = tp_connection_get_account (conn);
GtkWidget *label;
int amount = 0;
guint scale = G_MAXINT32;
@@ -977,7 +977,6 @@ main_window_setup_balance_create_action (EmpathyMainWindow *window,
g_object_bind_property (account, "icon-name", action, "icon-name",
G_BINDING_SYNC_CREATE);
- g_object_set_data (G_OBJECT (action), "account", account);
g_signal_connect (action, "activate",
G_CALLBACK (main_window_balance_activate_cb), window);
@@ -1016,15 +1015,12 @@ main_window_setup_balance_create_action (EmpathyMainWindow *window,
static GtkWidget *
main_window_setup_balance_create_widget (EmpathyMainWindow *window,
- GtkAction *action)
+ GtkAction *action,
+ TpAccount *account)
{
EmpathyMainWindowPriv *priv = GET_PRIV (window);
- TpAccount *account;
GtkWidget *hbox, *image, *label, *button;
- account = g_object_get_data (G_OBJECT (action), "account");
- g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL);
-
hbox = gtk_hbox_new (FALSE, 6);
/* protocol icon */
@@ -1074,10 +1070,6 @@ main_window_setup_balance (EmpathyMainWindow *window,
if (conn == NULL)
return;
- /* need to prepare the connection:
- * store the account on the connection */
- g_object_set_data (G_OBJECT (conn), "account", account);
-
if (!tp_proxy_is_prepared (conn, TP_CONNECTION_FEATURE_BALANCE))
return;
@@ -1093,7 +1085,7 @@ main_window_setup_balance (EmpathyMainWindow *window,
gtk_action_set_visible (priv->view_balance_show_in_roster, TRUE);
/* create the display widget */
- main_window_setup_balance_create_widget (window, action);
+ main_window_setup_balance_create_widget (window, action, account);
/* check the current balance and monitor for any changes */
uri = tp_connection_get_balance_uri (conn);