static gboolean
account_chooser_filter_foreach (GtkTreeModel *model,
				GtkTreePath  *path,
				GtkTreeIter  *iter,
				gpointer      chooser)
{
	account_chooser_update_iter (chooser, iter);
	return FALSE;
}
static void
update_account (EmpathyAccountChooser *self,
    TpAccount *account)
{
  GtkTreeIter iter;

  if (account_chooser_find_account (self, account, &iter))
    account_chooser_update_iter (self, &iter);
}
static void
account_chooser_connection_changed_cb (EmpathyAccountManager   *manager,
				       EmpathyAccount          *account,
				       TpConnectionStatusReason reason,
				       TpConnectionStatus       new_status,
				       TpConnectionStatus       old_status,
				       EmpathyAccountChooser   *chooser)
{
	GtkTreeIter iter;

	if (account_chooser_find_account (chooser, account, &iter)) {
		account_chooser_update_iter (chooser, &iter);
	}
}
static void
account_chooser_status_changed_cb (TpAccount  *account,
				   guint       old_status,
				   guint       new_status,
				   guint       reason,
				   gchar      *dbus_error_name,
				   GHashTable *details,
				   gpointer    user_data)
{
	EmpathyAccountChooser *chooser = user_data;
	GtkTreeIter iter;

	if (account_chooser_find_account (chooser, account, &iter)) {
		account_chooser_update_iter (chooser, &iter);
	}
}
static void
account_chooser_status_changed_cb (MissionControl           *mc,
				   TpConnectionStatus        status,
				   McPresence                presence,
				   TpConnectionStatusReason  reason,
				   const gchar              *unique_name,
				   EmpathyAccountChooser    *chooser)
{
	McAccount   *account;
	GtkTreeIter  iter;

	account = mc_account_lookup (unique_name);
	if (account_chooser_find_account (chooser, account, &iter)) {
		account_chooser_update_iter (chooser, &iter);
	}
	g_object_unref (account);
}
static void
account_chooser_account_add_foreach (McAccount             *account,
				     EmpathyAccountChooser *chooser)
{
	GtkListStore *store;
	GtkComboBox  *combobox;
	GtkTreeIter   iter;
	gint          position;

	combobox = GTK_COMBO_BOX (chooser);
	store = GTK_LIST_STORE (gtk_combo_box_get_model (combobox));

	position = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), NULL);
	gtk_list_store_insert_with_values (store, &iter, position,
					   COL_ACCOUNT_POINTER, account,
					   -1);
	account_chooser_update_iter (chooser, &iter);
}