X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fruns-dialog.c;h=bfbfc834cbced0e92ca00a1701bd75ad2ae8b08f;hb=4e3feede0f6b3d2e67d6e41a9ddea3738e574dc3;hp=64f50ace64fea99df6ca34a7e8236ed3d9ec5f1a;hpb=32ee0e0402d6d56674f53a47d879ec5c07dabe09;p=pspp diff --git a/src/ui/gui/runs-dialog.c b/src/ui/gui/runs-dialog.c index 64f50ace64..bfbfc834cb 100644 --- a/src/ui/gui/runs-dialog.c +++ b/src/ui/gui/runs-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2011 Free Software Foundation + Copyright (C) 2011, 2012 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 @@ -29,6 +29,7 @@ #include "psppire-var-view.h" #include "executor.h" +#include "builder-wrapper.h" #include "helper.h" #include @@ -60,15 +61,6 @@ struct runs static char * generate_syntax (const struct runs *rd); -/* Makes widget W's sensitivity follow the active state of TOGGLE */ -static void -sensitive_if_active (GtkToggleButton *toggle, GtkWidget *w) -{ - gboolean active = gtk_toggle_button_get_active (toggle); - - gtk_widget_set_sensitive (w, active); -} - static void refresh (struct runs *fd) { @@ -121,8 +113,6 @@ runs_dialog (PsppireDataWindow *dw) struct runs fd; gint response; - PsppireVarStore *vs; - GtkWidget *dialog ; GtkWidget *source ; @@ -144,17 +134,15 @@ runs_dialog (PsppireDataWindow *dw) fd.variables = get_widget_assert (fd.xml, "psppire-var-view1"); - g_object_get (fd.de->data_editor, "var-store", &vs, NULL); - gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fd.de)); - g_object_get (vs, "dictionary", &fd.dict, NULL); + g_object_get (fd.de->data_editor, "dictionary", &fd.dict, NULL); g_object_set (source, "model", fd.dict, "predicate", var_is_numeric, NULL); g_signal_connect (fd.cb[CB_CUSTOM], "toggled", - G_CALLBACK (sensitive_if_active), fd.entry); + G_CALLBACK (set_sensitivity_from_toggle), fd.entry); psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog), dialog_state_valid, &fd); @@ -209,7 +197,7 @@ generate_syntax (const struct runs *rd) if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (rd->cb[CB_CUSTOM]))) { - char *text = gtk_entry_get_text (GTK_ENTRY (rd->entry)); + const char *text = gtk_entry_get_text (GTK_ENTRY (rd->entry)); append_fragment (string, text, PSPPIRE_VAR_VIEW (rd->variables)); }