X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-editor.c;h=0efd8ce835186de958d58e28f704b1ff9c38e83d;hb=4ad4fcab6c886b1a6f29769a374b67b2f60173a9;hp=f1712ad4b7f683b74110ebbdc641dd8af13840a8;hpb=b5a56f8d1592fd0d9bf981d71e28851c4e733fef;p=pspp diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index f1712ad4b7..0efd8ce835 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -218,7 +218,6 @@ psppire_data_editor_switch_page (GtkNotebook *notebook, guint page_num) { GTK_NOTEBOOK_CLASS (parent_class)->switch_page (notebook, w, page_num); - } static void @@ -226,7 +225,6 @@ psppire_data_editor_set_focus_child (GtkContainer *container, GtkWidget *widget) { GTK_CONTAINER_CLASS (parent_class)->set_focus_child (container, widget); - } static void @@ -347,8 +345,23 @@ refresh_entry (PsppireDataEditor *de) } static void -on_datum_entry_activate (PsppireValueEntry *entry, PsppireDataEditor *de) +on_datum_entry_activate (GtkEntry *entry, PsppireDataEditor *de) { + gint row, col; + if (ssw_sheet_get_active_cell (SSW_SHEET (de->data_sheet), &col, &row)) + { + union value val; + const struct variable *var = psppire_dict_get_variable (de->dict, col); + if (var == NULL) + return; + + value_init (&val, var_get_width (var)); + + if (psppire_value_entry_get_value (de->datum_entry, &val, var_get_width (var))) + { + psppire_data_store_set_value (de->data_store, row, var, &val); + } + } } @@ -509,7 +522,6 @@ psppire_data_editor_init (PsppireDataEditor *de) g_free (fontname); set_font_recursively (GTK_WIDGET (de), de->font); } - } GtkWidget*