GtkWidget *cutpoint_entry;
};
-static void
-set_sensitivity (GtkToggleButton *button, GtkWidget *w)
-{
- gboolean state = gtk_toggle_button_get_active (button);
- gtk_widget_set_sensitive (w, state);
-}
-
-
static gboolean
get_proportion (const struct binomial_dialog *bin_d, double *prop)
{
"predicate", var_is_numeric,
NULL);
- g_signal_connect (bin_d.cutpoint_button, "toggled", G_CALLBACK (set_sensitivity),
+ g_signal_connect (bin_d.cutpoint_button, "toggled", G_CALLBACK (set_sensitivity_from_toggle),
bin_d.cutpoint_entry);
g_signal_connect_swapped (dialog, "refresh", G_CALLBACK (refresh), &bin_d);
GtkListStore *expected_list;
};
-static void
-set_sensitivity (GtkToggleButton *button, GtkWidget *w)
-{
- gboolean state = gtk_toggle_button_get_active (button);
- gtk_widget_set_sensitive (w, state);
-}
-
-
static gboolean
dialog_state_valid (gpointer data)
{
NULL);
- g_signal_connect (csd.range_button, "toggled", G_CALLBACK (set_sensitivity),
+ g_signal_connect (csd.range_button, "toggled", G_CALLBACK (set_sensitivity_from_toggle),
range_table);
- g_signal_connect (csd.values_button, "toggled", G_CALLBACK (set_sensitivity),
+ g_signal_connect (csd.values_button, "toggled", G_CALLBACK (set_sensitivity_from_toggle),
values_acr);
- g_signal_connect (csd.values_button, "toggled", G_CALLBACK (set_sensitivity),
+ g_signal_connect (csd.values_button, "toggled", G_CALLBACK (set_sensitivity_from_toggle),
expected_value_entry);
return retval;
}
+/*
+ A pair of functions intended to be used as callbacks for the "toggled" signal
+ of a GtkToggleButton widget. They make the sensitivity of W follow the status
+ of the togglebutton.
+*/
+void
+set_sensitivity_from_toggle (GtkToggleButton *togglebutton, GtkWidget *w)
+{
+ gboolean active = gtk_toggle_button_get_active (togglebutton);
+
+ gtk_widget_set_sensitive (w, active);
+}
+
+/* */
+void
+set_sensitivity_from_toggle_invert (GtkToggleButton *togglebutton,
+ GtkWidget *w)
+{
+ gboolean active = gtk_toggle_button_get_active (togglebutton);
+
+ gtk_widget_set_sensitive (w, !active);
+}
+
+
+
*/
gboolean numeric_only (GtkWidget *source, GtkWidget *dest);
+/*
+ A pair of functions intended to be used as callbacks for the "toggled" signal
+ of a GtkToggleButton widget. They make the sensitivity of W follow the status
+ of the togglebutton.
+*/
+void set_sensitivity_from_toggle (GtkToggleButton *togglebutton, GtkWidget *w);
+void set_sensitivity_from_toggle_invert (GtkToggleButton *togglebutton, GtkWidget *w);
+
#endif
G_DEFINE_TYPE (PsppireDialogActionLogistic, psppire_dialog_action_logistic, PSPPIRE_TYPE_DIALOG_ACTION);
-static void
-set_sensitivity_from_toggle (GtkToggleButton *togglebutton, gpointer data)
-{
- GtkWidget *w = data;
- gboolean active = gtk_toggle_button_get_active (togglebutton);
-
- gtk_widget_set_sensitive (w, active);
-}
-
-
static gboolean
dialog_state_valid (gpointer data)
{
#include <config.h>
#include <gtk/gtk.h>
+#include "dialog-common.h"
#include "psppire-val-chooser.h"
#include "libpspp/str.h"
{N_("_All other values"), NULL, else_set }
};
-static void
-set_sensitivity_from_toggle (GtkToggleButton *togglebutton, GtkWidget *w)
-{
- gboolean active = gtk_toggle_button_get_active (togglebutton);
-
- gtk_widget_set_sensitive (w, active);
-}
-
static void
psppire_val_chooser_init (PsppireValChooser *vr)
{
static gchar * generate_syntax (const struct select_cases_dialog *scd);
-static void
-set_sensitivity_from_toggle (GtkToggleButton *togglebutton, gpointer data)
-{
- GtkWidget *w = data;
- gboolean active = gtk_toggle_button_get_active (togglebutton);
-
- gtk_widget_set_sensitive (w, active);
-}
-
-static void
-set_sensitivity_from_toggle_invert (GtkToggleButton *togglebutton,
- gpointer data)
-{
- GtkWidget *w = data;
- gboolean active = gtk_toggle_button_get_active (togglebutton);
-
- gtk_widget_set_sensitive (w, !active);
-}
-
-
-
static const gchar label1[]=N_("Approximately %3d%% of all cases.");
static const gchar label2[]=N_("Exactly %3d cases from the first %3d cases.");