crosstabs-dialog: Line up backslashes.
[pspp] / src / ui / gui / crosstabs-dialog.c
index 34a3921301ba0b93d61412ccf920f37d24a40c31..dc046679c73278085ebee4d6b04e8caa1d701b34 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2010, 2011  Free Software Foundation
+   Copyright (C) 2008, 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
 #include "executor.h"
 #include <ui/gui/psppire-dialog.h>
 #include <ui/gui/psppire-var-store.h>
-#include <ui/gui/helper.h>
+#include <ui/gui/builder-wrapper.h>
+#include "helper.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
 
 
-#define CROSSTABS_STATS                       \
-  CS (CHISQ, N_("Chisq"))                         \
-  CS (PHI, N_("Phi"))         \
-  CS (CC, N_("CC"))                   \
-  CS (LAMBDA, N_("Lambda"))                   \
-  CS (UC, N_("UC")) \
-  CS (BTAU, N_("BTau"))                 \
-  CS (CTAU, N_("CTau"))                 \
-  CS (RISK, N_("Risk"))  \
+#define CROSSTABS_STATS                         \
+  CS (CHISQ, N_("Chisq"))                       \
+  CS (PHI, N_("Phi"))                           \
+  CS (CC, N_("CC"))                             \
+  CS (LAMBDA, N_("Lambda"))                     \
+  CS (UC, N_("UC"))                             \
+  CS (BTAU, N_("BTau"))                         \
+  CS (CTAU, N_("CTau"))                         \
+  CS (RISK, N_("Risk"))                         \
   CS (GAMMA, N_("Gamma"))                       \
-  CS (D, N_("D"))                         \
-  CS (KAPPA, N_("Kappa"))                 \
-  CS (ETA, N_("Eta"))  \
-  CS (CORR, N_("Corr")) \
+  CS (D, N_("D"))                               \
+  CS (KAPPA, N_("Kappa"))                       \
+  CS (ETA, N_("Eta"))                           \
+  CS (CORR, N_("Corr"))                         \
   CS (STATS_NONE, N_("None"))
 
-#define CROSSTABS_CELLS \
-  CS (COUNT, N_("Count"))   \
-  CS (ROW, N_("Row"))   \
-  CS (COLUMN, N_("Column"))   \
-  CS (TOTAL, N_("Total"))   \
-  CS (EXPECTED, N_("Expected"))   \
-  CS (RESIDUAL, N_("Residual"))   \
-  CS (SRESIDUAL, N_("Std. Residual"))   \
-  CS (ASRESIDUAL, N_("Adjusted Std. Residual"))   \
+#define CROSSTABS_CELLS                         \
+  CS (COUNT, N_("Count"))                       \
+  CS (ROW, N_("Row"))                           \
+  CS (COLUMN, N_("Column"))                     \
+  CS (TOTAL, N_("Total"))                       \
+  CS (EXPECTED, N_("Expected"))                 \
+  CS (RESIDUAL, N_("Residual"))                 \
+  CS (SRESIDUAL, N_("Std. Residual"))           \
+  CS (ASRESIDUAL, N_("Adjusted Std. Residual")) \
   CS (CELLS_NONE, N_("None"))
 
 enum
@@ -108,12 +109,6 @@ static const struct checkbox_entry_item cells[] =
 #undef CS
   };
 
-enum
-  {
-    LABEL,
-    NO_LABEL,
-    NO_VAL_LABEL,
-  };
 struct format_options
 {
   gboolean avalue;
@@ -140,9 +135,6 @@ struct crosstabs_dialog
 
   GtkWidget *stat_view;
   GtkWidget *cell_view;
-  GtkToggleButton *label;
-  GtkToggleButton *no_label;
-  GtkToggleButton *no_val_label;
   struct format_options current_opts;
 };
 
@@ -159,9 +151,6 @@ static void
 on_format_clicked (struct crosstabs_dialog *cd)
 {
   int ret;
-  gboolean lab;
-  gboolean no_lab;
-  gboolean no_val_lab;
 
   if (cd->current_opts.avalue)
     {
@@ -175,14 +164,6 @@ on_format_clicked (struct crosstabs_dialog *cd)
     {
       gtk_toggle_button_set_active (cd->pivot_button, TRUE);
     }
-  lab = gtk_toggle_button_get_active (cd->label);
-  no_lab = gtk_toggle_button_get_active (cd->no_label);
-  no_val_lab = gtk_toggle_button_get_active (cd->no_val_label);
-  if (!lab)
-    if (!no_lab)
-      if (!no_val_lab)
-       gtk_toggle_button_set_active (cd->label, TRUE);
-
 
   ret = psppire_dialog_run (PSPPIRE_DIALOG (cd->format_dialog));
 
@@ -195,12 +176,6 @@ on_format_clicked (struct crosstabs_dialog *cd)
       cd->current_opts.pivot = (gtk_toggle_button_get_active (cd->pivot_button) == TRUE)
        ? TRUE : FALSE;
     }
-  else
-    {
-      gtk_toggle_button_set_active (cd->label, lab);
-      gtk_toggle_button_set_active (cd->no_label, no_lab);
-      gtk_toggle_button_set_active (cd->no_val_label, no_val_lab);
-    }
 }
 
 static void
@@ -274,19 +249,6 @@ generate_syntax (const struct crosstabs_dialog *cd)
       g_string_append (string, "DVALUE");
     }
   g_string_append (string, " ");
-  if (gtk_toggle_button_get_active (cd->label))
-    {
-      g_string_append (string, "LABELS");
-    }
-  else if (gtk_toggle_button_get_active (cd->no_label))
-    {
-      g_string_append (string, "NOLABELS");
-    }
-  else if (gtk_toggle_button_get_active (cd->no_val_label))
-    {
-      g_string_append (string, "NOVALLABS");
-    }
-  g_string_append (string, " ");
   if (cd->current_opts.table)
     g_string_append (string, "TABLES");
   else
@@ -428,9 +390,6 @@ crosstabs_dialog (PsppireDataWindow *de)
   cd.format_dialog = get_widget_assert (xml, "format-dialog");
   cd.table_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "print-tables"));
   cd.pivot_button = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pivot"));
-  cd.label = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton1"));
-  cd.no_label = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton2"));
-  cd.no_val_label = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton3"));
   cd.stat_dialog = get_widget_assert (xml, "stat-dialog");
   cd.cell_dialog = get_widget_assert (xml, "cell-dialog");