Whitespace changes only.
[pspp] / src / ui / gui / psppire-dialog-action-scatterplot.c
index 503af138f5392230f40c5a2df30356c902d03f31..9b4dd08570056c3ce6e7af960ba73fdd4bb65cf0 100644 (file)
@@ -47,7 +47,7 @@ generate_syntax (const PsppireDialogAction *act)
   ds_init_cstr (&dss, "GRAPH SCATTERPLOT(BIVARIATE) = ");
 
   ds_put_cstr (&dss, gtk_entry_get_text (GTK_ENTRY (ow->x_axis)));
-  
+
   ds_put_cstr (&dss, " WITH ");
 
   ds_put_cstr (&dss, gtk_entry_get_text (GTK_ENTRY (ow->y_axis)));
@@ -69,13 +69,13 @@ dialog_state_valid (gpointer data)
   const char *xvar = gtk_entry_get_text (GTK_ENTRY  (ow->x_axis));
   const char *yvar = gtk_entry_get_text (GTK_ENTRY  (ow->y_axis));
 
-  if ( 0 == strcmp ("", xvar))
+  if (0 == strcmp ("", xvar))
     return FALSE;
 
-  if ( 0 == strcmp ("", yvar))
+  if (0 == strcmp ("", yvar))
     return FALSE;
 
-  
+
   return TRUE;
 }
 
@@ -90,20 +90,13 @@ refresh (PsppireDialogAction *rd_)
 
 
 
-static void
-psppire_dialog_action_scatterplot_activate (PsppireDialogAction *a)
+static GtkBuilder *
+psppire_dialog_action_scatterplot_activate (PsppireDialogAction *a, GVariant *param)
 {
   PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
   PsppireDialogActionScatterplot *act = PSPPIRE_DIALOG_ACTION_SCATTERPLOT (a);
 
-  GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
-  GtkBuilder *xml = g_hash_table_lookup (thing, a);
-  if (!xml)
-    {
-      xml = builder_new ("scatterplot.ui");
-      g_hash_table_insert (thing, a, xml);
-    }
-
+  GtkBuilder *xml = builder_new ("scatterplot.ui");
   pda->dialog = get_widget_assert   (xml, "scatterplot-dialog");
   pda->source = get_widget_assert   (xml, "scatterplot-treeview1");
 
@@ -112,15 +105,13 @@ psppire_dialog_action_scatterplot_activate (PsppireDialogAction *a)
 
   psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid);
   psppire_dialog_action_set_refresh (pda, refresh);
-
-  if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_scatterplot_parent_class)->activate)
-    PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_scatterplot_parent_class)->activate (pda);
+  return xml;
 }
 
 static void
 psppire_dialog_action_scatterplot_class_init (PsppireDialogActionScatterplotClass *class)
 {
-  psppire_dialog_action_set_activation (class, psppire_dialog_action_scatterplot_activate);
+  PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_scatterplot_activate;
 
   PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
 }