From 0ae11712afc8dfc1231531fe097ee1debc8b0ece Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 26 Oct 2011 12:13:45 +0200 Subject: account-chooser: factor out select_account() https://bugzilla.gnome.org/show_bug.cgi?id=662604 --- libempathy-gtk/empathy-account-chooser.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c index f743db99e..3f7d70b5d 100644 --- a/libempathy-gtk/empathy-account-chooser.c +++ b/libempathy-gtk/empathy-account-chooser.c @@ -529,17 +529,8 @@ empathy_account_chooser_get_connection (EmpathyAccountChooser *self) return connection; } -/** - * empathy_account_chooser_set_account: - * @self: an #EmpathyAccountChooser - * @account: a #TpAccount - * - * Sets the currently selected account to @account, if it exists in the list. - * - * Return value: whether the chooser was set to @account. - */ -gboolean -empathy_account_chooser_set_account (EmpathyAccountChooser *self, +static gboolean +select_account (EmpathyAccountChooser *self, TpAccount *account) { GtkComboBox *combobox; @@ -566,6 +557,22 @@ empathy_account_chooser_set_account (EmpathyAccountChooser *self, return data.set; } +/** + * empathy_account_chooser_set_account: + * @self: an #EmpathyAccountChooser + * @account: a #TpAccount + * + * Sets the currently selected account to @account, if it exists in the list. + * + * Return value: whether the chooser was set to @account. + */ +gboolean +empathy_account_chooser_set_account (EmpathyAccountChooser *self, + TpAccount *account) +{ + return select_account (self, account); +} + void empathy_account_chooser_set_all (EmpathyAccountChooser *self) { -- cgit v1.2.3