![]() |
![]() |
![]() |
Evolution-Data-Server Manual: Utilities (libedataserver) | ![]() |
---|---|---|---|---|
Top | Description |
GList * e_categories_get_list (void); void e_categories_add (const char *category, const char *unused, const char *icon_file, gboolean searchable); void e_categories_remove (const char *category); gboolean e_categories_exist (const char *category); const char * e_categories_get_color_for (const char *category); void e_categories_set_color_for (const char *category, const char *color); const char * e_categories_get_icon_file_for (const char *category); void e_categories_set_icon_file_for (const char *category, const char *icon_file); gboolean e_categories_is_searchable (const char *category); void e_categories_register_change_listener (GCallback listener, gpointer user_data); void e_categories_unregister_change_listener (GCallback listener, gpointer user_data);
GList * e_categories_get_list (void);
Returns a sorted list of all the category names currently configured.
Returns : |
a sorted GList containing the names of the categories. The list should be freed using g_list_free, but the names of the categories should not be touched at all, they are internal strings. |
void e_categories_add (const char *category, const char *unused, const char *icon_file, gboolean searchable);
Adds a new category, with its corresponding icon, to the configuration database.
|
name of category to add. |
|
DEPRECATED! associated color. DEPRECATED! |
|
full path of the icon associated to the category. |
|
whether the category can be used for searching in the GUI. |
void e_categories_remove (const char *category);
Removes the given category from the configuration.
|
category to be removed. |
gboolean e_categories_exist (const char *category);
Checks whether the given category is available in the configuration.
|
category to be searched. |
Returns : |
TRUE if the category is available, FALSE otherwise.
|
const char * e_categories_get_color_for (const char *category);
e_categories_get_color_for
is deprecated and should not be used in newly-written code.
Gets the color associated with the given category.
|
category to retrieve the color for. |
Returns : |
a string representation of the color. DEPRECATED! |
void e_categories_set_color_for (const char *category, const char *color);
e_categories_set_color_for
is deprecated and should not be used in newly-written code.
Sets the color associated with the given category.
DEPRECATED!
|
category to set the color for. |
|
X color. |
const char * e_categories_get_icon_file_for (const char *category);
Gets the icon file associated with the given category.
|
category to retrieve the icon file for. |
Returns : |
icon file name. |
void e_categories_set_icon_file_for (const char *category, const char *icon_file);
Sets the icon file associated with the given category.
|
category to set the icon file for. |
|
icon file. |
gboolean e_categories_is_searchable (const char *category);
Gets whether the given calendar is to be used for searches in the GUI.
Return value; TRUE
% if the category is searchable, FALSE
% if not.
|
category name. |
Returns : |
void e_categories_register_change_listener (GCallback listener, gpointer user_data);
Registers callback to be called on change of any category.
Pair listener and user_data is used to distinguish between listeners.
Listeners can be unregistered with e_categories_unregister_change_listener
.
|
the callback to be called on any category change. |
|
used data passed to the listener when called.
|
void e_categories_unregister_change_listener (GCallback listener, gpointer user_data);
Removes previously registered callback from the list of listeners on changes. If it was not registered, then does nothing.
|
Callback to be removed. |
|
User data as passed with call to e_categories_register_change_listener .
|