diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
commit | 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch) | |
tree | 4133b1adfd94d8f889ca7ad4ad851346518f4171 /widgets/misc | |
parent | cc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff) | |
download | gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.bz2 gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.lz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.xz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'widgets/misc')
40 files changed, 373 insertions, 373 deletions
diff --git a/widgets/misc/a11y/ea-calendar-cell.c b/widgets/misc/a11y/ea-calendar-cell.c index 2d2a92de62..af9471c5af 100644 --- a/widgets/misc/a11y/ea-calendar-cell.c +++ b/widgets/misc/a11y/ea-calendar-cell.c @@ -80,7 +80,7 @@ e_calendar_cell_new (ECalendarItem *calitem, gint row, gint column) cell->column = column; #ifdef ACC_DEBUG - g_print ("EvoAcc: e_calendar_cell created %p\n", (void *)cell); + g_print ("EvoAcc: e_calendar_cell created %p\n", (gpointer)cell); #endif return cell; @@ -91,8 +91,8 @@ e_calendar_cell_new (ECalendarItem *calitem, gint row, gint column) static void ea_calendar_cell_class_init (EaCalendarCellClass *klass); static void ea_calendar_cell_init (EaCalendarCell *a11y); -static G_CONST_RETURN gchar* ea_calendar_cell_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_calendar_cell_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_cell_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_cell_get_description (AtkObject *accessible); static AtkObject * ea_calendar_cell_get_parent (AtkObject *accessible); static gint ea_calendar_cell_get_index_in_parent (AtkObject *accessible); static AtkStateSet *ea_calendar_cell_ref_state_set (AtkObject *accessible); @@ -209,7 +209,7 @@ static void ea_calendar_cell_finalize (GObject *object) } #endif -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_cell_get_name (AtkObject *accessible) { GObject *g_obj; @@ -243,7 +243,7 @@ ea_calendar_cell_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_cell_get_description (AtkObject *accessible) { return ea_calendar_cell_get_name (accessible); diff --git a/widgets/misc/a11y/ea-calendar-item.c b/widgets/misc/a11y/ea-calendar-item.c index 34db081692..e1fb365aff 100644 --- a/widgets/misc/a11y/ea-calendar-item.c +++ b/widgets/misc/a11y/ea-calendar-item.c @@ -38,8 +38,8 @@ static void ea_calendar_item_class_init (EaCalendarItemClass *klass); static void ea_calendar_item_finalize (GObject *object); -static G_CONST_RETURN gchar* ea_calendar_item_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_calendar_item_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_item_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_item_get_description (AtkObject *accessible); static gint ea_calendar_item_get_n_children (AtkObject *accessible); static AtkObject *ea_calendar_item_ref_child (AtkObject *accessible, gint index); static AtkStateSet* ea_calendar_item_ref_state_set (AtkObject *accessible); @@ -88,10 +88,10 @@ static AtkObject* table_interface_get_column_header (AtkTable *table, gint in_col); static AtkObject* table_interface_get_caption (AtkTable *table); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row); static AtkObject* table_interface_get_summary (AtkTable *table); @@ -263,7 +263,7 @@ ea_calendar_item_finalize (GObject *object) #endif } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_item_get_name (AtkObject *accessible) { GObject *g_obj; @@ -329,7 +329,7 @@ ea_calendar_item_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_item_get_description (AtkObject *accessible) { if (accessible->description) @@ -782,7 +782,7 @@ table_interface_get_caption (AtkTable *table) return NULL; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col) { AtkGObjectAccessible *atk_gobj; @@ -816,7 +816,7 @@ table_interface_get_column_description (AtkTable *table, gint in_col) return description; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row) { AtkGObjectAccessible *atk_gobj; diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index bd6ff35cf7..c1d599e879 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -36,7 +36,7 @@ #include <libedataserver/e-data-server-util.h> #include <e-util/e-util.h> -static const int e_calendar_item_days_in_month[12] = { +static const gint e_calendar_item_days_in_month[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; @@ -1139,7 +1139,7 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item, static void -layout_set_day_text (ECalendarItem *calitem, PangoLayout *layout, int day_index) +layout_set_day_text (ECalendarItem *calitem, PangoLayout *layout, gint day_index) { const gchar *abbr_name; @@ -1364,18 +1364,18 @@ e_calendar_item_draw_month (ECalendarItem *calitem, cairo_destroy (cr); } -static const char * +static const gchar * get_digit_fomat () { #ifdef HAVE_GNU_GET_LIBC_VERSION #include <gnu/libc-version.h> - const char *libc_version = gnu_get_libc_version (); - char **split = g_strsplit (libc_version, ".", -1); - int major = 0; - int minor = 0; - int revision = 0; + const gchar *libc_version = gnu_get_libc_version (); + gchar **split = g_strsplit (libc_version, ".", -1); + gint major = 0; + gint minor = 0; + gint revision = 0; major = atoi (split [0]); minor = atoi (split [1]); @@ -1716,7 +1716,7 @@ e_calendar_item_get_week_number (ECalendarItem *calitem, { GDate date; guint weekday, yearday; - int offset, week_num; + gint offset, week_num; /* FIXME: check what happens at year boundaries. */ @@ -1757,7 +1757,7 @@ e_calendar_item_get_week_number (ECalendarItem *calitem, This is needed so that we get button/motion events. */ static double e_calendar_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -1983,7 +1983,7 @@ e_calendar_item_recalc_sizes (ECalendarItem *calitem) max_week_number_digit_width = 0; for (digit = 0; digit < 10; digit++) { gchar locale_digit[5]; - int locale_digit_len; + gint locale_digit_len; locale_digit_len = sprintf (locale_digit, get_digit_fomat (), digit); diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h index c0ee9a43bc..926ba1c077 100644 --- a/widgets/misc/e-calendar-item.h +++ b/widgets/misc/e-calendar-item.h @@ -126,7 +126,7 @@ struct _ECalendarItem gint year; gint month; /* 0 to 11 */ - /* Points to an array of styles, one char for each day. We use 32 + /* Points to an array of styles, one gchar for each day. We use 32 chars for each month, with n + 2 months, where n is the number of complete months shown (since we show some days before the first month and after the last month grayes out). diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index 181d7887d4..41b03d7f65 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -127,7 +127,7 @@ ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y * GnomeCanvasItem::update method */ static void -ecb_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +ecb_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) { ArtPoint o1, o2; ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); @@ -158,7 +158,7 @@ ecb_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) /* Sets the stipple pattern for the text */ static void -set_stipple (ECanvasBackground *ecb, GdkBitmap *stipple, int use_value) +set_stipple (ECanvasBackground *ecb, GdkBitmap *stipple, gint use_value) { if (use_value) { if (ecb->priv->stipple) @@ -365,10 +365,10 @@ ecb_unrealize (GnomeCanvasItem *item) } static void -ecb_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) +ecb_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height) { ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); - int x1, x2, y1, y2; + gint x1, x2, y1, y2; double i2c [6]; ArtPoint upper_left, lower_right, ecb_base_point; @@ -402,7 +402,7 @@ ecb_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, } static double -ecb_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, +ecb_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item) { ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c index 62ea6c54ef..cae41d859f 100644 --- a/widgets/misc/e-canvas-utils.c +++ b/widgets/misc/e-canvas-utils.c @@ -37,10 +37,10 @@ e_canvas_item_move_absolute (GnomeCanvasItem *item, double dx, double dy) } static double -compute_offset(int top, int bottom, int page_top, int page_bottom) +compute_offset(gint top, gint bottom, gint page_top, gint page_bottom) { - int size = bottom - top; - int offset = 0; + gint size = bottom - top; + gint offset = 0; if (top <= page_top && bottom >= page_bottom) return 0; @@ -68,7 +68,7 @@ static void e_canvas_show_area (GnomeCanvas *canvas, double x1, double y1, double x2, double y2) { GtkAdjustment *h, *v; - int dx = 0, dy = 0; + gint dx = 0, dy = 0; g_return_if_fail (canvas != NULL); g_return_if_fail (GNOME_IS_CANVAS (canvas)); @@ -101,7 +101,7 @@ static gboolean e_canvas_area_shown (GnomeCanvas *canvas, double x1, double y1, double x2, double y2) { GtkAdjustment *h, *v; - int dx = 0, dy = 0; + gint dx = 0, dy = 0; g_return_val_if_fail (canvas != NULL, FALSE); g_return_val_if_fail (GNOME_IS_CANVAS (canvas), FALSE); diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c index 3d4e879c0c..1eb0ddec12 100644 --- a/widgets/misc/e-canvas-vbox.c +++ b/widgets/misc/e-canvas-vbox.c @@ -41,7 +41,7 @@ static void e_canvas_vbox_dispose (GObject *object); static gint e_canvas_vbox_event (GnomeCanvasItem *item, GdkEvent *event); static void e_canvas_vbox_realize (GnomeCanvasItem *item); -static void e_canvas_vbox_reflow (GnomeCanvasItem *item, int flags); +static void e_canvas_vbox_reflow (GnomeCanvasItem *item, gint flags); static void e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); static void e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item); @@ -295,7 +295,7 @@ e_canvas_vbox_resize_children (GnomeCanvasItem *item) } static void -e_canvas_vbox_reflow( GnomeCanvasItem *item, int flags ) +e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) { ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX(item); if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) { diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index 055f0311f4..39b89d2675 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -48,7 +48,7 @@ static gint e_canvas_focus_out (GtkWidget *widget, static void e_canvas_style_set (GtkWidget *widget, GtkStyle *previous_style); -static int emit_event (GnomeCanvas *canvas, GdkEvent *event); +static gint emit_event (GnomeCanvas *canvas, GdkEvent *event); #define d(x) @@ -287,7 +287,7 @@ e_canvas_key (GtkWidget *widget, GdkEventKey *event) #define HACKISH_AFFINE static double -gnome_canvas_item_invoke_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, +gnome_canvas_item_invoke_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item) { #ifdef HACKISH_AFFINE @@ -319,10 +319,10 @@ gnome_canvas_item_invoke_point (GnomeCanvasItem *item, double x, double y, int c static int pick_current_item (GnomeCanvas *canvas, GdkEvent *event) { - int button_down; + gint button_down; double x, y; - int cx, cy; - int retval; + gint cx, cy; + gint retval; retval = FALSE; @@ -460,8 +460,8 @@ static gint e_canvas_button (GtkWidget *widget, GdkEventButton *event) { GnomeCanvas *canvas; - int mask; - int retval; + gint mask; + gint retval; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (GNOME_IS_CANVAS (widget), FALSE); @@ -695,7 +695,7 @@ e_canvas_unrealize (GtkWidget *widget) } static void -e_canvas_item_invoke_reflow (GnomeCanvasItem *item, int flags) +e_canvas_item_invoke_reflow (GnomeCanvasItem *item, gint flags) { GnomeCanvasGroup *group; GList *list; @@ -814,7 +814,7 @@ void e_canvas_item_set_cursor (GnomeCanvasItem *item, gpointer id) { GList *list; - int flags; + gint flags; ECanvas *canvas; ECanvasSelectionInfo *info; ECanvasItemSelectionFunc func; @@ -869,7 +869,7 @@ e_canvas_item_set_cursor_end (GnomeCanvasItem *item, gpointer id) void e_canvas_item_add_selection (GnomeCanvasItem *item, gpointer id) { - int flags; + gint flags; ECanvas *canvas; ECanvasSelectionInfo *info; ECanvasItemSelectionFunc func; @@ -932,7 +932,7 @@ e_canvas_item_add_selection (GnomeCanvasItem *item, gpointer id) void e_canvas_item_remove_selection (GnomeCanvasItem *item, gpointer id) { - int flags; + gint flags; ECanvas *canvas; ECanvasSelectionInfo *info; GList *list; @@ -975,7 +975,7 @@ e_canvas_item_remove_selection (GnomeCanvasItem *item, gpointer id) } } -void e_canvas_popup_tooltip (ECanvas *canvas, GtkWidget *widget, int x, int y) +void e_canvas_popup_tooltip (ECanvas *canvas, GtkWidget *widget, gint x, gint y) { if (canvas->tooltip_window && canvas->tooltip_window != widget) { e_canvas_hide_tooltip(canvas); @@ -1034,7 +1034,7 @@ grab_cancelled_check (gpointer data) return TRUE; } -int +gint e_canvas_item_grab (ECanvas *canvas, GnomeCanvasItem *item, guint event_mask, @@ -1046,7 +1046,7 @@ e_canvas_item_grab (ECanvas *canvas, if (gtk_grab_get_current ()) { return GDK_GRAB_ALREADY_GRABBED; } else { - int ret_val = gnome_canvas_item_grab (item, event_mask, cursor, etime); + gint ret_val = gnome_canvas_item_grab (item, event_mask, cursor, etime); if (ret_val == GDK_GRAB_SUCCESS) { canvas->grab_cancelled_cb = cancelled_cb; canvas->grab_cancelled_check_id = diff --git a/widgets/misc/e-canvas.h b/widgets/misc/e-canvas.h index 00692c457a..e23d29f057 100644 --- a/widgets/misc/e-canvas.h +++ b/widgets/misc/e-canvas.h @@ -79,12 +79,12 @@ typedef void (*ECanvasItemGrabCancelled) (ECanvas *canvas, GnomeCanvasItem *item struct _ECanvas { GnomeCanvas parent; - int idle_id; + gint idle_id; GList *selection; ECanvasSelectionInfo *cursor; GtkWidget *tooltip_window; - int visibility_notify_id; + gint visibility_notify_id; GtkWidget *toplevel; guint visibility_first : 1; @@ -128,7 +128,7 @@ void e_canvas_item_add_selection (GnomeCanvasItem void e_canvas_item_remove_selection (GnomeCanvasItem *item, gpointer id); -int e_canvas_item_grab (ECanvas *canvas, +gint e_canvas_item_grab (ECanvas *canvas, GnomeCanvasItem *item, guint event_mask, GdkCursor *cursor, @@ -144,8 +144,8 @@ void e_canvas_item_set_cursor_end (GnomeCanvasItem gpointer id); void e_canvas_popup_tooltip (ECanvas *canvas, GtkWidget *widget, - int x, - int y); + gint x, + gint y); void e_canvas_hide_tooltip (ECanvas *canvas); #ifdef __cplusplus diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c index d140fe9a5c..34e9c63545 100644 --- a/widgets/misc/e-charset-picker.c +++ b/widgets/misc/e-charset-picker.c @@ -49,7 +49,7 @@ typedef enum { E_CHARSET_WESTERN_EUROPEAN_NEW } ECharsetClass; -static const char *classnames[] = { +static const gchar *classnames[] = { N_("Unknown"), N_("Arabic"), N_("Baltic"), @@ -107,7 +107,7 @@ static ECharset charsets[] = { { "ISO-8859-1", E_CHARSET_WESTERN_EUROPEAN, NULL }, { "ISO-8859-15", E_CHARSET_WESTERN_EUROPEAN_NEW, NULL }, }; -static const int num_charsets = sizeof (charsets) / sizeof (charsets[0]); +static const gint num_charsets = sizeof (charsets) / sizeof (charsets[0]); static void select_item (GtkMenuShell *menu_shell, GtkWidget *item) @@ -126,7 +126,7 @@ static GtkWidget * add_charset (GtkWidget *menu, ECharset *charset, gboolean free_name) { GtkWidget *item; - char *label; + gchar *label; if (charset->subclass) { label = g_strdup_printf ("%s, %s (%s)", @@ -154,7 +154,7 @@ add_charset (GtkWidget *menu, ECharset *charset, gboolean free_name) } static gboolean -add_other_charset (GtkWidget *menu, GtkWidget *other, const char *new_charset) +add_other_charset (GtkWidget *menu, GtkWidget *other, const gchar *new_charset) { ECharset charset = { NULL, E_CHARSET_UNKNOWN, NULL }; GtkWidget *item; @@ -200,7 +200,7 @@ static void activate_other (GtkWidget *item, gpointer menu) { GtkWidget *window, *entry, *label, *vbox, *hbox; - char *old_charset, *new_charset; + gchar *old_charset, *new_charset; GtkDialog *dialog; window = gtk_widget_get_toplevel (menu); @@ -254,7 +254,7 @@ activate_other (GtkWidget *item, gpointer menu) g_object_ref (dialog); if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) { - new_charset = (char *)gtk_entry_get_text (GTK_ENTRY (entry)); + new_charset = (gchar *)gtk_entry_get_text (GTK_ENTRY (entry)); if (*new_charset) { if (add_other_charset (menu, item, new_charset)) { @@ -289,11 +289,11 @@ activate_other (GtkWidget *item, gpointer menu) * attached. */ GtkWidget * -e_charset_picker_new (const char *default_charset) +e_charset_picker_new (const gchar *default_charset) { GtkWidget *menu, *item; - int def, i; - const char *locale_charset; + gint def, i; + const gchar *locale_charset; g_get_charset (&locale_charset); if (!g_ascii_strcasecmp (locale_charset, "US-ASCII")) @@ -347,11 +347,11 @@ e_charset_picker_new (const char *default_charset) * Return value: the currently-selected character set in @picker, * which must be freed with g_free(). **/ -char * +gchar * e_charset_picker_get_charset (GtkWidget *menu) { GtkWidget *item; - char *charset; + gchar *charset; g_return_val_if_fail (GTK_IS_MENU (menu), NULL); @@ -375,13 +375,13 @@ e_charset_picker_get_charset (GtkWidget *menu) * Return value: the selected character set (which must be freed with * g_free()), or %NULL. **/ -char * -e_charset_picker_dialog (const char *title, const char *prompt, - const char *default_charset, GtkWindow *parent) +gchar * +e_charset_picker_dialog (const gchar *title, const gchar *prompt, + const gchar *default_charset, GtkWindow *parent) { GtkDialog *dialog; GtkWidget *label, *omenu, *picker, *vbox, *hbox; - char *charset = NULL; + gchar *charset = NULL; dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (title, parent, diff --git a/widgets/misc/e-charset-picker.h b/widgets/misc/e-charset-picker.h index 4f701679a5..e399cf788c 100644 --- a/widgets/misc/e-charset-picker.h +++ b/widgets/misc/e-charset-picker.h @@ -25,11 +25,11 @@ G_BEGIN_DECLS -GtkWidget * e_charset_picker_new (const char *default_charset); -char * e_charset_picker_get_charset (GtkWidget *picker); -char * e_charset_picker_dialog (const char *title, - const char *prompt, - const char *default_charset, +GtkWidget * e_charset_picker_new (const gchar *default_charset); +gchar * e_charset_picker_get_charset (GtkWidget *picker); +gchar * e_charset_picker_dialog (const gchar *title, + const gchar *prompt, + const gchar *default_charset, GtkWindow *parent); GSList * e_charset_add_radio_actions (GtkActionGroup *action_group, diff --git a/widgets/misc/e-colors.c b/widgets/misc/e-colors.c index 74fbdbf58c..5e2fddabc8 100644 --- a/widgets/misc/e-colors.c +++ b/widgets/misc/e-colors.c @@ -48,7 +48,7 @@ e_color_alloc_gdk (GtkWidget *widget, GdkColor *c) } void -e_color_alloc_name (GtkWidget *widget, const char *name, GdkColor *c) +e_color_alloc_name (GtkWidget *widget, const gchar *name, GdkColor *c) { GdkColormap *map; diff --git a/widgets/misc/e-colors.h b/widgets/misc/e-colors.h index 710ee59f59..c867d6425c 100644 --- a/widgets/misc/e-colors.h +++ b/widgets/misc/e-colors.h @@ -31,7 +31,7 @@ void e_color_init (void); /* Return the pixel value for the given red, green and blue */ gulong e_color_alloc (gushort red, gushort green, gushort blue); -void e_color_alloc_name (GtkWidget *widget, const char *name, GdkColor *color); +void e_color_alloc_name (GtkWidget *widget, const gchar *name, GdkColor *color); void e_color_alloc_gdk (GtkWidget *widget, GdkColor *color); extern GdkColor e_white, e_dark_gray, e_black; diff --git a/widgets/misc/e-combo-cell-editable.c b/widgets/misc/e-combo-cell-editable.c index 8cee128619..3d3c777986 100644 --- a/widgets/misc/e-combo-cell-editable.c +++ b/widgets/misc/e-combo-cell-editable.c @@ -170,7 +170,7 @@ lookup_row (GList *list, const gchar *text) gint result = 0; for (l = list; l; l = l->next, result++) - if (!g_utf8_collate (text, (char *) l->data)) + if (!g_utf8_collate (text, (gchar *) l->data)) break; return result; diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c index ebc2f9bd78..ddf5f1ac26 100644 --- a/widgets/misc/e-cursors.c +++ b/widgets/misc/e-cursors.c @@ -65,11 +65,11 @@ static CursorDef cursors [] = { static void create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, const gchar **xpm) { - int height, width, colors; - char pixmap_buffer [(32 * 32)/8]; - char mask_buffer [(32 * 32)/8]; - int x, y, pix, yofs; - int transparent_color, black_color; + gint height, width, colors; + gchar pixmap_buffer [(32 * 32)/8]; + gchar mask_buffer [(32 * 32)/8]; + gint x, y, pix, yofs; + gint transparent_color, black_color; sscanf (xpm [0], "%d %d %d %d", &height, &width, &colors, &pix); @@ -83,7 +83,7 @@ create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, const gch yofs = colors + 1; for (y = 0; y < 32; y++){ for (x = 0; x < 32;){ - char value = 0, maskv = 0; + gchar value = 0, maskv = 0; for (pix = 0; pix < 8; pix++, x++){ if (xpm [y + yofs][x] != transparent_color){ @@ -111,7 +111,7 @@ create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, const gch void e_cursors_init (void) { - int i; + gint i; e_color_init (); @@ -144,7 +144,7 @@ e_cursors_init (void) void e_cursors_shutdown (void) { - int i; + gint i; for (i = 0; cursors [i].hot_x; i++) gdk_cursor_unref (cursors [i].cursor); diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 701cf69444..e8034eb487 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1403,7 +1403,7 @@ rebuild_time_popup (EDateEdit *dedit) { EDateEditPrivate *priv; GtkComboBox *combo; - char buffer[40]; + gchar buffer[40]; struct tm tmp_tm; gint hour, min; @@ -1497,11 +1497,11 @@ e_date_edit_parse_time (EDateEdit *dedit, /* Returns TRUE if the string is empty or is "None" in the current locale. It ignores whitespace. */ static gboolean -field_set_to_none (const char *text) +field_set_to_none (const gchar *text) { - const char *pos; - const char *none_string; - int n; + const gchar *pos; + const gchar *none_string; + gint n; pos = text; while (n = (int)((unsigned char)*pos), isspace (n)) @@ -1717,7 +1717,7 @@ static void e_date_edit_update_date_entry (EDateEdit *dedit) { EDateEditPrivate *priv; - char buffer[100]; + gchar buffer[100]; struct tm tmp_tm = { 0 }; priv = dedit->priv; @@ -1728,7 +1728,7 @@ e_date_edit_update_date_entry (EDateEdit *dedit) /* This is a strftime() format for a short date. %x the preferred date representation for the current locale without the time, but has forced to use 4 digit year */ - char *format = e_time_get_d_fmt_with_4digit_year (); + gchar *format = e_time_get_d_fmt_with_4digit_year (); tmp_tm.tm_year = priv->year; tmp_tm.tm_mon = priv->month; @@ -1750,7 +1750,7 @@ static void e_date_edit_update_time_entry (EDateEdit *dedit) { EDateEditPrivate *priv; - char buffer[40]; + gchar buffer[40]; struct tm tmp_tm = { 0 }; priv = dedit->priv; @@ -1761,7 +1761,7 @@ e_date_edit_update_time_entry (EDateEdit *dedit) } else { GtkTreeModel *model; GtkTreeIter iter; - char *b; + gchar *b; /* Set these to reasonable values just in case. */ tmp_tm.tm_year = 2000; @@ -1797,11 +1797,11 @@ e_date_edit_update_time_entry (EDateEdit *dedit) model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->time_combo)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { - char *text = NULL; + gchar *text = NULL; gtk_tree_model_get (model, &iter, 0, &text, -1); if (text) { - char *t = text; + gchar *t = text; /* truncate left spaces */ while (*t == ' ') diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index a113d1f101..77c20d506b 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -55,7 +55,7 @@ rule_editor_destroyed (EFilterBar *filter_bar, GObject *deadbeef) } static void -rule_advanced_response (GtkWidget *dialog, int response, void *data) +rule_advanced_response (GtkWidget *dialog, gint response, gpointer data) { EFilterBar *filter_bar = data; /* the below generates a compiler warning about incompatible pointer types */ @@ -163,7 +163,7 @@ save_search_dialog (ESearchBar *search_bar) } static void -menubar_activated (ESearchBar *search_bar, int id, void *data) +menubar_activated (ESearchBar *search_bar, gint id, gpointer data) { EFilterBar *filter_bar = (EFilterBar *)search_bar; GtkWidget *dialog; @@ -208,11 +208,11 @@ menubar_activated (ESearchBar *search_bar, int id, void *data) } static void -option_changed (ESearchBar *search_bar, void *data) +option_changed (ESearchBar *search_bar, gpointer data) { EFilterBar *filter_bar = (EFilterBar *)search_bar; - int id = e_search_bar_get_item_id (search_bar); - char *query; + gint id = e_search_bar_get_item_id (search_bar); + gchar *query; d(printf("option changed, id = %d, setquery = %s %d\n", id, efb->setquery ? "true" : "false", esb->block_search)); @@ -256,16 +256,16 @@ dup_item_no_subitems (ESearchBarItem *dest, } static GArray * -build_items (ESearchBar *search_bar, ESearchBarItem *items, int type, int *start, GPtrArray *rules) +build_items (ESearchBar *search_bar, ESearchBarItem *items, gint type, gint *start, GPtrArray *rules) { FilterRule *rule = NULL; EFilterBar *filter_bar = (EFilterBar *)search_bar; - int id = 0, i; + gint id = 0, i; GArray *menu = g_array_new (FALSE, FALSE, sizeof (ESearchBarItem)); ESearchBarItem item = { NULL, -1, 2 }; const gchar *source; GSList *gtksux = NULL; - int num; + gint num; for (i=0;i<rules->len;i++) gtksux = g_slist_prepend(gtksux, rules->pdata[i]); @@ -357,7 +357,7 @@ build_items (ESearchBar *search_bar, ESearchBarItem *items, int type, int *start static void free_built_items (GArray *menu) { - int i; + gint i; for (i = 0; i < menu->len; i ++) { ESearchBarItem *item; @@ -383,7 +383,7 @@ generate_menu (ESearchBar *search_bar, ESearchBarItem *items) static void free_items (ESearchBarItem *items) { - int i; + gint i; for (i = 0; items[i].id != -1; i++) g_free (items[i].text); @@ -398,7 +398,7 @@ set_menu (ESearchBar *search_bar, ESearchBarItem *items) { EFilterBar *filter_bar = E_FILTER_BAR (search_bar); ESearchBarItem *default_items; - int i, num; + gint i, num; if (filter_bar->default_items) free_items (filter_bar->default_items); @@ -472,7 +472,7 @@ filter_bar_get_property (GObject *object, switch (property_id) { case PROP_QUERY: { - char *text = e_search_bar_get_text (E_SEARCH_BAR (filter_bar)); + gchar *text = e_search_bar_get_text (E_SEARCH_BAR (filter_bar)); /* empty search text means searching turned off */ if (filter_bar->current_query && text && *text) { @@ -490,15 +490,15 @@ filter_bar_get_property (GObject *object, case PROP_STATE: { /* FIXME: we should have ESearchBar save its own state to the xmlDocPtr */ xmlChar *xmlbuf; - char *text, buf[12]; - int searchscope, item_id, n, view_id; + gchar *text, buf[12]; + gint searchscope, item_id, n, view_id; xmlNodePtr root, node; xmlDocPtr doc; item_id = e_search_bar_get_item_id ((ESearchBar *) filter_bar); - doc = xmlNewDoc ((const unsigned char *)"1.0"); - root = xmlNewDocNode (doc, NULL, (const unsigned char *)"state", NULL); + doc = xmlNewDoc ((const guchar *)"1.0"); + root = xmlNewDocNode (doc, NULL, (const guchar *)"state", NULL); xmlDocSetRootElement (doc, root); searchscope = e_search_bar_get_search_scope ((ESearchBar *) filter_bar); view_id = e_search_bar_get_viewitem_id ((ESearchBar *) filter_bar); @@ -508,28 +508,28 @@ filter_bar_get_property (GObject *object, if (item_id == E_FILTERBAR_ADVANCED_ID) { /* advanced query, save the filterbar state */ - node = xmlNewChild (root, NULL, (const unsigned char *)"filter-bar", NULL); + node = xmlNewChild (root, NULL, (const guchar *)"filter-bar", NULL); sprintf (buf, "%d", search_bar->last_search_option); - xmlSetProp (node, (const unsigned char *)"item_id", (unsigned char *)buf); + xmlSetProp (node, (const guchar *)"item_id", (guchar *)buf); sprintf (buf, "%d", searchscope); - xmlSetProp (node, (const unsigned char *)"searchscope", (unsigned char *)buf); + xmlSetProp (node, (const guchar *)"searchscope", (guchar *)buf); sprintf (buf, "%d", view_id); - xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf); + xmlSetProp (node, (const guchar *)"view_id", (guchar *)buf); xmlAddChild (node, filter_rule_xml_encode (filter_bar->current_query)); } else { /* simple query, save the searchbar state */ text = e_search_bar_get_text ((ESearchBar *) filter_bar); - node = xmlNewChild (root, NULL, (const unsigned char *)"search-bar", NULL); - xmlSetProp (node, (const unsigned char *)"text", (unsigned char *)(text ? text : "")); + node = xmlNewChild (root, NULL, (const guchar *)"search-bar", NULL); + xmlSetProp (node, (const guchar *)"text", (guchar *)(text ? text : "")); sprintf (buf, "%d", item_id); - xmlSetProp (node, (const unsigned char *)"item_id", (unsigned char *)buf); + xmlSetProp (node, (const guchar *)"item_id", (guchar *)buf); sprintf (buf, "%d", searchscope); - xmlSetProp (node, (const unsigned char *)"searchscope", (unsigned char *)buf); + xmlSetProp (node, (const guchar *)"searchscope", (guchar *)buf); sprintf (buf, "%d", view_id); - xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf); + xmlSetProp (node, (const guchar *)"view_id", (guchar *)buf); g_free (text); } @@ -538,7 +538,7 @@ filter_bar_get_property (GObject *object, /* remap to glib memory */ text = g_malloc (n + 1); - memcpy (text, (char *)xmlbuf, n); + memcpy (text, (gchar *)xmlbuf, n); text[n] = '\0'; xmlFree (xmlbuf); @@ -552,12 +552,12 @@ filter_bar_get_property (GObject *object, } static int -xml_get_prop_int (xmlNodePtr node, const char *prop) +xml_get_prop_int (xmlNodePtr node, const gchar *prop) { - char *buf; - int ret; + gchar *buf; + gint ret; - if ((buf = (char *)xmlGetProp (node, (unsigned char *)prop))) { + if ((buf = (gchar *)xmlGetProp (node, (guchar *)prop))) { ret = strtol (buf, NULL, 10); xmlFree (buf); } else { @@ -576,26 +576,26 @@ filter_bar_set_property (GObject *object, EFilterBar *filter_bar = (EFilterBar *) object; ESearchBar *search_bar = E_SEARCH_BAR (object); xmlNodePtr root, node; - const char *state; + const gchar *state; xmlDocPtr doc; gboolean rule_set = FALSE, is_cur_folder=FALSE; - int view_id, scope, item_id; + gint view_id, scope, item_id; switch (property_id) { case PROP_STATE: if ((state = g_value_get_string (value))) { - if (!(doc = xmlParseDoc ((unsigned char *) state))) + if (!(doc = xmlParseDoc ((guchar *) state))) return; root = doc->children; - if (strcmp ((char *)root->name, "state") != 0) { + if (strcmp ((gchar *)root->name, "state") != 0) { xmlFreeDoc (doc); return; } node = root->children; while (node != NULL) { - if (!strcmp ((char *)node->name, "filter-bar")) { + if (!strcmp ((gchar *)node->name, "filter-bar")) { FilterRule *rule = NULL; @@ -638,7 +638,7 @@ filter_bar_set_property (GObject *object, search_bar->block_search = FALSE; filter_bar->current_query = (FilterRule *)filter_bar->option_rules->pdata[item_id - filter_bar->option_base]; if (filter_bar->config && filter_bar->current_query) { - char *query = e_search_bar_get_text (search_bar); + gchar *query = e_search_bar_get_text (search_bar); filter_bar->config (filter_bar, filter_bar->current_query, item_id, query, filter_bar->config_data); g_free (query); @@ -651,9 +651,9 @@ filter_bar_set_property (GObject *object, filter_bar->setquery = FALSE; break; - } else if (!strcmp ((char *)node->name, "search-bar")) { - int subitem_id, item_id, scope, view_id; - char *text; + } else if (!strcmp ((gchar *)node->name, "search-bar")) { + gint subitem_id, item_id, scope, view_id; + gchar *text; GtkStyle *style = gtk_widget_get_default_style (); /* set the text first (it doesn't emit a signal) */ @@ -674,7 +674,7 @@ filter_bar_set_property (GObject *object, scope = xml_get_prop_int (node, "searchscope"); e_search_bar_set_search_scope (E_SEARCH_BAR (filter_bar), scope); - text = (char *)xmlGetProp (node, (const unsigned char *)"text"); + text = (gchar *)xmlGetProp (node, (const guchar *)"text"); e_search_bar_set_text (E_SEARCH_BAR (filter_bar), text); if (text && *text) { filter_bar->current_query = (FilterRule *)filter_bar->option_rules->pdata[item_id - filter_bar->option_base]; @@ -866,10 +866,10 @@ e_filter_bar_get_type (void) EFilterBar * e_filter_bar_lite_new (RuleContext *context, - const char *systemrules, - const char *userrules, + const gchar *systemrules, + const gchar *userrules, EFilterBarConfigRule config, - void *data) + gpointer data) { EFilterBar *bar; @@ -882,8 +882,8 @@ e_filter_bar_lite_new (RuleContext *context, void e_filter_bar_new_construct (RuleContext *context, - const char *systemrules, - const char *userrules, + const gchar *systemrules, + const gchar *userrules, EFilterBarConfigRule config, gpointer data) { diff --git a/widgets/misc/e-filter-bar.h b/widgets/misc/e-filter-bar.h index 350a990890..859a21b6c9 100644 --- a/widgets/misc/e-filter-bar.h +++ b/widgets/misc/e-filter-bar.h @@ -66,11 +66,11 @@ G_BEGIN_DECLS typedef struct _EFilterBar EFilterBar; typedef struct _EFilterBarClass EFilterBarClass; -typedef void (*EFilterBarConfigRule)(EFilterBar *, FilterRule *rule, int id, const char *query, void *data); +typedef void (*EFilterBarConfigRule)(EFilterBar *, FilterRule *rule, gint id, const gchar *query, gpointer data); struct _EFilterBar { ESearchBar parent; - int menu_base, option_base; + gint menu_base, option_base; GPtrArray *menu_rules, *option_rules; ESearchBarItem *default_items; @@ -78,14 +78,14 @@ struct _EFilterBar { GtkWidget *save_dialog; /* current save dialogue (so we dont pop up multiple ones) */ FilterRule *current_query; /* as it says */ - int setquery; /* true when we're setting a query directly to advanced, so dont popup the dialog */ + gint setquery; /* true when we're setting a query directly to advanced, so dont popup the dialog */ RuleContext *context; - char *systemrules; - char *userrules; + gchar *systemrules; + gchar *userrules; EFilterBarConfigRule config; - void *config_data; + gpointer config_data; CamelVeeFolder *all_account_search_vf; CamelVeeFolder *account_search_vf; @@ -118,7 +118,7 @@ enum { #define E_FILTERBAR_SEPARATOR { NULL, 0, 0 } #ifdef JUST_FOR_TRANSLATORS -const char * strings[] = { +const gchar * strings[] = { N_("_Save Search..."), N_("_Edit Saved Searches..."), N_("_Advanced Search...") @@ -129,22 +129,22 @@ const char * strings[] = { GType e_filter_bar_get_type (void); EFilterBar *e_filter_bar_new (RuleContext *context, - const char *systemrules, - const char *userrules, + const gchar *systemrules, + const gchar *userrules, EFilterBarConfigRule config, - void *data); + gpointer data); EFilterBar *e_filter_bar_lite_new (RuleContext *context, - const char *systemrules, - const char *userrules, + const gchar *systemrules, + const gchar *userrules, EFilterBarConfigRule config, - void *data); + gpointer data); void e_filter_bar_new_construct (RuleContext *context, - const char *systemrules, - const char *userrules, + const gchar *systemrules, + const gchar *userrules, EFilterBarConfigRule config, - void *data ,EFilterBar *bar ); + gpointer data ,EFilterBar *bar ); #ifdef __cplusplus } diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c index 6acbe920ef..9110e14257 100644 --- a/widgets/misc/e-gui-utils.c +++ b/widgets/misc/e-gui-utils.c @@ -172,7 +172,7 @@ e_container_change_tab_order(GtkContainer *container, GList *widgets) struct widgetandint { GtkWidget *widget; - int count; + gint count; }; static void @@ -191,7 +191,7 @@ nth_entry_callback(GtkWidget *widget, struct widgetandint *data) } void -e_container_focus_nth_entry(GtkContainer *container, int n) +e_container_focus_nth_entry(GtkContainer *container, gint n) { struct widgetandint data; data.widget = NULL; @@ -202,7 +202,7 @@ e_container_focus_nth_entry(GtkContainer *container, int n) } gboolean -e_glade_xml_connect_widget (GladeXML *gui, char *name, char *signal, GCallback cb, gpointer closure) +e_glade_xml_connect_widget (GladeXML *gui, gchar *name, gchar *signal, GCallback cb, gpointer closure) { GtkWidget *widget; @@ -218,7 +218,7 @@ e_glade_xml_connect_widget (GladeXML *gui, char *name, char *signal, GCallback c } gboolean -e_glade_xml_set_sensitive (GladeXML *gui, char *name, gboolean sensitive) +e_glade_xml_set_sensitive (GladeXML *gui, gchar *name, gboolean sensitive) { GtkWidget *widget; diff --git a/widgets/misc/e-gui-utils.h b/widgets/misc/e-gui-utils.h index 840a55289b..b66160c2d1 100644 --- a/widgets/misc/e-gui-utils.h +++ b/widgets/misc/e-gui-utils.h @@ -36,18 +36,18 @@ void e_container_foreach_leaf (GtkContainer *container, GtkCallback callback, gpointer closure); void e_container_focus_nth_entry (GtkContainer *container, - int n); + gint n); gint e_container_change_tab_order (GtkContainer *container, GList *widgets); /* Returns TRUE on success. */ gboolean e_glade_xml_connect_widget (GladeXML *gui, - char *name, - char *signal, + gchar *name, + gchar *signal, GCallback cb, gpointer closure); gboolean e_glade_xml_set_sensitive (GladeXML *gui, - char *name, + gchar *name, gboolean sensitive); G_END_DECLS diff --git a/widgets/misc/e-icon-entry.c b/widgets/misc/e-icon-entry.c index cfcce8f8c5..fb11c98323 100644 --- a/widgets/misc/e-icon-entry.c +++ b/widgets/misc/e-icon-entry.c @@ -137,7 +137,7 @@ icon_entry_paint (GtkWidget *widget, { EIconEntry *entry = E_ICON_ENTRY (widget); GtkWidget *entry_widget = entry->priv->entry; - int x = 0, y = 0, width, height, focus_width; + gint x = 0, y = 0, width, height, focus_width; gboolean interior_focus; gtk_widget_style_get ( diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c index d3b5a1ac07..e11439eb26 100644 --- a/widgets/misc/e-image-chooser.c +++ b/widgets/misc/e-image-chooser.c @@ -37,10 +37,10 @@ struct _EImageChooserPrivate { GtkWidget *image; GtkWidget *browse_button; - char *image_buf; - int image_buf_size; - int image_width; - int image_height; + gchar *image_buf; + gint image_buf_size; + gint image_width; + gint image_height; gboolean editable; }; @@ -87,7 +87,7 @@ enum DndTargetType { static GtkTargetEntry image_drag_types[] = { { (gchar *) URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST }, }; -static const int num_image_drag_types = sizeof (image_drag_types) / sizeof (image_drag_types[0]); +static const gint num_image_drag_types = sizeof (image_drag_types) / sizeof (image_drag_types[0]); GtkWidget * e_image_chooser_new (void) @@ -222,13 +222,13 @@ e_image_chooser_dispose (GObject *object) static gboolean set_image_from_data (EImageChooser *chooser, - char *data, int length) + gchar *data, gint length) { gboolean rv = FALSE; GdkPixbufLoader *loader = gdk_pixbuf_loader_new (); GdkPixbuf *pixbuf; - gdk_pixbuf_loader_write (loader, (unsigned char *)data, length, NULL); + gdk_pixbuf_loader_write (loader, (guchar *)data, length, NULL); gdk_pixbuf_loader_close (loader, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); @@ -242,7 +242,7 @@ set_image_from_data (EImageChooser *chooser, GdkPixbuf *composite; float scale; - int new_height, new_width; + gint new_height, new_width; new_height = gdk_pixbuf_get_height (pixbuf); new_width = gdk_pixbuf_get_width (pixbuf); @@ -331,7 +331,7 @@ image_drag_motion_cb (GtkWidget *widget, return FALSE; for (p = context->targets; p != NULL; p = p->next) { - char *possible_type; + gchar *possible_type; possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data)); if (!strcmp (possible_type, URI_LIST_TYPE)) { @@ -372,7 +372,7 @@ image_drag_drop_cb (GtkWidget *widget, } for (p = context->targets; p != NULL; p = p->next) { - char *possible_type; + gchar *possible_type; possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data)); if (!strcmp (possible_type, URI_LIST_TYPE)) { @@ -398,22 +398,22 @@ image_drag_data_received_cb (GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint time, EImageChooser *chooser) { - char *target_type; + gchar *target_type; gboolean handled = FALSE; target_type = gdk_atom_name (selection_data->target); if (!strcmp (target_type, URI_LIST_TYPE)) { GError *error = NULL; - char *uri; - char *nl = strstr ((char *)selection_data->data, "\r\n"); - char *buf = NULL; + gchar *uri; + gchar *nl = strstr ((gchar *)selection_data->data, "\r\n"); + gchar *buf = NULL; gsize read = 0; if (nl) - uri = g_strndup ((char *)selection_data->data, nl - (char*)selection_data->data); + uri = g_strndup ((gchar *)selection_data->data, nl - (gchar *)selection_data->data); else - uri = g_strdup ((char *)selection_data->data); + uri = g_strdup ((gchar *)selection_data->data); if (e_util_read_file (uri, TRUE, &buf, &read, &error) && read > 0 && buf) { if (set_image_from_data (chooser, buf, read)) { @@ -436,7 +436,7 @@ image_drag_data_received_cb (GtkWidget *widget, gboolean -e_image_chooser_set_from_file (EImageChooser *chooser, const char *filename) +e_image_chooser_set_from_file (EImageChooser *chooser, const gchar *filename) { gchar *data; gsize data_length; @@ -465,7 +465,7 @@ e_image_chooser_set_editable (EImageChooser *chooser, gboolean editable) } gboolean -e_image_chooser_get_image_data (EImageChooser *chooser, char **data, gsize *data_length) +e_image_chooser_get_image_data (EImageChooser *chooser, gchar **data, gsize *data_length) { g_return_val_if_fail (E_IS_IMAGE_CHOOSER (chooser), FALSE); g_return_val_if_fail (data != NULL, FALSE); @@ -479,9 +479,9 @@ e_image_chooser_get_image_data (EImageChooser *chooser, char **data, gsize *data } gboolean -e_image_chooser_set_image_data (EImageChooser *chooser, char *data, gsize data_length) +e_image_chooser_set_image_data (EImageChooser *chooser, gchar *data, gsize data_length) { - char *buf; + gchar *buf; g_return_val_if_fail (E_IS_IMAGE_CHOOSER (chooser), FALSE); g_return_val_if_fail (data != NULL, FALSE); diff --git a/widgets/misc/e-image-chooser.h b/widgets/misc/e-image-chooser.h index b7f599f0c1..a3972bd26d 100644 --- a/widgets/misc/e-image-chooser.h +++ b/widgets/misc/e-image-chooser.h @@ -58,10 +58,10 @@ struct _EImageChooserClass GtkWidget *e_image_chooser_new (void); GType e_image_chooser_get_type (void); -gboolean e_image_chooser_set_from_file (EImageChooser *chooser, const char *filename); -gboolean e_image_chooser_set_image_data (EImageChooser *chooser, char *data, gsize data_length); +gboolean e_image_chooser_set_from_file (EImageChooser *chooser, const gchar *filename); +gboolean e_image_chooser_set_image_data (EImageChooser *chooser, gchar *data, gsize data_length); void e_image_chooser_set_editable (EImageChooser *chooser, gboolean editable); -gboolean e_image_chooser_get_image_data (EImageChooser *chooser, char **data, gsize *data_length); +gboolean e_image_chooser_get_image_data (EImageChooser *chooser, gchar **data, gsize *data_length); #endif /* _E_IMAGE_CHOOSER_H_ */ diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index c2c0806178..c44e75886b 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -71,7 +71,7 @@ typedef struct GtkAdjustment *vadj; /* Current scrolling offsets */ - int xofs, yofs; + gint xofs, yofs; /* Realtime zoom data */ EMapZoomState zoom_state; @@ -104,9 +104,9 @@ static void e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj static void update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays); static void set_scroll_area (EMap *view); static void request_paint_area (EMap *view, GdkRectangle *area); -static void center_at (EMap *map, int x, int y, gboolean scroll); -static void smooth_center_at (EMap *map, int x, int y); -static void scroll_to (EMap *view, int x, int y); +static void center_at (EMap *map, gint x, gint y, gboolean scroll); +static void smooth_center_at (EMap *map, gint x, gint y); +static void scroll_to (EMap *view, gint x, gint y); static void zoom_do (EMap *map); static gint load_map_background (EMap *view, gchar *name); static void adjustment_changed_cb (GtkAdjustment *adj, gpointer data); @@ -207,7 +207,7 @@ static void e_map_init (EMap *view) { EMapPrivate *priv; - char *map_file_name = g_build_filename (EVOLUTION_IMAGES, "world_map-960.png", NULL); + gchar *map_file_name = g_build_filename (EVOLUTION_IMAGES, "world_map-960.png", NULL); priv = g_new0 (EMapPrivate, 1); view->priv = priv; @@ -305,7 +305,7 @@ static void e_map_realize (GtkWidget *widget) { GdkWindowAttr attr; - int attr_mask; + gint attr_mask; g_return_if_fail (widget != NULL); g_return_if_fail (IS_E_MAP (widget)); @@ -538,7 +538,7 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event) EMap *view; EMapPrivate *priv; gboolean do_scroll; - int xofs, yofs; + gint xofs, yofs; view = E_MAP (widget); priv = view->priv; @@ -578,7 +578,7 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event) if (do_scroll) { - int x, y; + gint x, y; x = CLAMP (priv->xofs + xofs, 0, priv->hadj->upper - priv->hadj->page_size); y = CLAMP (priv->yofs + yofs, 0, priv->vadj->upper - priv->vadj->page_size); @@ -644,7 +644,7 @@ void e_map_window_to_world (EMap *map, double win_x, double win_y, double *world_longitude, double *world_latitude) { EMapPrivate *priv; - int width, height; + gint width, height; g_return_if_fail (map); @@ -665,7 +665,7 @@ void e_map_world_to_window (EMap *map, double world_longitude, double world_latitude, double *win_x, double *win_y) { EMapPrivate *priv; - int width, height; + gint width, height; g_return_if_fail (map); @@ -895,7 +895,7 @@ e_map_get_closest_point (EMap *map, double longitude, double latitude, gboolean EMapPoint *point_chosen = NULL, *point; double min_dist = 0.0, dist; double dx, dy; - int i; + gint i; priv = map->priv; @@ -971,9 +971,9 @@ update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays) { EMapPrivate *priv; EMapPoint *point; - int width, height, orig_width, orig_height; + gint width, height, orig_width, orig_height; double zoom; - int i; + gint i; if (!GTK_WIDGET_REALIZED (GTK_WIDGET (map))) return; @@ -1039,7 +1039,7 @@ static void request_paint_area (EMap *view, GdkRectangle *area) { EMapPrivate *priv; - int width, height; + gint width, height; if (!GTK_WIDGET_DRAWABLE (GTK_WIDGET (view)) || !GTK_WIDGET_REALIZED (GTK_WIDGET (view))) return; @@ -1065,7 +1065,7 @@ request_paint_area (EMap *view, GdkRectangle *area) gdk_pixbuf_get_bits_per_sample (priv->map_render_pixbuf) == 8) { guchar *pixels; - int rowstride; + gint rowstride; rowstride = gdk_pixbuf_get_rowstride (priv->map_render_pixbuf); pixels = gdk_pixbuf_get_pixels (priv->map_render_pixbuf) + (area->y + priv->yofs) * rowstride + 3 * (area->x + priv->xofs); @@ -1162,10 +1162,10 @@ repaint_point (EMap *map, EMapPoint *point) static void -center_at (EMap *map, int x, int y, gboolean scroll) +center_at (EMap *map, gint x, gint y, gboolean scroll) { EMapPrivate *priv; - int pb_width, pb_height, + gint pb_width, pb_height, view_width, view_height; priv = map->priv; @@ -1189,12 +1189,12 @@ center_at (EMap *map, int x, int y, gboolean scroll) static void -smooth_center_at (EMap *map, int x, int y) +smooth_center_at (EMap *map, gint x, gint y) { EMapPrivate *priv; - int pb_width, pb_height, + gint pb_width, pb_height, view_width, view_height; - int dx, dy; + gint dx, dy; priv = map->priv; @@ -1222,15 +1222,15 @@ smooth_center_at (EMap *map, int x, int y) /* Scrolls the view to the specified offsets. Does not perform range checking! */ static void -scroll_to (EMap *view, int x, int y) +scroll_to (EMap *view, gint x, gint y) { EMapPrivate *priv; - int xofs, yofs; + gint xofs, yofs; GdkWindow *window; GdkGC *gc; - int width, height; - int src_x, src_y; - int dest_x, dest_y; + gint width, height; + gint src_x, src_y; + gint dest_x, dest_y; GdkEvent *event; priv = view->priv; @@ -1322,7 +1322,7 @@ scroll_to (EMap *view, int x, int y) } -static int divide_seq[] = +static gint divide_seq[] = { /* Dividends for divisor of 2 */ @@ -1417,7 +1417,7 @@ blowup_window_area (GdkWindow *window, gint area_x, gint area_y, gint target_x, gint divide_width_index, divide_height_index; gint area_width, area_height; gint i, j; - int line; + gint line; /* Set up the GC we'll be using */ @@ -1548,7 +1548,7 @@ zoom_in_smooth (EMap *map) GdkRectangle area; EMapPrivate *priv; GdkWindow *window; - int width, height; + gint width, height; double x, y; g_return_if_fail (map); diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c index 143eaff327..20b570df24 100644 --- a/widgets/misc/e-popup-menu.c +++ b/widgets/misc/e-popup-menu.c @@ -37,7 +37,7 @@ * Creates an item with an optional icon */ static void -make_item (GtkMenu *menu, GtkMenuItem *item, const char *name, GtkWidget *pixmap) +make_item (GtkMenu *menu, GtkMenuItem *item, const gchar *name, GtkWidget *pixmap) { GtkWidget *label; @@ -63,7 +63,7 @@ GtkMenu * e_popup_menu_create (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_mask, - void *default_closure) + gpointer default_closure) { return e_popup_menu_create_with_domain (menu_list, disable_mask, @@ -77,14 +77,14 @@ GtkMenu * e_popup_menu_create_with_domain (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_mask, - void *default_closure, - const char *domain) + gpointer default_closure, + const gchar *domain) { GtkMenu *menu = GTK_MENU (gtk_menu_new ()); GSList *group = NULL; gboolean last_item_separator = TRUE; - int last_non_separator = -1; - int i; + gint last_non_separator = -1; + gint i; for (i = 0; menu_list[i].name; i++) { if (strcmp ("", menu_list[i].name) && !(menu_list [i].disable_mask & hide_mask)) { @@ -147,7 +147,7 @@ e_popup_menu_create_with_domain (EPopupMenu *menu_list, } void -e_popup_menu_run (EPopupMenu *menu_list, GdkEvent *event, guint32 disable_mask, guint32 hide_mask, void *default_closure) +e_popup_menu_run (EPopupMenu *menu_list, GdkEvent *event, guint32 disable_mask, guint32 hide_mask, gpointer default_closure) { GtkMenu *menu; @@ -195,7 +195,7 @@ e_popup_menu_free_1 (EPopupMenu *menu_item) EPopupMenu * e_popup_menu_copy (const EPopupMenu *menu_list) { - int i; + gint i; EPopupMenu *ret_val; if (menu_list == NULL) @@ -220,7 +220,7 @@ e_popup_menu_copy (const EPopupMenu *menu_list) void e_popup_menu_free (EPopupMenu *menu_list) { - int i; + gint i; if (menu_list == NULL) return; diff --git a/widgets/misc/e-popup-menu.h b/widgets/misc/e-popup-menu.h index ddf6ed04a9..75246ebda6 100644 --- a/widgets/misc/e-popup-menu.h +++ b/widgets/misc/e-popup-menu.h @@ -71,8 +71,8 @@ G_BEGIN_DECLS typedef struct _EPopupMenu EPopupMenu; struct _EPopupMenu { - char *name; - char *pixname; + gchar *name; + gchar *pixname; GCallback fn; EPopupMenu *submenu; @@ -80,7 +80,7 @@ struct _EPopupMenu { /* Added post 0.19 */ GtkWidget *pixmap_widget; - void *closure; + gpointer closure; guint is_toggle : 1; guint is_radio : 1; @@ -97,7 +97,7 @@ GtkMenu *e_popup_menu_create_with_domain (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_mask, void *default_closure, - const char *domain); + const gchar *domain); void e_popup_menu_run (EPopupMenu *menu_list, GdkEvent *event, guint32 disable_mask, diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 9abc60442a..849825e160 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -99,8 +99,8 @@ clear_button_state_changed (GtkWidget *clear_button, GtkStateType state, ESearch update_clear_menuitem_sensitive (search_bar); } -static char * -verb_name_from_id (int id) +static gchar * +verb_name_from_id (gint id) { return g_strdup_printf ("ESearchBar:Activate:%d", id); } @@ -268,7 +268,7 @@ static void entry_activated_cb (GtkWidget *widget, ESearchBar *esb) { - const char *text = gtk_entry_get_text (GTK_ENTRY (esb->entry)); + const gchar *text = gtk_entry_get_text (GTK_ENTRY (esb->entry)); GtkStyle *style = gtk_widget_get_default_style (); if (text && *text) { @@ -607,7 +607,7 @@ search_bar_dispose (GObject *object) /* /\* Callback used when an option item is destroyed. We have to destroy its */ /* * suboption items. */ /* *\/ */ -/* static void */ +/* static gpointer / /* option_item_destroy_cb (GtkObject *object, gpointer data) */ /* { */ /* /\* ESearchBarSubitem *subitems; *\/ */ @@ -624,7 +624,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items) { GtkWidget *menu; GSList *group = NULL; - int i; + gint i; if (esb->option_menu) gtk_widget_destroy (esb->option_menu); @@ -638,7 +638,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items) group = NULL; if (items[i].text) { - char *str; + gchar *str; str = e_str_without_underscores (_(items[i].text)); switch (items[i].type) { case ESB_ITEMTYPE_NORMAL: diff --git a/widgets/misc/e-search-bar.h b/widgets/misc/e-search-bar.h index aadfc42ab5..41bebf96fd 100644 --- a/widgets/misc/e-search-bar.h +++ b/widgets/misc/e-search-bar.h @@ -88,10 +88,10 @@ struct _ESearchBar { guint pending_activate; /* The currently-selected item & subitem */ - int item_id; - int viewitem_id; /* Current View Id */ - int scopeitem_id; /* Scope of search */ - int last_search_option; + gint item_id; + gint viewitem_id; /* Current View Id */ + gint scopeitem_id; /* Scope of search */ + gint last_search_option; gboolean block_search; gboolean lite; @@ -123,18 +123,18 @@ void e_search_bar_set_option (ESearchBar *search_bar, ESearchBarItem *option_items); void e_search_bar_paint (ESearchBar *search_bar); void e_search_bar_set_viewoption (ESearchBar *search_bar, - int option_id, + gint option_id, ESearchBarItem *subitems); void e_search_bar_set_menu_sensitive (ESearchBar *search_bar, - int id, + gint id, gboolean state); void e_search_bar_set_item_id (ESearchBar *search_bar, - int id); + gint id); void e_search_bar_set_item_menu (ESearchBar *search_bar, - int id); -int e_search_bar_get_item_id (ESearchBar *search_bar); + gint id); +gint e_search_bar_get_item_id (ESearchBar *search_bar); G_END_DECLS diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c index 7e82039d6e..dde69a7e06 100644 --- a/widgets/misc/e-selection-model-array.c +++ b/widgets/misc/e-selection-model-array.c @@ -42,7 +42,7 @@ void e_selection_model_array_confirm_row_count(ESelectionModelArray *esma) { if (esma->eba == NULL) { - int row_count = e_selection_model_array_get_row_count(esma); + gint row_count = e_selection_model_array_get_row_count(esma); esma->eba = e_bit_array_new(row_count); esma->selected_row = -1; esma->selected_range_end = -1; @@ -69,7 +69,7 @@ es_row_sorted_to_model (ESelectionModelArray *esma, gint sorted_row) /* FIXME: Should this deal with moving the selection if it's in single mode? */ void -e_selection_model_array_delete_rows(ESelectionModelArray *esma, int row, int count) +e_selection_model_array_delete_rows(ESelectionModelArray *esma, gint row, gint count) { if (esma->eba) { if (E_SELECTION_MODEL(esma)->mode == GTK_SELECTION_SINGLE) @@ -119,7 +119,7 @@ e_selection_model_array_delete_rows(ESelectionModelArray *esma, int row, int cou } void -e_selection_model_array_insert_rows(ESelectionModelArray *esma, int row, int count) +e_selection_model_array_insert_rows(ESelectionModelArray *esma, gint row, gint count) { if (esma->eba) { e_bit_array_insert(esma->eba, row, count); @@ -135,7 +135,7 @@ e_selection_model_array_insert_rows(ESelectionModelArray *esma, int row, int cou } void -e_selection_model_array_move_row(ESelectionModelArray *esma, int old_row, int new_row) +e_selection_model_array_move_row(ESelectionModelArray *esma, gint old_row, gint new_row) { ESelectionModel *esm = E_SELECTION_MODEL(esma); @@ -366,7 +366,7 @@ esma_row_count (ESelectionModel *selection) } static void -esma_change_one_row(ESelectionModel *selection, int row, gboolean grow) +esma_change_one_row(ESelectionModel *selection, gint row, gboolean grow) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); e_selection_model_array_confirm_row_count(esma); @@ -374,7 +374,7 @@ esma_change_one_row(ESelectionModel *selection, int row, gboolean grow) } static void -esma_change_cursor (ESelectionModel *selection, int row, int col) +esma_change_cursor (ESelectionModel *selection, gint row, gint col) { ESelectionModelArray *esma; @@ -389,9 +389,9 @@ esma_change_cursor (ESelectionModel *selection, int row, int col) } static void -esma_change_range(ESelectionModel *selection, int start, int end, gboolean grow) +esma_change_range(ESelectionModel *selection, gint start, gint end, gboolean grow) { - int i; + gint i; ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); if (start != end) { if (selection->sorter && e_sorter_needs_sorting(selection->sorter)) { @@ -420,7 +420,7 @@ esma_cursor_col (ESelectionModel *selection) } static void -esma_real_select_single_row (ESelectionModel *selection, int row) +esma_real_select_single_row (ESelectionModel *selection, gint row) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); @@ -434,10 +434,10 @@ esma_real_select_single_row (ESelectionModel *selection, int row) } static void -esma_select_single_row (ESelectionModel *selection, int row) +esma_select_single_row (ESelectionModel *selection, gint row) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); - int selected_row = esma->selected_row; + gint selected_row = esma->selected_row; esma_real_select_single_row (selection, row); if (selected_row != -1 && esma->eba && selected_row < e_bit_array_bit_count (esma->eba)) { @@ -451,7 +451,7 @@ esma_select_single_row (ESelectionModel *selection, int row) } static void -esma_toggle_single_row (ESelectionModel *selection, int row) +esma_toggle_single_row (ESelectionModel *selection, gint row) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); @@ -465,13 +465,13 @@ esma_toggle_single_row (ESelectionModel *selection, int row) } static void -esma_real_move_selection_end (ESelectionModel *selection, int row) +esma_real_move_selection_end (ESelectionModel *selection, gint row) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); - int old_start; - int old_end; - int new_start; - int new_end; + gint old_start; + gint old_end; + gint new_start; + gint new_end; if (selection->sorter && e_sorter_needs_sorting(selection->sorter)) { old_start = MIN (e_sorter_model_to_sorted(selection->sorter, esma->selection_start_row), e_sorter_model_to_sorted(selection->sorter, esma->cursor_row)); @@ -501,18 +501,18 @@ esma_real_move_selection_end (ESelectionModel *selection, int row) } static void -esma_move_selection_end (ESelectionModel *selection, int row) +esma_move_selection_end (ESelectionModel *selection, gint row) { esma_real_move_selection_end (selection, row); e_selection_model_selection_changed(selection); } static void -esma_set_selection_end (ESelectionModel *selection, int row) +esma_set_selection_end (ESelectionModel *selection, gint row) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection); - int selected_range_end = esma->selected_range_end; - int view_row = e_sorter_model_to_sorted(selection->sorter, row); + gint selected_range_end = esma->selected_range_end; + gint view_row = e_sorter_model_to_sorted(selection->sorter, row); esma_real_select_single_row(selection, esma->selection_start_row); esma->cursor_row = esma->selection_start_row; @@ -530,7 +530,7 @@ esma_set_selection_end (ESelectionModel *selection, int row) e_selection_model_selection_changed(selection); } -int +gint e_selection_model_array_get_row_count (ESelectionModelArray *esma) { g_return_val_if_fail(esma != NULL, 0); diff --git a/widgets/misc/e-selection-model-array.h b/widgets/misc/e-selection-model-array.h index 9f297c1fed..be21a5557e 100644 --- a/widgets/misc/e-selection-model-array.h +++ b/widgets/misc/e-selection-model-array.h @@ -76,14 +76,14 @@ GType e_selection_model_array_get_type (void); /* Protected Functions */ void e_selection_model_array_insert_rows (ESelectionModelArray *esm, - int row, - int count); + gint row, + gint count); void e_selection_model_array_delete_rows (ESelectionModelArray *esm, - int row, - int count); + gint row, + gint count); void e_selection_model_array_move_row (ESelectionModelArray *esm, - int old_row, - int new_row); + gint old_row, + gint new_row); void e_selection_model_array_confirm_row_count (ESelectionModelArray *esm); /* Protected Virtual Function */ diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c index b9f1d33bfe..b0b151dd6d 100644 --- a/widgets/misc/e-selection-model-simple.c +++ b/widgets/misc/e-selection-model-simple.c @@ -63,7 +63,7 @@ e_selection_model_simple_new (void) void e_selection_model_simple_set_row_count (ESelectionModelSimple *esms, - int row_count) + gint row_count) { if (esms->row_count != row_count) { ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(esms); @@ -85,8 +85,8 @@ esms_get_row_count (ESelectionModelArray *esma) } void e_selection_model_simple_insert_rows (ESelectionModelSimple *esms, - int row, - int count) + gint row, + gint count) { esms->row_count += count; e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY(esms), row, count); @@ -94,8 +94,8 @@ void e_selection_model_simple_insert_rows (ESelectionModelSimple *e void e_selection_model_simple_delete_rows (ESelectionModelSimple *esms, - int row, - int count) + gint row, + gint count) { esms->row_count -= count; e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY(esms), row, count); @@ -103,8 +103,8 @@ e_selection_model_simple_delete_rows (ESelectionModelSimple *esms, void e_selection_model_simple_move_row (ESelectionModelSimple *esms, - int old_row, - int new_row) + gint old_row, + gint new_row) { e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY(esms), old_row, new_row); } diff --git a/widgets/misc/e-selection-model-simple.h b/widgets/misc/e-selection-model-simple.h index 7f11d3ac0e..8db463b32f 100644 --- a/widgets/misc/e-selection-model-simple.h +++ b/widgets/misc/e-selection-model-simple.h @@ -39,7 +39,7 @@ extern "C" { typedef struct { ESelectionModelArray parent; - int row_count; + gint row_count; } ESelectionModelSimple; typedef struct { @@ -50,17 +50,17 @@ GType e_selection_model_simple_get_type (void); ESelectionModelSimple *e_selection_model_simple_new (void); void e_selection_model_simple_insert_rows (ESelectionModelSimple *esms, - int row, - int count); + gint row, + gint count); void e_selection_model_simple_delete_rows (ESelectionModelSimple *esms, - int row, - int count); + gint row, + gint count); void e_selection_model_simple_move_row (ESelectionModelSimple *esms, - int old_row, - int new_row); + gint old_row, + gint new_row); void e_selection_model_simple_set_row_count (ESelectionModelSimple *selection, - int row_count); + gint row_count); #ifdef __cplusplus } diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c index 66187e6e7c..cc1d3b3780 100644 --- a/widgets/misc/e-selection-model.c +++ b/widgets/misc/e-selection-model.c @@ -113,8 +113,8 @@ esm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe case PROP_SELECTION_MODE: esm->mode = g_value_get_int (value); if (esm->mode == GTK_SELECTION_SINGLE) { - int cursor_row = e_selection_model_cursor_row(esm); - int cursor_col = e_selection_model_cursor_col(esm); + gint cursor_row = e_selection_model_cursor_row(esm); + gint cursor_col = e_selection_model_cursor_col(esm); e_selection_model_do_something(esm, cursor_row, cursor_col, 0); } break; @@ -322,7 +322,7 @@ e_selection_model_invert_selection (ESelectionModel *selection) E_SELECTION_MODEL_GET_CLASS(selection)->invert_selection (selection); } -int +gint e_selection_model_row_count (ESelectionModel *selection) { if (E_SELECTION_MODEL_GET_CLASS(selection)->row_count) @@ -332,20 +332,20 @@ e_selection_model_row_count (ESelectionModel *selection) } void -e_selection_model_change_one_row(ESelectionModel *selection, int row, gboolean grow) +e_selection_model_change_one_row(ESelectionModel *selection, gint row, gboolean grow) { if (E_SELECTION_MODEL_GET_CLASS(selection)->change_one_row) E_SELECTION_MODEL_GET_CLASS(selection)->change_one_row (selection, row, grow); } void -e_selection_model_change_cursor (ESelectionModel *selection, int row, int col) +e_selection_model_change_cursor (ESelectionModel *selection, gint row, gint col) { if (E_SELECTION_MODEL_GET_CLASS(selection)->change_cursor) E_SELECTION_MODEL_GET_CLASS(selection)->change_cursor (selection, row, col); } -int +gint e_selection_model_cursor_row (ESelectionModel *selection) { if (E_SELECTION_MODEL_GET_CLASS(selection)->cursor_row) @@ -354,7 +354,7 @@ e_selection_model_cursor_row (ESelectionModel *selection) return -1; } -int +gint e_selection_model_cursor_col (ESelectionModel *selection) { if (E_SELECTION_MODEL_GET_CLASS(selection)->cursor_col) @@ -364,28 +364,28 @@ e_selection_model_cursor_col (ESelectionModel *selection) } void -e_selection_model_select_single_row (ESelectionModel *selection, int row) +e_selection_model_select_single_row (ESelectionModel *selection, gint row) { if (E_SELECTION_MODEL_GET_CLASS(selection)->select_single_row) E_SELECTION_MODEL_GET_CLASS(selection)->select_single_row (selection, row); } void -e_selection_model_toggle_single_row (ESelectionModel *selection, int row) +e_selection_model_toggle_single_row (ESelectionModel *selection, gint row) { if (E_SELECTION_MODEL_GET_CLASS(selection)->toggle_single_row) E_SELECTION_MODEL_GET_CLASS(selection)->toggle_single_row (selection, row); } void -e_selection_model_move_selection_end (ESelectionModel *selection, int row) +e_selection_model_move_selection_end (ESelectionModel *selection, gint row) { if (E_SELECTION_MODEL_GET_CLASS(selection)->move_selection_end) E_SELECTION_MODEL_GET_CLASS(selection)->move_selection_end (selection, row); } void -e_selection_model_set_selection_end (ESelectionModel *selection, int row) +e_selection_model_set_selection_end (ESelectionModel *selection, gint row) { if (E_SELECTION_MODEL_GET_CLASS(selection)->set_selection_end) E_SELECTION_MODEL_GET_CLASS(selection)->set_selection_end (selection, row); @@ -409,7 +409,7 @@ e_selection_model_do_something (ESelectionModel *selection, { gint shift_p = state & GDK_SHIFT_MASK; gint ctrl_p = state & GDK_CONTROL_MASK; - int row_count; + gint row_count; selection->old_selection = -1; @@ -511,7 +511,7 @@ e_selection_model_select_as_key_press (ESelectionModel *selection, guint col, GdkModifierType state) { - int cursor_activated = TRUE; + gint cursor_activated = TRUE; gint shift_p = state & GDK_SHIFT_MASK; gint ctrl_p = state & GDK_CONTROL_MASK; @@ -552,9 +552,9 @@ move_selection (ESelectionModel *selection, gboolean up, GdkModifierType state) { - int row = e_selection_model_cursor_row(selection); - int col = e_selection_model_cursor_col(selection); - int row_count; + gint row = e_selection_model_cursor_row(selection); + gint col = e_selection_model_cursor_col(selection); + gint row_count; /* there is no selected row when row is -1 */ if (row != -1) @@ -601,8 +601,8 @@ e_selection_model_key_press (ESelectionModel *selection, case GDK_space: case GDK_KP_Space: if (selection->mode != GTK_SELECTION_SINGLE) { - int row = e_selection_model_cursor_row(selection); - int col = e_selection_model_cursor_col(selection); + gint row = e_selection_model_cursor_row(selection); + gint col = e_selection_model_cursor_col(selection); if (row == -1) break; @@ -616,8 +616,8 @@ e_selection_model_key_press (ESelectionModel *selection, case GDK_Return: case GDK_KP_Enter: if (selection->mode != GTK_SELECTION_SINGLE) { - int row = e_selection_model_cursor_row(selection); - int col = e_selection_model_cursor_col(selection); + gint row = e_selection_model_cursor_row(selection); + gint col = e_selection_model_cursor_col(selection); e_selection_model_select_single_row (selection, row); g_signal_emit(selection, e_selection_model_signals[CURSOR_ACTIVATED], 0, @@ -628,8 +628,8 @@ e_selection_model_key_press (ESelectionModel *selection, case GDK_Home: case GDK_KP_Home: if (selection->cursor_mode == E_CURSOR_LINE) { - int row = 0; - int cursor_col = e_selection_model_cursor_col(selection); + gint row = 0; + gint cursor_col = e_selection_model_cursor_col(selection); row = e_sorter_sorted_to_model(selection->sorter, row); e_selection_model_select_as_key_press (selection, row, cursor_col, key->state); @@ -639,8 +639,8 @@ e_selection_model_key_press (ESelectionModel *selection, case GDK_End: case GDK_KP_End: if (selection->cursor_mode == E_CURSOR_LINE) { - int row = e_selection_model_row_count(selection) - 1; - int cursor_col = e_selection_model_cursor_col(selection); + gint row = e_selection_model_row_count(selection) - 1; + gint cursor_col = e_selection_model_cursor_col(selection); row = e_sorter_sorted_to_model(selection->sorter, row); e_selection_model_select_as_key_press (selection, row, cursor_col, key->state); @@ -653,8 +653,8 @@ e_selection_model_key_press (ESelectionModel *selection, void e_selection_model_cursor_changed (ESelectionModel *selection, - int row, - int col) + gint row, + gint col) { g_signal_emit(selection, e_selection_model_signals[CURSOR_CHANGED], 0, @@ -663,8 +663,8 @@ e_selection_model_cursor_changed (ESelectionModel *selection, void e_selection_model_cursor_activated (ESelectionModel *selection, - int row, - int col) + gint row, + gint col) { g_signal_emit(selection, e_selection_model_signals[CURSOR_ACTIVATED], 0, @@ -680,7 +680,7 @@ e_selection_model_selection_changed (ESelectionModel *selection) void e_selection_model_selection_row_changed (ESelectionModel *selection, - int row) + gint row) { g_signal_emit(selection, e_selection_model_signals[SELECTION_ROW_CHANGED], 0, diff --git a/widgets/misc/e-selection-model.h b/widgets/misc/e-selection-model.h index 24eccd304f..16194000a5 100644 --- a/widgets/misc/e-selection-model.h +++ b/widgets/misc/e-selection-model.h @@ -40,7 +40,7 @@ extern "C" { #ifndef _E_FOREACH_FUNC_H_ #define _E_FOREACH_FUNC_H_ -typedef void (*EForeachFunc) (int model_row, +typedef void (*EForeachFunc) (gint model_row, gpointer closure); #endif @@ -59,39 +59,39 @@ typedef struct { GtkSelectionMode mode; ECursorMode cursor_mode; - int old_selection; + gint old_selection; } ESelectionModel; typedef struct { GObjectClass parent_class; /* Virtual methods */ - gboolean (*is_row_selected) (ESelectionModel *esm, int row); + gboolean (*is_row_selected) (ESelectionModel *esm, gint row); void (*foreach) (ESelectionModel *esm, EForeachFunc callback, gpointer closure); void (*clear) (ESelectionModel *esm); gint (*selected_count) (ESelectionModel *esm); void (*select_all) (ESelectionModel *esm); void (*invert_selection) (ESelectionModel *esm); - int (*row_count) (ESelectionModel *esm); + gint (*row_count) (ESelectionModel *esm); /* Protected virtual methods. */ - void (*change_one_row) (ESelectionModel *esm, int row, gboolean on); - void (*change_cursor) (ESelectionModel *esm, int row, int col); - int (*cursor_row) (ESelectionModel *esm); - int (*cursor_col) (ESelectionModel *esm); + void (*change_one_row) (ESelectionModel *esm, gint row, gboolean on); + void (*change_cursor) (ESelectionModel *esm, gint row, gint col); + gint (*cursor_row) (ESelectionModel *esm); + gint (*cursor_col) (ESelectionModel *esm); - void (*select_single_row) (ESelectionModel *selection, int row); - void (*toggle_single_row) (ESelectionModel *selection, int row); - void (*move_selection_end) (ESelectionModel *selection, int row); - void (*set_selection_end) (ESelectionModel *selection, int row); + void (*select_single_row) (ESelectionModel *selection, gint row); + void (*toggle_single_row) (ESelectionModel *selection, gint row); + void (*move_selection_end) (ESelectionModel *selection, gint row); + void (*set_selection_end) (ESelectionModel *selection, gint row); /* * Signals */ - void (*cursor_changed) (ESelectionModel *esm, int row, int col); - void (*cursor_activated) (ESelectionModel *esm, int row, int col); - void (*selection_row_changed) (ESelectionModel *esm, int row); + void (*cursor_changed) (ESelectionModel *esm, gint row, gint col); + void (*cursor_activated) (ESelectionModel *esm, gint row, gint col); + void (*selection_row_changed) (ESelectionModel *esm, gint row); void (*selection_changed) (ESelectionModel *esm); } ESelectionModelClass; @@ -128,36 +128,36 @@ void e_selection_model_clear (ESelectionModel *esm); gint e_selection_model_selected_count (ESelectionModel *esm); void e_selection_model_select_all (ESelectionModel *esm); void e_selection_model_invert_selection (ESelectionModel *esm); -int e_selection_model_row_count (ESelectionModel *esm); +gint e_selection_model_row_count (ESelectionModel *esm); /* Private virtual Functions */ void e_selection_model_change_one_row (ESelectionModel *esm, - int row, + gint row, gboolean on); void e_selection_model_change_cursor (ESelectionModel *esm, - int row, - int col); -int e_selection_model_cursor_row (ESelectionModel *esm); -int e_selection_model_cursor_col (ESelectionModel *esm); + gint row, + gint col); +gint e_selection_model_cursor_row (ESelectionModel *esm); +gint e_selection_model_cursor_col (ESelectionModel *esm); void e_selection_model_select_single_row (ESelectionModel *selection, - int row); + gint row); void e_selection_model_toggle_single_row (ESelectionModel *selection, - int row); + gint row); void e_selection_model_move_selection_end (ESelectionModel *selection, - int row); + gint row); void e_selection_model_set_selection_end (ESelectionModel *selection, - int row); + gint row); /* Signals */ void e_selection_model_cursor_changed (ESelectionModel *selection, - int row, - int col); + gint row, + gint col); void e_selection_model_cursor_activated (ESelectionModel *selection, - int row, - int col); + gint row, + gint col); void e_selection_model_selection_row_changed (ESelectionModel *selection, - int row); + gint row); void e_selection_model_selection_changed (ESelectionModel *selection); #ifdef __cplusplus diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c index 8740f2d02e..b42630ebae 100644 --- a/widgets/misc/e-send-options.c +++ b/widgets/misc/e-send-options.c @@ -97,7 +97,7 @@ struct _ESendOptionsDialogPrivate { GtkWidget *accepted_label; GtkWidget *completed_label; GtkWidget *until_label; - char *help_section; + gchar *help_section; }; static void e_sendoptions_dialog_class_init (GObjectClass *object_class); @@ -345,7 +345,7 @@ delay_until_date_changed_cb (GtkWidget *dedit, gpointer data) } static void -page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, int num, gpointer data) +page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, gint num, gpointer data) { ESendOptionsDialog *sod = data; ESendOptionsDialogPrivate *priv = sod->priv; diff --git a/widgets/misc/e-spinner.c b/widgets/misc/e-spinner.c index 6e18410018..87e53dce8f 100644 --- a/widgets/misc/e-spinner.c +++ b/widgets/misc/e-spinner.c @@ -100,8 +100,8 @@ typedef struct { guint ref_count; GtkIconSize size; - int width; - int height; + gint width; + gint height; GdkPixbuf **animation_pixbufs; guint n_animation_pixbufs; } ESpinnerImages; @@ -208,9 +208,9 @@ e_spinner_cache_data_unload (ESpinnerCacheData *data) static GdkPixbuf * extract_frame (GdkPixbuf *grid_pixbuf, - int x, - int y, - int size) + gint x, + gint y, + gint size) { GdkPixbuf *pixbuf; @@ -230,11 +230,11 @@ extract_frame (GdkPixbuf *grid_pixbuf, static GdkPixbuf * scale_to_size (GdkPixbuf *pixbuf, - int dw, - int dh) + gint dw, + gint dh) { GdkPixbuf *result; - int pw, ph; + gint pw, ph; g_return_val_if_fail (pixbuf != NULL, NULL); @@ -259,8 +259,8 @@ e_spinner_images_load (GdkScreen *screen, ESpinnerImages *images; GdkPixbuf *icon_pixbuf, *pixbuf; GtkIconInfo *icon_info = NULL; - int grid_width, grid_height, x, y, requested_size, size, isw, ish, n; - const char *icon; + gint grid_width, grid_height, x, y, requested_size, size, isw, ish, n; + const gchar *icon; GSList *list = NULL, *l; LOG ("ESpinnerCacheData loading for screen %p at size %d", screen, icon_size); @@ -642,7 +642,7 @@ e_spinner_expose (GtkWidget *widget, ESpinnerImages *images; GdkPixbuf *pixbuf; GdkGC *gc; - int x_offset, y_offset, width, height; + gint x_offset, y_offset, width, height; GdkRectangle pix_area, dest; if (!GTK_WIDGET_DRAWABLE (spinner)) diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c index 6c8eab7c8b..2dd47ebb8f 100644 --- a/widgets/misc/e-url-entry.c +++ b/widgets/misc/e-url-entry.c @@ -186,7 +186,7 @@ entry_changed_cb (GtkEditable *editable, gpointer data) { EUrlEntry *url_entry; EUrlEntryPrivate *priv; - const char *url; + const gchar *url; url_entry = E_URL_ENTRY (data); priv = url_entry->priv; diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c index 20f34d8ba8..7b2d59056d 100644 --- a/widgets/misc/test-calendar.c +++ b/widgets/misc/test-calendar.c @@ -55,8 +55,8 @@ delete_event_cb (GtkWidget *widget, gtk_main_quit (); } -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { GtkWidget *window; GtkWidget *cal; diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c index 7468053f31..745c982b8d 100644 --- a/widgets/misc/test-dateedit.c +++ b/widgets/misc/test-dateedit.c @@ -47,8 +47,8 @@ static void on_time_changed (EDateEdit *dedit, gchar *name); #endif -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { GtkWidget *window; EDateEdit *dedit; diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c index c0f13f5845..4e4d9894fa 100644 --- a/widgets/misc/test-preferences-window.c +++ b/widgets/misc/test-preferences-window.c @@ -28,12 +28,12 @@ static void add_pages (EPreferencesWindow *preferences_window) { - int i; + gint i; for (i = 0; i < NUM_PAGES; i ++) { GtkWidget *widget; - char *caption; - char *page_name; + gchar *caption; + gchar *page_name; caption = g_strdup_printf ("Title of page %d", i); page_name = g_strdup_printf ("page-%d", i); @@ -53,15 +53,15 @@ add_pages (EPreferencesWindow *preferences_window) static int delete_event_callback (GtkWidget *widget, GdkEventAny *event, - void *data) + gpointer data) { gtk_main_quit (); return TRUE; } -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { GtkWidget *window; |