gui: Consistently use print format instead of write format.
[pspp-builds.git] / src / ui / gui / var-type-dialog.c
index f196e554f9d0c224ee6bfc5a268814e566472050..fb1977a5ab211a1f3c33bf2241bc02642cea14fd 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-    Copyright (C) 2005, 2006, 2010  Free Software Foundation
+    Copyright (C) 2005, 2006, 2010, 2011  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
@@ -125,7 +125,7 @@ static void update_width_decimals (const struct var_type_dialog *dialog);
 static void
 set_local_width_decimals (struct var_type_dialog *dialog)
 {
-  dialog->fmt_l = * var_get_write_format (dialog->pv);
+  dialog->fmt_l = * var_get_print_format (dialog->pv);
 
   switch (dialog->active_button)
     {
@@ -664,21 +664,21 @@ select_treeview_from_format_type (GtkTreeView *treeview,
 static void
 var_type_dialog_set_state (struct var_type_dialog *dialog)
 {
-  const struct fmt_spec *write_spec ;
+  const struct fmt_spec *format ;
   GString *str = g_string_new ("");
 
   g_assert (dialog);
   g_assert (dialog->pv);
 
   /* Populate width and decimals */
-  write_spec = var_get_write_format (dialog->pv);
+  format = var_get_print_format (dialog->pv);
 
-  g_string_printf (str, "%d", write_spec->d);
+  g_string_printf (str, "%d", format->d);
 
   gtk_entry_set_text (GTK_ENTRY (dialog->entry_decimals),
                     str->str);
 
-  g_string_printf (str, "%d", write_spec->w);
+  g_string_printf (str, "%d", format->w);
 
   gtk_entry_set_text (GTK_ENTRY (dialog->entry_width),
                     str->str);
@@ -686,7 +686,7 @@ var_type_dialog_set_state (struct var_type_dialog *dialog)
   g_string_free (str, TRUE);
 
   /* Populate the radio button states */
-  switch (write_spec->type)
+  switch (format->type)
     {
     case FMT_F:
       var_type_dialog_set_active_button (dialog, BUTTON_NUMERIC);
@@ -709,7 +709,7 @@ var_type_dialog_set_state (struct var_type_dialog *dialog)
       var_type_dialog_set_active_button (dialog, BUTTON_DOLLAR);
       gtk_widget_show_all (dialog->width_decimals);
 
-      select_treeview_from_format (dialog->dollar_treeview, write_spec);
+      select_treeview_from_format (dialog->dollar_treeview, format);
       break;
     case FMT_DATE:
     case FMT_EDATE:
@@ -727,7 +727,7 @@ var_type_dialog_set_state (struct var_type_dialog *dialog)
       var_type_dialog_set_active_button (dialog, BUTTON_DATE);
       gtk_widget_hide (dialog->width_decimals);
       gtk_widget_show (dialog->date_format_list);
-      select_treeview_from_format (dialog->date_format_treeview, write_spec);
+      select_treeview_from_format (dialog->date_format_treeview, format);
       break;
     case FMT_CCA:
     case FMT_CCB:
@@ -736,7 +736,7 @@ var_type_dialog_set_state (struct var_type_dialog *dialog)
     case FMT_CCE:
       var_type_dialog_set_active_button (dialog, BUTTON_CUSTOM);
       select_treeview_from_format_type (dialog->custom_treeview,
-                                      write_spec->type);
+                                      format->type);
       gtk_widget_show_all (dialog->width_decimals);
       break;
     default: