for (l = list; l ; l = l->next)
{
GtkTreePath *path = l->data;
- GtkTreePath *fpath;
- gint *idx;
- const struct variable *v;
+ GtkTreePath *fpath =
+ gtk_tree_model_filter_convert_path_to_child_path (GTK_TREE_MODEL_FILTER (model), path);
- fpath = gtk_tree_model_filter_convert_path_to_child_path (GTK_TREE_MODEL_FILTER (model), path);
+ gint *idx = gtk_tree_path_get_indices (fpath);
- idx = gtk_tree_path_get_indices (fpath);
+ const struct variable *v = psppire_dict_get_variable (dict, idx[0]);
- v = psppire_dict_get_variable (dict, idx[0]);
+ gtk_tree_path_free (fpath);
if ( type != -1 )
{
GtkWidget *ov_high_down_entry;
GtkListStore *value_map;
- GtkListStore *local_store;
/* Indicates that the INTO {new variables} form of the dialog
is being used */
break;
}
+
+ gtk_list_store_clear (GTK_LIST_STORE (rd.value_map));
+ g_object_unref (rd.value_map);
+
g_object_unref (xml);
}
run_old_and_new_dialog (struct recode_dialog *rd)
{
gint response;
- rd->local_store = clone_list_store (rd->value_map);
-
- g_object_ref (rd->local_store);
+ GtkListStore *local_store = clone_list_store (rd->value_map);
- psppire_acr_set_model (rd->acr, rd->local_store);
+ psppire_acr_set_model (rd->acr, local_store);
psppire_acr_set_get_value_func (rd->acr, set_value, rd);
gtk_window_set_title (GTK_WINDOW (rd->old_and_new_dialog),
if ( response == PSPPIRE_RESPONSE_CONTINUE )
- rd->value_map = clone_list_store (rd->local_store);
+ {
+ g_object_unref (rd->value_map);
+ rd->value_map = clone_list_store (local_store);
+ }
+ else
+ g_object_unref (local_store);
psppire_dialog_notify_change (PSPPIRE_DIALOG (rd->dialog));