diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-09-30 09:11:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-30 09:11:44 +0800 |
commit | 0e4c54eddced72c9639001849148fe1813c5dc4e (patch) | |
tree | 3ba53e853901d3b7e733b6aed145c5eb54e6a2fc /composer | |
parent | d3b09614221d075452496a5198a3910d07eb2818 (diff) | |
download | gsoc2013-evolution-0e4c54eddced72c9639001849148fe1813c5dc4e.tar gsoc2013-evolution-0e4c54eddced72c9639001849148fe1813c5dc4e.tar.gz gsoc2013-evolution-0e4c54eddced72c9639001849148fe1813c5dc4e.tar.bz2 gsoc2013-evolution-0e4c54eddced72c9639001849148fe1813c5dc4e.tar.lz gsoc2013-evolution-0e4c54eddced72c9639001849148fe1813c5dc4e.tar.xz gsoc2013-evolution-0e4c54eddced72c9639001849148fe1813c5dc4e.tar.zst gsoc2013-evolution-0e4c54eddced72c9639001849148fe1813c5dc4e.zip |
Messin around with EAlerts.
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.
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-msg-composer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index f5f47782f5..d4e45d4d15 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -47,6 +47,7 @@ #include "e-util/e-account-utils.h" #include "e-util/e-alert-dialog.h" +#include "e-util/e-alert-sink.h" #include "e-util/e-dialog-utils.h" #include "e-util/e-extensible.h" #include "e-util/e-plugin-ui.h" @@ -124,6 +125,7 @@ G_DEFINE_TYPE_WITH_CODE ( EMsgComposer, e_msg_composer, GTKHTML_TYPE_EDITOR, + G_IMPLEMENT_INTERFACE (E_TYPE_ALERT_SINK, NULL) G_IMPLEMENT_INTERFACE (E_TYPE_EXTENSIBLE, NULL)) /** |