Apparently the most common use of aggregate is to count cases.
Therefore we set the default summary function and variable
name controls, so that the user has fewer keystrokes/mouse
clicks in order to achieve this.
struct casewriter *writer;
};
-/* Aggregation functions. */
-enum
- {
- SUM, MEAN, MEDIAN, SD, MAX, MIN, PGT, PLT, PIN, POUT, FGT, FLT, FIN,
- FOUT, N, NU, NMISS, NUMISS, FIRST, LAST,
-
- FUNC = 0x1f, /* Function mask. */
- FSTRING = 1<<5, /* String function bit. */
- };
-
/* Attributes of aggregation functions. */
const struct agr_func agr_func_tab[] =
AGR_SV_OPT
};
+/* Aggregation functions. */
+enum
+ {
+ SUM, MEAN, MEDIAN, SD, MAX, MIN, PGT, PLT, PIN, POUT, FGT, FLT, FIN,
+ FOUT, N, NU, NMISS, NUMISS, FIRST, LAST,
+
+ FUNC = 0x1f, /* Function mask. */
+ FSTRING = 1<<5, /* String function bit. */
+ };
+
/* Attributes of an aggregation function. */
struct agr_func
{
gtk_entry_set_text (GTK_ENTRY (agg->summary_arg1_entry), "");
gtk_entry_set_text (GTK_ENTRY (agg->summary_arg2_entry), "");
gtk_entry_set_text (GTK_ENTRY (agg->summary_var_label_entry), "");
- gtk_entry_set_text (GTK_ENTRY (agg->summary_var_name_entry), "");
+ gtk_entry_set_text (GTK_ENTRY (agg->summary_var_name_entry), "N_BREAK");
+ gtk_editable_select_region (GTK_EDITABLE (agg->summary_var_name_entry), 0, -1);
- gtk_combo_box_set_active (GTK_COMBO_BOX (agg->function_combo), -1);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (agg->function_combo), N);
gtk_list_store_clear (PSPPIRE_ACR (agg->summary_acr)->list_store);