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=4eb2e820b01d92ef662c741f5ac30f08bedd1de6;hp=164737ce21b6fa1853d8cd3a78d2c7aeb158bc41;hpb=fc6620099bbc53762095569d5356b67a81a85402;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-compute.c b/src/ui/gui/psppire-dialog-action-compute.c index 164737ce21..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,20 +454,13 @@ 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); - GHashTable *thing = psppire_dialog_action_get_pointer (pda); - GtkBuilder *xml = g_hash_table_lookup (thing, a); - if (!xml) - { - xml = builder_new ("compute.ui"); - g_hash_table_insert (thing, a, xml); - } + GtkBuilder *xml = builder_new ( "compute.ui"); pda->dialog = get_widget_assert (xml, "compute-variable-dialog"); pda->source = get_widget_assert (xml, "compute-treeview1"); @@ -497,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, @@ -527,14 +520,13 @@ psppire_dialog_action_compute_activate (GtkAction *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_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) { - psppire_dialog_action_set_activation (class, psppire_dialog_action_compute_activate); + PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_compute_activate; PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax; }