Logistic Regression syntax generator: replace ds_data with ds_cstr
[pspp] / src / ui / gui / psppire-dialog-action-var-info.c
index 31580dd9f97e347f923447cd0f1d4db26e3340d7..998f7bb45c73c6e02f92c216dc35664d2051a43e 100644 (file)
@@ -56,7 +56,7 @@ treeview_item_selected (gpointer data)
 }
 
 static gchar *
-generate_syntax__ (PsppireDialogAction *act, const char *prefix)
+generate_syntax__ (const PsppireDialogAction *act, const char *prefix)
 {
   struct variable **vars;
   size_t n_vars;
@@ -101,7 +101,7 @@ generate_syntax__ (PsppireDialogAction *act, const char *prefix)
 }
 
 static gchar *
-generate_syntax (PsppireDialogAction *act)
+generate_syntax (const PsppireDialogAction *act)
 {
   return generate_syntax__ (act, "");
 }
@@ -164,7 +164,7 @@ jump_to (PsppireDialog *d, gint response, gpointer data)
 }
 
 static void
-psppire_dialog_action_var_info_activate (GtkAction *a)
+psppire_dialog_action_var_info_activate (PsppireDialogAction *a)
 {
   PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
   PsppireDialogActionVarInfo *act = PSPPIRE_DIALOG_ACTION_VAR_INFO (pda);
@@ -175,28 +175,29 @@ psppire_dialog_action_var_info_activate (GtkAction *a)
     {
       xml = builder_new ("variable-info.ui");
       g_hash_table_insert (thing, a, xml);
-    }
-
-  act->output = psppire_output_view_new (
-    GTK_LAYOUT (get_widget_assert (xml, "layout1")), NULL, NULL, NULL);
 
-  pda->dialog = get_widget_assert (xml, "variable-info-dialog");
-  pda->source = get_widget_assert (xml, "treeview2");
+      act->output =
+       psppire_output_view_new (GTK_LAYOUT (get_widget_assert (xml, "layout1")),
+                                NULL, NULL, NULL);
+  
+      pda->dialog = get_widget_assert (xml, "variable-info-dialog");
+      pda->source = get_widget_assert (xml, "treeview2");
 
-  g_object_set (pda->source,
-               "selection-mode", GTK_SELECTION_MULTIPLE,
-               NULL);
+      g_object_set (pda->source,
+                   "selection-mode", GTK_SELECTION_MULTIPLE,
+                   NULL);
 
-  g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (pda->source)),
-                    "changed", G_CALLBACK (populate_output),
-                   act);
+      g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (pda->source)),
+                       "changed", G_CALLBACK (populate_output),
+                       act);
 
-  g_signal_connect (pda->dialog, "response", G_CALLBACK (jump_to),
-                   pda);
-
-  psppire_dialog_action_set_valid_predicate (pda,
-                                            treeview_item_selected);
+      g_signal_connect (pda->dialog, "response", G_CALLBACK (jump_to),
+                       pda);
 
+      psppire_dialog_action_set_valid_predicate (pda,
+                                                treeview_item_selected);
+    }
+  
   if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_var_info_parent_class)->activate)
     PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_var_info_parent_class)->activate (pda);
 }