]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-account-chooser.c
account-chooser: factor out select_account()
[empathy.git] / libempathy-gtk / empathy-account-chooser.c
index f743db99e3e65ff32096c4628d34c1219e6a268f..3f7d70b5dda14b525f56d9ed6c19130bce40d88d 100644 (file)
@@ -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)
 {