Added menomics to all menuitems.
[pspp] / src / ui / gui / psppire-dict.c
index cf66ca13c2820d6bf64d57a18bae52ddf4dd1a3d..e6f1373a54d969ed76de022e0135924ace674c8c 100644 (file)
@@ -22,7 +22,6 @@
 #include <gtksheet/gtkextra-marshal.h>
 
 #include "psppire-dict.h"
-#include <data/format.h>
 #include <data/dictionary.h>
 #include <data/missing-values.h>
 #include <data/value-labels.h>
@@ -488,7 +487,7 @@ psppire_dict_check_name (const PsppireDict *dict,
 }
 
 
-inline gint
+gint
 psppire_dict_get_next_value_idx (const PsppireDict *dict)
 {
   return dict_get_next_value_idx (dict->dict);
@@ -790,6 +789,10 @@ psppire_dict_rename_var (PsppireDict *dict, struct variable *v,
   if ( ! var_is_valid_name (name, false))
     return FALSE;
 
+  /* Make sure no other variable has this name */
+  if ( NULL != psppire_dict_lookup_var (dict, name))
+    return FALSE;
+
   dict_rename_var (dict->dict, v, name);
 
   return TRUE;