projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
find-dialog.c: Replace exp10 with our own integer version
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-examine.c
diff --git
a/src/ui/gui/psppire-dialog-action-examine.c
b/src/ui/gui/psppire-dialog-action-examine.c
index 0bce847e243ca684f0e6aa5813db3540e3f998fa..12627bd7a5f76b7a72972b3c1e4d9a09a891958b 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-examine.c
+++ b/
src/ui/gui/psppire-dialog-action-examine.c
@@
-55,16
+55,16
@@
run_stats_dialog (PsppireDialogActionExamine *ed)
response = psppire_dialog_run (PSPPIRE_DIALOG (ed->stats_dialog));
response = psppire_dialog_run (PSPPIRE_DIALOG (ed->stats_dialog));
- if (
response == PSPPIRE_RESPONSE_CONTINUE
)
+ if (
response == PSPPIRE_RESPONSE_CONTINUE
)
{
ed->stats = 0;
{
ed->stats = 0;
- if (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->descriptives_button)
))
+ if (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->descriptives_button)
))
ed->stats |= STAT_DESCRIPTIVES;
ed->stats |= STAT_DESCRIPTIVES;
- if (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->extremes_button)
))
+ if (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->extremes_button)
))
ed->stats |= STAT_EXTREMES;
ed->stats |= STAT_EXTREMES;
- if (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->percentiles_button)
))
+ if (
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->percentiles_button)
))
ed->stats |= STAT_PERCENTILES;
}
}
ed->stats |= STAT_PERCENTILES;
}
}
@@
-92,7
+92,7
@@
run_opts_dialog (PsppireDialogActionExamine *ed)
response = psppire_dialog_run (PSPPIRE_DIALOG (ed->opts_dialog));
response = psppire_dialog_run (PSPPIRE_DIALOG (ed->opts_dialog));
- if (
response == PSPPIRE_RESPONSE_CONTINUE
)
+ if (
response == PSPPIRE_RESPONSE_CONTINUE
)
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->listwise)))
ed->opts = OPT_LISTWISE;
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ed->listwise)))
ed->opts = OPT_LISTWISE;
@@
-118,7
+118,7
@@
generate_syntax (const PsppireDialogAction *act)
g_string_append (str, "\n\t/VARIABLES=");
psppire_var_view_append_names (PSPPIRE_VAR_VIEW (ed->variables), 0, str);
g_string_append (str, "\n\t/VARIABLES=");
psppire_var_view_append_names (PSPPIRE_VAR_VIEW (ed->variables), 0, str);
- if (
0 < gtk_tree_model_iter_n_children
+ if (0 < gtk_tree_model_iter_n_children
(gtk_tree_view_get_model (GTK_TREE_VIEW (ed->factors)), NULL))
{
g_string_append (str, "\n\tBY ");
(gtk_tree_view_get_model (GTK_TREE_VIEW (ed->factors)), NULL))
{
g_string_append (str, "\n\tBY ");
@@
-126,24
+126,24
@@
generate_syntax (const PsppireDialogAction *act)
}
label = gtk_entry_get_text (GTK_ENTRY (ed->id_var));
}
label = gtk_entry_get_text (GTK_ENTRY (ed->id_var));
- if (
0 != strcmp (label, "")
)
+ if (
0 != strcmp (label, "")
)
{
g_string_append (str, "\n\t/ID = ");
g_string_append (str, label);
}
{
g_string_append (str, "\n\t/ID = ");
g_string_append (str, label);
}
- if (
ed->stats & (STAT_DESCRIPTIVES | STAT_EXTREMES))
+ if (ed->stats & (STAT_DESCRIPTIVES | STAT_EXTREMES))
{
g_string_append (str, "\n\t/STATISTICS =");
{
g_string_append (str, "\n\t/STATISTICS =");
- if (
ed->stats & STAT_DESCRIPTIVES)
+ if (ed->stats & STAT_DESCRIPTIVES)
g_string_append (str, " DESCRIPTIVES");
g_string_append (str, " DESCRIPTIVES");
- if (
ed->stats & STAT_EXTREMES)
+ if (ed->stats & STAT_EXTREMES)
g_string_append (str, " EXTREME");
}
g_string_append (str, " EXTREME");
}
- if (
ed->stats & STAT_PERCENTILES)
+ if (ed->stats & STAT_PERCENTILES)
g_string_append (str, "\n\t/PERCENTILES");
g_string_append (str, "\n\t/PERCENTILES");
@@
-197,28
+197,22
@@
dialog_refresh (PsppireDialogAction *da)
dae->opts = OPT_LISTWISE;
}
dae->opts = OPT_LISTWISE;
}
-static
void
-psppire_dialog_action_examine_activate (PsppireDialogAction *a)
+static
GtkBuilder *
+psppire_dialog_action_examine_activate (PsppireDialogAction *a
, GVariant *param
)
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionExamine *act = PSPPIRE_DIALOG_ACTION_EXAMINE (a);
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionExamine *act = PSPPIRE_DIALOG_ACTION_EXAMINE (a);
- GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
- GtkBuilder *xml = g_hash_table_lookup (thing, a);
- if (!xml)
- {
- xml = builder_new ("examine.ui");
- g_hash_table_insert (thing, a, xml);
+ GtkBuilder *xml = builder_new ("examine.ui");
-
GtkWidget *stats_button = get_widget_assert (xml, "stats-button");
-
GtkWidget *opts_button = get_widget_assert (xml, "opts-button");
+ GtkWidget *stats_button = get_widget_assert (xml, "stats-button");
+ GtkWidget *opts_button = get_widget_assert (xml, "opts-button");
-
g_signal_connect_swapped (stats_button, "clicked",
-
G_CALLBACK (run_stats_dialog), act);
+ g_signal_connect_swapped (stats_button, "clicked",
+ G_CALLBACK (run_stats_dialog), act);
- g_signal_connect_swapped (opts_button, "clicked",
- G_CALLBACK (run_opts_dialog), act);
- }
+ g_signal_connect_swapped (opts_button, "clicked",
+ G_CALLBACK (run_opts_dialog), act);
GtkWidget *dep_sel = get_widget_assert (xml, "psppire-selector1");
GtkWidget *dep_sel2 = get_widget_assert (xml, "psppire-selector2");
GtkWidget *dep_sel = get_widget_assert (xml, "psppire-selector1");
GtkWidget *dep_sel2 = get_widget_assert (xml, "psppire-selector2");
@@
-259,13
+253,13
@@
psppire_dialog_action_examine_activate (PsppireDialogAction *a)
psppire_dialog_action_set_valid_predicate (pda, (void *) dialog_state_valid);
psppire_dialog_action_set_refresh (pda, dialog_refresh);
psppire_dialog_action_set_valid_predicate (pda, (void *) dialog_state_valid);
psppire_dialog_action_set_refresh (pda, dialog_refresh);
-
+ return xml;
}
static void
psppire_dialog_action_examine_class_init (PsppireDialogActionExamineClass *class)
{
}
static void
psppire_dialog_action_examine_class_init (PsppireDialogActionExamineClass *class)
{
-
psppire_dialog_action_set_activation (class, psppire_dialog_action_examine_activate)
;
+
PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_examine_activate
;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}