X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-count.c;h=0f5fc87fbef64eeb63d7b34ea91759fd939ff418;hb=86454c8ab63804d02cb4f08e8b5e45299b8eb810;hp=337e38a01c5e7a75ac7b745963e05d125a247764;hpb=7293c1a383d325c371bd708401e5a1d7586a4d90;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-count.c b/src/ui/gui/psppire-dialog-action-count.c index 337e38a01c..0f5fc87fbe 100644 --- a/src/ui/gui/psppire-dialog-action-count.c +++ b/src/ui/gui/psppire-dialog-action-count.c @@ -51,7 +51,7 @@ generate_syntax (const PsppireDialogAction *act) gboolean ok; GtkTreeIter iter; struct string dds; - + ds_init_empty (&dds); ds_put_cstr (&dds, "\nCOUNT "); @@ -144,19 +144,13 @@ refresh (PsppireDialogAction *rd_) gtk_list_store_clear (GTK_LIST_STORE (cnt->value_list)); } -static void -psppire_dialog_action_count_activate (PsppireDialogAction *a) +static GtkBuilder * +psppire_dialog_action_count_activate (PsppireDialogAction *a, GVariant *param) { PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionCount *act = PSPPIRE_DIALOG_ACTION_COUNT (a); - GHashTable *thing = psppire_dialog_action_get_hash_table (pda); - GtkBuilder *xml = g_hash_table_lookup (thing, a); - if (!xml) - { - xml = builder_new ("count.ui"); - g_hash_table_insert (thing, a, xml); - } + GtkBuilder *xml = builder_new ( "count.ui"); GtkWidget *selector = get_widget_assert (xml, "count-selector1"); GtkWidget *button = get_widget_assert (xml, "button1"); @@ -178,12 +172,13 @@ psppire_dialog_action_count_activate (PsppireDialogAction *a) psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid); psppire_dialog_action_set_refresh (pda, refresh); + return xml; } static void psppire_dialog_action_count_class_init (PsppireDialogActionCountClass *class) { - psppire_dialog_action_set_activation (class,psppire_dialog_action_count_activate); + PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_count_activate; PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax; } @@ -230,7 +225,7 @@ set_value (gint col, GValue *val, gpointer data) PsppireDialogActionCount *cnt = PSPPIRE_DIALOG_ACTION_COUNT (data); PsppireValChooser *vc = PSPPIRE_VAL_CHOOSER (cnt->chooser); struct old_value ov; - + g_assert (col == 0); psppire_val_chooser_get_status (vc, &ov);