|  |  |  | libempathy-gtk Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#include <libempathy-gtk/empathy-account-chooser.h> gboolean (*EmpathyAccountChooserFilterFunc) (EmpathyAccount *account, gpointer user_data); EmpathyAccountChooser; GtkWidget * empathy_account_chooser_new (void); EmpathyAccount * empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser); TpConnection * empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser); gboolean empathy_account_chooser_set_account (EmpathyAccountChooser *chooser, EmpathyAccount *account); gboolean empathy_account_chooser_get_has_all_option (EmpathyAccountChooser *chooser); void empathy_account_chooser_set_has_all_option (EmpathyAccountChooser *chooser, gboolean has_all_option); void empathy_account_chooser_set_filter (EmpathyAccountChooser *chooser, EmpathyAccountChooserFilterFunc filter, gpointer user_data); gboolean empathy_account_chooser_filter_is_connected (EmpathyAccount *account, gpointer user_data);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkComboBox +----EmpathyAccountChooser
EmpathyAccountChooser implements AtkImplementorIface, GtkBuildable, GtkCellLayout and GtkCellEditable.
EmpathyAccountChooser is a widget which extends GtkComboBox to provide a chooser of available accounts.
gboolean (*EmpathyAccountChooserFilterFunc) (EmpathyAccount *account, gpointer user_data);
A function which decides whether the account indicated by account
is visible.
| 
 | an EmpathyAccount | 
| 
 | user data, or NULL | 
| Returns : | whether the account indicated by accountis visible. | 
typedef struct _EmpathyAccountChooser EmpathyAccountChooser;
Widget which extends GtkComboBox to provide a chooser of available accounts.
GtkWidget * empathy_account_chooser_new (void);
Creates a new EmpathyAccountChooser.
| Returns : | A new EmpathyAccountChooser | 
EmpathyAccount * empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser);
Returns the account which is currently selected in the chooser or NULL
if there is no account selected. The EmpathyAccount returned should be
unrefed with g_object_unref() when finished with.
| 
 | an EmpathyAccountChooser | 
| Returns : | a new ref to the EmpathyAccount currently selected, or NULL. | 
TpConnection * empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser);
Returns a borrowed reference to the TpConnection associated with the
account currently selected. The caller must reference the returned object with
g_object_ref() if it will be kept
| 
 | an EmpathyAccountChooser | 
| Returns : | a borrowed reference to the TpConnection associated with the account curently selected. | 
gboolean empathy_account_chooser_set_account (EmpathyAccountChooser *chooser, EmpathyAccount *account);
Sets the currently selected account to account, if it exists in the list.
| 
 | an EmpathyAccountChooser | 
| 
 | an EmpathyAccount | 
| Returns : | whether the chooser was set to account. | 
gboolean empathy_account_chooser_get_has_all_option (EmpathyAccountChooser *chooser);
Returns whether chooser has the "has-all-option" property
set to true.
| 
 | an EmpathyAccountChooser | 
| Returns : | whether chooserhas the "has-all-option" property
enabled. | 
void                empathy_account_chooser_set_has_all_option
                                                        (EmpathyAccountChooser *chooser,
                                                         gboolean has_all_option);
Sets the "has-all-option" property.
| 
 | an EmpathyAccountChooser | 
| 
 | a new value for the "has-all-option" property | 
void empathy_account_chooser_set_filter (EmpathyAccountChooser *chooser, EmpathyAccountChooserFilterFunc filter, gpointer user_data);
Sets a filter on the chooser so only accounts that are TRUE in the eyes
of the filter are visible in the chooser.
| 
 | an EmpathyAccountChooser | 
| 
 | a filter | 
| 
 | data to pass to filter, orNULL | 
gboolean empathy_account_chooser_filter_is_connected (EmpathyAccount *account, gpointer user_data);
A useful EmpathyAccountChooserFilterFunc that one could pass into
empathy_account_chooser_set_filter() and only show connected accounts.
| 
 | an EmpathyAccount | 
| 
 | user data or NULL | 
| Returns : | Whether accountis connected | 
"has-all-option" property"has-all-option" gboolean : Read / Write
Have an additional option in the list to mean all accounts.
Default value: FALSE