From: Ben Pfaff Date: Sat, 14 May 2011 03:56:05 +0000 (-0700) Subject: gui: Fix temporary filtering by a variable's value. X-Git-Tag: v0.7.9~286 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2274e35dae74a8bb84482834745a62bc4cd134c;p=pspp-builds.git gui: Fix temporary filtering by a variable's value. Problem reported by Mindaugus. Bug #33088. --- diff --git a/src/ui/gui/select-cases-dialog.c b/src/ui/gui/select-cases-dialog.c index c5a7fa72..381fc3dd 100644 --- a/src/ui/gui/select-cases-dialog.c +++ b/src/ui/gui/select-cases-dialog.c @@ -366,7 +366,7 @@ generate_syntax_filter (const struct select_cases_dialog *scd) gchar *text = NULL; GString *string = g_string_new (""); - const gchar filter[]="filter_$"; + const gchar *filter = "filter_$"; const gchar key[]="case_$"; if ( gtk_toggle_button_get_active @@ -462,6 +462,13 @@ generate_syntax_filter (const struct select_cases_dialog *scd) g_string_append (string, "EXECUTE.\n"); } + else + { + GtkEntry *entry = + GTK_ENTRY (get_widget_assert (scd->xml, + "filter-variable-entry")); + filter = gtk_entry_get_text (entry); + } g_string_append_printf (string, "FILTER BY %s.\n", filter);