diff options
author | Thomas White <taw@physics.org> | 2020-05-14 17:15:39 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:42:57 +0200 |
commit | af6d7f70863f96faf92ca53dabf4e6a3aa3216c8 (patch) | |
tree | b4502f38aaf43eaaf9774ec54d185099d1de66aa /src/crystfel_gui.c | |
parent | e55a533d816b4a888637562d108fc9f248ed77c8 (diff) |
Show event ID in GUI
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r-- | src/crystfel_gui.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index ded5a6ee..87f57e7c 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -112,10 +112,20 @@ static void add_ui_sig(GtkUIManager *ui, GtkWidget *widget, static void update_imageview(struct crystfelproject *proj) { char tmp[1024]; + char *ev_str; + char *ev_sep; + if ( proj->n_frames == 0 ) return; - snprintf(tmp, 1023, "%s (frame %i of %i)", - proj->filenames[proj->cur_frame], + if ( proj->events[proj->cur_frame] != NULL ) { + ev_str = proj->events[proj->cur_frame]; + ev_sep = " "; + } else { + ev_str = ""; + ev_sep = ""; + } + snprintf(tmp, 1023, "%s%s%s (frame %i of %i)", + proj->filenames[proj->cur_frame], ev_sep, ev_str, proj->cur_frame+1, proj->n_frames); gtk_label_set_text(GTK_LABEL(proj->image_info), tmp); crystfel_image_view_set_image(CRYSTFEL_IMAGE_VIEW(proj->imageview), |