X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fpsppire-dict.c;h=3e37343b7d10b141bb5aebcf7a1d13b27897b466;hb=077c3c1774fd75627783b407169d6884adcbe663;hp=b32d0677ba9b04ab22663c312c73f3ec7e4b6017;hpb=a4f8860c584ccc9ffa7d06f711bd051006ba45ef;p=pspp
diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c
index b32d0677ba..3e37343b7d 100644
--- a/src/ui/gui/psppire-dict.c
+++ b/src/ui/gui/psppire-dict.c
@@ -1,21 +1,18 @@
-/*
- PSPPIRE --- A Graphical User Interface for PSPP
- Copyright (C) 2004, 2006, 2007 Free Software Foundation
+/* PSPPIRE - a graphical user interface for PSPP.
+ Copyright (C) 2004, 2006, 2007 Free Software Foundation
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
#include
#include
@@ -281,7 +278,17 @@ psppire_dict_new_from_dict (struct dictionary *d)
void
psppire_dict_replace_dictionary (PsppireDict *dict, struct dictionary *d)
{
+ struct variable *var = dict_get_weight (d);
dict->dict = d;
+
+ weight_changed_callback (d, var ? var_get_dict_index (var) : -1, dict);
+
+ var = dict_get_filter (d);
+ filter_changed_callback (d, var ? var_get_dict_index (var) : -1, dict);
+
+ split_changed_callback (d, dict);
+
+ dict_set_callbacks (dict->dict, &gui_callbacks, dict);
}
@@ -745,7 +752,7 @@ psppire_dict_rename_var (PsppireDict *dict, struct variable *v,
{
if ( ! var_is_valid_name (name, false))
return FALSE;
-
+
dict_rename_var (dict->dict, v, name);
return TRUE;