diff options
author | Thomas White <taw@physics.org> | 2021-02-26 17:00:39 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-02-26 17:00:39 +0100 |
commit | 1584bced3ecc9fe699bd972a66741968a838398a (patch) | |
tree | 9ebdf74a44408102d616ce6e1e58684cb417f218 /src/gui_merge.c | |
parent | ab1591885a44b675a1301d88b041e261a36f7c36 (diff) |
GUI: Automatically generate new job names
Diffstat (limited to 'src/gui_merge.c')
-rw-r--r-- | src/gui_merge.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui_merge.c b/src/gui_merge.c index 17f4e0b4..0a207bad 100644 --- a/src/gui_merge.c +++ b/src/gui_merge.c @@ -266,6 +266,7 @@ gint merge_sig(GtkWidget *widget, struct crystfelproject *proj) GtkWidget *hbox; GtkWidget *backend_page; int i; + char *new_title; struct new_merging_job_params *njp; if ( proj->merging_opts != NULL ) return FALSE; @@ -300,12 +301,13 @@ gint merge_sig(GtkWidget *widget, struct crystfelproject *proj) njp->job_title_entry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(njp->job_title_entry), TRUE, TRUE, 2.0); - if ( proj->merging_new_job_title != NULL ) { - gtk_entry_set_text(GTK_ENTRY(njp->job_title_entry), - proj->merging_new_job_title); - } gtk_entry_set_placeholder_text(GTK_ENTRY(njp->job_title_entry), "merge-trial-1"); + new_title = make_new_job_title(proj->merging_new_job_title); + if ( new_title != NULL ) { + gtk_entry_set_text(GTK_ENTRY(njp->job_title_entry), new_title); + free(new_title); + } label = gtk_label_new("Input:"); gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), |