Remove labelling options from Crosstabs GUI
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 24 Oct 2011 18:06:04 +0000 (20:06 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 24 Oct 2011 18:06:04 +0000 (20:06 +0200)
The previous change removed the label options from the crosstabs commmand,
but didn't update the gui accordingly.  This change fixes that.

src/ui/gui/crosstabs-dialog.c
src/ui/gui/crosstabs.ui

index 34a3921301ba0b93d61412ccf920f37d24a40c31..eab7ab2deb01121323f9de86c15a0792bb926d67 100644 (file)
@@ -108,12 +108,6 @@ static const struct checkbox_entry_item cells[] =
 #undef CS
   };
 
-enum
-  {
-    LABEL,
-    NO_LABEL,
-    NO_VAL_LABEL,
-  };
 struct format_options
 {
   gboolean avalue;
@@ -140,9 +134,6 @@ struct crosstabs_dialog
 
   GtkWidget *stat_view;
   GtkWidget *cell_view;
-  GtkToggleButton *label;
-  GtkToggleButton *no_label;
-  GtkToggleButton *no_val_label;
   struct format_options current_opts;
 };
 
@@ -175,14 +166,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 +178,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 +251,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 +392,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");
 
index 19d76894b7a4ec56c26cdc830dc226acbfb3e19d..3e6ceb56340e31315b50224533a08172dedeb5ed 100644 (file)
                 <property name="position">0</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkFrame" id="Labeling">
-                <property name="visible">True</property>
-                <property name="label_xalign">0</property>
-                <child>
-                  <object class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <object class="GtkVBox" id="vbox2">
-                        <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <object class="GtkRadioButton" id="radiobutton1">
-                            <property name="label" translatable="yes">Label</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkRadioButton" id="radiobutton2">
-                            <property name="label" translatable="yes">No label</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </object>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkRadioButton" id="radiobutton3">
-                            <property name="label" translatable="yes">Suppress value labels</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
-                          </object>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label4">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Labeling</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="padding">5</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="padding">5</property>