aboutsummaryrefslogtreecommitdiff
path: root/src/crystfel_gui.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-18 14:19:19 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commit3674c67e06e47ebabe42f9277b7e9212e6a2f87a (patch)
tree35dad64133b7994387001d49a618ac016f79148d /src/crystfel_gui.c
parentfd2c06ea86984102361f0ae3444c0ae8c178069a (diff)
Add void pointer to log message functions
Also add LogMsgFunc typedef and move functions up in utils.c, because progress_bar() also needs the stderr_lock.
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r--src/crystfel_gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index a92f2c2c..87a34936 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -537,7 +537,8 @@ static void add_task_buttons(GtkWidget *vbox, struct crystfelproject *proj)
}
-static void add_gui_message(enum log_msg_type type, const char *msg)
+static void add_gui_message(enum log_msg_type type, const char *msg,
+ void *vp)
{
printf("message '%s'\n", msg);
}
@@ -702,7 +703,7 @@ int main(int argc, char *argv[])
gtk_paned_pack2(GTK_PANED(vpaned), GTK_WIDGET(frame), FALSE, FALSE);
/* Send messages to report region */
- set_log_message_func(add_gui_message);
+ set_log_message_func(add_gui_message, &proj);
gtk_window_set_default_size(GTK_WINDOW(proj.window), 1024, 768);
gtk_paned_set_position(GTK_PANED(hpaned), 172);