Top | ![]() |
![]() |
![]() |
![]() |
enum | EFocus |
enum | ERestoreWindowFlags |
#define | E_ASCII_DTOSTR_BUF_SIZE |
#define | E_UTILS_LIGHTNESS_MULT |
#define | E_UTILS_DARKNESS_MULT |
#define | E_UTILS_DEFAULT_THEME_BG_COLOR |
#define | E_UTILS_DEFAULT_THEME_BASE_COLOR |
#define | E_UTILS_DEFAULT_THEME_FG_COLOR |
#define | E_UTILS_DEFAULT_THEME_TEXT_COLOR |
#define | E_UTILS_DEFAULT_THEME_SELECTED_BG_COLOR |
#define | E_UTILS_DEFAULT_THEME_SELECTED_FG_COLOR |
#define | E_UTILS_DEFAULT_THEME_UNFOCUSED_SELECTED_BG_COLOR |
#define | E_UTILS_DEFAULT_THEME_UNFOCUSED_SELECTED_FG_COLOR |
constgchar * e_get_accels_filename (void
);
Returns the name of the user data file containing custom keyboard accelerator specifications.
void e_show_uri (,
GtkWindow *parentconst
);gchar *uri
Launches the default application to show the given URI. The URI must
be of a form understood by GIO. If the URI cannot be shown, it presents
a dialog describing the error. The dialog is set as transient to parent
if parent
is non-NULL
void e_display_help (,
GtkWindow *parentconst
);gchar *link_id
Opens the user documentation to the section given by link_id
, or to the
table of contents if link_id
is NULL
parent
if parent
is non-NULL
void e_restore_window (,
GtkWindow *windowconst
,gchar *settings_pathERestoreWindowFlags flags
);
This function can restore one of or both a window's size and position
using settings_path
which conform to the relocatable
schema "org.gnome.evolution.window".
If E_RESTORE_WINDOW_SIZE is present in flags
, restore window
's
previously recorded size and maximize state.
If E_RESTORE_WINDOW_POSITION is present in flags
, move window
to
the previously recorded screen coordinates.
The respective
GtkAction * e_lookup_action (,
GtkUIManager *ui_managerconst
);gchar *action_name
Returns the first action_name
by traversing the
list of action groups in ui_manager
. If no such action exists, the
function emits a critical warning before returning NULL
GtkActionGroup * e_lookup_action_group (,
GtkUIManager *ui_managerconst
);gchar *group_name
Returns the ui_manager
named group_name
. If no
such action group exists, the function emits a critical warnings before
returning NULL
gint e_action_compare_by_label (,
GtkAction *action1);
GtkAction *action2
Compares the labels for action1
and action2
using g_utf8_collate()
void e_action_group_remove_all_actions ();
GtkActionGroup *action_group
Removes all actions from the action group.
GtkRadioAction * e_radio_action_get_current_action ();
GtkRadioAction *radio_action
Returns the currently active member of the group to which radio_action
belongs.
void e_action_group_add_actions_localized (,
GtkActionGroup *action_groupconst
,gchar *translation_domainconst
,GtkActionEntry *entries,
guint n_entries);
gpointer user_data
Adds entries
to action_group
, with action's
label and tooltip localized in the given translation domain, instead
of the domain set on the action_group
.
action_group |
a |
|
translation_domain |
a translation domain to use
to translate label and tooltip strings in |
|
entries |
an array of action descriptions. |
[array length=n_entries] |
n_entries |
the number of entries |
|
user_data |
data to pass to the action callbacks |
Since: 3.4
GtkWidget * e_builder_get_widget (,
GtkBuilder *builderconst
);gchar *widget_name
Gets the widget named widget_name
. Note that this function does not
increment the reference count of the returned widget. If widget_name
could not be found in the builder
's object tree, a run-time
warning is emitted since this usually indicates a programming error.
This is a convenience function to work around the awkwardness of
If you need something from builder
other than a gtk_builder_get_object()
void e_load_ui_builder_definition (,
GtkBuilder *builderconst
);gchar *basename
Loads a UI definition into builder
from Evolution's UI directory.
Failure here is fatal, since the application can't function without
its UI definitions.
guint e_load_ui_manager_definition (,
GtkUIManager *ui_managerconst
);gchar *basename
Loads a UI definition into ui_manager
from Evolution's UI directory.
Failure here is fatal, since the application can't function without
its UI definitions.
void e_categories_add_change_hook (,
GHookFunc func);
gpointer object
A saner alternative to e_categories_register_change_listener()
Adds a hook function to be called when a category is added, removed or
modified. If object
is not NULL
object
is finalized.
gdouble e_flexible_strtod (const
,gchar *nptr);
gchar **endptr
Converts a string to a gdouble value. This function detects strings either in the standard C locale or in the current locale.
This function is typically used when reading configuration files or other non-user input that should not be locale dependent, but may have been in the past. To handle input from the user you should normally use the locale-sensitive system strtod function.
To convert from a double to a string in a locale-insensitive way, use
g_ascii_dtostr
.
gchar * e_ascii_dtostr (,
gchar *buffer,
gint buf_lenconst
,gchar *format);
gdouble d
Converts a double to a string, using the '.' as decimal_point. To format the number you pass in a printf-style formating string. Allowed conversion specifiers are eEfFgG.
If you want to generates enough precision that converting
the string back using g_strtod
gives the same machine-number
(on machines with IEEE compatible 64bit doubles) use the format
string "%.17g". If you do this it is guaranteed that the size
of the resulting string will never be larger than
G_ASCII_DTOSTR_BUF_SIZE
bytes.
gchar * e_str_without_underscores (const
);gchar *string
Strips underscores from a string in the same way
gtk_label_new_with_mnemonics
does. The returned string should be freed
using g_free()
GString * e_str_replace_string (const
,gchar *textconst
,gchar *findconst
);gchar *replace
Replaces every occurrence of the string before
with the string after
in
the string text
and returns a g_string_free()
guint32 e_color_to_value (const
);GdkColor *color
Converts a
guint32 e_rgba_to_value (const
);GdkRGBA *rgba
Converts
void e_rgba_to_color (const
,GdkRGBA *rgba);
GdkColor *color
Converts rgba
into color
, but loses the alpha channel from rgba
.
void e_utils_get_theme_color (,
GtkWidget *widgetconst
,gchar *color_namesconst
,gchar *fallback_color_ident);
GdkRGBA *rgba
Reads named theme color from a widget
.
The color_names
are read one after another from left to right,
the next are meant as fallbacks, in case the theme doesn't
define the previous color. If none is found then the fallback_color_ident
is set to rgba
.
void e_utils_get_theme_color_color (,
GtkWidget *widgetconst
,gchar *color_namesconst
,gchar *fallback_color_ident);
GdkColor *color
The same as e_utils_get_theme_color()
, only populates
gint (*ESortCompareFunc) (,
gconstpointer first,
gconstpointer second);
gpointer closure
void e_bsearch (,
gconstpointer key,
gconstpointer base,
gsize nmemb,
gsize sizeESortCompareFunc compare
,,
gpointer closure,
gsize *start);
gsize *end
gsize e_strftime_fix_am_pm (,
gchar *str,
gsize maxconst
,gchar *fmtconst struct tm *tm
);
gsize e_utf8_strftime_fix_am_pm (,
gchar *str,
gsize maxconst
,gchar *fmtconst struct tm *tm
);
gsize e_utf8_strftime_match_lc_messages (,
gchar *string,
gsize maxconst
,gchar *fmtconst struct tm *tm
);
The UTF-8 equivalent of e_strftime()
string |
The string to store the result in. |
|
max |
The size of the |
|
fmt |
The formatting to use on |
|
tm |
The time value to format. |
Since: 3.22
constgchar * e_get_month_name (,
GDateMonth month);
gboolean abbreviated
Returns the localized name for month
. If abbreviated
is TRUE
constgchar * e_get_weekday_name (,
GDateWeekday weekday);
gboolean abbreviated
Returns the localized name for weekday
. If abbreviated
is TRUE
GDateWeekday e_weekday_get_next ();
GDateWeekday weekday
Returns the weekday
.
GDateWeekday e_weekday_get_prev ();
GDateWeekday weekday
Returns the weekday
.
GDateWeekday e_weekday_add_days (,
GDateWeekday weekday);
guint n_days
Increments weekday
by n_days
.
GDateWeekday e_weekday_subtract_days (,
GDateWeekday weekday);
guint n_days
Decrements weekday
by n_days
.
guint e_weekday_get_days_between (,
GDateWeekday weekday1);
GDateWeekday weekday2
Counts the number of days starting at weekday1
and ending at weekday2
.
gint e_weekday_to_tm_wday ();
GDateWeekday weekday
Converts a
GDateWeekday e_weekday_from_tm_wday ();
gint tm_wday
Converts a weekday in the numbering used in
struct tm to a
gchar * e_util_guess_mime_type (const
,gchar *filename);
gboolean localfile
Tries to determine the MIME type for filename
. Free the returned
string with g_free()
GList * e_util_dup_searchable_categories (void
);
Returns a list of the searchable categories, with each item being a UTF-8
category name. The list should be freed with g_list_free()
g_free()
g_list_free_full()
gboolean e_util_get_open_source_job_info (const
,gchar *extension_nameconst
,gchar *source_display_name,
gchar **description,
gchar **alert_ident);
gchar **alert_arg_0
Populates desription
, alert_ident
and alert_arg_0
to be used
to open an extension_name
. The values
can be used for functions like e_alert_sink_submit_thread_job()
.
If desription
, alert_ident
and alert_arg_0
with g_free()
extension_name |
an extension name of the source |
|
source_display_name |
an ESource's display name |
|
description |
a description to use. |
[out][transfer-full] |
alert_ident |
an alert ident to use on failure. |
[out][transfer-full] |
alert_arg_0 |
an alert argument 0 to use on failure. |
[out][transfer-full] |
desription
, alert_ident
and alert_arg_0
were set for the given extension_name
; when
Since: 3.16
void e_util_propagate_open_source_job_error (struct _EAlertSinkThreadJobData *job_data
,const
,gchar *extension_name,
GError *local_error);
GError **error
Propagates (and cosumes) the local_error
into the error
, eventually
changes alert_ident for the job_data
for well-known error codes,
where is available better error description.
job_data |
an EAlertSinkThreadJobData instance |
|
extension_name |
what extension name had beeing opened |
|
local_error |
a |
[allow none] |
error |
an output |
[allow none] |
Since: 3.16
EClient * e_util_open_client_sync (struct _EAlertSinkThreadJobData *job_data
,struct _EClientCache *client_cache
,const
,gchar *extension_name,
ESource *source,
guint32 wait_for_connected_seconds,
GCancellable *cancellable);
GError **error
gboolean e_binding_transform_color_to_string (,
GBinding *bindingconst
,GValue *source_value,
GValue *target_value);
gpointer not_used
Transforms a
gboolean e_binding_transform_string_to_color (,
GBinding *bindingconst
,GValue *source_value,
GValue *target_value);
gpointer not_used
Transforms a color string specification to a
gboolean e_binding_transform_source_to_uid (,
GBinding *bindingconst
,GValue *source_value,
GValue *target_value);
ESourceRegistry *registry
Transforms an
gboolean e_binding_transform_uid_to_source (,
GBinding *bindingconst
,GValue *source_value,
GValue *target_value);
ESourceRegistry *registry
Transforms an registry
.
gboolean e_binding_transform_text_non_null (,
GBinding *bindingconst
,GValue *source_value,
GValue *target_value);
gpointer user_data
Transforms a text value to a text value which is never NULL; an empty string is used instead of NULL.
GBinding * e_binding_bind_object_text_property (,
gpointer sourceconst
,gchar *source_property,
gpointer targetconst
,gchar *target_property);
GBindingFlags flags
Installs a new text property object binding, using e_binding_bind_property_full()
gulong e_signal_connect_notify (,
gpointer instanceconst
,gchar *notify_name,
GCallback c_handler);
gpointer user_data
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
gulong e_signal_connect_notify_after (,
gpointer instanceconst
,gchar *notify_name,
GCallback c_handler);
gpointer user_data
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
gulong e_signal_connect_notify_swapped (,
gpointer instanceconst
,gchar *notify_name,
GCallback c_handler);
gpointer user_data
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
gulong e_signal_connect_notify_object (,
gpointer instanceconst
,gchar *notify_name,
GCallback c_handler,
gpointer gobject);
GConnectFlags connect_flags
This installs a special handler in front of c_handler
, which will
call the c_handler
only if the property value changed since the last
time it was checked. Due to this, these handlers cannot be disconnected
by by any of the g_signal_handlers_* functions, but only with the returned
handler ID. A convenient e_signal_disconnect_notify_handler()
was added
to make it easier.
void e_signal_disconnect_notify_handler (,
gpointer instance);
gulong *handler_id
Convenient handler disconnect function to be used with
returned handler IDs from:
e_signal_connect_notify()
e_signal_connect_notify_after()
e_signal_connect_notify_swapped()
e_signal_connect_notify_object()
but not necessarily only with these functions.
GSettings * e_util_ref_settings (const
);gchar *schema_id
Either returns an existing referenced schema_id
,
or creates a new one and remembers it for later use, to avoid having too many
schema_id
.
A schema_id
. The returned g_object_unref()
Since: 3.16
void e_util_cleanup_settings (void
);
Frees all the memory taken by e_util_ref_settings()
.
Since: 3.16
gboolean e_util_prompt_user (,
GtkWindow *parentconst
,gchar *settings_schemaconst
,gchar *promptkeyconst
,gchar *tag...
);
Convenience function to query the user with a Yes/No dialog and a
"Do not show this dialog again" checkbox. If the user checks that
checkbox, then promptkey
is set to FALSE
TRUE
Returns TRUE
FALSE
void e_util_run_simple_async_result_in_thread (,
GSimpleAsyncResult *simple,
GSimpleAsyncThreadFunc func);
GCancellable *cancellable
Similar to g_simple_async_result_run_in_thread()
It doesn't behave exactly the same as the g_simple_async_result_run_in_thread()
cancellable
checking is not done before the finish.
simple |
a |
|
func |
a |
|
cancellable |
an optional |
Since: 3.18
void e_util_set_entry_issue_hint (,
GtkWidget *entryconst
);gchar *hint
Sets a hint
on the secondary entry
icon about an entered value issue,
or unsets it, when the hint
is NULL
Since: 3.20
guint e_util_normalize_font_size (,
GtkWidget *widget);
gdouble font_size
gchar * e_util_save_image_from_clipboard ();
GtkClipboard *clipboard
Saves the image from clipboard
to a temporary file and returns its URI.
Since: 3.22
gboolean e_util_check_gtk_bindings_in_key_press_event_cb (,
GtkWidget *widget);
GdkEvent *event
A callback function for GtkWidget::key-press-event signal,
which checks whether currently focused widget inside widget
,
if it's a widget
,
will consume the event
due to gtk+ bindings and if so, then
it'll stop processing the event further. When it's connected
on a
TRUE
FALSE
Since: 3.22
void e_util_claim_dbus_proxy_call_error (,
GDBusProxy *dbus_proxyconst
,gchar *method_nameconst
);GError *in_error
Claims the in_error
on the console as a failure to call
method method_name
of the dbus_proxy
. It's safe to call this
with a NULL
in_error
, then the function does nothing.
Some errors can be ignored, like the G_IO_ERROR_CANCELLED is.
dbus_proxy |
a |
|
method_name |
a method name of the |
|
in_error |
a |
[allow-none] |
Since: 3.22
void e_util_invoke_g_dbus_proxy_call_with_error_check (,
GDBusProxy *dbus_proxyconst
,gchar *method_name,
GVariant *parameters);
GCancellable *cancellable
Calls g_dbus_proxy_call()
dbus_proxy
for the method_name
with parameters
and adds its own callback for the result. Then, if an error is returned, passes this
error into e_util_claim_dbus_proxy_call_error()
.
See: e_util_invoke_g_dbus_proxy_call_with_error_check_full()
dbus_proxy |
a |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
cancellable |
a |
[allow-none] |
Since: 3.22
void e_util_invoke_g_dbus_proxy_call_with_error_check_full (,
GDBusProxy *dbus_proxyconst
,gchar *method_name,
GVariant *parameters,
GDBusCallFlags flags,
gint timeout_msec);
GCancellable *cancellable
Calls g_dbus_proxy_call()
dbus_proxy
for the method_name
with parameters
and adds its own callback for the result. Then, if an error is returned, passes this
error into e_util_claim_dbus_proxy_call_error()
.
See: e_util_invoke_g_dbus_proxy_call_with_error_check()
dbus_proxy |
a |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
flags |
a bit-or of |
|
timeout_msec |
timeout in milliseconds, with the same meaning as in the |
|
cancellable |
a |
[allow-none] |
Since: 3.22
GVariant * e_util_invoke_g_dbus_proxy_call_sync_wrapper_with_error_check (,
GDBusProxy *dbus_proxyconst
,gchar *method_name,
GVariant *parameters);
GCancellable *cancellable
Calls e_util_invoke_g_dbus_proxy_call_sync_wrapper_full()
with some default
values for flags and timeout_msec, while also providing its own GError and
after the call is finished it calls e_util_claim_dbus_proxy_call_error()
with the returned error, if any.
dbus_proxy |
a |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
cancellable |
a |
[allow-none] |
Since: 3.22
GVariant * e_util_invoke_g_dbus_proxy_call_sync_wrapper_full (,
GDBusProxy *dbus_proxyconst
,gchar *method_name,
GVariant *parameters,
GDBusCallFlags flags,
gint timeout_msec,
GCancellable *cancellable);
GError **error
Wraps GDBusProxy synchronous call into an asynchronous without blocking the main context. This can be useful when doing calls on a WebExtension, because it can avoid freeze when this is called in the UI process and the WebProcess also does its own IPC call.
This function should be called only from the main thread.
dbus_proxy |
a |
|
method_name |
a method name to invoke |
|
parameters |
parameters of the method, or |
[allow-none] |
flags |
a bit-or of |
|
timeout_msec |
timeout in milliseconds, with the same meaning as in the |
|
cancellable |
a |
[allow-none] |
error |
Return location for error, or |
[allow-none] |
Since: 3.22
void e_util_save_file_chooser_folder ();
GtkFileChooser *file_chooser
Saves the current folder of the file_chooser
, thus it could be used
by e_util_load_file_chooser_folder()
to open it in the last chosen folder.
Since: 3.24
void e_util_load_file_chooser_folder ();
GtkFileChooser *file_chooser
Sets the current folder to the file_chooser
to the one previously saved
by e_util_save_file_chooser_folder()
. The function does nothing if none
or invalid is saved.
Since: 3.24
gboolean e_util_get_webkit_developer_mode_enabled (void
);
Whether WebKit developer mode is enabled. This is read only once, thus any changes in the GSettings property require restart of the Evolution.
Since: 3.24