aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-alert-dialog.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-06 22:55:27 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-13 01:59:00 +0800
commit4118d671d44b71592f0e91abb63f2468baaa9318 (patch)
treee70f787f68034a16df1c59f75c8869618b02146b /e-util/e-alert-dialog.h
parenta06e4484b8df804124b5bcf88d94dec5acfba270 (diff)
downloadgsoc2013-evolution-4118d671d44b71592f0e91abb63f2468baaa9318.tar.gz
gsoc2013-evolution-4118d671d44b71592f0e91abb63f2468baaa9318.tar.zst
gsoc2013-evolution-4118d671d44b71592f0e91abb63f2468baaa9318.zip
Composer: Show cancellable operations and errors inline.
'Send' and 'Save Draft' are now asynchronous and run outside of Evolution's MailMsg infrastructure. Add an EActivityBar to the composer window so these asynchronous operations can be tracked and cancelled even in the absense of a main window. Also add an EAlertBar to the composer window so error messages can be shown directly in the window. Instead of calling e_alert_dialog_run_for_args(), call e_alert_submit() and pass the EMsgComposer as the widget argument. The EMsgComposer will decide whether to show an EAlertDialog or use the EAlertBar, depending on the GtkMessageType of the alert.
Diffstat (limited to 'e-util/e-alert-dialog.h')
-rw-r--r--e-util/e-alert-dialog.h79
1 files changed, 38 insertions, 41 deletions
diff --git a/e-util/e-alert-dialog.h b/e-util/e-alert-dialog.h
index 54235a757b..96253a582e 100644
--- a/e-util/e-alert-dialog.h
+++ b/e-util/e-alert-dialog.h
@@ -21,63 +21,60 @@
* Copyright (C) 2009 Intel Corporation
*/
-#ifndef _E_ALERT_DIALOG_H
-#define _E_ALERT_DIALOG_H
+#ifndef E_ALERT_DIALOG_H
+#define E_ALERT_DIALOG_H
#include <gtk/gtk.h>
#include <e-util/e-alert.h>
-G_BEGIN_DECLS
-
-#define E_TYPE_ALERT_DIALOG e_alert_dialog_get_type()
-
+/* Standard GObject macros */
+#define E_TYPE_ALERT_DIALOG \
+ (e_alert_dialog_get_type ())
#define E_ALERT_DIALOG(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- E_TYPE_ALERT_DIALOG, EAlertDialog))
-
-#define E_ALERT_DIALOG_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), \
- E_TYPE_ALERT_DIALOG, EAlertDialogClass))
-
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_ALERT_DIALOG, EAlertDialog))
+#define E_ALERT_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_ALERT_DIALOG, EAlertDialogClass))
#define E_IS_ALERT_DIALOG(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- E_TYPE_ALERT_DIALOG))
-
-#define E_IS_ALERT_DIALOG_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), \
- E_TYPE_ALERT_DIALOG))
-
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_ALERT_DIALOG))
+#define E_IS_ALERT_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_ALERT_DIALOG))
#define E_ALERT_DIALOG_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), \
- E_TYPE_ALERT_DIALOG, EAlertDialogClass))
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_ALERT_DIALOG, EAlertDialogClass))
+
+G_BEGIN_DECLS
typedef struct _EAlertDialog EAlertDialog;
typedef struct _EAlertDialogClass EAlertDialogClass;
typedef struct _EAlertDialogPrivate EAlertDialogPrivate;
-struct _EAlertDialog
-{
- GtkDialog parent;
- EAlertDialogPrivate *priv;
+struct _EAlertDialog {
+ GtkDialog parent;
+ EAlertDialogPrivate *priv;
};
-struct _EAlertDialogClass
-{
- GtkDialogClass parent_class;
+struct _EAlertDialogClass {
+ GtkDialogClass parent_class;
};
-GType e_alert_dialog_get_type (void);
-
-GtkWidget* e_alert_dialog_new (GtkWindow* parent, EAlert *alert);
-GtkWidget* e_alert_dialog_new_for_args (GtkWindow* parent, const gchar *tag, ...) G_GNUC_NULL_TERMINATED;
-
-/* Convenience functions for displaying the alert in a GtkDialog */
-gint e_alert_run_dialog (GtkWindow *parent, EAlert *alert);
-gint e_alert_run_dialog_for_args (GtkWindow *parent, const gchar *tag, ...) G_GNUC_NULL_TERMINATED;
-
-guint e_alert_dialog_count_buttons (EAlertDialog *dialog);
-EAlert *e_alert_dialog_get_alert (EAlertDialog *dialog);
+GType e_alert_dialog_get_type (void);
+GtkWidget * e_alert_dialog_new (GtkWindow *parent,
+ EAlert *alert);
+GtkWidget * e_alert_dialog_new_for_args (GtkWindow *parent,
+ const gchar *tag,
+ ...) G_GNUC_NULL_TERMINATED;
+gint e_alert_run_dialog (GtkWindow *parent,
+ EAlert *alert);
+gint e_alert_run_dialog_for_args (GtkWindow *parent,
+ const gchar *tag,
+ ...) G_GNUC_NULL_TERMINATED;
+guint e_alert_dialog_count_buttons (EAlertDialog *dialog);
+EAlert * e_alert_dialog_get_alert (EAlertDialog *dialog);
G_END_DECLS
-#endif /* _E_ALERT_DIALOG_H */
+#endif /* E_ALERT_DIALOG_H */