aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-alert.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-16 02:51:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-19 00:32:36 +0800
commit51ebf20237270a785af0aa0e614db42275a05c62 (patch)
tree328b2fe9b7aa111f0cb21f23b11bc2eaf6da3ac8 /e-util/e-alert.h
parent2197e6401ec8c5e1b77fa51e085ac068daa39e6a (diff)
downloadgsoc2013-evolution-51ebf20237270a785af0aa0e614db42275a05c62.tar.gz
gsoc2013-evolution-51ebf20237270a785af0aa0e614db42275a05c62.tar.zst
gsoc2013-evolution-51ebf20237270a785af0aa0e614db42275a05c62.zip
EAlert: Allow arbitrary actions to be added.
You can now amend the predefined actions in an EAlert by calling e_alert_add_action(). Useful for adding actions from an existing GtkUIManager. Call e_alert_peek_actions() to obtain a combined list of predefined and custom actions. These will typically serve as "related" actions for GtkButtons (cf. gtk_activatable_set_related_action()). Also, both EShellWindow and EShellView now implement EAlertSink. Use EShellWindow for application-wide alerts, EShellView for view-specific alerts.
Diffstat (limited to 'e-util/e-alert.h')
-rw-r--r--e-util/e-alert.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/e-util/e-alert.h b/e-util/e-alert.h
index e0ad92c7d2..f9f0fc8559 100644
--- a/e-util/e-alert.h
+++ b/e-util/e-alert.h
@@ -61,15 +61,6 @@ typedef struct _EAlert EAlert;
typedef struct _EAlertClass EAlertClass;
typedef struct _EAlertPrivate EAlertPrivate;
-typedef struct _EAlertButton EAlertButton;
-
-struct _EAlertButton {
- EAlertButton *next;
- const gchar *stock;
- const gchar *label;
- gint response;
-};
-
struct _EAlert {
GObject parent;
EAlertPrivate *priv;
@@ -103,7 +94,10 @@ const gchar * e_alert_get_secondary_text (EAlert *alert);
void e_alert_set_secondary_text (EAlert *alert,
const gchar *secondary_text);
const gchar * e_alert_get_stock_id (EAlert *alert);
-EAlertButton * e_alert_peek_buttons (EAlert *alert);
+void e_alert_add_action (EAlert *alert,
+ GtkAction *action,
+ gint response_id);
+GList * e_alert_peek_actions (EAlert *alert);
GtkWidget * e_alert_create_image (EAlert *alert,
GtkIconSize size);
void e_alert_response (EAlert *alert,