aboutsummaryrefslogtreecommitdiff
path: root/src/crystfel_gui.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-18 12:01:18 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commitf5fca86eb191f41dfc45cf5c7f17e9ffd73d0287 (patch)
treebe7773b16ed0d2708931a3c388bff34b3c9d996c /src/crystfel_gui.c
parent3022757e31b93542f332bcc1c323f63a853b7912 (diff)
libcrystfel plumbing to allow ERROR/STATUS messages in GUI
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r--src/crystfel_gui.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index ab9ce0e2..a92f2c2c 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -537,6 +537,12 @@ static void add_task_buttons(GtkWidget *vbox, struct crystfelproject *proj)
}
+static void add_gui_message(enum log_msg_type type, const char *msg)
+{
+ printf("message '%s'\n", msg);
+}
+
+
int main(int argc, char *argv[])
{
int c;
@@ -695,6 +701,9 @@ int main(int argc, char *argv[])
gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(proj.report));
gtk_paned_pack2(GTK_PANED(vpaned), GTK_WIDGET(frame), FALSE, FALSE);
+ /* Send messages to report region */
+ set_log_message_func(add_gui_message);
+
gtk_window_set_default_size(GTK_WINDOW(proj.window), 1024, 768);
gtk_paned_set_position(GTK_PANED(hpaned), 172);
gtk_paned_set_position(GTK_PANED(vpaned), 600);