diff options
Diffstat (limited to 'widgets/table/e-table-subset-variable.c')
-rw-r--r-- | widgets/table/e-table-subset-variable.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c index f27d220f10..07aaa18e10 100644 --- a/widgets/table/e-table-subset-variable.c +++ b/widgets/table/e-table-subset-variable.c @@ -41,14 +41,14 @@ static void etssv_add (ETableSubsetVariable *etssv, gint row) { - ETableModel *etm = E_TABLE_MODEL(etssv); - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableModel *etm = E_TABLE_MODEL (etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); - e_table_model_pre_change(etm); + e_table_model_pre_change (etm); if (etss->n_map + 1 > etssv->n_vals_allocated) { etssv->n_vals_allocated += INCREMENT_AMOUNT; - etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(gint)); + etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof (gint)); } etss->map_table[etss->n_map++] = row; @@ -61,15 +61,15 @@ etssv_add_array (ETableSubsetVariable *etssv, const gint *array, gint count) { - ETableModel *etm = E_TABLE_MODEL(etssv); - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableModel *etm = E_TABLE_MODEL (etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); gint i; - e_table_model_pre_change(etm); + e_table_model_pre_change (etm); if (etss->n_map + count > etssv->n_vals_allocated) { - etssv->n_vals_allocated += MAX(INCREMENT_AMOUNT, count); - etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(gint)); + etssv->n_vals_allocated += MAX (INCREMENT_AMOUNT, count); + etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof (gint)); } for (i = 0; i < count; i++) etss->map_table[etss->n_map++] = array[i]; @@ -80,17 +80,17 @@ etssv_add_array (ETableSubsetVariable *etssv, static void etssv_add_all (ETableSubsetVariable *etssv) { - ETableModel *etm = E_TABLE_MODEL(etssv); - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableModel *etm = E_TABLE_MODEL (etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); gint rows; gint i; - e_table_model_pre_change(etm); + e_table_model_pre_change (etm); - rows = e_table_model_row_count(etss->source); + rows = e_table_model_row_count (etss->source); if (etss->n_map + rows > etssv->n_vals_allocated) { - etssv->n_vals_allocated += MAX(INCREMENT_AMOUNT, rows); - etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(gint)); + etssv->n_vals_allocated += MAX (INCREMENT_AMOUNT, rows); + etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof (gint)); } for (i = 0; i < rows; i++) etss->map_table[etss->n_map++] = i; @@ -102,14 +102,14 @@ static gboolean etssv_remove (ETableSubsetVariable *etssv, gint row) { - ETableModel *etm = E_TABLE_MODEL(etssv); - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableModel *etm = E_TABLE_MODEL (etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); gint i; for (i = 0; i < etss->n_map; i++) { if (etss->map_table[i] == row) { e_table_model_pre_change (etm); - memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(gint)); + memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof (gint)); etss->n_map--; e_table_model_row_deleted (etm, i); @@ -138,9 +138,9 @@ ETableModel * e_table_subset_variable_construct (ETableSubsetVariable *etssv, ETableModel *source) { - if (e_table_subset_construct (E_TABLE_SUBSET(etssv), source, 1) == NULL) + if (e_table_subset_construct (E_TABLE_SUBSET (etssv), source, 1) == NULL) return NULL; - E_TABLE_SUBSET(etssv)->n_map = 0; + E_TABLE_SUBSET (etssv)->n_map = 0; return E_TABLE_MODEL (etssv); } @@ -163,9 +163,9 @@ e_table_subset_variable_add (ETableSubsetVariable *etssv, gint row) { g_return_if_fail (etssv != NULL); - g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE(etssv)); + g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv)); - if (ETSSV_CLASS(etssv)->add) + if (ETSSV_CLASS (etssv)->add) ETSSV_CLASS (etssv)->add (etssv, row); } @@ -175,9 +175,9 @@ e_table_subset_variable_add_array (ETableSubsetVariable *etssv, gint count) { g_return_if_fail (etssv != NULL); - g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE(etssv)); + g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv)); - if (ETSSV_CLASS(etssv)->add_array) + if (ETSSV_CLASS (etssv)->add_array) ETSSV_CLASS (etssv)->add_array (etssv, array, count); } @@ -185,9 +185,9 @@ void e_table_subset_variable_add_all (ETableSubsetVariable *etssv) { g_return_if_fail (etssv != NULL); - g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE(etssv)); + g_return_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv)); - if (ETSSV_CLASS(etssv)->add_all) + if (ETSSV_CLASS (etssv)->add_all) ETSSV_CLASS (etssv)->add_all (etssv); } @@ -196,9 +196,9 @@ e_table_subset_variable_remove (ETableSubsetVariable *etssv, gint row) { g_return_val_if_fail (etssv != NULL, FALSE); - g_return_val_if_fail (E_IS_TABLE_SUBSET_VARIABLE(etssv), FALSE); + g_return_val_if_fail (E_IS_TABLE_SUBSET_VARIABLE (etssv), FALSE); - if (ETSSV_CLASS(etssv)->remove) + if (ETSSV_CLASS (etssv)->remove) return ETSSV_CLASS (etssv)->remove (etssv, row); else return FALSE; @@ -207,8 +207,8 @@ e_table_subset_variable_remove (ETableSubsetVariable *etssv, void e_table_subset_variable_clear (ETableSubsetVariable *etssv) { - ETableModel *etm = E_TABLE_MODEL(etssv); - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableModel *etm = E_TABLE_MODEL (etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); e_table_model_pre_change (etm); etss->n_map = 0; @@ -225,7 +225,7 @@ e_table_subset_variable_increment (ETableSubsetVariable *etssv, gint amount) { gint i; - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); for (i = 0; i < etss->n_map; i++) { if (etss->map_table[i] >= position) etss->map_table[i] += amount; @@ -238,7 +238,7 @@ e_table_subset_variable_decrement (ETableSubsetVariable *etssv, gint amount) { gint i; - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); for (i = 0; i < etss->n_map; i++) { if (etss->map_table[i] >= position) etss->map_table[i] -= amount; @@ -249,10 +249,10 @@ void e_table_subset_variable_set_allocation (ETableSubsetVariable *etssv, gint total) { - ETableSubset *etss = E_TABLE_SUBSET(etssv); + ETableSubset *etss = E_TABLE_SUBSET (etssv); if (total <= 0) total = 1; if (total > etss->n_map) { - etss->map_table = g_realloc (etss->map_table, total * sizeof(gint)); + etss->map_table = g_realloc (etss->map_table, total * sizeof (gint)); } } |