static char *
-generate_syntax (PsppireDialogAction *act)
+generate_syntax (const PsppireDialogAction *act)
{
PsppireDialogActionCompute *cd = PSPPIRE_DIALOG_ACTION_COMPUTE (act);
gchar *text;
}
-
-static void
-psppire_dialog_action_compute_activate (GtkAction *a)
+static GtkBuilder *
+psppire_dialog_action_compute_activate (PsppireDialogAction *a, GVariant *param)
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionCompute *act = PSPPIRE_DIALOG_ACTION_COMPUTE (a);
- GtkBuilder *xml = builder_new ("compute.ui");
+ GtkBuilder *xml = builder_new ( "compute.ui");
+
pda->dialog = get_widget_assert (xml, "compute-variable-dialog");
pda->source = get_widget_assert (xml, "compute-treeview1");
G_CALLBACK (on_expression_toggle), pda);
g_signal_connect (act->str_btn, "toggled",
- G_CALLBACK (on_type_toggled), pda);
+ G_CALLBACK (on_type_toggled), pda);
g_object_set (pda->source,
psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid);
psppire_dialog_action_set_refresh (pda, refresh);
- g_object_unref (xml);
-
- if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_compute_parent_class)->activate)
- PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_compute_parent_class)->activate (pda);
+ return xml;
}
static void
psppire_dialog_action_compute_class_init (PsppireDialogActionComputeClass *class)
{
- GtkActionClass *action_class = GTK_ACTION_CLASS (class);
+ PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_compute_activate;
- action_class->activate = psppire_dialog_action_compute_activate;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}