aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-alert.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-30 09:11:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-30 09:11:44 +0800
commit0e4c54eddced72c9639001849148fe1813c5dc4e (patch)
tree3ba53e853901d3b7e733b6aed145c5eb54e6a2fc /e-util/e-alert.h
parentd3b09614221d075452496a5198a3910d07eb2818 (diff)
downloadgsoc2013-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 'e-util/e-alert.h')
-rw-r--r--e-util/e-alert.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/e-util/e-alert.h b/e-util/e-alert.h
index 4c515b53f4..7b07970361 100644
--- a/e-util/e-alert.h
+++ b/e-util/e-alert.h
@@ -81,21 +81,32 @@ GType e_alert_get_type (void);
EAlert * e_alert_new (const gchar *tag,
...) G_GNUC_NULL_TERMINATED;
EAlert * e_alert_new_valist (const gchar *tag,
- va_list ap);
+ va_list va);
EAlert * e_alert_new_array (const gchar *tag,
GPtrArray *args);
-guint32 e_alert_get_flags (EAlert *alert);
-const gchar * e_alert_peek_stock_image (EAlert *alert);
gint e_alert_get_default_response (EAlert *alert);
-gchar * e_alert_get_title (EAlert *alert,
- gboolean escaped);
-gchar * e_alert_get_primary_text (EAlert *alert,
- gboolean escaped);
-gchar * e_alert_get_secondary_text (EAlert *alert,
- gboolean escaped);
-gboolean e_alert_get_scroll (EAlert *alert);
+void e_alert_set_default_response (EAlert *alert,
+ gint response_id);
+GtkMessageType e_alert_get_message_type (EAlert *alert);
+void e_alert_set_message_type (EAlert *alert,
+ GtkMessageType message_type);
+const gchar * e_alert_get_primary_text (EAlert *alert);
+void e_alert_set_primary_text (EAlert *alert,
+ const gchar *primary_text);
+const gchar * e_alert_get_secondary_text (EAlert *alert);
+void e_alert_set_secondary_text (EAlert *alert,
+ const gchar *secondary_text);
struct _e_alert_button *
e_alert_peek_buttons (EAlert *alert);
+GtkWidget * e_alert_create_image (EAlert *alert,
+ GtkIconSize size);
+
+void e_alert_submit (GtkWidget *widget,
+ const gchar *tag,
+ ...) G_GNUC_NULL_TERMINATED;
+void e_alert_submit_valist (GtkWidget *widget,
+ const gchar *tag,
+ va_list va);
G_END_DECLS