2017-04-11 23:22:23 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "calvados.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* show_error()
|
|
|
|
*
|
|
|
|
* Show an error message dialog box
|
|
|
|
*
|
|
|
|
*/
|
2017-04-18 19:15:24 +00:00
|
|
|
void show_error(GtkWidget *widget, gpointer data, char *errmsg)
|
2017-04-11 23:22:23 +00:00
|
|
|
{
|
|
|
|
GtkWidget *dialog;
|
|
|
|
|
|
|
|
/*g_print("Error dialog goes here\n");*/
|
|
|
|
|
|
|
|
dialog = gtk_message_dialog_new(NULL,
|
|
|
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
|
GTK_MESSAGE_ERROR,
|
|
|
|
GTK_BUTTONS_OK,
|
2017-04-18 19:15:24 +00:00
|
|
|
errmsg);
|
2017-04-11 23:22:23 +00:00
|
|
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(dialog), "Error");
|
|
|
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
|
|
|
gtk_widget_destroy(dialog);
|
|
|
|
}
|
|
|
|
|