X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-compute.c;h=2a9b68906593cf69b6549062087d62cab86cd0aa;hb=e5ed663e9f1998c1c2409a668288d4e5d496beda;hp=048c05de384843bd23e003e0a69ea5d291a7f4c1;hpb=0df9cdd3df66caf4353128feff3008289cda8115;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-compute.c b/src/ui/gui/psppire-dialog-action-compute.c index 048c05de38..2a9b689065 100644 --- a/src/ui/gui/psppire-dialog-action-compute.c +++ b/src/ui/gui/psppire-dialog-action-compute.c @@ -35,7 +35,7 @@ G_DEFINE_TYPE (PsppireDialogActionCompute, psppire_dialog_action_compute, PSPPIR static char * -generate_syntax (PsppireDialogAction *act) +generate_syntax (const PsppireDialogAction *act) { PsppireDialogActionCompute *cd = PSPPIRE_DIALOG_ACTION_COMPUTE (act); gchar *text; @@ -454,14 +454,14 @@ insert_function_into_syntax_area (GtkTreeIter iter, } - -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"); @@ -490,7 +490,7 @@ psppire_dialog_action_compute_activate (GtkAction *a) 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, @@ -520,18 +520,14 @@ psppire_dialog_action_compute_activate (GtkAction *a) 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; }