diff options
author | Thomas White <taw@physics.org> | 2021-02-25 16:39:11 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-02-25 16:39:11 +0100 |
commit | 32fa3814ff7f70acddf0d9de2e1184bd10affaec (patch) | |
tree | dd7256393bd12186cfef63a39b5a396adf631ae9 /src/crystfel_gui.c | |
parent | e9279204f365ce6b3bf61716b1af2fdb29efcc0d (diff) |
GUI: Complain more loudly if geometry can't be loaded
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r-- | src/crystfel_gui.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index e29548bd..d50d9942 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -96,6 +96,21 @@ static int confirm_exit(struct crystfelproject *proj) } +void error_box(struct crystfelproject *proj, const char *message) +{ + GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(proj->window), + 0, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_NONE, + message); + gtk_dialog_add_buttons(GTK_DIALOG(dialog), + "OK", GTK_RESPONSE_OK, + NULL); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(dialog); +} + + /* Main window destroyed */ static gboolean delete_event_sig(GtkWidget *da, GdkEvent *event, struct crystfelproject *proj) |