src/ui/gui/chi-square-dialog.h \
src/ui/gui/count-dialog.c \
src/ui/gui/count-dialog.h \
- src/ui/gui/crosstabs-dialog.c \
- src/ui/gui/crosstabs-dialog.h \
- src/ui/gui/customentry.c \
- src/ui/gui/customentry.h \
src/ui/gui/dialog-common.c \
src/ui/gui/dialog-common.h \
src/ui/gui/dict-display.h \
#include "ui/gui/comments-dialog.h"
#include "ui/gui/compute-dialog.h"
#include "ui/gui/count-dialog.h"
- #include "ui/gui/crosstabs-dialog.h"
#include "ui/gui/entry-dialog.h"
#include "ui/gui/executor.h"
- #include "ui/gui/frequencies-dialog.h"
-#include "ui/gui/find-dialog.h"
-#include "ui/gui/goto-case-dialog.h"
#include "ui/gui/help-menu.h"
#include "ui/gui/helper.h"
#include "ui/gui/helper.h"
return action;
}
- PsppireDict *dict = dw->var_store->dictionary;
- gboolean enable = psppire_dict_get_var_cnt (dict) > 0;
+ /* Only a data file with at least one variable can be saved. */
+ static void
+ enable_save (PsppireDataWindow *dw)
+ {
++ gboolean enable = psppire_dict_get_var_cnt (dw->dict) > 0;
+
+ gtk_action_set_sensitive (get_action_assert (dw->builder, "file_save"),
+ enable);
+ gtk_action_set_sensitive (get_action_assert (dw->builder, "file_save_as"),
+ enable);
+ }
+
/* Initializes as much of a PsppireDataWindow as we can and must before the
dataset has been set.
G_CALLBACK (on_split_change),
de);
- g_signal_connect_swapped (dict, "backend-changed",
++ g_signal_connect_swapped (de->dict, "backend-changed",
+ G_CALLBACK (enable_save), de);
- g_signal_connect_swapped (dict, "variable-inserted",
++ g_signal_connect_swapped (de->dict, "variable-inserted",
+ G_CALLBACK (enable_save), de);
- g_signal_connect_swapped (dict, "variable-deleted",
++ g_signal_connect_swapped (de->dict, "variable-deleted",
+ G_CALLBACK (enable_save), de);
+ enable_save (de);
- connect_action (de, "edit_copy", G_CALLBACK (on_edit_copy));
-
- connect_action (de, "edit_cut", G_CALLBACK (on_edit_cut));
-
connect_action (de, "file_new_data", G_CALLBACK (create_data_window));
connect_action (de, "file_import-text", G_CALLBACK (text_data_import_assistant));