diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 23:13:25 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-29 00:13:23 +0800 |
commit | fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch) | |
tree | ae78be371695c3dc18847b87d3f014f985aa3a40 /widgets/misc | |
parent | 6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff) | |
download | gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.bz2 gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.lz gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.xz gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'widgets/misc')
64 files changed, 742 insertions, 742 deletions
diff --git a/widgets/misc/e-activity-handler.c b/widgets/misc/e-activity-handler.c index dd0bd60e9b..3cdd94984a 100644 --- a/widgets/misc/e-activity-handler.c +++ b/widgets/misc/e-activity-handler.c @@ -36,10 +36,10 @@ struct _ActivityInfo { - char *component_id; - int error_type; + gchar *component_id; + gint error_type; guint id; - char *information; + gchar *information; gboolean cancellable; double progress; GtkWidget *menu; @@ -61,7 +61,7 @@ struct _EActivityHandlerPrivate { }; /* In the status bar, we show only errors and info. Errors are pictured as warnings. */ -const char *icon_data [] = {"dialog-warning", "dialog-information"}; +const gchar *icon_data [] = {"dialog-warning", "dialog-information"}; G_DEFINE_TYPE (EActivityHandler, e_activity_handler, G_TYPE_OBJECT) @@ -82,10 +82,10 @@ get_new_activity_id (EActivityHandler *activity_handler) static GList * lookup_activity (GList *list, guint activity_id, - int *order_number_return) + gint *order_number_return) { GList *p; - int i; + gint i; for (p = list, i = 0; p != NULL; p = p->next, i ++) { ActivityInfo *activity_info; @@ -107,7 +107,7 @@ lookup_activity (GList *list, static int task_widget_button_press_event_callback (GtkWidget *widget, GdkEventButton *button_event, - void *data) + gpointer data) { ActivityInfo *activity_info; @@ -126,9 +126,9 @@ task_widget_button_press_event_callback (GtkWidget *widget, /* Creating and destroying ActivityInfos. */ static ActivityInfo * -activity_info_new (const char *component_id, +activity_info_new (const gchar *component_id, guint id, - const char *information, + const gchar *information, gboolean cancellable) { ActivityInfo *info; @@ -200,10 +200,10 @@ setup_task_bar (EActivityHandler *activity_handler, if (info->error) { /* Prepare to handle existing errors*/ GtkWidget *tool; - const char *stock; + const gchar *stock; stock = info->error_type ? icon_data [1] : icon_data[0]; - tool = e_task_widget_update_image (task_widget, (char *)stock, info->information); + tool = e_task_widget_update_image (task_widget, (gchar *)stock, info->information); g_object_set_data ((GObject *) task_widget, "tool", tool); g_object_set_data ((GObject *) task_widget, "error", info->error); g_object_set_data ((GObject *) task_widget, "activity-handler", activity_handler); @@ -215,7 +215,7 @@ setup_task_bar (EActivityHandler *activity_handler, } static void -task_bar_destroy_notify (void *data, +task_bar_destroy_notify (gpointer data, GObject *task_bar_instance) { EActivityHandler *activity_handler; @@ -304,7 +304,7 @@ e_activity_handler_new (void) } void -e_activity_handler_set_error_flush_time (EActivityHandler *handler, int time) +e_activity_handler_set_error_flush_time (EActivityHandler *handler, gint time) { handler->priv->error_flush_interval = time; } @@ -316,7 +316,7 @@ e_activity_handler_set_logger (EActivityHandler *handler, ELogger *logger) void e_activity_handler_set_message (EActivityHandler *activity_handler, - const char *message) + const gchar *message) { EActivityHandlerPrivate *priv; GSList *i; @@ -376,7 +376,7 @@ cancel_wrapper (gpointer pdata) /* Hide the error */ EActivityHandler *handler = data->handler; ActivityInfo *info; - int order, len; + gint order, len; GSList *sp; GList *p = lookup_activity (handler->priv->activity_infos, data->id, &order); e_logger_log (handler->priv->logger, E_LOG_ERROR, g_object_get_data (data->info->error, "primary"), @@ -404,15 +404,15 @@ cancel_wrapper (gpointer pdata) /* CORBA methods. */ guint e_activity_handler_cancelable_operation_started (EActivityHandler *activity_handler, - const char *component_id, - const char *information, + const gchar *component_id, + const gchar *information, gboolean cancellable, void (*cancel_func)(gpointer), gpointer user_data) { EActivityHandlerPrivate *priv; ActivityInfo *activity_info; - unsigned int activity_id; + guint activity_id; GSList *p; struct _cancel_wdata *data; gboolean bfree = FALSE; @@ -449,13 +449,13 @@ guint e_activity_handler_cancelable_operation_started (EActivityHandler *activ guint e_activity_handler_operation_started (EActivityHandler *activity_handler, - const char *component_id, - const char *information, + const gchar *component_id, + const gchar *information, gboolean cancellable) { EActivityHandlerPrivate *priv; ActivityInfo *activity_info; - unsigned int activity_id; + guint activity_id; GSList *p; priv = activity_handler->priv; @@ -481,7 +481,7 @@ handle_error (ETaskWidget *task) GtkWidget *tool, *error; EActivityHandler *activity_handler; guint id; - int error_type = GPOINTER_TO_INT((g_object_get_data ((GObject *) task, "error-type"))); + gint error_type = GPOINTER_TO_INT((g_object_get_data ((GObject *) task, "error-type"))); tool = g_object_get_data ((GObject *) task, "tool"); error = g_object_get_data ((GObject *) task, "error"); activity_handler = g_object_get_data ((GObject *) task, "activity-handler"); @@ -499,7 +499,7 @@ error_cleanup (EActivityHandler *activity_handler) EActivityHandlerPrivate *priv = activity_handler->priv; GList *p, *node; GSList *sp; - int i; + gint i; time_t now = time (NULL); gboolean berror = FALSE; @@ -541,16 +541,16 @@ error_cleanup (EActivityHandler *activity_handler) guint e_activity_handler_make_error (EActivityHandler *activity_handler, - const char *component_id, - int error_type, + const gchar *component_id, + gint error_type, GtkWidget *error) { EActivityHandlerPrivate *priv; ActivityInfo *activity_info; - unsigned int activity_id; + guint activity_id; GSList *p; - char *information = g_object_get_data((GObject *) error, "primary"); - const char *img; + gchar *information = g_object_get_data((GObject *) error, "primary"); + const gchar *img; priv = activity_handler->priv; activity_id = get_new_activity_id (activity_handler); @@ -571,7 +571,7 @@ e_activity_handler_make_error (EActivityHandler *activity_handler, task_widget->id = activity_id; e_task_bar_prepend_task (E_TASK_BAR (p->data), task_widget); - tool = e_task_widget_update_image (task_widget, (char *)img, information); + tool = e_task_widget_update_image (task_widget, (gchar *)img, information); g_object_set_data ((GObject *) task_widget, "tool", tool); g_object_set_data ((GObject *) task_widget, "error", error); g_object_set_data ((GObject *) task_widget, "activity-handler", activity_handler); @@ -597,7 +597,7 @@ e_activity_handler_operation_set_error(EActivityHandler *activity_handler, ActivityInfo *activity_info; GList *p; GSList *sp; - int order_number; + gint order_number; p = lookup_activity (priv->activity_infos, activity_id, &order_number); if (p == NULL) { @@ -621,7 +621,7 @@ e_activity_handler_operation_set_error(EActivityHandler *activity_handler, if (!task_widget) continue; - tool = e_task_widget_update_image (task_widget, (char *)icon_data[0], g_object_get_data ((GObject *) error, "primary")); + tool = e_task_widget_update_image (task_widget, (gchar *)icon_data[0], g_object_get_data ((GObject *) error, "primary")); g_object_set_data ((GObject *) task_widget, "tool", tool); g_object_set_data ((GObject *) task_widget, "error", error); g_object_set_data ((GObject *) task_widget, "activity-handler", activity_handler); @@ -637,14 +637,14 @@ e_activity_handler_operation_set_error(EActivityHandler *activity_handler, void e_activity_handler_operation_progressing (EActivityHandler *activity_handler, guint activity_id, - const char *information, + const gchar *information, double progress) { EActivityHandlerPrivate *priv = activity_handler->priv; ActivityInfo *activity_info; GList *p; GSList *sp; - int order_number; + gint order_number; p = lookup_activity (priv->activity_infos, activity_id, &order_number); if (p == NULL) { @@ -679,7 +679,7 @@ e_activity_handler_operation_finished (EActivityHandler *activity_handler, EActivityHandlerPrivate *priv = activity_handler->priv; GList *p; GSList *sp; - int order_number; + gint order_number; p = lookup_activity (priv->activity_infos, activity_id, &order_number); if (p == NULL) { diff --git a/widgets/misc/e-activity-handler.h b/widgets/misc/e-activity-handler.h index bf8d8e0095..a458bf0f31 100644 --- a/widgets/misc/e-activity-handler.h +++ b/widgets/misc/e-activity-handler.h @@ -65,24 +65,24 @@ void e_activity_handler_attach_task_bar (EActivityHandler *activity_hanlder, ETaskBar *task_bar); void e_activity_handler_set_message (EActivityHandler *activity_handler, - const char *message); + const gchar *message); void e_activity_handler_unset_message (EActivityHandler *activity_handler); guint e_activity_handler_operation_started (EActivityHandler *activity_handler, - const char *component_id, - const char *information, + const gchar *component_id, + const gchar *information, gboolean cancellable); guint e_activity_handler_cancelable_operation_started (EActivityHandler *activity_handler, - const char *component_id, - const char *information, + const gchar *component_id, + const gchar *information, gboolean cancellable, void (*cancel_func)(gpointer), gpointer user_data); void e_activity_handler_operation_progressing (EActivityHandler *activity_handler, guint activity_id, - const char *information, + const gchar *information, double progress); void e_activity_handler_operation_finished (EActivityHandler *activity_handler, @@ -90,8 +90,8 @@ void e_activity_handler_operation_finished (EActivityHandler *activity_handler void e_activity_handler_set_logger (EActivityHandler *handler, ELogger *logger); guint e_activity_handler_make_error (EActivityHandler *activity_handler, - const char *component_id, - int error_type, + const gchar *component_id, + gint error_type, GtkWidget *error); void e_activity_handler_operation_set_error (EActivityHandler *activity_handler, @@ -99,7 +99,7 @@ e_activity_handler_operation_set_error (EActivityHandler *activity_handler, GtkWidget *error); void -e_activity_handler_set_error_flush_time (EActivityHandler *handler, int time); +e_activity_handler_set_error_flush_time (EActivityHandler *handler, gint time); #ifdef __cplusplus } diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index be3751f852..cd3e2b5ec7 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-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c index e994120b33..ddf8bf60ee 100644 --- a/widgets/misc/e-cell-date-edit.c +++ b/widgets/misc/e-cell-date-edit.c @@ -61,17 +61,17 @@ static void e_cell_date_edit_set_property (GObject *object, static gint e_cell_date_edit_do_popup (ECellPopup *ecp, GdkEvent *event, - int row, - int view_col); + gint row, + 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); static void e_cell_date_edit_show_popup (ECellDateEdit *ecde, - int row, - int view_col); + gint row, + gint view_col); static void e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, - int row, - int view_col, + gint row, + gint view_col, gint *x, gint *y, gint *height, @@ -79,10 +79,10 @@ static void e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, static void e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde); -static int e_cell_date_edit_key_press (GtkWidget *popup_window, +static gint e_cell_date_edit_key_press (GtkWidget *popup_window, GdkEventKey *event, ECellDateEdit *ecde); -static int e_cell_date_edit_button_press (GtkWidget *popup_window, +static gint e_cell_date_edit_button_press (GtkWidget *popup_window, GdkEventButton *event, ECellDateEdit *ecde); static void e_cell_date_edit_on_ok_clicked (GtkWidget *button, @@ -485,8 +485,8 @@ e_cell_date_edit_set_property (GObject *object, static gint e_cell_date_edit_do_popup (ECellPopup *ecp, GdkEvent *event, - int row, - int view_col) + gint row, + gint view_col) { ECellDateEdit *ecde = E_CELL_DATE_EDIT (ecp); @@ -511,12 +511,12 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde) ECellView *ecv = (ECellView*) ecp->popup_cell_view; ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view); ETableCol *ecol; - char *cell_text; + gchar *cell_text; ETimeParseStatus status; struct tm date_tm; GDate date; ECalendarItem *calitem; - char buffer[64]; + gchar buffer[64]; gboolean is_date = TRUE; ecol = e_table_header_get_column (eti->header, ecp->popup_view_col); @@ -579,7 +579,7 @@ e_cell_date_edit_select_matching_time (ECellDateEdit *ecde, for (valid = gtk_tree_model_get_iter_first (model, &iter); valid && !found; valid = gtk_tree_model_iter_next (model, &iter)) { - char *str = NULL; + gchar *str = NULL; gtk_tree_model_get (model, &iter, 0, &str, -1); @@ -605,8 +605,8 @@ e_cell_date_edit_select_matching_time (ECellDateEdit *ecde, static void e_cell_date_edit_show_popup (ECellDateEdit *ecde, - int row, - int view_col) + gint row, + gint view_col) { gint x, y, width, height; @@ -630,8 +630,8 @@ e_cell_date_edit_show_popup (ECellDateEdit *ecde, /* Calculates the size and position of the popup window (like GtkCombo). */ static void e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, - int row, - int view_col, + gint row, + gint view_col, gint *x, gint *y, gint *height, @@ -753,7 +753,7 @@ static void e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde) { GtkListStore *store; - char buffer[40]; + gchar buffer[40]; struct tm tmp_tm; gint hour, min; @@ -801,8 +801,8 @@ e_cell_date_edit_on_ok_clicked (GtkWidget *button, GDate start_date, end_date; gboolean day_selected; struct tm date_tm; - char buffer[64]; - const char *text; + gchar buffer[64]; + const gchar *text; ETimeParseStatus status; gboolean is_date = FALSE; @@ -843,7 +843,7 @@ e_cell_date_edit_show_time_invalid_warning (ECellDateEdit *ecde) { GtkWidget *dialog; struct tm date_tm; - char buffer[64]; + gchar buffer[64]; /* Create a useful error message showing the correct format. */ date_tm.tm_year = 100; @@ -875,7 +875,7 @@ e_cell_date_edit_on_now_clicked (GtkWidget *button, { struct tm tmp_tm; time_t t; - char buffer[64]; + gchar buffer[64]; if (ecde->time_callback) { tmp_tm = (*ecde->time_callback) (ecde, ecde->time_callback_data); @@ -908,7 +908,7 @@ e_cell_date_edit_on_today_clicked (GtkWidget *button, { struct tm tmp_tm; time_t t; - char buffer[64]; + gchar buffer[64]; if (ecde->time_callback) { tmp_tm = (*ecde->time_callback) (ecde, ecde->time_callback_data); diff --git a/widgets/misc/e-cell-percent.c b/widgets/misc/e-cell-percent.c index 194a7bd6b6..378bb8ab55 100644 --- a/widgets/misc/e-cell-percent.c +++ b/widgets/misc/e-cell-percent.c @@ -41,11 +41,11 @@ G_DEFINE_TYPE (ECellPercent, e_cell_percent, E_CELL_TEXT_TYPE) -static char * -ecp_get_text (ECellText *cell, ETableModel *model, int col, int row) +static gchar * +ecp_get_text (ECellText *cell, ETableModel *model, gint col, gint row) { - int percent; - static char buffer[8]; + gint percent; + static gchar buffer[8]; percent = GPOINTER_TO_INT (e_table_model_value_at (model, col, row)); @@ -60,7 +60,7 @@ ecp_get_text (ECellText *cell, ETableModel *model, int col, int row) } static void -ecp_free_text(ECellText *cell, char *text) +ecp_free_text(ECellText *cell, gchar *text) { /* Do Nothing. */ } @@ -80,12 +80,12 @@ show_percent_warning (void) } static void -ecp_set_value (ECellText *cell, ETableModel *model, int col, int row, - const char *text) +ecp_set_value (ECellText *cell, ETableModel *model, gint col, gint row, + const gchar *text) { - int matched, percent; + gint matched, percent; gboolean empty = TRUE; - const char *p; + const gchar *p; if (text) { p = text; @@ -142,7 +142,7 @@ e_cell_percent_init (ECellPercent *ecp) * Returns: an ECell object that can be used to render numbers. */ ECell * -e_cell_percent_new (const char *fontname, GtkJustification justify) +e_cell_percent_new (const gchar *fontname, GtkJustification justify) { ECellPercent *ecn = g_object_new (E_CELL_PERCENT_TYPE, NULL); diff --git a/widgets/misc/e-cell-percent.h b/widgets/misc/e-cell-percent.h index 5e202dfa82..3ac15afab7 100644 --- a/widgets/misc/e-cell-percent.h +++ b/widgets/misc/e-cell-percent.h @@ -46,6 +46,6 @@ typedef struct { } ECellPercentClass; GType e_cell_percent_get_type (void); -ECell *e_cell_percent_new (const char *fontname, GtkJustification justify); +ECell *e_cell_percent_new (const gchar *fontname, GtkJustification justify); #endif /* _E_CELL_PERCENT_H_ */ diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c index 5d1f8c036a..94133cc204 100644 --- a/widgets/misc/e-charset-picker.c +++ b/widgets/misc/e-charset-picker.c @@ -52,7 +52,7 @@ typedef enum { E_CHARSET_WESTERN_EUROPEAN_NEW } ECharsetClass; -static const char *classnames[] = { +static const gchar *classnames[] = { N_("Unknown"), N_("Arabic"), N_("Baltic"), @@ -110,7 +110,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) @@ -129,7 +129,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)", @@ -157,7 +157,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; @@ -203,7 +203,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); @@ -257,7 +257,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)) { @@ -292,11 +292,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")) @@ -350,11 +350,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); @@ -378,13 +378,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, @@ -576,14 +576,14 @@ e_charset_add_radio_actions (GtkActionGroup *action_group, * sets. **/ void -e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path, - const char *default_charset, +e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const gchar *path, + const gchar *default_charset, BonoboUIListenerFn cb, gpointer user_data) { - char *encoded_label, *label; - const char *locale_charset; + gchar *encoded_label, *label; + const gchar *locale_charset; GString *menuitems; - int def, i; + gint def, i; g_get_charset (&locale_charset); if (!g_ascii_strcasecmp (locale_charset, "US-ASCII")) @@ -610,7 +610,7 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path, /* escape _'s in the charset name so that it doesn't become an underline in a GtkLabel */ if ((u = strchr (charsets[i].name, '_'))) { - int extra = 1; + gint extra = 1; const gchar *s; gchar *d; @@ -663,19 +663,19 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path, } if (def == num_charsets) { - char *command; - char *charset_name, *u; + gchar *command; + gchar *charset_name, *u; /* escape _'s in the charset name so that it doesn't become an underline in a GtkLabel */ if ((u = strchr (default_charset, '_'))) { - int extra = 1; - char *s, *d; + gint extra = 1; + gchar *s, *d; while ((u = strchr (u + 1, '_'))) extra++; d = charset_name = g_alloca (strlen (default_charset) + extra + 1); - s = (char *) default_charset; + s = (gchar *) default_charset; while (*s != '\0') { if (*s == '_') *d++ = '_'; @@ -683,7 +683,7 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path, } *d = '\0'; } else { - charset_name = (char *) default_charset; + charset_name = (gchar *) default_charset; } label = g_strdup (charset_name); diff --git a/widgets/misc/e-charset-picker.h b/widgets/misc/e-charset-picker.h index 88c89fb308..04c013bd88 100644 --- a/widgets/misc/e-charset-picker.h +++ b/widgets/misc/e-charset-picker.h @@ -26,11 +26,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); void e_charset_add_radio_actions (GtkActionGroup *action_group, @@ -40,8 +40,8 @@ void e_charset_add_radio_actions (GtkActionGroup *action_group, void e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, - const char *path, - const char *default_charset, + const gchar *path, + const gchar *default_charset, BonoboUIListenerFn cb, gpointer user_data); 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-button.c b/widgets/misc/e-combo-button.c index dc978af91a..b40cf70635 100644 --- a/widgets/misc/e-combo-button.c +++ b/widgets/misc/e-combo-button.c @@ -91,10 +91,10 @@ paint (EComboButton *combo_button, GtkButton *button = GTK_BUTTON (combo_button); GtkShadowType shadow_type; gboolean interior_focus; - int separator_x; - int focus_width, focus_pad; - int x, y, width, height; - int border_width; + gint separator_x; + gint focus_width, focus_pad; + gint x, y, width, height; + gint border_width; if (GTK_BUTTON (widget)->depressed || priv->menu_popped_up) { shadow_type = GTK_SHADOW_IN; @@ -194,7 +194,7 @@ menu_detacher (GtkWidget *widget, static void menu_deactivate_callback (GtkMenuShell *menu_shell, - void *data) + gpointer data) { EComboButton *combo_button; EComboButtonPrivate *priv; @@ -215,7 +215,7 @@ menu_position_func (GtkMenu *menu, gint *x_return, gint *y_return, gboolean *push_in, - void *data) + gpointer data) { EComboButton *combo_button; GtkAllocation *allocation; @@ -374,7 +374,7 @@ impl_released (GtkButton *button) the menu hasn't been popped up. */ if (button->button_down) { - int new_state; + gint new_state; button->button_down = FALSE; @@ -561,7 +561,7 @@ e_combo_button_set_icon (EComboButton *combo_button, void e_combo_button_set_label (EComboButton *combo_button, - const char *label) + const gchar *label) { EComboButtonPrivate *priv; diff --git a/widgets/misc/e-combo-button.h b/widgets/misc/e-combo-button.h index edeb1be9bd..c36948cbde 100644 --- a/widgets/misc/e-combo-button.h +++ b/widgets/misc/e-combo-button.h @@ -66,7 +66,7 @@ GtkWidget *e_combo_button_new (void); void e_combo_button_set_icon (EComboButton *combo_button, GdkPixbuf *pixbuf); void e_combo_button_set_label (EComboButton *combo_button, - const char *label); + const gchar *label); void e_combo_button_set_menu (EComboButton *combo_button, GtkMenu *menu); void e_combo_button_pack_vbox (EComboButton *combo_button); 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-dropdown-button.c b/widgets/misc/e-dropdown-button.c index 00b2695e5f..54cc5a0be8 100644 --- a/widgets/misc/e-dropdown-button.c +++ b/widgets/misc/e-dropdown-button.c @@ -40,15 +40,15 @@ G_DEFINE_TYPE (EDropdownButton, e_dropdown_button, GTK_TYPE_TOGGLE_BUTTON) static void menu_position_cb (GtkMenu *menu, - int *x, - int *y, + gint *x, + gint *y, gboolean *push_in, - void *data) + gpointer data) { EDropdownButton *dropdown_button; EDropdownButtonPrivate *priv; GtkRequisition menu_requisition; - int max_x, max_y; + gint max_x, max_y; dropdown_button = E_DROPDOWN_BUTTON (data); priv = dropdown_button->priv; @@ -72,7 +72,7 @@ menu_position_cb (GtkMenu *menu, static int menu_deactivate_cb (GtkMenuShell *menu_shell, - void *data) + gpointer data) { EDropdownButton *dropdown_button; @@ -166,7 +166,7 @@ e_dropdown_button_init (EDropdownButton *dropdown_button) **/ void e_dropdown_button_construct (EDropdownButton *dropdown_button, - const char *label_text, + const gchar *label_text, GtkMenu *menu) { EDropdownButtonPrivate *priv; @@ -220,7 +220,7 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button, * Return value: A pointer to the newly created %EDropdownButton. **/ GtkWidget * -e_dropdown_button_new (const char *label_text, +e_dropdown_button_new (const gchar *label_text, GtkMenu *menu) { GtkWidget *widget; diff --git a/widgets/misc/e-dropdown-button.h b/widgets/misc/e-dropdown-button.h index bd4fe6feb4..19f678b4eb 100644 --- a/widgets/misc/e-dropdown-button.h +++ b/widgets/misc/e-dropdown-button.h @@ -58,9 +58,9 @@ struct _EDropdownButtonClass { GType e_dropdown_button_get_type (void); void e_dropdown_button_construct (EDropdownButton *dropdown_button, - const char *label_text, + const gchar *label_text, GtkMenu *menu); -GtkWidget *e_dropdown_button_new (const char *label_text, +GtkWidget *e_dropdown_button_new (const gchar *label_text, GtkMenu *menu); #ifdef __cplusplus diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c index 9a67636939..b699190568 100644 --- a/widgets/misc/e-filter-bar.c +++ b/widgets/misc/e-filter-bar.c @@ -68,7 +68,7 @@ rule_editor_destroyed (EFilterBar *efb, GObject *deadbeef) /* FIXME: need to update the popup menu to match any edited rules, sigh */ static void -full_rule_editor_response (GtkWidget *dialog, int response, void *data) +full_rule_editor_response (GtkWidget *dialog, gint response, gpointer data) { EFilterBar *efb = data; @@ -79,7 +79,7 @@ full_rule_editor_response (GtkWidget *dialog, int response, void *data) } static void -rule_editor_response (GtkWidget *dialog, int response, void *data) +rule_editor_response (GtkWidget *dialog, gint response, gpointer data) { EFilterBar *efb = data; FilterRule *rule; @@ -100,7 +100,7 @@ rule_editor_response (GtkWidget *dialog, int response, void *data) } static void -rule_advanced_response (GtkWidget *dialog, int response, void *data) +rule_advanced_response (GtkWidget *dialog, gint response, gpointer data) { EFilterBar *efb = data; /* the below generates a compiler warning about incompatible pointer types */ @@ -211,7 +211,7 @@ static void save_search_dialog (ESearchBar *esb) { FilterRule *rule; - char *name, *text; + gchar *name, *text; GtkWidget *dialog, *w; EFilterBar *efb = (EFilterBar *)esb; @@ -254,7 +254,7 @@ save_search_dialog (ESearchBar *esb) } static void -menubar_activated (ESearchBar *esb, int id, void *data) +menubar_activated (ESearchBar *esb, gint id, gpointer data) { EFilterBar *efb = (EFilterBar *)esb; GtkWidget *dialog; @@ -317,11 +317,11 @@ menubar_activated (ESearchBar *esb, int id, void *data) } static void -option_changed (ESearchBar *esb, void *data) +option_changed (ESearchBar *esb, gpointer data) { EFilterBar *efb = (EFilterBar *)esb; - int id = e_search_bar_get_item_id (esb); - char *query; + gint id = e_search_bar_get_item_id (esb); + gchar *query; d(printf("option changed, id = %d, setquery = %s %d\n", id, efb->setquery ? "true" : "false", esb->block_search)); @@ -366,16 +366,16 @@ dup_item_no_subitems (ESearchBarItem *dest, } static GArray * -build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrArray *rules) +build_items (ESearchBar *esb, ESearchBarItem *items, gint type, gint *start, GPtrArray *rules) { FilterRule *rule = NULL; EFilterBar *efb = (EFilterBar *)esb; - 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]); @@ -467,7 +467,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA static void free_built_items (GArray *menu) { - int i; + gint i; for (i = 0; i < menu->len; i ++) { ESearchBarItem *item; @@ -493,7 +493,7 @@ generate_menu (ESearchBar *esb, 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); @@ -508,7 +508,7 @@ set_menu (ESearchBar *esb, ESearchBarItem *items) { EFilterBar *efb = E_FILTER_BAR (esb); ESearchBarItem *default_items; - int i, num; + gint i, num; if (efb->default_items) free_items (efb->default_items); @@ -582,7 +582,7 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp switch (property_id) { case PROP_QUERY: { - char *text = e_search_bar_get_text (E_SEARCH_BAR (efb)); + gchar *text = e_search_bar_get_text (E_SEARCH_BAR (efb)); /* empty search text means searching turned off */ if (efb->current_query && text && *text) { @@ -600,15 +600,15 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp 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 *) efb); - 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 *) efb); view_id = e_search_bar_get_viewitem_id ((ESearchBar *) efb); @@ -618,28 +618,28 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp 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", esb->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 (efb->current_query)); } else { /* simple query, save the searchbar state */ text = e_search_bar_get_text ((ESearchBar *) efb); - 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); } @@ -648,7 +648,7 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp /* remap to glib memory */ text = g_malloc (n + 1); - memcpy (text, (char *)xmlbuf, n); + memcpy (text, (gchar *)xmlbuf, n); text[n] = '\0'; xmlFree (xmlbuf); @@ -662,12 +662,12 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp } 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 { @@ -683,26 +683,26 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe EFilterBar *efb = (EFilterBar *) object; ESearchBar *esb = 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; @@ -745,7 +745,7 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe esb->block_search = FALSE; efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base]; if (efb->config && efb->current_query) { - char *query = e_search_bar_get_text (esb); + gchar *query = e_search_bar_get_text (esb); efb->config (efb, efb->current_query, item_id, query, efb->config_data); g_free (query); @@ -758,9 +758,9 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe efb->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) */ @@ -781,7 +781,7 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe scope = xml_get_prop_int (node, "searchscope"); e_search_bar_set_search_scope (E_SEARCH_BAR (efb), scope); - text = (char *)xmlGetProp (node, (const unsigned char *)"text"); + text = (gchar *)xmlGetProp (node, (const guchar *)"text"); e_search_bar_set_text (E_SEARCH_BAR (efb), text); if (text && *text) { efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base]; @@ -833,7 +833,7 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe static void clear_rules(EFilterBar *efb, GPtrArray *rules) { - int i; + gint i; FilterRule *rule; /* clear out any data on old rules */ @@ -952,10 +952,10 @@ init (EFilterBar *efb) 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 *bar; @@ -969,10 +969,10 @@ e_filter_bar_new (RuleContext *context, 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; @@ -985,10 +985,10 @@ 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, - void *data ,EFilterBar *bar ) + gpointer data ,EFilterBar *bar ) { ESearchBarItem item = { NULL, -1, 0 }; diff --git a/widgets/misc/e-filter-bar.h b/widgets/misc/e-filter-bar.h index 8f06c867ae..d5381319c9 100644 --- a/widgets/misc/e-filter-bar.h +++ b/widgets/misc/e-filter-bar.h @@ -56,11 +56,11 @@ extern "C" { 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; @@ -68,14 +68,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; @@ -109,7 +109,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...") @@ -120,22 +120,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 7f0dbaaaee..0fb4540161 100644 --- a/widgets/misc/e-icon-entry.c +++ b/widgets/misc/e-icon-entry.c @@ -60,10 +60,10 @@ entry_focus_change_cb (GtkWidget *widget, static void e_icon_entry_get_borders (GtkWidget *widget, GtkWidget *entry, - int *xborder, - int *yborder) + gint *xborder, + gint *yborder) { - int focus_width; + gint focus_width; gboolean interior_focus; g_return_if_fail (entry->style != NULL); @@ -89,7 +89,7 @@ e_icon_entry_paint (GtkWidget *widget, { EIconEntry *entry = E_ICON_ENTRY (widget); GtkWidget *entry_widget = entry->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 (entry_widget, @@ -201,7 +201,7 @@ e_icon_entry_size_request (GtkWidget *widget, EIconEntry *entry = E_ICON_ENTRY (widget); GtkContainer *container = GTK_CONTAINER (widget); GtkBin *bin = GTK_BIN (widget); - int xborder, yborder; + gint xborder, yborder; requisition->width = requisition->height = container->border_width * 2; @@ -229,7 +229,7 @@ e_icon_entry_size_allocate (GtkWidget *widget, GtkContainer *container = GTK_CONTAINER (widget); GtkBin *bin = GTK_BIN (widget); GtkAllocation child_allocation; - int xborder, yborder; + gint xborder, yborder; widget->allocation = *allocation; @@ -357,7 +357,7 @@ set_cursor (GtkWidget *widget, GdkEventCrossing *event, gpointer dummy) } GtkWidget * -e_icon_entry_create_button (const char *stock) +e_icon_entry_create_button (const gchar *stock) { GtkWidget *eventbox; GtkWidget *image; diff --git a/widgets/misc/e-icon-entry.h b/widgets/misc/e-icon-entry.h index 894cb16c4f..f8e4740d36 100644 --- a/widgets/misc/e-icon-entry.h +++ b/widgets/misc/e-icon-entry.h @@ -78,7 +78,7 @@ void e_icon_entry_pack_widget (EIconEntry *entry, GtkWidget *e_icon_entry_get_entry (EIconEntry *entry); -GtkWidget *e_icon_entry_create_button (const char *stock); +GtkWidget *e_icon_entry_create_button (const gchar *stock); G_END_DECLS 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-info-label.c b/widgets/misc/e-info-label.c index e6db111a74..4e158d4117 100644 --- a/widgets/misc/e-info-label.c +++ b/widgets/misc/e-info-label.c @@ -54,7 +54,7 @@ el_destroy (GtkObject *o) static int el_expose_event(GtkWidget *w, GdkEventExpose *event) { - int x = ((GtkContainer *)w)->border_width; + gint x = ((GtkContainer *)w)->border_width; /* This seems a hack to me, but playing with styles wouldn't affect the background */ gtk_paint_flat_box(w->style, w->window, @@ -71,7 +71,7 @@ get_text_full_width (GtkWidget *label) { PangoLayout *layout; PangoRectangle rect; - int width; + gint width; g_return_val_if_fail (GTK_IS_LABEL (label), 0); @@ -93,7 +93,7 @@ el_size_allocate (GtkWidget *widget, GtkAllocation *pallocation) { EInfoLabel *el; GtkAllocation allocation; - int full_loc, full_nfo; + gint full_loc, full_nfo; gint diff; /* let calculate parent class first, and then just make it not divide evenly */ @@ -179,7 +179,7 @@ e_info_label_get_type(void) * Return value: **/ GtkWidget * -e_info_label_new(const char *icon) +e_info_label_new(const gchar *icon) { EInfoLabel *el = g_object_new(e_info_label_get_type(), NULL); GtkWidget *image; @@ -207,7 +207,7 @@ e_info_label_new(const char *icon) * @info is some info about this location. **/ void -e_info_label_set_info(EInfoLabel *el, const char *location, const char *info) +e_info_label_set_info(EInfoLabel *el, const gchar *location, const gchar *info) { gchar *markup; diff --git a/widgets/misc/e-info-label.h b/widgets/misc/e-info-label.h index d4dd16e395..1541fb8f10 100644 --- a/widgets/misc/e-info-label.h +++ b/widgets/misc/e-info-label.h @@ -49,8 +49,8 @@ struct _EInfoLabelClass { GType e_info_label_get_type(void); -GtkWidget *e_info_label_new(const char *icon); -void e_info_label_set_info(EInfoLabel *, const char *loc, const char *info); +GtkWidget *e_info_label_new(const gchar *icon); +void e_info_label_set_info(EInfoLabel *, const gchar *loc, const gchar *info); #ifdef __cplusplus } 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-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c index f78f764f03..9b193565d4 100644 --- a/widgets/misc/e-multi-config-dialog.c +++ b/widgets/misc/e-multi-config-dialog.c @@ -43,8 +43,8 @@ struct _EMultiConfigDialogPrivate { GtkWidget *notebook; - int set_page_timeout_id; - int set_page_timeout_page; + gint set_page_timeout_id; + gint set_page_timeout_page; }; G_DEFINE_TYPE (EMultiConfigDialog, e_multi_config_dialog, GTK_TYPE_DIALOG) @@ -76,7 +76,7 @@ static const gchar *list_e_table_spec = /* Page handling. */ static GtkWidget * -create_page_container (const char *description, +create_page_container (const gchar *description, GtkWidget *widget) { GtkWidget *vbox; @@ -95,7 +95,7 @@ create_page_container (const char *description, keyboard). */ static int -set_page_timeout_callback (void *data) +set_page_timeout_callback (gpointer data) { EMultiConfigDialog *multi_config_dialog; EMultiConfigDialogPrivate *priv; @@ -125,8 +125,8 @@ do_close (EMultiConfigDialog *dialog) static void table_cursor_change_callback (ETable *etable, - int row, - void *data) + gint row, + gpointer data) { EMultiConfigDialog *dialog; EMultiConfigDialogPrivate *priv; @@ -168,7 +168,7 @@ impl_finalize (GObject *object) /* GtkDialog methods. */ static void -impl_response (GtkDialog *dialog, int response_id) +impl_response (GtkDialog *dialog, gint response_id) { EMultiConfigDialog *multi_config_dialog; @@ -315,8 +315,8 @@ e_multi_config_dialog_new (void) void e_multi_config_dialog_add_page (EMultiConfigDialog *dialog, - const char *title, - const char *description, + const gchar *title, + const gchar *description, GdkPixbuf *icon, EConfigPage *page_widget) { @@ -359,7 +359,7 @@ e_multi_config_dialog_add_page (EMultiConfigDialog *dialog, } void -e_multi_config_dialog_show_page (EMultiConfigDialog *dialog, int page) +e_multi_config_dialog_show_page (EMultiConfigDialog *dialog, gint page) { EMultiConfigDialogPrivate *priv; diff --git a/widgets/misc/e-multi-config-dialog.h b/widgets/misc/e-multi-config-dialog.h index e8d9896d55..88a538bb1f 100644 --- a/widgets/misc/e-multi-config-dialog.h +++ b/widgets/misc/e-multi-config-dialog.h @@ -62,12 +62,12 @@ GType e_multi_config_dialog_get_type (void); GtkWidget *e_multi_config_dialog_new (void); void e_multi_config_dialog_add_page (EMultiConfigDialog *dialog, - const char *title, - const char *description, + const gchar *title, + const gchar *description, GdkPixbuf *icon, EConfigPage *page); void e_multi_config_dialog_show_page (EMultiConfigDialog *dialog, - int page); + gint page); #ifdef __cplusplus } 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-reflow-model.c b/widgets/misc/e-reflow-model.c index d24b915e6e..2bf5e4990d 100644 --- a/widgets/misc/e-reflow-model.c +++ b/widgets/misc/e-reflow-model.c @@ -50,7 +50,7 @@ static guint e_reflow_model_signals [LAST_SIGNAL] = { 0, }; * @width: The new value for the width of each item. */ void -e_reflow_model_set_width (EReflowModel *e_reflow_model, int width) +e_reflow_model_set_width (EReflowModel *e_reflow_model, gint width) { g_return_if_fail (e_reflow_model != NULL); g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model)); @@ -64,7 +64,7 @@ e_reflow_model_set_width (EReflowModel *e_reflow_model, int width) * * Returns: the number of items in the reflow model. */ -int +gint e_reflow_model_count (EReflowModel *e_reflow_model) { g_return_val_if_fail (e_reflow_model != NULL, 0); @@ -81,8 +81,8 @@ e_reflow_model_count (EReflowModel *e_reflow_model) * * Returns: the height of the nth item. */ -int -e_reflow_model_height (EReflowModel *e_reflow_model, int n, GnomeCanvasGroup *parent) +gint +e_reflow_model_height (EReflowModel *e_reflow_model, gint n, GnomeCanvasGroup *parent) { g_return_val_if_fail (e_reflow_model != NULL, 0); g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), 0); @@ -101,7 +101,7 @@ e_reflow_model_height (EReflowModel *e_reflow_model, int n, GnomeCanvasGroup *pa * Returns: the new GnomeCanvasItem. */ GnomeCanvasItem * -e_reflow_model_incarnate (EReflowModel *e_reflow_model, int n, GnomeCanvasGroup *parent) +e_reflow_model_incarnate (EReflowModel *e_reflow_model, gint n, GnomeCanvasGroup *parent) { g_return_val_if_fail (e_reflow_model != NULL, NULL); g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), NULL); @@ -119,8 +119,8 @@ e_reflow_model_incarnate (EReflowModel *e_reflow_model, int n, GnomeCanvasGroup * * Returns: strcmp like semantics for the comparison value. */ -int -e_reflow_model_compare (EReflowModel *e_reflow_model, int n1, int n2) +gint +e_reflow_model_compare (EReflowModel *e_reflow_model, gint n1, gint n2) { #if 0 g_return_val_if_fail (e_reflow_model != NULL, 0); @@ -139,7 +139,7 @@ e_reflow_model_compare (EReflowModel *e_reflow_model, int n1, int n2) * Update item to represent the nth piece of data. */ void -e_reflow_model_reincarnate (EReflowModel *e_reflow_model, int n, GnomeCanvasItem *item) +e_reflow_model_reincarnate (EReflowModel *e_reflow_model, gint n, GnomeCanvasItem *item) { g_return_if_fail (e_reflow_model != NULL); g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model)); @@ -219,7 +219,7 @@ e_reflow_model_init (EReflowModel *e_reflow_model) static void print_tabs (void) { - int i; + gint i; for (i = 0; i < depth; i++) g_print("\t"); } @@ -284,7 +284,7 @@ e_reflow_model_comparison_changed (EReflowModel *e_reflow_model) * Use this function to notify any views of the reflow model that a number of items have been inserted. **/ void -e_reflow_model_items_inserted (EReflowModel *e_reflow_model, int position, int count) +e_reflow_model_items_inserted (EReflowModel *e_reflow_model, gint position, gint count) { g_return_if_fail (e_reflow_model != NULL); g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model)); @@ -308,7 +308,7 @@ e_reflow_model_items_inserted (EReflowModel *e_reflow_model, int position, int c **/ void e_reflow_model_item_removed (EReflowModel *e_reflow_model, - int n) + gint n) { g_return_if_fail (e_reflow_model != NULL); g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model)); @@ -335,7 +335,7 @@ e_reflow_model_item_removed (EReflowModel *e_reflow_model, * object */ void -e_reflow_model_item_changed (EReflowModel *e_reflow_model, int n) +e_reflow_model_item_changed (EReflowModel *e_reflow_model, gint n) { g_return_if_fail (e_reflow_model != NULL); g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model)); diff --git a/widgets/misc/e-reflow-model.h b/widgets/misc/e-reflow-model.h index c772621d07..d606edf8cd 100644 --- a/widgets/misc/e-reflow-model.h +++ b/widgets/misc/e-reflow-model.h @@ -48,13 +48,13 @@ typedef struct { /* * Virtual methods */ - void (*set_width) (EReflowModel *etm, int width); + void (*set_width) (EReflowModel *etm, gint width); - int (*count) (EReflowModel *etm); - int (*height) (EReflowModel *etm, int n, GnomeCanvasGroup *parent); - GnomeCanvasItem *(*incarnate) (EReflowModel *etm, int n, GnomeCanvasGroup *parent); - int (*compare) (EReflowModel *etm, int n1, int n2); - void (*reincarnate) (EReflowModel *etm, int n, GnomeCanvasItem *item); + gint (*count) (EReflowModel *etm); + gint (*height) (EReflowModel *etm, gint n, GnomeCanvasGroup *parent); + GnomeCanvasItem *(*incarnate) (EReflowModel *etm, gint n, GnomeCanvasGroup *parent); + gint (*compare) (EReflowModel *etm, gint n1, gint n2); + void (*reincarnate) (EReflowModel *etm, gint n, GnomeCanvasItem *item); /* * Signals @@ -68,28 +68,28 @@ typedef struct { */ void (*model_changed) (EReflowModel *etm); void (*comparison_changed) (EReflowModel *etm); - void (*model_items_inserted) (EReflowModel *etm, int position, int count); - void (*model_item_removed) (EReflowModel *etm, int position); - void (*model_item_changed) (EReflowModel *etm, int n); + void (*model_items_inserted) (EReflowModel *etm, gint position, gint count); + void (*model_item_removed) (EReflowModel *etm, gint position); + void (*model_item_changed) (EReflowModel *etm, gint n); } EReflowModelClass; GType e_reflow_model_get_type (void); /**/ void e_reflow_model_set_width (EReflowModel *e_reflow_model, - int width); -int e_reflow_model_count (EReflowModel *e_reflow_model); -int e_reflow_model_height (EReflowModel *e_reflow_model, - int n, + gint width); +gint e_reflow_model_count (EReflowModel *e_reflow_model); +gint e_reflow_model_height (EReflowModel *e_reflow_model, + gint n, GnomeCanvasGroup *parent); GnomeCanvasItem *e_reflow_model_incarnate (EReflowModel *e_reflow_model, - int n, + gint n, GnomeCanvasGroup *parent); -int e_reflow_model_compare (EReflowModel *e_reflow_model, - int n1, - int n2); +gint e_reflow_model_compare (EReflowModel *e_reflow_model, + gint n1, + gint n2); void e_reflow_model_reincarnate (EReflowModel *e_reflow_model, - int n, + gint n, GnomeCanvasItem *item); /* @@ -98,12 +98,12 @@ void e_reflow_model_reincarnate (EReflowModel *e_reflow_mode void e_reflow_model_changed (EReflowModel *e_reflow_model); void e_reflow_model_comparison_changed (EReflowModel *e_reflow_model); void e_reflow_model_items_inserted (EReflowModel *e_reflow_model, - int position, - int count); + gint position, + gint count); void e_reflow_model_item_removed (EReflowModel *e_reflow_model, - int n); + gint n); void e_reflow_model_item_changed (EReflowModel *e_reflow_model, - int n); + gint n); #ifdef __cplusplus } diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index 129046a89e..0465c38792 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -41,10 +41,10 @@ static gboolean e_reflow_event (GnomeCanvasItem *item, GdkEvent *event); static void e_reflow_realize (GnomeCanvasItem *item); static void e_reflow_unrealize (GnomeCanvasItem *item); static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, int width, int height); + gint x, gint y, gint width, gint height); static void e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags); -static double e_reflow_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item); -static void e_reflow_reflow (GnomeCanvasItem *item, int flags); +static double e_reflow_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item); +static void e_reflow_reflow (GnomeCanvasItem *item, gint flags); static void set_empty(EReflow *reflow); static void e_reflow_resize_children (GnomeCanvasItem *item); @@ -75,7 +75,7 @@ enum { static guint signals [LAST_SIGNAL] = {0, }; static gint -er_compare (int i1, int i2, gpointer user_data) +er_compare (gint i1, gint i2, gpointer user_data) { EReflow *reflow = user_data; return e_reflow_model_compare (reflow->model, i1, i2); @@ -92,7 +92,7 @@ e_reflow_pick_line (EReflow *reflow, double x) static int er_find_item (EReflow *reflow, GnomeCanvasItem *item) { - int i; + gint i; for (i = 0; i < reflow->count; i++) { if (reflow->items[i] == item) return i; @@ -104,8 +104,8 @@ static void e_reflow_resize_children (GnomeCanvasItem *item) { EReflow *reflow; - int i; - int count; + gint i; + gint count; reflow = E_REFLOW (item); @@ -119,7 +119,7 @@ e_reflow_resize_children (GnomeCanvasItem *item) } static inline void -e_reflow_update_selection_row (EReflow *reflow, int row) +e_reflow_update_selection_row (EReflow *reflow, gint row) { if (reflow->items[row]) { g_object_set(reflow->items[row], @@ -137,8 +137,8 @@ e_reflow_update_selection_row (EReflow *reflow, int row) static void e_reflow_update_selection (EReflow *reflow) { - int i; - int count; + gint i; + gint count; count = reflow->count; for (i = 0; i < count; i++) { @@ -153,7 +153,7 @@ selection_changed (ESelectionModel *selection, EReflow *reflow) } static void -selection_row_changed (ESelectionModel *selection, int row, EReflow *reflow) +selection_row_changed (ESelectionModel *selection, gint row, EReflow *reflow) { e_reflow_update_selection_row (reflow, row); } @@ -161,7 +161,7 @@ selection_row_changed (ESelectionModel *selection, int row, EReflow *reflow) static gboolean do_adjustment (gpointer user_data) { - int row; + gint row; GtkAdjustment *adj ; gfloat value, min_value, max_value; EReflow *reflow = user_data; @@ -195,10 +195,10 @@ do_adjustment (gpointer user_data) } static void -cursor_changed (ESelectionModel *selection, int row, int col, EReflow *reflow) +cursor_changed (ESelectionModel *selection, gint row, gint col, EReflow *reflow) { - int count = reflow->count; - int old_cursor = reflow->cursor_row; + gint count = reflow->count; + gint old_cursor = reflow->cursor_row; if (old_cursor < count && old_cursor >= 0) { if (reflow->items[old_cursor]) { @@ -233,12 +233,12 @@ cursor_changed (ESelectionModel *selection, int row, int col, EReflow *reflow) static void incarnate (EReflow *reflow) { - int column_width; - int first_column; - int last_column; - int first_cell; - int last_cell; - int i; + gint column_width; + gint first_column; + gint last_column; + gint first_cell; + gint last_cell; + gint i; GtkAdjustment *adjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (reflow)->canvas)); column_width = reflow->column_width; @@ -261,7 +261,7 @@ incarnate (EReflow *reflow) last_cell = reflow->count; for (i = first_cell; i < last_cell; i++) { - int unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); + gint unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); if (reflow->items[unsorted] == NULL) { if (reflow->model) { reflow->items[unsorted] = e_reflow_model_incarnate (reflow->model, unsorted, GNOME_CANVAS_GROUP (reflow)); @@ -295,10 +295,10 @@ static void reflow_columns (EReflow *reflow) { GSList *list; - int count; - int start; - int i; - int column_count, column_start; + gint count; + gint start; + gint i; + gint column_count, column_start; double running_height; if (reflow->reflow_from_column <= 1) { @@ -321,7 +321,7 @@ reflow_columns (EReflow *reflow) count = reflow->count - start; for (i = start; i < count; i++) { - int unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); + gint unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); if (i != 0 && running_height + reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH > reflow->height) { list = g_slist_prepend (list, GINT_TO_POINTER(i)); column_count ++; @@ -350,7 +350,7 @@ reflow_columns (EReflow *reflow) } static void -item_changed (EReflowModel *model, int i, EReflow *reflow) +item_changed (EReflowModel *model, gint i, EReflow *reflow) { if (i < 0 || i >= reflow->count) return; @@ -365,17 +365,17 @@ item_changed (EReflowModel *model, int i, EReflow *reflow) } static void -item_removed (EReflowModel *model, int i, EReflow *reflow) +item_removed (EReflowModel *model, gint i, EReflow *reflow) { - int c; - int sorted; + gint c; + gint sorted; if (i < 0 || i >= reflow->count) return; sorted = e_sorter_model_to_sorted (E_SORTER (reflow->sorter), i); for (c = reflow->column_count - 1; c >= 0; c--) { - int start_of_column = reflow->columns[c]; + gint start_of_column = reflow->columns[c]; if (start_of_column <= sorted) { if (reflow->reflow_from_column == -1 @@ -407,9 +407,9 @@ item_removed (EReflowModel *model, int i, EReflow *reflow) } static void -items_inserted (EReflowModel *model, int position, int count, EReflow *reflow) +items_inserted (EReflowModel *model, gint position, gint count, EReflow *reflow) { - int i, oldcount; + gint i, oldcount; if (position < 0 || position > reflow->count) return; @@ -438,11 +438,11 @@ items_inserted (EReflowModel *model, int position, int count, EReflow *reflow) e_sorter_array_set_count (reflow->sorter, reflow->count); for (i = position; i < position + count; i ++) { - int sorted = e_sorter_model_to_sorted (E_SORTER (reflow->sorter), i); - int c; + gint sorted = e_sorter_model_to_sorted (E_SORTER (reflow->sorter), i); + gint c; for (c = reflow->column_count - 1; c >= 0; c--) { - int start_of_column = reflow->columns[c]; + gint start_of_column = reflow->columns[c]; if (start_of_column <= sorted) { if (reflow->reflow_from_column == -1 @@ -462,9 +462,9 @@ items_inserted (EReflowModel *model, int position, int count, EReflow *reflow) static void model_changed (EReflowModel *model, EReflow *reflow) { - int i; - int count; - int oldcount; + gint i; + gint count; + gint oldcount; count = reflow->count; oldcount = count; @@ -829,8 +829,8 @@ e_reflow_realize (GnomeCanvasItem *item) { EReflow *reflow; GtkAdjustment *adjustment; - int count; - int i; + gint count; + gint i; reflow = E_REFLOW (item); @@ -897,7 +897,7 @@ static gboolean e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) { EReflow *reflow; - int return_val = FALSE; + gint return_val = FALSE; reflow = E_REFLOW (item); @@ -910,11 +910,11 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) if (event->key.keyval == GDK_Tab || event->key.keyval == GDK_KP_Tab || event->key.keyval == GDK_ISO_Left_Tab) { - int i; - int count; + gint i; + gint count; count = reflow->count; for (i = 0; i < count; i++) { - int unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); + gint unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); GnomeCanvasItem *item = reflow->items[unsorted]; EFocus has_focus; if (item) { @@ -1104,12 +1104,12 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) } static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, int width, int height) + gint x, gint y, gint width, gint height) { - int x_rect, y_rect, width_rect, height_rect; + gint x_rect, y_rect, width_rect, height_rect; gdouble running_width; EReflow *reflow = E_REFLOW(item); - int i; + gint i; double column_width; if (GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->draw) @@ -1144,7 +1144,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; } if (reflow->column_drag) { - int start_line = e_reflow_pick_line(reflow, + gint start_line = e_reflow_pick_line(reflow, gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value); i = x - start_line * (column_width + E_REFLOW_FULL_GUTTER); running_width = start_line * (column_width + E_REFLOW_FULL_GUTTER); @@ -1216,11 +1216,11 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin gnome_canvas_request_redraw(item->canvas, x0, y0, x1, y1); reflow->need_height_update = FALSE; } else if (reflow->need_column_resize) { - int x_rect, y_rect, width_rect, height_rect; - int start_line = e_reflow_pick_line(reflow, + gint x_rect, y_rect, width_rect, height_rect; + gint start_line = e_reflow_pick_line(reflow, gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value); gdouble running_width; - int i; + gint i; double column_width; if ( reflow->previous_temp_column_width != -1 ) { @@ -1262,7 +1262,7 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin static double e_reflow_point (GnomeCanvasItem *item, - double x, double y, int cx, int cy, + double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item) { double distance = 1; @@ -1292,14 +1292,14 @@ e_reflow_point (GnomeCanvasItem *item, } static void -e_reflow_reflow( GnomeCanvasItem *item, int flags ) +e_reflow_reflow( GnomeCanvasItem *item, gint flags ) { EReflow *reflow = E_REFLOW(item); gdouble old_width; gdouble running_width; gdouble running_height; - int next_column; - int i; + gint next_column; + gint i; if (! (GTK_OBJECT_FLAGS (reflow) & GNOME_CANVAS_ITEM_REALIZED)) return; @@ -1316,7 +1316,7 @@ e_reflow_reflow( GnomeCanvasItem *item, int flags ) next_column = 1; for (i = 0; i < reflow->count; i++) { - int unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); + gint unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i); if (next_column < reflow->column_count && i == reflow->columns[next_column]) { running_height = E_REFLOW_BORDER_WIDTH; running_width += reflow->column_width + E_REFLOW_FULL_GUTTER; @@ -1340,8 +1340,8 @@ e_reflow_reflow( GnomeCanvasItem *item, int flags ) static int e_reflow_selection_event_real (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event) { - int row; - int return_val = TRUE; + gint row; + gint return_val = TRUE; switch (event->type) { case GDK_BUTTON_PRESS: switch (event->button.button) { diff --git a/widgets/misc/e-reflow.h b/widgets/misc/e-reflow.h index 69f34d0fd9..69527bdf05 100644 --- a/widgets/misc/e-reflow.h +++ b/widgets/misc/e-reflow.h @@ -79,12 +79,12 @@ struct _EReflow guint adjustment_value_changed_id; guint set_scroll_adjustments_id; - int *heights; + gint *heights; GnomeCanvasItem **items; - int count; - int allocated_count; + gint count; + gint allocated_count; - int *columns; + gint *columns; gint column_count; /* Number of columnns */ GnomeCanvasItem *empty_text; @@ -96,8 +96,8 @@ struct _EReflow double column_width; - int incarnate_idle_id; - int do_adjustment_idle_id; + gint incarnate_idle_id; + gint do_adjustment_idle_id; /* These are all for when the column is being dragged. */ gdouble start_x; @@ -105,9 +105,9 @@ struct _EReflow double temp_column_width; double previous_temp_column_width; - int cursor_row; + gint cursor_row; - int reflow_from_column; + gint reflow_from_column; guint column_drag : 1; @@ -127,7 +127,7 @@ struct _EReflowClass { GnomeCanvasGroupClass parent_class; - int (*selection_event) (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event); + gint (*selection_event) (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event); void (*column_width_changed) (EReflow *reflow, double width); }; diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c index 2bbbc91a00..c6b26412f1 100644 --- a/widgets/misc/e-search-bar.c +++ b/widgets/misc/e-search-bar.c @@ -66,7 +66,7 @@ enum { /* Forward decls. */ -static int find_id (GtkWidget *menu, int idin, const char *type, GtkWidget **widget); +static gint find_id (GtkWidget *menu, gint idin, const gchar *type, GtkWidget **widget); static void emit_search_activated (ESearchBar *esb); static void emit_query_changed (ESearchBar *esb); @@ -105,8 +105,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); } @@ -178,7 +178,7 @@ emit_search_activated(ESearchBar *esb) } static void -emit_menu_activated (ESearchBar *esb, int item) +emit_menu_activated (ESearchBar *esb, gint item) { g_signal_emit (esb, esb_signals [MENU_ACTIVATED], 0, @@ -190,12 +190,12 @@ emit_menu_activated (ESearchBar *esb, int item) static void search_now_verb_cb (BonoboUIComponent *ui_component, - void *data, - const char *verb_name) + gpointer data, + const gchar *verb_name) { ESearchBar *esb; GtkStyle *style = gtk_widget_get_default_style (); - char *text; + gchar *text; esb = E_SEARCH_BAR (data); text = e_search_bar_get_text (esb); @@ -218,8 +218,8 @@ search_now_verb_cb (BonoboUIComponent *ui_component, static void clear_verb_cb (BonoboUIComponent *ui_component, - void *data, - const char *verb_name) + gpointer data, + const gchar *verb_name) { ESearchBar *esb; esb = E_SEARCH_BAR (data); @@ -258,12 +258,12 @@ setup_standard_verbs (ESearchBar *search_bar) static void search_verb_cb (BonoboUIComponent *ui_component, - void *data, - const char *verb_name) + gpointer data, + const gchar *verb_name) { ESearchBar *esb; - const char *p; - int id; + const gchar *p; + gint id; esb = E_SEARCH_BAR (data); @@ -365,7 +365,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) { @@ -389,7 +389,7 @@ static void entry_changed_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 *entry_style, *default_style; entry_style = gtk_widget_get_style (esb->entry); @@ -461,8 +461,8 @@ static void option_activated_cb (GtkWidget *widget, ESearchBar *esb) { - int id; - const char *text; + gint id; + const gchar *text; id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "EsbItemId")); @@ -529,7 +529,7 @@ entry_key_press_cb (GtkWidget *widget, static void scopeoption_changed_cb (GtkWidget *option_menu, ESearchBar *search_bar) { - char *text = NULL; + gchar *text = NULL; text = e_search_bar_get_text (search_bar); if (!(text && *text)) @@ -565,13 +565,13 @@ put_in_spacer_widget (GtkWidget *widget) static void append_xml_menu_item (GString *xml, - const char *name, - const char *label, - const char *stock, - const char *verb, - const char *accelerator) + const gchar *name, + const gchar *label, + const gchar *stock, + const gchar *verb, + const gchar *accelerator) { - char *encoded_label; + gchar *encoded_label; encoded_label = bonobo_ui_util_encode_str (label); g_string_append_printf (xml, "<menuitem name=\"%s\" verb=\"%s\" label=\"%s\"", @@ -600,8 +600,8 @@ setup_bonobo_menus (ESearchBar *esb) { GString *xml; GSList *p; - char *verb_name; - char *encoded_title; + gchar *verb_name; + gchar *encoded_title; xml = g_string_new (""); @@ -653,7 +653,7 @@ static void set_menu (ESearchBar *esb, ESearchBarItem *items) { - int i; + gint i; free_menu_items (esb); @@ -678,7 +678,7 @@ set_menu (ESearchBar *esb, /* /\* 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; *\/ */ @@ -695,7 +695,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); @@ -709,7 +709,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: @@ -749,10 +749,10 @@ set_option (ESearchBar *esb, ESearchBarItem *items) } static int -find_id (GtkWidget *menu, int idin, const char *type, GtkWidget **widget) +find_id (GtkWidget *menu, gint idin, const gchar *type, GtkWidget **widget) { GList *l = GTK_MENU_SHELL (menu)->children; - int row = -1, i = 0, id; + gint row = -1, i = 0, id; if (widget) *widget = NULL; @@ -1111,7 +1111,7 @@ e_search_bar_set_option (ESearchBar *search_bar, ESearchBarItem *option_items) } void -e_search_bar_set_viewoption_menufunc (ESearchBar *search_bar, ESearchBarMenuFunc *menu_gen_func, void *data) +e_search_bar_set_viewoption_menufunc (ESearchBar *search_bar, ESearchBarMenuFunc *menu_gen_func, gpointer data) { g_signal_connect (search_bar->viewoption, "button_press_event", G_CALLBACK (menu_gen_func), data); } @@ -1161,7 +1161,7 @@ e_search_bar_get_selected_viewitem (ESearchBar *search_bar) * Sets the items for the secondary option menu of a search bar. **/ void -e_search_bar_set_viewoption (ESearchBar *search_bar, int option_id, ESearchBarItem *subitems) +e_search_bar_set_viewoption (ESearchBar *search_bar, gint option_id, ESearchBarItem *subitems) { GtkWidget *menu; GtkWidget *menu_item; @@ -1180,7 +1180,7 @@ e_search_bar_set_viewoption (ESearchBar *search_bar, int option_id, ESearchBarIt for (i = 0; subitems[i].id != -1; ++i) { if (subitems[i].text) { - char *str = NULL; + gchar *str = NULL; str = e_str_without_underscores (subitems[i].text); menu_item = gtk_menu_item_new_with_label (str); g_free (str); @@ -1229,7 +1229,7 @@ e_search_bar_set_scopeoption (ESearchBar *search_bar, ESearchBarItem *scopeitems /* Generate items */ for (i = 0; scopeitems[i].id != -1; ++i) { if (scopeitems[i].text) { - char *str; + gchar *str; str = e_str_without_underscores (_(scopeitems[i].text)); menu_item = gtk_menu_item_new_with_label (str); g_object_set_data_full (G_OBJECT (menu_item), "string",str, g_free); @@ -1329,10 +1329,10 @@ e_search_bar_set_ui_component (ESearchBar *search_bar, } void -e_search_bar_set_menu_sensitive (ESearchBar *search_bar, int id, gboolean state) +e_search_bar_set_menu_sensitive (ESearchBar *search_bar, gint id, gboolean state) { - char *verb_name; - char *path; + gchar *verb_name; + gchar *path; if (search_bar->lite) return; @@ -1373,9 +1373,9 @@ e_search_bar_get_type (void) } void -e_search_bar_set_viewitem_id (ESearchBar *search_bar, int id) +e_search_bar_set_viewitem_id (ESearchBar *search_bar, gint id) { - int row; + gint row; g_return_if_fail (E_IS_SEARCH_BAR (search_bar)); if (!search_bar->viewoption_menu) @@ -1398,9 +1398,9 @@ e_search_bar_set_viewitem_id (ESearchBar *search_bar, int id) * Sets the active item in the options menu of a search bar. **/ void -e_search_bar_set_item_id (ESearchBar *search_bar, int id) +e_search_bar_set_item_id (ESearchBar *search_bar, gint id) { - int row; + gint row; g_return_if_fail (E_IS_SEARCH_BAR (search_bar)); @@ -1423,9 +1423,9 @@ e_search_bar_set_item_id (ESearchBar *search_bar, int id) } void -e_search_bar_set_item_menu (ESearchBar *search_bar, int id) +e_search_bar_set_item_menu (ESearchBar *search_bar, gint id) { - int row; + gint row; GtkWidget *item; g_return_if_fail (E_IS_SEARCH_BAR (search_bar)); @@ -1446,9 +1446,9 @@ e_search_bar_set_item_menu (ESearchBar *search_bar, int id) * Sets the active item in the options menu of a search bar. **/ void -e_search_bar_set_search_scope (ESearchBar *search_bar, int id) +e_search_bar_set_search_scope (ESearchBar *search_bar, gint id) { - int row; + gint row; g_return_if_fail (E_IS_SEARCH_BAR (search_bar)); @@ -1472,7 +1472,7 @@ e_search_bar_set_search_scope (ESearchBar *search_bar, int id) * * Return value: Identifier of the selected item in the options menu. **/ -int +gint e_search_bar_get_item_id (ESearchBar *search_bar) { GtkWidget *menu_item; @@ -1496,7 +1496,7 @@ e_search_bar_get_item_id (ESearchBar *search_bar) * * Return value: Identifier of the selected item in the options menu. **/ -int +gint e_search_bar_get_search_scope (ESearchBar *search_bar) { GtkWidget *menu_item; @@ -1523,7 +1523,7 @@ e_search_bar_get_search_scope (ESearchBar *search_bar) * If the search bar currently contains an entry rather than a a viewoption menu, * a value less than zero is returned. **/ -int +gint e_search_bar_get_viewitem_id (ESearchBar *search_bar) { GtkWidget *menu_item; @@ -1553,9 +1553,9 @@ e_search_bar_get_viewitem_id (ESearchBar *search_bar) * to an item that has subitems. **/ void -e_search_bar_set_ids (ESearchBar *search_bar, int item_id, int subitem_id) +e_search_bar_set_ids (ESearchBar *search_bar, gint item_id, gint subitem_id) { - int item_row; + gint item_row; GtkWidget *item_widget; g_return_if_fail (search_bar != NULL); @@ -1578,7 +1578,7 @@ e_search_bar_set_ids (ESearchBar *search_bar, int item_id, int subitem_id) * Sets the text string inside the entry line of a search bar. **/ void -e_search_bar_set_text (ESearchBar *search_bar, const char *text) +e_search_bar_set_text (ESearchBar *search_bar, const gchar *text) { g_return_if_fail (E_IS_SEARCH_BAR (search_bar)); gtk_entry_set_text (GTK_ENTRY (search_bar->entry), text); @@ -1594,7 +1594,7 @@ e_search_bar_set_text (ESearchBar *search_bar, const char *text) * This must be freed using g_free(). If a suboption menu is active instead * of an entry, NULL is returned. **/ -char * +gchar * e_search_bar_get_text (ESearchBar *search_bar) { GtkStyle *entry_style, *default_style; @@ -1611,11 +1611,11 @@ e_search_bar_get_text (ESearchBar *search_bar) return g_strdup (gtk_entry_get_text (GTK_ENTRY (search_bar->entry))); } -void e_search_bar_scope_enable (ESearchBar *esb, int did, gboolean state) +void e_search_bar_scope_enable (ESearchBar *esb, gint did, gboolean state) { GtkWidget *widget=NULL; GList *l ; - int id; + gint id; gpointer *pointer; g_return_if_fail (esb != NULL); diff --git a/widgets/misc/e-search-bar.h b/widgets/misc/e-search-bar.h index fd91068ebd..336c27608d 100644 --- a/widgets/misc/e-search-bar.h +++ b/widgets/misc/e-search-bar.h @@ -35,8 +35,8 @@ G_BEGIN_DECLS * * name type read/write description * --------------------------------------------------------------------------------- - * item_id int RW Which option item is currently selected. - * subitem_id int RW Which option subitem is currently selected. + * item_id gint RW Which option item is currently selected. + * subitem_id gint RW Which option subitem is currently selected. * text string RW Text in the entry box. */ @@ -99,10 +99,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; @@ -119,7 +119,7 @@ struct _ESearchBarClass void (*search_activated) (ESearchBar *search); void (*search_cleared) (ESearchBar *search); void (*query_changed) (ESearchBar *search); - void (*menu_activated) (ESearchBar *search, int item); + void (*menu_activated) (ESearchBar *search, gint item); }; enum { @@ -149,45 +149,45 @@ 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); -int e_search_bar_get_viewitem_id (ESearchBar *search_bar); +gint e_search_bar_get_viewitem_id (ESearchBar *search_bar); -void e_search_bar_set_viewitem_id (ESearchBar *search_bar, int id); +void e_search_bar_set_viewitem_id (ESearchBar *search_bar, gint id); void e_search_bar_set_ids (ESearchBar *search_bar, - int item_id, - int subitem_id); + gint item_id, + gint subitem_id); void e_search_bar_set_scopeoption (ESearchBar *search_bar, ESearchBarItem *scopeitems); void e_search_bar_set_scopeoption_menu (ESearchBar *search_bar, GtkMenu *menu); -void e_search_bar_set_search_scope (ESearchBar *search_bar, int id); +void e_search_bar_set_search_scope (ESearchBar *search_bar, gint id); void e_search_bar_set_viewoption_menu (ESearchBar *search_bar, GtkWidget *menu); -void e_search_bar_set_viewoption_menufunc (ESearchBar *search_bar, ESearchBarMenuFunc *menu_gen_func, void *data); +void e_search_bar_set_viewoption_menufunc (ESearchBar *search_bar, ESearchBarMenuFunc *menu_gen_func, gpointer data); GtkWidget *e_search_bar_get_selected_viewitem (ESearchBar *search_bar); -int e_search_bar_get_search_scope (ESearchBar *search_bar); +gint e_search_bar_get_search_scope (ESearchBar *search_bar); void e_search_bar_set_text (ESearchBar *search_bar, - const char *text); -char *e_search_bar_get_text (ESearchBar *search_bar); -void e_search_bar_scope_enable (ESearchBar *search_bar, int did, gboolean state); + const gchar *text); +gchar *e_search_bar_get_text (ESearchBar *search_bar); +void e_search_bar_scope_enable (ESearchBar *search_bar, gint did, gboolean state); 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-task-bar.c b/widgets/misc/e-task-bar.c index c7a715decd..e0bdc762a3 100644 --- a/widgets/misc/e-task-bar.c +++ b/widgets/misc/e-task-bar.c @@ -51,8 +51,8 @@ reduce_displayed_activities_per_component (ETaskBar *task_bar) for (p = box->children; p != NULL; p = p->next) { GtkBoxChild *child; - const char *component_id; - void *hash_item; + const gchar *component_id; + gpointer hash_item; child = (GtkBoxChild *) p->data; component_id = e_task_widget_get_component_id (E_TASK_WIDGET (child->widget)); @@ -61,9 +61,9 @@ reduce_displayed_activities_per_component (ETaskBar *task_bar) if (hash_item == NULL) { gtk_widget_show (child->widget); - g_hash_table_insert (component_ids_hash, (void *) component_id, GINT_TO_POINTER (1)); + g_hash_table_insert (component_ids_hash, (gpointer) component_id, GINT_TO_POINTER (1)); } else { - int num_items; + gint num_items; num_items = GPOINTER_TO_INT (hash_item); g_return_if_fail (num_items <= MAX_ACTIVITIES_PER_COMPONENT); @@ -73,7 +73,7 @@ reduce_displayed_activities_per_component (ETaskBar *task_bar) } else { num_items ++; gtk_widget_show (child->widget); - g_hash_table_insert (component_ids_hash, (void *) component_id, GINT_TO_POINTER (num_items)); + g_hash_table_insert (component_ids_hash, (gpointer) component_id, GINT_TO_POINTER (num_items)); } } } @@ -157,7 +157,7 @@ e_task_bar_new (void) void e_task_bar_set_message (ETaskBar *task_bar, - const char *message) + const gchar *message) { if (message) { gtk_label_set_text ( @@ -242,7 +242,7 @@ e_task_bar_remove_task_from_id (ETaskBar *task_bar, void e_task_bar_remove_task (ETaskBar *task_bar, - int n) + gint n) { ETaskWidget *task_widget; @@ -288,7 +288,7 @@ e_task_bar_get_task_widget_from_id (ETaskBar *task_bar, ETaskWidget * e_task_bar_get_task_widget (ETaskBar *task_bar, - int n) + gint n) { GtkBoxChild *child_info; diff --git a/widgets/misc/e-task-bar.h b/widgets/misc/e-task-bar.h index d36898ebb8..33d0e2312f 100644 --- a/widgets/misc/e-task-bar.h +++ b/widgets/misc/e-task-bar.h @@ -59,20 +59,20 @@ void e_task_bar_construct (ETaskBar *task_bar); GtkWidget *e_task_bar_new (void); void e_task_bar_set_message (ETaskBar *task_bar, - const char *message); + const gchar *message); void e_task_bar_unset_message (ETaskBar *task_bar); void e_task_bar_prepend_task (ETaskBar *task_bar, ETaskWidget *task_widget); void e_task_bar_remove_task (ETaskBar *task_bar, - int n); + gint n); ETaskWidget * e_task_bar_get_task_widget_from_id (ETaskBar *task_bar, guint id); void e_task_bar_remove_task_from_id (ETaskBar *task_bar, guint id); ETaskWidget *e_task_bar_get_task_widget (ETaskBar *task_bar, - int n); + gint n); #ifdef __cplusplus } diff --git a/widgets/misc/e-task-widget.c b/widgets/misc/e-task-widget.c index 2569a46557..de5b782f85 100644 --- a/widgets/misc/e-task-widget.c +++ b/widgets/misc/e-task-widget.c @@ -33,7 +33,7 @@ #define SPACING 2 struct _ETaskWidgetPrivate { - char *component_id; + gchar *component_id; GtkWidget *label; GtkWidget *box; @@ -115,8 +115,8 @@ prepare_popup (ETaskWidget *widget, GdkEventButton *event) void e_task_widget_construct (ETaskWidget *task_widget, - const char *component_id, - const char *information, + const gchar *component_id, + const gchar *information, void (*cancel_func) (gpointer data), gpointer data) { @@ -180,8 +180,8 @@ e_task_widget_construct (ETaskWidget *task_widget, } GtkWidget * -e_task_widget_new_with_cancel (const char *component_id, - const char *information, +e_task_widget_new_with_cancel (const gchar *component_id, + const gchar *information, void (*cancel_func) (gpointer data), gpointer data) { @@ -196,8 +196,8 @@ e_task_widget_new_with_cancel (const char *component_id, } GtkWidget * -e_task_widget_new (const char *component_id, - const char *information) +e_task_widget_new (const gchar *component_id, + const gchar *information) { ETaskWidget *task_widget; @@ -211,7 +211,7 @@ e_task_widget_new (const char *component_id, GtkWidget * e_task_widget_update_image (ETaskWidget *task_widget, - const char *stock, const char *text) + const gchar *stock, const gchar *text) { GtkWidget *image, *tool; GdkPixbuf *pixbuf; @@ -235,11 +235,11 @@ e_task_widget_update_image (ETaskWidget *task_widget, void e_task_widget_update (ETaskWidget *task_widget, - const char *information, + const gchar *information, double completion) { ETaskWidgetPrivate *priv; - char *text; + gchar *text; g_return_if_fail (task_widget != NULL); g_return_if_fail (E_IS_TASK_WIDGET (task_widget)); @@ -251,7 +251,7 @@ e_task_widget_update (ETaskWidget *task_widget, /* For Translator only: %s is status message that is displayed (eg "moving items", "updating objects") */ text = g_strdup_printf (_("%s (...)"), information); } else { - int percent_complete; + gint percent_complete; percent_complete = (int) (completion * 100.0 + .5); /* For Translator only: %s is status message that is displayed (eg "moving items", "updating objects"); %d is a number between 0 and 100, describing the percentage of operation complete */ @@ -280,7 +280,7 @@ e_task_wiget_unalert (ETaskWidget *task_widget) } -const char * +const gchar * e_task_widget_get_component_id (ETaskWidget *task_widget) { g_return_val_if_fail (task_widget != NULL, NULL); diff --git a/widgets/misc/e-task-widget.h b/widgets/misc/e-task-widget.h index 4770b9d108..c023d45030 100644 --- a/widgets/misc/e-task-widget.h +++ b/widgets/misc/e-task-widget.h @@ -55,25 +55,25 @@ struct _ETaskWidgetClass { GType e_task_widget_get_type (void); void e_task_widget_construct (ETaskWidget *task_widget, - const char *component_id, - const char *information, + const gchar *component_id, + const gchar *information, void (*cancel_func) (gpointer data), gpointer data); -GtkWidget * e_task_widget_new (const char *component_id, - const char *information); -GtkWidget * e_task_widget_new_with_cancel (const char *component_id, - const char *information, +GtkWidget * e_task_widget_new (const gchar *component_id, + const gchar *information); +GtkWidget * e_task_widget_new_with_cancel (const gchar *component_id, + const gchar *information, void (*cancel_func) (gpointer data), gpointer data); void e_task_widget_update (ETaskWidget *task_widget, - const char *information, + const gchar *information, double completion); GtkWidget * e_task_widget_update_image (ETaskWidget *task_widget, - const char *stock, - const char *text); + const gchar *stock, + const gchar *text); void e_task_wiget_alert (ETaskWidget *task_widget); void e_task_wiget_unalert (ETaskWidget *task_widget); -const char * e_task_widget_get_component_id (ETaskWidget *task_widget); +const gchar * e_task_widget_get_component_id (ETaskWidget *task_widget); #ifdef __cplusplus } diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c index 2769001120..f1fed4dfab 100644 --- a/widgets/misc/e-unicode.c +++ b/widgets/misc/e-unicode.c @@ -97,7 +97,7 @@ e_utf8_strstrcasedecomp (const gchar *haystack, const gchar *needle) gint sc; sc = e_stripped_char (unival); if (sc) { - /* We have valid stripped char */ + /* We have valid stripped gchar */ if (sc == nuni[0]) { const gchar *q = p; gint npos = 1; @@ -145,7 +145,7 @@ e_utf8_strstrcase (const gchar *haystack, const gchar *needle) for (p = e_unicode_get_utf8 (o, &unival); p && unival; p = e_unicode_get_utf8 (p, &unival)) { gint sc; sc = g_unichar_tolower (unival); - /* We have valid stripped char */ + /* We have valid stripped gchar */ if (sc == nuni[0]) { const gchar *q = p; gint npos = 1; @@ -237,8 +237,8 @@ e_utf8_from_gtk_event_key (GtkWidget *widget, guint keyval, const gchar *string) gchar * e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) { - char *new, *ob; - const char *ib; + gchar *new, *ob; + const gchar *ib; size_t ibl, obl; if (!string) return NULL; @@ -246,8 +246,8 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) if (ic == (iconv_t) -1) { gint i; /* iso-8859-1 */ - ib = (char *) string; - new = ob = (char *)g_new (unsigned char, bytes * 2 + 1); + ib = (gchar *) string; + new = ob = (gchar *)g_new (unsigned char, bytes * 2 + 1); for (i = 0; i < (bytes); i ++) { ob += e_unichar_to_utf8 (ib[i], ob); } @@ -295,8 +295,8 @@ e_utf8_from_iconv_string (iconv_t ic, const gchar *string) gchar * e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) { - char *new, *ob; - const char *ib; + gchar *new, *ob; + const gchar *ib; size_t ibl, obl; if (!string) return NULL; @@ -306,7 +306,7 @@ e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) const gchar *u; gunichar uc; - new = (char *)g_new (unsigned char, bytes * 4 + 1); + new = (gchar *)g_new (unsigned char, bytes * 4 + 1); u = string; len = 0; @@ -362,7 +362,7 @@ gchar * e_utf8_from_charset_string_sized (const gchar *charset, const gchar *string, gint bytes) { iconv_t ic; - char *ret; + gchar *ret; if (!string) return NULL; @@ -384,7 +384,7 @@ gchar * e_utf8_to_charset_string_sized (const gchar *charset, const gchar *string, gint bytes) { iconv_t ic; - char *ret; + gchar *ret; if (!string) return NULL; @@ -406,7 +406,7 @@ gchar * e_utf8_from_locale_string_sized (const gchar *string, gint bytes) { iconv_t ic; - char *ret; + gchar *ret; if (!string) return NULL; @@ -428,7 +428,7 @@ gchar * e_utf8_to_locale_string_sized (const gchar *string, gint bytes) { iconv_t ic; - char *ret; + gchar *ret; if (!string) return NULL; @@ -449,7 +449,7 @@ e_utf8_to_locale_string (const gchar *string) gboolean e_utf8_is_ascii (const gchar *string) { - char c; + gchar c; g_return_val_if_fail (string != NULL, FALSE); @@ -488,7 +488,7 @@ e_utf8_gtk_editable_insert_text (GtkEditable *editable, const gchar *text, gint void e_utf8_gtk_editable_set_text (GtkEditable *editable, const gchar *text) { - int position; + gint position; gtk_editable_delete_text(editable, 0, -1); gtk_editable_insert_text (editable, text, strlen (text), &position); @@ -512,7 +512,7 @@ e_utf8_xml1_decode (const gchar *text) { const guchar *c; gchar *u, *d; - int len, s; + gint len, s; g_return_val_if_fail (text != NULL, NULL); @@ -533,8 +533,8 @@ e_utf8_xml1_decode (const gchar *text) isxdigit (c[s + 6]) && (c[s + 7] == '\\')) { /* Valid \U+XXXX\ sequence */ - int unival; - unival = strtol ((char *)(c + s + 3), NULL, 16); + gint unival; + unival = strtol ((gchar *)(c + s + 3), NULL, 16); d += e_unichar_to_utf8 (unival, d); s += 8; } else if (c[s] > 127) { @@ -555,8 +555,8 @@ gchar * e_utf8_xml1_encode (const gchar *text) { gchar *u, *d, *c; - unsigned int unival; - int len; + guint unival; + gint len; g_return_val_if_fail (text != NULL, NULL); @@ -568,7 +568,7 @@ e_utf8_xml1_encode (const gchar *text) len += 1; } } - d = c = (char *)g_new (guchar, len + 1); + d = c = (gchar *)g_new (guchar, len + 1); for (u = e_unicode_get_utf8 (text, &unival); u && unival; u = e_unicode_get_utf8 (u, &unival)) { if ((unival >= 0x80) || (unival == '\\')) { @@ -602,8 +602,8 @@ gint e_unichar_to_utf8 (gint c, gchar *outbuf) { size_t len = 0; - int first; - int i; + gint first; + gint i; if (c < 0x80) { @@ -1953,14 +1953,14 @@ e_canonical_decomposition (gunichar ch, gunichar * buf) if (ch <= 0xffff) { - int start = 0; - int end = sizeof (e_decomp_table) / sizeof (e_decomp_table[0]); + gint start = 0; + gint end = sizeof (e_decomp_table) / sizeof (e_decomp_table[0]); while (start != end) { - int half = (start + end) / 2; + gint half = (start + end) / 2; if (ch == e_decomp_table[half].ch) { /* Found it. */ - int i; + gint i; /* We store as a double-nul terminated string. */ for (len = 0; (e_decomp_table[half].expansion[len] || e_decomp_table[half].expansion[len + 1]); len += 2) ; @@ -2035,15 +2035,15 @@ e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent, const xmlC prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - ret_val = g_strdup ((char *)prop); + ret_val = g_strdup ((gchar *)prop); xmlFree (prop); return ret_val; } combined_name = g_strdup_printf("_%s", prop_name); - prop = xmlGetProp ((xmlNode *) parent, (unsigned char *)combined_name); + prop = xmlGetProp ((xmlNode *) parent, (guchar *)combined_name); if (prop != NULL) { - ret_val = g_strdup (gettext ((char *)prop)); + ret_val = g_strdup (gettext ((gchar *)prop)); xmlFree (prop); } g_free(combined_name); 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 6852010b24..68a9cc12f7 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-dropdown-button.c b/widgets/misc/test-dropdown-button.c index b76174fb0e..7320fb9bac 100644 --- a/widgets/misc/test-dropdown-button.c +++ b/widgets/misc/test-dropdown-button.c @@ -39,9 +39,9 @@ static void item_activated (GtkWidget *widget, - void *data) + gpointer data) { - printf ("%s activated.\n", (char *) data); + printf ("%s activated.\n", (gchar *) data); } static GnomeUIInfo ui_info[] = { @@ -69,8 +69,8 @@ static GnomeUIInfo ui_info[] = { }; -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { GtkWidget *window; GtkWidget *menu; diff --git a/widgets/misc/test-error.c b/widgets/misc/test-error.c index e67e6985f5..a7d584bf6c 100644 --- a/widgets/misc/test-error.c +++ b/widgets/misc/test-error.c @@ -27,8 +27,8 @@ #include "e-error.h" -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { gtk_init (&argc, &argv); diff --git a/widgets/misc/test-info-label.c b/widgets/misc/test-info-label.c index 31298ed7c1..0f292a0487 100644 --- a/widgets/misc/test-info-label.c +++ b/widgets/misc/test-info-label.c @@ -36,8 +36,8 @@ delete_event_cb (GtkWidget *widget, gtk_main_quit (); } -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { GtkWidget *window; GtkWidget *info_label; diff --git a/widgets/misc/test-multi-config-dialog.c b/widgets/misc/test-multi-config-dialog.c index 34a7624a39..b8a43995bc 100644 --- a/widgets/misc/test-multi-config-dialog.c +++ b/widgets/misc/test-multi-config-dialog.c @@ -31,14 +31,14 @@ static void add_pages (EMultiConfigDialog *multi_config_dialog) { - int i; + gint i; for (i = 0; i < NUM_PAGES; i ++) { GtkWidget *widget; GtkWidget *page; - char *string; - char *title; - char *description; + gchar *string; + gchar *title; + gchar *description; string = g_strdup_printf ("This is page %d", i); description = g_strdup_printf ("Description of page %d", i); @@ -62,7 +62,7 @@ add_pages (EMultiConfigDialog *multi_config_dialog) static int delete_event_callback (GtkWidget *widget, GdkEventAny *event, - void *data) + gpointer data) { gtk_main_quit (); @@ -70,8 +70,8 @@ delete_event_callback (GtkWidget *widget, } -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { GtkWidget *dialog; |