X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fexecutor.c;h=ee83c2c7d8daed3154d7d4680f5a2cb0f44c58df;hb=5926aad8bf007a6f61ff64b8c9de6b59cde233bc;hp=8fb4c2603e37662c0753041b1221a131a0ee52cf;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/src/ui/gui/executor.c b/src/ui/gui/executor.c index 8fb4c2603e..ee83c2c7d8 100644 --- a/src/ui/gui/executor.c +++ b/src/ui/gui/executor.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation + Copyright (C) 2007, 2009, 2010, 2011, 2012 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,6 +36,20 @@ create_casereader_from_data_store (void *data_store_) return psppire_data_store_get_reader (data_store); } +/* Ensures that dataset DS has a name, because some parts of the GUI insist + upon this. */ +static void +name_dataset_cb (struct dataset *ds, void *aux UNUSED) +{ + if (dataset_name (ds)[0] == '\0') + { + struct session *session = dataset_session (ds); + char *dataset_name = session_generate_dataset_name (session); + dataset_set_name (ds, dataset_name); + free (dataset_name); + } +} + static void new_pdw_cb (struct dataset *ds, void *aux UNUSED) { @@ -131,6 +145,8 @@ execute_syntax (PsppireDataWindow *window, struct lex_reader *lex_reader) break; } + session_for_each_dataset (the_session, name_dataset_cb, NULL); + ll_for_each_safe (pdw, next_pdw, PsppireDataWindow, ll, &all_data_windows) { struct dataset *ds;