Top |
Functions
GtkWidget * | e_client_combo_box_new () |
EClientCache * | e_client_combo_box_ref_client_cache () |
void | e_client_combo_box_set_client_cache () |
EClient * | e_client_combo_box_get_client_sync () |
void | e_client_combo_box_get_client () |
EClient * | e_client_combo_box_get_client_finish () |
EClient * | e_client_combo_box_ref_cached_client () |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkComboBox ╰── ESourceComboBox ╰── EClientComboBox
Description
EClientComboBox extends the functionality of ESourceComboBox by providing convenient access to EClient instances with EClientCache.
As a future enhancement, this widget may also display status information about the backends associated with the displayed data sources, similar to EClientSelector.
Functions
e_client_combo_box_new ()
GtkWidget * e_client_combo_box_new (EClientCache *client_cache
,const gchar *extension_name
);
Creates a new EClientComboBox widget that lets the user pick an ESource
from the provided client_cache
. The displayed sources are restricted to
those which have an extension_name
extension.
e_client_combo_box_ref_client_cache ()
EClientCache *
e_client_combo_box_ref_client_cache (EClientComboBox *combo_box
);
Returns the EClientCache passed to e_client_combo_box_new()
.
The returned EClientCache is referenced for thread-safety and must be
unreferenced with g_object_unref()
when finished with it.
e_client_combo_box_set_client_cache ()
void e_client_combo_box_set_client_cache (EClientComboBox *combo_box
,EClientCache *client_cache
);
Simultaneously sets the “client-cache” and “registry” properties.
This function is intended for cases where combo_box
is instantiated
by a GtkBuilder and has to be given an EClientCache after it is fully
constructed.
e_client_combo_box_get_client_sync ()
EClient * e_client_combo_box_get_client_sync (EClientComboBox *combo_box
,ESource *source
,GCancellable *cancellable
,GError **error
);
Obtains a shared EClient instance for source
, or else creates a new
EClient instance to be shared.
The “extension-name” property determines the type of
EClient to obtain. See e_client_cache_get_client_sync()
for a list
of valid extension names.
If a request for the same source
and “extension-name”
is already in progress when this function is called, this request will
"piggyback" on the in-progress request such that they will both succeed
or fail simultaneously.
Unreference the returned EClient with g_object_unref()
when finished
with it. If an error occurs, the function will set error
and return
NULL
.
e_client_combo_box_get_client ()
void e_client_combo_box_get_client (EClientComboBox *combo_box
,ESource *source
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously obtains a shared EClient instance for source
, or else
creates a new EClient instance to be shared.
The “extension-name” property determines the type of
EClient to obtain. See e_client_cache_get_client_sync()
for a list
of valid extension names.
If a request for the same source
and “extension-name”
is already in progress when this function is called, this request will
"piggyback" on the in-progress request such that they will both succeed
or fail simultaneously.
When the operation is finished, callback
will be called. You can
then call e_client_combo_box_get_client_finish()
to get the result of
the operation.
Parameters
combo_box |
||
source |
an ESource |
|
cancellable |
optional GCancellable object, or |
|
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
data to pass to the callback function |
e_client_combo_box_get_client_finish ()
EClient * e_client_combo_box_get_client_finish (EClientComboBox *combo_box
,GAsyncResult *result
,GError **error
);
Finishes the operation started with e_client_combo_box_get_client()
.
Unreference the returned EClient with g_object_unref()
when finished
with it. If an error occurred, the function will set error
and return
NULL
.
e_client_combo_box_ref_cached_client ()
EClient * e_client_combo_box_ref_cached_client (EClientComboBox *combo_box
,ESource *source
);
Returns a shared EClient instance for source
and the value of
“extension-name” if such an instance is already cached,
or else NULL
. This function does not create a new EClient instance,
and therefore does not block.
The returned EClient is referenced for thread-safety and must be
unreferenced with g_object_unref()
when finished with it.
Property Details
The “client-cache”
property
“client-cache” EClientCache *
Cache of shared EClient instances.
Flags: Read / Write / Construct Only