projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PsppireDict: Add a quarter of a unit to the displayed width.
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-regression.c
diff --git
a/src/ui/gui/psppire-dialog-action-regression.c
b/src/ui/gui/psppire-dialog-action-regression.c
index 58d183e63ff123ca1b5ab82f8f0ac90dc999ef35..b475ebb0dfb6a9b5be6a855ee43cefaf3ea0eef3 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-regression.c
+++ b/
src/ui/gui/psppire-dialog-action-regression.c
@@
-141,20
+141,14
@@
on_save_clicked (PsppireDialogActionRegression *rd)
}
}
-static
void
-psppire_dialog_action_regression_activate (PsppireDialogAction *a)
+static
GtkBuilder *
+psppire_dialog_action_regression_activate (PsppireDialogAction *a
, GVariant *param
)
{
PsppireDialogActionRegression *act = PSPPIRE_DIALOG_ACTION_REGRESSION (a);
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
{
PsppireDialogActionRegression *act = PSPPIRE_DIALOG_ACTION_REGRESSION (a);
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
- GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
- GtkBuilder *xml = g_hash_table_lookup (thing, a);
- if (!xml)
- {
- xml = builder_new ("regression.ui");
- g_hash_table_insert (thing, a, xml);
- }
-
+ GtkBuilder *xml = builder_new ( "regression.ui");
+
GtkWidget *stat_button = get_widget_assert (xml, "stat-button");
GtkWidget *save_button = get_widget_assert (xml, "save-button");
GtkWidget *stat_button = get_widget_assert (xml, "stat-button");
GtkWidget *save_button = get_widget_assert (xml, "save-button");
@@
-185,9
+179,7
@@
psppire_dialog_action_regression_activate (PsppireDialogAction *a)
g_signal_connect_swapped (save_button, "clicked",
G_CALLBACK (on_save_clicked), act);
g_signal_connect_swapped (save_button, "clicked",
G_CALLBACK (on_save_clicked), act);
-
- if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_regression_parent_class)->activate)
- PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_regression_parent_class)->activate (pda);
+ return xml;
}
}
@@
-213,17
+205,17
@@
generate_syntax (const PsppireDialogAction *a)
g_string_append (string, "\n\t/DEPENDENT=");
psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->dep_vars), 0, string);
g_string_append (string, "\n\t/METHOD=ENTER");
g_string_append (string, "\n\t/DEPENDENT=");
psppire_var_view_append_names (PSPPIRE_VAR_VIEW (rd->dep_vars), 0, string);
g_string_append (string, "\n\t/METHOD=ENTER");
-
+
selected = 0;
selected = 0;
- for (i = 0, ok = gtk_tree_model_get_iter_first (model, &iter); ok;
+ for (i = 0, ok = gtk_tree_model_get_iter_first (model, &iter); ok;
i++, ok = gtk_tree_model_iter_next (model, &iter))
{
gboolean toggled;
gtk_tree_model_get (model, &iter,
i++, ok = gtk_tree_model_iter_next (model, &iter))
{
gboolean toggled;
gtk_tree_model_get (model, &iter,
- CHECKBOX_COLUMN_SELECTED, &toggled, -1);
- if (toggled)
- selected |= 1u << i;
- else
+ CHECKBOX_COLUMN_SELECTED, &toggled, -1);
+ if (toggled)
+ selected |= 1u << i;
+ else
selected &= ~(1u << i);
}
selected &= ~(1u << i);
}
@@
-261,7
+253,7
@@
generate_syntax (const PsppireDialogAction *a)
static void
psppire_dialog_action_regression_class_init (PsppireDialogActionRegressionClass *class)
{
static void
psppire_dialog_action_regression_class_init (PsppireDialogActionRegressionClass *class)
{
-
psppire_dialog_action_set_activation (class, psppire_dialog_action_regression_activate)
;
+
PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_regression_activate
;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}