+Sat Jan 13 07:47:26 WST 2007 John Darrington <john@darrington.wattle.id.au>
+
+ * psppire-case-file.c psppire-data-store.c psppire-dialog.c
+ psppire-dict.c psppire-var-select.c : Replaced identifier 'signal'
+ with 'signals' to avoid conflict with sysv based systems which use
+ this identifer for something else.
+ Thanks to Daniel E WILLIAMS for reporting this problem.
+
Wed Jan 10 07:20:39 WST 2007 John Darrington <john@darrington.wattle.id.au>
* psppire-case-file.c : Make sure there is always a valid flexifile
CASES_DELETED,
n_SIGNALS};
-static guint signal[n_SIGNALS];
+static guint signals [n_SIGNALS];
/* --- functions --- */
object_class->finalize = psppire_case_file_finalize;
- signal[CASE_CHANGED] =
+ signals [CASE_CHANGED] =
g_signal_new ("case_changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal[CASE_INSERTED] =
+ signals [CASE_INSERTED] =
g_signal_new ("case_inserted",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal[CASES_DELETED] =
+ signals [CASES_DELETED] =
g_signal_new ("cases_deleted",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
result = flexifile_delete_cases (FLEXIFILE (cf->flexifile), n_cases, first);
- g_signal_emit (cf, signal[CASES_DELETED], 0, n_cases, first);
+ g_signal_emit (cf, signals [CASES_DELETED], 0, n_cases, first);
return result;
}
result = flexifile_insert_case (FLEXIFILE (cf->flexifile), cc, posn);
if ( result )
- g_signal_emit (cf, signal[CASE_INSERTED], 0, posn);
+ g_signal_emit (cf, signals [CASE_INSERTED], 0, posn);
else
g_warning ("Cannot insert case at position %d\n", posn);
result = casefile_append (cf->flexifile, c);
- g_signal_emit (cf, signal[CASE_INSERTED], 0, posn);
+ g_signal_emit (cf, signals [CASE_INSERTED], 0, posn);
return result;
}
{
casefile_destroy (cf->flexifile);
cf->flexifile = 0;
- g_signal_emit (cf, signal[CASES_DELETED], 0, 0, -1);
+ g_signal_emit (cf, signals [CASES_DELETED], 0, 0, -1);
}
/* Set the IDXth value of case C to SYSMIS/EMPTY */
/* Cast away const in flagrant abuse of the casefile */
memcpy ((union value *)case_data_idx (&cc, idx), v, bytes);
- g_signal_emit (cf, signal[CASE_CHANGED], 0, casenum);
+ g_signal_emit (cf, signals [CASE_CHANGED], 0, casenum);
return TRUE;
}
(union value *) case_data_idx (&cc, idx), fmt_var_width (fmt)))
g_warning ("Cant set value\n");
- g_signal_emit (cf, signal[CASE_CHANGED], 0, casenum);
+ g_signal_emit (cf, signals [CASE_CHANGED], 0, casenum);
return TRUE;
}
/* FIXME: Need to have a signal to change a range of cases, instead of
calling a signal many times */
for ( c = 0 ; c < casefile_get_case_cnt (cf->flexifile) ; ++c )
- g_signal_emit (cf, signal[CASE_CHANGED], 0, c);
+ g_signal_emit (cf, signals [CASE_CHANGED], 0, c);
flexifile_factory_destroy (factory);
}
enum {FONT_CHANGED,
n_SIGNALS};
-static guint signal[n_SIGNALS];
+static guint signals [n_SIGNALS];
inline GType
object_class->finalize = psppire_data_store_finalize;
- signal[FONT_CHANGED] =
+ signals [FONT_CHANGED] =
g_signal_new ("font_changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
#if 0
store->width_of_m = calc_m_width (fd);
#endif
- g_signal_emit (store, signal[FONT_CHANGED], 0);
+ g_signal_emit (store, signals [FONT_CHANGED], 0);
g_sheet_model_range_changed (G_SHEET_MODEL (store),
enum {DIALOG_REFRESH,
n_SIGNALS};
-static guint signal [n_SIGNALS];
+static guint signals [n_SIGNALS];
GType
{
GObjectClass *object_class = (GObjectClass *) class;
- signal [DIALOG_REFRESH] =
+ signals [DIALOG_REFRESH] =
g_signal_new ("refresh",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
void
psppire_dialog_reload (PsppireDialog *dialog, gpointer data)
{
- g_signal_emit (dialog, signal [DIALOG_REFRESH], 0, data);
+ g_signal_emit (dialog, signals [DIALOG_REFRESH], 0, data);
}
SPLIT_CHANGED,
n_SIGNALS};
-static guint signal[n_SIGNALS];
+static guint signals [n_SIGNALS];
/* --- functions --- */
/**
object_class->finalize = psppire_dict_finalize;
- signal[VARIABLE_CHANGED] =
+ signals [VARIABLE_CHANGED] =
g_signal_new ("variable_changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
- signal[VARIABLE_INSERTED] =
+ signals [VARIABLE_INSERTED] =
g_signal_new ("variable_inserted",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal[VARIABLES_DELETED] =
+ signals [VARIABLES_DELETED] =
g_signal_new ("variables_deleted",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal[VARIABLE_RESIZED] =
+ signals [VARIABLE_RESIZED] =
g_signal_new ("dict-size-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal [WEIGHT_CHANGED] =
+ signals [WEIGHT_CHANGED] =
g_signal_new ("weight-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal [FILTER_CHANGED] =
+ signals [FILTER_CHANGED] =
g_signal_new ("filter-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal [SPLIT_CHANGED] =
+ signals [SPLIT_CHANGED] =
g_signal_new ("split-changed",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
static void
addcb (struct dictionary *d, int idx, void *pd)
{
- g_signal_emit (pd, signal[VARIABLE_INSERTED], 0, idx);
+ g_signal_emit (pd, signals [VARIABLE_INSERTED], 0, idx);
}
static void
delcb (struct dictionary *d, int idx, void *pd)
{
- g_signal_emit (pd, signal[VARIABLES_DELETED], 0, idx, 1);
+ g_signal_emit (pd, signals [VARIABLES_DELETED], 0, idx, 1);
}
static void
mutcb (struct dictionary *d, int idx, void *pd)
{
- g_signal_emit (pd, signal[VARIABLE_CHANGED], 0, idx);
+ g_signal_emit (pd, signals [VARIABLE_CHANGED], 0, idx);
}
static void
weight_changed_callback (struct dictionary *d, int idx, void *pd)
{
- g_signal_emit (pd, signal [WEIGHT_CHANGED], 0, idx);
+ g_signal_emit (pd, signals [WEIGHT_CHANGED], 0, idx);
}
static void
filter_changed_callback (struct dictionary *d, int idx, void *pd)
{
- g_signal_emit (pd, signal [FILTER_CHANGED], 0, idx);
+ g_signal_emit (pd, signals [FILTER_CHANGED], 0, idx);
}
static void
split_changed_callback (struct dictionary *d, void *pd)
{
- g_signal_emit (pd, signal [SPLIT_CHANGED], 0);
+ g_signal_emit (pd, signals [SPLIT_CHANGED], 0);
}
fv = var_get_case_index (pv);
- g_signal_emit (d, signal[VARIABLE_RESIZED], 0,
+ g_signal_emit (d, signals [VARIABLE_RESIZED], 0,
fv + old_size,
new_size - old_size );
}
DESELECT_ALL,
n_SIGNALS};
-static guint signal[n_SIGNALS];
+static guint signals [n_SIGNALS];
/* --- variables --- */
parent_class = g_type_class_peek_parent (class);
- signal [VARIABLE_SELECTED] =
+ signals [VARIABLE_SELECTED] =
g_signal_new ("variable_selected",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_TYPE_INT);
- signal [DESELECT_ALL] =
+ signals [DESELECT_ALL] =
g_signal_new ("deselect_all",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
}
vs->list = g_list_append (vs->list, var);
- g_signal_emit (vs, signal [VARIABLE_SELECTED], 0, var_get_dict_index (var));
+ g_signal_emit (vs, signals [VARIABLE_SELECTED], 0, var_get_dict_index (var));
}
gtk_entry_set_text ( GTK_ENTRY(vs->dest), "");
- g_signal_emit (vs, signal [DESELECT_ALL], 0);
+ g_signal_emit (vs, signals [DESELECT_ALL], 0);
}