projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sort the frequency tables
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog-action-scatterplot.c
diff --git
a/src/ui/gui/psppire-dialog-action-scatterplot.c
b/src/ui/gui/psppire-dialog-action-scatterplot.c
index 34bd13fbf0d2d31fe753d294092d5e9f76671e9c..9b4dd08570056c3ce6e7af960ba73fdd4bb65cf0 100644
(file)
--- a/
src/ui/gui/psppire-dialog-action-scatterplot.c
+++ b/
src/ui/gui/psppire-dialog-action-scatterplot.c
@@
-38,7
+38,7
@@
G_DEFINE_TYPE (PsppireDialogActionScatterplot, psppire_dialog_action_scatterplot
static char *
static char *
-generate_syntax (PsppireDialogAction *act)
+generate_syntax (
const
PsppireDialogAction *act)
{
PsppireDialogActionScatterplot *ow = PSPPIRE_DIALOG_ACTION_SCATTERPLOT (act);
gchar *text;
{
PsppireDialogActionScatterplot *ow = PSPPIRE_DIALOG_ACTION_SCATTERPLOT (act);
gchar *text;
@@
-46,11
+46,11
@@
generate_syntax (PsppireDialogAction *act)
ds_init_cstr (&dss, "GRAPH SCATTERPLOT(BIVARIATE) = ");
ds_init_cstr (&dss, "GRAPH SCATTERPLOT(BIVARIATE) = ");
- ds_put_cstr (&dss, gtk_entry_get_text (GTK_ENTRY (ow->
y
_axis)));
-
+ ds_put_cstr (&dss, gtk_entry_get_text (GTK_ENTRY (ow->
x
_axis)));
+
ds_put_cstr (&dss, " WITH ");
ds_put_cstr (&dss, " WITH ");
- ds_put_cstr (&dss, gtk_entry_get_text (GTK_ENTRY (ow->
x
_axis)));
+ ds_put_cstr (&dss, gtk_entry_get_text (GTK_ENTRY (ow->
y
_axis)));
ds_put_cstr (&dss, ".\n");
ds_put_cstr (&dss, ".\n");
@@
-69,13
+69,13
@@
dialog_state_valid (gpointer data)
const char *xvar = gtk_entry_get_text (GTK_ENTRY (ow->x_axis));
const char *yvar = gtk_entry_get_text (GTK_ENTRY (ow->y_axis));
const char *xvar = gtk_entry_get_text (GTK_ENTRY (ow->x_axis));
const char *yvar = gtk_entry_get_text (GTK_ENTRY (ow->y_axis));
- if (
0 == strcmp ("", xvar))
+ if (0 == strcmp ("", xvar))
return FALSE;
return FALSE;
- if (
0 == strcmp ("", yvar))
+ if (0 == strcmp ("", yvar))
return FALSE;
return FALSE;
-
+
return TRUE;
}
return TRUE;
}
@@
-90,20
+90,13
@@
refresh (PsppireDialogAction *rd_)
-static
void
-psppire_dialog_action_scatterplot_activate (PsppireDialogAction *a)
+static
GtkBuilder *
+psppire_dialog_action_scatterplot_activate (PsppireDialogAction *a
, GVariant *param
)
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionScatterplot *act = PSPPIRE_DIALOG_ACTION_SCATTERPLOT (a);
{
PsppireDialogAction *pda = PSPPIRE_DIALOG_ACTION (a);
PsppireDialogActionScatterplot *act = PSPPIRE_DIALOG_ACTION_SCATTERPLOT (a);
- GHashTable *thing = psppire_dialog_action_get_hash_table (pda);
- GtkBuilder *xml = g_hash_table_lookup (thing, a);
- if (!xml)
- {
- xml = builder_new ("scatterplot.ui");
- g_hash_table_insert (thing, a, xml);
- }
-
+ GtkBuilder *xml = builder_new ("scatterplot.ui");
pda->dialog = get_widget_assert (xml, "scatterplot-dialog");
pda->source = get_widget_assert (xml, "scatterplot-treeview1");
pda->dialog = get_widget_assert (xml, "scatterplot-dialog");
pda->source = get_widget_assert (xml, "scatterplot-treeview1");
@@
-112,15
+105,13
@@
psppire_dialog_action_scatterplot_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);
-
- if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_scatterplot_parent_class)->activate)
- PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_scatterplot_parent_class)->activate (pda);
+ return xml;
}
static void
psppire_dialog_action_scatterplot_class_init (PsppireDialogActionScatterplotClass *class)
{
}
static void
psppire_dialog_action_scatterplot_class_init (PsppireDialogActionScatterplotClass *class)
{
-
psppire_dialog_action_set_activation (class, psppire_dialog_action_scatterplot_activate)
;
+
PSPPIRE_DIALOG_ACTION_CLASS (class)->initial_activate = psppire_dialog_action_scatterplot_activate
;
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}
PSPPIRE_DIALOG_ACTION_CLASS (class)->generate_syntax = generate_syntax;
}