GdkPixbuf *pb =
gdk_pixbuf_new_from_file_at_size (PKGDATADIR "/pspplogo.png", 64, 64, 0);
- gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG(about), pb);
+ gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about), pb);
- gtk_window_set_icon_from_file (GTK_WINDOW(about),
+ gtk_window_set_icon_from_file (GTK_WINDOW (about),
PKGDATADIR "/psppicon.png", 0);
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about),
(const gchar **) authors);
- gtk_window_set_transient_for (GTK_WINDOW(about), parent);
+ gtk_window_set_transient_for (GTK_WINDOW (about), parent);
gtk_window_set_modal (GTK_WINDOW (about), TRUE);
psppire_custom_entry_expose (GtkWidget *widget,
GdkEventExpose *event)
{
- PsppireCustomEntry *ce = PSPPIRE_CUSTOM_ENTRY(widget);
+ PsppireCustomEntry *ce = PSPPIRE_CUSTOM_ENTRY (widget);
g_return_val_if_fail (PSPPIRE_IS_CUSTOM_ENTRY (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
custom_entry_signals[CLICKED] =
g_signal_new ("clicked",
- G_TYPE_FROM_CLASS(gobject_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
data_editor_select_sheet (de, PAGE_DATA_SHEET);
- gtk_sheet_get_active_cell (GTK_SHEET(data_sheet),
+ gtk_sheet_get_active_cell (GTK_SHEET (data_sheet),
¤t_row, ¤t_column);
- gtk_sheet_set_active_cell (GTK_SHEET(data_sheet), current_row, row);
+ gtk_sheet_set_active_cell (GTK_SHEET (data_sheet), current_row, row);
return FALSE;
}
data_editor_select_sheet (de, PAGE_VAR_SHEET);
- gtk_sheet_get_active_cell (GTK_SHEET(var_sheet),
+ gtk_sheet_get_active_cell (GTK_SHEET (var_sheet),
¤t_row, ¤t_column);
- gtk_sheet_set_active_cell (GTK_SHEET(var_sheet), col, current_column);
+ gtk_sheet_set_active_cell (GTK_SHEET (var_sheet), col, current_column);
return FALSE;
}
gtk_file_filter_set_name (filter, _("System Files (*.sav)"));
gtk_file_filter_add_pattern (filter, "*.sav");
gtk_file_filter_add_pattern (filter, "*.SAV");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("Portable Files (*.por) "));
gtk_file_filter_add_pattern (filter, "*.por");
gtk_file_filter_add_pattern (filter, "*.POR");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files"));
gtk_file_filter_add_pattern (filter, "*");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
do {
if ( GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (dialog)) )
{
GtkSheet *data_sheet =
- GTK_SHEET(get_widget_assert (de->xml, "data_sheet"));
+ GTK_SHEET (get_widget_assert (de->xml, "data_sheet"));
GtkSheet *var_sheet =
- GTK_SHEET(get_widget_assert (de->xml, "variable_sheet"));
+ GTK_SHEET (get_widget_assert (de->xml, "variable_sheet"));
PsppireDataStore *ds = PSPPIRE_DATA_STORE (gtk_sheet_get_model (data_sheet));
PsppireVarStore *vs = PSPPIRE_VAR_STORE (gtk_sheet_get_model (var_sheet));
gint n_vars;
PsppireDataStore *data_store =
- PSPPIRE_DATA_STORE(gtk_sheet_get_model (sheet));
+ PSPPIRE_DATA_STORE (gtk_sheet_get_model (sheet));
g_assert (data_store);
/* The entry where the reference to the current cell is displayed */
GtkEntry *cell_ref_entry;
- PsppireDataStore *data_store = PSPPIRE_DATA_STORE(gtk_sheet_get_model (sheet));
+ PsppireDataStore *data_store = PSPPIRE_DATA_STORE (gtk_sheet_get_model (sheet));
if (data_store)
{
const struct variable *pv =
text = g_strdup_printf ("%d: %s", row,
pv ? var_get_name (pv) : "");
- cell_ref_entry = GTK_ENTRY(get_widget_assert (data_editor_xml,
+ cell_ref_entry = GTK_ENTRY (get_widget_assert (data_editor_xml,
"cell_ref_entry"));
s = pspp_locale_to_utf8 (text, -1, 0);
pango_layout_get_extents (layout, NULL, &rect);
- g_object_unref (G_OBJECT(layout));
- g_object_unref (G_OBJECT(context));
+ g_object_unref (G_OBJECT (layout));
+ g_object_unref (G_OBJECT (context));
- return PANGO_PIXELS(rect.width);
+ return PANGO_PIXELS (rect.width);
}
font_change_callback (GObject *obj, gpointer data)
{
GtkWidget *sheet = data;
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(obj);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (obj);
ds->width_of_m = calc_m_width (sheet, ds->font_desc);
}
{
GtkWidget *sheet;
- sheet = gtk_sheet_new (G_SHEET_ROW(the_data_store),
- G_SHEET_COLUMN(the_data_store), "data sheet", 0);
+ sheet = gtk_sheet_new (G_SHEET_ROW (the_data_store),
+ G_SHEET_COLUMN (the_data_store), "data sheet", 0);
the_data_store->width_of_m = calc_m_width (sheet, the_data_store->font_desc);
g_signal_connect (G_OBJECT (the_data_store), "font-changed",
G_CALLBACK (font_change_callback), sheet);
- gtk_sheet_set_active_cell (GTK_SHEET(sheet), -1, -1);
+ gtk_sheet_set_active_cell (GTK_SHEET (sheet), -1, -1);
- gtk_sheet_set_model (GTK_SHEET (sheet), G_SHEET_MODEL(the_data_store));
+ gtk_sheet_set_model (GTK_SHEET (sheet), G_SHEET_MODEL (the_data_store));
gtk_widget_show (sheet);
GTK_BUTTONS_CLOSE,
msg);
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
_("%s (line %d) %s"),
m->where.file_name,
m->where.line_number,
m->text);
- gtk_window_set_keep_above (GTK_WINDOW(dialog), TRUE);
+ gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
- gtk_dialog_run (GTK_DIALOG(dialog));
+ gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
hbox = gtk_hbox_new (FALSE, 10);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
+ gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
hbox);
- gtk_box_pack_start (GTK_BOX(hbox), icon, TRUE, FALSE, 10);
- gtk_box_pack_start (GTK_BOX(hbox), label, TRUE, TRUE, 10);
+ gtk_box_pack_start (GTK_BOX (hbox), icon, TRUE, FALSE, 10);
+ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 10);
gtk_widget_show_all (dialog);
}
for (i = 0 ; i < 3 ; ++i )
{
gchar *text =
- g_strdup (gtk_entry_get_text (GTK_ENTRY(dialog->mv[i])));
+ g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->mv[i])));
union value v;
if ( !text || strlen (g_strstrip (text)) == 0 )
if ( nvals == 0 || badvals > 0 )
{
err_dialog (_("Incorrect value for variable type"),
- GTK_WINDOW(dialog->window));
+ GTK_WINDOW (dialog->window));
return ;
}
}
union value low_val ;
union value high_val;
- const gchar *low_text = gtk_entry_get_text (GTK_ENTRY(dialog->low));
- const gchar *high_text = gtk_entry_get_text (GTK_ENTRY(dialog->high));
+ const gchar *low_text = gtk_entry_get_text (GTK_ENTRY (dialog->low));
+ const gchar *high_text = gtk_entry_get_text (GTK_ENTRY (dialog->high));
if ( text_to_value (low_text, &low_val, *write_spec)
&&
if ( low_val.f > high_val.f )
{
err_dialog (_("Incorrect range specification"),
- GTK_WINDOW(dialog->window));
+ GTK_WINDOW (dialog->window));
return ;
}
}
else
{
err_dialog (_("Incorrect range specification"),
- GTK_WINDOW(dialog->window));
+ GTK_WINDOW (dialog->window));
return;
}
discrete_text =
- g_strdup (gtk_entry_get_text (GTK_ENTRY(dialog->discrete)));
+ g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->discrete)));
mv_clear (&dialog->mvl);
mv_add_num_range (&dialog->mvl, low_val.f, high_val.f);
*write_spec))
{
err_dialog (_("Incorrect value for variable type"),
- GTK_WINDOW(dialog->window) );
+ GTK_WINDOW (dialog->window) );
g_free (discrete_text);
return;
}
dialog->window = get_widget_assert (xml, "missing_values_dialog");
gtk_window_set_transient_for
- (GTK_WINDOW(dialog->window),
- GTK_WINDOW(get_widget_assert (xml, "data_editor")));
+ (GTK_WINDOW (dialog->window),
+ GTK_WINDOW (get_widget_assert (xml, "data_editor")));
g_signal_connect_swapped (get_widget_assert (xml, "missing_val_cancel"),
- "clicked", G_CALLBACK(gtk_widget_hide), dialog->window);
+ "clicked", G_CALLBACK (gtk_widget_hide), dialog->window);
g_signal_connect (get_widget_assert (xml, "missing_val_ok"),
- "clicked", G_CALLBACK(missing_val_dialog_accept), dialog);
+ "clicked", G_CALLBACK (missing_val_dialog_accept), dialog);
dialog->mv[0] = get_widget_assert (xml, "mv0");
dialog->button_none =
- GTK_TOGGLE_BUTTON(get_widget_assert (xml, "no_missing"));
+ GTK_TOGGLE_BUTTON (get_widget_assert (xml, "no_missing"));
dialog->button_discrete =
- GTK_TOGGLE_BUTTON(get_widget_assert (xml, "discrete_missing"));
+ GTK_TOGGLE_BUTTON (get_widget_assert (xml, "discrete_missing"));
dialog->button_range =
- GTK_TOGGLE_BUTTON(get_widget_assert (xml, "range_missing"));
+ GTK_TOGGLE_BUTTON (get_widget_assert (xml, "range_missing"));
- g_signal_connect (G_OBJECT(dialog->button_discrete), "toggled",
- G_CALLBACK(discrete), dialog);
+ g_signal_connect (G_OBJECT (dialog->button_discrete), "toggled",
+ G_CALLBACK (discrete), dialog);
- g_signal_connect (G_OBJECT(dialog->button_range), "toggled",
- G_CALLBACK(range), dialog);
+ g_signal_connect (G_OBJECT (dialog->button_range), "toggled",
+ G_CALLBACK (range), dialog);
return dialog;
}
write_spec = var_get_write_format (dialog->pv);
/* Blank all entry boxes and make them insensitive */
- gtk_entry_set_text (GTK_ENTRY(dialog->low), "");
- gtk_entry_set_text (GTK_ENTRY(dialog->high), "");
- gtk_entry_set_text (GTK_ENTRY(dialog->discrete), "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->low), "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->high), "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->discrete), "");
gtk_widget_set_sensitive (dialog->low, FALSE);
gtk_widget_set_sensitive (dialog->high, FALSE);
gtk_widget_set_sensitive (dialog->discrete, FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET(dialog->button_range),
+ gtk_widget_set_sensitive (GTK_WIDGET (dialog->button_range),
var_is_numeric (dialog->pv));
for (i = 0 ; i < 3 ; ++i )
{
- gtk_entry_set_text (GTK_ENTRY(dialog->mv[i]), "");
+ gtk_entry_set_text (GTK_ENTRY (dialog->mv[i]), "");
gtk_widget_set_sensitive (dialog->mv[i], FALSE);
}
low_text = value_to_text (low, *write_spec);
high_text = value_to_text (high, *write_spec);
- gtk_entry_set_text (GTK_ENTRY(dialog->low), low_text);
- gtk_entry_set_text (GTK_ENTRY(dialog->high), high_text);
+ gtk_entry_set_text (GTK_ENTRY (dialog->low), low_text);
+ gtk_entry_set_text (GTK_ENTRY (dialog->high), high_text);
g_free (low_text);
g_free (high_text);
union value value;
mv_peek_value (&dialog->mvl, &value, 0);
text = value_to_text (value, *write_spec);
- gtk_entry_set_text (GTK_ENTRY(dialog->discrete), text);
+ gtk_entry_set_text (GTK_ENTRY (dialog->discrete), text);
g_free (text);
}
mv_peek_value (&dialog->mvl, &value, i);
text = value_to_text (value, *write_spec);
- gtk_entry_set_text (GTK_ENTRY(dialog->mv[i]), text);
+ gtk_entry_set_text (GTK_ENTRY (dialog->mv[i]), text);
g_free (text);
}
gtk_widget_set_sensitive (dialog->mv[i], TRUE);
signal[CASE_CHANGED] =
g_signal_new ("case_changed",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
signal[CASE_INSERTED] =
g_signal_new ("case_inserted",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
signal[CASES_DELETED] =
g_signal_new ("cases_deleted",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
g_return_val_if_fail (cf, FALSE);
g_return_val_if_fail (cf->flexifile, FALSE);
- result = flexifile_delete_cases (FLEXIFILE(cf->flexifile), n_cases, first);
+ result = flexifile_delete_cases (FLEXIFILE (cf->flexifile), n_cases, first);
g_signal_emit (cf, signal[CASES_DELETED], 0, n_cases, first);
g_return_val_if_fail (cf, FALSE);
g_return_val_if_fail (cf->flexifile, FALSE);
- result = flexifile_insert_case (FLEXIFILE(cf->flexifile), cc, posn);
+ result = flexifile_insert_case (FLEXIFILE (cf->flexifile), cc, posn);
if ( result )
g_signal_emit (cf, signal[CASE_INSERTED], 0, posn);
g_return_val_if_fail (idx < casefile_get_value_cnt (cf->flexifile), NULL);
- flexifile_get_case (FLEXIFILE(cf->flexifile), casenum, &c);
+ flexifile_get_case (FLEXIFILE (cf->flexifile), casenum, &c);
v = case_data_idx (&c, idx);
case_destroy (&c);
g_return_val_if_fail (idx < casefile_get_value_cnt (cf->flexifile), FALSE);
- if ( ! flexifile_get_case (FLEXIFILE(cf->flexifile), casenum, &cc) )
+ if ( ! flexifile_get_case (FLEXIFILE (cf->flexifile), casenum, &cc) )
return FALSE;
if ( width == 0 )
bytes = MAX_SHORT_STRING;
else
- bytes = DIV_RND_UP(width, MAX_SHORT_STRING) * MAX_SHORT_STRING ;
+ bytes = DIV_RND_UP (width, MAX_SHORT_STRING) * MAX_SHORT_STRING ;
/* Cast away const in flagrant abuse of the casefile */
memcpy ((union value *)case_data_idx (&cc, idx), v, bytes);
g_return_val_if_fail (idx < casefile_get_value_cnt (cf->flexifile), FALSE);
- if ( ! flexifile_get_case (FLEXIFILE(cf->flexifile), casenum, &cc) )
+ if ( ! flexifile_get_case (FLEXIFILE (cf->flexifile), casenum, &cc) )
return FALSE;
/* Cast away const in flagrant abuse of the casefile */
return TRUE;
}
- return flexifile_resize (FLEXIFILE(cf->flexifile), n_values, before);
+ return flexifile_resize (FLEXIFILE (cf->flexifile), n_values, before);
}
/* Fills C with the CASENUMth case.
g_return_val_if_fail (cf, FALSE);
g_return_val_if_fail (cf->flexifile, FALSE);
- return flexifile_get_case (FLEXIFILE(cf->flexifile), casenum, c);
+ return flexifile_get_case (FLEXIFILE (cf->flexifile), casenum, c);
}
signal[FONT_CHANGED] =
g_signal_new ("font_changed",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
static gint
psppire_data_store_get_var_count (const GSheetModel *model)
{
- const PsppireDataStore *store = PSPPIRE_DATA_STORE(model);
+ const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return psppire_dict_get_var_cnt (store->dict);
}
static gint
psppire_data_store_get_case_count (const GSheetModel *model)
{
- const PsppireDataStore *store = PSPPIRE_DATA_STORE(model);
+ const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return psppire_case_file_get_case_count (store->case_file);
}
psppire_data_store_get_font_desc (const GSheetModel *model,
gint row, gint column)
{
- PsppireDataStore *store = PSPPIRE_DATA_STORE(model);
+ PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return store->font_desc;
}
g_return_if_fail (data);
- store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE (data);
g_assert (first >= 0);
- g_sheet_model_rows_deleted (G_SHEET_MODEL(store), first, n_cases);
+ g_sheet_model_rows_deleted (G_SHEET_MODEL (store), first, n_cases);
}
g_return_if_fail (data);
- store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE (data);
- g_sheet_model_range_changed (G_SHEET_MODEL(store),
+ g_sheet_model_range_changed (G_SHEET_MODEL (store),
casenum, -1,
psppire_case_file_get_case_count (store->case_file),
-1);
- g_sheet_model_rows_inserted (G_SHEET_MODEL(store), casenum, 1);
+ g_sheet_model_rows_inserted (G_SHEET_MODEL (store), casenum, 1);
}
PsppireDataStore *store ;
g_return_if_fail (data);
- store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE (data);
- g_sheet_model_range_changed (G_SHEET_MODEL(store),
+ g_sheet_model_range_changed (G_SHEET_MODEL (store),
casenum, -1,
casenum, -1);
}
g_return_if_fail (data);
- store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE (data);
- g_sheet_model_columns_deleted (G_SHEET_MODEL(store), var_num, n_vars);
+ g_sheet_model_columns_deleted (G_SHEET_MODEL (store), var_num, n_vars);
- g_sheet_column_columns_changed (G_SHEET_COLUMN(store),
+ g_sheet_column_columns_changed (G_SHEET_COLUMN (store),
var_num, -1);
}
g_return_if_fail (data);
- store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE (data);
if ( var_num > 0 )
{
psppire_case_file_insert_values (store->case_file, 1, posn);
- g_sheet_column_columns_changed (G_SHEET_COLUMN(store),
+ g_sheet_column_columns_changed (G_SHEET_COLUMN (store),
var_num, 1);
- g_sheet_model_columns_inserted (G_SHEET_MODEL(store), var_num, 1);
+ g_sheet_model_columns_inserted (G_SHEET_MODEL (store), var_num, 1);
}
g_return_if_fail (data);
- store = PSPPIRE_DATA_STORE(data);
+ store = PSPPIRE_DATA_STORE (data);
psppire_case_file_insert_values (store->case_file, adjustment, posn);
}
data_store->case_file = psppire_case_file_new (var_cnt);
g_signal_connect (data_store->case_file, "cases-deleted",
- G_CALLBACK(delete_cases_callback),
+ G_CALLBACK (delete_cases_callback),
data_store);
g_signal_connect (data_store->case_file, "case-inserted",
- G_CALLBACK(insert_case_callback),
+ G_CALLBACK (insert_case_callback),
data_store);
g_signal_connect (data_store->case_file, "case-changed",
- G_CALLBACK(changed_case_callback),
+ G_CALLBACK (changed_case_callback),
data_store);
g_signal_connect (dict, "variable-inserted",
- G_CALLBACK(insert_variable_callback),
+ G_CALLBACK (insert_variable_callback),
data_store);
g_signal_connect (dict, "variables-deleted",
- G_CALLBACK(delete_variables_callback),
+ G_CALLBACK (delete_variables_callback),
data_store);
g_signal_connect (dict, "dict-size-changed",
- G_CALLBACK(dict_size_change_callback),
+ G_CALLBACK (dict_size_change_callback),
data_store);
/* The entire model has changed */
- g_sheet_model_range_changed (G_SHEET_MODEL(data_store), -1, -1, -1, -1);
+ g_sheet_model_range_changed (G_SHEET_MODEL (data_store), -1, -1, -1, -1);
- g_sheet_column_columns_changed (G_SHEET_COLUMN(data_store), 0, -1);
+ g_sheet_column_columns_changed (G_SHEET_COLUMN (data_store), 0, -1);
}
static void
const struct variable *pv ;
const union value *v ;
GString *s;
- PsppireDataStore *store = PSPPIRE_DATA_STORE(model);
+ PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
g_return_val_if_fail (store->dict, NULL);
g_return_val_if_fail (store->case_file, NULL);
gint row, gint col)
{
- PsppireDataStore *store = PSPPIRE_DATA_STORE(model);
+ PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
union value v;
const struct variable *pv = psppire_dict_get_variable (store->dict, col);
psppire_data_store_set_string (GSheetModel *model,
const gchar *text, gint row, gint col)
{
- PsppireDataStore *store = PSPPIRE_DATA_STORE(model);
+ PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
const struct variable *pv = psppire_dict_get_variable (store->dict, col);
g_return_val_if_fail (pv, FALSE);
g_signal_emit (store, signal[FONT_CHANGED], 0);
- g_sheet_model_range_changed (G_SHEET_MODEL(store),
+ g_sheet_model_range_changed (G_SHEET_MODEL (store),
-1, -1, -1, -1);
}
store->show_labels = show_labels;
- g_sheet_model_range_changed (G_SHEET_MODEL(store),
+ g_sheet_model_range_changed (G_SHEET_MODEL (store),
-1, -1, -1, -1);
}
return;
- var_cnt = psppire_data_store_get_var_count (G_SHEET_MODEL(store));
+ var_cnt = psppire_data_store_get_var_count (G_SHEET_MODEL (store));
for (i = 0 ; i < psppire_case_file_get_case_count (store->case_file); ++i )
{
static gint
geometry_get_column_count (const GSheetColumn *geom)
{
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
- return MAX(MIN_COLUMNS, psppire_dict_get_var_cnt (ds->dict));
+ return MAX (MIN_COLUMNS, psppire_dict_get_var_cnt (ds->dict));
}
geometry_get_width (const GSheetColumn *geom, gint unit)
{
const struct variable *pv ;
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
if ( unit >= psppire_dict_get_var_cnt (ds->dict) )
return ds->width_of_m * 8 ;
static void
geometry_set_width (GSheetColumn *geom, gint unit, gint width)
{
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
struct variable *pv = psppire_dict_get_variable (ds->dict, unit);
static GtkJustification
geometry_get_justification (const GSheetColumn *geom, gint unit)
{
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
const struct variable *pv ;
{
gchar *text;
struct variable *pv ;
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
if ( unit >= psppire_dict_get_var_cnt (ds->dict) )
return g_locale_to_utf8 (null_var_name, -1, 0, 0, 0);
static gboolean
geometry_get_sensitivity (const GSheetColumn *geom, gint unit)
{
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
return (unit < psppire_dict_get_var_cnt (ds->dict));
}
static gint
geometry_get_row_count (const GSheetRow *geom, gpointer data)
{
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
return TRAILING_ROWS + psppire_case_file_get_case_count (ds->case_file);
}
static gboolean
geometry_get_row_sensitivity (const GSheetRow *geom, gint unit, gpointer data)
{
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
return (unit < psppire_case_file_get_case_count (ds->case_file));
{
gchar *text;
gchar *s;
- PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
if ( unit >
TRAILING_ROWS + psppire_case_file_get_case_count (ds->case_file))
signal[VARIABLE_CHANGED] =
g_signal_new ("variable_changed",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
signal[VARIABLE_INSERTED] =
g_signal_new ("variable_inserted",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
signal[VARIABLES_DELETED] =
g_signal_new ("variables_deleted",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
signal[VARIABLE_RESIZED] =
g_signal_new ("dict-size-changed",
- G_TYPE_FROM_CLASS(class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL,
{
struct variable *var ;
g_return_if_fail (d);
- g_return_if_fail (G_IS_PSPPIRE_DICT(d));
+ g_return_if_fail (G_IS_PSPPIRE_DICT (d));
if ( ! name )
gint idx;
g_return_if_fail (d);
g_return_if_fail (d->dict);
- g_return_if_fail (G_IS_PSPPIRE_DICT(d));
+ g_return_if_fail (G_IS_PSPPIRE_DICT (d));
for (idx = 0 ; idx < n ; ++idx )
{
{
struct variable *var;
g_assert (d);
- g_assert (G_IS_PSPPIRE_DICT(d));
+ g_assert (G_IS_PSPPIRE_DICT (d));
if ( idx < dict_get_var_cnt (d->dict))
static GtkTreeModelFlags
tree_model_get_flags (GtkTreeModel *model)
{
- g_return_val_if_fail (G_IS_PSPPIRE_DICT(model), (GtkTreeModelFlags) 0);
+ g_return_val_if_fail (G_IS_PSPPIRE_DICT (model), (GtkTreeModelFlags) 0);
return GTK_TREE_MODEL_LIST_ONLY;
}
static GType
tree_model_column_type (GtkTreeModel *model, gint index)
{
- g_return_val_if_fail (G_IS_PSPPIRE_DICT(model), (GType) 0);
+ g_return_val_if_fail (G_IS_PSPPIRE_DICT (model), (GType) 0);
switch (index)
{
GtkTreeIter *parent, gint n)
{
PsppireDict *dict;
- g_return_val_if_fail (G_IS_PSPPIRE_DICT(model), FALSE);
+ g_return_val_if_fail (G_IS_PSPPIRE_DICT (model), FALSE);
- dict = PSPPIRE_DICT(model);
+ dict = PSPPIRE_DICT (model);
if ( parent )
return FALSE;
static gboolean
psppire_var_store_is_editable (const GSheetModel *model, gint row, gint column)
{
- PsppireVarStore *store = PSPPIRE_VAR_STORE(model);
+ PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
return psppire_var_store_item_editable (store, row, column);
}
static const GdkColor *
psppire_var_store_get_foreground (const GSheetModel *model, gint row, gint column)
{
- PsppireVarStore *store = PSPPIRE_VAR_STORE(model);
+ PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
if ( ! psppire_var_store_item_editable (store, row, column) )
return &store->disabled;
psppire_var_store_get_font_desc (const GSheetModel *model,
gint row, gint column)
{
- PsppireVarStore *store = PSPPIRE_VAR_STORE(model);
+ PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
return store->font_desc;
}
static void
var_change_callback (GtkWidget *w, gint n, gpointer data)
{
- GSheetModel *model = G_SHEET_MODEL(data);
+ GSheetModel *model = G_SHEET_MODEL (data);
g_sheet_model_range_changed (model,
n, 0, n, n_COLS);
}
static void
var_delete_callback (GtkWidget *w, gint first, gint n, gpointer data)
{
- GSheetModel *model = G_SHEET_MODEL(data);
+ GSheetModel *model = G_SHEET_MODEL (data);
g_sheet_model_rows_deleted (model, first, n);
}
static void
var_insert_callback (GtkWidget *w, gint row, gpointer data)
{
- GSheetModel *model = G_SHEET_MODEL(data);
+ GSheetModel *model = G_SHEET_MODEL (data);
g_sheet_model_rows_inserted (model, row, 1);
}
var_store->dict = dict;
- g_signal_connect (dict, "variable-changed", G_CALLBACK(var_change_callback),
+ g_signal_connect (dict, "variable-changed", G_CALLBACK (var_change_callback),
var_store);
- g_signal_connect (dict, "variables-deleted", G_CALLBACK(var_delete_callback),
+ g_signal_connect (dict, "variables-deleted", G_CALLBACK (var_delete_callback),
var_store);
- g_signal_connect (dict, "variable-inserted", G_CALLBACK(var_insert_callback),
+ g_signal_connect (dict, "variable-inserted", G_CALLBACK (var_insert_callback),
var_store);
/* The entire model has changed */
- g_sheet_model_range_changed (G_SHEET_MODEL(var_store), -1, -1, -1, -1);
+ g_sheet_model_range_changed (G_SHEET_MODEL (var_store), -1, -1, -1, -1);
}
static void
static gchar *
psppire_var_store_get_string (const GSheetModel *model, gint row, gint column)
{
- PsppireVarStore *store = PSPPIRE_VAR_STORE(model);
+ PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
struct variable *pv;
{
struct variable *pv ;
- PsppireVarStore *var_store = PSPPIRE_VAR_STORE(model);
+ PsppireVarStore *var_store = PSPPIRE_VAR_STORE (model);
if ( row >= psppire_dict_get_var_cnt (var_store->dict))
return FALSE;
{
struct variable *pv ;
- PsppireVarStore *var_store = PSPPIRE_VAR_STORE(model);
+ PsppireVarStore *var_store = PSPPIRE_VAR_STORE (model);
if ( row >= psppire_dict_get_var_cnt (var_store->dict))
return FALSE;
store->font_desc = fd;
- g_sheet_model_range_changed (G_SHEET_MODEL(store), -1, -1, -1, -1);
+ g_sheet_model_range_changed (G_SHEET_MODEL (store), -1, -1, -1, -1);
}
psppire_var_store_get_row_count (const GSheetModel * model)
{
gint rows = 0;
- PsppireVarStore *vs = PSPPIRE_VAR_STORE(model);
+ PsppireVarStore *vs = PSPPIRE_VAR_STORE (model);
if (vs->dict)
rows = psppire_dict_get_var_cnt (vs->dict);
geometry_get_row_count (const GSheetRow *geom, gpointer data)
{
gint rows = 0;
- PsppireVarStore *vs = PSPPIRE_VAR_STORE(geom);
+ PsppireVarStore *vs = PSPPIRE_VAR_STORE (geom);
if (vs->dict)
rows = psppire_dict_get_var_cnt (vs->dict);
static gboolean
geometry_is_sensitive (const GSheetRow *geom, gint row, gpointer data)
{
- PsppireVarStore *vs = PSPPIRE_VAR_STORE(geom);
+ PsppireVarStore *vs = PSPPIRE_VAR_STORE (geom);
if ( ! vs->dict)
return FALSE;
/* connect the signals in the interface */
glade_xml_signal_autoconnect (data_editor_xml);
- var_sheet = GTK_SHEET(get_widget_assert (data_editor_xml, "variable_sheet"));
- data_sheet = GTK_SHEET(get_widget_assert (data_editor_xml, "data_sheet"));
+ var_sheet = GTK_SHEET (get_widget_assert (data_editor_xml, "variable_sheet"));
+ data_sheet = GTK_SHEET (get_widget_assert (data_editor_xml, "data_sheet"));
- gtk_sheet_set_model (var_sheet, G_SHEET_MODEL(the_var_store));
+ gtk_sheet_set_model (var_sheet, G_SHEET_MODEL (the_var_store));
- gtk_sheet_set_model (data_sheet, G_SHEET_MODEL(the_data_store));
+ gtk_sheet_set_model (data_sheet, G_SHEET_MODEL (the_data_store));
var_data_selection_init ();
GList *i;
for ( i = g_list_first (helps); i ; i = g_list_next (i))
- g_signal_connect (GTK_WIDGET(i->data), "clicked", give_help, 0);
+ g_signal_connect (GTK_WIDGET (i->data), "clicked", give_help, 0);
}
#endif
path = gtk_tree_row_reference_get_path (row_ref);
- gtk_tree_model_get_iter (GTK_TREE_MODEL(dialog->criteria_list), &iter, path);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->criteria_list), &iter, path);
gtk_list_store_remove (dialog->criteria_list, &iter);
dialog->window = get_widget_assert (xml, "sort-cases-dialog");
- dialog->dict_view = GTK_TREE_VIEW(get_widget_assert
+ dialog->dict_view = GTK_TREE_VIEW (get_widget_assert
(xml, "sort-cases-treeview-dict"));
- dialog->criteria_view = GTK_TREE_VIEW(get_widget_assert
+ dialog->criteria_view = GTK_TREE_VIEW (get_widget_assert
(xml, "sort-cases-treeview-criteria"));
- dialog->arrow = GTK_ARROW(get_widget_assert (xml, "sort-cases-arrow"));
- dialog->button = GTK_BUTTON(get_widget_assert (xml, "sort-cases-button"));
+ dialog->arrow = GTK_ARROW (get_widget_assert (xml, "sort-cases-arrow"));
+ dialog->button = GTK_BUTTON (get_widget_assert (xml, "sort-cases-button"));
dialog->ascending_button =
- GTK_TOGGLE_BUTTON(get_widget_assert (xml, "sort-cases-button-ascending"));
+ GTK_TOGGLE_BUTTON (get_widget_assert (xml, "sort-cases-button-ascending"));
g_signal_connect (dialog->window, "delete-event",
- G_CALLBACK(delete_event_callback), dialog);
+ G_CALLBACK (delete_event_callback), dialog);
g_signal_connect (get_widget_assert (xml, "sort-cases-cancel"),
- "clicked", G_CALLBACK(sort_cases_cancel_callback), dialog);
+ "clicked", G_CALLBACK (sort_cases_cancel_callback), dialog);
g_signal_connect (get_widget_assert (xml, "sort-cases-ok"),
- "clicked", G_CALLBACK(sort_cases_ok_callback), dialog);
+ "clicked", G_CALLBACK (sort_cases_ok_callback), dialog);
g_signal_connect (get_widget_assert (xml, "sort-cases-reset"),
- "clicked", G_CALLBACK(sort_cases_reset_callback), dialog);
+ "clicked", G_CALLBACK (sort_cases_reset_callback), dialog);
g_signal_connect (get_widget_assert (xml, "sort-cases-button"),
- "clicked", G_CALLBACK(sort_cases_button_callback), dialog);
+ "clicked", G_CALLBACK (sort_cases_button_callback), dialog);
{
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
g_signal_connect (selection, "changed",
- G_CALLBACK(dictionary_selection_changed), dialog);
+ G_CALLBACK (dictionary_selection_changed), dialog);
}
{
gtk_tree_view_column_set_sizing (dialog->crit_col, GTK_TREE_VIEW_COLUMN_FIXED);
- gtk_tree_view_append_column (GTK_TREE_VIEW(dialog->criteria_view),
+ gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->criteria_view),
dialog->crit_col);
g_signal_connect (selection, "changed",
- G_CALLBACK(criteria_selection_changed), dialog);
+ G_CALLBACK (criteria_selection_changed), dialog);
}
{
);
gtk_tree_view_set_model (dialog->criteria_view,
- GTK_TREE_MODEL(dialog->criteria_list));
+ GTK_TREE_MODEL (dialog->criteria_list));
}
dialog->response = GTK_RESPONSE_NONE;
{
g_assert (! g_main_loop_is_running (dialog->loop));
- gtk_tree_view_set_model (GTK_TREE_VIEW(dialog->dict_view),
- GTK_TREE_MODEL(dict));
+ gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->dict_view),
+ GTK_TREE_MODEL (dict));
gtk_tree_view_column_set_cell_data_func (dialog->crit_col,
gboolean valid;
gint n = 0;
- GtkTreeModel *model = GTK_TREE_MODEL(list);
+ GtkTreeModel *model = GTK_TREE_MODEL (list);
criteria->crit_cnt = gtk_tree_model_iter_n_children (model, NULL);
{
gint response;
GtkWidget *dialog =
- gtk_message_dialog_new (GTK_WINDOW(e->window),
+ gtk_message_dialog_new (GTK_WINDOW (e->window),
GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_NONE,
e->name ? e->name : _("Untitled")
);
- gtk_dialog_add_button (GTK_DIALOG(dialog),
+ gtk_dialog_add_button (GTK_DIALOG (dialog),
GTK_STOCK_YES,
GTK_RESPONSE_ACCEPT);
- gtk_dialog_add_button (GTK_DIALOG(dialog),
+ gtk_dialog_add_button (GTK_DIALOG (dialog),
GTK_STOCK_NO,
GTK_RESPONSE_REJECT);
- gtk_dialog_add_button (GTK_DIALOG(dialog),
+ gtk_dialog_add_button (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
- response = gtk_dialog_run (GTK_DIALOG(dialog));
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
GtkWidget *dialog =
gtk_file_chooser_dialog_new (_("Save Syntax"),
- GTK_WINDOW(e->window),
+ GTK_WINDOW (e->window),
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
gtk_file_filter_set_name (filter, _("Syntax Files (*.sps) "));
gtk_file_filter_add_pattern (filter, "*.sps");
gtk_file_filter_add_pattern (filter, "*.SPS");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files"));
gtk_file_filter_add_pattern (filter, "*");
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
- gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER(dialog),
+ gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog),
TRUE);
response = gtk_dialog_run (GTK_DIALOG (dialog));
e->window = get_widget_assert (xml, "syntax_editor");
text_view = get_widget_assert (xml, "syntax_text_view");
- se->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(text_view));
+ se->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
se->lexer = lex_create (the_source_stream);
g_signal_connect (get_widget_assert (xml,"file_new_syntax"),
GtkWidget *dialog =
gtk_file_chooser_dialog_new (_("Open Syntax"),
- GTK_WINDOW(parent),
+ GTK_WINDOW (parent),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
gtk_file_filter_set_name (filter, _("Syntax Files (*.sps) "));
gtk_file_filter_add_pattern (filter, "*.sps");
gtk_file_filter_add_pattern (filter, "*.SPS");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(dialog), filter);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
filter = gtk_file_filter_new ();
gtk_file_filter_set_name (filter, _("All Files"));
gint *new_row, gint *new_column
)
{
- PsppireVarStore *var_store = PSPPIRE_VAR_STORE(gtk_sheet_get_model (sheet));
+ PsppireVarStore *var_store = PSPPIRE_VAR_STORE (gtk_sheet_get_model (sheet));
gint n_vars = psppire_var_store_get_var_cnt (var_store);
if ( row == n_vars && *new_row >= n_vars)
{
- GtkEntry *entry = GTK_ENTRY(gtk_sheet_get_entry (sheet));
+ GtkEntry *entry = GTK_ENTRY (gtk_sheet_get_entry (sheet));
const gchar *name = gtk_entry_get_text (entry);
GtkComboBoxEntry *cbe;
gtk_sheet_change_entry (sheet, GTK_TYPE_COMBO_BOX_ENTRY);
cbe =
- GTK_COMBO_BOX_ENTRY(gtk_sheet_get_entry (sheet)->parent);
+ GTK_COMBO_BOX_ENTRY (gtk_sheet_get_entry (sheet)->parent);
if ( ! list_store) list_store = create_label_list (alignments);
- gtk_combo_box_set_model (GTK_COMBO_BOX(cbe),
- GTK_TREE_MODEL(list_store));
+ gtk_combo_box_set_model (GTK_COMBO_BOX (cbe),
+ GTK_TREE_MODEL (list_store));
gtk_combo_box_entry_set_text_column (cbe, 0);
- g_signal_connect (G_OBJECT(cbe),"changed",
- G_CALLBACK(change_alignment), pv);
+ g_signal_connect (G_OBJECT (cbe),"changed",
+ G_CALLBACK (change_alignment), pv);
}
break;
case COL_MEASURE:
GtkComboBoxEntry *cbe;
gtk_sheet_change_entry (sheet, GTK_TYPE_COMBO_BOX_ENTRY);
cbe =
- GTK_COMBO_BOX_ENTRY(gtk_sheet_get_entry (sheet)->parent);
+ GTK_COMBO_BOX_ENTRY (gtk_sheet_get_entry (sheet)->parent);
if ( ! list_store) list_store = create_label_list (measures);
- gtk_combo_box_set_model (GTK_COMBO_BOX(cbe),
- GTK_TREE_MODEL(list_store));
+ gtk_combo_box_set_model (GTK_COMBO_BOX (cbe),
+ GTK_TREE_MODEL (list_store));
gtk_combo_box_entry_set_text_column (cbe, 0);
- g_signal_connect (G_OBJECT(cbe),"changed",
+ g_signal_connect (G_OBJECT (cbe),"changed",
G_CALLBACK (change_measure), pv);
}
break;
gtk_sheet_change_entry (sheet, PSPPIRE_CUSTOM_ENTRY_TYPE);
customEntry =
- PSPPIRE_CUSTOM_ENTRY(gtk_sheet_get_entry (sheet));
+ PSPPIRE_CUSTOM_ENTRY (gtk_sheet_get_entry (sheet));
if (!val_labs_dialog )
val_labs_dialog->pv = pv;
- g_signal_connect_swapped (GTK_OBJECT(customEntry),
+ g_signal_connect_swapped (GTK_OBJECT (customEntry),
"clicked",
- GTK_SIGNAL_FUNC(val_labs_dialog_show),
+ GTK_SIGNAL_FUNC (val_labs_dialog_show),
val_labs_dialog);
}
break;
gtk_sheet_change_entry (sheet, PSPPIRE_CUSTOM_ENTRY_TYPE);
customEntry =
- PSPPIRE_CUSTOM_ENTRY(gtk_sheet_get_entry (sheet));
+ PSPPIRE_CUSTOM_ENTRY (gtk_sheet_get_entry (sheet));
if (!missing_val_dialog )
missing_val_dialog = missing_val_dialog_create (xml);
missing_val_dialog->pv = psppire_var_store_get_var (var_store, row);
- g_signal_connect_swapped (GTK_OBJECT(customEntry),
+ g_signal_connect_swapped (GTK_OBJECT (customEntry),
"clicked",
- GTK_SIGNAL_FUNC(missing_val_dialog_show),
+ GTK_SIGNAL_FUNC (missing_val_dialog_show),
missing_val_dialog);
}
break;
gtk_sheet_change_entry (sheet, PSPPIRE_CUSTOM_ENTRY_TYPE);
customEntry =
- PSPPIRE_CUSTOM_ENTRY(gtk_sheet_get_entry (sheet));
+ PSPPIRE_CUSTOM_ENTRY (gtk_sheet_get_entry (sheet));
/* Popup the Variable Type dialog box */
var_type_dialog->pv = pv;
- g_signal_connect_swapped (GTK_OBJECT(customEntry),
+ g_signal_connect_swapped (GTK_OBJECT (customEntry),
"clicked",
- GTK_SIGNAL_FUNC(var_type_dialog_show),
+ GTK_SIGNAL_FUNC (var_type_dialog_show),
var_type_dialog);
}
break;
gtk_sheet_change_entry (sheet, GTK_TYPE_SPIN_BUTTON);
spinButton =
- GTK_SPIN_BUTTON(gtk_sheet_get_entry (sheet));
+ GTK_SPIN_BUTTON (gtk_sheet_get_entry (sheet));
- gtk_spin_button_set_adjustment (spinButton, GTK_ADJUSTMENT(adj));
+ gtk_spin_button_set_adjustment (spinButton, GTK_ADJUSTMENT (adj));
gtk_spin_button_set_digits (spinButton, 0);
}
}
g_assert (the_var_store);
- sheet = gtk_sheet_new (G_SHEET_ROW(the_var_store),
- G_SHEET_COLUMN(geo),
+ sheet = gtk_sheet_new (G_SHEET_ROW (the_var_store),
+ G_SHEET_COLUMN (geo),
"variable sheet", 0);
GTK_SIGNAL_FUNC (traverse_cell_callback), 0);
- gtk_sheet_set_model (GTK_SHEET (sheet), G_SHEET_MODEL(the_var_store));
+ gtk_sheet_set_model (GTK_SHEET (sheet), G_SHEET_MODEL (the_var_store));
/* Since this happens inside glade_xml_new, we must prevent strings from
bind_textdomain_codeset (PACKAGE, nl_langinfo (CODESET));
for (i = 0 ; i < n_COLS ; ++i )
{
- g_sheet_hetero_column_set_button_label (G_SHEET_HETERO_COLUMN(geo), i,
+ g_sheet_hetero_column_set_button_label (G_SHEET_HETERO_COLUMN (geo), i,
gettext (column_def[i].label));
- g_sheet_hetero_column_set_width (G_SHEET_HETERO_COLUMN(geo), i,
+ g_sheet_hetero_column_set_width (G_SHEET_HETERO_COLUMN (geo), i,
column_def[i].width);
}
bind_textdomain_codeset (PACKAGE, codeset);
g_assert (dialog);
text = g_strdup_printf ("%d", dialog->fmt_l.w);
- gtk_entry_set_text (GTK_ENTRY(dialog->entry_width), text);
+ gtk_entry_set_text (GTK_ENTRY (dialog->entry_width), text);
g_free (text);
text = g_strdup_printf ("%d", dialog->fmt_l.d);
- gtk_entry_set_text (GTK_ENTRY(dialog->entry_decimals), text);
+ gtk_entry_set_text (GTK_ENTRY (dialog->entry_decimals), text);
g_free (text);
}
if ( dialog->active_button != BUTTON_CUSTOM )
return;
- text = gtk_entry_get_text (GTK_ENTRY(dialog->entry_decimals));
+ text = gtk_entry_get_text (GTK_ENTRY (dialog->entry_decimals));
dialog->fmt_l.d = atoi (text);
- text = gtk_entry_get_text (GTK_ENTRY(dialog->entry_width));
+ text = gtk_entry_get_text (GTK_ENTRY (dialog->entry_width));
dialog->fmt_l.w = atoi (text);
msg_disable ();
if ( ! fmt_check_output (&dialog->fmt_l))
{
- gtk_label_set_text (GTK_LABEL(dialog->label_psample), "---");
- gtk_label_set_text (GTK_LABEL(dialog->label_nsample), "---");
+ gtk_label_set_text (GTK_LABEL (dialog->label_psample), "---");
+ gtk_label_set_text (GTK_LABEL (dialog->label_nsample), "---");
}
else
{
v.f = 1234.56;
sample_text = value_to_text (v, dialog->fmt_l);
- gtk_label_set_text (GTK_LABEL(dialog->label_psample), sample_text);
+ gtk_label_set_text (GTK_LABEL (dialog->label_psample), sample_text);
g_free (sample_text);
v.f = -v.f;
sample_text = value_to_text (v, dialog->fmt_l);
- gtk_label_set_text (GTK_LABEL(dialog->label_nsample), sample_text);
+ gtk_label_set_text (GTK_LABEL (dialog->label_nsample), sample_text);
g_free (sample_text);
}
msg_enable ();
dialog->window = get_widget_assert (xml,"var_type_dialog");
- gtk_window_set_transient_for (GTK_WINDOW(dialog->window),
- GTK_WINDOW(get_widget_assert (xml, "data_editor")));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog->window),
+ GTK_WINDOW (get_widget_assert (xml, "data_editor")));
dialog->radioButton[BUTTON_NUMERIC] =
get_widget_assert (xml,"radiobutton1");
dialog->dollar_window = get_widget_assert (xml, "dollar_window");
dialog->dollar_treeview =
- GTK_TREE_VIEW(get_widget_assert (xml, "dollar_treeview"));
+ GTK_TREE_VIEW (get_widget_assert (xml, "dollar_treeview"));
dialog->custom_treeview =
- GTK_TREE_VIEW(get_widget_assert (xml, "custom_treeview"));
+ GTK_TREE_VIEW (get_widget_assert (xml, "custom_treeview"));
dialog->ok = get_widget_assert (xml,"var_type_ok");
upleasant resizing effects */
GtkSizeGroup *sizeGroup = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_container_foreach (GTK_CONTAINER(get_widget_assert (xml, "middle_box")),
+ gtk_container_foreach (GTK_CONTAINER (get_widget_assert (xml, "middle_box")),
add_to_group, sizeGroup);
tgs[i].dialog = dialog;
tgs[i].button = i;
g_signal_connect (dialog->radioButton[i], "toggled",
- G_CALLBACK(on_toggle_1), &tgs[i]);
+ G_CALLBACK (on_toggle_1), &tgs[i]);
g_signal_connect (dialog->radioButton[i], "toggled",
- G_CALLBACK(on_toggle_2), dialog);
+ G_CALLBACK (on_toggle_2), dialog);
}
/* Populate the date format tree view */
- dialog->date_format_treeview = GTK_TREE_VIEW(get_widget_assert (xml,
+ dialog->date_format_treeview = GTK_TREE_VIEW (get_widget_assert (xml,
"date_format_list_view"));
renderer = gtk_cell_renderer_text_new ();
-1);
}
- gtk_tree_view_set_model (GTK_TREE_VIEW(dialog->date_format_treeview),
- GTK_TREE_MODEL(list_store));
+ gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->date_format_treeview),
+ GTK_TREE_MODEL (list_store));
g_object_unref (list_store);
- g_signal_connect (GTK_OBJECT(dialog->date_format_treeview), "cursor-changed",
- GTK_SIGNAL_FUNC(set_format_from_treeview), dialog);
+ g_signal_connect (GTK_OBJECT (dialog->date_format_treeview), "cursor-changed",
+ GTK_SIGNAL_FUNC (set_format_from_treeview), dialog);
/* populate the dollar treeview */
free (template);
}
- gtk_tree_view_set_model (GTK_TREE_VIEW(dialog->dollar_treeview),
- GTK_TREE_MODEL(list_store));
+ gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->dollar_treeview),
+ GTK_TREE_MODEL (list_store));
g_object_unref (list_store);
- g_signal_connect (GTK_OBJECT(dialog->dollar_treeview),
+ g_signal_connect (GTK_OBJECT (dialog->dollar_treeview),
"cursor-changed",
- GTK_SIGNAL_FUNC(set_format_from_treeview), dialog);
+ GTK_SIGNAL_FUNC (set_format_from_treeview), dialog);
- g_signal_connect_swapped (GTK_OBJECT(dialog->dollar_treeview),
+ g_signal_connect_swapped (GTK_OBJECT (dialog->dollar_treeview),
"cursor-changed",
- GTK_SIGNAL_FUNC(update_width_decimals), dialog);
+ GTK_SIGNAL_FUNC (update_width_decimals), dialog);
/* populate the custom treeview */
-1);
}
- gtk_tree_view_set_model (GTK_TREE_VIEW(dialog->custom_treeview),
- GTK_TREE_MODEL(list_store));
+ gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->custom_treeview),
+ GTK_TREE_MODEL (list_store));
g_object_unref (list_store);
- g_signal_connect (GTK_OBJECT(dialog->custom_treeview),
+ g_signal_connect (GTK_OBJECT (dialog->custom_treeview),
"cursor-changed",
- GTK_SIGNAL_FUNC(set_format_type_from_treeview), dialog);
+ GTK_SIGNAL_FUNC (set_format_type_from_treeview), dialog);
- g_signal_connect (GTK_OBJECT(dialog->custom_treeview),
+ g_signal_connect (GTK_OBJECT (dialog->custom_treeview),
"cursor-changed",
- GTK_SIGNAL_FUNC(preview_custom), dialog);
+ GTK_SIGNAL_FUNC (preview_custom), dialog);
- g_signal_connect (GTK_OBJECT(dialog->entry_width),
+ g_signal_connect (GTK_OBJECT (dialog->entry_width),
"changed",
- GTK_SIGNAL_FUNC(preview_custom), dialog);
+ GTK_SIGNAL_FUNC (preview_custom), dialog);
- g_signal_connect (GTK_OBJECT(dialog->entry_decimals),
+ g_signal_connect (GTK_OBJECT (dialog->entry_decimals),
"changed",
- GTK_SIGNAL_FUNC(preview_custom), dialog);
+ GTK_SIGNAL_FUNC (preview_custom), dialog);
/* Connect the OK button */
- g_signal_connect (dialog->ok, "clicked", G_CALLBACK(on_var_type_ok_clicked),
+ g_signal_connect (dialog->ok, "clicked", G_CALLBACK (on_var_type_ok_clicked),
dialog);
void
var_type_dialog_set_active_button (struct var_type_dialog *dialog, gint b)
{
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->radioButton[b]),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->radioButton[b]),
TRUE);
dialog->active_button = b;
}
g_string_printf (str, "%d", write_spec->d);
- gtk_entry_set_text (GTK_ENTRY(dialog->entry_decimals),
+ gtk_entry_set_text (GTK_ENTRY (dialog->entry_decimals),
str->str);
g_string_printf (str, "%d", write_spec->w);
- gtk_entry_set_text (GTK_ENTRY(dialog->entry_width),
+ gtk_entry_set_text (GTK_ENTRY (dialog->entry_width),
str->str);
g_string_free (str, TRUE);
{
gint width = atoi (gtk_entry_get_text
- (GTK_ENTRY(dialog->entry_width)));
+ (GTK_ENTRY (dialog->entry_width)));
gint decimals = atoi (gtk_entry_get_text
- (GTK_ENTRY(dialog->entry_decimals)));
+ (GTK_ENTRY (dialog->entry_decimals)));
gint new_type = VAR_NUMERIC;
gint new_width = 0;
set_window_name (e, name);
- gtk_window_set_icon_from_file (GTK_WINDOW(e->window),
+ gtk_window_set_icon_from_file (GTK_WINDOW (e->window),
PKGDATADIR "/psppicon.png", 0);
g_signal_connect (e->window, "destroy", G_CALLBACK (deregister), NULL);
g_assert_not_reached ();
}
- gtk_window_set_title (GTK_WINDOW(e->window), title);
+ gtk_window_set_title (GTK_WINDOW (e->window), title);
g_free (title);
}
}
g_free (basename);
- gtk_window_set_title (GTK_WINDOW(e->window), title);
+ gtk_window_set_title (GTK_WINDOW (e->window), title);
g_free (title);
}
GtkWindow *
window_toplevel (const struct editor_window *e)
{
- return GTK_WINDOW(e->window);
+ return GTK_WINDOW (e->window);
}
const gchar *