X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-examine.c;h=8a643820ea830368c7b58a5527485a961d56cc21;hb=eff2701d5d282bfc0c1b52bd2af985705b11b307;hp=bba35cf12427c6a067b0b36c23e6e3d4f48bcc0b;hpb=2a71889bf86463fb752bcbab248da47b25b4fd9a;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-examine.c b/src/ui/gui/psppire-dialog-action-examine.c index bba35cf124..8a643820ea 100644 --- a/src/ui/gui/psppire-dialog-action-examine.c +++ b/src/ui/gui/psppire-dialog-action-examine.c @@ -107,7 +107,7 @@ run_opts_dialog (PsppireDialogActionExamine *ed) static char * -generate_syntax (PsppireDialogAction *act) +generate_syntax (const PsppireDialogAction *act) { PsppireDialogActionExamine *ed = PSPPIRE_DIALOG_ACTION_EXAMINE (act); @@ -198,12 +198,18 @@ dialog_refresh (PsppireDialogAction *da) } static void -psppire_dialog_action_examine_activate (GtkAction *a) +psppire_dialog_action_examine_activate (PsppireDialogAction *a) { PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a); PsppireDialogActionExamine *act = PSPPIRE_DIALOG_ACTION_EXAMINE (a); - GtkBuilder *xml = builder_new ("examine.ui"); + GHashTable *thing = psppire_dialog_action_get_hash_table (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("examine.ui"); + g_hash_table_insert (thing, a, xml); + } GtkWidget *stats_button = get_widget_assert (xml, "stats-button"); GtkWidget *opts_button = get_widget_assert (xml, "opts-button"); @@ -234,7 +240,7 @@ psppire_dialog_action_examine_activate (GtkAction *a) act->stats_dialog = get_widget_assert (xml, "statistics-dialog"); act->descriptives_button = get_widget_assert (xml, "descriptives-button"); - act->extremes_button = get_widget_assert (xml, "extremes-button"); + act->extremes_button = get_widget_assert (xml, "extremes-button"); act->percentiles_button = get_widget_assert (xml, "percentiles-button"); act->opts_dialog = get_widget_assert (xml, "options-dialog"); @@ -252,12 +258,8 @@ psppire_dialog_action_examine_activate (GtkAction *a) g_signal_connect_swapped (opts_button, "clicked", G_CALLBACK (run_opts_dialog), act); - - PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_examine_parent_class)->activate (pda); - g_list_free (list); - g_object_unref (xml); } static void