73 |
|
|
74 |
GtkSheet *sheet = GTK_SHEET(data); |
GtkSheet *sheet = GTK_SHEET(data); |
75 |
|
|
76 |
struct variable *var = g_ptr_array_index(dict->array, column); |
struct variable *var = pspp_dict_get_var(dict, column); |
77 |
|
|
78 |
gtk_sheet_column_button_add_label (sheet, column, var->name); |
gtk_sheet_column_button_add_label (sheet, column, var->name); |
79 |
|
|
80 |
psppire_data_sheet_col_set_enable(sheet, column, column, TRUE); |
psppire_data_sheet_col_set_enable(sheet, column, column, TRUE); |
93 |
|
|
94 |
for ( col = from ; col <= to ; ++col ) |
for ( col = from ; col <= to ; ++col ) |
95 |
{ |
{ |
96 |
struct variable *var = g_ptr_array_index(dict->array, col); |
if ( col < pspp_dict_get_var_cnt(dict)) |
|
|
|
|
if ( col < dict->array->len) |
|
97 |
{ |
{ |
98 |
|
struct variable *var = pspp_dict_get_var(dict, col); |
99 |
|
|
100 |
gtk_sheet_column_button_add_label (sheet, col, var->name); |
gtk_sheet_column_button_add_label (sheet, col, var->name); |
101 |
psppire_data_sheet_col_set_enable(sheet, col, col, TRUE); |
psppire_data_sheet_col_set_enable(sheet, col, col, TRUE); |
102 |
} |
} |
103 |
else |
else |
104 |
{ |
{ |
105 |
|
GtkSheetRange this_column; |
106 |
|
this_column.col0 = this_column.coli = col; |
107 |
|
this_column.row0 = 0; |
108 |
|
this_column.rowi = gtk_sheet_get_rows_count(sheet) - 1 ; |
109 |
|
|
110 |
|
|
111 |
gtk_sheet_column_button_add_label (sheet, col, _("var")); |
gtk_sheet_column_button_add_label (sheet, col, _("var")); |
112 |
|
|
113 |
|
/* Clear the columns variables no longer valid, |
114 |
|
and disable them |
115 |
|
*/ |
116 |
|
gtk_sheet_range_clear (sheet, &this_column); |
117 |
psppire_data_sheet_col_set_enable(sheet, col, col, FALSE); |
psppire_data_sheet_col_set_enable(sheet, col, col, FALSE); |
118 |
} |
} |
119 |
} |
} |