projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
format: Make fmt_check() easier to translate.
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-rank.c
diff --git
a/src/ui/gui/psppire-dialog-action-rank.c
b/src/ui/gui/psppire-dialog-action-rank.c
index 16adb9f707b2ffeb390eb98b9ef8538776a2eada..c0454d10f3b86a1855bad7faad9493a227dda7c8 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-rank.c
+++ b/
src/ui/gui/psppire-dialog-action-rank.c
@@
-53,7
+53,7
@@
generate_syntax (const PsppireDialogAction *act)
gtk_toggle_button_get_active (rd->ascending_togglebutton)
?'A':'D');
gtk_toggle_button_get_active (rd->ascending_togglebutton)
?'A':'D');
- if (
gtk_tree_model_get_iter_first (gs, ¬used)
)
+ if (
gtk_tree_model_get_iter_first (gs, ¬used)
)
{
g_string_append (str, "\n\tBY ");
{
g_string_append (str, "\n\tBY ");
@@
-94,24
+94,24
@@
generate_syntax (const PsppireDialogAction *act)
{
g_string_append (str, "\n\t/FRACTION=");
{
g_string_append (str, "\n\t/FRACTION=");
- if (
gtk_toggle_button_get_active (rd->blom))
+ if (gtk_toggle_button_get_active (rd->blom))
g_string_append (str, "BLOM");
g_string_append (str, "BLOM");
- else if (
gtk_toggle_button_get_active (rd->tukey))
+ else if (gtk_toggle_button_get_active (rd->tukey))
g_string_append (str, "TUKEY");
g_string_append (str, "TUKEY");
- else if (
gtk_toggle_button_get_active (rd->rankit))
+ else if (gtk_toggle_button_get_active (rd->rankit))
g_string_append (str, "RANKIT");
g_string_append (str, "RANKIT");
- else if (
gtk_toggle_button_get_active (rd->vw))
+ else if (gtk_toggle_button_get_active (rd->vw))
g_string_append (str, "VW");
}
g_string_append (str, "\n\t/TIES=");
g_string_append (str, "VW");
}
g_string_append (str, "\n\t/TIES=");
- if (
gtk_toggle_button_get_active (rd->mean))
+ if (gtk_toggle_button_get_active (rd->mean))
g_string_append (str, "MEAN");
g_string_append (str, "MEAN");
- else if (
gtk_toggle_button_get_active (rd->low))
+ else if (gtk_toggle_button_get_active (rd->low))
g_string_append (str, "LOW");
g_string_append (str, "LOW");
- else if (
gtk_toggle_button_get_active (rd->high))
+ else if (gtk_toggle_button_get_active (rd->high))
g_string_append (str, "HIGH");
g_string_append (str, "HIGH");
- else if (
gtk_toggle_button_get_active (rd->condense))
+ else if (gtk_toggle_button_get_active (rd->condense))
g_string_append (str, "CONDENSE");
g_string_append (str, "CONDENSE");
@@
-155,7
+155,7
@@
types_dialog_reset (PsppireDialogActionRank *rd)
{
gint i;
{
gint i;
- for (i = 0 ; i < n_RANK_FUNCS ; ++i
)
+ for (i = 0 ; i < n_RANK_FUNCS ; ++i)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->func_button [i]),
FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rd->func_button [i]),
FALSE);
@@
-206,20
+206,13
@@
set_sensitivity (PsppireDialogActionRank *dar)
gtk_widget_set_sensitive (dar->formula_box, sens);
}
gtk_widget_set_sensitive (dar->formula_box, sens);
}
-static
void
-psppire_dialog_action_rank_activate (PsppireDialogAction *a)
+static
GtkBuilder *
+psppire_dialog_action_rank_activate (PsppireDialogAction *a
, GVariant *param
)
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionRank *act = PSPPIRE_DIALOG_ACTION_RANK (a);
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionRank *act = PSPPIRE_DIALOG_ACTION_RANK (a);
- GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
- GtkBuilder *xml = g_hash_table_lookup (thing, a);
- if (!xml)
- {
- xml = builder_new ("rank.ui");
- g_hash_table_insert (thing, a, xml);
- }
-
+ GtkBuilder *xml = builder_new ("rank.ui");
GtkWidget *types_button = get_widget_assert (xml, "button1");
GtkWidget *ties_button = get_widget_assert (xml, "button2");
GtkWidget *types_button = get_widget_assert (xml, "button1");
GtkWidget *ties_button = get_widget_assert (xml, "button2");
@@
-298,12
+291,13
@@
psppire_dialog_action_rank_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_rank_class_init (PsppireDialogActionRankClass *class)
{
}
static void
psppire_dialog_action_rank_class_init (PsppireDialogActionRankClass *class)
{
-
psppire_dialog_action_set_activation (class, psppire_dialog_action_rank_activate)
;
+
PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_rank_activate
;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}