Top | ![]() |
![]() |
![]() |
![]() |
EActivity * | e_activity_new () |
void | e_activity_cancel () |
gchar * | e_activity_describe () |
EAlertSink * | e_activity_get_alert_sink () |
void | e_activity_set_alert_sink () |
GCancellable * | e_activity_get_cancellable () |
void | e_activity_set_cancellable () |
const gchar * | e_activity_get_icon_name () |
void | e_activity_set_icon_name () |
gdouble | e_activity_get_percent () |
void | e_activity_set_percent () |
EActivityState | e_activity_get_state () |
void | e_activity_set_state () |
const gchar * | e_activity_get_text () |
void | e_activity_set_text () |
const gchar * | e_activity_get_last_known_text () |
gboolean | e_activity_handle_cancellation () |
EActivity is used to track and describe application activities in progress. An EActivity usually manifests in a user interface as a status bar message (see EActivityProxy) or information bar message (see EActivityBar), with optional progress indication and a cancel button which is linked to a GCancellable.
EActivity *
e_activity_new (void
);
e_activity_new
is deprecated and should not be used in newly-written code.
Creates a new EActivity.
void
e_activity_cancel (EActivity *activity
);
e_activity_cancel
is deprecated and should not be used in newly-written code.
Convenience function cancels activity
's “cancellable”.
activity
's “state” to
E_ACTIVITY_CANCELLED
. It merely requests that the associated
operation be cancelled. Only after the operation finishes with
a G_IO_ERROR_CANCELLED
should the activity
's “state”
be changed (see e_activity_handle_cancellation()
). During this
interim period e_activity_describe()
will indicate the activity
is "cancelling".
gchar *
e_activity_describe (EActivity *activity
);
e_activity_describe
is deprecated and should not be used in newly-written code.
Returns a description of the current state of the activity
based on
the “text”, “percent” and “state” properties.
Suitable for displaying in a status bar or similar widget.
Free the returned string with g_free()
when finished with it.
EAlertSink *
e_activity_get_alert_sink (EActivity *activity
);
e_activity_get_alert_sink
is deprecated and should not be used in newly-written code.
Returns the EAlertSink for activity
, if one was provided.
The “alert-sink” property is convenient for when the user should be alerted about a failed asynchronous operation. Generally an “alert-sink” is set prior to dispatching the operation, and retrieved by a callback function when the operation completes.
void e_activity_set_alert_sink (EActivity *activity
,EAlertSink *alert_sink
);
e_activity_set_alert_sink
is deprecated and should not be used in newly-written code.
Sets (or clears) the EAlertSink for activity
.
The “alert-sink” property is convenient for when the user should be alerted about a failed asynchronous operation. Generally an “alert-sink” is set prior to dispatching the operation, and retrieved by a callback function when the operation completes.
GCancellable *
e_activity_get_cancellable (EActivity *activity
);
e_activity_get_cancellable
is deprecated and should not be used in newly-written code.
Returns the GCancellable for activity
, if one was provided.
Generally the activity
's “cancellable” property holds the same
GCancellable instance passed to a cancellable function, so widgets like
EActivityBar can bind the GCancellable to a cancel button.
void e_activity_set_cancellable (EActivity *activity
,GCancellable *cancellable
);
e_activity_set_cancellable
is deprecated and should not be used in newly-written code.
Sets (or clears) the GCancellable for activity
.
Generally the activity
's “cancellable” property holds the same
GCancellable instance passed to a cancellable function, so widgets like
EActivityBar can bind the GCancellable to a cancel button.
const gchar *
e_activity_get_icon_name (EActivity *activity
);
e_activity_get_icon_name
is deprecated and should not be used in newly-written code.
Returns the themed icon name for activity
, if one was provided.
Generally widgets like EActivityBar will honor the “icon-name”
property while the activity
's “state” is E_ACTIVITY_RUNNING
or
E_ACTIVITY_WAITING
, but will override the icon for E_ACTIVITY_CANCELLED
and E_ACTIVITY_COMPLETED
.
void e_activity_set_icon_name (EActivity *activity
,const gchar *icon_name
);
e_activity_set_icon_name
is deprecated and should not be used in newly-written code.
Sets (or clears) the themed icon name for activity
.
Generally widgets like EActivityBar will honor the “icon-name”
property while the activity
's “state” is E_ACTIVITY_RUNNING
or
E_ACTIVITY_WAITING
, but will override the icon for E_ACTIVITY_CANCELLED
and E_ACTIVITY_COMPLETED
.
gdouble
e_activity_get_percent (EActivity *activity
);
e_activity_get_percent
is deprecated and should not be used in newly-written code.
Returns the percent complete for activity
as a value between 0 and 100,
or a negative value if the percent complete is unknown.
Generally widgets like EActivityBar will display the percent complete by
way of e_activity_describe()
, but only if the value is between 0 and 100.
void e_activity_set_percent (EActivity *activity
,gdouble percent
);
e_activity_set_percent
is deprecated and should not be used in newly-written code.
Sets the percent complete for activity
. The value should be between 0
and 100, or negative if the percent complete is unknown.
Generally widgets like EActivityBar will display the percent complete by
way of e_activity_describe()
, but only if the value is between 0 and 100.
EActivityState
e_activity_get_state (EActivity *activity
);
e_activity_get_state
is deprecated and should not be used in newly-written code.
Returns the state of activity
.
Generally widgets like EActivityBar will display the activity state by
way of e_activity_describe()
and possibly an icon. The activity state is
E_ACTIVITY_RUNNING
by default, and is usually only changed once when the
associated operation is finished.
void e_activity_set_state (EActivity *activity
,EActivityState state
);
e_activity_set_state
is deprecated and should not be used in newly-written code.
Sets the state of activity
.
Generally widgets like EActivityBar will display the activity state by
way of e_activity_describe()
and possibly an icon. The activity state is
E_ACTIVITY_RUNNING
by default, and is usually only changed once when the
associated operation is finished.
const gchar *
e_activity_get_text (EActivity *activity
);
e_activity_get_text
is deprecated and should not be used in newly-written code.
Returns a message describing what activity
is doing.
Generally widgets like EActivityBar will display the message by way of
e_activity_describe()
.
void e_activity_set_text (EActivity *activity
,const gchar *text
);
e_activity_set_text
is deprecated and should not be used in newly-written code.
Sets (or clears) a message describing what activity
is doing.
Generally widgets like EActivityBar will display the message by way of
e_activity_describe()
.
const gchar *
e_activity_get_last_known_text (EActivity *activity
);
e_activity_get_last_known_text
is deprecated and should not be used in newly-written code.
Returns the last non-empty “text” value, so it's possible to
identify what the activity
was doing even if it
currently has no description.
Mostly useful for debugging.
gboolean e_activity_handle_cancellation (EActivity *activity
,const GError *error
);
e_activity_handle_cancellation
is deprecated and should not be used in newly-written code.
Convenience function sets activity
's “state” to
E_ACTIVITY_CANCELLED
if error
is G_IO_ERROR_CANCELLED
.