diff options
-rw-r--r-- | e-util/e-alert-dialog.c | 14 | ||||
-rw-r--r-- | po/POTFILES.in | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c index 70e53432f3..2f27a4fbcd 100644 --- a/e-util/e-alert-dialog.c +++ b/e-util/e-alert-dialog.c @@ -25,6 +25,8 @@ #include <config.h> #endif +#include <glib/gi18n.h> + #include "e-alert-dialog.h" #include "e-util.h" @@ -150,6 +152,18 @@ alert_dialog_constructed (GObject *object) /* Add buttons from actions. */ actions = e_alert_peek_actions (alert); + if (!actions) { + GtkAction *action; + + /* Make sure there is at least one action, thus the dialog can be closed. */ + action = gtk_action_new ( + "alert-response-0", _("_Dismiss"), NULL, NULL); + e_alert_add_action (alert, action, GTK_RESPONSE_CLOSE); + g_object_unref (action); + + actions = e_alert_peek_actions (alert); + } + while (actions != NULL) { GtkWidget *button; gpointer data; diff --git a/po/POTFILES.in b/po/POTFILES.in index b257780c9b..36bf948e96 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -157,6 +157,7 @@ em-format/em-format.c em-format/em-format-quote.c e-util/e-activity.c e-util/e-alert.c +e-util/e-alert-dialog.c e-util/e-categories-config.c e-util/e-charset.c e-util/e-datetime-format.c |