From 0e4c54eddced72c9639001849148fe1813c5dc4e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 29 Sep 2010 21:11:44 -0400 Subject: 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. --- composer/e-msg-composer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'composer') 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)) /** -- cgit v1.2.3