diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:24:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:37:20 +0800 |
commit | 8a186c3588d3598857c36e2122fa68d01eba30fd (patch) | |
tree | 731078659d4e04af8346c5ca68512d8537b3707a /widgets/table | |
parent | 2bf3460cd3eb0853a1d10a6e36f5091898a5533f (diff) | |
download | gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.gz gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.bz2 gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.lz gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.xz gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.zst gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.zip |
Coding style cleanups.
Diffstat (limited to 'widgets/table')
32 files changed, 144 insertions, 144 deletions
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c index a54f6c9c98..48a762a8d9 100644 --- a/widgets/table/e-cell-combo.c +++ b/widgets/table/e-cell-combo.c @@ -420,10 +420,10 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc, *x += x1; /* The ETable positions don't include the grid lines, I think, so we add 1. */ *y += y1 + 1 - - (gint)gtk_adjustment_get_value ( + - (gint) gtk_adjustment_get_value ( gtk_scrollable_get_vadjustment ( - GTK_SCROLLABLE (&((GnomeCanvas *)canvas)->layout))) - + ((GnomeCanvas *)canvas)->zoom_yofs; + GTK_SCROLLABLE (&((GnomeCanvas *) canvas)->layout))) + + ((GnomeCanvas *) canvas)->zoom_yofs; widget = gtk_scrolled_window_get_vscrollbar (popup); gtk_widget_get_child_requisition (widget, &requisition); diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c index e8f6a0925d..e268b23dea 100644 --- a/widgets/table/e-cell-hbox.c +++ b/widgets/table/e-cell-hbox.c @@ -72,7 +72,7 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view hbox_view->def_size_cols[i] = ecv->def_size_cols[i]; } - return (ECellView *)hbox_view; + return (ECellView *) hbox_view; } /* @@ -149,7 +149,7 @@ ecv_draw (ECellView *ecell_view, gint x2, gint y2) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint subcell_offset = 0; gint i; @@ -180,7 +180,7 @@ ecv_draw (ECellView *ecell_view, static gint ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint y = 0; gint i; gint subcell_offset = 0; @@ -217,7 +217,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col static gint ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint height = 0, max_height = 0; gint i; @@ -234,7 +234,7 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) static gint ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint width = 0; gint i; diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 3bf671b48a..45f1fb3727 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -188,8 +188,8 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context, scale = gdk_pixbuf_get_height (pixbuf); cairo_save (cr); - cairo_translate (cr, 0, (gdouble)(height - scale) / (gdouble)2); - gdk_cairo_set_source_pixbuf (cr, pixbuf, (gdouble)scale, (gdouble)scale); + cairo_translate (cr, 0, (gdouble)(height - scale) / (gdouble) 2); + gdk_cairo_set_source_pixbuf (cr, pixbuf, (gdouble) scale, (gdouble) scale); cairo_paint (cr); cairo_restore (cr); } diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 310b36c655..1683e896f0 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -333,7 +333,7 @@ ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view text_view->xofs = 0.0; text_view->yofs = 0.0; - return (ECellView *)text_view; + return (ECellView *) text_view; } /* @@ -502,7 +502,7 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width) PangoContext *context; cairo_font_options_t *font_options; - layout = gtk_widget_create_pango_layout (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas), text); + layout = gtk_widget_create_pango_layout (GTK_WIDGET (((GnomeCanvasItem *) ecell_view->e_table_item_view)->canvas), text); attrs = (PangoAttrList *) build_attr_list (text_view, row, text ? strlen (text) : 0); @@ -528,12 +528,12 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width) fixed_desc = pango_font_description_from_string (ect->font_name); if (fixed_desc) { - fixed_family = (gchar *)pango_font_description_get_family (fixed_desc); + fixed_family = (gchar *) pango_font_description_get_family (fixed_desc); fixed_size = pango_font_description_get_size (fixed_desc); fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc); } - desc = pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas))->font_desc); + desc = pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (((GnomeCanvasItem *) ecell_view->e_table_item_view)->canvas))->font_desc); pango_font_description_set_family (desc, fixed_family); if (fixed_points) pango_font_description_set_size (desc, fixed_size); @@ -856,7 +856,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col if (edit_display && edit->im_context && gtk_im_context_filter_keypress (\ edit->im_context, - (GdkEventKey*)event)) { + (GdkEventKey*) event)) { edit->need_im_reset = TRUE; if (preedit_len && flags & E_CELL_PREEDIT) @@ -1067,7 +1067,7 @@ ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row) edit->view_col = view_col; edit->row = row; edit->cell_width = e_table_header_get_column ( - ((ETableItem *)ecell_view->e_table_item_view)->header, + ((ETableItem *) ecell_view->e_table_item_view)->header, view_col)->width - 8; edit->layout = generate_layout (text_view, model_col, view_col, row, edit->cell_width); @@ -1229,7 +1229,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, PangoContext *pango_context; PangoFontMetrics *font_metrics; ECellText *ect = E_CELL_TEXT (ecell_view->ecell); - ECellTextView *ectView = (ECellTextView *)ecell_view; + ECellTextView *ectView = (ECellTextView *) ecell_view; GtkWidget *canvas = GTK_WIDGET (ectView->canvas); GtkStyle *style; PangoDirection dir; @@ -1260,7 +1260,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, pango_context_get_language (pango_context)); ty = (gdouble)(text_height - pango_font_metrics_get_ascent (font_metrics) - - pango_font_metrics_get_descent (font_metrics)) / 2.0 /(gdouble)PANGO_SCALE; + pango_font_metrics_get_descent (font_metrics)) / 2.0 /(gdouble) PANGO_SCALE; strikeout = ect->strikeout_column >= 0 && row >= 0 && e_table_model_value_at (ecell_view->e_table_model, ect->strikeout_column, row); @@ -1270,7 +1270,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, dir = pango_find_base_dir (string, strlen (string)); if (underline) { - ly = ty + (gdouble)pango_font_metrics_get_underline_position (font_metrics)/(gdouble)PANGO_SCALE; + ly = ty + (gdouble) pango_font_metrics_get_underline_position (font_metrics)/(gdouble) PANGO_SCALE; cairo_new_path (cr); if (dir == PANGO_DIRECTION_RTL) { cairo_move_to (cr, width - 2, ly + text_height + 6); @@ -1280,12 +1280,12 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, cairo_move_to (cr, 2, ly + text_height + 6); cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6); } - cairo_set_line_width (cr, (gdouble)pango_font_metrics_get_underline_thickness (font_metrics)/(gdouble)PANGO_SCALE); + cairo_set_line_width (cr, (gdouble) pango_font_metrics_get_underline_thickness (font_metrics)/(gdouble) PANGO_SCALE); cairo_stroke (cr); } if (strikeout) { - ly = ty + (gdouble)pango_font_metrics_get_strikethrough_position (font_metrics)/(gdouble)PANGO_SCALE; + ly = ty + (gdouble) pango_font_metrics_get_strikethrough_position (font_metrics)/(gdouble) PANGO_SCALE; cairo_new_path (cr); if (dir == PANGO_DIRECTION_RTL) { cairo_move_to (cr, width - 2, ly + text_height + 6); @@ -1295,7 +1295,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, cairo_move_to (cr, 2, ly + text_height + 6); cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6); } - cairo_set_line_width (cr,(gdouble)pango_font_metrics_get_strikethrough_thickness (font_metrics)/(gdouble)PANGO_SCALE); + cairo_set_line_width (cr,(gdouble) pango_font_metrics_get_strikethrough_thickness (font_metrics)/(gdouble) PANGO_SCALE); cairo_stroke (cr); } @@ -1609,7 +1609,7 @@ e_cell_text_get_cursor_locations (ECellTextView *tv, { GdkRectangle area; CellEdit *edit=tv->edit; - ECellView *cell_view = (ECellView *)tv; + ECellView *cell_view = (ECellView *) tv; ETableItem *item = E_TABLE_ITEM ((cell_view)->e_table_item_view); GnomeCanvasItem *parent_item = GNOME_CANVAS_ITEM (item)->parent; PangoRectangle pango_strong_pos; @@ -1691,7 +1691,7 @@ e_cell_text_commit_cb (GtkIMContext *context, if (g_utf8_validate (str, strlen (str), NULL)) { command.action = E_TEP_INSERT; command.position = E_TEP_SELECTION; - command.string = (gchar *)str; + command.string = (gchar *) str; command.value = strlen (str); e_cell_text_view_command (edit->tep, &command, edit); } @@ -1876,7 +1876,7 @@ get_position_from_xy (CellEdit *edit, gint x, gint y) PangoLayout *layout = generate_layout (edit->text_view, edit->model_col, edit->view_col, edit->row, edit->cell_width); ECellTextView *text_view = edit->text_view; - ECellText *ect = (ECellText *) ((ECellView *)text_view)->ecell; + ECellText *ect = (ECellText *) ((ECellView *) text_view)->ecell; x -= (ect->x + text_view->xofs - edit->xofs_edit); y -= (ect->y + text_view->yofs - edit->yofs_edit); @@ -1894,7 +1894,7 @@ static gboolean _blink_scroll_timeout (gpointer data) { ECellTextView *text_view = (ECellTextView *) data; - ECellText *ect = E_CELL_TEXT (((ECellView *)text_view)->ecell); + ECellText *ect = E_CELL_TEXT (((ECellView *) text_view)->ecell); CellEdit *edit = text_view->edit; gulong current_time; @@ -2410,7 +2410,7 @@ paste_received (GtkClipboard *clipboard, ETextEventProcessorCommand command; command.action = E_TEP_INSERT; command.position = E_TEP_SELECTION; - command.string = (gchar *)text; + command.string = (gchar *) text; command.value = strlen (text); command.time = GDK_CURRENT_TIME; e_cell_text_view_command (edit->tep, &command, edit); @@ -2471,7 +2471,7 @@ e_cell_text_set_selection (ECellView *cell_view, g_return_val_if_fail (cell_view != NULL, FALSE); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return FALSE; @@ -2520,7 +2520,7 @@ e_cell_text_get_selection (ECellView *cell_view, g_return_val_if_fail (cell_view != NULL, FALSE); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return FALSE; @@ -2556,7 +2556,7 @@ e_cell_text_copy_clipboard (ECellView *cell_view, g_return_if_fail (cell_view != NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return; @@ -2590,7 +2590,7 @@ e_cell_text_paste_clipboard (ECellView *cell_view, g_return_if_fail (cell_view != NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return; @@ -2624,7 +2624,7 @@ e_cell_text_delete_selection (ECellView *cell_view, g_return_if_fail (cell_view != NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return; @@ -2661,7 +2661,7 @@ e_cell_text_get_text_by_view (ECellView *cell_view, g_return_val_if_fail (cell_view != NULL, NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (edit && ectv->edit->row == row && ectv->edit->model_col == col) { /* being editted now */ diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index 3d4f453820..b1edb1424e 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -302,8 +302,8 @@ cell_toggle_print (ECellView *ecell_view, cairo_save (cr); cairo_translate (cr, 0 , 0); image = gdk_pixbuf_add_alpha (image, TRUE, 255, 255, 255); - image_width = (gdouble)gdk_pixbuf_get_width (image); - image_height = (gdouble)gdk_pixbuf_get_height (image); + image_width = (gdouble) gdk_pixbuf_get_width (image); + image_height = (gdouble) gdk_pixbuf_get_height (image); cairo_rectangle (cr, image_width / 7, image_height / 3, image_width - image_width / 4, image_width - image_height / 7); diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index 467523d6d7..b06b3d492b 100644 --- a/widgets/table/e-cell-tree.c +++ b/widgets/table/e-cell-tree.c @@ -65,7 +65,7 @@ typedef struct { ECellView * e_cell_tree_view_get_subcell_view (ECellView *ect) { - return ((ECellTreeView *)ect)->subcell_view; + return ((ECellTreeView *) ect)->subcell_view; } static ETreePath @@ -134,7 +134,7 @@ ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view tree_view->canvas = canvas; - return (ECellView *)tree_view; + return (ECellView *) tree_view; } /* @@ -224,7 +224,7 @@ ect_draw (ECellView *ecell_view, gint x2, gint y2) { - ECellTreeView *tree_view = (ECellTreeView *)ecell_view; + ECellTreeView *tree_view = (ECellTreeView *) ecell_view; ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row); ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row); ETreePath node; diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c index 5d0c5989a5..1d36d4e5ce 100644 --- a/widgets/table/e-cell-vbox.c +++ b/widgets/table/e-cell-vbox.c @@ -66,7 +66,7 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view vbox_view->model_cols[i] = ecv->model_cols[i]; } - return (ECellView *)vbox_view; + return (ECellView *) vbox_view; } /* @@ -142,7 +142,7 @@ ecv_draw (ECellView *ecell_view, gint x2, gint y2) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint subcell_offset = 0; gint i; @@ -173,7 +173,7 @@ ecv_draw (ECellView *ecell_view, static gint ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint y = 0; gint i; gint subcell_offset = 0; @@ -208,7 +208,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col static gint ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint height = 0; gint i; @@ -224,7 +224,7 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) static gint ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint max_width = 0; gint i; diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 490072cf80..00ad664e61 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -441,8 +441,8 @@ setup_fields (ETableConfig *config) { gint i; - e_table_model_freeze ((ETableModel *)config->available_model); - e_table_model_freeze ((ETableModel *)config->shown_model); + e_table_model_freeze ((ETableModel *) config->available_model); + e_table_model_freeze ((ETableModel *) config->shown_model); e_table_without_show_all (config->available_model); e_table_subset_variable_clear (config->shown_model); @@ -457,8 +457,8 @@ setup_fields (ETableConfig *config) e_table_without_hide (config->available_model, GINT_TO_POINTER (idx)); } } - e_table_model_thaw ((ETableModel *)config->available_model); - e_table_model_thaw ((ETableModel *)config->shown_model); + e_table_model_thaw ((ETableModel *) config->available_model); + e_table_model_thaw ((ETableModel *) config->shown_model); } static void diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index 6afde43911..14a080362a 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -413,7 +413,7 @@ etfci_drag_data_get (GtkWidget *widget, gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING, sizeof (string[0]), - (guchar *)string, + (guchar *) string, strlen (string)); g_free (string); } diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 7f4352a6d5..564d48494c 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -253,7 +253,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event) ETableGroupContainerChildNode *child_node; ETableGroup *child; - child_node = (ETableGroupContainerChildNode *)list->data; + child_node = (ETableGroupContainerChildNode *) list->data; child = child_node->child; if (e_table_group_get_focus (child)) { @@ -269,7 +269,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event) list = list->next; if (list) { - child_node = (ETableGroupContainerChildNode *)list->data; + child_node = (ETableGroupContainerChildNode *) list->data; child = child_node->child; if (use_col) e_table_group_set_focus (child, direction, start_col); @@ -289,7 +289,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event) ETableGroupContainerChildNode *child_node; ETableGroup *child; - child_node = (ETableGroupContainerChildNode *)list->data; + child_node = (ETableGroupContainerChildNode *) list->data; child = child_node->child; if (start_col == -1) @@ -620,7 +620,7 @@ etgc_row_count (ETableGroup *etg) GList *list; gint count = 0; for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroup *group = ((ETableGroupContainerChildNode *)list->data)->child; + ETableGroup *group = ((ETableGroupContainerChildNode *) list->data)->child; gint this_count = e_table_group_row_count (group); count += this_count; } @@ -634,7 +634,7 @@ etgc_increment (ETableGroup *etg, gint position, gint amount) GList *list; for (list = etgc->children; list; list = g_list_next (list)) - e_table_group_increment (((ETableGroupContainerChildNode *)list->data)->child, + e_table_group_increment (((ETableGroupContainerChildNode *) list->data)->child, position, amount); } @@ -645,7 +645,7 @@ etgc_decrement (ETableGroup *etg, gint position, gint amount) GList *list; for (list = etgc->children; list; list = g_list_next (list)) - e_table_group_decrement (((ETableGroupContainerChildNode *)list->data)->child, + e_table_group_decrement (((ETableGroupContainerChildNode *) list->data)->child, position, amount); } @@ -655,10 +655,10 @@ etgc_set_focus (ETableGroup *etg, EFocus direction, gint view_col) ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); if (etgc->children) { if (direction == E_FOCUS_END) - e_table_group_set_focus (((ETableGroupContainerChildNode *)g_list_last (etgc->children)->data)->child, + e_table_group_set_focus (((ETableGroupContainerChildNode *) g_list_last (etgc->children)->data)->child, direction, view_col); else - e_table_group_set_focus (((ETableGroupContainerChildNode *)etgc->children->data)->child, + e_table_group_set_focus (((ETableGroupContainerChildNode *) etgc->children->data)->child, direction, view_col); } } @@ -670,7 +670,7 @@ etgc_get_focus_column (ETableGroup *etg) if (etgc->children) { GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; if (e_table_group_get_focus (child)) { return e_table_group_get_focus_column (child); @@ -696,7 +696,7 @@ etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col) if (*x >= 0 && *y >= 0 && etgc->children) { GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; e_table_group_compute_location (child, x, y, row, col); @@ -721,7 +721,7 @@ etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col) GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; e_table_group_get_mouse_over (child, row, col); @@ -749,7 +749,7 @@ etgc_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y if (etgc->children) { GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; gint thisy; @@ -791,7 +791,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp etgc->minimum_width = g_value_get_double (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "minimum_width", etgc->minimum_width - GROUP_INDENT, NULL); @@ -800,7 +800,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_LENGTH_THRESHOLD: etgc->length_threshold = g_value_get_int (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "length_threshold", etgc->length_threshold, NULL); @@ -809,7 +809,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_UNIFORM_ROW_HEIGHT: etgc->uniform_row_height = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "uniform_row_height", etgc->uniform_row_height, NULL); @@ -823,7 +823,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp if (etgc->selection_model) g_object_ref (etgc->selection_model); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "selection_model", etgc->selection_model, NULL); @@ -833,7 +833,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_ALTERNATING_ROW_COLORS: etgc->alternating_row_colors = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "alternating_row_colors", etgc->alternating_row_colors, NULL); @@ -843,7 +843,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_HORIZONTAL_DRAW_GRID: etgc->horizontal_draw_grid = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "horizontal_draw_grid", etgc->horizontal_draw_grid, NULL); @@ -853,7 +853,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_VERTICAL_DRAW_GRID: etgc->vertical_draw_grid = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "vertical_draw_grid", etgc->vertical_draw_grid, NULL); @@ -863,7 +863,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_DRAW_FOCUS: etgc->draw_focus = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "drawfocus", etgc->draw_focus, NULL); @@ -873,7 +873,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_CURSOR_MODE: etgc->cursor_mode = g_value_get_int (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "cursor_mode", etgc->cursor_mode, NULL); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 346ffed2d3..5d38b686a0 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -802,7 +802,7 @@ ethi_drag_data_received (GtkWidget *canvas, if (data != NULL) { count = e_table_header_count (ethi->eth); - column = atoi ((gchar *)data); + column = atoi ((gchar *) data); drop_col = ethi->drop_col; ethi->drop_col = -1; @@ -846,7 +846,7 @@ ethi_drag_data_get (GtkWidget *canvas, gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING, sizeof (string[0]), - (guchar *)string, + (guchar *) string, strlen (string)); g_free (string); } @@ -1867,7 +1867,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e) gint width = 0; g_signal_emit_by_name (ethi->eth, "request_width", - (gint)ethi->resize_col, &width); + (gint) ethi->resize_col, &width); /* Add 10 to stop it from "..."ing */ e_table_header_set_size (ethi->eth, ethi->resize_col, width + 10); diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index ef1b573346..cc5b147747 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -779,7 +779,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size) /* Set the new expansion so that it will generate the desired size. */ eth->columns[idx]->expansion = expansion * (((gdouble)(size - (eth->columns[idx]->min_width + - eth->width_extras))) / ((gdouble)total_extra)); + eth->width_extras))) / ((gdouble) total_extra)); /* The expansion left for the columns on the right. */ expansion -= eth->columns[idx]->expansion; diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 746e4c41b4..6da76cf77f 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -2180,7 +2180,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) } ecell_view = eti->cell_views[col]; - button = *(GdkEventButton *)e; + button = *(GdkEventButton *) e; button.x = x1; button.y = y1; @@ -2529,7 +2529,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) gint view_col = model_to_view_col (eti, cursor_col); if ((view_col >= 0) && (view_col < eti->cols)) - if (eti_e_cell_event (eti, eti->cell_views[view_col], e, ((GdkEventKey *)e)->time, cursor_col, view_col, model_to_view_row (eti, cursor_row), E_CELL_CURSOR)) + if (eti_e_cell_event (eti, eti->cell_views[view_col], e, ((GdkEventKey *) e)->time, cursor_col, view_col, model_to_view_row (eti, cursor_row), E_CELL_CURSOR)) return TRUE; } else return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e); @@ -3273,7 +3273,7 @@ e_table_item_compute_mouse_over (ETableItem *eti, gnome_canvas_item_w2i (GNOME_CANVAS_ITEM (eti), &realx, &realy); - if (!find_cell (eti, (gint)realx, (gint)realy, col, row, NULL, NULL)) { + if (!find_cell (eti, (gint) realx, (gint) realy, col, row, NULL, NULL)) { *row = -1; *col = -1; } diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c index 5101e9ec73..a68e9a2822 100644 --- a/widgets/table/e-table-memory-callbacks.c +++ b/widgets/table/e-table-memory-callbacks.c @@ -80,7 +80,7 @@ etmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value) if (etmc->duplicate_value) return etmc->duplicate_value (etm, col, value, etmc->data); else - return (gpointer)value; + return (gpointer) value; } static void diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c index ed8a481104..69880b9113 100644 --- a/widgets/table/e-table-one.c +++ b/widgets/table/e-table-one.c @@ -88,7 +88,7 @@ one_duplicate_value (ETableModel *etm, gint col, gconstpointer value) if (one->source) return e_table_model_duplicate_value (one->source, col, value); else - return (gpointer)value; + return (gpointer) value; } static void diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c index 491fe7fc6f..4727103f22 100644 --- a/widgets/table/e-table-sorter.c +++ b/widgets/table/e-table-sorter.c @@ -276,8 +276,8 @@ static gint qsort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { struct qsort_data *qd = (struct qsort_data *) user_data; - gint row1 = *(gint *)data1; - gint row2 = *(gint *)data2; + gint row1 = *(gint *) data1; + gint row2 = *(gint *) data2; gint j; gint sort_count = e_table_sort_info_sorting_get_count (qd->ets->sort_info) + e_table_sort_info_grouping_get_count (qd->ets->sort_info); gint comp_val = 0; diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c index 1fa91214c2..5254a5e698 100644 --- a/widgets/table/e-table-sorting-utils.c +++ b/widgets/table/e-table-sorting-utils.c @@ -84,8 +84,8 @@ typedef struct { static gint e_sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { - gint row1 = *(gint *)data1; - gint row2 = *(gint *)data2; + gint row1 = *(gint *) data1; + gint row2 = *(gint *) data2; ETableSortClosure *closure = user_data; gint j; gint sort_count = closure->cols; @@ -257,8 +257,8 @@ etsu_tree_compare (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader * static gint e_sort_tree_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { - ETreePath *path1 = *(ETreePath *)data1; - ETreePath *path2 = *(ETreePath *)data2; + ETreePath *path1 = *(ETreePath *) data1; + ETreePath *path2 = *(ETreePath *) data2; ETreeSortClosure *closure = user_data; return etsu_tree_compare (closure->tree, closure->sort_info, closure->full_header, path1, path2, closure->cmp_cache); diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index dfa7da9e36..3324748e61 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -330,7 +330,7 @@ e_table_specification_save_to_string (ETableSpecification *specification) xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc)); xmlDocDumpMemory (doc, &string, &length); - ret_val = g_strdup ((gchar *)string); + ret_val = g_strdup ((gchar *) string); xmlFree (string); return ret_val; } diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 536bf3c5c8..2f58715504 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -243,7 +243,7 @@ e_table_state_save_to_string (ETableState *state) xmlDocDumpMemory (doc, &string, &length); xmlFreeDoc (doc); - ret_val = g_strdup ((gchar *)string); + ret_val = g_strdup ((gchar *) string); xmlFree (string); return ret_val; } diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c index 0f9a58db31..be9e3e29ec 100644 --- a/widgets/table/e-table-subset-variable.c +++ b/widgets/table/e-table-subset-variable.c @@ -213,7 +213,7 @@ e_table_subset_variable_clear (ETableSubsetVariable *etssv) e_table_model_pre_change (etm); etss->n_map = 0; g_free (etss->map_table); - etss->map_table = (gint *)g_new (unsigned int, 1); + etss->map_table = (gint *) g_new (unsigned int, 1); etssv->n_vals_allocated = 1; e_table_model_changed (etm); diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c index 7473099bf9..77ea5fe9b5 100644 --- a/widgets/table/e-table-subset.c +++ b/widgets/table/e-table-subset.c @@ -134,7 +134,7 @@ etss_finalize (GObject *object) static gint etss_column_count (ETableModel *etm) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_column_count (etss->source); } @@ -142,7 +142,7 @@ etss_column_count (ETableModel *etm) static gint etss_row_count (ETableModel *etm) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return etss->n_map; } @@ -150,7 +150,7 @@ etss_row_count (ETableModel *etm) static gpointer etss_value_at (ETableModel *etm, gint col, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_val_if_fail (VALID_ROW (etss, row), NULL); @@ -162,7 +162,7 @@ etss_value_at (ETableModel *etm, gint col, gint row) static void etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_if_fail (VALID_ROW (etss, row)); @@ -174,7 +174,7 @@ etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) static gboolean etss_is_cell_editable (ETableModel *etm, gint col, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_val_if_fail (VALID_ROW (etss, row), FALSE); @@ -190,7 +190,7 @@ etss_has_save_id (ETableModel *etm) static gchar * etss_get_save_id (ETableModel *etm, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_val_if_fail (VALID_ROW (etss, row), NULL); @@ -203,14 +203,14 @@ etss_get_save_id (ETableModel *etm, gint row) static void etss_append_row (ETableModel *etm, ETableModel *source, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; e_table_model_append_row (etss->source, source, row); } static gpointer etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_duplicate_value (etss->source, col, value); } @@ -218,7 +218,7 @@ etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value) static void etss_free_value (ETableModel *etm, gint col, gpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; e_table_model_free_value (etss->source, col, value); } @@ -226,7 +226,7 @@ etss_free_value (ETableModel *etm, gint col, gpointer value) static gpointer etss_initialize_value (ETableModel *etm, gint col) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_initialize_value (etss->source, col); } @@ -234,7 +234,7 @@ etss_initialize_value (ETableModel *etm, gint col) static gboolean etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_value_is_empty (etss->source, col, value); } @@ -242,7 +242,7 @@ etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value) static gchar * etss_value_to_string (ETableModel *etm, gint col, gconstpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_value_to_string (etss->source, col, value); } @@ -399,7 +399,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, gint nvals) return NULL; } else buffer = NULL; - etss->map_table = (gint *)buffer; + etss->map_table = (gint *) buffer; etss->n_map = nvals; etss->source = source; g_object_ref (source); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 38ede4dd80..c1d0a2ad94 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -733,8 +733,8 @@ table_canvas_reflow_idle (ETable *e_table) g_object_get ( e_table->canvas_vbox, "height", &height, "width", &width, NULL); - height = MAX ((gint)height, allocation.height); - width = MAX ((gint)width, allocation.width); + height = MAX ((gint) height, allocation.height); + width = MAX ((gint) width, allocation.width); /* I have no idea why this needs to be -1, but it works. */ gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->table_canvas), NULL, NULL, &oldwidth, &oldheight); @@ -763,7 +763,7 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, g_object_get (e_table->canvas_vbox, "height", &height, NULL); - height = MAX ((gint)height, alloc->height); + height = MAX ((gint) height, alloc->height); g_object_set (e_table->canvas_vbox, "width", width, @@ -1214,7 +1214,7 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d } else if (!canvas->focused_item && etable->group) { focus_first_etable_item (etable->group); } else if (canvas->focused_item) { - ESelectionModel *selection = (ESelectionModel *)etable->selection; + ESelectionModel *selection = (ESelectionModel *) etable->selection; /* check whether click_to_add already got the focus */ if (etable->click_to_add) { @@ -2030,7 +2030,7 @@ e_table_set_specification (ETable *e_table, const gchar *spec) g_return_val_if_fail (spec != NULL, -1); /* doesn't work yet, sigh */ - xmlSpec = xmlParseMemory ((gchar *)spec, strlen (spec)); + xmlSpec = xmlParseMemory ((gchar *) spec, strlen (spec)); ret = et_real_set_specification (e_table, xmlSpec); xmlFreeDoc (xmlSpec); diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c index 1edaa3e09d..9c46cf7fda 100644 --- a/widgets/table/e-tree-memory-callbacks.c +++ b/widgets/table/e-tree-memory-callbacks.c @@ -138,7 +138,7 @@ etmc_duplicate_value (ETreeModel *etm, gint col, gconstpointer value) if (etmc->duplicate_value) return etmc->duplicate_value (etm, col, value, etmc->model_data); else - return (gpointer)value; + return (gpointer) value; } static void @@ -288,6 +288,6 @@ e_tree_memory_callbacks_new (ETreeMemoryCallbacksIconAtFn icon_at, etmc->model_data = model_data; - return (ETreeModel*)etmc; + return (ETreeModel*) etmc; } diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c index c32b7311bd..61200cda4c 100644 --- a/widgets/table/e-tree-memory.c +++ b/widgets/table/e-tree-memory.c @@ -641,8 +641,8 @@ typedef struct { static gint sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { - ETreePath path1 = *(ETreePath *)data1; - ETreePath path2 = *(ETreePath *)data2; + ETreePath path1 = *(ETreePath *) data1; + ETreePath path2 = *(ETreePath *) data2; MemoryAndClosure *mac = user_data; return (*mac->callback) (mac->memory, path1, path2, mac->closure); } diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 8644187b91..f486f7eec7 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -601,9 +601,9 @@ etsm_select_single_row (ESelectionModel *selection, gint row) gint *p = rows; while (p<rowp) - e_selection_model_selection_row_changed ((ESelectionModel *)etsm, *p++); + e_selection_model_selection_row_changed ((ESelectionModel *) etsm, *p++); } - e_selection_model_selection_row_changed ((ESelectionModel *)etsm, row); + e_selection_model_selection_row_changed ((ESelectionModel *) etsm, row); } } @@ -622,7 +622,7 @@ etsm_toggle_single_row (ESelectionModel *selection, gint row) etsm->priv->start_path = NULL; - e_selection_model_selection_row_changed ((ESelectionModel *)etsm, row); + e_selection_model_selection_row_changed ((ESelectionModel *) etsm, row); } static void diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index fe8f90f536..e162030e0f 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -161,13 +161,13 @@ get_node (ETreeTableAdapter *etta, ETreePath path) if (!gnode) return NULL; - return (node_t *)gnode->data; + return (node_t *) gnode->data; } static void resort_node (ETreeTableAdapter *etta, GNode *gnode, gboolean recurse) { - node_t *node = (node_t *)gnode->data; + node_t *node = (node_t *) gnode->data; ETreePath *paths, path; GNode *prev, *curr; gint i, count; @@ -242,7 +242,7 @@ get_path (ETreeTableAdapter *etta, gint row) static void kill_gnode (GNode *node, ETreeTableAdapter *etta) { - g_hash_table_remove (etta->priv->nodes, ((node_t *)node->data)->path); + g_hash_table_remove (etta->priv->nodes, ((node_t *) node->data)->path); while (node->children) { GNode *next = node->children->next; @@ -269,7 +269,7 @@ update_child_counts (GNode *gnode, gint delta) static gint delete_children (ETreeTableAdapter *etta, GNode *gnode) { - node_t *node = (node_t *)gnode->data; + node_t *node = (node_t *) gnode->data; gint to_remove = node ? node->num_visible_children : 0; if (to_remove == 0) @@ -348,7 +348,7 @@ insert_children (ETreeTableAdapter *etta, GNode *gnode) gint count = 0; gint pos = 0; - path = ((node_t *)gnode->data)->path; + path = ((node_t *) gnode->data)->path; for (tmp = e_tree_model_node_get_first_child (etta->priv->source, path); tmp; tmp = e_tree_model_node_get_next (etta->priv->source, tmp), pos++) { @@ -580,7 +580,7 @@ etta_dispose (GObject *object) static gint etta_column_count (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_column_count (etta->priv->source); } @@ -588,7 +588,7 @@ etta_column_count (ETableModel *etm) static gboolean etta_has_save_id (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_has_save_id (etta->priv->source); } @@ -596,7 +596,7 @@ etta_has_save_id (ETableModel *etm) static gchar * etta_get_save_id (ETableModel *etm, gint row) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_get_save_id (etta->priv->source, get_path (etta, row)); } @@ -604,7 +604,7 @@ etta_get_save_id (ETableModel *etm, gint row) static gboolean etta_has_change_pending (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_has_change_pending (etta->priv->source); } @@ -612,7 +612,7 @@ etta_has_change_pending (ETableModel *etm) static gint etta_row_count (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return etta->priv->n_map; } @@ -620,7 +620,7 @@ etta_row_count (ETableModel *etm) static gpointer etta_value_at (ETableModel *etm, gint col, gint row) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; switch (col) { case -1: @@ -639,7 +639,7 @@ etta_value_at (ETableModel *etm, gint col, gint row) static void etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; e_tree_model_set_value_at (etta->priv->source, get_path (etta, row), col, val); } @@ -647,7 +647,7 @@ etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) static gboolean etta_is_cell_editable (ETableModel *etm, gint col, gint row) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_node_is_editable (etta->priv->source, get_path (etta, row), col); } @@ -660,7 +660,7 @@ etta_append_row (ETableModel *etm, ETableModel *source, gint row) static gpointer etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_duplicate_value (etta->priv->source, col, value); } @@ -668,7 +668,7 @@ etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value) static void etta_free_value (ETableModel *etm, gint col, gpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; e_tree_model_free_value (etta->priv->source, col, value); } @@ -676,7 +676,7 @@ etta_free_value (ETableModel *etm, gint col, gpointer value) static gpointer etta_initialize_value (ETableModel *etm, gint col) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_initialize_value (etta->priv->source, col); } @@ -684,7 +684,7 @@ etta_initialize_value (ETableModel *etm, gint col) static gboolean etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_value_is_empty (etta->priv->source, col, value); } @@ -692,7 +692,7 @@ etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value) static gchar * etta_value_to_string (ETableModel *etm, gint col, gconstpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_value_to_string (etta->priv->source, col, value); } @@ -935,7 +935,7 @@ static void save_expanded_state_func (gpointer keyp, gpointer value, gpointer data) { ETreePath path = keyp; - node_t *node = ((GNode *)value)->data; + node_t *node = ((GNode *) value)->data; TreeAndRoot *tar = data; xmlNode *xmlnode; @@ -1136,7 +1136,7 @@ e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean vi if (root) e_tree_table_adapter_node_set_expanded (etta, root, TRUE); } - size = (visible ? 1 : 0) + (etta->priv->root ? ((node_t *)etta->priv->root->data)->num_visible_children : 0); + size = (visible ? 1 : 0) + (etta->priv->root ? ((node_t *) etta->priv->root->data)->num_visible_children : 0); resize_map (etta, size); if (etta->priv->root) fill_map (etta, 0, etta->priv->root); @@ -1303,7 +1303,7 @@ e_tree_table_adapter_node_get_next (ETreeTableAdapter *etta, ETreePath path) GNode *node = lookup_gnode (etta, path); if (node && node->next) - return ((node_t *)node->next->data)->path; + return ((node_t *) node->next->data)->path; return NULL; } diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index d9b6ce4035..470fc074e4 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -775,8 +775,8 @@ tree_canvas_reflow_idle (ETree *e_tree) e_tree->priv->item, "height", &height, "width", &width, NULL); - height = MAX ((gint)height, allocation.height); - width = MAX ((gint)width, allocation.width); + height = MAX ((gint) height, allocation.height); + width = MAX ((gint) width, allocation.width); /* I have no idea why this needs to be -1, but it works. */ gnome_canvas_get_scroll_region ( @@ -815,7 +815,7 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, g_object_get (e_tree->priv->item, "height", &height, NULL); - height = MAX ((gint)height, alloc->height); + height = MAX ((gint) height, alloc->height); g_object_set (e_tree->priv->item, "width", width, diff --git a/widgets/table/gal-a11y-e-cell-tree.c b/widgets/table/gal-a11y-e-cell-tree.c index ee06f6e025..808a611934 100644 --- a/widgets/table/gal-a11y-e-cell-tree.c +++ b/widgets/table/gal-a11y-e-cell-tree.c @@ -211,14 +211,14 @@ gal_a11y_e_cell_tree_new (ETableItem *item, /* Translators: description of an "expand" action */ _("expands the row in the ETree containing this cell"), NULL, - (ACTION_FUNC)ectr_do_action_expand); + (ACTION_FUNC) ectr_do_action_expand); gal_a11y_e_cell_add_action (GAL_A11Y_E_CELL (subcell_a11y), "collapse", /* Translators: description of a "collapse" action */ _("collapses the row in the ETree containing this cell"), NULL, - (ACTION_FUNC)ectr_do_action_collapse); + (ACTION_FUNC) ectr_do_action_collapse); /* init AtkStates for the cell's a11y object */ node = e_table_model_value_at (item->table_model, -1, row); diff --git a/widgets/table/gal-a11y-e-cell-vbox.c b/widgets/table/gal-a11y-e-cell-vbox.c index 1fa24f821a..637a53e7e3 100644 --- a/widgets/table/gal-a11y-e-cell-vbox.c +++ b/widgets/table/gal-a11y-e-cell-vbox.c @@ -138,7 +138,7 @@ ecv_ref_accessible_at_point (AtkComponent *component, ecvv->subcell_views[i], ecvv->model_cols[i], gaec->view_col, gaec->row); if ( 0 <= y && y <= subcell_height) { - return ecv_ref_child ((AtkObject *)component, i); + return ecv_ref_child ((AtkObject *) component, i); } else y -= subcell_height; } diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c index 17f9b8f166..1cac917edd 100644 --- a/widgets/table/gal-a11y-e-cell.c +++ b/widgets/table/gal-a11y-e-cell.c @@ -282,7 +282,7 @@ static void _gal_a11y_e_cell_destroy_action_info (gpointer action_info, gpointer user_data) { - ActionInfo *info = (ActionInfo *)action_info; + ActionInfo *info = (ActionInfo *) action_info; g_return_if_fail (info != NULL); g_free (info->name); diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c index 92716e68bc..ffa4bd51c2 100644 --- a/widgets/table/gal-a11y-e-table-item.c +++ b/widgets/table/gal-a11y-e-table-item.c @@ -756,7 +756,7 @@ eti_rows_deleted (ETableModel * model, gint row, gint count, } } g_signal_emit_by_name (table_item, "visible-data-changed"); - eti_a11y_reset_focus_object ((GalA11yETableItem *)table_item, item, TRUE); + eti_a11y_reset_focus_object ((GalA11yETableItem *) table_item, item, TRUE); } static void diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c index c6ba4e7d2b..d04bda280e 100644 --- a/widgets/table/gal-a11y-e-table.c +++ b/widgets/table/gal-a11y-e-table.c @@ -91,7 +91,7 @@ init_child_item (GalA11yETable *a11y) table = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y))); if (table && gtk_widget_get_mapped (GTK_WIDGET (table)) && table->group && E_IS_TABLE_GROUP_CONTAINER (table->group)) { - ETableGroupContainer *etgc = (ETableGroupContainer *)table->group; + ETableGroupContainer *etgc = (ETableGroupContainer *) table->group; GList *list; for (list = etgc->children; list; list = g_list_next (list)) { @@ -133,7 +133,7 @@ et_get_n_children (AtkObject *accessible) if (E_IS_TABLE_GROUP_LEAF (et->group)) n = 1; else if (E_IS_TABLE_GROUP_CONTAINER (et->group)) { - ETableGroupContainer *etgc = (ETableGroupContainer *)et->group; + ETableGroupContainer *etgc = (ETableGroupContainer *) et->group; n = g_list_length (etgc->children); } } @@ -291,7 +291,7 @@ gal_a11y_e_table_new (GObject *widget) g_object_ref (a11y); g_object_ref (widget); - g_idle_add ((GSourceFunc)init_child_item, a11y); + g_idle_add ((GSourceFunc) init_child_item, a11y); } return ATK_OBJECT (a11y); |