projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix crash when cleaning up after parsing bad MODIFY VARIABLES.
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-recode-different.c
diff --git
a/src/ui/gui/psppire-dialog-action-recode-different.c
b/src/ui/gui/psppire-dialog-action-recode-different.c
index 9a41596d3bb3830c48a7b79e4c1c961a4adaf8fa..a1e2ce848b79c7c0b29650bb9cebb8eba1a7f68f 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-recode-different.c
+++ b/
src/ui/gui/psppire-dialog-action-recode-different.c
@@
-42,7
+42,7
@@
difx_variable_treeview_is_populated (PsppireDialogActionRecode *rd)
PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd);
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
PsppireDialogActionRecodeDifferent *rdd = PSPPIRE_DIALOG_ACTION_RECODE_DIFFERENT (rd);
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (rd->variable_treeview));
- if (g_hash_table_size (rdd->varmap) != gtk_tree_model_iter_n_children (model, NULL)
)
+ if (g_hash_table_size (rdd->varmap) != gtk_tree_model_iter_n_children (model, NULL))
return FALSE;
return TRUE;
return FALSE;
return TRUE;
@@
-58,11
+58,11
@@
dialog_state_valid (gpointer data)
PsppireDialogActionRecode *rd = data;
GtkTreeIter not_used;
PsppireDialogActionRecode *rd = data;
GtkTreeIter not_used;
- if (
! rd->value_map
)
+ if (
! rd->value_map
)
return FALSE;
return FALSE;
- if (
! gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->value_map),
- ¬_used)
)
+ if (! gtk_tree_model_get_iter_first (GTK_TREE_MODEL (rd->value_map),
+ ¬_used))
return FALSE;
return FALSE;
@@
-122,7
+122,7
@@
nlp_create (const char *name, const char *label)
nlp->label = NULL;
nlp->label = NULL;
- if (
0 != strcmp ("", label))
+ if (0 != strcmp ("", label))
nlp->label = g_strdup (label);
return nlp;
nlp->label = g_strdup (label);
return nlp;
@@
-132,7
+132,7
@@
static void
nlp_destroy (gpointer data)
{
struct nlp *nlp = data ;
nlp_destroy (gpointer data)
{
struct nlp *nlp = data ;
- if (
! nlp
)
+ if (
! nlp
)
return;
g_free (nlp->name);
return;
g_free (nlp->name);
@@
-161,7
+161,7
@@
render_new_var_name (GtkTreeViewColumn *tree_column,
nlp = g_hash_table_lookup (rdd->varmap, var);
nlp = g_hash_table_lookup (rdd->varmap, var);
- if (
nlp
)
+ if (
nlp
)
g_object_set (cell, "text", nlp->name, NULL);
else
g_object_set (cell, "text", "", NULL);
g_object_set (cell, "text", nlp->name, NULL);
else
g_object_set (cell, "text", "", NULL);
@@
-190,7
+190,7
@@
on_change_clicked (GObject *obj, gpointer data)
const gchar *dest_var_label =
gtk_entry_get_text (GTK_ENTRY (rd->new_label_entry));
const gchar *dest_var_label =
gtk_entry_get_text (GTK_ENTRY (rd->new_label_entry));
- if (
NULL == rows || rows->next != NULL)
+ if (NULL == rows || rows->next != NULL)
goto finish;
gtk_tree_model_get_iter (model, &iter, rows->data);
goto finish;
gtk_tree_model_get_iter (model, &iter, rows->data);
@@
-227,7
+227,7
@@
on_selection_change (GtkTreeSelection *selection, gpointer data)
GList *rows = gtk_tree_selection_get_selected_rows (selection, &model);
GList *rows = gtk_tree_selection_get_selected_rows (selection, &model);
- if (
rows && !rows->next)
+ if (rows && !rows->next)
{
/* Exactly one row is selected */
struct nlp *nlp;
{
/* Exactly one row is selected */
struct nlp *nlp;
@@
-312,13
+312,14
@@
populate_treeview (PsppireDialogActionRecode *act)
}
}
-static
void
-psppire_dialog_action_recode_different_activate (PsppireDialogAction *a)
+static
GtkBuilder *
+psppire_dialog_action_recode_different_activate (PsppireDialogAction *a
, GVariant *param
)
{
PsppireDialogActionRecode *act = PSPPIRE_DIALOG_ACTION_RECODE (a);
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
{
PsppireDialogActionRecode *act = PSPPIRE_DIALOG_ACTION_RECODE (a);
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
- psppire_dialog_action_recode_pre_activate (act, populate_treeview);
+ GtkBuilder *xml = psppire_dialog_action_recode_pre_activate (act,
+ populate_treeview);
gtk_window_set_title (GTK_WINDOW (pda->dialog),
_("Recode into Different Variables"));
gtk_window_set_title (GTK_WINDOW (pda->dialog),
_("Recode into Different Variables"));
@@
-335,6
+336,7
@@
psppire_dialog_action_recode_different_activate (PsppireDialogAction *a)
psppire_dialog_action_set_valid_predicate (pda,
dialog_state_valid);
psppire_dialog_action_set_valid_predicate (pda,
dialog_state_valid);
+ return xml;
}
static void
}
static void
@@
-431,7
+433,7
@@
target_is_string (const PsppireDialogActionRecode *rd)
static void
psppire_dialog_action_recode_different_class_init (PsppireDialogActionRecodeDifferentClass *class)
{
static void
psppire_dialog_action_recode_different_class_init (PsppireDialogActionRecodeDifferentClass *class)
{
-
psppire_dialog_action_set_activation (class, psppire_dialog_action_recode_different_activate)
;
+
PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_recode_different_activate
;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = diff_generate_syntax;
PSPPIRE_DIALOG_ACTION_RECODE_CLASS (class)->target_is_string = target_is_string;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = diff_generate_syntax;
PSPPIRE_DIALOG_ACTION_RECODE_CLASS (class)->target_is_string = target_is_string;