summaryrefslogtreecommitdiff
path: root/saedit/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'saedit/errors.c')
-rw-r--r--saedit/errors.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/saedit/errors.c b/saedit/errors.c
new file mode 100644
index 0000000..ff3a710
--- /dev/null
+++ b/saedit/errors.c
@@ -0,0 +1,23 @@
+#include "errors.h"
+#include "main.h"
+
+void
+post_error (
+ const gchar *error_context,
+ const gchar *error_message
+) {
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new_with_markup (
+ GTK_WINDOW (main_window),
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ "<b>%s error:</b> %s",
+ error_context,
+ error_message
+ );
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+}