X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-factor.c;h=8ec9e22849e4e6d001da13fca253a31a4d417e55;hb=6648c65e4574357f2f3b8d97ccd92ef0e77ad657;hp=e1edf4a4839303560d0cc8c544d15ee4b70fdae8;hpb=0df9cdd3df66caf4353128feff3008289cda8115;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-factor.c b/src/ui/gui/psppire-dialog-action-factor.c index e1edf4a483..8ec9e22849 100644 --- a/src/ui/gui/psppire-dialog-action-factor.c +++ b/src/ui/gui/psppire-dialog-action-factor.c @@ -301,7 +301,13 @@ psppire_dialog_action_factor_activate (GtkAction *a) GtkWidget *extraction_button ; GtkWidget *rotation_button ; - GtkBuilder *xml = builder_new ("factor.ui"); + GHashTable *thing = psppire_dialog_action_get_pointer (pda); + GtkBuilder *xml = g_hash_table_lookup (thing, a); + if (!xml) + { + xml = builder_new ("factor.ui"); + g_hash_table_insert (thing, a, xml); + } pda->dialog = get_widget_assert (xml, "factor-dialog"); pda->source = get_widget_assert (xml, "dict-view"); @@ -364,14 +370,12 @@ psppire_dialog_action_factor_activate (GtkAction *a) psppire_dialog_action_set_refresh (pda, dialog_refresh); PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_factor_parent_class)->activate (pda); - - g_object_unref (xml); } static void psppire_dialog_action_factor_class_init (PsppireDialogActionFactorClass *class) { - GTK_ACTION_CLASS (class)->activate = psppire_dialog_action_factor_activate; + psppire_dialog_action_set_activation (class, psppire_dialog_action_factor_activate); PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax; }