From 433eac7844481b8ceda0bae8bf08f6bb623185b0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 1 Jun 2009 19:09:19 -0400 Subject: More code cleanup. --- widgets/table/a11y/gal-a11y-e-cell-toggle.c | 4 +- widgets/table/a11y/gal-a11y-e-table-item.c | 12 ++--- widgets/table/e-cell-combo.c | 4 +- widgets/table/e-cell-date-edit.c | 10 ++--- widgets/table/e-cell-hbox.c | 4 +- widgets/table/e-cell-percent.c | 2 +- widgets/table/e-cell-popup.c | 70 ++++++++++++++--------------- widgets/table/e-cell-size.c | 2 +- widgets/table/e-cell-text.c | 18 ++++---- widgets/table/e-cell-text.h | 2 +- widgets/table/e-cell-toggle.c | 4 +- widgets/table/e-cell-tree.c | 6 +-- widgets/table/e-cell-vbox.c | 4 +- widgets/table/e-table-click-to-add.c | 4 +- widgets/table/e-table-config-field.c | 2 +- widgets/table/e-table-config.c | 4 +- widgets/table/e-table-example-2.c | 8 ++-- widgets/table/e-table-field-chooser-item.c | 2 +- widgets/table/e-table-group-container.c | 16 +++---- widgets/table/e-table-group-leaf.c | 2 +- widgets/table/e-table-group.c | 2 +- widgets/table/e-table-header-item.c | 10 ++--- widgets/table/e-table-header-utils.c | 6 +-- widgets/table/e-table-header-utils.h | 4 +- widgets/table/e-table-item.c | 24 +++++----- widgets/table/e-table-item.h | 6 +-- widgets/table/e-table-memory-callbacks.c | 2 +- widgets/table/e-table-memory-store.c | 2 +- widgets/table/e-table-memory.c | 2 +- widgets/table/e-table-one.c | 4 +- widgets/table/e-table-simple.c | 4 +- widgets/table/e-table-sorted-variable.c | 6 +-- widgets/table/e-table-sorted-variable.h | 4 +- widgets/table/e-table-sorted.c | 6 +-- widgets/table/e-table-sorted.h | 4 +- widgets/table/e-table-sorter.c | 14 +++--- widgets/table/e-table-sorting-utils.c | 16 +++---- widgets/table/e-table-subset-variable.c | 10 ++--- widgets/table/e-table-subset.c | 6 +-- widgets/table/e-table-without.c | 2 +- widgets/table/e-table.c | 6 +-- widgets/table/e-tree-memory-callbacks.c | 2 +- widgets/table/e-tree-memory.c | 4 +- widgets/table/e-tree-selection-model.c | 36 +++++++-------- widgets/table/e-tree-simple.c | 2 +- widgets/table/e-tree-sorted-variable.c | 8 ++-- widgets/table/e-tree-sorted-variable.h | 4 +- widgets/table/e-tree-sorted.c | 2 +- widgets/table/e-tree-table-adapter.c | 8 ++-- widgets/table/e-tree.c | 8 ++-- 50 files changed, 197 insertions(+), 197 deletions(-) (limited to 'widgets/table') diff --git a/widgets/table/a11y/gal-a11y-e-cell-toggle.c b/widgets/table/a11y/gal-a11y-e-cell-toggle.c index 4fec22577b..df687f4005 100644 --- a/widgets/table/a11y/gal-a11y-e-cell-toggle.c +++ b/widgets/table/a11y/gal-a11y-e-cell-toggle.c @@ -102,8 +102,8 @@ toggle_cell_action (GalA11yECell *cell) e_table_item_get_cell_geometry (cell->item, &row, &col, &x, &y, &width, &height); - event.x = x + width / 2 + (int)(GNOME_CANVAS_ITEM (cell->item)->x1); - event.y = y + height / 2 + (int)(GNOME_CANVAS_ITEM (cell->item)->y1); + event.x = x + width / 2 + (gint)(GNOME_CANVAS_ITEM (cell->item)->x1); + event.y = y + height / 2 + (gint)(GNOME_CANVAS_ITEM (cell->item)->y1); event.type = GDK_BUTTON_PRESS; event.window = GTK_LAYOUT(GNOME_CANVAS_ITEM(cell->item)->canvas)->bin_window; diff --git a/widgets/table/a11y/gal-a11y-e-table-item.c b/widgets/table/a11y/gal-a11y-e-table-item.c index a3044a702b..561b9a84d6 100644 --- a/widgets/table/a11y/gal-a11y-e-table-item.c +++ b/widgets/table/a11y/gal-a11y-e-table-item.c @@ -799,8 +799,8 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) reorder = g_malloc0 (sizeof (gint) * n_cols); /* Compare with previously saved column headers. */ - for ( i = 0 ; i < n_cols && cols[i]; i ++ ) { - for ( j = 0 ; j < prev_n_cols && prev_cols[j]; j ++ ) { + for ( i = 0; i < n_cols && cols[i]; i ++ ) { + for ( j = 0; j < prev_n_cols && prev_cols[j]; j ++ ) { if ( prev_cols [j] == cols[i] && i != j ) { reorder_found = TRUE; @@ -822,8 +822,8 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) } /* Now try to find if there are removed columns. */ - for (i = 0 ; i < prev_n_cols && prev_cols[i]; i ++) { - for (j = 0 ; j < n_cols && cols[j]; j ++) + for (i = 0; i < prev_n_cols && prev_cols[i]; i ++) { + for (j = 0; j < n_cols && cols[j]; j ++) if ( prev_cols [j] == cols[i] ) break; @@ -847,7 +847,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) for (i = 0; i < prev_n_cols; i ++ ) { if (prev_state[i] == ETI_HEADER_REMOVED) { g_signal_emit_by_name (G_OBJECT(a11y_item), "column-deleted", i, 1); - for (j = 0 ; j < n_rows; j ++) + for (j = 0; j < n_rows; j ++) g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::remove", ((j+1)*prev_n_cols+i), NULL, NULL); } } @@ -857,7 +857,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y) for ( i = 0; i < n_cols; i ++ ) { if (state[i] == ETI_HEADER_NEW_ADDED) { g_signal_emit_by_name (G_OBJECT(a11y_item), "column-inserted", i, 1); - for (j = 0 ; j < n_rows; j ++) + for (j = 0; j < n_rows; j ++) g_signal_emit_by_name (G_OBJECT(a11y_item), "children_changed::add", ((j+1)*n_cols+i), NULL, NULL); } } diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c index e171080610..9fd01f9874 100644 --- a/widgets/table/e-cell-combo.c +++ b/widgets/table/e-cell-combo.c @@ -411,7 +411,7 @@ 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 - - (int)((GnomeCanvas *)canvas)->layout.vadjustment->value + - (gint)((GnomeCanvas *)canvas)->layout.vadjustment->value + ((GnomeCanvas *)canvas)->zoom_yofs; scrollbar_width = popup->vscrollbar->requisition.width @@ -595,7 +595,7 @@ e_cell_combo_button_release (GtkWidget *popup_window, /* This handles key press events in the popup window. If the Escape key is pressed we hide the popup, and do not change the cell contents. */ -static int +static gint e_cell_combo_key_press (GtkWidget *popup_window, GdkEventKey *event, ECellCombo *ecc) diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c index b2b921c5f5..9207437cb3 100644 --- a/widgets/table/e-cell-date-edit.c +++ b/widgets/table/e-cell-date-edit.c @@ -65,7 +65,7 @@ static gint e_cell_date_edit_do_popup (ECellPopup *ecp, gint view_col); static void e_cell_date_edit_set_popup_values (ECellDateEdit *ecde); static void e_cell_date_edit_select_matching_time(ECellDateEdit *ecde, - char *time); + gchar *time); static void e_cell_date_edit_show_popup (ECellDateEdit *ecde, gint row, gint view_col); @@ -565,7 +565,7 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde) static void e_cell_date_edit_select_matching_time (ECellDateEdit *ecde, - char *time) + gchar *time) { gboolean found = FALSE; gboolean valid; @@ -667,7 +667,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, /* The ETable positions don't include the grid lines, I think, so we add 1. */ *y += y1 + 1 - - (int)((GnomeCanvas *)canvas)->layout.vadjustment->value + - (gint)((GnomeCanvas *)canvas)->layout.vadjustment->value + ((GnomeCanvas *)canvas)->zoom_yofs; avail_height = gdk_screen_height () - *y; @@ -713,7 +713,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, /* This handles key press events in the popup window. If the Escape key is pressed we hide the popup, and do not change the cell contents. */ -static int +static gint e_cell_date_edit_key_press (GtkWidget *popup_window, GdkEventKey *event, ECellDateEdit *ecde) @@ -731,7 +731,7 @@ e_cell_date_edit_key_press (GtkWidget *popup_window, /* This handles button press events in the popup window. If the button is pressed outside the popup, we hide it and do not change the cell contents. */ -static int +static gint e_cell_date_edit_button_press (GtkWidget *popup_window, GdkEventButton *event, ECellDateEdit *ecde) diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c index 1673fd5435..53d1b79934 100644 --- a/widgets/table/e-cell-hbox.c +++ b/widgets/table/e-cell-hbox.c @@ -204,7 +204,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col /* * ECell::height method */ -static int +static gint ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; @@ -221,7 +221,7 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) /* * ECell::max_width method */ -static int +static gint ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; diff --git a/widgets/table/e-cell-percent.c b/widgets/table/e-cell-percent.c index 378bb8ab55..35dbb611ed 100644 --- a/widgets/table/e-cell-percent.c +++ b/widgets/table/e-cell-percent.c @@ -90,7 +90,7 @@ ecp_set_value (ECellText *cell, ETableModel *model, gint col, gint row, if (text) { p = text; while (*p) { - if (!isspace ((unsigned char) *p)) { + if (!isspace ((guchar) *p)) { empty = FALSE; break; } diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c index 9480ec5b8c..26897709c2 100644 --- a/widgets/table/e-cell-popup.c +++ b/widgets/table/e-cell-popup.c @@ -57,55 +57,55 @@ static void ecp_realize (ECellView *ecv); static void ecp_unrealize (ECellView *ecv); static void ecp_draw (ECellView *ecv, GdkDrawable *drawable, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, ECellFlags flags, - int x1, - int y1, - int x2, - int y2); + gint x1, + gint y1, + gint x2, + gint y2); static gint ecp_event (ECellView *ecv, GdkEvent *event, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, ECellFlags flags, ECellActions *actions); -static int ecp_height (ECellView *ecv, - int model_col, - int view_col, - int row); +static gint ecp_height (ECellView *ecv, + gint model_col, + gint view_col, + gint row); static gpointer ecp_enter_edit (ECellView *ecv, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); static void ecp_leave_edit (ECellView *ecv, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, void *edit_context); static void ecp_print (ECellView *ecv, GtkPrintContext *context, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, double width, double height); static gdouble ecp_print_height (ECellView *ecv, GtkPrintContext *context, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, double width); -static int ecp_max_width (ECellView *ecv, - int model_col, - int view_col); +static gint ecp_max_width (ECellView *ecv, + gint model_col, + gint view_col); static void ecp_show_tooltip (ECellView *ecv, - int model_col, - int view_col, - int row, - int col_width, + gint model_col, + gint view_col, + gint row, + gint col_width, ETableTooltip *tooltip); static gchar *ecp_get_bg_color (ECellView *ecell_view, gint row); @@ -368,7 +368,7 @@ ecp_event (ECellView *ecv, GdkEvent *event, gint model_col, gint view_col, /* * ECell::height method */ -static int +static gint ecp_height (ECellView *ecv, gint model_col, gint view_col, gint row) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -426,7 +426,7 @@ ecp_print_height (ECellView *ecv, GtkPrintContext *context, } -static int +static gint ecp_max_width (ECellView *ecv, gint model_col, gint view_col) diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c index 1fa949ec6a..e2b379f2f9 100644 --- a/widgets/table/e-cell-size.c +++ b/widgets/table/e-cell-size.c @@ -42,7 +42,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row) } else { fsize = ((gfloat) size) / 1024.0; if (fsize < 1024.0) { - return g_strdup_printf ("%d K", (int)fsize); + return g_strdup_printf ("%d K", (gint)fsize); } else { fsize /= 1024.0; return g_strdup_printf ("%.1f MB", fsize); diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index d5eafb801b..c1d5dc88bb 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -504,7 +504,7 @@ static PangoLayout * layout_with_preedit (ECellTextView *text_view, gint row, const gchar *text, gint width) { CellEdit *edit = text_view->edit; - PangoAttrList *attrs ; + PangoAttrList *attrs; PangoLayout *layout; GString *tmp_string = g_string_new (NULL); PangoAttrList *preedit_attrs = NULL; @@ -567,7 +567,7 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width) { ECellView *ecell_view = (ECellView *) text_view; ECellText *ect = E_CELL_TEXT (ecell_view->ecell); - PangoAttrList *attrs ; + PangoAttrList *attrs; PangoLayout *layout; PangoContext *context; cairo_font_options_t *font_options; @@ -1145,7 +1145,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col /* * ECell::height method */ -static int +static gint ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellTextView *text_view = (ECellTextView *) ecell_view; @@ -1430,7 +1430,7 @@ ect_print_height (ECellView *ecell_view, GtkPrintContext *context, return 16 + 8; } -static int +static gint ect_max_width (ECellView *ecell_view, gint model_col, gint view_col) @@ -1456,7 +1456,7 @@ ect_max_width (ECellView *ecell_view, return max_width + 8; } -static int +static gint ect_max_width_by_row (ECellView *ecell_view, gint model_col, gint view_col, @@ -1558,8 +1558,8 @@ ect_show_tooltip (ECellView *ecell_view, &canvas_x, &canvas_y); pixel_origin.x += canvas_x; pixel_origin.y += canvas_y; - pixel_origin.x -= (int) gtk_layout_get_hadjustment (GTK_LAYOUT (text_view->canvas))->value; - pixel_origin.y -= (int) gtk_layout_get_vadjustment (GTK_LAYOUT (text_view->canvas))->value; + pixel_origin.x -= (gint) gtk_layout_get_hadjustment (GTK_LAYOUT (text_view->canvas))->value; + pixel_origin.y -= (gint) gtk_layout_get_vadjustment (GTK_LAYOUT (text_view->canvas))->value; window = gtk_window_new (GTK_WINDOW_POPUP); gtk_container_set_border_width (GTK_CONTAINER (window), 1); @@ -2163,7 +2163,7 @@ _blink_scroll_timeout (gpointer data) return TRUE; } -static int +static gint next_word (CellEdit *edit, gint start) { gchar *p; @@ -2185,7 +2185,7 @@ next_word (CellEdit *edit, gint start) return p - edit->text; } -static int +static gint _get_position (ECellTextView *text_view, ETextEventProcessorCommand *command) { gint length; diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h index df4a6f827c..f3ecc415b4 100644 --- a/widgets/table/e-cell-text.h +++ b/widgets/table/e-cell-text.h @@ -98,7 +98,7 @@ ECell *e_cell_text_construct(ECellText *cell, const gchar *fontname, GtkJust /* Gets the value from the model and converts it into a string. In ECellText itself, the value is assumed to be a gchar * and so needs no conversion. In subclasses the ETableModel value may be a more complicated datatype. */ -char *e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row); +gchar *e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row); /* Frees the value returned by e_cell_text_get_text(). */ void e_cell_text_free_text (ECellText *cell, gchar *text); diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index 5754b73338..baad2027d5 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -215,7 +215,7 @@ etog_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_co /* * ECell::height method */ -static int +static gint etog_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell); @@ -275,7 +275,7 @@ etog_print_height (ECellView *ecell_view, GtkPrintContext *context, /* * ECell::max_width method */ -static int +static gint etog_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell); diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index 759fd6f70b..c3ecca939b 100644 --- a/widgets/table/e-cell-tree.c +++ b/widgets/table/e-cell-tree.c @@ -93,7 +93,7 @@ e_cell_tree_get_tree_table_adapter (ETableModel *table_model, gint row) return e_table_model_value_at (table_model, -3, row); } -static int +static gint visible_depth_of_node (ETableModel *model, gint row) { ETreeModel *tree_model = e_cell_tree_get_tree_model(model, row); @@ -427,7 +427,7 @@ event_in_expander (GdkEvent *event, gint offset, gint height) /* * ECell::height method */ -static int +static gint ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; @@ -567,7 +567,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col /* * ECell::max_width method */ -static int +static gint ect_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c index 65c2723adc..30bb9027a9 100644 --- a/widgets/table/e-cell-vbox.c +++ b/widgets/table/e-cell-vbox.c @@ -191,7 +191,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col /* * ECell::height method */ -static int +static gint ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; @@ -207,7 +207,7 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) /* * ECell::max_width method */ -static int +static gint ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c index 6c192eb6b4..99a290dea2 100644 --- a/widgets/table/e-table-click-to-add.c +++ b/widgets/table/e-table-click-to-add.c @@ -313,7 +313,7 @@ etcta_unrealize (GnomeCanvasItem *item) static void finish_editing (ETableClickToAdd *etcta); -static int +static gint item_key_press (ETableItem *item, gint row, gint col, GdkEvent *event, ETableClickToAdd *etcta) { switch (event->key.keyval) { @@ -374,7 +374,7 @@ finish_editing (ETableClickToAdd *etcta) /* * Handles the events on the ETableClickToAdd, particularly it creates the ETableItem and passes in some events. */ -static int +static gint etcta_event (GnomeCanvasItem *item, GdkEvent *e) { ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item); diff --git a/widgets/table/e-table-config-field.c b/widgets/table/e-table-config-field.c index 0fd82bf0ed..00b0ab2fd9 100644 --- a/widgets/table/e-table-config-field.c +++ b/widgets/table/e-table-config-field.c @@ -81,7 +81,7 @@ e_table_config_field_new (ETableSpecification *spec, return (ETableConfigField *) etcf; } -inline static int +inline static gint etcf_get_count (ETableConfigField *etcf) { if (etcf->grouping) diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 1fba29f580..cc61d1eb46 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -249,7 +249,7 @@ find_column_in_spec (ETableSpecification *spec, gint model_col) return NULL; } -static int +static gint find_model_column_by_name (ETableSpecification *spec, const gchar *s) { ETableColumnSpecification **column; @@ -1047,7 +1047,7 @@ config_button_remove (GtkWidget *widget, ETableConfig *config) for (column = columns; column; column = column->next) { gint row = GPOINTER_TO_INT (column->data); - memmove (config->temp_state->columns + row, config->temp_state->columns + row + 1, sizeof (int) * (config->temp_state->col_count - row - 1)); + memmove (config->temp_state->columns + row, config->temp_state->columns + row + 1, sizeof (gint) * (config->temp_state->col_count - row - 1)); memmove (config->temp_state->expansions + row, config->temp_state->expansions + row + 1, sizeof (double) * (config->temp_state->col_count - row - 1)); config->temp_state->col_count --; } diff --git a/widgets/table/e-table-example-2.c b/widgets/table/e-table-example-2.c index 295820da23..391873b043 100644 --- a/widgets/table/e-table-example-2.c +++ b/widgets/table/e-table-example-2.c @@ -133,13 +133,13 @@ gboolean importance_data[ROWS]; static GdkColor *color1; static GdkColor *color2; -static int +static gint my_col_count (ETableModel *etc, gpointer data) { return VIRTUAL_COLS; } -static int +static gint my_row_count (ETableModel *etc, gpointer data) { return ROWS; @@ -232,9 +232,9 @@ static gchar * my_value_to_string (ETableModel *etc, gint col, gconstpointer value, gpointer data) { if (col == COLOR_COLUMN){ - return g_strdup_printf("%d", (int) value); + return g_strdup_printf("%d", (gint) value); } else if (col == IMPORTANCE_COLUMN){ - return g_strdup_printf("%d", (int) value); + return g_strdup_printf("%d", (gint) value); } else { return g_strdup(value); } diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index 9c62064b27..d897d16f85 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -575,7 +575,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, doub /* * Handles the events on the ETableFieldChooserItem */ -static int +static gint etfci_event (GnomeCanvasItem *item, GdkEvent *e) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 4975d6dee5..29cd2b94d7 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -198,7 +198,7 @@ e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header } -static int +static gint etgc_event (GnomeCanvasItem *item, GdkEvent *event) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(item); @@ -572,7 +572,7 @@ etgc_remove (ETableGroup *etg, gint row) ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); GList *list; - for (list = etgc->children ; list; list = g_list_next (list)) { + for (list = etgc->children; list; list = g_list_next (list)) { ETableGroupContainerChildNode *child_node = list->data; ETableGroup *child = child_node->child; @@ -593,7 +593,7 @@ etgc_remove (ETableGroup *etg, gint row) return FALSE; } -static int +static gint etgc_row_count (ETableGroup *etg) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); @@ -613,7 +613,7 @@ etgc_increment (ETableGroup *etg, gint position, gint amount) ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); GList *list = etgc->children; - for (list = etgc->children ; list; list = g_list_next (list)) + for (list = etgc->children; list; list = g_list_next (list)) e_table_group_increment (((ETableGroupContainerChildNode *)list->data)->child, position, amount); } @@ -624,7 +624,7 @@ etgc_decrement (ETableGroup *etg, gint position, gint amount) ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); GList *list = etgc->children; - for (list = etgc->children ; list; list = g_list_next (list)) + for (list = etgc->children; list; list = g_list_next (list)) e_table_group_decrement (((ETableGroupContainerChildNode *)list->data)->child, position, amount); } @@ -1220,8 +1220,8 @@ e_table_group_container_print_page (EPrintable *ep, cairo_save (cr); cairo_rectangle (cr, 0, 0, width,TEXT_AREA_HEIGHT); cairo_rectangle (cr, 0, 0, 2 * TEXT_AREA_HEIGHT, child_height + TEXT_AREA_HEIGHT); - cairo_set_source_rgb (cr, .7, .7, .7) ; - cairo_fill(cr) ; + cairo_set_source_rgb (cr, .7, .7, .7); + cairo_fill(cr); cairo_restore (cr); cairo_save (cr); @@ -1245,7 +1245,7 @@ e_table_group_container_print_page (EPrintable *ep, pango_cairo_show_layout (cr, layout); g_free(string); - cairo_translate(cr, 2 * TEXT_AREA_HEIGHT, TEXT_AREA_HEIGHT) ; + cairo_translate(cr, 2 * TEXT_AREA_HEIGHT, TEXT_AREA_HEIGHT); cairo_move_to(cr, 0, 0); cairo_rectangle (cr, 0, 0, width - 2 * TEXT_AREA_HEIGHT,child_height); cairo_clip(cr); diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 5e269e284e..61d357aaf2 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -363,7 +363,7 @@ etgl_decrement (ETableGroup *etg, gint position, gint amount) } } -static int +static gint etgl_row_count (ETableGroup *etg) { ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index a1d965b57a..7d3499f8f0 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -590,7 +590,7 @@ e_table_group_get_header (ETableGroup *etg) return etg->header; } -static int +static gint etg_event (GnomeCanvasItem *item, GdkEvent *event) { ETableGroup *etg = E_TABLE_GROUP (item); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 51bd49a37b..190fccb846 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -151,7 +151,7 @@ ethi_dispose (GObject *object){ (*G_OBJECT_CLASS (ethi_parent_class)->dispose) (object); } -static int +static gint e_table_header_item_get_height (ETableHeaderItem *ethi) { ETableHeader *eth; @@ -387,7 +387,7 @@ ethi_get_property (GObject *object, } } -static int +static gint ethi_find_col_by_x (ETableHeaderItem *ethi, gint x) { const gint cols = e_table_header_count (ethi->eth); @@ -417,7 +417,7 @@ ethi_find_col_by_x (ETableHeaderItem *ethi, gint x) return cols - 1; } -static int +static gint ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, gint x) { const gint cols = e_table_header_count (ethi->eth); @@ -1685,7 +1685,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col) /* * Handles the events on the ETableHeaderItem, particularly it handles resizing */ -static int +static gint ethi_event (GnomeCanvasItem *item, GdkEvent *e) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); @@ -1782,7 +1782,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e) gint width = 0; g_signal_emit_by_name (ethi->eth, "request_width", - (int)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-utils.c b/widgets/table/e-table-header-utils.c index 7976289020..5d6ed5cb36 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -67,7 +67,7 @@ build_header_layout (GtkWidget *widget, const gchar *str) * * Return value: The height of the button, in pixels. **/ -double +gdouble e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) { gint ythick; @@ -98,7 +98,7 @@ e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) return height; } -double +gdouble e_table_header_width_extras (GtkStyle *style) { g_return_val_if_fail (style != NULL, -1); @@ -179,7 +179,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, else xfactor = width; - p[3] = ((int) p[3] * xfactor * yfactor / (width * height)); + p[3] = ((gint) p[3] * xfactor * yfactor / (width * height)); p += 4; } } diff --git a/widgets/table/e-table-header-utils.h b/widgets/table/e-table-header-utils.h index 7804bd12c5..60b373ef7f 100644 --- a/widgets/table/e-table-header-utils.h +++ b/widgets/table/e-table-header-utils.h @@ -32,9 +32,9 @@ extern "C" { #endif /* __cplusplus */ -double e_table_header_compute_height (ETableCol *ecol, +gdouble e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget); -double e_table_header_width_extras (GtkStyle *style); +gdouble e_table_header_width_extras (GtkStyle *style); void e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, GtkStyle *style, diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 461cacf4c2..c5cfa1878f 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -609,7 +609,7 @@ eti_remove_header_model (ETableItem *eti) * Returns the height used by row @row. This does not include the one-pixel * used as a separator between rows */ -static int +static gint eti_row_height_real (ETableItem *eti, gint row) { const gint cols = e_table_header_count (eti->header); @@ -698,7 +698,7 @@ calculate_height_cache (ETableItem *eti) * Returns the height used by row @row. This does not include the one-pixel * used as a separator between rows */ -static int +static gint eti_row_height (ETableItem *eti, gint row) { if (eti->uniform_row_height) { @@ -734,7 +734,7 @@ eti_row_height (ETableItem *eti, gint row) * when the height is computed by using the first row as the size for * every other row in the ETableItem. */ -static int +static gint eti_get_height (ETableItem *eti) { const gint rows = eti->rows; @@ -1169,7 +1169,7 @@ eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, E if (eti->height_cache) { gint i; eti->height_cache = g_renew(int, eti->height_cache, eti->rows); - memmove(eti->height_cache + row + count, eti->height_cache + row, (eti->rows - count - row) * sizeof(int)); + memmove(eti->height_cache + row + count, eti->height_cache + row, (eti->rows - count - row) * sizeof(gint)); for (i = row; i < row + count; i++) eti->height_cache[i] = -1; } @@ -1195,7 +1195,7 @@ eti_table_model_rows_deleted (ETableModel *table_model, gint row, gint count, ET eti->rows = e_table_model_row_count (eti->table_model); if (eti->height_cache && (eti->rows > row)) { - memmove(eti->height_cache + row, eti->height_cache + row + count, (eti->rows - row) * sizeof(int)); + memmove(eti->height_cache + row, eti->height_cache + row + count, (eti->rows - row) * sizeof(gint)); } eti_unfreeze (eti); @@ -1372,7 +1372,7 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti) gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (eti)); } -static int +static gint eti_request_column_width (ETableHeader *eth, gint col, ETableItem *eti) { gint width = 0; @@ -2222,7 +2222,7 @@ eti_cursor_move_right (ETableItem *eti) } #ifdef DO_TOOLTIPS -static int +static gint _do_tooltip (ETableItem *eti) { ECellView *ecell_view; @@ -2312,7 +2312,7 @@ eti_e_cell_event (ETableItem *item, ECellView *ecell_view, GdkEvent *event, } /* FIXME: cursor */ -static int +static gint eti_event (GnomeCanvasItem *item, GdkEvent *e) { ETableItem *eti = E_TABLE_ITEM (item); @@ -2674,7 +2674,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) gint cursor_row, cursor_col; gint handled = TRUE; - d(g_print("%s: GDK_KEY_PRESS received, keyval: %d\n", __FUNCTION__, (int) e->key.keyval)); + d(g_print("%s: GDK_KEY_PRESS received, keyval: %d\n", __FUNCTION__, (gint) e->key.keyval)); g_object_get(eti->selection, "cursor_row", &cursor_row, @@ -2881,7 +2881,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) case GDK_KEY_RELEASE: { gint cursor_row, cursor_col; - d(g_print("%s: GDK_KEY_RELEASE received, keyval: %d\n", __FUNCTION__, (int) e->key.keyval)); + d(g_print("%s: GDK_KEY_RELEASE received, keyval: %d\n", __FUNCTION__, (gint) e->key.keyval)); g_object_get(eti->selection, "cursor_row", &cursor_row, @@ -3464,7 +3464,7 @@ e_table_item_compute_mouse_over (ETableItem *eti, gnome_canvas_item_w2i (GNOME_CANVAS_ITEM (eti), &realx, &realy); - if (!find_cell (eti, (int)realx, (int)realy, col, row, NULL, NULL)) { + if (!find_cell (eti, (gint)realx, (gint)realy, col, row, NULL, NULL)) { *row = -1; *col = -1; } @@ -3590,7 +3590,7 @@ e_table_item_print_page (EPrintable *ep, } 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); diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h index f149656fac..92e8e0c2fd 100644 --- a/widgets/table/e-table-item.h +++ b/widgets/table/e-table-item.h @@ -227,9 +227,9 @@ void e_table_item_get_cell_geometry (ETableItem *eti, gint *width, gint *height); -int e_table_item_row_diff (ETableItem *eti, - int start_row, - int end_row); +gint e_table_item_row_diff (ETableItem *eti, + gint start_row, + gint end_row); G_END_DECLS diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c index c06303ca4b..d39a396c64 100644 --- a/widgets/table/e-table-memory-callbacks.c +++ b/widgets/table/e-table-memory-callbacks.c @@ -29,7 +29,7 @@ G_DEFINE_TYPE (ETableMemoryCalbacks, e_table_memory_callbacks, E_TABLE_MEMORY_TYPE) -static int +static gint etmc_column_count (ETableModel *etm) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c index 622de851c0..95ea4bee99 100644 --- a/widgets/table/e-table-memory-store.c +++ b/widgets/table/e-table-memory-store.c @@ -87,7 +87,7 @@ free_value (ETableMemoryStore *etms, gint col, gpointer value) } -static int +static gint etms_column_count (ETableModel *etm) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c index 98fd65c460..8eb6a3e30c 100644 --- a/widgets/table/e-table-memory.c +++ b/widgets/table/e-table-memory.c @@ -64,7 +64,7 @@ etmm_finalize (GObject *object) G_OBJECT_CLASS (e_table_memory_parent_class)->finalize (object); } -static int +static gint etmm_row_count (ETableModel *etm) { ETableMemory *etmm = E_TABLE_MEMORY (etm); diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c index c8cea32963..a604e7a590 100644 --- a/widgets/table/e-table-one.c +++ b/widgets/table/e-table-one.c @@ -29,7 +29,7 @@ G_DEFINE_TYPE (ETableOne, e_table_one, E_TABLE_MODEL_TYPE) -static int +static gint one_column_count (ETableModel *etm) { ETableOne *one = E_TABLE_ONE(etm); @@ -40,7 +40,7 @@ one_column_count (ETableModel *etm) return 0; } -static int +static gint one_row_count (ETableModel *etm) { return 1; diff --git a/widgets/table/e-table-simple.c b/widgets/table/e-table-simple.c index f2eceb9314..2980bec7c0 100644 --- a/widgets/table/e-table-simple.c +++ b/widgets/table/e-table-simple.c @@ -30,7 +30,7 @@ G_DEFINE_TYPE (ETableSimple, e_table_simple, E_TABLE_MODEL_TYPE) -static int +static gint simple_column_count (ETableModel *etm) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -41,7 +41,7 @@ simple_column_count (ETableModel *etm) return 0; } -static int +static gint simple_row_count (ETableModel *etm) { ETableSimple *simple = E_TABLE_SIMPLE(etm); diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c index c4d5574dbc..4676db8ac4 100644 --- a/widgets/table/e-table-sorted-variable.c +++ b/widgets/table/e-table-sorted-variable.c @@ -133,7 +133,7 @@ etsv_add (ETableSubsetVariable *etssv, 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(int)); + etss->map_table = g_realloc (etss->map_table, (etssv->n_vals_allocated) * sizeof(gint)); } i = etss->n_map; if (etsv->sort_idle_id == 0) { @@ -149,7 +149,7 @@ etsv_add (ETableSubsetVariable *etssv, etsv->insert_idle_id = g_idle_add_full(40, (GSourceFunc) etsv_insert_idle, etsv, NULL); } i = e_table_sorting_utils_insert(etss->source, etsv->sort_info, etsv->full_header, etss->map_table, etss->n_map, row); - memmove(etss->map_table + i + 1, etss->map_table + i, (etss->n_map - i) * sizeof(int)); + memmove(etss->map_table + i + 1, etss->map_table + i, (etss->n_map - i) * sizeof(gint)); } } etss->map_table[i] = row; @@ -173,7 +173,7 @@ etsv_add_all (ETableSubsetVariable *etssv) 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(int)); + etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(gint)); } for (i = 0; i < rows; i++) etss->map_table[etss->n_map++] = i; diff --git a/widgets/table/e-table-sorted-variable.h b/widgets/table/e-table-sorted-variable.h index 48bb0e3aa0..c778af3c1f 100644 --- a/widgets/table/e-table-sorted-variable.h +++ b/widgets/table/e-table-sorted-variable.h @@ -48,8 +48,8 @@ typedef struct { gint sort_info_changed_id; gint sort_idle_id; - int insert_idle_id; - int insert_count; + gint insert_idle_id; + gint insert_count; } ETableSortedVariable; diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c index ae9bbbd3eb..16bb3cf888 100644 --- a/widgets/table/e-table-sorted.c +++ b/widgets/table/e-table-sorted.c @@ -218,7 +218,7 @@ ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row } } - etss->map_table = g_realloc (etss->map_table, (etss->n_map + count) * sizeof(int)); + etss->map_table = g_realloc (etss->map_table, (etss->n_map + count) * sizeof(gint)); for (; count > 0; count --) { if (!full_change) @@ -237,7 +237,7 @@ ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row ets->insert_idle_id = g_idle_add_full(40, (GSourceFunc) ets_insert_idle, ets, NULL); } i = e_table_sorting_utils_insert(etss->source, ets->sort_info, ets->full_header, etss->map_table, etss->n_map, row); - memmove(etss->map_table + i + 1, etss->map_table + i, (etss->n_map - i) * sizeof(int)); + memmove(etss->map_table + i + 1, etss->map_table + i, (etss->n_map - i) * sizeof(gint)); } } etss->map_table[i] = row; @@ -271,7 +271,7 @@ ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row, if (etss->map_table[i] == row + j) { if (shift) e_table_model_pre_change (etm); - memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(int)); + memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(gint)); etss->n_map --; if (shift) e_table_model_row_deleted (etm, i); diff --git a/widgets/table/e-table-sorted.h b/widgets/table/e-table-sorted.h index cb802768d8..a9e815ef3a 100644 --- a/widgets/table/e-table-sorted.h +++ b/widgets/table/e-table-sorted.h @@ -48,8 +48,8 @@ typedef struct { gint sort_info_changed_id; gint sort_idle_id; - int insert_idle_id; - int insert_count; + gint insert_idle_id; + gint insert_count; } ETableSorted; diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c index 4d3148a902..766d94dd58 100644 --- a/widgets/table/e-table-sorter.c +++ b/widgets/table/e-table-sorter.c @@ -161,11 +161,11 @@ ets_class_init (ETableSorterClass *klass) object_class->set_property = ets_set_property; object_class->get_property = ets_get_property; - sorter_class->model_to_sorted = ets_model_to_sorted ; - sorter_class->sorted_to_model = ets_sorted_to_model ; - sorter_class->get_model_to_sorted_array = ets_get_model_to_sorted_array ; - sorter_class->get_sorted_to_model_array = ets_get_sorted_to_model_array ; - sorter_class->needs_sorting = ets_needs_sorting ; + sorter_class->model_to_sorted = ets_model_to_sorted; + sorter_class->sorted_to_model = ets_sorted_to_model; + sorter_class->get_model_to_sorted_array = ets_get_model_to_sorted_array; + sorter_class->get_sorted_to_model_array = ets_get_sorted_to_model_array; + sorter_class->needs_sorting = ets_needs_sorting; g_object_class_install_property (object_class, PROP_SORT_INFO, g_param_spec_object ("sort_info", @@ -268,7 +268,7 @@ static GCompareFunc *compare_closure; /* FIXME: Make it not cache the second and later columns (as if anyone cares.) */ -static int +static gint qsort_callback(gconstpointer data1, gconstpointer data2) { gint row1 = *(gint *)data1; @@ -355,7 +355,7 @@ ets_sort(ETableSorter *ets) ascending_closure[j] = column.ascending; } - qsort(ets->sorted, rows, sizeof(int), qsort_callback); + qsort(ets->sorted, rows, sizeof(gint), qsort_callback); g_free(vals_closure); g_free(ascending_closure); diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c index a8ab92bf94..cf1b503b09 100644 --- a/widgets/table/e-table-sorting-utils.c +++ b/widgets/table/e-table-sorting-utils.c @@ -31,7 +31,7 @@ #define d(x) /* This takes source rows. */ -static int +static gint etsu_compare(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint row1, gint row2) { gint j; @@ -77,7 +77,7 @@ typedef struct { /* FIXME: Make it not cache the second and later columns (as if anyone cares.) */ -static int +static gint e_sort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data) { gint row1 = *(gint *)data1; @@ -142,7 +142,7 @@ e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETabl } g_qsort_with_data ( - map_table, rows, sizeof(int), e_sort_callback, &closure); + map_table, rows, sizeof(gint), e_sort_callback, &closure); g_free(closure.vals); g_free(closure.ascending); @@ -218,7 +218,7 @@ e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_ /* This takes source rows. */ -static int +static gint etsu_tree_compare(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath path1, ETreePath path2) { gint j; @@ -243,7 +243,7 @@ etsu_tree_compare(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *f return comp_val; } -static int +static gint e_sort_tree_callback(gconstpointer data1, gconstpointer data2, gpointer user_data) { ETreePath *path1 = *(ETreePath *)data1; @@ -296,7 +296,7 @@ e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, E } g_qsort_with_data ( - map, count, sizeof(int), e_sort_callback, &closure); + map, count, sizeof(gint), e_sort_callback, &closure); map_copy = g_new(ETreePath, count); for (i = 0; i < count; i++) { @@ -340,8 +340,8 @@ e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *s gint e_table_sorting_utils_tree_insert(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count, ETreePath path) { - size_t start; - size_t end; + gsize start; + gsize end; ETreeSortClosure closure; closure.tree = source; diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c index 93faeac0f8..de1d7ccacf 100644 --- a/widgets/table/e-table-subset-variable.c +++ b/widgets/table/e-table-subset-variable.c @@ -48,7 +48,7 @@ etssv_add (ETableSubsetVariable *etssv, 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(int)); + etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(gint)); } etss->map_table[etss->n_map++] = row; @@ -69,7 +69,7 @@ etssv_add_array (ETableSubsetVariable *etssv, 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(int)); + etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(gint)); } for (i = 0; i < count; i++) etss->map_table[etss->n_map++] = array[i]; @@ -90,7 +90,7 @@ etssv_add_all (ETableSubsetVariable *etssv) rows = e_table_model_row_count(etss->source); if (etss->n_map + rows > etssv->n_vals_allocated){ etssv->n_vals_allocated += MAX(INCREMENT_AMOUNT, rows); - etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(int)); + etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(gint)); } for (i = 0; i < rows; i++) etss->map_table[etss->n_map++] = i; @@ -109,7 +109,7 @@ etssv_remove (ETableSubsetVariable *etssv, 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(int)); + memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(gint)); etss->n_map --; e_table_model_row_deleted (etm, i); @@ -253,6 +253,6 @@ e_table_subset_variable_set_allocation (ETableSubsetVariable *etssv, if (total <= 0) total = 1; if (total > etss->n_map){ - etss->map_table = g_realloc (etss->map_table, total * sizeof(int)); + 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 bf137e0ef8..a860aba24f 100644 --- a/widgets/table/e-table-subset.c +++ b/widgets/table/e-table-subset.c @@ -131,7 +131,7 @@ etss_finalize (GObject *object) G_OBJECT_CLASS (etss_parent_class)->finalize (object); } -static int +static gint etss_column_count (ETableModel *etm) { ETableSubset *etss = (ETableSubset *)etm; @@ -139,7 +139,7 @@ etss_column_count (ETableModel *etm) return e_table_model_column_count (etss->source); } -static int +static gint etss_row_count (ETableModel *etm) { ETableSubset *etss = (ETableSubset *)etm; @@ -394,7 +394,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, gint nvals) gint i; if (nvals) { - buffer = (guint *) g_malloc (sizeof (unsigned int) * nvals); + buffer = (guint *) g_malloc (sizeof (guint) * nvals); if (buffer == NULL) return NULL; } else diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c index fc7cb101ec..a53ada3589 100644 --- a/widgets/table/e-table-without.c +++ b/widgets/table/e-table-without.c @@ -114,7 +114,7 @@ remove_row (ETableWithout *etw, gint view_row) ETableSubset *etss = E_TABLE_SUBSET (etw); e_table_model_pre_change (E_TABLE_MODEL (etw)); - memmove (etss->map_table + view_row, etss->map_table + view_row + 1, (etss->n_map - view_row - 1) * sizeof (int)); + memmove (etss->map_table + view_row, etss->map_table + view_row + 1, (etss->n_map - view_row - 1) * sizeof (gint)); etss->n_map --; e_table_model_row_deleted (E_TABLE_MODEL (etw), view_row); } diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 549a4ca6e6..7f756d95a4 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -690,8 +690,8 @@ table_canvas_reflow_idle (ETable *e_table) "height", &height, "width", &width, NULL); - height = MAX ((int)height, alloc->height); - width = MAX((int)width, alloc->width); + height = MAX ((gint)height, alloc->height); + width = MAX((gint)width, alloc->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); @@ -720,7 +720,7 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, g_object_get (e_table->canvas_vbox, "height", &height, NULL); - height = MAX ((int)height, alloc->height); + height = MAX ((gint)height, alloc->height); g_object_set (e_table->canvas_vbox, "width", width, diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c index 562a47386c..e961a067ca 100644 --- a/widgets/table/e-tree-memory-callbacks.c +++ b/widgets/table/e-tree-memory-callbacks.c @@ -39,7 +39,7 @@ etmc_icon_at (ETreeModel *etm, ETreePath node) return etmc->icon_at (etm, node, etmc->model_data); } -static int +static gint etmc_column_count (ETreeModel *etm) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c index 54bd7b77f5..8cd2f06cb9 100644 --- a/widgets/table/e-tree-memory.c +++ b/widgets/table/e-tree-memory.c @@ -84,7 +84,7 @@ check_children (ETreeMemory *memory, ETreePath node) } } -static int +static gint e_tree_memory_path_depth (ETreeMemoryPath *path) { gint depth = 0; @@ -636,7 +636,7 @@ typedef struct { ETreeMemorySortCallback callback; } MemoryAndClosure; -static int +static gint sort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data) { ETreePath path1 = *(ETreePath *)data1; diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 3bb4375b4d..87140ef30a 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -455,7 +455,7 @@ etsm_selected_count (ESelectionModel *selection) return g_hash_table_size (etsm->priv->paths); } -static int +static gint etsm_row_count (ESelectionModel *selection) { ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL(selection); @@ -783,23 +783,23 @@ e_tree_selection_model_class_init (ETreeSelectionModelClass *klass) object_class->get_property = etsm_get_property; object_class->set_property = etsm_set_property; - esm_class->is_row_selected = etsm_is_row_selected ; - esm_class->foreach = etsm_foreach ; - esm_class->clear = etsm_clear ; - esm_class->selected_count = etsm_selected_count ; - esm_class->select_all = etsm_select_all ; - esm_class->invert_selection = etsm_invert_selection ; - esm_class->row_count = etsm_row_count ; - - esm_class->change_one_row = etsm_change_one_row ; - esm_class->change_cursor = etsm_change_cursor ; - esm_class->cursor_row = etsm_cursor_row ; - esm_class->cursor_col = etsm_cursor_col ; - - esm_class->select_single_row = etsm_select_single_row ; - esm_class->toggle_single_row = etsm_toggle_single_row ; - esm_class->move_selection_end = etsm_move_selection_end ; - esm_class->set_selection_end = etsm_set_selection_end ; + esm_class->is_row_selected = etsm_is_row_selected; + esm_class->foreach = etsm_foreach; + esm_class->clear = etsm_clear; + esm_class->selected_count = etsm_selected_count; + esm_class->select_all = etsm_select_all; + esm_class->invert_selection = etsm_invert_selection; + esm_class->row_count = etsm_row_count; + + esm_class->change_one_row = etsm_change_one_row; + esm_class->change_cursor = etsm_change_cursor; + esm_class->cursor_row = etsm_cursor_row; + esm_class->cursor_col = etsm_cursor_col; + + esm_class->select_single_row = etsm_select_single_row; + esm_class->toggle_single_row = etsm_toggle_single_row; + esm_class->move_selection_end = etsm_move_selection_end; + esm_class->set_selection_end = etsm_set_selection_end; g_object_class_install_property (object_class, PROP_CURSOR_ROW, g_param_spec_int ("cursor_row", diff --git a/widgets/table/e-tree-simple.c b/widgets/table/e-tree-simple.c index b71f108a7d..a1668dc542 100644 --- a/widgets/table/e-tree-simple.c +++ b/widgets/table/e-tree-simple.c @@ -27,7 +27,7 @@ #include "e-tree-simple.h" -static int +static gint simple_column_count (ETableModel *etm) { ETreeSimple *simple = E_TREE_SIMPLE(etm); diff --git a/widgets/table/e-tree-sorted-variable.c b/widgets/table/e-tree-sorted-variable.c index d9901e611b..822affeee8 100644 --- a/widgets/table/e-tree-sorted-variable.c +++ b/widgets/table/e-tree-sorted-variable.c @@ -211,7 +211,7 @@ etsv_sort_info_changed (ETableSortInfo *info, ETreeSortedVariable *etsv) } /* This takes source rows. */ -static int +static gint etsv_compare(ETreeSortedVariable *etsv, const ETreePath *path1, const ETreePath *path2) { gint j; @@ -249,7 +249,7 @@ gint *ascending_closure; gint *col_idx_closure; GCompareFunc *compare_closure; -static int +static gint etsv_compare_closure(const ETreePath *path1, const ETreePath *path2) { gint j; @@ -275,7 +275,7 @@ etsv_compare_closure(const ETreePath *path1, const ETreePath *path2) return comp_val; } -static int +static gint qsort_callback(gconstpointer data1, gconstpointer data2) { GNode *node1 = *(GNode **)data1; @@ -283,7 +283,7 @@ qsort_callback(gconstpointer data1, gconstpointer data2) return etsv_compare_closure(node1->data, node2->data); } -static int +static gint qsort_callback_source(gconstpointer data1, gconstpointer data2) { return etsv_compare_closure(data1, data2); diff --git a/widgets/table/e-tree-sorted-variable.h b/widgets/table/e-tree-sorted-variable.h index 2d5af111d9..1c4de3ed9c 100644 --- a/widgets/table/e-tree-sorted-variable.h +++ b/widgets/table/e-tree-sorted-variable.h @@ -51,8 +51,8 @@ typedef struct { gint table_model_cell_changed_id; gint sort_info_changed_id; gint sort_idle_id; - int insert_idle_id; - int insert_count; + gint insert_idle_id; + gint insert_count; } ETreeSortedVariable; diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c index c72c269471..cd4ef4a537 100644 --- a/widgets/table/e-tree-sorted.c +++ b/widgets/table/e-tree-sorted.c @@ -1065,7 +1065,7 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr } parent_path->num_children ++; parent_path->children = g_renew(ETreeSortedPath *, parent_path->children, parent_path->num_children); - memmove(parent_path->children + i + 1, parent_path->children + i, (parent_path->num_children - 1 - i) * sizeof(int)); + memmove(parent_path->children + i + 1, parent_path->children + i, (parent_path->num_children - 1 - i) * sizeof(gint)); parent_path->children[i] = path; for (j = i; j < parent_path->num_children; j++) { parent_path->children[j]->position = j; diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index cac1260681..783f58c4cc 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -73,7 +73,7 @@ struct ETreeTableAdapterPriv { gint pre_change_id; gint no_change_id; - int rebuilt_id; + gint rebuilt_id; gint node_changed_id; gint node_data_changed_id; gint node_col_changed_id; @@ -259,7 +259,7 @@ update_child_counts(GNode *gnode, gint delta) } } -static int +static gint delete_children(ETreeTableAdapter *etta, GNode *gnode) { node_t *node = (node_t *)gnode->data; @@ -566,7 +566,7 @@ etta_dispose (GObject *object) G_OBJECT_CLASS (etta_parent_class)->dispose (object); } -static int +static gint etta_column_count (ETableModel *etm) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -599,7 +599,7 @@ etta_has_change_pending (ETableModel *etm) } -static int +static gint etta_row_count (ETableModel *etm) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index beb069e5fb..8124a59c64 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -738,8 +738,8 @@ tree_canvas_reflow_idle (ETree *e_tree) "height", &height, "width", &width, NULL); - height = MAX ((int)height, alloc->height); - width = MAX((int)width, alloc->width); + height = MAX ((gint)height, alloc->height); + width = MAX((gint)width, alloc->width); /* I have no idea why this needs to be -1, but it works. */ gnome_canvas_get_scroll_region (GNOME_CANVAS (e_tree->priv->table_canvas), NULL, NULL, &oldwidth, &oldheight); @@ -771,7 +771,7 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, g_object_get (e_tree->priv->item, "height", &height, NULL); - height = MAX ((int)height, alloc->height); + height = MAX ((gint)height, alloc->height); g_object_set (e_tree->priv->item, "width", width, @@ -1766,7 +1766,7 @@ et_foreach_recurse (ETreeModel *model, callback(path, closure); child = e_tree_model_node_get_first_child(E_TREE_MODEL(model), path); - for ( ; child; child = e_tree_model_node_get_next(E_TREE_MODEL(model), child)) + for (; child; child = e_tree_model_node_get_next(E_TREE_MODEL(model), child)) if (child) et_foreach_recurse (model, child, callback, closure); } -- cgit v1.2.3