summaryrefslogtreecommitdiff
path: root/saedit/errors.c
blob: ff3a710bc4597809087d7e31c42ed1800bf09989 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
}