aboutsummaryrefslogtreecommitdiff
path: root/src/gui_ambi.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-26 17:00:39 +0100
committerThomas White <taw@physics.org>2021-02-26 17:00:39 +0100
commit1584bced3ecc9fe699bd972a66741968a838398a (patch)
tree9ebdf74a44408102d616ce6e1e58684cb417f218 /src/gui_ambi.c
parentab1591885a44b675a1301d88b041e261a36f7c36 (diff)
GUI: Automatically generate new job names
Diffstat (limited to 'src/gui_ambi.c')
-rw-r--r--src/gui_ambi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui_ambi.c b/src/gui_ambi.c
index 8d07f436..00f2ffe0 100644
--- a/src/gui_ambi.c
+++ b/src/gui_ambi.c
@@ -389,6 +389,7 @@ gint ambi_sig(GtkWidget *widget, struct crystfelproject *proj)
GtkWidget *notebook;
GtkWidget *backend_page;
struct ambi_window *win;
+ char *new_title;
int i;
if ( proj->ambi_opts != NULL ) return FALSE;
@@ -426,6 +427,11 @@ gint ambi_sig(GtkWidget *widget, struct crystfelproject *proj)
gtk_entry_set_width_chars(GTK_ENTRY(win->jobname), 16);
gtk_entry_set_placeholder_text(GTK_ENTRY(win->jobname),
"ambi-trial-1");
+ new_title = make_new_job_title(proj->ambi_new_job_title);
+ if ( new_title != NULL ) {
+ gtk_entry_set_text(GTK_ENTRY(win->jobname), new_title);
+ free(new_title);
+ }
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(win->jobname),
TRUE, TRUE, 4.0);