aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-18 14:20:02 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commit6f73806c31df5f8b9a48a575a4dafd01e896adce (patch)
treee1dc581b42175d95de0db699b50c6e0ad8a4a14a
parent3674c67e06e47ebabe42f9277b7e9212e6a2f87a (diff)
Display messages in the GUI!
-rw-r--r--src/crystfel_gui.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 87a34936..3603064b 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -540,7 +540,12 @@ static void add_task_buttons(GtkWidget *vbox, struct crystfelproject *proj)
static void add_gui_message(enum log_msg_type type, const char *msg,
void *vp)
{
- printf("message '%s'\n", msg);
+ GtkTextBuffer *buf;
+ GtkTextIter iter;
+ struct crystfelproject *proj = vp;
+ buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(proj->report));
+ gtk_text_buffer_get_end_iter(buf, &iter);
+ gtk_text_buffer_insert(buf, &iter, msg, -1);
}