projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-count.c
diff --git
a/src/ui/gui/psppire-dialog-action-count.c
b/src/ui/gui/psppire-dialog-action-count.c
index 337e38a01c5e7a75ac7b745963e05d125a247764..b1ee11dc1579b504a0c5c8fe1d52cbf58c14820d 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-count.c
+++ b/
src/ui/gui/psppire-dialog-action-count.c
@@
-51,7
+51,7
@@
generate_syntax (const PsppireDialogAction *act)
gboolean ok;
GtkTreeIter iter;
struct string dds;
gboolean ok;
GtkTreeIter iter;
struct string dds;
-
+
ds_init_empty (&dds);
ds_put_cstr (&dds, "\nCOUNT ");
ds_init_empty (&dds);
ds_put_cstr (&dds, "\nCOUNT ");
@@
-117,7
+117,7
@@
dialog_state_valid (gpointer data)
if (! cnt->value_list)
return FALSE;
if (! cnt->value_list)
return FALSE;
- if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (cnt->value_list), &iter)
)
+ if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (cnt->value_list), &iter))
return FALSE;
if (!gtk_tree_model_get_iter_first (gtk_tree_view_get_model (GTK_TREE_VIEW (cnt->variable_treeview)), &iter))
return FALSE;
if (!gtk_tree_model_get_iter_first (gtk_tree_view_get_model (GTK_TREE_VIEW (cnt->variable_treeview)), &iter))
@@
-144,19
+144,13
@@
refresh (PsppireDialogAction *rd_)
gtk_list_store_clear (GTK_LIST_STORE (cnt->value_list));
}
gtk_list_store_clear (GTK_LIST_STORE (cnt->value_list));
}
-static
void
-psppire_dialog_action_count_activate (PsppireDialogAction *a)
+static
GtkBuilder *
+psppire_dialog_action_count_activate (PsppireDialogAction *a
, GVariant *param
)
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionCount *act = PSPPIRE_DIALOG_ACTION_COUNT (a);
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionCount *act = PSPPIRE_DIALOG_ACTION_COUNT (a);
- GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
- GtkBuilder *xml = g_hash_table_lookup (thing, a);
- if (!xml)
- {
- xml = builder_new ("count.ui");
- g_hash_table_insert (thing, a, xml);
- }
+ GtkBuilder *xml = builder_new ("count.ui");
GtkWidget *selector = get_widget_assert (xml, "count-selector1");
GtkWidget *button = get_widget_assert (xml, "button1");
GtkWidget *selector = get_widget_assert (xml, "count-selector1");
GtkWidget *button = get_widget_assert (xml, "button1");
@@
-178,12
+172,13
@@
psppire_dialog_action_count_activate (PsppireDialogAction *a)
psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid);
psppire_dialog_action_set_refresh (pda, refresh);
psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid);
psppire_dialog_action_set_refresh (pda, refresh);
+ return xml;
}
static void
psppire_dialog_action_count_class_init (PsppireDialogActionCountClass *class)
{
}
static void
psppire_dialog_action_count_class_init (PsppireDialogActionCountClass *class)
{
-
psppire_dialog_action_set_activation (class,psppire_dialog_action_count_activate)
;
+
PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_count_activate
;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
@@
-212,7
+207,7
@@
on_acr_selection_change (GtkTreeSelection *selection, gpointer data)
PsppireDialogActionCount *cnt = PSPPIRE_DIALOG_ACTION_COUNT (data);
GValue ov_value = {0};
PsppireDialogActionCount *cnt = PSPPIRE_DIALOG_ACTION_COUNT (data);
GValue ov_value = {0};
- if (
! gtk_tree_selection_get_selected (selection, &model, &iter)
)
+ if (
! gtk_tree_selection_get_selected (selection, &model, &iter)
)
return;
gtk_tree_model_get_value (GTK_TREE_MODEL (model), &iter,
return;
gtk_tree_model_get_value (GTK_TREE_MODEL (model), &iter,
@@
-230,7
+225,7
@@
set_value (gint col, GValue *val, gpointer data)
PsppireDialogActionCount *cnt = PSPPIRE_DIALOG_ACTION_COUNT (data);
PsppireValChooser *vc = PSPPIRE_VAL_CHOOSER (cnt->chooser);
struct old_value ov;
PsppireDialogActionCount *cnt = PSPPIRE_DIALOG_ACTION_COUNT (data);
PsppireValChooser *vc = PSPPIRE_VAL_CHOOSER (cnt->chooser);
struct old_value ov;
-
+
g_assert (col == 0);
psppire_val_chooser_get_status (vc, &ov);
g_assert (col == 0);
psppire_val_chooser_get_status (vc, &ov);
@@
-268,7
+263,7
@@
values_dialog (PsppireDialogActionCount *cd)
response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
- if (
response == PSPPIRE_RESPONSE_CONTINUE
)
+ if (
response == PSPPIRE_RESPONSE_CONTINUE
)
{
g_object_unref (cd->value_list);
cd->value_list = local_store;
{
g_object_unref (cd->value_list);
cd->value_list = local_store;