projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed abs to labs function to avoid warning
[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 edb44a065c816edfea660089c28febdba7d98cb2..0f5fc87fbef64eeb63d7b34ea91759fd939ff418 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-count.c
+++ b/
src/ui/gui/psppire-dialog-action-count.c
@@
-43,7
+43,7
@@
G_DEFINE_TYPE (PsppireDialogActionCount, psppire_dialog_action_count, PSPPIRE_TY
static char *
static char *
-generate_syntax (PsppireDialogAction *act)
+generate_syntax (
const
PsppireDialogAction *act)
{
PsppireDialogActionCount *cnt = PSPPIRE_DIALOG_ACTION_COUNT (act);
gchar *text = NULL;
{
PsppireDialogActionCount *cnt = PSPPIRE_DIALOG_ACTION_COUNT (act);
gchar *text = NULL;
@@
-51,7
+51,7
@@
generate_syntax (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 ");
@@
-144,13
+144,14
@@
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 (
GtkAction *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);
- GtkBuilder *xml = builder_new ("count.ui");
+ 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");
@@
-168,20
+169,16
@@
psppire_dialog_action_count_activate (GtkAction *a)
g_signal_connect_swapped (button, "clicked", G_CALLBACK (values_dialog), act);
g_signal_connect_swapped (button, "clicked", G_CALLBACK (values_dialog), act);
-
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);
- g_object_unref (xml);
-
- if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_count_parent_class)->activate)
- PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_count_parent_class)->activate (pda);
+ 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;
}
@@
-228,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);