Trying out a new interface called EAlertSink. The idea is to centralize
how errors are shown to the user. A GtkWindow subclass would implement
the EAlertSink interface, which consists of a single method:
void (*submit_alert) (EAlertSink *alert_sink, EAlert *alert);
The subclass has complete control over what to do with the EAlert,
although I imagine we'll wind up implementing various alert-handling
policies as standalone widgets such as EAlertDialog. I'd like to try
an EAlertInfoBar.
Code that would otherwise display an error dialog itself would instead
pass the EAlert to an appropriate EAlertSink and be done with it.
Nothing is final yet. Still hacking on EAlert trying to find an API
that feels right for these use cases.
92 lines
995 B
Plaintext
92 lines
995 B
Plaintext
<!-- ##### SECTION Title ##### -->
|
|
User Alert Handling
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
<!-- ##### MACRO E_ALERT_ASK_FILE_EXISTS_OVERWRITE ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO E_ALERT_NO_SAVE_FILE ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### MACRO E_ALERT_NO_LOAD_FILE ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### STRUCT EAlert ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@parent:
|
|
@priv:
|
|
|
|
<!-- ##### FUNCTION e_alert_new ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@tag:
|
|
@Varargs:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION e_alert_run_dialog ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@parent:
|
|
@alert:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION e_alert_run_dialog_for_args ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@parent:
|
|
@tag:
|
|
@Varargs:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION e_alert_dialog_count_buttons ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@dialog:
|
|
@Returns:
|
|
|
|
|