3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PIDGIN_ACCOUNT_CHOOSER_H
23 #define PIDGIN_ACCOUNT_CHOOSER_H
25 * SECTION:pidgin-account-chooser
26 * @section_id: pidgin-account-chooser
27 * @short_description: <filename>pidginaccountchooser.h</filename>
28 * @title: Pidgin Account Chooser Combo Box Widget
39 #define PIDGIN_TYPE_ACCOUNT_CHOOSER (pidgin_account_chooser_get_type())
41 G_DECLARE_FINAL_TYPE(PidginAccountChooser
, pidgin_account_chooser
, PIDGIN
,
42 ACCOUNT_CHOOSER
, GtkComboBox
)
45 * pidgin_account_chooser_new:
46 * @default_account: The account to select by default.
47 * @show_all: Whether or not to show all accounts, or just active accounts.
49 * Creates a combo box filled with accounts.
51 * Returns: (transfer full): The account chooser combo box.
55 GtkWidget
*pidgin_account_chooser_new(PurpleAccount
*default_account
,
59 * pidgin_account_chooser_set_filter_func:
60 * @chooser: The account chooser combo box.
61 * @filter_func: A function for checking if an account should be shown. This
62 * can be %NULL to remove any filter.
64 * Set the filter function used to determine which accounts to show.
68 void pidgin_account_chooser_set_filter_func(
69 PidginAccountChooser
*chooser
, PurpleFilterAccountFunc filter_func
);
72 * pidgin_account_chooser_get_selected:
73 * @chooser: The chooser created by pidgin_account_chooser_new().
75 * Gets the currently selected account from an account combo box.
77 * Returns: (transfer none): Returns the #PurpleAccount that is currently
82 PurpleAccount
*pidgin_account_chooser_get_selected(GtkWidget
*chooser
);
85 * pidgin_account_chooser_set_selected:
86 * @chooser: The chooser created by pidgin_account_chooser_new().
87 * @account: The #PurpleAccount to select.
89 * Sets the currently selected account for an account combo box.
93 void pidgin_account_chooser_set_selected(GtkWidget
*chooser
,
94 PurpleAccount
*account
);
98 #endif /* PIDGIN_ACCOUNT_CHOOSER_H */