diff options
Diffstat (limited to 'widgets')
69 files changed, 309 insertions, 309 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index e55938978c..ea30c1701e 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -323,7 +323,7 @@ e_timezone_dialog_construct (ETimezoneDialog *etd) } #if 0 -static int +static gint get_local_offset (void) { time_t now = time(NULL), t_gmt, t_local; @@ -396,8 +396,8 @@ e_timezone_dialog_new (void) } static void -format_utc_offset (int utc_offset, - char *buffer) +format_utc_offset (gint utc_offset, + gchar *buffer) { const gchar *sign = "+"; gint hours, minutes, seconds; diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c index 82ab22eedc..a977e0a787 100644 --- a/widgets/menus/gal-define-views-model.c +++ b/widgets/menus/gal-define-views-model.c @@ -60,14 +60,14 @@ gdvm_dispose(GObject *object) } /* This function returns the number of columns in our ETableModel. */ -static int +static gint gdvm_col_count (ETableModel *etc) { return 1; } /* This function returns the number of rows in our ETableModel. */ -static int +static gint gdvm_row_count (ETableModel *etc) { GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc); diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c index 688e833aeb..d12f4ae792 100644 --- a/widgets/menus/gal-view-etable.c +++ b/widgets/menus/gal-view-etable.c @@ -165,15 +165,15 @@ gal_view_etable_class_init (GalViewEtableClass *klass) GalViewClass *gal_view_class = GAL_VIEW_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); - gal_view_class->edit = gal_view_etable_edit ; - gal_view_class->load = gal_view_etable_load ; - gal_view_class->save = gal_view_etable_save ; - gal_view_class->get_title = gal_view_etable_get_title ; - gal_view_class->set_title = gal_view_etable_set_title ; + gal_view_class->edit = gal_view_etable_edit; + gal_view_class->load = gal_view_etable_load; + gal_view_class->save = gal_view_etable_save; + gal_view_class->get_title = gal_view_etable_get_title; + gal_view_class->set_title = gal_view_etable_set_title; gal_view_class->get_type_code = gal_view_etable_get_type_code; - gal_view_class->clone = gal_view_etable_clone ; + gal_view_class->clone = gal_view_etable_clone; - object_class->dispose = gal_view_etable_dispose ; + object_class->dispose = gal_view_etable_dispose; } static void diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c index b61f1ac155..e3a24726c5 100644 --- a/widgets/menus/gal-view-new-dialog.c +++ b/widgets/menus/gal-view-new-dialog.c @@ -206,7 +206,7 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog, gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->list), column); iterator = dialog->collection->factory_list; - for ( ; iterator; iterator = g_list_next(iterator) ) { + for (; iterator; iterator = g_list_next(iterator) ) { GalViewFactory *factory = iterator->data; GtkTreeIter iter; diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index c1d599e879..9c9bd94b15 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -60,37 +60,37 @@ static void e_calendar_item_unmap (GnomeCanvasItem *item); static void e_calendar_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, - int flags); + gint flags); static void e_calendar_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, - int y, - int width, - int height); + gint x, + gint y, + gint width, + gint height); static void e_calendar_item_draw_month (ECalendarItem *calitem, GdkDrawable *drawable, - int x, - int y, - int width, - int height, - int row, - int col); + gint x, + gint y, + gint width, + gint height, + gint row, + gint col); static void e_calendar_item_draw_day_numbers (ECalendarItem *calitem, GdkDrawable *drawable, - int width, - int height, - int row, - int col, - int year, - int month, - int start_weekday, + gint width, + gint height, + gint row, + gint col, + gint year, + gint month, + gint start_weekday, gint cells_x, gint cells_y); static double e_calendar_item_point (GnomeCanvasItem *item, double x, double y, - int cx, - int cy, + gint cx, + gint cy, GnomeCanvasItem **actual_item); static void e_calendar_item_stop_selecting (ECalendarItem *calitem, guint32 time); @@ -891,7 +891,7 @@ static void e_calendar_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, - int flags) + gint flags) { ECalendarItem *calitem; GtkStyle *style; @@ -1024,10 +1024,10 @@ e_calendar_item_update (GnomeCanvasItem *item, static void e_calendar_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, - int x, - int y, - int width, - int height) + gint x, + gint y, + gint width, + gint height) { ECalendarItem *calitem; GtkStyle *style; @@ -1151,12 +1151,12 @@ layout_set_day_text (ECalendarItem *calitem, PangoLayout *layout, gint day_index static void e_calendar_item_draw_month (ECalendarItem *calitem, GdkDrawable *drawable, - int x, - int y, - int width, - int height, - int row, - int col) + gint x, + gint y, + gint width, + gint height, + gint row, + gint col) { GnomeCanvasItem *item; GtkWidget *widget; @@ -1395,13 +1395,13 @@ get_digit_fomat () static void e_calendar_item_draw_day_numbers (ECalendarItem *calitem, GdkDrawable *drawable, - int width, - int height, - int row, - int col, - int year, - int month, - int start_weekday, + gint width, + gint height, + gint row, + gint col, + gint year, + gint month, + gint start_weekday, gint cells_x, gint cells_y) { diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c index 1eb0ddec12..bb0bd775e9 100644 --- a/widgets/misc/e-canvas-vbox.c +++ b/widgets/misc/e-canvas-vbox.c @@ -330,7 +330,7 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) max_width = item_width; list = g_list_next(list); - for( ; list; list = g_list_next(list)) { + for(; list; list = g_list_next(list)) { running_height += e_canvas_vbox->spacing; g_object_get (list->data, diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index 39b89d2675..53e3eafeec 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -147,7 +147,7 @@ e_canvas_new (void) /* Emits an event for an item in the canvas, be it the current item, grabbed * item, or focused item, as appropriate. */ -static int +static gint emit_event (GnomeCanvas *canvas, GdkEvent *event) { GdkEvent *ev; @@ -316,7 +316,7 @@ gnome_canvas_item_invoke_point (GnomeCanvasItem *item, double x, double y, gint */ #define DISPLAY_X1(canvas) (GNOME_CANVAS (canvas)->layout.xoffset) #define DISPLAY_Y1(canvas) (GNOME_CANVAS (canvas)->layout.yoffset) -static int +static gint pick_current_item (GnomeCanvas *canvas, GdkEvent *event) { gint button_down; @@ -392,8 +392,8 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event) /* canvas pixel coords */ - cx = (int) (x + 0.5); - cy = (int) (y + 0.5); + cx = (gint) (x + 0.5); + cy = (gint) (y + 0.5); /* world coords */ diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index b9ae1ad901..84b016934e 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -153,9 +153,9 @@ static void on_date_popup_date_selected (ECalendarItem *calitem, EDateEdit *dedit); static void hide_date_popup (EDateEdit *dedit); static void rebuild_time_popup (EDateEdit *dedit); -static gboolean field_set_to_none (const char *text); +static gboolean field_set_to_none (const gchar *text); static gboolean e_date_edit_parse_date (EDateEdit *dedit, - const char *date_text, + const gchar *date_text, struct tm *date_tm); static gboolean e_date_edit_parse_time (EDateEdit *dedit, const gchar *time_text, @@ -1504,7 +1504,7 @@ field_set_to_none (const gchar *text) gint n; pos = text; - while (n = (int)((unsigned char)*pos), isspace (n)) + while (n = (gint)((guchar)*pos), isspace (n)) pos++; none_string = _("None"); diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index 1bc183dbe5..4463fd12d8 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -551,7 +551,7 @@ filter_bar_get_property (GObject *object, } } -static int +static gint xml_get_prop_int (xmlNodePtr node, const gchar *prop) { gchar *buf; diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c index e11439eb26..3c83cb1048 100644 --- a/widgets/misc/e-image-chooser.c +++ b/widgets/misc/e-image-chooser.c @@ -241,7 +241,7 @@ set_image_from_data (EImageChooser *chooser, GdkPixbuf *scaled; GdkPixbuf *composite; - float scale; + gfloat scale; gint new_height, new_width; new_height = gdk_pixbuf_get_height (pixbuf); @@ -259,17 +259,17 @@ set_image_from_data (EImageChooser *chooser, /* we need to scale down */ printf ("we need to scale down\n"); if (new_height > new_width) - scale = (float)chooser->priv->image_height / new_height; + scale = (gfloat)chooser->priv->image_height / new_height; else - scale = (float)chooser->priv->image_width / new_width; + scale = (gfloat)chooser->priv->image_width / new_width; } else { /* we need to scale up */ printf ("we need to scale up\n"); if (new_height > new_width) - scale = (float)new_height / chooser->priv->image_height; + scale = (gfloat)new_height / chooser->priv->image_height; else - scale = (float)new_width / chooser->priv->image_width; + scale = (gfloat)new_width / chooser->priv->image_width; } printf ("scale = %g\n", scale); diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index f35335f37d..82ce1c17aa 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -689,7 +689,7 @@ e_map_world_to_window (EMap *map, double world_longitude, double world_latitude, /* --- Zoom --- */ -double +gdouble e_map_get_magnification (EMap *map) { EMapPrivate *priv; @@ -1153,8 +1153,8 @@ repaint_point (EMap *map, EMapPoint *point) e_map_world_to_window (map, point->longitude, point->latitude, &px, &py); - area.x = (int) px - 2; - area.y = (int) py - 2; + area.x = (gint) px - 2; + area.y = (gint) py - 2; area.width = 5; area.height = 5; request_paint_area (map, &area); diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h index 0c915fb5fa..df3f70a343 100644 --- a/widgets/misc/e-map.h +++ b/widgets/misc/e-map.h @@ -96,7 +96,7 @@ void e_map_world_to_window (EMap *map, /* --- Zoom --- */ -double e_map_get_magnification (EMap *map); +gdouble e_map_get_magnification (EMap *map); /* Pass TRUE if we want the smooth zoom hack */ void e_map_set_smooth_zoom (EMap *map, gboolean state); diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c index dde69a7e06..90922b5560 100644 --- a/widgets/misc/e-selection-model-array.c +++ b/widgets/misc/e-selection-model-array.c @@ -357,7 +357,7 @@ esma_invert_selection (ESelectionModel *selection) e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), -1, -1); } -static int +static gint esma_row_count (ESelectionModel *selection) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); @@ -405,14 +405,14 @@ esma_change_range(ESelectionModel *selection, gint start, gint end, gboolean gro } } -static int +static gint esma_cursor_row (ESelectionModel *selection) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); return esma->cursor_row; } -static int +static gint esma_cursor_col (ESelectionModel *selection) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); @@ -569,25 +569,25 @@ e_selection_model_array_class_init (ESelectionModelArrayClass *klass) object_class->get_property = esma_get_property; object_class->set_property = esma_set_property; - esm_class->is_row_selected = esma_is_row_selected ; - esm_class->foreach = esma_foreach ; - esm_class->clear = esma_clear ; - esm_class->selected_count = esma_selected_count ; - esm_class->select_all = esma_select_all ; - esm_class->invert_selection = esma_invert_selection ; - esm_class->row_count = esma_row_count ; - - esm_class->change_one_row = esma_change_one_row ; - esm_class->change_cursor = esma_change_cursor ; - esm_class->cursor_row = esma_cursor_row ; - esm_class->cursor_col = esma_cursor_col ; - - esm_class->select_single_row = esma_select_single_row ; - esm_class->toggle_single_row = esma_toggle_single_row ; - esm_class->move_selection_end = esma_move_selection_end ; - esm_class->set_selection_end = esma_set_selection_end ; - - klass->get_row_count = NULL ; + esm_class->is_row_selected = esma_is_row_selected; + esm_class->foreach = esma_foreach; + esm_class->clear = esma_clear; + esm_class->selected_count = esma_selected_count; + esm_class->select_all = esma_select_all; + esm_class->invert_selection = esma_invert_selection; + esm_class->row_count = esma_row_count; + + esm_class->change_one_row = esma_change_one_row; + esm_class->change_cursor = esma_change_cursor; + esm_class->cursor_row = esma_cursor_row; + esm_class->cursor_col = esma_cursor_col; + + esm_class->select_single_row = esma_select_single_row; + esm_class->toggle_single_row = esma_toggle_single_row; + esm_class->move_selection_end = esma_move_selection_end; + esm_class->set_selection_end = esma_set_selection_end; + + klass->get_row_count = NULL; g_object_class_install_property (object_class, PROP_CURSOR_ROW, g_param_spec_int ("cursor_row", diff --git a/widgets/misc/e-spinner.c b/widgets/misc/e-spinner.c index 78303cc9ec..bf71e4e50c 100644 --- a/widgets/misc/e-spinner.c +++ b/widgets/misc/e-spinner.c @@ -315,7 +315,7 @@ e_spinner_images_load (GdkScreen *screen, n = 0; for (y = 0; y < grid_height; y += size) { - for (x = 0; x < grid_width ; x += size) + for (x = 0; x < grid_width; x += size) { pixbuf = extract_frame (icon_pixbuf, x, y, size); @@ -633,7 +633,7 @@ e_spinner_init (ESpinner *spinner) details->need_load = TRUE; } -static int +static gint e_spinner_expose (GtkWidget *widget, GdkEventExpose *event) { diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c index 4e4d9894fa..c5291cf755 100644 --- a/widgets/misc/test-preferences-window.c +++ b/widgets/misc/test-preferences-window.c @@ -50,7 +50,7 @@ add_pages (EPreferencesWindow *preferences_window) } } -static int +static gint delete_event_callback (GtkWidget *widget, GdkEventAny *event, gpointer data) 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); } diff --git a/widgets/text/a11y/gal-a11y-e-text.c b/widgets/text/a11y/gal-a11y-e-text.c index f5939670f2..99fb4e8a94 100644 --- a/widgets/text/a11y/gal-a11y-e-text.c +++ b/widgets/text/a11y/gal-a11y-e-text.c @@ -439,7 +439,7 @@ et_get_text_before_offset (AtkText *text, break; case ATK_TEXT_BOUNDARY_WORD_START: end = find_word_start (full_text, offset - 1, -1); - start = find_word_start (full_text, end - 1, -1) ; + start = find_word_start (full_text, end - 1, -1); break; case ATK_TEXT_BOUNDARY_WORD_END: end = find_word_end (full_text, offset, -1); diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c index cae0f4d3e4..441102ac0f 100644 --- a/widgets/text/e-reflow.c +++ b/widgets/text/e-reflow.c @@ -89,7 +89,7 @@ e_reflow_pick_line (EReflow *reflow, double x) return x; } -static int +static gint er_find_item (EReflow *reflow, GnomeCanvasItem *item) { gint i; @@ -162,7 +162,7 @@ static gboolean do_adjustment (gpointer user_data) { gint row; - GtkAdjustment *adj ; + GtkAdjustment *adj; gfloat value, min_value, max_value; EReflow *reflow = user_data; @@ -389,7 +389,7 @@ item_removed (EReflowModel *model, gint i, EReflow *reflow) if (reflow->items[i]) gtk_object_destroy (GTK_OBJECT (reflow->items[i])); - memmove (reflow->heights + i, reflow->heights + i + 1, (reflow->count - i - 1) * sizeof (int)); + memmove (reflow->heights + i, reflow->heights + i + 1, (reflow->count - i - 1) * sizeof (gint)); memmove (reflow->items + i, reflow->items + i + 1, (reflow->count - i - 1) * sizeof (GnomeCanvasItem *)); reflow->count --; @@ -424,7 +424,7 @@ items_inserted (EReflowModel *model, gint position, gint count, EReflow *reflow) reflow->heights = g_renew (int, reflow->heights, reflow->allocated_count); reflow->items = g_renew (GnomeCanvasItem *, reflow->items, reflow->allocated_count); } - memmove (reflow->heights + position + count, reflow->heights + position, (reflow->count - position - count) * sizeof (int)); + memmove (reflow->heights + position + count, reflow->heights + position, (reflow->count - position - count) * sizeof (gint)); memmove (reflow->items + position + count, reflow->items + position, (reflow->count - position - count) * sizeof (GnomeCanvasItem *)); for (i = position; i < position + count; i++) { reflow->items[i] = NULL; @@ -1126,7 +1126,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, i /= column_width + E_REFLOW_FULL_GUTTER; running_width += i * (column_width + E_REFLOW_FULL_GUTTER); - for ( ; i < reflow->column_count; i++) { + for (; i < reflow->column_count; i++) { if ( running_width > x + width ) break; x_rect = running_width; @@ -1161,7 +1161,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, i /= column_width + E_REFLOW_FULL_GUTTER; running_width += i * (column_width + E_REFLOW_FULL_GUTTER); - for ( ; i < reflow->column_count; i++) { + for (; i < reflow->column_count; i++) { if ( running_width > x + width ) break; x_rect = running_width; @@ -1271,14 +1271,14 @@ e_reflow_point (GnomeCanvasItem *item, if (GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->point) distance = GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->point (item, x, y, cx, cy, actual_item); - if ((int) (distance * item->canvas->pixels_per_unit + 0.5) <= item->canvas->close_enough && *actual_item) + if ((gint) (distance * item->canvas->pixels_per_unit + 0.5) <= item->canvas->close_enough && *actual_item) return distance; *actual_item = item; return 0; #if 0 if (y >= E_REFLOW_BORDER_WIDTH && y <= reflow->height - E_REFLOW_BORDER_WIDTH) { - float n_x; + gfloat n_x; n_x = x; n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; n_x = fmod(n_x, (reflow->column_width + E_REFLOW_FULL_GUTTER)); @@ -1337,7 +1337,7 @@ e_reflow_reflow( GnomeCanvasItem *item, gint flags ) e_canvas_item_request_parent_reflow(item); } -static int +static gint e_reflow_selection_event_real (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event) { gint row; diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c index 1bc2090caa..e1a0fca438 100644 --- a/widgets/text/e-text-model.c +++ b/widgets/text/e-text-model.c @@ -234,7 +234,7 @@ e_text_model_real_insert_length (ETextModel *model, gint position, const gchar * for (p = text, l = 0; l < length; - p = g_utf8_next_char (p), l ++) ; + p = g_utf8_next_char (p), l ++); byte_length = p - text; @@ -264,7 +264,7 @@ e_text_model_real_delete (ETextModel *model, gint position, gint length) for (p = offs, l = 0; l < length; - p = g_utf8_next_char (p), l ++) ; + p = g_utf8_next_char (p), l ++); byte_length = p - offs; diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 12a1668410..f6371aa551 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -1994,8 +1994,8 @@ _do_tooltip (gpointer data) gdk_window_get_origin (GTK_WIDGET(GNOME_CANVAS_ITEM(text)->canvas)->window, &canvas_x, &canvas_y); pixel_origin.x += canvas_x; pixel_origin.y += canvas_y; - pixel_origin.x -= (int) gtk_layout_get_hadjustment(GTK_LAYOUT(GNOME_CANVAS_ITEM(text)->canvas))->value; - pixel_origin.y -= (int) gtk_layout_get_vadjustment(GTK_LAYOUT(GNOME_CANVAS_ITEM(text)->canvas))->value; + pixel_origin.x -= (gint) gtk_layout_get_hadjustment(GTK_LAYOUT(GNOME_CANVAS_ITEM(text)->canvas))->value; + pixel_origin.y -= (gint) gtk_layout_get_vadjustment(GTK_LAYOUT(GNOME_CANVAS_ITEM(text)->canvas))->value; tooltip_window = gtk_window_new (GTK_WINDOW_POPUP); gtk_container_set_border_width (GTK_CONTAINER (tooltip_window), 1); @@ -2798,7 +2798,7 @@ e_text_reset_im_context (EText *text) /* fixme: */ -static int +static gint next_word (EText *text, gint start) { gchar *p = g_utf8_offset_to_pointer (text->text, start); @@ -2827,7 +2827,7 @@ next_word (EText *text, gint start) return g_utf8_pointer_to_offset (text->text, p); } -static int +static gint find_offset_into_line (EText *text, gint offset_into_text, gchar **start_of_line) { gchar *p; @@ -2861,7 +2861,7 @@ find_offset_into_line (EText *text, gint offset_into_text, gchar **start_of_line /* direction = TRUE (move forward), FALSE (move backward) Any error shall return length(text->text) or 0 or text->selection_end (as deemed fit) */ -static int +static gint _get_updated_position (EText *text, gboolean direction) { PangoLogAttr *log_attrs = NULL; @@ -2927,7 +2927,7 @@ _get_updated_position (EText *text, gboolean direction) -static int +static gint _get_position(EText *text, ETextEventProcessorCommand *command) { gint length, obj_num; |