From efcf558673f83faf9621fe644ea1c20c78756d9f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 15 Jan 2010 10:48:15 +0000 Subject: update treeview when account's status is changed --- src/empathy-accounts-dialog.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/empathy-accounts-dialog.c') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 15e6796e5..984604223 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -1470,6 +1470,25 @@ accounts_dialog_connection_changed_cb (TpAccount *account, dialog); } +static void +update_account_in_treeview (EmpathyAccountsDialog *self, + TpAccount *account) +{ + EmpathyAccountsDialogPriv *priv = GET_PRIV (self); + GtkTreeIter iter; + GtkTreeModel *model; + + model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview)); + if (accounts_dialog_get_account_iter (self, account, &iter)) + { + GtkTreePath *path; + + path = gtk_tree_model_get_path (model, &iter); + gtk_tree_model_row_changed (model, path, &iter); + gtk_tree_path_free (path); + } +} + static void accounts_dialog_presence_changed_cb (TpAccount *account, guint presence, @@ -1479,6 +1498,8 @@ accounts_dialog_presence_changed_cb (TpAccount *account, { /* Update the status-infobar in the details view */ accounts_dialog_update_status_infobar (dialog, account); + + update_account_in_treeview (dialog, account); } static void -- cgit v1.2.3