X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fvar-type-dialog.c;h=db2e85b5f792bc5b4c5ee96daed8891ae8b0de19;hb=8953baa61127d6d3b91f763663ea647bf3e4e793;hp=ffaef9207054ffe03b31252c734bf7bbf51c4c01;hpb=8f01849cbcf47e69f57c7ab824cf8d18875b7076;p=pspp-builds.git diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index ffaef920..db2e85b5 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -1,21 +1,18 @@ -/* - PSPPIRE --- A Graphical User Interface for PSPP +/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2005, 2006 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 . */ /* This module describes the behaviour of the Variable Type dialog box used @@ -335,6 +332,7 @@ var_type_dialog_create (GladeXML *xml) g_assert (xml); dialog->window = get_widget_assert (xml,"var_type_dialog"); + dialog->active_button = -1; g_signal_connect (dialog->window, "delete-event", @@ -447,7 +445,7 @@ var_type_dialog_create (GladeXML *xml) g_object_unref (list_store); - g_signal_connect (GTK_OBJECT (dialog->date_format_treeview), "cursor-changed", + g_signal_connect (dialog->date_format_treeview, "cursor-changed", GTK_SIGNAL_FUNC (set_format_from_treeview), dialog); @@ -470,7 +468,7 @@ var_type_dialog_create (GladeXML *xml) for ( i = 0 ; i < sizeof (dollar_format)/sizeof (dollar_format[0]) ; ++i ) { - char *template = fmt_dollar_template (&dollar_format[i]); + char *template = settings_dollar_template (&dollar_format[i]); gtk_list_store_append (list_store, &iter); gtk_list_store_set (list_store, &iter, 0, template, @@ -484,11 +482,11 @@ var_type_dialog_create (GladeXML *xml) g_object_unref (list_store); - g_signal_connect (GTK_OBJECT (dialog->dollar_treeview), + g_signal_connect (dialog->dollar_treeview, "cursor-changed", GTK_SIGNAL_FUNC (set_format_from_treeview), dialog); - g_signal_connect_swapped (GTK_OBJECT (dialog->dollar_treeview), + g_signal_connect_swapped (dialog->dollar_treeview, "cursor-changed", GTK_SIGNAL_FUNC (update_width_decimals), dialog); @@ -528,22 +526,22 @@ var_type_dialog_create (GladeXML *xml) g_object_unref (list_store); - g_signal_connect (GTK_OBJECT (dialog->custom_treeview), + g_signal_connect (dialog->custom_treeview, "cursor-changed", GTK_SIGNAL_FUNC (set_format_type_from_treeview), dialog); - g_signal_connect (GTK_OBJECT (dialog->custom_treeview), + g_signal_connect (dialog->custom_treeview, "cursor-changed", GTK_SIGNAL_FUNC (preview_custom), dialog); - g_signal_connect (GTK_OBJECT (dialog->entry_width), + g_signal_connect (dialog->entry_width, "changed", GTK_SIGNAL_FUNC (preview_custom), dialog); - g_signal_connect (GTK_OBJECT (dialog->entry_decimals), + g_signal_connect (dialog->entry_decimals, "changed", GTK_SIGNAL_FUNC (preview_custom), dialog); @@ -793,14 +791,14 @@ on_var_type_ok_clicked (GtkWidget *w, gpointer data) gint decimals = atoi (gtk_entry_get_text (GTK_ENTRY (dialog->entry_decimals))); - gint new_type = VAR_NUMERIC; + gint new_type = VAL_NUMERIC; gint new_width = 0; bool result = false; struct fmt_spec spec; switch (dialog->active_button) { case BUTTON_STRING: - new_type = VAR_STRING; + new_type = VAL_STRING; new_width = width; result = make_output_format_try (&spec, FMT_A, width, 0); break;