projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix memory leak in the value labels dialog
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-univariate.c
diff --git
a/src/ui/gui/psppire-dialog-action-univariate.c
b/src/ui/gui/psppire-dialog-action-univariate.c
index 7585cea2d21e8c093418055ecc1f7ae2964e80dd..3d81c7a140f82c2573539bb4c77ed3ff3bbf3b04 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-univariate.c
+++ b/
src/ui/gui/psppire-dialog-action-univariate.c
@@
-38,7
+38,7
@@
generate_syntax (const PsppireDialogAction *act)
GString *str = g_string_new ("GLM ");
g_string_append (str, gtk_entry_get_text (GTK_ENTRY (uvd->dep_entry)));
GString *str = g_string_new ("GLM ");
g_string_append (str, gtk_entry_get_text (GTK_ENTRY (uvd->dep_entry)));
-
+
g_string_append (str, " BY ");
psppire_var_view_append_names (PSPPIRE_VAR_VIEW (uvd->factor_list), 0, str);
g_string_append (str, " BY ");
psppire_var_view_append_names (PSPPIRE_VAR_VIEW (uvd->factor_list), 0, str);
@@
-60,7
+60,7
@@
dialog_state_valid (gpointer data)
GtkTreeModel *vars;
GtkTreeIter notused;
GtkTreeModel *vars;
GtkTreeIter notused;
- if (
0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (ud->dep_entry))))
+ if (0 == strcmp ("", gtk_entry_get_text (GTK_ENTRY (ud->dep_entry))))
return false;
vars =
return false;
vars =
@@
-82,19
+82,13
@@
refresh (PsppireDialogAction *rd_)
gtk_list_store_clear (GTK_LIST_STORE (liststore));
}
gtk_list_store_clear (GTK_LIST_STORE (liststore));
}
-static
void
-psppire_dialog_action_univariate_activate (PsppireDialogAction *a)
+static
GtkBuilder *
+psppire_dialog_action_univariate_activate (PsppireDialogAction *a
, GVariant *param
)
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionUnivariate *act = PSPPIRE_DIALOG_ACTION_UNIVARIATE (a);
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionUnivariate *act = PSPPIRE_DIALOG_ACTION_UNIVARIATE (a);
- GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
- GtkBuilder *xml = g_hash_table_lookup (thing, a);
- if (!xml)
- {
- xml = builder_new ("univariate.ui");
- g_hash_table_insert (thing, a, xml);
- }
+ GtkBuilder *xml = builder_new ("univariate.ui");
pda->dialog = get_widget_assert (xml, "univariate-dialog");
pda->source = get_widget_assert (xml, "dict-view");
pda->dialog = get_widget_assert (xml, "univariate-dialog");
pda->source = get_widget_assert (xml, "dict-view");
@@
-104,15
+98,13
@@
psppire_dialog_action_univariate_activate (PsppireDialogAction *a)
psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid);
psppire_dialog_action_set_refresh (pda, refresh);
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_univariate_parent_class)->activate)
- PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_univariate_parent_class)->activate (pda);
+ return xml;
}
static void
psppire_dialog_action_univariate_class_init (PsppireDialogActionUnivariateClass *class)
{
}
static void
psppire_dialog_action_univariate_class_init (PsppireDialogActionUnivariateClass *class)
{
-
psppire_dialog_action_set_activation (class, psppire_dialog_action_univariate_activate)
;
+
PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_univariate_activate
;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}