aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-19 02:07:42 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-19 02:07:42 +0800
commitfa360fde289f9b850191f89059d1a5e6d67c07c7 (patch)
treed1d8a43364d21daf94d5b9ac1f352faffd03dcd2 /widgets/table
parentbecd78e26ed61ff386d0b229f85bdcf590c28e94 (diff)
downloadgsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar
gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.gz
gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.bz2
gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.lz
gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.xz
gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.zst
gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.zip
More whitespace cleanup.
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-text.c28
-rw-r--r--widgets/table/e-cell-toggle.c12
-rw-r--r--widgets/table/e-table-click-to-add.c6
-rw-r--r--widgets/table/e-table-column.c6
-rw-r--r--widgets/table/e-table-config.c50
-rw-r--r--widgets/table/e-table-example-2.c36
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c2
-rw-r--r--widgets/table/e-table-field-chooser-item.c10
-rw-r--r--widgets/table/e-table-field-chooser.c2
-rw-r--r--widgets/table/e-table-group-container.c18
-rw-r--r--widgets/table/e-table-group.c2
-rw-r--r--widgets/table/e-table-header-item.c60
-rw-r--r--widgets/table/e-table-header.c12
-rw-r--r--widgets/table/e-table-item.c76
-rw-r--r--widgets/table/e-table-scrolled.c2
-rw-r--r--widgets/table/e-table-selection-model.c4
-rw-r--r--widgets/table/e-table-sorted-variable.c4
-rw-r--r--widgets/table/e-table-sorted.c4
-rw-r--r--widgets/table/e-table-specification.c4
-rw-r--r--widgets/table/e-table-subset-variable.c12
-rw-r--r--widgets/table/e-table-subset.c10
-rw-r--r--widgets/table/e-table.c6
-rw-r--r--widgets/table/e-tree-scrolled.c2
-rw-r--r--widgets/table/e-tree-selection-model.c4
-rw-r--r--widgets/table/e-tree-sorted-variable.c2
-rw-r--r--widgets/table/e-tree.c4
26 files changed, 189 insertions, 189 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 5c7d931321..9f7d7f113a 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -290,7 +290,7 @@ ect_stop_editing (ECellTextView *text_view, gboolean commit)
text = edit->text;
if (edit->tep)
g_object_unref (edit->tep);
- if (! edit->default_cursor_shown){
+ if (! edit->default_cursor_shown) {
gdk_window_set_cursor (GTK_WIDGET(text_view->canvas)->window, NULL);
edit->default_cursor_shown = TRUE;
}
@@ -412,7 +412,7 @@ ect_unrealize (ECellView *ecv)
g_object_unref (text_view->gc);
text_view->gc = NULL;
- if (text_view->edit){
+ if (text_view->edit) {
ect_cancel_edit (text_view);
}
@@ -979,7 +979,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
return 1;
}
- if (event->key.keyval == GDK_Escape){
+ if (event->key.keyval == GDK_Escape) {
/* if not changed, then pass this even to parent */
return_val = text_view->edit != NULL && text_view->edit->text && text_view->edit->old_text && 0 != strcmp (text_view->edit->text, text_view->edit->old_text);
ect_cancel_edit (text_view);
@@ -1109,7 +1109,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
edit->pointer_in = TRUE;
#endif
if (edit_display) {
- if (edit->default_cursor_shown){
+ if (edit->default_cursor_shown) {
gdk_window_set_cursor (canvas->window, text_view->i_cursor);
edit->default_cursor_shown = FALSE;
}
@@ -1120,7 +1120,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col
text_view->pointer_in = FALSE;
#endif
if (edit_display) {
- if (! edit->default_cursor_shown){
+ if (! edit->default_cursor_shown) {
gdk_window_set_cursor (canvas->window, NULL);
edit->default_cursor_shown = TRUE;
}
@@ -1213,8 +1213,8 @@ ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row)
edit->text = g_strdup (edit->old_text);
#if 0
- if (edit->pointer_in){
- if (edit->default_cursor_shown){
+ if (edit->pointer_in) {
+ if (edit->default_cursor_shown) {
gdk_window_set_cursor (GTK_WIDGET(item->canvas)->window, text_view->i_cursor);
edit->default_cursor_shown = FALSE;
}
@@ -1234,7 +1234,7 @@ ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row,
ECellTextView *text_view = (ECellTextView *) ecell_view;
CellEdit *edit = text_view->edit;
- if (edit){
+ if (edit) {
ect_stop_editing (text_view, TRUE);
} else {
/*
@@ -1968,9 +1968,9 @@ e_cell_text_delete_surrounding_cb (GtkIMContext *context,
edit->text + MIN (edit->selection_start, edit->selection_end));
begin_pos += offset;
end_pos = begin_pos + n_chars;
- if(begin_pos < 0 || text_len < begin_pos)
+ if (begin_pos < 0 || text_len < begin_pos)
return FALSE;
- if(end_pos > text_len)
+ if (end_pos > text_len)
end_pos = text_len;
edit->selection_start = g_utf8_offset_to_pointer (edit->text, begin_pos)
- edit->text;
@@ -2009,9 +2009,9 @@ e_cell_text_init (ECellText *ect)
ECell *
e_cell_text_construct (ECellText *cell, const gchar *fontname, GtkJustification justify)
{
- if(!cell)
+ if (!cell)
return E_CELL(NULL);
- if(fontname)
+ if (fontname)
cell->font_name = g_strdup (fontname);
cell->justify = justify;
return E_CELL(cell);
@@ -2143,7 +2143,7 @@ _blink_scroll_timeout (gpointer data)
redraw = TRUE;
edit->show_cursor = FALSE;
}
- if (redraw){
+ if (redraw) {
ect_queue_redraw (text_view, edit->view_col, edit->row);
}
return TRUE;
@@ -2561,7 +2561,7 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
}
}
- if (redraw){
+ if (redraw) {
ect_queue_redraw (text_view, edit->view_col, edit->row);
}
}
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index d83e6775b9..db047f1220 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -122,7 +122,7 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
const gint value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
- if (value < 0 || value >= toggle->n_states){
+ if (value < 0 || value >= toggle->n_states) {
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
value, toggle->n_states);
return;
@@ -141,7 +141,7 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
image = toggle->images[value];
- if ((x2 - x1) < gdk_pixbuf_get_width (image)){
+ if ((x2 - x1) < gdk_pixbuf_get_width (image)) {
x = x1;
width = x2 - x1;
} else {
@@ -149,7 +149,7 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
width = gdk_pixbuf_get_width (image);
}
- if ((y2 - y1) < gdk_pixbuf_get_height (image)){
+ if ((y2 - y1) < gdk_pixbuf_get_height (image)) {
y = y1;
height = y2 - y1;
} else {
@@ -194,7 +194,7 @@ etog_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_co
return FALSE;
#endif
- switch (event->type){
+ switch (event->type) {
case GDK_KEY_PRESS:
if (event->key.keyval != GDK_space)
return FALSE;
@@ -237,7 +237,7 @@ etog_print (ECellView *ecell_view, GtkPrintContext *context,
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
cairo_t *cr;
- if (value >= toggle->n_states){
+ if (value >= toggle->n_states) {
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
value, toggle->n_states);
return;
@@ -360,7 +360,7 @@ e_cell_toggle_construct (ECellToggle *etog, gint border, gint n_states, GdkPixbu
etog->images = g_new (GdkPixbuf *, n_states);
- for (i = 0; i < n_states; i++){
+ for (i = 0; i < n_states; i++) {
etog->images [i] = images [i];
if (images[i]) {
g_object_ref (images [i]);
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index b6397cf914..57769d1540 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -197,7 +197,7 @@ etcta_set_property (GObject *object, guint prop_id, const GValue *value, GParamS
item = GNOME_CANVAS_ITEM (object);
etcta = E_TABLE_CLICK_TO_ADD (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_HEADER:
etcta_drop_table_header (etcta);
etcta_add_table_header (etcta, E_TABLE_HEADER(g_value_get_object (value)));
@@ -267,7 +267,7 @@ etcta_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *p
etcta = E_TABLE_CLICK_TO_ADD (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_HEADER:
g_value_set_object (value, etcta->eth);
break;
@@ -378,7 +378,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
- switch (e->type){
+ switch (e->type) {
case GDK_FOCUS_CHANGE:
if (!e->focus_change.in)
return TRUE;
diff --git a/widgets/table/e-table-column.c b/widgets/table/e-table-column.c
index 0969a79410..699fe95e69 100644
--- a/widgets/table/e-table-column.c
+++ b/widgets/table/e-table-column.c
@@ -141,7 +141,7 @@ e_table_column_index (ETableColumn *etc, const gchar *identifier)
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
g_return_val_if_fail (identifier != NULL, 0);
- for (i = 0; i < etc->col_count; i++){
+ for (i = 0; i < etc->col_count; i++) {
ETableCol *tc = etc->columns [i];
if (strcmp (i->id, identifier) == 0)
@@ -161,7 +161,7 @@ e_table_column_get_index_at (ETableColumn *etc, gint x_offset)
g_return_val_if_fail (identifier != NULL, 0);
total = 0;
- for (i = 0; i < etc->col_count; i++){
+ for (i = 0; i < etc->col_count; i++) {
total += etc->columns [i]->width;
if (x_offset < total)
@@ -205,7 +205,7 @@ ve_table_column_get_selected (ETableColumn *etc)
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
- for (i = 0; i < etc->col_count; i++){
+ for (i = 0; i < etc->col_count; i++) {
if (etc->columns [i]->selected)
selected++;
}
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 9fd2f7ea20..375e2cf99f 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -237,7 +237,7 @@ find_column_in_spec (ETableSpecification *spec, gint model_col)
{
ETableColumnSpecification **column;
- for (column = spec->columns; *column; column++){
+ for (column = spec->columns; *column; column++) {
if ((*column)->disabled)
continue;
if ((*column)->model_col != model_col)
@@ -254,7 +254,7 @@ find_model_column_by_name (ETableSpecification *spec, const gchar *s)
{
ETableColumnSpecification **column;
- for (column = spec->columns; *column; column++){
+ for (column = spec->columns; *column; column++) {
if ((*column)->disabled)
continue;
@@ -270,7 +270,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
ETableConfigSortWidgets *widgets;
gint count, i;
- if (is_sort){
+ if (is_sort) {
count = e_table_sort_info_sorting_get_count (
config->temp_state->sort_info);
widgets = &config->sort [0];
@@ -280,7 +280,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
widgets = &config->group [0];
}
- for (i = 0; i < 4; i++){
+ for (i = 0; i < 4; i++) {
gboolean sensitive = (i <= count);
const gchar *text = "";
@@ -296,7 +296,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
widgets [i].combo,
widgets [i].changed_id);
- if (i < count){
+ if (i < count) {
GtkToggleButton *a, *d;
ETableSortColumn col =
is_sort
@@ -310,7 +310,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
ETableColumnSpecification *column =
find_column_in_spec (config->source_spec, col.column);
- if (!column){
+ if (!column) {
/*
* This is a bug in the programmer
* stuff, but by the time we arrive
@@ -372,7 +372,7 @@ config_sort_info_update (ETableConfig *config)
ETableColumnSpecification *column;
column = find_column_in_spec (config->source_spec, col.column);
- if (!column){
+ if (!column) {
g_warning ("Could not find column model in specification");
continue;
}
@@ -414,7 +414,7 @@ config_group_info_update (ETableConfig *config)
ETableColumnSpecification *column;
column = find_column_in_spec (config->source_spec, col.column);
- if (!column){
+ if (!column) {
g_warning ("Could not find model column in specification");
continue;
}
@@ -468,8 +468,8 @@ config_fields_info_update (ETableConfig *config)
GString *res = g_string_new ("");
gint i, j;
- for (i = 0; i < config->state->col_count; i++){
- for (j = 0, column = config->source_spec->columns; *column; column++, j++){
+ for (i = 0; i < config->state->col_count; i++) {
+ for (j = 0, column = config->source_spec->columns; *column; column++, j++) {
if ((*column)->disabled)
continue;
@@ -513,9 +513,9 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
do {
response = gtk_dialog_run (dialog);
- switch (response){
+ switch (response) {
case 0: /* clear fields */
- if (is_sort){
+ if (is_sort) {
e_table_sort_info_sorting_truncate (
config->temp_state->sort_info, 0);
} else {
@@ -568,7 +568,7 @@ do_fields_config_dialog (ETableConfig *config)
do {
response = gtk_dialog_run (GTK_DIALOG(config->dialog_show_fields));
- switch (response){
+ switch (response) {
case GTK_RESPONSE_OK:
g_object_unref (config->state);
config->state = config->temp_state;
@@ -787,7 +787,7 @@ sort_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *sort)
gint col;
col = find_model_column_by_name (config->source_spec, s);
- if (col == -1){
+ if (col == -1) {
g_warning ("sort: This should not happen (%s)", s);
g_free (s);
return;
@@ -827,7 +827,7 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui)
GSList *l;
gint i;
- for (i = 0; i < 4; i++){
+ for (i = 0; i < 4; i++) {
gchar buffer [80];
snprintf (buffer, sizeof (buffer), "sort-combo-%d", i + 1);
@@ -855,10 +855,10 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui)
config->sort [i].e_table_config = config;
}
- for (l = config->column_names; l; l = l->next){
+ for (l = config->column_names; l; l = l->next) {
gchar *label = l->data;
- for (i = 0; i < 4; i++){
+ for (i = 0; i < 4; i++) {
configure_combo_box_add (
GTK_COMBO_BOX (config->sort[i].combo),
dgettext (config->domain, label), label);
@@ -868,7 +868,7 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui)
/*
* After we have runtime modified things, signal connect
*/
- for (i = 0; i < 4; i++){
+ for (i = 0; i < 4; i++) {
config->sort [i].changed_id = g_signal_connect (
config->sort [i].combo,
"changed", G_CALLBACK (sort_combo_changed),
@@ -897,7 +897,7 @@ group_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *group)
gint col;
col = find_model_column_by_name (config->source_spec, s);
- if (col == -1){
+ if (col == -1) {
g_warning ("grouping: this should not happen, %s", s);
g_free (s);
return;
@@ -937,7 +937,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
GSList *l;
gint i;
- for (i = 0; i < 4; i++){
+ for (i = 0; i < 4; i++) {
gchar buffer [80];
snprintf (buffer, sizeof (buffer), "group-combo-%d", i + 1);
@@ -972,10 +972,10 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
config->group [i].e_table_config = config;
}
- for (l = config->column_names; l; l = l->next){
+ for (l = config->column_names; l; l = l->next) {
gchar *label = l->data;
- for (i = 0; i < 4; i++){
+ for (i = 0; i < 4; i++) {
configure_combo_box_add (
GTK_COMBO_BOX (config->group[i].combo),
dgettext (config->domain, label), label);
@@ -985,7 +985,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
/*
* After we have runtime modified things, signal connect
*/
- for (i = 0; i < 4; i++){
+ for (i = 0; i < 4; i++) {
config->group [i].changed_id = g_signal_connect (
config->group [i].combo,
"changed", G_CALLBACK (group_combo_changed),
@@ -1293,7 +1293,7 @@ e_table_config_construct (ETableConfig *config,
config->domain = g_strdup (spec->domain);
- for (column = config->source_spec->columns; *column; column++){
+ for (column = config->source_spec->columns; *column; column++) {
gchar *label = (*column)->title;
if ((*column)->disabled)
@@ -1333,7 +1333,7 @@ e_table_config_new (const gchar *header,
{
ETableConfig *config = g_object_new (E_TABLE_CONFIG_TYPE, NULL);
- if (e_table_config_construct (config, header, spec, state, parent_window) == NULL){
+ if (e_table_config_construct (config, header, spec, state, parent_window) == NULL) {
g_object_unref (config);
return NULL;
}
diff --git a/widgets/table/e-table-example-2.c b/widgets/table/e-table-example-2.c
index f5dc15d74d..2c2cbe0ffe 100644
--- a/widgets/table/e-table-example-2.c
+++ b/widgets/table/e-table-example-2.c
@@ -148,13 +148,13 @@ my_row_count (ETableModel *etc, gpointer data)
static gpointer
my_value_at (ETableModel *etc, gint col, gint row, gpointer data)
{
- if (col == COLOR_COLUMN){
- if (importance_data[row]){
+ if (col == COLOR_COLUMN) {
+ if (importance_data[row]) {
return color1;
} else {
return color2;
}
- } else if (col == IMPORTANCE_COLUMN){
+ } else if (col == IMPORTANCE_COLUMN) {
return (gpointer) importance_data[row];
} else {
return (gpointer) table_data [row][col];
@@ -164,8 +164,8 @@ my_value_at (ETableModel *etc, gint col, gint row, gpointer data)
static void
my_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val, gpointer data)
{
- if (col == COLOR_COLUMN){
- } else if (col == IMPORTANCE_COLUMN){
+ if (col == COLOR_COLUMN) {
+ } else if (col == IMPORTANCE_COLUMN) {
importance_data[row] = (gboolean) val;
} else {
g_free (table_data [row][col]);
@@ -185,9 +185,9 @@ my_is_cell_editable (ETableModel *etc, gint col, gint row, gpointer data)
static gpointer
my_duplicate_value (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
- if (col == COLOR_COLUMN){
+ if (col == COLOR_COLUMN) {
return (gpointer) value;
- } else if (col == IMPORTANCE_COLUMN){
+ } else if (col == IMPORTANCE_COLUMN) {
return (gpointer) value;
} else {
return g_strdup (value);
@@ -197,8 +197,8 @@ my_duplicate_value (ETableModel *etc, gint col, gconstpointer value, gpointer da
static void
my_free_value (ETableModel *etc, gint col, gpointer value, gpointer data)
{
- if (col == COLOR_COLUMN){
- } else if (col == IMPORTANCE_COLUMN){
+ if (col == COLOR_COLUMN) {
+ } else if (col == IMPORTANCE_COLUMN) {
} else {
g_free (value);
}
@@ -207,9 +207,9 @@ my_free_value (ETableModel *etc, gint col, gpointer value, gpointer data)
static gpointer
my_initialize_value (ETableModel *etc, gint col, gpointer data)
{
- if (col == COLOR_COLUMN){
+ if (col == COLOR_COLUMN) {
return NULL;
- } else if (col == IMPORTANCE_COLUMN){
+ } else if (col == IMPORTANCE_COLUMN) {
return NULL;
} else {
return g_strdup ("");
@@ -219,9 +219,9 @@ my_initialize_value (ETableModel *etc, gint col, gpointer data)
static gboolean
my_value_is_empty (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
- if (col == COLOR_COLUMN){
+ if (col == COLOR_COLUMN) {
return value == NULL;
- } else if (col == IMPORTANCE_COLUMN){
+ } else if (col == IMPORTANCE_COLUMN) {
return value == NULL;
} else {
return !(value && *(gchar *)value);
@@ -231,9 +231,9 @@ my_value_is_empty (ETableModel *etc, gint col, gconstpointer value, gpointer dat
static gchar *
my_value_to_string (ETableModel *etc, gint col, gconstpointer value, gpointer data)
{
- if (col == COLOR_COLUMN){
+ if (col == COLOR_COLUMN) {
return g_strdup_printf("%d", (gint) value);
- } else if (col == IMPORTANCE_COLUMN){
+ } else if (col == IMPORTANCE_COLUMN) {
return g_strdup_printf("%d", (gint) value);
} else {
return g_strdup(value);
@@ -254,8 +254,8 @@ create_table ()
GdkPixbuf *pixbuf;
/* First we fill in the simple data. */
- for (i = 0; i < ROWS; i++){
- for (j = 0; j < VIEW_COLS; j++){
+ for (i = 0; i < ROWS; i++) {
+ for (j = 0; j < VIEW_COLS; j++) {
table_data[i][j] = g_strdup ("");
}
importance_data[i] = FALSE;
@@ -290,7 +290,7 @@ create_table ()
/* Next we create a column object for each view column and add
them to the header. We don't create a column object for
the importance column since it will not be shown. */
- for (i = 0; i < VIEW_COLS; i++){
+ for (i = 0; i < VIEW_COLS; i++) {
/* Create the column. */
ETableCol *ecol = e_table_col_new (
i, headers [i],
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index e3c059d748..b1bd18d499 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -145,7 +145,7 @@ static void
e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
ETableFieldChooserDialog *etfcd = E_TABLE_FIELD_CHOOSER_DIALOG(object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_DND_CODE:
g_free(etfcd->dnd_code);
etfcd->dnd_code = g_strdup(g_value_get_string (value));
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index d897d16f85..7f0f39a9f9 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -334,7 +334,7 @@ etfci_set_property (GObject *object, guint prop_id, const GValue *value, GParamS
item = GNOME_CANVAS_ITEM (object);
etfci = E_TABLE_FIELD_CHOOSER_ITEM (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_FULL_HEADER:
etfci_drop_full_header (etfci);
if (g_value_get_object (value))
@@ -366,7 +366,7 @@ etfci_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *p
etfci = E_TABLE_FIELD_CHOOSER_ITEM (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_DND_CODE:
g_value_set_string (value, etfci->dnd_code);
@@ -468,7 +468,7 @@ etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint w
state = GTK_WIDGET_STATE (canvas);
y1 = y2 = 0;
- for (row = 0; row < rows; row++, y1 = y2){
+ for (row = 0; row < rows; row++, y1 = y2) {
ETableCol *ecol;
ecol = e_table_header_get_column (etfci->combined_header, row);
@@ -582,7 +582,7 @@ etfci_event (GnomeCanvasItem *item, GdkEvent *e)
GnomeCanvas *canvas = item->canvas;
gint x, y;
- switch (e->type){
+ switch (e->type) {
case GDK_MOTION_NOTIFY:
gnome_canvas_w2c (canvas, e->motion.x, e->motion.y, &x, &y);
@@ -593,7 +593,7 @@ etfci_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_BUTTON_PRESS:
gnome_canvas_w2c (canvas, e->button.x, e->button.y, &x, &y);
- if (e->button.button == 1){
+ if (e->button.button == 1) {
etfci->click_x = x;
etfci->click_y = y;
etfci->maybe_drag = TRUE;
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index fb66d9618a..231ad0801f 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -228,7 +228,7 @@ e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue
{
ETableFieldChooser *etfc = E_TABLE_FIELD_CHOOSER(object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_DND_CODE:
g_free(etfc->dnd_code);
etfc->dnd_code = g_strdup(g_value_get_string(value));
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 2a62f70d95..43513ddc89 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -244,7 +244,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
use_col = FALSE;
direction = E_FOCUS_START;
}
- if (change_focus){
+ if (change_focus) {
GList *list;
for (list = etgc->children; list; list = list->next) {
ETableGroupContainerChildNode *child_node;
@@ -471,7 +471,7 @@ etgc_add (ETableGroup *etg, gint row)
ETableGroupContainerChildNode *child_node;
gint i = 0;
- for (; list; list = g_list_next (list), i++){
+ for (; list; list = g_list_next (list), i++) {
gint comp_val;
child_node = list->data;
@@ -1017,7 +1017,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
if (frozen)
return;
- if (GTK_OBJECT_FLAGS(etgc)& GNOME_CANVAS_ITEM_REALIZED){
+ if (GTK_OBJECT_FLAGS(etgc)& GNOME_CANVAS_ITEM_REALIZED) {
gdouble running_height = 0;
gdouble running_width = 0;
gdouble old_height;
@@ -1025,7 +1025,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
old_height = etgc->height;
old_width = etgc->width;
- if (etgc->children == NULL){
+ if (etgc->children == NULL) {
} else {
GList *list;
gdouble extra_height = 0;
@@ -1049,7 +1049,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
running_height = extra_height;
- for ( list = etgc->children; list; list = g_list_next (list)){
+ for ( list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
ETableGroup *child = child_node->child;
@@ -1060,7 +1060,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
if (item_width > running_width)
running_width = item_width;
}
- for ( list = etgc->children; list; list = g_list_next (list)){
+ for ( list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
ETableGroup *child = child_node->child;
g_object_get (child,
@@ -1114,21 +1114,21 @@ etgc_init (ETableGroupContainer *container)
void
e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, gpointer closure)
{
- if (E_IS_TABLE_GROUP_CONTAINER (etg)){
+ if (E_IS_TABLE_GROUP_CONTAINER (etg)) {
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
GList *list = etgc->children;
/* Protect from unrefs in the callback functions */
g_object_ref (etg);
- for (list = etgc->children; list; list = list->next){
+ for (list = etgc->children; list; list = list->next) {
ETableGroupContainerChildNode *child_node = list->data;
e_table_group_apply_to_leafs (child_node->child, fn, closure);
}
g_object_unref (etg);
- } else if (E_IS_TABLE_GROUP_LEAF (etg)){
+ } else if (E_IS_TABLE_GROUP_LEAF (etg)) {
(*fn) (E_TABLE_GROUP_LEAF (etg)->item, closure);
} else {
g_error ("Unknown ETableGroup found: %s",
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 7d3499f8f0..ebf861657c 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -605,7 +605,7 @@ etg_event (GnomeCanvasItem *item, GdkEvent *event)
default:
return_val = FALSE;
}
- if (return_val == FALSE){
+ if (return_val == FALSE) {
if (GNOME_CANVAS_ITEM_CLASS(etg_parent_class)->event)
return GNOME_CANVAS_ITEM_CLASS(etg_parent_class)->event (item, event);
}
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 0bcbc2b694..d5a02f491a 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -115,7 +115,7 @@ static void scroll_off (ETableHeaderItem *ethi);
static void scroll_on (ETableHeaderItem *ethi, guint scroll_direction);
static void
-ethi_dispose (GObject *object){
+ethi_dispose (GObject *object) {
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (object);
ethi_drop_table_header (ethi);
@@ -301,7 +301,7 @@ ethi_set_property (GObject *object,
item = GNOME_CANVAS_ITEM (object);
ethi = E_TABLE_HEADER_ITEM (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_TABLE_HEADER:
ethi_drop_table_header (ethi);
ethi_add_table_header (ethi, E_TABLE_HEADER(g_value_get_object (value)));
@@ -325,7 +325,7 @@ ethi_set_property (GObject *object,
break;
case PROP_SORT_INFO:
- if (ethi->sort_info){
+ if (ethi->sort_info) {
if (ethi->sort_info_changed_id)
g_signal_handler_disconnect (
ethi->sort_info,
@@ -374,7 +374,7 @@ ethi_get_property (GObject *object,
ethi = E_TABLE_HEADER_ITEM (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_FULL_HEADER:
g_value_set_object (value, ethi->full_header);
break;
@@ -403,7 +403,7 @@ ethi_find_col_by_x (ETableHeaderItem *ethi, gint x)
return 0;
}
- for (col = 0; col < cols; col++){
+ for (col = 0; col < cols; col++) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
if ((x >= x1) && (x <= x1 + ecol->width)) {
@@ -429,7 +429,7 @@ ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, gint x)
if (x < x1)
return 0;
- for (col = 0; col < cols; col++){
+ for (col = 0; col < cols; col++) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
x1 += (ecol->width / 2);
@@ -497,7 +497,7 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, gint col, gboolean recreate)
if (col > 0)
x += ethi->group_indent_width;
- if (!arrow_up){
+ if (!arrow_up) {
arrow_up = make_shaped_window_from_xpm (arrow_up_xpm);
arrow_down = make_shaped_window_from_xpm (arrow_down_xpm);
}
@@ -591,7 +591,7 @@ do_drag_motion(ETableHeaderItem *ethi,
d(g_print("x = %d, y = %d, ethi->width = %d, ethi->height = %d\n", x, y, ethi->width, ethi->height));
if ((x >= 0) && (x <= (ethi->width)) &&
- (y >= 0) && (y <= (ethi->height))){
+ (y >= 0) && (y <= (ethi->height))) {
gint col;
d(g_print("In header\n"));
@@ -604,7 +604,7 @@ do_drag_motion(ETableHeaderItem *ethi,
ethi_remove_drop_marker (ethi);
gdk_drag_status (context, context->suggested_action, time);
}
- else if (col != -1){
+ else if (col != -1) {
if (ethi->drag_col != -1)
ethi_remove_destroy_marker (ethi);
@@ -837,7 +837,7 @@ ethi_drag_drop (GtkWidget *canvas,
gboolean successful = FALSE;
if ((x >= 0) && (x <= (ethi->width)) &&
- (y >= 0) && (y <= (ethi->height))){
+ (y >= 0) && (y <= (ethi->height))) {
gint col;
col = ethi_find_col_by_x_nearest (ethi, x);
@@ -927,7 +927,7 @@ ethi_unrealize (GnomeCanvasItem *item)
gtk_drag_dest_unset (GTK_WIDGET (item->canvas));
- if (ethi->stipple){
+ if (ethi->stipple) {
g_object_unref (ethi->stipple);
ethi->stipple = NULL;
}
@@ -971,7 +971,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wi
ethi->width = e_table_header_total_width (ethi->eth) + ethi->group_indent_width;
x1 = x2 = 0;
x2 += ethi->group_indent_width;
- for (col = 0; col < cols; col++, x1 = x2){
+ for (col = 0; col < cols; col++, x1 = x2) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
gint col_width;
@@ -1024,7 +1024,7 @@ is_pointer_on_division (ETableHeaderItem *ethi, gint pos, gint *the_total, gint
gint col, total;
total = 0;
- for (col = 0; col < cols; col++){
+ for (col = 0; col < cols; col++) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
if (col == 0)
@@ -1032,7 +1032,7 @@ is_pointer_on_division (ETableHeaderItem *ethi, gint pos, gint *the_total, gint
total += ecol->width;
- if ((total - TOLERANCE < pos)&& (pos < total + TOLERANCE)){
+ if ((total - TOLERANCE < pos)&& (pos < total + TOLERANCE)) {
if (return_col)
*return_col = col;
if (the_total)
@@ -1073,7 +1073,7 @@ set_cursor (ETableHeaderItem *ethi, gint pos)
/* Column is not resizable if all columns after it
are also not resizable */
- for (; c <= last_col; c++){
+ for (; c <= last_col; c++) {
ETableCol *ecol2;
ecol2 = e_table_header_get_column (ethi->eth, c);
@@ -1228,7 +1228,7 @@ ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info)
ETableSortColumn column = e_table_sort_info_grouping_get_nth (
ethi->sort_info, i);
- if (model_col == column.column){
+ if (model_col == column.column) {
column.ascending = 1;
e_table_sort_info_grouping_set_nth (
ethi->sort_info, i, column);
@@ -1243,7 +1243,7 @@ ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info)
ETableSortColumn column =
e_table_sort_info_sorting_get_nth(
ethi->sort_info, i);
- if (model_col == column.column || model_col == -1){
+ if (model_col == column.column || model_col == -1) {
column.ascending = 1;
e_table_sort_info_sorting_set_nth (
ethi->sort_info, i, column);
@@ -1282,7 +1282,7 @@ ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info)
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(
ethi->sort_info, i);
- if (model_col == column.column){
+ if (model_col == column.column) {
column.ascending = 0;
e_table_sort_info_grouping_set_nth(
ethi->sort_info, i, column);
@@ -1297,7 +1297,7 @@ ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info)
e_table_sort_info_sorting_get_nth(
ethi->sort_info, i);
- if (model_col == column.column || model_col == -1){
+ if (model_col == column.column || model_col == -1) {
column.ascending = 0;
e_table_sort_info_sorting_set_nth (
ethi->sort_info, i, column);
@@ -1625,7 +1625,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
length = e_table_sort_info_grouping_get_count(ethi->sort_info);
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i);
- if (model_col == column.column || model_col == -1){
+ if (model_col == column.column || model_col == -1) {
gint ascending = column.ascending;
ascending = ! ascending;
column.ascending = ascending;
@@ -1641,10 +1641,10 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, i);
- if (model_col == column.column || model_col == -1){
+ if (model_col == column.column || model_col == -1) {
gint ascending = column.ascending;
- if (ascending == 0 && model_col != -1){
+ if (ascending == 0 && model_col != -1) {
/*
* This means the user has clicked twice
* already, lets kill sorting of this column now.
@@ -1692,7 +1692,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
gint x, y, start, col;
gint was_maybe_drag = 0;
- switch (e->type){
+ switch (e->type) {
case GDK_ENTER_NOTIFY:
convert (canvas, e->crossing.x, e->crossing.y, &x, &y);
set_cursor (ethi, x);
@@ -1706,10 +1706,10 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_MOTION_NOTIFY:
convert (canvas, e->motion.x, e->motion.y, &x, &y);
- if (resizing){
+ if (resizing) {
gint new_width;
- if (ethi->resize_guide == NULL){
+ if (ethi->resize_guide == NULL) {
/* Quick hack until I actually bind the views */
ethi->resize_guide = GINT_TO_POINTER (1);
@@ -1725,7 +1725,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
e_table_header_set_size (ethi->eth, ethi->resize_col, new_width);
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
- } else if (ethi_maybe_start_drag (ethi, &e->motion)){
+ } else if (ethi_maybe_start_drag (ethi, &e->motion)) {
ethi_start_drag (ethi, e);
} else
set_cursor (ethi, x);
@@ -1737,7 +1737,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
convert (canvas, e->button.x, e->button.y, &x, &y);
- if (is_pointer_on_division (ethi, x, &start, &col) && e->button.button == 1){
+ if (is_pointer_on_division (ethi, x, &start, &col) && e->button.button == 1) {
ETableCol *ecol;
/*
@@ -1755,7 +1755,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ethi->resize_start_pos = start - ecol->width;
ethi->resize_min_width = ecol->min_width;
} else {
- if (e->button.button == 1){
+ if (e->button.button == 1) {
ethi->click_x = e->button.x;
ethi->click_y = e->button.y;
ethi->maybe_drag = TRUE;
@@ -1763,7 +1763,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ethi->selected_col = col;
if (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (item->canvas)))
e_canvas_item_grab_focus (item, TRUE);
- } else if (e->button.button == 3){
+ } else if (e->button.button == 3) {
ethi_header_context_menu (ethi, &e->button);
} else
ethi_button_pressed (ethi, &e->button);
@@ -1796,7 +1796,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ethi->maybe_drag = FALSE;
- if (ethi->resize_col != -1){
+ if (ethi->resize_col != -1) {
needs_ungrab = (ethi->resize_guide != NULL);
ethi_end_resize (ethi);
} else if (was_maybe_drag && ethi->sort_info) {
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 37a1e3c332..1016acf5c0 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -172,7 +172,7 @@ eth_finalize (GObject *object)
/*
* Destroy columns
*/
- for (i = cols - 1; i >= 0; i--){
+ for (i = cols - 1; i >= 0; i--) {
eth_do_remove (eth, i, TRUE);
}
g_free (eth->columns);
@@ -348,7 +348,7 @@ eth_update_offsets (ETableHeader *eth)
gint i;
gint x = 0;
- for (i = 0; i < eth->col_count; i++){
+ for (i = 0; i < eth->col_count; i++) {
ETableCol *etc = eth->columns [i];
etc->x = x;
@@ -505,7 +505,7 @@ e_table_header_get_index_at (ETableHeader *eth, gint x_offset)
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
total = 0;
- for (i = 0; i < eth->col_count; i++){
+ for (i = 0; i < eth->col_count; i++) {
total += eth->columns [i]->width;
if (x_offset < total)
@@ -560,7 +560,7 @@ e_table_header_get_selected (ETableHeader *eth)
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
- for (i = 0; i < eth->col_count; i++){
+ for (i = 0; i < eth->col_count; i++) {
if (eth->columns [i]->selected)
selected++;
}
@@ -728,7 +728,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size)
/* (1) If none of the columns to the right are expandable, use
* all the expansion space in this column.
*/
- if(expandable_count == 0) {
+ if (expandable_count == 0) {
eth->columns[idx]->expansion = expansion;
for (i = idx + 1; i < eth->col_count; i++) {
eth->columns[i]->expansion = 0;
@@ -827,7 +827,7 @@ e_table_header_col_diff (ETableHeader *eth, gint start_col, gint end_col)
end_col = eth->col_count;
total = 0;
- for (col = start_col; col < end_col; col++){
+ for (col = start_col; col < end_col; col++) {
total += eth->columns [col]->width;
}
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 729e7982c6..c8809b6087 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -250,7 +250,7 @@ eti_get_cell_background_color (ETableItem *eti, gint row, gint col, gboolean sel
gchar *color_spec = NULL;
gboolean allocated = FALSE;
- if (selected){
+ if (selected) {
if (GTK_WIDGET_HAS_FOCUS(canvas))
background = &canvas->style->bg [GTK_STATE_SELECTED];
else
@@ -298,7 +298,7 @@ eti_get_cell_foreground_color (ETableItem *eti, gint row, gint col, gboolean sel
if (allocated)
*allocated = FALSE;
- if (selected){
+ if (selected) {
if (GTK_WIDGET_HAS_FOCUS (canvas))
foreground = &canvas->style->fg [GTK_STATE_SELECTED];
else
@@ -370,7 +370,7 @@ eti_attach_cell_views (ETableItem *eti)
eti->n_cells = eti->cols;
eti->cell_views = g_new (ECellView *, eti->n_cells);
- for (i = 0; i < eti->n_cells; i++){
+ for (i = 0; i < eti->n_cells; i++) {
ETableCol *ecol = e_table_header_get_column (eti->header, i);
eti->cell_views [i] = e_cell_new_view (ecol->ecell, eti->table_model, eti);
@@ -408,7 +408,7 @@ eti_detach_cell_views (ETableItem *eti)
eti_free_save_state (eti);
- for (i = 0; i < eti->n_cells; i++){
+ for (i = 0; i < eti->n_cells; i++) {
e_cell_kill_view (eti->cell_views [i]);
eti->cell_views [i] = NULL;
}
@@ -589,7 +589,7 @@ eti_remove_header_model (ETableItem *eti)
g_signal_handler_disconnect (G_OBJECT (eti->header),
eti->header_request_width_id);
- if (eti->cell_views){
+ if (eti->cell_views) {
eti_unrealize_cell_views (eti);
eti_detach_cell_views (eti);
}
@@ -618,7 +618,7 @@ eti_row_height_real (ETableItem *eti, gint row)
max_h = 0;
- for (col = 0; col < cols; col++){
+ for (col = 0; col < cols; col++) {
h = e_cell_height (eti->cell_views [col], view_to_model_col(eti, col), col, row);
if (h > max_h)
@@ -746,8 +746,8 @@ eti_get_height (ETableItem *eti)
} else {
gint height;
gint row;
- if (eti->length_threshold != -1){
- if (rows > eti->length_threshold){
+ if (eti->length_threshold != -1) {
+ if (rows > eti->length_threshold) {
gint row_height = eti_row_height(eti, 0);
if (eti->height_cache) {
height = 0;
@@ -1352,7 +1352,7 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti)
* BUT: then you can't remove all columns from a header and add new ones.
*/
- if (eti->cell_views){
+ if (eti->cell_views) {
eti_unrealize_cell_views (eti);
eti_detach_cell_views (eti);
eti_attach_cell_views (eti);
@@ -1463,7 +1463,7 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
eti = E_TABLE_ITEM (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_TABLE_HEADER:
eti_remove_header_model (eti);
eti_add_header_model (eti, E_TABLE_HEADER(g_value_get_object (value)));
@@ -1547,7 +1547,7 @@ eti_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *psp
eti = E_TABLE_ITEM (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_WIDTH:
g_value_set_double (value, eti->width);
break;
@@ -1846,7 +1846,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
first_col = -1;
last_col = x_offset = 0;
x1 = x2 = floor (eti_base.x);
- for (col = 0; col < cols; col++, x1 = x2){
+ for (col = 0; col < cols; col++, x1 = x2) {
ETableCol *ecol = e_table_header_get_column (eti->header, col);
x2 = x1 + ecol->width;
@@ -1855,7 +1855,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
break;
if (x2 < x)
continue;
- if (first_col == -1){
+ if (first_col == -1) {
x_offset = x1 - x;
first_col = col;
}
@@ -1888,7 +1888,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
first_row = -1;
y1 = y2 = floor (eti_base.y) + height_extra;
- for (row = 0; row < rows; row++, y1 = y2){
+ for (row = 0; row < rows; row++, y1 = y2) {
y2 += ETI_ROW_HEIGHT (eti, row) + height_extra;
@@ -1898,7 +1898,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
if (y2 < y)
continue;
- if (first_row == -1){
+ if (first_row == -1) {
y_offset = y1 - y;
first_row = row;
}
@@ -1919,7 +1919,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
f_x1 = f_x2 = f_y1 = f_y2 = -1;
f_found = FALSE;
- if (eti->horizontal_draw_grid && first_row == 0){
+ if (eti->horizontal_draw_grid && first_row == 0) {
gdk_draw_line (
drawable, eti->grid_gc,
eti_base.x - x, yd, eti_base.x + eti->width - x, yd);
@@ -1927,7 +1927,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
yd += height_extra;
- for (row = first_row; row < last_row; row++){
+ for (row = first_row; row < last_row; row++) {
gint xd;
gboolean selected;
gint cursor_col, cursor_row;
@@ -1943,7 +1943,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
"cursor_row", &cursor_row,
NULL);
- for (col = first_col; col < last_col; col++){
+ for (col = first_col; col < last_col; col++) {
ETableCol *ecol = e_table_header_get_column (eti->header, col);
ECellView *ecell_view = eti->cell_views [col];
gboolean col_selected = selected;
@@ -2075,10 +2075,10 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
}
}
- if (eti->vertical_draw_grid){
+ if (eti->vertical_draw_grid) {
gint xd = x_offset;
- for (col = first_col; col <= last_col; col++){
+ for (col = first_col; col <= last_col; col++) {
ETableCol *ecol = e_table_header_get_column (eti->header, col);
gdk_draw_line (
@@ -2142,7 +2142,7 @@ find_cell (ETableItem *eti, double x, double y, gint *view_col_res, gint *view_r
y -= eti->y1;
x1 = 0;
- for (col = 0; col < cols - 1; col++, x1 = x2){
+ for (col = 0; col < cols - 1; col++, x1 = x2) {
ETableCol *ecol = e_table_header_get_column (eti->header, col);
if (x < x1)
@@ -2319,7 +2319,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (!eti->header)
return FALSE;
- switch (e->type){
+ switch (e->type) {
case GDK_BUTTON_PRESS: {
double x1, y1;
double realx, realy;
@@ -2502,7 +2502,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
"eti_editing: %s, row:%d:%d, col:%d:%d\n", __FUNCTION__, e->button.button, __LINE__,
eti_editing(eti)?"true":"false", cursor_row, view_to_model_row(eti, row), cursor_col, view_to_model_col(eti, col)));
- if (eti_editing (eti) && cursor_row == view_to_model_row(eti, row) && cursor_col == view_to_model_col(eti, col)){
+ if (eti_editing (eti) && cursor_row == view_to_model_row(eti, row) && cursor_col == view_to_model_col(eti, col)) {
d(g_print("%s: GDK_BUTTON_RELEASE received, button %d, line: %d\n", __FUNCTION__, e->button.button, __LINE__))
;
@@ -2645,7 +2645,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
#endif
flags = 0;
- if (cursor_row == view_to_model_row(eti, row) && cursor_col == view_to_model_col(eti, col)){
+ if (cursor_row == view_to_model_row(eti, row) && cursor_col == view_to_model_col(eti, col)) {
flags = E_CELL_EDITING | E_CELL_CURSOR;
}
@@ -2684,7 +2684,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti->in_key_press = TRUE;
- switch (e->key.keyval){
+ switch (e->key.keyval) {
case GDK_Left:
case GDK_KP_Left:
if (eti_editing (eti)) {
@@ -2765,7 +2765,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
break;
}
if (eti->cursor_mode == E_CURSOR_SPREADSHEET) {
- if ((e->key.state & GDK_SHIFT_MASK) != 0){
+ if ((e->key.state & GDK_SHIFT_MASK) != 0) {
/* shift tab */
if (cursor_col != view_to_model_col(eti, 0))
eti_cursor_move_left (eti);
@@ -2801,7 +2801,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_3270_Enter:
- if (eti_editing (eti)){
+ if (eti_editing (eti)) {
ecell_view = eti->cell_views [eti->editing_col];
return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
view_to_model_col (eti, eti->editing_col),
@@ -2842,7 +2842,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
break;
default:
- if (!eti_editing (eti)){
+ if (!eti_editing (eti)) {
gint col, row;
row = model_to_view_row(eti, cursor_row);
col = model_to_view_col(eti, cursor_col);
@@ -2850,7 +2850,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
e_table_item_enter_edit (eti, col, row);
}
}
- if (!eti_editing (eti)){
+ if (!eti_editing (eti)) {
g_signal_emit (eti, eti_signals [KEY_PRESS], 0,
model_to_view_row(eti, cursor_row), cursor_col, e, &return_val);
if (!return_val)
@@ -2883,7 +2883,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (cursor_col == -1)
return FALSE;
- if (eti_editing (eti)){
+ if (eti_editing (eti)) {
ecell_view = eti->cell_views [eti->editing_col];
return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
view_to_model_col(eti, eti->editing_col),
@@ -3576,12 +3576,12 @@ e_table_item_print_page (EPrintable *ep,
* Draw cells
*/
- if (eti->horizontal_draw_grid){
+ if (eti->horizontal_draw_grid) {
gp_draw_rect(context, 0, yd, width, 1);
}
yd++;
- for (row = rows_printed; row < rows; row++){
+ for (row = rows_printed; row < rows; row++) {
gdouble xd = 1, row_height;
row_height = eti_printed_row_height(eti, widths, context, row);
@@ -3597,7 +3597,7 @@ e_table_item_print_page (EPrintable *ep,
}
}
- for (col = 0; col < cols; col++){
+ for (col = 0; col < cols; col++) {
ECellView *ecell_view = eti->cell_views [col];
cairo_save(cr);
@@ -3617,16 +3617,16 @@ e_table_item_print_page (EPrintable *ep,
}
yd += row_height;
- if (eti->horizontal_draw_grid){
+ if (eti->horizontal_draw_grid) {
gp_draw_rect(context, 0, yd, width, 1);
}
yd ++;
}
itemcontext->rows_printed = row;
- if (eti->vertical_draw_grid){
+ if (eti->vertical_draw_grid) {
gdouble xd = 0;
- for (col = 0; col < cols; col++){
+ for (col = 0; col < cols; col++) {
gp_draw_rect(context, xd, height, 1, yd - height);
xd += widths[col];
}
@@ -3681,7 +3681,7 @@ e_table_item_height (EPrintable *ep,
*/
yd++;
- for (row = rows_printed; row < rows; row++){
+ for (row = rows_printed; row < rows; row++) {
gdouble row_height;
row_height = eti_printed_row_height(item, widths, context, row);
@@ -3732,7 +3732,7 @@ e_table_item_will_fit (EPrintable *ep,
*/
yd++;
- for (row = rows_printed; row < rows; row++){
+ for (row = rows_printed; row < rows; row++) {
gdouble row_height;
row_height = eti_printed_row_height(item, widths, context, row);
diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c
index 778041d73c..3d937dd9cd 100644
--- a/widgets/table/e-table-scrolled.c
+++ b/widgets/table/e-table-scrolled.c
@@ -163,7 +163,7 @@ ets_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *psp
{
ETableScrolled *ets = E_TABLE_SCROLLED (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_TABLE:
g_value_set_object (value, ets->table);
break;
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 22ec5af7d5..67a27cde01 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -246,7 +246,7 @@ etsm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *ps
{
ETableSelectionModel *etsm = E_TABLE_SELECTION_MODEL (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_MODEL:
g_value_set_object (value, etsm->model);
break;
@@ -261,7 +261,7 @@ etsm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
{
ETableSelectionModel *etsm = E_TABLE_SELECTION_MODEL (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_MODEL:
drop_model(etsm);
add_model(etsm, g_value_get_object (value) ? E_TABLE_MODEL(g_value_get_object (value)) : NULL);
diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c
index a65046234a..f4e35d1fd8 100644
--- a/widgets/table/e-table-sorted-variable.c
+++ b/widgets/table/e-table-sorted-variable.c
@@ -170,7 +170,7 @@ etsv_add_all (ETableSubsetVariable *etssv)
rows = e_table_model_row_count(etss->source);
- if (etss->n_map + rows > etssv->n_vals_allocated){
+ 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));
}
@@ -190,7 +190,7 @@ e_table_sorted_variable_new (ETableModel *source, ETableHeader *full_header, ETa
ETableSortedVariable *etsv = g_object_new (E_TABLE_SORTED_VARIABLE_TYPE, NULL);
ETableSubsetVariable *etssv = E_TABLE_SUBSET_VARIABLE (etsv);
- if (e_table_subset_variable_construct (etssv, source) == NULL){
+ if (e_table_subset_variable_construct (etssv, source) == NULL) {
g_object_unref (etsv);
return NULL;
}
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index 16bb3cf888..75a8e768d3 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/table/e-table-sorted.c
@@ -131,7 +131,7 @@ e_table_sorted_new (ETableModel *source, ETableHeader *full_header, ETableSortIn
if (E_TABLE_SUBSET_CLASS (ets_parent_class)->proxy_model_pre_change)
(E_TABLE_SUBSET_CLASS (ets_parent_class)->proxy_model_pre_change) (etss, source);
- if (e_table_subset_construct (etss, source, 0) == NULL){
+ if (e_table_subset_construct (etss, source, 0) == NULL) {
g_object_unref (ets);
return NULL;
}
@@ -267,7 +267,7 @@ ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row,
shift = row == etss->n_map - count;
for (j = 0; j < count; j++) {
- for (i = 0; i < etss->n_map; i++){
+ for (i = 0; i < etss->n_map; i++) {
if (etss->map_table[i] == row + j) {
if (shift)
e_table_model_pre_change (etm);
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index e7acd90f34..d837b7344e 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -369,7 +369,7 @@ e_table_specification_save_to_node (ETableSpecification *specification,
e_xml_set_bool_prop_by_name (node, (const guchar *)"horizontal-resize", specification->horizontal_resize);
e_xml_set_bool_prop_by_name (node, (const guchar *)"allow-grouping", specification->allow_grouping);
- switch (specification->selection_mode){
+ switch (specification->selection_mode) {
case GTK_SELECTION_SINGLE:
s = "single";
break;
@@ -390,7 +390,7 @@ e_table_specification_save_to_node (ETableSpecification *specification,
xmlSetProp (node, (const guchar *)"_click-to-add-message", (guchar *)specification->click_to_add_message);
xmlSetProp (node, (const guchar *)"gettext-domain", (guchar *)specification->domain);
- if (specification->columns){
+ if (specification->columns) {
gint i;
for (i = 0; specification->columns [i]; i++)
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index de1d7ccacf..b63ecd01ec 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -46,7 +46,7 @@ etssv_add (ETableSubsetVariable *etssv,
e_table_model_pre_change(etm);
- if (etss->n_map + 1 > etssv->n_vals_allocated){
+ 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));
}
@@ -67,7 +67,7 @@ etssv_add_array (ETableSubsetVariable *etssv,
e_table_model_pre_change(etm);
- if (etss->n_map + count > etssv->n_vals_allocated){
+ 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));
}
@@ -88,7 +88,7 @@ etssv_add_all (ETableSubsetVariable *etssv)
e_table_model_pre_change(etm);
rows = e_table_model_row_count(etss->source);
- if (etss->n_map + rows > etssv->n_vals_allocated){
+ 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));
}
@@ -106,7 +106,7 @@ etssv_remove (ETableSubsetVariable *etssv,
ETableSubset *etss = E_TABLE_SUBSET(etssv);
gint i;
- for (i = 0; i < etss->n_map; 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));
@@ -150,7 +150,7 @@ e_table_subset_variable_new (ETableModel *source)
{
ETableSubsetVariable *etssv = g_object_new (E_TABLE_SUBSET_VARIABLE_TYPE, NULL);
- if (e_table_subset_variable_construct (etssv, source) == NULL){
+ if (e_table_subset_variable_construct (etssv, source) == NULL) {
g_object_unref (etssv);
return NULL;
}
@@ -252,7 +252,7 @@ e_table_subset_variable_set_allocation (ETableSubsetVariable *etssv,
ETableSubset *etss = E_TABLE_SUBSET(etssv);
if (total <= 0)
total = 1;
- if (total > etss->n_map){
+ if (total > etss->n_map) {
etss->map_table = g_realloc (etss->map_table, total * sizeof(gint));
}
}
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index a860aba24f..6253c74327 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -61,7 +61,7 @@ etss_get_view_row (ETableSubset *etss, gint row)
gint initial = MAX (MIN (etss->last_access, end), start);
for (i = initial; i < end; i++) {
- if (map_table [i] == row){
+ if (map_table [i] == row) {
d(g_print("a) Found %d from %d\n", i, etss->last_access));
etss->last_access = i;
return i;
@@ -69,15 +69,15 @@ etss_get_view_row (ETableSubset *etss, gint row)
}
for (i = initial - 1; i >= start; i--) {
- if (map_table [i] == row){
+ if (map_table [i] == row) {
d(g_print("b) Found %d from %d\n", i, etss->last_access));
etss->last_access = i;
return i;
}
}
- for (i = 0; i < n; i++){
- if (map_table [i] == row){
+ for (i = 0; i < n; i++) {
+ if (map_table [i] == row) {
d(g_print("c) Found %d from %d\n", i, etss->last_access));
etss->last_access = i;
return i;
@@ -431,7 +431,7 @@ e_table_subset_new (ETableModel *source, const gint nvals)
{
ETableSubset *etss = g_object_new (E_TABLE_SUBSET_TYPE, NULL);
- if (e_table_subset_construct (etss, source, nvals) == NULL){
+ if (e_table_subset_construct (etss, source, nvals) == NULL) {
g_object_unref (etss);
return NULL;
}
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 86ba47434d..eacbfbbc74 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1817,7 +1817,7 @@ et_build_column_spec (ETable *e_table)
columns_shown = xmlNewNode (NULL, "columns-shown");
col_count = e_table_header_count (e_table->header);
- for (i = 0; i < col_count; i++){
+ for (i = 0; i < col_count; i++) {
gchar *text = g_strdup_printf ("%d", e_table_header_index(e_table->header, i));
xmlNewChild (columns_shown, NULL, "column", text);
g_free (text);
@@ -2121,7 +2121,7 @@ et_get_property (GObject *object,
{
ETable *etable = E_TABLE (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_MODEL:
g_value_set_object (value, etable->model);
break;
@@ -2152,7 +2152,7 @@ et_set_property (GObject *object,
{
ETable *etable = E_TABLE (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_LENGTH_THRESHOLD:
etable->length_threshold = g_value_get_int (value);
if (etable->group) {
diff --git a/widgets/table/e-tree-scrolled.c b/widgets/table/e-tree-scrolled.c
index fc729ab411..eac80443d0 100644
--- a/widgets/table/e-tree-scrolled.c
+++ b/widgets/table/e-tree-scrolled.c
@@ -173,7 +173,7 @@ ets_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *psp
{
ETreeScrolled *ets = E_TREE_SCROLLED (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_TREE:
g_value_set_object (value, ets->tree);
break;
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index eedb201fae..6f89816fbe 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -301,7 +301,7 @@ etsm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *ps
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_CURSOR_ROW:
g_value_set_int (value, get_cursor_row(etsm));
break;
@@ -326,7 +326,7 @@ etsm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
ESelectionModel *esm = E_SELECTION_MODEL (object);
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_CURSOR_ROW:
e_selection_model_do_something(esm, g_value_get_int (value), etsm->priv->cursor_col, 0);
break;
diff --git a/widgets/table/e-tree-sorted-variable.c b/widgets/table/e-tree-sorted-variable.c
index 7c7718d0cf..a919f900b4 100644
--- a/widgets/table/e-tree-sorted-variable.c
+++ b/widgets/table/e-tree-sorted-variable.c
@@ -154,7 +154,7 @@ e_tree_sorted_variable_new (ETreeModel *source, ETableHeader *full_header, ETabl
ETreeSortedVariable *etsv = g_object_new (E_TREE_SORTED_VARIABLE_TYPE, NULL);
ETreeSortedVariable *etsv = E_TABLE_SUBSET_VARIABLE (etsv);
- if (e_table_subset_variable_construct (etsv, source) == NULL){
+ if (e_table_subset_variable_construct (etsv, source) == NULL) {
g_object_unref (etsv);
return NULL;
}
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 0e4db07034..38c7a5111b 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1807,7 +1807,7 @@ et_get_property (GObject *object,
{
ETree *etree = E_TREE (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_ETTA:
g_value_set_object (value, etree->priv->etta);
break;
@@ -1836,7 +1836,7 @@ et_set_property (GObject *object,
{
ETree *etree = E_TREE (object);
- switch (prop_id){
+ switch (prop_id) {
case PROP_LENGTH_THRESHOLD:
etree->priv->length_threshold = g_value_get_int (value);
if (etree->priv->item) {