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 | |
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.
799 files changed, 13634 insertions, 13634 deletions
diff --git a/a11y/addressbook/ea-addressbook-view.c b/a11y/addressbook/ea-addressbook-view.c index 6c2da221b9..75309daa14 100644 --- a/a11y/addressbook/ea-addressbook-view.c +++ b/a11y/addressbook/ea-addressbook-view.c @@ -25,8 +25,8 @@ #include <glib/gi18n.h> #include "ea-addressbook-view.h" -static G_CONST_RETURN gchar* ea_ab_view_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_ab_view_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_ab_view_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_ab_view_get_description (AtkObject *accessible); static void ea_ab_view_class_init (EABViewClass *klass); @@ -84,7 +84,7 @@ ea_ab_view_class_init (EABViewClass *klass) class->get_description = ea_ab_view_get_description; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_ab_view_get_name (AtkObject *accessible) { g_return_val_if_fail (EA_IS_AB_VIEW(accessible), NULL); @@ -94,7 +94,7 @@ ea_ab_view_get_name (AtkObject *accessible) return _("evolution address book"); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_ab_view_get_description (AtkObject *accessible) { if (accessible->description) diff --git a/a11y/addressbook/ea-minicard-view.c b/a11y/addressbook/ea-minicard-view.c index dab53e6ce5..d13975b34a 100644 --- a/a11y/addressbook/ea-minicard-view.c +++ b/a11y/addressbook/ea-minicard-view.c @@ -29,14 +29,14 @@ #include "eab-gui-util.h" #include "e-addressbook-view.h" -static const char * action_name[] = { +static const gchar * action_name[] = { N_("New Contact"), N_("New Contact List") }; -static G_CONST_RETURN gchar* ea_minicard_view_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_minicard_view_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_minicard_view_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_minicard_view_get_description (AtkObject *accessible); static void ea_minicard_view_class_init (EaMinicardViewClass *klass); @@ -58,8 +58,8 @@ static gboolean selection_interface_is_child_selected (AtkSelection *selection, static void atk_action_interface_init (AtkActionIface *iface); static gboolean atk_action_interface_do_action (AtkAction *iface, gint i); static gint atk_action_interface_get_n_action (AtkAction *iface); -static G_CONST_RETURN gchar* atk_action_interface_get_description (AtkAction *iface, gint i); -static G_CONST_RETURN gchar* atk_action_interface_get_name (AtkAction *iface, gint i); +static G_CONST_RETURN gchar * atk_action_interface_get_description (AtkAction *iface, gint i); +static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i); static gpointer parent_class = NULL; @@ -135,7 +135,7 @@ ea_minicard_view_class_init (EaMinicardViewClass *klass) class->ref_child = ea_minicard_view_ref_child; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_minicard_view_get_name (AtkObject *accessible) { EReflow *reflow; @@ -169,7 +169,7 @@ ea_minicard_view_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_minicard_view_get_description (AtkObject *accessible) { g_return_val_if_fail (EA_IS_MINICARD_VIEW(accessible), NULL); @@ -403,13 +403,13 @@ static gint atk_action_interface_get_n_action (AtkAction *iface) return G_N_ELEMENTS (action_name); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * atk_action_interface_get_description (AtkAction *iface, gint i) { return atk_action_interface_get_name (iface, i); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i) { if( i >= G_N_ELEMENTS (action_name) || i < 0) diff --git a/a11y/addressbook/ea-minicard.c b/a11y/addressbook/ea-minicard.c index d77d591fcc..b1b1ebbe33 100644 --- a/a11y/addressbook/ea-minicard.c +++ b/a11y/addressbook/ea-minicard.c @@ -27,12 +27,12 @@ #include "ea-minicard-view.h" #include "e-minicard.h" -static const char * action_name[] = { +static const gchar * action_name[] = { N_("Open") }; -static G_CONST_RETURN gchar* ea_minicard_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_minicard_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_minicard_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_minicard_get_description (AtkObject *accessible); static void ea_minicard_class_init (EaMinicardClass *klass); @@ -44,8 +44,8 @@ static AtkStateSet *ea_minicard_ref_state_set (AtkObject *obj); static void atk_action_interface_init (AtkActionIface *iface); static gboolean atk_action_interface_do_action (AtkAction *iface, gint i); static gint atk_action_interface_get_n_action (AtkAction *iface); -static G_CONST_RETURN gchar* atk_action_interface_get_description (AtkAction *iface, gint i); -static G_CONST_RETURN gchar* atk_action_interface_get_name (AtkAction *iface, gint i); +static G_CONST_RETURN gchar * atk_action_interface_get_description (AtkAction *iface, gint i); +static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i); static gpointer parent_class = NULL; @@ -117,7 +117,7 @@ ea_minicard_class_init (EaMinicardClass *klass) * we access the main content of current minicard, including * header text, label(field, field name) */ -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_minicard_get_name (AtkObject *accessible) { #define BUFFERSIZE 500 @@ -159,7 +159,7 @@ ea_minicard_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_minicard_get_description (AtkObject *accessible) { if (accessible->description) @@ -256,13 +256,13 @@ static gint atk_action_interface_get_n_action (AtkAction *iface) return G_N_ELEMENTS (action_name); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * atk_action_interface_get_description (AtkAction *iface, gint i) { return atk_action_interface_get_name (iface, i); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i) { if( i >= G_N_ELEMENTS (action_name) || i < 0) diff --git a/a11y/calendar/ea-cal-view-event.c b/a11y/calendar/ea-cal-view-event.c index e0c0f8fdac..5da164323f 100644 --- a/a11y/calendar/ea-cal-view-event.c +++ b/a11y/calendar/ea-cal-view-event.c @@ -31,8 +31,8 @@ static void ea_cal_view_event_class_init (EaCalViewEventClass *klass); static void ea_cal_view_event_init (EaCalViewEvent *a11y); static void ea_cal_view_event_dispose (GObject *object); -static G_CONST_RETURN gchar* ea_cal_view_event_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_cal_view_event_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_cal_view_event_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_cal_view_event_get_description (AtkObject *accessible); static AtkObject* ea_cal_view_event_get_parent (AtkObject *accessible); static gint ea_cal_view_event_get_index_in_parent (AtkObject *accessible); static AtkStateSet *ea_cal_view_event_ref_state_set (AtkObject *accessible); @@ -46,7 +46,7 @@ static void ea_cal_view_get_extents (AtkComponent *component, static void atk_action_interface_init (AtkActionIface *iface); static gboolean ea_cal_view_event_do_action (AtkAction *action, gint i); static gint ea_cal_view_event_get_n_actions (AtkAction *action); -static G_CONST_RETURN gchar* ea_cal_view_event_action_get_name (AtkAction *action, gint i); +static G_CONST_RETURN gchar * ea_cal_view_event_action_get_name (AtkAction *action, gint i); #ifdef ACC_DEBUG @@ -240,7 +240,7 @@ ea_cal_view_event_dispose (GObject *object) G_OBJECT_CLASS(parent_class)->dispose (object); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_cal_view_event_get_name (AtkObject *accessible) { AtkGObjectAccessible *atk_gobj; @@ -251,7 +251,7 @@ ea_cal_view_event_get_name (AtkObject *accessible) const gchar *recur_string; const gchar *meeting_string; gchar *summary_string; - const char *summary; + const gchar *summary; g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), NULL); @@ -287,13 +287,13 @@ ea_cal_view_event_get_name (AtkObject *accessible) ATK_OBJECT_CLASS (parent_class)->set_name (accessible, name_string); #ifdef ACC_DEBUG printf("EvoAcc: name for event accobj=%p, is %s\n", - (void *)accessible, new_name); + (gpointer)accessible, new_name); #endif g_free (name_string); return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_cal_view_event_get_description (AtkObject *accessible) { if (accessible->description) @@ -526,7 +526,7 @@ ea_cal_view_get_extents (AtkComponent *component, #define CAL_VIEW_EVENT_ACTION_NUM 1 -static const char * action_name [CAL_VIEW_EVENT_ACTION_NUM] = { +static const gchar * action_name [CAL_VIEW_EVENT_ACTION_NUM] = { N_("Grab Focus") }; @@ -563,7 +563,7 @@ ea_cal_view_event_get_n_actions (AtkAction *action) return CAL_VIEW_EVENT_ACTION_NUM; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_cal_view_event_action_get_name (AtkAction *action, gint i) { if (i >= 0 && i < CAL_VIEW_EVENT_ACTION_NUM) diff --git a/a11y/calendar/ea-cal-view.c b/a11y/calendar/ea-cal-view.c index 7e337ac16b..952afcc791 100644 --- a/a11y/calendar/ea-cal-view.c +++ b/a11y/calendar/ea-cal-view.c @@ -45,11 +45,11 @@ static void ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data); static void atk_action_interface_init (AtkActionIface *iface); static gboolean action_interface_do_action (AtkAction *action, gint i); static gint action_interface_get_n_actions (AtkAction *action); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * action_interface_get_description(AtkAction *action, gint i); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * action_interface_get_keybinding (AtkAction *action, gint i); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * action_interface_action_get_name(AtkAction *action, gint i); static gpointer parent_class = NULL; @@ -212,7 +212,7 @@ ea_cal_view_event_changed_cb (ECalendarView *cal_view, ECalendarViewEvent *event } if (event_atk_obj) { #ifdef ACC_DEBUG - printf ("AccDebug: event=%p changed\n", (void *)event); + printf ("AccDebug: event=%p changed\n", (gpointer)event); #endif g_object_notify (G_OBJECT(event_atk_obj), "accessible-name"); g_signal_emit_by_name (event_atk_obj, "visible_data_changed"); @@ -254,7 +254,7 @@ ea_cal_view_event_added_cb (ECalendarView *cal_view, ECalendarViewEvent *event, if (index < 0) return; #ifdef ACC_DEBUG - printf ("AccDebug: event=%p added\n", (void *)event); + printf ("AccDebug: event=%p added\n", (gpointer)event); #endif g_signal_emit_by_name (atk_obj, "children_changed::add", index, event_atk_obj, NULL); @@ -295,7 +295,7 @@ ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data) #define CAL_VIEW_ACTION_NUM 5 -static const char * action_name [CAL_VIEW_ACTION_NUM] = { +static const gchar * action_name [CAL_VIEW_ACTION_NUM] = { N_("New Appointment"), N_("New All Day Event"), N_("New Meeting"), @@ -374,13 +374,13 @@ action_interface_get_n_actions (AtkAction *action) return CAL_VIEW_ACTION_NUM; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * action_interface_get_description(AtkAction *action, gint index) { return action_interface_action_get_name (action, index); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * action_interface_get_keybinding (AtkAction *action, gint index) { GtkWidget *widget; @@ -417,7 +417,7 @@ action_interface_get_keybinding (AtkAction *action, gint index) return NULL; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * action_interface_action_get_name(AtkAction *action, gint i) { if (i >= 0 && i < CAL_VIEW_ACTION_NUM) diff --git a/a11y/calendar/ea-calendar.c b/a11y/calendar/ea-calendar.c index 26e73da6da..fb8d523275 100644 --- a/a11y/calendar/ea-calendar.c +++ b/a11y/calendar/ea-calendar.c @@ -172,7 +172,7 @@ ea_calendar_focus_watcher (GSignalInvocationHint *ihint, /* focus out */ ea_event = NULL; #ifdef ACC_DEBUG - printf ("EvoAcc: focus notify on day main item %p\n", (void *)object); + printf ("EvoAcc: focus notify on day main item %p\n", (gpointer)object); #endif atk_focus_tracker_notify (ea_event); } @@ -195,7 +195,7 @@ ea_calendar_focus_watcher (GSignalInvocationHint *ihint, /* focus out */ ea_event = NULL; #ifdef ACC_DEBUG - printf ("EvoAcc: focus notify on week main item %p\n", (void *)object); + printf ("EvoAcc: focus notify on week main item %p\n", (gpointer)object); #endif atk_focus_tracker_notify (ea_event); } diff --git a/a11y/calendar/ea-day-view-cell.c b/a11y/calendar/ea-day-view-cell.c index bc303f380f..bbc92a192f 100644 --- a/a11y/calendar/ea-day-view-cell.c +++ b/a11y/calendar/ea-day-view-cell.c @@ -79,7 +79,7 @@ e_day_view_cell_new (EDayView *day_view, gint row, gint column) cell->column = column; #ifdef ACC_DEBUG - printf ("EvoAcc: e_day_view_cell created %p\n", (void *)cell); + printf ("EvoAcc: e_day_view_cell created %p\n", (gpointer)cell); #endif return cell; @@ -89,8 +89,8 @@ e_day_view_cell_new (EDayView *day_view, gint row, gint column) static void ea_day_view_cell_class_init (EaDayViewCellClass *klass); -static G_CONST_RETURN gchar* ea_day_view_cell_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_day_view_cell_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_day_view_cell_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_day_view_cell_get_description (AtkObject *accessible); static AtkStateSet* ea_day_view_cell_ref_state_set (AtkObject *obj); static AtkObject * ea_day_view_cell_get_parent (AtkObject *accessible); static gint ea_day_view_cell_get_index_in_parent (AtkObject *accessible); @@ -196,7 +196,7 @@ static void ea_day_view_cell_finalize (GObject *object) } #endif -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_day_view_cell_get_name (AtkObject *accessible) { AtkGObjectAccessible *atk_gobj; @@ -230,7 +230,7 @@ ea_day_view_cell_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_day_view_cell_get_description (AtkObject *accessible) { return ea_day_view_cell_get_name (accessible); diff --git a/a11y/calendar/ea-day-view-main-item.c b/a11y/calendar/ea-day-view-main-item.c index 783710dc61..c1176b4417 100644 --- a/a11y/calendar/ea-day-view-main-item.c +++ b/a11y/calendar/ea-day-view-main-item.c @@ -32,8 +32,8 @@ static void ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass); static void ea_day_view_main_item_finalize (GObject *object); -static G_CONST_RETURN gchar* ea_day_view_main_item_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_day_view_main_item_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_day_view_main_item_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_day_view_main_item_get_description (AtkObject *accessible); static gint ea_day_view_main_item_get_n_children (AtkObject *obj); static AtkObject* ea_day_view_main_item_ref_child (AtkObject *obj, @@ -95,10 +95,10 @@ static AtkObject* table_interface_get_column_header (AtkTable *table, gint in_col); static AtkObject* table_interface_get_caption (AtkTable *table); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row); static AtkObject* table_interface_get_summary (AtkTable *table); @@ -282,7 +282,7 @@ ea_day_view_main_item_finalize (GObject *object) #endif } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_day_view_main_item_get_name (AtkObject *accessible) { AtkObject *parent; @@ -295,7 +295,7 @@ ea_day_view_main_item_get_name (AtkObject *accessible) return atk_object_get_name (parent); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_day_view_main_item_get_description (AtkObject *accessible) { return _("a table to view and select the current time range"); @@ -1045,7 +1045,7 @@ table_interface_get_caption (AtkTable *table) return NULL; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col) { @@ -1081,7 +1081,7 @@ table_interface_get_column_description (AtkTable *table, return description; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row) { diff --git a/a11y/calendar/ea-day-view.c b/a11y/calendar/ea-day-view.c index 107f983bb0..9eb3e343f3 100644 --- a/a11y/calendar/ea-day-view.c +++ b/a11y/calendar/ea-day-view.c @@ -31,8 +31,8 @@ static void ea_day_view_class_init (EaDayViewClass *klass); -static G_CONST_RETURN gchar* ea_day_view_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_day_view_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_day_view_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_day_view_get_description (AtkObject *accessible); static gint ea_day_view_get_n_children (AtkObject *obj); static AtkObject* ea_day_view_ref_child (AtkObject *obj, gint i); @@ -111,13 +111,13 @@ ea_day_view_new (GtkWidget *widget) atk_object_initialize (accessible, widget); #ifdef ACC_DEBUG - printf ("EvoAcc: ea_day_view created %p\n", (void *)accessible); + printf ("EvoAcc: ea_day_view created %p\n", (gpointer)accessible); #endif return accessible; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_day_view_get_name (AtkObject *accessible) { EDayView *day_view; @@ -172,7 +172,7 @@ ea_day_view_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_day_view_get_description (AtkObject *accessible) { EDayView *day_view; diff --git a/a11y/calendar/ea-gnome-calendar.c b/a11y/calendar/ea-gnome-calendar.c index 4d6e752b8e..e5d9654c1a 100644 --- a/a11y/calendar/ea-gnome-calendar.c +++ b/a11y/calendar/ea-gnome-calendar.c @@ -31,8 +31,8 @@ static void ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass); -static G_CONST_RETURN gchar* ea_gnome_calendar_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_gnome_calendar_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_gnome_calendar_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_gnome_calendar_get_description (AtkObject *accessible); static gint ea_gnome_calendar_get_n_children (AtkObject* obj); static AtkObject * ea_gnome_calendar_ref_child (AtkObject *obj, gint i); @@ -130,7 +130,7 @@ ea_gnome_calendar_new (GtkWidget *widget) } #ifdef ACC_DEBUG - printf ("EvoAcc: ea-gnome-calendar created: %p\n", (void *)accessible); + printf ("EvoAcc: ea-gnome-calendar created: %p\n", (gpointer)accessible); #endif return accessible; @@ -143,8 +143,8 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal) struct icaltimetype start_tt, end_tt; time_t start_time, end_time; struct tm start_tm, end_tm; - static char buffer[512]; - char end_buffer[256]; + static gchar buffer[512]; + gchar end_buffer[256]; GnomeCalendarViewType view; gnome_calendar_get_visible_time_range (gcal, &start_time, &end_time); @@ -237,7 +237,7 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal) return buffer; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_gnome_calendar_get_name (AtkObject *accessible) { if (accessible->name) @@ -245,7 +245,7 @@ ea_gnome_calendar_get_name (AtkObject *accessible) return _("Gnome Calendar"); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_gnome_calendar_get_description (AtkObject *accessible) { if (accessible->description) @@ -328,7 +328,7 @@ ea_gcal_switch_view_cb (GtkNotebook *widget, GtkNotebookPage *page, #ifdef ACC_DEBUG printf ("AccDebug: view switch to widget %p (index=%d) \n", - (void *)new_widget, index); + (gpointer)new_widget, index); #endif } diff --git a/a11y/calendar/ea-jump-button.c b/a11y/calendar/ea-jump-button.c index 7888196b8d..eb24bea42c 100644 --- a/a11y/calendar/ea-jump-button.c +++ b/a11y/calendar/ea-jump-button.c @@ -30,15 +30,15 @@ static void ea_jump_button_class_init (EaJumpButtonClass *klass); -static G_CONST_RETURN gchar* ea_jump_button_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_jump_button_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_jump_button_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_jump_button_get_description (AtkObject *accessible); /* action interface */ static void atk_action_interface_init (AtkActionIface *iface); static gboolean jump_button_do_action (AtkAction *action, gint i); static gint jump_button_get_n_actions (AtkAction *action); -static G_CONST_RETURN gchar* jump_button_get_keybinding (AtkAction *action, +static G_CONST_RETURN gchar * jump_button_get_keybinding (AtkAction *action, gint i); static gpointer parent_class = NULL; @@ -137,7 +137,7 @@ ea_jump_button_new (GObject *obj) return atk_obj; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_jump_button_get_name (AtkObject *accessible) { g_return_val_if_fail (EA_IS_JUMP_BUTTON (accessible), NULL); @@ -147,7 +147,7 @@ ea_jump_button_get_name (AtkObject *accessible) return _("Jump button"); } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_jump_button_get_description (AtkObject *accessible) { if (accessible->description) @@ -204,7 +204,7 @@ jump_button_get_n_actions (AtkAction *action) return 1; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * jump_button_get_keybinding (AtkAction *action, gint i) { diff --git a/a11y/calendar/ea-week-view-cell.c b/a11y/calendar/ea-week-view-cell.c index 4c7a591121..f3f7183c55 100644 --- a/a11y/calendar/ea-week-view-cell.c +++ b/a11y/calendar/ea-week-view-cell.c @@ -79,7 +79,7 @@ e_week_view_cell_new (EWeekView *week_view, gint row, gint column) cell->column = column; #ifdef ACC_DEBUG - printf ("EvoAcc: e_week_view_cell created %p\n", (void *)cell); + printf ("EvoAcc: e_week_view_cell created %p\n", (gpointer)cell); #endif return cell; @@ -89,8 +89,8 @@ e_week_view_cell_new (EWeekView *week_view, gint row, gint column) static void ea_week_view_cell_class_init (EaWeekViewCellClass *klass); -static G_CONST_RETURN gchar* ea_week_view_cell_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_week_view_cell_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_week_view_cell_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_week_view_cell_get_description (AtkObject *accessible); static AtkStateSet* ea_week_view_cell_ref_state_set (AtkObject *obj); static AtkObject * ea_week_view_cell_get_parent (AtkObject *accessible); static gint ea_week_view_cell_get_index_in_parent (AtkObject *accessible); @@ -196,7 +196,7 @@ static void ea_week_view_cell_finalize (GObject *object) } #endif -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_week_view_cell_get_name (AtkObject *accessible) { AtkGObjectAccessible *atk_gobj; @@ -242,7 +242,7 @@ ea_week_view_cell_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_week_view_cell_get_description (AtkObject *accessible) { return ea_week_view_cell_get_name (accessible); diff --git a/a11y/calendar/ea-week-view-main-item.c b/a11y/calendar/ea-week-view-main-item.c index ae507df235..3ba4508ba3 100644 --- a/a11y/calendar/ea-week-view-main-item.c +++ b/a11y/calendar/ea-week-view-main-item.c @@ -31,8 +31,8 @@ static void ea_week_view_main_item_class_init (EaWeekViewMainItemClass *klass); static void ea_week_view_main_item_finalize (GObject *object); -static G_CONST_RETURN gchar* ea_week_view_main_item_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_week_view_main_item_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_week_view_main_item_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_week_view_main_item_get_description (AtkObject *accessible); static gint ea_week_view_main_item_get_n_children (AtkObject *obj); static AtkObject* ea_week_view_main_item_ref_child (AtkObject *obj, @@ -95,10 +95,10 @@ static AtkObject* table_interface_get_column_header (AtkTable *table, gint in_col); static AtkObject* table_interface_get_caption (AtkTable *table); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row); static AtkObject* table_interface_get_summary (AtkTable *table); @@ -282,7 +282,7 @@ ea_week_view_main_item_finalize (GObject *object) #endif } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_week_view_main_item_get_name (AtkObject *accessible) { AtkObject *parent; @@ -292,7 +292,7 @@ ea_week_view_main_item_get_name (AtkObject *accessible) } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_week_view_main_item_get_description (AtkObject *accessible) { return _("a table to view and select the current time range"); @@ -1008,7 +1008,7 @@ table_interface_get_caption (AtkTable *table) return NULL; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col) { @@ -1065,7 +1065,7 @@ table_interface_get_column_description (AtkTable *table, return description; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row) { diff --git a/a11y/calendar/ea-week-view.c b/a11y/calendar/ea-week-view.c index 1d88e40c46..734f09239a 100644 --- a/a11y/calendar/ea-week-view.c +++ b/a11y/calendar/ea-week-view.c @@ -30,8 +30,8 @@ static void ea_week_view_class_init (EaWeekViewClass *klass); -static G_CONST_RETURN gchar* ea_week_view_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_week_view_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_week_view_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_week_view_get_description (AtkObject *accessible); static gint ea_week_view_get_n_children (AtkObject *obj); static AtkObject* ea_week_view_ref_child (AtkObject *obj, gint i); @@ -112,13 +112,13 @@ ea_week_view_new (GtkWidget *widget) atk_object_initialize (accessible, widget); #ifdef ACC_DEBUG - printf ("EvoAcc: ea_week_view created %p\n", (void *)accessible); + printf ("EvoAcc: ea_week_view created %p\n", (gpointer)accessible); #endif return accessible; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_week_view_get_name (AtkObject *accessible) { EWeekView *week_view; @@ -165,7 +165,7 @@ ea_week_view_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_week_view_get_description (AtkObject *accessible) { EWeekView *week_view; @@ -239,7 +239,7 @@ ea_week_view_get_n_children (AtkObject *accessible) count++; #ifdef ACC_DEBUG - printf("AccDebug: week view %p has %d children\n", (void *)week_view, count); + printf("AccDebug: week view %p has %d children\n", (gpointer)week_view, count); #endif return count; } @@ -315,7 +315,7 @@ ea_week_view_ref_child (AtkObject *accessible, gint index) #ifdef ACC_DEBUG printf ("EvoAcc: ea_week_view_ref_child [%d]=%p\n", - index, (void *)atk_object); + index, (gpointer)atk_object); #endif return atk_object; } diff --git a/a11y/e-table/gal-a11y-e-cell-popup.c b/a11y/e-table/gal-a11y-e-cell-popup.c index 5ae3cef686..f76b2431b0 100644 --- a/a11y/e-table/gal-a11y-e-cell-popup.c +++ b/a11y/e-table/gal-a11y-e-cell-popup.c @@ -83,9 +83,9 @@ AtkObject * gal_a11y_e_cell_popup_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { AtkObject *a11y; GalA11yECell *cell; diff --git a/a11y/e-table/gal-a11y-e-cell-popup.h b/a11y/e-table/gal-a11y-e-cell-popup.h index 4bee17e8ce..7fef5cf18d 100644 --- a/a11y/e-table/gal-a11y-e-cell-popup.h +++ b/a11y/e-table/gal-a11y-e-cell-popup.h @@ -55,8 +55,8 @@ GType gal_a11y_e_cell_popup_get_type (void); AtkObject *gal_a11y_e_cell_popup_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); #endif /* ! __GAL_A11Y_E_CELL_POPUP_H__ */ diff --git a/a11y/e-table/gal-a11y-e-cell-registry.c b/a11y/e-table/gal-a11y-e-cell-registry.c index 1da241fea9..9dc9598608 100644 --- a/a11y/e-table/gal-a11y-e-cell-registry.c +++ b/a11y/e-table/gal-a11y-e-cell-registry.c @@ -111,9 +111,9 @@ gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry, ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { GalA11yECellRegistryFunc func = NULL; GType type; diff --git a/a11y/e-table/gal-a11y-e-cell-registry.h b/a11y/e-table/gal-a11y-e-cell-registry.h index bc43a662cc..0620fd1b9c 100644 --- a/a11y/e-table/gal-a11y-e-cell-registry.h +++ b/a11y/e-table/gal-a11y-e-cell-registry.h @@ -41,9 +41,9 @@ typedef struct _GalA11yECellRegistryPrivate GalA11yECellRegistryPrivate; typedef AtkObject *(*GalA11yECellRegistryFunc) (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); struct _GalA11yECellRegistry { GObject object; @@ -62,9 +62,9 @@ AtkObject *gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *re ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); void gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *registry, GType type, GalA11yECellRegistryFunc func); diff --git a/a11y/e-table/gal-a11y-e-cell-text.c b/a11y/e-table/gal-a11y-e-cell-text.c index a2b9f715f8..77823b0a7c 100644 --- a/a11y/e-table/gal-a11y-e-cell-text.c +++ b/a11y/e-table/gal-a11y-e-cell-text.c @@ -86,11 +86,11 @@ ect_check (gpointer a11y) return TRUE; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ect_get_name (AtkObject * a11y) { GalA11yECell *gaec; - char *name; + gchar *name; if (!ect_check (a11y)) return NULL; @@ -180,7 +180,7 @@ ect_get_character_at_offset (AtkText *text, } -static gchar* +static gchar * ect_get_text_before_offset (AtkText *text, gint offset, AtkTextBoundary boundary_type, @@ -294,7 +294,7 @@ ect_get_n_selections (AtkText *text) } -static gchar* +static gchar * ect_get_selection (AtkText *text, gint selection_num, gint *start_offset, @@ -543,7 +543,7 @@ ect_do_action_edit (AtkAction *action) /* text signal handlers */ static void -ect_text_inserted_cb (ECellText *text, ECellView *cell_view, int pos, int len, int row, int model_col, gpointer data) +ect_text_inserted_cb (ECellText *text, ECellView *cell_view, gint pos, gint len, gint row, gint model_col, gpointer data) { GalA11yECellText *gaet; GalA11yECell *gaec; @@ -560,7 +560,7 @@ ect_text_inserted_cb (ECellText *text, ECellView *cell_view, int pos, int len, i } static void -ect_text_deleted_cb (ECellText *text, ECellView *cell_view, int pos, int len, int row, int model_col, gpointer data) +ect_text_deleted_cb (ECellText *text, ECellView *cell_view, gint pos, gint len, gint row, gint model_col, gpointer data) { GalA11yECellText *gaet; GalA11yECell *gaec; @@ -692,9 +692,9 @@ AtkObject * gal_a11y_e_cell_text_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { AtkObject *a11y; GalA11yECell *gaec; diff --git a/a11y/e-table/gal-a11y-e-cell-text.h b/a11y/e-table/gal-a11y-e-cell-text.h index fe404169a1..2e469d76f6 100644 --- a/a11y/e-table/gal-a11y-e-cell-text.h +++ b/a11y/e-table/gal-a11y-e-cell-text.h @@ -57,8 +57,8 @@ GType gal_a11y_e_cell_text_get_type (void); AtkObject *gal_a11y_e_cell_text_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); #endif /* ! __GAL_A11Y_E_CELL_TEXT_H__ */ diff --git a/a11y/e-table/gal-a11y-e-cell-toggle.c b/a11y/e-table/gal-a11y-e-cell-toggle.c index c0425a0cbb..1101bac7ee 100644 --- a/a11y/e-table/gal-a11y-e-cell-toggle.c +++ b/a11y/e-table/gal-a11y-e-cell-toggle.c @@ -143,9 +143,9 @@ AtkObject* gal_a11y_e_cell_toggle_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { AtkObject *a11y; GalA11yECell *cell; diff --git a/a11y/e-table/gal-a11y-e-cell-toggle.h b/a11y/e-table/gal-a11y-e-cell-toggle.h index 769e0b4200..1f41ae1623 100644 --- a/a11y/e-table/gal-a11y-e-cell-toggle.h +++ b/a11y/e-table/gal-a11y-e-cell-toggle.h @@ -56,9 +56,9 @@ struct _GalA11yECellToggleClass AtkObject *gal_a11y_e_cell_toggle_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); #ifdef __cplusplus } diff --git a/a11y/e-table/gal-a11y-e-cell-tree.c b/a11y/e-table/gal-a11y-e-cell-tree.c index 0a5f8e2019..aaf490c726 100644 --- a/a11y/e-table/gal-a11y-e-cell-tree.c +++ b/a11y/e-table/gal-a11y-e-cell-tree.c @@ -184,9 +184,9 @@ AtkObject * gal_a11y_e_cell_tree_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { AtkObject *subcell_a11y; GalA11yECellTree *a11y; diff --git a/a11y/e-table/gal-a11y-e-cell-tree.h b/a11y/e-table/gal-a11y-e-cell-tree.h index 43169c2f28..497590b351 100644 --- a/a11y/e-table/gal-a11y-e-cell-tree.h +++ b/a11y/e-table/gal-a11y-e-cell-tree.h @@ -44,7 +44,7 @@ typedef struct _GalA11yECellTreePrivate GalA11yECellTreePrivate; struct _GalA11yECellTree { GalA11yECell object; - int model_row_changed_id; + gint model_row_changed_id; }; struct _GalA11yECellTreeClass { @@ -57,8 +57,8 @@ GType gal_a11y_e_cell_tree_get_type (void); AtkObject *gal_a11y_e_cell_tree_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); #endif /* ! __GAL_A11Y_E_CELL_TREE_H__ */ diff --git a/a11y/e-table/gal-a11y-e-cell-vbox.c b/a11y/e-table/gal-a11y-e-cell-vbox.c index 7a5eadba52..b3f92a695a 100644 --- a/a11y/e-table/gal-a11y-e-cell-vbox.c +++ b/a11y/e-table/gal-a11y-e-cell-vbox.c @@ -120,7 +120,7 @@ ecv_ref_accessible_at_point (AtkComponent *component, AtkCoordType coord_type) { gint x0, y0, width, height; - int subcell_height, i; + gint subcell_height, i; GalA11yECell *gaec = GAL_A11Y_E_CELL (component); ECellVboxView *ecvv = (ECellVboxView *) (gaec->cell_view); @@ -203,9 +203,9 @@ gal_a11y_e_cell_vbox_get_type (void) AtkObject *gal_a11y_e_cell_vbox_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { AtkObject *a11y; GalA11yECell *gaec; diff --git a/a11y/e-table/gal-a11y-e-cell-vbox.h b/a11y/e-table/gal-a11y-e-cell-vbox.h index 2055ac3195..cf6375a2be 100644 --- a/a11y/e-table/gal-a11y-e-cell-vbox.h +++ b/a11y/e-table/gal-a11y-e-cell-vbox.h @@ -44,7 +44,7 @@ typedef struct _GalA11yECellVboxClass GalA11yECellVboxClass; struct _GalA11yECellVbox { GalA11yECell object; - int a11y_subcell_count; + gint a11y_subcell_count; gpointer *a11y_subcells; }; @@ -57,9 +57,9 @@ GType gal_a11y_e_cell_vbox_get_type (void); AtkObject *gal_a11y_e_cell_vbox_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); #ifdef __cplusplus } diff --git a/a11y/e-table/gal-a11y-e-cell.c b/a11y/e-table/gal-a11y-e-cell.c index 3b74675ae5..a316500af7 100644 --- a/a11y/e-table/gal-a11y-e-cell.c +++ b/a11y/e-table/gal-a11y-e-cell.c @@ -103,7 +103,7 @@ gal_a11y_e_cell_dispose (GObject *object) } /* Static functions */ -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * gal_a11y_e_cell_get_name (AtkObject * a11y) { GalA11yECell *cell = GAL_A11Y_E_CELL (a11y); @@ -163,10 +163,10 @@ gal_a11y_e_cell_get_extents (AtkComponent *component, { GalA11yECell *a11y = GAL_A11Y_E_CELL (component); GtkWidget *tableOrTree; - int row; - int col; - int xval; - int yval; + gint row; + gint col; + gint xval; + gint yval; row = a11y->row; col = a11y->view_col; @@ -593,9 +593,9 @@ AtkObject * gal_a11y_e_cell_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { AtkObject *a11y; @@ -616,9 +616,9 @@ gal_a11y_e_cell_construct (AtkObject *object, ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { GalA11yECell *a11y = GAL_A11Y_E_CELL (object); a11y->item = item; diff --git a/a11y/e-table/gal-a11y-e-cell.h b/a11y/e-table/gal-a11y-e-cell.h index af96c69d47..3ec3070a9b 100644 --- a/a11y/e-table/gal-a11y-e-cell.h +++ b/a11y/e-table/gal-a11y-e-cell.h @@ -49,9 +49,9 @@ struct _GalA11yECell { ETableItem *item; ECellView *cell_view; AtkObject *parent; - int model_col; - int view_col; - int row; + gint model_col; + gint view_col; + gint row; AtkStateSet *state_set; GList *action_list; gint action_idle_handler; @@ -76,16 +76,16 @@ GType gal_a11y_e_cell_get_type (void); AtkObject *gal_a11y_e_cell_new (ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); void gal_a11y_e_cell_construct (AtkObject *object, ETableItem *item, ECellView *cell_view, AtkObject *parent, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); void gal_a11y_e_cell_type_add_action_interface (GType type); diff --git a/a11y/e-table/gal-a11y-e-table-click-to-add.c b/a11y/e-table/gal-a11y-e-table-click-to-add.c index ed417e1601..e36fe51a00 100644 --- a/a11y/e-table/gal-a11y-e-table-click-to-add.c +++ b/a11y/e-table/gal-a11y-e-table-click-to-add.c @@ -36,7 +36,7 @@ static AtkObjectClass *parent_class; static GType parent_type; static gint priv_offset; -#define GET_PRIVATE(object) ((GalA11yETableClickToAddPrivate *) (((char *) object) + priv_offset)) +#define GET_PRIVATE(object) ((GalA11yETableClickToAddPrivate *) (((gchar *) object) + priv_offset)) #define PARENT_TYPE (parent_type) struct _GalA11yETableClickToAddPrivate { @@ -51,7 +51,7 @@ etcta_get_n_actions (AtkAction *action) return 1; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * etcta_get_description (AtkAction *action, gint i) { @@ -61,7 +61,7 @@ etcta_get_description (AtkAction *action, return NULL; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * etcta_action_get_name (AtkAction *action, gint i) { if (i == 0) diff --git a/a11y/e-table/gal-a11y-e-table-column-header.c b/a11y/e-table/gal-a11y-e-table-column-header.c index 4df75cc564..41e6ab0fca 100644 --- a/a11y/e-table/gal-a11y-e-table-column-header.c +++ b/a11y/e-table/gal-a11y-e-table-column-header.c @@ -32,7 +32,7 @@ static GObjectClass *parent_class; static gint priv_offset; -#define GET_PRIVATE(object) ((GalA11yETableColumnHeaderPrivate *) (((char *) object) + priv_offset)) +#define GET_PRIVATE(object) ((GalA11yETableColumnHeaderPrivate *) (((gchar *) object) + priv_offset)) #define PARENT_TYPE (atk_gobject_accessible_get_type ()) struct _GalA11yETableColumnHeaderPrivate { @@ -141,7 +141,7 @@ gal_a11y_e_table_column_header_get_n_actions (AtkAction *action) return 1; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * gal_a11y_e_table_column_header_action_get_name (AtkAction *action, gint i) { diff --git a/a11y/e-table/gal-a11y-e-table-item.c b/a11y/e-table/gal-a11y-e-table-item.c index 935f53b83b..912d055964 100644 --- a/a11y/e-table/gal-a11y-e-table-item.c +++ b/a11y/e-table/gal-a11y-e-table-item.c @@ -48,14 +48,14 @@ static AtkComponentIface *component_parent_iface; static GType parent_type; static gint priv_offset; static GQuark quark_accessible_object = 0; -#define GET_PRIVATE(object) ((GalA11yETableItemPrivate *) (((char *) object) + priv_offset)) +#define GET_PRIVATE(object) ((GalA11yETableItemPrivate *) (((gchar *) object) + priv_offset)) #define PARENT_TYPE (parent_type) struct _GalA11yETableItemPrivate { gint cols; gint rows; - int selection_change_id; - int cursor_change_id; + gint selection_change_id; + gint cursor_change_id; ETableCol ** columns; ESelectionModel *selection; AtkStateSet *state_set; @@ -93,7 +93,7 @@ eti_ref_state_set (AtkObject *accessible) } inline static gint -view_to_model_row(ETableItem *eti, int row) +view_to_model_row(ETableItem *eti, gint row) { if (eti->uses_source_model) { ETableSubset *etss = E_TABLE_SUBSET(eti->table_model); @@ -107,16 +107,16 @@ view_to_model_row(ETableItem *eti, int row) } inline static gint -view_to_model_col(ETableItem *eti, int col) +view_to_model_col(ETableItem *eti, gint col) { ETableCol *ecol = e_table_header_get_column (eti->header, col); return ecol ? ecol->col_idx : -1; } inline static gint -model_to_view_row(ETableItem *eti, int row) +model_to_view_row(ETableItem *eti, gint row) { - int i; + gint i; if (row == -1) return -1; if (eti->uses_source_model) { @@ -136,9 +136,9 @@ model_to_view_row(ETableItem *eti, int row) } inline static gint -model_to_view_col(ETableItem *eti, int col) +model_to_view_col(ETableItem *eti, gint col) { - int i; + gint i; if (col == -1) return -1; for (i = 0; i < eti->cols; i++) { @@ -159,7 +159,7 @@ static void eti_a11y_reset_focus_object (GalA11yETableItem *a11y, ETableItem *item, gboolean notify) { ESelectionModel * esm; - int cursor_row, cursor_col, view_row, view_col; + gint cursor_row, cursor_col, view_row, view_col; AtkObject *cell, *old_cell; esm = item->selection; @@ -284,9 +284,9 @@ eti_ref_accessible_at_point (AtkComponent *component, gint y, AtkCoordType coord_type) { - int row = -1; - int col = -1; - int x_origin, y_origin; + gint row = -1; + gint col = -1; + gint x_origin, y_origin; ETableItem *item; GtkWidget *tableOrTree; @@ -446,7 +446,7 @@ eti_get_column_extent_at (AtkTable *table, gint column) { ETableItem *item; - int width; + gint width; item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table))); if (!item) @@ -469,7 +469,7 @@ eti_get_row_extent_at (AtkTable *table, gint column) { ETableItem *item; - int height; + gint height; item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table))); if (!item) @@ -676,7 +676,7 @@ eti_atk_component_iface_init (AtkComponentIface *iface) } static void -eti_rows_inserted (ETableModel * model, int row, int count, +eti_rows_inserted (ETableModel * model, gint row, gint count, AtkObject * table_item) { gint n_cols,n_rows,i,j; @@ -711,7 +711,7 @@ eti_rows_inserted (ETableModel * model, int row, int count, } static void -eti_rows_deleted (ETableModel * model, int row, int count, +eti_rows_deleted (ETableModel * model, gint row, gint count, AtkObject * table_item) { gint i,j, n_rows, n_cols, old_nrows; @@ -949,7 +949,7 @@ static void eti_a11y_selection_model_added_cb (ETableItem *eti, static void eti_a11y_selection_changed_cb (ESelectionModel *selection, GalA11yETableItem *a11y); static void eti_a11y_cursor_changed_cb (ESelectionModel *selection, - int row, int col, + gint row, gint col, GalA11yETableItem *a11y); /** @@ -1021,7 +1021,7 @@ gal_a11y_e_table_item_new (ETableItem *item) AtkObject *accessible; ESelectionModel * esm; AtkObject *parent; - const char *name; + const gchar *name; g_return_val_if_fail (item && item->cols >= 0 && item->rows >= 0, NULL); a11y = g_object_new (gal_a11y_e_table_item_get_type (), NULL); @@ -1188,7 +1188,7 @@ eti_a11y_selection_changed_cb (ESelectionModel *selection, GalA11yETableItem *a1 static void eti_a11y_cursor_changed_cb (ESelectionModel *selection, - int row, int col, GalA11yETableItem *a11y) + gint row, gint col, GalA11yETableItem *a11y) { ETableItem *item; GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y); diff --git a/a11y/e-table/gal-a11y-e-table.c b/a11y/e-table/gal-a11y-e-table.c index 1966fb29ee..bf75227af4 100644 --- a/a11y/e-table/gal-a11y-e-table.c +++ b/a11y/e-table/gal-a11y-e-table.c @@ -37,7 +37,7 @@ static AtkObjectClass *parent_class; static GType parent_type; static gint priv_offset; -#define GET_PRIVATE(object) ((GalA11yETablePrivate *) (((char *) object) + priv_offset)) +#define GET_PRIVATE(object) ((GalA11yETablePrivate *) (((gchar *) object) + priv_offset)) #define PARENT_TYPE (parent_type) struct _GalA11yETablePrivate { @@ -125,7 +125,7 @@ et_get_n_children (AtkObject *accessible) { GalA11yETable *a11y = GAL_A11Y_E_TABLE (accessible); ETable * et; - int n = 0; + gint n = 0; et = E_TABLE(GTK_ACCESSIBLE (a11y)->widget); diff --git a/a11y/e-table/gal-a11y-e-tree.c b/a11y/e-table/gal-a11y-e-tree.c index 4ecce81501..879b517aab 100644 --- a/a11y/e-table/gal-a11y-e-tree.c +++ b/a11y/e-table/gal-a11y-e-tree.c @@ -34,7 +34,7 @@ static AtkObjectClass *parent_class; static GType parent_type; static gint priv_offset; -#define GET_PRIVATE(object) ((GalA11yETreePrivate *) (((char *) object) + priv_offset)) +#define GET_PRIVATE(object) ((GalA11yETreePrivate *) (((gchar *) object) + priv_offset)) #define PARENT_TYPE (parent_type) struct _GalA11yETreePrivate { diff --git a/a11y/e-text/gal-a11y-e-text.c b/a11y/e-text/gal-a11y-e-text.c index 98484949ff..6717f687b0 100644 --- a/a11y/e-text/gal-a11y-e-text.c +++ b/a11y/e-text/gal-a11y-e-text.c @@ -39,11 +39,11 @@ static AtkComponentIface *component_parent_iface; static GType parent_type; static gint priv_offset; static GQuark quark_accessible_object = 0; -#define GET_PRIVATE(object) ((GalA11yETextPrivate *) (((char *) object) + priv_offset)) +#define GET_PRIVATE(object) ((GalA11yETextPrivate *) (((gchar *) object) + priv_offset)) #define PARENT_TYPE (parent_type) struct _GalA11yETextPrivate { - int dummy; + gint dummy; }; static void @@ -66,8 +66,8 @@ et_get_extents (AtkComponent *component, EText *item = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component))); double real_width; double real_height; - int fake_width; - int fake_height; + gint fake_width; + gint fake_height; if (component_parent_iface && component_parent_iface->get_extents) @@ -94,7 +94,7 @@ et_get_full_text (AtkText *text) { EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text))); ETextModel *model; - const char *full_text; + const gchar *full_text; g_object_get (etext, "model", &model, NULL); @@ -105,7 +105,7 @@ et_get_full_text (AtkText *text) static void et_set_full_text (AtkEditableText *text, - const char *full_text) + const gchar *full_text) { EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text))); ETextModel *model; @@ -121,7 +121,7 @@ et_get_text (AtkText *text, gint end_offset) { gint start, end, real_start, real_end, len; - const char *full_text = et_get_full_text (text); + const gchar *full_text = et_get_full_text (text); if (full_text == NULL) return NULL; len = g_utf8_strlen (full_text, -1); @@ -149,12 +149,12 @@ is_a_seperator (gunichar c) } static gint -find_word_start (const char *text, +find_word_start (const gchar *text, gint begin_offset, gint step) { gint offset; - char *at_offset; + gchar *at_offset; gunichar current, previous; gint len; @@ -175,12 +175,12 @@ find_word_start (const char *text, } static gint -find_word_end (const char *text, +find_word_end (const gchar *text, gint begin_offset, gint step) { gint offset; - char *at_offset; + gchar *at_offset; gunichar current, previous; gint len; @@ -201,14 +201,14 @@ find_word_end (const char *text, } static gint -find_sentence_start (const char *text, +find_sentence_start (const gchar *text, gint begin_offset, gint step) { gint offset, last_word_end, len; - char *at_offset; + gchar *at_offset; gunichar ch; - int i; + gint i; offset = find_word_start (text, begin_offset, step); len = g_utf8_strlen (text, -1); @@ -231,12 +231,12 @@ find_sentence_start (const char *text, } static gint -find_sentence_end (const char *text, +find_sentence_end (const gchar *text, gint begin_offset, gint step) { gint offset; - char *at_offset; + gchar *at_offset; gunichar previous; gint len; @@ -255,12 +255,12 @@ find_sentence_end (const char *text, } static gint -find_line_start (const char *text, +find_line_start (const gchar *text, gint begin_offset, gint step) { gint offset; - char *at_offset; + gchar *at_offset; gunichar previous; gint len; @@ -279,12 +279,12 @@ find_line_start (const char *text, } static gint -find_line_end (const char *text, +find_line_end (const gchar *text, gint begin_offset, gint step) { gint offset; - char *at_offset; + gchar *at_offset; gunichar current; gint len; @@ -310,7 +310,7 @@ et_get_text_after_offset (AtkText *text, gint *end_offset) { gint start, end, len; - const char *full_text = et_get_full_text (text); + const gchar *full_text = et_get_full_text (text); g_return_val_if_fail (full_text, NULL); switch (boundary_type) @@ -363,7 +363,7 @@ et_get_text_at_offset (AtkText *text, gint *end_offset) { gint start, end, len; - const char *full_text = et_get_full_text (text); + const gchar *full_text = et_get_full_text (text); g_return_val_if_fail (full_text, NULL); switch (boundary_type) @@ -412,15 +412,15 @@ static gunichar et_get_character_at_offset (AtkText *text, gint offset) { - const char *full_text = et_get_full_text (text); - char *at_offset; + const gchar *full_text = et_get_full_text (text); + gchar *at_offset; at_offset = g_utf8_offset_to_pointer (full_text, offset); return g_utf8_get_char_validated (at_offset, -1); } -static gchar* +static gchar * et_get_text_before_offset (AtkText *text, gint offset, AtkTextBoundary boundary_type, @@ -428,7 +428,7 @@ et_get_text_before_offset (AtkText *text, gint *end_offset) { gint start, end, len; - const char *full_text = et_get_full_text (text); + const gchar *full_text = et_get_full_text (text); g_return_val_if_fail (full_text, NULL); switch (boundary_type) @@ -478,7 +478,7 @@ et_get_caret_offset (AtkText *text) { GObject *obj; EText *etext; - int offset; + gint offset; g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text), -1); obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)); @@ -588,7 +588,7 @@ et_get_character_extents (AtkText *text, static gint et_get_character_count (AtkText *text) { - const char *full_text = et_get_full_text (text); + const gchar *full_text = et_get_full_text (text); return g_utf8_strlen (full_text, -1); } @@ -606,8 +606,8 @@ et_get_offset_at_point (AtkText *text, gint x_widget, y_widget, x_window, y_window; GdkWindow *window; GtkWidget *widget; - int index; - int trailing; + gint index; + gint trailing; g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text), -1); obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)); @@ -670,7 +670,7 @@ et_get_n_selections (AtkText *text) } -static gchar* +static gchar * et_get_selection (AtkText *text, gint selection_num, gint *start_offset, @@ -679,7 +679,7 @@ et_get_selection (AtkText *text, gint start, end, real_start, real_end, len; EText *etext; if (selection_num == 0) { - const char *full_text = et_get_full_text (text); + const gchar *full_text = et_get_full_text (text); if (full_text == NULL) return NULL; len = g_utf8_strlen (full_text, -1); @@ -842,9 +842,9 @@ et_insert_text (AtkEditableText *text, gint *position) { /* Utf8 unimplemented */ - char *result; + gchar *result; - const char *full_text = et_get_full_text (ATK_TEXT (text)); + const gchar *full_text = et_get_full_text (ATK_TEXT (text)); if (full_text == NULL) return; diff --git a/a11y/ea-cell-table.c b/a11y/ea-cell-table.c index 8c0b9ee253..95ae59dea4 100644 --- a/a11y/ea-cell-table.c +++ b/a11y/ea-cell-table.c @@ -36,11 +36,11 @@ ea_cell_table_create (gint rows, gint columns, gboolean column_first) cell_data->columns = columns; cell_data->rows = rows; - cell_data->column_labels = g_new0 (gchar*, columns); + cell_data->column_labels = g_new0 (gchar *, columns); for (index = columns -1; index >= 0; --index) cell_data->column_labels [index] = NULL; - cell_data->row_labels = g_new0 (gchar*, rows); + cell_data->row_labels = g_new0 (gchar *, rows); for (index = rows -1; index >= 0; --index) cell_data->row_labels [index] = NULL; @@ -142,7 +142,7 @@ ea_cell_table_set_cell_at_index (EaCellTable * cell_data, return TRUE; } -G_CONST_RETURN gchar* +G_CONST_RETURN gchar * ea_cell_table_get_column_label (EaCellTable * cell_data, gint column) { @@ -164,7 +164,7 @@ ea_cell_table_set_column_label (EaCellTable * cell_data, cell_data->column_labels[column] = g_strdup(label); } -G_CONST_RETURN gchar* +G_CONST_RETURN gchar * ea_cell_table_get_row_label (EaCellTable * cell_data, gint row) { diff --git a/a11y/ea-cell-table.h b/a11y/ea-cell-table.h index f8674ec42a..353bbd0634 100644 --- a/a11y/ea-cell-table.h +++ b/a11y/ea-cell-table.h @@ -48,11 +48,11 @@ gpointer ea_cell_table_get_cell_at_index (EaCellTable * cell_data, gboolean ea_cell_table_set_cell_at_index (EaCellTable * cell_data, gint index, gpointer cell); -G_CONST_RETURN gchar* +G_CONST_RETURN gchar * ea_cell_table_get_column_label (EaCellTable * cell_data, gint column); void ea_cell_table_set_column_label (EaCellTable * cell_data, gint column, const gchar *label); -G_CONST_RETURN gchar* +G_CONST_RETURN gchar * ea_cell_table_get_row_label (EaCellTable * cell_data, gint row); void ea_cell_table_set_row_label (EaCellTable * cell_data, gint row, const gchar *label); diff --git a/a11y/ea-factory.h b/a11y/ea-factory.h index dcf6a1382f..2331f54a0b 100644 --- a/a11y/ea-factory.h +++ b/a11y/ea-factory.h @@ -78,7 +78,7 @@ type_as_function ## _factory_get_type (void) \ \ if (!t) \ { \ - char *name; \ + gchar *name; \ static const GTypeInfo tinfo = \ { \ sizeof (AtkObjectFactoryClass), \ diff --git a/a11y/gal-a11y-factory.h b/a11y/gal-a11y-factory.h index 1ef8292eba..678689c2a4 100644 --- a/a11y/gal-a11y-factory.h +++ b/a11y/gal-a11y-factory.h @@ -66,7 +66,7 @@ type_as_function ## _factory_get_type (void) \ \ if (!t) \ { \ - char *name; \ + gchar *name; \ static const GTypeInfo tinfo = \ { \ sizeof (AtkObjectFactoryClass), \ diff --git a/a11y/gal-a11y-util.h b/a11y/gal-a11y-util.h index dedad9e049..87a9f15981 100644 --- a/a11y/gal-a11y-util.h +++ b/a11y/gal-a11y-util.h @@ -30,7 +30,7 @@ GType gal_a11y_type_register_static_with_private (GType parent_type, const gchar *type_name, GTypeInfo *info, GTypeFlags flags, - int priv_size, + gint priv_size, gint *priv_offset); #endif /* ! __GAL_A11Y_UTIL_H__ */ diff --git a/a11y/widgets/ea-calendar-cell.c b/a11y/widgets/ea-calendar-cell.c index 5b4e9f1d8c..ab103bf1ef 100644 --- a/a11y/widgets/ea-calendar-cell.c +++ b/a11y/widgets/ea-calendar-cell.c @@ -80,7 +80,7 @@ e_calendar_cell_new (ECalendarItem *calitem, gint row, gint column) cell->column = column; #ifdef ACC_DEBUG - g_print ("EvoAcc: e_calendar_cell created %p\n", (void *)cell); + g_print ("EvoAcc: e_calendar_cell created %p\n", (gpointer)cell); #endif return cell; @@ -91,8 +91,8 @@ e_calendar_cell_new (ECalendarItem *calitem, gint row, gint column) static void ea_calendar_cell_class_init (EaCalendarCellClass *klass); static void ea_calendar_cell_init (EaCalendarCell *a11y); -static G_CONST_RETURN gchar* ea_calendar_cell_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_calendar_cell_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_cell_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_cell_get_description (AtkObject *accessible); static AtkObject * ea_calendar_cell_get_parent (AtkObject *accessible); static gint ea_calendar_cell_get_index_in_parent (AtkObject *accessible); static AtkStateSet *ea_calendar_cell_ref_state_set (AtkObject *accessible); @@ -209,7 +209,7 @@ static void ea_calendar_cell_finalize (GObject *object) } #endif -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_cell_get_name (AtkObject *accessible) { GObject *g_obj; @@ -243,7 +243,7 @@ ea_calendar_cell_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_cell_get_description (AtkObject *accessible) { return ea_calendar_cell_get_name (accessible); diff --git a/a11y/widgets/ea-calendar-item.c b/a11y/widgets/ea-calendar-item.c index fdb109d5e6..17795c51a5 100644 --- a/a11y/widgets/ea-calendar-item.c +++ b/a11y/widgets/ea-calendar-item.c @@ -38,8 +38,8 @@ static void ea_calendar_item_class_init (EaCalendarItemClass *klass); static void ea_calendar_item_finalize (GObject *object); -static G_CONST_RETURN gchar* ea_calendar_item_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar* ea_calendar_item_get_description (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_item_get_name (AtkObject *accessible); +static G_CONST_RETURN gchar * ea_calendar_item_get_description (AtkObject *accessible); static gint ea_calendar_item_get_n_children (AtkObject *accessible); static AtkObject *ea_calendar_item_ref_child (AtkObject *accessible, gint index); static AtkStateSet* ea_calendar_item_ref_state_set (AtkObject *accessible); @@ -88,10 +88,10 @@ static AtkObject* table_interface_get_column_header (AtkTable *table, gint in_col); static AtkObject* table_interface_get_caption (AtkTable *table); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col); -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row); static AtkObject* table_interface_get_summary (AtkTable *table); @@ -263,7 +263,7 @@ ea_calendar_item_finalize (GObject *object) #endif } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_item_get_name (AtkObject *accessible) { GObject *g_obj; @@ -329,7 +329,7 @@ ea_calendar_item_get_name (AtkObject *accessible) return accessible->name; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_calendar_item_get_description (AtkObject *accessible) { if (accessible->description) @@ -782,7 +782,7 @@ table_interface_get_caption (AtkTable *table) return NULL; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_column_description (AtkTable *table, gint in_col) { AtkGObjectAccessible *atk_gobj; @@ -816,7 +816,7 @@ table_interface_get_column_description (AtkTable *table, gint in_col) return description; } -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * table_interface_get_row_description (AtkTable *table, gint row) { AtkGObjectAccessible *atk_gobj; diff --git a/a11y/widgets/ea-combo-button.c b/a11y/widgets/ea-combo-button.c index c5180c3927..e25aa7f377 100644 --- a/a11y/widgets/ea-combo-button.c +++ b/a11y/widgets/ea-combo-button.c @@ -37,7 +37,7 @@ enum { }; /* Static functions */ -static G_CONST_RETURN gchar* +static G_CONST_RETURN gchar * ea_combo_button_get_name (AtkObject *a11y) { GtkWidget *widget; diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index aa7bb74c6a..c82726276c 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -96,7 +96,7 @@ static EContactField priority [] = { E_CONTACT_FIELD_LAST }; -static int priority_label [] = { +static gint priority_label [] = { LABEL_WORK, LABEL_HOME, LABEL_FAX, @@ -168,10 +168,10 @@ struct _EAddrConduitCfg { * this function (see e_pilot_utf8_to_pchar() in e-pilot-util.c) */ static int -e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *category) +e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *category) { - int i, j; - int retval = 0; /* 0 is the Unfiled category */ + gint i, j; + gint retval = 0; /* 0 is the Unfiled category */ LOG(g_message("e_pilot_add_category_if_possible\n")); for(i=0; i<PILOT_MAX_CATEGORIES; i++){ @@ -179,14 +179,14 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ the PalmOS doesn't let 0-length strings for categories */ if(strlen(category->name[i]) == 0){ - int cat_to_add_len; - int desktopUniqueID; + gint cat_to_add_len; + gint desktopUniqueID; cat_to_add_len = strlen(cat_to_add); retval = i; if(cat_to_add_len > 15){ - char tmpstr[16]; + gchar tmpstr[16]; strncpy(tmpstr, cat_to_add,16); tmpstr[16] = '\0'; /* Have to truncate the category name */ @@ -214,7 +214,7 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ * we don't have much use for it at present. */ for (desktopUniqueID = 128; desktopUniqueID <= 255; desktopUniqueID++) { - int found = 0; + gint found = 0; for(j=0; j<PILOT_MAX_CATEGORIES; j++){ if (category->ID[j] == desktopUniqueID) { found = 1; @@ -252,22 +252,22 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ * is set to zero ("Unfiled"). */ static -void e_pilot_local_category_to_remote(int * pilotCategory, +void e_pilot_local_category_to_remote(gint * pilotCategory, EContact *contact, struct CategoryAppInfo *category) { GList *c_list = NULL, *l; - char * category_string, *first_category = NULL; - int i; + gchar * category_string, *first_category = NULL; + gint i; *pilotCategory = 0; /* default to "Unfiled" */ c_list = e_contact_get (contact, E_CONTACT_CATEGORY_LIST); if (c_list) { /* remember the first category */ - first_category = e_pilot_utf8_to_pchar((const char *)c_list->data); + first_category = e_pilot_utf8_to_pchar((const gchar *)c_list->data); } l = c_list; while(l && *pilotCategory == 0) { /* list != 0, so at least 1 category is assigned */ - category_string = e_pilot_utf8_to_pchar((const char *)l->data); + category_string = e_pilot_utf8_to_pchar((const gchar *)l->data); for (i=0; i < PILOT_MAX_CATEGORIES; i++) { /* only 15 chars + nul in palm category name */ if (strncmp(category_string,category->name[i], 15) == 0) { @@ -297,10 +297,10 @@ void e_pilot_local_category_to_remote(int * pilotCategory, * conversion from a palm category to an evolution category */ static -void e_pilot_remote_category_to_local(int pilotCategory, +void e_pilot_remote_category_to_local(gint pilotCategory, EContact *contact, struct CategoryAppInfo *category) { - char *category_string = NULL; + gchar *category_string = NULL; if (pilotCategory != 0) { /* pda has category assigned */ @@ -345,17 +345,17 @@ void e_pilot_remote_category_to_local(int pilotCategory, } } -static char * -build_setup_path (const char *path, const char *key) +static gchar * +build_setup_path (const gchar *path, const gchar *key) { return g_strconcat ("/apps/evolution/conduit", "/", path, "/", key, NULL); } static gboolean -e_pilot_setup_get_bool (const char *path, const char *key, gboolean def) +e_pilot_setup_get_bool (const gchar *path, const gchar *key, gboolean def) { gboolean res = def; - char *full_path; + gchar *full_path; GConfValue *value; GConfClient *gconf; @@ -380,10 +380,10 @@ e_pilot_setup_get_bool (const char *path, const char *key, gboolean def) } static void -e_pilot_setup_set_bool (const char *path, const char *key, gboolean value) +e_pilot_setup_set_bool (const gchar *path, const gchar *key, gboolean value) { GError *error = NULL; - char *full_path; + gchar *full_path; GConfClient *gconf; g_return_if_fail (path != NULL); @@ -403,11 +403,11 @@ e_pilot_setup_set_bool (const char *path, const char *key, gboolean value) } } -static char * -e_pilot_setup_get_string (const char *path, const char *key, const char *def) +static gchar * +e_pilot_setup_get_string (const gchar *path, const gchar *key, const gchar *def) { - char *res = g_strdup (def); - char *full_path; + gchar *res = g_strdup (def); + gchar *full_path; GConfValue *value; GConfClient *gconf; @@ -434,10 +434,10 @@ e_pilot_setup_get_string (const char *path, const char *key, const char *def) } static void -e_pilot_setup_set_string (const char *path, const char *key, const char *value) +e_pilot_setup_set_string (const gchar *path, const gchar *key, const gchar *value) { GError *error = NULL; - char *full_path; + gchar *full_path; GConfClient *gconf; g_return_if_fail (path != NULL); @@ -578,7 +578,7 @@ e_addr_gui_new (EPilotSettings *ps) EAddrConduitGui *gui; GtkWidget *lbl; gint rows, i; - static const char *items[] = {"Business", "Home", "Other", NULL}; + static const gchar *items[] = {"Business", "Home", "Other", NULL}; g_return_val_if_fail (ps != NULL, NULL); g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL); @@ -603,7 +603,7 @@ e_addr_gui_new (EPilotSettings *ps) return gui; } -static const int default_address_map[] = { +static const gint default_address_map[] = { E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_HOME, E_CONTACT_ADDRESS_OTHER, @@ -721,7 +721,7 @@ e_addr_context_destroy (EAddrConduitContext *ctxt) static const gchar * print_local (EAddrLocalRecord *local) { - static char buff[ 4096 ]; + static gchar buff[ 4096 ]; if (local == NULL) { sprintf (buff, "[NULL]"); @@ -742,9 +742,9 @@ print_local (EAddrLocalRecord *local) return ""; } -static char *print_remote (GnomePilotRecord *remote) +static gchar *print_remote (GnomePilotRecord *remote) { - static char buff[ 4096 ]; + static gchar buff[ 4096 ]; struct Address addr; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; @@ -786,10 +786,10 @@ static char *print_remote (GnomePilotRecord *remote) } /* Utility routines */ -static char * +static gchar * map_name (EAddrConduitContext *ctxt) { - char *filename = NULL; + gchar *filename = NULL; filename = g_strdup_printf ("%s/.evolution/addressbook/local/system/pilot-map-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id); @@ -951,15 +951,15 @@ is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local) EContactField next_mail, next_home, next_work, next_fax; EContactField next_other, next_main, next_pager, next_mobile; gboolean syncable = TRUE; - int i, l = 0; + gint i, l = 0; /* See if there are fields we can't sync or not in priority order */ get_next_init (&next_mail, &next_home, &next_work, &next_fax, &next_other, &next_main, &next_pager, &next_mobile); for (i = entryPhone1; i <= entryPhone5 && syncable; i++) { - int phonelabel = local->addr->phoneLabel[i - entryPhone1]; - const char *phone_str = local->addr->entry[i]; + gint phonelabel = local->addr->phoneLabel[i - entryPhone1]; + const gchar *phone_str = local->addr->entry[i]; gboolean empty = !(phone_str && *phone_str); if (empty) @@ -1029,9 +1029,9 @@ is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local) } static void -set_contact_text (EContact *contact, EContactField field, struct Address address, int entry) +set_contact_text (EContact *contact, EContactField field, struct Address address, gint entry) { - char *text = NULL; + gchar *text = NULL; if (address.entry[entry]) text = e_pilot_utf8_from_pchar (address.entry[entry]); @@ -1041,8 +1041,8 @@ set_contact_text (EContact *contact, EContactField field, struct Address address g_free (text); } -static char * -get_entry_text (struct Address address, int entry) +static gchar * +get_entry_text (struct Address address, gint entry) { if (address.entry[entry]) return e_pilot_utf8_from_pchar (address.entry[entry]); @@ -1051,7 +1051,7 @@ get_entry_text (struct Address address, int entry) } static void -clear_entry_text (struct Address address, int field) +clear_entry_text (struct Address address, gint field) { if (address.entry[field]) { free (address.entry[field]); @@ -1060,7 +1060,7 @@ clear_entry_text (struct Address address, int field) } static void -compute_status (EAddrConduitContext *ctxt, EAddrLocalRecord *local, const char *uid) +compute_status (EAddrConduitContext *ctxt, EAddrLocalRecord *local, const gchar *uid) { EBookChange *ebc; @@ -1095,7 +1095,7 @@ local_record_to_pilot_record (EAddrLocalRecord *local, #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #else - static char record[0xffff]; + static gchar record[0xffff]; #endif g_assert (local->addr != NULL ); @@ -1127,7 +1127,7 @@ local_record_to_pilot_record (EAddrLocalRecord *local, pi_buffer_free(buffer); #else - p.record = (unsigned char *)record; + p.record = (guchar *)record; p.length = pack_Address (local->addr, p.record, 0xffff); #endif return p; @@ -1137,10 +1137,10 @@ static void local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrConduitContext *ctxt) { EContactAddress *address = NULL; - int phone = entryPhone1; + gint phone = entryPhone1; EContactField field; gboolean syncable; - int i; + gint i; g_return_if_fail (local != NULL); g_return_if_fail (contact != NULL); @@ -1157,7 +1157,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui */ if (local->local.ID != 0) { struct Address addr; - int cat = 0; + gint cat = 0; #ifdef PILOT_LINK_0_12 pi_buffer_t * record; record = pi_buffer_new(DLP_BUF_SIZE); @@ -1166,7 +1166,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui return; } #else - char record[0xffff]; + gchar record[0xffff]; #endif if (dlp_ReadRecordById (ctxt->dbi->pilot_socket, @@ -1183,7 +1183,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui #ifdef PILOT_LINK_0_12 unpack_Address (&addr, record, address_v1); #else - unpack_Address (&addr, (unsigned char *)record, 0xffff); + unpack_Address (&addr, (guchar *)record, 0xffff); #endif for (i = 0; i < 5; i++) { if (addr.entry[entryPhone1 + i]) @@ -1224,7 +1224,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui } if (address) { - char *add; + gchar *add; /* If the address has 2 lines, make sure both get added */ if (address->ext != NULL && @@ -1258,7 +1258,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui /* Sync by priority */ for (i = 0, phone = entryPhone1; priority[i] != E_CONTACT_FIELD_LAST && phone <= entryPhone5; i++) { - const char *phone_str; + const gchar *phone_str; phone_str = e_contact_get_const (contact, priority[i]); if (phone_str && *phone_str) { @@ -1281,8 +1281,8 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui /* Not completely syncable, so do the best we can */ for (i = entryPhone1; i <= entryPhone5; i++) { - int phonelabel = local->addr->phoneLabel[i - entryPhone1]; - const char *phone_str = NULL; + gint phonelabel = local->addr->phoneLabel[i - entryPhone1]; + const gchar *phone_str = NULL; if (phonelabel == LABEL_EMAIL && !is_next_done (next_mail)) { phone_str = e_contact_get_const (contact, next_mail); @@ -1323,11 +1323,11 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui static void local_record_from_uid (EAddrLocalRecord *local, - const char *uid, + const gchar *uid, EAddrConduitContext *ctxt) { EContact *contact = NULL; - const char *cuid; + const gchar *cuid; GList *l; g_assert (local != NULL); @@ -1362,10 +1362,10 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, EContactName *name; EContactAddress *eaddress; EContactField mailing_address; - char *txt, *find, *full_name; + gchar *txt, *find, *full_name; EContactField next_mail, next_home, next_work, next_fax; EContactField next_other, next_main, next_pager, next_mobile; - int i; + gint i; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #endif @@ -1460,8 +1460,8 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, &next_other, &next_main, &next_pager, &next_mobile); for (i = entryPhone1; i <= entryPhone5; i++) { - int phonelabel = address.phoneLabel[i - entryPhone1]; - char *phonenum = get_entry_text (address, i); + gint phonelabel = address.phoneLabel[i - entryPhone1]; + gchar *phonenum = get_entry_text (address, i); if (phonelabel == LABEL_EMAIL && !is_next_done (next_mail)) { e_contact_set (contact, next_mail, phonenum); @@ -1504,8 +1504,8 @@ static void check_for_slow_setting (GnomePilotConduit *c, EAddrConduitContext *ctxt) { GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c); - int map_count; - const char *uri; + gint map_count; + const gchar *uri; map_count = g_hash_table_size (ctxt->map->pid_map); if (map_count == 0) @@ -1580,15 +1580,15 @@ pre_sync (GnomePilotConduit *conduit, GnomePilotConduitSyncAbs *abs_conduit; EBookQuery *query; GList *l; - int len; - char *filename; - char *change_id; - char *auth; + gint len; + gchar *filename; + gchar *change_id; + gchar *auth; gint num_records, add_records = 0, mod_records = 0, del_records = 0; #ifdef PILOT_LINK_0_12 pi_buffer_t *buffer; #else - unsigned char *buf; + guchar *buf; #endif abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit); @@ -1645,7 +1645,7 @@ pre_sync (GnomePilotConduit *conduit, for (l = ctxt->changed; l != NULL; l = l->next) { EBookChange *ebc = l->data; - const char *uid; + const gchar *uid; uid = e_contact_get_const (ebc->contact, E_CONTACT_UID); if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) { @@ -1684,9 +1684,9 @@ pre_sync (GnomePilotConduit *conduit, len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, DLP_BUF_SIZE, buffer); #else - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, - (unsigned char *)buf, 0xffff); + (guchar *)buf, 0xffff); #endif if (len < 0) { WARN (_("Could not read pilot's Address application block")); @@ -1717,18 +1717,18 @@ post_sync (GnomePilotConduit *conduit, { GList *changed; gchar *filename, *change_id; - unsigned char *buf; - int dlpRetVal, len; + guchar *buf; + gint dlpRetVal, len; LOG (g_message ( "post_sync: Address Conduit v.%s", CONDUIT_VERSION )); /* Write AppBlock to PDA - updates categories */ - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = pack_AddressAppInfo (&(ctxt->ai), buf, 0xffff); dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle, - (unsigned char *)buf, len); + (guchar *)buf, len); g_free (buf); @@ -1779,7 +1779,7 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit, EAddrLocalRecord *local, EAddrConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_status_cleared: clearing status\n" )); @@ -1795,7 +1795,7 @@ for_each (GnomePilotConduitSyncAbs *conduit, EAddrConduitContext *ctxt) { static GList *cards, *iterator; - static int count; + static gint count; g_return_val_if_fail (local != NULL, -1); @@ -1845,7 +1845,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit, EAddrConduitContext *ctxt) { static GList *iterator; - static int count; + static gint count; g_return_val_if_fail (local != NULL, 0); @@ -1899,7 +1899,7 @@ compare (GnomePilotConduitSyncAbs *conduit, EAddrConduitContext *ctxt) { GnomePilotRecord local_pilot; - int retval = 0; + gint retval = 0; LOG (g_message ("compare: local=%s remote=%s...\n", print_local (local), print_remote (remote))); @@ -1927,7 +1927,7 @@ add_record (GnomePilotConduitSyncAbs *conduit, EAddrConduitContext *ctxt) { EContact *contact; - int retval = 0; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1958,8 +1958,8 @@ replace_record (GnomePilotConduitSyncAbs *conduit, { EContact *new_contact; EBookChange *ebc; - char *old_id; - int retval = 0; + gchar *old_id; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1990,7 +1990,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit, /* Adding a record causes wombat to assign a new uid so we must tidy */ if (ebc && ebc->change_type == E_BOOK_CHANGE_CARD_DELETED) { - const char *uid = e_contact_get_const (local->contact, E_CONTACT_UID); + const gchar *uid = e_contact_get_const (local->contact, E_CONTACT_UID); gboolean arch; arch = e_pilot_map_uid_is_archived (ctxt->map, uid); @@ -2016,7 +2016,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit, EAddrConduitContext *ctxt) { GError *error = NULL; - int retval = 0; + gint retval = 0; g_return_val_if_fail (local != NULL, -1); g_return_val_if_fail (local->contact != NULL, -1); @@ -2040,7 +2040,7 @@ archive_record (GnomePilotConduitSyncAbs *conduit, gboolean archive, EAddrConduitContext *ctxt) { - int retval = 0; + gint retval = 0; g_return_val_if_fail (local != NULL, -1); @@ -2057,7 +2057,7 @@ match (GnomePilotConduitSyncAbs *conduit, EAddrLocalRecord **local, EAddrConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ("match: looking for local copy of %s\n", print_remote (remote))); diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c index 2c1d5caa9b..ec715b7cb9 100644 --- a/addressbook/gui/component/addressbook-component.c +++ b/addressbook/gui/component/addressbook-component.c @@ -61,7 +61,7 @@ static BonoboObjectClass *parent_class = NULL; struct _AddressbookComponentPrivate { GConfClient *gconf_client; - char *base_directory; + gchar *base_directory; GList *views; }; @@ -71,7 +71,7 @@ ensure_sources (AddressbookComponent *component) ESourceList *source_list; ESourceGroup *on_this_computer; ESource *personal_source; - char *base_uri, *base_uri_proto, base_uri_proto_seventh; + gchar *base_uri, *base_uri_proto, base_uri_proto_seventh; const gchar *base_dir; personal_source = NULL; @@ -204,28 +204,28 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_sequence_set_release (list, FALSE); - list->_buffer[0].id = (char *) "contact"; + list->_buffer[0].id = (gchar *) "contact"; list->_buffer[0].description = _("New Contact"); - list->_buffer[0].menuDescription = (char *) C_("New", "_Contact"); + list->_buffer[0].menuDescription = (gchar *) C_("New", "_Contact"); list->_buffer[0].tooltip = _("Create a new contact"); list->_buffer[0].menuShortcut = 'c'; - list->_buffer[0].iconName = (char *) "contact-new"; + list->_buffer[0].iconName = (gchar *) "contact-new"; list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[1].id = (char *) "contact_list"; + list->_buffer[1].id = (gchar *) "contact_list"; list->_buffer[1].description = _("New Contact List"); - list->_buffer[1].menuDescription = (char *) C_("New", "Contact _List"); + list->_buffer[1].menuDescription = (gchar *) C_("New", "Contact _List"); list->_buffer[1].tooltip = _("Create a new contact list"); list->_buffer[1].menuShortcut = 'l'; - list->_buffer[1].iconName = (char *) "stock_contact-list"; + list->_buffer[1].iconName = (gchar *) "stock_contact-list"; list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[2].id = (char *) "address_book"; + list->_buffer[2].id = (gchar *) "address_book"; list->_buffer[2].description = _("New Address Book"); - list->_buffer[2].menuDescription = (char *) C_("New", "Address _Book"); + list->_buffer[2].menuDescription = (gchar *) C_("New", "Address _Book"); list->_buffer[2].tooltip = _("Create a new address book"); list->_buffer[2].menuShortcut = '\0'; - list->_buffer[2].iconName = (char *) "address-book-new"; + list->_buffer[2].iconName = (gchar *) "address-book-new"; list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER; return list; @@ -235,7 +235,7 @@ static void book_loaded_cb (EBook *book, EBookStatus status, gpointer data) { EContact *contact; - char *item_type_name = data; + gchar *item_type_name = data; if (status != E_BOOK_ERROR_OK) { /* XXX we really need a dialog here, but we don't have @@ -267,7 +267,7 @@ impl_requestCreateItem (PortableServer_Servant servant, EBook *book; GConfClient *gconf_client; ESourceList *source_list; - char *uid; + gchar *uid; if (!item_type_name || (strcmp (item_type_name, "address_book") && @@ -310,7 +310,7 @@ impl_requestCreateItem (PortableServer_Servant servant, static void impl_handleURI (PortableServer_Servant servant, - const char* uri, + const gchar * uri, CORBA_Environment *ev) { AddressbookComponent *addressbook_component = ADDRESSBOOK_COMPONENT (bonobo_object_from_servant (servant)); @@ -318,8 +318,8 @@ impl_handleURI (PortableServer_Servant servant, AddressbookView *view = NULL; GList *l; - char *src_uid = NULL; - char *contact_uid = NULL; + gchar *src_uid = NULL; + gchar *contact_uid = NULL; priv = addressbook_component->priv; l = g_list_last (priv->views); @@ -330,8 +330,8 @@ impl_handleURI (PortableServer_Servant servant, if (!strncmp (uri, "contacts:", 9)) { EUri *euri = e_uri_new (uri); - const char *p; - char *header, *content; + const gchar *p; + gchar *header, *content; size_t len, clen; p = euri->query; @@ -343,7 +343,7 @@ impl_handleURI (PortableServer_Servant servant, if (p[len] != '=') break; - header = (char *) p; + header = (gchar *) p; header[len] = '\0'; p += len + 1; @@ -462,7 +462,7 @@ static void addressbook_component_init (AddressbookComponent *component) { AddressbookComponentPrivate *priv; - static int first = TRUE; + static gint first = TRUE; priv = g_new0 (AddressbookComponentPrivate, 1); @@ -518,7 +518,7 @@ addressbook_component_peek_gconf_client (AddressbookComponent *component) return component->priv->gconf_client; } -const char * +const gchar * addressbook_component_peek_base_directory (AddressbookComponent *component) { g_return_val_if_fail (ADDRESSBOOK_IS_COMPONENT (component), NULL); diff --git a/addressbook/gui/component/addressbook-component.h b/addressbook/gui/component/addressbook-component.h index 222ace82d7..4208994117 100644 --- a/addressbook/gui/component/addressbook-component.h +++ b/addressbook/gui/component/addressbook-component.h @@ -59,6 +59,6 @@ GType addressbook_component_get_type (void); AddressbookComponent *addressbook_component_peek (void); GConfClient *addressbook_component_peek_gconf_client (AddressbookComponent *component); -const char *addressbook_component_peek_base_directory (AddressbookComponent *component); +const gchar *addressbook_component_peek_base_directory (AddressbookComponent *component); #endif /* _ADDRESSBOOK_COMPONENT_H_ */ diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index ebb2d18b5d..46ab002ecb 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -75,8 +75,8 @@ #define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory:" BASE_VERSION #define LDAP_CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl:" BASE_VERSION -GtkWidget* supported_bases_create_table (char *name, char *string1, char *string2, - int num1, int num2); +GtkWidget* supported_bases_create_table (gchar *name, gchar *string1, gchar *string2, + gint num1, gint num2); /* default objectclasses */ #define TOP "top" @@ -152,7 +152,7 @@ ldap_unparse_auth (AddressbookLDAPAuthType auth_type) } static AddressbookLDAPAuthType -ldap_parse_auth (const char *auth) +ldap_parse_auth (const gchar *auth) { if (!auth) return ADDRESSBOOK_LDAP_AUTH_NONE; @@ -196,7 +196,7 @@ ldap_unparse_ssl (AddressbookLDAPSSLType ssl_type) } static AddressbookLDAPSSLType -ldap_parse_ssl (const char *ssl) +ldap_parse_ssl (const gchar *ssl) { if (!ssl) return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; /* XXX good default? */ @@ -209,7 +209,7 @@ ldap_parse_ssl (const char *ssl) return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; } -static const char * +static const gchar * ldap_get_ssl_tooltip (AddressbookLDAPSSLType ssl_type) { switch (ssl_type) { @@ -271,8 +271,8 @@ addressbook_ldap_init (GtkWidget *window, ESource *source) LDAP *ldap; gchar *host; gint port; - int ldap_error; - int protocol_version = LDAP_VERSION3; + gint ldap_error; + gint protocol_version = LDAP_VERSION3; if (!source_to_uri_parts (source, &host, NULL, NULL, NULL, &port)) return NULL; @@ -310,7 +310,7 @@ static int addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap, const gchar **attrs, LDAPMessage **resp) { - int ldap_error; + gint ldap_error; struct timeval timeout; timeout.tv_sec = (gint) gtk_adjustment_get_value (GTK_RANGE(dialog->timeout_scale)->adjustment); @@ -328,7 +328,7 @@ addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap, /* searching page */ GtkWidget* -supported_bases_create_table (char *name, char *string1, char *string2, int num1, int num2) +supported_bases_create_table (gchar *name, gchar *string1, gchar *string2, gint num1, gint num2) { GtkWidget *table, *scrolled; GtkTreeSelection *selection; @@ -359,10 +359,10 @@ do_ldap_root_dse_query (AddressbookSourceDialog *sdialog, GtkListStore *model, E { LDAP *ldap; const gchar *attrs[2]; - int ldap_error; - char **values; + gint ldap_error; + gchar **values; LDAPMessage *resp; - int i; + gint i; ldap = addressbook_ldap_init (sdialog->window, source); if (!ldap) @@ -419,7 +419,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) GtkWidget *supported_bases_table; GladeXML *gui; GtkTreeIter iter; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, GLADE_FILE_NAME, @@ -450,7 +450,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK && gtk_tree_selection_get_selected (selection, &model, &iter)) { - char *dn; + gchar *dn; gtk_tree_model_get (model, &iter, 0, &dn, -1); gtk_entry_set_text((GtkEntry *)sdialog->rootdn, dn); @@ -474,7 +474,7 @@ addressbook_config_create_new_source (GtkWidget *parent) static void eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) { - int id = gtk_combo_box_get_active(dropdown); + gint id = gtk_combo_box_get_active(dropdown); GtkTreeModel *model; GtkTreeIter iter; @@ -494,7 +494,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) if (!strncmp(e_source_group_peek_base_uri(sdialog->source_group), "groupwise:", 10)) { GSList *l; ESource *source; - char *tmp; + gchar *tmp; l = e_source_group_peek_sources(sdialog->source_group); if (l && l->data ) { @@ -510,7 +510,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) g_free (tmp); #ifdef HAVE_LDAP } else if (!strncmp(e_source_group_peek_base_uri(sdialog->source_group), "ldap:", 5)) { - char *tmp; + gchar *tmp; tmp = g_strdup_printf ("%s:%s/%s?" /* trigraph prevention */ "?%s", "", LDAP_PORT_STRING, @@ -529,7 +529,7 @@ eabc_type_changed(GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) } static GtkWidget * -eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkComboBox *dropdown; @@ -538,7 +538,7 @@ eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str GtkTreeIter iter; GSList *l; GtkWidget *w, *label; - int i, row = 0; + gint i, row = 0; if (old) return old; @@ -595,13 +595,13 @@ offline_status_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog) } static GtkWidget * -eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; - const char *uri; + const gchar *uri; GtkWidget *w; GladeXML *gui; - char *gladefile; + gchar *gladefile; if (old) return old; @@ -634,11 +634,11 @@ eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str static GtkWidget * -eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkWidget *offline_setting; - const char *offline_sync; + const gchar *offline_sync; gboolean is_local_book; is_local_book = g_str_has_prefix (e_source_group_peek_base_uri (sdialog->source_group), "file:"); @@ -701,7 +701,7 @@ host_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) static void port_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) { - const char *port = gtk_entry_get_text((GtkEntry *)w); + const gchar *port = gtk_entry_get_text((GtkEntry *)w); if (!strcmp (port, LDAPS_PORT_STRING)) { sdialog->ssl = ADDRESSBOOK_LDAP_SSL_ALWAYS; @@ -725,15 +725,15 @@ ssl_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) static GtkWidget * -eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; - const char *tmp; + const gchar *tmp; GtkWidget *w; - char *uri, port[16]; + gchar *uri, port[16]; LDAPURLDesc *lud; GladeXML *gui; - char *gladefile; + gchar *gladefile; if (!source_group_is_remote(sdialog->source_group)) return NULL; @@ -783,7 +783,7 @@ eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str static void auth_entry_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) { - const char *principal = gtk_entry_get_text((GtkEntry *)w); + const gchar *principal = gtk_entry_get_text((GtkEntry *)w); /* seems messy ... but the api is */ switch (sdialog->auth) { @@ -814,13 +814,13 @@ auth_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) } static GtkWidget * -eabc_general_auth(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eabc_general_auth(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkWidget *w; - const char *tmp; + const gchar *tmp; GladeXML *gui; - char *gladefile; + gchar *gladefile; if (!source_group_is_remote(sdialog->source_group)) return NULL; @@ -883,14 +883,14 @@ scope_combobox_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) } static GtkWidget * -eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkWidget *w; LDAPURLDesc *lud; - char *uri; + gchar *uri; GladeXML *gui; - char *gladefile; + gchar *gladefile; if (!source_group_is_remote(sdialog->source_group)) return NULL; @@ -951,7 +951,7 @@ eabc_details_search(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, s static void timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) { - char *timeout; + gchar *timeout; timeout = g_strdup_printf("%f", gtk_adjustment_get_value(((GtkRange *)sdialog->timeout_scale)->adjustment)); e_source_set_property(sdialog->source, "timeout", timeout); @@ -961,7 +961,7 @@ timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) static void limit_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) { - char limit[16]; + gchar limit[16]; sprintf(limit, "%d", gtk_spin_button_get_value_as_int((GtkSpinButton *)sdialog->limit_spinbutton)); e_source_set_property(sdialog->source, "limit", limit); @@ -977,13 +977,13 @@ canbrowse_toggled_cb (GtkWidget *toggle_button, ESource *source) } static GtkWidget * -eabc_details_limit(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eabc_details_limit(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { AddressbookSourceDialog *sdialog = data; GtkWidget *w; - const char *tmp; + const gchar *tmp; GladeXML *gui; - char *gladefile; + gchar *gladefile; if (!source_group_is_remote(sdialog->source_group)) return NULL; @@ -1045,18 +1045,18 @@ static EConfigItem eabc_new_items[] = { }; static void -eabc_commit(EConfig *ec, GSList *items, void *data) +eabc_commit(EConfig *ec, GSList *items, gpointer data) { AddressbookSourceDialog *sdialog = data; xmlNodePtr xml; #if d(!)0 - char *txt; + gchar *txt; #endif if (sdialog->original_source) { d(printf("committing addressbook changes\n")); /* these api's kinda suck */ - xml = xmlNewNode(NULL, (const unsigned char *)"dummy"); + xml = xmlNewNode(NULL, (const guchar *)"dummy"); e_source_dump_to_xml_node(sdialog->source, xml); e_source_update_from_xml_node(sdialog->original_source, xml->children, NULL); xmlFreeNode(xml); @@ -1079,7 +1079,7 @@ eabc_commit(EConfig *ec, GSList *items, void *data) } static void -eabc_free(EConfig *ec, GSList *items, void *data) +eabc_free(EConfig *ec, GSList *items, gpointer data) { AddressbookSourceDialog *sdialog = data; @@ -1098,11 +1098,11 @@ eabc_free(EConfig *ec, GSList *items, void *data) } static gboolean -eabc_check_complete(EConfig *ec, const char *pageid, void *data) +eabc_check_complete(EConfig *ec, const gchar *pageid, gpointer data) { AddressbookSourceDialog *sdialog = data; - int valid = TRUE; - const char *tmp; + gint valid = TRUE; + const gchar *tmp; ESource *source; d(printf("check complete, pageid = '%s'\n", pageid?pageid:"<all>")); @@ -1114,7 +1114,7 @@ eabc_check_complete(EConfig *ec, const char *pageid, void *data) #ifdef HAVE_LDAP if (valid && source_group_is_remote(sdialog->source_group)) { - char *uri = e_source_get_uri(sdialog->source); + gchar *uri = e_source_get_uri(sdialog->source); LDAPURLDesc *lud; /* check host and port set */ @@ -1158,7 +1158,7 @@ eabc_check_complete(EConfig *ec, const char *pageid, void *data) static void source_changed(ESource *source, AddressbookSourceDialog *sdialog) { - char *xml; + gchar *xml; xml = e_source_to_standalone_xml(source); printf("source changed:\n%s\n", xml); @@ -1171,11 +1171,11 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) { AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1); EABConfig *ec; - int i; + gint i; GSList *items = NULL; EABConfigTargetSource *target; - char *xml; - char *gladefile; + gchar *xml; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, GLADE_FILE_NAME, diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index ca691761c9..8017e8979f 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -106,7 +106,7 @@ dialog_close (MigrationContext *context) } static void -dialog_set_label (MigrationContext *context, const char *str) +dialog_set_label (MigrationContext *context, const gchar *str) { gtk_label_set_text (GTK_LABEL (context->label), str); @@ -119,9 +119,9 @@ dialog_set_label (MigrationContext *context, const char *str) } static void -dialog_set_folder_name (MigrationContext *context, const char *folder_name) +dialog_set_folder_name (MigrationContext *context, const gchar *folder_name) { - char *text; + gchar *text; text = g_strdup_printf (_("Migrating '%s':"), folder_name); gtk_label_set_text (GTK_LABEL (context->folder_label), text); @@ -140,7 +140,7 @@ dialog_set_folder_name (MigrationContext *context, const char *folder_name) static void dialog_set_progress (MigrationContext *context, double percent) { - char text[5]; + gchar text[5]; snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f)); @@ -156,7 +156,7 @@ dialog_set_progress (MigrationContext *context, double percent) } static gboolean -check_for_conflict (ESourceGroup *group, char *name) +check_for_conflict (ESourceGroup *group, gchar *name) { GSList *sources; GSList *s; @@ -173,16 +173,16 @@ check_for_conflict (ESourceGroup *group, char *name) return FALSE; } -static char * -get_source_name (ESourceGroup *group, const char *path) +static gchar * +get_source_name (ESourceGroup *group, const gchar *path) { #ifndef G_OS_WIN32 - char **p = g_strsplit (path, "/", 0); + gchar **p = g_strsplit (path, "/", 0); #else - char **p = g_strsplit_set (path, "\\/", 0); + gchar **p = g_strsplit_set (path, "\\/", 0); #endif - int i, j, starting_index; - int num_elements; + gint i, j, starting_index; + gint num_elements; gboolean conflict; GString *s = g_string_new (""); @@ -227,8 +227,8 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) { EBookQuery *query = e_book_query_any_field_contains (""); GList *l, *contacts; - int num_added = 0; - int num_contacts; + gint num_added = 0; + gint num_contacts; /* both books are loaded, start the actual migration */ e_book_get_contacts (old_book, query, &contacts, NULL); @@ -341,7 +341,7 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) "OTHER"); if (v && v->data) { - if (!strncmp ((char*)v->data, "<?xml", 5)) { + if (!strncmp ((gchar *)v->data, "<?xml", 5)) { /* k, this is the nasty part. we glomb all the value strings back together again (if there is more than one), then work our magic */ @@ -381,9 +381,9 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) } static void -migrate_contact_folder_to_source (MigrationContext *context, char *old_path, ESource *new_source) +migrate_contact_folder_to_source (MigrationContext *context, gchar *old_path, ESource *new_source) { - char *old_uri = g_filename_to_uri (old_path, NULL, NULL); + gchar *old_uri = g_filename_to_uri (old_path, NULL, NULL); GError *e = NULL; EBook *old_book = NULL, *new_book = NULL; @@ -423,7 +423,7 @@ migrate_contact_folder_to_source (MigrationContext *context, char *old_path, ESo } static void -migrate_contact_folder (MigrationContext *context, char *old_path, ESourceGroup *dest_group, char *source_name) +migrate_contact_folder (MigrationContext *context, gchar *old_path, ESourceGroup *dest_group, gchar *source_name) { ESource *new_source; @@ -449,7 +449,7 @@ create_groups (MigrationContext *context, { GSList *groups; ESourceGroup *group; - char *base_uri, *base_uri_proto; + gchar *base_uri, *base_uri_proto; const gchar *base_dir; *on_this_computer = NULL; @@ -528,9 +528,9 @@ create_groups (MigrationContext *context, static gboolean migrate_local_folders (MigrationContext *context, ESourceGroup *on_this_computer, ESource *personal_source) { - char *old_path = NULL; + gchar *old_path = NULL; GSList *dirs, *l; - char *local_contact_folder = NULL; + gchar *local_contact_folder = NULL; old_path = g_strdup_printf ("%s/evolution/local", g_get_home_dir ()); @@ -542,15 +542,15 @@ migrate_local_folders (MigrationContext *context, ESourceGroup *on_this_computer NULL); for (l = dirs; l; l = l->next) { - char *source_name; + gchar *source_name; /* we handle the system folder differently */ - if (personal_source && !strcmp ((char*)l->data, local_contact_folder)) { + if (personal_source && !strcmp ((gchar *)l->data, local_contact_folder)) { g_hash_table_insert (context->folder_uid_map, g_strdup (l->data), g_strdup (e_source_peek_uid (personal_source))); migrate_contact_folder_to_source (context, local_contact_folder, personal_source); continue; } - source_name = get_source_name (on_this_computer, (char*)l->data); + source_name = get_source_name (on_this_computer, (gchar *)l->data); migrate_contact_folder (context, l->data, on_this_computer, source_name); g_free (source_name); } @@ -563,13 +563,13 @@ migrate_local_folders (MigrationContext *context, ESourceGroup *on_this_computer return TRUE; } -static char * +static gchar * get_string_child (xmlNode *node, - const char *name) + const gchar *name) { xmlNode *p; xmlChar *xml_string; - char *retval; + gchar *retval; p = e_xml_get_child_by_name (node, (xmlChar *) name); if (p == NULL) @@ -580,7 +580,7 @@ get_string_child (xmlNode *node, return g_strdup(""); xml_string = xmlNodeListGetString (node->doc, p, 1); - retval = g_strdup ((char *) xml_string); + retval = g_strdup ((gchar *) xml_string); xmlFree (xml_string); return retval; @@ -588,12 +588,12 @@ get_string_child (xmlNode *node, static int get_integer_child (xmlNode *node, - const char *name, - int defval) + const gchar *name, + gint defval) { xmlNode *p; xmlChar *xml_string; - int retval; + gint retval; p = e_xml_get_child_by_name (node, (xmlChar *) name); if (p == NULL) @@ -604,7 +604,7 @@ get_integer_child (xmlNode *node, return defval; xml_string = xmlNodeListGetString (node->doc, p, 1); - retval = atoi ((char *)xml_string); + retval = atoi ((gchar *)xml_string); xmlFree (xml_string); return retval; @@ -613,7 +613,7 @@ get_integer_child (xmlNode *node, static gboolean migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers) { - char *sources_xml = g_strdup_printf ("%s/evolution/addressbook-sources.xml", + gchar *sources_xml = g_strdup_printf ("%s/evolution/addressbook-sources.xml", g_get_home_dir ()); printf ("trying to migrate from %s\n", sources_xml); @@ -622,14 +622,14 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers) xmlDoc *doc = xmlParseFile (sources_xml); xmlNode *root; xmlNode *child; - int num_contactservers; - int servernum; + gint num_contactservers; + gint servernum; if (!doc) return FALSE; root = xmlDocGetRootElement (doc); - if (root == NULL || strcmp ((const char *)root->name, "addressbooks") != 0) { + if (root == NULL || strcmp ((const gchar *)root->name, "addressbooks") != 0) { xmlFreeDoc (doc); return FALSE; } @@ -637,7 +637,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers) /* count the number of servers, so we can give progress */ num_contactservers = 0; for (child = root->children; child; child = child->next) { - if (!strcmp ((const char *)child->name, "contactserver")) { + if (!strcmp ((const gchar *)child->name, "contactserver")) { num_contactservers++; } } @@ -647,11 +647,11 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers) servernum = 0; for (child = root->children; child; child = child->next) { - if (!strcmp ((const char *)child->name, "contactserver")) { - char *port, *host, *rootdn, *scope, *authmethod, *ssl; - char *emailaddr, *binddn, *limitstr; - int limit; - char *name, *description; + if (!strcmp ((const gchar *)child->name, "contactserver")) { + gchar *port, *host, *rootdn, *scope, *authmethod, *ssl; + gchar *emailaddr, *binddn, *limitstr; + gint limit; + gchar *name, *description; GString *uri = g_string_new (""); ESource *source; @@ -711,7 +711,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers) } static ESource* -get_source_by_name (ESourceList *source_list, const char *name) +get_source_by_name (ESourceList *source_list, const gchar *name) { GSList *groups; GSList *g; @@ -731,7 +731,7 @@ get_source_by_name (ESourceList *source_list, const char *name) for (s = sources; s; s = s->next) { ESource *source = E_SOURCE (s->data); - const char *source_name = e_source_peek_name (source); + const gchar *source_name = e_source_peek_name (source); if (!strcmp (name, source_name)) return source; @@ -744,7 +744,7 @@ get_source_by_name (ESourceList *source_list, const char *name) static gboolean migrate_completion_folders (MigrationContext *context) { - char *uris_xml = gconf_client_get_string (addressbook_component_peek_gconf_client (context->component), + gchar *uris_xml = gconf_client_get_string (addressbook_component_peek_gconf_client (context->component), "/apps/evolution/addressbook/completion/uris", NULL); @@ -761,14 +761,14 @@ migrate_completion_folders (MigrationContext *context) dialog_set_folder_name (context, _("Autocompletion Settings")); root = xmlDocGetRootElement (doc); - if (root == NULL || strcmp ((const char *)root->name, "EvolutionFolderList") != 0) { + if (root == NULL || strcmp ((const gchar *)root->name, "EvolutionFolderList") != 0) { xmlFreeDoc (doc); return FALSE; } for (child = root->children; child; child = child->next) { - if (!strcmp ((const char *)child->name, "folder")) { - char *physical_uri = e_xml_get_string_prop_by_name (child, (const unsigned char *)"physical-uri"); + if (!strcmp ((const gchar *)child->name, "folder")) { + gchar *physical_uri = e_xml_get_string_prop_by_name (child, (const guchar *)"physical-uri"); ESource *source = NULL; /* if the physical uri is file://... @@ -783,8 +783,8 @@ migrate_completion_folders (MigrationContext *context) for the uri. */ if (!strncmp (physical_uri, "file://", 7)) { - char *filename = g_filename_from_uri (physical_uri, NULL, NULL); - char *uid = NULL; + gchar *filename = g_filename_from_uri (physical_uri, NULL, NULL); + gchar *uid = NULL; if (filename) uid = g_hash_table_lookup (context->folder_uid_map, @@ -794,7 +794,7 @@ migrate_completion_folders (MigrationContext *context) source = e_source_list_peek_source_by_uid (context->source_list, uid); } else { - char *name = e_xml_get_string_prop_by_name (child, (const unsigned char *)"display-name"); + gchar *name = e_xml_get_string_prop_by_name (child, (const guchar *)"display-name"); source = get_source_by_name (context->source_list, name); @@ -833,14 +833,14 @@ migrate_contact_lists_for_local_folders (MigrationContext *context, ESourceGroup EBook *book; EBookQuery *query; GList *l, *contacts; - int num_contacts, num_converted; + gint num_contacts, num_converted; dialog_set_folder_name (context, e_source_peek_name (source)); book = e_book_new (source, NULL); if (!book || !e_book_open (book, TRUE, NULL)) { - char *uri = e_source_get_uri (source); + gchar *uri = e_source_get_uri (source); g_warning ("failed to migrate contact lists for source %s", uri); g_free (uri); continue; @@ -864,8 +864,8 @@ migrate_contact_lists_for_local_folders (MigrationContext *context, ESourceGroup GList *v = e_vcard_attribute_get_values (a); if (v && v->data) { - if (!strncmp ((char*)v->data, "<?xml", 5)) { - EDestination *dest = e_destination_import ((char*)v->data); + if (!strncmp ((gchar *)v->data, "<?xml", 5)) { + EDestination *dest = e_destination_import ((gchar *)v->data); e_destination_export_to_vcard_attribute (dest, a); @@ -908,14 +908,14 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup EBook *book; EBookQuery *query; GList *l, *contacts; - int num_contacts, num_converted; + gint num_contacts, num_converted; dialog_set_folder_name (context, e_source_peek_name (source)); book = e_book_new (source, NULL); if (!book || !e_book_open (book, TRUE, NULL)) { - char *uri = e_source_get_uri (source); + gchar *uri = e_source_get_uri (source); g_warning ("failed to migrate company phone numbers for source %s", uri); g_free (uri); continue; @@ -932,7 +932,7 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup GError *e = NULL; GList *attrs, *attr; gboolean converted = FALSE; - int num_work_voice = 0; + gint num_work_voice = 0; attrs = e_vcard_get_attributes (E_VCARD (contact)); for (attr = attrs; attr;) { @@ -1001,11 +1001,11 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup } static void -migrate_pilot_data (const char *old_path, const char *new_path) +migrate_pilot_data (const gchar *old_path, const gchar *new_path) { - const char *dent; - const char *ext; - char *filename; + const gchar *dent; + const gchar *ext; + gchar *filename; GDir *dir; if (!(dir = g_dir_open (old_path, 0, NULL))) @@ -1017,9 +1017,9 @@ migrate_pilot_data (const char *old_path, const char *new_path) (!strncmp (dent, "pilot-sync-evolution-addressbook-", 33) && ((ext = strrchr (dent, '.')) && !strcmp (ext, ".db")))) { /* src and dest file formats are identical for both map and changelog files */ - unsigned char inbuf[4096]; + guchar inbuf[4096]; size_t nread, nwritten; - int fd0, fd1; + gint fd0, fd1; ssize_t n; filename = g_build_filename (old_path, dent, NULL); @@ -1103,8 +1103,8 @@ migration_context_free (MigrationContext *context) g_free (context); } -int -addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, GError **err) +gint +addressbook_migrate (AddressbookComponent *component, gint major, gint minor, gint revision, GError **err) { ESourceGroup *on_this_computer; ESourceGroup *on_ldap_servers; @@ -1165,7 +1165,7 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int } if (minor < 5 || (minor == 5 && revision <= 10)) { - char *old_path, *new_path; + gchar *old_path, *new_path; dialog_set_label (context, _("Evolution's Palm Sync changelog and map files have changed.\n\n" "Please be patient while Evolution migrates your Pilot Sync data...")); diff --git a/addressbook/gui/component/addressbook-migrate.h b/addressbook/gui/component/addressbook-migrate.h index 5727b3d0ab..c10f29cfdd 100644 --- a/addressbook/gui/component/addressbook-migrate.h +++ b/addressbook/gui/component/addressbook-migrate.h @@ -28,6 +28,6 @@ struct _GError; -int addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, struct _GError **err); +gint addressbook_migrate (AddressbookComponent *component, gint major, gint minor, gint revision, struct _GError **err); #endif /* _ADDRESSBOOK_MIGRATE_H_ */ diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index e6b99c6405..379660c993 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -83,7 +83,7 @@ struct _AddressbookViewPrivate { EBook *book; guint activity_id; ESourceList *source_list; - char *passwd; + gchar *passwd; EUserCreatableItemsHandler *creatable_items_handler; EABMenu *menu; @@ -101,7 +101,7 @@ static GtkTargetEntry drag_types[] = { }; static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]); -static void set_status_message (EABView *eav, const char *message, AddressbookView *view); +static void set_status_message (EABView *eav, const gchar *message, AddressbookView *view); static void search_result (EABView *eav, EBookViewStatus status, AddressbookView *view); static void activate_source (AddressbookView *view, ESource *source); @@ -115,7 +115,7 @@ static ESource *get_primary_source (AddressbookView *view); typedef struct { GtkWidget *editor; - char *uid; + gchar *uid; AddressbookView *view; } EditorUidClosure; @@ -139,7 +139,7 @@ get_current_view (AddressbookView *view) } static void -save_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) +save_all_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -149,7 +149,7 @@ save_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +save_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -158,7 +158,7 @@ save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -view_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +view_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -167,7 +167,7 @@ view_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -delete_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +delete_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -176,7 +176,7 @@ delete_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -print_cb (BonoboUIComponent *uih, void *user_data, const char *path) +print_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -185,7 +185,7 @@ print_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -print_preview_cb (BonoboUIComponent *uih, void *user_data, const char *path) +print_preview_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -194,7 +194,7 @@ print_preview_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -stop_loading_cb (BonoboUIComponent *uih, void *user_data, const char *path) +stop_loading_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -203,7 +203,7 @@ stop_loading_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -cut_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) +cut_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -212,7 +212,7 @@ cut_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -copy_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) +copy_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -221,7 +221,7 @@ copy_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -paste_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) +paste_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -230,7 +230,7 @@ paste_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -select_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path) +select_all_contacts_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -239,7 +239,7 @@ select_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *pat } static void -send_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) +send_contact_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -248,7 +248,7 @@ send_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -send_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) +send_contact_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -257,7 +257,7 @@ send_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -copy_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) +copy_all_contacts_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -267,7 +267,7 @@ copy_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa } static void -copy_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) +copy_contact_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -276,7 +276,7 @@ copy_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -move_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) +move_all_contacts_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -285,7 +285,7 @@ move_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa } static void -move_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) +move_contact_to_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; EABView *v = get_current_view (view); @@ -294,7 +294,7 @@ move_contact_to_cb (BonoboUIComponent *uih, void *user_data, const char *path) } static void -forget_passwords_cb (BonoboUIComponent *uih, void *user_data, const char *path) +forget_passwords_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { e_passwords_forget_passwords(); } @@ -307,7 +307,7 @@ new_addressbook_folder (AddressbookView *view) } static void -new_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path) +new_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; new_addressbook_folder (view); @@ -356,7 +356,7 @@ delete_addressbook_folder (AddressbookView *view) } static void -delete_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path) +delete_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; if (view) @@ -369,7 +369,7 @@ edit_addressbook_folder (AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; ESource *selected_source; - const char *uid; + const gchar *uid; EditorUidClosure *closure; selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); @@ -380,7 +380,7 @@ edit_addressbook_folder (AddressbookView *view) closure = g_hash_table_lookup (priv->uid_to_editor, uid); if (!closure) { - char *uid_copy = g_strdup (uid); + gchar *uid_copy = g_strdup (uid); closure = g_new (EditorUidClosure, 1); closure->editor = addressbook_config_edit_source (gtk_widget_get_toplevel(priv->notebook), selected_source); @@ -400,7 +400,7 @@ edit_addressbook_folder (AddressbookView *view) } static void -edit_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path) +edit_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; if (view) @@ -413,8 +413,8 @@ rename_addressbook_folder (AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; ESource *source; - const char *old_name; - char *prompt, *new_name; + const gchar *old_name; + gchar *prompt, *new_name; gboolean done = FALSE; source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); @@ -441,7 +441,7 @@ rename_addressbook_folder (AddressbookView *view) } static void -rename_folder_cb (BonoboUIComponent *uih, void *user_data, const char *path) +rename_folder_cb (BonoboUIComponent *uih, gpointer user_data, const gchar *path) { AddressbookView *view = (AddressbookView *) user_data; if (view) @@ -453,7 +453,7 @@ folder_can_delete (AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; ESource *source ; - const char *source_uri; + const gchar *source_uri; source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); if(source) { @@ -468,7 +468,7 @@ folder_can_delete (AddressbookView *view) } static void -set_status_message (EABView *eav, const char *message, AddressbookView *view) +set_status_message (EABView *eav, const gchar *message, AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; EActivityHandler *activity_handler = priv->activity_handler; @@ -479,7 +479,7 @@ set_status_message (EABView *eav, const char *message, AddressbookView *view) priv->activity_id = 0; } } else if (priv->activity_id == 0) { - char *clientid = g_strdup_printf ("%p", (gpointer) view); + gchar *clientid = g_strdup_printf ("%p", (gpointer) view); priv->activity_id = e_activity_handler_operation_started ( activity_handler, clientid, message, TRUE); @@ -492,7 +492,7 @@ set_status_message (EABView *eav, const char *message, AddressbookView *view) } static void -set_folder_bar_message (EABView *eav, const char *message, AddressbookView *view) +set_folder_bar_message (EABView *eav, const gchar *message, AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; EABView *current_view = get_current_view (view); @@ -501,7 +501,7 @@ set_folder_bar_message (EABView *eav, const char *message, AddressbookView *view ESource *source = eav->source; if (source) { - const char *name = e_source_peek_name (source); + const gchar *name = e_source_peek_name (source); e_info_label_set_info((EInfoLabel*)priv->info_widget, name, message); } @@ -628,7 +628,7 @@ control_activate (BonoboControl *control, AddressbookViewPrivate *priv = view->priv; Bonobo_UIContainer remote_ui_container; EABView *v = get_current_view (view); - char *xmlfile; + gchar *xmlfile; remote_ui_container = bonobo_control_get_remote_ui_container (control, NULL); bonobo_ui_component_set_container (uic, remote_ui_container, NULL); @@ -684,7 +684,7 @@ control_activate_cb (BonoboControl *control, } static void -gather_uids_foreach (char *key, +gather_uids_foreach (gchar *key, gpointer value, GList **list) { @@ -701,7 +701,7 @@ source_list_changed_cb (ESourceList *source_list, AddressbookView *view) uids = NULL; g_hash_table_foreach (priv->uid_to_view, (GHFunc)gather_uids_foreach, &uids); for (l = uids; l; l = l->next) { - char *uid = l->data; + gchar *uid = l->data; if (e_source_list_peek_source_by_uid (source_list, uid)) { /* the source still exists, do nothing */ } @@ -721,7 +721,7 @@ source_list_changed_cb (ESourceList *source_list, AddressbookView *view) uids = NULL; g_hash_table_foreach (priv->uid_to_editor, (GHFunc)gather_uids_foreach, &uids); for (l = uids; l; l = l->next) { - char *uid = l->data; + gchar *uid = l->data; if (e_source_list_peek_source_by_uid (source_list, uid)) { /* the source still exists, do nothing */ } @@ -801,7 +801,7 @@ get_primary_source (AddressbookView *view) { AddressbookViewPrivate *priv = view->priv; ESource *source; - char *uid; + gchar *uid; uid = gconf_client_get_string (priv->gconf_client, "/apps/evolution/addressbook/display/primary_addressbook", @@ -867,7 +867,7 @@ book_removed (EBook *book, EBookStatus status, gpointer data) } static void -delete_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data) +delete_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data) { AddressbookView *view = data; AddressbookViewPrivate *priv = view->priv; @@ -903,13 +903,13 @@ delete_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data) } static void -new_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data) +new_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data) { addressbook_config_create_new_source (gtk_widget_get_toplevel(ep->target->widget)); } static void -rename_addressbook_cb (EPopup *ep, EPopupItem *pitem, void *data) +rename_addressbook_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { AddressbookView *view = data; ESourceSelector *selector; @@ -919,7 +919,7 @@ rename_addressbook_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -save_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data) +save_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data) { AddressbookView *view = data; EABView *v = get_current_view (view); @@ -928,7 +928,7 @@ save_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data) } static void -edit_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data) +edit_addressbook_cb(EPopup *ep, EPopupItem *pitem, gpointer data) { AddressbookView *view = data; if (view) @@ -958,7 +958,7 @@ static EPopupItem abv_source_popups[] = { }; static void -abv_source_popup_free(EPopup *ep, GSList *list, void *data) +abv_source_popup_free(EPopup *ep, GSList *list, gpointer data) { g_slist_free(list); } @@ -969,7 +969,7 @@ popup_event_callback(ESourceSelector *selector, ESource *source, GdkEventButton EABPopup *ep; EABPopupTargetSource *t; GSList *menus = NULL; - int i; + gint i; GtkMenu *menu; /** @HookPoint-EABPopup:Addressbook Source Selector Context Menu @@ -1035,7 +1035,7 @@ removed_contact_cb (EBook *book, EBookStatus status, gpointer closure) } static void -merged_contact_cb (EBook *book, EBookStatus status, const char *id, gpointer closure) +merged_contact_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure) { MergeContext *merge_context = closure; @@ -1088,7 +1088,7 @@ selector_tree_data_dropped (ESourceSelector *selector, } e_book_open (target_book, FALSE, NULL); - eab_book_and_contact_list_from_string ((char *)data->data, &source_book, &contactlist); + eab_book_and_contact_list_from_string ((gchar *)data->data, &source_book, &contactlist); v = get_current_view (view); g_object_get (v->model, "book",&source_book, NULL); @@ -1252,7 +1252,7 @@ addressbook_view_init (AddressbookView *view) } static void -destroy_editor (char *key, +destroy_editor (gchar *key, gpointer value, gpointer nada) { @@ -1342,7 +1342,7 @@ activate_source (AddressbookView *view, ESource *source) { AddressbookViewPrivate *priv = view->priv; - const char *uid; + const gchar *uid; GtkWidget *uid_view; EBook *book; BookOpenData *data; @@ -1496,8 +1496,8 @@ addressbook_view_peek_folder_view (AddressbookView *view) void addressbook_view_edit_contact (AddressbookView* view, - const char* source_uid, - const char* contact_uid) + const gchar * source_uid, + const gchar * contact_uid) { AddressbookViewPrivate *priv = view->priv; diff --git a/addressbook/gui/component/addressbook-view.h b/addressbook/gui/component/addressbook-view.h index 08bbbb3e99..bdb37e021a 100644 --- a/addressbook/gui/component/addressbook-view.h +++ b/addressbook/gui/component/addressbook-view.h @@ -59,7 +59,7 @@ GtkWidget *addressbook_view_peek_statusbar (AddressbookView *view BonoboControl *addressbook_view_peek_folder_view (AddressbookView *view); void addressbook_view_edit_contact (AddressbookView* view, - const char* source_id, - const char* contact_id); + const gchar * source_id, + const gchar * contact_id); #endif /* _ADDRESSBOOK_VIEW_H_ */ diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index f36012ab94..45790e15c0 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -57,10 +57,10 @@ free_load_source_data (LoadSourceData *data) /*this function removes of anything present after semicolon in uri*/ -static gchar* +static gchar * remove_parameters_from_uri (const gchar *uri) { - char *euri_str; + gchar *euri_str; EUri *euri; euri = e_uri_new (uri); @@ -167,8 +167,8 @@ static void addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *source, EBookCallback cb, gpointer closure) { - const char *password = NULL; - char *pass_dup = NULL; + const gchar *password = NULL; + gchar *pass_dup = NULL; const gchar *auth; const gchar *user; gchar *uri = remove_parameters_from_uri(e_book_get_uri (book)); @@ -197,8 +197,8 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc user = ""; if (!password) { - char *prompt; - char *password_prompt; + gchar *prompt; + gchar *password_prompt; gboolean remember; const gchar *failed_auth; guint32 flags = E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET|E_PASSWORDS_ONLINE; diff --git a/addressbook/gui/component/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c index f45f2228e1..9773f5bd5b 100644 --- a/addressbook/gui/component/autocompletion-config.c +++ b/addressbook/gui/component/autocompletion-config.c @@ -80,7 +80,7 @@ source_selection_changed (ESourceSelector *selector, } static void -config_control_destroy_notify (void *data, +config_control_destroy_notify (gpointer data, GObject *where_the_config_control_was) { AutocompletionConfig *ac = (AutocompletionConfig *) data; @@ -101,7 +101,7 @@ initialize_selection (AutocompletionConfig *ac) GSList *sources; for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) { ESource *source = E_SOURCE (sources->data); - const char *completion = e_source_get_property (source, "completion"); + const gchar *completion = e_source_get_property (source, "completion"); if (completion && !g_ascii_strcasecmp (completion, "true")) e_source_selector_select_source (E_SOURCE_SELECTOR (ac->control_widget), source); diff --git a/addressbook/gui/component/component-factory.c b/addressbook/gui/component/component-factory.c index 4d02cc3e6b..eddabd7b48 100644 --- a/addressbook/gui/component/component-factory.c +++ b/addressbook/gui/component/component-factory.c @@ -49,8 +49,8 @@ static BonoboObject * factory (BonoboGenericFactory *factory, - const char *component_id, - void *closure) + const gchar *component_id, + gpointer closure) { d(printf ("asked to activate component_id `%s'\n", component_id)); diff --git a/addressbook/gui/component/openldap-extract.h b/addressbook/gui/component/openldap-extract.h index 010589da1e..083fc0d162 100644 --- a/addressbook/gui/component/openldap-extract.h +++ b/addressbook/gui/component/openldap-extract.h @@ -48,7 +48,7 @@ #define LDAP_CALLOC(n,s) calloc((n),(s)) #define LDAP_REALLOC(p,s) realloc((p),(s)) #define LDAP_FREE(p) free((p)) -#define LDAP_VFREE(p) vfree((void **)(p)) +#define LDAP_VFREE(p) vfree((gpointer *)(p)) #define LDAP_STRDUP(s) strdup((s)) #define LDAP_RANGE(n,x,y) (((x) <= (n)) && ((n) <= (y))) @@ -87,21 +87,21 @@ #define LDAP_SCHEMA_SKIP 0x80U /* Don't malloc any result */ typedef struct ldap_objectclass { - char *oc_oid; /* REQUIRED */ - char **oc_names; /* OPTIONAL */ - char *oc_desc; /* OPTIONAL */ - int oc_obsolete; /* 0=no, 1=yes */ - char **oc_sup_oids; /* OPTIONAL */ - int oc_kind; /* 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY */ - char **oc_at_oids_must; /* OPTIONAL */ - char **oc_at_oids_may; /* OPTIONAL */ + gchar *oc_oid; /* REQUIRED */ + gchar **oc_names; /* OPTIONAL */ + gchar *oc_desc; /* OPTIONAL */ + gint oc_obsolete; /* 0=no, 1=yes */ + gchar **oc_sup_oids; /* OPTIONAL */ + gint oc_kind; /* 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY */ + gchar **oc_at_oids_must; /* OPTIONAL */ + gchar **oc_at_oids_may; /* OPTIONAL */ } LDAPObjectClass; static void -vfree(void **vec) +vfree(gpointer *vec) { - int i; + gint i; for (i = 0; vec[i] != NULL; i++) free(vec[i]); @@ -143,17 +143,17 @@ vfree(void **vec) #define TK_QDESCR TK_QDSTRING struct token { - int type; - char *sval; + gint type; + gchar *sval; }; static int -get_token( const char ** sp, char ** token_val ) +get_token( const gchar ** sp, gchar ** token_val ) { - int kind; - const char * p; - const char * q; - char * res; + gint kind; + const gchar * p; + const gchar * q; + gchar * res; *token_val = NULL; switch (**sp) { @@ -223,20 +223,20 @@ get_token( const char ** sp, char ** token_val ) /* Gobble optional whitespace */ static void -parse_whsp(const char **sp) +parse_whsp(const gchar **sp) { while (LDAP_SPACE(**sp)) (*sp)++; } /* Parse a sequence of dot-separated decimal strings */ -static char * -ldap_int_parse_numericoid(const char **sp, int *code, const int flags) +static gchar * +ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags) { - char * res = NULL; - const char * start = *sp; - int len; - int quoted = 0; + gchar * res = NULL; + const gchar * start = *sp; + gint len; + gint quoted = 0; /* Netscape puts the SYNTAX value in quotes (incorrectly) */ if ( flags & LDAP_SCHEMA_ALLOW_QUOTED && **sp == '\'' ) { @@ -248,7 +248,7 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags) while (**sp) { if ( !LDAP_DIGIT(**sp) ) { /* - * Initial char is not a digit or char after dot is + * Initial gchar is not a digit or gchar after dot is * not a digit */ *code = LDAP_SCHERR_NODIGIT; @@ -262,7 +262,7 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags) /* Otherwise, gobble the dot and loop again */ (*sp)++; } - /* Now *sp points at the char past the numericoid. Perfect. */ + /* Now *sp points at the gchar past the numericoid. Perfect. */ len = *sp - start; if ( flags & LDAP_SCHEMA_ALLOW_QUOTED && quoted ) { if ( **sp == '\'' ) { @@ -273,7 +273,7 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags) } } if (flags & LDAP_SCHEMA_SKIP) { - res = (char *)start; + res = (gchar *)start; } else { res = LDAP_MALLOC(len+1); if (!res) { @@ -287,22 +287,22 @@ ldap_int_parse_numericoid(const char **sp, int *code, const int flags) } /* Parse a qdescr or a list of them enclosed in () */ -static char ** -parse_qdescrs(const char **sp, int *code) +static gchar ** +parse_qdescrs(const gchar **sp, gint *code) { - char ** res; - char ** res1; - int kind; - char * sval; - int size; - int pos; + gchar ** res; + gchar ** res1; + gint kind; + gchar * sval; + gint size; + gint pos; parse_whsp(sp); kind = get_token(sp,&sval); if ( kind == TK_LEFTPAREN ) { /* Let's presume there will be at least 2 entries */ size = 3; - res = LDAP_CALLOC(3,sizeof(char *)); + res = LDAP_CALLOC(3,sizeof(gchar *)); if ( !res ) { *code = LDAP_SCHERR_OUTOFMEM; return NULL; @@ -316,7 +316,7 @@ parse_qdescrs(const char **sp, int *code) if ( kind == TK_QDESCR ) { if ( pos == size-2 ) { size++; - res1 = LDAP_REALLOC(res,size*sizeof(char *)); + res1 = LDAP_REALLOC(res,size*sizeof(gchar *)); if ( !res1 ) { LDAP_VFREE(res); LDAP_FREE(sval); @@ -338,7 +338,7 @@ parse_qdescrs(const char **sp, int *code) parse_whsp(sp); return(res); } else if ( kind == TK_QDESCR ) { - res = LDAP_CALLOC(2,sizeof(char *)); + res = LDAP_CALLOC(2,sizeof(gchar *)); if ( !res ) { *code = LDAP_SCHERR_OUTOFMEM; return NULL; @@ -355,15 +355,15 @@ parse_qdescrs(const char **sp, int *code) } /* Parse a woid or a $-separated list of them enclosed in () */ -static char ** -parse_oids(const char **sp, int *code, const int allow_quoted) +static gchar ** +parse_oids(const gchar **sp, gint *code, const gint allow_quoted) { - char ** res; - char ** res1; - int kind; - char * sval; - int size; - int pos; + gchar ** res; + gchar ** res1; + gint kind; + gchar * sval; + gint size; + gint pos; /* * Strictly speaking, doing this here accepts whsp before the @@ -376,7 +376,7 @@ parse_oids(const char **sp, int *code, const int allow_quoted) if ( kind == TK_LEFTPAREN ) { /* Let's presume there will be at least 2 entries */ size = 3; - res = LDAP_CALLOC(3,sizeof(char *)); + res = LDAP_CALLOC(3,sizeof(gchar *)); if ( !res ) { *code = LDAP_SCHERR_OUTOFMEM; return NULL; @@ -407,7 +407,7 @@ parse_oids(const char **sp, int *code, const int allow_quoted) kind == TK_QDSTRING ) ) { if ( pos == size-2 ) { size++; - res1 = LDAP_REALLOC(res,size*sizeof(char *)); + res1 = LDAP_REALLOC(res,size*sizeof(gchar *)); if ( !res1 ) { LDAP_FREE(sval); LDAP_VFREE(res); @@ -436,7 +436,7 @@ parse_oids(const char **sp, int *code, const int allow_quoted) return(res); } else if ( kind == TK_BAREWORD || ( allow_quoted && kind == TK_QDSTRING ) ) { - res = LDAP_CALLOC(2,sizeof(char *)); + res = LDAP_CALLOC(2,sizeof(gchar *)); if ( !res ) { LDAP_FREE(sval); *code = LDAP_SCHERR_OUTOFMEM; @@ -466,24 +466,24 @@ ldap_objectclass_free(LDAPObjectClass * oc) } static LDAPObjectClass * -ldap_str2objectclass( LDAP_CONST char * s, - int * code, - LDAP_CONST char ** errp, +ldap_str2objectclass( LDAP_CONST gchar * s, + gint * code, + LDAP_CONST gchar ** errp, LDAP_CONST unsigned flags ) { - int kind; - const char * ss = s; - char * sval; - int seen_name = 0; - int seen_desc = 0; - int seen_obsolete = 0; - int seen_sup = 0; - int seen_kind = 0; - int seen_must = 0; - int seen_may = 0; + gint kind; + const gchar * ss = s; + gchar * sval; + gint seen_name = 0; + gint seen_desc = 0; + gint seen_obsolete = 0; + gint seen_sup = 0; + gint seen_kind = 0; + gint seen_must = 0; + gint seen_may = 0; LDAPObjectClass * oc; - char ** ext_vals; - const char * savepos; + gchar ** ext_vals; + const gchar * savepos; if ( !s ) { *code = LDAP_SCHERR_EMPTY; @@ -539,7 +539,7 @@ ldap_str2objectclass( LDAP_CONST char * s, } else if ( flags & LDAP_SCHEMA_ALLOW_OID_MACRO ) { /* Non-numerical OID, ignore */ - int len = ss-savepos; + gint len = ss-savepos; oc->oc_oid = LDAP_MALLOC(len+1); strncpy(oc->oc_oid, savepos, len); oc->oc_oid[len] = 0; @@ -741,21 +741,21 @@ ldap_str2objectclass( LDAP_CONST char * s, #define LDAP_UTF8_INCR(p) ((p)=LDAP_UTF8_NEXT((p))) #define ldap_x_utf8_to_ucs4(str) g_utf8_get_char(str) -static char *ldap_utf8_strchr( const char *str, const char *chr ) +static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr ) { for( ; *str != '\0'; LDAP_UTF8_INCR(str) ) { if( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) { - return (char *) str; + return (gchar *) str; } } return NULL; } -static size_t ldap_utf8_strcspn( const char *str, const char *set ) +static size_t ldap_utf8_strcspn( const gchar *str, const gchar *set ) { - const char *cstr; - const char *cset; + const gchar *cstr; + const gchar *cset; for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) { for( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) { @@ -768,10 +768,10 @@ static size_t ldap_utf8_strcspn( const char *str, const char *set ) return cstr - str; } -static size_t ldap_utf8_strspn( const char *str, const char *set ) +static size_t ldap_utf8_strspn( const gchar *str, const gchar *set ) { - const char *cstr; - const char *cset; + const gchar *cstr; + const gchar *cset; for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) { for( cset = set; ; LDAP_UTF8_INCR(cset) ) { @@ -788,10 +788,10 @@ static size_t ldap_utf8_strspn( const char *str, const char *set ) return cstr - str; } -static char *ldap_utf8_strtok(char *str, const char *sep, char **last) +static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last) { - char *begin; - char *end; + gchar *begin; + gchar *end; if( last == NULL ) return NULL; @@ -807,7 +807,7 @@ static char *ldap_utf8_strtok(char *str, const char *sep, char **last) end = &begin[ ldap_utf8_strcspn( begin, sep ) ]; if( *end != '\0' ) { - char *next = LDAP_UTF8_NEXT( end ); + gchar *next = LDAP_UTF8_NEXT( end ); *end = '\0'; end = next; } @@ -856,17 +856,17 @@ typedef struct ldap_url_desc { /* from url.c */ -static const char* +static const gchar * skip_url_prefix( - const char *url, - int *enclosedp, - const char **scheme ) + const gchar *url, + gint *enclosedp, + const gchar **scheme ) { /* * return non-zero if this looks like a LDAP URL; zero if not * if non-zero returned, *urlp will be moved past "ldap://" part of URL */ - const char *p; + const gchar *p; if ( url == NULL ) { return( NULL ); @@ -924,7 +924,7 @@ skip_url_prefix( return( NULL ); } -static int str2scope( const char *p ) +static gint str2scope( const gchar *p ) { if ( strcasecmp( p, "one" ) == 0 ) { return LDAP_SCOPE_ONELEVEL; @@ -980,7 +980,7 @@ ldap_free_urldesc( LDAPURLDesc *ludp ) } static int -ldap_int_unhex( int c ) +ldap_int_unhex( gint c ) { return( c >= '0' && c <= '9' ? c - '0' : c >= 'A' && c <= 'F' ? c - 'A' + 10 @@ -988,7 +988,7 @@ ldap_int_unhex( int c ) } static void -ldap_pvt_hex_unescape( char *s ) +ldap_pvt_hex_unescape( gchar *s ) { /* * Remove URL hex escapes from s... done in place. The basic concept for @@ -1014,8 +1014,8 @@ ldap_pvt_hex_unescape( char *s ) *p = '\0'; } -static char ** -ldap_str2charray( const char *str_in, const char *brkstr ) +static gchar ** +ldap_str2charray( const gchar *str_in, const gchar *brkstr ) { char **res; char *str, *s; @@ -1035,7 +1035,7 @@ ldap_str2charray( const char *str_in, const char *brkstr ) } } - res = (char **) LDAP_MALLOC( (i + 1) * sizeof(char *) ); + res = (gchar **) LDAP_MALLOC( (i + 1) * sizeof(gchar *) ); if( res == NULL ) { LDAP_FREE( str ); @@ -1069,7 +1069,7 @@ ldap_str2charray( const char *str_in, const char *brkstr ) } static int -ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) +ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) { /* * Pick apart the pieces of an LDAP URL. @@ -1078,9 +1078,9 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) LDAPURLDesc *ludp; char *p, *q, *r; int i, enclosed; - const char *scheme = NULL; - const char *url_tmp; - char *url; + const gchar *scheme = NULL; + const gchar *url_tmp; + gchar *url; if( url_in == NULL || ludpp == NULL ) { return LDAP_URL_ERR_PARAM; @@ -1393,9 +1393,9 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) } static int -ldap_url_parse( LDAP_CONST char *url_in, LDAPURLDesc **ludpp ) +ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) { - int rc = ldap_url_parse_ext( url_in, ludpp ); + gint rc = ldap_url_parse_ext( url_in, ludpp ); if( rc != LDAP_URL_SUCCESS ) { return rc; diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 3897d605e3..5040b96570 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -99,7 +99,7 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam { GladeXML *gui; GtkWidget *widget; - char *gladefile; + gchar *gladefile; gtk_widget_realize (GTK_WIDGET (e_contact_editor_fullname)); gtk_dialog_set_has_separator (GTK_DIALOG (e_contact_editor_fullname), @@ -189,7 +189,7 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, } break; case PROP_EDITABLE: { - int i; + gint i; const gchar *widget_names[] = { "comboentry-title", "comboentry-suffix", @@ -283,7 +283,7 @@ fill_in_info(EContactEditorFullname *editor) } } -static char * +static gchar * extract_field (EContactEditorFullname *editor, const gchar *field) { diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index c7ce449ec4..305511d5d5 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -93,7 +93,7 @@ static GtkWindow* e_contact_editor_get_window (EABEditor *editor); static void save_contact (EContactEditor *ce, gboolean should_close); static void entry_activated (EContactEditor *editor); -static void set_entry_text(EContactEditor *editor, GtkEntry *entry, const char *string); +static void set_entry_text(EContactEditor *editor, GtkEntry *entry, const gchar *string); static void sensitize_ok (EContactEditor *ce); static EABEditorClass *parent_class = NULL; @@ -339,7 +339,7 @@ is_field_supported (EContactEditor *editor, EContactField field_id) /* This function tells you whether name_to_style will make sense. */ static gboolean -style_makes_sense (const EContactName *name, const gchar *company, int style) +style_makes_sense (const EContactName *name, const gchar *company, gint style) { switch (style) { case 0: /* Fall Through */ @@ -368,13 +368,13 @@ style_makes_sense (const EContactName *name, const gchar *company, int style) } } -static char * -name_to_style (const EContactName *name, const gchar *company, int style) +static gchar * +name_to_style (const EContactName *name, const gchar *company, gint style) { - char *string; - char *strings[4], **stringptr; - char *midstring[4], **midstrptr; - char *substring; + gchar *string; + gchar *strings[4], **stringptr; + gchar *midstring[4], **midstrptr; + gchar *substring; switch (style) { case 0: stringptr = strings; @@ -449,11 +449,11 @@ file_as_get_style (EContactEditor *editor) { GtkEntry *file_as = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (glade_xml_get_widget(editor->gui, "combo-file-as")))); GtkEntry *company_w = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-company")); - char *filestring; - char *trystring; + gchar *filestring; + gchar *trystring; EContactName *name = editor->name; const gchar *company; - int i; + gint i; if (!(file_as && GTK_IS_ENTRY(file_as))) return -1; @@ -475,10 +475,10 @@ file_as_get_style (EContactEditor *editor) } static void -file_as_set_style (EContactEditor *editor, int style) +file_as_set_style (EContactEditor *editor, gint style) { - char *string; - int i; + gchar *string; + gint i; GList *strings = NULL; GtkComboBox *combo_file_as = GTK_COMBO_BOX (glade_xml_get_widget (editor->gui, "combo-file-as")); GtkEntry *company_w = GTK_ENTRY (glade_xml_get_widget (editor->gui, "entry-company")); @@ -496,7 +496,7 @@ file_as_set_style (EContactEditor *editor, int style) for (i = 0; i < 6; i++) { if (style_makes_sense (editor->name, company, i)) { - char *u; + gchar *u; u = name_to_style (editor->name, company, i); if (!STRING_IS_EMPTY (u)) strings = g_list_append (strings, u); @@ -528,8 +528,8 @@ file_as_set_style (EContactEditor *editor, int style) static void name_entry_changed (GtkWidget *widget, EContactEditor *editor) { - int style = 0; - const char *string; + gint style = 0; + const gchar *string; style = file_as_get_style (editor); e_contact_name_free (editor->name); @@ -545,7 +545,7 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor) static void file_as_combo_changed (GtkWidget *widget, EContactEditor *editor) { - char *string = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); + gchar *string = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); if (string && *string) { gchar *title; @@ -564,7 +564,7 @@ file_as_combo_changed (GtkWidget *widget, EContactEditor *editor) static void company_entry_changed (GtkWidget *widget, EContactEditor *editor) { - int style = 0; + gint style = 0; style = file_as_get_style (editor); file_as_set_style (editor, style); @@ -600,9 +600,9 @@ sensitize_ok (EContactEditor *ce) GtkWidget *entry_fullname = glade_xml_get_widget (ce->gui, "entry-fullname" ); GtkWidget *entry_file_as = gtk_bin_get_child (GTK_BIN (glade_xml_get_widget (ce->gui, "combo-file-as"))); GtkWidget *company_name = glade_xml_get_widget (ce->gui, "entry-company"); - const char *name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); - const char *file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); - const char *company_name_string = gtk_entry_get_text (GTK_ENTRY (company_name)); + const gchar *name_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_fullname)); + const gchar *file_as_entry_string = gtk_entry_get_text (GTK_ENTRY (entry_file_as)); + const gchar *company_name_string = gtk_entry_get_text (GTK_ENTRY (company_name)); allow_save = ce->target_editable && ce->changed ? TRUE : FALSE; @@ -641,7 +641,7 @@ image_chooser_changed (GtkWidget *widget, EContactEditor *editor) static void set_entry_text (EContactEditor *editor, GtkEntry *entry, const gchar *string) { - const char *oldstring = gtk_entry_get_text (entry); + const gchar *oldstring = gtk_entry_get_text (entry); if (!string) string = ""; @@ -2197,7 +2197,7 @@ fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) EContactPhoto *photo = e_contact_get (contact, field_id); if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) { e_image_chooser_set_image_data (E_IMAGE_CHOOSER (widget), - (char *)photo->data.inlined.data, + (gchar *)photo->data.inlined.data, photo->data.inlined.length); editor->image_set = TRUE; } @@ -2235,7 +2235,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) e_contact_set (contact, field_id, (gchar *) text); } else if (GTK_IS_COMBO_BOX_ENTRY (widget)) { - char *text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); + gchar *text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); e_contact_set (contact, field_id, text); @@ -2260,9 +2260,9 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) else if (E_IS_DATE_EDIT (widget)) { EContactDate date; if (e_date_edit_get_date (E_DATE_EDIT (widget), - (int *)&date.year, - (int *)&date.month, - (int *)&date.day)) + (gint *)&date.year, + (gint *)&date.month, + (gint *)&date.day)) e_contact_set (contact, field_id, &date); else e_contact_set (contact, field_id, NULL); @@ -2280,14 +2280,14 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) GdkPixbuf *pixbuf, *new; GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); - photo.data.inlined.data = (unsigned char *)img_buff; + photo.data.inlined.data = (guchar *)img_buff; img_buff = NULL; gdk_pixbuf_loader_write (loader, photo.data.inlined.data, photo.data.inlined.length, NULL); gdk_pixbuf_loader_close (loader, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); if (pixbuf) { - int width, height, prompt_response; + gint width, height, prompt_response; g_object_ref (pixbuf); @@ -2314,7 +2314,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) gdk_pixbuf_save_to_buffer (new, &img_buff, &photo.data.inlined.length, format_name, NULL, NULL); - photo.data.inlined.data = (unsigned char *)img_buff; + photo.data.inlined.data = (guchar *)img_buff; img_buff = NULL; g_free (format_name); g_object_unref (new); @@ -2345,7 +2345,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) else if (GTK_IS_TOGGLE_BUTTON (widget)) { gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); - e_contact_set (contact, field_id, val?(void *)1:NULL); + e_contact_set (contact, field_id, val?(gpointer)1:NULL); } else { g_warning (G_STRLOC ": Unhandled widget class in mappings!"); @@ -2599,11 +2599,11 @@ source_changed (ESourceComboBox *source_combo_box, EContactEditor *editor) } static void -full_name_response (GtkDialog *dialog, int response, EContactEditor *editor) +full_name_response (GtkDialog *dialog, gint response, EContactEditor *editor) { EContactName *name; GtkWidget *fname_widget; - int style = 0; + gint style = 0; gboolean editable = FALSE; g_object_get (dialog, @@ -2619,8 +2619,8 @@ full_name_response (GtkDialog *dialog, int response, EContactEditor *editor) fname_widget = glade_xml_get_widget(editor->gui, "entry-fullname"); if (fname_widget && GTK_IS_ENTRY (fname_widget)) { - char *full_name = e_contact_name_to_string(name); - const char *old_full_name = gtk_entry_get_text (GTK_ENTRY(fname_widget)); + gchar *full_name = e_contact_name_to_string(name); + const gchar *old_full_name = gtk_entry_get_text (GTK_ENTRY(fname_widget)); if (strcmp (full_name, old_full_name)) gtk_entry_set_text (GTK_ENTRY (fname_widget), full_name); @@ -2677,9 +2677,9 @@ full_name_clicked (GtkWidget *button, EContactEditor *editor) static void -categories_response (GtkDialog *dialog, int response, EContactEditor *editor) +categories_response (GtkDialog *dialog, gint response, EContactEditor *editor) { - const char *categories; + const gchar *categories; GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories"); if (response == GTK_RESPONSE_OK) { @@ -2687,7 +2687,7 @@ categories_response (GtkDialog *dialog, int response, EContactEditor *editor) if (entry && GTK_IS_ENTRY(entry)) gtk_entry_set_text (GTK_ENTRY (entry), categories); else - e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (char *)categories); + e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (gchar *)categories); } gtk_widget_destroy(GTK_WIDGET(dialog)); editor->categories_dialog = NULL; @@ -2706,7 +2706,7 @@ categories_editor_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer static void categories_clicked (GtkWidget *button, EContactEditor *editor) { - char *categories = NULL; + gchar *categories = NULL; GtkDialog *dialog; GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories"); @@ -2803,7 +2803,7 @@ static void update_preview_cb (GtkFileChooser *file_chooser, gpointer data) { GtkWidget *preview; - char *filename = NULL; + gchar *filename = NULL; GdkPixbuf *pixbuf; gtk_file_chooser_set_preview_widget_active (file_chooser, TRUE); @@ -2905,7 +2905,7 @@ contact_moved_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs) } static void -contact_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseStruct *ecs) +contact_added_cb (EBook *book, EBookStatus status, const gchar *id, EditorCloseStruct *ecs) { EContactEditor *ce = ecs->ce; gboolean should_close = ecs->should_close; @@ -2921,7 +2921,7 @@ contact_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseSt gtk_widget_set_sensitive (ce->app, TRUE); ce->in_async_call = FALSE; - e_contact_set (ce->contact, E_CONTACT_UID, (char *) id); + e_contact_set (ce->contact, E_CONTACT_UID, (gchar *) id); eab_editor_contact_added (EAB_EDITOR (ce), status, ce->contact); @@ -2998,8 +2998,8 @@ real_save_contact (EContactEditor *ce, gboolean should_close) static void save_contact (EContactEditor *ce, gboolean should_close) { - char *uid; - const char *name_entry_string, *file_as_entry_string, *company_name_string; + gchar *uid; + const gchar *name_entry_string, *file_as_entry_string, *company_name_string; GtkWidget *entry_fullname, *entry_file_as, *company_name; if (!ce->target_book) @@ -3088,8 +3088,8 @@ static const EContactField non_string_fields [] = { static gboolean is_non_string_field (EContactField id) { - int count = sizeof (non_string_fields) / sizeof (EContactField); - int i; + gint count = sizeof (non_string_fields) / sizeof (EContactField); + gint i; for (i = 0; i < count; i++) if (id == non_string_fields[i]) return TRUE; @@ -3127,7 +3127,7 @@ e_contact_editor_is_valid (EABEditor *editor) for (e_iterator_last (iter); e_iterator_is_valid (iter); e_iterator_prev (iter)) { - const char *field_name = e_iterator_get (iter); + const gchar *field_name = e_iterator_get (iter); EContactField field_id = e_contact_field_id (field_name); if (is_non_string_field (field_id)) { @@ -3140,7 +3140,7 @@ e_contact_editor_is_valid (EABEditor *editor) } } else { - const char *text = e_contact_get_const (ce->contact, field_id); + const gchar *text = e_contact_get_const (ce->contact, field_id); if (STRING_IS_EMPTY (text)) { g_string_append_printf (errmsg, _("%s'%s' is empty"), @@ -3331,7 +3331,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor) GladeXML *gui; GtkWidget *widget, *label; GtkEntryCompletion *completion; - char *gladefile; + gchar *gladefile; e_contact_editor->name = e_contact_name_new(); @@ -3495,7 +3495,7 @@ required_fields_cb (EBook *book, EBookStatus status, static void -contact_editor_destroy_notify (void *data, +contact_editor_destroy_notify (gpointer data, GObject *where_the_object_was) { eab_editor_remove (EAB_EDITOR (data)); @@ -3533,7 +3533,7 @@ e_contact_editor_new (EBook *book, static void writable_changed (EBook *book, gboolean writable, EContactEditor *ce) { - int new_target_editable; + gint new_target_editable; gboolean changed = FALSE; new_target_editable = e_book_is_writable (ce->target_book); diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h index e9f40507ae..c5940d96d0 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.h +++ b/addressbook/gui/contact-editor/e-contact-editor.h @@ -100,7 +100,7 @@ struct _EContactEditor EBook *load_book; /* signal ids for "writable_status" */ - int target_editable_id; + gint target_editable_id; GtkWidget *fullname_dialog; GtkWidget *categories_dialog; diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index e8d7b03e6c..17ef4fb16d 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -586,7 +586,7 @@ e_contact_quick_add_vcard (const gchar *vcard, EContactQuickAddCallback cb, gpoi if (contact) { GList *emails; - char *name; + gchar *name; EContactName *contact_name; g_object_unref (qa->contact); diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c index d052e42fd7..6257e3972b 100644 --- a/addressbook/gui/contact-editor/eab-editor.c +++ b/addressbook/gui/contact-editor/eab-editor.c @@ -311,11 +311,11 @@ eab_editor_get_all_editors (void) } gboolean -eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list, char *name) +eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list, gchar *name) { GtkWidget *dialog; gint result; - char *msg; + gchar *msg; if (is_list) { /* contact list(s) */ diff --git a/addressbook/gui/contact-editor/eab-editor.h b/addressbook/gui/contact-editor/eab-editor.h index 18a11047be..6959d25801 100644 --- a/addressbook/gui/contact-editor/eab-editor.h +++ b/addressbook/gui/contact-editor/eab-editor.h @@ -91,7 +91,7 @@ gboolean eab_editor_is_changed (EABEditor *editor); GtkWindow* eab_editor_get_window (EABEditor *editor); gboolean eab_editor_prompt_to_save_changes (EABEditor *editor, GtkWindow *window); -gboolean eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list, char *name); +gboolean eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list, gchar *name); /* these four generate EABEditor signals */ void eab_editor_contact_added (EABEditor *editor, EBookStatus status, EContact *contact); diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c index e624c97987..6c3349eada 100644 --- a/addressbook/gui/contact-editor/test-editor.c +++ b/addressbook/gui/contact-editor/test-editor.c @@ -54,12 +54,12 @@ " " -static char * -read_file (char *name) +static gchar * +read_file (gchar *name) { - int len; - char buff[65536]; - char line[1024]; + gint len; + gchar buff[65536]; + gchar line[1024]; FILE *f; f = fopen (name, "r"); @@ -81,7 +81,7 @@ read_file (char *name) static void editor_closed_cb (EContactEditor *ce, gpointer data) { - static int count = 2; + static gint count = 2; count--; g_object_unref (ce); @@ -90,9 +90,9 @@ editor_closed_cb (EContactEditor *ce, gpointer data) exit (0); } -int main( int argc, char *argv[] ) +gint main( gint argc, gchar *argv[] ) { - char *cardstr; + gchar *cardstr; EContactEditor *ce; gtk_init (&argc, &argv); diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 7a492f0c52..e62958a72e 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -1397,7 +1397,7 @@ contact_list_editor_add_destination (EVCardAttribute *attr, gint email_num = -1; GList *list, *iter; GList *values; - char *value; + gchar *value; destination = e_destination_new (); diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 86138efb14..6c343be46b 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -476,11 +476,11 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2) we find an exact match, there is no reason to keep checking. */ while (i1 && match != EAB_CONTACT_MATCH_EXACT) { - char *addr1 = (char *) i1->data; + gchar *addr1 = (gchar *) i1->data; i2 = contact2_email; while (i2 && match != EAB_CONTACT_MATCH_EXACT) { - char *addr2 = (char *) i2->data; + gchar *addr2 = (gchar *) i2->data; match = combine_comparisons (match, compare_email_addresses (addr1, addr2)); @@ -640,7 +640,7 @@ use_common_book_cb (EBook *book, gpointer closure) gint p=0; gchar *contact_file_as, *qj; EBookQuery *query = NULL; - int i; + gint i; if (book == NULL) { info->cb (info->contact, NULL, EAB_CONTACT_MATCH_NONE, info->closure); @@ -699,7 +699,7 @@ use_common_book_cb (EBook *book, gpointer closure) for(i = 0; query_parts[i] != NULL; i++) g_free(query_parts[i]); if (p > 1) { - char *s; + gchar *s; s = g_strdup_printf ("(or %s)", qj); query = e_book_query_from_string (s); g_free (s); diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index 895e8126c6..0805ca3110 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -62,7 +62,7 @@ static void match_query_callback (EContact *contact, EContact *match, EABContact #define SIMULTANEOUS_MERGING_REQUESTS 20 static GList *merging_queue = NULL; -static int running_merge_requests = 0; +static gint running_merge_requests = 0; static void @@ -109,7 +109,7 @@ free_lookup (EContactMergingLookup *lookup) } static void -final_id_cb (EBook *book, EBookStatus status, const char *id, gpointer closure) +final_id_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure) { EContactMergingLookup *lookup = closure; @@ -156,7 +156,7 @@ cancelit (EContactMergingLookup *lookup) static void dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table) { - int h, w; + gint h, w; /* Spacing around the table */ w = table->allocation.width + 30; @@ -173,7 +173,7 @@ dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table) static void dropdown_changed (GtkWidget *dropdown, dropdown_data *data) { - char *str; + gchar *str; str = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dropdown)); if (g_ascii_strcasecmp(str, "")) @@ -190,11 +190,11 @@ mergeit (EContactMergingLookup *lookup) GtkDialog *dialog; GtkTable *table; EContactField field; - char *str = NULL, *string = NULL, *string1 = NULL; - int num_of_email; + gchar *str = NULL, *string = NULL, *string1 = NULL; + gint num_of_email; GList *email_attr_list; - int row = -1; - int value = 0, result; + gint row = -1; + gint value = 0, result; dialog = (GtkDialog *)(gtk_dialog_new_with_buttons (_("Merge Contact"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL)); gtk_container_set_border_width (GTK_CONTAINER(dialog), 5); @@ -220,8 +220,8 @@ mergeit (EContactMergingLookup *lookup) /*we match all the string fields of the already existing contact and the new contact.*/ for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) { dropdown_data *data = NULL; - string = (char *)e_contact_get_const (lookup->contact, field); - string1 = (char *)e_contact_get_const (lookup->match, field); + string = (gchar *)e_contact_get_const (lookup->contact, field); + string1 = (gchar *)e_contact_get_const (lookup->match, field); /*the field must exist in the new as well as the duplicate contact*/ if (string && *string) { @@ -230,7 +230,7 @@ mergeit (EContactMergingLookup *lookup) if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) { row++; - str = (char *)e_contact_get_const (lookup->contact, field); + str = (gchar *)e_contact_get_const (lookup->contact, field); switch(num_of_email) { case 0: @@ -366,8 +366,8 @@ check_if_same (EContact *contact, EContact *match) { EContactField field; GList *email_attr_list; - int num_of_email; - char *str = NULL, *string = NULL, *string1 = NULL; + gint num_of_email; + gchar *str = NULL, *string = NULL, *string1 = NULL; for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) { email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL); @@ -375,7 +375,7 @@ check_if_same (EContact *contact, EContact *match) if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email<4)) { - str = (char *)e_contact_get_const (contact, field); + str = (gchar *)e_contact_get_const (contact, field); switch(num_of_email) { case 0: @@ -395,8 +395,8 @@ check_if_same (EContact *contact, EContact *match) } } else { - string = (char *)e_contact_get_const (contact, field); - string1 = (char *)e_contact_get_const (match, field); + string = (gchar *)e_contact_get_const (contact, field); + string1 = (gchar *)e_contact_get_const (match, field); if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp(string1,string))) return FALSE; /*if the field entry exist in either of the contacts,we'll have to give the choice and thus merge button should be sensitive*/ @@ -409,9 +409,9 @@ check_if_same (EContact *contact, EContact *match) } static void -response (GtkWidget *dialog, int response, EContactMergingLookup *lookup) +response (GtkWidget *dialog, gint response, EContactMergingLookup *lookup) { - static int merge_response; + static gint merge_response; switch (response) { case 0: @@ -437,8 +437,8 @@ static void match_query_callback (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure) { EContactMergingLookup *lookup = closure; - char *gladefile; - int flag; + gchar *gladefile; + gint flag; if ((gint) type <= (gint) EAB_CONTACT_MATCH_VAGUE) { doit (lookup); diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 9482a93744..2176fc3915 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -71,7 +71,7 @@ static void free_data (EABModel *model) { if (model->data) { - int i; + gint i; for ( i = 0; i < model->data_count; i++ ) { g_object_unref (model->data[i]); @@ -153,8 +153,8 @@ addressbook_dispose(GObject *object) static void update_folder_bar_message (EABModel *model) { - int count; - char *message; + gint count; + gchar *message; count = model->data_count; @@ -179,8 +179,8 @@ create_contact(EBookView *book_view, const GList *contacts, EABModel *model) { - int old_count = model->data_count; - int length = g_list_length ((GList *)contacts); + gint old_count = model->data_count; + gint length = g_list_length ((GList *)contacts); if (model->data_count + length > model->allocated_count) { while (model->data_count + length > model->allocated_count) @@ -212,7 +212,7 @@ remove_contact(EBookView *book_view, indices = g_array_new (FALSE, FALSE, sizeof (gint)); for (l = ids; l; l = l->next) { - char *id = l->data; + gchar *id = l->data; for ( i = 0; i < model->data_count; i++) { if ( !strcmp(e_contact_get_const (model->data[i], E_CONTACT_UID), id) ) { g_object_unref (model->data[i]); @@ -236,7 +236,7 @@ modify_contact(EBookView *book_view, EABModel *model) { for ( ; contacts; contacts = contacts->next) { - int i; + gint i; for ( i = 0; i < model->data_count; i++) { if ( !strcmp(e_contact_get_const(model->data[i], E_CONTACT_UID), e_contact_get_const(E_CONTACT(contacts->data), E_CONTACT_UID)) ) { @@ -253,7 +253,7 @@ modify_contact(EBookView *book_view, static void status_message (EBookView *book_view, - char* status, + gchar * status, EABModel *model) { g_signal_emit (model, @@ -508,8 +508,8 @@ get_view (EABModel *model) if (model->book && model->query) { ESource *source; - const char *limit_str; - int limit = -1; + const gchar *limit_str; + gint limit = -1; source = e_book_get_source (model->book); @@ -552,7 +552,7 @@ get_view_idle (EABModel *model) EContact * eab_model_get_contact(EABModel *model, - int row) + gint row) { if (model->data && 0 <= row && row < model->data_count) { return e_contact_duplicate (model->data[row]); @@ -643,7 +643,7 @@ eab_model_get_property (GObject *object, guint prop_id, GValue *value, GParamSpe g_value_set_object (value, eab_model->book); break; case PROP_QUERY: { - char *query_string = e_book_query_to_string (eab_model->query); + gchar *query_string = e_book_query_to_string (eab_model->query); g_value_set_string (value, query_string); break; } @@ -712,14 +712,14 @@ eab_model_force_folder_bar_message (EABModel *model) update_folder_bar_message (model); } -int +gint eab_model_contact_count (EABModel *model) { return model->data_count; } const EContact * -eab_model_contact_at (EABModel *model, int index) +eab_model_contact_at (EABModel *model, gint index) { return model->data[index]; } diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h index ae1c5f4cb2..f8b448a6be 100644 --- a/addressbook/gui/widgets/e-addressbook-model.h +++ b/addressbook/gui/widgets/e-addressbook-model.h @@ -43,15 +43,15 @@ struct _EABModel { EBookQuery *query; EBookView *book_view; - int book_view_idle_id; + gint book_view_idle_id; EContact **data; - int data_count; - int allocated_count; + gint data_count; + gint allocated_count; - int create_contact_id, remove_contact_id, modify_contact_id; - int status_message_id, writable_status_id, sequence_complete_id; - int backend_died_id; + gint create_contact_id, remove_contact_id, modify_contact_id; + gint status_message_id, writable_status_id, sequence_complete_id; + gint backend_died_id; guint search_in_progress : 1; guint editable : 1; @@ -85,7 +85,7 @@ EABModel *eab_model_new (void); /* Returns object with ref count of 1. */ EContact *eab_model_get_contact (EABModel *model, - int row); + gint row); EBook *eab_model_get_ebook (EABModel *model); void eab_model_stop (EABModel *model); @@ -93,9 +93,9 @@ gboolean eab_model_can_stop (EABModel *model); void eab_model_force_folder_bar_message (EABModel *model); -int eab_model_contact_count (EABModel *model); +gint eab_model_contact_count (EABModel *model); const EContact *eab_model_contact_at (EABModel *model, - int index); + gint index); gboolean eab_model_editable (EABModel *model); #endif /* _EAB_MODEL_H_ */ diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index 237838141b..6258ed28ca 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -36,8 +36,8 @@ struct _EAddressbookReflowAdapterPrivate { gboolean loading; - int create_contact_id, remove_contact_id, modify_contact_id, model_changed_id; - int search_started_id, search_result_id; + gint create_contact_id, remove_contact_id, modify_contact_id, model_changed_id; + gint search_started_id, search_result_id; }; #define PARENT_TYPE e_reflow_model_get_type() @@ -101,7 +101,7 @@ unlink_model(EAddressbookReflowAdapter *adapter) static int text_height (PangoLayout *layout, const gchar *text) { - int height; + gint height; pango_layout_set_text (layout, text, -1); @@ -119,7 +119,7 @@ addressbook_dispose(GObject *object) } static void -addressbook_set_width (EReflowModel *erm, int width) +addressbook_set_width (EReflowModel *erm, gint width) { } @@ -135,16 +135,16 @@ addressbook_count (EReflowModel *erm) /* This function returns the height of the minicontact in question */ static int -addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent) +addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent) { EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm); EAddressbookReflowAdapterPrivate *priv = adapter->priv; EContactField field; - int count = 0; - char *string; + gint count = 0; + gchar *string; EContact *contact = (EContact*)eab_model_contact_at (priv->model, i); PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (parent)->canvas), ""); - int height; + gint height; string = e_contact_get(contact, E_CONTACT_FILE_AS); height = text_height (layout, string ? string : "") + 10.0; @@ -157,8 +157,8 @@ addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent) string = e_contact_get(contact, field); if (string && *string) { - int this_height; - int field_text_height; + gint this_height; + gint field_text_height; this_height = text_height (layout, e_contact_pretty_name(field)); @@ -181,7 +181,7 @@ addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent) } static int -addressbook_compare (EReflowModel *erm, int n1, int n2) +addressbook_compare (EReflowModel *erm, gint n1, gint n2) { EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm); EAddressbookReflowAdapterPrivate *priv = adapter->priv; @@ -195,8 +195,8 @@ addressbook_compare (EReflowModel *erm, int n1, int n2) contact2 = (EContact*)eab_model_contact_at (priv->model, n2); if (contact1 && contact2) { - const char *file_as1, *file_as2; - const char *uid1, *uid2; + const gchar *file_as1, *file_as2; + const gchar *uid1, *uid2; file_as1 = e_contact_get_const (contact1, E_CONTACT_FILE_AS); file_as2 = e_contact_get_const (contact2, E_CONTACT_FILE_AS); if (file_as1 && file_as2) @@ -235,7 +235,7 @@ adapter_drag_begin (EMinicard *card, GdkEvent *event, EAddressbookReflowAdapter } static GnomeCanvasItem * -addressbook_incarnate (EReflowModel *erm, int i, GnomeCanvasGroup *parent) +addressbook_incarnate (EReflowModel *erm, gint i, GnomeCanvasGroup *parent) { EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm); EAddressbookReflowAdapterPrivate *priv = adapter->priv; @@ -259,7 +259,7 @@ addressbook_incarnate (EReflowModel *erm, int i, GnomeCanvasGroup *parent) } static void -addressbook_reincarnate (EReflowModel *erm, int i, GnomeCanvasItem *item) +addressbook_reincarnate (EReflowModel *erm, gint i, GnomeCanvasItem *item) { EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm); EAddressbookReflowAdapterPrivate *priv = adapter->priv; @@ -285,7 +285,7 @@ remove_contacts (EABModel *model, EAddressbookReflowAdapter *adapter) { GArray *indices = (GArray *) data; - int count = indices->len; + gint count = indices->len; if (count == 1) e_reflow_model_item_removed (E_REFLOW_MODEL (adapter), g_array_index (indices, gint, 0)); @@ -536,7 +536,7 @@ e_addressbook_reflow_adapter_new (EABModel *model) EContact * e_addressbook_reflow_adapter_get_contact (EAddressbookReflowAdapter *adapter, - int index) + gint index) { EAddressbookReflowAdapterPrivate *priv = adapter->priv; diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.h b/addressbook/gui/widgets/e-addressbook-reflow-adapter.h index 88ce1a7132..14803e945c 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.h +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.h @@ -59,5 +59,5 @@ EReflowModel *e_addressbook_reflow_adapter_new (EABModel * /* Returns object with ref count of 1. */ EContact *e_addressbook_reflow_adapter_get_contact (EAddressbookReflowAdapter *adapter, - int index); + gint index); #endif /* _E_ADDRESSBOOK_REFLOW_ADAPTER_H_ */ diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 9e3dfe5f5f..59e670e772 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -33,7 +33,7 @@ struct _EAddressbookTableAdapterPrivate { EABModel *model; - int create_contact_id, remove_contact_id, modify_contact_id, model_changed_id; + gint create_contact_id, remove_contact_id, modify_contact_id, model_changed_id; GHashTable *emails; }; @@ -104,12 +104,12 @@ addressbook_row_count (ETableModel *etc) } /* This function returns the value at a particular point in our ETableModel. */ -static void * -addressbook_value_at (ETableModel *etc, int col, int row) +static gpointer +addressbook_value_at (ETableModel *etc, gint col, gint row) { EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; - const char *value; + const gchar *value; if ( col >= COLS || row >= eab_model_contact_count (priv->model) ) return NULL; @@ -117,13 +117,13 @@ addressbook_value_at (ETableModel *etc, int col, int row) value = e_contact_get_const((EContact*)eab_model_contact_at (priv->model, row), col); if (value && *value && (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) { - char *val = g_hash_table_lookup (priv->emails, value); + gchar *val = g_hash_table_lookup (priv->emails, value); if (val) { /* we have this already cached, so use value from the cache */ value = val; } else { - char *name = NULL, *mail = NULL; + gchar *name = NULL, *mail = NULL; if (eab_parse_qp_email (value, &name, &mail)) val = g_strdup_printf ("%s <%s>", name, mail); @@ -138,7 +138,7 @@ addressbook_value_at (ETableModel *etc, int col, int row) } } - return (void *)(value ? value : ""); + return (gpointer)(value ? value : ""); } /* This function sets the value at a particular point in our ETableModel. */ @@ -151,7 +151,7 @@ contact_modified_cb (EBook* book, EBookStatus status, } static void -addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) +addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val) { EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; @@ -169,14 +169,14 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) e_table_model_pre_change(etc); if (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3) { - const char *old_value = e_contact_get_const (contact, col); + const gchar *old_value = e_contact_get_const (contact, col); /* remove old value from cache and use new one */ if (old_value && *old_value) g_hash_table_remove (priv->emails, old_value); } - e_contact_set(contact, col, (void *) val); + e_contact_set(contact, col, (gpointer) val); eab_merging_book_commit_contact (eab_model_get_ebook (priv->model), contact, contact_modified_cb, etc); @@ -189,7 +189,7 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) /* This function returns whether a particular cell is editable. */ static gboolean -addressbook_is_cell_editable (ETableModel *etc, int col, int row) +addressbook_is_cell_editable (ETableModel *etc, gint col, gint row) { #if 0 EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc); @@ -220,13 +220,13 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etm); EAddressbookTableAdapterPrivate *priv = adapter->priv; EContact *contact; - int col; + gint col; contact = e_contact_new (); for (col = 1; col < E_CONTACT_LAST_SIMPLE_STRING; col++) { - const void *val = e_table_model_value_at (source, col, row); - e_contact_set (contact, col, (void *) val); + gconstpointer val = e_table_model_value_at (source, col, row); + e_contact_set (contact, col, (gpointer) val); } eab_merging_book_add_contact (eab_model_get_ebook (priv->model), contact, NULL, NULL); @@ -235,33 +235,33 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) } /* This function duplicates the value passed to it. */ -static void * -addressbook_duplicate_value (ETableModel *etc, int col, const void *value) +static gpointer +addressbook_duplicate_value (ETableModel *etc, gint col, gconstpointer value) { return g_strdup(value); } /* This function frees the value passed to it. */ static void -addressbook_free_value (ETableModel *etc, int col, void *value) +addressbook_free_value (ETableModel *etc, gint col, gpointer value) { g_free(value); } -static void * -addressbook_initialize_value (ETableModel *etc, int col) +static gpointer +addressbook_initialize_value (ETableModel *etc, gint col) { return g_strdup(""); } static gboolean -addressbook_value_is_empty (ETableModel *etc, int col, const void *value) +addressbook_value_is_empty (ETableModel *etc, gint col, gconstpointer value) { - return !(value && *(char *)value); + return !(value && *(gchar *)value); } -static char * -addressbook_value_to_string (ETableModel *etc, int col, const void *value) +static gchar * +addressbook_value_to_string (ETableModel *etc, gint col, gconstpointer value) { return g_strdup(value); } @@ -318,7 +318,7 @@ remove_contacts (EABModel *model, EAddressbookTableAdapter *adapter) { GArray *indices = (GArray *) data; - int count = indices->len; + gint count = indices->len; /* clear whole cache */ g_hash_table_remove_all (adapter->priv->emails); diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 4cd151f19f..cda5c5f27c 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -100,7 +100,7 @@ static void categories_changed_cb (gpointer object, gpointer user_data); static void make_suboptions (EABView *view); static void query_changed (ESearchBar *esb, EABView *view); static void search_activated (ESearchBar *esb, EABView *view); -static void search_menu_activated (ESearchBar *esb, int id, EABView *view); +static void search_menu_activated (ESearchBar *esb, gint id, EABView *view); static GList *get_master_list (gboolean force_rebuild); static gpointer parent_class; @@ -131,14 +131,14 @@ enum DndTargetType { typedef struct EABSearchBarItem { ESearchBarItem search; - char *image; + gchar *image; }EABSearchBarItem; static GtkTargetEntry drag_types[] = { { (gchar *) SOURCE_VCARD_TYPE, 0, DND_TARGET_TYPE_SOURCE_VCARD }, { (gchar *) VCARD_TYPE, 0, DND_TARGET_TYPE_VCARD } }; -static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]); +static const gint num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]); static guint eab_view_signals [LAST_SIGNAL] = {0, }; @@ -412,8 +412,8 @@ eab_view_new (void) GtkWidget *widget = GTK_WIDGET (g_object_new (E_TYPE_AB_VIEW, NULL)); EABView *eav = EAB_VIEW (widget); FilterPart *part; - char *xmlfile; - char *userfile; + gchar *xmlfile; + gchar *userfile; /* create our model */ eav->model = eab_model_new (); @@ -543,9 +543,9 @@ init_collection (void) { GalViewFactory *factory; ETableSpecification *spec; - char *galview; - char *addressbookdir; - char *etspecfile; + gchar *galview; + gchar *addressbookdir; + gchar *etspecfile; if (collection == NULL) { collection = gal_view_collection_new(); @@ -626,7 +626,7 @@ display_view(GalViewInstance *instance, } static void -view_preview(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +view_preview(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { /* XXX this should use the addressbook's global gconf client */ GConfClient *gconf_client; @@ -793,7 +793,7 @@ static GList * get_contact_list (EABPopupTargetSelect *t) { GList *list = NULL; - int i; + gint i; for (i=0;i<t->cards->len;i++) list = g_list_prepend(list, t->cards->pdata[i]); @@ -802,7 +802,7 @@ get_contact_list (EABPopupTargetSelect *t) } static void -save_as (EPopup *ep, EPopupItem *pitem, void *data) +save_as (EPopup *ep, EPopupItem *pitem, gpointer data) { /*ContactAndBook *contact_and_book = data;*/ GList *contacts = get_contact_list ((EABPopupTargetSelect *)ep->target); @@ -814,7 +814,7 @@ save_as (EPopup *ep, EPopupItem *pitem, void *data) } static void -send_as (EPopup *ep, EPopupItem *pitem, void *data) +send_as (EPopup *ep, EPopupItem *pitem, gpointer data) { /*ContactAndBook *contact_and_book = data;*/ GList *contacts = get_contact_list ((EABPopupTargetSelect *)ep->target); @@ -826,7 +826,7 @@ send_as (EPopup *ep, EPopupItem *pitem, void *data) } static void -send_to (EPopup *ep, EPopupItem *pitem, void *data) +send_to (EPopup *ep, EPopupItem *pitem, gpointer data) { /*ContactAndBook *contact_and_book = data;*/ GList *contacts = get_contact_list ((EABPopupTargetSelect *)ep->target); @@ -838,7 +838,7 @@ send_to (EPopup *ep, EPopupItem *pitem, void *data) } static void -print (EPopup *ep, EPopupItem *pitem, void *data) +print (EPopup *ep, EPopupItem *pitem, gpointer data) { /*ContactAndBook *contact_and_book = data;*/ EABPopupTargetSelect *t = (EABPopupTargetSelect *)ep->target; @@ -852,7 +852,7 @@ print (EPopup *ep, EPopupItem *pitem, void *data) } static void -copy (EPopup *ep, EPopupItem *pitem, void *data) +copy (EPopup *ep, EPopupItem *pitem, gpointer data) { ContactAndBook *contact_and_book = data; @@ -860,7 +860,7 @@ copy (EPopup *ep, EPopupItem *pitem, void *data) } static void -paste (EPopup *ep, EPopupItem *pitem, void *data) +paste (EPopup *ep, EPopupItem *pitem, gpointer data) { ContactAndBook *contact_and_book = data; @@ -868,7 +868,7 @@ paste (EPopup *ep, EPopupItem *pitem, void *data) } static void -cut (EPopup *ep, EPopupItem *pitem, void *data) +cut (EPopup *ep, EPopupItem *pitem, gpointer data) { ContactAndBook *contact_and_book = data; @@ -876,7 +876,7 @@ cut (EPopup *ep, EPopupItem *pitem, void *data) } static void -delete (EPopup *ep, EPopupItem *pitem, void *data) +delete (EPopup *ep, EPopupItem *pitem, gpointer data) { ContactAndBook *contact_and_book = data; @@ -884,7 +884,7 @@ delete (EPopup *ep, EPopupItem *pitem, void *data) } static void -copy_to_folder (EPopup *ep, EPopupItem *pitem, void *data) +copy_to_folder (EPopup *ep, EPopupItem *pitem, gpointer data) { ContactAndBook *contact_and_book = data; @@ -892,7 +892,7 @@ copy_to_folder (EPopup *ep, EPopupItem *pitem, void *data) } static void -move_to_folder (EPopup *ep, EPopupItem *pitem, void *data) +move_to_folder (EPopup *ep, EPopupItem *pitem, gpointer data) { ContactAndBook *contact_and_book = data; @@ -900,7 +900,7 @@ move_to_folder (EPopup *ep, EPopupItem *pitem, void *data) } static void -open_contact (EPopup *ep, EPopupItem *pitem, void *data) +open_contact (EPopup *ep, EPopupItem *pitem, gpointer data) { ContactAndBook *contact_and_book = data; @@ -909,7 +909,7 @@ open_contact (EPopup *ep, EPopupItem *pitem, void *data) static void -new_card (EPopup *ep, EPopupItem *pitem, void *data) +new_card (EPopup *ep, EPopupItem *pitem, gpointer data) { /*ContactAndBook *contact_and_book = data;*/ EContact *contact = e_contact_new(); @@ -919,7 +919,7 @@ new_card (EPopup *ep, EPopupItem *pitem, void *data) } static void -new_list (EPopup *ep, EPopupItem *pitem, void *data) +new_list (EPopup *ep, EPopupItem *pitem, gpointer data) { /*ContactAndBook *contact_and_book = data;*/ EContact *contact = e_contact_new (); @@ -955,7 +955,7 @@ static EPopupItem eabv_popup_items[] = { }; static void -get_card_1(gint model_row, void *data) +get_card_1(gint model_row, gpointer data) { ContactAndBook *contact_and_book = data; EContact *contact; @@ -966,7 +966,7 @@ get_card_1(gint model_row, void *data) } static void -eabv_popup_free(EPopup *ep, GSList *list, void *data) +eabv_popup_free(EPopup *ep, GSList *list, gpointer data) { ContactAndBook *cab = data; ESelectionModel *selection; @@ -987,7 +987,7 @@ do_popup_menu(EABView *view, GdkEvent *event) EABPopup *ep; EABPopupTargetSelect *t; GSList *menus = NULL; - int i; + gint i; GtkMenu *menu; GPtrArray *cards = g_ptr_array_new(); ContactAndBook *contact_and_book; @@ -1025,7 +1025,7 @@ do_popup_menu(EABView *view, GdkEvent *event) } static void -render_contact (int row, EABView *view) +render_contact (gint row, EABView *view) { EContact *contact = eab_model_get_contact (view->model, row); @@ -1099,8 +1099,8 @@ table_white_space_event(ETableScrolled *table, GdkEvent *event, EABView *view) static void table_drag_data_get (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GtkSelectionData *selection_data, guint info, @@ -1117,7 +1117,7 @@ table_drag_data_get (ETable *table, switch (info) { case DND_TARGET_TYPE_VCARD: { - char *value; + gchar *value; value = eab_contact_list_to_string (contact_list); @@ -1129,7 +1129,7 @@ table_drag_data_get (ETable *table, break; } case DND_TARGET_TYPE_SOURCE_VCARD: { - char *value; + gchar *value; value = eab_book_and_contact_list_to_string (view->book, contact_list); @@ -1221,7 +1221,7 @@ static void contacts_removed (EABModel *model, gpointer data, EABView *eav) { GArray *indices = (GArray *) data; - int count = indices->len; + gint count = indices->len; gint i; for (i = 0; i < count; i ++) { @@ -1284,7 +1284,7 @@ create_table_view (EABView *view) { ETableModel *adapter; GtkWidget *table; - char *etspecfile; + gchar *etspecfile; adapter = eab_table_adapter_new(view->model); @@ -1358,9 +1358,9 @@ static void search_activated (ESearchBar *esb, EABView *v) { GList *master_list; - char *search_word, *search_query, *view_sexp; - const char *category_name; - int search_type, subid; + gchar *search_word, *search_query, *view_sexp; + const gchar *category_name; + gint search_type, subid; g_object_get(esb, "text", &search_word, @@ -1427,7 +1427,7 @@ search_activated (ESearchBar *esb, EABView *v) } static void -search_menu_activated (ESearchBar *esb, int id, EABView *view) +search_menu_activated (ESearchBar *esb, gint id, EABView *view) { if (id == E_FILTERBAR_ADVANCED_ID) e_search_bar_set_item_id (esb, id); @@ -1436,8 +1436,8 @@ search_menu_activated (ESearchBar *esb, int id, EABView *view) static void query_changed (ESearchBar *esb, EABView *view) { - int search_type; - char *query; + gint search_type; + gchar *query; search_type = e_search_bar_get_item_id(esb); if (search_type == E_FILTERBAR_ADVANCED_ID) { @@ -1448,12 +1448,12 @@ query_changed (ESearchBar *esb, EABView *view) } static int -compare_subitems (const void *a, const void *b) +compare_subitems (gconstpointer a, gconstpointer b) { const ESearchBarItem *subitem_a = a; const ESearchBarItem *subitem_b = b; - char *collate_a, *collate_b; - int ret; + gchar *collate_a, *collate_b; + gint ret; collate_a = g_utf8_collate_key (subitem_a->text, -1); collate_b = g_utf8_collate_key (subitem_b->text, -1); @@ -1476,7 +1476,7 @@ generate_viewoption_menu (EABSearchBarItem *subitems) for (i = 0; subitems[i].search.id != -1; ++i) { if (subitems[i].search.text) { - char *str = NULL; + gchar *str = NULL; str = e_str_without_underscores (subitems[i].search.text); menu_item = gtk_image_menu_item_new_with_label (str); if (subitems[i].image) { @@ -1536,10 +1536,10 @@ make_suboptions (EABView *view) subitems[2].image = NULL; for (i=0; i<N; ++i) { - const char *category = g_list_nth_data (master_list, i); + const gchar *category = g_list_nth_data (master_list, i); subitems[i+3].search.id = i+3; subitems[i+3].search.text = g_strdup (category); - subitems[i+3].image = (char *)e_categories_get_icon_file_for (category); + subitems[i+3].image = (gchar *)e_categories_get_icon_file_for (category); } subitems[N+3].search.id = -1; @@ -1571,7 +1571,7 @@ get_master_list (gboolean force_rebuild) GList *l, *p = e_categories_get_list (); for (l = p; l; l = l->next) { - if (e_categories_is_searchable ((const char *) l->data)) + if (e_categories_is_searchable ((const gchar *) l->data)) category_list = g_list_prepend (category_list, l->data); } @@ -1756,7 +1756,7 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) ETable *etable = NULL; EMinicardView *card_view; ESelectionModel *selection_model = NULL; - char *name = NULL; + gchar *name = NULL; gint row = 0, select; list = get_selected_contacts (view); @@ -1797,7 +1797,7 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) for (l=list;l;l=g_list_next(l)) { contact = l->data; - ids = g_list_prepend (ids, (char*)e_contact_get_const (contact, E_CONTACT_UID)); + ids = g_list_prepend (ids, (gchar *)e_contact_get_const (contact, E_CONTACT_UID)); } /* Remove the cards all at once. */ @@ -1864,7 +1864,7 @@ selection_get (GtkWidget *invisible, guint time_stamp, EABView *view) { - char *value; + gchar *value; value = eab_contact_list_to_string (view->clipboard_contacts); @@ -1896,14 +1896,14 @@ selection_received (GtkWidget *invisible, } else { GList *contact_list; GList *l; - char *str = NULL; + gchar *str = NULL; if (selection_data->data [selection_data->length - 1] != 0) { str = g_malloc0 (selection_data->length + 1); memcpy (str, selection_data->data, selection_data->length); contact_list = eab_contact_list_from_string (str); } else - contact_list = eab_contact_list_from_string ((char *)selection_data->data); + contact_list = eab_contact_list_from_string ((gchar *)selection_data->data); for (l = contact_list; l; l = l->next) { EContact *contact = l->data; @@ -1919,7 +1919,7 @@ selection_received (GtkWidget *invisible, } static void -add_to_list (int model_row, gpointer closure) +add_to_list (gint model_row, gpointer closure) { GList **list = closure; *list = g_list_prepend (*list, GINT_TO_POINTER (model_row)); diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h index 7f796415cd..72bafaa535 100644 --- a/addressbook/gui/widgets/e-addressbook-view.h +++ b/addressbook/gui/widgets/e-addressbook-view.h @@ -76,7 +76,7 @@ struct _EABView EBook *book; ESource *source; - char *query; + gchar *query; guint editable : 1; gint displayed_contact; diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c index a6090291bd..52110bb169 100644 --- a/addressbook/gui/widgets/e-minicard-label.c +++ b/addressbook/gui/widgets/e-minicard-label.c @@ -40,7 +40,7 @@ static void e_minicard_label_get_property (GObject *object, guint prop_id, GVal static gboolean e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event); static void e_minicard_label_realize (GnomeCanvasItem *item); static void e_minicard_label_unrealize (GnomeCanvasItem *item); -static void e_minicard_label_reflow(GnomeCanvasItem *item, int flags); +static void e_minicard_label_reflow(GnomeCanvasItem *item, gint flags); static void e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style); static void e_minicard_label_resize_children( EMinicardLabel *e_minicard_label ); @@ -455,7 +455,7 @@ e_minicard_label_style_set (EMinicardLabel *label, GtkStyle *previous_style) } static void -e_minicard_label_reflow(GnomeCanvasItem *item, int flags) +e_minicard_label_reflow(GnomeCanvasItem *item, gint flags) { EMinicardLabel *e_minicard_label = E_MINICARD_LABEL(item); diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 9c493afa61..a48e45ca52 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -303,7 +303,7 @@ selection_change (ESelectionModel *esm, EMinicardViewWidget *widget) } static void -selection_row_change (ESelectionModel *esm, int row, EMinicardViewWidget *widget) +selection_row_change (ESelectionModel *esm, gint row, EMinicardViewWidget *widget) { selection_change (esm, widget); } @@ -447,7 +447,7 @@ e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *eve if (!canvas->focused_item) { EReflow *reflow = E_REFLOW (view->emv); if (reflow->count) { - int unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), 0); + gint unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), 0); if (unsorted != -1) canvas->focused_item = reflow->items [unsorted]; diff --git a/addressbook/gui/widgets/e-minicard-view-widget.h b/addressbook/gui/widgets/e-minicard-view-widget.h index ff9cddac24..29b8904797 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.h +++ b/addressbook/gui/widgets/e-minicard-view-widget.h @@ -49,7 +49,7 @@ struct _EMinicardViewWidget EAddressbookReflowAdapter *adapter; EBook *book; - char *query; + gchar *query; guint editable : 1; double column_width; diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index b716c86c80..2e9ef12507 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -87,20 +87,20 @@ e_minicard_view_drag_data_get(GtkWidget *widget, switch (info) { case DND_TARGET_TYPE_VCARD_LIST: { - char *value; + gchar *value; value = eab_contact_list_to_string (view->drag_list); gtk_selection_data_set (selection_data, selection_data->target, 8, - (unsigned char *)value, strlen (value)); + (guchar *)value, strlen (value)); g_free (value); break; } case DND_TARGET_TYPE_SOURCE_VCARD_LIST: { EBook *book; - char *value; + gchar *value; g_object_get (view->adapter, "book", &book, NULL); value = eab_book_and_contact_list_to_string (book, view->drag_list); @@ -108,7 +108,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget, gtk_selection_data_set (selection_data, selection_data->target, 8, - (unsigned char *)value, strlen (value)); + (guchar *)value, strlen (value)); g_free (value); break; } @@ -155,7 +155,7 @@ e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event, static void set_empty_message (EMinicardView *view) { - char *empty_message; + gchar *empty_message; gboolean editable = FALSE, perform_initial_query = FALSE, searching = FALSE; EBook *book; @@ -417,7 +417,7 @@ static gint e_minicard_view_selection_event (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event) { EMinicardView *view; - int return_val = FALSE; + gint return_val = FALSE; view = E_MINICARD_VIEW (reflow); if (parent_class->selection_event) { @@ -427,7 +427,7 @@ e_minicard_view_selection_event (EReflow *reflow, GnomeCanvasItem *item, GdkEven switch (event->type) { case GDK_FOCUS_CHANGE: if (event->focus_change.in) { - int i; + gint i; for (i = 0; i < reflow->count; i++) { if (reflow->items[i] == item) { e_selection_model_maybe_do_something(reflow->selection, i, 0, 0); @@ -456,7 +456,7 @@ typedef struct { } ViewCbClosure; static void -do_remove (int i, gpointer user_data) +do_remove (gint i, gpointer user_data) { EBook *book; EContact *contact; @@ -478,7 +478,7 @@ do_remove (int i, gpointer user_data) #if 0 static int -compare_to_utf_str (EMinicard *card, const char *utf_str) +compare_to_utf_str (EMinicard *card, const gchar *utf_str) { g_return_val_if_fail(card != NULL, 0); g_return_val_if_fail(E_IS_MINICARD(card), 0); @@ -488,7 +488,7 @@ compare_to_utf_str (EMinicard *card, const char *utf_str) } if (card->card) { - char *file_as; + gchar *file_as; g_object_get(card->card, "file_as", &file_as, NULL); @@ -621,7 +621,7 @@ e_minicard_view_jump_to_letter (EMinicardView *view, gunichar letter) { #if 0 - char uft_str[6 + 1]; + gchar uft_str[6 + 1]; utf_str [g_unichar_to_utf8 (letter, utf_str)] = '\0'; e_reflow_sorted_jump (E_REFLOW_SORTED (view), @@ -636,7 +636,7 @@ typedef struct { } ModelAndList; static void -add_to_list (int index, gpointer closure) +add_to_list (gint index, gpointer closure) { ModelAndList *mal = closure; mal->list = g_list_prepend (mal->list, e_addressbook_reflow_adapter_get_contact (mal->adapter, index)); diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 0c70b12da0..da85e5fd83 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -50,7 +50,7 @@ static void e_minicard_finalize (GObject *object); static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event); static void e_minicard_realize (GnomeCanvasItem *item); static void e_minicard_unrealize (GnomeCanvasItem *item); -static void e_minicard_reflow ( GnomeCanvasItem *item, int flags ); +static void e_minicard_reflow ( GnomeCanvasItem *item, gint flags ); static void e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style); static void e_minicard_resize_children( EMinicard *e_minicard ); @@ -600,7 +600,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) break; case GDK_BUTTON_PRESS: { if (1 <= event->button.button && event->button.button <= 2) { - int ret_val = e_minicard_selected(e_minicard, event); + gint ret_val = e_minicard_selected(e_minicard, event); GdkEventMask mask = ((1 << (4 + event->button.button)) | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | @@ -619,7 +619,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) e_minicard->drag_button_down = TRUE; return ret_val; } else if (event->button.button == 3) { - int ret_val = e_minicard_selected(e_minicard, event); + gint ret_val = e_minicard_selected(e_minicard, event); if (ret_val != 0) return ret_val; } @@ -675,9 +675,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) return FALSE; } else { - int row_count = e_selection_model_row_count (reflow->selection); - int model_index = e_selection_model_cursor_row (reflow->selection); - int view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index); + gint row_count = e_selection_model_row_count (reflow->selection); + gint model_index = e_selection_model_cursor_row (reflow->selection); + gint view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index); if (view_index == 0) view_index = row_count-1; @@ -701,9 +701,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) return FALSE; } else { - int row_count = e_selection_model_row_count(reflow->selection); - int model_index = e_selection_model_cursor_row (reflow->selection); - int view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index); + gint row_count = e_selection_model_row_count(reflow->selection); + gint model_index = e_selection_model_cursor_row (reflow->selection); + gint view_index = e_sorter_model_to_sorted (reflow->selection->sorter, model_index); if (view_index == row_count-1) view_index = 0; @@ -768,8 +768,8 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width) GnomeCanvasItem *new_item; GnomeCanvasGroup *group; EMinicardField *minicard_field; - char *name; - char *string; + gchar *name; + gchar *string; gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL); group = GNOME_CANVAS_GROUP( e_minicard ); @@ -817,7 +817,7 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width) } -static const char * +static const gchar * get_email_location (EVCardAttribute *attr) { gint i; @@ -831,28 +831,28 @@ get_email_location (EVCardAttribute *attr) } static void -add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, int limit, gboolean is_list) +add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, gint limit, gboolean is_list) { GnomeCanvasItem *new_item; GnomeCanvasGroup *group; EMinicardField *minicard_field; - char *name; + gchar *name; GList *l, *le; - int count =0; + gint count =0; gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL); GList *emails = e_contact_get (e_minicard->contact, E_CONTACT_EMAIL); group = GNOME_CANVAS_GROUP( e_minicard ); for (l=email_list, le=emails; l!=NULL && count < limit && le!=NULL; l = l->next, le=le->next) { const gchar *tmp; - char *email = NULL; - char *string = NULL; - char *parsed_name = NULL; + gchar *email = NULL; + gchar *string = NULL; + gchar *parsed_name = NULL; gboolean parser_check; /* do not use name for fields in the contact list */ if (is_list) { - name = (char *)""; + name = (gchar *)""; } else { tmp = get_email_location ((EVCardAttribute *) l->data); name = g_strdup_printf ("%s:", tmp); @@ -908,7 +908,7 @@ get_left_width (EMinicard *e_minicard, gboolean is_list) { gchar *name; EContactField field; - int width = -1; + gint width = -1; PangoLayout *layout; if (is_list) @@ -916,7 +916,7 @@ get_left_width (EMinicard *e_minicard, gboolean is_list) layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas), ""); for(field = E_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING; field++) { - int this_width; + gint this_width; if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME) continue; @@ -935,14 +935,14 @@ get_left_width (EMinicard *e_minicard, gboolean is_list) static void remodel( EMinicard *e_minicard ) { - int count = 0; + gint count = 0; if ( !(GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED) ) return; if (e_minicard->contact) { EContactField field; GList *list; - char *file_as; - int left_width = -1; + gchar *file_as; + gint left_width = -1; gboolean is_list = FALSE; gboolean email_rendered = FALSE; @@ -985,7 +985,7 @@ remodel( EMinicard *e_minicard ) minicard_field = list->data; if (minicard_field && minicard_field->field == field) { GList *this_list = list; - char *string; + gchar *string; string = e_contact_get(e_minicard->contact, field); if (string && *string) { @@ -1000,14 +1000,14 @@ remodel( EMinicard *e_minicard ) list = g_list_delete_link(list, this_list); g_free(string); } else { - char *string; + gchar *string; if (left_width == -1) { left_width = get_left_width (e_minicard, is_list); } if (is_email) { GList *email; - int limit; + gint limit; limit = 5 - count; email = e_contact_get_attributes (e_minicard->contact, E_CONTACT_EMAIL); @@ -1035,7 +1035,7 @@ remodel( EMinicard *e_minicard ) } static void -e_minicard_reflow(GnomeCanvasItem *item, int flags) +e_minicard_reflow(GnomeCanvasItem *item, gint flags) { EMinicard *e_minicard = E_MINICARD(item); if (GTK_OBJECT_FLAGS (e_minicard) & GNOME_CANVAS_ITEM_REALIZED) { @@ -1080,7 +1080,7 @@ e_minicard_reflow(GnomeCanvasItem *item, int flags) } } -const char * +const gchar * e_minicard_get_card_id (EMinicard *minicard) { g_return_val_if_fail(minicard != NULL, NULL); @@ -1093,10 +1093,10 @@ e_minicard_get_card_id (EMinicard *minicard) } } -int +gint e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) { - int cmp = 0; + gint cmp = 0; g_return_val_if_fail(minicard1 != NULL, 0); g_return_val_if_fail(E_IS_MINICARD(minicard1), 0); @@ -1104,7 +1104,7 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) g_return_val_if_fail(E_IS_MINICARD(minicard2), 0); if (minicard1->contact && minicard2->contact) { - char *file_as1, *file_as2; + gchar *file_as1, *file_as2; g_object_get(minicard1->contact, "file_as", &file_as1, NULL); @@ -1128,7 +1128,7 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) return cmp; } -int +gint e_minicard_selected (EMinicard *minicard, GdkEvent *event) { gint ret_val = 0; diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h index fb8116cb9d..9ab025185c 100644 --- a/addressbook/gui/widgets/e-minicard.h +++ b/addressbook/gui/widgets/e-minicard.h @@ -119,11 +119,11 @@ struct _EMinicardField { #define E_MINICARD_FIELD(field) ((EMinicardField *)(field)) GType e_minicard_get_type (void); -const char *e_minicard_get_card_id (EMinicard *minicard); -int e_minicard_compare (EMinicard *minicard1, +const gchar *e_minicard_get_card_id (EMinicard *minicard); +gint e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2); -int e_minicard_selected (EMinicard *minicard, +gint e_minicard_selected (EMinicard *minicard, GdkEvent *event); gboolean e_minicard_activate_editor (EMinicard *minicard); diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c index 32ae07862f..91056e0544 100644 --- a/addressbook/gui/widgets/eab-config.c +++ b/addressbook/gui/widgets/eab-config.c @@ -126,7 +126,7 @@ eab_config_get_type (void) } EABConfig * -eab_config_new (int type, const char *menuid) +eab_config_new (gint type, const gchar *menuid) { EABConfig *ecp = g_object_new (eab_config_get_type(), NULL); e_config_construct (&ecp->config, type, menuid); @@ -156,7 +156,7 @@ static const EConfigHookTargetMap ecph_targets[] = { static void ecph_class_init (EPluginHookClass *klass) { - int i; + gint i; klass->id = "org.gnome.evolution.addressbook.config:1.0"; diff --git a/addressbook/gui/widgets/eab-config.h b/addressbook/gui/widgets/eab-config.h index 330df5141b..edc13bbb1b 100644 --- a/addressbook/gui/widgets/eab-config.h +++ b/addressbook/gui/widgets/eab-config.h @@ -59,7 +59,7 @@ struct _EABConfigTargetSource { typedef struct _EConfigItem EABConfigItem; GType eab_config_get_type (void); -EABConfig *eab_config_new (int type, const char *menuid); +EABConfig *eab_config_new (gint type, const gchar *menuid); EABConfigTargetSource *eab_config_target_new_source (EABConfig *ecp, struct _ESource *source); diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 96050b2ca4..197a91e89c 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -45,7 +45,7 @@ struct _EABContactDisplayPrivate { EContact *contact; GtkWidget *invisible; - char *selection_uri; + gchar *selection_uri; }; static struct { @@ -78,7 +78,7 @@ common_location [] = #define MAX_COMPACT_IMAGE_DIMENSION 48 static void -eab_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data) +eab_uri_popup_link_open(EPopup *ep, EPopupItem *item, gpointer data) { EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; @@ -87,16 +87,16 @@ eab_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data) } static void -eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data) +eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, gpointer data) { EABContactDisplay *display = data; struct _EABContactDisplayPrivate *p = display->priv; EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; - const char *url = t->uri; - char *html=NULL; - int i=0; + const gchar *url = t->uri; + gchar *html=NULL; + gint i=0; GList *email_list, *l; - int email_num = atoi (url + strlen ("internal-mailto:")); + gint email_num = atoi (url + strlen ("internal-mailto:")); email_list = e_contact_get (p->contact, E_CONTACT_EMAIL); for (l = email_list; l; l=l->next) { @@ -114,7 +114,7 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data) } static void -eab_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data) +eab_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, gpointer data) { EABContactDisplay *display = data; struct _EABContactDisplayPrivate *p = display->priv; @@ -127,14 +127,14 @@ eab_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data) } static void -eab_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data) +eab_uri_popup_address_send(EPopup *ep, EPopupItem *item, gpointer data) { EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; - const char *url = t->uri; + const gchar *url = t->uri; EABContactDisplay *display = data; struct _EABContactDisplayPrivate *p = display->priv; - int mail_num = atoi (url + strlen ("internal-mailto:")); + gint mail_num = atoi (url + strlen ("internal-mailto:")); if (mail_num == -1) return; @@ -174,7 +174,7 @@ static EPopupItem eab_uri_popups[] = { static void -eab_uri_popup_free(EPopup *ep, GSList *list, void *data) +eab_uri_popup_free(EPopup *ep, GSList *list, gpointer data) { while (list){ GSList *n = list->next; @@ -189,13 +189,13 @@ eab_uri_popup_free(EPopup *ep, GSList *list, void *data) } static int -eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri) +eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const gchar *uri) { EABPopup *emp; EABPopupTargetURI *t ; GtkMenu *menu; GSList *menus = NULL; - int i; + gint i; emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup"); @@ -220,7 +220,7 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri } static void -on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, +on_url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EABContactDisplay *display) { if (!strcmp (url, "internal-contact-photo:")) { @@ -230,7 +230,7 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, if (!photo) photo = e_contact_get (display->priv->contact, E_CONTACT_LOGO); - gtk_html_stream_write (handle, (char *)photo->data.inlined.data, photo->data.inlined.length); + gtk_html_stream_write (handle, (gchar *)photo->data.inlined.data, photo->data.inlined.length); gtk_html_end (html, handle, GTK_HTML_STREAM_OK); @@ -254,11 +254,11 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle, } static void -on_link_clicked (GtkHTML *html, const char *uri, EABContactDisplay *display) +on_link_clicked (GtkHTML *html, const gchar *uri, EABContactDisplay *display) { #ifdef HANDLE_MAILTO_INTERNALLY if (!strncmp (uri, "internal-mailto:", strlen ("internal-mailto:"))) { - int mail_num = atoi (uri + strlen ("internal-mailto:")); + gint mail_num = atoi (uri + strlen ("internal-mailto:")); if (mail_num == -1) return; @@ -275,14 +275,14 @@ on_link_clicked (GtkHTML *html, const char *uri, EABContactDisplay *display) #if 0 static void -render_address (GtkHTMLStream *html_stream, EContact *contact, const char *html_label, EContactField adr_field, EContactField label_field) +render_address (GtkHTMLStream *html_stream, EContact *contact, const gchar *html_label, EContactField adr_field, EContactField label_field) { EContactAddress *adr; - const char *label; + const gchar *label; label = e_contact_get_const (contact, label_field); if (label) { - char *html = e_text_to_html (label, E_TEXT_TO_HTML_CONVERT_NL); + gchar *html = e_text_to_html (label, E_TEXT_TO_HTML_CONVERT_NL); gtk_html_stream_printf (html_stream, "<tr><td valign=\"top\" width=\"" IMAGE_COL_WIDTH "\"></td><td valign=\"top\" width=\"100\"><font color=" HEADER_COLOR ">%s:</font><br><a href=\"http://www.mapquest.com/\">%s</a></td><td valign=\"top\">%s</td></tr>", html_label, _("(map)"), html); @@ -312,9 +312,9 @@ This shoul g_free (html); #endif static void -render_name_value (GtkHTMLStream *html_stream, const char *label, const char *str, const char *icon, unsigned int html_flags) +render_name_value (GtkHTMLStream *html_stream, const gchar *label, const gchar *str, const gchar *icon, guint html_flags) { - char *value = e_text_to_html (str, html_flags); + gchar *value = e_text_to_html (str, html_flags); if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) { gtk_html_stream_printf (html_stream, "<tr><td align=\"right\" valign=\"top\">%s</td> <td align=\"right\" valign=\"top\" width=\"100\" nowrap><font color=" HEADER_COLOR ">%s:</font></td>", value, label); @@ -334,9 +334,9 @@ render_name_value (GtkHTMLStream *html_stream, const char *label, const char *st } static void -render_attribute (GtkHTMLStream *html_stream, EContact *contact, const char *html_label, EContactField field, const char *icon, unsigned int html_flags) +render_attribute (GtkHTMLStream *html_stream, EContact *contact, const gchar *html_label, EContactField field, const gchar *icon, guint html_flags) { - const char *str; + const gchar *str; str = e_contact_get_const (contact, field); @@ -346,15 +346,15 @@ render_attribute (GtkHTMLStream *html_stream, EContact *contact, const char *htm } static void -accum_address (GString *gstr, EContact *contact, const char *html_label, EContactField adr_field, EContactField label_field) +accum_address (GString *gstr, EContact *contact, const gchar *html_label, EContactField adr_field, EContactField label_field) { EContactAddress *adr; - const char *label; + const gchar *label; gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL); label = e_contact_get_const (contact, label_field); if (label) { - char *html = e_text_to_html (label, E_TEXT_TO_HTML_CONVERT_NL); + gchar *html = e_text_to_html (label, E_TEXT_TO_HTML_CONVERT_NL); #ifdef mapping_works if (is_rtl) @@ -399,9 +399,9 @@ accum_address (GString *gstr, EContact *contact, const char *html_label, EContac } static void -accum_name_value (GString *gstr, const char *label, const char *str, const char *icon, unsigned int html_flags) +accum_name_value (GString *gstr, const gchar *label, const gchar *str, const gchar *icon, guint html_flags) { - char *value = e_text_to_html (str, html_flags); + gchar *value = e_text_to_html (str, html_flags); if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) { g_string_append_printf (gstr, "<tr><td valign=\"top\" align=\"right\">%s</td> <td align=\"right\" valign=\"top\" width=\"100\" nowrap><font color=" HEADER_COLOR ">%s:</font></td>", value, label); @@ -422,9 +422,9 @@ accum_name_value (GString *gstr, const char *label, const char *str, const char static void -accum_attribute (GString *gstr, EContact *contact, const char *html_label, EContactField field, const char *icon, unsigned int html_flags) +accum_attribute (GString *gstr, EContact *contact, const gchar *html_label, EContactField field, const gchar *icon, guint html_flags) { - const char *str; + const gchar *str; str = e_contact_get_const (contact, field); @@ -434,11 +434,11 @@ accum_attribute (GString *gstr, EContact *contact, const char *html_label, ECont } static void -accum_time_attribute (GString *gstr, EContact *contact, const char *html_label, EContactField field, const char *icon, unsigned int html_flags) +accum_time_attribute (GString *gstr, EContact *contact, const gchar *html_label, EContactField field, const gchar *icon, guint html_flags) { EContactDate *date; GDate *gdate = NULL; - char sdate[100]; + gchar sdate[100]; date = e_contact_get (contact, field); if (date) { @@ -453,13 +453,13 @@ accum_time_attribute (GString *gstr, EContact *contact, const char *html_label, } static void -accum_multival_attribute (GString *gstr, EContact *contact, const char *html_label, EContactField field, const char *icon, unsigned int html_flags) +accum_multival_attribute (GString *gstr, EContact *contact, const gchar *html_label, EContactField field, const gchar *icon, guint html_flags) { GList *val_list, *l; val_list = e_contact_get (contact, field); for (l = val_list; l; l = l->next) { - const char *str = (const char *) l->data; + const gchar *str = (const gchar *) l->data; accum_name_value (gstr, html_label, str, icon, html_flags); } g_list_foreach (val_list, (GFunc) g_free, NULL); @@ -495,7 +495,7 @@ render_contact_list (GtkHTMLStream *html_stream, EContact *contact) } static void -start_block (GtkHTMLStream *html_stream, const char *label) +start_block (GtkHTMLStream *html_stream, const gchar *label) { gtk_html_stream_printf (html_stream, "<tr><td height=\"20\" colspan=\"3\"><font color=" HEADER_COLOR "><b>%s</b></font></td></tr>", label); } @@ -506,7 +506,7 @@ end_block (GtkHTMLStream *html_stream) gtk_html_stream_printf (html_stream, "<tr><td height=\"20\"> </td></tr>"); } -static const char * +static const gchar * get_email_location (EVCardAttribute *attr) { gint i; @@ -526,10 +526,10 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) GList *email_list, *l, *email_attr_list, *al; gboolean is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL); #ifdef HANDLE_MAILTO_INTERNALLY - int email_num = 0; + gint email_num = 0; #endif const gchar *nl; - char *nick=NULL; + gchar *nick=NULL; gtk_html_stream_printf (html_stream, "<table border=\"0\">"); @@ -542,8 +542,8 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) email_attr_list = e_contact_get_attributes (contact, E_CONTACT_EMAIL); for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) { - char *html = NULL, *name = NULL, *mail = NULL; - char *attr_str = (char *)get_email_location ((EVCardAttribute *) al->data); + gchar *html = NULL, *name = NULL, *mail = NULL; + gchar *attr_str = (gchar *)get_email_location ((EVCardAttribute *) al->data); #ifdef HANDLE_MAILTO_INTERNALLY if (!eab_parse_qp_email (l->data, &name, &mail)) @@ -681,8 +681,8 @@ eab_contact_display_render_normal (EABContactDisplay *display, EContact *contact gtk_html_stream_printf (html_stream, "<body><table width=\"100%%\"><tr><td %s>\n", is_rtl ? " align=\"right\" " : ""); if (contact) { - const char *str; - char *html; + const gchar *str; + gchar *html; EContactPhoto *photo; gtk_html_stream_printf (html_stream, "<table cellspacing=\"20\" border=\"0\"><td %s valign=\"top\">", is_rtl ? " align=\"right\" " : ""); @@ -741,8 +741,8 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac gtk_html_stream_write (html_stream, "<body>\n", 7); if (contact) { - const char *str; - char *html; + const gchar *str; + gchar *html; EContactPhoto *photo; guint bg_frame = 0x000000, bg_body = 0xEEEEEE; GtkStyle *style; @@ -776,7 +776,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac if (!photo) photo = e_contact_get (contact, E_CONTACT_LOGO); if (photo) { - int calced_width = MAX_COMPACT_IMAGE_DIMENSION, calced_height = MAX_COMPACT_IMAGE_DIMENSION; + gint calced_width = MAX_COMPACT_IMAGE_DIMENSION, calced_height = MAX_COMPACT_IMAGE_DIMENSION; GdkPixbufLoader *loader = gdk_pixbuf_loader_new (); GdkPixbuf *pixbuf; @@ -791,7 +791,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac g_object_ref (pixbuf); g_object_unref (loader); if (pixbuf) { - int max_dimension; + gint max_dimension; calced_width = gdk_pixbuf_get_width (pixbuf); calced_height = gdk_pixbuf_get_height (pixbuf); @@ -926,7 +926,7 @@ eab_contact_display_render (EABContactDisplay *display, EContact *contact, static int eab_html_press_event (GtkWidget *widget, GdkEvent *event,EABContactDisplay *display) { - char *uri; + gchar *uri; gboolean res = FALSE; diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 58895c736c..9b3b0c7730 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -54,7 +54,7 @@ /* the NULL's in this table correspond to the status codes that should *never* be generated by a backend */ -static const char *status_to_string[] = { +static const gchar *status_to_string[] = { /* E_BOOK_ERROR_OK */ N_("Success"), /* E_BOOK_ERROR_INVALID_ARG */ NULL, /* E_BOOK_ERROR_BUSY */ N_("Backend busy"), @@ -81,9 +81,9 @@ static const char *status_to_string[] = { }; void -eab_error_dialog (const char *msg, EBookStatus status) +eab_error_dialog (const gchar *msg, EBookStatus status) { - const char *status_str; + const gchar *status_str; if (status >= G_N_ELEMENTS (status_to_string)) status_str = "Other error"; @@ -97,7 +97,7 @@ eab_error_dialog (const char *msg, EBookStatus status) void eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) { - char *label_string, *label = NULL, *uri; + gchar *label_string, *label = NULL, *uri; GtkWidget *dialog; gboolean can_detail_error = TRUE; @@ -114,7 +114,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) } else if (!strncmp (uri, "file:", 5)) { - char *path = g_filename_from_uri (uri, NULL, NULL); + gchar *path = g_filename_from_uri (uri, NULL, NULL); label = g_strdup_printf ( _("This address book cannot be opened. Please check that the " "path %s exists and that permissions are set to access it."), path); @@ -162,7 +162,7 @@ void eab_search_result_dialog (GtkWidget *parent, EBookViewStatus status) { - char *str = NULL; + gchar *str = NULL; switch (status) { case E_BOOK_VIEW_STATUS_OK: @@ -304,7 +304,7 @@ eab_show_multiple_contacts (EBook *book, gboolean editable) { if (list) { - int length = g_list_length (list); + gint length = g_list_length (list); if (length > 5) { GtkWidget *dialog; gint response; @@ -336,11 +336,11 @@ eab_show_multiple_contacts (EBook *book, static gint -file_exists(GtkWindow *window, const char *filename) +file_exists(GtkWindow *window, const gchar *filename) { GtkWidget *dialog; gint response; - char * utf8_filename; + gchar * utf8_filename; utf8_filename = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); dialog = gtk_message_dialog_new (window, @@ -362,15 +362,15 @@ file_exists(GtkWindow *window, const char *filename) typedef struct { GtkWidget *filesel; - char *vcard; + gchar *vcard; gboolean has_multiple_contacts; } SaveAsInfo; static void save_it(GtkWidget *widget, SaveAsInfo *info) { - const char *filename; - char *uri; + const gchar *filename; + gchar *uri; gint response = 0; @@ -388,7 +388,7 @@ save_it(GtkWidget *widget, SaveAsInfo *info) } if (!e_write_file_uri (uri, info->vcard)) { - char *err_str_ext; + gchar *err_str_ext; if (info->has_multiple_contacts) { /* more than one, finding the total number of contacts might * hit performance while saving large number of contacts @@ -419,7 +419,7 @@ close_it(GtkWidget *widget, SaveAsInfo *info) } static void -destroy_it(void *data, GObject *where_the_object_was) +destroy_it(gpointer data, GObject *where_the_object_was) { SaveAsInfo *info = data; g_free (info->vcard); @@ -435,10 +435,10 @@ filechooser_response (GtkWidget *widget, gint response_id, SaveAsInfo *info) close_it (widget, info); } -static char * -make_safe_filename (char *name) +static gchar * +make_safe_filename (gchar *name) { - char *safe; + gchar *safe; if (!name) { /* This is a filename. Translators take note. */ @@ -521,11 +521,11 @@ eab_select_source (const gchar *title, const gchar *message, const gchar *select } void -eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window) +eab_contact_save (gchar *title, EContact *contact, GtkWindow *parent_window) { GtkWidget *filesel; - char *file; - char *name; + gchar *file; + gchar *name; SaveAsInfo *info = g_new(SaveAsInfo, 1); name = e_contact_get (contact, E_CONTACT_FILE_AS); @@ -563,11 +563,11 @@ eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window) } void -eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window) +eab_contact_list_save (gchar *title, GList *list, GtkWindow *parent_window) { GtkWidget *filesel; SaveAsInfo *info = g_new(SaveAsInfo, 1); - char *file; + gchar *file; filesel = gtk_file_chooser_dialog_new (title, parent_window, @@ -586,7 +586,7 @@ eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window) /* This is a filename. Translators take note. */ if (list && list->data && list->next == NULL) { - char *name; + gchar *name; name = e_contact_get (E_CONTACT (list->data), E_CONTACT_FILE_AS); if (!name) name = e_contact_get (E_CONTACT (list->data), E_CONTACT_FULL_NAME); @@ -621,7 +621,7 @@ typedef struct ContactCopyProcess_ ContactCopyProcess; typedef void (*ContactCopyDone) (ContactCopyProcess *process); struct ContactCopyProcess_ { - int count; + gint count; gboolean book_status; GList *contacts; EBook *source; @@ -644,7 +644,7 @@ do_delete (gpointer data, gpointer user_data) { EBook *book = user_data; EContact *contact = data; - const char *id; + const gchar *id; id = e_contact_get_const (contact, E_CONTACT_UID); e_book_remove_contact(book, id, NULL); @@ -678,7 +678,7 @@ process_unref (ContactCopyProcess *process) } static void -contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user_data) +contact_added_cb (EBook* book, EBookStatus status, const gchar *id, gpointer user_data) { ContactCopyProcess *process = user_data; @@ -733,9 +733,9 @@ eab_transfer_contacts (EBook *source, GList *contacts /* adopted */, gboolean de { EBook *dest; ESource *destination_source; - static char *last_uid = NULL; + static gchar *last_uid = NULL; ContactCopyProcess *process; - char *desc; + gchar *desc; if (contacts == NULL) return; @@ -785,7 +785,7 @@ eab_transfer_contacts (EBook *source, GList *contacts /* adopted */, gboolean de typedef struct { EContact *contact; - int email_num; /* if the contact is a person (not a list), the email address to use */ + gint email_num; /* if the contact is a person (not a list), the email address to use */ } ContactAndEmailNum; static void @@ -858,11 +858,11 @@ eab_send_to_contact_and_email_num_list (GList *contact_list) gtk_widget_show (GTK_WIDGET (composer)); } -static const char * +static const gchar * get_email (EContact *contact, EContactField field_id, gchar **to_free) { - char *name = NULL, *mail = NULL; - const char *value = e_contact_get_const (contact, field_id); + gchar *name = NULL, *mail = NULL; + const gchar *value = e_contact_get_const (contact, field_id); *to_free = NULL; @@ -986,7 +986,7 @@ eab_send_contact_list (GList *contacts, EABDisposition disposition) } void -eab_send_contact (EContact *contact, int email_num, EABDisposition disposition) +eab_send_contact (EContact *contact, gint email_num, EABDisposition disposition) { GList *list = NULL; @@ -1016,7 +1016,7 @@ eab_create_image_chooser_widget(gchar *name, gchar *string1, gchar *string2, gint int1, gint int2) { - char *filename; + gchar *filename; GtkWidget *w = NULL; w = e_image_chooser_new (); @@ -1064,12 +1064,12 @@ eab_parse_qp_email (const gchar *string, gchar **name, gchar **email) then makes one string and returns it, otherwise returns NULL. Returned string is usable to place directly into GtkHtml stream. Returned value should be freed with g_free. */ -char * +gchar * eab_parse_qp_email_to_html (const gchar *string) { - char *name = NULL, *mail = NULL; - char *html_name, *html_mail; - char *value; + gchar *name = NULL, *mail = NULL; + gchar *html_name, *html_mail; + gchar *value; if (!eab_parse_qp_email (string, &name, &mail)) return NULL; diff --git a/addressbook/gui/widgets/eab-gui-util.h b/addressbook/gui/widgets/eab-gui-util.h index b5129d1637..f29f2292f8 100644 --- a/addressbook/gui/widgets/eab-gui-util.h +++ b/addressbook/gui/widgets/eab-gui-util.h @@ -56,11 +56,11 @@ void eab_transfer_contacts (EBook *source, gboolean delete_from_source, GtkWindow *parent_window); -void eab_contact_save (char *title, +void eab_contact_save (gchar *title, EContact *contact, GtkWindow *parent_window); -void eab_contact_list_save (char *title, +void eab_contact_list_save (gchar *title, GList *list, GtkWindow *parent_window); @@ -70,7 +70,7 @@ typedef enum { } EABDisposition; void eab_send_contact (EContact *contact, - int email_num, + gint email_num, EABDisposition disposition); void eab_send_contact_list (GList *contacts, EABDisposition disposition); @@ -83,7 +83,7 @@ ESource *eab_select_source (const gchar *title, const gch /* To parse quoted printable address & return email & name fields */ gboolean eab_parse_qp_email (const gchar *string, gchar **name, gchar **email); -char *eab_parse_qp_email_to_html (const gchar *string); +gchar *eab_parse_qp_email_to_html (const gchar *string); G_END_DECLS diff --git a/addressbook/gui/widgets/eab-menu.c b/addressbook/gui/widgets/eab-menu.c index e07489b003..e26e621437 100644 --- a/addressbook/gui/widgets/eab-menu.c +++ b/addressbook/gui/widgets/eab-menu.c @@ -33,7 +33,7 @@ #include "eab-menu.h" -static void eabm_standard_menu_factory(EMenu *emp, void *data); +static void eabm_standard_menu_factory(EMenu *emp, gpointer data); static GObjectClass *eabm_parent; @@ -55,7 +55,7 @@ eabm_target_free(EMenu *ep, EMenuTarget *t) switch (t->type) { case EAB_MENU_TARGET_SELECT: { EABMenuTargetSelect *s = (EABMenuTargetSelect *)t; - int i; + gint i; for (i=0;i<s->cards->len;i++) g_object_unref(s->cards->pdata[i]); @@ -98,7 +98,7 @@ eab_menu_get_type(void) return type; } -EABMenu *eab_menu_new(const char *menuid) +EABMenu *eab_menu_new(const gchar *menuid) { EABMenu *emp = g_object_new(eab_menu_get_type(), NULL); @@ -119,11 +119,11 @@ EABMenu *eab_menu_new(const char *menuid) * Return value: **/ EABMenuTargetSelect * -eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPtrArray *cards) +eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, gint readonly, GPtrArray *cards) { EABMenuTargetSelect *t = e_menu_target_new(&eabp->menu, EAB_MENU_TARGET_SELECT, sizeof(*t)); guint32 mask = ~0; - int has_email = FALSE, i; + gint has_email = FALSE, i; /* FIXME: duplicated in eab-popup.c */ @@ -166,7 +166,7 @@ eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPt } static void -eabm_standard_menu_factory(EMenu *emp, void *data) +eabm_standard_menu_factory(EMenu *emp, gpointer data) { /* noop */ } @@ -199,7 +199,7 @@ eabm_standard_menu_factory(EMenu *emp, void *data) */ -static void *eabmph_parent_class; +static gpointer eabmph_parent_class; #define eabmph ((EABMenuHook *)eph) static const EMenuHookTargetMask eabmph_select_masks[] = { @@ -227,7 +227,7 @@ eabmph_finalise(GObject *o) static void eabmph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = eabmph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.addressbook.bonobomenu:1.0"; diff --git a/addressbook/gui/widgets/eab-menu.h b/addressbook/gui/widgets/eab-menu.h index 7bea32efa4..53e2e88b25 100644 --- a/addressbook/gui/widgets/eab-menu.h +++ b/addressbook/gui/widgets/eab-menu.h @@ -84,9 +84,9 @@ struct _EABMenuClass { GType eab_menu_get_type(void); -EABMenu *eab_menu_new(const char *menuid); +EABMenu *eab_menu_new(const gchar *menuid); -EABMenuTargetSelect *eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPtrArray *cards); +EABMenuTargetSelect *eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, gint readonly, GPtrArray *cards); /* ********************************************************************** */ diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c index d520108db4..e56b816af2 100644 --- a/addressbook/gui/widgets/eab-popup-control.c +++ b/addressbook/gui/widgets/eab-popup-control.c @@ -316,7 +316,7 @@ eab_popup_new (void) } static void -emit_event (EABPopupControl *pop, const char *event) +emit_event (EABPopupControl *pop, const gchar *event) { if (pop->es) { BonoboArg *arg; diff --git a/addressbook/gui/widgets/eab-popup.c b/addressbook/gui/widgets/eab-popup.c index 1b5cde4b5c..2957c483a6 100644 --- a/addressbook/gui/widgets/eab-popup.c +++ b/addressbook/gui/widgets/eab-popup.c @@ -53,7 +53,7 @@ eabp_target_free(EPopup *ep, EPopupTarget *t) switch (t->type) { case EAB_POPUP_TARGET_SELECT: { EABPopupTargetSelect *s = (EABPopupTargetSelect *)t; - int i; + gint i; for (i=0;i<s->cards->len;i++) g_object_unref(s->cards->pdata[i]); @@ -115,7 +115,7 @@ eab_popup_get_type(void) return type; } -EABPopup *eab_popup_new(const char *menuid) +EABPopup *eab_popup_new(const gchar *menuid) { EABPopup *eabp = g_object_new(eab_popup_get_type(), NULL); @@ -138,7 +138,7 @@ EABPopup *eab_popup_new(const char *menuid) EABPopupTargetURI * -eab_popup_target_new_uri(EABPopup *emp, const char *uri) +eab_popup_target_new_uri(EABPopup *emp, const gchar *uri) { EABPopupTargetURI *t = e_popup_target_new(&emp->popup, EAB_POPUP_TARGET_URI, sizeof(*t)); guint32 mask = ~0; @@ -162,11 +162,11 @@ eab_popup_target_new_uri(EABPopup *emp, const char *uri) EABPopupTargetSelect * -eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, GPtrArray *cards) +eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, gint readonly, GPtrArray *cards) { EABPopupTargetSelect *t = e_popup_target_new(&eabp->popup, EAB_POPUP_TARGET_SELECT, sizeof(*t)); guint32 mask = ~0; - int has_email = FALSE, i; + gint has_email = FALSE, i; /* FIXME: duplicated in eab-menu.c */ @@ -219,7 +219,7 @@ eab_popup_target_new_source(EABPopup *eabp, ESourceSelector *selector) { EABPopupTargetSource *t = e_popup_target_new(&eabp->popup, EAB_POPUP_TARGET_SOURCE, sizeof(*t)); guint32 mask = ~0; - const char *source_uri; + const gchar *source_uri; ESource *source; /* TODO: this is duplicated for calendar and tasks too */ @@ -247,7 +247,7 @@ eab_popup_target_new_source(EABPopup *eabp, ESourceSelector *selector) #ifdef ADAPTED_TO_E_NAME_SELECTOR EABPopupTargetSelectNames * -eab_popup_target_new_select_names(EABPopup *eabp, struct _ESelectNamesModel *model, int row) +eab_popup_target_new_select_names(EABPopup *eabp, struct _ESelectNamesModel *model, gint row) { EABPopupTargetSelectNames *t = e_popup_target_new(&eabp->popup, EAB_POPUP_TARGET_SELECT_NAMES, sizeof(*t)); @@ -290,7 +290,7 @@ eab_popup_target_new_select_names(EABPopup *eabp, struct _ESelectNamesModel *mod */ -static void *eabph_parent_class; +static gpointer eabph_parent_class; #define eabph ((EABPopupHook *)eph) static const EPopupHookTargetMask eabph_select_masks[] = { @@ -338,7 +338,7 @@ eabph_finalise(GObject *o) static void eabph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = eabph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.addressbook.popup:1.0"; diff --git a/addressbook/gui/widgets/eab-popup.h b/addressbook/gui/widgets/eab-popup.h index 86deff7f9c..2be355cf25 100644 --- a/addressbook/gui/widgets/eab-popup.h +++ b/addressbook/gui/widgets/eab-popup.h @@ -114,7 +114,7 @@ struct _EABPopupTargetSelect { struct _EABPopupTargetURI { EPopupTarget target; - char *uri; + gchar *uri; }; /** @@ -147,7 +147,7 @@ struct _EABPopupTargetSelectNames { EPopupTarget target; struct _ESelectNamesModel *model; - int row; + gint row; }; #endif @@ -167,15 +167,15 @@ struct _EABPopupClass { GType eab_popup_get_type(void); -EABPopup *eab_popup_new(const char *menuid); +EABPopup *eab_popup_new(const gchar *menuid); -EABPopupTargetSelect *eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, GPtrArray *cards); -EABPopupTargetURI *eab_popup_target_new_uri(EABPopup *emp, const char *uri); +EABPopupTargetSelect *eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, gint readonly, GPtrArray *cards); +EABPopupTargetURI *eab_popup_target_new_uri(EABPopup *emp, const gchar *uri); EABPopupTargetSource *eab_popup_target_new_source(EABPopup *eabp, struct _ESourceSelector *selector); #ifdef ADAPTED_TO_E_NAME_SELECTOR -EABPopupTargetSelectNames *eab_popup_target_new_select_names(EABPopup *eabp, struct _ESelectNamesModel *model, int row); +EABPopupTargetSelectNames *eab_popup_target_new_select_names(EABPopup *eabp, struct _ESelectNamesModel *model, gint row); #endif diff --git a/addressbook/gui/widgets/gal-view-factory-minicard.c b/addressbook/gui/widgets/gal-view-factory-minicard.c index 0240dddb60..2e9accaeac 100644 --- a/addressbook/gui/widgets/gal-view-factory-minicard.c +++ b/addressbook/gui/widgets/gal-view-factory-minicard.c @@ -31,7 +31,7 @@ G_DEFINE_TYPE (GalViewFactoryMinicard, gal_view_factory_minicard, GAL_VIEW_FACTORY_TYPE) -static const char * +static const gchar * gal_view_factory_minicard_get_title (GalViewFactory *factory) { return _("Card View"); @@ -39,12 +39,12 @@ gal_view_factory_minicard_get_title (GalViewFactory *factory) static GalView * gal_view_factory_minicard_new_view (GalViewFactory *factory, - const char *name) + const gchar *name) { return gal_view_minicard_new(name); } -static const char * +static const gchar * gal_view_factory_minicard_get_type_code (GalViewFactory *factory) { return "minicard"; diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index 0a2fac9262..ae9b916e54 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -40,34 +40,34 @@ static GalViewClass *gal_view_minicard_parent_class; static void gal_view_minicard_load (GalView *view, - const char *filename) + const gchar *filename) { xmlDoc *doc; doc = e_xml_parse_file (filename); if (doc) { xmlNode *root = xmlDocGetRootElement(doc); - GAL_VIEW_MINICARD (view)->column_width = e_xml_get_double_prop_by_name_with_default (root, (const unsigned char *)"column_width", 150); + GAL_VIEW_MINICARD (view)->column_width = e_xml_get_double_prop_by_name_with_default (root, (const guchar *)"column_width", 150); xmlFreeDoc(doc); } } static void gal_view_minicard_save (GalView *view, - const char *filename) + const gchar *filename) { xmlDoc *doc; xmlNode *root; - doc = xmlNewDoc((const unsigned char *)"1.0"); - root = xmlNewNode (NULL, (const unsigned char *)"EMinicardViewState"); - e_xml_set_double_prop_by_name (root, (const unsigned char *)"column_width", GAL_VIEW_MINICARD (view)->column_width); + doc = xmlNewDoc((const guchar *)"1.0"); + root = xmlNewNode (NULL, (const guchar *)"EMinicardViewState"); + e_xml_set_double_prop_by_name (root, (const guchar *)"column_width", GAL_VIEW_MINICARD (view)->column_width); xmlDocSetRootElement(doc, root); e_xml_save_file (filename, doc); xmlFreeDoc(doc); } -static const char * +static const gchar * gal_view_minicard_get_title (GalView *view) { return GAL_VIEW_MINICARD(view)->title; @@ -75,13 +75,13 @@ gal_view_minicard_get_title (GalView *view) static void gal_view_minicard_set_title (GalView *view, - const char *title) + const gchar *title) { g_free(GAL_VIEW_MINICARD(view)->title); GAL_VIEW_MINICARD(view)->title = g_strdup(title); } -static const char * +static const gchar * gal_view_minicard_get_type_code (GalView *view) { return "minicard"; diff --git a/addressbook/gui/widgets/gal-view-minicard.h b/addressbook/gui/widgets/gal-view-minicard.h index cf3faaec56..f5681fcca5 100644 --- a/addressbook/gui/widgets/gal-view-minicard.h +++ b/addressbook/gui/widgets/gal-view-minicard.h @@ -38,7 +38,7 @@ typedef struct { GalView base; - char *title; + gchar *title; double column_width; EMinicardViewWidget *emvw; diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 164f9f5fe2..0456f81b19 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -53,7 +53,7 @@ typedef struct { guint idle_id; - int state; + gint state; FILE *file; gulong size; gint count; @@ -63,7 +63,7 @@ typedef struct { } CSVImporter; static gint importer; -static char delimiter; +static gchar delimiter; static void csv_import_done(CSVImporter *gci); @@ -85,7 +85,7 @@ typedef struct { #define FLAG_BIRTH_MONTH 0x50 #define FLAG_DATE_ANNIVERSARY 0x30 #define FLAG_INVALID 0xff - int flags; + gint flags; }import_fields; static import_fields csv_fields_outlook[] = { @@ -263,7 +263,7 @@ static import_fields csv_fields_evolution[] = { }; static void -add_to_notes(EContact *contact, gint i, char *val) { +add_to_notes(EContact *contact, gint i, gchar *val) { const gchar *old_text; const gchar *field_text = NULL; GString *new_text; @@ -296,12 +296,12 @@ add_to_notes(EContact *contact, gint i, char *val) { /* @str: a date string in the format MM-DD-YYYY or MMDDYYYY */ static EContactDate* -date_from_string (const char *str) +date_from_string (const gchar *str) { EContactDate* date; - int length; - char *t; - int i = 0; + gint length; + gchar *t; + gint i = 0; g_return_val_if_fail (str != NULL, NULL); @@ -335,13 +335,13 @@ date_from_string (const char *str) } static gboolean -parseLine (CSVImporter *gci, EContact *contact, char *buf) { +parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { - char *ptr = buf, *do_free = NULL; + gchar *ptr = buf, *do_free = NULL; GString *value; gint i = 0; - int flags = 0; - int contact_field; + gint flags = 0; + gint contact_field; EContactAddress *home_address = NULL, *work_address = NULL, *other_address = NULL; EContactDate *bday = NULL; GString *home_street, *work_street, *other_street; @@ -554,8 +554,8 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { EContact *contact = NULL; GString *line; GString *str; - char *buf; - char c; + gchar *buf; + gchar c; /* if(!fgets(line, sizeof(line),f)) @@ -642,7 +642,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { } static gboolean -csv_import_contacts(void *d) { +csv_import_contacts(gpointer d) { CSVImporter *gci = d; EContact *contact = NULL; @@ -711,8 +711,8 @@ static const gchar *supported_extensions[4] = { static gboolean csv_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { - char *ext; - int i; + gchar *ext; + gint i; EImportTargetURI *s; if (target->type != E_IMPORT_TARGET_URI) diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index 75f30a2359..544bb485fb 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -58,7 +58,7 @@ typedef struct { GHashTable *dn_contact_hash; - int state; /* 0 - initial scan, 1 - list cards, 2 - cancelled/complete */ + gint state; /* 0 - initial scan, 1 - list cards, 2 - cancelled/complete */ FILE *file; gulong size; @@ -79,7 +79,7 @@ static struct { #define FLAG_WORK_ADDRESS 0x02 #define FLAG_LIST 0x04 #define FLAG_BOOLEAN 0x08 - int flags; + gint flags; } ldif_fields[] = { { "cn", E_CONTACT_FULL_NAME }, @@ -128,13 +128,13 @@ ldif_fields[] = { { "nsAIMid", E_CONTACT_IM_AIM, FLAG_LIST }, { "mozilla_AimScreenName", E_CONTACT_IM_AIM, FLAG_LIST } }; -static int num_ldif_fields = sizeof(ldif_fields) / sizeof (ldif_fields[0]); +static gint num_ldif_fields = sizeof(ldif_fields) / sizeof (ldif_fields[0]); static GString * -getValue( char **src ) +getValue( gchar **src ) { GString *dest = g_string_new(""); - char *s = *src; + gchar *s = *src; gboolean need_base64 = (*s == ':'); copy_line: @@ -167,7 +167,7 @@ getValue( char **src ) } static void -populate_contact_address (EContactAddress *address, char *attr, char *value) +populate_contact_address (EContactAddress *address, gchar *attr, gchar *value) { if (!g_ascii_strcasecmp (attr, "locality") || !g_ascii_strcasecmp (attr, "l") || @@ -188,7 +188,7 @@ populate_contact_address (EContactAddress *address, char *attr, char *value) else if (!g_ascii_strcasecmp (attr, "mozillaPostalAddress2") || !g_ascii_strcasecmp (attr, "mozillaHomePostalAddress2")) { if (address->ext && *address->ext) { - char *temp = g_strdup (address->ext); + gchar *temp = g_strdup (address->ext); g_free (address->ext); address->ext = g_strconcat (temp, ",\n", value, NULL); g_free (temp); @@ -199,7 +199,7 @@ populate_contact_address (EContactAddress *address, char *attr, char *value) } else if (!g_ascii_strcasecmp (attr, "postalAddress") || !g_ascii_strcasecmp (attr, "homepostalAddress")) { - char *c, *i, *addr_field; + gchar *c, *i, *addr_field; addr_field = g_strdup (value); i = addr_field; @@ -210,7 +210,7 @@ populate_contact_address (EContactAddress *address, char *attr, char *value) } } if (address->ext && *address->ext) { - char *temp = g_strdup (address->ext); + gchar *temp = g_strdup (address->ext); g_free (address->ext); address->ext = g_strconcat (addr_field, ",\n", temp, NULL); g_free (temp); @@ -225,10 +225,10 @@ populate_contact_address (EContactAddress *address, char *attr, char *value) static gboolean parseLine (LDIFImporter *gci, EContact *contact, EContactAddress *work_address, EContactAddress *home_address, - char **buf) + gchar **buf) { - char *ptr; - char *colon, *value; + gchar *ptr; + gchar *colon, *value; gboolean field_handled; GString *ldif_value; @@ -256,9 +256,9 @@ parseLine (LDIFImporter *gci, EContact *contact, return FALSE; } - colon = (char *)strchr( ptr, ':' ); + colon = (gchar *)strchr( ptr, ':' ); if (colon) { - int i; + gint i; *colon = 0; value = colon + 1; @@ -345,8 +345,8 @@ getNextLDIFEntry(LDIFImporter *gci, FILE *f ) EContact *contact; EContactAddress *work_address, *home_address; GString *str; - char line[1024]; - char *buf; + gchar line[1024]; + gchar *buf; str = g_string_new (""); /* read from the file until we get to a blank line (or eof) */ @@ -402,7 +402,7 @@ resolve_list_card (LDIFImporter *gci, EContact *contact) { GList *email, *l; GList *email_attrs = NULL; - char *full_name; + gchar *full_name; /* set file_as to full_name so we don't later try and figure out a first/last name for the list. */ @@ -415,7 +415,7 @@ resolve_list_card (LDIFImporter *gci, EContact *contact) email = e_contact_get (contact, E_CONTACT_EMAIL); for (l = email; l; l = l->next) { /* mozilla stuffs dn's in the EMAIL list for contact lists */ - char *dn = l->data; + gchar *dn = l->data; EContact *dn_contact = g_hash_table_lookup (gci->dn_contact_hash, dn); /* break list chains here, since we don't support them just yet */ @@ -467,12 +467,12 @@ add_to_notes (EContact *contact, EContactField field) } static gboolean -ldif_import_contacts(void *d) +ldif_import_contacts(gpointer d) { LDIFImporter *gci = d; EContact *contact; GSList *iter; - int count = 0; + gint count = 0; /* We process all normal cards immediately and keep the list ones till the end */ @@ -563,8 +563,8 @@ static const gchar *supported_extensions[2] = { static gboolean ldif_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { - char *ext; - int i; + gchar *ext; + gint i; EImportTargetURI *s; if (target->type != E_IMPORT_TARGET_URI) diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c index 1ec623d098..169c6413d1 100644 --- a/addressbook/importers/evolution-vcard-importer.c +++ b/addressbook/importers/evolution-vcard-importer.c @@ -51,9 +51,9 @@ typedef struct { guint idle_id; - int state; /* 0 - importing, 1 - cancelled/complete */ - int total; - int count; + gint state; /* 0 - importing, 1 - cancelled/complete */ + gint total; + gint count; ESource *primary; @@ -115,8 +115,8 @@ vcard_import_contact(VCardImporter *gci, EContact *contact) GList *v = e_vcard_attribute_get_values (a); if (v && v->data) { - if (!strncmp ((char*)v->data, "<?xml", 5)) { - EDestination *dest = e_destination_import ((char*)v->data); + if (!strncmp ((gchar *)v->data, "<?xml", 5)) { + EDestination *dest = e_destination_import ((gchar *)v->data); e_destination_export_to_vcard_attribute (dest, a); @@ -155,9 +155,9 @@ vcard_import_contact(VCardImporter *gci, EContact *contact) vs = e_vcard_attribute_param_get_values (p); for (v = vs; v; v = v->next) { - if (!g_ascii_strcasecmp ((char*)v->data, "WORK") || - !g_ascii_strcasecmp ((char*)v->data, "HOME") || - !g_ascii_strcasecmp ((char*)v->data, "OTHER")) + if (!g_ascii_strcasecmp ((gchar *)v->data, "WORK") || + !g_ascii_strcasecmp ((gchar *)v->data, "HOME") || + !g_ascii_strcasecmp ((gchar *)v->data, "OTHER")) no_location = FALSE; else location_only = FALSE; @@ -204,8 +204,8 @@ vcard_import_contact(VCardImporter *gci, EContact *contact) vs = e_vcard_attribute_param_get_values (p); for (v = vs; v; v = v->next) { - if (!g_ascii_strcasecmp ((char*)v->data, "WORK") || - !g_ascii_strcasecmp ((char*)v->data, "HOME")) + if (!g_ascii_strcasecmp ((gchar *)v->data, "WORK") || + !g_ascii_strcasecmp ((gchar *)v->data, "HOME")) no_location = FALSE; } } @@ -228,10 +228,10 @@ vcard_import_contact(VCardImporter *gci, EContact *contact) } static gboolean -vcard_import_contacts(void *data) +vcard_import_contacts(gpointer data) { VCardImporter *gci = data; - int count = 0; + gint count = 0; GList *iterator = gci->iterator; if (gci->state == 0) { @@ -319,11 +319,11 @@ typedef enum _VCardEncoding VCardEncoding; /* Actually check the contents of this file */ static VCardEncoding -guess_vcard_encoding (const char *filename) +guess_vcard_encoding (const gchar *filename) { FILE *handle; - char line[4096]; - char *line_utf8; + gchar line[4096]; + gchar *line_utf8; VCardEncoding encoding = VCARD_ENCODING_NONE; handle = g_fopen (filename, "r"); @@ -455,7 +455,7 @@ static void vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im) { VCardImporter *gci; - char *contents; + gchar *contents; VCardEncoding encoding; EBook *book; EImportTargetURI *s = (EImportTargetURI *)target; diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index cc3affeb2c..e57e5d175e 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -225,9 +225,9 @@ e_contact_start_new_page (EContactPrintContext *ctxt) static void e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt) { - char *file_as; + gchar *file_as; cairo_t *cr; - int field; + gint field; cr = gtk_print_context_get_cairo_context (ctxt->context); cairo_save(cr); @@ -444,70 +444,70 @@ e_contact_build_style (EContactPrintStyle *style) xmlNodePtr stylenode = xmlDocGetRootElement(styledoc); xmlNodePtr node; for (node = stylenode->children; node; node = node->next) { - char *data = (char *)xmlNodeGetContent ( node ); - if ( !strcmp( (char *)node->name, "title" ) ) { + gchar *data = (gchar *)xmlNodeGetContent ( node ); + if ( !strcmp( (gchar *)node->name, "title" ) ) { get_string(data, &(style->title)); - } else if ( !strcmp( (char *)node->name, "type" ) ) { + } else if ( !strcmp( (gchar *)node->name, "type" ) ) { if (g_ascii_strcasecmp (data, "cards") == 0) style->type = E_CONTACT_PRINT_TYPE_CARDS; else if (g_ascii_strcasecmp (data, "memo_style") == 0) style->type = E_CONTACT_PRINT_TYPE_MEMO_STYLE; else if (g_ascii_strcasecmp (data, "phone_list") == 0) style->type = E_CONTACT_PRINT_TYPE_PHONE_LIST; - } else if ( !strcmp( (char *)node->name, "sections_start_new_page" ) ) { + } else if ( !strcmp( (gchar *)node->name, "sections_start_new_page" ) ) { style->sections_start_new_page = get_bool(data); - } else if ( !strcmp( (char *)node->name, "num_columns" ) ) { + } else if ( !strcmp( (gchar *)node->name, "num_columns" ) ) { style->num_columns = get_integer(data); - } else if ( !strcmp( (char *)node->name, "blank_forms" ) ) { + } else if ( !strcmp( (gchar *)node->name, "blank_forms" ) ) { style->blank_forms = get_integer(data); - } else if ( !strcmp( (char *)node->name, "letter_headings" ) ) { + } else if ( !strcmp( (gchar *)node->name, "letter_headings" ) ) { style->letter_headings = get_bool(data); - } else if ( !strcmp( (char *)node->name, "headings_font" ) ) { + } else if ( !strcmp( (gchar *)node->name, "headings_font" ) ) { get_font( data, &(style->headings_font) ); - } else if ( !strcmp( (char *)node->name, "body_font" ) ) { + } else if ( !strcmp( (gchar *)node->name, "body_font" ) ) { get_font( data, &(style->body_font) ); - } else if ( !strcmp( (char *)node->name, "print_using_grey" ) ) { + } else if ( !strcmp( (gchar *)node->name, "print_using_grey" ) ) { style->print_using_grey = get_bool(data); - } else if ( !strcmp( (char *)node->name, "paper_width" ) ) { + } else if ( !strcmp( (gchar *)node->name, "paper_width" ) ) { style->paper_width = get_float(data); - } else if ( !strcmp( (char *)node->name, "paper_height" ) ) { + } else if ( !strcmp( (gchar *)node->name, "paper_height" ) ) { style->paper_height = get_float(data); - } else if ( !strcmp( (char *)node->name, "top_margin" ) ) { + } else if ( !strcmp( (gchar *)node->name, "top_margin" ) ) { style->top_margin = get_float(data); - } else if ( !strcmp( (char *)node->name, "left_margin" ) ) { + } else if ( !strcmp( (gchar *)node->name, "left_margin" ) ) { style->left_margin = get_float(data); - } else if ( !strcmp( (char *)node->name, "bottom_margin" ) ) { + } else if ( !strcmp( (gchar *)node->name, "bottom_margin" ) ) { style->bottom_margin = get_float(data); - } else if ( !strcmp( (char *)node->name, "right_margin" ) ) { + } else if ( !strcmp( (gchar *)node->name, "right_margin" ) ) { style->right_margin = get_float(data); - } else if ( !strcmp( (char *)node->name, "page_width" ) ) { + } else if ( !strcmp( (gchar *)node->name, "page_width" ) ) { style->page_width = get_float(data); - } else if ( !strcmp( (char *)node->name, "page_height" ) ) { + } else if ( !strcmp( (gchar *)node->name, "page_height" ) ) { style->page_height = get_float(data); - } else if ( !strcmp( (char *)node->name, "orientation" ) ) { + } else if ( !strcmp( (gchar *)node->name, "orientation" ) ) { if ( data ) { style->orientation_portrait = (g_ascii_strcasecmp (data, "landscape") != 0); } else { style->orientation_portrait = TRUE; } - } else if ( !strcmp( (char *)node->name, "header_font" ) ) { + } else if ( !strcmp( (gchar *)node->name, "header_font" ) ) { get_font( data, &(style->header_font) ); - } else if ( !strcmp( (char *)node->name, "left_header" ) ) { + } else if ( !strcmp( (gchar *)node->name, "left_header" ) ) { get_string(data, &(style->left_header)); - } else if ( !strcmp( (char *)node->name, "center_header" ) ) { + } else if ( !strcmp( (gchar *)node->name, "center_header" ) ) { get_string(data, &(style->center_header)); - } else if ( !strcmp( (char *)node->name, "right_header" ) ) { + } else if ( !strcmp( (gchar *)node->name, "right_header" ) ) { get_string(data, &(style->right_header)); - } else if ( !strcmp( (char *)node->name, "footer_font" ) ) { + } else if ( !strcmp( (gchar *)node->name, "footer_font" ) ) { get_font( data, &(style->footer_font) ); - } else if ( !strcmp( (char *)node->name, "left_footer" ) ) { + } else if ( !strcmp( (gchar *)node->name, "left_footer" ) ) { get_string(data, &(style->left_footer)); - } else if ( !strcmp( (char *)node->name, "center_footer" ) ) { + } else if ( !strcmp( (gchar *)node->name, "center_footer" ) ) { get_string(data, &(style->center_footer)); - } else if ( !strcmp( (char *)node->name, "right_footer" ) ) { + } else if ( !strcmp( (gchar *)node->name, "right_footer" ) ) { get_string(data, &(style->right_footer)); - } else if ( !strcmp( (char *)node->name, "reverse_on_even_pages" ) ) { + } else if ( !strcmp( (gchar *)node->name, "reverse_on_even_pages" ) ) { style->reverse_on_even_pages = get_bool(data); } if ( data ) diff --git a/addressbook/printing/test-print.c b/addressbook/printing/test-print.c index c38d2129a0..58ff940f03 100644 --- a/addressbook/printing/test-print.c +++ b/addressbook/printing/test-print.c @@ -27,8 +27,8 @@ #include <glade/glade.h> #include "e-contact-print.h" -int -main (int argc, char *argv[]) +gint +main (gint argc, gchar *argv[]) { GList *shown_fields = NULL; diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c index 72fa8a07e3..2b418345ae 100644 --- a/addressbook/tools/evolution-addressbook-export-list-cards.c +++ b/addressbook/tools/evolution-addressbook-export-list-cards.c @@ -242,7 +242,7 @@ gchar *e_contact_get_csv (EContact * contact, GSList * csv_all_fields); gchar *delivery_address_get_sub_field (const EContactAddress * delivery_address, DeliveryAddressField sub_field); gchar *check_null_pointer (gchar * orig); gchar *escape_string (gchar * orig); -int output_n_cards_file (FILE * outputfile, GList *contacts, int size, int begin_no, CARD_FORMAT format); +gint output_n_cards_file (FILE * outputfile, GList *contacts, gint size, gint begin_no, CARD_FORMAT format); static void fork_to_background (void); void set_pre_defined_field (GSList ** pre_defined_fields); @@ -566,10 +566,10 @@ escape_string (gchar *orig) return dest; } -int -output_n_cards_file (FILE * outputfile, GList *contacts, int size, int begin_no, CARD_FORMAT format) +gint +output_n_cards_file (FILE * outputfile, GList *contacts, gint size, gint begin_no, CARD_FORMAT format) { - int i; + gint i; if (format == CARD_FORMAT_VCARD) { for (i = begin_no; i < size + begin_no; i++) { EContact *contact = g_list_nth_data (contacts, i); @@ -628,11 +628,11 @@ action_list_cards (GList *contacts, ActionContext * p_actctx) { FILE *outputfile; long length; - int IsFirstOne; - int series_no; + gint IsFirstOne; + gint series_no; gchar *file_series_name; CARD_FORMAT format; - int size; + gint size; length = g_list_length (contacts); diff --git a/addressbook/tools/evolution-addressbook-export-list-folders.c b/addressbook/tools/evolution-addressbook-export-list-folders.c index e93748861d..1f18686242 100644 --- a/addressbook/tools/evolution-addressbook-export-list-folders.c +++ b/addressbook/tools/evolution-addressbook-export-list-folders.c @@ -61,8 +61,8 @@ action_list_folders_init (ActionContext * p_actctx) EBook *book; EBookQuery *query; GList *contacts; - char *uri; - const char *name; + gchar *uri; + const gchar *name; book = e_book_new (s, NULL); if (!book diff --git a/addressbook/tools/evolution-addressbook-export.c b/addressbook/tools/evolution-addressbook-export.c index 1a7f86142b..c8ae956081 100644 --- a/addressbook/tools/evolution-addressbook-export.c +++ b/addressbook/tools/evolution-addressbook-export.c @@ -64,16 +64,16 @@ static GOptionEntry entries[] = { { NULL } }; -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { ActionContext actctx; GOptionContext *context; GError *error = NULL; - int current_action = ACTION_NOTHING; - int IsCSV = FALSE; - int IsVCard = FALSE; + gint current_action = ACTION_NOTHING; + gint IsCSV = FALSE; + gint IsVCard = FALSE; /*i18n-lize */ bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR); @@ -162,7 +162,7 @@ main (int argc, char **argv) exit (-1); } - /*FIXME:should free actctx's some char* field, such as output_file! but since the program will end, so that will not cause mem leak. */ + /*FIXME:should free actctx's some gchar * field, such as output_file! but since the program will end, so that will not cause mem leak. */ exit (0); } diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index 8d08a3e88f..ec8fccb5ba 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -46,11 +46,11 @@ eab_get_config_database (void) * */ -static char* -escape (const char *str) +static gchar * +escape (const gchar *str) { GString *s = g_string_new (NULL); - const char *p = str; + const gchar *p = str; while (*p) { if (*p == '\\') @@ -76,7 +76,7 @@ eab_name_and_email_query (EBook *book, gchar *email_query=NULL, *name_query=NULL; EBookQuery *query; guint tag; - char *escaped_name, *escaped_email; + gchar *escaped_name, *escaped_email; g_return_val_if_fail (book && E_IS_BOOK (book), 0); g_return_val_if_fail (cb != NULL, 0); @@ -118,7 +118,7 @@ eab_name_and_email_query (EBook *book, /* Assemble our e-mail & name queries */ if (email_query && name_query) { - char *full_query = g_strdup_printf ("(and %s %s)", email_query, name_query); + gchar *full_query = g_strdup_printf ("(and %s %s)", email_query, name_query); query = e_book_query_from_string (full_query); g_free (full_query); } @@ -147,12 +147,12 @@ eab_name_and_email_query (EBook *book, */ guint eab_nickname_query (EBook *book, - const char *nickname, + const gchar *nickname, EBookListCallback cb, gpointer closure) { EBookQuery *query; - char *query_string; + gchar *query_string; guint retval; g_return_val_if_fail (E_IS_BOOK (book), 0); @@ -175,11 +175,11 @@ eab_nickname_query (EBook *book, } /* Copied from camel_strstrcase */ -static char * -eab_strstrcase (const char *haystack, const char *needle) +static gchar * +eab_strstrcase (const gchar *haystack, const gchar *needle) { /* find the needle in the haystack neglecting case */ - const char *ptr; + const gchar *ptr; guint len; g_return_val_if_fail (haystack != NULL, NULL); @@ -190,24 +190,24 @@ eab_strstrcase (const char *haystack, const char *needle) return NULL; if (len == 0) - return (char *) haystack; + return (gchar *) haystack; for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++) if (!g_ascii_strncasecmp (ptr, needle, len)) - return (char *) ptr; + return (gchar *) ptr; return NULL; } GList* -eab_contact_list_from_string (const char *str) +eab_contact_list_from_string (const gchar *str) { GList *contacts = NULL; GString *gstr = g_string_new (NULL); - char *str_stripped; - char *p = (char*)str; - char *q; + gchar *str_stripped; + gchar *p = (gchar *)str; + gchar *q; if (!p) return NULL; @@ -270,7 +270,7 @@ eab_contact_list_from_string (const char *str) return contacts; } -char* +gchar * eab_contact_list_to_string (GList *contacts) { GString *str = g_string_new (""); @@ -278,7 +278,7 @@ eab_contact_list_to_string (GList *contacts) for (l = contacts; l; l = l->next) { EContact *contact = l->data; - char *vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30); + gchar *vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30); g_string_append (str, vcard_str); if (l->next) @@ -289,10 +289,10 @@ eab_contact_list_to_string (GList *contacts) } gboolean -eab_book_and_contact_list_from_string (const char *str, EBook **book, GList **contacts) +eab_book_and_contact_list_from_string (const gchar *str, EBook **book, GList **contacts) { - const char *s0, *s1; - char *uri; + const gchar *s0, *s1; + gchar *uri; g_return_val_if_fail (str != NULL, FALSE); g_return_val_if_fail (book != NULL, FALSE); @@ -323,10 +323,10 @@ eab_book_and_contact_list_from_string (const char *str, EBook **book, GList **co return *book ? TRUE : FALSE; } -char * +gchar * eab_book_and_contact_list_to_string (EBook *book, GList *contacts) { - char *s0, *s1; + gchar *s0, *s1; s0 = eab_contact_list_to_string (contacts); if (!s0) @@ -406,12 +406,12 @@ eab_query_address_default (const gchar *email, #endif /* bad place for this i know. */ -int -e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len) +gint +e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len) { gchar *s1 = g_utf8_casefold(str1, len); gchar *s2 = g_utf8_casefold(str2, len); - int rv; + gint rv; rv = g_utf8_collate (s1, s2); @@ -421,7 +421,7 @@ e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len) return rv; } -int +gint e_utf8_casefold_collate (const gchar *str1, const gchar *str2) { return e_utf8_casefold_collate_len (str1, str2, -1); diff --git a/addressbook/util/eab-book-util.h b/addressbook/util/eab-book-util.h index 0cded9c662..8a9df33e40 100644 --- a/addressbook/util/eab-book-util.h +++ b/addressbook/util/eab-book-util.h @@ -38,20 +38,20 @@ EConfigListener *eab_get_config_database (void); /* Specialized Name/Email Queries */ guint eab_name_and_email_query (EBook *book, - const char *name, - const char *email, + const gchar *name, + const gchar *email, EBookListCallback cb, gpointer closure); guint eab_nickname_query (EBook *book, - const char *nickname, + const gchar *nickname, EBookListCallback cb, gpointer closure); -GList *eab_contact_list_from_string (const char *str); -char *eab_contact_list_to_string (GList *contacts); +GList *eab_contact_list_from_string (const gchar *str); +gchar *eab_contact_list_to_string (GList *contacts); -gboolean eab_book_and_contact_list_from_string (const char *str, EBook **book, GList **contacts); -char *eab_book_and_contact_list_to_string (EBook *book, GList *contacts); +gboolean eab_book_and_contact_list_from_string (const gchar *str, EBook **book, GList **contacts); +gchar *eab_book_and_contact_list_to_string (EBook *book, GList *contacts); /* Returns the EContact associated to email in the callback, or NULL if no match is found in the default address book. */ @@ -59,8 +59,8 @@ void eab_query_address_default (const gchar * EABHaveAddressCallback cb, gpointer closure); -int e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len); -int e_utf8_casefold_collate (const gchar *str1, const gchar *str2); +gint e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len); +gint e_utf8_casefold_collate (const gchar *str1, const gchar *str2); G_END_DECLS diff --git a/calendar/common/authentication.c b/calendar/common/authentication.c index a33177874f..a9e2b95ea0 100644 --- a/calendar/common/authentication.c +++ b/calendar/common/authentication.c @@ -34,11 +34,11 @@ static GHashTable *source_lists_hash = NULL; -static char * -auth_func_cb (ECal *ecal, const char *prompt, const char *key, gpointer user_data) +static gchar * +auth_func_cb (ECal *ecal, const gchar *prompt, const gchar *key, gpointer user_data) { gboolean remember; - char *password, *auth_domain; + gchar *password, *auth_domain; ESource *source; const gchar *component_name; @@ -56,11 +56,11 @@ auth_func_cb (ECal *ecal, const char *prompt, const char *key, gpointer user_dat return password; } -static char * +static gchar * build_pass_key (ECal *ecal) { - char *euri_str; - const char *uri; + gchar *euri_str; + const gchar *uri; EUri *euri; uri = e_cal_get_uri (ecal); @@ -76,7 +76,7 @@ void auth_cal_forget_password (ECal *ecal) { ESource *source = NULL; - const char *auth_domain = NULL, *component_name = NULL, *auth_type = NULL; + const gchar *auth_domain = NULL, *component_name = NULL, *auth_type = NULL; source = e_cal_get_source (ecal); auth_domain = e_source_get_property (source, "auth-domain"); @@ -84,7 +84,7 @@ auth_cal_forget_password (ECal *ecal) auth_type = e_source_get_property (source, "auth-type"); if (auth_type) { - char *key = NULL; + gchar *key = NULL; key = build_pass_key (ecal); e_passwords_forget_password (component_name, key); @@ -119,7 +119,7 @@ auth_new_cal_from_source (ESource *source, ECalSourceType type) } ECal * -auth_new_cal_from_uri (const char *uri, ECalSourceType type) +auth_new_cal_from_uri (const gchar *uri, ECalSourceType type) { ESourceGroup *group = NULL; ESource *source = NULL; @@ -144,7 +144,7 @@ auth_new_cal_from_uri (const char *uri, ECalSourceType type) GSList *sl; for (sl = e_source_group_peek_sources (gl->data); sl != NULL; sl = sl->next) { - char *source_uri; + gchar *source_uri; source_uri = e_source_get_uri (sl->data); if (source_uri) { diff --git a/calendar/common/authentication.h b/calendar/common/authentication.h index 696a36d2ff..7d9d7f5fa7 100644 --- a/calendar/common/authentication.h +++ b/calendar/common/authentication.h @@ -29,7 +29,7 @@ ECal *auth_new_cal_from_default (ECalSourceType type); ECal *auth_new_cal_from_source (ESource *source, ECalSourceType type); -ECal *auth_new_cal_from_uri (const char *uri, ECalSourceType type); +ECal *auth_new_cal_from_uri (const gchar *uri, ECalSourceType type); void auth_cal_forget_password (ECal *ecal); #endif diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index 5aef1aeb53..3654f5bed1 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -151,9 +151,9 @@ calconduit_load_configuration (guint32 pilot_id) c->secret = e_pilot_setup_get_bool (prefix, "secret", FALSE); c->multi_day_split = e_pilot_setup_get_bool (prefix, "multi_day_split", TRUE); if ((c->last_uri = e_pilot_setup_get_string (prefix, "last_uri", NULL)) && !strncmp (c->last_uri, "file://", 7)) { - char *filename = g_filename_from_uri (c->last_uri, NULL, NULL); - const char *path = filename; - const char *home; + gchar *filename = g_filename_from_uri (c->last_uri, NULL, NULL); + const gchar *path = filename; + const gchar *home; home = g_get_home_dir (); @@ -379,10 +379,10 @@ e_calendar_context_destroy (ECalConduitContext *ctxt) } /* Debug routines */ -static char * +static gchar * print_local (ECalLocalRecord *local) { - static char buff[ 4096 ]; + static gchar buff[ 4096 ]; if (local == NULL) { sprintf (buff, "[NULL]"); @@ -403,9 +403,9 @@ print_local (ECalLocalRecord *local) return ""; } -static char *print_remote (GnomePilotRecord *remote) +static gchar *print_remote (GnomePilotRecord *remote) { - static char buff[ 4096 ]; + static gchar buff[ 4096 ]; struct Appointment appt; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; @@ -446,10 +446,10 @@ static char *print_remote (GnomePilotRecord *remote) return buff; } -static char * -auth_func_cb (ECal *ecal, const char* prompt, const char *key, gpointer user_data) +static gchar * +auth_func_cb (ECal *ecal, const gchar * prompt, const gchar *key, gpointer user_data) { - char *password; + gchar *password; ESource *source; const gchar *auth_domain, *component_name; @@ -464,9 +464,9 @@ auth_func_cb (ECal *ecal, const char* prompt, const char *key, gpointer user_dat static int start_calendar_server (ECalConduitContext *ctxt) { - char *str_uri = NULL; - char *pass_key = NULL; - int retval = 0; + gchar *str_uri = NULL; + gchar *pass_key = NULL; + gint retval = 0; g_return_val_if_fail (ctxt != NULL, -2); @@ -505,7 +505,7 @@ start_calendar_server (ECalConduitContext *ctxt) /* Utility routines */ static icaltimezone * -get_timezone (ECal *client, const char *tzid) +get_timezone (ECal *client, const gchar *tzid) { icaltimezone *timezone = NULL; @@ -521,7 +521,7 @@ get_default_timezone (void) { EConfigListener *listener; icaltimezone *timezone = NULL; - char *location; + gchar *location; listener = e_config_listener_new (); @@ -541,10 +541,10 @@ get_default_timezone (void) } -static char * +static gchar * map_name (ECalConduitContext *ctxt) { - char *filename; + gchar *filename; filename = g_strdup_printf ("%s/.evolution/calendar/local/system/pilot-map-calendar-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id); @@ -553,7 +553,7 @@ map_name (ECalConduitContext *ctxt) } static icalrecurrencetype_weekday -get_ical_day (int day) +get_ical_day (gint day) { switch (day) { case 0: @@ -634,7 +634,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp icaltimezone *tz_start, *tz_end; time_t event_start, event_end, day_end; struct icaltimetype *old_start_value, *old_end_value; - const char *uid; + const gchar *uid; gboolean is_date = FALSE; gboolean last = FALSE; gboolean ret = TRUE; @@ -677,7 +677,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp while (!last) { ECalComponent *clone = e_cal_component_clone (ccc->comp); icalcomponent *ical_comp = NULL; - char *new_uid = e_cal_component_gen_uid (); + gchar *new_uid = e_cal_component_gen_uid (); struct icaltimetype start_value, end_value; ECalChange *c = NULL; @@ -743,7 +743,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp } static short -nth_weekday (int pos, icalrecurrencetype_weekday weekday) +nth_weekday (gint pos, icalrecurrencetype_weekday weekday) { g_assert ((pos > 0 && pos <= 5) || (pos == -1)); @@ -757,7 +757,7 @@ next_changed_item (ECalConduitContext *ctxt, GList *changes) GList *l; for (l = changes; l != NULL; l = l->next) { - const char *uid; + const gchar *uid; ccc = l->data; @@ -770,7 +770,7 @@ next_changed_item (ECalConduitContext *ctxt, GList *changes) } static void -compute_status (ECalConduitContext *ctxt, ECalLocalRecord *local, const char *uid) +compute_status (ECalConduitContext *ctxt, ECalLocalRecord *local, const gchar *uid) { ECalChange *ccc; @@ -834,7 +834,7 @@ local_record_to_pilot_record (ECalLocalRecord *local, #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #else - static char record[0xffff]; + static gchar record[0xffff]; #endif memset(&p, 0, sizeof (p)); @@ -865,7 +865,7 @@ local_record_to_pilot_record (ECalLocalRecord *local, pi_buffer_free(buffer); #else - p.record = (unsigned char *)record; + p.record = (guchar *)record; p.length = pack_Appointment (local->appt, p.record, 0xffff); #endif return p; @@ -877,14 +877,14 @@ local_record_to_pilot_record (ECalLocalRecord *local, static void local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduitContext *ctxt) { - const char *uid; + const gchar *uid; ECalComponentText summary; GSList *d_list = NULL, *edl = NULL, *l; ECalComponentText *description; ECalComponentDateTime dt_start, dt_end; ECalComponentClassification classif; icaltimezone *default_tz = ctxt->timezone; - int i; + gint i; g_return_if_fail (local != NULL); g_return_if_fail (comp != NULL); @@ -902,7 +902,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit * we don't overwrite them */ if (local->local.ID != 0) { - int cat = 0; + gint cat = 0; #ifdef PILOT_LINK_0_12 struct Appointment appt; pi_buffer_t * record; @@ -914,7 +914,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit } #else struct Appointment appt; - char record[0xffff]; + gchar record[0xffff]; #endif if (dlp_ReadRecordById (ctxt->dbi->pilot_socket, ctxt->dbi->db_handle, @@ -930,7 +930,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit #ifdef PILOT_LINK_0_12 unpack_Appointment (&appt, record, datebook_v1); #else - unpack_Appointment (&appt, (unsigned char *)record, 0xffff); + unpack_Appointment (&appt, (guchar *)record, 0xffff); #endif local->appt->alarm = appt.alarm; local->appt->advance = appt.advance; @@ -1152,7 +1152,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit static void local_record_from_uid (ECalLocalRecord *local, - const char *uid, + const gchar *uid, ECalConduitContext *ctxt) { ECalComponent *comp; @@ -1199,8 +1199,8 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, ECalComponentText summary = {NULL, NULL}; ECalComponentDateTime dt = {NULL, NULL}; GSList *edl = NULL; - char *txt; - int pos, i; + gchar *txt; + gint pos, i; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #endif @@ -1456,8 +1456,8 @@ static void check_for_slow_setting (GnomePilotConduit *c, ECalConduitContext *ctxt) { GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c); - int map_count; - const char *uri; + gint map_count; + const gchar *uri; /* If there are objects but no log */ map_count = g_hash_table_size (ctxt->map->pid_map); @@ -1488,9 +1488,9 @@ pre_sync (GnomePilotConduit *conduit, { GnomePilotConduitSyncAbs *abs_conduit; GList *removed = NULL, *added = NULL, *l; - int len; - unsigned char *buf; - char *filename, *change_id; + gint len; + guchar *buf; + gchar *filename, *change_id; icalcomponent *icalcomp; gint num_records, add_records = 0, mod_records = 0, del_records = 0; #ifdef PILOT_LINK_0_12 @@ -1560,7 +1560,7 @@ pre_sync (GnomePilotConduit *conduit, ctxt->changed = g_list_concat (ctxt->changed, added); for (l = removed; l != NULL; l = l->next) { ECalChange *ccc = l->data; - const char *uid; + const gchar *uid; e_cal_component_get_uid (ccc->comp, &uid); if (e_pilot_map_lookup_pid (ctxt->map, uid, FALSE) == 0) { @@ -1573,7 +1573,7 @@ pre_sync (GnomePilotConduit *conduit, for (l = ctxt->changed; l != NULL; l = l->next) { ECalChange *ccc = l->data; - const char *uid; + const gchar *uid; e_cal_component_get_uid (ccc->comp, &uid); if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) { @@ -1614,9 +1614,9 @@ pre_sync (GnomePilotConduit *conduit, DLP_BUF_SIZE, buffer); #else - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, - (unsigned char *)buf, 0xffff); + (guchar *)buf, 0xffff); #endif if (len < 0) { WARN (_("Could not read pilot's Calendar application block")); @@ -1649,18 +1649,18 @@ post_sync (GnomePilotConduit *conduit, { GList *changed; gchar *filename, *change_id; - unsigned char *buf; - int dlpRetVal, len; + guchar *buf; + gint dlpRetVal, len; LOG (g_message ( "post_sync: Calendar Conduit v.%s", CONDUIT_VERSION )); /* Write AppBlock to PDA - updates categories */ - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = pack_AppointmentAppInfo (&(ctxt->ai), buf, 0xffff); dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle, - (unsigned char *)buf, len); + (guchar *)buf, len); g_free (buf); @@ -1699,7 +1699,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit, guint32 ID, ECalConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_pilot_id: setting to %d\n", ID )); @@ -1714,7 +1714,7 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit, ECalLocalRecord *local, ECalConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_status_cleared: clearing status\n" )); @@ -1730,7 +1730,7 @@ for_each (GnomePilotConduitSyncAbs *conduit, ECalConduitContext *ctxt) { static GList *comps, *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, -1); @@ -1789,7 +1789,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit, ECalConduitContext *ctxt) { static GList *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, -1); @@ -1851,7 +1851,7 @@ compare (GnomePilotConduitSyncAbs *conduit, { /* used by the quick compare */ GnomePilotRecord local_pilot; - int retval = 0; + gint retval = 0; LOG (g_message ("compare: local=%s remote=%s...\n", print_local (local), print_remote (remote))); @@ -1879,8 +1879,8 @@ add_record (GnomePilotConduitSyncAbs *conduit, ECalConduitContext *ctxt) { ECalComponent *comp; - char *uid; - int retval = 0; + gchar *uid; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1911,7 +1911,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit, ECalConduitContext *ctxt) { ECalComponent *new_comp; - int retval = 0; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1934,7 +1934,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit, ECalLocalRecord *local, ECalConduitContext *ctxt) { - const char *uid; + const gchar *uid; g_return_val_if_fail (local != NULL, -1); g_assert (local->comp != NULL); @@ -1959,8 +1959,8 @@ archive_record (GnomePilotConduitSyncAbs *conduit, gboolean archive, ECalConduitContext *ctxt) { - const char *uid; - int retval = 0; + const gchar *uid; + gint retval = 0; g_return_val_if_fail (local != NULL, -1); @@ -1978,7 +1978,7 @@ match (GnomePilotConduitSyncAbs *conduit, ECalLocalRecord **local, ECalConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ("match: looking for local copy of %s\n", print_remote (remote))); diff --git a/calendar/conduits/common/libecalendar-common-conduit.c b/calendar/conduits/common/libecalendar-common-conduit.c index cdb4a10d2d..1be106929d 100644 --- a/calendar/conduits/common/libecalendar-common-conduit.c +++ b/calendar/conduits/common/libecalendar-common-conduit.c @@ -58,11 +58,11 @@ * in UTF-8 format. A conversion must take place before calling * this function (see e_pilot_utf8_to_pchar() in e-pilot-util.c) */ -int -e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *category) +gint +e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *category) { - int i, j; - int retval = 0; /* 0 is the Unfiled category */ + gint i, j; + gint retval = 0; /* 0 is the Unfiled category */ LOG(g_message("e_pilot_add_category_if_possible\n")); for(i=0; i<PILOT_MAX_CATEGORIES; i++){ @@ -70,8 +70,8 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ the PalmOS doesn't let 0-length strings for categories */ if(strlen(category->name[i]) == 0){ - int cat_to_add_len; - int desktopUniqueID; + gint cat_to_add_len; + gint desktopUniqueID; cat_to_add_len = strlen(cat_to_add); retval = i; @@ -95,7 +95,7 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ /* find a desktop id that is not in use between 128 and 255 */ for (desktopUniqueID = 128; desktopUniqueID <= 255; desktopUniqueID++) { - int found = 0; + gint found = 0; for(j=0; j<PILOT_MAX_CATEGORIES; j++){ if (category->ID[i] == desktopUniqueID) { found = 1; @@ -126,15 +126,15 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ /* *conversion from an evolution category to a palm category */ -void e_pilot_local_category_to_remote(int * pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category) +void e_pilot_local_category_to_remote(gint * pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category) { GSList *c_list = NULL; - char * category_string; - int i; + gchar * category_string; + gint i; e_cal_component_get_categories_list (comp, &c_list); if (c_list) { /* list != 0, so at least 1 category is assigned */ - category_string = e_pilot_utf8_to_pchar((const char *)c_list->data); + category_string = e_pilot_utf8_to_pchar((const gchar *)c_list->data); if (c_list->next != 0) { LOG (g_message ("Note: item has more categories in evolution, first chosen")); } @@ -162,9 +162,9 @@ void e_pilot_local_category_to_remote(int * pilotCategory, ECalComponent *comp, /* *conversion from a palm category to an evolution category */ -void e_pilot_remote_category_to_local(int pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category) +void e_pilot_remote_category_to_local(gint pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category) { - char *category_string = NULL; + gchar *category_string = NULL; if (pilotCategory != 0) { /* pda has category assigned */ @@ -206,17 +206,17 @@ void e_pilot_remote_category_to_local(int pilotCategory, ECalComponent *comp, st } } -static char * -build_setup_path (const char *path, const char *key) +static gchar * +build_setup_path (const gchar *path, const gchar *key) { return g_strconcat ("/apps/evolution/conduit", "/", path, "/", key, NULL); } gboolean -e_pilot_setup_get_bool (const char *path, const char *key, gboolean def) +e_pilot_setup_get_bool (const gchar *path, const gchar *key, gboolean def) { gboolean res = def; - char *full_path; + gchar *full_path; GConfValue *value; GConfClient *gconf; @@ -241,10 +241,10 @@ e_pilot_setup_get_bool (const char *path, const char *key, gboolean def) } void -e_pilot_setup_set_bool (const char *path, const char *key, gboolean value) +e_pilot_setup_set_bool (const gchar *path, const gchar *key, gboolean value) { GError *error = NULL; - char *full_path; + gchar *full_path; GConfClient *gconf; g_return_if_fail (path != NULL); @@ -264,11 +264,11 @@ e_pilot_setup_set_bool (const char *path, const char *key, gboolean value) } } -int -e_pilot_setup_get_int (const char *path, const char *key, int def) +gint +e_pilot_setup_get_int (const gchar *path, const gchar *key, gint def) { - int res = def; - char *full_path; + gint res = def; + gchar *full_path; GConfValue *value; GConfClient *gconf; @@ -293,10 +293,10 @@ e_pilot_setup_get_int (const char *path, const char *key, int def) } void -e_pilot_setup_set_int (const char *path, const char *key, int value) +e_pilot_setup_set_int (const gchar *path, const gchar *key, gint value) { GError *error = NULL; - char *full_path; + gchar *full_path; GConfClient *gconf; g_return_if_fail (path != NULL); @@ -316,11 +316,11 @@ e_pilot_setup_set_int (const char *path, const char *key, int value) } } -char * -e_pilot_setup_get_string (const char *path, const char *key, const char *def) +gchar * +e_pilot_setup_get_string (const gchar *path, const gchar *key, const gchar *def) { - char *res = g_strdup (def); - char *full_path; + gchar *res = g_strdup (def); + gchar *full_path; GConfValue *value; GConfClient *gconf; @@ -347,10 +347,10 @@ e_pilot_setup_get_string (const char *path, const char *key, const char *def) } void -e_pilot_setup_set_string (const char *path, const char *key, const char *value) +e_pilot_setup_set_string (const gchar *path, const gchar *key, const gchar *value) { GError *error = NULL; - char *full_path; + gchar *full_path; GConfClient *gconf; g_return_if_fail (path != NULL); diff --git a/calendar/conduits/common/libecalendar-common-conduit.h b/calendar/conduits/common/libecalendar-common-conduit.h index aab5a58b56..8110fc5094 100644 --- a/calendar/conduits/common/libecalendar-common-conduit.h +++ b/calendar/conduits/common/libecalendar-common-conduit.h @@ -25,13 +25,13 @@ #define PILOT_MAX_CATEGORIES 16 -int e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *category); -void e_pilot_local_category_to_remote(int * pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category); -void e_pilot_remote_category_to_local(int pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category); +gint e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *category); +void e_pilot_local_category_to_remote(gint * pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category); +void e_pilot_remote_category_to_local(gint pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category); -gboolean e_pilot_setup_get_bool (const char *path, const char *key, gboolean def); -void e_pilot_setup_set_bool (const char *path, const char *key, gboolean value); -int e_pilot_setup_get_int (const char *path, const char *key, int def); -void e_pilot_setup_set_int (const char *path, const char *key, int value); -char *e_pilot_setup_get_string (const char *path, const char *key, const char *def); -void e_pilot_setup_set_string (const char *path, const char *key, const char *value); +gboolean e_pilot_setup_get_bool (const gchar *path, const gchar *key, gboolean def); +void e_pilot_setup_set_bool (const gchar *path, const gchar *key, gboolean value); +gint e_pilot_setup_get_int (const gchar *path, const gchar *key, gint def); +void e_pilot_setup_set_int (const gchar *path, const gchar *key, gint value); +gchar *e_pilot_setup_get_string (const gchar *path, const gchar *key, const gchar *def); +void e_pilot_setup_set_string (const gchar *path, const gchar *key, const gchar *value); diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 61e5c852e3..1d32917760 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -86,7 +86,7 @@ struct _EMemoLocalRecord { struct Memo *memo; }; -int lastDesktopUniqueID; +gint lastDesktopUniqueID; static void memoconduit_destroy_record (EMemoLocalRecord *local) @@ -297,10 +297,10 @@ e_memo_context_destroy (EMemoConduitContext *ctxt) } /* Debug routines */ -static char * +static gchar * print_local (EMemoLocalRecord *local) { - static char buff[ 64 ]; + static gchar buff[ 64 ]; if (local == NULL) { sprintf (buff, "[NULL]"); @@ -317,9 +317,9 @@ print_local (EMemoLocalRecord *local) return ""; } -static char *print_remote (GnomePilotRecord *remote) +static gchar *print_remote (GnomePilotRecord *remote) { - static char buff[ 64 ]; + static gchar buff[ 64 ]; struct Memo memo; #ifdef PILOT_LINK_0_12 pi_buffer_t *buffer; @@ -377,7 +377,7 @@ get_default_timezone (void) { EConfigListener *listener; icaltimezone *timezone = NULL; - char *location; + gchar *location; listener = e_config_listener_new (); @@ -396,10 +396,10 @@ get_default_timezone (void) return timezone; } -static char * +static gchar * map_name (EMemoConduitContext *ctxt) { - char *filename; + gchar *filename; filename = g_strdup_printf ("%s/.evolution/memos/local/system/pilot-map-memo-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id); @@ -413,7 +413,7 @@ next_changed_item (EMemoConduitContext *ctxt, GList *changes) GList *l; for (l = changes; l != NULL; l = l->next) { - const char *uid; + const gchar *uid; ccc = l->data; @@ -426,7 +426,7 @@ next_changed_item (EMemoConduitContext *ctxt, GList *changes) } static void -compute_status (EMemoConduitContext *ctxt, EMemoLocalRecord *local, const char *uid) +compute_status (EMemoConduitContext *ctxt, EMemoLocalRecord *local, const gchar *uid) { ECalChange *ccc; @@ -461,7 +461,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local, #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #else - static char record[0xffff]; + static gchar record[0xffff]; #endif memset(&p, 0, sizeof (p)); @@ -494,7 +494,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local, pi_buffer_free(buffer); #else - p.record = (unsigned char *)record; + p.record = (guchar *)record; p.length = pack_Memo (local->memo, p.record, 0xffff); #endif return p; @@ -506,7 +506,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local, static void local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; GSList *d_list = NULL; ECalComponentText *description; ECalComponentClassification classif; @@ -537,9 +537,9 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu struct Memo memo; pi_buffer_t * record; #else - char record[0xffff]; + gchar record[0xffff]; #endif - int cat = 0; + gint cat = 0; #ifdef PILOT_LINK_0_12 record = pi_buffer_new(DLP_BUF_SIZE); @@ -602,7 +602,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu static void local_record_from_uid (EMemoLocalRecord *local, - const char *uid, + const gchar *uid, EMemoConduitContext *ctxt) { ECalComponent *comp; @@ -648,8 +648,8 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, struct Memo memo; struct icaltimetype now; icaltimezone *utc_zone; - char *txt, *txt2, *txt3; - int i; + gchar *txt, *txt2, *txt3; + gint i; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #endif @@ -694,7 +694,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, e_cal_component_set_comment_list (comp, NULL); e_cal_component_set_summary(comp, NULL); } else { - int idxToUse = -1, ntext = strlen(memo.text); + gint idxToUse = -1, ntext = strlen(memo.text); gboolean foundNL = FALSE; GSList l; ECalComponentText text, sumText; @@ -755,8 +755,8 @@ static void check_for_slow_setting (GnomePilotConduit *c, EMemoConduitContext *ctxt) { GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c); - int map_count; - const char *uri; + gint map_count; + const gchar *uri; /* If there are no objects or objects but no log */ map_count = g_hash_table_size (ctxt->map->pid_map); @@ -787,9 +787,9 @@ pre_sync (GnomePilotConduit *conduit, { GnomePilotConduitSyncAbs *abs_conduit; GList *l; - int len; - unsigned char *buf; - char *filename, *change_id; + gint len; + guchar *buf; + gchar *filename, *change_id; icalcomponent *icalcomp; gint num_records, add_records = 0, mod_records = 0, del_records = 0; #ifdef PILOT_LINK_0_12 @@ -851,7 +851,7 @@ pre_sync (GnomePilotConduit *conduit, for (l = ctxt->changed; l != NULL; l = l->next) { ECalChange *ccc = l->data; - const char *uid; + const gchar *uid; e_cal_component_get_uid (ccc->comp, &uid); if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) { @@ -895,9 +895,9 @@ pre_sync (GnomePilotConduit *conduit, DLP_BUF_SIZE, buffer); #else - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, - (unsigned char *)buf, 0xffff); + (guchar *)buf, 0xffff); #endif if (len < 0) { WARN (_("Could not read pilot's Memo application block")); @@ -934,15 +934,15 @@ post_sync (GnomePilotConduit *conduit, { GList *changed; gchar *filename, *change_id; - unsigned char *buf; - int dlpRetVal, len; + guchar *buf; + gint dlpRetVal, len; - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = pack_MemoAppInfo (&(ctxt->ai), buf, 0xffff); dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle, - (unsigned char *)buf, len); + (guchar *)buf, len); g_free (buf); @@ -984,7 +984,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit, guint32 ID, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_pilot_id: setting to %d\n", ID )); @@ -999,7 +999,7 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit, EMemoLocalRecord *local, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_status_cleared: clearing status\n" )); @@ -1015,7 +1015,7 @@ for_each (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { static GList *comps, *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, -1); @@ -1075,7 +1075,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { static GList *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, 0); @@ -1138,7 +1138,7 @@ compare (GnomePilotConduitSyncAbs *conduit, { /* used by the quick compare */ GnomePilotRecord local_pilot; - int retval = 0; + gint retval = 0; LOG (g_message ("compare: local=%s remote=%s...\n", print_local (local), print_remote (remote))); @@ -1166,8 +1166,8 @@ add_record (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { ECalComponent *comp; - char *uid; - int retval = 0; + gchar *uid; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1196,7 +1196,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { ECalComponent *new_comp; - int retval = 0; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1219,7 +1219,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit, EMemoLocalRecord *local, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; g_return_val_if_fail (local != NULL, -1); g_return_val_if_fail (local->comp != NULL, -1); @@ -1241,8 +1241,8 @@ archive_record (GnomePilotConduitSyncAbs *conduit, gboolean archive, EMemoConduitContext *ctxt) { - const char *uid; - int retval = 0; + const gchar *uid; + gint retval = 0; g_return_val_if_fail (local != NULL, -1); @@ -1260,7 +1260,7 @@ match (GnomePilotConduitSyncAbs *conduit, EMemoLocalRecord **local, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ("match: looking for local copy of %s\n", print_remote (remote))); diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 3a684e0751..1ced6acfa3 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -88,7 +88,7 @@ struct _EToDoLocalRecord { struct ToDo *todo; }; -int lastDesktopUniqueID; +gint lastDesktopUniqueID; static void todoconduit_destroy_record (EToDoLocalRecord *local) @@ -361,10 +361,10 @@ e_todo_context_destroy (EToDoConduitContext *ctxt) } /* Debug routines */ -static char * +static gchar * print_local (EToDoLocalRecord *local) { - static char buff[ 4096 ]; + static gchar buff[ 4096 ]; if (local == NULL) { sprintf (buff, "[NULL]"); @@ -388,9 +388,9 @@ print_local (EToDoLocalRecord *local) return ""; } -static char *print_remote (GnomePilotRecord *remote) +static gchar *print_remote (GnomePilotRecord *remote) { - static char buff[ 4096 ]; + static gchar buff[ 4096 ]; struct ToDo todo; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; @@ -432,10 +432,10 @@ static char *print_remote (GnomePilotRecord *remote) return buff; } -static char * -auth_func_cb (ECal *ecal, const char* prompt, const char *key, gpointer user_data) +static gchar * +auth_func_cb (ECal *ecal, const gchar * prompt, const gchar *key, gpointer user_data) { - char *password; + gchar *password; ESource *source; const gchar *auth_domain, *component_name; @@ -452,9 +452,9 @@ auth_func_cb (ECal *ecal, const char* prompt, const char *key, gpointer user_dat static int start_calendar_server (EToDoConduitContext *ctxt) { - char *str_uri = NULL; - char *pass_key = NULL; - int retval = 0; + gchar *str_uri = NULL; + gchar *pass_key = NULL; + gint retval = 0; g_return_val_if_fail (ctxt != NULL, -2); if (ctxt->cfg->source) { @@ -492,7 +492,7 @@ start_calendar_server (EToDoConduitContext *ctxt) /* Utility routines */ static icaltimezone * -get_timezone (ECal *client, const char *tzid) +get_timezone (ECal *client, const gchar *tzid) { icaltimezone *timezone = NULL; @@ -508,7 +508,7 @@ get_default_timezone (void) { EConfigListener *listener; icaltimezone *timezone = NULL; - char *location; + gchar *location; listener = e_config_listener_new (); @@ -527,10 +527,10 @@ get_default_timezone (void) return timezone; } -static char * +static gchar * map_name (EToDoConduitContext *ctxt) { - char *filename; + gchar *filename; filename = g_strdup_printf ("%s/.evolution/tasks/local/system/pilot-map-todo-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id); @@ -554,7 +554,7 @@ next_changed_item (EToDoConduitContext *ctxt, GList *changes) GList *l; for (l = changes; l != NULL; l = l->next) { - const char *uid; + const gchar *uid; ccc = l->data; @@ -567,7 +567,7 @@ next_changed_item (EToDoConduitContext *ctxt, GList *changes) } static void -compute_status (EToDoConduitContext *ctxt, EToDoLocalRecord *local, const char *uid) +compute_status (EToDoConduitContext *ctxt, EToDoLocalRecord *local, const gchar *uid) { ECalChange *ccc; @@ -602,7 +602,7 @@ local_record_to_pilot_record (EToDoLocalRecord *local, #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #else - static char record[0xffff]; + static gchar record[0xffff]; #endif g_assert (local->comp != NULL); @@ -635,7 +635,7 @@ local_record_to_pilot_record (EToDoLocalRecord *local, pi_buffer_free(buffer); #else - p.record = (unsigned char *)record; + p.record = (guchar *)record; p.length = pack_ToDo (local->todo, p.record, 0xffff); #endif return p; @@ -647,8 +647,8 @@ local_record_to_pilot_record (EToDoLocalRecord *local, static void local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoConduitContext *ctxt) { - const char *uid; - int *priority; + const gchar *uid; + gint *priority; icalproperty_status status; ECalComponentText summary; GSList *d_list = NULL; @@ -674,7 +674,7 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu /* Don't overwrite the category */ if (local->local.ID != 0) { - int cat = 0; + gint cat = 0; #ifdef PILOT_LINK_0_12 pi_buffer_t * record; record = pi_buffer_new(DLP_BUF_SIZE); @@ -683,7 +683,7 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu return; } #else - char record[0xffff]; + gchar record[0xffff]; #endif if (dlp_ReadRecordById (ctxt->dbi->pilot_socket, @@ -771,7 +771,7 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu static void local_record_from_uid (EToDoLocalRecord *local, - const char *uid, + const gchar *uid, EToDoConduitContext *ctxt) { ECalComponent *comp; @@ -819,8 +819,8 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, ECalComponentDateTime dt = {NULL, icaltimezone_get_tzid (timezone)}; struct icaltimetype due, now; icaltimezone *utc_zone; - int priority; - char *txt; + gint priority; + gchar *txt; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #endif @@ -882,20 +882,20 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, } if (todo.complete) { - int percent = 100; + gint percent = 100; e_cal_component_set_completed (comp, &now); e_cal_component_set_percent (comp, &percent); e_cal_component_set_status (comp, ICAL_STATUS_COMPLETED); } else { - int *percent = NULL; + gint *percent = NULL; icalproperty_status status; e_cal_component_set_completed (comp, NULL); e_cal_component_get_percent (comp, &percent); if (percent == NULL || *percent == 100) { - int p = 0; + gint p = 0; e_cal_component_set_percent (comp, &p); } if (percent != NULL) @@ -948,8 +948,8 @@ static void check_for_slow_setting (GnomePilotConduit *c, EToDoConduitContext *ctxt) { GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c); - int map_count; - const char *uri; + gint map_count; + const gchar *uri; /* If there are no objects or objects but no log */ map_count = g_hash_table_size (ctxt->map->pid_map); @@ -980,9 +980,9 @@ pre_sync (GnomePilotConduit *conduit, { GnomePilotConduitSyncAbs *abs_conduit; GList *l; - int len; - unsigned char *buf; - char *filename, *change_id; + gint len; + guchar *buf; + gchar *filename, *change_id; icalcomponent *icalcomp; gint num_records, add_records = 0, mod_records = 0, del_records = 0; #ifdef PILOT_LINK_0_12 @@ -1041,7 +1041,7 @@ pre_sync (GnomePilotConduit *conduit, for (l = ctxt->changed; l != NULL; l = l->next) { ECalChange *ccc = l->data; - const char *uid; + const gchar *uid; e_cal_component_get_uid (ccc->comp, &uid); if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) { @@ -1084,9 +1084,9 @@ pre_sync (GnomePilotConduit *conduit, DLP_BUF_SIZE, buffer); #else - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, - (unsigned char *)buf, 0xffff); + (guchar *)buf, 0xffff); #endif if (len < 0) { WARN (_("Could not read pilot's ToDo application block")); @@ -1121,15 +1121,15 @@ post_sync (GnomePilotConduit *conduit, { GList *changed; gchar *filename, *change_id; - unsigned char *buf; - int dlpRetVal, len; + guchar *buf; + gint dlpRetVal, len; - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = pack_ToDoAppInfo (&(ctxt->ai), buf, 0xffff); dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle, - (unsigned char *)buf, len); + (guchar *)buf, len); g_free (buf); @@ -1171,7 +1171,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit, guint32 ID, EToDoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_pilot_id: setting to %d\n", ID )); @@ -1186,7 +1186,7 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit, EToDoLocalRecord *local, EToDoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_status_cleared: clearing status\n" )); @@ -1202,7 +1202,7 @@ for_each (GnomePilotConduitSyncAbs *conduit, EToDoConduitContext *ctxt) { static GList *comps, *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, -1); @@ -1261,7 +1261,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit, EToDoConduitContext *ctxt) { static GList *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, 0); @@ -1323,7 +1323,7 @@ compare (GnomePilotConduitSyncAbs *conduit, { /* used by the quick compare */ GnomePilotRecord local_pilot; - int retval = 0; + gint retval = 0; LOG (g_message ("compare: local=%s remote=%s...\n", print_local (local), print_remote (remote))); @@ -1351,8 +1351,8 @@ add_record (GnomePilotConduitSyncAbs *conduit, EToDoConduitContext *ctxt) { ECalComponent *comp; - char *uid; - int retval = 0; + gchar *uid; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1382,7 +1382,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit, EToDoConduitContext *ctxt) { ECalComponent *new_comp; - int retval = 0; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1405,7 +1405,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit, EToDoLocalRecord *local, EToDoConduitContext *ctxt) { - const char *uid; + const gchar *uid; g_return_val_if_fail (local != NULL, -1); g_return_val_if_fail (local->comp != NULL, -1); @@ -1427,8 +1427,8 @@ archive_record (GnomePilotConduitSyncAbs *conduit, gboolean archive, EToDoConduitContext *ctxt) { - const char *uid; - int retval = 0; + const gchar *uid; + gint retval = 0; g_return_val_if_fail (local != NULL, -1); @@ -1446,7 +1446,7 @@ match (GnomePilotConduitSyncAbs *conduit, EToDoLocalRecord **local, EToDoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ("match: looking for local copy of %s\n", print_remote (remote))); diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index 089bf37552..5307936b27 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -93,8 +93,8 @@ static void an_update_minutes_label (GtkSpinButton *sb, gpointer data) { AlarmNotify *an; - char *new_label; - int snooze_timeout_min; + gchar *new_label; + gint snooze_timeout_min; an = (AlarmNotify *) data; @@ -108,8 +108,8 @@ static void an_update_hrs_label (GtkSpinButton *sb, gpointer data) { AlarmNotify *an; - char *new_label; - int snooze_timeout_hrs; + gchar *new_label; + gint snooze_timeout_hrs; an = (AlarmNotify *) data; @@ -170,7 +170,7 @@ edit_pressed_cb (GtkButton *button, gpointer user_data) static void snooze_pressed_cb (GtkButton *button, gpointer user_data) { - int snooze_timeout; + gint snooze_timeout; AlarmNotify *an = user_data; GtkTreeIter iter; GtkTreeModel *model = NULL; @@ -253,7 +253,7 @@ notified_alarms_dialog_new (void) G_TYPE_POINTER /* FuncInfo*/)); - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "alarm-notify.glade", @@ -363,8 +363,8 @@ notified_alarms_dialog_new (void) GtkTreeIter add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger, time_t occur_start, time_t occur_end, - ECalComponentVType vtype, const char *summary, - const char *description, const char *location, + ECalComponentVType vtype, const gchar *summary, + const gchar *description, const gchar *location, AlarmNotifyFunc func, gpointer func_data) { GtkTreeIter iter; diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.h b/calendar/gui/alarm-notify/alarm-notify-dialog.h index 17f9b3a61c..ae523cb1ad 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.h +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.h @@ -43,7 +43,7 @@ struct _AlarmNotificationsDialog GtkWidget *treeview; }; -typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data); +typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, gint snooze_mins, gpointer data); AlarmNotificationsDialog * notified_alarms_dialog_new (void); @@ -51,8 +51,8 @@ notified_alarms_dialog_new (void); GtkTreeIter add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger, time_t occur_start, time_t occur_end, - ECalComponentVType vtype, const char *summary, - const char *description, const char *location, + ECalComponentVType vtype, const gchar *summary, + const gchar *description, const gchar *location, AlarmNotifyFunc func, gpointer func_data); diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index 4085815bce..e05c6e6571 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -81,7 +81,7 @@ typedef struct { static void process_removal_in_hash (gpointer key, gpointer value, gpointer data) { - char *uri = key; + gchar *uri = key; ProcessRemovalsData *prd = data; GSList *groups, *sources, *p, *q; gboolean found = FALSE; @@ -94,8 +94,8 @@ process_removal_in_hash (gpointer key, gpointer value, gpointer data) sources = e_source_group_peek_sources (group); for (q = sources; q != NULL; q = q->next) { ESource *source = E_SOURCE (q->data); - char *source_uri; - const char *completion = e_source_get_property (source, "alarm"); + gchar *source_uri; + const gchar *completion = e_source_get_property (source, "alarm"); source_uri = e_source_get_uri (source); if (strcmp (source_uri, uri) == 0) @@ -122,7 +122,7 @@ list_changed_cb (ESourceList *source_list, gpointer data) ECalSourceType source_type = E_CAL_SOURCE_TYPE_LAST; ProcessRemovalsData prd; GList *l; - int i; + gint i; g_signal_handlers_block_by_func(source_list, list_changed_cb, data); @@ -146,8 +146,8 @@ list_changed_cb (ESourceList *source_list, gpointer data) sources = e_source_group_peek_sources (group); for (q = sources; q != NULL; q = q->next) { ESource *source = E_SOURCE (q->data); - char *uri; - const char *completion = e_source_get_property (source, "alarm"); + gchar *uri; + const gchar *completion = e_source_get_property (source, "alarm"); if (completion && (!g_ascii_strcasecmp (completion, "false") || !g_ascii_strcasecmp (completion, "never"))) @@ -169,7 +169,7 @@ list_changed_cb (ESourceList *source_list, gpointer data) g_hash_table_foreach (priv->uri_client_hash[source_type], (GHFunc) process_removal_in_hash, &prd); for (l = prd.removals; l; l = l->next) { - d (printf("%s:%d (list_changed_cb) - Removing Calendar %s\n", __FILE__, __LINE__, (char *)l->data)); + d (printf("%s:%d (list_changed_cb) - Removing Calendar %s\n", __FILE__, __LINE__, (gchar *)l->data)); alarm_notify_remove_calendar (an, source_type, l->data); } g_list_free (prd.removals); @@ -206,8 +206,8 @@ load_calendars (AlarmNotify *an, ECalSourceType source_type) sources = e_source_group_peek_sources (group); for (q = sources; q != NULL; q = q->next) { ESource *source = E_SOURCE (q->data); - char *uri; - const char *completion = e_source_get_property (source, "alarm"); + gchar *uri; + const gchar *completion = e_source_get_property (source, "alarm"); if (completion && (!g_ascii_strcasecmp (completion, "false") || !g_ascii_strcasecmp (completion, "never"))) @@ -230,7 +230,7 @@ static void alarm_notify_init (AlarmNotify *an, AlarmNotifyClass *klass) { AlarmNotifyPrivate *priv; - int i; + gint i; priv = g_new0 (AlarmNotifyPrivate, 1); an->priv = priv; @@ -263,7 +263,7 @@ alarm_notify_finalize (GObject *object) { AlarmNotify *an; AlarmNotifyPrivate *priv; - int i; + gint i; g_return_if_fail (object != NULL); g_return_if_fail (IS_ALARM_NOTIFY (object)); @@ -343,8 +343,8 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource AlarmNotifyPrivate *priv; ECal *client; EUri *e_uri; - char *str_uri; - char *pass_key; + gchar *str_uri; + gchar *pass_key; g_return_if_fail (an != NULL); g_return_if_fail (IS_ALARM_NOTIFY (an)); @@ -399,7 +399,7 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource } void -alarm_notify_remove_calendar (AlarmNotify *an, ECalSourceType source_type, const char *str_uri) +alarm_notify_remove_calendar (AlarmNotify *an, ECalSourceType source_type, const gchar *str_uri) { AlarmNotifyPrivate *priv; ECal *client; diff --git a/calendar/gui/alarm-notify/alarm-notify.h b/calendar/gui/alarm-notify/alarm-notify.h index a548716295..a6ef3a173e 100644 --- a/calendar/gui/alarm-notify/alarm-notify.h +++ b/calendar/gui/alarm-notify/alarm-notify.h @@ -60,7 +60,7 @@ GType alarm_notify_get_type (void); AlarmNotify *alarm_notify_new (void); void alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource *source, gboolean load_afterwards); -void alarm_notify_remove_calendar (AlarmNotify *an, ECalSourceType source_type, const char *str_uri); +void alarm_notify_remove_calendar (AlarmNotify *an, ECalSourceType source_type, const gchar *str_uri); ESourceList *alarm_notify_get_selected_calendars (AlarmNotify *); diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index c293bf74a8..14aed443e8 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -76,8 +76,8 @@ static GList *tray_icons_list = NULL; /* Top Tray Image */ static GtkStatusIcon *tray_icon = NULL; -static int tray_blink_id = -1; -static int tray_blink_countdown = 0; +static gint tray_blink_id = -1; +static gint tray_blink_countdown = 0; static AlarmNotify *an; /* Structure that stores a client we are monitoring */ @@ -520,7 +520,7 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms) static void load_alarms (ClientAlarms *ca, time_t start, time_t end) { - char *str_query, *iso_start, *iso_end; + gchar *str_query, *iso_start, *iso_end; d(printf("%s:%d (load_alarms) \n",__FILE__, __LINE__)); @@ -875,7 +875,7 @@ query_objects_removed_cb (ECal *client, GList *objects, gpointer data) * compued with respect to the current time. */ static void -create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, int snooze_mins) +create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, gint snooze_mins) { QueuedAlarm *orig_qa; time_t t; @@ -904,8 +904,8 @@ create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, int snooze_mins) static void edit_component (ECal *client, ECalComponent *comp) { - const char *uid; - const char *uri; + const gchar *uid; + const gchar *uri; ECalSourceType source_type; CORBA_Environment ev; GNOME_Evolution_Calendar_CompEditorFactory factory; @@ -938,7 +938,7 @@ edit_component (ECal *client, ECalComponent *comp) corba_type = GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT; } - GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, uri, (char *) uid, corba_type, &ev); + GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, uri, (gchar *) uid, corba_type, &ev); if (BONOBO_EX (&ev)) e_error_run (NULL, "editor-error", bonobo_exception_get_text (&ev), NULL); @@ -950,9 +950,9 @@ edit_component (ECal *client, ECalComponent *comp) } typedef struct { - char *summary; - char *description; - char *location; + gchar *summary; + gchar *description; + gchar *location; gboolean blink_state; gboolean snooze_set; gint blink_id; @@ -1009,7 +1009,7 @@ free_tray_icon_data (TrayIconData *tray_data) static void on_dialog_objs_removed_async (struct _query_msg *msg) { - const char *our_uid; + const gchar *our_uid; GList *l; TrayIconData *tray_data; ECal *client; @@ -1025,7 +1025,7 @@ on_dialog_objs_removed_async (struct _query_msg *msg) g_return_if_fail (our_uid && *our_uid); for (l = objects; l != NULL; l = l->next) { - const char *uid = l->data; + const gchar *uid = l->data; if (!uid) continue; @@ -1197,7 +1197,7 @@ tray_list_remove_data (TrayIconData *data) } static void -notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data) +notify_dialog_cb (AlarmNotifyResult result, gint snooze_mins, gpointer data) { TrayIconData *tray_data = data; @@ -1437,11 +1437,11 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa, { QueuedAlarm *qa; ECalComponent *comp; - const char *summary, *description, *location; + const gchar *summary, *description, *location; TrayIconData *tray_data; ECalComponentText text; GSList *text_list; - char *str, *start_str, *end_str, *alarm_str, *time_str; + gchar *str, *start_str, *end_str, *alarm_str, *time_str; icaltimezone *current_zone; ECalComponentOrganizer organiser; @@ -1521,7 +1521,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa, tray_list_add_new (tray_data); if (g_list_length (tray_icons_list) > 1) { - char *tip; + gchar *tip; tip = g_strdup_printf (_("You have %d alarms"), g_list_length (tray_icons_list)); gtk_status_icon_set_tooltip_text (tray_icon, tip); @@ -1559,13 +1559,13 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa, { QueuedAlarm *qa; ECalComponent *comp; - const char *summary, *location; + const gchar *summary, *location; ECalComponentText text; - char *str, *start_str, *end_str, *alarm_str, *time_str; + gchar *str, *start_str, *end_str, *alarm_str, *time_str; icaltimezone *current_zone; ECalComponentOrganizer organiser; NotifyNotification *n; - char *body; + gchar *body; d(printf("%s:%d (popup_notification)\n",__FILE__, __LINE__)); @@ -1652,7 +1652,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa, e_cal_component_alarm_free (alarm); if (attach && icalattach_get_is_url (attach)) { - const char *url; + const gchar *url; url = icalattach_get_url (attach); @@ -1702,11 +1702,11 @@ mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id) /* Performs notification of a procedure alarm */ static gboolean -procedure_notification_dialog (const char *cmd, const char *url) +procedure_notification_dialog (const gchar *cmd, const gchar *url) { GtkWidget *dialog, *label, *checkbox; - char *str; - int btn; + gchar *str; + gint btn; d(printf("%s:%d (procedure_notification_dialog)\n",__FILE__, __LINE__)); @@ -1755,8 +1755,8 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id ECalComponentAlarm *alarm; ECalComponentText description; icalattach *attach; - const char *url; - char *cmd; + const gchar *url; + gchar *cmd; gboolean result = TRUE; d(printf("%s:%d (procedure_notification)\n",__FILE__, __LINE__)); @@ -1789,12 +1789,12 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id if (description.value) cmd = g_strconcat (url, " ", description.value, NULL); else - cmd = (char *) url; + cmd = (gchar *) url; if (procedure_notification_dialog (cmd, url)) result = g_spawn_command_line_async (cmd, NULL); - if (cmd != (char *) url) + if (cmd != (gchar *) url) g_free (cmd); icalattach_unref (attach); @@ -2168,7 +2168,7 @@ update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp) /* Update auids in Queued Alarms*/ for (qa_list = cqa->queued_alarms; qa_list; qa_list = qa_list->next) { QueuedAlarm *qa = qa_list->data; - char *check_auid = (char *) qa->instance->auid; + gchar *check_auid = (gchar *) qa->instance->auid; ECalComponentAlarm *alarm; alarm = e_cal_component_get_alarm (newcomp, check_auid); @@ -2207,7 +2207,7 @@ update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa) for (instance_list = alarms->alarms; instance_list; instance_list = instance_list->next) { al_inst = instance_list->data; if (al_inst->trigger == qa->orig_trigger) { /* FIXME if two or more alarm instances (audio, note) for same component have same trigger */ - g_free ((char *) qa->instance->auid); + g_free ((gchar *) qa->instance->auid); qa->instance->auid = g_strdup (al_inst->auid); break; } diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index dba9099520..8f3b0aebc1 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -48,7 +48,7 @@ static ESourceList *calendar_source_list = NULL, *tasks_source_list = NULL; static gboolean locale_supports_12_hour_format (void) { - char s[16]; + gchar s[16]; time_t t = 0; strftime (s, sizeof s, "%p", gmtime (&t)); @@ -100,7 +100,7 @@ ensure_inited (void) } ESourceList * -config_data_get_calendars (const char *key) +config_data_get_calendars (const gchar *key) { ESourceList *cal_sources; gboolean state; @@ -157,9 +157,9 @@ config_data_get_calendars (const char *key) } void -config_data_replace_string_list (const char *key, - const char *old, - const char *new) +config_data_replace_string_list (const gchar *key, + const gchar *old, + const gchar *new) { GSList *source, *tmp; @@ -204,7 +204,7 @@ config_data_get_conf_client (void) icaltimezone * config_data_get_timezone (void) { - char *location; + gchar *location; icaltimezone *local_timezone; ensure_inited (); @@ -309,7 +309,7 @@ config_data_get_last_notification_time (void) * Saves a program name as "blessed" **/ void -config_data_save_blessed_program (const char *program) +config_data_save_blessed_program (const gchar *program) { GConfClient *client; GSList *l; @@ -333,7 +333,7 @@ config_data_save_blessed_program (const char *program) * Return value: TRUE if program is blessed, FALSE otherwise **/ gboolean -config_data_is_blessed_program (const char *program) +config_data_is_blessed_program (const gchar *program) { GConfClient *client; GSList *l, *n; @@ -346,7 +346,7 @@ config_data_is_blessed_program (const char *program) while (l) { n = l->next; if (!found) - found = strcmp ((char *) l->data, program) == 0; + found = strcmp ((gchar *) l->data, program) == 0; g_free (l->data); g_slist_free_1 (l); l = n; diff --git a/calendar/gui/alarm-notify/config-data.h b/calendar/gui/alarm-notify/config-data.h index 63e6c7205e..19086beb56 100644 --- a/calendar/gui/alarm-notify/config-data.h +++ b/calendar/gui/alarm-notify/config-data.h @@ -38,9 +38,9 @@ gboolean config_data_get_24_hour_format (void); gboolean config_data_get_notify_with_tray (void); void config_data_set_last_notification_time (time_t t); time_t config_data_get_last_notification_time (void); -void config_data_save_blessed_program (const char *program); -gboolean config_data_is_blessed_program (const char *program); -ESourceList *config_data_get_calendars (const char *); -void config_data_replace_string_list (const char *, const char *, const char *); +void config_data_save_blessed_program (const gchar *program); +gboolean config_data_is_blessed_program (const gchar *program); +ESourceList *config_data_get_calendars (const gchar *); +void config_data_replace_string_list (const gchar *, const gchar *, const gchar *); #endif diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index a625bec0fa..887adaa1d5 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -67,7 +67,7 @@ static gint save_session_cb (GnomeClient *client, GnomeSaveStyle save_style, gint shutdown, GnomeInteractStyle interact_style, gint fast, gpointer user_data) { - char *args[2]; + gchar *args[2]; args[0] = g_build_filename (EVOLUTION_LIBEXECDIR, "evolution-alarm-notify" @@ -110,7 +110,7 @@ init_session (void) * singleton service object. */ static BonoboObject * -alarm_notify_factory_fn (BonoboGenericFactory *factory, const char *component_id, void *data) +alarm_notify_factory_fn (BonoboGenericFactory *factory, const gchar *component_id, gpointer data) { g_return_val_if_fail (alarm_notify_service != NULL, NULL); @@ -127,8 +127,8 @@ init_alarm_service (gpointer user_data) return FALSE; } -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); diff --git a/calendar/gui/alarm-notify/util.c b/calendar/gui/alarm-notify/util.c index 640a8f5f99..5377c8d4b2 100644 --- a/calendar/gui/alarm-notify/util.c +++ b/calendar/gui/alarm-notify/util.c @@ -33,12 +33,12 @@ #include "util.h" /* Converts a time_t to a string, relative to the specified timezone */ -char * +gchar * timet_to_str_with_zone (time_t t, icaltimezone *zone) { struct icaltimetype itt; struct tm tm; - char buf[256]; + gchar buf[256]; if (t == -1) return g_strdup (_("invalid time")); @@ -51,15 +51,15 @@ timet_to_str_with_zone (time_t t, icaltimezone *zone) return g_strdup (buf); } -char * +gchar * calculate_time (time_t start, time_t end) { time_t difference = end - start; - char *str; - int hours, minutes; - char *times[4]; - char *joined; - int i; + gchar *str; + gint hours, minutes; + gchar *times[4]; + gchar *joined; + gint i; i = 0; if (difference >= 3600) { diff --git a/calendar/gui/alarm-notify/util.h b/calendar/gui/alarm-notify/util.h index b7b715ca9b..bb6935729a 100644 --- a/calendar/gui/alarm-notify/util.h +++ b/calendar/gui/alarm-notify/util.h @@ -28,6 +28,6 @@ #include <libecal/e-cal-component.h> -char *timet_to_str_with_zone (time_t t, icaltimezone *zone); -char *calculate_time (time_t start, time_t end); +gchar *timet_to_str_with_zone (time_t t, icaltimezone *zone); +gchar *calculate_time (time_t start, time_t end); #endif diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c index 6183d873ba..b93a98a934 100644 --- a/calendar/gui/cal-search-bar.c +++ b/calendar/gui/cal-search-bar.c @@ -46,7 +46,7 @@ typedef struct CALSearchBarItem { ESearchBarItem search; - const char *image; + const gchar *image; } CALSearchBarItem; static ESearchBarItem calendar_search_items[] = { @@ -192,7 +192,7 @@ cal_search_bar_init (CalSearchBar *cal_search) static void free_categories (GPtrArray *categories) { - int i; + gint i; for (i = 0; i < categories->len; i++) { if (categories->pdata[i] == NULL) @@ -245,14 +245,14 @@ cal_search_bar_destroy (GtkObject *object) /* Emits the "sexp_changed" signal for the calendar search bar */ static void -notify_sexp_changed (CalSearchBar *cal_search, const char *sexp) +notify_sexp_changed (CalSearchBar *cal_search, const gchar *sexp) { g_signal_emit (GTK_OBJECT (cal_search), cal_search_bar_signals[SEXP_CHANGED], 0, sexp); } /* Returns the string of the currently selected category, NULL for "Unmatched" and "All */ -static const char * +static const gchar * get_current_category (CalSearchBar *cal_search) { CalSearchBarPrivate *priv; @@ -282,16 +282,16 @@ get_current_category (CalSearchBar *cal_search) /* Returns a sexp for the selected category in the drop-down menu. The "All" - * option is returned as (const char *) 1, and the "Unfiled" option is returned + * option is returned as (const gchar *) 1, and the "Unfiled" option is returned * as NULL. */ -static char * +static gchar * get_show_option_sexp (CalSearchBar *cal_search) { CalSearchBarPrivate *priv ; gint viewid ; - char *start, *end, *due, *ret = NULL; - const char *category = NULL ; + gchar *start, *end, *due, *ret = NULL; + const gchar *category = NULL ; time_t start_range, end_range; priv = cal_search->priv; @@ -405,10 +405,10 @@ get_show_option_sexp (CalSearchBar *cal_search) /* Sets the query string to be (contains? "field" "text") */ static void -notify_e_cal_view_contains (CalSearchBar *cal_search, const char *field, const char *view) +notify_e_cal_view_contains (CalSearchBar *cal_search, const gchar *field, const gchar *view) { - char *text = NULL; - char *sexp; + gchar *text = NULL; + gchar *sexp; text = e_search_bar_get_text (E_SEARCH_BAR (cal_search)); @@ -437,7 +437,7 @@ notify_e_cal_view_contains (CalSearchBar *cal_search, const char *field, const c static void notify_category_is (CalSearchBar *cal_search) { - char *sexp; + gchar *sexp; sexp = get_show_option_sexp (cal_search); @@ -455,9 +455,9 @@ notify_category_is (CalSearchBar *cal_search) static void regen_query (CalSearchBar *cal_search) { - int id; - char *show_option_sexp = NULL; - char *sexp = NULL; + gint id; + gchar *show_option_sexp = NULL; + gchar *sexp = NULL; GString *out = NULL; EFilterBar *efb = (EFilterBar *) cal_search; @@ -518,7 +518,7 @@ regen_query (CalSearchBar *cal_search) static void regen_view_query (CalSearchBar *cal_search) { - const char *category; + const gchar *category; notify_category_is (cal_search); category = cal_search_bar_get_category (cal_search); @@ -546,7 +546,7 @@ generate_viewoption_menu (CALSearchBarItem *subitems) for (i = 0; subitems[i].search.id != -1; ++i) { if (subitems[i].search.text) { - char *str = NULL; + gchar *str = NULL; str = e_str_without_underscores (subitems[i].search.text); menu_item = gtk_image_menu_item_new_with_label (str); if (subitems[i].image) { @@ -588,12 +588,12 @@ setup_category_options (CalSearchBar *cal_search, CALSearchBarItem *subitems, gi subitems[index].image = NULL; for (i = 0; i < priv->categories->len; i++) { - const char *category; + const gchar *category; category = priv->categories->pdata[i] ? priv->categories->pdata [i] : ""; /* The search.text field should not be free'd */ - subitems[i + offset].search.text = (char *) category; + subitems[i + offset].search.text = (gchar *) category; subitems[i + offset].search.id = i + offset; subitems[i + offset].image = e_categories_get_icon_file_for (category); } @@ -719,7 +719,7 @@ make_suboptions (CalSearchBar *cal_search) } static void -search_menu_activated (ESearchBar *esb, int id) +search_menu_activated (ESearchBar *esb, gint id) { if (id == E_FILTERBAR_ADVANCED_ID) e_search_bar_set_item_id (esb, id); @@ -739,9 +739,9 @@ cal_search_bar_construct (CalSearchBar *cal_search, guint32 flags) { ESearchBarItem *items; guint32 bit = 0x1; - int i, j; - char *xmlfile = NULL; - char *userfile = NULL; + gint i, j; + gchar *xmlfile = NULL; + gchar *userfile = NULL; FilterPart *part; RuleContext *search_context; FilterRule *search_rule; @@ -831,12 +831,12 @@ cal_search_bar_new (guint32 flags) /* Used from qsort() */ static int -compare_categories_cb (const void *a, const void *b) +compare_categories_cb (gconstpointer a, gconstpointer b) { - const char **ca, **cb; + const gchar **ca, **cb; - ca = (const char **) a; - cb = (const char **) b; + ca = (const gchar **) a; + cb = (const gchar **) b; /* FIXME: should use some utf8 strcoll() thingy */ return strcmp (*ca, *cb); @@ -849,7 +849,7 @@ static GPtrArray * sort_categories (GPtrArray *categories) { GPtrArray *c; - int i; + gint i; c = g_ptr_array_new (); g_ptr_array_set_size (c, categories->len); @@ -899,10 +899,10 @@ cal_search_bar_set_categories (CalSearchBar *cal_search, GPtrArray *categories) * Return value: Name of the selected category, or NULL if there is no * selected category. **/ -const char * +const gchar * cal_search_bar_get_category (CalSearchBar *cal_search) { - const char *category; + const gchar *category; category = get_current_category (cal_search); diff --git a/calendar/gui/cal-search-bar.h b/calendar/gui/cal-search-bar.h index 26f3998c89..3c7304f136 100644 --- a/calendar/gui/cal-search-bar.h +++ b/calendar/gui/cal-search-bar.h @@ -68,8 +68,8 @@ typedef struct { /* Notification signals */ - void (* sexp_changed) (CalSearchBar *cal_search, const char *sexp); - void (* category_changed) (CalSearchBar *cal_search, const char *category); + void (* sexp_changed) (CalSearchBar *cal_search, const gchar *sexp); + void (* category_changed) (CalSearchBar *cal_search, const gchar *category); } CalSearchBarClass; GType cal_search_bar_get_type (void); @@ -80,7 +80,7 @@ GtkWidget *cal_search_bar_new (guint32 flags); void cal_search_bar_set_categories (CalSearchBar *cal_search, GPtrArray *categories); -const char *cal_search_bar_get_category (CalSearchBar *cal_search); +const gchar *cal_search_bar_get_category (CalSearchBar *cal_search); void cal_search_bar_get_time_range (CalSearchBar *cal_search, time_t *start, time_t *end); diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index e69cd463ea..1bf0c442c4 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -67,7 +67,7 @@ typedef struct { } FocusData; static void -file_open_event_cb (BonoboUIComponent *uic, gpointer data, const char *path) +file_open_event_cb (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -98,7 +98,7 @@ calendar_command_print (GnomeCalendar *gcal, GtkPrintOperationAction action) /* File/Print callback */ static void -file_print_cb (BonoboUIComponent *uic, gpointer data, const char *path) +file_print_cb (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal = GNOME_CALENDAR (data); @@ -106,7 +106,7 @@ file_print_cb (BonoboUIComponent *uic, gpointer data, const char *path) } static void -file_print_preview_cb (BonoboUIComponent *uic, gpointer data, const char *path) +file_print_preview_cb (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal = GNOME_CALENDAR (data); @@ -134,7 +134,7 @@ set_normal_cursor (GnomeCalendar *gcal) } static void -previous_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +previous_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -146,7 +146,7 @@ previous_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } static void -next_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +next_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -166,7 +166,7 @@ calendar_goto_today (GnomeCalendar *gcal) } static void -today_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +today_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -176,7 +176,7 @@ today_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } static void -goto_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +goto_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -186,7 +186,7 @@ goto_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } static void -show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -196,7 +196,7 @@ show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } static void -show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -206,7 +206,7 @@ show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char * } static void -show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -216,7 +216,7 @@ show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) } static void -show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -227,7 +227,7 @@ show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path static void -show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path) +show_list_view_clicked (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; @@ -301,7 +301,7 @@ purge_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path) { GnomeCalendar *gcal; GtkWidget *dialog, *parent, *box, *label, *spin; - int response; + gint response; gcal = GNOME_CALENDAR (data); @@ -353,7 +353,7 @@ static void sensitize_items(BonoboUIComponent *uic, struct _sensitize_item *items, guint32 mask) { while (items->command) { - char command[32]; + gchar command[32]; if (strlen(items->command)>=21) { g_warning ("items->command >= 21: %s\n", items->command); @@ -552,7 +552,7 @@ gcal_taskpad_focus_change_cb (GnomeCalendar *gcal, gboolean in, gpointer data) } static void -help_debug (BonoboUIComponent *uid, void *data, const char *path) +help_debug (BonoboUIComponent *uid, gpointer data, const gchar *path) { calendar_component_show_logger ((GtkWidget *) data); } diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index bca0832bac..d7ae0c66e2 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -116,11 +116,11 @@ typedef struct } CalendarComponentView; struct _CalendarComponentPrivate { - char *base_directory; - char *config_directory; + gchar *base_directory; + gchar *config_directory; GConfClient *gconf_client; - int gconf_notify_id; + gint gconf_notify_id; ESourceList *source_list; ESourceList *task_source_list; @@ -164,7 +164,7 @@ ensure_sources (CalendarComponent *component) ESourceGroup *contacts; ESource *personal_source; ESource *birthdays_source; - char *base_uri, *base_uri_proto, base_uri_proto_seventh; + gchar *base_uri, *base_uri_proto, base_uri_proto_seventh; const gchar *base_dir; gchar *create_source; @@ -231,7 +231,7 @@ ensure_sources (CalendarComponent *component) /* ensure the source name is in current locale, not read from configuration */ e_source_set_name (personal_source, _("Personal")); } else { - char *primary_calendar = calendar_config_get_primary_calendar(); + gchar *primary_calendar = calendar_config_get_primary_calendar(); GSList *calendars_selected; /* Create the default Person addressbook */ @@ -331,7 +331,7 @@ is_in_uids (GSList *uids, ESource *source) GSList *l; for (l = uids; l; l = l->next) { - const char *uid = l->data; + const gchar *uid = l->data; if (!strcmp (uid, e_source_peek_uid (source))) return TRUE; @@ -358,7 +358,7 @@ update_uris_for_selection (CalendarComponentView *component_view) ESource *selected_source = l->data; if (gnome_calendar_add_source (component_view->calendar, E_CAL_SOURCE_TYPE_EVENT, selected_source)) - uids_selected = g_slist_append (uids_selected, (char *) e_source_peek_uid (selected_source)); + uids_selected = g_slist_append (uids_selected, (gchar *) e_source_peek_uid (selected_source)); } e_source_selector_free_selection (component_view->source_selection); @@ -410,7 +410,7 @@ update_selection (CalendarComponentView *component_view) /* Make sure the whole selection is there */ for (l = uids_selected; l; l = l->next) { - char *uid = l->data; + gchar *uid = l->data; ESource *source; source = e_source_list_peek_source_by_uid (component_view->source_list, uid); @@ -441,7 +441,7 @@ update_task_memo_selection (CalendarComponentView *component_view, ECalSourceTyp /* Remove any that aren't there any more */ for (l = source_selection; l; l = l->next) { - char *uid = l->data; + gchar *uid = l->data; ESource *source; source = e_source_list_peek_source_by_uid (component_view->source_list, uid); @@ -456,7 +456,7 @@ update_task_memo_selection (CalendarComponentView *component_view, ECalSourceTyp /* Make sure the whole selection is there */ for (l = uids_selected; l; l = l->next) { - char *uid = l->data; + gchar *uid = l->data; ESource *source; source = e_source_list_peek_source_by_uid (source_list, uid); @@ -475,7 +475,7 @@ static void update_primary_selection (CalendarComponentView *component_view) { ESource *source = NULL; - char *uid; + gchar *uid; uid = calendar_config_get_primary_calendar (); if (uid) { @@ -497,7 +497,7 @@ static void update_primary_task_memo_selection (CalendarComponentView *component_view, ECalSourceType type) { ESource *source = NULL; - char *uid; + gchar *uid; ESourceList *source_list = NULL; if (type == E_CAL_SOURCE_TYPE_TODO) { @@ -520,7 +520,7 @@ update_primary_task_memo_selection (CalendarComponentView *component_view, ECalS /* Callbacks. */ static void -copy_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) +copy_calendar_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { CalendarComponentView *component_view = data; ESource *selected_source; @@ -533,12 +533,12 @@ copy_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -delete_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) +delete_calendar_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { CalendarComponentView *component_view = data; ESource *selected_source; ECal *cal; - char *uri; + gchar *uri; selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector)); if (!selected_source) @@ -570,13 +570,13 @@ delete_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -new_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) +new_calendar_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { calendar_setup_edit_calendar (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget)), NULL, pitem->user_data); } static void -rename_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) +rename_calendar_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { CalendarComponentView *component_view = data; ESourceSelector *selector; @@ -586,7 +586,7 @@ rename_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -edit_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) +edit_calendar_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { CalendarComponentView *component_view = data; ESource *selected_source; @@ -599,7 +599,7 @@ edit_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -set_offline_availability (EPopup *ep, EPopupItem *pitem, void *data, const char *value) +set_offline_availability (EPopup *ep, EPopupItem *pitem, gpointer data, const gchar *value) { CalendarComponentView *component_view = data; ESource *selected_source; @@ -612,13 +612,13 @@ set_offline_availability (EPopup *ep, EPopupItem *pitem, void *data, const char } static void -mark_no_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_no_offline_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { set_offline_availability (ep, pitem, data, "0"); } static void -mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_offline_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { set_offline_availability (ep, pitem, data, "1"); } @@ -638,7 +638,7 @@ static EPopupItem ecc_source_popups[] = { }; static void -ecc_source_popup_free(EPopup *ep, GSList *list, void *data) +ecc_source_popup_free(EPopup *ep, GSList *list, gpointer data) { g_slist_free(list); } @@ -649,7 +649,7 @@ popup_event_cb(ESourceSelector *selector, ESource *insource, GdkEventButton *eve ECalPopup *ep; ECalPopupTargetSource *t; GSList *menus = NULL; - int i; + gint i; GtkMenu *menu; /** @HookPoint-ECalPopup: Calendar Source Selector Context Menu @@ -730,7 +730,7 @@ set_info (CalendarComponentView *component_view) struct icaltimetype start_tt, end_tt; time_t start_time, end_time; struct tm start_tm, end_tm; - char buffer[512], end_buffer[256]; + gchar buffer[512], end_buffer[256]; GnomeCalendarViewType view; gnome_calendar_get_visible_time_range (component_view->calendar, &start_time, &end_time); @@ -866,15 +866,15 @@ config_primary_memos_selection_changed_cb (GConfClient *client, guint id, GConfE /* Evolution::Component CORBA methods. */ static void -impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environment *ev) +impl_handleURI (PortableServer_Servant servant, const gchar *uri, CORBA_Environment *ev) { CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant)); CalendarComponentPrivate *priv; GList *l; CalendarComponentView *view = NULL; - char *src_uid = NULL; - char *uid = NULL; - char *rid = NULL; + gchar *src_uid = NULL; + gchar *uid = NULL; + gchar *rid = NULL; priv = calendar_component->priv; @@ -886,8 +886,8 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme if (!strncmp (uri, "calendar:", 9)) { EUri *euri = e_uri_new (uri); - const char *p; - char *header, *content; + const gchar *p; + gchar *header, *content; size_t len, clen; time_t start = -1, end = -1; @@ -900,7 +900,7 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme if (p[len] != '=') break; - header = (char *) p; + header = (gchar *) p; header[len] = '\0'; p += len + 1; @@ -992,10 +992,10 @@ selector_tree_data_dropped (ESourceSelector *selector, if (data->data) { icalcomponent *icalcomp = NULL; - char *comp_str; /* do not free this! */ + gchar *comp_str; /* do not free this! */ /* data->data is "source_uid\ncomponent_string" */ - comp_str = strchr ((char *)data->data, '\n'); + comp_str = strchr ((gchar *)data->data, '\n'); if (comp_str) { comp_str [0] = 0; comp_str++; @@ -1003,7 +1003,7 @@ selector_tree_data_dropped (ESourceSelector *selector, icalcomp = icalparser_parse_string (comp_str); if (icalcomp) { - success = cal_comp_process_source_list_drop (client, icalcomp, action, (char *)data->data, component->priv->source_list); + success = cal_comp_process_source_list_drop (client, icalcomp, action, (gchar *)data->data, component->priv->source_list); icalcomponent_free (icalcomp); } } @@ -1045,7 +1045,7 @@ setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView { CalendarComponentPrivate *priv; ESource *source = NULL; - char *uid; + gchar *uid; guint not; priv = calendar_component->priv; @@ -1160,7 +1160,7 @@ create_new_event (CalendarComponent *calendar_component, CalendarComponentView * } static void -create_local_item_cb (EUserCreatableItemsHandler *handler, const char *item_type_name, void *data) +create_local_item_cb (EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data) { CalendarComponent *calendar_component = data; CalendarComponentPrivate *priv; @@ -1434,36 +1434,36 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_sequence_set_release (list, FALSE); - list->_buffer[0].id = (char *) CREATE_EVENT_ID; - list->_buffer[0].description = (char *) _("New appointment"); - list->_buffer[0].menuDescription = (char *) C_("New", "_Appointment"); - list->_buffer[0].tooltip = (char *) _("Create a new appointment"); + list->_buffer[0].id = (gchar *) CREATE_EVENT_ID; + list->_buffer[0].description = (gchar *) _("New appointment"); + list->_buffer[0].menuDescription = (gchar *) C_("New", "_Appointment"); + list->_buffer[0].tooltip = (gchar *) _("Create a new appointment"); list->_buffer[0].menuShortcut = 'a'; - list->_buffer[0].iconName = (char *) "appointment-new"; + list->_buffer[0].iconName = (gchar *) "appointment-new"; list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[1].id = (char *) CREATE_MEETING_ID; - list->_buffer[1].description = (char *) _("New meeting"); - list->_buffer[1].menuDescription = (char *) C_("New", "M_eeting"); - list->_buffer[1].tooltip = (char *) _("Create a new meeting request"); + list->_buffer[1].id = (gchar *) CREATE_MEETING_ID; + list->_buffer[1].description = (gchar *) _("New meeting"); + list->_buffer[1].menuDescription = (gchar *) C_("New", "M_eeting"); + list->_buffer[1].tooltip = (gchar *) _("Create a new meeting request"); list->_buffer[1].menuShortcut = 'e'; - list->_buffer[1].iconName = (char *) "stock_new-meeting"; + list->_buffer[1].iconName = (gchar *) "stock_new-meeting"; list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[2].id = (char *) CREATE_ALLDAY_EVENT_ID; - list->_buffer[2].description = (char *) _("New all day appointment"); - list->_buffer[2].menuDescription = (char *) C_("New", "All Day A_ppointment"); - list->_buffer[2].tooltip = (char *) _("Create a new all-day appointment"); + list->_buffer[2].id = (gchar *) CREATE_ALLDAY_EVENT_ID; + list->_buffer[2].description = (gchar *) _("New all day appointment"); + list->_buffer[2].menuDescription = (gchar *) C_("New", "All Day A_ppointment"); + list->_buffer[2].tooltip = (gchar *) _("Create a new all-day appointment"); list->_buffer[2].menuShortcut = '\0'; - list->_buffer[2].iconName = (char *) "stock_new-24h-appointment"; + list->_buffer[2].iconName = (gchar *) "stock_new-24h-appointment"; list->_buffer[2].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[3].id = (char *) CREATE_CALENDAR_ID; - list->_buffer[3].description = (char *) _("New calendar"); - list->_buffer[3].menuDescription = (char *) C_("New", "Cale_ndar"); - list->_buffer[3].tooltip = (char *) _("Create a new calendar"); + list->_buffer[3].id = (gchar *) CREATE_CALENDAR_ID; + list->_buffer[3].description = (gchar *) _("New calendar"); + list->_buffer[3].menuDescription = (gchar *) C_("New", "Cale_ndar"); + list->_buffer[3].tooltip = (gchar *) _("Create a new calendar"); list->_buffer[3].menuShortcut = '\0'; - list->_buffer[3].iconName = (char *) "x-office-calendar"; + list->_buffer[3].iconName = (gchar *) "x-office-calendar"; list->_buffer[3].type = GNOME_Evolution_CREATABLE_FOLDER; return list; @@ -1637,13 +1637,13 @@ calendar_component_peek (void) return component; } -const char * +const gchar * calendar_component_peek_base_directory (CalendarComponent *component) { return component->priv->base_directory; } -const char * +const gchar * calendar_component_peek_config_directory (CalendarComponent *component) { return component->priv->config_directory; diff --git a/calendar/gui/calendar-component.h b/calendar/gui/calendar-component.h index 1fbcdbc487..851c4c3237 100644 --- a/calendar/gui/calendar-component.h +++ b/calendar/gui/calendar-component.h @@ -58,8 +58,8 @@ GType calendar_component_get_type (void); CalendarComponent *calendar_component_peek (void); -const char *calendar_component_peek_base_directory (CalendarComponent *component); -const char *calendar_component_peek_config_directory (CalendarComponent *component); +const gchar *calendar_component_peek_base_directory (CalendarComponent *component); +const gchar *calendar_component_peek_config_directory (CalendarComponent *component); ESourceList *calendar_component_peek_source_list (CalendarComponent *component); EActivityHandler *calendar_component_peek_activity_handler (CalendarComponent *component); void calendar_component_show_logger (gpointer); diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index ffd398bd69..58f77968d6 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -73,7 +73,7 @@ calendar_config_remove_notification (guint id) gboolean calendar_config_locale_supports_12_hour_format (void) { - char s[16]; + gchar s[16]; time_t t = 0; calendar_config_init (); @@ -83,7 +83,7 @@ calendar_config_locale_supports_12_hour_format (void) } /* Returns the string representation of a units value */ -static const char * +static const gchar * units_to_string (CalUnits units) { switch (units) { @@ -103,7 +103,7 @@ units_to_string (CalUnits units) /* opposite function to 'units_to_string' */ static CalUnits -string_to_units (const char *units) +string_to_units (const gchar *units) { CalUnits res; @@ -151,7 +151,7 @@ calendar_config_add_notification_calendars_selected (GConfClientNotifyFunc func, } /* The primary calendar */ -char * +gchar * calendar_config_get_primary_calendar (void) { calendar_config_init (); @@ -160,7 +160,7 @@ calendar_config_get_primary_calendar (void) } void -calendar_config_set_primary_calendar (const char *primary_uid) +calendar_config_set_primary_calendar (const gchar *primary_uid) { calendar_config_init (); @@ -233,7 +233,7 @@ calendar_config_get_timezone_stored (void) icaltimezone * calendar_config_get_icaltimezone (void) { - char *location; + gchar *location; icaltimezone *zone = NULL; calendar_config_init (); @@ -618,9 +618,9 @@ calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc fun /* Whether we show the Marcus Bains Line (current time), and in what colors. */ void -calendar_config_get_marcus_bains (gboolean *show_line, const char **dayview_color, const char **timebar_color) +calendar_config_get_marcus_bains (gboolean *show_line, const gchar **dayview_color, const gchar **timebar_color) { - static char *dcolor = NULL, *tcolor = NULL; + static gchar *dcolor = NULL, *tcolor = NULL; calendar_config_init (); @@ -855,7 +855,7 @@ calendar_config_add_notification_tasks_selected (GConfClientNotifyFunc func, gpo } /* The primary task list */ -char * +gchar * calendar_config_get_primary_tasks (void) { calendar_config_init (); @@ -864,7 +864,7 @@ calendar_config_get_primary_tasks (void) } void -calendar_config_set_primary_tasks (const char *primary_uid) +calendar_config_set_primary_tasks (const gchar *primary_uid) { calendar_config_init (); @@ -933,7 +933,7 @@ calendar_config_add_notification_memos_selected (GConfClientNotifyFunc func, gpo } /* The primary memo list */ -char * +gchar * calendar_config_get_primary_memos (void) { calendar_config_init (); @@ -942,7 +942,7 @@ calendar_config_get_primary_memos (void) } void -calendar_config_set_primary_memos (const char *primary_uid) +calendar_config_set_primary_memos (const gchar *primary_uid) { calendar_config_init (); @@ -1086,7 +1086,7 @@ calendar_config_add_notification_hide_completed_tasks (GConfClientNotifyFunc fun CalUnits calendar_config_get_hide_completed_tasks_units (void) { - char *units; + gchar *units; CalUnits cu; calendar_config_init (); @@ -1109,7 +1109,7 @@ calendar_config_get_hide_completed_tasks_units (void) void calendar_config_set_hide_completed_tasks_units (CalUnits cu) { - char *units; + gchar *units; calendar_config_init (); @@ -1384,7 +1384,7 @@ calendar_config_set_use_default_reminder (gboolean value) * * Return value: Interval for default reminders. **/ -int +gint calendar_config_get_default_reminder_interval (void) { calendar_config_init (); @@ -1400,7 +1400,7 @@ calendar_config_get_default_reminder_interval (void) * appointments. **/ void -calendar_config_set_default_reminder_interval (int interval) +calendar_config_set_default_reminder_interval (gint interval) { calendar_config_init (); @@ -1418,7 +1418,7 @@ calendar_config_set_default_reminder_interval (int interval) CalUnits calendar_config_get_default_reminder_units (void) { - char *units; + gchar *units; CalUnits cu; calendar_config_init (); @@ -1455,7 +1455,7 @@ calendar_config_set_default_reminder_units (CalUnits units) * are retrieved even when returns FALSE. **/ gboolean -calendar_config_get_ba_reminder (int *interval, CalUnits *units) +calendar_config_get_ba_reminder (gint *interval, CalUnits *units) { calendar_config_init (); @@ -1464,7 +1464,7 @@ calendar_config_get_ba_reminder (int *interval, CalUnits *units) } if (units) { - char *str; + gchar *str; str = gconf_client_get_string (config, CALENDAR_CONFIG_BA_REMINDER_UNITS, NULL); *units = string_to_units (str); @@ -1483,7 +1483,7 @@ calendar_config_get_ba_reminder (int *interval, CalUnits *units) * @units: The units of the reminder; can be NULL. **/ void -calendar_config_set_ba_reminder (gboolean *enabled, int *interval, CalUnits *units) +calendar_config_set_ba_reminder (gboolean *enabled, gint *interval, CalUnits *units) { calendar_config_init (); @@ -1505,10 +1505,10 @@ calendar_config_set_ba_reminder (gboolean *enabled, int *interval, CalUnits *uni * Returns the subexpression to use to filter out completed tasks according * to the config settings. The returned sexp should be freed. **/ -char* +gchar * calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed) { - char *sexp = NULL; + gchar *sexp = NULL; if (calendar_config_get_hide_completed_tasks ()) { CalUnits units; @@ -1525,7 +1525,7 @@ calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed) else sexp = g_strdup ("(is-completed?)"); } else { - char *isodate; + gchar *isodate; icaltimezone *zone; struct icaltimetype tt; time_t t; @@ -1603,10 +1603,10 @@ calendar_config_set_dir_path (const gchar *path) gconf_client_set_string (config, CALENDAR_CONFIG_SAVE_DIR, path, NULL); } -char * +gchar * calendar_config_get_dir_path (void) { - char *path; + gchar *path; calendar_config_init (); @@ -1641,14 +1641,14 @@ calendar_config_free_day_second_zones (GSList *zones) /* keeps max 'day_second_zones_max' zones, if 'location' is already in a list, then it'll became first there */ void -calendar_config_set_day_second_zone (const char *location) +calendar_config_set_day_second_zone (const gchar *location) { calendar_config_init (); if (location && *location) { GSList *lst, *l; GError *error = NULL; - int max_zones; + gint max_zones; /* configurable max number of timezones to remember */ max_zones = gconf_client_get_int (config, CALENDAR_CONFIG_DAY_SECOND_ZONES_MAX, &error); @@ -1666,7 +1666,7 @@ calendar_config_set_day_second_zone (const char *location) if (l->data && g_str_equal (l->data, location)) { if (l != lst) { /* isn't first in the list */ - char *val = l->data; + gchar *val = l->data; lst = g_slist_remove (lst, val); lst = g_slist_prepend (lst, val); @@ -1695,7 +1695,7 @@ calendar_config_set_day_second_zone (const char *location) } /* location of the second time zone user has selected. Free with g_free. */ -char * +gchar * calendar_config_get_day_second_zone (void) { calendar_config_init (); @@ -1709,7 +1709,7 @@ calendar_config_select_day_second_zone (void) icaltimezone *zone = NULL; ETimezoneDialog *tzdlg; GtkWidget *dialog; - char *second_location; + gchar *second_location; second_location = calendar_config_get_day_second_zone (); if (second_location && *second_location) @@ -1725,7 +1725,7 @@ calendar_config_select_day_second_zone (void) dialog = e_timezone_dialog_get_toplevel (tzdlg); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { - const char *location = NULL; + const gchar *location = NULL; zone = e_timezone_dialog_get_timezone (tzdlg); if (zone == icaltimezone_get_utc_timezone ()) { diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h index ff4e69d008..c4f264c230 100644 --- a/calendar/gui/calendar-config.h +++ b/calendar/gui/calendar-config.h @@ -69,8 +69,8 @@ void calendar_config_set_calendars_selected (GSList *selected); guint calendar_config_add_notification_calendars_selected (GConfClientNotifyFunc func, gpointer data); /* The primary calendar */ -char *calendar_config_get_primary_calendar (void); -void calendar_config_set_primary_calendar (const char *primary_uid); +gchar *calendar_config_get_primary_calendar (void); +void calendar_config_set_primary_calendar (const gchar *primary_uid); guint calendar_config_add_notification_primary_calendar (GConfClientNotifyFunc func, gpointer data); /* Use system timezone; if TRUE, then influences also the current timezone functions. */ @@ -79,8 +79,8 @@ void calendar_config_set_use_system_timezone (gboolean use); guint calendar_config_add_notification_use_system_timezone (GConfClientNotifyFunc func, gpointer data); /* The current timezone, e.g. "Europe/London". */ -gchar* calendar_config_get_timezone (void); -gchar* calendar_config_get_timezone_stored (void); +gchar * calendar_config_get_timezone (void); +gchar * calendar_config_get_timezone_stored (void); icaltimezone *calendar_config_get_icaltimezone (void); void calendar_config_set_timezone (const gchar *timezone); guint calendar_config_add_notification_timezone (GConfClientNotifyFunc func, gpointer data); @@ -142,7 +142,7 @@ void calendar_config_set_time_divisions (gint divisions); guint calendar_config_add_notification_time_divisions (GConfClientNotifyFunc func, gpointer data); /* Whether we show the Marcus Bains Line, and in what colors. */ -void calendar_config_get_marcus_bains (gboolean *show_line, const char **dayview_color, const char **timebar_color); +void calendar_config_get_marcus_bains (gboolean *show_line, const gchar **dayview_color, const gchar **timebar_color); void calendar_config_add_notification_marcus_bains (GConfClientNotifyFunc func, gpointer data, gint *not_show, gint *not_dcolor, gint *not_tcolor); /* Whether we show event end times. */ @@ -191,8 +191,8 @@ void calendar_config_set_tasks_selected (GSList *selected); guint calendar_config_add_notification_tasks_selected (GConfClientNotifyFunc func, gpointer data); /* The primary calendar */ -char *calendar_config_get_primary_tasks (void); -void calendar_config_set_primary_tasks (const char *primary_uid); +gchar *calendar_config_get_primary_tasks (void); +void calendar_config_set_primary_tasks (const gchar *primary_uid); guint calendar_config_add_notification_primary_tasks (GConfClientNotifyFunc func, gpointer data); /* The pane position */ @@ -206,8 +206,8 @@ void calendar_config_set_memos_selected (GSList *selected); guint calendar_config_add_notification_memos_selected (GConfClientNotifyFunc func, gpointer data); /* The primary calendar */ -char *calendar_config_get_primary_memos (void); -void calendar_config_set_primary_memos (const char *primary_uid); +gchar *calendar_config_get_primary_memos (void); +void calendar_config_set_primary_memos (const gchar *primary_uid); guint calendar_config_add_notification_primary_memos (GConfClientNotifyFunc func, gpointer data); /* Colors for the task list */ @@ -230,7 +230,7 @@ gint calendar_config_get_hide_completed_tasks_value(void); void calendar_config_set_hide_completed_tasks_value(gint value); guint calendar_config_add_notification_hide_completed_tasks_value (GConfClientNotifyFunc func, gpointer data); -char * calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed); +gchar * calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed); /* Confirmation options */ gboolean calendar_config_get_confirm_delete (void); @@ -243,8 +243,8 @@ void calendar_config_set_confirm_purge (gboolean confirm); gboolean calendar_config_get_use_default_reminder (void); void calendar_config_set_use_default_reminder (gboolean value); -int calendar_config_get_default_reminder_interval (void); -void calendar_config_set_default_reminder_interval (int interval); +gint calendar_config_get_default_reminder_interval (void); +void calendar_config_set_default_reminder_interval (gint interval); CalUnits calendar_config_get_default_reminder_units (void); void calendar_config_set_default_reminder_units (CalUnits units); @@ -262,19 +262,19 @@ guint calendar_config_add_notification_free_busy_template (GConfClientNotifyFunc supports 12-hour time format. */ gboolean calendar_config_locale_supports_12_hour_format(void); -void calendar_config_set_dir_path (const char *); -char * calendar_config_get_dir_path (void); +void calendar_config_set_dir_path (const gchar *); +gchar * calendar_config_get_dir_path (void); GSList *calendar_config_get_day_second_zones (void); void calendar_config_free_day_second_zones (GSList *zones); -void calendar_config_set_day_second_zone (const char *location); -char * calendar_config_get_day_second_zone (void); +void calendar_config_set_day_second_zone (const gchar *location); +gchar * calendar_config_get_day_second_zone (void); void calendar_config_select_day_second_zone (void); guint calendar_config_add_notification_day_second_zone (GConfClientNotifyFunc func, gpointer data); /* Birthdays & Anniversaries reminder settings */ -gboolean calendar_config_get_ba_reminder (int *interval, CalUnits *units); -void calendar_config_set_ba_reminder (gboolean *enabled, int *interval, CalUnits *units); +gboolean calendar_config_get_ba_reminder (gint *interval, CalUnits *units); +void calendar_config_set_ba_reminder (gboolean *enabled, gint *interval, CalUnits *units); /* Scroll in a month view by a week, not by a month */ gboolean calendar_config_get_month_scroll_by_week (void); diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c index 8d167f44de..95497b1782 100644 --- a/calendar/gui/calendar-view-factory.c +++ b/calendar/gui/calendar-view-factory.c @@ -43,9 +43,9 @@ struct _CalendarViewFactoryPrivate { static void calendar_view_factory_finalize (GObject *object); -static const char *calendar_view_factory_get_title (GalViewFactory *factory); -static const char *calendar_view_factory_get_type_code (GalViewFactory *factory); -static GalView *calendar_view_factory_new_view (GalViewFactory *factory, const char *name); +static const gchar *calendar_view_factory_get_title (GalViewFactory *factory); +static const gchar *calendar_view_factory_get_type_code (GalViewFactory *factory); +static GalView *calendar_view_factory_new_view (GalViewFactory *factory, const gchar *name); G_DEFINE_TYPE (CalendarViewFactory, calendar_view_factory, GAL_VIEW_FACTORY_TYPE) @@ -99,7 +99,7 @@ calendar_view_factory_finalize (GObject *object) /* get_title method for the calendar view factory */ -static const char * +static const gchar * calendar_view_factory_get_title (GalViewFactory *factory) { CalendarViewFactory *cal_view_factory; @@ -127,7 +127,7 @@ calendar_view_factory_get_title (GalViewFactory *factory) } /* get_type_code method for the calendar view factory */ -static const char * +static const gchar * calendar_view_factory_get_type_code (GalViewFactory *factory) { CalendarViewFactory *cal_view_factory; @@ -156,7 +156,7 @@ calendar_view_factory_get_type_code (GalViewFactory *factory) /* new_view method for the calendar view factory */ static GalView * -calendar_view_factory_new_view (GalViewFactory *factory, const char *name) +calendar_view_factory_new_view (GalViewFactory *factory, const gchar *name) { CalendarViewFactory *cal_view_factory; CalendarViewFactoryPrivate *priv; diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c index 5415affdf2..b316771ca1 100644 --- a/calendar/gui/calendar-view.c +++ b/calendar/gui/calendar-view.c @@ -36,18 +36,18 @@ struct _CalendarViewPrivate { GnomeCalendarViewType view_type; /* Title of the view */ - char *title; + gchar *title; }; static void calendar_view_finalize (GObject *object); -static void calendar_view_load (GalView *view, const char *filename); -static void calendar_view_save (GalView *view, const char *filename); -static const char *calendar_view_get_title (GalView *view); -static void calendar_view_set_title (GalView *view, const char *title); -static const char *calendar_view_get_type_code (GalView *view); +static void calendar_view_load (GalView *view, const gchar *filename); +static void calendar_view_save (GalView *view, const gchar *filename); +static const gchar *calendar_view_get_title (GalView *view); +static void calendar_view_set_title (GalView *view, const gchar *title); +static const gchar *calendar_view_get_type_code (GalView *view); static GalView *calendar_view_clone (GalView *view); G_DEFINE_TYPE (CalendarView, calendar_view, GAL_VIEW_TYPE) @@ -114,20 +114,20 @@ calendar_view_finalize (GObject *object) /* load method of the calendar view */ static void -calendar_view_load (GalView *view, const char *filename) +calendar_view_load (GalView *view, const gchar *filename) { /* nothing */ } /* save method of the calendar view */ static void -calendar_view_save (GalView *view, const char *filename) +calendar_view_save (GalView *view, const gchar *filename) { /* nothing */ } /* get_title method of the calendar view */ -static const char * +static const gchar * calendar_view_get_title (GalView *view) { CalendarView *cal_view; @@ -136,12 +136,12 @@ calendar_view_get_title (GalView *view) cal_view = CALENDAR_VIEW (view); priv = cal_view->priv; - return (const char *) priv->title; + return (const gchar *) priv->title; } /* set_title method of the calendar view */ static void -calendar_view_set_title (GalView *view, const char *title) +calendar_view_set_title (GalView *view, const gchar *title) { CalendarView *cal_view; CalendarViewPrivate *priv; @@ -156,7 +156,7 @@ calendar_view_set_title (GalView *view, const char *title) } /* get_type_code method for the calendar view */ -static const char * +static const gchar * calendar_view_get_type_code (GalView *view) { CalendarView *cal_view; @@ -219,7 +219,7 @@ calendar_view_clone (GalView *view) CalendarView * calendar_view_construct (CalendarView *cal_view, GnomeCalendarViewType view_type, - const char *title) + const gchar *title) { CalendarViewPrivate *priv; @@ -245,7 +245,7 @@ calendar_view_construct (CalendarView *cal_view, * Return value: A newly-created calendar view. **/ CalendarView * -calendar_view_new (GnomeCalendarViewType view_type, const char *title) +calendar_view_new (GnomeCalendarViewType view_type, const gchar *title) { CalendarView *cal_view; diff --git a/calendar/gui/calendar-view.h b/calendar/gui/calendar-view.h index 51e3235c34..a3c4a54012 100644 --- a/calendar/gui/calendar-view.h +++ b/calendar/gui/calendar-view.h @@ -57,10 +57,10 @@ GType calendar_view_get_type (void); CalendarView *calendar_view_construct (CalendarView *cal_view, GnomeCalendarViewType view_type, - const char *title); + const gchar *title); CalendarView *calendar_view_new (GnomeCalendarViewType view_type, - const char *title); + const gchar *title); GnomeCalendarViewType calendar_view_get_view_type (CalendarView *cal_view); diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c index b98f7170ed..a217254b18 100644 --- a/calendar/gui/comp-editor-factory.c +++ b/calendar/gui/comp-editor-factory.c @@ -56,7 +56,7 @@ typedef struct { union { struct { - char *uid; + gchar *uid; } existing; struct { @@ -71,13 +71,13 @@ typedef struct { CompEditorFactory *factory; /* Uri of the calendar, used as key in the clients hash table */ - char *uri; + gchar *uri; /* Client of the calendar */ ECal *client; /* Count editors using this client */ - int editor_count; + gint editor_count; /* Pending requests; they are pending if the client is still being opened */ GSList *pending; @@ -232,7 +232,7 @@ editor_destroy_cb (GtkObject *object, gpointer data) /* Starts editing an existing component on a client that is already open */ static void -edit_existing (OpenClient *oc, const char *uid) +edit_existing (OpenClient *oc, const gchar *uid) { ECalComponent *comp; icalcomponent *icalcomp; @@ -451,7 +451,7 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data) * open request. */ static OpenClient * -open_client (CompEditorFactory *factory, ECalSourceType source_type, const char *uristr) +open_client (CompEditorFactory *factory, ECalSourceType source_type, const gchar *uristr) { CompEditorFactoryPrivate *priv; ECal *client; @@ -495,7 +495,7 @@ open_client (CompEditorFactory *factory, ECalSourceType source_type, const char * NULL on failure; in the latter case it sets the ev exception. */ static OpenClient * -lookup_open_client (CompEditorFactory *factory, ECalSourceType source_type, const char *str_uri, CORBA_Environment *ev) +lookup_open_client (CompEditorFactory *factory, ECalSourceType source_type, const gchar *str_uri, CORBA_Environment *ev) { CompEditorFactoryPrivate *priv; OpenClient *oc; @@ -526,7 +526,7 @@ lookup_open_client (CompEditorFactory *factory, ECalSourceType source_type, cons /* Queues a request for editing an existing object */ static void -queue_edit_existing (OpenClient *oc, const char *uid) +queue_edit_existing (OpenClient *oc, const gchar *uid) { Request *request; diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c index 153dc089ec..49b43900d5 100644 --- a/calendar/gui/comp-util.c +++ b/calendar/gui/comp-util.c @@ -70,7 +70,7 @@ cal_comp_util_add_exdate (ECalComponent *comp, time_t t, icaltimezone *zone) /* Returns TRUE if the TZIDs are equivalent, i.e. both NULL or the same. */ static gboolean -e_cal_component_compare_tzid (const char *tzid1, const char *tzid2) +e_cal_component_compare_tzid (const gchar *tzid1, const gchar *tzid2) { gboolean retval = TRUE; @@ -103,10 +103,10 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp, icaltimezone *zone) { ECalComponentDateTime start_datetime, end_datetime; - const char *tzid; + const gchar *tzid; gboolean retval = FALSE; icaltimezone *start_zone, *end_zone; - int offset1, offset2; + gint offset1, offset2; tzid = icaltimezone_get_tzid (zone); @@ -211,8 +211,8 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp, gboolean cal_comp_is_on_server (ECalComponent *comp, ECal *client) { - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; icalcomponent *icalcomp; GError *error = NULL; @@ -287,7 +287,7 @@ cal_comp_event_new_with_defaults (ECal *client) { icalcomponent *icalcomp; ECalComponent *comp; - int interval; + gint interval; CalUnits units; ECalComponentAlarm *alarm; icalproperty *icalprop; @@ -446,11 +446,11 @@ cal_comp_util_get_n_icons (ECalComponent *comp) e_cal_component_get_categories_list (comp, &categories_list); for (elem = categories_list; elem; elem = elem->next) { - char *category; + gchar *category; GdkPixmap *pixmap = NULL; GdkBitmap *mask = NULL; - category = (char *) elem->data; + category = (gchar *) elem->data; if (e_categories_config_get_icon_for (category, &pixmap, &mask)) { num_icons++; g_object_unref (pixmap); @@ -488,7 +488,7 @@ cal_comp_selection_set_string_list (GtkSelectionData *data, GSList *str_list) const guint8 *c = p->data; if (c) - g_byte_array_append (array, c, strlen ((const char *) c) + 1); + g_byte_array_append (array, c, strlen ((const gchar *) c) + 1); } gtk_selection_data_set (data, data->target, 8, array->data, array->len); @@ -509,17 +509,17 @@ GSList * cal_comp_selection_get_string_list (GtkSelectionData *data) { /* format is "str1\0str2\0...strN\0" */ - char *inptr, *inend; + gchar *inptr, *inend; GSList *list; g_return_val_if_fail (data != NULL, NULL); list = NULL; - inptr = (char *)data->data; - inend = (char *)(data->data + data->length); + inptr = (gchar *)data->data; + inend = (gchar *)(data->data + data->length); while (inptr < inend) { - char *start = inptr; + gchar *start = inptr; while (inptr < inend && *inptr) inptr++; @@ -533,7 +533,7 @@ cal_comp_selection_get_string_list (GtkSelectionData *data) } static void -datetime_to_zone (ECal *client, ECalComponentDateTime *date, const char *tzid) +datetime_to_zone (ECal *client, ECalComponentDateTime *date, const gchar *tzid) { icaltimezone *from, *to; @@ -612,8 +612,8 @@ cal_comp_set_dtend_with_oldzone (ECal *client, ECalComponent *comp, const ECalCo static gboolean update_single_object (ECal *client, icalcomponent *icalcomp, gboolean fail_on_modify) { - const char *uid; - char *tmp; + const gchar *uid; + gchar *tmp; icalcomponent *tmp_icalcomp; gboolean res; @@ -688,10 +688,10 @@ update_objects (ECal *client, icalcomponent *icalcomp) * @return Whether was the operation successful. **/ gboolean -cal_comp_process_source_list_drop (ECal *destination, icalcomponent *comp, GdkDragAction action, const char *source_uid, ESourceList *source_list) +cal_comp_process_source_list_drop (ECal *destination, icalcomponent *comp, GdkDragAction action, const gchar *source_uid, ESourceList *source_list) { - const char * uid; - char *old_uid = NULL; + const gchar * uid; + gchar *old_uid = NULL; icalcomponent *tmp_icalcomp = NULL; GError *error = NULL; gboolean success = FALSE; @@ -703,7 +703,7 @@ cal_comp_process_source_list_drop (ECal *destination, icalcomponent *comp, GdkDr /* FIXME deal with GDK_ACTION_ASK */ if (action == GDK_ACTION_COPY) { - char *tmp; + gchar *tmp; old_uid = g_strdup (icalcomponent_get_uid (comp)); tmp = e_cal_component_gen_uid (); @@ -804,7 +804,7 @@ comp_util_sanitize_recurrence_master (ECalComponent *comp, ECal *client) icalcomponent *icalcomp = NULL; ECalComponentRange rid; ECalComponentDateTime sdt; - const char *uid; + const gchar *uid; /* Get the master component */ e_cal_component_get_uid (comp, &uid); @@ -822,7 +822,7 @@ comp_util_sanitize_recurrence_master (ECalComponent *comp, ECal *client) if (rid.datetime.value && sdt.value && icaltime_compare_date_only (*rid.datetime.value, *sdt.value) == 0) { ECalComponentDateTime msdt, medt, edt; - int *sequence; + gint *sequence; e_cal_component_get_dtstart (master, &msdt); e_cal_component_get_dtend (master, &medt); diff --git a/calendar/gui/comp-util.h b/calendar/gui/comp-util.h index 3faf9f49a8..f6090543a5 100644 --- a/calendar/gui/comp-util.h +++ b/calendar/gui/comp-util.h @@ -57,7 +57,7 @@ GSList *cal_comp_selection_get_string_list (GtkSelectionData *data); void cal_comp_set_dtstart_with_oldzone (ECal *client, ECalComponent *comp, const ECalComponentDateTime *pdate); void cal_comp_set_dtend_with_oldzone (ECal *client, ECalComponent *comp, const ECalComponentDateTime *pdate); -gboolean cal_comp_process_source_list_drop (ECal *destination, icalcomponent *comp, GdkDragAction action, const char *source_uid, ESourceList *source_list); +gboolean cal_comp_process_source_list_drop (ECal *destination, icalcomponent *comp, GdkDragAction action, const gchar *source_uid, ESourceList *source_list); void comp_util_sanitize_recurrence_master (ECalComponent *comp, ECal *client); #endif diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 73bfde30cc..ca8a58d528 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -86,7 +86,7 @@ typedef struct { GtkWidget *aalarm_file_chooser; /* Mail alarm widgets */ - const char *email; + const gchar *email; GtkWidget *malarm_group; GtkWidget *malarm_address_group; GtkWidget *malarm_addresses; @@ -103,7 +103,7 @@ typedef struct { ENameSelector *name_selector; } Dialog; -static const char *section_name = "Send To"; +static const gchar *section_name = "Send To"; /* "relative" types */ enum { @@ -119,7 +119,7 @@ enum { }; /* Combo box maps */ -static const int action_map[] = { +static const gint action_map[] = { E_CAL_COMPONENT_ALARM_DISPLAY, E_CAL_COMPONENT_ALARM_AUDIO, E_CAL_COMPONENT_ALARM_PROCEDURE, @@ -127,27 +127,27 @@ static const int action_map[] = { -1 }; -static const char *action_map_cap[] = { +static const gchar *action_map_cap[] = { CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS, CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS, CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS }; -static const int value_map[] = { +static const gint value_map[] = { MINUTES, HOURS, DAYS, -1 }; -static const int relative_map[] = { +static const gint relative_map[] = { BEFORE, AFTER, -1 }; -static const int time_map[] = { +static const gint time_map[] = { E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END, -1 @@ -159,7 +159,7 @@ enum duration_units { DUR_DAYS }; -static const int duration_units_map[] = { +static const gint duration_units_map[] = { DUR_MINUTES, DUR_HOURS, DUR_DAYS, @@ -197,8 +197,8 @@ alarm_to_dialog (Dialog *dialog) gboolean valid; gboolean repeat; ECalComponentAlarmAction action; - char *email; - int i; + gchar *email; + gint i; /* Clean the page */ clear_widgets (dialog); @@ -314,7 +314,7 @@ repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) static void aalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) { - char *url; + gchar *url; icalattach *attach; if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->aalarm_sound))) @@ -333,7 +333,7 @@ aalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) static void alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) { - const char *url; + const gchar *url; icalattach *attach; e_cal_component_alarm_get_attach (alarm, (&attach)); @@ -368,7 +368,7 @@ alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) static void dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) { - char *str; + gchar *str; ECalComponentText description; GtkTextBuffer *text_buffer; GtkTextIter text_iter_start, text_iter_end; @@ -394,7 +394,7 @@ dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) icalcomp = e_cal_component_alarm_get_icalcomponent (alarm); icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); while (icalprop) { - const char *x_name; + const gchar *x_name; x_name = icalproperty_get_x_name (icalprop); if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) { @@ -410,7 +410,7 @@ dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) static void malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) { - char *str; + gchar *str; ECalComponentText description; GSList *attendee_list = NULL; GtkTextBuffer *text_buffer; @@ -468,7 +468,7 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) icalcomp = e_cal_component_alarm_get_icalcomponent (alarm); icalprop = icalcomponent_get_first_property(icalcomp, ICAL_X_PROPERTY); while (icalprop) { - const char *x_name; + const gchar *x_name; x_name = icalproperty_get_x_name (icalprop); if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) { @@ -489,7 +489,7 @@ alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) ECalComponentText description; GtkTextBuffer *text_buffer; GSList *attendee_list, *l; - int len; + gint len; /* Attendees */ name_selector_model = e_name_selector_peek_model (dialog->name_selector); @@ -531,7 +531,7 @@ static void alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) { ECalComponentText description; - const char *url; + const gchar *url; icalattach *attach; e_cal_component_alarm_get_attach (alarm, (&attach)); @@ -551,9 +551,9 @@ alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) static void palarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) { - char *program; + gchar *program; icalattach *attach; - char *str; + gchar *str; ECalComponentText description; icalcomponent *icalcomp; icalproperty *icalprop; @@ -579,7 +579,7 @@ palarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) icalcomp = e_cal_component_alarm_get_icalcomponent (alarm); icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); while (icalprop) { - const char *x_name; + const gchar *x_name; x_name = icalproperty_get_x_name (icalprop); if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) { @@ -792,7 +792,7 @@ get_widgets (Dialog *dialog) #undef GW if (dialog->action_combo) { - const char *actions[] = { + const gchar *actions[] = { N_("Pop up an alert"), N_("Play a sound"), N_("Run a program"), @@ -865,7 +865,7 @@ static void show_options (Dialog *dialog) { gboolean repeat; - char *email; + gchar *email; e_cal_component_alarm_set_action (dialog->alarm, e_dialog_combo_box_get (dialog->action_combo, action_map)); @@ -943,7 +943,7 @@ repeat_toggle_toggled_cb (GtkToggleButton *toggle, gpointer data) static void check_custom_sound (Dialog *dialog) { - char *str, *dir; + gchar *str, *dir; gboolean sens; str = gtk_file_chooser_get_filename ( @@ -985,7 +985,7 @@ aalarm_attach_changed_cb (GtkWidget *widget, gpointer data) static void check_custom_message (Dialog *dialog) { - char *str; + gchar *str; GtkTextBuffer *text_buffer; GtkTextIter text_iter_start, text_iter_end; gboolean sens; @@ -1024,7 +1024,7 @@ dalarm_description_changed_cb (GtkWidget *widget, gpointer data) static void check_custom_program (Dialog *dialog) { - char *str; + gchar *str; gboolean sens; str = e_dialog_editable_get (dialog->palarm_program); @@ -1044,7 +1044,7 @@ palarm_program_changed_cb (GtkWidget *widget, gpointer data) static void check_custom_email (Dialog *dialog) { - char *str; + gchar *str; GtkTextBuffer *text_buffer; GtkTextIter text_iter_start, text_iter_end; ENameSelectorModel *name_selector_model; @@ -1100,9 +1100,9 @@ static void action_changed_cb (GtkWidget *action_combo, gpointer data) { Dialog *dialog = data; - char *dir; + gchar *dir; ECalComponentAlarmAction action; - int page = 0, i; + gint page = 0, i; action = e_dialog_combo_box_get (dialog->action_combo, action_map); for (i = 0; action_map[i] != -1 ; i++) { @@ -1188,8 +1188,8 @@ gboolean alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm) { Dialog dialog; - int response_id; - char *gladefile; + gint response_id; + gchar *gladefile; g_return_val_if_fail (alarm != NULL, FALSE); diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c index 8520b3727b..882f3fd0cc 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.c +++ b/calendar/gui/dialogs/alarm-list-dialog.c @@ -263,8 +263,8 @@ gboolean alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store) { Dialog dialog; - int response_id; - char *gladefile; + gint response_id; + gchar *gladefile; dialog.ecal = ecal; dialog.list_store = list_store; @@ -312,7 +312,7 @@ GtkWidget * alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store) { Dialog *dialog; - char *gladefile; + gchar *gladefile; dialog = (Dialog *)g_new (Dialog, 1); dialog->ecal = ecal; diff --git a/calendar/gui/dialogs/cal-attachment-select-file.c b/calendar/gui/dialogs/cal-attachment-select-file.c index 9c502153d3..b33753c42e 100644 --- a/calendar/gui/dialogs/cal-attachment-select-file.c +++ b/calendar/gui/dialogs/cal-attachment-select-file.c @@ -42,11 +42,11 @@ enum { }; static GtkWidget* -run_selector(CompEditor *editor, const char *title, guint32 flags, gboolean *showinline_p) +run_selector(CompEditor *editor, const gchar *title, guint32 flags, gboolean *showinline_p) { GtkWidget *selection; GtkWidget *showinline = NULL; - char *path; + gchar *path; path = g_object_get_data ((GObject *) editor, "attach_path"); @@ -117,12 +117,12 @@ run_selector(CompEditor *editor, const char *title, guint32 flags, gboolean *sho * Return value: the selected filename, or %NULL if the user * cancelled. **/ -char * -comp_editor_select_file (CompEditor *editor, const char *title, gboolean save_mode) +gchar * +comp_editor_select_file (CompEditor *editor, const gchar *title, gboolean save_mode) { guint32 flags = save_mode ? SELECTOR_MODE_SAVE : SELECTOR_MODE_MULTI; GtkWidget *selection; - char *name = NULL; + gchar *name = NULL; selection = run_selector (editor, title, flags, NULL); if (selection) { diff --git a/calendar/gui/dialogs/cal-attachment-select-file.h b/calendar/gui/dialogs/cal-attachment-select-file.h index 0f965e6c9b..b69a741007 100644 --- a/calendar/gui/dialogs/cal-attachment-select-file.h +++ b/calendar/gui/dialogs/cal-attachment-select-file.h @@ -26,8 +26,8 @@ #include "comp-editor.h" -char *comp_editor_select_file (CompEditor *editor, - const char *title, +gchar *comp_editor_select_file (CompEditor *editor, + const gchar *title, gboolean save_mode); GPtrArray *comp_editor_select_file_attachments (CompEditor *editor, diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index f00adc0f0d..ce6f607b5f 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -36,21 +36,21 @@ #include <glib/gi18n.h> #include <string.h> -static const int week_start_day_map[] = { +static const gint week_start_day_map[] = { 1, 2, 3, 4, 5, 6, 0, -1 }; -static const int time_division_map[] = { +static const gint time_division_map[] = { 60, 30, 15, 10, 5, -1 }; /* The following two are kept separate in case we need to re-order each menu individually */ -static const int hide_completed_units_map[] = { +static const gint hide_completed_units_map[] = { CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1 }; /* same is used for Birthdays & Anniversaries calendar */ -static const int default_reminder_units_map[] = { +static const gint default_reminder_units_map[] = { CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1 }; @@ -92,7 +92,7 @@ calendar_prefs_dialog_init (CalendarPrefsDialog *dialog) } static GtkWidget * -eccp_widget_glade (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, void *data) +eccp_widget_glade (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { CalendarPrefsDialog *prefs = data; @@ -104,7 +104,7 @@ working_days_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) { CalWeekdays working_days = 0; guint32 mask = 1; - int day; + gint day; for (day = 0; day < 7; day++) { if (e_dialog_toggle_get (prefs->working_days[day])) @@ -128,8 +128,8 @@ timezone_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) static void update_day_second_zone_caption (CalendarPrefsDialog *prefs) { - char *location; - const char *caption; + gchar *location; + const gchar *caption; icaltimezone *zone; g_return_if_fail (prefs != NULL); @@ -172,7 +172,7 @@ day_second_zone_clicked (GtkWidget *widget, CalendarPrefsDialog *prefs) { GtkWidget *menu, *item; GSList *group = NULL, *recent_zones, *s; - char *location; + gchar *location; icaltimezone *zone, *second_zone = NULL; menu = gtk_menu_new (); @@ -223,7 +223,7 @@ day_second_zone_clicked (GtkWidget *widget, CalendarPrefsDialog *prefs) static void start_of_day_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) { - int start_hour, start_minute, end_hour, end_minute; + gint start_hour, start_minute, end_hour, end_minute; EDateEdit *start, *end; start = E_DATE_EDIT (prefs->start_of_day); @@ -248,7 +248,7 @@ start_of_day_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) static void end_of_day_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) { - int start_hour, start_minute, end_hour, end_minute; + gint start_hour, start_minute, end_hour, end_minute; EDateEdit *start, *end; start = E_DATE_EDIT (prefs->start_of_day); @@ -272,7 +272,7 @@ end_of_day_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) static void week_start_day_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) { - int week_start_day; + gint week_start_day; week_start_day = e_dialog_combo_box_get (prefs->week_start_day, week_start_day_map); calendar_config_set_week_start_day (week_start_day); @@ -294,7 +294,7 @@ use_24_hour_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) static void time_divisions_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) { - int time_divisions; + gint time_divisions; time_divisions = e_dialog_combo_box_get (prefs->time_divisions, time_division_map); calendar_config_set_time_divisions (time_divisions); @@ -417,7 +417,7 @@ static void ba_reminder_interval_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) { const gchar *str; - int value; + gint value; str = gtk_entry_get_text (GTK_ENTRY (widget)); value = (int) g_ascii_strtod (str, NULL); @@ -492,7 +492,7 @@ update_system_tz_widgets (CalendarPrefsDialog *prefs) zone = e_cal_util_get_system_timezone (); if (zone) { - char *tmp = g_strdup_printf ("(%s)", icaltimezone_get_display_name (zone)); + gchar *tmp = g_strdup_printf ("(%s)", icaltimezone_get_display_name (zone)); gtk_label_set_text (GTK_LABEL (prefs->system_tz_label), tmp); g_free (tmp); } else { @@ -512,7 +512,7 @@ use_system_tz_changed (GtkWidget *check, CalendarPrefsDialog *prefs) static void setup_changes (CalendarPrefsDialog *prefs) { - int i; + gint i; for (i = 0; i < 7; i ++) g_signal_connect (G_OBJECT (prefs->working_days[i]), "toggled", G_CALLBACK (working_days_changed), prefs); @@ -617,7 +617,7 @@ initialize_selection (ESourceSelector *selector, ESourceList *source_list) GSList *sources; for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) { ESource *source = E_SOURCE (sources->data); - const char *completion = e_source_get_property (source, "alarm"); + const gchar *completion = e_source_get_property (source, "alarm"); if (!completion || !g_ascii_strcasecmp (completion, "true")) { if (!completion) e_source_set_property (E_SOURCE (source), "alarm", "true"); @@ -648,9 +648,9 @@ show_config (CalendarPrefsDialog *prefs) gint mask, day, week_start_day, time_divisions; icaltimezone *zone; gboolean sensitive, set = FALSE; - char *location; + gchar *location; CalUnits units; - int interval; + gint interval; /* Use system timezone */ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs->use_system_tz_check), calendar_config_get_use_system_timezone ()); @@ -753,7 +753,7 @@ static ECalConfigItem eccp_items[] = { }; static void -eccp_free (EConfig *ec, GSList *items, void *data) +eccp_free (EConfig *ec, GSList *items, gpointer data) { g_slist_free (items); } @@ -764,10 +764,10 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs) GladeXML *gui; ECalConfig *ec; ECalConfigTargetPrefs *target; - int i; + gint i; GtkWidget *toplevel; GSList *l; - const char *working_day_names[] = { + const gchar *working_day_names[] = { "sun_button", "mon_button", "tue_button", @@ -776,7 +776,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs) "fri_button", "sat_button", }; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "cal-prefs-dialog.glade", diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 95820b8247..32fbc9bd68 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -58,11 +58,11 @@ struct _CalendarSourceDialog { }; static gboolean -eccp_check_complete (EConfig *ec, const char *pageid, void *data) +eccp_check_complete (EConfig *ec, const gchar *pageid, gpointer data) { CalendarSourceDialog *sdialog = data; gboolean valid = TRUE; - const char *tmp; + const gchar *tmp; ESource *source; tmp = e_source_peek_name (sdialog->source); @@ -72,7 +72,7 @@ eccp_check_complete (EConfig *ec, const char *pageid, void *data) } static void -eccp_commit (EConfig *ec, GSList *items, void *data) +eccp_commit (EConfig *ec, GSList *items, gpointer data) { CalendarSourceDialog *sdialog = data; xmlNodePtr xml; @@ -80,7 +80,7 @@ eccp_commit (EConfig *ec, GSList *items, void *data) if (sdialog->original_source) { const gchar *color_spec; - xml = xmlNewNode (NULL, (const unsigned char *)"dummy"); + xml = xmlNewNode (NULL, (const guchar *)"dummy"); e_source_dump_to_xml_node (sdialog->source, xml); e_source_update_from_xml_node (sdialog->original_source, xml->children, NULL); xmlFreeNode (xml); @@ -95,7 +95,7 @@ eccp_commit (EConfig *ec, GSList *items, void *data) } static void -eccp_free (EConfig *ec, GSList *items, void *data) +eccp_free (EConfig *ec, GSList *items, gpointer data) { CalendarSourceDialog *sdialog = data; @@ -113,7 +113,7 @@ eccp_free (EConfig *ec, GSList *items, void *data) static void eccp_type_changed (GtkComboBox *dropdown, CalendarSourceDialog *sdialog) { - int id = gtk_combo_box_get_active (dropdown); + gint id = gtk_combo_box_get_active (dropdown); GtkTreeModel *model; GtkTreeIter iter; @@ -134,15 +134,15 @@ eccp_type_changed (GtkComboBox *dropdown, CalendarSourceDialog *sdialog) } static GtkWidget * -eccp_get_source_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, void *data) +eccp_get_source_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { static GtkWidget *label, *type; - int row; + gint row; CalendarSourceDialog *sdialog = data; ECalConfigTargetSource *t = (ECalConfigTargetSource *) ec->target; ESource *source = t->source; ESourceGroup *group = e_source_peek_group (source); - char *markup; + gchar *markup; if (old) gtk_widget_destroy (label); @@ -164,7 +164,7 @@ eccp_get_source_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidg GtkListStore *store; GtkTreeIter iter; GSList *l; - int active = 0, i = 0; + gint active = 0, i = 0; label = gtk_label_new_with_mnemonic(_("_Type:")); @@ -211,10 +211,10 @@ name_changed (GtkEntry *entry, ECalConfigTargetSource *t) } static GtkWidget * -eccp_get_source_name (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eccp_get_source_name (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { static GtkWidget *label, *entry; - int row; + gint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) ec->target; ESource *source = t->source; @@ -252,13 +252,13 @@ offline_status_changed_cb (GtkWidget *widget, CalendarSourceDialog *sdialog) } static GtkWidget * -eccp_general_offline (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eccp_general_offline (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { CalendarSourceDialog *sdialog = data; GtkWidget *offline_setting = NULL; - const char *offline_sync; - int row; - const char *base_uri = e_source_group_peek_base_uri (sdialog->source_group); + const gchar *offline_sync; + gint row; + const gchar *base_uri = e_source_group_peek_base_uri (sdialog->source_group); gboolean is_local = base_uri && (g_str_has_prefix (base_uri, "file://") || g_str_has_prefix (base_uri, "contacts://")); offline_sync = e_source_get_property (sdialog->source, "offline_sync"); if (old) @@ -318,7 +318,7 @@ choose_initial_color (void) } static GtkWidget * -eccp_get_source_color (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +eccp_get_source_color (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { CalendarSourceDialog *sdialog = data; static GtkWidget *label, *color_button; @@ -434,9 +434,9 @@ void calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source, ESourceGroup *group) { CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1); - char *xml; + gchar *xml; ECalConfig *ec; - int i; + gint i; GSList *items = NULL; ECalConfigTargetSource *target; @@ -491,9 +491,9 @@ void calendar_setup_edit_task_list (struct _GtkWindow *parent, ESource *source) { CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1); - char *xml; + gchar *xml; ECalConfig *ec; - int i; + gint i; GSList *items = NULL; ECalConfigTargetSource *target; @@ -547,9 +547,9 @@ void calendar_setup_edit_memo_list (struct _GtkWindow *parent, ESource *source) { CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1); - char *xml; + gchar *xml; ECalConfig *ec; - int i; + gint i; GSList *items = NULL; ECalConfigTargetSource *target; diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c index cddd4f8d8d..cdb388e7b9 100644 --- a/calendar/gui/dialogs/cancel-comp.c +++ b/calendar/gui/dialogs/cancel-comp.c @@ -67,7 +67,7 @@ gboolean cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean deleting) { ECalComponentVType vtype; - const char *id; + const gchar *id; if (deleting && e_cal_get_save_schedules (client)) return TRUE; diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c index d1abc1724d..5fb0240037 100644 --- a/calendar/gui/dialogs/changed-comp.c +++ b/calendar/gui/dialogs/changed-comp.c @@ -48,7 +48,7 @@ changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean delet { GtkWidget *dialog; ECalComponentVType vtype; - char *str; + gchar *str; gint response; vtype = e_cal_component_get_vtype (comp); diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c index 93b9cd9304..2281e5d0fc 100644 --- a/calendar/gui/dialogs/comp-editor-page.c +++ b/calendar/gui/dialogs/comp-editor-page.c @@ -432,7 +432,7 @@ comp_editor_page_notify_dates_changed (CompEditorPage *page, */ void comp_editor_page_display_validation_error (CompEditorPage *page, - const char *msg, + const gchar *msg, GtkWidget *field) { GtkWidget *dialog; diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h index 819ea74ccc..a58da9b804 100644 --- a/calendar/gui/dialogs/comp-editor-page.h +++ b/calendar/gui/dialogs/comp-editor-page.h @@ -82,7 +82,7 @@ struct _CompEditorPageClass { /* Notification signals */ - void (* dates_changed) (CompEditorPage *page, const char *dates); + void (* dates_changed) (CompEditorPage *page, const gchar *dates); /* Virtual methods */ @@ -119,7 +119,7 @@ void comp_editor_page_notify_dates_changed CompEditorPageDates *dates); void comp_editor_page_display_validation_error (CompEditorPage *page, - const char *msg, + const gchar *msg, GtkWidget *field); G_END_DECLS diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index 4666058b51..e9661db372 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -121,7 +121,7 @@ write_label_piece (struct icaltimetype *tt, { struct tm tmp_tm = { 0 }; struct icaltimetype tt_copy = *tt; - int len; + gint len; /* FIXME: May want to convert the time to an appropriate zone. */ @@ -166,7 +166,7 @@ write_label_piece (struct icaltimetype *tt, void comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label) { - char buffer[1024]; + gchar buffer[1024]; gboolean start_set = FALSE, end_set = FALSE; gboolean complete_set = FALSE, due_set = FALSE; @@ -290,13 +290,13 @@ comp_editor_get_current_time (GtkObject *object, gpointer data) * Return value: The category names stripped of surrounding whitespace * and separated with commas. **/ -char * -comp_editor_strip_categories (const char *categories) +gchar * +comp_editor_strip_categories (const gchar *categories) { - char *new_categories; - const char *start, *end; - const char *p; - char *new_p; + gchar *new_categories; + const gchar *start, *end; + const gchar *p; + gchar *new_p; if (!categories) return NULL; @@ -314,7 +314,7 @@ comp_editor_strip_categories (const char *categories) if (g_unichar_isspace (c)) continue; else if (c == ',') { - int len; + gint len; if (!start) continue; @@ -337,7 +337,7 @@ comp_editor_strip_categories (const char *categories) } if (start) { - int len; + gint len; g_return_val_if_fail (start <= end, NULL); diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h index 5516fe4cc4..3bf8921291 100644 --- a/calendar/gui/dialogs/comp-editor-util.h +++ b/calendar/gui/dialogs/comp-editor-util.h @@ -39,6 +39,6 @@ GtkWidget *comp_editor_new_date_edit (gboolean show_date, gboolean show_time, struct tm comp_editor_get_current_time (GtkObject *object, gpointer data); -char *comp_editor_strip_categories (const char *categories); +gchar *comp_editor_strip_categories (const gchar *categories); #endif diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index cd2dac7a9e..9fe0b3f1ca 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -198,10 +198,10 @@ get_attachment_list (CompEditor *editor) GtkTreeModel *model; GtkTreeIter iter; GSList *list = NULL; - const char *comp_uid = NULL; - const char *local_store = e_cal_get_local_attachment_store (editor->priv->client); + const gchar *comp_uid = NULL; + const gchar *local_store = e_cal_get_local_attachment_store (editor->priv->client); gboolean valid; - int ticker=0; + gint ticker=0; e_cal_component_get_uid (editor->priv->comp, &comp_uid); @@ -216,9 +216,9 @@ get_attachment_list (CompEditor *editor) CamelDataWrapper *wrapper; CamelMimePart *mime_part; CamelStream *stream; - char *attach_file_url; - char *safe_fname, *utf8_safe_fname; - char *filename; + gchar *attach_file_url; + gchar *safe_fname, *utf8_safe_fname; + gchar *filename; gint column_id; column_id = E_ATTACHMENT_STORE_COLUMN_ATTACHMENT; @@ -244,7 +244,7 @@ get_attachment_list (CompEditor *editor) if (!utf8_safe_fname) safe_fname = g_strdup_printf ("%s-%d", _("attachment"), ticker++); else { - safe_fname = g_filename_from_utf8 ((const char *) utf8_safe_fname, -1, NULL, NULL, NULL); + safe_fname = g_filename_from_utf8 ((const gchar *) utf8_safe_fname, -1, NULL, NULL, NULL); g_free (utf8_safe_fname); } filename = g_strdup_printf ("%s-%s", comp_uid, safe_fname); @@ -298,7 +298,7 @@ static void listen_for_changes (CompEditor *editor) { CompEditorPrivate *priv; - const char *uid = NULL; + const gchar *uid = NULL; priv = editor->priv; @@ -318,7 +318,7 @@ listen_for_changes (CompEditor *editor) e_cal_component_get_uid (priv->comp, &uid); if (uid) { - char *query; + gchar *query; query = g_strdup_printf ("(uid? \"%s\")", uid); e_cal_get_query (priv->source_client, query, &priv->view, NULL); @@ -356,7 +356,7 @@ save_comp (CompEditor *editor) gboolean result; GError *error = NULL; GHashTable *timezones; - const char *orig_uid; + const gchar *orig_uid; icalcomponent *icalcomp; priv = editor->priv; @@ -449,7 +449,7 @@ save_comp (CompEditor *editor) icalproperty *icalprop; icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); while (icalprop) { - const char *x_name; + const gchar *x_name; x_name = icalproperty_get_x_name (icalprop); if (!strcmp (x_name, "X-EVOLUTION-OPTIONS-DELAY")) { @@ -817,7 +817,7 @@ action_save_cb (GtkAction *action, delegate = flags & COMP_EDITOR_DELEGATE; if (delegate && !remove_event_dialog (priv->client, priv->comp, GTK_WINDOW (editor))) { - const char *uid = NULL; + const gchar *uid = NULL; GError *error = NULL; e_cal_component_get_uid (priv->comp, &uid); @@ -2078,7 +2078,7 @@ page_unmapped_cb (GtkWidget *page_widget, void comp_editor_append_page (CompEditor *editor, CompEditorPage *page, - const char *label, + const gchar *label, gboolean add) { CompEditorPrivate *priv; @@ -2339,7 +2339,7 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp) /* TODO These functions should be available in e-cal-component.c */ static void -set_attendees_for_delegation (ECalComponent *comp, const char *address, ECalComponentItipMethod method) +set_attendees_for_delegation (ECalComponent *comp, const gchar *address, ECalComponentItipMethod method) { icalproperty *prop; icalparameter *param; @@ -2350,8 +2350,8 @@ set_attendees_for_delegation (ECalComponent *comp, const char *address, ECalComp for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY); prop; prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) { - const char *attendee = icalproperty_get_attendee (prop); - const char *delfrom = NULL; + const gchar *attendee = icalproperty_get_attendee (prop); + const gchar *delfrom = NULL; param = icalproperty_get_first_parameter(prop, ICAL_DELEGATEDFROM_PARAMETER); if (param) @@ -2371,8 +2371,8 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users) { icalcomponent *icalcomp; icalproperty *icalprop; - const char *attendees = NULL; - char **emails, **iter; + const gchar *attendees = NULL; + gchar **emails, **iter; icalcomp = e_cal_component_get_icalcomponent (comp); @@ -2402,7 +2402,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str CompEditorPrivate *priv; CompEditorFlags flags; ECalComponent *send_comp = NULL; - char *address = NULL; + gchar *address = NULL; GList *users = NULL; g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE); @@ -2413,7 +2413,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str if (priv->mod == CALOBJ_MOD_ALL && e_cal_component_is_instance (priv->comp)) { /* Ensure we send the master object, not the instance only */ icalcomponent *icalcomp = NULL; - const char *uid = NULL; + const gchar *uid = NULL; e_cal_component_get_uid (priv->comp, &uid); if (e_cal_get_object (priv->client, uid, NULL, &icalcomp, NULL) && icalcomp) { @@ -2449,7 +2449,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str } } else { /* Clone the component with attachments set to CID:... */ - int num_attachments, i; + gint num_attachments, i; GSList *attach_list = NULL; GSList *mime_attach_list; @@ -2567,7 +2567,7 @@ void comp_editor_delete_comp (CompEditor *editor) { CompEditorPrivate *priv; - const char *uid; + const gchar *uid; g_return_if_fail (IS_COMP_EDITOR (editor)); @@ -2647,8 +2647,8 @@ comp_editor_get_mime_attach_list (CompEditor *editor) CamelDataWrapper *wrapper; CamelMimePart *mime_part; CamelStreamMem *mstream; - unsigned char *buffer = NULL; - const char *desc, *disp; + guchar *buffer = NULL; + const gchar *desc, *disp; gint column_id; column_id = E_ATTACHMENT_STORE_COLUMN_ATTACHMENT; @@ -2668,7 +2668,7 @@ comp_editor_get_mime_attach_list (CompEditor *editor) camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream); buffer = g_memdup (mstream->buffer->data, mstream->buffer->len); - cal_mime_attach->encoded_data = (char *)buffer; + cal_mime_attach->encoded_data = (gchar *)buffer; cal_mime_attach->length = mstream->buffer->len; cal_mime_attach->filename = g_strdup (camel_mime_part_get_filename (mime_part)); desc = camel_mime_part_get_description (mime_part); diff --git a/calendar/gui/dialogs/copy-source-dialog.c b/calendar/gui/dialogs/copy-source-dialog.c index 92444678be..49cf8b3ce4 100644 --- a/calendar/gui/dialogs/copy-source-dialog.c +++ b/calendar/gui/dialogs/copy-source-dialog.c @@ -38,7 +38,7 @@ typedef struct { } CopySourceDialogData; static void -show_error (GtkWindow *parent, const char *msg) +show_error (GtkWindow *parent, const gchar *msg) { GtkWidget *dialog; @@ -82,7 +82,7 @@ copy_source (CopySourceDialogData *csdd) } else { if (e_cal_get_object_list (source_client, "#t", &obj_list, NULL)) { GList *l; - const char *uid; + const gchar *uid; icalcomponent *icalcomp; for (l = obj_list; l != NULL; l = l->next) { @@ -93,7 +93,7 @@ copy_source (CopySourceDialogData *csdd) e_cal_modify_object (dest_client, l->data, CALOBJ_MOD_ALL, NULL); icalcomponent_free (icalcomp); } else { - e_cal_create_object (dest_client, l->data, (char **) &uid, NULL); + e_cal_create_object (dest_client, l->data, (gchar **) &uid, NULL); g_free ((gpointer) uid); } } diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index ae371aabb2..1a004272d1 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -58,12 +58,12 @@ gboolean delete_component_dialog (ECalComponent *comp, gboolean consider_as_untitled, - int n_comps, ECalComponentVType vtype, + gint n_comps, ECalComponentVType vtype, GtkWidget *widget) { - const char *id; - char *arg0 = NULL; - int response; + const gchar *id; + gchar *arg0 = NULL; + gint response; if (comp) { g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE); @@ -167,9 +167,9 @@ cb_toggled_cb (GtkWidget *toggle, gpointer data) } gboolean -prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent, gboolean *retract) +prompt_retract_dialog (ECalComponent *comp, gchar **retract_text, GtkWidget *parent, gboolean *retract) { - char *message = NULL; + gchar *message = NULL; ECalComponentVType type = E_CAL_COMPONENT_NO_TYPE; GtkMessageDialog *dialog = NULL; GtkWidget *cb, *label, *entry, *vbox, *sw, *frame; diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h index c619e28b98..9123dcc479 100644 --- a/calendar/gui/dialogs/delete-comp.h +++ b/calendar/gui/dialogs/delete-comp.h @@ -31,8 +31,8 @@ gboolean delete_component_dialog (ECalComponent *comp, gboolean consider_as_untitled, - int n_comps, ECalComponentVType vtype, + gint n_comps, ECalComponentVType vtype, GtkWidget *widget); -gboolean prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent, gboolean *retract); +gboolean prompt_retract_dialog (ECalComponent *comp, gchar **retract_text, GtkWidget *parent, gboolean *retract); #endif diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c index f8df587aa4..c312e16ada 100644 --- a/calendar/gui/dialogs/delete-error.c +++ b/calendar/gui/dialogs/delete-error.c @@ -42,7 +42,7 @@ void delete_error_dialog (GError *error, ECalComponentVType vtype) { GtkWidget *dialog; - const char *str; + const gchar *str; const gchar *icon_name = NULL; if (!error) diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c index 8e060832df..87fb164e6a 100644 --- a/calendar/gui/dialogs/e-delegate-dialog.c +++ b/calendar/gui/dialogs/e-delegate-dialog.c @@ -36,8 +36,8 @@ #include "e-delegate-dialog.h" struct _EDelegateDialogPrivate { - char *name; - char *address; + gchar *name; + gchar *address; /* Glade XML data */ GladeXML *xml; @@ -51,7 +51,7 @@ struct _EDelegateDialogPrivate { GtkWidget *entry; }; -static const char *section_name = "Delegate To"; +static const gchar *section_name = "Delegate To"; static void e_delegate_dialog_finalize (GObject *object); @@ -116,14 +116,14 @@ e_delegate_dialog_finalize (GObject *object) EDelegateDialog * -e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char *address) +e_delegate_dialog_construct (EDelegateDialog *edd, const gchar *name, const gchar *address) { EDelegateDialogPrivate *priv; EDestinationStore *destination_store; EDestination *dest; ENameSelectorModel *name_selector_model; ENameSelectorDialog *name_selector_dialog; - char *gladefile; + gchar *gladefile; g_return_val_if_fail (edd != NULL, NULL); g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL); @@ -234,7 +234,7 @@ addressbook_response_cb (GtkWidget *widget, gint response, gpointer data) * editor could not be created. **/ EDelegateDialog * -e_delegate_dialog_new (const char *name, const char *address) +e_delegate_dialog_new (const gchar *name, const gchar *address) { EDelegateDialog *edd; @@ -242,7 +242,7 @@ e_delegate_dialog_new (const char *name, const char *address) return e_delegate_dialog_construct (E_DELEGATE_DIALOG (edd), name, address); } -char * +gchar * e_delegate_dialog_get_delegate (EDelegateDialog *edd) { EDelegateDialogPrivate *priv; @@ -274,7 +274,7 @@ e_delegate_dialog_get_delegate (EDelegateDialog *edd) } -char * +gchar * e_delegate_dialog_get_delegate_name (EDelegateDialog *edd) { EDelegateDialogPrivate *priv; diff --git a/calendar/gui/dialogs/e-delegate-dialog.h b/calendar/gui/dialogs/e-delegate-dialog.h index e4f474781a..6ff872e7e4 100644 --- a/calendar/gui/dialogs/e-delegate-dialog.h +++ b/calendar/gui/dialogs/e-delegate-dialog.h @@ -54,18 +54,18 @@ struct _EDelegateDialogClass { GType e_delegate_dialog_get_type (void); EDelegateDialog* e_delegate_dialog_construct (EDelegateDialog *etd, - const char *name, - const char *address); + const gchar *name, + const gchar *address); -EDelegateDialog* e_delegate_dialog_new (const char *name, - const char *address); +EDelegateDialog* e_delegate_dialog_new (const gchar *name, + const gchar *address); -char* e_delegate_dialog_get_delegate (EDelegateDialog *etd); +gchar * e_delegate_dialog_get_delegate (EDelegateDialog *etd); -char* e_delegate_dialog_get_delegate_name (EDelegateDialog *etd); +gchar * e_delegate_dialog_get_delegate_name (EDelegateDialog *etd); void e_delegate_dialog_set_delegate (EDelegateDialog *etd, - const char *address); + const gchar *address); GtkWidget* e_delegate_dialog_get_toplevel (EDelegateDialog *etd); diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c index fd6bf245c2..5af9d4bc43 100644 --- a/calendar/gui/dialogs/e-send-options-utils.c +++ b/calendar/gui/dialogs/e-send-options-utils.c @@ -34,8 +34,8 @@ e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source, ESendOptionsStatusTracking *sopts; GConfClient *gconf = gconf_client_get_default (); ESourceList *source_list; - const char *uid; - const char *value; + const gchar *uid; + const gchar *value; gopts = sod->data->gopts; sopts = sod->data->sopts; @@ -153,7 +153,7 @@ e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source, void e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp) { - int i = 1; + gint i = 1; icalproperty *prop; icalcomponent *icalcomp; ESendOptionsGeneral *gopts; @@ -166,7 +166,7 @@ e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp icalcomp = e_cal_component_get_icalcomponent (comp); if (e_sendoptions_get_need_general_options (sod)) { - prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", gopts->priority)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", gopts->priority)); icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-PRIORITY"); icalcomponent_add_property (icalcomp, prop); @@ -174,20 +174,20 @@ e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp if (gopts->reply_convenient) prop = icalproperty_new_x ("convenient"); else - prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", gopts->reply_within)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ( "%d", gopts->reply_within)); icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-REPLY"); icalcomponent_add_property (icalcomp, prop); } if (gopts->expiration_enabled && gopts->expire_after) { - prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", gopts->expire_after)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ( "%d", gopts->expire_after)); icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-EXPIRE"); icalcomponent_add_property (icalcomp, prop); } if (gopts->delay_enabled) { struct icaltimetype temp; - char *str; + gchar *str; icaltimezone *zone = calendar_config_get_icaltimezone (); temp = icaltime_from_timet_with_zone (gopts->delay_until, FALSE, zone); @@ -201,7 +201,7 @@ e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp } if (sopts->tracking_enabled) - prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", sopts->track_when)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ( "%d", sopts->track_when)); else prop = icalproperty_new_x ("0"); @@ -209,19 +209,19 @@ e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp icalcomponent_add_property (icalcomp, prop); - prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->opened)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", sopts->opened)); icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-OPENED"); icalcomponent_add_property (icalcomp, prop); - prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->accepted)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", sopts->accepted)); icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-ACCEPTED"); icalcomponent_add_property (icalcomp, prop); - prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->declined)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", sopts->declined)); icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-DECLINED"); icalcomponent_add_property (icalcomp, prop); - prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->completed)); + prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", sopts->completed)); icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-COMPLETED"); icalcomponent_add_property (icalcomp, prop); } diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index cff9d75950..93110b8797 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -551,8 +551,8 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp) /* Set up the attendees */ if (attendees != NULL) { GSList *l; - int row; - char *user_email; + gint row; + gchar *user_email; user_email = itip_get_comp_attendee (comp, client); if (!priv->meeting_shown) { diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index b2ac6b55db..f1994fa9a7 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -73,7 +73,7 @@ enum { ALARM_CUSTOM }; -static const int alarm_map_with_user_time[] = { +static const gint alarm_map_with_user_time[] = { ALARM_NONE, ALARM_15_MINUTES, ALARM_1_HOUR, @@ -83,7 +83,7 @@ static const int alarm_map_with_user_time[] = { -1 }; -static const int alarm_map_without_user_time[] = { +static const gint alarm_map_without_user_time[] = { ALARM_NONE, ALARM_15_MINUTES, ALARM_1_HOUR, @@ -113,7 +113,7 @@ struct _EventPagePrivate { EAccountList *accounts; GList *address_strings; EMeetingAttendee *ia; - char *user_add; + gchar *user_add; ECalComponent *comp; /* For meeting/event */ @@ -176,9 +176,9 @@ struct _EventPagePrivate { gboolean sendoptions_shown; ESendOptionsDialog *sod; - char *old_summary; + gchar *old_summary; CalUnits alarm_units; - int alarm_interval; + gint alarm_interval; /* This is TRUE if both the start & end timezone are the same. If the start timezone is then changed, we updated the end timezone to the @@ -189,7 +189,7 @@ struct _EventPagePrivate { GtkWidget *alarm_list_dlg_widget; /* either with-user-time or without it */ - const int *alarm_map; + const gint *alarm_map; }; static GtkWidget *event_page_get_widget (CompEditorPage *page); @@ -206,8 +206,8 @@ static void hour_sel_changed ( GtkSpinButton *widget, EventPage *epage); static void minute_sel_changed ( GtkSpinButton *widget, EventPage *epage); static void hour_minute_changed ( EventPage *epage); static void update_end_time_combo ( EventPage *epage); -static void event_page_select_organizer (EventPage *epage, const char *backend_address); -static void set_subscriber_info_string (EventPage *epage, const char *backend_address); +static void event_page_select_organizer (EventPage *epage, const gchar *backend_address); +static void set_subscriber_info_string (EventPage *epage, const gchar *backend_address); G_DEFINE_TYPE (EventPage, event_page, TYPE_COMP_EDITOR_PAGE) @@ -508,7 +508,7 @@ clear_widgets (EventPage *epage) } static gboolean -is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units, int user_interval, int *alarm_type) +is_custom_alarm (ECalComponentAlarm *ca, gchar *old_summary, CalUnits user_units, gint user_interval, gint *alarm_type) { ECalComponentAlarmTrigger trigger; ECalComponentAlarmRepeat repeat; @@ -530,7 +530,7 @@ is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units, icalcomp = e_cal_component_alarm_get_icalcomponent (ca); icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); while (icalprop) { - const char *x_name; + const gchar *x_name; x_name = icalproperty_get_x_name (icalprop); if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) @@ -627,7 +627,7 @@ is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units, } static gboolean -is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, char *old_summary, CalUnits user_units, int user_interval, int *alarm_type) +is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, gchar *old_summary, CalUnits user_units, gint user_interval, gint *alarm_type) { ECalComponentAlarm *ca; gboolean result; @@ -643,7 +643,7 @@ is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, char *old_summary, } static gboolean -is_custom_alarm_store (EAlarmList *alarm_list_store, char *old_summary, CalUnits user_units, int user_interval, int *alarm_type) +is_custom_alarm_store (EAlarmList *alarm_list_store, gchar *old_summary, CalUnits user_units, gint user_interval, gint *alarm_type) { const ECalComponentAlarm *alarm; GtkTreeModel *model; @@ -700,7 +700,7 @@ event_page_set_view_rsvp (EventPage *epage, gboolean state) } static GtkWidget * -create_image_event_box (const char *image_text, const char *tip_text) +create_image_event_box (const gchar *image_text, const gchar *tip_text) { GtkWidget *image, *box; @@ -866,7 +866,7 @@ get_current_account (EventPage *epage) { EventPagePrivate *priv; EIterator *it; - const char *str; + const gchar *str; priv = epage->priv; @@ -876,7 +876,7 @@ get_current_account (EventPage *epage) for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) { EAccount *a = (EAccount *)e_iterator_get(it); - char *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); + gchar *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); if (!g_ascii_strcasecmp (full, str)) { g_free (full); @@ -905,8 +905,8 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) ECalComponentClassification cl; ECalComponentTransparency transparency; ECalComponentDateTime start_date, end_date; - const char *location, *uid = NULL; - const char *categories; + const gchar *location, *uid = NULL; + const gchar *categories; gchar *backend_addr = NULL; GSList *l; gboolean validated = TRUE; @@ -1084,7 +1084,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) if (e_cal_component_has_alarms (comp)) { GList *alarms, *list; - int alarm_type; + gint alarm_type; alarms = e_cal_component_get_alarm_uids (comp); if (!is_custom_alarm_uid_list (comp, alarms, priv->old_summary, priv->alarm_units, priv->alarm_interval, &alarm_type)) @@ -1140,7 +1140,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp) ECalComponentDateTime start_date, end_date; struct icaltimetype start_tt, end_tt; gboolean all_day_event, start_date_set, end_date_set, busy; - char *cat, *str; + gchar *cat, *str; GtkTextBuffer *text_buffer; GtkTextIter text_iter_start, text_iter_end; @@ -1322,7 +1322,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp) icalcomp = e_cal_component_alarm_get_icalcomponent (alarm); icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); while (icalprop) { - const char *x_name; + const gchar *x_name; ECalComponentText summary; x_name = icalproperty_get_x_name (icalprop); @@ -1349,7 +1349,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp) ECalComponentAlarm *ca; ECalComponentText summary; ECalComponentAlarmTrigger trigger; - int alarm_type; + gint alarm_type; ca = e_cal_component_alarm_new (); @@ -1456,7 +1456,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp) if (flags & COMP_EDITOR_DELEGATE) { GSList *attendee_list, *l; - int i; + gint i; const GPtrArray *attendees = e_meeting_store_get_attendees (priv->model); e_cal_component_get_attendee_list (priv->comp, &attendee_list); @@ -1530,7 +1530,7 @@ static void time_sel_changed (GtkComboBox *combo, EventPage *epage) { EventPagePrivate *priv; - int selection = gtk_combo_box_get_active (combo); + gint selection = gtk_combo_box_get_active (combo); priv = epage->priv; @@ -1683,8 +1683,8 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp) for (l = attendees; l; l = l->next) { ECalComponentAttendee *attendee = l->data; - const char *address; - const char *sentby = NULL; + const gchar *address; + const gchar *sentby = NULL; address = itip_strip_mailto (attendee->value); if (attendee->sentby) @@ -1707,7 +1707,7 @@ remove_attendee (EventPage *epage, EMeetingAttendee *ia) EventPagePrivate *priv = epage->priv; CompEditor *editor; CompEditorFlags flags; - int pos = 0; + gint pos = 0; gboolean delegate; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage)); @@ -1767,7 +1767,7 @@ remove_clicked_cb (GtkButton *btn, EventPage *epage) GtkTreePath *path = NULL; GtkTreeModel *model = NULL; gboolean valid_iter; - char *address; + gchar *address; priv = epage->priv; @@ -1847,7 +1847,7 @@ attendee_added_cb (EMeetingListView *emlv, e_meeting_store_remove_attendee (priv->model, ia); } else { if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) { - const char *delegator_id = e_meeting_attendee_get_delfrom (ia); + const gchar *delegator_id = e_meeting_attendee_get_delfrom (ia); EMeetingAttendee *delegator; delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL); @@ -1866,7 +1866,7 @@ attendee_added_cb (EMeetingListView *emlv, /* Callbacks for list view*/ static void -popup_add_cb (EPopup *ep, EPopupItem *pitem, void *data) +popup_add_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { EventPage *epage = data; @@ -1874,7 +1874,7 @@ popup_add_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -popup_delete_cb (EPopup *ep, EPopupItem *pitem, void *data) +popup_delete_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { EventPage *epage = data; @@ -1894,7 +1894,7 @@ static EPopupItem context_menu_items[] = { }; static void -context_popup_free(EPopup *ep, GSList *items, void *data) +context_popup_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } @@ -1909,11 +1909,11 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, EventPage *epage) EMeetingAttendee *ia; GtkTreePath *path; GtkTreeIter iter; - char *address; + gchar *address; guint32 disable_mask = ~0; GSList *menus = NULL; ECalPopup *ep; - int i; + gint i; /* only process right-clicks */ if (event->button != 3 || event->type != GDK_BUTTON_PRESS) @@ -2348,7 +2348,7 @@ check_start_before_end (struct icaltimetype *start_tt, gboolean adjust_end_time) { struct icaltimetype end_tt_copy; - int cmp; + gint cmp; /* Convert the end time to the same timezone as the start time. */ end_tt_copy = *end_tt; @@ -2420,7 +2420,7 @@ times_updated (EventPage *epage, gboolean adjust_end_time) if (all_day_event) { /* All Day Events are simple. We just compare the dates and if start > end we copy one of them to the other. */ - int cmp = icaltime_compare_date_only (start_tt, end_tt); + gint cmp = icaltime_compare_date_only (start_tt, end_tt); if (cmp > 0) { if (adjust_end_time) { end_tt = start_tt; @@ -2646,7 +2646,7 @@ source_changed_cb (ESourceComboBox *source_combo_box, EventPage *epage) } static void -set_subscriber_info_string (EventPage *epage, const char *backend_address) +set_subscriber_info_string (EventPage *epage, const gchar *backend_address) { CompEditor *editor; ECal *client; @@ -2679,7 +2679,7 @@ alarm_changed_cb (GtkWidget *widget, gpointer data) ECalComponentAlarmTrigger trigger; icalcomponent *icalcomp; icalproperty *icalprop; - int alarm_type; + gint alarm_type; ca = e_cal_component_alarm_new (); @@ -2813,7 +2813,7 @@ init_widgets (EventPage *epage) CompEditor *editor; GtkTextBuffer *text_buffer; icaltimezone *zone; - char *combo_label = NULL; + gchar *combo_label = NULL; GtkTreeSelection *selection; ECal *client; @@ -3013,7 +3013,7 @@ init_widgets (EventPage *epage) static void -event_page_select_organizer (EventPage *epage, const char *backend_address) +event_page_select_organizer (EventPage *epage, const gchar *backend_address) { EventPagePrivate *priv = epage->priv; CompEditor *editor; @@ -3021,10 +3021,10 @@ event_page_select_organizer (EventPage *epage, const char *backend_address) ECal *client; EAccount *def_account; gchar *def_address = NULL; - const char *default_address; + const gchar *default_address; gboolean subscribed_cal = FALSE; ESource *source = NULL; - const char *user_addr = NULL; + const gchar *user_addr = NULL; def_account = itip_addresses_get_default(); if (def_account && def_account->enabled) @@ -3047,7 +3047,7 @@ event_page_select_organizer (EventPage *epage, const char *backend_address) if (user_addr) for (l = priv->address_strings; l != NULL; l = l->next) if (g_strrstr ((gchar *) l->data, user_addr) != NULL) { - default_address = (const char *) l->data; + default_address = (const gchar *) l->data; break; } @@ -3080,7 +3080,7 @@ event_page_construct (EventPage *epage, EMeetingStore *model) EventPagePrivate *priv; EIterator *it; EAccount *a; - char *gladefile; + gchar *gladefile; priv = epage->priv; g_object_ref (model); @@ -3217,7 +3217,7 @@ static void set_attendees (ECalComponent *comp, const GPtrArray *attendees) { GSList *comp_attendees = NULL, *l; - int i; + gint i; for (i = 0; i < attendees->len; i++) { EMeetingAttendee *ia = g_ptr_array_index (attendees, i); diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 957b8f695c..c3642a91d4 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -101,10 +101,10 @@ struct _MemoPagePrivate { }; static void set_subscriber_info_string (MemoPage *mpage, const gchar *backend_address); -static const char * get_recipients (ECalComponent *comp); +static const gchar * get_recipients (ECalComponent *comp); static void sensitize_widgets (MemoPage *mpage); static gboolean memo_page_fill_component (CompEditorPage *page, ECalComponent *comp); -static void memo_page_select_organizer (MemoPage *mpage, const char *backend_address); +static void memo_page_select_organizer (MemoPage *mpage, const gchar *backend_address); G_DEFINE_TYPE (MemoPage, memo_page, TYPE_COMP_EDITOR_PAGE) @@ -196,7 +196,7 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponentText text; ECalComponentDateTime d; GSList *l; - const char *categories; + const gchar *categories; gchar *backend_addr = NULL; mpage = MEMO_PAGE (page); @@ -363,7 +363,7 @@ sensitize_widgets (MemoPage *mpage) } /* returns empty string rather than NULL because of simplicity of usage */ -static const char * +static const gchar * get_recipients (ECalComponent *comp) { icalcomponent *icalcomp; @@ -377,7 +377,7 @@ get_recipients (ECalComponent *comp) for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); icalprop; icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) { - const char *xname = icalproperty_get_x_name (icalprop); + const gchar *xname = icalproperty_get_x_name (icalprop); if (xname && strcmp (xname, "X-EVOLUTION-RECIPIENTS") == 0) break; @@ -420,7 +420,7 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp) ENameSelectorDialog *dialog; EContactStore *c_store; GList *books, *l; - char *uri = e_contact_get (contact, E_CONTACT_BOOK_URI); + gchar *uri = e_contact_get (contact, E_CONTACT_BOOK_URI); dialog = e_name_selector_peek_dialog (name_selector); c_store = dialog->name_selector_model->contact_store; @@ -437,11 +437,11 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp) if (book) { GList *contacts = NULL; EContact *n_con = NULL; - char *qu; + gchar *qu; EBookQuery *query; qu = g_strdup_printf ("(is \"full_name\" \"%s\")", - (char *) e_contact_get (contact, E_CONTACT_FULL_NAME)); + (gchar *) e_contact_get (contact, E_CONTACT_FULL_NAME)); query = e_book_query_from_string (qu); if (!e_book_get_contacts (book, query, &contacts, NULL)) { @@ -471,7 +471,7 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp) for (l = list_dests; l; l = l->next) { EDestination *dest = l->data; - const char *name, *attendee = NULL; + const gchar *name, *attendee = NULL; name = e_destination_get_name (dest); @@ -512,7 +512,7 @@ get_current_account (MemoPage *page) { MemoPagePrivate *priv = page->priv; EIterator *it; - const char *str; + const gchar *str; str = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->org_combo)))); if (!str) @@ -520,7 +520,7 @@ get_current_account (MemoPage *page) for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) { EAccount *a = (EAccount *)e_iterator_get(it); - char *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); + gchar *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); if (!g_ascii_strcasecmp (full, str)) { g_free (full); @@ -549,8 +549,8 @@ memo_page_fill_component (CompEditorPage *page, ECalComponentClassification classification; ECalComponentDateTime start_date; struct icaltimetype start_tt; - char *cat, *str; - int i; + gchar *cat, *str; + gint i; GtkTextBuffer *text_buffer; GtkTextIter text_iter_start, text_iter_end; @@ -591,10 +591,10 @@ memo_page_fill_component (CompEditorPage *page, e_cal_component_set_description_list (comp, NULL); } else { - int idxToUse = 1; + gint idxToUse = 1; GSList l; ECalComponentText text, sumText; - char *txt, *p; + gchar *txt, *p; gunichar uc; for(i = 0, p = str, uc = g_utf8_get_char_validated (p, -1); @@ -1016,7 +1016,7 @@ get_to_entry (ENameSelector *name_selector) } static void -memo_page_select_organizer (MemoPage *mpage, const char *backend_address) +memo_page_select_organizer (MemoPage *mpage, const gchar *backend_address) { MemoPagePrivate *priv; CompEditor *editor; @@ -1025,10 +1025,10 @@ memo_page_select_organizer (MemoPage *mpage, const char *backend_address) ECal *client; EAccount *def_account; gchar *def_address = NULL; - const char *default_address; + const gchar *default_address; gboolean subscribed_cal = FALSE; ESource *source = NULL; - const char *user_addr = NULL; + const gchar *user_addr = NULL; def_account = itip_addresses_get_default(); if (def_account && def_account->enabled) @@ -1053,7 +1053,7 @@ memo_page_select_organizer (MemoPage *mpage, const char *backend_address) if (user_addr) for (l = priv->address_strings; l != NULL; l = l->next) if (g_strrstr ((gchar *) l->data, user_addr) != NULL) { - default_address = (const char *) l->data; + default_address = (const gchar *) l->data; break; } @@ -1087,7 +1087,7 @@ memo_page_construct (MemoPage *mpage) CompEditor *editor; CompEditorFlags flags; EIterator *it; - char *gladefile; + gchar *gladefile; EAccount *a; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (mpage)); diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c index 8d8dabbaf2..1323755cb1 100644 --- a/calendar/gui/dialogs/recur-comp.c +++ b/calendar/gui/dialogs/recur-comp.c @@ -37,7 +37,7 @@ recur_component_dialog (ECal *client, CalObjModType *mod, GtkWindow *parent, gboolean delegated) { - char *str; + gchar *str; GtkWidget *dialog, *rb_this, *rb_prior, *rb_future, *rb_all, *hbox; GtkWidget *placeholder, *vbox; ECalComponentVType vtype; diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index f89993154f..5e24495b5c 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -61,7 +61,7 @@ enum month_num_options { MONTH_NUM_OTHER }; -static const int month_num_options_map[] = { +static const gint month_num_options_map[] = { MONTH_NUM_FIRST, MONTH_NUM_SECOND, MONTH_NUM_THIRD, @@ -83,7 +83,7 @@ enum month_day_options { MONTH_DAY_SUN }; -static const int month_day_options_map[] = { +static const gint month_day_options_map[] = { MONTH_DAY_NTH, MONTH_DAY_MON, MONTH_DAY_TUE, @@ -101,14 +101,14 @@ enum recur_type { RECUR_CUSTOM }; -static const int type_map[] = { +static const gint type_map[] = { RECUR_NONE, RECUR_SIMPLE, RECUR_CUSTOM, -1 }; -static const int freq_map[] = { +static const gint freq_map[] = { ICAL_DAILY_RECURRENCE, ICAL_WEEKLY_RECURRENCE, ICAL_MONTHLY_RECURRENCE, @@ -122,7 +122,7 @@ enum ending_type { ENDING_FOREVER }; -static const int ending_types_map[] = { +static const gint ending_types_map[] = { ENDING_FOR, ENDING_UNTIL, ENDING_FOREVER, @@ -157,7 +157,7 @@ struct _RecurrencePagePrivate { guint8 weekday_blocked_day_mask; /* For monthly recurrences, created by hand */ - int month_index; + gint month_index; GtkWidget *month_day_combo; enum month_day_options month_day; @@ -171,7 +171,7 @@ struct _RecurrencePagePrivate { /* For ending count of occurrences, created by hand */ GtkWidget *ending_count_spin; - int ending_count; + gint ending_count; /* More widgets from the Glade file */ GtkWidget *exception_list; /* This is a GtkTreeView now */ @@ -583,7 +583,7 @@ sensitize_buttons (RecurrencePage *rpage) gint selected_rows; icalcomponent *icalcomp; ECal *client; - const char *uid; + const gchar *uid; if (priv->comp == NULL) return; @@ -639,7 +639,7 @@ sensitize_buttons (RecurrencePage *rpage) * icalrecurrencetype.by_day. Not needed at present. */ static short -nth_weekday (int pos, icalrecurrencetype_weekday weekday) +nth_weekday (gint pos, icalrecurrencetype_weekday weekday) { g_assert (pos > 0 && pos <= 5); @@ -679,7 +679,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp) case ICAL_WEEKLY_RECURRENCE: { guint8 day_mask; - int i; + gint i; g_return_if_fail (GTK_BIN (priv->special)->child != NULL); g_return_if_fail (priv->weekday_picker != NULL); @@ -976,10 +976,10 @@ make_weekly_special (RecurrencePage *rpage) /* Creates the subtree for the monthly recurrence number */ static void -make_recur_month_num_subtree (GtkTreeStore *store, GtkTreeIter *par, const char *title, int start, int end) +make_recur_month_num_subtree (GtkTreeStore *store, GtkTreeIter *par, const gchar *title, gint start, gint end) { GtkTreeIter iter, parent; - int i; + gint i; gtk_tree_store_append (store, &parent, par); gtk_tree_store_set (store, &parent, 0, _(title), 1, -1, -1); @@ -1004,9 +1004,9 @@ only_leaf_sensitive (GtkCellLayout *cell_layout, } static GtkWidget * -make_recur_month_num_combo (int month_index) +make_recur_month_num_combo (gint month_index) { - static const char *options[] = { + static const gchar *options[] = { /* TRANSLATORS: Entire string is for example: This appointment recurs/Every [x] month(s) on the [first] [Monday] [forever]' * (dropdown menu options are in [square brackets]). This means that after 'first', either the string 'day' or * the name of a week day (like 'Monday' or 'Friday') always follow. @@ -1035,7 +1035,7 @@ make_recur_month_num_combo (int month_index) N_("last") }; - int i; + gint i; GtkTreeStore *store; GtkTreeIter iter; GtkWidget *combo; @@ -1095,7 +1095,7 @@ make_recur_month_num_combo (int month_index) static GtkWidget * make_recur_month_combobox (void) { - static const char *options[] = { + static const gchar *options[] = { /* For Translator : 'day' is part of the sentence of the form 'appointment recurs/Every [x] month(s) on the [first] [day] [forever]' (dropdown menu options are in [square brackets]). This means that after 'first', either the string 'day' or the name of a week day (like 'Monday' or 'Friday') always follow. */ @@ -1110,7 +1110,7 @@ make_recur_month_combobox (void) }; GtkWidget *combo; - int i; + gint i; combo = gtk_combo_box_new_text (); @@ -1313,9 +1313,9 @@ make_recurrence_special (RecurrencePage *rpage) /* Counts the elements in the by_xxx fields of an icalrecurrencetype */ static int -count_by_xxx (short *field, int max_elements) +count_by_xxx (short *field, gint max_elements) { - int i; + gint i; for (i = 0; i < max_elements; i++) if (field[i] == ICAL_RECURRENCE_ARRAY_MAX) @@ -1540,11 +1540,11 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) CompEditorFlags flags; CompEditorPageDates dates; GSList *rrule_list; - int len; + gint len; struct icalrecurrencetype *r; - int n_by_second, n_by_minute, n_by_hour; - int n_by_day, n_by_month_day, n_by_year_day; - int n_by_week_no, n_by_month, n_by_set_pos; + gint n_by_second, n_by_minute, n_by_hour; + gint n_by_day, n_by_month_day, n_by_year_day; + gint n_by_week_no, n_by_month, n_by_set_pos; GtkAdjustment *adj; rpage = RECURRENCE_PAGE (page); @@ -1661,7 +1661,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) break; case ICAL_WEEKLY_RECURRENCE: { - int i; + gint i; guint8 day_mask; if (n_by_month_day != 0 @@ -1675,7 +1675,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) for (i = 0; i < 8 && r->by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) { enum icalrecurrencetype_weekday weekday; - int pos; + gint pos; weekday = icalrecurrencetype_day_day_of_week (r->by_day[i]); pos = icalrecurrencetype_day_position (r->by_day[i]); @@ -1735,7 +1735,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) goto custom; if (n_by_month_day == 1) { - int nth; + gint nth; if (n_by_set_pos != 0) goto custom; @@ -1759,7 +1759,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) } else if (n_by_day == 1) { enum icalrecurrencetype_weekday weekday; - int pos; + gint pos; enum month_day_options month_day; /* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not @@ -2064,7 +2064,7 @@ type_toggled_cb (GtkToggleButton *toggle, } static GtkWidget * -create_exception_dialog (RecurrencePage *rpage, const char *title, GtkWidget **date_edit) +create_exception_dialog (RecurrencePage *rpage, const gchar *title, GtkWidget **date_edit) { RecurrencePagePrivate *priv; GtkWidget *dialog, *toplevel; @@ -2332,7 +2332,7 @@ recurrence_page_construct (RecurrencePage *rpage) { RecurrencePagePrivate *priv = rpage->priv; CompEditor *editor; - char *gladefile; + gchar *gladefile; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage)); diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 4baa22ab8a..c85ccbb4fe 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -387,7 +387,7 @@ schedule_page_construct (SchedulePage *spage, EMeetingStore *ems) { SchedulePagePrivate *priv = spage->priv; CompEditor *editor; - char *gladefile; + gchar *gladefile; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (spage)); diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c index f73af156b0..462ed7d82a 100644 --- a/calendar/gui/dialogs/select-source-dialog.c +++ b/calendar/gui/dialogs/select-source-dialog.c @@ -40,7 +40,7 @@ select_source_dialog (GtkWindow *parent, ECalSourceType obj_type) GtkWidget *dialog; ESourceList *source_list; ESource *selected_source = NULL; - const char *gconf_key; + const gchar *gconf_key; GConfClient *conf_client; const gchar *icon_name = NULL; @@ -72,12 +72,12 @@ select_source_dialog (GtkWindow *parent, ECalSourceType obj_type) if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { selected_source = e_source_selector_dialog_peek_primary_selection (E_SOURCE_SELECTOR_DIALOG (dialog)); if (selected_source) { - char *absolute_uri; + gchar *absolute_uri; /* set the absolute URI on the source we keep around, since the group will be unrefed */ absolute_uri = e_source_build_absolute_uri (selected_source); - e_source_set_absolute_uri (selected_source, (const char *) absolute_uri); + e_source_set_absolute_uri (selected_source, (const gchar *) absolute_uri); g_object_ref (selected_source); g_free (absolute_uri); diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index 4eca089435..c11dadf853 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -45,7 +45,7 @@ have_nonprocedural_alarm (ECalComponent *comp) ECalComponentAlarm *alarm; ECalComponentAlarmAction action = E_CAL_COMPONENT_ALARM_UNKNOWN; - alarm = e_cal_component_get_alarm (comp, (const char *)l->data); + alarm = e_cal_component_get_alarm (comp, (const gchar *)l->data); if (alarm) { e_cal_component_alarm_get_action (alarm, &action); e_cal_component_alarm_free (alarm); @@ -76,7 +76,7 @@ gboolean send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new, gboolean *strip_alarms) { ECalComponentVType vtype; - const char *id; + const gchar *id; if (strip_alarms) *strip_alarms = TRUE; @@ -140,7 +140,7 @@ gboolean send_component_prompt_subject (GtkWindow *parent, ECal *client, ECalComponent *comp) { ECalComponentVType vtype; - const char *id; + const gchar *id; vtype = e_cal_component_get_vtype (comp); diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 7fb4679047..4cff39864a 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -65,7 +65,7 @@ struct _TaskDetailsPagePrivate { }; /* Note that these two arrays must match. */ -static const int status_map[] = { +static const gint status_map[] = { ICAL_STATUS_NONE, ICAL_STATUS_INPROCESS, ICAL_STATUS_COMPLETED, @@ -80,7 +80,7 @@ typedef enum { PRIORITY_UNDEFINED } TaskEditorPriority; -static const int priority_map[] = { +static const gint priority_map[] = { PRIORITY_HIGH, PRIORITY_NORMAL, PRIORITY_LOW, @@ -170,7 +170,7 @@ task_details_page_focus_main_widget (CompEditorPage *page) static TaskEditorPriority -priority_value_to_index (int priority_value) +priority_value_to_index (gint priority_value) { TaskEditorPriority retval; @@ -189,7 +189,7 @@ priority_value_to_index (int priority_value) static int priority_index_to_value (TaskEditorPriority priority) { - int retval; + gint retval; switch (priority) { case PRIORITY_UNDEFINED: @@ -255,10 +255,10 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) { TaskDetailsPage *tdpage; TaskDetailsPagePrivate *priv; - int *priority_value, *percent = NULL; + gint *priority_value, *percent = NULL; TaskEditorPriority priority; icalproperty_status status; - const char *url; + const gchar *url; struct icaltimetype *completed = NULL; tdpage = TASK_DETAILS_PAGE (page); @@ -345,8 +345,8 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) struct icaltimetype icalcomplete, icaltoday; icalproperty_status status; TaskEditorPriority priority; - int priority_value, percent; - char *url; + gint priority_value, percent; + gchar *url; gboolean date_set; icaltimezone *zone = calendar_config_get_icaltimezone (); @@ -713,7 +713,7 @@ task_details_page_construct (TaskDetailsPage *tdpage) { TaskDetailsPagePrivate *priv = tdpage->priv; CompEditor *editor; - char *gladefile; + gchar *gladefile; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tdpage)); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index fbab8b0581..c08ccfdb4d 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -391,7 +391,7 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp) if (attendees != NULL) { GSList *l; - int row; + gint row; task_page_hide_options (priv->task_page); task_page_set_assignment (priv->task_page, TRUE); diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index b088fb4ff1..412dcd5fa6 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -70,7 +70,7 @@ struct _TaskPagePrivate { EAccountList *accounts; GList *address_strings; EMeetingAttendee *ia; - char *user_add; + gchar *user_add; ECalComponent *comp; /* For meeting/event */ @@ -127,7 +127,7 @@ struct _TaskPagePrivate { ESendOptionsDialog *sod; }; -static const int classification_map[] = { +static const gint classification_map[] = { E_CAL_COMPONENT_CLASS_PUBLIC, E_CAL_COMPONENT_CLASS_PRIVATE, E_CAL_COMPONENT_CLASS_CONFIDENTIAL, @@ -143,8 +143,8 @@ static void task_page_focus_main_widget (CompEditorPage *page); static gboolean task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); static gboolean task_page_fill_component (CompEditorPage *page, ECalComponent *comp); static gboolean task_page_fill_timezones (CompEditorPage *page, GHashTable *timezones); -static void task_page_select_organizer (TaskPage *tpage, const char *backend_address); -static void set_subscriber_info_string (TaskPage *tpage, const char *backend_address); +static void task_page_select_organizer (TaskPage *tpage, const gchar *backend_address); +static void set_subscriber_info_string (TaskPage *tpage, const gchar *backend_address); G_DEFINE_TYPE (TaskPage, task_page, TYPE_COMP_EDITOR_PAGE) @@ -414,7 +414,7 @@ get_current_account (TaskPage *page) { TaskPagePrivate *priv; EIterator *it; - const char *str; + const gchar *str; priv = page->priv; @@ -424,7 +424,7 @@ get_current_account (TaskPage *page) for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) { EAccount *a = (EAccount *)e_iterator_get(it); - char *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); + gchar *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); if (!g_ascii_strcasecmp (full, str)) { g_free (full); @@ -454,7 +454,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) ECal *client; GSList *l; icalcomponent *icalcomp; - const char *categories, *uid; + const gchar *categories, *uid; icaltimezone *zone, *default_zone; gchar *backend_addr = NULL; @@ -687,7 +687,7 @@ static void set_attendees (ECalComponent *comp, const GPtrArray *attendees) { GSList *comp_attendees = NULL, *l; - int i; + gint i; for (i = 0; i < attendees->len; i++) { EMeetingAttendee *ia = g_ptr_array_index (attendees, i); @@ -719,7 +719,7 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp) CompEditorFlags flags; ECal *client; struct icaltimetype start_tt, due_tt; - char *cat, *str; + gchar *cat, *str; gboolean start_date_set, due_date_set, time_set; GtkTextBuffer *text_buffer; GtkTextIter text_iter_start, text_iter_end; @@ -908,7 +908,7 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp) if (flags & COMP_EDITOR_DELEGATE ) { GSList *attendee_list, *l; - int i; + gint i; const GPtrArray *attendees = e_meeting_store_get_attendees (priv->model); e_cal_component_get_attendee_list (priv->comp, &attendee_list); @@ -996,8 +996,8 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp) for (l = attendees; l; l = l->next) { ECalComponentAttendee *attendee = l->data; - const char *address; - const char *sentby = NULL; + const gchar *address; + const gchar *sentby = NULL; address = itip_strip_mailto (attendee->value); if (attendee->sentby) @@ -1020,7 +1020,7 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia) TaskPagePrivate *priv = page->priv; CompEditor *editor; CompEditorFlags flags; - int pos = 0; + gint pos = 0; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (page)); flags = comp_editor_get_flags (editor); @@ -1077,7 +1077,7 @@ remove_clicked_cb (GtkButton *btn, TaskPage *page) GtkTreePath *path = NULL; GtkTreeModel *model = NULL; gboolean valid_iter; - char *address; + gchar *address; priv = page->priv; @@ -1157,7 +1157,7 @@ attendee_added_cb (EMeetingListView *emlv, e_meeting_store_remove_attendee (priv->model, ia); else { if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) { - const char *delegator_id = e_meeting_attendee_get_delfrom (ia); + const gchar *delegator_id = e_meeting_attendee_get_delfrom (ia); EMeetingAttendee *delegator; delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL); @@ -1176,7 +1176,7 @@ attendee_added_cb (EMeetingListView *emlv, /* Callbacks for list view*/ static void -popup_add_cb (EPopup *ep, EPopupItem *pitem, void *data) +popup_add_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { TaskPage *page = data; @@ -1184,7 +1184,7 @@ popup_add_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -popup_delete_cb (EPopup *ep, EPopupItem *pitem, void *data) +popup_delete_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { TaskPage *page = data; @@ -1204,7 +1204,7 @@ static EPopupItem context_menu_items[] = { }; static void -context_popup_free(EPopup *ep, GSList *items, void *data) +context_popup_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } @@ -1219,11 +1219,11 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, TaskPage *page) EMeetingAttendee *ia; GtkTreePath *path; GtkTreeIter iter; - char *address; + gchar *address; guint32 disable_mask = ~0; GSList *menus = NULL; ECalPopup *ep; - int i; + gint i; /* only process right-clicks */ if (event->button != 3 || event->type != GDK_BUTTON_PRESS) @@ -1601,7 +1601,7 @@ check_start_before_end (struct icaltimetype *start_tt, gboolean adjust_by_hour) { struct icaltimetype end_tt_copy; - int cmp; + gint cmp; /* Convert the end time to the same timezone as the start time. */ end_tt_copy = *end_tt; @@ -1793,7 +1793,7 @@ source_changed_cb (ESourceComboBox *source_combo_box, TaskPage *tpage) } static void -set_subscriber_info_string (TaskPage *tpage, const char *backend_address) +set_subscriber_info_string (TaskPage *tpage, const gchar *backend_address) { CompEditor *editor; ECal *client; @@ -1961,18 +1961,18 @@ init_widgets (TaskPage *tpage) static void -task_page_select_organizer (TaskPage *tpage, const char *backend_address) +task_page_select_organizer (TaskPage *tpage, const gchar *backend_address) { TaskPagePrivate *priv = tpage->priv; CompEditor *editor; GList *l; EAccount *def_account; gchar *def_address = NULL; - const char *default_address; + const gchar *default_address; gboolean subscribed_cal = FALSE; ESource *source = NULL; ECal *client; - const char *user_addr = NULL; + const gchar *user_addr = NULL; editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tpage)); client = comp_editor_get_client (editor); @@ -1995,7 +1995,7 @@ task_page_select_organizer (TaskPage *tpage, const char *backend_address) if (user_addr) for (l = priv->address_strings; l != NULL; l = l->next) if (g_strrstr ((gchar *) l->data, user_addr) != NULL) { - default_address = (const char *) l->data; + default_address = (const gchar *) l->data; break; } @@ -2028,7 +2028,7 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client) TaskPagePrivate *priv; EIterator *it; EAccount *a; - char *gladefile; + gchar *gladefile; priv = tpage->priv; g_object_ref (model); diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c index d60fab913e..32e5b4214a 100644 --- a/calendar/gui/e-alarm-list.c +++ b/calendar/gui/e-alarm-list.c @@ -380,11 +380,11 @@ e_alarm_list_get_path (GtkTreeModel *tree_model, } /* Builds a string for the duration of the alarm. If the duration is zero, returns NULL. */ -static char * +static gchar * get_alarm_duration_string (struct icaldurationtype *duration) { GString *string = g_string_new (NULL); - char *ret; + gchar *ret; gboolean have_something; have_something = FALSE; @@ -429,12 +429,12 @@ get_alarm_duration_string (struct icaldurationtype *duration) } } -static char * +static gchar * get_alarm_string (ECalComponentAlarm *alarm) { ECalComponentAlarmAction action; ECalComponentAlarmTrigger trigger; - char *base, *str = NULL, *dur; + gchar *base, *str = NULL, *dur; e_cal_component_alarm_get_action (alarm, &action); e_cal_component_alarm_get_trigger (alarm, &trigger); @@ -516,7 +516,7 @@ get_alarm_string (ECalComponentAlarm *alarm) struct icaltimetype itt; icaltimezone *utc_zone, *current_zone; struct tm tm; - char buf[256]; + gchar buf[256]; /* Absolute triggers come in UTC, so convert them to the local timezone */ diff --git a/calendar/gui/e-cal-component-memo-preview.c b/calendar/gui/e-cal-component-memo-preview.c index 18c47ebfcc..20190a8f80 100644 --- a/calendar/gui/e-cal-component-memo-preview.c +++ b/calendar/gui/e-cal-component-memo-preview.c @@ -52,17 +52,17 @@ G_DEFINE_TYPE (ECalComponentMemoPreview, e_cal_component_memo_preview, GTK_TYPE_ static void -on_link_clicked (GtkHTML *html, const char *url, gpointer data) +on_link_clicked (GtkHTML *html, const gchar *url, gpointer data) { /* FIXME Pass a parent window. */ e_show_uri (NULL, url); } static void -on_url_cb (GtkHTML *html, const char *url, gpointer data) +on_url_cb (GtkHTML *html, const gchar *url, gpointer data) { #if 0 - char *msg; + gchar *msg; ECalComponentMemoPreview *preview = data; if (url && *url) { @@ -75,13 +75,13 @@ on_url_cb (GtkHTML *html, const char *url, gpointer data) } /* Converts a time_t to a string, relative to the specified timezone */ -static char * +static gchar * timet_to_str_with_zone (ECalComponentDateTime *dt, ECal *ecal, icaltimezone *default_zone) { struct icaltimetype itt; icaltimezone *zone; struct tm tm; - char buf[256]; + gchar buf[256]; if (dt->tzid) { /* If we can't find the zone, we'll guess its "local" */ @@ -138,23 +138,23 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone gtk_html_stream_printf(stream, "<H3>%s: ", _("Categories")); for (node = l; node != NULL; node = node->next) { - const char *icon_file; + const gchar *icon_file; - icon_file = e_categories_get_icon_file_for ((const char *) node->data); + icon_file = e_categories_get_icon_file_for ((const gchar *) node->data); if (icon_file && g_file_test(icon_file, G_FILE_TEST_EXISTS)) { gchar *icon_file_uri = g_filename_to_uri (icon_file, NULL, NULL); gtk_html_stream_printf (stream, "<IMG ALT=\"%s\" SRC=\"%s\">", - (const char *) node->data, icon_file_uri); + (const gchar *) node->data, icon_file_uri); g_free (icon_file_uri); one_added = TRUE; } else{ if(one_added == FALSE){ - g_string_append_printf (string, "%s", (const char *) node->data); + g_string_append_printf (string, "%s", (const gchar *) node->data); one_added = TRUE; } else{ - g_string_append_printf (string, ", %s", (const char *) node->data); + g_string_append_printf (string, ", %s", (const gchar *) node->data); } } } @@ -196,7 +196,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone gtk_html_stream_printf (stream, "<TD><TT>"); for (node = l; node != NULL; node = node->next) { - char *html; + gchar *html; text = * (ECalComponentText *) node->data; html = camel_text_to_html (text.value ? text.value : "", CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES | CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES, 0); @@ -213,7 +213,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone } /* URL */ - e_cal_component_get_url (comp, (const char **) &str); + e_cal_component_get_url (comp, (const gchar **) &str); if (str) { gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Web Page:")); gtk_html_stream_printf (stream, "<TD><A HREF=\"%s\">%s</A></TD></TR>", str, str); diff --git a/calendar/gui/e-cal-component-memo-preview.h b/calendar/gui/e-cal-component-memo-preview.h index 8dcab9d0f3..3f310cce03 100644 --- a/calendar/gui/e-cal-component-memo-preview.h +++ b/calendar/gui/e-cal-component-memo-preview.h @@ -50,7 +50,7 @@ struct _ECalComponentMemoPreviewClass { GtkTableClass parent_class; /* Notification signals */ - void (* selection_changed) (ECalComponentMemoPreview *preview, int n_selected); + void (* selection_changed) (ECalComponentMemoPreview *preview, gint n_selected); }; diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index a70bf5761f..0cee29614d 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -50,17 +50,17 @@ struct _ECalComponentPreviewPrivate { G_DEFINE_TYPE (ECalComponentPreview, e_cal_component_preview, GTK_TYPE_TABLE) static void -on_link_clicked (GtkHTML *html, const char *url, gpointer data) +on_link_clicked (GtkHTML *html, const gchar *url, gpointer data) { /* FIXME Pass a parent window. */ e_show_uri (NULL, url); } static void -on_url_cb (GtkHTML *html, const char *url, gpointer data) +on_url_cb (GtkHTML *html, const gchar *url, gpointer data) { #if 0 - char *msg; + gchar *msg; ECalComponentPreview *preview = data; if (url && *url) { @@ -74,20 +74,20 @@ on_url_cb (GtkHTML *html, const char *url, gpointer data) /* Callback used when the user selects a URL in the HTML widget */ void -e_cal_comp_preview_url_requested_cb (GtkHTML *html, const char *url, GtkHTMLStream *html_stream, gpointer data) +e_cal_comp_preview_url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *html_stream, gpointer data) { - int len = strlen ("file:///"); + gint len = strlen ("file:///"); if (!strncmp ("file:///", url, len)) { GFile *file; - const char *path = url + len - 1; + const gchar *path = url + len - 1; g_return_if_fail (html_stream != NULL); g_return_if_fail (path != NULL); file = g_file_new_for_path (path); if (file) { - char buffer[4096]; + gchar buffer[4096]; GInputStream *stream; /* ignore errors here */ @@ -115,13 +115,13 @@ e_cal_comp_preview_url_requested_cb (GtkHTML *html, const char *url, GtkHTMLStre } /* Converts a time_t to a string, relative to the specified timezone */ -static char * +static gchar * timet_to_str_with_zone (ECalComponentDateTime *dt, ECal *ecal, icaltimezone *default_zone) { struct icaltimetype itt; icaltimezone *zone; struct tm tm; - char buf[256]; + gchar buf[256]; if (dt->tzid) { /* If we can't find the zone, we'll guess its "local" */ @@ -153,8 +153,8 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone gchar *str; GSList *l; icalproperty_status status; - const char *location; - int *priority_value; + const gchar *location; + gint *priority_value; g_return_if_fail (E_IS_CAL_COMPONENT (comp)); @@ -177,13 +177,13 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone GSList *node; for (node = l; node != NULL; node = node->next) { - const char *icon_file; + const gchar *icon_file; - icon_file = e_categories_get_icon_file_for ((const char *) node->data); + icon_file = e_categories_get_icon_file_for ((const gchar *) node->data); if (icon_file) { gchar *icon_file_uri = g_filename_to_uri (icon_file, NULL, NULL); gtk_html_stream_printf (stream, "<IMG ALT=\"%s\" SRC=\"%s\">", - (const char *) node->data, icon_file_uri); + (const gchar *) node->data, icon_file_uri); g_free (icon_file_uri); } } @@ -289,7 +289,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone gtk_html_stream_printf (stream, "<TD><TT>"); for (node = l; node != NULL; node = node->next) { - char *html; + gchar *html; text = * (ECalComponentText *) node->data; html = camel_text_to_html (text.value ? text.value : "", CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES | CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES, 0); @@ -306,7 +306,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone } /* URL */ - e_cal_component_get_url (comp, (const char **) &str); + e_cal_component_get_url (comp, (const gchar **) &str); if (str) { gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Web Page:")); gtk_html_stream_printf (stream, "<TD><A HREF=\"%s\">%s</A></TD></TR>", str, str); diff --git a/calendar/gui/e-cal-component-preview.h b/calendar/gui/e-cal-component-preview.h index 4faa7bd29b..86aa99ffc0 100644 --- a/calendar/gui/e-cal-component-preview.h +++ b/calendar/gui/e-cal-component-preview.h @@ -52,7 +52,7 @@ struct _ECalComponentPreviewClass { GtkTableClass parent_class; /* Notification signals */ - void (* selection_changed) (ECalComponentPreview *preview, int n_selected); + void (* selection_changed) (ECalComponentPreview *preview, gint n_selected); }; @@ -66,7 +66,7 @@ void e_cal_component_preview_display (ECalComponentPreview *preview, void e_cal_component_preview_clear (ECalComponentPreview *preview); /* Callback used when GtkHTML widget requests URL */ -void e_cal_comp_preview_url_requested_cb (GtkHTML *html, const char *url, GtkHTMLStream *html_stream, gpointer data); +void e_cal_comp_preview_url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *html_stream, gpointer data); GtkWidget *e_cal_component_preview_get_html (ECalComponentPreview *preview); diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c index fb1d6c28e7..33b6bc9c46 100644 --- a/calendar/gui/e-cal-config.c +++ b/calendar/gui/e-cal-config.c @@ -137,7 +137,7 @@ e_cal_config_get_type (void) } ECalConfig * -e_cal_config_new (int type, const char *menuid) +e_cal_config_new (gint type, const gchar *menuid) { ECalConfig *ecp = g_object_new (e_cal_config_get_type(), NULL); e_config_construct (&ecp->config, type, menuid); @@ -180,7 +180,7 @@ static const EConfigHookTargetMap ecph_targets[] = { static void ecph_class_init (EPluginHookClass *klass) { - int i; + gint i; klass->id = "org.gnome.evolution.calendar.config:1.0"; diff --git a/calendar/gui/e-cal-config.h b/calendar/gui/e-cal-config.h index 15ad617a3d..f9876e7adf 100644 --- a/calendar/gui/e-cal-config.h +++ b/calendar/gui/e-cal-config.h @@ -69,7 +69,7 @@ struct _ECalConfigTargetPrefs { typedef struct _EConfigItem ECalConfigItem; GType e_cal_config_get_type (void); -ECalConfig *e_cal_config_new (int type, const char *menuid); +ECalConfig *e_cal_config_new (gint type, const gchar *menuid); ECalConfigTargetSource *e_cal_config_target_new_source (ECalConfig *ecp, struct _ESource *source); ECalConfigTargetPrefs *e_cal_config_target_new_prefs (ECalConfig *ecp, struct _GConfClient *gconf); diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index db7e9abc89..86bd20e4e7 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -105,7 +105,7 @@ e_cal_event_target_new_component (ECalEvent *ece, struct _CalendarComponent *com /* ********************************************************************** */ -static void *eceh_parent_class; +static gpointer eceh_parent_class; static const EEventHookTargetMask eceh_component_masks[] = { { "migration", E_CAL_EVENT_COMPONENT_MIGRATION }, @@ -126,7 +126,7 @@ eceh_finalize (GObject *o) static void eceh_class_init (EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = eceh_finalize; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.calendar.events:1.0"; diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c index 6eab1f7aac..f62db91985 100644 --- a/calendar/gui/e-cal-list-view.c +++ b/calendar/gui/e-cal-list-view.c @@ -243,9 +243,9 @@ setup_e_table (ECalListView *cal_list_view) g_object_unref (cell); strings = NULL; - strings = g_list_append (strings, (char*) _("Public")); - strings = g_list_append (strings, (char*) _("Private")); - strings = g_list_append (strings, (char*) _("Confidential")); + strings = g_list_append (strings, (gchar *) _("Public")); + strings = g_list_append (strings, (gchar *) _("Private")); + strings = g_list_append (strings, (gchar *) _("Confidential")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); diff --git a/calendar/gui/e-cal-menu.c b/calendar/gui/e-cal-menu.c index b1f5ed91ca..30d287ff6b 100644 --- a/calendar/gui/e-cal-menu.c +++ b/calendar/gui/e-cal-menu.c @@ -33,7 +33,7 @@ #include "gui/e-cal-model.h" #include "itip-utils.h" -static void ecalm_standard_menu_factory(EMenu *emp, void *data); +static void ecalm_standard_menu_factory(EMenu *emp, gpointer data); static GObjectClass *ecalm_parent; @@ -55,7 +55,7 @@ ecalm_target_free(EMenu *ep, EMenuTarget *t) switch (t->type) { case E_CAL_MENU_TARGET_SELECT: { ECalMenuTargetSelect *s = (ECalMenuTargetSelect *)t; - int i; + gint i; for (i=0;i<s->events->len;i++) e_cal_model_free_component_data(s->events->pdata[i]); @@ -97,7 +97,7 @@ e_cal_menu_get_type(void) return type; } -ECalMenu *e_cal_menu_new(const char *menuid) +ECalMenu *e_cal_menu_new(const gchar *menuid) { ECalMenu *emp = g_object_new(e_cal_menu_get_type(), NULL); @@ -194,7 +194,7 @@ e_cal_menu_target_new_select(ECalMenu *eabp, struct _ECalModel *model, GPtrArray } static void -ecalm_standard_menu_factory(EMenu *emp, void *data) +ecalm_standard_menu_factory(EMenu *emp, gpointer data) { /* noop */ } @@ -227,7 +227,7 @@ ecalm_standard_menu_factory(EMenu *emp, void *data) */ -static void *ecalph_parent_class; +static gpointer ecalph_parent_class; #define ecalph ((ECalMenuHook *)eph) static const EMenuHookTargetMask ecalph_select_masks[] = { @@ -262,7 +262,7 @@ ecalph_finalise(GObject *o) static void ecalph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = ecalph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.calendar.bonobomenu:1.0"; diff --git a/calendar/gui/e-cal-menu.h b/calendar/gui/e-cal-menu.h index 5dda63f227..f1d9f4b729 100644 --- a/calendar/gui/e-cal-menu.h +++ b/calendar/gui/e-cal-menu.h @@ -100,7 +100,7 @@ struct _ECalMenuClass { GType e_cal_menu_get_type(void); -ECalMenu *e_cal_menu_new(const char *menuid); +ECalMenu *e_cal_menu_new(const gchar *menuid); ECalMenuTargetSelect *e_cal_menu_target_new_select(ECalMenu *emp, struct _ECalModel *model, GPtrArray *events); diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c index dac641ab4c..25bb9364d3 100644 --- a/calendar/gui/e-cal-model-calendar.c +++ b/calendar/gui/e-cal-model-calendar.c @@ -40,15 +40,15 @@ struct _ECalModelCalendarPrivate { }; static void e_cal_model_calendar_finalize (GObject *object); -static int ecmc_column_count (ETableModel *etm); -static void *ecmc_value_at (ETableModel *etm, int col, int row); -static void ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value); -static gboolean ecmc_is_cell_editable (ETableModel *etm, int col, int row); -static void *ecmc_duplicate_value (ETableModel *etm, int col, const void *value); -static void ecmc_free_value (ETableModel *etm, int col, void *value); -static void *ecmc_initialize_value (ETableModel *etm, int col); -static gboolean ecmc_value_is_empty (ETableModel *etm, int col, const void *value); -static char *ecmc_value_to_string (ETableModel *etm, int col, const void *value); +static gint ecmc_column_count (ETableModel *etm); +static gpointer ecmc_value_at (ETableModel *etm, gint col, gint row); +static void ecmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value); +static gboolean ecmc_is_cell_editable (ETableModel *etm, gint col, gint row); +static gpointer ecmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value); +static void ecmc_free_value (ETableModel *etm, gint col, gpointer value); +static gpointer ecmc_initialize_value (ETableModel *etm, gint col); +static gboolean ecmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value); +static gchar *ecmc_value_to_string (ETableModel *etm, gint col, gconstpointer value); static void ecmc_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data, ETableModel *source_model, gint row); @@ -160,19 +160,19 @@ get_dtend (ECalModelCalendar *model, ECalModelComponent *comp_data) return comp_data->dtend; } -static void * +static gpointer get_location (ECalModelComponent *comp_data) { icalproperty *prop; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_LOCATION_PROPERTY); if (prop) - return (void *) icalproperty_get_location (prop); + return (gpointer) icalproperty_get_location (prop); - return (void *) ""; + return (gpointer) ""; } -static void * +static gpointer get_transparency (ECalModelComponent *comp_data) { icalproperty *prop; @@ -193,8 +193,8 @@ get_transparency (ECalModelComponent *comp_data) return NULL; } -static void * -ecmc_value_at (ETableModel *etm, int col, int row) +static gpointer +ecmc_value_at (ETableModel *etm, gint col, gint row) { ECalModelComponent *comp_data; ECalModelCalendar *model = (ECalModelCalendar *) etm; @@ -209,7 +209,7 @@ ecmc_value_at (ETableModel *etm, int col, int row) comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row); if (!comp_data) - return (void *) ""; + return (gpointer) ""; switch (col) { case E_CAL_MODEL_CALENDAR_FIELD_DTEND : @@ -220,16 +220,16 @@ ecmc_value_at (ETableModel *etm, int col, int row) return get_transparency (comp_data); } - return (void *) ""; + return (gpointer) ""; } static void -set_dtend (ECalModelComponent *comp_data, const void *value) +set_dtend (ECalModelComponent *comp_data, gconstpointer value) { ECellDateEditValue *dv = (ECellDateEditValue *) value; icalproperty *prop; icalparameter *param; - const char *tzid; + const gchar *tzid; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTEND_PROPERTY); if (prop) @@ -265,9 +265,9 @@ set_dtend (ECalModelComponent *comp_data, const void *value) /* If the TZID is set to "UTC", we don't want to save the TZID. */ if (tzid && strcmp (tzid, "UTC")) { if (param) { - icalparameter_set_tzid (param, (char *) tzid); + icalparameter_set_tzid (param, (gchar *) tzid); } else { - param = icalparameter_new_tzid ((char *) tzid); + param = icalparameter_new_tzid ((gchar *) tzid); icalproperty_add_parameter (prop, param); } } else if (param) { @@ -276,7 +276,7 @@ set_dtend (ECalModelComponent *comp_data, const void *value) } static void -set_location (ECalModelComponent *comp_data, const void *value) +set_location (ECalModelComponent *comp_data, gconstpointer value) { icalproperty *prop; @@ -289,16 +289,16 @@ set_location (ECalModelComponent *comp_data, const void *value) } } else { if (prop) - icalproperty_set_location (prop, (const char *) value); + icalproperty_set_location (prop, (const gchar *) value); else { - prop = icalproperty_new_location ((const char *) value); + prop = icalproperty_new_location ((const gchar *) value); icalcomponent_add_property (comp_data->icalcomp, prop); } } } static void -set_transparency (ECalModelComponent *comp_data, const void *value) +set_transparency (ECalModelComponent *comp_data, gconstpointer value) { icalproperty *prop; @@ -335,7 +335,7 @@ set_transparency (ECalModelComponent *comp_data, const void *value) } static void -ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value) +ecmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value) { ECalModelComponent *comp_data; CalObjModType mod = CALOBJ_MOD_ALL; @@ -391,7 +391,7 @@ ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value) if (mod == CALOBJ_MOD_ALL && e_cal_component_is_instance (comp)) { /* Ensure we send the master object, not the instance only */ icalcomponent *icalcomp = NULL; - const char *uid = NULL; + const gchar *uid = NULL; e_cal_component_get_uid (comp, &uid); if (e_cal_get_object (comp_data->client, uid, NULL, &icalcomp, NULL) && icalcomp) { @@ -420,7 +420,7 @@ ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value) } static gboolean -ecmc_is_cell_editable (ETableModel *etm, int col, int row) +ecmc_is_cell_editable (ETableModel *etm, gint col, gint row) { ECalModelCalendar *model = (ECalModelCalendar *) etm; @@ -444,8 +444,8 @@ ecmc_is_cell_editable (ETableModel *etm, int col, int row) return FALSE; } -static void * -ecmc_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +ecmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL); @@ -473,7 +473,7 @@ ecmc_duplicate_value (ETableModel *etm, int col, const void *value) } static void -ecmc_free_value (ETableModel *etm, int col, void *value) +ecmc_free_value (ETableModel *etm, gint col, gpointer value) { g_return_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST); @@ -492,8 +492,8 @@ ecmc_free_value (ETableModel *etm, int col, void *value) } } -static void * -ecmc_initialize_value (ETableModel *etm, int col) +static gpointer +ecmc_initialize_value (ETableModel *etm, gint col) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL); @@ -512,7 +512,7 @@ ecmc_initialize_value (ETableModel *etm, int col) } static gboolean -ecmc_value_is_empty (ETableModel *etm, int col, const void *value) +ecmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, TRUE); @@ -530,8 +530,8 @@ ecmc_value_is_empty (ETableModel *etm, int col, const void *value) return TRUE; } -static char * -ecmc_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +ecmc_value_to_string (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, g_strdup ("")); diff --git a/calendar/gui/e-cal-model-memos.c b/calendar/gui/e-cal-model-memos.c index 95fe5f1572..904868adfe 100644 --- a/calendar/gui/e-cal-model-memos.c +++ b/calendar/gui/e-cal-model-memos.c @@ -36,20 +36,20 @@ #define d(x) (x) struct _ECalModelMemosPrivate { - int dummy; + gint dummy; }; static void e_cal_model_memos_finalize (GObject *object); -static int ecmm_column_count (ETableModel *etm); -static void *ecmm_value_at (ETableModel *etm, int col, int row); -static void ecmm_set_value_at (ETableModel *etm, int col, int row, const void *value); -static gboolean ecmm_is_cell_editable (ETableModel *etm, int col, int row); -static void *ecmm_duplicate_value (ETableModel *etm, int col, const void *value); -static void ecmm_free_value (ETableModel *etm, int col, void *value); -static void *ecmm_initialize_value (ETableModel *etm, int col); -static gboolean ecmm_value_is_empty (ETableModel *etm, int col, const void *value); -static char *ecmm_value_to_string (ETableModel *etm, int col, const void *value); +static gint ecmm_column_count (ETableModel *etm); +static gpointer ecmm_value_at (ETableModel *etm, gint col, gint row); +static void ecmm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value); +static gboolean ecmm_is_cell_editable (ETableModel *etm, gint col, gint row); +static gpointer ecmm_duplicate_value (ETableModel *etm, gint col, gconstpointer value); +static void ecmm_free_value (ETableModel *etm, gint col, gpointer value); +static gpointer ecmm_initialize_value (ETableModel *etm, gint col); +static gboolean ecmm_value_is_empty (ETableModel *etm, gint col, gconstpointer value); +static gchar *ecmm_value_to_string (ETableModel *etm, gint col, gconstpointer value); static void ecmm_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data, ETableModel *source_model, gint row); @@ -114,8 +114,8 @@ ecmm_column_count (ETableModel *etm) return E_CAL_MODEL_MEMOS_FIELD_LAST; } -static void * -ecmm_value_at (ETableModel *etm, int col, int row) +static gpointer +ecmm_value_at (ETableModel *etm, gint col, gint row) { ECalModelComponent *comp_data; ECalModelMemos *model = (ECalModelMemos *) etm; @@ -130,14 +130,14 @@ ecmm_value_at (ETableModel *etm, int col, int row) comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row); if (!comp_data) - return (void *) ""; + return (gpointer) ""; - return (void *) ""; + return (gpointer) ""; } static void -ecmm_set_value_at (ETableModel *etm, int col, int row, const void *value) +ecmm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value) { ECalModelComponent *comp_data; ECalModelMemos *model = (ECalModelMemos *) etm; @@ -166,7 +166,7 @@ ecmm_set_value_at (ETableModel *etm, int col, int row, const void *value) } static gboolean -ecmm_is_cell_editable (ETableModel *etm, int col, int row) +ecmm_is_cell_editable (ETableModel *etm, gint col, gint row) { ECalModelMemos *model = (ECalModelMemos *) etm; gboolean retval = FALSE; @@ -184,8 +184,8 @@ ecmm_is_cell_editable (ETableModel *etm, int col, int row) return retval; } -static void * -ecmm_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +ecmm_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, NULL); @@ -196,7 +196,7 @@ ecmm_duplicate_value (ETableModel *etm, int col, const void *value) } static void -ecmm_free_value (ETableModel *etm, int col, void *value) +ecmm_free_value (ETableModel *etm, gint col, gpointer value) { g_return_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST); @@ -206,8 +206,8 @@ ecmm_free_value (ETableModel *etm, int col, void *value) } } -static void * -ecmm_initialize_value (ETableModel *etm, int col) +static gpointer +ecmm_initialize_value (ETableModel *etm, gint col) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, NULL); @@ -218,7 +218,7 @@ ecmm_initialize_value (ETableModel *etm, int col) } static gboolean -ecmm_value_is_empty (ETableModel *etm, int col, const void *value) +ecmm_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, TRUE); @@ -228,8 +228,8 @@ ecmm_value_is_empty (ETableModel *etm, int col, const void *value) return TRUE; } -static char * -ecmm_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +ecmm_value_to_string (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, g_strdup ("")); diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c index a2b9eb6f2f..3ec7626d77 100644 --- a/calendar/gui/e-cal-model-tasks.c +++ b/calendar/gui/e-cal-model-tasks.c @@ -42,17 +42,17 @@ struct _ECalModelTasksPrivate { static void e_cal_model_tasks_finalize (GObject *object); -static int ecmt_column_count (ETableModel *etm); -static void *ecmt_value_at (ETableModel *etm, int col, int row); -static void ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value); -static gboolean ecmt_is_cell_editable (ETableModel *etm, int col, int row); -static void *ecmt_duplicate_value (ETableModel *etm, int col, const void *value); -static void ecmt_free_value (ETableModel *etm, int col, void *value); -static void *ecmt_initialize_value (ETableModel *etm, int col); -static gboolean ecmt_value_is_empty (ETableModel *etm, int col, const void *value); -static char *ecmt_value_to_string (ETableModel *etm, int col, const void *value); - -static const char *ecmt_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data); +static gint ecmt_column_count (ETableModel *etm); +static gpointer ecmt_value_at (ETableModel *etm, gint col, gint row); +static void ecmt_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value); +static gboolean ecmt_is_cell_editable (ETableModel *etm, gint col, gint row); +static gpointer ecmt_duplicate_value (ETableModel *etm, gint col, gconstpointer value); +static void ecmt_free_value (ETableModel *etm, gint col, gpointer value); +static gpointer ecmt_initialize_value (ETableModel *etm, gint col); +static gboolean ecmt_value_is_empty (ETableModel *etm, gint col, gconstpointer value); +static gchar *ecmt_value_to_string (ETableModel *etm, gint col, gconstpointer value); + +static const gchar *ecmt_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data); static void ecmt_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data, ETableModel *source_model, gint row); static void commit_component_changes (ECalModelComponent *comp_data); @@ -289,7 +289,7 @@ get_due (ECalModelComponent *comp_data) return comp_data->due; } -static void * +static gpointer get_geo (ECalModelComponent *comp_data) { icalproperty *prop; @@ -307,7 +307,7 @@ get_geo (ECalModelComponent *comp_data) return buf; } - return (void *) ""; + return (gpointer) ""; } static int @@ -322,7 +322,7 @@ get_percent (ECalModelComponent *comp_data) return 0; } -static void * +static gpointer get_priority (ECalModelComponent *comp_data) { icalproperty *prop; @@ -331,7 +331,7 @@ get_priority (ECalModelComponent *comp_data) if (prop) return e_cal_util_priority_to_string (icalproperty_get_priority (prop)); - return (void *) ""; + return (gpointer) ""; } static gboolean @@ -344,7 +344,7 @@ is_status_canceled (ECalModelComponent *comp_data) return prop && icalproperty_get_status (prop) == ICAL_STATUS_CANCELLED; } -static void * +static gpointer get_status (ECalModelComponent *comp_data) { icalproperty *prop; @@ -353,33 +353,33 @@ get_status (ECalModelComponent *comp_data) if (prop) { switch (icalproperty_get_status (prop)) { case ICAL_STATUS_NONE: - return (void *) ""; + return (gpointer) ""; case ICAL_STATUS_NEEDSACTION: - return (void *) _("Not Started"); + return (gpointer) _("Not Started"); case ICAL_STATUS_INPROCESS: - return (void *) _("In Progress"); + return (gpointer) _("In Progress"); case ICAL_STATUS_COMPLETED: - return (void *) _("Completed"); + return (gpointer) _("Completed"); case ICAL_STATUS_CANCELLED: - return (void *) _("Canceled"); + return (gpointer) _("Canceled"); default: - return (void *) ""; + return (gpointer) ""; } } - return (void *) ""; + return (gpointer) ""; } -static void * +static gpointer get_url (ECalModelComponent *comp_data) { icalproperty *prop; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_URL_PROPERTY); if (prop) - return (void *) icalproperty_get_url (prop); + return (gpointer) icalproperty_get_url (prop); - return (void *) ""; + return (gpointer) ""; } static gboolean @@ -431,7 +431,7 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data) /* Third, are we overdue as of right now? */ due_tt = icalproperty_get_due (prop); if (due_tt.is_date) { - int cmp; + gint cmp; now_tt = icaltime_current_time_with_zone (e_cal_model_get_timezone (E_CAL_MODEL (model))); cmp = icaltime_compare_date_only (due_tt, now_tt); @@ -444,7 +444,7 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data) return E_CAL_MODEL_TASKS_DUE_FUTURE; } else { icalparameter *param; - const char *tzid; + const gchar *tzid; if(!(param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER))) return E_CAL_MODEL_TASKS_DUE_FUTURE; @@ -483,8 +483,8 @@ is_overdue (ECalModelTasks *model, ECalModelComponent *comp_data) return FALSE; } -static void * -ecmt_value_at (ETableModel *etm, int col, int row) +static gpointer +ecmt_value_at (ETableModel *etm, gint col, gint row) { ECalModelComponent *comp_data; ECalModelTasks *model = (ECalModelTasks *) etm; @@ -499,7 +499,7 @@ ecmt_value_at (ETableModel *etm, int col, int row) comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row); if (!comp_data) - return (void *) ""; + return (gpointer) ""; switch (col) { case E_CAL_MODEL_TASKS_FIELD_COMPLETED : @@ -524,11 +524,11 @@ ecmt_value_at (ETableModel *etm, int col, int row) return get_url (comp_data); } - return (void *) ""; + return (gpointer) ""; } static void -set_completed (ECalModelTasks *model, ECalModelComponent *comp_data, const void *value) +set_completed (ECalModelTasks *model, ECalModelComponent *comp_data, gconstpointer value) { ECellDateEditValue *dv = (ECellDateEditValue *) value; @@ -553,7 +553,7 @@ set_completed (ECalModelTasks *model, ECalModelComponent *comp_data, const void } static void -set_complete (ECalModelComponent *comp_data, const void *value) +set_complete (ECalModelComponent *comp_data, gconstpointer value) { gint state = GPOINTER_TO_INT (value); @@ -564,12 +564,12 @@ set_complete (ECalModelComponent *comp_data, const void *value) } static void -set_due (ECalModelComponent *comp_data, const void *value) +set_due (ECalModelComponent *comp_data, gconstpointer value) { ECellDateEditValue *dv = (ECellDateEditValue *) value; icalproperty *prop; icalparameter *param; - const char *tzid; + const gchar *tzid; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DUE_PROPERTY); if (prop) @@ -605,9 +605,9 @@ set_due (ECalModelComponent *comp_data, const void *value) /* If the TZID is set to "UTC", we don't want to save the TZID. */ if (tzid && strcmp (tzid, "UTC")) { if (param) { - icalparameter_set_tzid (param, (char *) tzid); + icalparameter_set_tzid (param, (gchar *) tzid); } else { - param = icalparameter_new_tzid ((char *) tzid); + param = icalparameter_new_tzid ((gchar *) tzid); icalproperty_add_parameter (prop, param); } } else if (param) { @@ -630,10 +630,10 @@ show_geo_warning (void) } static void -set_geo (ECalModelComponent *comp_data, const char *value) +set_geo (ECalModelComponent *comp_data, const gchar *value) { double latitude, longitude; - int matched; + gint matched; struct icalgeotype geo; icalproperty *prop; @@ -662,7 +662,7 @@ set_geo (ECalModelComponent *comp_data, const char *value) } static void -set_status (ECalModelComponent *comp_data, const char *value) +set_status (ECalModelComponent *comp_data, const gchar *value) { icalproperty_status status; icalproperty *prop; @@ -716,7 +716,7 @@ set_status (ECalModelComponent *comp_data, const char *value) } static void -set_percent (ECalModelComponent *comp_data, const void *value) +set_percent (ECalModelComponent *comp_data, gconstpointer value) { icalproperty *prop; gint percent = GPOINTER_TO_INT (value); @@ -758,10 +758,10 @@ set_percent (ECalModelComponent *comp_data, const void *value) } static void -set_priority (ECalModelComponent *comp_data, const char *value) +set_priority (ECalModelComponent *comp_data, const gchar *value) { icalproperty *prop; - int priority; + gint priority; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PRIORITY_PROPERTY); @@ -780,7 +780,7 @@ set_priority (ECalModelComponent *comp_data, const char *value) } static void -set_url (ECalModelComponent *comp_data, const char *value) +set_url (ECalModelComponent *comp_data, const gchar *value) { icalproperty *prop; @@ -802,7 +802,7 @@ set_url (ECalModelComponent *comp_data, const char *value) } static void -ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value) +ecmt_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value) { ECalModelComponent *comp_data; ECalModelTasks *model = (ECalModelTasks *) etm; @@ -852,7 +852,7 @@ ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value) } static gboolean -ecmt_is_cell_editable (ETableModel *etm, int col, int row) +ecmt_is_cell_editable (ETableModel *etm, gint col, gint row) { ECalModelTasks *model = (ECalModelTasks *) etm; @@ -882,8 +882,8 @@ ecmt_is_cell_editable (ETableModel *etm, int col, int row) return FALSE; } -static void * -ecmt_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +ecmt_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, NULL); @@ -912,14 +912,14 @@ ecmt_duplicate_value (ETableModel *etm, int col, const void *value) case E_CAL_MODEL_TASKS_FIELD_COMPLETE : case E_CAL_MODEL_TASKS_FIELD_PERCENT : case E_CAL_MODEL_TASKS_FIELD_OVERDUE : - return (void *) value; + return (gpointer) value; } return NULL; } static void -ecmt_free_value (ETableModel *etm, int col, void *value) +ecmt_free_value (ETableModel *etm, gint col, gpointer value) { g_return_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST); @@ -945,8 +945,8 @@ ecmt_free_value (ETableModel *etm, int col, void *value) } } -static void * -ecmt_initialize_value (ETableModel *etm, int col) +static gpointer +ecmt_initialize_value (ETableModel *etm, gint col) { ECalModelTasks *model = (ECalModelTasks *) etm; @@ -975,7 +975,7 @@ ecmt_initialize_value (ETableModel *etm, int col) } static gboolean -ecmt_value_is_empty (ETableModel *etm, int col, const void *value) +ecmt_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ECalModelTasks *model = (ECalModelTasks *) etm; @@ -1004,8 +1004,8 @@ ecmt_value_is_empty (ETableModel *etm, int col, const void *value) return TRUE; } -static char * -ecmt_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +ecmt_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ECalModelTasks *model = (ECalModelTasks *) etm; @@ -1039,7 +1039,7 @@ ecmt_value_to_string (ETableModel *etm, int col, const void *value) /* ECalModel class methods */ -static const char * +static const gchar * ecmt_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data) { static gchar color_spec[16]; @@ -1077,7 +1077,7 @@ static void ecmt_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data, ETableModel *source_model, gint row) { - void *value; + gpointer value; g_return_if_fail (E_IS_CAL_MODEL_TASKS (model)); g_return_if_fail (comp_data != NULL); diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 19844a7560..df41fa5fae 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -90,19 +90,19 @@ struct _ECalModelPrivate { static void e_cal_model_dispose (GObject *object); static void e_cal_model_finalize (GObject *object); -static int ecm_column_count (ETableModel *etm); -static int ecm_row_count (ETableModel *etm); -static void *ecm_value_at (ETableModel *etm, int col, int row); -static void ecm_set_value_at (ETableModel *etm, int col, int row, const void *value); -static gboolean ecm_is_cell_editable (ETableModel *etm, int col, int row); -static void ecm_append_row (ETableModel *etm, ETableModel *source, int row); -static void *ecm_duplicate_value (ETableModel *etm, int col, const void *value); -static void ecm_free_value (ETableModel *etm, int col, void *value); -static void *ecm_initialize_value (ETableModel *etm, int col); -static gboolean ecm_value_is_empty (ETableModel *etm, int col, const void *value); -static char *ecm_value_to_string (ETableModel *etm, int col, const void *value); - -static const char *ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data); +static gint ecm_column_count (ETableModel *etm); +static gint ecm_row_count (ETableModel *etm); +static gpointer ecm_value_at (ETableModel *etm, gint col, gint row); +static void ecm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value); +static gboolean ecm_is_cell_editable (ETableModel *etm, gint col, gint row); +static void ecm_append_row (ETableModel *etm, ETableModel *source, gint row); +static gpointer ecm_duplicate_value (ETableModel *etm, gint col, gconstpointer value); +static void ecm_free_value (ETableModel *etm, gint col, gpointer value); +static gpointer ecm_initialize_value (ETableModel *etm, gint col); +static gboolean ecm_value_is_empty (ETableModel *etm, gint col, gconstpointer value); +static gchar *ecm_value_to_string (ETableModel *etm, gint col, gconstpointer value); + +static const gchar *ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data); static ECalModelClient *add_new_client (ECalModel *model, ECal *client, gboolean do_query); static ECalModelClient *find_client_data (ECalModel *model, ECal *client); @@ -317,19 +317,19 @@ ecm_row_count (ETableModel *etm) return priv->objects->len; } -static void * +static gpointer get_categories (ECalModelComponent *comp_data) { icalproperty *prop; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_CATEGORIES_PROPERTY); if (prop) - return (void *) icalproperty_get_categories (prop); + return (gpointer) icalproperty_get_categories (prop); - return (void *) ""; + return (gpointer) ""; } -static char * +static gchar * get_classification (ECalModelComponent *comp_data) { icalproperty *prop; @@ -355,7 +355,7 @@ get_classification (ECalModelComponent *comp_data) } } -static const char * +static const gchar * get_color (ECalModel *model, ECalModelComponent *comp_data) { g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL); @@ -363,7 +363,7 @@ get_color (ECalModel *model, ECalModelComponent *comp_data) return e_cal_model_get_color_for_component (model, comp_data); } -static void * +static gpointer get_description (ECalModelComponent *comp_data) { icalproperty *prop; @@ -384,7 +384,7 @@ get_description (ECalModelComponent *comp_data) return str->str; } - return (void *) ""; + return (gpointer) ""; } static ECellDateEditValue* @@ -472,26 +472,26 @@ get_datetime_from_utc (ECalModel *model, ECalModelComponent *comp_data, icalprop return res; } -static void * +static gpointer get_summary (ECalModelComponent *comp_data) { icalproperty *prop; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_SUMMARY_PROPERTY); if (prop) - return (void *) icalproperty_get_summary (prop); + return (gpointer) icalproperty_get_summary (prop); - return (void *) ""; + return (gpointer) ""; } -static char * +static gchar * get_uid (ECalModelComponent *comp_data) { - return (char *) icalcomponent_get_uid (comp_data->icalcomp); + return (gchar *) icalcomponent_get_uid (comp_data->icalcomp); } -static void * -ecm_value_at (ETableModel *etm, int col, int row) +static gpointer +ecm_value_at (ETableModel *etm, gint col, gint row) { ECalModelPrivate *priv; ECalModelComponent *comp_data; @@ -514,17 +514,17 @@ ecm_value_at (ETableModel *etm, int col, int row) case E_CAL_MODEL_FIELD_CLASSIFICATION : return get_classification (comp_data); case E_CAL_MODEL_FIELD_COLOR : - return (void *) get_color (model, comp_data); + return (gpointer) get_color (model, comp_data); case E_CAL_MODEL_FIELD_COMPONENT : return comp_data->icalcomp; case E_CAL_MODEL_FIELD_DESCRIPTION : return get_description (comp_data); case E_CAL_MODEL_FIELD_DTSTART : - return (void *) get_dtstart (model, comp_data); + return (gpointer) get_dtstart (model, comp_data); case E_CAL_MODEL_FIELD_CREATED : - return (void *) get_datetime_from_utc (model, comp_data, ICAL_CREATED_PROPERTY, icalproperty_get_created, &comp_data->created); + return (gpointer) get_datetime_from_utc (model, comp_data, ICAL_CREATED_PROPERTY, icalproperty_get_created, &comp_data->created); case E_CAL_MODEL_FIELD_LASTMODIFIED : - return (void *) get_datetime_from_utc (model, comp_data, ICAL_LASTMODIFIED_PROPERTY, icalproperty_get_lastmodified, &comp_data->lastmodified); + return (gpointer) get_datetime_from_utc (model, comp_data, ICAL_LASTMODIFIED_PROPERTY, icalproperty_get_lastmodified, &comp_data->lastmodified); case E_CAL_MODEL_FIELD_HAS_ALARMS : return GINT_TO_POINTER ((icalcomponent_get_first_component (comp_data->icalcomp, ICAL_VALARM_COMPONENT) != NULL)); @@ -552,7 +552,7 @@ ecm_value_at (ETableModel *etm, int col, int row) e_cal_component_get_attendee_list (comp, &attendees); for (sl = attendees; sl != NULL; sl = sl->next) { ECalComponentAttendee *ca = sl->data; - const char *text; + const gchar *text; text = itip_strip_mailto (ca->value); if (e_account_list_find (priv->accounts, E_ACCOUNT_FIND_ID_ADDRESS, text) != NULL) { @@ -579,11 +579,11 @@ ecm_value_at (ETableModel *etm, int col, int row) return get_uid (comp_data); } - return (void *) ""; + return (gpointer) ""; } static void -set_categories (ECalModelComponent *comp_data, const char *value) +set_categories (ECalModelComponent *comp_data, const gchar *value) { icalproperty *prop; @@ -603,7 +603,7 @@ set_categories (ECalModelComponent *comp_data, const char *value) } static void -set_classification (ECalModelComponent *comp_data, const char *value) +set_classification (ECalModelComponent *comp_data, const gchar *value) { icalproperty *prop; @@ -634,7 +634,7 @@ set_classification (ECalModelComponent *comp_data, const char *value) } static void -set_description (ECalModelComponent *comp_data, const char *value) +set_description (ECalModelComponent *comp_data, const gchar *value) { icalproperty *prop; @@ -660,12 +660,12 @@ set_description (ECalModelComponent *comp_data, const char *value) } static void -set_dtstart (ECalModel *model, ECalModelComponent *comp_data, const void *value) +set_dtstart (ECalModel *model, ECalModelComponent *comp_data, gconstpointer value) { ECellDateEditValue *dv = (ECellDateEditValue *) value; icalproperty *prop; icalparameter *param; - const char *tzid; + const gchar *tzid; prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY); if (prop) @@ -701,9 +701,9 @@ set_dtstart (ECalModel *model, ECalModelComponent *comp_data, const void *value) /* If the TZID is set to "UTC", we don't want to save the TZID. */ if (tzid && strcmp (tzid, "UTC")) { if (param) { - icalparameter_set_tzid (param, (char *) tzid); + icalparameter_set_tzid (param, (gchar *) tzid); } else { - param = icalparameter_new_tzid ((char *) tzid); + param = icalparameter_new_tzid ((gchar *) tzid); icalproperty_add_parameter (prop, param); } } else if (param) { @@ -712,7 +712,7 @@ set_dtstart (ECalModel *model, ECalModelComponent *comp_data, const void *value) } static void -set_summary (ECalModelComponent *comp_data, const char *value) +set_summary (ECalModelComponent *comp_data, const gchar *value) { icalproperty *prop; @@ -734,7 +734,7 @@ set_summary (ECalModelComponent *comp_data, const char *value) } static void -ecm_set_value_at (ETableModel *etm, int col, int row, const void *value) +ecm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value) { ECalModelPrivate *priv; ECalModelComponent *comp_data; @@ -785,7 +785,7 @@ ecm_set_value_at (ETableModel *etm, int col, int row, const void *value) * @return Whether row is editable or not. **/ gboolean -e_cal_model_test_row_editable (ECalModel *model, int row) +e_cal_model_test_row_editable (ECalModel *model, gint row) { gboolean readonly; ECal *cal = NULL; @@ -812,7 +812,7 @@ e_cal_model_test_row_editable (ECalModel *model, int row) } static gboolean -ecm_is_cell_editable (ETableModel *etm, int col, int row) +ecm_is_cell_editable (ETableModel *etm, gint col, gint row) { ECalModelPrivate *priv; ECalModel *model = (ECalModel *) etm; @@ -840,7 +840,7 @@ ecm_is_cell_editable (ETableModel *etm, int col, int row) } static void -ecm_append_row (ETableModel *etm, ETableModel *source, int row) +ecm_append_row (ETableModel *etm, ETableModel *source, gint row) { ECalModelClass *model_class; ECalModelComponent comp_data; @@ -901,8 +901,8 @@ ecm_append_row (ETableModel *etm, ETableModel *source, int row) g_signal_emit (G_OBJECT (model), signals[ROW_APPENDED], 0); } -static void * -ecm_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +ecm_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, NULL); @@ -915,7 +915,7 @@ ecm_duplicate_value (ETableModel *etm, int col, const void *value) case E_CAL_MODEL_FIELD_HAS_ALARMS : case E_CAL_MODEL_FIELD_ICON : case E_CAL_MODEL_FIELD_COLOR : - return (void *) value; + return (gpointer) value; case E_CAL_MODEL_FIELD_COMPONENT : return icalcomponent_new_clone ((icalcomponent *) value); case E_CAL_MODEL_FIELD_DTSTART : @@ -937,7 +937,7 @@ ecm_duplicate_value (ETableModel *etm, int col, const void *value) } static void -ecm_free_value (ETableModel *etm, int col, void *value) +ecm_free_value (ETableModel *etm, gint col, gpointer value) { g_return_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST); @@ -966,8 +966,8 @@ ecm_free_value (ETableModel *etm, int col, void *value) } } -static void * -ecm_initialize_value (ETableModel *etm, int col) +static gpointer +ecm_initialize_value (ETableModel *etm, gint col) { ECalModelPrivate *priv; ECalModel *model = (ECalModel *) etm; @@ -998,7 +998,7 @@ ecm_initialize_value (ETableModel *etm, int col) } static gboolean -ecm_value_is_empty (ETableModel *etm, int col, const void *value) +ecm_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ECalModelPrivate *priv; ECalModel *model = (ECalModel *) etm; @@ -1038,8 +1038,8 @@ ecm_value_is_empty (ETableModel *etm, int col, const void *value) return TRUE; } -static char * -ecm_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +ecm_value_to_string (ETableModel *etm, gint col, gconstpointer value) { g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, g_strdup ("")); @@ -1077,7 +1077,7 @@ typedef struct { GList *uris; } AssignedColorData; -static const char * +static const gchar * ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data) { ESource *source; @@ -1115,7 +1115,7 @@ ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data) } for (l = assigned_colors[i].uris; l != NULL; l = l->next) { - if (!strcmp ((const char *) l->data, + if (!strcmp ((const gchar *) l->data, e_cal_get_uri (comp_data->client))) { return assigned_colors[i].color; @@ -1341,7 +1341,7 @@ e_cal_model_get_client_list (ECalModel *model) * @uri: Uri for the client to get. */ ECal * -e_cal_model_get_client_for_uri (ECalModel *model, const char *uri) +e_cal_model_get_client_for_uri (ECalModel *model, const gchar *uri) { GList *l; @@ -1385,8 +1385,8 @@ search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalCompone ECalModelComponent *comp_data = g_ptr_array_index (priv->objects, i); if (comp_data) { - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; struct icaltimetype icalrid; gboolean has_rid = (id->rid && *id->rid); @@ -1518,7 +1518,7 @@ e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data /* remove the components if they are already present and re-add them */ while ((comp_data = search_by_id_and_client (priv, client, id))) { - int pos; + gint pos; GSList *list = NULL; pos = get_position_in_array (priv->objects, comp_data); @@ -1579,7 +1579,7 @@ e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_d if (!e_cal_util_component_is_instance (l->data) && e_cal_util_component_has_recurrences (l->data) && (priv->flags & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES)) list = g_list_prepend (list, l->data); else { - int pos; + gint pos; ECalModelComponent *comp_data; ECalComponentId *id; ECalComponent *comp = e_cal_component_new (); @@ -1660,7 +1660,7 @@ e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer user_data) for (l = ids; l; l = l->next) { ECalModelComponent *comp_data = NULL; ECalComponentId *id = l->data; - int pos; + gint pos; /* make sure we remove all objects with this UID */ while ((comp_data = search_by_id_and_client (priv, e_cal_view_get_client (query), id))) { @@ -1687,7 +1687,7 @@ e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer user_data) } static void -e_cal_view_progress_cb (ECalView *query, const char *message, int percent, gpointer user_data) +e_cal_view_progress_cb (ECalView *query, const gchar *message, gint percent, gpointer user_data) { ECalModel *model = (ECalModel *) user_data; ECal *client = e_cal_view_get_client (query); @@ -1861,7 +1861,7 @@ e_cal_model_add_client (ECalModel *model, ECal *client) static void remove_client_objects (ECalModel *model, ECalModelClient *client_data) { - int i; + gint i; /* remove all objects belonging to this client */ for (i = model->priv->objects->len; i > 0; i--) { @@ -1981,7 +1981,7 @@ redo_queries (ECalModel *model) ECalModelPrivate *priv; GList *l; GSList *slist; - int len; + gint len; priv = model->priv; @@ -1989,7 +1989,7 @@ redo_queries (ECalModel *model) g_free (priv->full_sexp); if (priv->start != -1 && priv->end != -1) { - char *iso_start, *iso_end; + gchar *iso_start, *iso_end; iso_start = isodate_from_time_t (priv->start); iso_end = isodate_from_time_t (priv->end); @@ -2068,7 +2068,7 @@ e_cal_model_set_time_range (ECalModel *model, time_t start, time_t end) redo_queries (model); } -const char * +const gchar * e_cal_model_get_search_query (ECalModel *model) { ECalModelPrivate *priv; @@ -2085,7 +2085,7 @@ e_cal_model_get_search_query (ECalModel *model) * e_cal_model_set_query */ void -e_cal_model_set_search_query (ECalModel *model, const char *sexp) +e_cal_model_set_search_query (ECalModel *model, const gchar *sexp) { ECalModelPrivate *priv; @@ -2108,7 +2108,7 @@ e_cal_model_set_search_query (ECalModel *model, const char *sexp) * e_cal_model_set_query */ void -e_cal_model_set_search_query_with_time_range (ECalModel *model, const char *sexp, time_t start, time_t end) +e_cal_model_set_search_query_with_time_range (ECalModel *model, const gchar *sexp, time_t start, time_t end) { ECalModelPrivate *priv; gboolean do_query = FALSE; @@ -2178,7 +2178,7 @@ e_cal_model_create_component_with_defaults (ECalModel *model) /* make sure the component has an UID */ if (!icalcomponent_get_uid (icalcomp)) { - char *uid; + gchar *uid; uid = e_cal_component_gen_uid (); icalcomponent_set_uid (icalcomp, uid); @@ -2268,14 +2268,14 @@ e_cal_model_get_component_for_uid (ECalModel *model, const ECalComponentId *id) /** * e_cal_model_date_value_to_string */ -gchar* -e_cal_model_date_value_to_string (ECalModel *model, const void *value) +gchar * +e_cal_model_date_value_to_string (ECalModel *model, gconstpointer value) { ECalModelPrivate *priv; ECellDateEditValue *dv = (ECellDateEditValue *) value; struct icaltimetype tt; struct tm tmp_tm; - char buffer[64]; + gchar buffer[64]; g_return_val_if_fail (E_IS_CAL_MODEL (model), g_strdup ("")); @@ -2320,7 +2320,7 @@ copy_ecdv (ECellDateEditValue *ecdv) struct _ECalModelComponentPrivate { - char nouse; + gchar nouse; }; static void e_cal_model_component_finalize (GObject *object); @@ -2517,7 +2517,7 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER); if (param) { - const char *tzid = NULL; + const gchar *tzid = NULL; icaltimezone *st_zone = NULL; tzid = icalparameter_get_tzid (param); @@ -2541,7 +2541,7 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER); if (param) { - const char *tzid = NULL; + const gchar *tzid = NULL; icaltimezone *end_zone = NULL; tzid = icalparameter_get_tzid (param); diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h index 4b266b6a5e..2c470840c8 100644 --- a/calendar/gui/e-cal-model.h +++ b/calendar/gui/e-cal-model.h @@ -121,7 +121,7 @@ typedef struct { void (* time_range_changed) (ECalModel *model, time_t start, time_t end); void (* row_appended) (ECalModel *model); void (* comps_deleted) (ECalModel *model, gpointer list); - void (* cal_view_progress) (ECalModel *model, const char *message, int progress, ECalSourceType type); + void (* cal_view_progress) (ECalModel *model, const gchar *message, gint progress, ECalSourceType type); void (* cal_view_done) (ECalModel *model, ECalendarStatus status, ECalSourceType type); } ECalModelClass; @@ -148,7 +148,7 @@ void e_cal_model_set_default_client (ECalModel ECal *client); GList *e_cal_model_get_client_list (ECalModel *model); ECal *e_cal_model_get_client_for_uri (ECalModel *model, - const char *uri); + const gchar *uri); void e_cal_model_add_client (ECalModel *model, ECal *client); void e_cal_model_remove_client (ECalModel *model, @@ -160,7 +160,7 @@ void e_cal_model_get_time_range (ECalModel void e_cal_model_set_time_range (ECalModel *model, time_t start, time_t end); -const char *e_cal_model_get_search_query (ECalModel *model); +const gchar *e_cal_model_get_search_query (ECalModel *model); void e_cal_model_set_search_query (ECalModel *model, const gchar *sexp); icalcomponent *e_cal_model_create_component_with_defaults (ECalModel *model); @@ -186,9 +186,9 @@ void e_cal_model_generate_instances (ECalModel gpointer cb_data); GPtrArray * e_cal_model_get_object_array (ECalModel *model); void e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezone *zone); -void e_cal_model_set_search_query_with_time_range (ECalModel *model, const char *sexp, time_t start, time_t end); +void e_cal_model_set_search_query_with_time_range (ECalModel *model, const gchar *sexp, time_t start, time_t end); -gboolean e_cal_model_test_row_editable (ECalModel *model, int row); +gboolean e_cal_model_test_row_editable (ECalModel *model, gint row); void e_cal_model_set_default_time_func (ECalModel *model, ECalModelDefaultTimeFunc func, gpointer user_data); diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index 76dcb94e19..ef94eb8ab2 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -67,7 +67,7 @@ ecalp_target_free(EPopup *ep, EPopupTarget *t) switch (t->type) { case E_CAL_POPUP_TARGET_SELECT: { ECalPopupTargetSelect *s = (ECalPopupTargetSelect *)t; - int i; + gint i; for (i=0;i<s->events->len;i++) e_cal_model_free_component_data(s->events->pdata[i]); @@ -114,7 +114,7 @@ e_cal_popup_get_type(void) return type; } -ECalPopup *e_cal_popup_new(const char *menuid) +ECalPopup *e_cal_popup_new(const gchar *menuid) { ECalPopup *eabp = g_object_new(e_cal_popup_get_type(), NULL); @@ -124,7 +124,7 @@ ECalPopup *e_cal_popup_new(const char *menuid) } static icalproperty * -get_attendee_prop (icalcomponent *icalcomp, const char *address) +get_attendee_prop (icalcomponent *icalcomp, const gchar *address) { icalproperty *prop; @@ -135,7 +135,7 @@ get_attendee_prop (icalcomponent *icalcomp, const char *address) for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY); prop; prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) { - const char *attendee = icalproperty_get_attendee (prop); + const gchar *attendee = icalproperty_get_attendee (prop); if (g_str_equal (itip_strip_mailto (attendee), address)) { return prop; @@ -145,11 +145,11 @@ get_attendee_prop (icalcomponent *icalcomp, const char *address) } static gboolean -is_delegated (icalcomponent *icalcomp, char *user_email) +is_delegated (icalcomponent *icalcomp, gchar *user_email) { icalproperty *prop; icalparameter *param; - const char *delto = NULL; + const gchar *delto = NULL; prop = get_attendee_prop (icalcomp, user_email); @@ -163,7 +163,7 @@ is_delegated (icalcomponent *icalcomp, char *user_email) prop = get_attendee_prop (icalcomp, itip_strip_mailto (delto)); if (prop) { - const char *delfrom = NULL; + const gchar *delfrom = NULL; icalparameter_partstat status = ICAL_PARTSTAT_NONE; param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER); @@ -181,7 +181,7 @@ is_delegated (icalcomponent *icalcomp, char *user_email) } static gboolean -needs_to_accept (icalcomponent *icalcomp, char *user_email) +needs_to_accept (icalcomponent *icalcomp, gchar *user_email) { icalproperty *prop; icalparameter *param; @@ -233,7 +233,7 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr } else { ECalModelComponent *comp_data = (ECalModelComponent *)t->events->pdata[0]; ECalComponent *comp; - char *user_email = NULL; + gchar *user_email = NULL; comp = e_cal_component_new (); e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp)); @@ -243,7 +243,7 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr if (t->events->len == 1) mask &= ~E_CAL_POPUP_SELECT_ONE; else { - int i=0; + gint i=0; mask &= ~E_CAL_POPUP_SELECT_MANY; /* Now check for any incomplete tasks and set the flags*/ @@ -334,11 +334,11 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector) { ECalPopupTargetSource *t = e_popup_target_new(&eabp->popup, E_CAL_POPUP_TARGET_SOURCE, sizeof(*t)); guint32 mask = ~0; - const char *relative_uri; - char *uri; + const gchar *relative_uri; + gchar *uri; ESource *source; - const char *offline = NULL; - const char *delete = NULL; + const gchar *offline = NULL; + const gchar *delete = NULL; /* TODO: this is duplicated for addressbook too */ @@ -410,7 +410,7 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector) */ -static void *ecalph_parent_class; +static gpointer ecalph_parent_class; #define ecalph ((ECalPopupHook *)eph) static const EPopupHookTargetMask ecalph_select_masks[] = { @@ -473,7 +473,7 @@ ecalph_finalise(GObject *o) static void ecalph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = ecalph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.calendar.popup:1.0"; diff --git a/calendar/gui/e-cal-popup.h b/calendar/gui/e-cal-popup.h index 5c68b4829b..9887c66366 100644 --- a/calendar/gui/e-cal-popup.h +++ b/calendar/gui/e-cal-popup.h @@ -191,7 +191,7 @@ struct _ECalPopupClass { GType e_cal_popup_get_type(void); -ECalPopup *e_cal_popup_new(const char *menuid); +ECalPopup *e_cal_popup_new(const gchar *menuid); ECalPopupTargetSelect *e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArray *events); ECalPopupTargetSource *e_cal_popup_target_new_source(ECalPopup *eabp, struct _ESourceSelector *selector); diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index b8ce8d1c29..27cf7dbfeb 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -105,10 +105,10 @@ static gint e_calendar_table_on_key_press (ETable *table, static struct tm e_calendar_table_get_current_time (ECellDateEdit *ecde, gpointer data); -static void mark_as_complete_cb (EPopup *ep, EPopupItem *pitem, void *data); +static void mark_as_complete_cb (EPopup *ep, EPopupItem *pitem, gpointer data); -static void hide_completed_rows (ECalModel *model, GList *clients_list, char *hide_sexp, GPtrArray *comp_objects); -static void show_completed_rows (ECalModel *model, GList *clients_list, char *show_sexp, GPtrArray *comp_objects); +static void hide_completed_rows (ECalModel *model, GList *clients_list, gchar *hide_sexp, GPtrArray *comp_objects); +static void show_completed_rows (ECalModel *model, GList *clients_list, gchar *show_sexp, GPtrArray *comp_objects); /* Signal IDs */ enum { @@ -120,7 +120,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; /* The icons to represent the task. */ #define E_CALENDAR_MODEL_NUM_ICONS 4 -static const char* icon_names[E_CALENDAR_MODEL_NUM_ICONS] = { +static const gchar * icon_names[E_CALENDAR_MODEL_NUM_ICONS] = { "stock_task", "stock_task-recurring", "stock_task-assigned", "stock_task-assigned-to" }; static GdkPixbuf* icon_pixbufs[E_CALENDAR_MODEL_NUM_ICONS] = { NULL }; @@ -184,9 +184,9 @@ date_compare_cb (gconstpointer a, gconstpointer b) static gint percent_compare_cb (gconstpointer a, gconstpointer b) { - int percent1 = GPOINTER_TO_INT (a); - int percent2 = GPOINTER_TO_INT (b); - int retval; + gint percent1 = GPOINTER_TO_INT (a); + gint percent2 = GPOINTER_TO_INT (b); + gint retval; if (percent1 > percent2) retval = 1; @@ -201,10 +201,10 @@ percent_compare_cb (gconstpointer a, gconstpointer b) static gint priority_compare_cb (gconstpointer a, gconstpointer b) { - int priority1, priority2; + gint priority1, priority2; - priority1 = e_cal_util_priority_from_string ((const char*) a); - priority2 = e_cal_util_priority_from_string ((const char*) b); + priority1 = e_cal_util_priority_from_string ((const gchar *) a); + priority2 = e_cal_util_priority_from_string ((const gchar *) b); /* We change undefined priorities so they appear after 'Low'. */ if (priority1 <= 0) @@ -222,9 +222,9 @@ priority_compare_cb (gconstpointer a, gconstpointer b) } static gint -status_from_string (const char *str) +status_from_string (const gchar *str) { - int status = -2; + gint status = -2; if (!str || !str[0]) status = -1; @@ -243,8 +243,8 @@ status_from_string (const char *str) static gint status_compare_cb (gconstpointer a, gconstpointer b) { - int sa = status_from_string ((const char *)a); - int sb = status_from_string ((const char *)b); + gint sa = status_from_string ((const gchar *)a); + gint sb = status_from_string ((const gchar *)b); if (sa < sb) return -1; @@ -261,7 +261,7 @@ row_appended_cb (ECalModel *model, ECalendarTable *cal_table) } static void -get_time_as_text (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone, char *buff, int buff_len) +get_time_as_text (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone, gchar *buff, gint buff_len) { struct tm tmp_tm; @@ -278,20 +278,20 @@ gboolean ec_query_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, GtkWidget *etable_wgt, ECalModel *model) { ECalModelComponent *comp; - int row = -1, col = -1; + gint row = -1, col = -1; GtkWidget *box, *l, *w; GtkStyle *style = gtk_widget_get_default_style (); - char *tmp; - const char *str; + gchar *tmp; + const gchar *str; GString *tmp2; - char buff[1001]; + gchar buff[1001]; gboolean free_text = FALSE; ECalComponent *new_comp; ECalComponentOrganizer organizer; ECalComponentDateTime dtstart, dtdue; icaltimezone *zone, *default_zone; GSList *desc, *p; - int len; + gint len; ETable *etable; ESelectionModel *esm; @@ -329,7 +329,7 @@ ec_query_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, Gtk str = e_calendar_view_get_icalcomponent_summary (comp->client, comp->icalcomp, &free_text); if (!(str && *str)) { if (free_text) - g_free ((char *)str); + g_free ((gchar *)str); free_text = FALSE; str = _("* No Summary *"); } @@ -348,7 +348,7 @@ ec_query_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, Gtk g_free (tmp); if (free_text) - g_free ((char *)str); + g_free ((gchar *)str); free_text = FALSE; w = gtk_event_box_new (); @@ -361,7 +361,7 @@ ec_query_tooltip (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, Gtk e_cal_component_get_organizer (new_comp, &organizer); if (organizer.cn) { - char *ptr ; + gchar *ptr ; ptr = strchr( organizer.value, ':'); if (ptr) { @@ -496,7 +496,7 @@ e_calendar_table_init (ECalendarTable *cal_table) GdkPixbuf *pixbuf; GList *strings; AtkObject *a11y; - char *etspecfile; + gchar *etspecfile; /* Create the model */ @@ -561,9 +561,9 @@ e_calendar_table_init (ECalendarTable *cal_table) g_object_unref (cell); strings = NULL; - strings = g_list_append (strings, (char*) _("Public")); - strings = g_list_append (strings, (char*) _("Private")); - strings = g_list_append (strings, (char*) _("Confidential")); + strings = g_list_append (strings, (gchar *) _("Public")); + strings = g_list_append (strings, (gchar *) _("Private")); + strings = g_list_append (strings, (gchar *) _("Confidential")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -583,10 +583,10 @@ e_calendar_table_init (ECalendarTable *cal_table) g_object_unref (cell); strings = NULL; - strings = g_list_append (strings, (char*) _("High")); - strings = g_list_append (strings, (char*) _("Normal")); - strings = g_list_append (strings, (char*) _("Low")); - strings = g_list_append (strings, (char*) _("Undefined")); + strings = g_list_append (strings, (gchar *) _("High")); + strings = g_list_append (strings, (gchar *) _("Normal")); + strings = g_list_append (strings, (gchar *) _("Low")); + strings = g_list_append (strings, (gchar *) _("Undefined")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -605,17 +605,17 @@ e_calendar_table_init (ECalendarTable *cal_table) g_object_unref (cell); strings = NULL; - strings = g_list_append (strings, (char*) _("0%")); - strings = g_list_append (strings, (char*) _("10%")); - strings = g_list_append (strings, (char*) _("20%")); - strings = g_list_append (strings, (char*) _("30%")); - strings = g_list_append (strings, (char*) _("40%")); - strings = g_list_append (strings, (char*) _("50%")); - strings = g_list_append (strings, (char*) _("60%")); - strings = g_list_append (strings, (char*) _("70%")); - strings = g_list_append (strings, (char*) _("80%")); - strings = g_list_append (strings, (char*) _("90%")); - strings = g_list_append (strings, (char*) _("100%")); + strings = g_list_append (strings, (gchar *) _("0%")); + strings = g_list_append (strings, (gchar *) _("10%")); + strings = g_list_append (strings, (gchar *) _("20%")); + strings = g_list_append (strings, (gchar *) _("30%")); + strings = g_list_append (strings, (gchar *) _("40%")); + strings = g_list_append (strings, (gchar *) _("50%")); + strings = g_list_append (strings, (gchar *) _("60%")); + strings = g_list_append (strings, (gchar *) _("70%")); + strings = g_list_append (strings, (gchar *) _("80%")); + strings = g_list_append (strings, (gchar *) _("90%")); + strings = g_list_append (strings, (gchar *) _("100%")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -635,8 +635,8 @@ e_calendar_table_init (ECalendarTable *cal_table) g_object_unref (cell); strings = NULL; - strings = g_list_append (strings, (char*) _("Free")); - strings = g_list_append (strings, (char*) _("Busy")); + strings = g_list_append (strings, (gchar *) _("Free")); + strings = g_list_append (strings, (gchar *) _("Busy")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -656,10 +656,10 @@ e_calendar_table_init (ECalendarTable *cal_table) g_object_unref (cell); strings = NULL; - strings = g_list_append (strings, (char*) _("Not Started")); - strings = g_list_append (strings, (char*) _("In Progress")); - strings = g_list_append (strings, (char*) _("Completed")); - strings = g_list_append (strings, (char*) _("Canceled")); + strings = g_list_append (strings, (gchar *) _("Not Started")); + strings = g_list_append (strings, (gchar *) _("In Progress")); + strings = g_list_append (strings, (gchar *) _("Completed")); + strings = g_list_append (strings, (gchar *) _("Canceled")); e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell), strings); @@ -820,12 +820,12 @@ e_calendar_table_complete_selected (ECalendarTable *cal_table) } /* Used from e_table_selected_row_foreach(); puts the selected row number in an - * int pointed to by the closure data. + * gint pointed to by the closure data. */ static void -get_selected_row_cb (int model_row, gpointer data) +get_selected_row_cb (gint model_row, gpointer data) { - int *row; + gint *row; row = data; *row = model_row; @@ -838,7 +838,7 @@ ECalModelComponent * e_calendar_table_get_selected_comp (ECalendarTable *cal_table) { ETable *etable; - int row; + gint row; etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable)); if (e_table_selected_count (etable) != 1) @@ -860,7 +860,7 @@ struct get_selected_uids_closure { /* Used from e_table_selected_row_foreach(), builds a list of the selected UIDs */ static void -add_uid_cb (int model_row, gpointer data) +add_uid_cb (gint model_row, gpointer data) { struct get_selected_uids_closure *closure; ECalModelComponent *comp_data; @@ -912,7 +912,7 @@ delete_selected_components (ECalendarTable *cal_table) g_slist_free (objs); } static void -add_retract_data (ECalComponent *comp, const char *retract_comment) +add_retract_data (ECalComponent *comp, const gchar *retract_comment) { icalcomponent *icalcomp = NULL; icalproperty *icalprop = NULL; @@ -930,8 +930,8 @@ static gboolean check_for_retract (ECalComponent *comp, ECal *client) { ECalComponentOrganizer org; - char *email = NULL; - const char *strip = NULL; + gchar *email = NULL; + const gchar *strip = NULL; gboolean ret_val = FALSE; if (!(e_cal_component_has_attendees (comp) && @@ -959,7 +959,7 @@ void e_calendar_table_delete_selected (ECalendarTable *cal_table) { ETable *etable; - int n_selected; + gint n_selected; ECalModelComponent *comp_data; ECalComponent *comp = NULL; gboolean delete = FALSE; @@ -987,7 +987,7 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table) } if ((n_selected == 1) && comp && check_for_retract (comp, comp_data->client)) { - char *retract_comment = NULL; + gchar *retract_comment = NULL; gboolean retract = FALSE; delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_table), &retract); @@ -1079,7 +1079,7 @@ clipboard_get_calendar_cb (GtkClipboard *clipboard, /* callback for e_table_selected_row_foreach */ static void -copy_row_cb (int model_row, gpointer data) +copy_row_cb (gint model_row, gpointer data) { ECalendarTable *cal_table; ECalModelComponent *comp_data; @@ -1119,7 +1119,7 @@ e_calendar_table_copy_clipboard (ECalendarTable *cal_table) { ETable *etable; GtkClipboard *clipboard; - char *comp_str; + gchar *comp_str; g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table)); @@ -1149,7 +1149,7 @@ static void clipboard_get_calendar_data (ECalendarTable *cal_table, const gchar *text) { icalcomponent *icalcomp; - char *uid; + gchar *uid; ECalComponent *comp; ECal *client; icalcomponent_kind kind; @@ -1211,7 +1211,7 @@ clipboard_get_calendar_data (ECalendarTable *cal_table, const gchar *text) comp = e_cal_component_new (); e_cal_component_set_icalcomponent (comp, icalcomp); uid = e_cal_component_gen_uid (); - e_cal_component_set_uid (comp, (const char *) uid); + e_cal_component_set_uid (comp, (const gchar *) uid); free (uid); e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL); @@ -1278,7 +1278,7 @@ void e_calendar_table_open_task (ECalendarTable *cal_table, ECal *client, icalcomponent *icalcomp, gboolean assign) { CompEditor *tedit; - const char *uid; + const gchar *uid; guint32 flags = 0; uid = icalcomponent_get_uid (icalcomp); @@ -1312,7 +1312,7 @@ e_calendar_table_open_task (ECalendarTable *cal_table, ECal *client, icalcompone /* Opens the task in the specified row */ static void -open_task_by_row (ECalendarTable *cal_table, int row) +open_task_by_row (ECalendarTable *cal_table, gint row) { ECalModelComponent *comp_data; icalproperty *prop; @@ -1335,7 +1335,7 @@ e_calendar_table_on_double_click (ETable *table, /* popup menu callbacks */ static void -e_calendar_table_on_open_task (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_open_task (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; ECalModelComponent *comp_data; @@ -1351,12 +1351,12 @@ e_calendar_table_on_open_task (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_calendar_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_save_as (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; ECalModelComponent *comp_data; - char *filename; - char *ical_string; + gchar *filename; + gchar *ical_string; comp_data = e_calendar_table_get_selected_comp (cal_table); if (comp_data == NULL) @@ -1378,7 +1378,7 @@ e_calendar_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_calendar_table_on_print_task (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_print_task (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; ECalModelComponent *comp_data; @@ -1396,7 +1396,7 @@ e_calendar_table_on_print_task (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_calendar_table_on_cut (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_cut (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; @@ -1404,7 +1404,7 @@ e_calendar_table_on_cut (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_calendar_table_on_copy (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_copy (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; @@ -1412,7 +1412,7 @@ e_calendar_table_on_copy (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_calendar_table_on_paste (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_paste (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; @@ -1420,7 +1420,7 @@ e_calendar_table_on_paste (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_calendar_table_on_assign (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_assign (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; ECalModelComponent *comp_data; @@ -1431,7 +1431,7 @@ e_calendar_table_on_assign (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_calendar_table_on_forward (EPopup *ep, EPopupItem *pitem, void *data) +e_calendar_table_on_forward (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; ECalModelComponent *comp_data; @@ -1459,7 +1459,7 @@ struct AffectedComponents { * This function is called from e_table_selected_row_foreach. **/ static void -get_selected_components_cb (int model_row, gpointer data) +get_selected_components_cb (gint model_row, gpointer data) { struct AffectedComponents *ac = (struct AffectedComponents *) data; @@ -1530,21 +1530,21 @@ mark_comp_incomplete_cb (gpointer data, gpointer user_data) /* Callback used for the "mark tasks as incomplete" menu item */ static void -mark_as_incomplete_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_as_incomplete_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { do_for_selected_components (data, mark_comp_incomplete_cb); } /* Callback used for the "mark tasks as complete" menu item */ static void -mark_as_complete_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_as_complete_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { do_for_selected_components (data, mark_comp_complete_cb); } /* Opens the URL of the task */ static void -open_url_cb (EPopup *ep, EPopupItem *pitem, void *data) +open_url_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; ECalModelComponent *comp_data; @@ -1564,7 +1564,7 @@ open_url_cb (EPopup *ep, EPopupItem *pitem, void *data) /* Opens a new task editor */ static void -on_new_task (EPopup *ep, EPopupItem *pitem, void *data) +on_new_task (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; ETasks *tasks = g_object_get_data (G_OBJECT (cal_table), "tasks"); @@ -1578,7 +1578,7 @@ on_new_task (EPopup *ep, EPopupItem *pitem, void *data) /* Callback for the "delete tasks" menu item */ static void -delete_cb (EPopup *ep, EPopupItem *pitem, void *data) +delete_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarTable *cal_table = data; @@ -1616,7 +1616,7 @@ static EPopupItem tasks_popup_items [] = { }; static void -ect_popup_free(EPopup *ep, GSList *items, void *data) +ect_popup_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } @@ -1631,7 +1631,7 @@ e_calendar_table_show_popup_menu (ETable *table, GPtrArray *events; ECalPopup *ep; ECalPopupTargetSelect *t; - int i; + gint i; selection = get_selected_objects (cal_table); if (!selection) @@ -1706,11 +1706,11 @@ e_calendar_table_on_key_press (ETable *table, } static void -hide_completed_rows (ECalModel *model, GList *clients_list, char *hide_sexp, GPtrArray *comp_objects) +hide_completed_rows (ECalModel *model, GList *clients_list, gchar *hide_sexp, GPtrArray *comp_objects) { GList *l, *m, *objects; ECal *client; - int pos; + gint pos; for (l = clients_list; l != NULL; l = l->next) { client = l->data; @@ -1750,7 +1750,7 @@ hide_completed_rows (ECalModel *model, GList *clients_list, char *hide_sexp, GPt } static void -show_completed_rows (ECalModel *model, GList *clients_list, char *show_sexp, GPtrArray *comp_objects) +show_completed_rows (ECalModel *model, GList *clients_list, gchar *show_sexp, GPtrArray *comp_objects) { GList *l, *m, *objects; ECal *client; @@ -1848,7 +1848,7 @@ e_calendar_table_get_current_time (ECellDateEdit *ecde, gpointer data) #ifdef TRANSLATORS_ONLY -static char *test[] = { +static gchar *test[] = { N_("Click to add a task") }; @@ -1863,7 +1863,7 @@ e_calendar_table_set_activity_handler (ECalendarTable *cal_table, EActivityHandl } void -e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *message, int percent) +e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *message, gint percent) { g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table)); @@ -1876,7 +1876,7 @@ e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *mes cal_table->activity_id = 0; } } else if (cal_table->activity_id == 0) { - char *client_id = g_strdup_printf ("%p", (gpointer) cal_table); + gchar *client_id = g_strdup_printf ("%p", (gpointer) cal_table); cal_table->activity_id = e_activity_handler_operation_started ( cal_table->activity_handler, client_id, message, TRUE); @@ -1908,7 +1908,7 @@ e_calendar_table_process_completed_tasks (ECalendarTable *table, GList *clients_ { ECalModel *model; static GMutex *mutex = NULL; - char *hide_sexp, *show_sexp; + gchar *hide_sexp, *show_sexp; GPtrArray *comp_objects = NULL; if (!mutex) diff --git a/calendar/gui/e-calendar-table.h b/calendar/gui/e-calendar-table.h index d5dac7318e..50f2bb5995 100644 --- a/calendar/gui/e-calendar-table.h +++ b/calendar/gui/e-calendar-table.h @@ -106,7 +106,7 @@ void e_calendar_table_set_activity_handler (ECalendarTable *cal_table, EActivityHandler *activity_handler); void e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *message, - int percent); + gint percent); void e_calendar_table_open_task (ECalendarTable *cal_table, ECal *client, icalcomponent *icalcomp, diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 91f9eded7a..9644259198 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -72,7 +72,7 @@ struct _ECalendarViewPrivate { guint activity_id; /* The default category */ - char *default_category; + gchar *default_category; }; static void e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); @@ -267,7 +267,7 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart struct icaltimetype itime, old_dtstart, old_dtend; time_t tt_start, tt_end, new_dtstart = 0; struct icaldurationtype ic_dur, ic_oneday; - char *uid; + gchar *uid; gint start_offset, end_offset; gboolean all_day_event = FALSE; GnomeCalendarViewType view_type; @@ -304,7 +304,7 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart } else if (icaldurationtype_as_int (ic_dur) >= 60*60*24 && !in_top_canvas) { /* copy & paste from top canvas to main canvas */ - int time_divisions; + gint time_divisions; time_divisions = calendar_config_get_time_divisions (); ic_dur = icaldurationtype_from_int (time_divisions * 60); @@ -479,11 +479,11 @@ e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone) old_zone, zone); } -const char * +const gchar * e_calendar_view_get_default_category (ECalendarView *cal_view) { g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL); - return (const char *) cal_view->priv->default_category; + return (const gchar *) cal_view->priv->default_category; } /** @@ -495,7 +495,7 @@ e_calendar_view_get_default_category (ECalendarView *cal_view) * components from the given calendar view. */ void -e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category) +e_calendar_view_set_default_category (ECalendarView *cal_view, const gchar *category) { g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); @@ -549,7 +549,7 @@ e_calendar_view_set_activity_handler (ECalendarView *cal_view, EActivityHandler } void -e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message, int percent) +e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message, gint percent) { ECalendarViewPrivate *priv; @@ -566,7 +566,7 @@ e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *messag priv->activity_id = 0; } } else if (priv->activity_id == 0) { - char *client_id = g_strdup_printf ("%p", (gpointer) cal_view); + gchar *client_id = g_strdup_printf ("%p", (gpointer) cal_view); priv->activity_id = e_activity_handler_operation_started ( priv->activity_handler, client_id, message, TRUE); @@ -647,7 +647,7 @@ void e_calendar_view_cut_clipboard (ECalendarView *cal_view) { GList *selected, *l; - const char *uid; + const gchar *uid; g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); @@ -677,7 +677,7 @@ e_calendar_view_cut_clipboard (ECalendarView *cal_view) e_cal_component_get_uid (comp, &uid); if (e_cal_component_is_instance (comp)) { - char *rid = NULL; + gchar *rid = NULL; icalcomponent *icalcomp; /* when cutting detached instances, only cut that instance */ @@ -741,7 +741,7 @@ add_related_timezones (icalcomponent *des_icalcomp, icalcomponent *src_icalcomp, ICAL_DTEND_PROPERTY, ICAL_NO_PROPERTY }; - int i; + gint i; g_return_if_fail (des_icalcomp != NULL); g_return_if_fail (src_icalcomp != NULL); @@ -754,7 +754,7 @@ add_related_timezones (icalcomponent *des_icalcomp, icalcomponent *src_icalcomp, icalparameter *par = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER); if (par) { - const char *tzid = icalparameter_get_tzid (par); + const gchar *tzid = icalparameter_get_tzid (par); if (tzid) { GError *error = NULL; @@ -856,7 +856,7 @@ clipboard_get_calendar_data (ECalendarView *cal_view, const gchar *text) if (!text || !*text) return; - icalcomp = icalparser_parse_string ((const char *) text); + icalcomp = icalparser_parse_string ((const gchar *) text); if (!icalcomp) return; @@ -965,7 +965,7 @@ e_calendar_view_paste_clipboard (ECalendarView *cal_view) } static void -add_retract_data (ECalComponent *comp, const char *retract_comment, CalObjModType mod) +add_retract_data (ECalComponent *comp, const gchar *retract_comment, CalObjModType mod) { icalcomponent *icalcomp = NULL; icalproperty *icalprop = NULL; @@ -990,8 +990,8 @@ static gboolean check_for_retract (ECalComponent *comp, ECal *client) { ECalComponentOrganizer org; - char *email = NULL; - const char *strip = NULL; + gchar *email = NULL; + const gchar *strip = NULL; gboolean ret_val = FALSE; if (!(e_cal_component_has_attendees (comp) && @@ -1027,7 +1027,7 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event) /*FIXME Retract should be moved to Groupwise features plugin */ if (check_for_retract (comp, event->comp_data->client)) { - char *retract_comment = NULL; + gchar *retract_comment = NULL; gboolean retract = FALSE; delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view), &retract); @@ -1058,8 +1058,8 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event) delete = delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view)); if (delete) { - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; if ((itip_organizer_is_user (comp, event->comp_data->client) || itip_sentby_is_user (comp, event->comp_data->client)) && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)), @@ -1144,7 +1144,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) /*FIXME Retract should be moved to Groupwise features plugin */ if (check_for_retract (comp, event->comp_data->client)) { - char *retract_comment = NULL; + gchar *retract_comment = NULL; gboolean retract = FALSE; delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view), &retract); @@ -1173,8 +1173,8 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) delete = delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view)); if (delete) { - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; ECalComponentDateTime dt; icaltimezone *zone = NULL; gboolean is_instance = FALSE; @@ -1242,7 +1242,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) } static void -on_new_appointment (EPopup *ep, EPopupItem *pitem, void *data) +on_new_appointment (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1250,7 +1250,7 @@ on_new_appointment (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_new_event (EPopup *ep, EPopupItem *pitem, void *data) +on_new_event (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1258,7 +1258,7 @@ on_new_event (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_new_meeting (EPopup *ep, EPopupItem *pitem, void *data) +on_new_meeting (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1266,7 +1266,7 @@ on_new_meeting (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_new_task (EPopup *ep, EPopupItem *pitem, void *data) +on_new_task (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; time_t dtstart, dtend; @@ -1276,7 +1276,7 @@ on_new_task (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_goto_date (EPopup *ep, EPopupItem *pitem, void *data) +on_goto_date (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1284,7 +1284,7 @@ on_goto_date (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_goto_today (EPopup *ep, EPopupItem *pitem, void *data) +on_goto_today (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1292,7 +1292,7 @@ on_goto_today (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_edit_appointment (EPopup *ep, EPopupItem *pitem, void *data) +on_edit_appointment (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; @@ -1311,7 +1311,7 @@ on_edit_appointment (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_print (EPopup *ep, EPopupItem *pitem, void *data) +on_print (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1319,12 +1319,12 @@ on_print (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_save_as (EPopup *ep, EPopupItem *pitem, void *data) +on_save_as (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; - char *filename; - char *ical_string; + gchar *filename; + gchar *ical_string; ECalendarViewEvent *event; selected = e_calendar_view_get_selected_events (cal_view); @@ -1349,7 +1349,7 @@ on_save_as (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_print_event (EPopup *ep, EPopupItem *pitem, void *data) +on_print_event (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; @@ -1373,8 +1373,8 @@ on_print_event (EPopup *ep, EPopupItem *pitem, void *data) static void transfer_item_to (ECalendarViewEvent *event, ECal *dest_client, gboolean remove_item) { - const char *uid; - char *new_uid; + const gchar *uid; + gchar *new_uid; icalcomponent *orig_icalcomp; icalproperty *icalprop; @@ -1437,7 +1437,7 @@ transfer_item_to (ECalendarViewEvent *event, ECal *dest_client, gboolean remove_ /* remove the item from the source calendar */ if (remove_item) { if (e_cal_util_component_is_instance (event->comp_data->icalcomp) || e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) { - char *rid = NULL; + gchar *rid = NULL; struct icaltimetype recur_id = icalcomponent_get_recurrenceid (event->comp_data->icalcomp); if (!icaltime_is_null_time (recur_id)) @@ -1493,7 +1493,7 @@ transfer_selected_items (ECalendarView *cal_view, gboolean remove_item) } static void -on_copy_to (EPopup *ep, EPopupItem *pitem, void *data) +on_copy_to (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1501,7 +1501,7 @@ on_copy_to (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_move_to (EPopup *ep, EPopupItem *pitem, void *data) +on_move_to (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1509,7 +1509,7 @@ on_move_to (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_meeting (EPopup *ep, EPopupItem *pitem, void *data) +on_meeting (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; @@ -1528,7 +1528,7 @@ set_attendee_status_for_delegate (icalcomponent *icalcomp, ECal *client) { icalproperty *prop; icalparameter *param; - char *address = NULL; + gchar *address = NULL; ECalComponent *comp; gboolean found = FALSE; @@ -1541,7 +1541,7 @@ set_attendee_status_for_delegate (icalcomponent *icalcomp, ECal *client) for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY); prop; prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) { - const char *attendee = icalproperty_get_attendee (prop); + const gchar *attendee = icalproperty_get_attendee (prop); if (!g_ascii_strcasecmp (itip_strip_mailto (attendee), address)) { param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT); @@ -1558,9 +1558,9 @@ set_attendee_status_for_delegate (icalcomponent *icalcomp, ECal *client) /* We couldn find the attendee in the component, so add a new attendee */ if (!found) { - char *temp = g_strdup_printf ("MAILTO:%s", address); + gchar *temp = g_strdup_printf ("MAILTO:%s", address); - prop = icalproperty_new_attendee ((const char *) temp); + prop = icalproperty_new_attendee ((const gchar *) temp); icalcomponent_add_property (icalcomp, prop); param = icalparameter_new_partstat (ICAL_PARTSTAT_DELEGATED); @@ -1584,7 +1584,7 @@ set_attendee_status_for_delegate (icalcomponent *icalcomp, ECal *client) } static void -on_delegate (EPopup *ep, EPopupItem *pitem, void *data) +on_delegate (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; @@ -1608,7 +1608,7 @@ on_delegate (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_forward (EPopup *ep, EPopupItem *pitem, void *data) +on_forward (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; @@ -1628,7 +1628,7 @@ on_forward (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_reply (EPopup *ep, EPopupItem *pitem, void *data) +on_reply (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; @@ -1649,7 +1649,7 @@ on_reply (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_reply_all (EPopup *ep, EPopupItem *pitem, void *data) +on_reply_all (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; GList *selected; @@ -1670,7 +1670,7 @@ on_reply_all (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_delete_appointment (EPopup *ep, EPopupItem *pitem, void *data) +on_delete_appointment (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1678,7 +1678,7 @@ on_delete_appointment (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data) +on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; ECalendarViewEvent *event; @@ -1687,7 +1687,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data) struct icaltimetype itt; GList *selected; ECal *client; - char *new_uid; + gchar *new_uid; ECalComponentId *id = NULL; selected = e_calendar_view_get_selected_events (cal_view); @@ -1756,7 +1756,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_delete_occurrence (EPopup *ep, EPopupItem *pitem, void *data) +on_delete_occurrence (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1764,7 +1764,7 @@ on_delete_occurrence (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_cut (EPopup *ep, EPopupItem *pitem, void *data) +on_cut (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1772,7 +1772,7 @@ on_cut (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_copy (EPopup *ep, EPopupItem *pitem, void *data) +on_copy (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1780,7 +1780,7 @@ on_copy (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_paste (EPopup *ep, EPopupItem *pitem, void *data) +on_paste (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = data; @@ -1837,7 +1837,7 @@ static EPopupItem ecv_child_items [] = { }; static void -ecv_popup_free (EPopup *ep, GSList *list, void *data) +ecv_popup_free (EPopup *ep, GSList *list, gpointer data) { g_slist_free(list); } @@ -1848,7 +1848,7 @@ e_calendar_view_create_popup_menu (ECalendarView *cal_view) ECalPopup *ep; GSList *menus = NULL; GList *selected, *l; - int i; + gint i; ECalPopupTargetSelect *t; ECalModel *model; GPtrArray *events; @@ -2057,8 +2057,8 @@ e_calendar_view_new_appointment_full (ECalendarView *cal_view, gboolean all_day, /* time in this cases; dtstart should be a midnight in this case */ if (do_rounding || (!all_day && (dtend - dtstart) == (60 * 60 * 24))) { struct tm local = *localtime (&now); - int time_div = calendar_config_get_time_divisions (); - int hours, mins; + gint time_div = calendar_config_get_time_divisions (); + gint hours, mins; if (!time_div) /* Possible if your gconf values aren't so nice */ time_div = 30; @@ -2104,7 +2104,7 @@ CompEditor * e_calendar_view_open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags) { CompEditor *ce; - const char *uid; + const gchar *uid; ECalComponent *comp; @@ -2184,7 +2184,7 @@ e_calendar_view_modify_and_send (ECalComponent *comp, if (mod == CALOBJ_MOD_ALL && e_cal_component_is_instance (comp)) { /* Ensure we send the master object, not the instance only */ icalcomponent *icalcomp = NULL; - const char *uid = NULL; + const gchar *uid = NULL; e_cal_component_get_uid (comp, &uid); if (e_cal_get_object (client, uid, NULL, &icalcomp, NULL) && icalcomp) { @@ -2222,10 +2222,10 @@ tooltip_grab (GtkWidget *tooltip, GdkEventKey *event, ECalendarView *view) return FALSE; } -static char * +static gchar * get_label (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone) { - char buffer[1000]; + gchar buffer[1000]; struct tm tmp_tm; tmp_tm = icaltimetype_to_tm_with_zone (tt, f_zone, t_zone); @@ -2238,7 +2238,7 @@ get_label (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone) } void -e_calendar_view_move_tip (GtkWidget *widget, int x, int y) +e_calendar_view_move_tip (GtkWidget *widget, gint x, gint y) { GtkRequisition requisition; gint w, h; @@ -2280,13 +2280,13 @@ e_calendar_view_move_tip (GtkWidget *widget, int x, int y) * The information is like "Status: Accepted: X Declined: Y ...". * Free returned pointer with g_free. **/ -char * +gchar * e_calendar_view_get_attendees_status_info (ECalComponent *comp, ECal *client) { struct _values { icalparameter_partstat status; - const char *caption; - int count; + const gchar *caption; + gint count; } values[] = { { ICAL_PARTSTAT_ACCEPTED, N_("Accepted"), 0 }, { ICAL_PARTSTAT_DECLINED, N_("Declined"), 0 }, @@ -2299,8 +2299,8 @@ e_calendar_view_get_attendees_status_info (ECalComponent *comp, ECal *client) GSList *attendees = NULL, *a; gboolean have = FALSE; - char *res = NULL; - int i; + gchar *res = NULL; + gint i; if (!comp || !e_cal_component_has_attendees (comp) || !itip_organizer_is_user_ex (comp, client, TRUE)) return NULL; @@ -2366,8 +2366,8 @@ gboolean e_calendar_view_get_tooltips (ECalendarViewEventData *data) { GtkWidget *label, *box, *hbox, *ebox, *frame; - const char *str; - char *tmp, *tmp1, *tmp2; + const gchar *str; + gchar *tmp, *tmp1, *tmp2; ECalComponentOrganizer organiser; ECalComponentDateTime dtstart, dtend; icalcomponent *clone_comp; @@ -2411,7 +2411,7 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data) gtk_label_set_markup ((GtkLabel *)label, tmp); if (free_text) { - g_free ((char*)str); + g_free ((gchar *)str); str = NULL; } @@ -2427,7 +2427,7 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data) e_cal_component_get_organizer (newcomp, &organiser); if (organiser.cn) { - char *ptr ; + gchar *ptr ; ptr = strchr(organiser.value, ':'); if (ptr) { @@ -2555,7 +2555,7 @@ icalcomp_contains_category (icalcomponent *icalcomp, const gchar *category) for (property = icalcomponent_get_first_property (icalcomp, ICAL_CATEGORIES_PROPERTY); property != NULL; property = icalcomponent_get_next_property (icalcomp, ICAL_CATEGORIES_PROPERTY)) { - char *value = icalproperty_get_value_as_string_r (property); + gchar *value = icalproperty_get_value_as_string_r (property); if (value && strcmp (category, value) == 0){ g_free (value); @@ -2658,7 +2658,7 @@ draw_curved_rectangle (cairo_t *cr, double x0, double y0, } static void -error_response(GtkWidget *widget, gint response, void *data) +error_response(GtkWidget *widget, gint response, gpointer data) { gtk_widget_destroy (widget); } diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h index 99d405d098..453ec1ff52 100644 --- a/calendar/gui/e-calendar-view.h +++ b/calendar/gui/e-calendar-view.h @@ -90,10 +90,10 @@ struct _ECalendarView { }; typedef struct { - ECalendarViewEvent * (* get_view_event) (ECalendarView *view, int day, int event_num); + ECalendarViewEvent * (* get_view_event) (ECalendarView *view, gint day, gint event_num); ECalendarView *cal_view; - int day; - int event_num; + gint day; + gint event_num; } ECalendarViewEventData; struct _ECalendarViewClass { @@ -125,13 +125,13 @@ ECalModel *e_calendar_view_get_model (ECalendarView *cal_view); void e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model); icaltimezone *e_calendar_view_get_timezone (ECalendarView *cal_view); void e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone); -const char *e_calendar_view_get_default_category (ECalendarView *cal_view); -void e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category); +const gchar *e_calendar_view_get_default_category (ECalendarView *cal_view); +void e_calendar_view_set_default_category (ECalendarView *cal_view, const gchar *category); gboolean e_calendar_view_get_use_24_hour_format (ECalendarView *view); void e_calendar_view_set_use_24_hour_format (ECalendarView *view, gboolean use_24_hour); void e_calendar_view_set_activity_handler (ECalendarView *cal_view, EActivityHandler *activity_handler); -void e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message, int percent); +void e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message, gint percent); GList *e_calendar_view_get_selected_events (ECalendarView *cal_view); gboolean e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time); @@ -176,10 +176,10 @@ void e_calendar_utils_show_info_silent(struct _GtkWidget *widget); gboolean e_calendar_view_get_tooltips (ECalendarViewEventData *data); -void e_calendar_view_move_tip (GtkWidget *widget, int x, int y); +void e_calendar_view_move_tip (GtkWidget *widget, gint x, gint y); const gchar *e_calendar_view_get_icalcomponent_summary (ECal *ecal, icalcomponent *icalcomp, gboolean *free_text); -char *e_calendar_view_get_attendees_status_info (ECalComponent *comp, ECal *client); +gchar *e_calendar_view_get_attendees_status_info (ECalComponent *comp, ECal *client); void draw_curved_rectangle (cairo_t *cr, double x0, diff --git a/calendar/gui/e-cell-date-edit-config.c b/calendar/gui/e-cell-date-edit-config.c index eb6c27420b..5b04791412 100644 --- a/calendar/gui/e-cell-date-edit-config.c +++ b/calendar/gui/e-cell-date-edit-config.c @@ -205,7 +205,7 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp static void set_range (ECellDateEdit *cell) { - int start_hour, end_hour; + gint start_hour, end_hour; start_hour = calendar_config_get_day_start_hour (); end_hour = calendar_config_get_day_end_hour (); diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c index 8a43c628fc..efe251aa0f 100644 --- a/calendar/gui/e-cell-date-edit-text.c +++ b/calendar/gui/e-cell-date-edit-text.c @@ -59,13 +59,13 @@ e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd, } -static char * -ecd_get_text (ECellText *cell, ETableModel *model, int col, int row) +static gchar * +ecd_get_text (ECellText *cell, ETableModel *model, gint col, gint row) { ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (cell); ECellDateEditValue *dv = e_table_model_value_at (model, col, row); struct tm tmp_tm; - char buffer[64]; + gchar buffer[64]; if (!dv) return g_strdup (""); @@ -84,7 +84,7 @@ ecd_get_text (ECellText *cell, ETableModel *model, int col, int row) static void -ecd_free_text (ECellText *cell, char *text) +ecd_free_text (ECellText *cell, gchar *text) { g_free (text); } @@ -95,7 +95,7 @@ static void show_date_warning (ECellDateEditText *ecd) { GtkWidget *dialog; - char buffer[64], *format; + gchar buffer[64], *format; time_t t; struct tm *tmp_tm; @@ -125,8 +125,8 @@ show_date_warning (ECellDateEditText *ecd) static void -ecd_set_value (ECellText *cell, ETableModel *model, int col, int row, - const char *text) +ecd_set_value (ECellText *cell, ETableModel *model, gint col, gint row, + const gchar *text) { ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (cell); ETimeParseStatus status; @@ -206,7 +206,7 @@ e_cell_date_edit_text_init (ECellDateEditText *ecd) * Returns: an ECell object that can be used to render dates. */ ECell * -e_cell_date_edit_text_new (const char *fontname, +e_cell_date_edit_text_new (const gchar *fontname, GtkJustification justify) { ECellDateEditText *ecd = g_object_new (e_cell_date_edit_text_get_type (), NULL); diff --git a/calendar/gui/e-cell-date-edit-text.h b/calendar/gui/e-cell-date-edit-text.h index c353ecd278..0f557afade 100644 --- a/calendar/gui/e-cell-date-edit-text.h +++ b/calendar/gui/e-cell-date-edit-text.h @@ -56,7 +56,7 @@ typedef struct { } ECellDateEditTextClass; GType e_cell_date_edit_text_get_type (void); -ECell *e_cell_date_edit_text_new (const char *fontname, +ECell *e_cell_date_edit_text_new (const gchar *fontname, GtkJustification justify); diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c index a4bed100b9..cdbffd4ee4 100644 --- a/calendar/gui/e-comp-editor-registry.c +++ b/calendar/gui/e-comp-editor-registry.c @@ -34,7 +34,7 @@ struct _ECompEditorRegistryData { ECompEditorRegistry *registry; CompEditor *editor; - char *uid; + gchar *uid; }; typedef struct _ECompEditorRegistryData ECompEditorRegistryData; @@ -120,7 +120,7 @@ e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboole ECompEditorRegistryPrivate *priv; ECompEditorRegistryData *rdata; ECalComponent *comp; - const char *uid; + const gchar *uid; g_return_if_fail (reg != NULL); g_return_if_fail (E_IS_COMP_EDITOR_REGISTRY (reg)); @@ -145,7 +145,7 @@ e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboole } CompEditor * -e_comp_editor_registry_find (ECompEditorRegistry *reg, const char *uid) +e_comp_editor_registry_find (ECompEditorRegistry *reg, const gchar *uid) { ECompEditorRegistryPrivate *priv; ECompEditorRegistryData *rdata; diff --git a/calendar/gui/e-comp-editor-registry.h b/calendar/gui/e-comp-editor-registry.h index 5c2b4c4bc8..0b45a53cbc 100644 --- a/calendar/gui/e-comp-editor-registry.h +++ b/calendar/gui/e-comp-editor-registry.h @@ -64,7 +64,7 @@ void e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboolean remote); CompEditor *e_comp_editor_registry_find (ECompEditorRegistry *reg, - const char *uid); + const gchar *uid); gboolean e_comp_editor_registry_close_all (ECompEditorRegistry *reg); G_END_DECLS diff --git a/calendar/gui/e-date-edit-config.c b/calendar/gui/e-date-edit-config.c index f93f2cf746..bead58f5d2 100644 --- a/calendar/gui/e-date-edit-config.c +++ b/calendar/gui/e-date-edit-config.c @@ -146,7 +146,7 @@ e_date_edit_config_get_edit (EDateEditConfig *edit_config) static void set_week_start (EDateEdit *date_edit) { - int week_start_day; + gint week_start_day; week_start_day = calendar_config_get_week_start_day (); diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c index 2aaab0df4d..bf75f5ff04 100644 --- a/calendar/gui/e-date-time-list.c +++ b/calendar/gui/e-date-time-list.c @@ -398,10 +398,10 @@ e_date_time_list_get_path (GtkTreeModel *tree_model, } /* Builds a static string out of an exception date */ -static char * +static gchar * get_exception_string (ECalComponentDateTime *dt) { - static char buf [256]; + static gchar buf [256]; struct tm tmp_tm; tmp_tm.tm_year = dt->value->year - 1900; diff --git a/calendar/gui/e-day-view-config.c b/calendar/gui/e-day-view-config.c index edd02bb7ee..682c99e6b7 100644 --- a/calendar/gui/e-day-view-config.c +++ b/calendar/gui/e-day-view-config.c @@ -146,7 +146,7 @@ e_day_view_config_get_view (EDayViewConfig *view_config) static void set_week_start (EDayView *day_view) { - int week_start_day; + gint week_start_day; week_start_day = calendar_config_get_week_start_day (); @@ -215,7 +215,7 @@ working_days_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpoin static void set_day_start_hour (EDayView *day_view) { - int start_hour, start_minute, end_hour, end_minute; + gint start_hour, start_minute, end_hour, end_minute; e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute); @@ -238,7 +238,7 @@ day_start_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo static void set_day_start_minute (EDayView *day_view) { - int start_hour, start_minute, end_hour, end_minute; + gint start_hour, start_minute, end_hour, end_minute; e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute); @@ -261,7 +261,7 @@ day_start_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, g static void set_day_end_hour (EDayView *day_view) { - int start_hour, start_minute, end_hour, end_minute; + gint start_hour, start_minute, end_hour, end_minute; e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute); @@ -285,7 +285,7 @@ day_end_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpoin static void set_day_end_minute (EDayView *day_view) { - int start_hour, start_minute, end_hour, end_minute; + gint start_hour, start_minute, end_hour, end_minute; e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute); @@ -308,7 +308,7 @@ day_end_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo static void set_time_divisions (EDayView *day_view) { - int time_divisions; + gint time_divisions; time_divisions = calendar_config_get_time_divisions (); @@ -330,7 +330,7 @@ static void set_marcus_bains (EDayView *day_view) { gboolean show_marcus_bains_line; - const char *dayview_color, *timebar_color; + const gchar *dayview_color, *timebar_color; calendar_config_get_marcus_bains (&show_marcus_bains_line, &dayview_color, &timebar_color); diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index e161477eec..f3ad280cae 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -44,38 +44,38 @@ static void e_day_view_main_item_set_property (GObject *object, GParamSpec *pspec); static void e_day_view_main_item_update (GnomeCanvasItem *item, double *affine, - ArtSVP *clip_path, int flags); + ArtSVP *clip_path, gint flags); static void e_day_view_main_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, - int width, int height); + gint x, gint y, + gint width, gint height); static double e_day_view_main_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item); static gint e_day_view_main_item_event (GnomeCanvasItem *item, GdkEvent *event); static void e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, - int y, - int width, - int height); + gint x, + gint y, + gint width, + gint height); static void e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, int y, - int width, int height, + gint x, gint y, + gint width, gint height, gint day); static void e_day_view_main_item_draw_day_events (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, int y, - int width, int height, + gint x, gint y, + gint width, gint height, gint day); static void e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, int y, - int width, int height, + gint x, gint y, + gint width, gint height, gint day, gint event_num); /* The arguments we take */ @@ -146,7 +146,7 @@ static void e_day_view_main_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, - int flags) + gint flags) { if (GNOME_CANVAS_ITEM_CLASS (e_day_view_main_item_parent_class)->update) (* GNOME_CANVAS_ITEM_CLASS (e_day_view_main_item_parent_class)->update) (item, affine, clip_path, flags); @@ -164,7 +164,7 @@ e_day_view_main_item_update (GnomeCanvasItem *item, */ static void e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, - int x, int y, int width, int height) + gint x, gint y, gint width, gint height) { EDayViewMainItem *dvmitem; EDayView *day_view; @@ -360,7 +360,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, if (e_day_view_get_show_marcus_bains (day_view)) { icaltimezone *zone; struct icaltimetype time_now, day_start; - int marcus_bains_y; + gint marcus_bains_y; GdkColor mb_color; cairo_save (cr); @@ -402,8 +402,8 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, static void e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, int y, - int width, int height, + gint x, gint y, + gint width, gint height, gint day) { EDayView *day_view; @@ -483,8 +483,8 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem, static void e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, int y, - int width, int height) + gint x, gint y, + gint width, gint height) { EDayView *day_view; EDayViewEvent *event; @@ -572,7 +572,7 @@ e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem, static void e_day_view_main_item_draw_day_events (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, int y, int width, int height, + gint x, gint y, gint width, gint height, gint day) { EDayView *day_view; @@ -591,7 +591,7 @@ e_day_view_main_item_draw_day_events (EDayViewMainItem *dvmitem, static void e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, GdkDrawable *drawable, - int x, int y, int width, int height, + gint x, gint y, gint width, gint height, gint day, gint event_num) { EDayView *day_view; @@ -625,8 +625,8 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, gint offset, interval; const gchar *start_suffix; const gchar *end_suffix; - char *text = NULL; - int scroll_flag = 0; + gchar *text = NULL; + gint scroll_flag = 0; gint row_y; GConfClient *gconf; @@ -1174,11 +1174,11 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, /* draw categories icons */ for (elem = categories_list; elem; elem = elem->next) { - char *category; + gchar *category; GdkPixmap *pixmap = NULL; GdkBitmap *mask = NULL; - category = (char *) elem->data; + category = (gchar *) elem->data; if (!e_categories_config_get_icon_for (category, &pixmap, &mask)) continue; @@ -1315,7 +1315,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, This is needed so that we get button/motion events. */ static double e_day_view_main_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c index f6ded1ec94..4cbfadd9da 100644 --- a/calendar/gui/e-day-view-time-item.c +++ b/calendar/gui/e-day-view-time-item.c @@ -65,14 +65,14 @@ static void e_day_view_time_item_finalize (GObject *object); static void e_day_view_time_item_update (GnomeCanvasItem *item, double *affine, - ArtSVP *clip_path, int flags); + ArtSVP *clip_path, gint flags); static void e_day_view_time_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, - int width, int height); + gint x, gint y, + gint width, gint height); static double e_day_view_time_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item); static gint e_day_view_time_item_event (GnomeCanvasItem *item, GdkEvent *event); @@ -131,7 +131,7 @@ e_day_view_time_item_class_init (EDayViewTimeItemClass *class) static void e_day_view_time_item_init (EDayViewTimeItem *dvtmitem) { - char *last; + gchar *last; dvtmitem->dragging_selection = FALSE; dvtmitem->second_zone = NULL; @@ -185,7 +185,7 @@ static void e_day_view_time_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, - int flags) + gint flags) { if (GNOME_CANVAS_ITEM_CLASS (e_day_view_time_item_parent_class)->update) (* GNOME_CANVAS_ITEM_CLASS (e_day_view_time_item_parent_class)->update) (item, affine, clip_path, flags); @@ -358,7 +358,7 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item, /* shift time with a difference between local time and the other timezone */ icaltimezone *cal_zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)); struct icaltimetype tt; - int diff; + gint diff; struct tm mn; tt = icaltime_today (); @@ -416,7 +416,7 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item, /* Draw the Marcus Bains Line first, so it appears under other elements. */ if (e_day_view_get_show_marcus_bains (day_view)) { struct icaltimetype time_now; - int marcus_bains_y; + gint marcus_bains_y; cairo_save (cr); gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]); @@ -645,7 +645,7 @@ e_day_view_time_item_increment_time (gint *hour, static double e_day_view_time_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -691,7 +691,7 @@ static void edvti_second_zone_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) { EDayViewTimeItem *dvtmitem = user_data; - char *location; + gchar *location; g_return_if_fail (user_data != NULL); g_return_if_fail (E_IS_DAY_VIEW_TIME_ITEM (dvtmitem)); diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index dd91133243..de9a542ef6 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -687,11 +687,11 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, /* draw categories icons */ e_cal_component_get_categories_list (comp, &categories_list); for (elem = categories_list; elem; elem = elem->next) { - char *category; - const char *file; + gchar *category; + const gchar *file; GdkPixbuf *pixbuf; - category = (char *) elem->data; + category = (gchar *) elem->data; file = e_categories_get_icon_file_for (category); if (!file) continue; @@ -800,7 +800,7 @@ e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, This is needed so that we get button/motion events. */ static double e_day_view_top_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index ef8a33625d..5d6dd15563 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -306,7 +306,7 @@ static void e_day_view_foreach_event_with_uid (EDayView *day_view, static void e_day_view_free_events (EDayView *day_view); static void e_day_view_free_event_array (EDayView *day_view, GArray *array); -static int e_day_view_add_event (ECalComponent *comp, +static gint e_day_view_add_event (ECalComponent *comp, time_t start, time_t end, gpointer data); @@ -509,8 +509,8 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo static void process_component (EDayView *day_view, ECalModelComponent *comp_data) { - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; ECalComponent *comp; AddEventData add_event_data; @@ -543,13 +543,13 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data) } static void -update_row (EDayView *day_view, int row) +update_row (EDayView *day_view, gint row) { ECalModelComponent *comp_data; ECalModel *model; gint day, event_num; - const char *uid = NULL; - char *rid = NULL; + const gchar *uid = NULL; + gchar *rid = NULL; e_day_view_stop_editing_event (day_view); @@ -579,7 +579,7 @@ update_row (EDayView *day_view, int row) } static void -model_row_changed_cb (ETableModel *etm, int row, gpointer user_data) +model_row_changed_cb (ETableModel *etm, gint row, gpointer user_data) { EDayView *day_view = E_DAY_VIEW (user_data); @@ -591,7 +591,7 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer user_data) } static void -model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data) +model_cell_changed_cb (ETableModel *etm, gint col, gint row, gpointer user_data) { EDayView *day_view = E_DAY_VIEW (user_data); @@ -603,11 +603,11 @@ model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data) } static void -model_rows_inserted_cb (ETableModel *etm, int row, int count, gpointer user_data) +model_rows_inserted_cb (ETableModel *etm, gint row, gint count, gpointer user_data) { EDayView *day_view = E_DAY_VIEW (user_data); ECalModel *model; - int i; + gint i; if (!E_CALENDAR_VIEW (day_view)->in_focus) { return; @@ -648,8 +648,8 @@ model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data) for (l = list; l != NULL; l = g_slist_next (l)) { ECalModelComponent *comp_data = l->data; gint day, event_num; - const char *uid = NULL; - char *rid = NULL; + const gchar *uid = NULL; + gchar *rid = NULL; uid = icalcomponent_get_uid (comp_data->icalcomp); if (e_cal_util_component_is_instance (comp_data->icalcomp)) { @@ -1527,12 +1527,12 @@ e_day_view_recalc_cell_sizes (EDayView *day_view) { /* An array of dates, one for each month in the year 2000. They must all be Sundays. */ - static const int days[12] = { 23, 20, 19, 23, 21, 18, + static const gint days[12] = { 23, 20, 19, 23, 21, 18, 23, 20, 17, 22, 19, 24 }; gfloat width, offset; gint day, max_width; struct tm date_tm; - char buffer[128]; + gchar buffer[128]; PangoContext *pango_context; PangoLayout *layout; gint pango_width; @@ -1713,7 +1713,7 @@ e_day_view_foreach_event_with_uid (EDayView *day_view, { EDayViewEvent *event; gint day, event_num; - const char *u; + const gchar *u; for (day = 0; day < day_view->days_shown; day++) { for (event_num = day_view->events[day]->len - 1; @@ -1840,7 +1840,7 @@ e_day_view_update_event_label (EDayView *day_view, EDayViewEvent *event; gboolean free_text = FALSE, editing_event = FALSE, short_event = FALSE; const gchar *summary; - char *text; + gchar *text; gint interval; event = &g_array_index (day_view->events[day], EDayViewEvent, event_num); @@ -1850,7 +1850,7 @@ e_day_view_update_event_label (EDayView *day_view, return; summary = icalcomponent_get_summary (event->comp_data->icalcomp); - text = summary ? (char *) summary : (char *) ""; + text = summary ? (gchar *) summary : (gchar *) ""; if (day_view->editing_event_day == day && day_view->editing_event_num == event_num) @@ -1908,7 +1908,7 @@ e_day_view_update_long_event_label (EDayView *day_view, NULL); if (free_text) - g_free ((gchar*)summary); + g_free ((gchar *)summary); if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) && e_cal_util_component_has_attendee (event->comp_data->icalcomp)) @@ -1973,8 +1973,8 @@ e_day_view_find_event_from_uid (EDayView *day_view, { EDayViewEvent *event; gint day, event_num; - const char *u; - char *r = NULL; + const gchar *u; + gchar *r = NULL; if (!uid) return FALSE; @@ -2296,7 +2296,7 @@ e_day_view_recalc_day_starts (EDayView *day_view, time_t start_time) { gint day; - char *str; + gchar *str; struct icaltimetype tt; GDate dt; @@ -2579,8 +2579,8 @@ e_day_view_update_marcus_bains (EDayView *day_view) void e_day_view_set_marcus_bains (EDayView *day_view, gboolean show_line, - const char *dayview_color, - const char *timebar_color) + const gchar *dayview_color, + const gchar *timebar_color) { g_return_if_fail (E_IS_DAY_VIEW (day_view)); @@ -3969,7 +3969,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view) ECal *client; CalObjModType mod = CALOBJ_MOD_ALL; GtkWindow *toplevel; - int is_date; + gint is_date; event_num = day_view->resize_event_num; event = &g_array_index (day_view->long_events, EDayViewEvent, @@ -4798,8 +4798,8 @@ e_day_view_ensure_events_sorted (EDayView *day_view) gint -e_day_view_event_sort_func (const void *arg1, - const void *arg2) +e_day_view_event_sort_func (gconstpointer arg1, + gconstpointer arg2) { EDayViewEvent *event1, *event2; @@ -4830,7 +4830,7 @@ e_day_view_add_new_event_in_selected_range (EDayView *day_view, GdkEventKey *key time_t dtstart, dtend; ECalComponentDateTime start_dt, end_dt; struct icaltimetype start_tt, end_tt; - const char *uid; + const gchar *uid; AddEventData add_event_data; gboolean read_only = TRUE; @@ -5743,7 +5743,7 @@ e_day_view_start_editing_event (EDayView *day_view, ((EText *)(event->canvas_item))->need_im_reset = TRUE; } else { - char *initial_text; + gchar *initial_text; initial_text = e_utf8_from_gtk_event_key (GTK_WIDGET (day_view), key_event->keyval, key_event->string); gnome_canvas_item_set (event->canvas_item, @@ -5789,7 +5789,7 @@ e_day_view_stop_editing_event (EDayView *day_view) static void cancel_editing (EDayView *day_view) { - int day, event_num; + gint day, event_num; EDayViewEvent *event; const gchar *summary; @@ -5815,7 +5815,7 @@ cancel_editing (EDayView *day_view) } static EDayViewEvent * -tooltip_get_view_event (EDayView *day_view, int day, int event_num) +tooltip_get_view_event (EDayView *day_view, gint day, gint event_num) { EDayViewEvent *pevent; @@ -5834,8 +5834,8 @@ static void tooltip_destroy (EDayView *day_view, GnomeCanvasItem *item) { EDayViewEvent *pevent; - int event_num = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-num")); - int day = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-day")); + gint event_num = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-num")); + gint day = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-day")); pevent = tooltip_get_view_event (day_view, day, event_num); if (pevent) { @@ -5954,7 +5954,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item, &day, &row, &event_num); } else { - int tmp; + gint tmp; pos = e_day_view_convert_position_in_top_canvas (day_view, event_x, event_y, @@ -5993,8 +5993,8 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item, case GDK_MOTION_NOTIFY: { EDayViewEvent *pevent; - int event_num = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-num")); - int day = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-day")); + gint event_num = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-num")); + gint day = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-day")); pevent = tooltip_get_view_event (day_view, day, event_num); @@ -6343,7 +6343,7 @@ e_day_view_on_editing_stopped (EDayView *day_view, on_server = cal_comp_is_on_server (comp, client); if (string_is_empty (text) && !on_server) { - const char *uid; + const gchar *uid; e_cal_component_get_uid (comp, &uid); @@ -7380,7 +7380,7 @@ e_day_view_on_drag_data_get (GtkWidget *widget, if (info == TARGET_CALENDAR_EVENT || info == TARGET_VCALENDAR) { /* we will pass an icalcalendar component for both types */ - char *comp_str; + gchar *comp_str; icalcomponent *vcal; vcal = e_cal_util_new_top_level (); @@ -7390,15 +7390,15 @@ e_day_view_on_drag_data_get (GtkWidget *widget, comp_str = icalcomponent_as_ical_string_r (vcal); if (comp_str) { ESource *source = e_cal_get_source (event->comp_data->client); - const char *source_uid = e_source_peek_uid (source); - char *tmp; + const gchar *source_uid = e_source_peek_uid (source); + gchar *tmp; if (!source_uid) source_uid = ""; tmp = g_strconcat (source_uid, "\n", comp_str, NULL); gtk_selection_data_set (selection_data, selection_data->target, - 8, (unsigned char *)tmp, strlen (tmp)); + 8, (guchar *)tmp, strlen (tmp)); g_free (tmp); } @@ -7570,7 +7570,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget, && !drag_from_same_window) { /* We are dragging between different window */ - char *comp_str; + gchar *comp_str; icalcomponent *icalcomp; icalcomponent_kind kind; time_t dtstart; @@ -7582,8 +7582,8 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget, if (pos == E_CALENDAR_VIEW_POS_OUTSIDE) goto error; - comp_str = (char *) data->data; - icalcomp = icalparser_parse_string ((const char *) comp_str); + comp_str = (gchar *) data->data; + icalcomp = icalparser_parse_string ((const gchar *) comp_str); if (!icalcomp) goto error; @@ -7776,7 +7776,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget, && !drag_from_same_window) { /* We are dragging between different window */ - char *comp_str; + gchar *comp_str; icalcomponent *icalcomp; icalcomponent_kind kind; time_t dtstart; @@ -7788,8 +7788,8 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget, if (pos == E_CALENDAR_VIEW_POS_OUTSIDE) goto error; - comp_str = (char *) data->data; - icalcomp = icalparser_parse_string ((const char *) comp_str); + comp_str = (gchar *) data->data; + icalcomp = icalparser_parse_string ((const gchar *) comp_str); if (!icalcomp) goto error; diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h index d22201e3f3..8fde1e9ad7 100644 --- a/calendar/gui/e-day-view.h +++ b/calendar/gui/e-day-view.h @@ -299,8 +299,8 @@ struct _EDayView /* Whether we show the Marcus Bains Line in the main canvas and time canvas. */ gboolean show_marcus_bains_line; - char *marcus_bains_day_view_color; - char *marcus_bains_time_bar_color; + gchar *marcus_bains_day_view_color; + gchar *marcus_bains_time_bar_color; /* Whether we use show event end times in the main canvas. */ gboolean show_event_end_times; @@ -530,8 +530,8 @@ void e_day_view_set_working_day (EDayView *day_view, gboolean e_day_view_get_show_marcus_bains (EDayView *day_view); void e_day_view_set_marcus_bains (EDayView *day_view, gboolean show_line, - const char *dayview_color, - const char *timebar_color); + const gchar *dayview_color, + const gchar *timebar_color); /* Whether we display event end times in the main canvas. */ gboolean e_day_view_get_show_event_end_times (EDayView *day_view); diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 12442ba2c2..1876d36832 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -62,7 +62,7 @@ struct _EItipControlPrivate { ECal *current_ecal; ECalSourceType type; - char action; + gchar action; gboolean rsvp; /* Use the gpointer variants for weak pointers. */ @@ -79,7 +79,7 @@ struct _EItipControlPrivate { gpointer pointer; } vbox; - char *vcalendar; + gchar *vcalendar; ECalComponent *comp; icalcomponent *main_comp; icalcomponent *ical_comp; @@ -87,8 +87,8 @@ struct _EItipControlPrivate { icalcompiter iter; icalproperty_method method; - int current; - int total; + gint current; + gint total; gchar *calendar_uid; @@ -201,10 +201,10 @@ start_calendar_server (EItipControl *itip, ESource *source, ECalSourceType type, } static ECal * -start_calendar_server_by_uid (EItipControl *itip, const char *uid, ECalSourceType type) +start_calendar_server_by_uid (EItipControl *itip, const gchar *uid, ECalSourceType type) { EItipControlPrivate *priv; - int i; + gint i; priv = itip->priv; @@ -221,8 +221,8 @@ start_calendar_server_by_uid (EItipControl *itip, const char *uid, ECalSourceTyp typedef struct { EItipControl *itip; - char *uid; - int count; + gchar *uid; + gint count; gboolean show_selector; } EItipControlFindData; @@ -275,7 +275,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) if (fd->count == 0) { if (fd->show_selector && !priv->current_ecal && priv->vbox.widget) { GtkWidget *escb; - char *uid; + gchar *uid; switch (priv->type) { case E_CAL_SOURCE_TYPE_EVENT: @@ -324,7 +324,7 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector) EItipControlPrivate *priv; EItipControlFindData *fd = NULL; GSList *groups, *l; - const char *uid; + const gchar *uid; priv = itip->priv; @@ -358,7 +358,7 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector) } static void -cleanup_ecal (void *data) +cleanup_ecal (gpointer data) { ECal *ecal = data; @@ -385,7 +385,7 @@ e_itip_control_init (EItipControl *itip) { EItipControlPrivate *priv; GtkWidget *scrolled_window; - int i; + gint i; priv = g_new0 (EItipControlPrivate, 1); itip->priv = priv; @@ -489,7 +489,7 @@ e_itip_control_destroy (GtkObject *obj) priv = itip->priv; if (priv) { - int i; + gint i; clean_up (itip); @@ -525,7 +525,7 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par { EItipControlPrivate *priv; icalproperty *prop; - char *my_alt_address = NULL; + gchar *my_alt_address = NULL; priv = itip->priv; @@ -534,8 +534,8 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) { icalvalue *value; icalparameter *param; - const char *attendee, *name; - char *attendee_clean, *name_clean; + const gchar *attendee, *name; + gchar *attendee_clean, *name_clean; EIterator *it; value = icalproperty_get_value (prop); @@ -559,7 +559,7 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par } if (priv->delegator_address) { - char *delegator_clean; + gchar *delegator_clean; delegator_clean = g_strdup (itip_strip_mailto (attendee)); delegator_clean = g_strstrip (delegator_clean); @@ -617,7 +617,7 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par } static icalproperty * -find_attendee (icalcomponent *ical_comp, const char *address) +find_attendee (icalcomponent *ical_comp, const gchar *address) { icalproperty *prop; @@ -628,8 +628,8 @@ find_attendee (icalcomponent *ical_comp, const char *address) prop != NULL; prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) { icalvalue *value; - const char *attendee; - char *text; + const gchar *attendee; + gchar *text; value = icalproperty_get_value (prop); if (!value) @@ -652,14 +652,14 @@ find_attendee (icalcomponent *ical_comp, const char *address) static void write_label_piece (EItipControl *itip, ECalComponentDateTime *dt, GString *buffer, - const char *stext, const char *etext, + const gchar *stext, const gchar *etext, gboolean just_date) { EItipControlPrivate *priv; struct tm tmp_tm; - char time_buf[64]; + gchar time_buf[64]; icaltimezone *zone = NULL; - const char *display_name; + const gchar *display_name; priv = itip->priv; @@ -711,8 +711,8 @@ write_label_piece (EItipControl *itip, ECalComponentDateTime *dt, g_string_append (buffer, etext); } -static const char * -nth (int n) +static const gchar * +nth (gint n) { if (n == -1) return "last"; @@ -722,7 +722,7 @@ nth (int n) return e_cal_recur_nth[n]; } -static const char *dayname[] = { +static const gchar *dayname[] = { N_("Sunday"), N_("Monday"), N_("Tuesday"), @@ -732,8 +732,8 @@ static const char *dayname[] = { N_("Saturday") }; -static const char * -get_dayname (struct icalrecurrencetype *r, int i) +static const gchar * +get_dayname (struct icalrecurrencetype *r, gint i) { enum icalrecurrencetype_weekday day; @@ -749,7 +749,7 @@ write_recurrence_piece (EItipControl *itip, ECalComponent *comp, { GSList *rrules; struct icalrecurrencetype *r; - int i; + gint i; g_string_append_len (buffer, "<b>Recurring:</b> ", 18); @@ -815,7 +815,7 @@ write_recurrence_piece (EItipControl *itip, ECalComponent *comp, buffer, _("The %s day of "), nth (r->by_month_day[0])); } else { - int pos; + gint pos; /* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not accept BYDAY=2TU. So we now use the same as Outlook @@ -1035,7 +1035,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, ECalComponentOrganizer organizer; ECalComponentAttendee *attendee; GSList *attendees, *l = NULL; - const char *string; + const gchar *string; gchar *html; const gchar *const_html; gchar *filename; @@ -1237,37 +1237,37 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title, } -static char* +static gchar * get_publish_options (void) { return g_strdup_printf ("<object classid=\"itip:publish_options\"></object>"); } -static char* +static gchar * get_request_options (void) { return g_strdup_printf ("<object classid=\"itip:request_options\"></object>"); } -static char* +static gchar * get_request_fb_options (void) { return g_strdup_printf ("<object classid=\"itip:freebusy_options\"></object>"); } -static char* +static gchar * get_reply_options (void) { return g_strdup_printf ("<object classid=\"itip:reply_options\"></object>"); } -static char* +static gchar * get_refresh_options (void) { return g_strdup_printf ("<object classid=\"itip:refresh_options\"></object>"); } -static char* +static gchar * get_cancel_options (gboolean found, icalcomponent_kind kind) { if (!found) { @@ -1292,7 +1292,7 @@ get_real_item (EItipControl *itip) ECalComponent *comp; icalcomponent *icalcomp; gboolean found = FALSE; - const char *uid; + const gchar *uid; priv = itip->priv; @@ -1320,7 +1320,7 @@ adjust_item (EItipControl *itip, ECalComponent *comp) real_comp = get_real_item (itip); if (real_comp != NULL) { ECalComponentText text; - const char *string; + const gchar *string; GSList *l; e_cal_component_get_summary (real_comp, &text); @@ -1344,7 +1344,7 @@ show_current_event (EItipControl *itip) { EItipControlPrivate *priv; const gchar *itip_title, *itip_desc; - char *options; + gchar *options; gboolean show_selector = FALSE; priv = itip->priv; @@ -1420,7 +1420,7 @@ show_current_todo (EItipControl *itip) { EItipControlPrivate *priv; const gchar *itip_title, *itip_desc; - char *options; + gchar *options; gboolean show_selector = FALSE; priv = itip->priv; @@ -1497,7 +1497,7 @@ show_current_freebusy (EItipControl *itip) { EItipControlPrivate *priv; const gchar *itip_title, *itip_desc; - char *options; + gchar *options; priv = itip->priv; @@ -1567,7 +1567,7 @@ show_current (EItipControl *itip) /* Determine any delegate sections */ prop = icalcomponent_get_first_property (priv->ical_comp, ICAL_X_PROPERTY); while (prop) { - const char *x_name, *x_val; + const gchar *x_name, *x_val; x_name = icalproperty_get_x_name (prop); x_val = icalproperty_get_x (prop); @@ -1605,7 +1605,7 @@ show_current (EItipControl *itip) /* Add default reminder if the config says so */ if (calendar_config_get_use_default_reminder ()) { ECalComponentAlarm *acomp; - int interval; + gint interval; CalUnits units; ECalComponentAlarmTrigger trigger; @@ -1880,7 +1880,7 @@ e_itip_control_get_calendar_uid (EItipControl *itip) static gboolean -change_status (icalcomponent *ical_comp, const char *address, icalparameter_partstat status) +change_status (icalcomponent *ical_comp, const gchar *address, icalparameter_partstat status) { icalproperty *prop; @@ -1930,7 +1930,7 @@ update_item (EItipControl *itip) { EItipControlPrivate *priv; struct icaltimetype stamp; - char *str; + gchar *str; icalproperty *prop; icalcomponent *clone; GtkWidget *dialog; @@ -1985,7 +1985,7 @@ update_attendee_status (EItipControl *itip) EItipControlPrivate *priv; ECalComponent *comp = NULL; icalcomponent *icalcomp = NULL; - const char *uid; + const gchar *uid; GtkWidget *dialog; GError *error = NULL; @@ -2174,8 +2174,8 @@ send_freebusy (EItipControl *itip) static void url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpointer data) -{ unsigned char buffer[4096]; - int len, fd; +{ guchar buffer[4096]; + gint len, fd; if ((fd = g_open (url, O_RDONLY|O_BINARY, 0)) == -1) { g_warning ("%s", g_strerror (errno)); @@ -2183,7 +2183,7 @@ url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpoint } while ((len = read (fd, buffer, 4096)) > 0) { - gtk_html_write (html, handle, (char *)buffer, len); + gtk_html_write (html, handle, (gchar *)buffer, len); } if (len < 0) { @@ -2239,7 +2239,7 @@ option_activated_cb (GtkWidget *widget, gpointer data) } static void -add_option (EItipControl *itip, GtkWidget *combo, const char *text, char action) +add_option (EItipControl *itip, GtkWidget *combo, const gchar *text, gchar action) { GtkTreeIter iter; GtkListStore *store; @@ -2282,7 +2282,7 @@ static void insert_label (GtkWidget *hbox) { GtkWidget *label; - char *text; + gchar *text; text = g_strdup_printf ("<b>%s</b>", _("Choose an action:")); label = gtk_label_new (NULL); @@ -2570,7 +2570,7 @@ ok_clicked_cb (GtkWidget *widget, gpointer data) icalcomponent *ical_comp; icalproperty *prop; icalvalue *value; - const char *attendee; + const gchar *attendee; GSList *l, *list = NULL; comp = e_cal_component_clone (priv->comp); @@ -2587,7 +2587,7 @@ ok_clicked_cb (GtkWidget *widget, gpointer data) prop != NULL; prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) { - char *text; + gchar *text; value = icalproperty_get_value (prop); if (!value) diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c index 0b5e147407..52d5860e29 100644 --- a/calendar/gui/e-meeting-attendee.c +++ b/calendar/gui/e-meeting-attendee.c @@ -669,8 +669,8 @@ compare_times (EMeetingTime *time1, } static gint -compare_period_starts (const void *arg1, - const void *arg2) +compare_period_starts (gconstpointer arg1, + gconstpointer arg2) { EMeetingFreeBusyPeriod *period1, *period2; diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index c903c97c23..8567aa07fa 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -122,7 +122,7 @@ e_meeting_list_view_class_init (EMeetingListViewClass *klass) static void -add_section (ENameSelector *name_selector, const char *name) +add_section (ENameSelector *name_selector, const gchar *name) { ENameSelectorModel *name_selector_model; @@ -160,11 +160,11 @@ get_type_strings (void) { GList *strings = NULL; - strings = g_list_append (strings, (char*) _("Individual")); - strings = g_list_append (strings, (char*) _("Group")); - strings = g_list_append (strings, (char*) _("Resource")); - strings = g_list_append (strings, (char*) _("Room")); - strings = g_list_append (strings, (char*) _("Unknown")); + strings = g_list_append (strings, (gchar *) _("Individual")); + strings = g_list_append (strings, (gchar *) _("Group")); + strings = g_list_append (strings, (gchar *) _("Resource")); + strings = g_list_append (strings, (gchar *) _("Room")); + strings = g_list_append (strings, (gchar *) _("Unknown")); return strings; } @@ -174,11 +174,11 @@ get_role_strings (void) { GList *strings = NULL; - strings = g_list_append (strings, (char*) _("Chair")); - strings = g_list_append (strings, (char*) _("Required Participant")); - strings = g_list_append (strings, (char*) _("Optional Participant")); - strings = g_list_append (strings, (char*) _("Non-Participant")); - strings = g_list_append (strings, (char*) _("Unknown")); + strings = g_list_append (strings, (gchar *) _("Chair")); + strings = g_list_append (strings, (gchar *) _("Required Participant")); + strings = g_list_append (strings, (gchar *) _("Optional Participant")); + strings = g_list_append (strings, (gchar *) _("Non-Participant")); + strings = g_list_append (strings, (gchar *) _("Unknown")); return strings; } @@ -188,8 +188,8 @@ get_rsvp_strings (void) { GList *strings = NULL; - strings = g_list_append (strings, (char*) _("Yes")); - strings = g_list_append (strings, (char*) _("No")); + strings = g_list_append (strings, (gchar *) _("Yes")); + strings = g_list_append (strings, (gchar *) _("No")); return strings; } @@ -199,11 +199,11 @@ get_status_strings (void) { GList *strings = NULL; - strings = g_list_append (strings, (char*) _("Needs Action")); - strings = g_list_append (strings, (char*) _("Accepted")); - strings = g_list_append (strings, (char*) _("Declined")); - strings = g_list_append (strings, (char*) _("Tentative")); - strings = g_list_append (strings, (char*) _("Delegated")); + strings = g_list_append (strings, (gchar *) _("Needs Action")); + strings = g_list_append (strings, (gchar *) _("Accepted")); + strings = g_list_append (strings, (gchar *) _("Declined")); + strings = g_list_append (strings, (gchar *) _("Tentative")); + strings = g_list_append (strings, (gchar *) _("Delegated")); return strings; } @@ -213,7 +213,7 @@ value_edited (GtkTreeView *view, gint col, const gchar *path, const gchar *text) { EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view)); GtkTreePath *treepath = gtk_tree_path_new_from_string (path); - int row = gtk_tree_path_get_indices (treepath)[0]; + gint row = gtk_tree_path_get_indices (treepath)[0]; e_meeting_store_set_value (model, row, col, text); gtk_tree_path_free (treepath); @@ -264,7 +264,7 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, GList *destinations, *l; EDestinationStore *destination_store; ENameSelectorModel *name_selector_model; - const char *madd = NULL; + const gchar *madd = NULL; EMeetingListViewPrivate *priv; guint i = 1; @@ -278,7 +278,7 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, madd = itip_strip_mailto (e_meeting_attendee_get_address (ma)); for (l = destinations; l; l = g_list_next (l)) { - const char *attendee = NULL; + const gchar *attendee = NULL; EDestination *des = l->data; @@ -354,7 +354,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address { EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view)); GtkTreePath *treepath = gtk_tree_path_new_from_string (path); - int row = gtk_tree_path_get_indices (treepath)[0]; + gint row = gtk_tree_path_get_indices (treepath)[0]; EMeetingAttendee *existing_attendee; gboolean removed = FALSE, address_changed = FALSE; @@ -365,7 +365,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address GList *l, *m; for (l = addresses, m = names; l && m; l = l->next, m = m->next) { - char *name = m->data, *email = l->data; + gchar *name = m->data, *email = l->data; if (!((name && *name) || (email && *email))) continue; @@ -374,7 +374,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address continue; attendee = e_meeting_store_add_attendee_with_defaults (model); - e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (char *)l->data)); + e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (gchar *)l->data)); e_meeting_attendee_set_cn (attendee, g_strdup (m->data)); if (existing_attendee) { /* FIXME Should we copy anything else? */ @@ -395,8 +395,8 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address } } else if (g_list_length (addresses) == 1) { - char *name = names->data, *email = addresses->data; - int existing_row; + gchar *name = names->data, *email = addresses->data; + gint existing_row; if (!((name && *name) || (email && *email)) || ((e_meeting_store_find_attendee (model, email, &existing_row) != NULL) && existing_row != row)){ if (existing_attendee) { @@ -430,7 +430,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address } } else { if (existing_attendee) { - const char *address = e_meeting_attendee_get_address (existing_attendee); + const gchar *address = e_meeting_attendee_get_address (existing_attendee); if (!(address && *address)) { removed = TRUE; @@ -456,7 +456,7 @@ attendee_editing_canceled_cb (GtkCellRenderer *renderer, GtkTreeView *view) EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view)); GtkTreePath *path; EMeetingAttendee *existing_attendee; - int row; + gint row; /* This is for newly added attendees when the editing is cancelled */ gtk_tree_view_get_cursor (view, &path, NULL); @@ -534,7 +534,7 @@ build_table (EMeetingListView *lview) EMeetingListViewPrivate *priv; GHashTable *edit_table; GtkTreeViewColumn *col; - int pos; + gint pos; priv = lview->priv; edit_table = priv->renderers; @@ -618,7 +618,7 @@ static void change_edit_cols_for_user (gpointer key, gpointer value, gpointer user_data) { GtkCellRenderer *renderer = (GtkCellRenderer *) value; - int key_val = GPOINTER_TO_INT (key); + gint key_val = GPOINTER_TO_INT (key); switch (key_val) { case E_MEETING_STORE_ATTENDEE_COL: @@ -652,7 +652,7 @@ row_activated_cb (GtkTreeSelection *selection, EMeetingListView *view) { EMeetingAttendee *existing_attendee; EMeetingListViewPrivate *priv; - int row; + gint row; EMeetingAttendeeEditLevel el; gint edit_level; GtkTreeModel *model; @@ -776,7 +776,7 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role ENameSelectorDialog *dialog; EContactStore *c_store; GList *books, *l; - char *uri = e_contact_get (contact, E_CONTACT_BOOK_URI); + gchar *uri = e_contact_get (contact, E_CONTACT_BOOK_URI); dialog = e_name_selector_peek_dialog (view->priv->name_selector); c_store = dialog->name_selector_model->contact_store; @@ -793,11 +793,11 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role if (book) { GList *contacts; EContact *n_con = NULL; - char *qu; + gchar *qu; EBookQuery *query; qu = g_strdup_printf ("(is \"full_name\" \"%s\")", - (char *) e_contact_get (contact, E_CONTACT_FULL_NAME)); + (gchar *) e_contact_get (contact, E_CONTACT_FULL_NAME)); query = e_book_query_from_string (qu); if (!e_book_get_contacts (book, query, &contacts, NULL)) { @@ -829,8 +829,8 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role for (l = list_dests; l; l = l->next) { EDestination *dest = l->data; EContact *contact; - const char *name, *attendee = NULL; - char *attr = NULL, *fburi = NULL; + const gchar *name, *attendee = NULL; + gchar *attr = NULL, *fburi = NULL; name = e_destination_get_name (dest); @@ -907,7 +907,7 @@ name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpoin ENameSelectorModel *name_selector_model; EMeetingStore *store; const GPtrArray *attendees; - int i; + gint i; GSList *la = NULL, *l; name_selector_model = e_name_selector_peek_model (view->priv->name_selector); @@ -936,8 +936,8 @@ name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpoin /* remove the deleted attendees from name selector */ for (l = la; l != NULL; l = l->next) { EMeetingAttendee *ma = NULL; - const char *email = l->data; - int i; + const gchar *email = l->data; + gint i; ma = e_meeting_store_find_attendee (store, email, &i); diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c index 5e6270976a..e843bee2f5 100644 --- a/calendar/gui/e-meeting-store.c +++ b/calendar/gui/e-meeting-store.c @@ -46,7 +46,7 @@ struct _EMeetingStorePrivate { ECal *client; icaltimezone *zone; - char *fb_uri; + gchar *fb_uri; GPtrArray *refresh_queue; GHashTable *refresh_data; @@ -69,7 +69,7 @@ struct _EMeetingStoreQueueData { EMeetingTime start; EMeetingTime end; - char buffer[BUF_SIZE]; + gchar buffer[BUF_SIZE]; GString *string; GPtrArray *call_backs; @@ -80,7 +80,7 @@ struct _EMeetingStoreQueueData { static GObjectClass *parent_class = NULL; static icalparameter_cutype -text_to_type (const char *type) +text_to_type (const gchar *type) { if (!e_util_utf8_strcasecmp (type, _("Individual"))) return ICAL_CUTYPE_INDIVIDUAL; @@ -94,7 +94,7 @@ text_to_type (const char *type) return ICAL_CUTYPE_NONE; } -static char * +static gchar * type_to_text (icalparameter_cutype type) { switch (type) { @@ -115,7 +115,7 @@ type_to_text (icalparameter_cutype type) } static icalparameter_role -text_to_role (const char *role) +text_to_role (const gchar *role) { if (!e_util_utf8_strcasecmp (role, _("Chair"))) return ICAL_ROLE_CHAIR; @@ -129,7 +129,7 @@ text_to_role (const char *role) return ICAL_ROLE_NONE; } -static char * +static gchar * role_to_text (icalparameter_role role) { switch (role) { @@ -147,7 +147,7 @@ role_to_text (icalparameter_role role) } static gboolean -text_to_boolean (const char *role) +text_to_boolean (const gchar *role) { if (!e_util_utf8_strcasecmp (role, _("Yes"))) return TRUE; @@ -155,7 +155,7 @@ text_to_boolean (const char *role) return FALSE; } -static char * +static gchar * boolean_to_text (gboolean b) { if (b) @@ -165,7 +165,7 @@ boolean_to_text (gboolean b) } static icalparameter_partstat -text_to_partstat (const char *partstat) +text_to_partstat (const gchar *partstat) { if (!e_util_utf8_strcasecmp (partstat, _("Needs Action"))) return ICAL_PARTSTAT_NEEDSACTION; @@ -185,7 +185,7 @@ text_to_partstat (const char *partstat) return ICAL_PARTSTAT_NONE; } -static char * +static gchar * partstat_to_text (icalparameter_partstat partstat) { switch (partstat) { @@ -226,7 +226,7 @@ get_n_columns (GtkTreeModel *model) } static GType -get_column_type (GtkTreeModel *model, int col) +get_column_type (GtkTreeModel *model, gint col) { g_return_val_if_fail (E_IS_MEETING_STORE (model), G_TYPE_INVALID); @@ -253,7 +253,7 @@ get_column_type (GtkTreeModel *model, int col) static gboolean get_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path) { - int row; + gint row; g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE); g_return_val_if_fail (gtk_tree_path_get_depth (path) > 0, FALSE); @@ -272,7 +272,7 @@ get_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path) static GtkTreePath * get_path (GtkTreeModel *model, GtkTreeIter *iter) { - int row; + gint row; GtkTreePath *result; g_return_val_if_fail (E_IS_MEETING_STORE (model), NULL); @@ -288,12 +288,12 @@ get_path (GtkTreeModel *model, GtkTreeIter *iter) } static void -get_value (GtkTreeModel *model, GtkTreeIter *iter, int col, GValue *value) +get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value) { EMeetingStore *store; EMeetingAttendee *attendee; const gchar *cn; - int row; + gint row; g_return_if_fail (E_IS_MEETING_STORE (model)); g_return_if_fail (col >= 0 && col < E_MEETING_STORE_COLUMN_COUNT); @@ -365,7 +365,7 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, int col, GValue *value) static gboolean iter_next (GtkTreeModel *model, GtkTreeIter *iter) { - int row; + gint row; g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE); g_return_val_if_fail (iter->stamp == E_MEETING_STORE (model)->priv->stamp, FALSE); @@ -414,7 +414,7 @@ iter_n_children (GtkTreeModel *model, GtkTreeIter *iter) } static gboolean -iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, int n) +iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, gint n) { EMeetingStore *store; @@ -455,15 +455,15 @@ ems_tree_model_init (GtkTreeModelIface *iface) } void -e_meeting_store_set_value (EMeetingStore *store, int row, int col, const gchar *val) +e_meeting_store_set_value (EMeetingStore *store, gint row, gint col, const gchar *val) { icalparameter_cutype type; EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, row); switch (col) { case E_MEETING_STORE_ADDRESS_COL: - if (val != NULL && *((char *)val)) - e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (char *) val)); + if (val != NULL && *((gchar *)val)) + e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (gchar *) val)); break; case E_MEETING_STORE_MEMBER_COL: e_meeting_attendee_set_member (attendee, g_strdup (val)); @@ -528,7 +528,7 @@ ems_finalize (GObject *obj) { EMeetingStore *store = E_MEETING_STORE (obj); EMeetingStorePrivate *priv; - int i; + gint i; priv = store->priv; @@ -729,7 +729,7 @@ EMeetingAttendee * e_meeting_store_add_attendee_with_defaults (EMeetingStore *store) { EMeetingAttendee *attendee; - char *str; + gchar *str; attendee = E_MEETING_ATTENDEE (e_meeting_attendee_new ()); @@ -808,7 +808,7 @@ EMeetingAttendee * e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint *row) { EMeetingAttendee *attendee; - int i; + gint i; if (address == NULL) return NULL; @@ -882,7 +882,7 @@ find_zone (icalproperty *ip, icalcomponent *tz_top_level) { icalparameter *param; icalcomponent *sub_comp; - const char *tzid; + const gchar *tzid; icalcompiter iter; if (tz_top_level == NULL) @@ -897,7 +897,7 @@ find_zone (icalproperty *ip, icalcomponent *tz_top_level) while ((sub_comp = icalcompiter_deref (&iter)) != NULL) { icalcomponent *clone; icalproperty *prop; - const char *tz_tzid; + const gchar *tz_tzid; prop = icalcomponent_get_first_property (sub_comp, ICAL_TZID_PROPERTY); tz_tzid = icalproperty_get_tzid (prop); @@ -921,7 +921,7 @@ static void process_callbacks (EMeetingStoreQueueData *qdata) { EMeetingStore *store; - int i; + gint i; store = qdata->store; @@ -1046,7 +1046,7 @@ process_free_busy_comp (EMeetingAttendee *attendee, } static void -process_free_busy (EMeetingStoreQueueData *qdata, char *text) +process_free_busy (EMeetingStoreQueueData *qdata, gchar *text) { EMeetingStore *store = qdata->store; EMeetingStorePrivate *priv; @@ -1112,7 +1112,7 @@ replace_string (gchar *string, const gchar *from_value, gchar *to_value) return replaced; } -static void start_async_read (const char *uri, gpointer data); +static void start_async_read (const gchar *uri, gpointer data); typedef struct { ECal *client; @@ -1120,8 +1120,8 @@ typedef struct { time_t endt; GList *users; GList *fb_data; - char *fb_uri; - char *email; + gchar *fb_uri; + gchar *email; EMeetingAttendee *attendee; EMeetingStoreQueueData *qdata; EMeetingStore *store; @@ -1136,7 +1136,7 @@ freebusy_async (gpointer data) FreeBusyAsyncData *fbd = data; EMeetingAttendee *attendee = fbd->attendee; gchar *default_fb_uri = NULL; - char *fburi = NULL; + gchar *fburi = NULL; static GStaticMutex mutex = G_STATIC_MUTEX_INIT; EMeetingStorePrivate *priv = fbd->store->priv; @@ -1154,7 +1154,7 @@ freebusy_async (gpointer data) if (fbd->fb_data != NULL) { ECalComponent *comp = fbd->fb_data->data; - char *comp_str; + gchar *comp_str; comp_str = e_cal_component_get_as_string (comp); process_free_busy (fbd->qdata, comp_str); @@ -1211,7 +1211,7 @@ refresh_busy_periods (gpointer data) EMeetingStorePrivate *priv; EMeetingAttendee *attendee = NULL; EMeetingStoreQueueData *qdata = NULL; - int i; + gint i; GThread *thread; GError *error = NULL; FreeBusyAsyncData *fbd; @@ -1304,7 +1304,7 @@ refresh_busy_periods (gpointer data) } static void -refresh_queue_add (EMeetingStore *store, int row, +refresh_queue_add (EMeetingStore *store, gint row, EMeetingTime *start, EMeetingTime *end, EMeetingStoreRefreshCallback call_back, @@ -1313,7 +1313,7 @@ refresh_queue_add (EMeetingStore *store, int row, EMeetingStorePrivate *priv; EMeetingAttendee *attendee; EMeetingStoreQueueData *qdata; - int i; + gint i; priv = store->priv; @@ -1349,7 +1349,7 @@ refresh_queue_add (EMeetingStore *store, int row, g_ptr_array_add (qdata->call_backs, call_back); g_ptr_array_add (qdata->data, data); - g_hash_table_insert (priv->refresh_data, (void *)itip_strip_mailto (e_meeting_attendee_get_address (attendee)), qdata); + g_hash_table_insert (priv->refresh_data, (gpointer)itip_strip_mailto (e_meeting_attendee_get_address (attendee)), qdata); } else { if (e_meeting_time_compare_times (start, &qdata->start) == -1) qdata->start = *start; @@ -1407,7 +1407,7 @@ async_read (GObject *source_object, GAsyncResult *res, gpointer data) } static void -start_async_read (const char *uri, gpointer data) +start_async_read (const gchar *uri, gpointer data) { EMeetingStoreQueueData *qdata = data; GError *error = NULL; @@ -1444,7 +1444,7 @@ e_meeting_store_refresh_all_busy_periods (EMeetingStore *store, EMeetingStoreRefreshCallback call_back, gpointer data) { - int i; + gint i; g_return_if_fail (E_IS_MEETING_STORE (store)); @@ -1454,7 +1454,7 @@ e_meeting_store_refresh_all_busy_periods (EMeetingStore *store, void e_meeting_store_refresh_busy_periods (EMeetingStore *store, - int row, + gint row, EMeetingTime *start, EMeetingTime *end, EMeetingStoreRefreshCallback call_back, diff --git a/calendar/gui/e-meeting-store.h b/calendar/gui/e-meeting-store.h index 8a237fc34b..f67ad92ddd 100644 --- a/calendar/gui/e-meeting-store.h +++ b/calendar/gui/e-meeting-store.h @@ -70,7 +70,7 @@ typedef gboolean (* EMeetingStoreRefreshCallback) (gpointer data); GType e_meeting_store_get_type (void); GObject *e_meeting_store_new (void); -void e_meeting_store_set_value (EMeetingStore *im, int row, int col, const gchar *val); +void e_meeting_store_set_value (EMeetingStore *im, gint row, gint col, const gchar *val); ECal *e_meeting_store_get_e_cal (EMeetingStore *im); void e_meeting_store_set_e_cal (EMeetingStore *im, ECal *client); @@ -100,7 +100,7 @@ void e_meeting_store_refresh_all_busy_periods (EMeetingStore *im, EMeetingStoreRefreshCallback call_back, gpointer data); void e_meeting_store_refresh_busy_periods (EMeetingStore *im, - int row, + gint row, EMeetingTime *start, EMeetingTime *end, EMeetingStoreRefreshCallback call_back, diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c index ae7eeb7937..95a1738057 100644 --- a/calendar/gui/e-meeting-time-sel-item.c +++ b/calendar/gui/e-meeting-time-sel-item.c @@ -49,14 +49,14 @@ static void e_meeting_time_selector_item_realize (GnomeCanvasItem *item); static void e_meeting_time_selector_item_unrealize (GnomeCanvasItem *item); static void e_meeting_time_selector_item_update (GnomeCanvasItem *item, double *affine, - ArtSVP *clip_path, int flags); + ArtSVP *clip_path, gint flags); static void e_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, - int width, int height); + gint x, gint y, + gint width, gint height); static double e_meeting_time_selector_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item); static gint e_meeting_time_selector_item_event (GnomeCanvasItem *item, GdkEvent *event); @@ -70,17 +70,17 @@ static gint e_meeting_time_selector_item_motion_notify (EMeetingTimeSelectorItem static void e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, - int x, int scroll_y, - int width, int height); -static void e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int y, int width, int height); + gint x, gint scroll_y, + gint width, gint height); +static void e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, gint x, gint y, gint width, gint height); static void e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, - int x, int scroll_y, - int width, int height); -static void e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int scroll_y, int width, int height); + gint x, gint scroll_y, + gint width, gint height); +static void e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, gint x, gint scroll_y, gint width, gint height); static gint e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *mts_item, GDate *date, gint row); -static void e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, int row, int x, int y, int width, int first_period, EMeetingFreeBusyType busy_type, cairo_t *cr); +static void e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, gint row, gint x, gint y, gint width, gint first_period, EMeetingFreeBusyType busy_type, cairo_t *cr); static EMeetingTimeSelectorPosition e_meeting_time_selector_item_get_drag_position (EMeetingTimeSelectorItem *mts_item, gint x, gint y); static gboolean e_meeting_time_selector_item_calculate_busy_range (EMeetingTimeSelector *mts, @@ -232,7 +232,7 @@ e_meeting_time_selector_item_unrealize (GnomeCanvasItem *item) static void -e_meeting_time_selector_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +e_meeting_time_selector_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) { if (GNOME_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->update) (* GNOME_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->update) (item, affine, clip_path, flags); @@ -250,7 +250,7 @@ e_meeting_time_selector_item_update (GnomeCanvasItem *item, double *affine, ArtS */ static void -e_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) +e_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height) { EMeetingTimeSelector *mts; EMeetingTimeSelectorItem *mts_item; @@ -418,8 +418,8 @@ e_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, static void e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, - int x, int scroll_y, - int width, int height) + gint x, gint scroll_y, + gint width, gint height) { EMeetingTimeSelector *mts; GdkGC *gc; @@ -515,7 +515,7 @@ e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item, list of attendees. For now we just paint the bars for each attendee of each other. If we want to speed it up we could optimise it later. */ static void -e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int scroll_y, int width, int height) +e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, gint x, gint scroll_y, gint width, gint height) { EMeetingTimeSelector *mts; EMeetingAttendee *ia; @@ -565,8 +565,8 @@ e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelec static void e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, - int x, int scroll_y, - int width, int height) + gint x, gint scroll_y, + gint width, gint height) { EMeetingTimeSelector *mts; GdkGC *gc; @@ -639,7 +639,7 @@ e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item, /* This paints the colored bars representing busy periods for the individual attendees. */ static void -e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, int x, int scroll_y, int width, int height) +e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, gint x, gint scroll_y, gint width, gint height) { EMeetingTimeSelector *mts; EMeetingFreeBusyType busy_type; @@ -722,7 +722,7 @@ e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *m busy type, e.g out of office. It is passed the index of the first visible busy period of the attendee and continues until it runs off the screen. */ static void -e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, int x, int y, int width, int row, int first_period, EMeetingFreeBusyType busy_type, cairo_t *cr) +e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, gint x, gint y, gint width, gint row, gint first_period, EMeetingFreeBusyType busy_type, cairo_t *cr) { EMeetingTimeSelector *mts; EMeetingAttendee *ia; @@ -799,7 +799,7 @@ e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorIt This is needed so that we get button/motion events. */ static double e_meeting_time_selector_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -875,7 +875,7 @@ e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item, if (!mts->all_day) { gint astart_year, astart_month, astart_day, astart_hour, astart_minute; gint aend_year, aend_month, aend_day, aend_hour, aend_minute; - int hdiff, mdiff; + gint hdiff, mdiff; GDate asdate, aedate; e_meeting_time_selector_get_meeting_time (mts_item->mts, diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index c10a85e341..09e1994908 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -87,7 +87,7 @@ static gint mts_signals [LAST_SIGNAL] = { 0 }; static void e_meeting_time_selector_destroy (GtkObject *object); static void e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts, - const char *name, GdkColor *c); + const gchar *name, GdkColor *c); static void e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts, GtkWidget *hbox, gchar *label_text, @@ -656,7 +656,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em e_meeting_time_selector_alloc_named_color (mts, "orange4", &mts->busy_colors[E_MEETING_FREE_BUSY_OUT_OF_OFFICE]); /* Create the stipple, for attendees with no data. */ - mts->stipple = gdk_bitmap_create_from_data (NULL, (gchar*)stipple_bits, + mts->stipple = gdk_bitmap_create_from_data (NULL, (gchar *)stipple_bits, 8, 8); /* Connect handlers to the adjustments scroll the other items. */ @@ -743,7 +743,7 @@ e_meeting_time_selector_expose_key_color (GtkWidget *darea, static void e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts, - const char *name, GdkColor *c) + const gchar *name, GdkColor *c) { GdkColormap *colormap; @@ -876,7 +876,7 @@ static int get_cell_height (GtkTreeView *tree) { GtkTreeViewColumn *column; - int height = -1; + gint height = -1; column = gtk_tree_view_get_column (tree, 0); gtk_tree_view_column_cell_get_size (column, NULL, @@ -891,7 +891,7 @@ style_change_idle_func (gpointer widget) { EMeetingTimeSelector *mts; EMeetingTime saved_time; - int hour, max_hour_width; + gint hour, max_hour_width; /*int maxheight; */ PangoFontDescription *font_desc; PangoContext *pango_context; @@ -1234,7 +1234,7 @@ e_meeting_time_selector_refresh_cb (gpointer data) } void -e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, gboolean all) +e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row, gboolean all) { EMeetingTime start, end; @@ -1258,7 +1258,7 @@ e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, g /* FIXME We should really have a mechanism to unqueue the * notification */ if (all) { - int i; + gint i; for (i = 0; i < e_meeting_store_count_actual_attendees (mts->model); i++) g_object_ref (GTK_OBJECT (mts)); @@ -1395,7 +1395,7 @@ e_meeting_time_selector_dump (EMeetingTimeSelector *mts) /* This formats a EMeetingTimein a string and returns it. Note that it uses a static buffer. */ -gchar* +gchar * e_meeting_time_selector_dump_time (EMeetingTime*mtstime) { static gchar buffer[128]; @@ -1415,7 +1415,7 @@ e_meeting_time_selector_dump_time (EMeetingTime*mtstime) /* This formats a GDate in a string and returns it. Note that it uses a static buffer. */ -gchar* +gchar * e_meeting_time_selector_dump_date (GDate *date) { static gchar buffer[128]; @@ -2068,7 +2068,7 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts) { /* An array of dates, one for each month in the year 2000. They must all be Sundays. */ - static const int days[12] = { 23, 20, 19, 23, 21, 18, + static const gint days[12] = { 23, 20, 19, 23, 21, 18, 23, 20, 17, 22, 19, 24 }; GDate date; gint max_date_width, longest_weekday_width, longest_month_width, width; @@ -2881,7 +2881,7 @@ static void row_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data); - int row = gtk_tree_path_get_indices (path) [0]; + gint row = gtk_tree_path_get_indices (path) [0]; /* Update the scroll region. */ e_meeting_time_selector_update_main_canvas_scroll_region (mts); @@ -2897,7 +2897,7 @@ static void row_changed_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data); - int row = gtk_tree_path_get_indices (path) [0]; + gint row = gtk_tree_path_get_indices (path) [0]; /* Get the latest free/busy info */ e_meeting_time_selector_refresh_free_busy (mts, row, FALSE); @@ -2922,7 +2922,7 @@ row_deleted_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data) static gboolean free_busy_timeout_refresh (gpointer data) { - char *fb_uri; + gchar *fb_uri; EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data); diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h index 2cc82278f6..97be769917 100644 --- a/calendar/gui/e-meeting-time-sel.h +++ b/calendar/gui/e-meeting-time-sel.h @@ -382,13 +382,13 @@ void e_meeting_time_selector_calculate_time (EMeetingTimeSelector *mts, EMeetingTime*time); gint e_meeting_time_selector_calculate_time_position (EMeetingTimeSelector *mts, EMeetingTime *mtstime); -void e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, gboolean all); +void e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row, gboolean all); /* Debugging function to dump information on all attendees. */ #ifdef E_MEETING_TIME_SELECTOR_DEBUG void e_meeting_time_selector_dump (EMeetingTimeSelector *mts); -gchar* e_meeting_time_selector_dump_time (EMeetingTime*mtstime); -gchar* e_meeting_time_selector_dump_date (GDate *date); +gchar * e_meeting_time_selector_dump_time (EMeetingTime*mtstime); +gchar * e_meeting_time_selector_dump_date (GDate *date); #endif /* E_MEETING_TIME_SELECTOR_DEBUG */ G_END_DECLS diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index ac43b39a5a..cbc66c44d0 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -112,7 +112,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; /* The icons to represent the task. */ #define E_MEMO_MODEL_NUM_ICONS 2 -static const char* icon_names[E_MEMO_MODEL_NUM_ICONS] = { +static const gchar * icon_names[E_MEMO_MODEL_NUM_ICONS] = { "stock_notes", "stock_insert-note" }; static GdkPixbuf* icon_pixbufs[E_MEMO_MODEL_NUM_ICONS] = { NULL }; @@ -371,12 +371,12 @@ e_memo_table_open_selected (EMemoTable *memo_table) } /* Used from e_table_selected_row_foreach(); puts the selected row number in an - * int pointed to by the closure data. + * gint pointed to by the closure data. */ static void -get_selected_row_cb (int model_row, gpointer data) +get_selected_row_cb (gint model_row, gpointer data) { - int *row; + gint *row; row = data; *row = model_row; @@ -390,7 +390,7 @@ static ECalModelComponent * get_selected_comp (EMemoTable *memo_table) { ETable *etable; - int row; + gint row; etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (memo_table->etable)); if (e_table_selected_count (etable) != 1) @@ -412,7 +412,7 @@ struct get_selected_uids_closure { /* Used from e_table_selected_row_foreach(), builds a list of the selected UIDs */ static void -add_uid_cb (int model_row, gpointer data) +add_uid_cb (gint model_row, gpointer data) { struct get_selected_uids_closure *closure; ECalModelComponent *comp_data; @@ -489,7 +489,7 @@ void e_memo_table_delete_selected (EMemoTable *memo_table) { ETable *etable; - int n_selected; + gint n_selected; ECalModelComponent *comp_data; ECalComponent *comp = NULL; @@ -540,7 +540,7 @@ e_memo_table_cut_clipboard (EMemoTable *memo_table) /* callback for e_table_selected_row_foreach */ static void -copy_row_cb (int model_row, gpointer data) +copy_row_cb (gint model_row, gpointer data) { EMemoTable *memo_table; ECalModelComponent *comp_data; @@ -600,7 +600,7 @@ e_memo_table_copy_clipboard (EMemoTable *memo_table) { ETable *etable; GtkClipboard *clipboard; - char *comp_str; + gchar *comp_str; g_return_if_fail (E_IS_MEMO_TABLE (memo_table)); @@ -629,7 +629,7 @@ static void clipboard_get_calendar_data (EMemoTable *memo_table, const gchar *text) { icalcomponent *icalcomp; - char *uid; + gchar *uid; ECalComponent *comp; ECal *client; icalcomponent_kind kind; @@ -687,7 +687,7 @@ clipboard_get_calendar_data (EMemoTable *memo_table, const gchar *text) comp = e_cal_component_new (); e_cal_component_set_icalcomponent (comp, icalcomp); uid = e_cal_component_gen_uid (); - e_cal_component_set_uid (comp, (const char *) uid); + e_cal_component_set_uid (comp, (const gchar *) uid); free (uid); e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL); @@ -755,7 +755,7 @@ static void open_memo (EMemoTable *memo_table, ECalModelComponent *comp_data) { CompEditor *medit; - const char *uid; + const gchar *uid; uid = icalcomponent_get_uid (comp_data->icalcomp); @@ -786,7 +786,7 @@ open_memo (EMemoTable *memo_table, ECalModelComponent *comp_data) /* Opens the task in the specified row */ static void -open_memo_by_row (EMemoTable *memo_table, int row) +open_memo_by_row (EMemoTable *memo_table, gint row) { ECalModelComponent *comp_data; @@ -806,7 +806,7 @@ e_memo_table_on_double_click (ETable *table, static void -e_memo_table_on_open_memo (EPopup *ep, EPopupItem *pitem, void *data) +e_memo_table_on_open_memo (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); ECalModelComponent *comp_data; @@ -817,12 +817,12 @@ e_memo_table_on_open_memo (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_memo_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data) +e_memo_table_on_save_as (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); ECalModelComponent *comp_data; - char *filename; - char *ical_string; + gchar *filename; + gchar *ical_string; comp_data = get_selected_comp (memo_table); if (comp_data == NULL) @@ -843,7 +843,7 @@ e_memo_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_memo_table_on_print_memo (EPopup *ep, EPopupItem *pitem, void *data) +e_memo_table_on_print_memo (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); ECalModelComponent *comp_data; @@ -861,7 +861,7 @@ e_memo_table_on_print_memo (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_memo_table_on_cut (EPopup *ep, EPopupItem *pitem, void *data) +e_memo_table_on_cut (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); @@ -869,7 +869,7 @@ e_memo_table_on_cut (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_memo_table_on_copy (EPopup *ep, EPopupItem *pitem, void *data) +e_memo_table_on_copy (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); @@ -877,7 +877,7 @@ e_memo_table_on_copy (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_memo_table_on_paste (EPopup *ep, EPopupItem *pitem, void *data) +e_memo_table_on_paste (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); @@ -885,7 +885,7 @@ e_memo_table_on_paste (EPopup *ep, EPopupItem *pitem, void *data) } static void -e_memo_table_on_forward (EPopup *ep, EPopupItem *pitem, void *data) +e_memo_table_on_forward (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); ECalModelComponent *comp_data; @@ -904,7 +904,7 @@ e_memo_table_on_forward (EPopup *ep, EPopupItem *pitem, void *data) /* Opens the URL of the memo */ static void -open_url_cb (EPopup *ep, EPopupItem *pitem, void *data) +open_url_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); ECalModelComponent *comp_data; @@ -924,7 +924,7 @@ open_url_cb (EPopup *ep, EPopupItem *pitem, void *data) /* Callback for the "delete tasks" menu item */ static void -delete_cb (EPopup *ep, EPopupItem *pitem, void *data) +delete_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { EMemoTable *memo_table = E_MEMO_TABLE (data); @@ -954,7 +954,7 @@ static EPopupItem memos_popup_items [] = { }; static void -emt_popup_free(EPopup *ep, GSList *items, void *data) +emt_popup_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } @@ -969,7 +969,7 @@ e_memo_table_show_popup_menu (ETable *table, GPtrArray *events; ECalPopup *ep; ECalPopupTargetSelect *t; - int i; + gint i; selection = get_selected_objects (memo_table); if (!selection) @@ -1100,7 +1100,7 @@ e_memo_table_get_current_time (ECellDateEdit *ecde, gpointer data) #ifdef TRANSLATORS_ONLY -static char *test[] = { +static gchar *test[] = { N_("Click to add a memo") }; @@ -1128,7 +1128,7 @@ e_memo_table_set_status_message (EMemoTable *memo_table, const gchar *message) memo_table->activity_id = 0; } } else if (memo_table->activity_id == 0) { - char *client_id = g_strdup_printf ("%p", (gpointer) memo_table); + gchar *client_id = g_strdup_printf ("%p", (gpointer) memo_table); memo_table->activity_id = e_activity_handler_operation_started ( memo_table->activity_handler, client_id, message, TRUE); diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c index f6f1cff91c..4b8d234cee 100644 --- a/calendar/gui/e-memos.c +++ b/calendar/gui/e-memos.c @@ -79,7 +79,7 @@ struct _EMemosPrivate { GtkWidget *preview; gchar *current_uid; - char *sexp; + gchar *sexp; /* View instance and the view menus handler */ GalViewInstance *view_instance; @@ -93,7 +93,7 @@ static void e_memos_destroy (GtkObject *object); static void update_view (EMemos *memos); static void categories_changed_cb (gpointer object, gpointer user_data); -static void backend_error_cb (ECal *client, const char *message, gpointer data); +static void backend_error_cb (ECal *client, const gchar *message, gpointer data); /* Signal IDs */ enum { @@ -111,7 +111,7 @@ static GtkTargetEntry list_drag_types[] = { { (gchar *) "text/calendar", 0, TARGET_VCALENDAR }, { (gchar *) "text/x-calendar", 0, TARGET_VCALENDAR } }; -static const int num_list_drag_types = sizeof (list_drag_types) / sizeof (list_drag_types[0]); +static const gint num_list_drag_types = sizeof (list_drag_types) / sizeof (list_drag_types[0]); static guint e_memos_signals[LAST_SIGNAL] = { 0 }; @@ -119,16 +119,16 @@ G_DEFINE_TYPE (EMemos, e_memos, GTK_TYPE_TABLE) /* Callback used when the cursor changes in the table */ static void -table_cursor_change_cb (ETable *etable, int row, gpointer data) +table_cursor_change_cb (ETable *etable, gint row, gpointer data) { EMemos *memos; EMemosPrivate *priv; ECalModel *model; ECalModelComponent *comp_data; ECalComponent *comp; - const char *uid; + const gchar *uid; - int n_selected; + gint n_selected; memos = E_MEMOS (data); priv = memos->priv; @@ -163,7 +163,7 @@ static void table_selection_change_cb (ETable *etable, gpointer data) { EMemos *memos; - int n_selected; + gint n_selected; memos = E_MEMOS (data); @@ -199,7 +199,7 @@ user_created_cb (GtkWidget *view, EMemos *memos) /* Callback used when the sexp in the search bar changes */ static void -search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer data) +search_bar_sexp_changed_cb (CalSearchBar *cal_search, const gchar *sexp, gpointer data) { EMemos *memos; EMemosPrivate *priv; @@ -217,7 +217,7 @@ search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer /* Callback used when the selected category in the search bar changes */ static void -search_bar_category_changed_cb (CalSearchBar *cal_search, const char *category, gpointer data) +search_bar_category_changed_cb (CalSearchBar *cal_search, const gchar *category, gpointer data) { EMemos *memos; EMemosPrivate *priv; @@ -288,7 +288,7 @@ update_view (EMemos *memos) } static void -model_row_changed_cb (ETableModel *etm, int row, gpointer data) +model_row_changed_cb (ETableModel *etm, gint row, gpointer data) { EMemos *memos; EMemosPrivate *priv; @@ -298,7 +298,7 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer data) priv = memos->priv; if (priv->current_uid) { - const char *uid; + const gchar *uid; comp_data = e_cal_model_get_component_at (E_CAL_MODEL (etm), row); if (comp_data) { @@ -340,7 +340,7 @@ struct AffectedComponents { * This function is called from e_table_selected_row_foreach. **/ static void -get_selected_components_cb (int model_row, gpointer data) +get_selected_components_cb (gint model_row, gpointer data) { struct AffectedComponents *ac = (struct AffectedComponents *) data; @@ -397,7 +397,7 @@ obtain_list_of_components (gpointer data, gpointer user_data) comp_data = (ECalModelComponent *) data; if (list && comp_data) { - char *comp_str; + gchar *comp_str; icalcomponent *vcal; vcal = e_cal_util_new_top_level (); @@ -407,7 +407,7 @@ obtain_list_of_components (gpointer data, gpointer user_data) comp_str = icalcomponent_as_ical_string_r (vcal); if (comp_str) { ESource *source = e_cal_get_source (comp_data->client); - const char *source_uid = e_source_peek_uid (source); + const gchar *source_uid = e_source_peek_uid (source); *list = g_slist_prepend (*list, g_strdup_printf ("%s\n%s", source_uid, comp_str)); @@ -422,8 +422,8 @@ obtain_list_of_components (gpointer data, gpointer user_data) static void table_drag_data_get (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GtkSelectionData *selection_data, guint info, @@ -451,8 +451,8 @@ table_drag_data_get (ETable *table, static void table_drag_data_delete (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, EMemos *memos) { @@ -607,7 +607,7 @@ categories_changed_cb (gpointer object, gpointer user_data) cat_array = g_ptr_array_new (); cat_list = e_categories_get_list (); while (cat_list != NULL) { - if (e_categories_is_searchable ((const char *) cat_list->data)) + if (e_categories_is_searchable ((const gchar *) cat_list->data)) g_ptr_array_add (cat_array, cat_list->data); cat_list = g_list_remove (cat_list, cat_list->data); } @@ -721,11 +721,11 @@ e_memos_destroy (GtkObject *object) } static void -set_status_message (EMemos *memos, const char *message, ...) +set_status_message (EMemos *memos, const gchar *message, ...) { EMemosPrivate *priv; va_list args; - char sz[2048], *msg_string = NULL; + gchar sz[2048], *msg_string = NULL; if (message) { va_start (args, message); @@ -741,11 +741,11 @@ set_status_message (EMemos *memos, const char *message, ...) /* Callback from the calendar client when an error occurs in the backend */ static void -backend_error_cb (ECal *client, const char *message, gpointer data) +backend_error_cb (ECal *client, const gchar *message, gpointer data) { EMemos *memos; GtkWidget *dialog; - char *urinopwd; + gchar *urinopwd; memos = E_MEMOS (data); @@ -927,7 +927,7 @@ e_memos_add_memo_source (EMemos *memos, ESource *source) { EMemosPrivate *priv; ECal *client; - const char *uid; + const gchar *uid; g_return_val_if_fail (memos != NULL, FALSE); g_return_val_if_fail (E_IS_MEMOS (memos), FALSE); @@ -980,7 +980,7 @@ e_memos_remove_memo_source (EMemos *memos, ESource *source) EMemosPrivate *priv; ECal *client; ECalModel *model; - const char *uid; + const gchar *uid; g_return_val_if_fail (memos != NULL, FALSE); g_return_val_if_fail (E_IS_MEMOS (memos), FALSE); @@ -1109,7 +1109,7 @@ e_memos_setup_view_menus (EMemos *memos, BonoboUIComponent *uic) EMemosPrivate *priv; GalViewFactory *factory; ETableSpecification *spec; - char *dir0, *dir1, *filename; + gchar *dir0, *dir1, *filename; static GalViewCollection *collection = NULL; g_return_if_fail (memos != NULL); diff --git a/calendar/gui/e-memos.h b/calendar/gui/e-memos.h index 0a000f0d73..12aeea858e 100644 --- a/calendar/gui/e-memos.h +++ b/calendar/gui/e-memos.h @@ -53,7 +53,7 @@ struct _EMemosClass { GtkTableClass parent_class; /* Notification signals */ - void (* selection_changed) (EMemos *memos, int n_selected); + void (* selection_changed) (EMemos *memos, gint n_selected); void (* source_added) (EMemos *memos, ESource *source); void (* source_removed) (EMemos *memos, ESource *source); }; diff --git a/calendar/gui/e-mini-calendar-config.c b/calendar/gui/e-mini-calendar-config.c index ccd9a2078d..d9b2192ad2 100644 --- a/calendar/gui/e-mini-calendar-config.c +++ b/calendar/gui/e-mini-calendar-config.c @@ -146,7 +146,7 @@ e_mini_calendar_config_get_calendar (EMiniCalendarConfig *mini_config) static void set_week_start (ECalendar *mini_cal) { - int week_start_day; + gint week_start_day; week_start_day = calendar_config_get_week_start_day (); diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 16d8b7636a..5acdcc0f65 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -83,7 +83,7 @@ struct _ETasksPrivate { GtkWidget *preview; gchar *current_uid; - char *sexp; + gchar *sexp; guint update_timeout; /* View instance and the view menus handler */ @@ -98,7 +98,7 @@ static void e_tasks_destroy (GtkObject *object); static void update_view (ETasks *tasks); static void categories_changed_cb (gpointer object, gpointer user_data); -static void backend_error_cb (ECal *client, const char *message, gpointer data); +static void backend_error_cb (ECal *client, const gchar *message, gpointer data); /* Signal IDs */ enum { @@ -116,7 +116,7 @@ static GtkTargetEntry list_drag_types[] = { { (gchar *) "text/calendar", 0, TARGET_VCALENDAR }, { (gchar *) "text/x-calendar", 0, TARGET_VCALENDAR } }; -static const int num_list_drag_types = sizeof (list_drag_types) / sizeof (list_drag_types[0]); +static const gint num_list_drag_types = sizeof (list_drag_types) / sizeof (list_drag_types[0]); static guint e_tasks_signals[LAST_SIGNAL] = { 0 }; @@ -124,16 +124,16 @@ G_DEFINE_TYPE (ETasks, e_tasks, GTK_TYPE_TABLE) /* Callback used when the cursor changes in the table */ static void -table_cursor_change_cb (ETable *etable, int row, gpointer data) +table_cursor_change_cb (ETable *etable, gint row, gpointer data) { ETasks *tasks; ETasksPrivate *priv; ECalModel *model; ECalModelComponent *comp_data; ECalComponent *comp; - const char *uid; + const gchar *uid; - int n_selected; + gint n_selected; tasks = E_TASKS (data); priv = tasks->priv; @@ -177,7 +177,7 @@ static void table_selection_change_cb (ETable *etable, gpointer data) { ETasks *tasks; - int n_selected; + gint n_selected; tasks = E_TASKS (data); @@ -212,7 +212,7 @@ user_created_cb (GtkWidget *view, ETasks *tasks) /* Callback used when the sexp in the search bar changes */ static void -search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer data) +search_bar_sexp_changed_cb (CalSearchBar *cal_search, const gchar *sexp, gpointer data) { ETasks *tasks; ETasksPrivate *priv; @@ -230,7 +230,7 @@ search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer /* Callback used when the selected category in the search bar changes */ static void -search_bar_category_changed_cb (CalSearchBar *cal_search, const char *category, gpointer data) +search_bar_category_changed_cb (CalSearchBar *cal_search, const gchar *category, gpointer data) { ETasks *tasks; ETasksPrivate *priv; @@ -288,8 +288,8 @@ update_view (ETasks *tasks) { ETasksPrivate *priv; ECalModel *model; - char *real_sexp = NULL; - char *new_sexp = NULL; + gchar *real_sexp = NULL; + gchar *new_sexp = NULL; priv = tasks->priv; @@ -340,7 +340,7 @@ config_hide_completed_tasks_changed_cb (GConfClient *client, guint id, GConfEntr } static void -model_row_changed_cb (ETableModel *etm, int row, gpointer data) +model_row_changed_cb (ETableModel *etm, gint row, gpointer data) { ETasks *tasks; ETasksPrivate *priv; @@ -350,7 +350,7 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer data) priv = tasks->priv; if (priv->current_uid) { - const char *uid; + const gchar *uid; comp_data = e_cal_model_get_component_at (E_CAL_MODEL (etm), row); if (comp_data) { @@ -367,7 +367,7 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer data) } static void -view_progress_cb (ECalModel *model, const char *message, int percent, ECalSourceType type, ETasks *tasks) +view_progress_cb (ECalModel *model, const gchar *message, gint percent, ECalSourceType type, ETasks *tasks) { e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)), message, percent); @@ -437,7 +437,7 @@ struct AffectedComponents { * This function is called from e_table_selected_row_foreach. **/ static void -get_selected_components_cb (int model_row, gpointer data) +get_selected_components_cb (gint model_row, gpointer data) { struct AffectedComponents *ac = (struct AffectedComponents *) data; @@ -494,7 +494,7 @@ obtain_list_of_components (gpointer data, gpointer user_data) comp_data = (ECalModelComponent *) data; if (list && comp_data) { - char *comp_str; + gchar *comp_str; icalcomponent *vcal; vcal = e_cal_util_new_top_level (); @@ -504,7 +504,7 @@ obtain_list_of_components (gpointer data, gpointer user_data) comp_str = icalcomponent_as_ical_string_r (vcal); if (comp_str) { ESource *source = e_cal_get_source (comp_data->client); - const char *source_uid = e_source_peek_uid (source); + const gchar *source_uid = e_source_peek_uid (source); *list = g_slist_prepend (*list, g_strdup_printf ("%s\n%s", source_uid, comp_str)); @@ -519,8 +519,8 @@ obtain_list_of_components (gpointer data, gpointer user_data) static void table_drag_data_get (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GtkSelectionData *selection_data, guint info, @@ -549,8 +549,8 @@ table_drag_data_get (ETable *table, /* static void table_drag_begin (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, ETasks *tasks) { @@ -560,8 +560,8 @@ table_drag_begin (ETable *table, static void table_drag_end (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, ETasks *tasks) { @@ -571,8 +571,8 @@ table_drag_end (ETable *table, static void table_drag_data_delete (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, ETasks *tasks) { @@ -751,7 +751,7 @@ categories_changed_cb (gpointer object, gpointer user_data) cat_array = g_ptr_array_new (); cat_list = e_categories_get_list (); while (cat_list != NULL) { - if (e_categories_is_searchable ((const char *) cat_list->data)) + if (e_categories_is_searchable ((const gchar *) cat_list->data)) g_ptr_array_add (cat_array, cat_list->data); cat_list = g_list_remove (cat_list, cat_list->data); } @@ -871,11 +871,11 @@ e_tasks_destroy (GtkObject *object) } static void -set_status_message (ETasks *tasks, const char *message, ...) +set_status_message (ETasks *tasks, const gchar *message, ...) { ETasksPrivate *priv; va_list args; - char sz[2048], *msg_string = NULL; + gchar sz[2048], *msg_string = NULL; if (message) { va_start (args, message); @@ -891,11 +891,11 @@ set_status_message (ETasks *tasks, const char *message, ...) /* Callback from the calendar client when an error occurs in the backend */ static void -backend_error_cb (ECal *client, const char *message, gpointer data) +backend_error_cb (ECal *client, const gchar *message, gpointer data) { ETasks *tasks; GtkWidget *dialog; - char *urinopwd; + gchar *urinopwd; tasks = E_TASKS (data); @@ -1080,7 +1080,7 @@ e_tasks_new_task (ETasks *tasks) ETasksPrivate *priv; CompEditor *editor; ECalComponent *comp; - const char *category; + const gchar *category; ECal *ecal; guint32 flags = 0; @@ -1121,8 +1121,8 @@ e_tasks_show_preview (ETasks *tasks, gboolean state) ECalModelComponent *comp_data; ECalComponent *comp; ETable *etable; - const char *uid; - int n_selected; + const gchar *uid; + gint n_selected; etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable)); n_selected = e_table_selected_count (etable); @@ -1158,7 +1158,7 @@ e_tasks_add_todo_source (ETasks *tasks, ESource *source) { ETasksPrivate *priv; ECal *client; - const char *uid; + const gchar *uid; g_return_val_if_fail (tasks != NULL, FALSE); g_return_val_if_fail (E_IS_TASKS (tasks), FALSE); @@ -1211,7 +1211,7 @@ e_tasks_remove_todo_source (ETasks *tasks, ESource *source) ETasksPrivate *priv; ECal *client; ECalModel *model; - const char *uid; + const gchar *uid; g_return_val_if_fail (tasks != NULL, FALSE); g_return_val_if_fail (E_IS_TASKS (tasks), FALSE); @@ -1342,7 +1342,7 @@ void e_tasks_delete_completed (ETasks *tasks) { ETasksPrivate *priv; - char *sexp; + gchar *sexp; GList *l; g_return_if_fail (tasks != NULL); @@ -1413,7 +1413,7 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic) ETasksPrivate *priv; GalViewFactory *factory; ETableSpecification *spec; - char *dir0, *dir1, *filename; + gchar *dir0, *dir1, *filename; static GalViewCollection *collection = NULL; g_return_if_fail (tasks != NULL); @@ -1505,9 +1505,9 @@ e_tasks_discard_view_menus (ETasks *tasks) void e_tasks_open_task_id (ETasks *tasks, - const char *src_uid, - const char *comp_uid, - const char *comp_rid) + const gchar *src_uid, + const gchar *comp_uid, + const gchar *comp_rid) { ECal *client = NULL; GList *l; diff --git a/calendar/gui/e-tasks.h b/calendar/gui/e-tasks.h index 67989ee021..47e38c8a5b 100644 --- a/calendar/gui/e-tasks.h +++ b/calendar/gui/e-tasks.h @@ -52,7 +52,7 @@ struct _ETasksClass { GtkTableClass parent_class; /* Notification signals */ - void (* selection_changed) (ETasks *tasks, int n_selected); + void (* selection_changed) (ETasks *tasks, gint n_selected); void (* source_added) (ETasks *tasks, ESource *source); void (* source_removed) (ETasks *tasks, ESource *source); }; @@ -73,9 +73,9 @@ ECal *e_tasks_get_default_client (ETasks *tasks); void e_tasks_open_task (ETasks *tasks); void e_tasks_open_task_id (ETasks *tasks, - const char *src_uid, - const char *comp_uid, - const char *comp_rid); + const gchar *src_uid, + const gchar *comp_uid, + const gchar *comp_rid); void e_tasks_new_task (ETasks *tasks); void e_tasks_complete_selected (ETasks *tasks); void e_tasks_delete_selected (ETasks *tasks); diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 2be6548757..2d0cf1ab5d 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -296,8 +296,8 @@ static void e_timezone_entry_set_entry (ETimezoneEntry *tentry) { ETimezoneEntryPrivate *priv; - const char *display_name; - char *name_buffer; + const gchar *display_name; + gchar *name_buffer; priv = tentry->priv; diff --git a/calendar/gui/e-week-view-config.c b/calendar/gui/e-week-view-config.c index 8a0c0de984..c981be8f53 100644 --- a/calendar/gui/e-week-view-config.c +++ b/calendar/gui/e-week-view-config.c @@ -146,7 +146,7 @@ e_week_view_config_get_view (EWeekViewConfig *view_config) static void set_week_start (EWeekView *week_view) { - int week_start_week; + gint week_start_week; week_start_week = calendar_config_get_week_start_day (); diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 458d8e7e3c..a8123bdf53 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -828,11 +828,11 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, /* draw categories icons */ for (elem = categories_list; elem; elem = elem->next) { - char *category; + gchar *category; GdkPixmap *pixmap = NULL; GdkBitmap *mask = NULL; - category = (char *) elem->data; + category = (gchar *) elem->data; if (!e_categories_config_get_icon_for (category, &pixmap, &mask)) continue; @@ -944,7 +944,7 @@ e_week_view_event_item_draw_triangle (EWeekViewEventItem *wveitem, This is needed so that we get button/motion events. */ static double e_week_view_event_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c index 37a2706f2a..134b318118 100644 --- a/calendar/gui/e-week-view-layout.c +++ b/calendar/gui/e-week-view-layout.c @@ -334,8 +334,8 @@ e_week_view_layout_get_day_position (gint day, #define wk(x) ( ( working_days & (days [ ((x) + display_start_day) % 7 ]) ) ? 1 : 0) CalWeekdays days [] = {CAL_MONDAY, CAL_TUESDAY, CAL_WEDNESDAY, CAL_THURSDAY, CAL_FRIDAY, CAL_SATURDAY, CAL_SUNDAY}; CalWeekdays working_days; - int arr[4] = {1, 1, 1, 1}; - int edge, i, wd, m, M; + gint arr[4] = {1, 1, 1, 1}; + gint edge, i, wd, m, M; gboolean any = TRUE; g_return_if_fail (day < 7); diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index e1c090b196..67e9574a16 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -419,7 +419,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, This is needed so that we get button/motion events. */ static double e_week_view_main_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c index e23f2a675f..7a5ae4bf9b 100644 --- a/calendar/gui/e-week-view-titles-item.c +++ b/calendar/gui/e-week-view-titles-item.c @@ -269,7 +269,7 @@ e_week_view_titles_item_draw (GnomeCanvasItem *canvas_item, This is needed so that we get button/motion events. */ static double e_week_view_titles_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 57c0547af0..dac03a274e 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -300,8 +300,8 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data) ECalComponent *comp = NULL; AddEventData add_event_data; /* rid is never used in this function? */ - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; /* If we don't have a valid date set yet, just return. */ if (!g_date_valid (&week_view->first_day_shown)) @@ -331,13 +331,13 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data) } static void -update_row (EWeekView *week_view, int row) +update_row (EWeekView *week_view, gint row) { ECalModelComponent *comp_data; ECalModel *model; gint event_num; - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)); comp_data = e_cal_model_get_component_at (model, row); @@ -364,7 +364,7 @@ update_row (EWeekView *week_view, int row) } static void -model_row_changed_cb (ETableModel *etm, int row, gpointer user_data) +model_row_changed_cb (ETableModel *etm, gint row, gpointer user_data) { EWeekView *week_view = E_WEEK_VIEW (user_data); @@ -377,7 +377,7 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer user_data) } static void -model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data) +model_cell_changed_cb (ETableModel *etm, gint col, gint row, gpointer user_data) { EWeekView *week_view = E_WEEK_VIEW (user_data); @@ -389,11 +389,11 @@ model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data) } static void -model_rows_inserted_cb (ETableModel *etm, int row, int count, gpointer user_data) +model_rows_inserted_cb (ETableModel *etm, gint row, gint count, gpointer user_data) { EWeekView *week_view = E_WEEK_VIEW (user_data); ECalModel *model; - int i; + gint i; if (!E_CALENDAR_VIEW (week_view)->in_focus) { return; @@ -429,8 +429,8 @@ model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data) for (l = list; l != NULL; l = g_slist_next (l)) { gint event_num; - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; ECalModelComponent *comp_data = l->data; uid = icalcomponent_get_uid (comp_data->icalcomp); @@ -591,7 +591,7 @@ e_week_view_init (EWeekView *week_view) G_CALLBACK (e_week_view_on_motion), week_view); /* Create the buttons to jump to each days. */ - pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**) jump_xpm); + pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **) jump_xpm); for (i = 0; i < E_WEEK_VIEW_MAX_WEEKS * 7; i++) { week_view->jump_buttons[i] = gnome_canvas_item_new @@ -1964,7 +1964,7 @@ e_week_view_foreach_event_with_uid (EWeekView *week_view, for (event_num = week_view->events->len - 1; event_num >= 0; event_num--) { - const char *u; + const gchar *u; event = &g_array_index (week_view->events, EWeekViewEvent, event_num); @@ -2563,8 +2563,8 @@ e_week_view_ensure_events_sorted (EWeekView *week_view) gint -e_week_view_event_sort_func (const void *arg1, - const void *arg2) +e_week_view_event_sort_func (gconstpointer arg1, + gconstpointer arg2) { EWeekViewEvent *event1, *event2; @@ -2650,7 +2650,7 @@ e_week_view_reshape_events (EWeekView *week_view) } static EWeekViewEvent * -tooltip_get_view_event (EWeekView *week_view, int day, int event_num) +tooltip_get_view_event (EWeekView *week_view, gint day, gint event_num) { EWeekViewEvent *pevent; @@ -2662,7 +2662,7 @@ tooltip_get_view_event (EWeekView *week_view, int day, int event_num) static void tooltip_destroy (EWeekView *week_view, GnomeCanvasItem *item) { - int event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num")); + gint event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num")); EWeekViewEvent *pevent; guint timeout; @@ -2688,7 +2688,7 @@ tooltip_event_cb (GnomeCanvasItem *item, GdkEvent *event, EWeekView *view) { - int event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num")); + gint event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num")); EWeekViewEvent *pevent; pevent = tooltip_get_view_event (view, -1, event_num); @@ -2850,7 +2850,7 @@ e_week_view_reshape_event_span (EWeekView *week_view, NULL); if (free_text) - g_free ((gchar*)summary); + g_free ((gchar *)summary); if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) && e_cal_util_component_has_attendee (event->comp_data->icalcomp)) { @@ -3107,7 +3107,7 @@ e_week_view_stop_editing_event (EWeekView *week_view) static void cancel_editing (EWeekView *week_view) { - int event_num, span_num; + gint event_num, span_num; EWeekViewEvent *event; EWeekViewEventSpan *span; const gchar *summary; @@ -3127,7 +3127,7 @@ cancel_editing (EWeekView *week_view) g_object_set (G_OBJECT (span->text_item), "text", summary ? summary : "", NULL); if (free_text) - g_free ((gchar*)summary); + g_free ((gchar *)summary); /* Stop editing */ e_week_view_stop_editing_event (week_view); @@ -3140,7 +3140,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, { EWeekViewEvent *event; gint event_num, span_num; - int nevent = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num")); + gint nevent = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num")); EWeekViewEvent *pevent; pevent = tooltip_get_view_event (week_view, -1, nevent); @@ -3269,7 +3269,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, case GDK_ENTER_NOTIFY: { ECalendarViewEventData *data; - int nspan; + gint nspan; if (!e_week_view_find_event_from_item (week_view, item, @@ -3550,7 +3550,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view, ECalComponent *comp; ECalComponentText summary; ECal *client; - const char *uid; + const gchar *uid; gboolean on_server; /* Note: the item we are passed here isn't reliable, so we just stop @@ -3632,7 +3632,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view, if (mod == CALOBJ_MOD_THIS) { ECalComponentDateTime dt; struct icaltimetype tt; - char *tzid; + gchar *tzid; e_cal_component_get_dtstart (comp, &dt); if (dt.value->zone) { @@ -3749,8 +3749,8 @@ e_week_view_find_event_from_uid (EWeekView *week_view, num_events = week_view->events->len; for (event_num = 0; event_num < num_events; event_num++) { - const char *u; - char *r = NULL; + const gchar *u; + gchar *r = NULL; event = &g_array_index (week_view->events, EWeekViewEvent, event_num); @@ -4040,7 +4040,7 @@ e_week_view_add_new_event_in_selected_range (EWeekView *week_view, const gchar * ECalComponentDateTime date; struct icaltimetype itt; time_t dtstart, dtend; - const char *uid; + const gchar *uid; AddEventData add_event_data; gboolean read_only = TRUE; EWeekViewEvent *wvevent; @@ -4352,14 +4352,14 @@ e_week_view_on_jump_button_event (GnomeCanvasItem *item, if (focus_event->in) { week_view->focused_jump_button = day; - pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**) jump_xpm_focused); + pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **) jump_xpm_focused); gnome_canvas_item_set (week_view->jump_buttons[day], "GnomeCanvasPixbuf::pixbuf", pixbuf, NULL); } else { week_view->focused_jump_button = E_WEEK_VIEW_JUMP_BUTTON_NO_FOCUS; - pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**) jump_xpm); + pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **) jump_xpm); gnome_canvas_item_set (week_view->jump_buttons[day], "GnomeCanvasPixbuf::pixbuf", pixbuf, NULL); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 18f4a47276..951f01bfa9 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -140,9 +140,9 @@ struct _GnomeCalendarPrivate { /* Calendar query for the date navigator */ GList *dn_queries; /* list of CalQueries */ - char *sexp; - char *todo_sexp; - char *memo_sexp; + gchar *sexp; + gchar *todo_sexp; + gchar *memo_sexp; guint update_timeout; guint update_marcus_bains_line_timeout; @@ -172,7 +172,7 @@ struct _GnomeCalendarPrivate { GalViewMenus *view_menus; /* Our current week start */ - int week_start; + gint week_start; /* Our current timezone. */ icaltimezone *zone; @@ -631,7 +631,7 @@ static void get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_t *start_time, time_t *end_time) { GnomeCalendarPrivate *priv; - int shown, display_start; + gint shown, display_start; GDate date; gint weekday, first_day, last_day, days_shown, i; gboolean has_working_days = FALSE; @@ -826,12 +826,12 @@ get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_t } /* Adjusts a given query sexp with the time range of the date navigator */ -static char * -adjust_e_cal_view_sexp (GnomeCalendar *gcal, const char *sexp) +static gchar * +adjust_e_cal_view_sexp (GnomeCalendar *gcal, const gchar *sexp) { time_t start_time, end_time; - char *start, *end; - char *new_sexp; + gchar *start, *end; + gchar *new_sexp; get_date_navigator_range (gcal, &start_time, &end_time); if (start_time == -1 || end_time == -1) @@ -862,7 +862,7 @@ update_query_async (struct _date_query_msg *msg) GnomeCalendar *gcal = msg->gcal; GnomeCalendarPrivate *priv; ECalView *old_query; - char *real_sexp; + gchar *real_sexp; GList *l; priv = gcal->priv; @@ -956,10 +956,10 @@ update_query (GnomeCalendar *gcal) } static void -set_search_query (GnomeCalendar *gcal, const char *sexp) +set_search_query (GnomeCalendar *gcal, const gchar *sexp) { GnomeCalendarPrivate *priv; - int i; + gint i; time_t start, end; g_return_if_fail (gcal != NULL); @@ -1024,10 +1024,10 @@ get_current_time (ECalendarItem *calitem, gpointer data) /* Callback used when the sexp changes in the calendar search bar */ static void -search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer data) +search_bar_sexp_changed_cb (CalSearchBar *cal_search, const gchar *sexp, gpointer data) { GnomeCalendar *gcal; - const char *d_sexp = "occur-in-time-range?"; + const gchar *d_sexp = "occur-in-time-range?"; gcal = GNOME_CALENDAR (data); @@ -1046,12 +1046,12 @@ search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer /* Callback used when the selected category in the search bar changes */ static void -search_bar_category_changed_cb (CalSearchBar *cal_search, const char *category, gpointer data) +search_bar_category_changed_cb (CalSearchBar *cal_search, const gchar *category, gpointer data) { GnomeCalendar *gcal; GnomeCalendarPrivate *priv; ECalModel *model; - int i; + gint i; gcal = GNOME_CALENDAR (data); priv = gcal->priv; @@ -1271,7 +1271,7 @@ static void set_timezone (GnomeCalendar *calendar) { GnomeCalendarPrivate *priv; - int i; + gint i; priv = calendar->priv; @@ -1317,7 +1317,7 @@ update_todo_view_async (struct _mupdate_todo_msg *msg) GnomeCalendar *gcal; GnomeCalendarPrivate *priv; ECalModel *model; - char *sexp = NULL; + gchar *sexp = NULL; g_return_if_fail (msg != NULL); @@ -1368,7 +1368,7 @@ update_memo_view (GnomeCalendar *gcal) GnomeCalendarPrivate *priv; ECalModel *model, *view_model; time_t start, end; - char *iso_start, *iso_end; + gchar *iso_start, *iso_end; priv = gcal->priv; @@ -1553,7 +1553,7 @@ categories_changed_cb (gpointer object, gpointer user_data) cat_array = g_ptr_array_new (); cat_list = e_categories_get_list (); while (cat_list != NULL) { - if (e_categories_is_searchable ((const char *) cat_list->data)) + if (e_categories_is_searchable ((const gchar *) cat_list->data)) g_ptr_array_add (cat_array, cat_list->data); cat_list = g_list_remove (cat_list, cat_list->data); } @@ -1565,7 +1565,7 @@ categories_changed_cb (gpointer object, gpointer user_data) static void -view_progress_cb (ECalModel *model, const char *message, int percent, ECalSourceType type, GnomeCalendar *gcal) +view_progress_cb (ECalModel *model, const gchar *message, gint percent, ECalSourceType type, GnomeCalendar *gcal) { if (type == E_CAL_SOURCE_TYPE_EVENT) { e_calendar_view_set_status_message (E_CALENDAR_VIEW (gcal->priv->week_view), message, percent); @@ -1621,8 +1621,8 @@ setup_widgets (GnomeCalendar *gcal) GtkWidget *vbox; GtkWidget *label; ECalModel *cal_model; - int i; - char *tmp; + gint i; + gchar *tmp; priv = gcal->priv; @@ -1861,7 +1861,7 @@ static void gnome_calendar_init (GnomeCalendar *gcal) { GnomeCalendarPrivate *priv; - int i; + gint i; priv = g_new0 (GnomeCalendarPrivate, 1); gcal->priv = priv; @@ -1916,7 +1916,7 @@ gnome_calendar_destroy (GtkObject *object) if (priv) { GList *l; - int i; + gint i; e_categories_unregister_change_listener (G_CALLBACK (categories_changed_cb), gcal); @@ -2077,7 +2077,7 @@ static void notify_selected_time_changed (GnomeCalendar *gcal) { GnomeCalendarPrivate *priv; - int i; + gint i; priv = gcal->priv; for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) { @@ -2158,7 +2158,7 @@ void gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time) { GnomeCalendarPrivate *priv; - int i; + gint i; g_return_if_fail (gcal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (gcal)); @@ -2199,7 +2199,7 @@ update_view_times (GnomeCalendar *gcal, time_t start_time) } static void -gnome_calendar_direction (GnomeCalendar *gcal, int direction) +gnome_calendar_direction (GnomeCalendar *gcal, gint direction) { GnomeCalendarPrivate *priv; @@ -2301,7 +2301,7 @@ static void set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, gboolean range_selected) { GnomeCalendarPrivate *priv; - const char *view_id; + const gchar *view_id; g_return_if_fail (gcal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (gcal)); @@ -2369,7 +2369,7 @@ display_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, gboolean gra { GnomeCalendarPrivate *priv; gboolean preserve_day; - int i; + gint i; priv = gcal->priv; @@ -2499,7 +2499,7 @@ void gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic) { GnomeCalendarPrivate *priv; - char *path0, *path1, *etspecfile; + gchar *path0, *path1, *etspecfile; CalendarViewFactory *factory; GalViewFactory *gal_factory; static GalViewCollection *collection = NULL; @@ -2607,16 +2607,16 @@ gnome_calendar_discard_view_menus (GnomeCalendar *gcal) /* This is copied/moved from gal-view-instance, only the calendar uses this for a popup menu */ static void -gc_set_view(EPopup *ep, EPopupItem *pitem, void *data) +gc_set_view(EPopup *ep, EPopupItem *pitem, gpointer data) { GnomeCalendar *gcal = data; if (pitem->type & E_POPUP_ACTIVE) - gal_view_instance_set_current_view_id(gcal->priv->view_instance, (char *)pitem->user_data); + gal_view_instance_set_current_view_id(gcal->priv->view_instance, (gchar *)pitem->user_data); } static void -gc_save_custom_view(EPopup *ep, EPopupItem *pitem, void *data) +gc_save_custom_view(EPopup *ep, EPopupItem *pitem, gpointer data) { GnomeCalendar *gcal = data; @@ -2624,7 +2624,7 @@ gc_save_custom_view(EPopup *ep, EPopupItem *pitem, void *data) } static void -gc_define_views_response(GtkWidget *d, int id, GnomeCalendar *gcal) +gc_define_views_response(GtkWidget *d, gint id, GnomeCalendar *gcal) { if (id == GTK_RESPONSE_OK) gal_view_collection_save(gcal->priv->view_instance->collection); @@ -2633,7 +2633,7 @@ gc_define_views_response(GtkWidget *d, int id, GnomeCalendar *gcal) } static void -gc_define_views(EPopup *ep, EPopupItem *pitem, void *data) +gc_define_views(EPopup *ep, EPopupItem *pitem, gpointer data) { GnomeCalendar *gcal = data; GtkWidget *dialog = gal_define_views_dialog_new(gcal->priv->view_instance->collection); @@ -2655,7 +2655,7 @@ static EPopupItem gc_popups[] = { }; static void -gc_popup_free (EPopup *ep, GSList *list, void *data) +gc_popup_free (EPopup *ep, GSList *list, gpointer data) { while (list) { GSList *n = list->next; @@ -2671,7 +2671,7 @@ gc_popup_free (EPopup *ep, GSList *list, void *data) } static void -gc_popup_free_static (EPopup *ep, GSList *list, void *data) +gc_popup_free_static (EPopup *ep, GSList *list, gpointer data) { while (list) { GSList *n = list->next; @@ -2685,13 +2685,13 @@ gc_popup_free_static (EPopup *ep, GSList *list, void *data) } void -gnome_calendar_view_popup_factory (GnomeCalendar *gcal, EPopup *ep, const char *prefix) +gnome_calendar_view_popup_factory (GnomeCalendar *gcal, EPopup *ep, const gchar *prefix) { GnomeCalendarPrivate *priv; - int length; - int i; + gint length; + gint i; gboolean found = FALSE; - char *id; + gchar *id; GSList *menus = NULL; EPopupItem *pitem; @@ -2784,7 +2784,7 @@ add_mclient (ECalModel *model, ECal *client) } static void -non_intrusive_error_remove(GtkWidget *w, void *data) +non_intrusive_error_remove(GtkWidget *w, gpointer data) { g_hash_table_remove(non_intrusive_error_table, data); } @@ -2797,7 +2797,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) ESource *source; ECalModel *model; ECalLoadState state; - char *msg; + gchar *msg; GtkWidget *w = NULL; gchar *id; @@ -3016,7 +3016,7 @@ static gboolean open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists, open_func of) { GnomeCalendarPrivate *priv; - char *msg; + gchar *msg; icaltimezone *zone; priv = gcal->priv; @@ -3050,11 +3050,11 @@ open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists, open_func of /* Callback when we get an error message from the backend */ static void -backend_error_cb (ECal *client, const char *message, gpointer data) +backend_error_cb (ECal *client, const gchar *message, gpointer data) { GnomeCalendar *gcal; GtkDialog *dialog; - char *uristr; + gchar *uristr; gchar *id; gcal = GNOME_CALENDAR (data); @@ -3085,7 +3085,7 @@ backend_died_cb (ECal *ecal, gpointer data) GnomeCalendarPrivate *priv; ECalSourceType source_type; ESource *source; - const char *id; + const gchar *id; GtkWidget *w = NULL; gcal = GNOME_CALENDAR (data); @@ -3175,7 +3175,7 @@ void gnome_calendar_set_activity_handler (GnomeCalendar *cal, EActivityHandler *activity_handler) { GnomeCalendarPrivate *priv; - int i; + gint i; g_return_if_fail (cal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (cal)); @@ -3324,7 +3324,7 @@ gnome_calendar_remove_source (GnomeCalendar *gcal, ECalSourceType source_type, E } gboolean -gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_type, const char *uid) +gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_type, const gchar *uid) { GnomeCalendarPrivate *priv; ECal *client; @@ -3481,7 +3481,7 @@ gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend) CompEditor *editor; ECalComponent *comp; icalcomponent *icalcomp; - const char *category; + const gchar *category; guint32 flags = 0; ECalComponentDateTime dt; struct icaltimetype itt; @@ -3979,7 +3979,7 @@ void gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) { GnomeCalendarPrivate *priv; - char *sexp, *start, *end; + gchar *sexp, *start, *end; GList *l; g_return_if_fail (GNOME_IS_CALENDAR (gcal)); @@ -4014,7 +4014,7 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) /* FIXME write occur-before and occur-after * sexp funcs so we don't have to use the max - * int */ + * gint */ if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) e_cal_generate_instances_for_object (client, m->data, older_than, G_MAXINT32, @@ -4023,11 +4023,11 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) /* FIXME Better error handling */ if (remove) { - const char *uid = icalcomponent_get_uid (m->data); + const gchar *uid = icalcomponent_get_uid (m->data); GError *error = NULL; if (e_cal_util_component_is_instance (m->data) || e_cal_util_component_has_recurrences (m->data)) { - char *rid = NULL; + gchar *rid = NULL; struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data); if (!icaltime_is_null_time (recur_id) ) @@ -4114,9 +4114,9 @@ ECalMenu *gnome_calendar_get_memopad_menu (GnomeCalendar *gcal) void gnome_calendar_edit_appointment (GnomeCalendar *gcal, - const char* src_uid, - const char* comp_uid, - const char* comp_rid) + const gchar * src_uid, + const gchar * comp_uid, + const gchar * comp_rid) { ECal *client = NULL; GList *l; diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h index 947559bac5..5d7ca5f031 100644 --- a/calendar/gui/gnome-cal.h +++ b/calendar/gui/gnome-cal.h @@ -117,7 +117,7 @@ ECal *gnome_calendar_get_default_client (GnomeCalendar *gcal); gboolean gnome_calendar_add_source (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source); gboolean gnome_calendar_remove_source (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source); -gboolean gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_type, const char *uid); +gboolean gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_type, const gchar *uid); gboolean gnome_calendar_set_default_source (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source); void gnome_calendar_next (GnomeCalendar *gcal); @@ -147,7 +147,7 @@ struct _ECalMenu *gnome_calendar_get_memopad_menu (GnomeCalendar *gcal); void gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic); void gnome_calendar_discard_view_menus (GnomeCalendar *gcal); -void gnome_calendar_view_popup_factory (GnomeCalendar *gcal, struct _EPopup *ep, const char *prefix); +void gnome_calendar_view_popup_factory (GnomeCalendar *gcal, struct _EPopup *ep, const gchar *prefix); void gnome_calendar_set_selected_time_range (GnomeCalendar *gcal, time_t start_time, @@ -195,9 +195,9 @@ void gnome_calendar_purge (GnomeCalendar *gcal, /* Direct calendar component operations */ void gnome_calendar_edit_appointment (GnomeCalendar *gcal, - const char* src_uid, - const char* comp_uid, - const char* comp_rid); + const gchar * src_uid, + const gchar * comp_uid, + const gchar * comp_rid); void gnome_calendar_emit_user_created_signal (gpointer instance, GnomeCalendar *gcal, ECal *calendar); diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index d341245fec..06986efdd6 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -203,8 +203,8 @@ goto_dialog (GnomeCalendar *gcal) { time_t start_time; struct icaltimetype tt; - int b; - char *gladefile; + gint b; + gchar *gladefile; if (dlg) { return; diff --git a/calendar/gui/itip-bonobo-control.c b/calendar/gui/itip-bonobo-control.c index f63e3e187a..c58e5ab27b 100644 --- a/calendar/gui/itip-bonobo-control.c +++ b/calendar/gui/itip-bonobo-control.c @@ -52,7 +52,7 @@ enum E_ITIP_BONOBO_ARGS { * BonoboObject. */ -static char * +static gchar * stream_read (Bonobo_Stream stream) { Bonobo_Stream_iobuf *buffer; @@ -97,7 +97,7 @@ stream_read (Bonobo_Stream stream) */ typedef struct { EItipControl *itip; - char *text; + gchar *text; } idle_data; static gboolean @@ -115,7 +115,7 @@ set_data_idle_cb (gpointer data) static void pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, - Bonobo_Persist_ContentType type, void *data, + Bonobo_Persist_ContentType type, gpointer data, CORBA_Environment *ev) { EItipControl *itip = data; @@ -143,7 +143,7 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, */ static void pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream, - Bonobo_Persist_ContentType type, void *data, + Bonobo_Persist_ContentType type, gpointer data, CORBA_Environment *ev) { EItipControl *itip = data; @@ -164,7 +164,7 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream, } /* pstream_save */ /* static CORBA_long */ -/* pstream_get_max_size (BonoboPersistStream *ps, void *data, */ +/* pstream_get_max_size (BonoboPersistStream *ps, gpointer data, */ /* CORBA_Environment *ev) */ /* { */ /* EItipControl *itip = data; */ @@ -179,7 +179,7 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream, /* } */ static Bonobo_Persist_ContentTypeList * -pstream_get_content_types (BonoboPersistStream *ps, void *closure, +pstream_get_content_types (BonoboPersistStream *ps, gpointer closure, CORBA_Environment *ev) { return bonobo_persist_generate_content_types (2, "text/calendar", "text/x-calendar"); diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index ae822c9b9c..5cfa2cf378 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -86,7 +86,7 @@ gboolean itip_organizer_is_user_ex (ECalComponent *comp, ECal *client, gboolean skip_cap_test) { ECalComponentOrganizer organizer; - const char *strip; + const gchar *strip; gboolean user_org = FALSE; if (!e_cal_component_has_organizer (comp) || (!skip_cap_test && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_ORGANIZER))) @@ -98,7 +98,7 @@ itip_organizer_is_user_ex (ECalComponent *comp, ECal *client, gboolean skip_cap_ strip = itip_strip_mailto (organizer.value); if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) { - char *email = NULL; + gchar *email = NULL; if (e_cal_get_cal_address (client, &email, NULL) && !g_ascii_strcasecmp (email, strip)) { g_free (email); @@ -126,7 +126,7 @@ gboolean itip_sentby_is_user (ECalComponent *comp, ECal *client) { ECalComponentOrganizer organizer; - const char *strip; + const gchar *strip; gboolean user_sentby = FALSE; if (!e_cal_component_has_organizer (comp) ||e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_ORGANIZER)) @@ -142,7 +142,7 @@ itip_sentby_is_user (ECalComponent *comp, ECal *client) } static ECalComponentAttendee * -get_attendee (GSList *attendees, char *address) +get_attendee (GSList *attendees, gchar *address) { GSList *l; @@ -161,7 +161,7 @@ get_attendee (GSList *attendees, char *address) } static ECalComponentAttendee * -get_attendee_if_attendee_sentby_is_user (GSList *attendees, char *address) +get_attendee_if_attendee_sentby_is_user (GSList *attendees, gchar *address) { GSList *l; @@ -176,8 +176,8 @@ get_attendee_if_attendee_sentby_is_user (GSList *attendees, char *address) return NULL; } -static char * -html_new_lines_for (const char *string) +static gchar * +html_new_lines_for (const gchar *string) { gchar **lines; gchar *joined; @@ -189,7 +189,7 @@ html_new_lines_for (const char *string) return joined; } -char * +gchar * itip_get_comp_attendee (ECalComponent *comp, ECal *client) { GSList *attendees; @@ -197,7 +197,7 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client) EAccount *a; EIterator *it; ECalComponentAttendee *attendee = NULL; - char *address = NULL; + gchar *address = NULL; e_cal_component_get_attendee_list (comp, &attendees); al = itip_addresses_get (); @@ -209,7 +209,7 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client) attendee = get_attendee (attendees, address); if (attendee) { - char *user_email = g_strdup (itip_strip_mailto (attendee->value)); + gchar *user_email = g_strdup (itip_strip_mailto (attendee->value)); e_cal_component_free_attendee_list (attendees); g_free (address); @@ -219,7 +219,7 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client) attendee = get_attendee_if_attendee_sentby_is_user (attendees, address); if (attendee) { - char *user_email = g_strdup (itip_strip_mailto (attendee->sentby)); + gchar *user_email = g_strdup (itip_strip_mailto (attendee->sentby)); e_cal_component_free_attendee_list (attendees); g_free (address); @@ -240,7 +240,7 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client) attendee = get_attendee (attendees, a->id->address); if (attendee) { - char *user_email = g_strdup (itip_strip_mailto (attendee->value)); + gchar *user_email = g_strdup (itip_strip_mailto (attendee->value)); e_cal_component_free_attendee_list (attendees); return user_email; @@ -250,7 +250,7 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client) check the 'sentby' fields of the attendees if we can find the account */ attendee = get_attendee_if_attendee_sentby_is_user (attendees, a->id->address); if (attendee) { - char *user_email = g_strdup (itip_strip_mailto (attendee->sentby)); + gchar *user_email = g_strdup (itip_strip_mailto (attendee->sentby)); e_cal_component_free_attendee_list (attendees); return user_email; @@ -279,10 +279,10 @@ itip_strip_mailto (const gchar *address) return address; } -static char * +static gchar * get_label (struct icaltimetype *tt) { - char buffer[1000]; + gchar buffer[1000]; struct tm tmp_tm; tmp_tm = icaltimetype_to_tm (tt); @@ -306,7 +306,7 @@ static void foreach_tzid_callback (icalparameter *param, gpointer data) { ItipUtilTZData *tz_data = data; - const char *tzid; + const gchar *tzid; icaltimezone *zone = NULL; icalcomponent *vtimezone_comp; @@ -331,7 +331,7 @@ foreach_tzid_callback (icalparameter *param, gpointer data) return; icalcomponent_add_component (tz_data->icomp, icalcomponent_new_clone (vtimezone_comp)); - g_hash_table_insert (tz_data->tzids, (char *)tzid, (char *)tzid); + g_hash_table_insert (tz_data->tzids, (gchar *)tzid, (gchar *)tzid); } static icalcomponent * @@ -365,7 +365,7 @@ comp_toplevel_with_zones (ECalComponentItipMethod method, ECalComponent *comp, E } static gboolean -users_has_attendee (GList *users, const char *address) +users_has_attendee (GList *users, const gchar *address) { GList *l; @@ -384,7 +384,7 @@ comp_from (ECalComponentItipMethod method, ECalComponent *comp) ECalComponentAttendee *attendee; GSList *attendees; gchar *from; - char *sender = NULL; + gchar *sender = NULL; switch (method) { case E_CAL_COMPONENT_METHOD_PUBLISH: @@ -437,7 +437,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users, GPtrArray *array = NULL; EDestination *destination; gint len; - char *sender = NULL; + gchar *sender = NULL; union { gpointer *pdata; @@ -617,10 +617,10 @@ static gchar * comp_subject (ECalComponentItipMethod method, ECalComponent *comp) { ECalComponentText caltext; - const char *description, *prefix = NULL; + const gchar *description, *prefix = NULL; GSList *alist, *l; gchar *subject; - char *sender; + gchar *sender; ECalComponentAttendee *a = NULL; e_cal_component_get_summary (comp, &caltext); @@ -771,7 +771,7 @@ comp_description (ECalComponent *comp) { gchar *description; ECalComponentDateTime dt; - char *start = NULL, *end = NULL; + gchar *start = NULL, *end = NULL; switch (e_cal_component_get_vtype (comp)) { case E_CAL_COMPONENT_EVENT: @@ -853,11 +853,11 @@ comp_limit_attendees (ECalComponent *comp) prop != NULL; prop = icalcomponent_get_next_property (icomp, ICAL_ATTENDEE_PROPERTY)) { - char *attendee; - char *attendee_text; + gchar *attendee; + gchar *attendee_text; icalparameter *param; - const char *attendee_sentby; - char *attendee_sentby_text = NULL; + const gchar *attendee_sentby; + gchar *attendee_sentby_text = NULL; /* If we've already found something, just erase the rest */ if (found) { @@ -908,7 +908,7 @@ comp_sentby (ECalComponent *comp, ECal *client) { ECalComponentOrganizer organizer; GSList * attendees, *l; - char *user = NULL; + gchar *user = NULL; e_cal_component_get_organizer (comp, &organizer); if (!organizer.value) { @@ -920,7 +920,7 @@ comp_sentby (ECalComponent *comp, ECal *client) organizer.language = NULL; e_cal_component_set_organizer (comp, &organizer); - g_free ((char *) organizer.value); + g_free ((gchar *) organizer.value); return; } @@ -946,10 +946,10 @@ comp_sentby (ECalComponent *comp, ECal *client) e_cal_component_set_organizer (comp, &organizer); - g_free ((char *)organizer.value); - g_free ((char *)organizer.sentby); - g_free ((char *)organizer.cn); - g_free ((char *)organizer.language); + g_free ((gchar *)organizer.value); + g_free ((gchar *)organizer.sentby); + g_free ((gchar *)organizer.cn); + g_free ((gchar *)organizer.language); } } static ECalComponent * @@ -959,7 +959,7 @@ comp_minimal (ECalComponent *comp, gboolean attendee) icalcomponent *icomp, *icomp_clone; icalproperty *prop; ECalComponentOrganizer organizer; - const char *uid; + const gchar *uid; GSList *comments; struct icaltimetype itt; ECalComponentRange recur_id; @@ -1100,13 +1100,13 @@ comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *clien ECalComponentAlarm *alarm; ECalComponentAlarmAction action = E_CAL_COMPONENT_ALARM_UNKNOWN; - alarm = e_cal_component_get_alarm (clone, (const char *)l->data); + alarm = e_cal_component_get_alarm (clone, (const gchar *)l->data); if (alarm) { e_cal_component_alarm_get_action (alarm, &action); e_cal_component_alarm_free (alarm); if (action == E_CAL_COMPONENT_ALARM_PROCEDURE) - e_cal_component_remove_alarm (clone, (const char *)l->data); + e_cal_component_remove_alarm (clone, (const gchar *)l->data); } } @@ -1201,7 +1201,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp, EDestination **destinations; ECalComponent *comp = NULL; icalcomponent *top_level = NULL; - char *ical_string = NULL; + gchar *ical_string = NULL; gchar *from = NULL; gchar *content_type = NULL; gchar *subject = NULL; @@ -1339,7 +1339,7 @@ reply_to_calendar_comp (ECalComponentItipMethod method, GList *users = NULL; gchar *from; gchar *subject; - char *ical_string = NULL; + gchar *ical_string = NULL; gboolean retval = FALSE; /* Tidy up the comp */ @@ -1372,12 +1372,12 @@ reply_to_calendar_comp (ECalComponentItipMethod method, if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT){ GString *body; - char *orig_from = NULL; - const char *description = NULL; - char *subject = NULL; - const char *location = NULL; - char *time = NULL; - char *html_description = NULL; + gchar *orig_from = NULL; + const gchar *description = NULL; + gchar *subject = NULL; + const gchar *location = NULL; + gchar *time = NULL; + gchar *html_description = NULL; GSList *text_list = NULL; ECalComponentOrganizer organizer; ECalComponentText text; @@ -1521,9 +1521,9 @@ itip_publish_begin (ECalComponent *pub_comp, ECal *client, } static void -fb_sort (struct icalperiodtype *ipt, int fb_count) +fb_sort (struct icalperiodtype *ipt, gint fb_count) { - int i,j; + gint i,j; if (ipt == NULL || fb_count == 0) return; @@ -1552,9 +1552,9 @@ comp_fb_normalize (icalcomponent *icomp) { icalcomponent *iclone; icalproperty *prop, *p; - const char *uid, *comment; + const gchar *uid, *comment; struct icaltimetype itt; - int fb_count, i = 0, j; + gint fb_count, i = 0, j; struct icalperiodtype *ipt; iclone = icalcomponent_new (ICAL_VFREEBUSY_COMPONENT); @@ -1641,7 +1641,7 @@ itip_publish_comp (ECal *client, gchar *uri, gchar *username, SoupSession *session; SoupMessage *msg; SoupURI *real_uri; - char *ical_string = NULL; + gchar *ical_string = NULL; toplevel = e_cal_util_new_top_level (); icalcomponent_set_method (toplevel, ICAL_METHOD_PUBLISH); diff --git a/calendar/gui/itip-utils.h b/calendar/gui/itip-utils.h index 8dce8266ab..c01fdbc676 100644 --- a/calendar/gui/itip-utils.h +++ b/calendar/gui/itip-utils.h @@ -39,10 +39,10 @@ typedef enum { } ECalComponentItipMethod; struct CalMimeAttach { - char *filename; - char *content_type; - char *description; - char *encoded_data; + gchar *filename; + gchar *content_type; + gchar *description; + gchar *encoded_data; gboolean disposition; guint length; }; @@ -56,13 +56,13 @@ gboolean itip_sentby_is_user (ECalComponent *comp, ECal *client); const gchar *itip_strip_mailto (const gchar *address); -char *itip_get_comp_attendee (ECalComponent *comp, ECal *client); +gchar *itip_get_comp_attendee (ECalComponent *comp, ECal *client); gboolean itip_send_comp (ECalComponentItipMethod method, ECalComponent *comp, ECal *client, icalcomponent *zones, GSList *attachments_list, GList *users, gboolean strip_alarms); -gboolean itip_publish_comp (ECal *client, gchar* uri, gchar* username, - gchar* password, ECalComponent **pub_comp); +gboolean itip_publish_comp (ECal *client, gchar * uri, gchar * username, + gchar * password, ECalComponent **pub_comp); gboolean itip_publish_begin (ECalComponent *pub_comp, ECal *client, gboolean cloned, ECalComponent **clone); diff --git a/calendar/gui/main.c b/calendar/gui/main.c index 1687328fa4..a3a3a3339e 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -153,8 +153,8 @@ initialize (void) static BonoboObject * factory (BonoboGenericFactory *factory, - const char *component_id, - void *closure) + const gchar *component_id, + gpointer closure) { static gboolean initialized = FALSE; diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index d14b350d1c..ff540bbab7 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -105,8 +105,8 @@ typedef struct _MemosComponentView } MemosComponentView; struct _MemosComponentPrivate { - char *base_directory; - char *config_directory; + gchar *base_directory; + gchar *config_directory; ESourceList *source_list; GSList *source_selection; @@ -126,7 +126,7 @@ ensure_sources (MemosComponent *component) ESourceList *source_list; ESourceGroup *on_this_computer; ESource *personal_source; - char *base_uri, *base_uri_proto, base_uri_proto_seventh; + gchar *base_uri, *base_uri_proto, base_uri_proto_seventh; const gchar *base_dir; personal_source = NULL; @@ -246,7 +246,7 @@ is_in_uids (GSList *uids, ESource *source) GSList *l; for (l = uids; l; l = l->next) { - const char *uid = l->data; + const gchar *uid = l->data; if (!strcmp (uid, e_source_peek_uid (source))) return TRUE; @@ -273,7 +273,7 @@ update_uris_for_selection (MemosComponentView *component_view) ESource *selected_source = l->data; e_memos_add_memo_source (component_view->memos, selected_source); - uids_selected = g_slist_append (uids_selected, (char *)e_source_peek_uid (selected_source)); + uids_selected = g_slist_append (uids_selected, (gchar *)e_source_peek_uid (selected_source)); } e_source_selector_free_selection (component_view->source_selection); @@ -331,7 +331,7 @@ update_selection (MemosComponentView *component_view) /* Make sure the whole selection is there */ for (l = uids_selected; l; l = l->next) { - char *uid = l->data; + gchar *uid = l->data; ESource *source; source = e_source_list_peek_source_by_uid (component_view->source_list, uid); @@ -347,7 +347,7 @@ static void update_primary_selection (MemosComponentView *component_view) { ESource *source = NULL; - char *uid; + gchar *uid; uid = calendar_config_get_primary_memos (); if (uid) { @@ -370,7 +370,7 @@ update_primary_selection (MemosComponentView *component_view) /* Callbacks. */ /* TODO: doesn't work! */ static void -copy_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +copy_memo_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { MemosComponentView *component_view = data; ESource *selected_source; @@ -383,12 +383,12 @@ copy_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -delete_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +delete_memo_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { MemosComponentView *component_view = data; ESource *selected_source; ECal *cal; - char *uri; + gchar *uri; selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector)); if (!selected_source) @@ -422,13 +422,13 @@ delete_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -new_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +new_memo_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { calendar_setup_new_memo_list (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget))); } static void -rename_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +rename_memo_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { MemosComponentView *component_view = data; ESourceSelector *selector; @@ -438,7 +438,7 @@ rename_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -edit_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +edit_memo_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { MemosComponentView *component_view = data; ESource *selected_source; @@ -451,7 +451,7 @@ edit_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -set_offline_availability (EPopup *ep, EPopupItem *pitem, void *data, const char *value) +set_offline_availability (EPopup *ep, EPopupItem *pitem, gpointer data, const gchar *value) { MemosComponentView *component_view = data; ESource *selected_source; @@ -464,13 +464,13 @@ set_offline_availability (EPopup *ep, EPopupItem *pitem, void *data, const char } static void -mark_no_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_no_offline_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { set_offline_availability (ep, pitem, data, "0"); } static void -mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_offline_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { set_offline_availability (ep, pitem, data, "1"); } @@ -490,7 +490,7 @@ static EPopupItem emc_source_popups[] = { }; static void -emc_source_popup_free(EPopup *ep, GSList *list, void *data) +emc_source_popup_free(EPopup *ep, GSList *list, gpointer data) { g_slist_free(list); } @@ -501,7 +501,7 @@ popup_event_cb(ESourceSelector *selector, ESource *insource, GdkEventButton *eve ECalPopup *ep; ECalPopupTargetSource *t; GSList *menus = NULL; - int i; + gint i; GtkMenu *menu; /** @HookPoint-ECalPopup: Memos Source Selector Context Menu @@ -554,7 +554,7 @@ static void set_info (MemosComponentView *component_view) { GString *message = g_string_new (NULL); - int rows, selected_rows; + gint rows, selected_rows; rows = e_table_model_row_count (component_view->model); selected_rows = e_table_selected_count (component_view->table); @@ -581,13 +581,13 @@ model_changed_cb (ETableModel *etm, MemosComponentView *component_view) } static void -model_rows_inserted_cb (ETableModel *etm, int row, int count, MemosComponentView *component_view) +model_rows_inserted_cb (ETableModel *etm, gint row, gint count, MemosComponentView *component_view) { set_info (component_view); } static void -model_rows_deleted_cb (ETableModel *etm, int row, int count, MemosComponentView *component_view) +model_rows_deleted_cb (ETableModel *etm, gint row, gint count, MemosComponentView *component_view) { set_info (component_view); } @@ -639,7 +639,7 @@ selector_tree_data_dropped (ESourceSelector *selector, components = cal_comp_selection_get_string_list (data); success = components != NULL; for (p = components; p && success; p = p->next) { - char *comp_str; /* do not free this! */ + gchar *comp_str; /* do not free this! */ /* p->data is "source_uid\ncomponent_string" */ comp_str = strchr (p->data, '\n'); @@ -699,7 +699,7 @@ setup_create_ecal (MemosComponent *component, MemosComponentView *component_view { MemosComponentPrivate *priv; ESource *source = NULL; - char *uid; + gchar *uid; guint not; priv = component->priv; @@ -813,7 +813,7 @@ create_new_memo (MemosComponent *memo_component, gboolean is_assigned, MemosComp } static void -create_local_item_cb (EUserCreatableItemsHandler *handler, const char *item_type_name, void *data) +create_local_item_cb (EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data) { MemosComponent *memos_component = data; MemosComponentPrivate *priv; @@ -1039,28 +1039,28 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_sequence_set_release (list, FALSE); - list->_buffer[0].id = (char *) CREATE_MEMO_ID; - list->_buffer[0].description = (char *) _("New memo"); - list->_buffer[0].menuDescription = (char *) C_("New", "Mem_o"); - list->_buffer[0].tooltip = (char *) _("Create a new memo"); + list->_buffer[0].id = (gchar *) CREATE_MEMO_ID; + list->_buffer[0].description = (gchar *) _("New memo"); + list->_buffer[0].menuDescription = (gchar *) C_("New", "Mem_o"); + list->_buffer[0].tooltip = (gchar *) _("Create a new memo"); list->_buffer[0].menuShortcut = 'o'; - list->_buffer[0].iconName = (char *) "stock_insert-note"; + list->_buffer[0].iconName = (gchar *) "stock_insert-note"; list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[1].id = (char *) CREATE_SHARED_MEMO_ID; - list->_buffer[1].description = (char *) _("New shared memo"); - list->_buffer[1].menuDescription = (char *) C_("New", "_Shared memo"); - list->_buffer[1].tooltip = (char *) _("Create a shared new memo"); + list->_buffer[1].id = (gchar *) CREATE_SHARED_MEMO_ID; + list->_buffer[1].description = (gchar *) _("New shared memo"); + list->_buffer[1].menuDescription = (gchar *) C_("New", "_Shared memo"); + list->_buffer[1].tooltip = (gchar *) _("Create a shared new memo"); list->_buffer[1].menuShortcut = 'h'; - list->_buffer[1].iconName = (char *) "stock_insert-note"; + list->_buffer[1].iconName = (gchar *) "stock_insert-note"; list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[2].id = (char *) CREATE_MEMO_LIST_ID; - list->_buffer[2].description = (char *) _("New memo list"); - list->_buffer[2].menuDescription = (char *) C_("New", "Memo li_st"); - list->_buffer[2].tooltip = (char *) _("Create a new memo list"); + list->_buffer[2].id = (gchar *) CREATE_MEMO_LIST_ID; + list->_buffer[2].description = (gchar *) _("New memo list"); + list->_buffer[2].menuDescription = (gchar *) C_("New", "Memo li_st"); + list->_buffer[2].tooltip = (gchar *) _("Create a new memo list"); list->_buffer[2].menuShortcut = '\0'; - list->_buffer[2].iconName = (char *) "stock_notes"; + list->_buffer[2].iconName = (gchar *) "stock_notes"; list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER; return list; @@ -1203,13 +1203,13 @@ memos_component_peek (void) return component; } -const char * +const gchar * memos_component_peek_base_directory (MemosComponent *component) { return component->priv->base_directory; } -const char * +const gchar * memos_component_peek_config_directory (MemosComponent *component) { return component->priv->config_directory; diff --git a/calendar/gui/memos-component.h b/calendar/gui/memos-component.h index 3ca01a50f7..bba81a44f2 100644 --- a/calendar/gui/memos-component.h +++ b/calendar/gui/memos-component.h @@ -57,8 +57,8 @@ struct _MemosComponentClass { GType memos_component_get_type (void); MemosComponent *memos_component_peek (void); -const char *memos_component_peek_base_directory (MemosComponent *component); -const char *memos_component_peek_config_directory (MemosComponent *component); +const gchar *memos_component_peek_base_directory (MemosComponent *component); +const gchar *memos_component_peek_config_directory (MemosComponent *component); ESourceList *memos_component_peek_source_list (MemosComponent *component); #endif /* _MEMOS_COMPONENT_H_ */ diff --git a/calendar/gui/memos-control.c b/calendar/gui/memos-control.c index 2f7bd9b1bb..45e31a37da 100644 --- a/calendar/gui/memos-control.c +++ b/calendar/gui/memos-control.c @@ -136,7 +136,7 @@ memos_control_activate_cb (BonoboControl *control, * selected memos. */ void -memos_control_sensitize_commands (BonoboControl *control, EMemos *memos, int n_selected) +memos_control_sensitize_commands (BonoboControl *control, EMemos *memos, gint n_selected) { BonoboUIComponent *uic; gboolean read_only = TRUE, preview_active; @@ -177,7 +177,7 @@ memos_control_sensitize_commands (BonoboControl *control, EMemos *memos, int n_s /* Callback used when the selection in the table changes */ static void -selection_changed_cb (EMemos *memos, int n_selected, gpointer data) +selection_changed_cb (EMemos *memos, gint n_selected, gpointer data) { BonoboControl *control; @@ -231,10 +231,10 @@ memos_control_activate (BonoboControl *control, EMemos *memos) { Bonobo_UIContainer remote_uih; BonoboUIComponent *uic; - int n_selected; + gint n_selected; EMemoTable *cal_table; ETable *etable; - char *xmlfile; + gchar *xmlfile; uic = bonobo_control_get_ui_component (control); g_return_if_fail (uic != NULL); @@ -318,7 +318,7 @@ memos_control_new_memo_cmd (BonoboUIComponent *uic, static void memos_control_cut_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { EMemos *memos; EMemoTable *cal_table; @@ -331,7 +331,7 @@ memos_control_cut_cmd (BonoboUIComponent *uic, static void memos_control_copy_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { EMemos *memos; EMemoTable *cal_table; @@ -352,7 +352,7 @@ memos_control_copy_cmd (BonoboUIComponent *uic, static void memos_control_paste_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { EMemos *memos; EMemoTable *cal_table; @@ -377,7 +377,7 @@ memos_control_delete_cmd (BonoboUIComponent *uic, static void memos_control_print_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { EMemos *memos = E_MEMOS (data); ETable *table; @@ -393,7 +393,7 @@ memos_control_print_cmd (BonoboUIComponent *uic, static void memos_control_print_preview_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { EMemos *memos = E_MEMOS (data); ETable *table; diff --git a/calendar/gui/memos-control.h b/calendar/gui/memos-control.h index 565ac160ed..854f5f9d9b 100644 --- a/calendar/gui/memos-control.h +++ b/calendar/gui/memos-control.h @@ -31,6 +31,6 @@ BonoboControl *memos_control_new (void); void memos_control_activate (BonoboControl *control, EMemos *memos); void memos_control_deactivate (BonoboControl *control, EMemos *memos); -void memos_control_sensitize_commands (BonoboControl *control, EMemos *memos, int n_selected); +void memos_control_sensitize_commands (BonoboControl *control, EMemos *memos, gint n_selected); #endif /* _MEMOS_CONTROL_H_ */ diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index 97cc575b20..b2552a5a27 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -188,9 +188,9 @@ dialog_close (void) } static void -dialog_set_folder_name (const char *folder_name) +dialog_set_folder_name (const gchar *folder_name) { - char *text; + gchar *text; text = g_strdup_printf (_("Migrating '%s':"), folder_name); gtk_label_set_text (label, text); @@ -205,7 +205,7 @@ dialog_set_folder_name (const char *folder_name) static void dialog_set_progress (double percent) { - char text[5]; + gchar text[5]; snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f)); @@ -217,7 +217,7 @@ dialog_set_progress (double percent) } static gboolean -check_for_conflict (ESourceGroup *group, char *name) +check_for_conflict (ESourceGroup *group, gchar *name) { GSList *sources; GSList *s; @@ -234,12 +234,12 @@ check_for_conflict (ESourceGroup *group, char *name) return FALSE; } -static char * -get_source_name (ESourceGroup *group, const char *path) +static gchar * +get_source_name (ESourceGroup *group, const gchar *path) { - char **p = g_strsplit (path, "/", 0); - int i, j, starting_index; - int num_elements; + gchar **p = g_strsplit (path, "/", 0); + gint i, j, starting_index; + gint num_elements; gboolean conflict; GString *s = g_string_new (NULL); @@ -281,8 +281,8 @@ static gboolean migrate_ical (ECal *old_ecal, ECal *new_ecal) { GList *l, *objects; - int num_added = 0; - int num_objects; + gint num_added = 0; + gint num_objects; gboolean retval = TRUE; /* both ecals are loaded, start the actual migration */ @@ -312,12 +312,12 @@ migrate_ical (ECal *old_ecal, ECal *new_ecal) } static gboolean -migrate_ical_folder_to_source (char *old_path, ESource *new_source, ECalSourceType type) +migrate_ical_folder_to_source (gchar *old_path, ESource *new_source, ECalSourceType type) { ECal *old_ecal = NULL, *new_ecal = NULL; ESource *old_source; ESourceGroup *group; - char *old_uri = g_filename_to_uri (old_path, NULL, NULL); + gchar *old_uri = g_filename_to_uri (old_path, NULL, NULL); GError *error = NULL; gboolean retval = FALSE; @@ -362,7 +362,7 @@ finish: } static gboolean -migrate_ical_folder (char *old_path, ESourceGroup *dest_group, char *source_name, ECalSourceType type) +migrate_ical_folder (gchar *old_path, ESourceGroup *dest_group, gchar *source_name, ECalSourceType type) { ESource *new_source; gboolean retval; @@ -416,7 +416,7 @@ create_calendar_sources (CalendarComponent *component, { GSList *groups; ESourceGroup *group; - char *base_uri, *base_uri_proto; + gchar *base_uri, *base_uri_proto; const gchar *base_dir; *on_this_computer = NULL; @@ -479,7 +479,7 @@ create_calendar_sources (CalendarComponent *component, } if (!*personal_source) { - char *primary_calendar = calendar_config_get_primary_calendar (); + gchar *primary_calendar = calendar_config_get_primary_calendar (); /* Create the default Person calendar */ ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI); @@ -527,7 +527,7 @@ create_task_sources (TasksComponent *component, { GSList *groups; ESourceGroup *group; - char *base_uri, *base_uri_proto; + gchar *base_uri, *base_uri_proto; const gchar *base_dir; *on_this_computer = NULL; @@ -614,7 +614,7 @@ create_task_sources (TasksComponent *component, #ifndef G_OS_WIN32 static void -migrate_pilot_db_key (const char *key, gpointer user_data) +migrate_pilot_db_key (const gchar *key, gpointer user_data) { EXmlHash *xmlhash = user_data; @@ -622,12 +622,12 @@ migrate_pilot_db_key (const char *key, gpointer user_data) } static void -migrate_pilot_data (const char *component, const char *conduit, const char *old_path, const char *new_path) +migrate_pilot_data (const gchar *component, const gchar *conduit, const gchar *old_path, const gchar *new_path) { - char *changelog, *map; - const char *dent; - const char *ext; - char *filename; + gchar *changelog, *map; + const gchar *dent; + const gchar *ext; + gchar *filename; GDir *dir; if (!(dir = g_dir_open (old_path, 0, NULL))) @@ -643,9 +643,9 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_ if (!strncmp (dent, map, strlen (map)) && ((ext = strrchr (dent, '.')) && !strcmp (ext, ".xml"))) { /* pilot map file - src and dest file formats are identical */ - unsigned char inbuf[4096]; + guchar inbuf[4096]; size_t nread, nwritten; - int fd0, fd1; + gint fd0, fd1; ssize_t n; filename = g_build_filename (old_path, dent, NULL); @@ -733,7 +733,7 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_ #endif gboolean -migrate_calendars (CalendarComponent *component, int major, int minor, int revision, GError **err) +migrate_calendars (CalendarComponent *component, gint major, gint minor, gint revision, GError **err) { ESourceGroup *on_this_computer = NULL, *on_the_web = NULL, *contacts = NULL; ESource *personal_source = NULL; @@ -749,7 +749,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis #ifndef G_OS_WIN32 if (major == 1) { xmlDocPtr config_doc = NULL; - char *conf_file; + gchar *conf_file; struct stat st; conf_file = g_build_filename (g_get_home_dir (), "evolution", "config.xmldb", NULL); @@ -759,7 +759,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis if (config_doc && minor <= 2) { GConfClient *gconf; - int res = 0; + gint res = 0; /* move bonobo config to gconf */ gconf = gconf_client_get_default (); @@ -779,7 +779,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis if (minor <= 4) { GSList *migration_dirs, *l; - char *path, *local_cal_folder; + gchar *path, *local_cal_folder; setup_progress_dialog (FALSE); @@ -792,12 +792,12 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis migrate_ical_folder_to_source (local_cal_folder, personal_source, E_CAL_SOURCE_TYPE_EVENT); for (l = migration_dirs; l; l = l->next) { - char *source_name; + gchar *source_name; - if (personal_source && !strcmp ((char*)l->data, local_cal_folder)) + if (personal_source && !strcmp ((gchar *)l->data, local_cal_folder)) continue; - source_name = get_source_name (on_this_computer, (char*)l->data); + source_name = get_source_name (on_this_computer, (gchar *)l->data); if (!migrate_ical_folder (l->data, on_this_computer, source_name, E_CAL_SOURCE_TYPE_EVENT)) { /* FIXME: domain/code */ @@ -817,8 +817,8 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis if (minor <= 4 || (minor == 5 && revision < 5)) { GConfClient *gconf; GConfValue *gconf_val; - int i; - const char *keys[] = { + gint i; + const gchar *keys[] = { CALENDAR_CONFIG_HPANE_POS, CALENDAR_CONFIG_VPANE_POS, CALENDAR_CONFIG_MONTH_HPANE_POS, @@ -841,7 +841,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis } if (minor < 5 || (minor == 5 && revision <= 10)) { - char *old_path, *new_path; + gchar *old_path, *new_path; old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Calendar", NULL); new_path = g_build_filename (calendar_component_peek_base_directory (component), @@ -904,7 +904,7 @@ fail: } gboolean -migrate_tasks (TasksComponent *component, int major, int minor, int revision, GError **err) +migrate_tasks (TasksComponent *component, gint major, gint minor, gint revision, GError **err) { ESourceGroup *on_this_computer = NULL; ESourceGroup *on_the_web = NULL; @@ -919,7 +919,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE #ifndef G_OS_WIN32 if (major == 1) { xmlDocPtr config_doc = NULL; - char *conf_file; + gchar *conf_file; conf_file = g_build_filename (g_get_home_dir (), "evolution", "config.xmldb", NULL); if (g_file_test (conf_file, G_FILE_TEST_IS_REGULAR)) @@ -928,7 +928,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE if (config_doc && minor <= 2) { GConfClient *gconf; - int res = 0; + gint res = 0; /* move bonobo config to gconf */ gconf = gconf_client_get_default (); @@ -947,7 +947,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE if (minor <= 4) { GSList *migration_dirs, *l; - char *path, *local_task_folder; + gchar *path, *local_task_folder; setup_progress_dialog (TRUE); @@ -960,12 +960,12 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE migrate_ical_folder_to_source (local_task_folder, personal_source, E_CAL_SOURCE_TYPE_TODO); for (l = migration_dirs; l; l = l->next) { - char *source_name; + gchar *source_name; - if (personal_source && !strcmp ((char*)l->data, local_task_folder)) + if (personal_source && !strcmp ((gchar *)l->data, local_task_folder)) continue; - source_name = get_source_name (on_this_computer, (char*)l->data); + source_name = get_source_name (on_this_computer, (gchar *)l->data); if (!migrate_ical_folder (l->data, on_this_computer, source_name, E_CAL_SOURCE_TYPE_TODO)) { /* FIXME: domain/code */ @@ -983,7 +983,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE } if (minor < 5 || (minor == 5 && revision <= 10)) { - char *old_path, *new_path; + gchar *old_path, *new_path; old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Tasks", NULL); new_path = g_build_filename (tasks_component_peek_base_directory (component), @@ -1041,7 +1041,7 @@ create_memo_sources (MemosComponent *component, { GSList *groups; ESourceGroup *group; - char *base_uri, *base_uri_proto; + gchar *base_uri, *base_uri_proto; const gchar *base_dir; *on_this_computer = NULL; @@ -1136,17 +1136,17 @@ is_groupwise_account (EAccount *account) } static void -add_gw_esource (ESourceList *source_list, const char *group_name, const char *source_name, CamelURL *url, GConfClient *client) +add_gw_esource (ESourceList *source_list, const gchar *group_name, const gchar *source_name, CamelURL *url, GConfClient *client) { ESourceGroup *group; ESource *source; GSList *ids, *temp ; GError *error = NULL; - char *relative_uri; - const char *soap_port; - const char * use_ssl; - const char *poa_address; - const char *offline_sync; + gchar *relative_uri; + const gchar *soap_port; + const gchar * use_ssl; + const gchar *poa_address; + const gchar *offline_sync; poa_address = url->host; @@ -1194,7 +1194,7 @@ add_gw_esource (ESourceList *source_list, const char *group_name, const char *s } gboolean -migrate_memos (MemosComponent *component, int major, int minor, int revision, struct _GError **err) +migrate_memos (MemosComponent *component, gint major, gint minor, gint revision, struct _GError **err) { ESourceGroup *on_this_computer = NULL; ESourceGroup *on_the_web = NULL; diff --git a/calendar/gui/migration.h b/calendar/gui/migration.h index c16fd831b9..d4bb33c448 100644 --- a/calendar/gui/migration.h +++ b/calendar/gui/migration.h @@ -31,7 +31,7 @@ struct _GError; -gboolean migrate_calendars (CalendarComponent *component, int major, int minor, int revision, struct _GError **err); -gboolean migrate_tasks (TasksComponent *component, int major, int minor, int revision, struct _GError **err); -gboolean migrate_memos (MemosComponent *component, int major, int minor, int revision, struct _GError **err); +gboolean migrate_calendars (CalendarComponent *component, gint major, gint minor, gint revision, struct _GError **err); +gboolean migrate_tasks (TasksComponent *component, gint major, gint minor, gint revision, struct _GError **err); +gboolean migrate_memos (MemosComponent *component, gint major, gint minor, gint revision, struct _GError **err); #endif diff --git a/calendar/gui/misc.c b/calendar/gui/misc.c index ab657d8872..9fdf6f971b 100644 --- a/calendar/gui/misc.c +++ b/calendar/gui/misc.c @@ -45,9 +45,9 @@ * Return value: TRUE if the string is empty, FALSE otherwise. **/ gboolean -string_is_empty (const char *value) +string_is_empty (const gchar *value) { - const char *p; + const gchar *p; gboolean empty; empty = TRUE; @@ -69,11 +69,11 @@ string_is_empty (const char *value) /** * get_uri_without_password */ -char * -get_uri_without_password (const char *full_uri) +gchar * +get_uri_without_password (const gchar *full_uri) { EUri *uri; - char *uristr; + gchar *uristr; uri = e_uri_new (full_uri); if (!uri) @@ -98,15 +98,15 @@ get_position_in_array (GPtrArray *objects, gpointer item) return -1; } -char * +gchar * calculate_time (time_t start, time_t end) { time_t difference = end - start; - char *str; - int hours, minutes; - char *times[4]; - char *joined; - int i; + gchar *str; + gint hours, minutes; + gchar *times[4]; + gchar *joined; + gint i; i = 0; if (difference >= 3600) { diff --git a/calendar/gui/misc.h b/calendar/gui/misc.h index 8c328652bb..6d3133b58d 100644 --- a/calendar/gui/misc.h +++ b/calendar/gui/misc.h @@ -29,8 +29,8 @@ #include <glib.h> #include <time.h> -gboolean string_is_empty (const char *value); -char *get_uri_without_password (const char *uri); +gboolean string_is_empty (const gchar *value); +gchar *get_uri_without_password (const gchar *uri); gint get_position_in_array (GPtrArray *objects, gpointer item); -char * calculate_time (time_t start, time_t end); +gchar * calculate_time (time_t start, time_t end); #endif diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 3fca566bf2..7abe2f5da7 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -73,7 +73,7 @@ struct PrintCalItem { static double evo_calendar_print_renderer_get_width (GtkPrintContext *context, PangoFontDescription *font, - const char *text) + const gchar *text) { PangoLayout *layout; gint layout_width, layout_height; @@ -153,7 +153,7 @@ get_font_size (PangoFontDescription *font) /* The weird month of September 1752, where 3 Sep through 13 Sep were eliminated due to the Gregorian reformation. */ -static const int sept_1752[42] = { +static const gint sept_1752[42] = { 0, 0, 1, 2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, @@ -190,12 +190,12 @@ struct psinfo GArray *events; - int rows_per_cell; - int rows_per_compressed_cell; - int display_start_weekday; + gint rows_per_cell; + gint rows_per_compressed_cell; + gint display_start_weekday; gboolean multi_week_view; - int weeks_shown; - int month; + gint weeks_shown; + gint month; gboolean compress_weekend; gboolean use_24_hour_format; double row_height; @@ -233,10 +233,10 @@ convert_timet_to_struct_tm (time_t time, icaltimezone *zone) * returned in the start and end arguments. */ static void -build_month (int month, int year, int *days, int *start, int *end) +build_month (gint month, gint year, gint *days, gint *start, gint *end) { - int i; - int d_month, d_week, week_start_day; + gint i; + gint d_month, d_week, week_start_day; /* Note that months are zero-based, so September is month 8 */ @@ -412,7 +412,7 @@ print_rectangle (GtkPrintContext *context, or PANGO_ALIGN_CENTER. */ static double print_text (GtkPrintContext *context, PangoFontDescription *desc, - const char *text, PangoAlignment alignment, + const gchar *text, PangoAlignment alignment, gdouble x1, gdouble x2, gdouble y1, gdouble y2) { PangoLayout *layout; @@ -455,7 +455,7 @@ print_text (GtkPrintContext *context, PangoFontDescription *desc, /* gets/frees the font for you, as a normal font */ static double -print_text_size (GtkPrintContext *context, const char *text, +print_text_size (GtkPrintContext *context, const gchar *text, PangoAlignment alignment, gdouble x1, gdouble x2, gdouble y1, gdouble y2) { @@ -471,7 +471,7 @@ print_text_size (GtkPrintContext *context, const char *text, /* gets/frees the font for you, as a bold font */ static double -print_text_size_bold (GtkPrintContext *context, const char *text, +print_text_size_bold (GtkPrintContext *context, const gchar *text, PangoAlignment alignment, gdouble x1, gdouble x2, gdouble y1, gdouble y2) { @@ -486,7 +486,7 @@ print_text_size_bold (GtkPrintContext *context, const char *text, } static void -titled_box (GtkPrintContext *context, const char *text, +titled_box (GtkPrintContext *context, const gchar *text, PangoFontDescription *font, PangoAlignment alignment, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2, gdouble linewidth) @@ -523,11 +523,11 @@ static const gchar *days[] = { /* format the date 'nicely' and consistently for various headers */ -static char * -format_date(time_t time, int flags, char *buffer, int bufflen) +static gchar * +format_date(time_t time, gint flags, gchar *buffer, gint bufflen) { icaltimezone *zone = calendar_config_get_icaltimezone (); - char fmt[64]; + gchar fmt[64]; struct tm tm; tm = *convert_timet_to_struct_tm (time, zone); @@ -576,16 +576,16 @@ instance_cb (ECalComponent *comp, time_t instance_start, time_t instance_end, gp static void print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month, gdouble x1, gdouble y1, gdouble x2, gdouble y2, - int titleflags, time_t greystart, time_t greyend, - int bordertitle) + gint titleflags, time_t greystart, time_t greyend, + gint bordertitle) { icaltimezone *zone = calendar_config_get_icaltimezone (); PangoFontDescription *font, *font_bold, *font_normal; time_t now, next; - int x, y; - int days[42]; - int day, weekday, week_start_day; - char buf[100]; + gint x, y; + gint days[42]; + gint day, weekday, week_start_day; + gchar buf[100]; struct tm tm; double font_size, max_font_size; double header_size, col_width, row_height, text_xpad, w; @@ -772,10 +772,10 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal, double yinc, y; double width = DAY_VIEW_TIME_COLUMN_WIDTH; double font_size, max_font_size, hour_font_size, minute_font_size; - char buf[20]; - const char *minute; + gchar buf[20]; + const gchar *minute; gboolean use_24_hour; - int i, hour, row; + gint i, hour, row; double hour_minute_x; cairo_t *cr; @@ -971,10 +971,10 @@ free_event_array (GArray *array) g_array_set_size (array, 0); } -static const char * +static const gchar * get_type_as_string (icalparameter_cutype cutype) { - const char *res; + const gchar *res; switch (cutype) { case ICAL_CUTYPE_NONE: res = NULL; break; @@ -988,10 +988,10 @@ get_type_as_string (icalparameter_cutype cutype) return res; } -static const char * +static const gchar * get_role_as_string (icalparameter_role role) { - const char *res; + const gchar *res; switch (role) { case ICAL_ROLE_NONE: res = NULL; break; @@ -1023,7 +1023,7 @@ print_attendees (GtkPrintContext *context, PangoFontDescription *font, cairo_t * if (attendee && attendee->value && *attendee->value) { GString *text; - const char *tmp; + const gchar *tmp; tmp = get_type_as_string (attendee->cutype); text = g_string_new (tmp ? tmp : ""); @@ -1092,8 +1092,8 @@ print_day_long_event (GtkPrintContext *context, PangoFontDescription *font, { double x1, x2, y1, y2; double left_triangle_width = -1.0, right_triangle_width = -1.0; - char *text; - char buffer[32]; + gchar *text; + gchar buffer[32]; struct tm date_tm; double red, green, blue; @@ -1171,8 +1171,8 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font, EDayViewEvent *event, struct pdinfo *pdi, ECalModel *model) { double x1, x2, y1, y2, col_width, row_height; - int start_offset, end_offset, start_row, end_row; - char *text, start_buffer[32], end_buffer[32]; + gint start_offset, end_offset, start_row, end_row; + gchar *text, start_buffer[32], end_buffer[32]; gboolean display_times = FALSE; struct tm date_tm; double red, green, blue; @@ -1392,11 +1392,11 @@ print_week_long_event (GtkPrintContext *context, PangoFontDescription *font, struct psinfo *psi, double x1, double x2, double y1, double y2, EWeekViewEvent *event, EWeekViewEventSpan *span, - char *text, double red, double green, double blue) + gchar *text, double red, double green, double blue) { double left_triangle_width = -1.0, right_triangle_width = -1.0; struct tm date_tm; - char buffer[32]; + gchar buffer[32]; /* If the event starts before the first day of the span, draw a triangle to indicate it continues. */ @@ -1459,10 +1459,10 @@ print_week_day_event (GtkPrintContext *context, PangoFontDescription *font, struct psinfo *psi, double x1, double x2, double y1, double y2, EWeekViewEvent *event, EWeekViewEventSpan *span, - char *text, double red, double green, double blue) + gchar *text, double red, double green, double blue) { struct tm date_tm; - char buffer[32]; + gchar buffer[32]; date_tm.tm_year = 2001; date_tm.tm_mon = 0; @@ -1503,8 +1503,8 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font, { EWeekViewEventSpan *span; gint span_num; - char *text; - int num_days, start_x, start_y, start_h, end_x, end_y, end_h; + gchar *text; + gint num_days, start_x, start_y, start_h, end_x, end_y, end_h; double x1, x2, y1, y2; double red, green, blue; GdkPixbuf *pixbuf = NULL; @@ -1594,12 +1594,12 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font, } if (!pixbuf) { - const char **xpm = (const char **)jump_xpm; + const gchar **xpm = (const gchar **)jump_xpm; /* this ugly thing is here only to get rid of compiler warning about unused 'jump_xpm_focused' */ if (pixbuf) - xpm = (const char **)jump_xpm_focused; + xpm = (const gchar **)jump_xpm_focused; pixbuf = gdk_pixbuf_new_from_xpm_data (xpm); } @@ -1628,7 +1628,7 @@ print_week_view_background (GtkPrintContext *context, { icaltimezone *zone = calendar_config_get_icaltimezone (); struct tm tm; - int day, day_x, day_y, day_h; + gint day, day_x, day_y, day_h; double x1, x2, y1, y2, font_size, fillcolor; const gchar *format_string; gchar buffer[128]; @@ -1737,8 +1737,8 @@ print_week_summary_cb (ECalComponent *comp, static void print_week_summary (GtkPrintContext *context, GnomeCalendar *gcal, - time_t whence, gboolean multi_week_view, int weeks_shown, - int month, double font_size, + time_t whence, gboolean multi_week_view, gint weeks_shown, + gint month, double font_size, double left, double right, double top, double bottom) { icaltimezone *zone = calendar_config_get_icaltimezone (); @@ -1842,12 +1842,12 @@ print_week_summary (GtkPrintContext *context, GnomeCalendar *gcal, static void print_year_summary (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence, double left, double right, double top, double bottom, - int morerows) + gint morerows) { icaltimezone *zone = calendar_config_get_icaltimezone (); double row_height, col_width, l, r, t, b; time_t now; - int col, row, rows, cols; + gint col, row, rows, cols; l = left; t = top; @@ -1891,10 +1891,10 @@ print_month_summary (GtkPrintContext *context, GnomeCalendar *gcal, time_t whenc time_t date; struct tm tm; struct icaltimetype tt; - char buffer[100]; + gchar buffer[100]; PangoFontDescription *font; gboolean compress_weekend; - int columns, col, weekday, month; + gint columns, col, weekday, month; double font_size, cell_width, x1, x2, y1, y2; weekday = calendar_config_get_week_start_day (); @@ -1999,7 +1999,7 @@ print_todo_details (GtkPrintContext *context, GnomeCalendar *gcal, ECalModelComponent *comp_data; ECalComponent *comp; ECalComponentText summary; - int model_row; + gint model_row; model_row = e_table_view_to_model_row (table, row); comp_data = e_cal_model_get_component_at (model, model_row); @@ -2061,9 +2061,9 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date) { GtkPageSetup *setup; icaltimezone *zone = calendar_config_get_icaltimezone (); - int i, days = 1; + gint i, days = 1; double todo, l; - char buf[100]; + gchar buf[100]; cairo_t *cr; gdouble width, height; @@ -2131,7 +2131,7 @@ print_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date) GtkPageSetup *setup; icaltimezone *zone = calendar_config_get_icaltimezone (); double l; - char buf[100]; + gchar buf[100]; time_t when; gint week_start_day; struct tm tm; @@ -2205,7 +2205,7 @@ print_month_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date) { GtkPageSetup *setup; icaltimezone *zone = calendar_config_get_icaltimezone (); - char buf[100]; + gchar buf[100]; gdouble width, height; double l; @@ -2247,7 +2247,7 @@ static void print_year_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date) { GtkPageSetup *setup; - char buf[100]; + gchar buf[100]; cairo_t *cr; gdouble width, height; @@ -2282,7 +2282,7 @@ write_label_piece (time_t t, { icaltimezone *zone = calendar_config_get_icaltimezone (); struct tm *tmp_tm; - int len; + gint len; tmp_tm = convert_timet_to_struct_tm (t, zone); @@ -2299,7 +2299,7 @@ write_label_piece (time_t t, } static icaltimezone* -get_zone_from_tzid (ECal *client, const char *tzid) +get_zone_from_tzid (ECal *client, const gchar *tzid) { icaltimezone *zone; @@ -2323,7 +2323,7 @@ print_date_label (GtkPrintContext *context, ECalComponent *comp, ECal *client, icaltimezone *start_zone, *end_zone, *due_zone, *completed_zone; ECalComponentDateTime datetime; time_t start = 0, end = 0, complete = 0, due = 0; - static char buffer[1024]; + static gchar buffer[1024]; e_cal_component_get_dtstart (comp, &datetime); if (datetime.value) { @@ -2452,8 +2452,8 @@ print_comp_draw_real (GtkPrintOperation *operation, GSList *desc, *l; GSList *contact_list, *elem; - const char *title, *categories, *location; - char *categories_string, *location_string, *summary_string; + const gchar *title, *categories, *location; + gchar *categories_string, *location_string, *summary_string; double header_size; cairo_t *cr; gdouble width, height, page_start; @@ -2549,10 +2549,10 @@ print_comp_draw_real (GtkPrintOperation *operation, /* For a VTODO we print the Status, Priority, % Complete and URL. */ if (vtype == E_CAL_COMPONENT_TODO) { icalproperty_status status; - const char *status_string = NULL; - int *percent; - int *priority; - const char *url; + const gchar *status_string = NULL; + gint *percent; + gint *priority; + const gchar *url; /* Status */ e_cal_component_get_status (comp, &status); @@ -2575,7 +2575,7 @@ print_comp_draw_real (GtkPrintOperation *operation, } if (status_string) { - char *status_text = g_strdup_printf (_("Status: %s"), + gchar *status_text = g_strdup_printf (_("Status: %s"), status_string); top = bound_text (context, font, status_text, -1, 0.0, top, width, height, FALSE, &page_start, &pages); @@ -2587,7 +2587,7 @@ print_comp_draw_real (GtkPrintOperation *operation, /* Priority */ e_cal_component_get_priority (comp, &priority); if (priority && *priority >= 0) { - char *priority_string, *pri_text; + gchar *priority_string, *pri_text; priority_string = e_cal_util_priority_to_string (*priority); @@ -2604,7 +2604,7 @@ print_comp_draw_real (GtkPrintOperation *operation, /* Percent Complete */ e_cal_component_get_percent (comp, &percent); if (percent) { - char *percent_string; + gchar *percent_string; percent_string = g_strdup_printf (_("Percent Complete: %i"), *percent); e_cal_component_free_percent (percent); @@ -2618,7 +2618,7 @@ print_comp_draw_real (GtkPrintOperation *operation, /* URL */ e_cal_component_get_url (comp, &url); if (url && url[0]) { - char *url_string = g_strdup_printf (_("URL: %s"), + gchar *url_string = g_strdup_printf (_("URL: %s"), url); top = bound_text (context, font, url_string, -1, @@ -2663,7 +2663,7 @@ print_comp_draw_real (GtkPrintOperation *operation, e_cal_component_get_description_list (comp, &desc); for (l = desc; l != NULL; l = l->next) { ECalComponentText *ptext = l->data; - const char *line, *next_line; + const gchar *line, *next_line; for (line = ptext->value; line != NULL; line = next_line) { next_line = strchr (line, '\n'); diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c index b57a50d6ce..272d822a2c 100644 --- a/calendar/gui/tag-calendar.c +++ b/calendar/gui/tag-calendar.c @@ -160,7 +160,7 @@ tag_calendar_by_client (ECalendar *ecal, ECal *client) the server. We need to try to use builtin timezones first, as they may not be added to the server yet. */ static icaltimezone* -resolve_tzid_cb (const char *tzid, gpointer data) +resolve_tzid_cb (const gchar *tzid, gpointer data) { ECal *client; icaltimezone *zone = NULL; diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 68536b29cb..e848b9b468 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -104,8 +104,8 @@ typedef struct } TasksComponentView; struct _TasksComponentPrivate { - char *base_directory; - char *config_directory; + gchar *base_directory; + gchar *config_directory; ESourceList *source_list; GSList *source_selection; @@ -123,7 +123,7 @@ ensure_sources (TasksComponent *component) ESourceList *source_list; ESourceGroup *on_this_computer; ESource *personal_source; - char *base_uri, *base_uri_proto, base_uri_proto_seventh; + gchar *base_uri, *base_uri_proto, base_uri_proto_seventh; const gchar *base_dir; personal_source = NULL; @@ -243,7 +243,7 @@ is_in_uids (GSList *uids, ESource *source) GSList *l; for (l = uids; l; l = l->next) { - const char *uid = l->data; + const gchar *uid = l->data; if (!strcmp (uid, e_source_peek_uid (source))) return TRUE; @@ -270,7 +270,7 @@ update_uris_for_selection (TasksComponentView *component_view) ESource *selected_source = l->data; e_tasks_add_todo_source (component_view->tasks, selected_source); - uids_selected = g_slist_append (uids_selected, (char *)e_source_peek_uid (selected_source)); + uids_selected = g_slist_append (uids_selected, (gchar *)e_source_peek_uid (selected_source)); } e_source_selector_free_selection (component_view->source_selection); @@ -326,7 +326,7 @@ update_selection (TasksComponentView *component_view) /* Make sure the whole selection is there */ for (l = uids_selected; l; l = l->next) { - char *uid = l->data; + gchar *uid = l->data; ESource *source; source = e_source_list_peek_source_by_uid (component_view->source_list, uid); @@ -342,7 +342,7 @@ static void update_primary_selection (TasksComponentView *component_view) { ESource *source = NULL; - char *uid; + gchar *uid; uid = calendar_config_get_primary_tasks (); if (uid) { @@ -362,7 +362,7 @@ update_primary_selection (TasksComponentView *component_view) /* Callbacks. */ static void -copy_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +copy_task_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { TasksComponentView *component_view = data; ESource *selected_source; @@ -375,12 +375,12 @@ copy_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -delete_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +delete_task_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { TasksComponentView *component_view = data; ESource *selected_source; ECal *cal; - char *uri; + gchar *uri; selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector)); if (!selected_source) @@ -414,13 +414,13 @@ delete_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -new_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +new_task_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { calendar_setup_new_task_list (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget))); } static void -rename_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +rename_task_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { TasksComponentView *component_view = data; ESourceSelector *selector; @@ -430,7 +430,7 @@ rename_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -edit_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +edit_task_list_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { TasksComponentView *component_view = data; ESource *selected_source; @@ -443,7 +443,7 @@ edit_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) } static void -set_offline_availability (EPopup *ep, EPopupItem *pitem, void *data, const char *value) +set_offline_availability (EPopup *ep, EPopupItem *pitem, gpointer data, const gchar *value) { TasksComponentView *component_view = data; ESource *selected_source; @@ -456,13 +456,13 @@ set_offline_availability (EPopup *ep, EPopupItem *pitem, void *data, const char } static void -mark_no_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_no_offline_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { set_offline_availability (ep, pitem, data, "0"); } static void -mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) +mark_offline_cb (EPopup *ep, EPopupItem *pitem, gpointer data) { set_offline_availability (ep, pitem, data, "1"); } @@ -482,7 +482,7 @@ static EPopupItem etc_source_popups[] = { }; static void -etc_source_popup_free(EPopup *ep, GSList *list, void *data) +etc_source_popup_free(EPopup *ep, GSList *list, gpointer data) { g_slist_free(list); } @@ -493,7 +493,7 @@ popup_event_cb(ESourceSelector *selector, ESource *insource, GdkEventButton *eve ECalPopup *ep; ECalPopupTargetSource *t; GSList *menus = NULL; - int i; + gint i; GtkMenu *menu; /** @HookPoint-ECalPopup: Tasks Source Selector Context Menu @@ -546,7 +546,7 @@ static void set_info (TasksComponentView *component_view) { GString *message = g_string_new (NULL); - int rows, selected_rows; + gint rows, selected_rows; rows = e_table_model_row_count (component_view->model); selected_rows = e_table_selected_count (component_view->table); @@ -573,13 +573,13 @@ model_changed_cb (ETableModel *etm, TasksComponentView *component_view) } static void -model_rows_inserted_cb (ETableModel *etm, int row, int count, TasksComponentView *component_view) +model_rows_inserted_cb (ETableModel *etm, gint row, gint count, TasksComponentView *component_view) { set_info (component_view); } static void -model_rows_deleted_cb (ETableModel *etm, int row, int count, TasksComponentView *component_view) +model_rows_deleted_cb (ETableModel *etm, gint row, gint count, TasksComponentView *component_view) { set_info (component_view); } @@ -631,7 +631,7 @@ selector_tree_data_dropped (ESourceSelector *selector, components = cal_comp_selection_get_string_list (data); success = components != NULL; for (p = components; p && success; p = p->next) { - char *comp_str; /* do not free this! */ + gchar *comp_str; /* do not free this! */ /* p->data is "source_uid\ncomponent_string" */ comp_str = strchr (p->data, '\n'); @@ -690,7 +690,7 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view { TasksComponentPrivate *priv; ESource *source = NULL; - char *uid; + gchar *uid; guint not; priv = component->priv; @@ -809,7 +809,7 @@ create_new_todo (TasksComponent *task_component, gboolean is_assigned, TasksComp } static void -create_local_item_cb (EUserCreatableItemsHandler *handler, const char *item_type_name, void *data) +create_local_item_cb (EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data) { TasksComponent *tasks_component = data; TasksComponentPrivate *priv; @@ -1026,16 +1026,16 @@ impl_createView (PortableServer_Servant servant, } static void -impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environment *ev) +impl_handleURI (PortableServer_Servant servant, const gchar *uri, CORBA_Environment *ev) { TasksComponent *tasks_component = TASKS_COMPONENT (bonobo_object_from_servant (servant)); TasksComponentPrivate *priv; GList *l; TasksComponentView *view = NULL; - char *src_uid = NULL; - char *uid = NULL; - char *rid = NULL; + gchar *src_uid = NULL; + gchar *uid = NULL; + gchar *rid = NULL; priv = tasks_component->priv; @@ -1047,8 +1047,8 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme if (!strncmp (uri, "task:", 5)) { EUri *euri = e_uri_new (uri); - const char *p; - char *header, *content; + const gchar *p; + gchar *header, *content; size_t len, clen; p = euri->query; @@ -1060,7 +1060,7 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme if (p[len] != '=') break; - header = (char *) p; + header = (gchar *) p; header[len] = '\0'; p += len + 1; @@ -1110,28 +1110,28 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_sequence_set_release (list, FALSE); - list->_buffer[0].id = (char *) CREATE_TASK_ID; - list->_buffer[0].description = (char *) _("New task"); - list->_buffer[0].menuDescription = (char *) C_("New", "_Task"); - list->_buffer[0].tooltip = (char *) _("Create a new task"); + list->_buffer[0].id = (gchar *) CREATE_TASK_ID; + list->_buffer[0].description = (gchar *) _("New task"); + list->_buffer[0].menuDescription = (gchar *) C_("New", "_Task"); + list->_buffer[0].tooltip = (gchar *) _("Create a new task"); list->_buffer[0].menuShortcut = 't'; - list->_buffer[0].iconName = (char *) "stock_task"; + list->_buffer[0].iconName = (gchar *) "stock_task"; list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[1].id = (char *) CREATE_TASK_ASSIGNED_ID; - list->_buffer[1].description = (char *) _("New assigned task"); - list->_buffer[1].menuDescription = (char *) C_("New", "Assigne_d Task"); - list->_buffer[1].tooltip = (char *) _("Create a new assigned task"); + list->_buffer[1].id = (gchar *) CREATE_TASK_ASSIGNED_ID; + list->_buffer[1].description = (gchar *) _("New assigned task"); + list->_buffer[1].menuDescription = (gchar *) C_("New", "Assigne_d Task"); + list->_buffer[1].tooltip = (gchar *) _("Create a new assigned task"); list->_buffer[1].menuShortcut = '\0'; - list->_buffer[1].iconName = (char *) "stock_task"; + list->_buffer[1].iconName = (gchar *) "stock_task"; list->_buffer[1].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[2].id = (char *) CREATE_TASK_LIST_ID; - list->_buffer[2].description = (char *) _("New task list"); - list->_buffer[2].menuDescription = (char *) C_("New", "Tas_k list"); - list->_buffer[2].tooltip = (char *) _("Create a new task list"); + list->_buffer[2].id = (gchar *) CREATE_TASK_LIST_ID; + list->_buffer[2].description = (gchar *) _("New task list"); + list->_buffer[2].menuDescription = (gchar *) C_("New", "Tas_k list"); + list->_buffer[2].tooltip = (gchar *) _("Create a new task list"); list->_buffer[2].menuShortcut = '\0'; - list->_buffer[2].iconName = (char *) "stock_todo"; + list->_buffer[2].iconName = (gchar *) "stock_todo"; list->_buffer[2].type = GNOME_Evolution_CREATABLE_FOLDER; return list; @@ -1273,13 +1273,13 @@ tasks_component_peek (void) return component; } -const char * +const gchar * tasks_component_peek_base_directory (TasksComponent *component) { return component->priv->base_directory; } -const char * +const gchar * tasks_component_peek_config_directory (TasksComponent *component) { return component->priv->config_directory; diff --git a/calendar/gui/tasks-component.h b/calendar/gui/tasks-component.h index 0667fc2523..2a48209896 100644 --- a/calendar/gui/tasks-component.h +++ b/calendar/gui/tasks-component.h @@ -56,8 +56,8 @@ struct _TasksComponentClass { GType tasks_component_get_type (void); TasksComponent *tasks_component_peek (void); -const char *tasks_component_peek_base_directory (TasksComponent *component); -const char *tasks_component_peek_config_directory (TasksComponent *component); +const gchar *tasks_component_peek_base_directory (TasksComponent *component); +const gchar *tasks_component_peek_config_directory (TasksComponent *component); ESourceList *tasks_component_peek_source_list (TasksComponent *component); #endif /* _TASKS_COMPONENT_H_ */ diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c index 7ee468e768..5e57456bd3 100644 --- a/calendar/gui/tasks-control.c +++ b/calendar/gui/tasks-control.c @@ -85,17 +85,17 @@ static void tasks_control_print_preview_cmd (BonoboUIComponent *uic, const char *path); static void tasks_control_assign_cmd (BonoboUIComponent *uic, gpointer data, - const char *path); + const gchar *path); static void tasks_control_forward_cmd (BonoboUIComponent *uic, gpointer data, - const char *path); + const gchar *path); static void tasks_control_view_preview (BonoboUIComponent *uic, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, - void *data); + const gchar *state, + gpointer data); struct focus_changed_data { BonoboControl *control; @@ -162,7 +162,7 @@ static void sensitize_items(BonoboUIComponent *uic, struct _tasks_sensitize_item *items, guint32 mask) { while (items->command) { - char command[32]; + gchar command[32]; if (strlen(items->command)>=21) { g_warning ("Size more than 21: %s\n", items->command); @@ -197,7 +197,7 @@ static struct _tasks_sensitize_item tasks_sensitize_table[] = { * selected tasks. */ void -tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_selected) +tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, gint n_selected) { BonoboUIComponent *uic; gboolean read_only = TRUE; @@ -247,7 +247,7 @@ tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_s /* Callback used when the selection in the table changes */ static void -selection_changed_cb (ETasks *tasks, int n_selected, gpointer data) +selection_changed_cb (ETasks *tasks, gint n_selected, gpointer data) { BonoboControl *control; @@ -304,11 +304,11 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks) { Bonobo_UIContainer remote_uih; BonoboUIComponent *uic; - int n_selected; + gint n_selected; ECalendarTable *cal_table; ETable *etable; gboolean state; - char *xmlfile; + gchar *xmlfile; uic = bonobo_control_get_ui_component (control); g_return_if_fail (uic != NULL); @@ -399,7 +399,7 @@ tasks_control_new_task_cmd (BonoboUIComponent *uic, static void tasks_control_cut_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { ETasks *tasks; ECalendarTable *cal_table; @@ -412,7 +412,7 @@ tasks_control_cut_cmd (BonoboUIComponent *uic, static void tasks_control_copy_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { ETasks *tasks; ECalendarTable *cal_table; @@ -434,7 +434,7 @@ tasks_control_copy_cmd (BonoboUIComponent *uic, static void tasks_control_paste_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { ETasks *tasks; ECalendarTable *cal_table; @@ -473,7 +473,7 @@ static gboolean confirm_purge (ETasks *tasks) { GtkWidget *dialog, *checkbox, *parent; - int button; + gint button; if (!calendar_config_get_confirm_purge ()) return TRUE; @@ -516,7 +516,7 @@ tasks_control_purge_cmd (BonoboUIComponent *uic, static void tasks_control_print_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { ETasks *tasks = E_TASKS (data); ETable *table; @@ -532,7 +532,7 @@ tasks_control_print_cmd (BonoboUIComponent *uic, static void tasks_control_print_preview_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { ETasks *tasks = E_TASKS (data); ETable *table; @@ -548,7 +548,7 @@ tasks_control_print_preview_cmd (BonoboUIComponent *uic, static void tasks_control_assign_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { ETasks *tasks; ECalendarTable *cal_table; @@ -564,7 +564,7 @@ tasks_control_assign_cmd (BonoboUIComponent *uic, static void tasks_control_forward_cmd (BonoboUIComponent *uic, gpointer data, - const char *path) + const gchar *path) { ETasks *tasks; ECalendarTable *cal_table; @@ -583,7 +583,7 @@ tasks_control_forward_cmd (BonoboUIComponent *uic, } static void -tasks_control_view_preview (BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +tasks_control_view_preview (BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { ETasks *tasks; diff --git a/calendar/gui/tasks-control.h b/calendar/gui/tasks-control.h index 9dd3a3946d..de98914e40 100644 --- a/calendar/gui/tasks-control.h +++ b/calendar/gui/tasks-control.h @@ -30,6 +30,6 @@ BonoboControl *tasks_control_new (void); void tasks_control_activate (BonoboControl *control, ETasks *tasks); void tasks_control_deactivate (BonoboControl *control, ETasks *tasks); -void tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_selected); +void tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, gint n_selected); #endif /* _TASKS_CONTROL_H_ */ diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c index 56a7386d4b..913144d4a7 100644 --- a/calendar/gui/weekday-picker.c +++ b/calendar/gui/weekday-picker.c @@ -48,14 +48,14 @@ struct _WeekdayPickerPrivate { guint8 blocked_day_mask; /* Day that defines the start of the week; 0 = Sunday, ..., 6 = Saturday */ - int week_start_day; + gint week_start_day; /* Current keyboard focus day */ - int focus_day; + gint focus_day; /* Metrics */ - int font_ascent, font_descent; - int max_letter_width; + gint font_ascent, font_descent; + gint max_letter_width; /* Components */ GnomeCanvasItem *boxes[7]; @@ -114,7 +114,7 @@ weekday_picker_class_init (WeekdayPickerClass *class) } static void -day_clicked (WeekdayPicker *wp, int index) +day_clicked (WeekdayPicker *wp, gint index) { WeekdayPickerPrivate *priv = wp->priv; guint8 day_mask; @@ -172,7 +172,7 @@ day_event_cb (GnomeCanvasItem *item, GdkEvent *event, gpointer data) { WeekdayPicker *wp; WeekdayPickerPrivate *priv; - int i; + gint i; wp = WEEKDAY_PICKER (data); priv = wp->priv; @@ -210,7 +210,7 @@ create_items (WeekdayPicker *wp) { WeekdayPickerPrivate *priv; GnomeCanvasGroup *parent; - int i; + gint i; priv = wp->priv; @@ -270,7 +270,7 @@ colorize_items (WeekdayPicker *wp) GdkColor *outline, *focus_outline; GdkColor *fill, *sel_fill; GdkColor *text_fill, *sel_text_fill; - int i; + gint i; priv = wp->priv; @@ -284,7 +284,7 @@ colorize_items (WeekdayPicker *wp) sel_text_fill = >K_WIDGET (wp)->style->fg[GTK_STATE_SELECTED]; for (i = 0; i < 7; i++) { - int day; + gint day; GdkColor *f, *t, *o; day = i + priv->week_start_day; @@ -316,8 +316,8 @@ colorize_items (WeekdayPicker *wp) } /* Configures the items in the weekday picker by setting their attributes. */ -static char * -get_day_text (int day_index) +static gchar * +get_day_text (gint day_index) { GDateWeekday weekday; @@ -331,9 +331,9 @@ static void configure_items (WeekdayPicker *wp) { WeekdayPickerPrivate *priv; - int width, height; - int box_width; - int i; + gint width, height; + gint box_width; + gint i; priv = wp->priv; @@ -343,8 +343,8 @@ configure_items (WeekdayPicker *wp) box_width = (width - 1) / 7; for (i = 0; i < 7; i++) { - char *c; - int day; + gchar *c; + gint day; day = i + priv->week_start_day; if (day >= 7) @@ -422,8 +422,8 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) { WeekdayPicker *wp; WeekdayPickerPrivate *priv; - int max_width; - int i; + gint max_width; + gint i; PangoFontDescription *font_desc; PangoContext *pango_context; PangoFontMetrics *font_metrics; @@ -445,8 +445,8 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style) max_width = 0; for (i = 0; i < 7; i++) { - char *c; - int w; + gchar *c; + gint w; c = get_day_text (i); pango_layout_set_text (layout, c, strlen (c)); @@ -580,7 +580,7 @@ weekday_picker_get_blocked_days (WeekdayPicker *wp) * Sets the day that defines the start of the week for a weekday picker. **/ void -weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day) +weekday_picker_set_week_start_day (WeekdayPicker *wp, gint week_start_day) { WeekdayPickerPrivate *priv; @@ -603,7 +603,7 @@ weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day) * Return value: Index of the day that defines the start of the week. See * weekday_picker_set_week_start_day() to see how this is represented. **/ -int +gint weekday_picker_get_week_start_day (WeekdayPicker *wp) { WeekdayPickerPrivate *priv; diff --git a/calendar/gui/weekday-picker.h b/calendar/gui/weekday-picker.h index bd78201bd3..f92eb3764e 100644 --- a/calendar/gui/weekday-picker.h +++ b/calendar/gui/weekday-picker.h @@ -64,8 +64,8 @@ guint8 weekday_picker_get_days (WeekdayPicker *wp); void weekday_picker_set_blocked_days (WeekdayPicker *wp, guint8 blocked_day_mask); guint weekday_picker_get_blocked_days (WeekdayPicker *wp); -void weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day); -int weekday_picker_get_week_start_day (WeekdayPicker *wp); +void weekday_picker_set_week_start_day (WeekdayPicker *wp, gint week_start_day); +gint weekday_picker_get_week_start_day (WeekdayPicker *wp); diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c index a4e0fa7048..caa7a8a87c 100644 --- a/calendar/importers/icalendar-importer.c +++ b/calendar/importers/icalendar-importer.c @@ -65,13 +65,13 @@ typedef struct { guint cancelled:1; } ICalIntelligentImporter; -static const int import_type_map[] = { +static const gint import_type_map[] = { E_CAL_SOURCE_TYPE_EVENT, E_CAL_SOURCE_TYPE_TODO, -1 }; -static const char *import_type_strings[] = { +static const gchar *import_type_strings[] = { N_("Appointments and Meetings"), N_("Tasks"), NULL @@ -184,7 +184,7 @@ struct _selector_data { EImportTarget *target; GtkWidget *selector; GtkWidget *notebook; - int page; + gint page; }; static void @@ -210,7 +210,7 @@ ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im) { GtkWidget *vbox, *hbox, *first = NULL; GSList *group = NULL; - int i; + gint i; GtkWidget *nb; vbox = gtk_vbox_new (FALSE, FALSE); @@ -276,7 +276,7 @@ ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im) } static gboolean -ivcal_import_items(void *d) +ivcal_import_items(gpointer d) { ICalImporter *ici = d; @@ -359,8 +359,8 @@ ivcal_cancel(EImport *ei, EImportTarget *target, EImportImporter *im) static gboolean ical_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { - char *filename; - char *contents; + gchar *filename; + gchar *contents; gboolean ret = FALSE; EImportTargetURI *s; @@ -400,8 +400,8 @@ ical_supported(EImport *ei, EImportTarget *target, EImportImporter *im) static void ical_import(EImport *ei, EImportTarget *target, EImportImporter *im) { - char *filename; - char *contents; + gchar *filename; + gchar *contents; icalcomponent *icalcomp; EImportTargetURI *s = (EImportTargetURI *)target; @@ -453,8 +453,8 @@ ical_importer_peek(void) static gboolean vcal_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { - char *filename; - char *contents; + gchar *filename; + gchar *contents; gboolean ret = FALSE; EImportTargetURI *s; @@ -514,12 +514,12 @@ vcal_supported(EImport *ei, EImportTarget *target, EImportImporter *im) /* This tries to load in a vCalendar file and convert it to an icalcomponent. It returns NULL on failure. */ static icalcomponent* -load_vcalendar_file (const char *filename) +load_vcalendar_file (const gchar *filename) { icalvcal_defaults defaults = { NULL }; icalcomponent *icalcomp = NULL; - char *contents; - char *default_alarm_filename; + gchar *contents; + gchar *default_alarm_filename; default_alarm_filename = g_build_filename (EVOLUTION_SOUNDDIR, "default_alarm.wav", @@ -527,8 +527,8 @@ load_vcalendar_file (const char *filename) defaults.alarm_audio_url = g_filename_to_uri (default_alarm_filename, NULL, NULL); g_free (default_alarm_filename); - defaults.alarm_audio_fmttype = (char *) "audio/x-wav"; - defaults.alarm_description = (char *) _("Reminder!"); + defaults.alarm_audio_fmttype = (gchar *) "audio/x-wav"; + defaults.alarm_description = (gchar *) _("Reminder!"); if (g_file_get_contents (filename, &contents, NULL, NULL)) { VObject *vcal; @@ -550,7 +550,7 @@ load_vcalendar_file (const char *filename) static void vcal_import(EImport *ei, EImportTarget *target, EImportImporter *im) { - char *filename; + gchar *filename; icalcomponent *icalcomp; EImportTargetURI *s = (EImportTargetURI *)target; @@ -591,7 +591,7 @@ vcal_importer_peek(void) static gboolean gnome_calendar_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { - char *filename; + gchar *filename; gboolean res; EImportTargetHome *s = (EImportTargetHome *)target; @@ -609,11 +609,11 @@ static void gnome_calendar_import(EImport *ei, EImportTarget *target, EImportImporter *im) { icalcomponent *icalcomp = NULL; - char *filename; + gchar *filename; GList *vtodos; ECal *calendar_client = NULL, *tasks_client = NULL; - int t; - int do_calendar, do_tasks; + gint t; + gint do_calendar, do_tasks; EImportTargetHome *s = (EImportTargetHome *)target; ICalIntelligentImporter *ici; diff --git a/calendar/importers/main.c b/calendar/importers/main.c index dc91f378f5..cfb4e0c0bd 100644 --- a/calendar/importers/main.c +++ b/calendar/importers/main.c @@ -37,7 +37,7 @@ #define GNOME_CALENDAR_IMPORTER_ID "OAFIID:GNOME_Evolution_Gnome_Calendar_Intelligent_Importer:" BASE_VERSION static BonoboObject * -importer_factory_fn (BonoboGenericFactory *factory, const char *id, void *closure) +importer_factory_fn (BonoboGenericFactory *factory, const gchar *id, gpointer closure) { BonoboObject *object = NULL; diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c index 7b7cb9bcf2..d679bdd263 100644 --- a/composer/e-composer-header.c +++ b/composer/e-composer-header.c @@ -101,7 +101,7 @@ composer_header_constructor (GType type, if (header->priv->addaction) { GtkWidget *box, *tmp; - char *str; + gchar *str; header->action_widget = gtk_button_new (); box = gtk_hbox_new (FALSE, 0); diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 946bff28c1..7f1cb69504 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -235,7 +235,7 @@ best_charset (GByteArray *buf, const gchar *default_charset, CamelTransferEncodi return charset; /* Try to find something that will work */ - if (!(charset = (char *) camel_charset_best ((const gchar *)buf->data, buf->len))) { + if (!(charset = (gchar *) camel_charset_best ((const gchar *)buf->data, buf->len))) { *encoding = CAMEL_TRANSFER_ENCODING_7BIT; return NULL; } @@ -995,7 +995,7 @@ get_file_content (EMsgComposer *composer, camel_object_unref (memstream); g_byte_array_append (buffer, (const guint8 *)"", 1); - content = (char*)buffer->data; + content = (gchar *)buffer->data; g_byte_array_free (buffer, FALSE); return content; @@ -1478,9 +1478,9 @@ struct _drop_data { guint info; guint time; - unsigned int move:1; - unsigned int moved:1; - unsigned int aborted:1; + guint move:1; + guint moved:1; + guint aborted:1; }; static void @@ -2753,7 +2753,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message) } /* Restore the Account preference */ - account_name = (char *) camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account"); + account_name = (gchar *) camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account"); if (account_name) { account_name = g_strdup (account_name); g_strstrip (account_name); @@ -3154,7 +3154,7 @@ handle_mailto (EMsgComposer *composer, const gchar *mailto) if (p[len] != '=') break; - header = (char *) p; + header = (gchar *) p; header[len] = '\0'; p += len + 1; diff --git a/e-util/e-bconf-map.c b/e-util/e-bconf-map.c index 9f97a441db..3e44526071 100644 --- a/e-util/e-bconf-map.c +++ b/e-util/e-bconf-map.c @@ -41,7 +41,7 @@ #define d(x) -static signed char hexnib[256] = { +static gchar hexnib[256] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, @@ -53,25 +53,25 @@ static signed char hexnib[256] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, }; -char * -e_bconf_hex_decode (const char *val) +gchar * +e_bconf_hex_decode (const gchar *val) { - const unsigned char *p = (const unsigned char *) val; - char *o, *res; + const guchar *p = (const guchar *) val; + gchar *o, *res; o = res = g_malloc (strlen (val) / 2 + 1); - for (p = (const unsigned char *)val; (p[0] && p[1]); p += 2) + for (p = (const guchar *)val; (p[0] && p[1]); p += 2) *o++ = (hexnib[p[0]] << 4) | hexnib[p[1]]; *o = 0; return res; } -char * -e_bconf_url_decode (const char *val) +gchar * +e_bconf_url_decode (const gchar *val) { - const unsigned char *p = (const unsigned char *) val; - char *o, *res, c; + const guchar *p = (const guchar *) val; + gchar *o, *res, c; o = res = g_malloc (strlen (val) + 1); while (*p) { @@ -90,22 +90,22 @@ e_bconf_url_decode (const char *val) xmlNodePtr -e_bconf_get_path (xmlDocPtr doc, const char *path) +e_bconf_get_path (xmlDocPtr doc, const gchar *path) { xmlNodePtr root; - char *val; - int found; + gchar *val; + gint found; root = doc->children; - if (strcmp ((char *)root->name, "bonobo-config") != 0) { + if (strcmp ((gchar *)root->name, "bonobo-config") != 0) { g_warning ("not bonobo-config xml file"); return NULL; } root = root->children; while (root) { - if (!strcmp ((char *)root->name, "section")) { - val = (char *)xmlGetProp (root, (const unsigned char *)"path"); + if (!strcmp ((gchar *)root->name, "section")) { + val = (gchar *)xmlGetProp (root, (const guchar *)"path"); found = val && strcmp (val, path) == 0; xmlFree (val); if (found) @@ -118,15 +118,15 @@ e_bconf_get_path (xmlDocPtr doc, const char *path) } xmlNodePtr -e_bconf_get_entry (xmlNodePtr root, const char *name) +e_bconf_get_entry (xmlNodePtr root, const gchar *name) { xmlNodePtr node = root->children; - int found; - char *val; + gint found; + gchar *val; while (node) { - if (!strcmp ((char *)node->name, "entry")) { - val = (char *)xmlGetProp (node, (const unsigned char *)"name"); + if (!strcmp ((gchar *)node->name, "entry")) { + val = (gchar *)xmlGetProp (node, (const guchar *)"name"); found = val && strcmp (val, name) == 0; xmlFree (val); if (found) @@ -138,13 +138,13 @@ e_bconf_get_entry (xmlNodePtr root, const char *name) return node; } -char * -e_bconf_get_value (xmlNodePtr root, const char *name) +gchar * +e_bconf_get_value (xmlNodePtr root, const gchar *name) { xmlNodePtr node = e_bconf_get_entry (root, name); - char *prop, *val = NULL; + gchar *prop, *val = NULL; - if (node && (prop = (char *)xmlGetProp (node, (const unsigned char *)"value"))) { + if (node && (prop = (gchar *)xmlGetProp (node, (const guchar *)"value"))) { val = g_strdup (prop); xmlFree (prop); } @@ -152,10 +152,10 @@ e_bconf_get_value (xmlNodePtr root, const char *name) return val; } -char * -e_bconf_get_bool (xmlNodePtr root, const char *name) +gchar * +e_bconf_get_bool (xmlNodePtr root, const gchar *name) { - char *val, *res; + gchar *val, *res; if ((val = e_bconf_get_value (root, name))) { res = g_strdup (val[0] == '1' ? "true" : "false"); @@ -166,10 +166,10 @@ e_bconf_get_bool (xmlNodePtr root, const char *name) return res; } -char * -e_bconf_get_long (xmlNodePtr root, const char *name) +gchar * +e_bconf_get_long (xmlNodePtr root, const gchar *name) { - char *val, *res; + gchar *val, *res; if ((val = e_bconf_get_value (root, name))) { res = g_strdup (val); @@ -180,10 +180,10 @@ e_bconf_get_long (xmlNodePtr root, const char *name) return res; } -char * -e_bconf_get_string (xmlNodePtr root, const char *name) +gchar * +e_bconf_get_string (xmlNodePtr root, const gchar *name) { - char *val, *res; + gchar *val, *res; if ((val = e_bconf_get_value (root, name))) { res = e_bconf_hex_decode (val); @@ -196,31 +196,31 @@ e_bconf_get_string (xmlNodePtr root, const char *name) /* lookup functions */ -typedef char * (* bconf_lookup_func) (xmlNodePtr root, const char *name, e_bconf_map_t *nap); +typedef gchar * (* bconf_lookup_func) (xmlNodePtr root, const gchar *name, e_bconf_map_t *nap); -static char * -bconf_lookup_bool (xmlNodePtr root, const char *name, e_bconf_map_t *map) +static gchar * +bconf_lookup_bool (xmlNodePtr root, const gchar *name, e_bconf_map_t *map) { return e_bconf_get_bool (root, name); } -static char * -bconf_lookup_long (xmlNodePtr root, const char *name, e_bconf_map_t *map) +static gchar * +bconf_lookup_long (xmlNodePtr root, const gchar *name, e_bconf_map_t *map) { return e_bconf_get_long (root, name); } -static char * -bconf_lookup_string (xmlNodePtr root, const char *name, e_bconf_map_t *map) +static gchar * +bconf_lookup_string (xmlNodePtr root, const gchar *name, e_bconf_map_t *map) { return e_bconf_get_string (root, name); } -static char * -bconf_lookup_enum (xmlNodePtr root, const char *name, e_bconf_map_t *map) +static gchar * +bconf_lookup_enum (xmlNodePtr root, const gchar *name, e_bconf_map_t *map) { - int index = 0, i; - char *val; + gint index = 0, i; + gchar *val; if ((val = e_bconf_get_value (root, name))) { index = atoi (val); @@ -240,11 +240,11 @@ static bconf_lookup_func lookup_table[] = { bconf_lookup_bool, bconf_lookup_long, bconf_lookup_string, bconf_lookup_enum }; -static char * -get_name (const char *in, int index) +static gchar * +get_name (const gchar *in, gint index) { GString *out = g_string_new (""); - char c, *res; + gchar c, *res; while ((c = *in++)) { if (c == '%') { @@ -269,14 +269,14 @@ get_name (const char *in, int index) } static void -build_xml (xmlNodePtr root, e_bconf_map_t *map, int index, xmlNodePtr source) +build_xml (xmlNodePtr root, e_bconf_map_t *map, gint index, xmlNodePtr source) { - char *name, *value; + gchar *name, *value; xmlNodePtr node; while (map->type != E_BCONF_MAP_END) { if ((map->type & E_BCONF_MAP_MASK) == E_BCONF_MAP_CHILD) { - node = xmlNewChild (root, NULL, (unsigned char *)map->to, NULL); + node = xmlNewChild (root, NULL, (guchar *)map->to, NULL); build_xml (node, map->child, index, source); } else { name = get_name (map->from, index); @@ -286,9 +286,9 @@ build_xml (xmlNodePtr root, e_bconf_map_t *map, int index, xmlNodePtr source) if (map->type & E_BCONF_MAP_CONTENT) { if (value && value[0]) - xmlNewTextChild (root, NULL, (unsigned char *)map->to, (unsigned char *)value); + xmlNewTextChild (root, NULL, (guchar *)map->to, (guchar *)value); } else { - xmlSetProp (root, (unsigned char *)map->to, (unsigned char *)value); + xmlSetProp (root, (guchar *)map->to, (guchar *)value); } g_free (value); @@ -299,15 +299,15 @@ build_xml (xmlNodePtr root, e_bconf_map_t *map, int index, xmlNodePtr source) } -int +gint e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map_t *map, - const char *bconf_path, const char *gconf_path, - const char *name, const char *idparam) + const gchar *bconf_path, const gchar *gconf_path, + const gchar *name, const gchar *idparam) { xmlNodePtr source; - int count = 0, i; + gint count = 0, i; GSList *list, *l; - char *val; + gchar *val; source = e_bconf_get_path (config_xmldb, bconf_path); if (source) { @@ -323,18 +323,18 @@ e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map xmlDocPtr doc; xmlNodePtr root; xmlChar *xmlbuf; - int n; + gint n; - doc = xmlNewDoc ((const unsigned char *)"1.0"); - root = xmlNewDocNode (doc, NULL, (unsigned char *)name, NULL); + doc = xmlNewDoc ((const guchar *)"1.0"); + root = xmlNewDocNode (doc, NULL, (guchar *)name, NULL); xmlDocSetRootElement (doc, root); /* This could be set with a MAP_UID type ... */ if (idparam) { - char buf[16]; + gchar buf[16]; sprintf (buf, "%d", i); - xmlSetProp (root, (unsigned char *)idparam, (unsigned char *)buf); + xmlSetProp (root, (guchar *)idparam, (guchar *)buf); } build_xml (root, map, i, source); @@ -361,17 +361,17 @@ e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map } -static int gconf_type[] = { GCONF_VALUE_BOOL, GCONF_VALUE_BOOL, GCONF_VALUE_INT, GCONF_VALUE_STRING, GCONF_VALUE_STRING }; +static gint gconf_type[] = { GCONF_VALUE_BOOL, GCONF_VALUE_BOOL, GCONF_VALUE_INT, GCONF_VALUE_STRING, GCONF_VALUE_STRING }; -int +gint e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *remap_list) { - char *path, *val, *tmp; + gchar *path, *val, *tmp; e_gconf_map_t *map; xmlNodePtr source; GSList *list, *l; - char buf[32]; - int i, j, k; + gchar buf[32]; + gint i, j, k; /* process all flat config */ for (i = 0; remap_list[i].root; i++) { @@ -453,8 +453,8 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t * gconf_client_set_float (gconf, path, strtod (val, NULL), NULL); break; case E_GCONF_MAP_STRLIST: { - char *v = e_bconf_hex_decode (val); - char **t = g_strsplit (v, " !<-->!", 8196); + gchar *v = e_bconf_hex_decode (val); + gchar **t = g_strsplit (v, " !<-->!", 8196); list = NULL; for (k = 0; t[k]; k++) { @@ -473,11 +473,11 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t * /* find the entry node */ while (node) { - if (!strcmp ((char *)node->name, "entry")) { - int found; + if (!strcmp ((gchar *)node->name, "entry")) { + gint found; - if ((tmp = (char *)xmlGetProp (node, (const unsigned char *)"name"))) { - found = strcmp ((char *)tmp, map[j].from) == 0; + if ((tmp = (gchar *)xmlGetProp (node, (const guchar *)"name"))) { + found = strcmp ((gchar *)tmp, map[j].from) == 0; xmlFree (tmp); if (found) break; @@ -491,7 +491,7 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t * if (node) { node = node->children; while (node) { - if (strcmp ((char *)node->name, "any") == 0) + if (strcmp ((gchar *)node->name, "any") == 0) break; node = node->next; } @@ -501,7 +501,7 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t * if (node) { node = node->children; while (node) { - if (strcmp ((char *)node->name, "value") == 0) + if (strcmp ((gchar *)node->name, "value") == 0) break; node = node->next; } @@ -510,7 +510,7 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t * if (node) { node = node->children; while (node) { - if (strcmp ((char *)node->name, "value") == 0) + if (strcmp ((gchar *)node->name, "value") == 0) list = g_slist_append (list, xmlNodeGetContent (node)); node = node->next; } diff --git a/e-util/e-bconf-map.h b/e-util/e-bconf-map.h index 8c6ea6deec..57ba17e169 100644 --- a/e-util/e-bconf-map.h +++ b/e-util/e-bconf-map.h @@ -52,20 +52,20 @@ typedef struct _e_bconf_map { } e_bconf_map_t; -char *e_bconf_hex_decode (const char *val); -char *e_bconf_url_decode (const char *val); +gchar *e_bconf_hex_decode (const gchar *val); +gchar *e_bconf_url_decode (const gchar *val); -xmlNodePtr e_bconf_get_path (xmlDocPtr doc, const char *path); -xmlNodePtr e_bconf_get_entry (xmlNodePtr root, const char *name); +xmlNodePtr e_bconf_get_path (xmlDocPtr doc, const gchar *path); +xmlNodePtr e_bconf_get_entry (xmlNodePtr root, const gchar *name); -char *e_bconf_get_value (xmlNodePtr root, const char *name); -char *e_bconf_get_bool (xmlNodePtr root, const char *name); -char *e_bconf_get_long (xmlNodePtr root, const char *name); -char *e_bconf_get_string (xmlNodePtr root, const char *name); +gchar *e_bconf_get_value (xmlNodePtr root, const gchar *name); +gchar *e_bconf_get_bool (xmlNodePtr root, const gchar *name); +gchar *e_bconf_get_long (xmlNodePtr root, const gchar *name); +gchar *e_bconf_get_string (xmlNodePtr root, const gchar *name); -int e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map_t *map, - const char *bconf_path, const char *gconf_path, - const char *name, const char *idparam); +gint e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map_t *map, + const gchar *bconf_path, const gchar *gconf_path, + const gchar *name, const gchar *idparam); enum { @@ -93,7 +93,7 @@ typedef struct { e_gconf_map_t *map; } e_gconf_map_list_t; -int e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *remap_list); +gint e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *remap_list); #ifdef __cplusplus } diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c index e2cf15af43..551ffe2143 100644 --- a/e-util/e-bit-array.c +++ b/e-util/e-bit-array.c @@ -39,10 +39,10 @@ G_DEFINE_TYPE (EBitArray, e_bit_array, G_TYPE_OBJECT) static void -e_bit_array_insert_real(EBitArray *eba, int row) +e_bit_array_insert_real(EBitArray *eba, gint row) { - int box; - int i; + gint box; + gint i; if(eba->bit_count >= 0) { /* Add another word if needed. */ if ((eba->bit_count & 0x1f) == 0) { @@ -64,12 +64,12 @@ e_bit_array_insert_real(EBitArray *eba, int row) } static void -e_bit_array_delete_real(EBitArray *eba, int row, gboolean move_selection_mode) +e_bit_array_delete_real(EBitArray *eba, gint row, gboolean move_selection_mode) { - int box; - int i; - int last; - int selected = FALSE; + gint box; + gint i; + gint last; + gint selected = FALSE; if(eba->bit_count >= 0) { guint32 bitmask; box = row >> 5; @@ -105,34 +105,34 @@ e_bit_array_delete_real(EBitArray *eba, int row, gboolean move_selection_mode) /* FIXME : Improve efficiency here. */ void -e_bit_array_delete(EBitArray *eba, int row, int count) +e_bit_array_delete(EBitArray *eba, gint row, gint count) { - int i; + gint i; for (i = 0; i < count; i++) e_bit_array_delete_real(eba, row, FALSE); } /* FIXME : Improve efficiency here. */ void -e_bit_array_delete_single_mode(EBitArray *eba, int row, int count) +e_bit_array_delete_single_mode(EBitArray *eba, gint row, gint count) { - int i; + gint i; for (i = 0; i < count; i++) e_bit_array_delete_real(eba, row, TRUE); } /* FIXME : Improve efficiency here. */ void -e_bit_array_insert(EBitArray *eba, int row, int count) +e_bit_array_insert(EBitArray *eba, gint row, gint count) { - int i; + gint i; for (i = 0; i < count; i++) e_bit_array_insert_real(eba, row); } /* FIXME: Implement this more efficiently. */ void -e_bit_array_move_row(EBitArray *eba, int old_row, int new_row) +e_bit_array_move_row(EBitArray *eba, gint old_row, gint new_row) { e_bit_array_delete_real(eba, old_row, FALSE); e_bit_array_insert_real(eba, new_row); @@ -186,11 +186,11 @@ e_bit_array_foreach (EBitArray *eba, EForeachFunc callback, gpointer closure) { - int i; - int last = (eba->bit_count + 31) / 32; + gint i; + gint last = (eba->bit_count + 31) / 32; for (i = 0; i < last; i++) { if (eba->data[i]) { - int j; + gint j; guint32 value = eba->data[i]; for (j = 0; j < 32; j++) { if (value & 0x80000000) { @@ -231,8 +231,8 @@ gint e_bit_array_selected_count (EBitArray *eba) { gint count; - int i; - int last; + gint i; + gint last; if (!eba->data) return 0; @@ -242,7 +242,7 @@ e_bit_array_selected_count (EBitArray *eba) last = BOX(eba->bit_count - 1); for (i = 0; i <= last; i++) { - int j; + gint j; guint32 thiscount = 0; for (j = 0; j < 8; j++) thiscount += PART(eba->data[i], j); @@ -263,7 +263,7 @@ e_bit_array_selected_count (EBitArray *eba) void e_bit_array_select_all (EBitArray *eba) { - int i; + gint i; if (!eba->data) eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32); @@ -275,8 +275,8 @@ e_bit_array_select_all (EBitArray *eba) /* need to zero out the bits corresponding to the rows not selected in the last full 32 bit mask */ if (eba->bit_count % 32) { - int unselected_mask = 0; - int num_unselected_in_last_byte = 32 - eba->bit_count % 32; + gint unselected_mask = 0; + gint num_unselected_in_last_byte = 32 - eba->bit_count % 32; for (i = 0; i < num_unselected_in_last_byte; i ++) unselected_mask |= 1 << i; @@ -295,7 +295,7 @@ e_bit_array_select_all (EBitArray *eba) void e_bit_array_invert_selection (EBitArray *eba) { - int i; + gint i; if (!eba->data) eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32); @@ -305,7 +305,7 @@ e_bit_array_invert_selection (EBitArray *eba) } } -int +gint e_bit_array_bit_count (EBitArray *eba) { return eba->bit_count; @@ -314,7 +314,7 @@ e_bit_array_bit_count (EBitArray *eba) gboolean e_bit_array_cross_and (EBitArray *eba) { - int i; + gint i; for (i = 0; i < eba->bit_count / 32; i++) { if (eba->data[i] != ONES) return FALSE; @@ -327,7 +327,7 @@ e_bit_array_cross_and (EBitArray *eba) gboolean e_bit_array_cross_or (EBitArray *eba) { - int i; + gint i; for (i = 0; i < eba->bit_count / 32; i++) { if (eba->data[i] != 0) return TRUE; @@ -340,18 +340,18 @@ e_bit_array_cross_or (EBitArray *eba) #define OPERATE(object, i,mask,grow) ((grow) ? (((object)->data[(i)]) |= ((guint32) ~(mask))) : (((object)->data[(i)]) &= (mask))) void -e_bit_array_change_one_row(EBitArray *eba, int row, gboolean grow) +e_bit_array_change_one_row(EBitArray *eba, gint row, gboolean grow) { - int i; + gint i; i = BOX(row); OPERATE(eba, i, ~BITMASK(row), grow); } void -e_bit_array_change_range(EBitArray *eba, int start, int end, gboolean grow) +e_bit_array_change_range(EBitArray *eba, gint start, gint end, gboolean grow) { - int i, last; + gint i, last; if (start != end) { i = BOX(start); last = BOX(end); @@ -372,9 +372,9 @@ e_bit_array_change_range(EBitArray *eba, int start, int end, gboolean grow) } void -e_bit_array_select_single_row (EBitArray *eba, int row) +e_bit_array_select_single_row (EBitArray *eba, gint row) { - int i; + gint i; for (i = 0; i < ((eba->bit_count + 31) / 32); i++) { if (!((i == BOX(row) && eba->data[i] == BITMASK(row)) || (i != BOX(row) && eba->data[i] == 0))) { @@ -388,7 +388,7 @@ e_bit_array_select_single_row (EBitArray *eba, int row) } void -e_bit_array_toggle_single_row (EBitArray *eba, int row) +e_bit_array_toggle_single_row (EBitArray *eba, gint row) { if (eba->data[BOX(row)] & BITMASK(row)) eba->data[BOX(row)] &= ~BITMASK(row); @@ -415,7 +415,7 @@ e_bit_array_class_init (EBitArrayClass *klass) } EBitArray * -e_bit_array_new (int count) +e_bit_array_new (gint count) { EBitArray *eba = g_object_new (E_BIT_ARRAY_TYPE, NULL); eba->bit_count = count; diff --git a/e-util/e-bit-array.h b/e-util/e-bit-array.h index 34c8016094..a9bf113d5f 100644 --- a/e-util/e-bit-array.h +++ b/e-util/e-bit-array.h @@ -38,7 +38,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 @@ -55,7 +55,7 @@ typedef struct { GType e_bit_array_get_type (void); -EBitArray *e_bit_array_new (int count); +EBitArray *e_bit_array_new (gint count); gboolean e_bit_array_value_at (EBitArray *selection, gint n); @@ -68,29 +68,29 @@ void e_bit_array_select_all (EBitArray *selection); void e_bit_array_invert_selection (EBitArray *selection); gint e_bit_array_bit_count (EBitArray *selection); void e_bit_array_change_one_row (EBitArray *selection, - int row, + gint row, gboolean grow); void e_bit_array_change_range (EBitArray *selection, - int start, - int end, + gint start, + gint end, gboolean grow); void e_bit_array_select_single_row (EBitArray *eba, - int row); + gint row); void e_bit_array_toggle_single_row (EBitArray *eba, - int row); + gint row); void e_bit_array_insert (EBitArray *esm, - int row, - int count); + gint row, + gint count); void e_bit_array_delete (EBitArray *esm, - int row, - int count); + gint row, + gint count); void e_bit_array_delete_single_mode (EBitArray *esm, - int row, - int count); + gint row, + gint count); void e_bit_array_move_row (EBitArray *esm, - int old_row, - int new_row); + gint old_row, + gint new_row); gboolean e_bit_array_cross_and (EBitArray *esm); gboolean e_bit_array_cross_or (EBitArray *esm); diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c index c01b98cde4..14c8eae189 100644 --- a/e-util/e-categories-config.c +++ b/e-util/e-categories-config.c @@ -37,15 +37,15 @@ * given category. */ gboolean -e_categories_config_get_icon_for (const char *category, GdkPixmap **pixmap, GdkBitmap **mask) +e_categories_config_get_icon_for (const gchar *category, GdkPixmap **pixmap, GdkBitmap **mask) { - char *icon_file; + gchar *icon_file; GdkPixbuf *pixbuf; GdkBitmap *tmp_mask; g_return_val_if_fail (pixmap != NULL, FALSE); - icon_file = (char *) e_categories_get_icon_file_for (category); + icon_file = (gchar *) e_categories_get_icon_file_for (category); if (!icon_file) { *pixmap = NULL; if (mask != NULL) @@ -87,8 +87,8 @@ void e_categories_config_open_dialog_for_entry (GtkEntry *entry) { GtkDialog *dialog; - const char *text; - int result; + const gchar *text; + gint result; g_return_if_fail (entry != NULL); g_return_if_fail (GTK_IS_ENTRY (entry)); diff --git a/e-util/e-categories-config.h b/e-util/e-categories-config.h index bbd76f2a02..81ae0161a0 100644 --- a/e-util/e-categories-config.h +++ b/e-util/e-categories-config.h @@ -30,7 +30,7 @@ G_BEGIN_DECLS -gboolean e_categories_config_get_icon_for (const char *category, +gboolean e_categories_config_get_icon_for (const gchar *category, GdkPixmap **icon, GdkBitmap **mask); void e_categories_config_open_dialog_for_entry (GtkEntry *entry); diff --git a/e-util/e-config-listener.c b/e-util/e-config-listener.c index 7c1c6eb091..97360a7552 100644 --- a/e-util/e-config-listener.c +++ b/e-util/e-config-listener.c @@ -31,13 +31,13 @@ typedef struct { EConfigListener *cl; guint lid; - char *key; + gchar *key; GConfValueType type; union { gboolean v_bool; float v_float; long v_long; - char *v_str; + gchar *v_str; } value; gboolean used_default; } KeyData; @@ -215,7 +215,7 @@ property_change_cb (GConfEngine *engine, } static KeyData * -add_key (EConfigListener *cl, const char *key, GConfValueType type, +add_key (EConfigListener *cl, const gchar *key, GConfValueType type, gpointer value, gboolean used_default) { KeyData *kd; @@ -236,7 +236,7 @@ add_key (EConfigListener *cl, const char *key, GConfValueType type, memcpy (&kd->value.v_long, value, sizeof (long)); break; case GCONF_VALUE_STRING : - kd->value.v_str = g_strdup ((const char *) value); + kd->value.v_str = g_strdup ((const gchar *) value); break; default : break; @@ -256,14 +256,14 @@ add_key (EConfigListener *cl, const char *key, GConfValueType type, } gboolean -e_config_listener_get_boolean (EConfigListener *cl, const char *key) +e_config_listener_get_boolean (EConfigListener *cl, const gchar *key) { return e_config_listener_get_boolean_with_default (cl, key, FALSE, NULL); } gboolean e_config_listener_get_boolean_with_default (EConfigListener *cl, - const char *key, + const gchar *key, gboolean def, gboolean *used_default) { @@ -306,14 +306,14 @@ e_config_listener_get_boolean_with_default (EConfigListener *cl, } float -e_config_listener_get_float (EConfigListener *cl, const char *key) +e_config_listener_get_float (EConfigListener *cl, const gchar *key) { return e_config_listener_get_float_with_default (cl, key, 0.0, NULL); } float e_config_listener_get_float_with_default (EConfigListener *cl, - const char *key, + const gchar *key, float def, gboolean *used_default) { @@ -356,14 +356,14 @@ e_config_listener_get_float_with_default (EConfigListener *cl, } long -e_config_listener_get_long (EConfigListener *cl, const char *key) +e_config_listener_get_long (EConfigListener *cl, const gchar *key) { return e_config_listener_get_long_with_default (cl, key, 0, NULL); } long e_config_listener_get_long_with_default (EConfigListener *cl, - const char *key, + const gchar *key, long def, gboolean *used_default) { @@ -405,20 +405,20 @@ e_config_listener_get_long_with_default (EConfigListener *cl, return value; } -char * -e_config_listener_get_string (EConfigListener *cl, const char *key) +gchar * +e_config_listener_get_string (EConfigListener *cl, const gchar *key) { return e_config_listener_get_string_with_default (cl, key, NULL, NULL); } -char * +gchar * e_config_listener_get_string_with_default (EConfigListener *cl, - const char *key, - const char *def, + const gchar *key, + const gchar *def, gboolean *used_default) { GConfValue *conf_value; - char *str; + gchar *str; KeyData *kd; g_return_val_if_fail (E_IS_CONFIG_LISTENER (cl), NULL); @@ -456,7 +456,7 @@ e_config_listener_get_string_with_default (EConfigListener *cl, } void -e_config_listener_set_boolean (EConfigListener *cl, const char *key, gboolean value) +e_config_listener_set_boolean (EConfigListener *cl, const gchar *key, gboolean value) { KeyData *kd; GError *err = NULL; @@ -481,7 +481,7 @@ e_config_listener_set_boolean (EConfigListener *cl, const char *key, gboolean va } void -e_config_listener_set_float (EConfigListener *cl, const char *key, float value) +e_config_listener_set_float (EConfigListener *cl, const gchar *key, float value) { KeyData *kd; GError *err = NULL; @@ -506,7 +506,7 @@ e_config_listener_set_float (EConfigListener *cl, const char *key, float value) } void -e_config_listener_set_long (EConfigListener *cl, const char *key, long value) +e_config_listener_set_long (EConfigListener *cl, const gchar *key, long value) { KeyData *kd; GError *err = NULL; @@ -531,9 +531,9 @@ e_config_listener_set_long (EConfigListener *cl, const char *key, long value) } void -e_config_listener_set_string (EConfigListener *cl, const char *key, const char *value) +e_config_listener_set_string (EConfigListener *cl, const gchar *key, const gchar *value) { - char *s1, *s2; + gchar *s1, *s2; KeyData *kd; GError *err = NULL; @@ -541,7 +541,7 @@ e_config_listener_set_string (EConfigListener *cl, const char *key, const char * g_return_if_fail (key != NULL); /* check that the value is not the same */ - s1 = (char *) value; + s1 = (gchar *) value; s2 = e_config_listener_get_string_with_default (cl, key, NULL, NULL); if (!strcmp (s1 ? s1 : "", s2 ? s2 : "")) { g_free (s2); @@ -565,7 +565,7 @@ e_config_listener_set_string (EConfigListener *cl, const char *key, const char * } void -e_config_listener_remove_value (EConfigListener *cl, const char *key) +e_config_listener_remove_value (EConfigListener *cl, const gchar *key) { g_return_if_fail (E_IS_CONFIG_LISTENER (cl)); g_return_if_fail (key != NULL); @@ -575,7 +575,7 @@ e_config_listener_remove_value (EConfigListener *cl, const char *key) } void -e_config_listener_remove_dir (EConfigListener *cl, const char *dir) +e_config_listener_remove_dir (EConfigListener *cl, const gchar *dir) { GSList *slist, *iter; const gchar *key; diff --git a/e-util/e-config-listener.h b/e-util/e-config-listener.h index 4449d8f22c..47eb9c2e80 100644 --- a/e-util/e-config-listener.h +++ b/e-util/e-config-listener.h @@ -45,49 +45,49 @@ typedef struct { typedef struct { GObjectClass parent_class; - void (* key_changed) (EConfigListener *cl, const char *key); + void (* key_changed) (EConfigListener *cl, const gchar *key); } EConfigListenerClass; GType e_config_listener_get_type (void); EConfigListener *e_config_listener_new (void); -gboolean e_config_listener_get_boolean (EConfigListener *cl, const char *key); +gboolean e_config_listener_get_boolean (EConfigListener *cl, const gchar *key); gboolean e_config_listener_get_boolean_with_default (EConfigListener *cl, - const char *key, + const gchar *key, gboolean def, gboolean *used_default); -float e_config_listener_get_float (EConfigListener *cl, const char *key); +float e_config_listener_get_float (EConfigListener *cl, const gchar *key); float e_config_listener_get_float_with_default (EConfigListener *cl, - const char *key, + const gchar *key, float def, gboolean *used_default); -long e_config_listener_get_long (EConfigListener *cl, const char *key); +long e_config_listener_get_long (EConfigListener *cl, const gchar *key); long e_config_listener_get_long_with_default (EConfigListener *cl, - const char *key, + const gchar *key, long def, gboolean *used_default); -char *e_config_listener_get_string (EConfigListener *cl, const char *key); -char *e_config_listener_get_string_with_default (EConfigListener *cl, - const char *key, - const char *def, +gchar *e_config_listener_get_string (EConfigListener *cl, const gchar *key); +gchar *e_config_listener_get_string_with_default (EConfigListener *cl, + const gchar *key, + const gchar *def, gboolean *used_default); void e_config_listener_set_boolean (EConfigListener *cl, - const char *key, + const gchar *key, gboolean value); void e_config_listener_set_float (EConfigListener *cl, - const char *key, + const gchar *key, float value); void e_config_listener_set_long (EConfigListener *cl, - const char *key, + const gchar *key, long value); void e_config_listener_set_string (EConfigListener *cl, - const char *key, - const char *value); + const gchar *key, + const gchar *value); void e_config_listener_remove_value (EConfigListener *cl, - const char *key); + const gchar *key); void e_config_listener_remove_dir (EConfigListener *cl, - const char *dir); + const gchar *dir); G_END_DECLS diff --git a/e-util/e-config.c b/e-util/e-config.c index 5d0a7090f7..36f42451ae 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -43,9 +43,9 @@ struct _EConfigFactory { struct _EConfigFactory *next, *prev; - char *id; + gchar *id; EConfigFactoryFunc factory; - void *factory_data; + gpointer factory_data; }; struct _menu_node { @@ -55,7 +55,7 @@ struct _menu_node { EConfigItemsFunc free; EConfigItemsFunc abort; EConfigItemsFunc commit; - void *data; + gpointer data; }; struct _widget_node { @@ -74,9 +74,9 @@ struct _widget_node { struct _check_node { struct _check_node *next, *prev; - char *pageid; + gchar *pageid; EConfigCheckFunc check; - void *data; + gpointer data; }; struct _EConfigPrivate { @@ -211,7 +211,7 @@ e_config_get_type(void) * * Return value: @ep is returned. **/ -EConfig *e_config_construct(EConfig *ep, int type, const char *id) +EConfig *e_config_construct(EConfig *ep, gint type, const gchar *id) { g_return_val_if_fail (type == E_CONFIG_BOOK || type == E_CONFIG_DRUID, NULL); @@ -240,7 +240,7 @@ EConfig *e_config_construct(EConfig *ep, int type, const char *id) * TODO: perhaps commit and abort should just be signals. **/ void -e_config_add_items(EConfig *ec, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, void *data) +e_config_add_items(EConfig *ec, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, gpointer data) { struct _menu_node *node; @@ -272,7 +272,7 @@ e_config_add_items(EConfig *ec, GSList *items, EConfigItemsFunc commitfunc, ECon * the druid to continue or the notebook to close. **/ void -e_config_add_page_check(EConfig *ec, const char *pageid, EConfigCheckFunc check, void *data) +e_config_add_page_check(EConfig *ec, const gchar *pageid, EConfigCheckFunc check, gpointer data) { struct _check_node *cn; @@ -301,10 +301,10 @@ ec_add_static_items(EConfig *ec) } static int -ep_cmp(const void *ap, const void *bp) +ep_cmp(gconstpointer ap, gconstpointer bp) { - struct _widget_node *a = *((void **)ap); - struct _widget_node *b = *((void **)bp); + struct _widget_node *a = *((gpointer *)ap); + struct _widget_node *b = *((gpointer *)bp); return strcmp(a->item->path, b->item->path); } @@ -412,7 +412,7 @@ ec_rebuild(EConfig *emp) struct _EConfigPrivate *p = emp->priv; struct _widget_node *wn, *sectionnode = NULL, *pagenode = NULL; GtkWidget *book = NULL, *page = NULL, *section = NULL, *root = NULL, *druid = NULL; - int pageno = 0, sectionno = 0, itemno = 0; + gint pageno = 0, sectionno = 0, itemno = 0; d(printf("target changed, rebuilding:\n")); @@ -550,7 +550,7 @@ ec_rebuild(EConfig *emp) sectionno = 1; /* never want to hide these */ break; case E_CONFIG_PAGE: { - int connect = 0; /* connect druid signals */ + gint connect = 0; /* connect druid signals */ /* CONFIG_PAGEs depend on the config type. E_CONFIG_BOOK: @@ -662,7 +662,7 @@ ec_rebuild(EConfig *emp) } if (translated_label != NULL) { - char *txt = g_strdup_printf("<span weight=\"bold\">%s</span>", translated_label); + gchar *txt = g_strdup_printf("<span weight=\"bold\">%s</span>", translated_label); label = g_object_new(gtk_label_get_type(), "label", txt, @@ -824,7 +824,7 @@ e_config_create_widget(EConfig *emp) GPtrArray *items = g_ptr_array_new(); GSList *l; /*char *domain = NULL;*/ - int i; + gint i; g_return_val_if_fail (emp->target != NULL, NULL); @@ -864,7 +864,7 @@ e_config_create_widget(EConfig *emp) } static void -ec_dialog_response(GtkWidget *d, int id, EConfig *ec) +ec_dialog_response(GtkWidget *d, gint id, EConfig *ec) { if (id == GTK_RESPONSE_OK) e_config_commit(ec); @@ -892,7 +892,7 @@ ec_dialog_response(GtkWidget *d, int id, EConfig *ec) * Return value: The window widget. This is also stored in @emp.window. **/ GtkWidget * -e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const char *title) +e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const gchar *title) { GtkWidget *w; @@ -1037,7 +1037,7 @@ void e_config_commit(EConfig *ec) * * Return value: FALSE if the data is inconsistent/incomplete. **/ -gboolean e_config_page_check(EConfig *ec, const char *pageid) +gboolean e_config_page_check(EConfig *ec, const gchar *pageid) { struct _EConfigPrivate *p = ec->priv; struct _check_node *mnode; @@ -1062,7 +1062,7 @@ gboolean e_config_page_check(EConfig *ec, const char *pageid) * Return value: The page widget. It will be the root GtkNotebook * container or the GnomeDruidPage object. **/ -GtkWidget *e_config_page_get(EConfig *ec, const char *pageid) +GtkWidget *e_config_page_get(EConfig *ec, const gchar *pageid) { struct _widget_node *wn; @@ -1088,10 +1088,10 @@ GtkWidget *e_config_page_get(EConfig *ec, const char *pageid) * Return value: The path of the next page, or @NULL if @pageid was the * last configured and visible page. **/ -const char *e_config_page_next(EConfig *ec, const char *pageid) +const gchar *e_config_page_next(EConfig *ec, const gchar *pageid) { struct _widget_node *wn; - int found; + gint found; found = pageid == NULL ? 1:0; for (wn = (struct _widget_node *)ec->priv->widgets.head;wn->next;wn=wn->next) @@ -1119,10 +1119,10 @@ const char *e_config_page_next(EConfig *ec, const char *pageid) * Return value: The path of the previous page, or @NULL if @pageid was the * first configured and visible page. **/ -const char *e_config_page_prev(EConfig *ec, const char *pageid) +const gchar *e_config_page_prev(EConfig *ec, const gchar *pageid) { struct _widget_node *wn; - int found; + gint found; found = pageid == NULL ? 1:0; for (wn = (struct _widget_node *)ec->priv->widgets.tailpred;wn->prev;wn=wn->prev) @@ -1158,7 +1158,7 @@ const char *e_config_page_prev(EConfig *ec, const char *pageid) * Return value: A handle to the factory. **/ EConfigFactory * -e_config_class_add_factory(EConfigClass *klass, const char *id, EConfigFactoryFunc func, void *data) +e_config_class_add_factory(EConfigClass *klass, const gchar *id, EConfigFactoryFunc func, gpointer data) { struct _EConfigFactory *f = g_malloc0(sizeof(*f)); @@ -1193,7 +1193,7 @@ e_config_class_remove_factory(EConfigClass *klass, EConfigFactory *f) * Allocate a new config target suitable for this class. Implementing * classes will define the actual content of the target. **/ -void *e_config_target_new(EConfig *ep, int type, size_t size) +gpointer e_config_target_new(EConfig *ep, gint type, size_t size) { EConfigTarget *t; @@ -1219,7 +1219,7 @@ void *e_config_target_new(EConfig *ep, int type, size_t size) * free custom targets. **/ void -e_config_target_free(EConfig *ep, void *o) +e_config_target_free(EConfig *ep, gpointer o) { EConfigTarget *t = o; @@ -1253,7 +1253,7 @@ e_config_target_free(EConfig *ep, void *o) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EConfigHook *)eph) static const EPluginHookTargetKey ech_item_types[] = { @@ -1271,7 +1271,7 @@ static const EPluginHookTargetKey ech_item_types[] = { }; static void -ech_commit(EConfig *ec, GSList *items, void *data) +ech_commit(EConfig *ec, GSList *items, gpointer data) { struct _EConfigHookGroup *group = data; @@ -1280,7 +1280,7 @@ ech_commit(EConfig *ec, GSList *items, void *data) } static void -ech_abort(EConfig *ec, GSList *items, void *data) +ech_abort(EConfig *ec, GSList *items, gpointer data) { struct _EConfigHookGroup *group = data; @@ -1289,7 +1289,7 @@ ech_abort(EConfig *ec, GSList *items, void *data) } static gboolean -ech_check(EConfig *ec, const char *pageid, void *data) +ech_check(EConfig *ec, const gchar *pageid, gpointer data) { struct _EConfigHookGroup *group = data; EConfigHookPageCheckData hdata; @@ -1305,7 +1305,7 @@ ech_check(EConfig *ec, const char *pageid, void *data) } static void -ech_config_factory(EConfig *emp, void *data) +ech_config_factory(EConfig *emp, gpointer data) { struct _EConfigHookGroup *group = data; @@ -1342,7 +1342,7 @@ emph_free_group(struct _EConfigHookGroup *group) } static struct _GtkWidget * -ech_config_widget_factory(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, void *data) +ech_config_widget_factory(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { struct _EConfigHookGroup *group = data; @@ -1355,7 +1355,7 @@ ech_config_widget_factory(EConfig *ec, EConfigItem *item, GtkWidget *parent, Gtk hdata.parent = parent; hdata.old = old; - return (struct _GtkWidget *)e_plugin_invoke(group->hook->hook.plugin, (char *)item->user_data, &hdata); + return (struct _GtkWidget *)e_plugin_invoke(group->hook->hook.plugin, (gchar *)item->user_data, &hdata); } else return NULL; } @@ -1380,7 +1380,7 @@ emph_construct_item(EPluginHook *eph, EConfigHookGroup *menu, xmlNodePtr root, E if (item->user_data) item->factory = ech_config_widget_factory; - d(printf(" path=%s label=%s factory=%s\n", item->path, item->label, (char *)item->user_data)); + d(printf(" path=%s label=%s factory=%s\n", item->path, item->label, (gchar *)item->user_data)); return item; error: @@ -1396,12 +1396,12 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) xmlNodePtr node; EConfigHookTargetMap *map; EConfigHookClass *klass = (EConfigHookClass *)G_OBJECT_GET_CLASS(eph); - char *tmp; + gchar *tmp; d(printf(" loading menu\n")); menu = g_malloc0(sizeof(*menu)); - tmp = (char *)xmlGetProp(root, (const unsigned char *)"target"); + tmp = (gchar *)xmlGetProp(root, (const guchar *)"target"); if (tmp == NULL) goto error; map = g_hash_table_lookup(klass->target_map, tmp); @@ -1422,7 +1422,7 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) menu->hook = (EConfigHook *)eph; node = root->children; while (node) { - if (0 == strcmp((char *)node->name, "item")) { + if (0 == strcmp((gchar *)node->name, "item")) { struct _EConfigItem *item; item = emph_construct_item(eph, menu, node, map); @@ -1453,7 +1453,7 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "group") == 0) { + if (strcmp((gchar *)node->name, "group") == 0) { struct _EConfigHookGroup *group; group = emph_construct_menu(eph, node); @@ -1534,5 +1534,5 @@ e_config_hook_get_type(void) **/ void e_config_hook_class_add_target_map(EConfigHookClass *klass, const EConfigHookTargetMap *map) { - g_hash_table_insert(klass->target_map, (void *)map->type, (void *)map); + g_hash_table_insert(klass->target_map, (gpointer)map->type, (gpointer)map); } diff --git a/e-util/e-config.h b/e-util/e-config.h index b128005c64..afb897477f 100644 --- a/e-util/e-config.h +++ b/e-util/e-config.h @@ -44,13 +44,13 @@ typedef struct _EConfigItem EConfigItem; typedef struct _EConfigFactory EConfigFactory; typedef struct _EConfigTarget EConfigTarget; -typedef void (*EConfigFactoryFunc)(EConfig *ec, void *data); +typedef void (*EConfigFactoryFunc)(EConfig *ec, gpointer data); -typedef gboolean (*EConfigCheckFunc)(EConfig *ec, const char *pageid, void *data); +typedef gboolean (*EConfigCheckFunc)(EConfig *ec, const gchar *pageid, gpointer data); -typedef void (*EConfigItemsFunc)(EConfig *ec, GSList *items, void *data); +typedef void (*EConfigItemsFunc)(EConfig *ec, GSList *items, gpointer data); -typedef struct _GtkWidget * (*EConfigItemFactoryFunc)(EConfig *ec, EConfigItem *, struct _GtkWidget *parent, struct _GtkWidget *old, void *data); +typedef struct _GtkWidget * (*EConfigItemFactoryFunc)(EConfig *ec, EConfigItem *, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data); /* ok so this is all a bit bogussy we need to map to glade stuff instead */ @@ -144,10 +144,10 @@ enum _e_config_t { **/ struct _EConfigItem { enum _e_config_t type; - char *path; /* absolute path, must sort ascii-lexographically into the right spot */ - char *label; + gchar *path; /* absolute path, must sort ascii-lexographically into the right spot */ + gchar *label; EConfigItemFactoryFunc factory; - void *user_data; + gpointer user_data; }; /** @@ -194,9 +194,9 @@ struct _EConfig { struct _EConfigPrivate *priv; - int type; /* E_CONFIG_BOOK or E_CONFIG_DRUID */ + gint type; /* E_CONFIG_BOOK or E_CONFIG_DRUID */ - char *id; + gchar *id; EConfigTarget *target; @@ -230,31 +230,31 @@ struct _EConfigClass { GType e_config_get_type(void); /* Static class methods */ -EConfigFactory *e_config_class_add_factory(EConfigClass *klass, const char *id, EConfigFactoryFunc func, void *data); +EConfigFactory *e_config_class_add_factory(EConfigClass *klass, const gchar *id, EConfigFactoryFunc func, gpointer data); void e_config_class_remove_factory(EConfigClass *klass, EConfigFactory *f); -EConfig *e_config_construct(EConfig *, int type, const char *id); +EConfig *e_config_construct(EConfig *, gint type, const gchar *id); -void e_config_add_items(EConfig *, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, void *data); -void e_config_add_page_check(EConfig *, const char *pageid, EConfigCheckFunc, void *data); +void e_config_add_items(EConfig *, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, gpointer data); +void e_config_add_page_check(EConfig *, const gchar *pageid, EConfigCheckFunc, gpointer data); void e_config_set_target(EConfig *emp, EConfigTarget *target); struct _GtkWidget *e_config_create_widget(EConfig *); -struct _GtkWidget *e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const char *title); +struct _GtkWidget *e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const gchar *title); void e_config_target_changed(EConfig *emp, e_config_target_change_t how); -gboolean e_config_page_check(EConfig *, const char *); +gboolean e_config_page_check(EConfig *, const gchar *); -struct _GtkWidget *e_config_page_get(EConfig *ec, const char *pageid); -const char *e_config_page_next(EConfig *ec, const char *pageid); -const char *e_config_page_prev(EConfig *ec, const char *pageid); +struct _GtkWidget *e_config_page_get(EConfig *ec, const gchar *pageid); +const gchar *e_config_page_next(EConfig *ec, const gchar *pageid); +const gchar *e_config_page_prev(EConfig *ec, const gchar *pageid); void e_config_abort(EConfig *); void e_config_commit(EConfig *); -void *e_config_target_new(EConfig *, int type, size_t size); -void e_config_target_free(EConfig *, void *); +gpointer e_config_target_new(EConfig *, gint type, size_t size); +void e_config_target_free(EConfig *, gpointer ); /* ********************************************************************** */ @@ -314,7 +314,7 @@ struct _EConfigHookItemFactoryData { struct _EConfigHookPageCheckData { EConfig *config; EConfigTarget *target; - const char *pageid; + const gchar *pageid; }; /** @@ -336,12 +336,12 @@ struct _EConfigHookPageCheckData { **/ struct _EConfigHookGroup { struct _EConfigHook *hook; /* parent pointer */ - char *id; /* target menu id for these config items */ - int target_type; /* target type of this group */ + gchar *id; /* target menu id for these config items */ + gint target_type; /* target type of this group */ GSList *items; /* items to add to group */ - char *check; /* validate handler, if set */ - char *commit; /* commit handler, if set */ - char *abort; /* abort handler, if set */ + gchar *check; /* validate handler, if set */ + gchar *commit; /* commit handler, if set */ + gchar *abort; /* abort handler, if set */ }; /** diff --git a/e-util/e-corba-utils.c b/e-util/e-corba-utils.c index f673370bfc..338b88efee 100644 --- a/e-util/e-corba-utils.c +++ b/e-util/e-corba-utils.c @@ -28,7 +28,7 @@ const CORBA_char * -e_safe_corba_string (const char *s) +e_safe_corba_string (const gchar *s) { if (s == NULL) return (CORBA_char *) ""; @@ -37,7 +37,7 @@ e_safe_corba_string (const char *s) } CORBA_char * -e_safe_corba_string_dup (const char *s) +e_safe_corba_string_dup (const gchar *s) { return CORBA_string_dup (e_safe_corba_string (s)); } diff --git a/e-util/e-corba-utils.h b/e-util/e-corba-utils.h index b6da7240e7..c7527ebe26 100644 --- a/e-util/e-corba-utils.h +++ b/e-util/e-corba-utils.h @@ -25,7 +25,7 @@ #include <orbit/orbit.h> -const CORBA_char *e_safe_corba_string (const char *s); -CORBA_char *e_safe_corba_string_dup (const char *s); +const CORBA_char *e_safe_corba_string (const gchar *s); +CORBA_char *e_safe_corba_string_dup (const gchar *s); #endif diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c index 978033541a..b209c84633 100644 --- a/e-util/e-dialog-utils.c +++ b/e-util/e-dialog-utils.c @@ -53,11 +53,11 @@ * button. **/ void -e_notice (gpointer parent, GtkMessageType type, const char *format, ...) +e_notice (gpointer parent, GtkMessageType type, const gchar *format, ...) { GtkWidget *dialog; va_list args; - char *str; + gchar *str; va_start (args, format); str = g_strdup_vprintf (format, args); @@ -87,11 +87,11 @@ e_notice (gpointer parent, GtkMessageType type, const char *format, ...) * window argument. **/ void -e_notice_with_xid (GdkNativeWindow parent, GtkMessageType type, const char *format, ...) +e_notice_with_xid (GdkNativeWindow parent, GtkMessageType type, const gchar *format, ...) { GtkWidget *dialog; va_list args; - char *str; + gchar *str; va_start (args, format); str = g_strdup_vprintf (format, args); @@ -121,9 +121,9 @@ window_is_wm_toplevel (Display *display, Window window) { static Atom WM_STATE = None; unsigned long nitems, after; - unsigned char *data = NULL; + guchar *data = NULL; Atom type = None; - int format; + gint format; if (!WM_STATE) WM_STATE = XInternAtom (display, "WM_STATE", False); @@ -132,7 +132,7 @@ window_is_wm_toplevel (Display *display, Window window) AnyPropertyType, &type, &format, &nitems, &after, &data) == Success) { if (data) - XFree((char*)data); + XFree((gchar *)data); if (type) return TRUE; } @@ -160,7 +160,7 @@ e_dialog_set_transient_for (GtkWindow *dialog, GtkWidget *toplevel; #ifdef GDK_WINDOWING_X11 Window parent, root_ret, *children; - unsigned int numchildren; + guint numchildren; Display *display; Status status; #endif @@ -248,8 +248,8 @@ static void save_ok (GtkWidget *widget, gpointer data) { GtkWidget *fs; - char **filename = data; - char *uri; + gchar **filename = data; + gchar *uri; fs = gtk_widget_get_toplevel (widget); uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fs)); @@ -271,11 +271,11 @@ filechooser_response (GtkWidget *fc, gint response_id, gpointer data) gtk_widget_destroy (fc); } -char * -e_file_dialog_save (const char *title, const char *fname) +gchar * +e_file_dialog_save (const gchar *title, const gchar *fname) { GtkWidget *selection; - char *filename = NULL; + gchar *filename = NULL; selection = e_file_get_save_filesel(NULL, title, fname, GTK_FILE_CHOOSER_ACTION_SAVE); @@ -294,8 +294,8 @@ static void save_folder_ok (GtkWidget *widget, gpointer data) { GtkWidget *fs; - char **filename = data; - char *uri; + gchar **filename = data; + gchar *uri; fs = gtk_widget_get_toplevel (widget); uri = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (fs)); @@ -315,11 +315,11 @@ folderchooser_response (GtkWidget *fc, gint response_id, gpointer data) gtk_widget_destroy (fc); } -char * -e_file_dialog_save_folder (const char *title) +gchar * +e_file_dialog_save_folder (const gchar *title) { GtkWidget *selection; - char *filename = NULL; + gchar *filename = NULL; selection = e_file_get_save_filesel(NULL, title, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); g_signal_connect (G_OBJECT (selection), "response", G_CALLBACK (folderchooser_response), &filename); @@ -344,10 +344,10 @@ e_file_dialog_save_folder (const char *title) * no signals connected and is not shown. **/ GtkWidget * -e_file_get_save_filesel (GtkWidget *parent, const char *title, const char *name, GtkFileChooserAction action) +e_file_get_save_filesel (GtkWidget *parent, const gchar *title, const gchar *name, GtkFileChooserAction action) { GtkWidget *filesel; - char *uri; + gchar *uri; filesel = gtk_file_chooser_dialog_new (title, NULL, @@ -382,10 +382,10 @@ e_file_get_save_filesel (GtkWidget *parent, const char *title, const char *name, * it. Returns the users choice. **/ gboolean -e_file_can_save(GtkWindow *parent, const char *uri) +e_file_can_save(GtkWindow *parent, const gchar *uri) { struct stat st; - char *path; + gchar *path; gboolean res; if (!uri || uri[0] == 0) @@ -421,9 +421,9 @@ e_file_can_save(GtkWindow *parent, const char *uri) } gboolean -e_file_check_local (const char *name) +e_file_check_local (const gchar *name) { - char *uri; + gchar *uri; uri = e_util_uri_to_filename (name); if (uri) { diff --git a/e-util/e-dialog-utils.h b/e-util/e-dialog-utils.h index 6b9956ddf9..153c018918 100644 --- a/e-util/e-dialog-utils.h +++ b/e-util/e-dialog-utils.h @@ -27,11 +27,11 @@ void e_notice (gpointer parent, GtkMessageType type, - const char *format, + const gchar *format, ...); void e_notice_with_xid (GdkNativeWindow parent, GtkMessageType type, - const char *format, + const gchar *format, ...); void e_dialog_set_transient_for (GtkWindow *dialog, @@ -39,14 +39,14 @@ void e_dialog_set_transient_for (GtkWindow *dialog, void e_dialog_set_transient_for_xid (GtkWindow *dialog, GdkNativeWindow xid); -char *e_file_dialog_save (const char *title, const char *fname); +gchar *e_file_dialog_save (const gchar *title, const gchar *fname); -char *e_file_dialog_save_folder (const char *title); +gchar *e_file_dialog_save_folder (const gchar *title); -GtkWidget * e_file_get_save_filesel (GtkWidget *parent, const char *title, const char *name, GtkFileChooserAction action); +GtkWidget * e_file_get_save_filesel (GtkWidget *parent, const gchar *title, const gchar *name, GtkFileChooserAction action); -gboolean e_file_can_save(GtkWindow *parent, const char *uri); -gboolean e_file_check_local(const char *name); +gboolean e_file_can_save(GtkWindow *parent, const gchar *uri); +gboolean e_file_check_local(const gchar *name); #endif diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c index 98e1be7a74..ae53a17ca7 100644 --- a/e-util/e-dialog-widgets.c +++ b/e-util/e-dialog-widgets.c @@ -80,9 +80,9 @@ get_dialog_hooks (GtkWidget *dialog) * values for the items are provided as a -1-terminated array. */ static int -value_to_index (const int *value_map, int value) +value_to_index (const gint *value_map, gint value) { - int i; + gint i; for (i = 0; value_map[i] != -1; i++) if (value_map[i] == value) @@ -95,9 +95,9 @@ value_to_index (const int *value_map, int value) * function above. */ static int -index_to_value (const int *value_map, int index) +index_to_value (const gint *value_map, gint index) { - int i; + gint i; /* We do this the hard way, i.e. not as a simple array reference, to * check for correctness. @@ -114,13 +114,13 @@ index_to_value (const int *value_map, int index) static void hook_radio (GtkWidget *dialog, GtkRadioButton *radio, gpointer value_var, gpointer info) { - const int *value_map; - int *value; + const gint *value_map; + gint *value; /* Set the value */ - value = (int *) value_var; - value_map = (const int *) info; + value = (gint *) value_var; + value_map = (const gint *) info; e_dialog_radio_set (GTK_WIDGET (radio), *value, value_map); } @@ -129,11 +129,11 @@ hook_radio (GtkWidget *dialog, GtkRadioButton *radio, gpointer value_var, gpoint static void get_radio_value (GtkRadioButton *radio, gpointer value_var, gpointer info) { - int *value; - const int *value_map; + gint *value; + const gint *value_map; - value = (int *) value_var; - value_map = (const int *) info; + value = (gint *) value_var; + value_map = (const gint *) info; *value = e_dialog_radio_get (GTK_WIDGET (radio), value_map); } @@ -191,11 +191,11 @@ get_spin_button_value (GtkSpinButton *spin, gpointer value_var, gpointer info) static void hook_editable (GtkWidget *dialog, GtkEditable *editable, gpointer value_var, gpointer info) { - char **value; + gchar **value; /* Set the value */ - value = (char **) value_var; + value = (gchar **) value_var; e_dialog_editable_set (GTK_WIDGET (editable), *value); } @@ -204,9 +204,9 @@ hook_editable (GtkWidget *dialog, GtkEditable *editable, gpointer value_var, gpo static void get_editable_value (GtkEditable *editable, gpointer value_var, gpointer data) { - char **value; + gchar **value; - value = (char **) value_var; + value = (gchar **) value_var; if (*value) g_free (*value); @@ -221,9 +221,9 @@ get_editable_value (GtkEditable *editable, gpointer value_var, gpointer data) * Sets the string value inside a #GtkEditable-derived widget. **/ void -e_dialog_editable_set (GtkWidget *widget, const char *value) +e_dialog_editable_set (GtkWidget *widget, const gchar *value) { - int pos = 0; + gint pos = 0; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_EDITABLE (widget)); @@ -244,7 +244,7 @@ e_dialog_editable_set (GtkWidget *widget, const char *value) * This function can return NULL if the string could not be converted from * GTK+'s encoding into UTF8. **/ -char * +gchar * e_dialog_editable_get (GtkWidget *widget) { g_return_val_if_fail (widget != NULL, NULL); @@ -268,10 +268,10 @@ e_dialog_editable_get (GtkWidget *widget) * specified as { NEAREST_NEIGHBOR, BILINEAR, HYPERBOLIC, -1 }. **/ void -e_dialog_radio_set (GtkWidget *widget, int value, const int *value_map) +e_dialog_radio_set (GtkWidget *widget, gint value, const gint *value_map) { GSList *group, *l; - int i; + gint i; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_RADIO_BUTTON (widget)); @@ -307,11 +307,11 @@ e_dialog_radio_set (GtkWidget *widget, int value, const int *value_map) * Return value: Enumeration value which corresponds to the selected item in the * radio group. **/ -int -e_dialog_radio_get (GtkWidget *widget, const int *value_map) +gint +e_dialog_radio_get (GtkWidget *widget, const gint *value_map) { GSList *group, *l; - int i, v; + gint i, v; g_return_val_if_fail (widget != NULL, -1); g_return_val_if_fail (GTK_IS_RADIO_BUTTON (widget), -1); @@ -428,7 +428,7 @@ e_dialog_spin_get_double (GtkWidget *widget) * * Return value: Numeric value. **/ -int +gint e_dialog_spin_get_int (GtkWidget *widget) { double value; @@ -451,9 +451,9 @@ e_dialog_spin_get_int (GtkWidget *widget) * indices. **/ void -e_dialog_combo_box_set (GtkWidget *widget, int value, const int *value_map) +e_dialog_combo_box_set (GtkWidget *widget, gint value, const gint *value_map) { - int i; + gint i; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_COMBO_BOX (widget)); @@ -480,10 +480,10 @@ e_dialog_combo_box_set (GtkWidget *widget, int value, const int *value_map) * Return value: Enumeration value which corresponds to the selected item in the * combo box. **/ -int -e_dialog_combo_box_get (GtkWidget *widget, const int *value_map) +gint +e_dialog_combo_box_get (GtkWidget *widget, const gint *value_map) { - int i; + gint i; g_return_val_if_fail (widget != NULL, -1); g_return_val_if_fail (GTK_IS_COMBO_BOX (widget), -1); @@ -506,7 +506,7 @@ e_dialog_combo_box_get (GtkWidget *widget, const int *value_map) * e_dialog_radio_set() for details). * * Hooks a widget from a dialog box to the variable it will modify. Supported - * widgets are: #GtkEditable (char *), #GtkRadioButton (int/value_map pair; see + * widgets are: #GtkEditable (gchar *), #GtkRadioButton (int/value_map pair; see * e_dialog_radio_set() for more information), #GtkTogglebutton (gboolean), * #GtkSpinButton (double), #GtkOptionMenu (int/value_map pair), and * #GnomeDateEdit (time_t). @@ -615,7 +615,7 @@ e_dialog_get_values (GtkWidget *dialog) * otherwise. **/ gboolean -e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const char *widget_name, +e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const gchar *widget_name, gpointer value_var, gpointer info) { GtkWidget *widget; diff --git a/e-util/e-dialog-widgets.h b/e-util/e-dialog-widgets.h index b7f838539d..b40edc832a 100644 --- a/e-util/e-dialog-widgets.h +++ b/e-util/e-dialog-widgets.h @@ -30,28 +30,28 @@ -void e_dialog_editable_set (GtkWidget *widget, const char *value); -char *e_dialog_editable_get (GtkWidget *widget); +void e_dialog_editable_set (GtkWidget *widget, const gchar *value); +gchar *e_dialog_editable_get (GtkWidget *widget); -void e_dialog_radio_set (GtkWidget *widget, int value, const int *value_map); -int e_dialog_radio_get (GtkWidget *widget, const int *value_map); +void e_dialog_radio_set (GtkWidget *widget, gint value, const gint *value_map); +gint e_dialog_radio_get (GtkWidget *widget, const gint *value_map); void e_dialog_toggle_set (GtkWidget *widget, gboolean value); gboolean e_dialog_toggle_get (GtkWidget *widget); void e_dialog_spin_set (GtkWidget *widget, double value); double e_dialog_spin_get_double (GtkWidget *widget); -int e_dialog_spin_get_int (GtkWidget *widget); +gint e_dialog_spin_get_int (GtkWidget *widget); -void e_dialog_combo_box_set (GtkWidget *widget, int value, const int *value_map); -int e_dialog_combo_box_get (GtkWidget *widget, const int *value_map); +void e_dialog_combo_box_set (GtkWidget *widget, gint value, const gint *value_map); +gint e_dialog_combo_box_get (GtkWidget *widget, const gint *value_map); gboolean e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget, gpointer value_var, gpointer info); void e_dialog_get_values (GtkWidget *dialog); -gboolean e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const char *widget_name, +gboolean e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const gchar *widget_name, gpointer value_var, gpointer info); diff --git a/e-util/e-error.c b/e-util/e-error.c index f2067950bc..c35e8b2dde 100644 --- a/e-util/e-error.c +++ b/e-util/e-error.c @@ -99,9 +99,9 @@ static struct { }; static int -map_response(const char *name) +map_response(const gchar *name) { - int i; + gint i; for (i=0;i<sizeof(response_map)/sizeof(response_map[0]);i++) if (!strcmp(name, response_map[i].name)) @@ -122,9 +122,9 @@ static struct { }; static int -map_type(const char *name) +map_type(const gchar *name) { - int i; + gint i; if (name) { for (i=0;i<sizeof(type_map)/sizeof(type_map[0]);i++) @@ -151,14 +151,14 @@ map_type(const char *name) */ static void -ee_load(const char *path) +ee_load(const gchar *path) { xmlDocPtr doc = NULL; xmlNodePtr root, error, scan; struct _e_error *e; struct _e_error_button *lastbutton; struct _e_error_table *table; - char *tmp; + gchar *tmp; d(printf("loading error file %s\n", path)); @@ -170,8 +170,8 @@ ee_load(const char *path) root = xmlDocGetRootElement(doc); if (root == NULL - || strcmp((char *)root->name, "error-list") != 0 - || (tmp = (char *)xmlGetProp(root, (const unsigned char *)"domain")) == NULL) { + || strcmp((gchar *)root->name, "error-list") != 0 + || (tmp = (gchar *)xmlGetProp(root, (const guchar *)"domain")) == NULL) { g_warning("Error file '%s' invalid format", path); xmlFreeDoc(doc); return; @@ -179,19 +179,19 @@ ee_load(const char *path) table = g_hash_table_lookup(error_table, tmp); if (table == NULL) { - char *tmp2; + gchar *tmp2; table = g_malloc0(sizeof(*table)); table->domain = g_strdup(tmp); table->errors = g_hash_table_new(g_str_hash, g_str_equal); g_hash_table_insert(error_table, (gpointer) table->domain, table); - tmp2 = (char *)xmlGetProp(root, (const unsigned char *)"translation-domain"); + tmp2 = (gchar *)xmlGetProp(root, (const guchar *)"translation-domain"); if (tmp2) { table->translation_domain = g_strdup(tmp2); xmlFree(tmp2); - tmp2 = (char *)xmlGetProp(root, (const unsigned char *)"translation-localedir"); + tmp2 = (gchar *)xmlGetProp(root, (const guchar *)"translation-localedir"); if (tmp2) { bindtextdomain(table->translation_domain, tmp2); xmlFree(tmp2); @@ -202,8 +202,8 @@ ee_load(const char *path) xmlFree(tmp); for (error = root->children;error;error = error->next) { - if (!strcmp((char *)error->name, "error")) { - tmp = (char *)xmlGetProp(error, (const unsigned char *)"id"); + if (!strcmp((gchar *)error->name, "error")) { + tmp = (gchar *)xmlGetProp(error, (const guchar *)"id"); if (tmp == NULL) continue; @@ -214,25 +214,25 @@ ee_load(const char *path) xmlFree(tmp); lastbutton = (struct _e_error_button *)&e->buttons; - tmp = (char *)xmlGetProp(error, (const unsigned char *)"modal"); + tmp = (gchar *)xmlGetProp(error, (const guchar *)"modal"); if (tmp) { if (!strcmp(tmp, "true")) e->flags |= GTK_DIALOG_MODAL; xmlFree(tmp); } - tmp = (char *)xmlGetProp(error, (const unsigned char *)"type"); + tmp = (gchar *)xmlGetProp(error, (const guchar *)"type"); e->type = map_type(tmp); if (tmp) xmlFree(tmp); - tmp = (char *)xmlGetProp(error, (const unsigned char *)"default"); + tmp = (gchar *)xmlGetProp(error, (const guchar *)"default"); if (tmp) { e->default_response = map_response(tmp); xmlFree(tmp); } - tmp = (char *)xmlGetProp(error, (const unsigned char *)"scroll"); + tmp = (gchar *)xmlGetProp(error, (const guchar *)"scroll"); if (tmp) { if (!strcmp(tmp, "yes")) e->scroll = TRUE; @@ -240,46 +240,46 @@ ee_load(const char *path) } for (scan = error->children;scan;scan=scan->next) { - if (!strcmp((char *)scan->name, "primary")) { - if ((tmp = (char *)xmlNodeGetContent(scan))) { + if (!strcmp((gchar *)scan->name, "primary")) { + if ((tmp = (gchar *)xmlNodeGetContent(scan))) { e->primary = g_strdup(dgettext(table->translation_domain, tmp)); xmlFree(tmp); } - } else if (!strcmp((char *)scan->name, "secondary")) { - if ((tmp = (char *)xmlNodeGetContent(scan))) { + } else if (!strcmp((gchar *)scan->name, "secondary")) { + if ((tmp = (gchar *)xmlNodeGetContent(scan))) { e->secondary = g_strdup(dgettext(table->translation_domain, tmp)); xmlFree(tmp); } - } else if (!strcmp((char *)scan->name, "title")) { - if ((tmp = (char *)xmlNodeGetContent(scan))) { + } else if (!strcmp((gchar *)scan->name, "title")) { + if ((tmp = (gchar *)xmlNodeGetContent(scan))) { e->title = g_strdup(dgettext(table->translation_domain, tmp)); xmlFree(tmp); } - } else if (!strcmp((char *)scan->name, "help")) { - tmp = (char *)xmlGetProp(scan, (const unsigned char *)"uri"); + } else if (!strcmp((gchar *)scan->name, "help")) { + tmp = (gchar *)xmlGetProp(scan, (const guchar *)"uri"); if (tmp) { e->help_uri = g_strdup(tmp); xmlFree(tmp); } - } else if (!strcmp((char *)scan->name, "button")) { + } else if (!strcmp((gchar *)scan->name, "button")) { struct _e_error_button *b; gchar *label = NULL; gchar *stock = NULL; b = g_malloc0(sizeof(*b)); - tmp = (char *)xmlGetProp(scan, (const unsigned char *)"stock"); + tmp = (gchar *)xmlGetProp(scan, (const guchar *)"stock"); if (tmp) { stock = g_strdup(tmp); b->stock = stock; xmlFree(tmp); } - tmp = (char *)xmlGetProp(scan, (const unsigned char *)"label"); + tmp = (gchar *)xmlGetProp(scan, (const guchar *)"label"); if (tmp) { label = g_strdup(dgettext(table->translation_domain, tmp)); b->label = label; xmlFree(tmp); } - tmp = (char *)xmlGetProp(scan, (const unsigned char *)"response"); + tmp = (gchar *)xmlGetProp(scan, (const guchar *)"response"); if (tmp) { b->response = map_response(tmp); xmlFree(tmp); @@ -308,10 +308,10 @@ static void ee_load_tables(void) { GDir *dir; - const char *d; - char *base; + const gchar *d; + gchar *base; struct _e_error_table *table; - int i; + gint i; if (error_table != NULL) return; @@ -335,7 +335,7 @@ ee_load_tables(void) } while ( (d = g_dir_read_name(dir)) ) { - char *path; + gchar *path; if (d[0] == '.') continue; @@ -351,9 +351,9 @@ ee_load_tables(void) /* unfortunately, gmarkup_escape doesn't expose its gstring based api :( */ static void -ee_append_text(GString *out, const char *text) +ee_append_text(GString *out, const gchar *text) { - char c; + gchar c; while ( (c=*text++) ) { if (c == '<') @@ -372,11 +372,11 @@ ee_append_text(GString *out, const char *text) } static void -ee_build_label(GString *out, const char *fmt, GPtrArray *args, +ee_build_label(GString *out, const gchar *fmt, GPtrArray *args, gboolean escape_args) { - const char *end, *newstart; - int id; + const gchar *end, *newstart; + gint id; while (fmt && (newstart = strchr(fmt, '{')) @@ -406,13 +406,13 @@ ee_response(GtkWidget *w, guint button, struct _e_error *e) } GtkWidget * -e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap) +e_error_newv(GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap) { struct _e_error_table *table; struct _e_error *e; struct _e_error_button *b; GtkWidget *hbox, *w, *scroll=NULL; - char *tmp, *domain, *id; + gchar *tmp, *domain, *id; GString *out, *oerr; GPtrArray *args; GtkDialog *dialog; @@ -503,10 +503,10 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap) gtk_box_pack_start((GtkBox *)hbox, w, FALSE, FALSE, 12); args = g_ptr_array_new(); - tmp = (char *)arg0; + tmp = (gchar *)arg0; while (tmp) { g_ptr_array_add(args, tmp); - tmp = va_arg(ap, char *); + tmp = va_arg(ap, gchar *); } out = g_string_new(""); @@ -581,7 +581,7 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap) * dialog asynchronously. **/ struct _GtkWidget * -e_error_new(struct _GtkWindow *parent, const char *tag, const char *arg0, ...) +e_error_new(struct _GtkWindow *parent, const gchar *tag, const gchar *arg0, ...) { GtkWidget *w; va_list ap; @@ -593,11 +593,11 @@ e_error_new(struct _GtkWindow *parent, const char *tag, const char *arg0, ...) return w; } -int -e_error_runv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap) +gint +e_error_runv(GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap) { GtkWidget *w; - int res; + gint res; w = e_error_newv(parent, tag, arg0, ap); @@ -618,12 +618,12 @@ e_error_runv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap) * * Return value: The response id of the button pressed. **/ -int -e_error_run(GtkWindow *parent, const char *tag, const char *arg0, ...) +gint +e_error_run(GtkWindow *parent, const gchar *tag, const gchar *arg0, ...) { GtkWidget *w; va_list ap; - int res; + gint res; va_start(ap, arg0); w = e_error_newv(parent, tag, arg0, ap); diff --git a/e-util/e-error.h b/e-util/e-error.h index 014f74ee88..6b66a6da31 100644 --- a/e-util/e-error.h +++ b/e-util/e-error.h @@ -50,11 +50,11 @@ struct _GtkWindow; #define E_ERROR_NO_LOAD_FILE "system:no-save-file" /* Note that all errors returned are standard GtkDialoge's */ -struct _GtkWidget *e_error_new(struct _GtkWindow *parent, const char *tag, const char *arg0, ...); -struct _GtkWidget *e_error_newv(struct _GtkWindow *parent, const char *tag, const char *arg0, va_list ap); +struct _GtkWidget *e_error_new(struct _GtkWindow *parent, const gchar *tag, const gchar *arg0, ...); +struct _GtkWidget *e_error_newv(struct _GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap); -int e_error_run(struct _GtkWindow *parent, const char *tag, const char *arg0, ...); -int e_error_runv(struct _GtkWindow *parent, const char *tag, const char *arg0, va_list ap); +gint e_error_run(struct _GtkWindow *parent, const gchar *tag, const gchar *arg0, ...); +gint e_error_runv(struct _GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap); guint e_error_count_buttons (GtkDialog *dialog); diff --git a/e-util/e-event.c b/e-util/e-event.c index ab96701abc..d449030c0b 100644 --- a/e-util/e-event.c +++ b/e-util/e-event.c @@ -39,16 +39,16 @@ struct _EEventFactory { struct _EEventFactory *next, *prev; - char *menuid; + gchar *menuid; EEventFactoryFunc factory; - void *factory_data; + gpointer factory_data; }; struct _event_node { struct _event_node *next, *prev; GSList *events; - void *data; + gpointer data; EEventItemsFunc freefunc; }; @@ -155,7 +155,7 @@ e_event_get_type(void) * * Return value: Returns @ep. **/ -EEvent *e_event_construct(EEvent *ep, const char *id) +EEvent *e_event_construct(EEvent *ep, const gchar *id) { ep->id = g_strdup(id); @@ -173,8 +173,8 @@ EEvent *e_event_construct(EEvent *ep, const char *id) * * Return value: An opaque key which can later be passed to remove_items. **/ -void * -e_event_add_items(EEvent *emp, GSList *items, EEventItemsFunc freefunc, void *data) +gpointer +e_event_add_items(EEvent *emp, GSList *items, EEventItemsFunc freefunc, gpointer data) { struct _event_node *node; @@ -190,7 +190,7 @@ e_event_add_items(EEvent *emp, GSList *items, EEventItemsFunc freefunc, void *da emp->priv->sorted = NULL; } - return (void *)node; + return (gpointer)node; } /** @@ -202,7 +202,7 @@ e_event_add_items(EEvent *emp, GSList *items, EEventItemsFunc freefunc, void *da * added, and may only be removed once. **/ void -e_event_remove_items(EEvent *emp, void *handle) +e_event_remove_items(EEvent *emp, gpointer handle) { struct _event_node *node = handle; @@ -219,10 +219,10 @@ e_event_remove_items(EEvent *emp, void *handle) } static int -ee_cmp(const void *ap, const void *bp) +ee_cmp(gconstpointer ap, gconstpointer bp) { - int a = ((struct _event_info **)ap)[0]->item->priority; - int b = ((struct _event_info **)bp)[0]->item->priority; + gint a = ((struct _event_info **)ap)[0]->item->priority; + gint b = ((struct _event_info **)bp)[0]->item->priority; if (a < b) return 1; @@ -242,7 +242,7 @@ ee_cmp(const void *ap, const void *bp) * emission is complete. **/ void -e_event_emit(EEvent *emp, const char *id, EEventTarget *target) +e_event_emit(EEvent *emp, const gchar *id, EEventTarget *target) { struct _EEventPrivate *p = emp->priv; GSList *events; @@ -306,7 +306,7 @@ e_event_emit(EEvent *emp, const char *id, EEventTarget *target) * the implementation to define the available target types and their * structure. **/ -void *e_event_target_new(EEvent *ep, int type, size_t size) +gpointer e_event_target_new(EEvent *ep, gint type, size_t size) { EEventTarget *t; @@ -331,7 +331,7 @@ void *e_event_target_new(EEvent *ep, int type, size_t size) * Free a target. This invokes the virtual free method on the EEventClass. **/ void -e_event_target_free(EEvent *ep, void *o) +e_event_target_free(EEvent *ep, gpointer o) { EEventTarget *t = o; @@ -380,7 +380,7 @@ e_event_target_free(EEvent *ep, void *o) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EEventHook *)eph) /* must have 1:1 correspondence with e-event types in order */ @@ -391,7 +391,7 @@ static const EPluginHookTargetKey emph_item_types[] = { }; static void -emph_event_handle(EEvent *ee, EEventItem *item, void *data) +emph_event_handle(EEvent *ee, EEventItem *item, gpointer data) { struct _EEventHook *hook = data; @@ -399,19 +399,19 @@ emph_event_handle(EEvent *ee, EEventItem *item, void *data) if (!hook->hook.plugin->enabled) return; - e_plugin_invoke(hook->hook.plugin, (char *)item->user_data, ee->target); + e_plugin_invoke(hook->hook.plugin, (gchar *)item->user_data, ee->target); } static void emph_free_item(struct _EEventItem *item) { - g_free((char *)item->id); + g_free((gchar *)item->id); g_free(item->user_data); g_free(item); } static void -emph_free_items(EEvent *ee, GSList *items, void *data) +emph_free_items(EEvent *ee, GSList *items, gpointer data) { /*EPluginHook *eph = data;*/ @@ -424,11 +424,11 @@ emph_construct_item(EPluginHook *eph, xmlNodePtr root, EEventHookClass *klass) { struct _EEventItem *item; EEventHookTargetMap *map; - char *tmp; + gchar *tmp; item = g_malloc0(sizeof(*item)); - tmp = (char *)xmlGetProp(root, (const unsigned char *)"target"); + tmp = (gchar *)xmlGetProp(root, (const guchar *)"target"); if (tmp == NULL) goto error; map = g_hash_table_lookup(klass->target_map, tmp); @@ -473,7 +473,7 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "event") == 0) { + if (strcmp((gchar *)node->name, "event") == 0) { struct _EEventItem *item; item = emph_construct_item(eph, node, klass); @@ -551,5 +551,5 @@ e_event_hook_get_type(void) **/ void e_event_hook_class_add_target_map(EEventHookClass *klass, const EEventHookTargetMap *map) { - g_hash_table_insert(klass->target_map, (void *)map->type, (void *)map); + g_hash_table_insert(klass->target_map, (gpointer)map->type, (gpointer)map); } diff --git a/e-util/e-event.h b/e-util/e-event.h index 5b4e3f44ab..5ae3b61d1b 100644 --- a/e-util/e-event.h +++ b/e-util/e-event.h @@ -44,9 +44,9 @@ typedef struct _EEventItem EEventItem; typedef struct _EEventFactory EEventFactory; /* anonymous type */ typedef struct _EEventTarget EEventTarget; -typedef void (*EEventItemsFunc)(EEvent *ee, GSList *items, void *data); -typedef void (*EEventFunc)(EEvent *ee, EEventItem *item, void *data); -typedef void (*EEventFactoryFunc)(EEvent *ee, void *); +typedef void (*EEventItemsFunc)(EEvent *ee, GSList *items, gpointer data); +typedef void (*EEventFunc)(EEvent *ee, EEventItem *item, gpointer data); +typedef void (*EEventFactoryFunc)(EEvent *ee, gpointer ); /** * enum _e_event_t - Event type. @@ -86,11 +86,11 @@ enum _e_event_t { **/ struct _EEventItem { enum _e_event_t type; - int priority; /* priority of event */ - const char *id; /* event id */ - int target_type; + gint priority; /* priority of event */ + const gchar *id; /* event id */ + gint target_type; EEventFunc handle; - void *user_data; + gpointer user_data; guint32 enable; /* enable mask */ }; @@ -133,7 +133,7 @@ struct _EEvent { GObject object; struct _EEventPrivate *priv; - char *id; + gchar *id; EEventTarget *target; /* current target during event emission */ }; @@ -156,15 +156,15 @@ struct _EEventClass { GType e_event_get_type(void); -EEvent *e_event_construct(EEvent *, const char *id); +EEvent *e_event_construct(EEvent *, const gchar *id); -void *e_event_add_items(EEvent *emp, GSList *items, EEventItemsFunc freefunc, void *data); -void e_event_remove_items(EEvent *emp, void *handle); +gpointer e_event_add_items(EEvent *emp, GSList *items, EEventItemsFunc freefunc, gpointer data); +void e_event_remove_items(EEvent *emp, gpointer handle); -void e_event_emit(EEvent *, const char *id, EEventTarget *); +void e_event_emit(EEvent *, const gchar *id, EEventTarget *); -void *e_event_target_new(EEvent *, int type, size_t size); -void e_event_target_free(EEvent *, void *); +gpointer e_event_target_new(EEvent *, gint type, size_t size); +void e_event_target_free(EEvent *, gpointer ); /* ********************************************************************** */ diff --git a/e-util/e-folder-map.c b/e-util/e-folder-map.c index d74817ecfe..c77772f289 100644 --- a/e-util/e-folder-map.c +++ b/e-util/e-folder-map.c @@ -41,11 +41,11 @@ #define d(x) static gboolean -is_type_folder (const char *metadata, const char *search_type) +is_type_folder (const gchar *metadata, const gchar *search_type) { xmlNodePtr node; xmlDocPtr doc; - char *type; + gchar *type; doc = e_xml_parse_file (metadata); if (!doc) { @@ -59,7 +59,7 @@ is_type_folder (const char *metadata, const char *search_type) return FALSE; } - if (!node->name || strcmp ((char *)node->name, "efolder") != 0) { + if (!node->name || strcmp ((gchar *)node->name, "efolder") != 0) { g_warning ("`%s' corrupt: root node is not 'efolder'", metadata); xmlFreeDoc (doc); return FALSE; @@ -67,8 +67,8 @@ is_type_folder (const char *metadata, const char *search_type) node = node->children; while (node != NULL) { - if (node->name && !strcmp ((char *)node->name, "type")) { - type = (char *)xmlNodeGetContent (node); + if (node->name && !strcmp ((gchar *)node->name, "type")) { + type = (gchar *)xmlNodeGetContent (node); if (!strcmp (type, search_type)) { xmlFreeDoc (doc); xmlFree (type); @@ -90,10 +90,10 @@ is_type_folder (const char *metadata, const char *search_type) } static void -e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list) +e_folder_map_dir (const gchar *dirname, const gchar *type, GSList **dir_list) { - char *path; - const char *name; + gchar *path; + const gchar *name; GDir *dir; GError *error = NULL; @@ -129,7 +129,7 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list) } while ((name = g_dir_read_name (dir))) { - char *full_path; + gchar *full_path; if (*name == '.') continue; @@ -152,7 +152,7 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list) GSList * e_folder_map_local_folders (const gchar *local_dir, const gchar *type) { - const char *name; + const gchar *name; GDir *dir; GSList *dir_list = NULL; GError *error = NULL; @@ -164,7 +164,7 @@ e_folder_map_local_folders (const gchar *local_dir, const gchar *type) } while ((name = g_dir_read_name (dir))) { - char *full_path; + gchar *full_path; if (*name == '.') continue; diff --git a/e-util/e-fsutils.c b/e-util/e-fsutils.c index 27480959c4..335fad4aff 100644 --- a/e-util/e-fsutils.c +++ b/e-util/e-fsutils.c @@ -60,10 +60,10 @@ * Return value: The number of 1024 byte blocks used by the * filesystem. **/ -long e_fsutils_usage(const char *inpath) +long e_fsutils_usage(const gchar *inpath) { GDir *dir; - const char *d; + const gchar *d; long size = 0; GSList *paths; @@ -71,7 +71,7 @@ long e_fsutils_usage(const char *inpath) paths = g_slist_prepend(NULL, g_strdup(inpath)); while (paths) { - char *path = paths->data; + gchar *path = paths->data; paths = g_slist_remove_link(paths, paths); @@ -82,7 +82,7 @@ long e_fsutils_usage(const char *inpath) } while ((d = g_dir_read_name(dir))) { - char *full_path; + gchar *full_path; struct stat st; full_path = g_build_filename(path, d, NULL); @@ -129,7 +129,7 @@ fail: * blocks. **/ long -e_fsutils_avail(const char *path) +e_fsutils_avail(const gchar *path) { #if defined(HAVE_STATVFS) struct statvfs stfs; diff --git a/e-util/e-fsutils.h b/e-util/e-fsutils.h index 76a03f5441..d675b39e80 100644 --- a/e-util/e-fsutils.h +++ b/e-util/e-fsutils.h @@ -27,8 +27,8 @@ G_BEGIN_DECLS -long e_fsutils_usage(const char *path); -long e_fsutils_avail(const char *path); +long e_fsutils_usage(const gchar *path); +long e_fsutils_avail(const gchar *path); G_END_DECLS diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index 4958f0806e..619cb6599e 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -27,11 +27,11 @@ #include "e-html-utils.h" -static char * -check_size (char **buffer, int *buffer_size, char *out, int len) +static gchar * +check_size (gchar **buffer, gint *buffer_size, gchar *out, gint len) { if (out + len + 1> *buffer + *buffer_size) { - int index = out - *buffer; + gint index = out - *buffer; *buffer_size = MAX (index + len + 1, *buffer_size * 2); *buffer = g_realloc (*buffer, *buffer_size); @@ -49,7 +49,7 @@ check_size (char **buffer, int *buffer_size, char *out, int len) * 4 = allowed dns chars * 8 = non-url chars: "| */ -static int special_chars[] = { +static gint special_chars[] = { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, /* nul - 0x0f */ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, /* 0x10 - 0x1f */ 9, 2, 9, 0, 0, 0, 0, 3, 1, 3, 0, 0, 3, 6, 6, 0, /* sp - / */ @@ -68,11 +68,11 @@ static int special_chars[] = { /* (http|https|ftp|nntp)://[^ "|/]+\.([^ "|]*[^ ,.!?;:>)\]}`'"|_-])+ */ /* www\.[A-Za-z0-9.-]+(/([^ "|]*[^ ,.!?;:>)\]}`'"|_-])+) */ -static char * -url_extract (const unsigned char **text, gboolean full_url) +static gchar * +url_extract (const guchar **text, gboolean full_url) { - const unsigned char *end = *text, *p; - char *out; + const guchar *end = *text, *p; + gchar *out; while (*end && is_url_char (*end)) end++; @@ -96,16 +96,16 @@ url_extract (const unsigned char **text, gboolean full_url) return NULL; } - out = g_strndup ((char *)*text, end - *text); + out = g_strndup ((gchar *)*text, end - *text); *text = end; return out; } -static char * -email_address_extract (const unsigned char **cur, char **out, const unsigned char *linestart) +static gchar * +email_address_extract (const guchar **cur, gchar **out, const guchar *linestart) { - const unsigned char *start, *end, *dot; - char *addr; + const guchar *start, *end, *dot; + gchar *addr; /* *cur points to the '@'. Look backward for a valid local-part */ for (start = *cur; start - 1 >= linestart && is_addr_char (*(start - 1)); start--) @@ -130,7 +130,7 @@ email_address_extract (const unsigned char **cur, char **out, const unsigned cha if (dot > end) return NULL; - addr = g_strndup ((char *)start, end - start); + addr = g_strndup ((gchar *)start, end - start); *out -= *cur - start; *cur = end; @@ -138,9 +138,9 @@ email_address_extract (const unsigned char **cur, char **out, const unsigned cha } static gboolean -is_citation (const unsigned char *c, gboolean saw_citation) +is_citation (const guchar *c, gboolean saw_citation) { - const unsigned char *p; + const guchar *p; if (*c != '>') return FALSE; @@ -148,7 +148,7 @@ is_citation (const unsigned char *c, gboolean saw_citation) /* A line that starts with a ">" is a citation, unless it's * just mbox From-mangling... */ - if (strncmp ((const char *)c, ">From ", 6) != 0) + if (strncmp ((const gchar *)c, ">From ", 6) != 0) return TRUE; /* If the previous line was a citation, then say this @@ -158,7 +158,7 @@ is_citation (const unsigned char *c, gboolean saw_citation) return TRUE; /* Same if the next line is */ - p = (const unsigned char *)strchr ((const char *)c, '\n'); + p = (const guchar *)strchr ((const gchar *)c, '\n'); if (p && *++p == '>') return TRUE; @@ -211,13 +211,13 @@ is_citation (const unsigned char *c, gboolean saw_citation) * - E_TEXT_TO_HTML_CITE: quote the text with "> " at the start of each * line. **/ -char * -e_text_to_html_full (const char *input, unsigned int flags, guint32 color) +gchar * +e_text_to_html_full (const gchar *input, guint flags, guint32 color) { - const unsigned char *cur, *next, *linestart; - char *buffer = NULL; - char *out = NULL; - int buffer_size = 0, col; + const guchar *cur, *next, *linestart; + gchar *buffer = NULL; + gchar *out = NULL; + gint buffer_size = 0, col; gboolean colored = FALSE, saw_citation = FALSE; /* Allocate a translation buffer. */ @@ -230,7 +230,7 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) col = 0; - for (cur = linestart = (const unsigned char *)input; cur && *cur; cur = next) { + for (cur = linestart = (const guchar *)input; cur && *cur; cur = next) { gunichar u; if (flags & E_TEXT_TO_HTML_MARK_CITATION && col == 0) { @@ -261,28 +261,28 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) out += sprintf (out, "> "); } - u = g_utf8_get_char ((char *)cur); + u = g_utf8_get_char ((gchar *)cur); if (g_unichar_isalpha (u) && (flags & E_TEXT_TO_HTML_CONVERT_URLS)) { - char *tmpurl = NULL, *refurl = NULL, *dispurl = NULL; - - if (!g_ascii_strncasecmp ((char *)cur, "http://", 7) || - !g_ascii_strncasecmp ((char *)cur, "https://", 8) || - !g_ascii_strncasecmp ((char *)cur, "ftp://", 6) || - !g_ascii_strncasecmp ((char *)cur, "nntp://", 7) || - !g_ascii_strncasecmp ((char *)cur, "mailto:", 7) || - !g_ascii_strncasecmp ((char *)cur, "news:", 5) || - !g_ascii_strncasecmp ((char *)cur, "file:", 5) || - !g_ascii_strncasecmp ((char *)cur, "callto:", 7) || - !g_ascii_strncasecmp ((char *)cur, "h323:", 5) || - !g_ascii_strncasecmp ((char *)cur, "sip:", 4) || - !g_ascii_strncasecmp ((char *)cur, "webcal:", 7)) { + gchar *tmpurl = NULL, *refurl = NULL, *dispurl = NULL; + + if (!g_ascii_strncasecmp ((gchar *)cur, "http://", 7) || + !g_ascii_strncasecmp ((gchar *)cur, "https://", 8) || + !g_ascii_strncasecmp ((gchar *)cur, "ftp://", 6) || + !g_ascii_strncasecmp ((gchar *)cur, "nntp://", 7) || + !g_ascii_strncasecmp ((gchar *)cur, "mailto:", 7) || + !g_ascii_strncasecmp ((gchar *)cur, "news:", 5) || + !g_ascii_strncasecmp ((gchar *)cur, "file:", 5) || + !g_ascii_strncasecmp ((gchar *)cur, "callto:", 7) || + !g_ascii_strncasecmp ((gchar *)cur, "h323:", 5) || + !g_ascii_strncasecmp ((gchar *)cur, "sip:", 4) || + !g_ascii_strncasecmp ((gchar *)cur, "webcal:", 7)) { tmpurl = url_extract (&cur, TRUE); if (tmpurl) { refurl = e_text_to_html (tmpurl, 0); dispurl = g_strdup (refurl); } - } else if (!g_ascii_strncasecmp ((char *)cur, "www.", 4) && + } else if (!g_ascii_strncasecmp ((gchar *)cur, "www.", 4) && is_url_char (*(cur + 4))) { tmpurl = url_extract (&cur, FALSE); if (tmpurl) { @@ -307,11 +307,11 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) if (!*cur) break; - u = g_utf8_get_char ((char *)cur); + u = g_utf8_get_char ((gchar *)cur); } if (u == '@' && (flags & E_TEXT_TO_HTML_CONVERT_ADDRESSES)) { - char *addr, *dispaddr, *outaddr; + gchar *addr, *dispaddr, *outaddr; addr = email_address_extract (&cur, &out, linestart); if (addr) { @@ -327,7 +327,7 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) if (!*cur) break; - u = g_utf8_get_char ((char *)cur); + u = g_utf8_get_char ((gchar *)cur); } } @@ -338,7 +338,7 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) u = *cur; next = cur + 1; } else - next = (const unsigned char *)g_utf8_next_char (cur); + next = (const guchar *)g_utf8_next_char (cur); out = check_size (&buffer, &buffer_size, out, 10); @@ -393,7 +393,7 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) case ' ': if (flags & E_TEXT_TO_HTML_CONVERT_SPACES) { - if (cur == (const unsigned char *)input || + if (cur == (const guchar *)input || *(cur + 1) == ' ' || *(cur + 1) == '\t' || *(cur - 1) == '\n') { strcpy (out, " "); @@ -429,8 +429,8 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) return buffer; } -char * -e_text_to_html (const char *input, unsigned int flags) +gchar * +e_text_to_html (const gchar *input, guint flags) { return e_text_to_html_full (input, flags, 0); } @@ -439,7 +439,7 @@ e_text_to_html (const char *input, unsigned int flags) #ifdef E_HTML_UTILS_TEST struct { - char *text, *url; + gchar *text, *url; } url_tests[] = { { "bob@foo.com", "mailto:bob@foo.com" }, { "Ends with bob@foo.com", "mailto:bob@foo.com" }, @@ -487,13 +487,13 @@ struct { { "Ewwwwww.Gross.", NULL }, }; -int num_url_tests = G_N_ELEMENTS (url_tests); +gint num_url_tests = G_N_ELEMENTS (url_tests); -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { - int i, errors = 0; - char *html, *url, *p; + gint i, errors = 0; + gchar *html, *url, *p; for (i = 0; i < num_url_tests; i++) { html = e_text_to_html (url_tests[i].text, E_TEXT_TO_HTML_CONVERT_URLS | E_TEXT_TO_HTML_CONVERT_ADDRESSES); diff --git a/e-util/e-html-utils.h b/e-util/e-html-utils.h index 55e67ba915..f87e82f9b1 100644 --- a/e-util/e-html-utils.h +++ b/e-util/e-html-utils.h @@ -34,7 +34,7 @@ #define E_TEXT_TO_HTML_ESCAPE_8BIT (1 << 6) #define E_TEXT_TO_HTML_CITE (1 << 7) -char *e_text_to_html_full (const char *input, unsigned int flags, guint32 color); -char *e_text_to_html (const char *input, unsigned int flags); +gchar *e_text_to_html_full (const gchar *input, guint flags, guint32 color); +gchar *e_text_to_html (const gchar *input, guint flags); #endif /* __E_HTML_UTILS__ */ diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c index 5b1cd2f9bd..dddd4fa431 100644 --- a/e-util/e-icon-factory.c +++ b/e-util/e-icon-factory.c @@ -44,7 +44,7 @@ #define d(x) typedef struct { - char *name; + gchar *name; GdkPixbuf *pixbuf; } Icon; @@ -58,7 +58,7 @@ static GStaticMutex mutex = G_STATIC_MUTEX_INIT; /* Note: takes ownership of the pixbufs (eg. does not ref them) */ static Icon * -icon_new (const char *name, GdkPixbuf *pixbuf) +icon_new (const gchar *name, GdkPixbuf *pixbuf) { Icon *icon; @@ -79,10 +79,10 @@ icon_free (Icon *icon) } static Icon * -load_icon (const char *icon_key, const char *icon_name, int size, int scale) +load_icon (const gchar *icon_key, const gchar *icon_name, gint size, gint scale) { GdkPixbuf *pixbuf, *unscaled = NULL; - char *basename, *filename = NULL; + gchar *basename, *filename = NULL; if (g_path_is_absolute (icon_name)) filename = g_strdup (icon_name); @@ -100,10 +100,10 @@ load_icon (const char *icon_key, const char *icon_name, int size, int scale) if (!filename || !(unscaled = gdk_pixbuf_new_from_file (filename, NULL))) { if (scale) { - const char *dent; - int width; + const gchar *dent; + gint width; GDir *dir; - char *x; + gchar *x; if (!(dir = g_dir_open (EVOLUTION_ICONSDIR, 0, NULL))) { goto done; @@ -203,9 +203,9 @@ e_icon_factory_init (void) G_CALLBACK (icon_theme_changed_cb), NULL); broken16_pixbuf = gdk_pixbuf_new_from_xpm_data ( - (const char **) broken_image_16_xpm); + (const gchar **) broken_image_16_xpm); broken24_pixbuf = gdk_pixbuf_new_from_xpm_data ( - (const char **) broken_image_24_xpm); + (const gchar **) broken_image_24_xpm); } /** @@ -281,9 +281,9 @@ e_icon_factory_get_icon (const gchar *icon_name, GtkIconSize icon_size) { GdkPixbuf *pixbuf; - char *icon_key; + gchar *icon_key; Icon *icon; - int size, width, height; + gint size, width, height; g_return_val_if_fail (icon_name != NULL, NULL); @@ -325,7 +325,7 @@ e_icon_factory_get_icon (const gchar *icon_name, * @return Scaled pixbuf. **/ GdkPixbuf * -e_icon_factory_pixbuf_scale (GdkPixbuf *pixbuf, int width, int height) +e_icon_factory_pixbuf_scale (GdkPixbuf *pixbuf, gint width, gint height) { g_return_val_if_fail (pixbuf != NULL, NULL); diff --git a/e-util/e-import.c b/e-util/e-import.c index ccc44d7daa..84c8a24605 100644 --- a/e-util/e-import.c +++ b/e-util/e-import.c @@ -46,11 +46,11 @@ struct _EImportImporters { EImportImporter *importer; EImportImporterFunc free; - void *data; + gpointer data; }; struct _EImportPrivate { - int dummy; + gint dummy; }; static GObjectClass *ep_parent; @@ -149,14 +149,14 @@ e_import_get_type(void) * * Return value: @ep is returned. **/ -EImport *e_import_construct(EImport *ep, const char *id) +EImport *e_import_construct(EImport *ep, const gchar *id) { ep->id = g_strdup(id); return ep; } -EImport *e_import_new(const char *id) +EImport *e_import_new(const gchar *id) { EImport *ei = g_object_new(e_import_get_type(), NULL); @@ -180,7 +180,7 @@ EImport *e_import_new(const char *id) * When complete, the @done callback will be called. **/ void -e_import_import(EImport *ei, EImportTarget *t, EImportImporter *im, EImportStatusFunc status, EImportCompleteFunc done, void *data) +e_import_import(EImport *ei, EImportTarget *t, EImportImporter *im, EImportStatusFunc status, EImportCompleteFunc done, gpointer data) { g_return_if_fail(im != NULL); g_return_if_fail(im != NULL); @@ -234,7 +234,7 @@ void e_import_complete(EImport *ei, EImportTarget *target) ei->done(ei, ei->done_data); } -void e_import_status(EImport *ei, EImportTarget *target, const char *what, int pc) +void e_import_status(EImport *ei, EImportTarget *target, const gchar *what, gint pc) { if (ei->status) ei->status(ei, what, pc, ei->done_data); @@ -285,7 +285,7 @@ e_import_get_importers(EImport *emp, EImportTarget *target) * **/ void -e_import_class_add_importer(EImportClass *klass, EImportImporter *importer, EImportImporterFunc freefunc, void *data) +e_import_class_add_importer(EImportClass *klass, EImportImporter *importer, EImportImporterFunc freefunc, gpointer data) { struct _EImportImporters *node, *ei, *en; @@ -337,7 +337,7 @@ void e_import_class_remove_importer(EImportClass *klass, EImportImporter *f) * Allocate a new import target suitable for this class. Implementing * classes will define the actual content of the target. **/ -void *e_import_target_new(EImport *ep, int type, size_t size) +gpointer e_import_target_new(EImport *ep, gint type, size_t size) { EImportTarget *t; @@ -364,14 +364,14 @@ void *e_import_target_new(EImport *ep, int type, size_t size) * free custom targets. **/ void -e_import_target_free(EImport *ep, void *o) +e_import_target_free(EImport *ep, gpointer o) { EImportTarget *t = o; ((EImportClass *)G_OBJECT_GET_CLASS(ep))->target_free(ep, t); } -EImportTargetURI *e_import_target_new_uri(EImport *ei, const char *suri, const char *duri) +EImportTargetURI *e_import_target_new_uri(EImport *ei, const gchar *suri, const gchar *duri) { EImportTargetURI *t = e_import_target_new(ei, E_IMPORT_TARGET_URI, sizeof(*t)); @@ -381,7 +381,7 @@ EImportTargetURI *e_import_target_new_uri(EImport *ei, const char *suri, const c return t; } -EImportTargetHome *e_import_target_new_home(EImport *ei, const char *home) +EImportTargetHome *e_import_target_new_home(EImport *ei, const gchar *home) { EImportTargetHome *t = e_import_target_new(ei, E_IMPORT_TARGET_HOME, sizeof(*t)); @@ -417,7 +417,7 @@ EImportTargetHome *e_import_target_new_home(EImport *ei, const char *home) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EImportHook *)eph) static const EImportHookTargetMask eih_no_masks[] = { @@ -463,7 +463,7 @@ static void eih_cancel(EImport *ei, EImportTarget *target, EImportImporter *im) } static void -eih_free_importer(EImportImporter *im, void *data) +eih_free_importer(EImportImporter *im, gpointer data) { EImportHookImporter *ihook = (EImportHookImporter *)im; @@ -479,12 +479,12 @@ emph_construct_importer(EPluginHook *eph, xmlNodePtr root) struct _EImportHookImporter *item; EImportHookTargetMap *map; EImportHookClass *klass = (EImportHookClass *)G_OBJECT_GET_CLASS(eph); - char *tmp; + gchar *tmp; d(printf(" loading import item\n")); item = g_malloc0(sizeof(*item)); - tmp = (char *)xmlGetProp(root, (const unsigned char *)"target"); + tmp = (gchar *)xmlGetProp(root, (const guchar *)"target"); if (tmp == NULL) goto error; map = g_hash_table_lookup(klass->target_map, tmp); @@ -535,7 +535,7 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "importer") == 0) { + if (strcmp((gchar *)node->name, "importer") == 0) { struct _EImportHookImporter *ihook; ihook = emph_construct_importer(eph, node); @@ -565,7 +565,7 @@ emph_finalise(GObject *o) static void emph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = emph_finalise; klass->construct = emph_construct; @@ -626,5 +626,5 @@ e_import_hook_get_type(void) **/ void e_import_hook_class_add_target_map(EImportHookClass *klass, const EImportHookTargetMap *map) { - g_hash_table_insert(klass->target_map, (void *)map->type, (void *)map); + g_hash_table_insert(klass->target_map, (gpointer)map->type, (gpointer)map); } diff --git a/e-util/e-import.h b/e-util/e-import.h index 4ca1ef1829..760544667d 100644 --- a/e-util/e-import.h +++ b/e-util/e-import.h @@ -44,11 +44,11 @@ typedef struct _EImportImporter EImportImporter; typedef struct _EImportFactory EImportFactory; typedef struct _EImportTarget EImportTarget; -typedef void (*EImportCompleteFunc)(EImport *ei, void *data); -typedef void (*EImportStatusFunc)(EImport *ei, const char *what, int pc, void *data); +typedef void (*EImportCompleteFunc)(EImport *ei, gpointer data); +typedef void (*EImportStatusFunc)(EImport *ei, const gchar *what, gint pc, gpointer data); -typedef void (*EImportFactoryFunc)(EImport *ei, void *data); -typedef void (*EImportImporterFunc)(EImportImporter *importer, void *data); +typedef void (*EImportFactoryFunc)(EImport *ei, gpointer data); +typedef void (*EImportImporterFunc)(EImportImporter *importer, gpointer data); typedef gboolean (*EImportSupportedFunc)(EImport *ei, EImportTarget *, EImportImporter *im); typedef struct _GtkWidget *(*EImportWidgetFunc)(EImport *ei, EImportTarget *, EImportImporter *im); typedef void (*EImportImportFunc)(EImport *ei, EImportTarget *, EImportImporter *im); @@ -75,18 +75,18 @@ enum _e_import_target_t { struct _EImportImporter { enum _e_import_target_t type; - int pri; + gint pri; EImportSupportedFunc supported; EImportWidgetFunc get_widget; EImportImportFunc import; EImportImportFunc cancel; - void *user_data; + gpointer user_data; /* ?? */ - char *name; - char *description; + gchar *name; + gchar *description; }; /** @@ -117,14 +117,14 @@ typedef struct _EImportTargetHome EImportTargetHome; struct _EImportTargetURI { struct _EImportTarget target; - char *uri_src; - char *uri_dest; + gchar *uri_src; + gchar *uri_dest; }; struct _EImportTargetHome { struct _EImportTarget target; - char *homedir; + gchar *homedir; }; /** @@ -140,11 +140,11 @@ struct _EImportTargetHome { struct _EImport { GObject object; - char *id; + gchar *id; EImportStatusFunc status; EImportCompleteFunc done; - void *done_data; + gpointer done_data; }; /** @@ -170,29 +170,29 @@ struct _EImportClass { GType e_import_get_type(void); -EImport *e_import_new(const char *id); +EImport *e_import_new(const gchar *id); /* Static class methods */ -void e_import_class_add_importer(EImportClass *klass, EImportImporter *importer, EImportImporterFunc freefunc, void *data); +void e_import_class_add_importer(EImportClass *klass, EImportImporter *importer, EImportImporterFunc freefunc, gpointer data); void e_import_class_remove_importer(EImportClass *klass, EImportImporter *f); GSList *e_import_get_importers(EImport *emp, EImportTarget *target); -EImport *e_import_construct(EImport *, const char *id); +EImport *e_import_construct(EImport *, const gchar *id); -void e_import_import(EImport *ei, EImportTarget *, EImportImporter *, EImportStatusFunc status, EImportCompleteFunc done, void *data); +void e_import_import(EImport *ei, EImportTarget *, EImportImporter *, EImportStatusFunc status, EImportCompleteFunc done, gpointer data); void e_import_cancel(EImport *, EImportTarget *, EImportImporter *); struct _GtkWidget *e_import_get_widget(EImport *ei, EImportTarget *, EImportImporter *); -void e_import_status(EImport *, EImportTarget *, const char *what, int pc); +void e_import_status(EImport *, EImportTarget *, const gchar *what, gint pc); void e_import_complete(EImport *, EImportTarget *); -void *e_import_target_new(EImport *ep, int type, size_t size); -void e_import_target_free(EImport *ep, void *o); +gpointer e_import_target_new(EImport *ep, gint type, size_t size); +void e_import_target_free(EImport *ep, gpointer o); -EImportTargetURI *e_import_target_new_uri(EImport *ei, const char *suri, const char *duri); -EImportTargetHome *e_import_target_new_home(EImport *ei, const char *home); +EImportTargetURI *e_import_target_new_uri(EImport *ei, const gchar *suri, const gchar *duri); +EImportTargetHome *e_import_target_new_home(EImport *ei, const gchar *home); /* ********************************************************************** */ @@ -216,10 +216,10 @@ struct _EImportHookImporter { /* user_data == EImportHook */ - char *supported; - char *get_widget; - char *import; - char *cancel; + gchar *supported; + gchar *get_widget; + gchar *import; + gchar *cancel; }; /** diff --git a/e-util/e-menu.c b/e-util/e-menu.c index e5472d6bbc..4687e97fb1 100644 --- a/e-util/e-menu.c +++ b/e-util/e-menu.c @@ -42,9 +42,9 @@ struct _EMenuFactory { struct _EMenuFactory *next, *prev; - char *menuid; + gchar *menuid; EMenuFactoryFunc factory; - void *factory_data; + gpointer factory_data; }; struct _item_node { @@ -64,7 +64,7 @@ struct _menu_node { GSList *pixmaps; EMenuItemsFunc freefunc; - void *data; + gpointer data; /* a copy of items wrapped in an item_node, for bonobo * callback mapping */ @@ -183,7 +183,7 @@ e_menu_get_type(void) * * Return value: Returns @em. **/ -EMenu *e_menu_construct(EMenu *em, const char *menuid) +EMenu *e_menu_construct(EMenu *em, const gchar *menuid) { struct _EMenuFactory *f; EMenuClass *klass; @@ -232,8 +232,8 @@ EMenu *e_menu_construct(EMenu *em, const char *menuid) * * Return value: A handle that can be passed to remove_items as required. **/ -void * -e_menu_add_items(EMenu *emp, GSList *items, GSList *uifiles, GSList *pixmaps, EMenuItemsFunc freefunc, void *data) +gpointer +e_menu_add_items(EMenu *emp, GSList *items, GSList *uifiles, GSList *pixmaps, EMenuItemsFunc freefunc, gpointer data) { struct _menu_node *node; GSList *l; @@ -276,7 +276,7 @@ e_menu_add_items(EMenu *emp, GSList *items, GSList *uifiles, GSList *pixmaps, EM /* FIXME: add the menu's to a running menu if it is there? */ - return (void *)node; + return (gpointer)node; } /** @@ -287,7 +287,7 @@ e_menu_add_items(EMenu *emp, GSList *items, GSList *uifiles, GSList *pixmaps, EM * Remove menu items previously added. **/ void -e_menu_remove_items(EMenu *emp, void *handle) +e_menu_remove_items(EMenu *emp, gpointer handle) { struct _menu_node *node = handle; struct _item_node *inode; @@ -318,7 +318,7 @@ e_menu_remove_items(EMenu *emp, void *handle) } static void -em_activate_toggle(BonoboUIComponent *component, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +em_activate_toggle(BonoboUIComponent *component, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { struct _item_node *inode = data; @@ -329,7 +329,7 @@ em_activate_toggle(BonoboUIComponent *component, const char *path, Bonobo_UIComp } static void -em_activate(BonoboUIComponent *uic, void *data, const char *cname) +em_activate(BonoboUIComponent *uic, gpointer data, const gchar *cname) { struct _item_node *inode = data; @@ -350,7 +350,7 @@ em_activate(BonoboUIComponent *uic, void *data, const char *cname) * This should always be called in the strict sequence of activate, then * deactivate, repeated any number of times. **/ -void e_menu_activate(EMenu *em, struct _BonoboUIComponent *uic, int act) +void e_menu_activate(EMenu *em, struct _BonoboUIComponent *uic, gint act) { struct _EMenuPrivate *p = em->priv; struct _menu_node *mw; @@ -358,7 +358,7 @@ void e_menu_activate(EMenu *em, struct _BonoboUIComponent *uic, int act) if (act) { GArray *verbs; - int i; + gint i; em->uic = uic; @@ -432,7 +432,7 @@ void e_menu_activate(EMenu *em, struct _BonoboUIComponent *uic, int act) * This is used by the owner of the menu and view to update the menu * system based on user input or changed system state. **/ -void e_menu_update_target(EMenu *em, void *tp) +void e_menu_update_target(EMenu *em, gpointer tp) { struct _EMenuPrivate *p = em->priv; EMenuTarget *t = tp; @@ -457,7 +457,7 @@ void e_menu_update_target(EMenu *em, void *tp) for (mw = (struct _menu_node *)p->menus.head;mw->next;mw=mw->next) { for (l = mw->items;l;l=g_slist_next(l)) { EMenuItem *item = l->data; - int state; + gint state; d(printf("checking item '%s' mask %08x against target %08x\n", item->verb, item->enable, mask)); @@ -487,7 +487,7 @@ void e_menu_update_target(EMenu *em, void *tp) * Return value: A handle to the factory. **/ EMenuFactory * -e_menu_class_add_factory(EMenuClass *klass, const char *menuid, EMenuFactoryFunc func, void *data) +e_menu_class_add_factory(EMenuClass *klass, const gchar *menuid, EMenuFactoryFunc func, gpointer data) { struct _EMenuFactory *f = g_malloc0(sizeof(*f)); @@ -538,7 +538,7 @@ e_menu_class_remove_factory(EMenuClass *klass, EMenuFactory *f) * to specify the actual target size, which may vary depending on the * implementing class. **/ -void *e_menu_target_new(EMenu *ep, int type, size_t size) +gpointer e_menu_target_new(EMenu *ep, gint type, size_t size) { EMenuTarget *t; @@ -563,7 +563,7 @@ void *e_menu_target_new(EMenu *ep, int type, size_t size) * Free a target. **/ void -e_menu_target_free(EMenu *ep, void *o) +e_menu_target_free(EMenu *ep, gpointer o) { EMenuTarget *t = o; @@ -601,7 +601,7 @@ e_menu_target_free(EMenu *ep, void *o) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EMenuHook *)eph) /* must have 1:1 correspondence with e-menu types in order */ @@ -624,28 +624,28 @@ static const EPluginHookTargetKey emph_pixmap_sizes[] = { }; static void -emph_menu_activate(EMenu *em, EMenuItem *item, void *data) +emph_menu_activate(EMenu *em, EMenuItem *item, gpointer data) { EMenuHook *hook = data; - d(printf("invoking plugin hook '%s' %p\n", (char *)item->user_data, em->target)); + d(printf("invoking plugin hook '%s' %p\n", (gchar *)item->user_data, em->target)); e_plugin_invoke(hook->hook.plugin, item->user_data, em->target); } static void -emph_menu_toggle_activate(EMenu *em, EMenuItem *item, int state, void *data) +emph_menu_toggle_activate(EMenu *em, EMenuItem *item, gint state, gpointer data) { EMenuHook *hook = data; /* FIXME: where does the toggle state go? */ - d(printf("invoking plugin hook '%s' %p\n", (char *)item->user_data, em->target)); + d(printf("invoking plugin hook '%s' %p\n", (gchar *)item->user_data, em->target)); e_plugin_invoke(hook->hook.plugin, item->user_data, em->target); } static void -emph_menu_factory(EMenu *emp, void *data) +emph_menu_factory(EMenu *emp, gpointer data) { struct _EMenuHookMenu *menu = data; @@ -754,13 +754,13 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) xmlNodePtr node; EMenuHookTargetMap *map; EMenuHookClass *klass = (EMenuHookClass *)G_OBJECT_GET_CLASS(eph); - char *tmp; + gchar *tmp; d(printf(" loading menu\n")); menu = g_malloc0(sizeof(*menu)); menu->hook = (EMenuHook *)eph; - tmp = (char *)xmlGetProp(root, (const unsigned char *)"target"); + tmp = (gchar *)xmlGetProp(root, (const guchar *)"target"); if (tmp == NULL) goto error; map = g_hash_table_lookup(klass->target_map, tmp); @@ -777,14 +777,14 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) } node = root->children; while (node) { - if (0 == strcmp((char *)node->name, "item")) { + if (0 == strcmp((gchar *)node->name, "item")) { struct _EMenuItem *item; item = emph_construct_item(eph, menu, node, map); if (item) menu->items = g_slist_append(menu->items, item); - } else if (0 == strcmp((char *)node->name, "ui")) { - tmp = (char *)xmlGetProp(node, (const unsigned char *)"file"); + } else if (0 == strcmp((gchar *)node->name, "ui")) { + tmp = (gchar *)xmlGetProp(node, (const guchar *)"file"); if (tmp) { EMenuUIFile *ui = g_malloc0(sizeof(*ui)); @@ -792,7 +792,7 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) xmlFree(tmp); #ifdef G_OS_WIN32 { - char *mapped_location = + gchar *mapped_location = e_util_replace_prefix (EVOLUTION_PREFIX, e_util_get_prefix (), ui->filename); @@ -804,7 +804,7 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) ui->appname = g_strdup("Evolution"); menu->uis = g_slist_append(menu->uis, ui); } - } else if (0 == strcmp((char *)node->name, "pixmap")) { + } else if (0 == strcmp((gchar *)node->name, "pixmap")) { struct _EMenuPixmap *pixmap; pixmap = emph_construct_pixmap(eph, menu, node); @@ -839,7 +839,7 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "menu") == 0) { + if (strcmp((gchar *)node->name, "menu") == 0) { struct _EMenuHookMenu *menu; menu = emph_construct_menu(eph, node); @@ -921,5 +921,5 @@ e_menu_hook_get_type(void) **/ void e_menu_hook_class_add_target_map(EMenuHookClass *klass, const EMenuHookTargetMap *map) { - g_hash_table_insert(klass->target_map, (void *)map->type, (void *)map); + g_hash_table_insert(klass->target_map, (gpointer)map->type, (gpointer)map); } diff --git a/e-util/e-menu.h b/e-util/e-menu.h index 5df8f11b28..42e03572ae 100644 --- a/e-util/e-menu.h +++ b/e-util/e-menu.h @@ -47,10 +47,10 @@ typedef struct _EMenuPixmap EMenuPixmap; typedef struct _EMenuFactory EMenuFactory; /* anonymous type */ typedef struct _EMenuTarget EMenuTarget; -typedef void (*EMenuFactoryFunc)(EMenu *emp, void *data); -typedef void (*EMenuActivateFunc)(EMenu *, EMenuItem *, void *data); -typedef void (*EMenuToggleActivateFunc)(EMenu *, EMenuItem *, int state, void *data); -typedef void (*EMenuItemsFunc)(EMenu *, GSList *items, GSList *uifiles, GSList *pixmaps, void *data); +typedef void (*EMenuFactoryFunc)(EMenu *emp, gpointer data); +typedef void (*EMenuActivateFunc)(EMenu *, EMenuItem *, gpointer data); +typedef void (*EMenuToggleActivateFunc)(EMenu *, EMenuItem *, gint state, gpointer data); +typedef void (*EMenuItemsFunc)(EMenu *, GSList *items, GSList *uifiles, GSList *pixmaps, gpointer data); /** * enum _e_menu_t - Menu item type. @@ -90,10 +90,10 @@ enum _e_menu_t { **/ struct _EMenuItem { enum _e_menu_t type; - char *path; /* full path? can we just create it from verb? */ - char *verb; /* command verb */ + gchar *path; /* full path? can we just create it from verb? */ + gchar *verb; /* command verb */ GCallback activate; /* depends on type, the bonobo activate callback */ - void *user_data; /* up to caller to use */ + gpointer user_data; /* up to caller to use */ guint32 visible; /* is visible mask */ guint32 enable; /* is enable mask */ }; @@ -112,10 +112,10 @@ struct _EMenuItem { * supplied separately from the menu definition. **/ struct _EMenuPixmap { - char *command; - char *name; - int size; - char *pixmap; + gchar *command; + gchar *name; + gint size; + gchar *pixmap; }; /** @@ -129,9 +129,9 @@ struct _EMenuPixmap { * the menu is activated. **/ struct _EMenuUIFile { - char *appdir; - char *appname; - char *filename; + gchar *appdir; + gchar *appname; + gchar *filename; }; /** @@ -178,7 +178,7 @@ struct _EMenu { GObject object; struct _EMenuPrivate *priv; - char *menuid; + gchar *menuid; struct _BonoboUIComponent *uic; EMenuTarget *target; }; @@ -208,22 +208,22 @@ struct _EMenuClass { GType e_menu_get_type(void); /* Static class methods */ -EMenuFactory *e_menu_class_add_factory(EMenuClass *klass, const char *menuid, EMenuFactoryFunc func, void *data); +EMenuFactory *e_menu_class_add_factory(EMenuClass *klass, const gchar *menuid, EMenuFactoryFunc func, gpointer data); void e_menu_class_remove_factory(EMenuClass *klass, EMenuFactory *f); -EMenu *e_menu_construct(EMenu *menu, const char *menuid); +EMenu *e_menu_construct(EMenu *menu, const gchar *menuid); -void e_menu_add_ui(EMenu *, const char *appdir, const char *appname, const char *filename); -void e_menu_add_pixmap(EMenu *, const char *cmd, const char *name, int size); +void e_menu_add_ui(EMenu *, const gchar *appdir, const gchar *appname, const gchar *filename); +void e_menu_add_pixmap(EMenu *, const gchar *cmd, const gchar *name, gint size); -void *e_menu_add_items(EMenu *emp, GSList *items, GSList *uifiles, GSList *pixmaps, EMenuItemsFunc freefunc, void *data); -void e_menu_remove_items(EMenu *emp, void *handle); +gpointer e_menu_add_items(EMenu *emp, GSList *items, GSList *uifiles, GSList *pixmaps, EMenuItemsFunc freefunc, gpointer data); +void e_menu_remove_items(EMenu *emp, gpointer handle); -void e_menu_activate(EMenu *, struct _BonoboUIComponent *uic, int act); -void e_menu_update_target(EMenu *, void *); +void e_menu_activate(EMenu *, struct _BonoboUIComponent *uic, gint act); +void e_menu_update_target(EMenu *, gpointer ); -void *e_menu_target_new(EMenu *, int type, size_t size); -void e_menu_target_free(EMenu *, void *); +gpointer e_menu_target_new(EMenu *, gint type, size_t size); +void e_menu_target_free(EMenu *, gpointer ); /* ********************************************************************** */ @@ -263,8 +263,8 @@ typedef void (*EMenuHookFunc)(struct _EPlugin *plugin, EMenuTarget *target); **/ struct _EMenuHookMenu { struct _EMenuHook *hook; /* parent pointer */ - char *id; /* target menu id for these menu items */ - int target_type; /* target type, not used */ + gchar *id; /* target menu id for these menu items */ + gint target_type; /* target type, not used */ GSList *items; /* items to add to menu */ GSList *uis; /* ui files */ GSList *pixmaps; /* pixmap descriptors */ diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c index 682563907c..0044b2e085 100644 --- a/e-util/e-mktemp.c +++ b/e-util/e-mktemp.c @@ -51,14 +51,14 @@ #define TEMP_SCAN (60) static int -expire_dir_rec(const char *base, time_t now) +expire_dir_rec(const gchar *base, time_t now) { GDir *dir; - const char *d; + const gchar *d; GString *path; size_t len; struct stat st; - int count = 0; + gint count = 0; d(printf("expire dir '%s'\n", base)); @@ -109,7 +109,7 @@ get_dir (gboolean make) static time_t last = 0; #ifdef TEMP_HOME - char *tmpdir = NULL; + gchar *tmpdir = NULL; tmpdir = g_build_filename(e_get_user_data_dir (), "cache", "tmp", NULL); path = g_string_new(tmpdir); @@ -122,7 +122,7 @@ get_dir (gboolean make) path = g_string_new("/tmp/evolution-"); g_string_append_printf (path, "%d", (int) getuid ()); if (make) { - int ret; + gint ret; /* shoot now, ask questions later */ ret = g_mkdir (path->str, S_IRWXU); @@ -163,11 +163,11 @@ get_dir (gboolean make) return path; } -char * -e_mktemp (const char *template) +gchar * +e_mktemp (const gchar *template) { GString *path; - char *ret; + gchar *ret; path = get_dir (TRUE); if (!path) @@ -186,11 +186,11 @@ e_mktemp (const char *template) } -int -e_mkstemp (const char *template) +gint +e_mkstemp (const gchar *template) { GString *path; - int fd; + gint fd; path = get_dir (TRUE); if (!path) @@ -209,11 +209,11 @@ e_mkstemp (const char *template) } -char * -e_mkdtemp (const char *template) +gchar * +e_mkdtemp (const gchar *template) { GString *path; - char *tmpdir; + gchar *tmpdir; path = get_dir (TRUE); if (!path) diff --git a/e-util/e-mktemp.h b/e-util/e-mktemp.h index 01dbd18119..c9b1d55b18 100644 --- a/e-util/e-mktemp.h +++ b/e-util/e-mktemp.h @@ -24,10 +24,10 @@ #ifndef __E_MKTEMP_H__ #define __E_MKTEMP_H__ -char *e_mktemp (const char *template); +gchar *e_mktemp (const gchar *template); -int e_mkstemp (const char *template); +gint e_mkstemp (const gchar *template); -char *e_mkdtemp (const char *template); +gchar *e_mkdtemp (const gchar *template); #endif /* __E_MKTEMP_H__ */ diff --git a/e-util/e-non-intrusive-error-dialog.c b/e-util/e-non-intrusive-error-dialog.c index bb24a2360e..9e874524e4 100644 --- a/e-util/e-non-intrusive-error-dialog.c +++ b/e-util/e-non-intrusive-error-dialog.c @@ -89,7 +89,7 @@ eni_render_date (GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { time_t t; - char sdt[100]; /* Should be sufficient? */ + gchar sdt[100]; /* Should be sufficient? */ gtk_tree_model_get (model, iter, COL_TIME, &t, -1); strftime (sdt, 100, "%x %X", localtime (&t)); @@ -97,9 +97,9 @@ eni_render_date (GtkTreeViewColumn *column, GtkCellRenderer *renderer, } static void -eni_append_logs (const char *txt, GtkListStore *store) +eni_append_logs (const gchar *txt, GtkListStore *store) { - char **str; + gchar **str; str = g_strsplit (txt, ":", 3); if (str[0] && str[1] && str[2]) { @@ -119,7 +119,7 @@ eni_append_logs (const char *txt, GtkListStore *store) } static guint -eni_config_get_error_level (const char *path) +eni_config_get_error_level (const gchar *path) { GConfClient *gconf_client; guint error_level; @@ -132,7 +132,7 @@ eni_config_get_error_level (const char *path) } guint -eni_config_get_error_timeout (const char *path) +eni_config_get_error_timeout (const gchar *path) { GConfClient *gconf_client; guint error_time; @@ -145,14 +145,14 @@ eni_config_get_error_timeout (const char *path) } static void -eni_error_timeout_changed (GtkSpinButton *b, void *data) +eni_error_timeout_changed (GtkSpinButton *b, gpointer data) { GConfClient *gconf_client; - int value = gtk_spin_button_get_value_as_int (b); + gint value = gtk_spin_button_get_value_as_int (b); gconf_client = gconf_client_get_default (); - gconf_client_set_int (gconf_client, (char *) data, value, NULL); + gconf_client_set_int (gconf_client, (gchar *) data, value, NULL); g_object_unref (gconf_client); } @@ -160,17 +160,17 @@ static void eni_error_level_value_changed (GtkComboBox *w, gpointer *data) { GConfClient *gconf_client; - int value = gtk_combo_box_get_active (w); + gint value = gtk_combo_box_get_active (w); gconf_client = gconf_client_get_default (); - gconf_client_set_int (gconf_client, (char *) data, value, NULL); + gconf_client_set_int (gconf_client, (gchar *) data, value, NULL); g_object_unref (gconf_client); } void -eni_show_logger(ELogger *logger, GtkWidget *top,const char *error_timeout_path, const char *error_level_path) +eni_show_logger(ELogger *logger, GtkWidget *top,const gchar *error_timeout_path, const gchar *error_level_path) { GtkWidget *container; GtkWidget *label; @@ -181,7 +181,7 @@ eni_show_logger(ELogger *logger, GtkWidget *top,const char *error_timeout_path, GtkListStore *store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; - int i; + gint i; toplevel = gtk_widget_get_toplevel (top); diff --git a/e-util/e-non-intrusive-error-dialog.h b/e-util/e-non-intrusive-error-dialog.h index 827e17f868..7b93ba1098 100644 --- a/e-util/e-non-intrusive-error-dialog.h +++ b/e-util/e-non-intrusive-error-dialog.h @@ -50,11 +50,11 @@ enum }; /* eni - error non intrusive*/ -guint eni_config_get_error_timeout (const char *path); +guint eni_config_get_error_timeout (const gchar *path); void eni_show_logger (ELogger *logger, GtkWidget *widget, - const char *error_timeout_path, - const char *error_level_path); + const gchar *error_timeout_path, + const gchar *error_level_path); G_END_DECLS diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c index b2338ccead..80eb361027 100644 --- a/e-util/e-pilot-map.c +++ b/e-util/e-pilot-map.c @@ -34,7 +34,7 @@ typedef struct { - char *uid; + gchar *uid; gboolean archived; gboolean touched; } EPilotMapPidNode; @@ -53,9 +53,9 @@ typedef struct } EPilotMapWriteData; static void -real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archived, gboolean touch) +real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const gchar *uid, gboolean archived, gboolean touch) { - char *new_uid; + gchar *new_uid; guint32 *new_pid; EPilotMapPidNode *pnode; EPilotMapUidNode *unode; @@ -92,35 +92,35 @@ real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean } static void -map_set_node_timet (xmlNodePtr node, const char *name, time_t t) +map_set_node_timet (xmlNodePtr node, const gchar *name, time_t t) { - char *tstring; + gchar *tstring; tstring = g_strdup_printf ("%ld", t); - xmlSetProp (node, (unsigned char *)name, (unsigned char *)tstring); + xmlSetProp (node, (guchar *)name, (guchar *)tstring); g_free (tstring); } static void -map_sax_start_element (void *data, const xmlChar *name, +map_sax_start_element (gpointer data, const xmlChar *name, const xmlChar **attrs) { EPilotMap *map = (EPilotMap *)data; - if (!strcmp ((char *)name, "PilotMap")) { + if (!strcmp ((gchar *)name, "PilotMap")) { while (attrs && *attrs != NULL) { const xmlChar **val = attrs; val++; - if (!strcmp ((char *)*attrs, "timestamp")) - map->since = (time_t)strtoul ((char *)*val, NULL, 0); + if (!strcmp ((gchar *)*attrs, "timestamp")) + map->since = (time_t)strtoul ((gchar *)*val, NULL, 0); attrs = ++val; } } - if (!strcmp ((char *)name, "map")) { - const char *uid = NULL; + if (!strcmp ((gchar *)name, "map")) { + const gchar *uid = NULL; guint32 pid = 0; gboolean archived = FALSE; @@ -128,14 +128,14 @@ map_sax_start_element (void *data, const xmlChar *name, const xmlChar **val = attrs; val++; - if (!strcmp ((char *)*attrs, "uid")) - uid = (char *)*val; + if (!strcmp ((gchar *)*attrs, "uid")) + uid = (gchar *)*val; - if (!strcmp ((char *)*attrs, "pilot_id")) - pid = strtoul ((char *)*val, NULL, 0); + if (!strcmp ((gchar *)*attrs, "pilot_id")) + pid = strtoul ((gchar *)*val, NULL, 0); - if (!strcmp ((char *)*attrs, "archived")) - archived = strtoul ((char *)*val, NULL, 0)== 1 ? TRUE : FALSE; + if (!strcmp ((gchar *)*attrs, "archived")) + archived = strtoul ((gchar *)*val, NULL, 0)== 1 ? TRUE : FALSE; attrs = ++val; } @@ -152,25 +152,25 @@ map_write_foreach (gpointer key, gpointer value, gpointer data) { EPilotMapWriteData *wd = data; xmlNodePtr root = wd->root; - char *uid = key; + gchar *uid = key; EPilotMapUidNode *unode = value; xmlNodePtr mnode; if (wd->touched_only && !unode->touched) return; - mnode = xmlNewChild (root, NULL, (const unsigned char *)"map", NULL); - xmlSetProp (mnode, (const unsigned char *)"uid", (unsigned char *)uid); + mnode = xmlNewChild (root, NULL, (const guchar *)"map", NULL); + xmlSetProp (mnode, (const guchar *)"uid", (guchar *)uid); if (unode->archived) { - xmlSetProp (mnode, (const unsigned char *)"archived", (const unsigned char *)"1"); + xmlSetProp (mnode, (const guchar *)"archived", (const guchar *)"1"); } else { - char *pidstr; + gchar *pidstr; pidstr = g_strdup_printf ("%d", unode->pid); - xmlSetProp (mnode, (const unsigned char *)"pilot_id", (unsigned char *)pidstr); + xmlSetProp (mnode, (const guchar *)"pilot_id", (guchar *)pidstr); g_free (pidstr); - xmlSetProp (mnode, (const unsigned char *)"archived", (const unsigned char *)"0"); + xmlSetProp (mnode, (const guchar *)"archived", (const guchar *)"0"); } } @@ -190,7 +190,7 @@ e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pid) } gboolean -e_pilot_map_uid_is_archived (EPilotMap *map, const char *uid) +e_pilot_map_uid_is_archived (EPilotMap *map, const gchar *uid) { EPilotMapUidNode *unode; @@ -206,7 +206,7 @@ e_pilot_map_uid_is_archived (EPilotMap *map, const char *uid) } void -e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archived) +e_pilot_map_insert (EPilotMap *map, guint32 pid, const gchar *uid, gboolean archived) { EPilotMapPidNode *pnode; EPilotMapUidNode *unode; @@ -250,7 +250,7 @@ e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid) } void -e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid) +e_pilot_map_remove_by_uid (EPilotMap *map, const gchar *uid) { EPilotMapPidNode *pnode; EPilotMapUidNode *unode; @@ -270,7 +270,7 @@ e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid) guint32 -e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch) +e_pilot_map_lookup_pid (EPilotMap *map, const gchar *uid, gboolean touch) { EPilotMapUidNode *unode = NULL; @@ -294,7 +294,7 @@ e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch) return unode->pid; } -const char * +const gchar * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch) { EPilotMapPidNode *pnode = NULL; @@ -319,8 +319,8 @@ e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch) return pnode->uid; } -int -e_pilot_map_read (const char *filename, EPilotMap **map) +gint +e_pilot_map_read (const gchar *filename, EPilotMap **map) { xmlSAXHandler handler; EPilotMap *new_map; @@ -357,22 +357,22 @@ e_pilot_map_read (const char *filename, EPilotMap **map) return 0; } -int -e_pilot_map_write (const char *filename, EPilotMap *map) +gint +e_pilot_map_write (const gchar *filename, EPilotMap *map) { EPilotMapWriteData wd; xmlDocPtr doc; - int ret; + gint ret; g_return_val_if_fail (filename != NULL, -1); g_return_val_if_fail (map != NULL, -1); - doc = xmlNewDoc ((const unsigned char *)"1.0"); + doc = xmlNewDoc ((const guchar *)"1.0"); if (doc == NULL) { g_warning ("Pilot map file could not be created\n"); return -1; } - xmlDocSetRootElement (doc, xmlNewDocNode(doc, NULL, (const unsigned char *)"PilotMap", NULL)); + xmlDocSetRootElement (doc, xmlNewDocNode(doc, NULL, (const guchar *)"PilotMap", NULL)); map->since = time (NULL); map_set_node_timet (xmlDocGetRootElement (doc), "timestamp", map->since); diff --git a/e-util/e-pilot-map.h b/e-util/e-pilot-map.h index 46eaf54199..32bcc942bf 100644 --- a/e-util/e-pilot-map.h +++ b/e-util/e-pilot-map.h @@ -41,17 +41,17 @@ struct _EPilotMap }; gboolean e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pid); -gboolean e_pilot_map_uid_is_archived (EPilotMap *map, const char *uid); +gboolean e_pilot_map_uid_is_archived (EPilotMap *map, const gchar *uid); -void e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archived); +void e_pilot_map_insert (EPilotMap *map, guint32 pid, const gchar *uid, gboolean archived); void e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid); -void e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid); +void e_pilot_map_remove_by_uid (EPilotMap *map, const gchar *uid); -guint32 e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch); -const char * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch); +guint32 e_pilot_map_lookup_pid (EPilotMap *map, const gchar *uid, gboolean touch); +const gchar * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch); -int e_pilot_map_read (const char *filename, EPilotMap **map); -int e_pilot_map_write (const char *filename, EPilotMap *map); +gint e_pilot_map_read (const gchar *filename, EPilotMap **map); +gint e_pilot_map_write (const gchar *filename, EPilotMap *map); void e_pilot_map_clear (EPilotMap *map); diff --git a/e-util/e-pilot-util.c b/e-util/e-pilot-util.c index 582c9458e1..94c86a1084 100644 --- a/e-util/e-pilot-util.c +++ b/e-util/e-pilot-util.c @@ -30,11 +30,11 @@ #include "e-pilot-util.h" -char * -e_pilot_utf8_to_pchar (const char *string) +gchar * +e_pilot_utf8_to_pchar (const gchar *string) { - char *pstring = NULL; - int res; + gchar *pstring = NULL; + gint res; if (!string) return NULL; @@ -47,11 +47,11 @@ e_pilot_utf8_to_pchar (const char *string) return pstring; } -char * -e_pilot_utf8_from_pchar (const char *string) +gchar * +e_pilot_utf8_from_pchar (const gchar *string) { - char *ustring = NULL; - int res; + gchar *ustring = NULL; + gint res; if (!string) return NULL; diff --git a/e-util/e-pilot-util.h b/e-util/e-pilot-util.h index 0d7aebbd87..476320c58b 100644 --- a/e-util/e-pilot-util.h +++ b/e-util/e-pilot-util.h @@ -29,8 +29,8 @@ #ifndef E_PILOT_UTIL_H #define E_PILOT_UTIL_H -char *e_pilot_utf8_to_pchar (const char *string); -char *e_pilot_utf8_from_pchar (const char *string); +gchar *e_pilot_utf8_to_pchar (const gchar *string); +gchar *e_pilot_utf8_from_pchar (const gchar *string); ESource *e_pilot_get_sync_source (ESourceList *source_list); void e_pilot_set_sync_source (ESourceList *source_list, ESource *source); diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index 7516fb3f09..61cf2c5e9f 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -88,7 +88,7 @@ struct _plugin_doc { struct _plugin_doc *next; struct _plugin_doc *prev; - char *filename; + gchar *filename; xmlDocPtr doc; GSList *plugin_hooks; /* EPlugin objects with pending hooks */ @@ -101,14 +101,14 @@ enum { }; static gboolean -ep_check_enabled (const char *id) +ep_check_enabled (const gchar *id) { /* Return TRUE if 'id' is NOT in the disabled list. */ return !g_slist_find_custom (ep_disabled, id, (GCompareFunc) strcmp); } static void -ep_set_enabled (const char *id, int state) +ep_set_enabled (const gchar *id, gint state) { /* Bail out if no change to state, when expressed as a boolean: */ if ((state == 0) == (ep_check_enabled(id) == 0)) @@ -135,14 +135,14 @@ static int ep_construct (EPlugin *ep, xmlNodePtr root) { xmlNodePtr node; - int res = -1; - char *localedir; + gint res = -1; + gchar *localedir; ep->domain = e_plugin_xml_prop(root, "domain"); if (ep->domain && (localedir = e_plugin_xml_prop(root, "localedir"))) { #ifdef G_OS_WIN32 - char *mapped_localedir = + gchar *mapped_localedir = e_util_replace_prefix (EVOLUTION_PREFIX, e_util_get_prefix (), localedir); @@ -159,10 +159,10 @@ ep_construct (EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "hook") == 0) { + if (strcmp((gchar *)node->name, "hook") == 0) { struct _EPluginHook *hook; EPluginHookClass *type; - char *class = e_plugin_xml_prop(node, "class"); + gchar *class = e_plugin_xml_prop(node, "class"); if (class == NULL) { g_warning("Plugin '%s' load failed in '%s', missing class property for hook", ep->id, ep->path); @@ -198,11 +198,11 @@ ep_construct (EPlugin *ep, xmlNodePtr root) g_hash_table_insert (ep_plugins_pending_hooks, oldclass, l); ep->hooks_pending = g_slist_prepend (ep->hooks_pending, node); } - } else if (strcmp((char *)node->name, "description") == 0) { + } else if (strcmp((gchar *)node->name, "description") == 0) { ep->description = e_plugin_xml_content_domain(node, ep->domain); - } else if (strcmp((char *)node->name, "author") == 0) { - char *name = e_plugin_xml_prop(node, "name"); - char *email = e_plugin_xml_prop(node, "email"); + } else if (strcmp((gchar *)node->name, "author") == 0) { + gchar *name = e_plugin_xml_prop(node, "name"); + gchar *email = e_plugin_xml_prop(node, "email"); if (name || email) { EPluginAuthor *epa = g_malloc0(sizeof(*epa)); @@ -220,7 +220,7 @@ fail: } static void -ep_enable (EPlugin *ep, int state) +ep_enable (EPlugin *ep, gint state) { GSList *iter; @@ -331,7 +331,7 @@ e_plugin_get_type (void) static GType type = 0; if (G_UNLIKELY (type == 0)) { - char *path, *col, *p; + gchar *path, *col, *p; static const GTypeInfo type_info = { sizeof (EPluginClass), @@ -375,7 +375,7 @@ e_plugin_get_type (void) static EPlugin * ep_load_plugin(xmlNodePtr root, struct _plugin_doc *pdoc) { - char *prop, *id; + gchar *prop, *id; EPluginClass *class; EPlugin *ep; @@ -391,7 +391,7 @@ ep_load_plugin(xmlNodePtr root, struct _plugin_doc *pdoc) return NULL; } - prop = (char *)xmlGetProp(root, (const unsigned char *)"type"); + prop = (gchar *)xmlGetProp(root, (const guchar *)"type"); if (prop == NULL) { g_free(id); g_warning("Invalid e-plugin entry in '%s': no type", pdoc->filename); @@ -421,13 +421,13 @@ ep_load_plugin(xmlNodePtr root, struct _plugin_doc *pdoc) } static int -ep_load(const char *filename, int load_level) +ep_load(const gchar *filename, gint load_level) { xmlDocPtr doc; xmlNodePtr root; - int res = -1; + gint res = -1; EPlugin *ep = NULL; - int cache = FALSE; + gint cache = FALSE; struct _plugin_doc *pdoc; doc = e_xml_parse_file (filename); @@ -435,7 +435,7 @@ ep_load(const char *filename, int load_level) return -1; root = xmlDocGetRootElement(doc); - if (strcmp((char *)root->name, "e-plugin-list") != 0) { + if (strcmp((gchar *)root->name, "e-plugin-list") != 0) { g_warning("No <e-plugin-list> root element: %s", filename); xmlFreeDoc(doc); return -1; @@ -446,8 +446,8 @@ ep_load(const char *filename, int load_level) pdoc->filename = g_strdup(filename); for (root = root->children; root ; root = root->next) { - if (strcmp((char *)root->name, "e-plugin") == 0) { - char *plugin_load_level, *is_system_plugin; + if (strcmp((gchar *)root->name, "e-plugin") == 0) { + gchar *plugin_load_level, *is_system_plugin; plugin_load_level = NULL; plugin_load_level = e_plugin_xml_prop (root, "load_level"); @@ -506,7 +506,7 @@ ep_load(const char *filename, int load_level) static int ep_load_pending(EPlugin *ep, EPluginHookClass *type) { - int res = 0; + gint res = 0; GSList *l, *p; phd(printf("New hook type registered '%s', loading pending hooks on plugin '%s'\n", type->id, ep->id)); @@ -516,7 +516,7 @@ ep_load_pending(EPlugin *ep, EPluginHookClass *type) while (l) { GSList *n = l->next; xmlNodePtr node = l->data; - char *class = (char *)xmlGetProp(node, (const unsigned char *)"class"); + gchar *class = (gchar *)xmlGetProp(node, (const guchar *)"class"); EPluginHook *hook; phd(printf(" checking pending hook '%s'\n", class?class:"<unknown>")); @@ -569,7 +569,7 @@ ep_load_pending(EPlugin *ep, EPluginHookClass *type) * Plugin definitions are XML files ending in the extension ".eplug". **/ void -e_plugin_add_load_path(const char *path) +e_plugin_add_load_path(const gchar *path) { ep_path = g_slist_append(ep_path, g_strdup(path)); } @@ -582,11 +582,11 @@ e_plugin_add_load_path(const char *path) * * Return value: Returns -1 if an error occurred. **/ -int +gint e_plugin_load_plugins(void) { GSList *l; - int i; + gint i; if (ep_types == NULL) { g_warning("no plugin types defined"); @@ -596,8 +596,8 @@ e_plugin_load_plugins(void) for (i=0; i < 3; i++) { for (l = ep_path;l;l = g_slist_next(l)) { GDir *dir; - const char *d; - char *path = l->data; + const gchar *d; + gchar *path = l->data; pd(printf("scanning plugin dir '%s'\n", path)); @@ -609,7 +609,7 @@ e_plugin_load_plugins(void) while ( (d = g_dir_read_name(dir)) ) { if (g_str_has_suffix (d, ".eplug")) { - char * name = g_build_filename(path, d, NULL); + gchar * name = g_build_filename(path, d, NULL); ep_load(name, i); g_free(name); @@ -649,7 +649,7 @@ e_plugin_register_type(GType type) pd(printf("register plugin type '%s'\n", class->type)); - g_hash_table_insert(ep_types, (void *)class->type, class); + g_hash_table_insert(ep_types, (gpointer)class->type, class); /* check for pending plugins */ pdoc = (struct _plugin_doc *)ep_plugin_docs.head; @@ -660,9 +660,9 @@ e_plugin_register_type(GType type) for (l=pdoc->plugins;l;l=g_slist_next(l)) { xmlNodePtr root = l->data; - char *prop_type; + gchar *prop_type; - prop_type = (char *)xmlGetProp(root, (const unsigned char *)"type"); + prop_type = (gchar *)xmlGetProp(root, (const guchar *)"type"); if (!strcmp(prop_type, class->type)) add = g_slist_append(add, l->data); xmlFree(prop_type); @@ -688,7 +688,7 @@ e_plugin_register_type(GType type) } static void -ep_list_plugin(void *key, void *val, void *dat) +ep_list_plugin(gpointer key, gpointer val, gpointer dat) { GSList **l = (GSList **)dat; @@ -725,7 +725,7 @@ e_plugin_list_plugins(void) * * Return value: The return from the construct virtual method. **/ -int +gint e_plugin_construct(EPlugin *ep, xmlNodePtr root) { EPluginClass *class; @@ -751,8 +751,8 @@ e_plugin_construct(EPlugin *ep, xmlNodePtr root) * * Return value: The return of the plugin invocation. **/ -void * -e_plugin_invoke(EPlugin *ep, const char *name, void *data) +gpointer +e_plugin_invoke(EPlugin *ep, const gchar *name, gpointer data) { EPluginClass *class; @@ -778,8 +778,8 @@ e_plugin_invoke(EPlugin *ep, const char *name, void *data) * * Return value: the symbol value, or %NULL if not found **/ -void * -e_plugin_get_symbol(EPlugin *ep, const char *name) +gpointer +e_plugin_get_symbol(EPlugin *ep, const gchar *name) { EPluginClass *class; @@ -801,7 +801,7 @@ e_plugin_get_symbol(EPlugin *ep, const char *name) * THIS IS NOT FULLY IMPLEMENTED YET **/ void -e_plugin_enable(EPlugin *ep, int state) +e_plugin_enable(EPlugin *ep, gint state) { EPluginClass *class; @@ -852,15 +852,15 @@ e_plugin_get_configure_widget (EPlugin *ep) * Return value: The property, allocated in GLib memory, or NULL if no * such property exists. **/ -char * -e_plugin_xml_prop(xmlNodePtr node, const char *id) +gchar * +e_plugin_xml_prop(xmlNodePtr node, const gchar *id) { - char *p = (char *)xmlGetProp(node, (const unsigned char *)id); + gchar *p = (gchar *)xmlGetProp(node, (const guchar *)id); if (g_mem_is_system_malloc()) { return p; } else { - char * out = g_strdup(p); + gchar * out = g_strdup(p); if (p) xmlFree(p); @@ -880,12 +880,12 @@ e_plugin_xml_prop(xmlNodePtr node, const char *id) * Return value: The property, allocated in GLib memory, or NULL if no * such property exists. **/ -char * -e_plugin_xml_prop_domain(xmlNodePtr node, const char *id, const char *domain) +gchar * +e_plugin_xml_prop_domain(xmlNodePtr node, const gchar *id, const gchar *domain) { - char *p, *out; + gchar *p, *out; - p = (char *)xmlGetProp(node, (const unsigned char *)id); + p = (gchar *)xmlGetProp(node, (const guchar *)id); if (p == NULL) return NULL; @@ -908,10 +908,10 @@ e_plugin_xml_prop_domain(xmlNodePtr node, const char *id, const char *domain) * * Return value: The value if set, or @def if not. **/ -int -e_plugin_xml_int(xmlNodePtr node, const char *id, int def) +gint +e_plugin_xml_int(xmlNodePtr node, const gchar *id, gint def) { - char *p = (char *)xmlGetProp(node, (const unsigned char *)id); + gchar *p = (gchar *)xmlGetProp(node, (const guchar *)id); if (p) return atoi(p); @@ -929,15 +929,15 @@ e_plugin_xml_int(xmlNodePtr node, const char *id, int def) * * Return value: The node content, allocated in GLib memory. **/ -char * +gchar * e_plugin_xml_content(xmlNodePtr node) { - char *p = (char *)xmlNodeGetContent(node); + gchar *p = (gchar *)xmlNodeGetContent(node); if (g_mem_is_system_malloc()) { return p; } else { - char * out = g_strdup(p); + gchar * out = g_strdup(p); if (p) xmlFree(p); @@ -956,12 +956,12 @@ e_plugin_xml_content(xmlNodePtr node) * * Return value: The node content, allocated in GLib memory. **/ -char * -e_plugin_xml_content_domain(xmlNodePtr node, const char *domain) +gchar * +e_plugin_xml_content_domain(xmlNodePtr node, const gchar *domain) { - char *p, *out; + gchar *p, *out; - p = (char *)xmlNodeGetContent(node); + p = (gchar *)xmlNodeGetContent(node); if (p == NULL) return NULL; @@ -1005,7 +1005,7 @@ epl_loadmodule(EPlugin *ep, gboolean fatal) return -1; } - if (g_module_symbol(epl->module, "e_plugin_lib_enable", (void *)&enable)) { + if (g_module_symbol(epl->module, "e_plugin_lib_enable", (gpointer)&enable)) { if (enable(epl, TRUE) != 0) { ep->enabled = FALSE; g_module_close(epl->module); @@ -1033,8 +1033,8 @@ e_plugin_load_plugins_with_missing_symbols (void) missing_symbols = NULL; } -static void * -epl_invoke(EPlugin *ep, const char *name, void *data) +static gpointer +epl_invoke(EPlugin *ep, const gchar *name, gpointer data) { EPluginLib *epl = E_PLUGIN_LIB (ep); EPluginLibFunc cb; @@ -1047,7 +1047,7 @@ epl_invoke(EPlugin *ep, const char *name, void *data) if (epl_loadmodule(ep, FALSE) != 0) return NULL; - if (!g_module_symbol(epl->module, name, (void *)&cb)) { + if (!g_module_symbol(epl->module, name, (gpointer)&cb)) { g_warning("Cannot resolve symbol '%s' in plugin '%s' (not exported?)", name, epl->location); return NULL; } @@ -1055,7 +1055,7 @@ epl_invoke(EPlugin *ep, const char *name, void *data) return cb(epl, data); } -static void * +static gpointer epl_get_symbol(EPlugin *ep, const gchar *name) { EPluginLib *epl = E_PLUGIN_LIB (ep); @@ -1086,7 +1086,7 @@ epl_construct(EPlugin *ep, xmlNodePtr root) } #ifdef G_OS_WIN32 { - char *mapped_location = + gchar *mapped_location = e_util_replace_prefix (EVOLUTION_PREFIX, e_util_get_prefix (), epl->location); @@ -1098,9 +1098,9 @@ epl_construct(EPlugin *ep, xmlNodePtr root) if (ep->enabled) { xmlChar *tmp; - tmp = xmlGetProp(root, (const unsigned char *)"load-on-startup"); + tmp = xmlGetProp(root, (const guchar *)"load-on-startup"); if (tmp) { - if (strcmp ((const char *)tmp, "after-ui") == 0) { + if (strcmp ((const gchar *)tmp, "after-ui") == 0) { missing_symbols = g_list_prepend (missing_symbols, g_object_ref (ep)); } else { if (epl_loadmodule(ep, FALSE) != 0) { @@ -1128,7 +1128,7 @@ epl_get_configure_widget (EPlugin *ep) return NULL; } - if (g_module_symbol (epl->module, "e_plugin_lib_get_configure_widget", (void *)&get_configure_widget)) { + if (g_module_symbol (epl->module, "e_plugin_lib_get_configure_widget", (gpointer)&get_configure_widget)) { pd (printf ("\n g_module_symbol is loaded\n")); return (GtkWidget*) get_configure_widget (epl); } @@ -1136,7 +1136,7 @@ epl_get_configure_widget (EPlugin *ep) } static void -epl_enable(EPlugin *ep, int state) +epl_enable(EPlugin *ep, gint state) { EPluginLib *epl = E_PLUGIN_LIB (ep); EPluginLibEnableFunc enable; @@ -1151,7 +1151,7 @@ epl_enable(EPlugin *ep, int state) if (epl_loadmodule(ep, FALSE) != 0) return; - if (g_module_symbol(epl->module, "e_plugin_lib_enable", (void *)&enable)) { + if (g_module_symbol(epl->module, "e_plugin_lib_enable", (gpointer)&enable)) { if (enable(epl, state) != 0) return; } @@ -1243,7 +1243,7 @@ eph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) } static void -eph_enable(EPluginHook *eph, int state) +eph_enable(EPluginHook *eph, gint state) { /* NOOP */ } @@ -1302,7 +1302,7 @@ e_plugin_hook_get_type(void) * THIS IS NOT FULY IMEPLEMENTED YET **/ void -e_plugin_hook_enable (EPluginHook *eph, int state) +e_plugin_hook_enable (EPluginHook *eph, gint state) { EPluginHookClass *class; @@ -1336,7 +1336,7 @@ e_plugin_hook_register_type(GType type) klass = g_type_class_ref(type); - oldklass = g_hash_table_lookup(eph_types, (void *)klass->id); + oldklass = g_hash_table_lookup(eph_types, (gpointer)klass->id); if (oldklass == klass) { g_type_class_unref(klass); return; @@ -1346,7 +1346,7 @@ e_plugin_hook_register_type(GType type) } phd(printf("register plugin hook type '%s'\n", klass->id)); - g_hash_table_insert(eph_types, (void *)klass->id, klass); + g_hash_table_insert(eph_types, (gpointer)klass->id, klass); /* if we've already loaded a plugin that needed this hook but it didn't exist, re-load it now */ @@ -1371,7 +1371,7 @@ e_plugin_hook_register_type(GType type) ndoc = pdoc->next; while (ndoc) { if (pdoc->doc) { - int cache = pdoc->plugins != NULL; + gint cache = pdoc->plugins != NULL; for (l=pdoc->plugin_hooks;!cache && l;l=g_slist_next(l)) cache |= (((EPlugin *)l->data)->hooks_pending != NULL); @@ -1407,12 +1407,12 @@ e_plugin_hook_register_type(GType type) * integer values of the corresponding string id's stored in the @map. **/ guint32 -e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const char *prop) +e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop) { - char *val, *p, *start, c; + gchar *val, *p, *start, c; guint32 mask = 0; - val = (char *)xmlGetProp(root, (const unsigned char *)prop); + val = (gchar *)xmlGetProp(root, (const guchar *)prop); if (val == NULL) return 0; @@ -1424,7 +1424,7 @@ e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, con c = *p; *p = 0; if (start != p) { - int i; + gint i; for (i=0;map[i].key;i++) { if (!strcmp(map[i].key, start)) { @@ -1458,12 +1458,12 @@ e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, con * integer value, if not, then ~0. **/ guint32 -e_plugin_hook_id(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const char *prop) +e_plugin_hook_id(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop) { - char *val; - int i; + gchar *val; + gint i; - val = (char *)xmlGetProp(root, (const unsigned char *)prop); + val = (gchar *)xmlGetProp(root, (const guchar *)prop); if (val == NULL) return ~0; @@ -1485,7 +1485,7 @@ e_plugin_hook_id(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const static gpointer epth_parent_class; static int -epth_load_plugin(void *d) +epth_load_plugin(gpointer d) { EPluginHook *eph = d; EPluginTypeHook *epth = d; @@ -1513,7 +1513,7 @@ epth_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "plugin-type") == 0) { + if (strcmp((gchar *)node->name, "plugin-type") == 0) { epth->get_type = e_plugin_xml_prop(node, "get-type"); /* We need to run this in an idle handler, * since at this point the parent EPlugin wont diff --git a/e-util/e-plugin.h b/e-util/e-plugin.h index 54855d0b95..64f4ccd2e5 100644 --- a/e-util/e-plugin.h +++ b/e-util/e-plugin.h @@ -54,8 +54,8 @@ typedef struct _EPluginClass EPluginClass; /* Structure to define the author(s) names and addresses */ typedef struct _EPluginAuthor EPluginAuthor; struct _EPluginAuthor { - char *name; - char *email; + gchar *name; + gchar *email; }; /** @@ -80,13 +80,13 @@ struct _EPluginAuthor { struct _EPlugin { GObject object; - char *id; - char *path; + gchar *id; + gchar *path; GSList *hooks_pending; - char *description; - char *name; - char *domain; + gchar *description; + gchar *name; + gchar *domain; GSList *hooks; GSList *authors; /* EPluginAuthor structures */ @@ -120,38 +120,38 @@ struct _EPlugin { struct _EPluginClass { GObjectClass parent_class; - const char *type; + const gchar *type; - int (*construct)(EPlugin *, xmlNodePtr root); - void *(*get_symbol)(EPlugin *, const char *name); - void *(*invoke)(EPlugin *, const char *name, void *data); - void (*enable)(EPlugin *, int state); + gint (*construct)(EPlugin *, xmlNodePtr root); + gpointer (*get_symbol)(EPlugin *, const gchar *name); + gpointer (*invoke)(EPlugin *, const gchar *name, gpointer data); + void (*enable)(EPlugin *, gint state); GtkWidget *(*get_configure_widget)(EPlugin *); }; GType e_plugin_get_type(void); -int e_plugin_construct(EPlugin *ep, xmlNodePtr root); -void e_plugin_add_load_path(const char *); -int e_plugin_load_plugins(void); +gint e_plugin_construct(EPlugin *ep, xmlNodePtr root); +void e_plugin_add_load_path(const gchar *); +gint e_plugin_load_plugins(void); void e_plugin_load_plugins_with_missing_symbols(void); GSList * e_plugin_list_plugins(void); void e_plugin_register_type(GType type); -void *e_plugin_get_symbol(EPlugin *ep, const char *name); -void *e_plugin_invoke(EPlugin *ep, const char *name, void *data); -void e_plugin_enable(EPlugin *eph, int state); +gpointer e_plugin_get_symbol(EPlugin *ep, const gchar *name); +gpointer e_plugin_invoke(EPlugin *ep, const gchar *name, gpointer data); +void e_plugin_enable(EPlugin *eph, gint state); GtkWidget *e_plugin_get_configure_widget (EPlugin *ep); /* static helpers */ /* maps prop or content to 'g memory' */ -char *e_plugin_xml_prop(xmlNodePtr node, const char *id); -char *e_plugin_xml_prop_domain(xmlNodePtr node, const char *id, const char *domain); -int e_plugin_xml_int(xmlNodePtr node, const char *id, int def); -char *e_plugin_xml_content(xmlNodePtr node); -char *e_plugin_xml_content_domain(xmlNodePtr node, const char *domain); +gchar *e_plugin_xml_prop(xmlNodePtr node, const gchar *id); +gchar *e_plugin_xml_prop_domain(xmlNodePtr node, const gchar *id, const gchar *domain); +gint e_plugin_xml_int(xmlNodePtr node, const gchar *id, gint def); +gchar *e_plugin_xml_content(xmlNodePtr node); +gchar *e_plugin_xml_content_domain(xmlNodePtr node, const gchar *domain); /* ********************************************************************** */ #include <gmodule.h> @@ -179,12 +179,12 @@ typedef struct _EPluginLib EPluginLib; typedef struct _EPluginLibClass EPluginLibClass; /* The callback signature used for epluginlib methods */ -typedef void *(*EPluginLibFunc)(EPluginLib *ep, void *data); +typedef gpointer (*EPluginLibFunc)(EPluginLib *ep, gpointer data); /* The setup method, this will be called when the plugin is * initialised. In the future it may also be called when the plugin * is disabled. */ -typedef int (*EPluginLibEnableFunc)(EPluginLib *ep, int enable); -typedef void *(*EPluginLibGetConfigureWidgetFunc)(EPluginLib *ep); +typedef gint (*EPluginLibEnableFunc)(EPluginLib *ep, gint enable); +typedef gpointer (*EPluginLibGetConfigureWidgetFunc)(EPluginLib *ep); /** * struct _EPluginLib - @@ -203,7 +203,7 @@ typedef void *(*EPluginLibGetConfigureWidgetFunc)(EPluginLib *ep); struct _EPluginLib { EPlugin plugin; - char *location; + gchar *location; GModule *module; }; @@ -258,7 +258,7 @@ typedef struct _EPluginHookTargetKey EPluginHookTargetKey; * helper functions to simplify plugin hook subclassing. **/ struct _EPluginHookTargetKey { - const char *key; + const gchar *key; guint32 value; }; @@ -275,8 +275,8 @@ struct _EPluginHookTargetKey { * when reading the XML plugin hook definitions. **/ struct _EPluginHookTargetMap { - const char *type; - int id; + const gchar *type; + gint id; const struct _EPluginHookTargetKey *mask_bits; /* null terminated array */ }; @@ -315,10 +315,10 @@ struct _EPluginHook { struct _EPluginHookClass { GObjectClass parent_class; - const char *id; + const gchar *id; - int (*construct)(EPluginHook *eph, EPlugin *ep, xmlNodePtr root); - void (*enable)(EPluginHook *eph, int state); + gint (*construct)(EPluginHook *eph, EPlugin *ep, xmlNodePtr root); + void (*enable)(EPluginHook *eph, gint state); }; GType e_plugin_hook_get_type(void); @@ -326,11 +326,11 @@ GType e_plugin_hook_get_type(void); void e_plugin_hook_register_type(GType type); EPluginHook * e_plugin_hook_new(EPlugin *ep, xmlNodePtr root); -void e_plugin_hook_enable(EPluginHook *eph, int state); +void e_plugin_hook_enable(EPluginHook *eph, gint state); /* static methods */ -guint32 e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const char *prop); -guint32 e_plugin_hook_id(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const char *prop); +guint32 e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop); +guint32 e_plugin_hook_id(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop); /* ********************************************************************** */ @@ -365,7 +365,7 @@ typedef struct _EPluginTypeHookClass EPluginTypeHookClass; struct _EPluginTypeHook { EPluginHook hook; - char *get_type; + gchar *get_type; guint idle; }; diff --git a/e-util/e-popup.c b/e-util/e-popup.c index bcd152713c..9bb63748dd 100644 --- a/e-util/e-popup.c +++ b/e-util/e-popup.c @@ -38,9 +38,9 @@ struct _EPopupFactory { struct _EPopupFactory *next, *prev; - char *menuid; + gchar *menuid; EPopupFactoryFunc factory; - void *factory_data; + gpointer factory_data; }; /* Used for the "activate" signal callback data to re-map to the api */ @@ -63,9 +63,9 @@ struct _menu_node { EPopup *popup; GSList *menu; - char *domain; + gchar *domain; EPopupItemsFunc freefunc; - void *data; + gpointer data; struct _item_node *items; }; @@ -188,7 +188,7 @@ e_popup_get_type(void) * * Return value: A new EPopup. **/ -EPopup *e_popup_new(const char *menuid) +EPopup *e_popup_new(const gchar *menuid) { EPopup *ep = g_object_new(e_popup_get_type(), NULL); @@ -206,7 +206,7 @@ EPopup *e_popup_new(const char *menuid) * * Return value: Returns @ep. **/ -EPopup *e_popup_construct(EPopup *ep, const char *menuid) +EPopup *e_popup_construct(EPopup *ep, const gchar *menuid) { ep->menuid = g_strdup(menuid); @@ -229,7 +229,7 @@ EPopup *e_popup_construct(EPopup *ep, const char *menuid) * built to create a complex heirarchy of menus. **/ void -e_popup_add_items(EPopup *emp, GSList *items, const char *domain, EPopupItemsFunc freefunc, void *data) +e_popup_add_items(EPopup *emp, GSList *items, const gchar *domain, EPopupItemsFunc freefunc, gpointer data) { struct _menu_node *node; @@ -264,10 +264,10 @@ ep_add_static_items(EPopup *emp) } static int -ep_cmp(const void *ap, const void *bp) +ep_cmp(gconstpointer ap, gconstpointer bp) { - struct _item_node *a = *((void **)ap); - struct _item_node *b = *((void **)bp); + struct _item_node *a = *((gpointer *)ap); + struct _item_node *b = *((gpointer *)bp); return strcmp(a->item->path, b->item->path); } @@ -375,7 +375,7 @@ ep_build_tree(struct _item_node *inode, guint32 mask) gtk_widget_show (item->image); break; case E_POPUP_RADIO: { - char *ppath = inode->parent?inode->parent->item->path:NULL; + gchar *ppath = inode->parent?inode->parent->item->path:NULL; menuitem = (GtkMenuItem *)gtk_radio_menu_item_new(g_hash_table_lookup(group_hash, ppath)); g_hash_table_insert(group_hash, ppath, gtk_radio_menu_item_get_group((GtkRadioMenuItem *)menuitem)); @@ -459,7 +459,7 @@ e_popup_create_menu(EPopup *emp, EPopupTarget *target, guint32 mask) GString *ppath = g_string_new(""); GHashTable *tree_hash = g_hash_table_new(g_str_hash, g_str_equal); EDList head = E_DLIST_INITIALISER(head); - int i; + gint i; emp->target = target; ep_add_static_items(emp); @@ -510,7 +510,7 @@ e_popup_create_menu(EPopup *emp, EPopupTarget *target, guint32 mask) struct _item_node *inode = items->pdata[i], *pnode; struct _item_node *nextnode = (i + 1 < items->len) ? items->pdata[i+1] : NULL; struct _EPopupItem *item = inode->item; - const char *tmp; + const gchar *tmp; if (nextnode && !strcmp (nextnode->item->path, item->path)) { d(printf ("skipping item %s\n", item->path)); @@ -607,7 +607,7 @@ e_popup_create_menu_once(EPopup *emp, EPopupTarget *target, guint32 mask) * it later. **/ EPopupFactory * -e_popup_class_add_factory(EPopupClass *klass, const char *menuid, EPopupFactoryFunc func, void *data) +e_popup_class_add_factory(EPopupClass *klass, const gchar *menuid, EPopupFactoryFunc func, gpointer data) { struct _EPopupFactory *f = g_malloc0(sizeof(*f)); @@ -648,7 +648,7 @@ e_popup_class_remove_factory(EPopupClass *klass, EPopupFactory *f) * * Allocate a new popup target suitable for this popup type. **/ -void *e_popup_target_new(EPopup *ep, int type, size_t size) +gpointer e_popup_target_new(EPopup *ep, gint type, size_t size) { EPopupTarget *t; @@ -675,7 +675,7 @@ void *e_popup_target_new(EPopup *ep, int type, size_t size) * only required if you are using the target for other purposes. **/ void -e_popup_target_free(EPopup *ep, void *o) +e_popup_target_free(EPopup *ep, gpointer o) { EPopupTarget *t = o; @@ -710,7 +710,7 @@ e_popup_target_free(EPopup *ep, void *o) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EPopupHook *)eph) /* must have 1:1 correspondence with e-popup types in order */ @@ -725,15 +725,15 @@ static const EPluginHookTargetKey emph_item_types[] = { }; static void -emph_popup_activate(EPopup *ep, EPopupItem *item, void *data) +emph_popup_activate(EPopup *ep, EPopupItem *item, gpointer data) { EPopupHook *hook = data; - e_plugin_invoke(hook->hook.plugin, (char *)item->user_data, ep->target); + e_plugin_invoke(hook->hook.plugin, (gchar *)item->user_data, ep->target); } static void -emph_popup_factory(EPopup *emp, void *data) +emph_popup_factory(EPopup *emp, gpointer data) { struct _EPopupHookMenu *menu = data; @@ -811,13 +811,13 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) xmlNodePtr node; EPopupHookTargetMap *map; EPopupHookClass *klass = (EPopupHookClass *)G_OBJECT_GET_CLASS(eph); - char *tmp; + gchar *tmp; d(printf(" loading menu\n")); menu = g_malloc0(sizeof(*menu)); menu->hook = (EPopupHook *)eph; - tmp = (char *)xmlGetProp(root, (const unsigned char *)"target"); + tmp = (gchar *)xmlGetProp(root, (const guchar *)"target"); if (tmp == NULL) goto error; map = g_hash_table_lookup(klass->target_map, tmp); @@ -837,7 +837,7 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) node = root->children; while (node) { - if (0 == strcmp((char *)node->name, "item")) { + if (0 == strcmp((gchar *)node->name, "item")) { struct _EPopupItem *item; item = emph_construct_item(eph, menu, node, map); @@ -868,7 +868,7 @@ emph_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "menu") == 0) { + if (strcmp((gchar *)node->name, "menu") == 0) { struct _EPopupHookMenu *menu; menu = emph_construct_menu(eph, node); @@ -949,5 +949,5 @@ e_popup_hook_get_type(void) **/ void e_popup_hook_class_add_target_map(EPopupHookClass *klass, const EPopupHookTargetMap *map) { - g_hash_table_insert(klass->target_map, (void *)map->type, (void *)map); + g_hash_table_insert(klass->target_map, (gpointer)map->type, (gpointer)map); } diff --git a/e-util/e-popup.h b/e-util/e-popup.h index 65c51ce65f..0f430af801 100644 --- a/e-util/e-popup.h +++ b/e-util/e-popup.h @@ -44,9 +44,9 @@ typedef struct _EPopupItem EPopupItem; typedef struct _EPopupFactory EPopupFactory; /* anonymous type */ typedef struct _EPopupTarget EPopupTarget; -typedef void (*EPopupActivateFunc)(EPopup *ep, EPopupItem *item, void *data); -typedef void (*EPopupFactoryFunc)(EPopup *emp, void *data); -typedef void (*EPopupItemsFunc)(EPopup *ep, GSList *items, void *data); +typedef void (*EPopupActivateFunc)(EPopup *ep, EPopupItem *item, gpointer data); +typedef void (*EPopupFactoryFunc)(EPopup *emp, gpointer data); +typedef void (*EPopupItemsFunc)(EPopup *ep, GSList *items, gpointer data); /** * enum _e_popup_t - Popup item type enumeration. @@ -116,11 +116,11 @@ enum _e_popup_t { */ struct _EPopupItem { enum _e_popup_t type; - char *path; /* absolute path! must sort ascii-lexographically into the right spot */ - char *label; + gchar *path; /* absolute path! must sort ascii-lexographically into the right spot */ + gchar *label; EPopupActivateFunc activate; - void *user_data; /* user data, not passed directly to @activate */ - void *image; /* char* for item type, GtkWidget * for image type */ + gpointer user_data; /* user data, not passed directly to @activate */ + gpointer image; /* gchar * for item type, GtkWidget * for image type */ guint32 visible; /* visibility mask */ guint32 enable; /* sensitivity mask */ }; @@ -168,7 +168,7 @@ struct _EPopup { struct _EPopupPrivate *priv; - char *menuid; + gchar *menuid; EPopupTarget *target; }; @@ -198,23 +198,23 @@ struct _EPopupClass { GType e_popup_get_type(void); -EPopup *e_popup_new(const char *menuid); +EPopup *e_popup_new(const gchar *menuid); /* Static class methods */ -EPopupFactory *e_popup_class_add_factory(EPopupClass *klass, const char *menuid, EPopupFactoryFunc func, void *data); +EPopupFactory *e_popup_class_add_factory(EPopupClass *klass, const gchar *menuid, EPopupFactoryFunc func, gpointer data); void e_popup_class_remove_factory(EPopupClass *klass, EPopupFactory *f); -EPopup *e_popup_construct(EPopup *, const char *menuid); +EPopup *e_popup_construct(EPopup *, const gchar *menuid); -void e_popup_add_items(EPopup *, GSList *items, const char *domain, EPopupItemsFunc freefunc, void *data); +void e_popup_add_items(EPopup *, GSList *items, const gchar *domain, EPopupItemsFunc freefunc, gpointer data); void e_popup_add_static_items(EPopup *emp, EPopupTarget *target); /* do not call e_popup_create_menu, it can leak structures if not used right */ struct _GtkMenu *e_popup_create_menu(EPopup *, EPopupTarget *, guint32 mask); struct _GtkMenu *e_popup_create_menu_once(EPopup *emp, EPopupTarget *, guint32 mask); -void *e_popup_target_new(EPopup *, int type, size_t size); -void e_popup_target_free(EPopup *, void *); +gpointer e_popup_target_new(EPopup *, gint type, size_t size); +void e_popup_target_free(EPopup *, gpointer ); /* ********************************************************************** */ @@ -250,10 +250,10 @@ typedef void (*EPopupHookFunc)(struct _EPlugin *plugin, EPopupTarget *target); */ struct _EPopupHookMenu { struct _EPopupHook *hook; /* parent pointer */ - char *id; /* target menu id for these menu items */ - int target_type; /* target type of this menu */ + gchar *id; /* target menu id for these menu items */ + gint target_type; /* target type of this menu */ GSList *items; /* items to add to menu */ - char *factory; /* optional factory to call for adding menu items */ + gchar *factory; /* optional factory to call for adding menu items */ }; /** diff --git a/e-util/e-profile-event.c b/e-util/e-profile-event.c index ee98ad8b75..297fcf5739 100644 --- a/e-util/e-profile-event.c +++ b/e-util/e-profile-event.c @@ -109,7 +109,7 @@ EProfileEvent *e_profile_event_peek(void) } EProfileEventTarget * -e_profile_event_target_new(EProfileEvent *eme, const char *id, const char *uid, guint32 flags) +e_profile_event_target_new(EProfileEvent *eme, const gchar *id, const gchar *uid, guint32 flags) { EProfileEventTarget *t = e_event_target_new(&eme->popup, E_PROFILE_EVENT_TARGET, sizeof(*t)); GTimeVal tv; @@ -126,7 +126,7 @@ e_profile_event_target_new(EProfileEvent *eme, const char *id, const char *uid, #ifdef ENABLE_PROFILING void -e_profile_event_emit(const char *id, const char *uid, guint32 flags) +e_profile_event_emit(const gchar *id, const gchar *uid, guint32 flags) { EProfileEvent *epe = e_profile_event_peek(); EProfileEventTarget *t = e_profile_event_target_new(epe, id, uid, flags); @@ -137,14 +137,14 @@ e_profile_event_emit(const char *id, const char *uid, guint32 flags) /* simply keep macro from header file expand to "nothing". #undef e_profile_event_emit static void -e_profile_event_emit(const char *id, const char *uid, guint32 flags) +e_profile_event_emit(const gchar *id, const gchar *uid, guint32 flags) { }*/ #endif /* ********************************************************************** */ -static void *emeh_parent_class; +static gpointer emeh_parent_class; #define emeh ((EProfileEventHook *)eph) static const EEventHookTargetMask emeh_profile_masks[] = { @@ -170,7 +170,7 @@ emeh_finalise(GObject *o) static void emeh_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = emeh_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.profile.events:1.0"; diff --git a/e-util/e-profile-event.h b/e-util/e-profile-event.h index c20a5f1044..5caa50cf4d 100644 --- a/e-util/e-profile-event.h +++ b/e-util/e-profile-event.h @@ -58,8 +58,8 @@ struct _EProfileEventTarget { EEventTarget target; struct timeval tv; - char *id; /* id of event */ - char *uid; /* uid of event (folder/message, etc) */ + gchar *id; /* id of event */ + gchar *uid; /* uid of event (folder/message, etc) */ }; typedef struct _EEventItem EProfileEventItem; @@ -79,11 +79,11 @@ GType e_profile_event_get_type(void); EProfileEvent *e_profile_event_peek(void); -EProfileEventTarget *e_profile_event_target_new(EProfileEvent *emp, const char *id, const char *uid, guint32 flags); +EProfileEventTarget *e_profile_event_target_new(EProfileEvent *emp, const gchar *id, const gchar *uid, guint32 flags); /* we don't want ANY rubbish code lying around if we have profiling off */ #ifdef ENABLE_PROFILING -void e_profile_event_emit(const char *id, const char *uid, guint32 flags); +void e_profile_event_emit(const gchar *id, const gchar *uid, guint32 flags); #else #define e_profile_event_emit(a, b, c) #endif diff --git a/e-util/e-request.c b/e-util/e-request.c index 2175c75b2a..3cd23968b2 100644 --- a/e-util/e-request.c +++ b/e-util/e-request.c @@ -39,14 +39,14 @@ * Return value: %NULL if the user cancelled the dialog, the inserted * string (in UTF8) otherwise. The string must be freed by the caller. **/ -char * +gchar * e_request_string (GtkWindow *parent, - const char *title, - const char *prompt, - const char *default_string) + const gchar *title, + const gchar *prompt, + const gchar *default_string) { GtkWidget *prompt_label; - char *text; + gchar *text; GtkWidget *dialog; GtkWidget *entry; GtkWidget *vbox; diff --git a/e-util/e-request.h b/e-util/e-request.h index ae822db83e..63eacdf8bb 100644 --- a/e-util/e-request.h +++ b/e-util/e-request.h @@ -25,9 +25,9 @@ #include <gtk/gtk.h> -char *e_request_string (GtkWindow *parent, - const char *title, - const char *prompt, - const char *default_string); +gchar *e_request_string (GtkWindow *parent, + const gchar *title, + const gchar *prompt, + const gchar *default_string); #endif diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c index eaedddaf50..1480f37e68 100644 --- a/e-util/e-signature-list.c +++ b/e-util/e-signature-list.c @@ -175,7 +175,7 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, EList *old_sigs; EIterator *iter; gboolean found; - char *uid; + gchar *uid; old_sigs = e_list_duplicate (E_LIST (signature_list)); @@ -252,8 +252,8 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, signature_list->priv->resave = resave; } -static void * -copy_func (const void *data, void *closure) +static gpointer +copy_func (gconstpointer data, gpointer closure) { GObject *object = (GObject *)data; @@ -263,7 +263,7 @@ copy_func (const void *data, void *closure) } static void -free_func (void *data, void *closure) +free_func (gpointer data, gpointer closure) { g_object_unref (data); } @@ -338,7 +338,7 @@ e_signature_list_save (ESignatureList *signature_list) GSList *list = NULL; ESignature *signature; EIterator *iter; - char *xmlbuf; + gchar *xmlbuf; for (iter = e_list_get_iterator (E_LIST (signature_list)); e_iterator_is_valid (iter); @@ -430,7 +430,7 @@ e_signature_list_remove (ESignatureList *signatures, ESignature *signature) * Return value: The signature or NULL if it doesn't exist. **/ const ESignature * -e_signature_list_find (ESignatureList *signatures, e_signature_find_t type, const char *key) +e_signature_list_find (ESignatureList *signatures, e_signature_find_t type, const gchar *key) { const ESignature *signature = NULL; EIterator *it; @@ -444,7 +444,7 @@ e_signature_list_find (ESignatureList *signatures, e_signature_find_t type, cons for (it = e_list_get_iterator ((EList *) signatures); e_iterator_is_valid (it); e_iterator_next (it)) { - int found = 0; + gint found = 0; signature = (const ESignature *) e_iterator_get (it); diff --git a/e-util/e-signature-list.h b/e-util/e-signature-list.h index 8d8caed0a8..1c27a12453 100644 --- a/e-util/e-signature-list.h +++ b/e-util/e-signature-list.h @@ -71,6 +71,6 @@ void e_signature_list_add (ESignatureList *signature_list, ESignature *signature void e_signature_list_change (ESignatureList *signature_list, ESignature *signature); void e_signature_list_remove (ESignatureList *signature_list, ESignature *signature); -const ESignature *e_signature_list_find (ESignatureList *signature_list, e_signature_find_t type, const char *key); +const ESignature *e_signature_list_find (ESignatureList *signature_list, e_signature_find_t type, const gchar *key); #endif /* __E_SIGNATURE_LIST__ */ diff --git a/e-util/e-signature.c b/e-util/e-signature.c index 1cbed6b66b..60659f8c55 100644 --- a/e-util/e-signature.c +++ b/e-util/e-signature.c @@ -124,7 +124,7 @@ e_signature_new (void) * if @xml could not be parsed as valid signature data. **/ ESignature * -e_signature_new_from_xml (const char *xml) +e_signature_new_from_xml (const gchar *xml) { ESignature *signature; @@ -139,12 +139,12 @@ e_signature_new_from_xml (const char *xml) static gboolean -xml_set_bool (xmlNodePtr node, const char *name, gboolean *val) +xml_set_bool (xmlNodePtr node, const gchar *name, gboolean *val) { gboolean bool; - char *buf; + gchar *buf; - if ((buf = (char *)xmlGetProp (node, (const unsigned char *)name))) { + if ((buf = (gchar *)xmlGetProp (node, (const guchar *)name))) { bool = (!strcmp (buf, "true") || !strcmp (buf, "yes")); xmlFree (buf); @@ -158,11 +158,11 @@ xml_set_bool (xmlNodePtr node, const char *name, gboolean *val) } static gboolean -xml_set_prop (xmlNodePtr node, const char *name, char **val) +xml_set_prop (xmlNodePtr node, const gchar *name, gchar **val) { - char *buf, *new_val; + gchar *buf, *new_val; - buf = (char *)xmlGetProp (node, (const unsigned char *)name); + buf = (gchar *)xmlGetProp (node, (const guchar *)name); new_val = g_strdup (buf); xmlFree (buf); @@ -180,11 +180,11 @@ xml_set_prop (xmlNodePtr node, const char *name, char **val) } static gboolean -xml_set_content (xmlNodePtr node, char **val) +xml_set_content (xmlNodePtr node, gchar **val) { - char *buf, *new_val; + gchar *buf, *new_val; - buf = (char *)xmlNodeGetContent (node); + buf = (gchar *)xmlNodeGetContent (node); new_val = g_strdup (buf); xmlFree (buf); @@ -210,18 +210,18 @@ xml_set_content (xmlNodePtr node, char **val) * (or %NULL if @xml could not be parsed or did not contain a uid). * The caller must free this string. **/ -char * -e_signature_uid_from_xml (const char *xml) +gchar * +e_signature_uid_from_xml (const gchar *xml) { xmlNodePtr node; xmlDocPtr doc; - char *uid = NULL; + gchar *uid = NULL; - if (!(doc = xmlParseDoc ((unsigned char *) xml))) + if (!(doc = xmlParseDoc ((guchar *) xml))) return NULL; node = doc->children; - if (strcmp ((char *)node->name, "signature") != 0) { + if (strcmp ((gchar *)node->name, "signature") != 0) { xmlFreeDoc (doc); return NULL; } @@ -243,19 +243,19 @@ e_signature_uid_from_xml (const char *xml) * Returns %TRUE if the signature was loaded or %FALSE otherwise. **/ gboolean -e_signature_set_from_xml (ESignature *signature, const char *xml) +e_signature_set_from_xml (ESignature *signature, const gchar *xml) { gboolean changed = FALSE; xmlNodePtr node, cur; xmlDocPtr doc; gboolean bool; - char *buf; + gchar *buf; - if (!(doc = xmlParseDoc ((unsigned char *) xml))) + if (!(doc = xmlParseDoc ((guchar *) xml))) return FALSE; node = doc->children; - if (strcmp ((char *)node->name, "signature") != 0) { + if (strcmp ((gchar *)node->name, "signature") != 0) { xmlFreeDoc (doc); return FALSE; } @@ -292,11 +292,11 @@ e_signature_set_from_xml (ESignature *signature, const char *xml) cur = node->children; while (cur) { - if (!strcmp ((char *)cur->name, "filename")) { + if (!strcmp ((gchar *)cur->name, "filename")) { changed |= xml_set_content (cur, &signature->filename); changed |= xml_set_bool (cur, "script", &signature->script); break; - } else if (!strcmp ((char *)cur->name, "script")) { + } else if (!strcmp ((gchar *)cur->name, "script")) { /* this is for handling 1.4 signature script definitions */ changed |= xml_set_content (cur, &signature->filename); if (!signature->script) { @@ -322,35 +322,35 @@ e_signature_set_from_xml (ESignature *signature, const char *xml) * Return value: an XML representation of @signature, which the caller * must free. **/ -char * +gchar * e_signature_to_xml (ESignature *signature) { xmlChar *xmlbuf; - char *tmp; + gchar *tmp; xmlNodePtr root, node; xmlDocPtr doc; - int n; + gint n; - doc = xmlNewDoc ((const unsigned char *)"1.0"); + doc = xmlNewDoc ((const guchar *)"1.0"); - root = xmlNewDocNode (doc, NULL, (const unsigned char *)"signature", NULL); + root = xmlNewDocNode (doc, NULL, (const guchar *)"signature", NULL); xmlDocSetRootElement (doc, root); - xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)signature->name); - xmlSetProp (root, (const unsigned char *)"uid", (unsigned char *)signature->uid); - xmlSetProp (root, (const unsigned char *)"auto", (const unsigned char *)(signature->autogen ? "true" : "false")); + xmlSetProp (root, (const guchar *)"name", (guchar *)signature->name); + xmlSetProp (root, (const guchar *)"uid", (guchar *)signature->uid); + xmlSetProp (root, (const guchar *)"auto", (const guchar *)(signature->autogen ? "true" : "false")); if (!signature->autogen) { - xmlSetProp (root, (const unsigned char *)"format", (const unsigned char *)(signature->html ? "text/html" : "text/plain")); + xmlSetProp (root, (const guchar *)"format", (const guchar *)(signature->html ? "text/html" : "text/plain")); if (signature->filename) { - node = xmlNewTextChild (root, NULL, (const unsigned char *)"filename", (unsigned char *)signature->filename); + node = xmlNewTextChild (root, NULL, (const guchar *)"filename", (guchar *)signature->filename); if (signature->script) - xmlSetProp (node, (const unsigned char *)"script", (const unsigned char *)"true"); + xmlSetProp (node, (const guchar *)"script", (const guchar *)"true"); } } else { /* this is to make Evolution-1.4 and older 1.5 versions happy */ - xmlSetProp (root, (const unsigned char *)"format", (const unsigned char *)"text/html"); + xmlSetProp (root, (const guchar *)"format", (const guchar *)"text/html"); } xmlDocDumpMemory (doc, &xmlbuf, &n); diff --git a/e-util/e-signature.h b/e-util/e-signature.h index cc8591b421..e965f9c65e 100644 --- a/e-util/e-signature.h +++ b/e-util/e-signature.h @@ -47,9 +47,9 @@ struct _ESignature { gboolean script; gboolean html; - char *filename; - char *name; - char *uid; + gchar *filename; + gchar *name; + gchar *uid; }; struct _ESignatureClass { @@ -61,13 +61,13 @@ struct _ESignatureClass { GType e_signature_get_type (void); ESignature *e_signature_new (void); -ESignature *e_signature_new_from_xml (const char *xml); +ESignature *e_signature_new_from_xml (const gchar *xml); -char *e_signature_uid_from_xml (const char *xml); +gchar *e_signature_uid_from_xml (const gchar *xml); -gboolean e_signature_set_from_xml (ESignature *sig, const char *xml); +gboolean e_signature_set_from_xml (ESignature *sig, const gchar *xml); -char *e_signature_to_xml (ESignature *sig); +gchar *e_signature_to_xml (ESignature *sig); #ifdef __cplusplus } diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c index 060c3f441a..a708550a12 100644 --- a/e-util/e-sorter-array.c +++ b/e-util/e-sorter-array.c @@ -37,23 +37,23 @@ G_DEFINE_TYPE (ESorterArray, e_sorter_array, E_SORTER_TYPE) static void esa_sort (ESorterArray *esa); static void esa_backsort (ESorterArray *esa); -static gint esa_model_to_sorted (ESorter *sorter, int row); -static gint esa_sorted_to_model (ESorter *sorter, int row); -static void esa_get_model_to_sorted_array (ESorter *sorter, int **array, int *count); -static void esa_get_sorted_to_model_array (ESorter *sorter, int **array, int *count); +static gint esa_model_to_sorted (ESorter *sorter, gint row); +static gint esa_sorted_to_model (ESorter *sorter, gint row); +static void esa_get_model_to_sorted_array (ESorter *sorter, gint **array, gint *count); +static void esa_get_sorted_to_model_array (ESorter *sorter, gint **array, gint *count); static gboolean esa_needs_sorting (ESorter *esa); #define ESA_NEEDS_SORTING(esa) (((ESorterArray *) (esa))->compare != NULL) static int -esort_callback(const void *data1, const void *data2, gpointer user_data) +esort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data) { ESorterArray *esa = user_data; - int ret_val; - int int1, int2; + gint ret_val; + gint int1, int2; - int1 = *(int *)data1; - int2 = *(int *)data2; + int1 = *(gint *)data1; + int2 = *(gint *)data2; ret_val = esa->compare (int1, int2, esa->closure); if (ret_val != 0) @@ -69,8 +69,8 @@ esort_callback(const void *data1, const void *data2, gpointer user_data) static void esa_sort(ESorterArray *esa) { - int rows; - int i; + gint rows; + gint i; if (esa->sorted) return; @@ -90,7 +90,7 @@ esa_sort(ESorterArray *esa) static void esa_backsort(ESorterArray *esa) { - int i, rows; + gint i, rows; if (esa->backsorted) return; @@ -108,7 +108,7 @@ esa_backsort(ESorterArray *esa) static gint -esa_model_to_sorted (ESorter *es, int row) +esa_model_to_sorted (ESorter *es, gint row) { ESorterArray *esa = E_SORTER_ARRAY(es); @@ -125,7 +125,7 @@ esa_model_to_sorted (ESorter *es, int row) } static gint -esa_sorted_to_model (ESorter *es, int row) +esa_sorted_to_model (ESorter *es, gint row) { ESorterArray *esa = (ESorterArray *) es; @@ -142,7 +142,7 @@ esa_sorted_to_model (ESorter *es, int row) } static void -esa_get_model_to_sorted_array (ESorter *es, int **array, int *count) +esa_get_model_to_sorted_array (ESorter *es, gint **array, gint *count) { ESorterArray *esa = E_SORTER_ARRAY(es); if (array || count) { @@ -156,7 +156,7 @@ esa_get_model_to_sorted_array (ESorter *es, int **array, int *count) } static void -esa_get_sorted_to_model_array (ESorter *es, int **array, int *count) +esa_get_sorted_to_model_array (ESorter *es, gint **array, gint *count) { ESorterArray *esa = E_SORTER_ARRAY(es); if (array || count) { @@ -187,23 +187,23 @@ e_sorter_array_clean(ESorterArray *esa) } void -e_sorter_array_set_count (ESorterArray *esa, int count) +e_sorter_array_set_count (ESorterArray *esa, gint count) { e_sorter_array_clean (esa); esa->rows = count; } void -e_sorter_array_append (ESorterArray *esa, int count) +e_sorter_array_append (ESorterArray *esa, gint count) { - int i; + gint i; g_free(esa->backsorted); esa->backsorted = NULL; if (esa->sorted) { esa->sorted = g_renew(int, esa->sorted, esa->rows + count); for (i = 0; i < count; i++) { - int value = esa->rows; + gint value = esa->rows; size_t pos; e_bsearch (&value, esa->sorted, esa->rows, sizeof (int), esort_callback, esa, &pos, NULL); memmove (esa->sorted + pos + 1, esa->sorted + pos, sizeof (int) * (esa->rows - pos)); diff --git a/e-util/e-sorter-array.h b/e-util/e-sorter-array.h index a02f5d9635..9a1d3fcfef 100644 --- a/e-util/e-sorter-array.h +++ b/e-util/e-sorter-array.h @@ -37,8 +37,8 @@ G_BEGIN_DECLS #ifndef _E_COMPARE_ROWS_FUNC_H_ #define _E_COMPARE_ROWS_FUNC_H_ -typedef int (*ECompareRowsFunc) (int row1, - int row2, +typedef gint (*ECompareRowsFunc) (gint row1, + gint row2, gpointer closure); #endif @@ -49,10 +49,10 @@ typedef struct { gpointer closure; /* If needs_sorting is 0, then model_to_sorted and sorted_to_model are no-ops. */ - int *sorted; - int *backsorted; + gint *sorted; + gint *backsorted; - int rows; + gint rows; } ESorterArray; typedef struct { @@ -67,9 +67,9 @@ ESorterArray *e_sorter_array_new (ECompareRowsFunc compare, gpointer closure); void e_sorter_array_clean (ESorterArray *esa); void e_sorter_array_set_count (ESorterArray *esa, - int count); + gint count); void e_sorter_array_append (ESorterArray *esa, - int count); + gint count); G_END_DECLS diff --git a/e-util/e-sorter.c b/e-util/e-sorter.c index f63e5e1172..602b189075 100644 --- a/e-util/e-sorter.c +++ b/e-util/e-sorter.c @@ -34,10 +34,10 @@ G_DEFINE_TYPE (ESorter, e_sorter, G_TYPE_OBJECT) -static gint es_model_to_sorted (ESorter *es, int row); -static gint es_sorted_to_model (ESorter *es, int row); -static void es_get_model_to_sorted_array (ESorter *es, int **array, int *count); -static void es_get_sorted_to_model_array (ESorter *es, int **array, int *count); +static gint es_model_to_sorted (ESorter *es, gint row); +static gint es_sorted_to_model (ESorter *es, gint row); +static void es_get_model_to_sorted_array (ESorter *es, gint **array, gint *count); +static void es_get_sorted_to_model_array (ESorter *es, gint **array, gint *count); static gboolean es_needs_sorting(ESorter *es); static void @@ -65,25 +65,25 @@ e_sorter_new (void) static gint -es_model_to_sorted (ESorter *es, int row) +es_model_to_sorted (ESorter *es, gint row) { return row; } static gint -es_sorted_to_model (ESorter *es, int row) +es_sorted_to_model (ESorter *es, gint row) { return row; } static void -es_get_model_to_sorted_array (ESorter *es, int **array, int *count) +es_get_model_to_sorted_array (ESorter *es, gint **array, gint *count) { } static void -es_get_sorted_to_model_array (ESorter *es, int **array, int *count) +es_get_sorted_to_model_array (ESorter *es, gint **array, gint *count) { } @@ -95,7 +95,7 @@ es_needs_sorting(ESorter *es) } gint -e_sorter_model_to_sorted (ESorter *es, int row) +e_sorter_model_to_sorted (ESorter *es, gint row) { g_return_val_if_fail(es != NULL, -1); g_return_val_if_fail(row >= 0, -1); @@ -107,7 +107,7 @@ e_sorter_model_to_sorted (ESorter *es, int row) } gint -e_sorter_sorted_to_model (ESorter *es, int row) +e_sorter_sorted_to_model (ESorter *es, gint row) { g_return_val_if_fail(es != NULL, -1); g_return_val_if_fail(row >= 0, -1); @@ -120,7 +120,7 @@ e_sorter_sorted_to_model (ESorter *es, int row) void -e_sorter_get_model_to_sorted_array (ESorter *es, int **array, int *count) +e_sorter_get_model_to_sorted_array (ESorter *es, gint **array, gint *count) { g_return_if_fail(es != NULL); @@ -129,7 +129,7 @@ e_sorter_get_model_to_sorted_array (ESorter *es, int **array, int *count) } void -e_sorter_get_sorted_to_model_array (ESorter *es, int **array, int *count) +e_sorter_get_sorted_to_model_array (ESorter *es, gint **array, gint *count) { g_return_if_fail(es != NULL); diff --git a/e-util/e-sorter.h b/e-util/e-sorter.h index d64851bc70..579d9bd36d 100644 --- a/e-util/e-sorter.h +++ b/e-util/e-sorter.h @@ -44,16 +44,16 @@ typedef struct { typedef struct { GObjectClass parent_class; gint (*model_to_sorted) (ESorter *sorter, - int row); + gint row); gint (*sorted_to_model) (ESorter *sorter, - int row); + gint row); void (*get_model_to_sorted_array) (ESorter *sorter, - int **array, - int *count); + gint **array, + gint *count); void (*get_sorted_to_model_array) (ESorter *sorter, - int **array, - int *count); + gint **array, + gint *count); gboolean (*needs_sorting) (ESorter *sorter); } ESorterClass; @@ -62,16 +62,16 @@ GType e_sorter_get_type (void); ESorter *e_sorter_new (void); gint e_sorter_model_to_sorted (ESorter *sorter, - int row); + gint row); gint e_sorter_sorted_to_model (ESorter *sorter, - int row); + gint row); void e_sorter_get_model_to_sorted_array (ESorter *sorter, - int **array, - int *count); + gint **array, + gint *count); void e_sorter_get_sorted_to_model_array (ESorter *sorter, - int **array, - int *count); + gint **array, + gint *count); gboolean e_sorter_needs_sorting (ESorter *sorter); diff --git a/e-util/e-util-labels.c b/e-util/e-util-labels.c index ba1d0113a0..1241e7092f 100644 --- a/e-util/e-util-labels.c +++ b/e-util/e-util-labels.c @@ -62,8 +62,8 @@ e_util_labels_parse (GConfClient *client) { GSList *labels, *list, *head; EUtilLabel *label; - char *buf; - int num = 0; + gchar *buf; + gint num = 0; gboolean unref_client = client == NULL; labels = NULL; @@ -74,7 +74,7 @@ e_util_labels_parse (GConfClient *client) head = gconf_client_get_list (client, E_UTIL_LABELS_GCONF_KEY, GCONF_VALUE_STRING, NULL); for (list = head; list; list = list->next) { - char *color, *name, *tag; + gchar *color, *name, *tag; name = buf = list->data; color = strrchr (buf, ':'); if (color == NULL) { @@ -210,7 +210,7 @@ flush_labels_cache (GSList *labels, gboolean free_labels) * @return Pointer to cache data if label with such tag exists or NULL. Do not free it! **/ static EUtilLabel * -find_label (GSList *labels, const char *tag) +find_label (GSList *labels, const gchar *tag) { GSList *l; @@ -227,12 +227,12 @@ find_label (GSList *labels, const char *tag) } -static char * -tag_from_name (const char *name) +static gchar * +tag_from_name (const gchar *name) { /* this does thunderbird, just do not ask */ - char *s1, *s2, *p; - const char *bads = " ()/{%*<>\\\""; + gchar *s1, *s2, *p; + const gchar *bads = " ()/{%*<>\\\""; if (!name || !*name) return NULL; @@ -263,12 +263,12 @@ tag_from_name (const char *name) * It will return NULL when the tag will be same as already existed. * Tag name is generated in similar way as in Thunderbird. **/ -char * -e_util_labels_add (const char *name, const GdkColor *color) +gchar * +e_util_labels_add (const gchar *name, const GdkColor *color) { EUtilLabel *label; GSList *labels; - char *tag; + gchar *tag; g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (color != NULL, NULL); @@ -303,14 +303,14 @@ e_util_labels_add (const char *name, const GdkColor *color) * @return Tag for newly added label or NULL, if something failed. * Returned value should be freed with g_free. **/ -char * -e_util_labels_add_with_dlg (GtkWindow *parent, const char *tag) +gchar * +e_util_labels_add_with_dlg (GtkWindow *parent, const gchar *tag) { GtkWidget *table, *dialog, *l, *e, *c; - const char *name; + const gchar *name; GdkColor color; gboolean is_edit = FALSE; - char *new_tag = NULL; + gchar *new_tag = NULL; GSList *labels; table = gtk_table_new (2, 2, FALSE); @@ -353,7 +353,7 @@ e_util_labels_add_with_dlg (GtkWindow *parent, const char *tag) gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0); while (!new_tag) { - const char *error = NULL; + const gchar *error = NULL; if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { name = gtk_entry_get_text (GTK_ENTRY (e)); @@ -388,7 +388,7 @@ e_util_labels_add_with_dlg (GtkWindow *parent, const char *tag) * @return Whether was removed. **/ gboolean -e_util_labels_remove (const char *tag) +e_util_labels_remove (const gchar *tag) { EUtilLabel *label; GSList *labels; @@ -419,7 +419,7 @@ e_util_labels_remove (const char *tag) * @return Whether successfully saved. **/ gboolean -e_util_labels_set_data (const char *tag, const char *name, const GdkColor *color) +e_util_labels_set_data (const gchar *tag, const gchar *name, const GdkColor *color) { EUtilLabel *label; GSList *labels; @@ -451,9 +451,9 @@ e_util_labels_set_data (const char *tag, const char *name, const GdkColor *color * @return Whether the tag is one of default/system labels or not. **/ gboolean -e_util_labels_is_system (const char *tag) +e_util_labels_is_system (const gchar *tag) { - int i; + gint i; if (!tag) return FALSE; @@ -472,10 +472,10 @@ e_util_labels_is_system (const char *tag) * @param old_tag Tag of the label from old version of Evolution. * @return New tag name equivalent with the old tag, or NULL if no such name existed before. **/ -const char * -e_util_labels_get_new_tag (const char *old_tag) +const gchar * +e_util_labels_get_new_tag (const gchar *old_tag) { - int i; + gint i; if (!old_tag) return NULL; @@ -497,8 +497,8 @@ e_util_labels_get_new_tag (const char *old_tag) * @param tag Tag of the label of our interest. * @return Name of the label with that tag or NULL, if no such label exists. **/ -const char * -e_util_labels_get_name (GSList *labels, const char *tag) +const gchar * +e_util_labels_get_name (GSList *labels, const gchar *tag) { EUtilLabel *label; @@ -520,7 +520,7 @@ e_util_labels_get_name (GSList *labels, const char *tag) * @return Whether found such label and color has been set. **/ gboolean -e_util_labels_get_color (GSList *labels, const char *tag, GdkColor *color) +e_util_labels_get_color (GSList *labels, const gchar *tag, GdkColor *color) { EUtilLabel *label; @@ -542,8 +542,8 @@ e_util_labels_get_color (GSList *labels, const char *tag, GdkColor *color) * @param tag Tag of the label of our interest. * @return String representation of that label, or NULL, is no such label exists. **/ -const char * -e_util_labels_get_color_str (GSList *labels, const char *tag) +const gchar * +e_util_labels_get_color_str (GSList *labels, const gchar *tag) { EUtilLabel *label; @@ -568,7 +568,7 @@ e_util_labels_get_filter_options (void) for (l = known; l; l = l->next) { EUtilLabel *label = l->data; - const char *tag; + const gchar *tag; struct _filter_option *fo; if (!label) diff --git a/e-util/e-util-labels.h b/e-util/e-util-labels.h index 725f740d89..16d67f11ef 100644 --- a/e-util/e-util-labels.h +++ b/e-util/e-util-labels.h @@ -37,17 +37,17 @@ typedef struct { GSList * e_util_labels_parse (struct _GConfClient *client); void e_util_labels_free (GSList *labels); -char * e_util_labels_add (const char *name, const GdkColor *color); -char * e_util_labels_add_with_dlg (struct _GtkWindow *parent, const char *tag); -gboolean e_util_labels_remove (const char *tag); -gboolean e_util_labels_set_data (const char *tag, const char *name, const GdkColor *color); +gchar * e_util_labels_add (const gchar *name, const GdkColor *color); +gchar * e_util_labels_add_with_dlg (struct _GtkWindow *parent, const gchar *tag); +gboolean e_util_labels_remove (const gchar *tag); +gboolean e_util_labels_set_data (const gchar *tag, const gchar *name, const GdkColor *color); -gboolean e_util_labels_is_system (const char *tag); -const char *e_util_labels_get_new_tag (const char *old_tag); +gboolean e_util_labels_is_system (const gchar *tag); +const gchar *e_util_labels_get_new_tag (const gchar *old_tag); -const char *e_util_labels_get_name (GSList *labels, const char *tag); -gboolean e_util_labels_get_color (GSList *labels, const char *tag, GdkColor *color); -const char *e_util_labels_get_color_str (GSList *labels, const char *tag); +const gchar *e_util_labels_get_name (GSList *labels, const gchar *tag); +gboolean e_util_labels_get_color (GSList *labels, const gchar *tag, GdkColor *color); +const gchar *e_util_labels_get_color_str (GSList *labels, const gchar *tag); GSList * e_util_labels_get_filter_options (void); diff --git a/e-util/e-util-private.h b/e-util/e-util-private.h index f7d84dea37..7c77f12d27 100644 --- a/e-util/e-util-private.h +++ b/e-util/e-util-private.h @@ -35,26 +35,26 @@ #define fsync(fd) 0 -const char *_e_get_category_icons (void) G_GNUC_CONST; -const char *_e_get_datadir (void) G_GNUC_CONST; -const char *_e_get_ecpsdir (void) G_GNUC_CONST; -const char *_e_get_etspecdir (void) G_GNUC_CONST; -const char *_e_get_galviewsdir (void) G_GNUC_CONST; -const char *_e_get_gladedir (void) G_GNUC_CONST; -const char *_e_get_helpdir (void) G_GNUC_CONST; -const char *_e_get_iconsdir (void) G_GNUC_CONST; -const char *_e_get_imagesdir (void) G_GNUC_CONST; -const char *_e_get_libdir (void) G_GNUC_CONST; -const char *_e_get_libexecdir (void) G_GNUC_CONST; -const char *_e_get_localedir (void) G_GNUC_CONST; -const char *_e_get_plugindir (void) G_GNUC_CONST; -const char *_e_get_prefix (void) G_GNUC_CONST; -const char *_e_get_privdatadir (void) G_GNUC_CONST; -const char *_e_get_search_rule_dir (void) G_GNUC_CONST; -const char *_e_get_sounddir (void) G_GNUC_CONST; -const char *_e_get_sysconfdir (void) G_GNUC_CONST; -const char *_e_get_toolsdir (void) G_GNUC_CONST; -const char *_e_get_uidir (void) G_GNUC_CONST; +const gchar *_e_get_category_icons (void) G_GNUC_CONST; +const gchar *_e_get_datadir (void) G_GNUC_CONST; +const gchar *_e_get_ecpsdir (void) G_GNUC_CONST; +const gchar *_e_get_etspecdir (void) G_GNUC_CONST; +const gchar *_e_get_galviewsdir (void) G_GNUC_CONST; +const gchar *_e_get_gladedir (void) G_GNUC_CONST; +const gchar *_e_get_helpdir (void) G_GNUC_CONST; +const gchar *_e_get_iconsdir (void) G_GNUC_CONST; +const gchar *_e_get_imagesdir (void) G_GNUC_CONST; +const gchar *_e_get_libdir (void) G_GNUC_CONST; +const gchar *_e_get_libexecdir (void) G_GNUC_CONST; +const gchar *_e_get_localedir (void) G_GNUC_CONST; +const gchar *_e_get_plugindir (void) G_GNUC_CONST; +const gchar *_e_get_prefix (void) G_GNUC_CONST; +const gchar *_e_get_privdatadir (void) G_GNUC_CONST; +const gchar *_e_get_search_rule_dir (void) G_GNUC_CONST; +const gchar *_e_get_sounddir (void) G_GNUC_CONST; +const gchar *_e_get_sysconfdir (void) G_GNUC_CONST; +const gchar *_e_get_toolsdir (void) G_GNUC_CONST; +const gchar *_e_get_uidir (void) G_GNUC_CONST; #undef DATADIR #define DATADIR _e_get_datadir () diff --git a/e-util/e-util.c b/e-util/e-util.c index 533dc2d740..408a201c0a 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -378,12 +378,12 @@ e_action_group_remove_all_actions (GtkActionGroup *action_group) * Strips underscores from a string in the same way @gtk_label_new_with_mnemonis does. * The returned string should be freed. */ -char * -e_str_without_underscores (const char *s) +gchar * +e_str_without_underscores (const gchar *s) { - char *new_string; - const char *sp; - char *dp; + gchar *new_string; + const gchar *sp; + gchar *dp; new_string = g_malloc (strlen (s) + 1); @@ -1273,10 +1273,10 @@ get_lock_filename (void) gboolean e_file_lock_create () { - const char *fname = get_lock_filename (); + const gchar *fname = get_lock_filename (); gboolean status = FALSE; - int fd = g_creat (fname, S_IRUSR|S_IWUSR); + gint fd = g_creat (fname, S_IRUSR|S_IWUSR); if (fd == -1){ g_warning ("Lock file '%s' creation failed, error %d\n", fname, errno); } else { @@ -1290,7 +1290,7 @@ e_file_lock_create () void e_file_lock_destroy () { - const char *fname = get_lock_filename (); + const gchar *fname = get_lock_filename (); if (g_unlink (fname) == -1){ g_warning ("Lock destroy: failed to unlink file '%s'!",fname); @@ -1300,7 +1300,7 @@ e_file_lock_destroy () gboolean e_file_lock_exists () { - const char *fname = get_lock_filename (); + const gchar *fname = get_lock_filename (); return g_file_test (fname, G_FILE_TEST_EXISTS); } @@ -1313,10 +1313,10 @@ e_file_lock_exists () * * Guesses mime_type for the given filename. **/ -char * -e_util_guess_mime_type (const char *filename, gboolean localfile) +gchar * +e_util_guess_mime_type (const gchar *filename, gboolean localfile) { - char *mime_type = NULL; + gchar *mime_type = NULL; g_return_val_if_fail (filename != NULL, NULL); @@ -1364,11 +1364,11 @@ e_util_guess_mime_type (const char *filename, gboolean localfile) * * Converts local file name to URI. **/ -char * -e_util_filename_to_uri (const char *filename) +gchar * +e_util_filename_to_uri (const gchar *filename) { GFile *file; - char *uri = NULL; + gchar *uri = NULL; g_return_val_if_fail (filename != NULL, NULL); @@ -1389,11 +1389,11 @@ e_util_filename_to_uri (const char *filename) * * Converts URI to local file name. NULL indicates no such local file name exists. **/ -char * -e_util_uri_to_filename (const char *uri) +gchar * +e_util_uri_to_filename (const gchar *uri) { GFile *file; - char *filename = NULL; + gchar *filename = NULL; g_return_val_if_fail (uri != NULL, NULL); @@ -1420,7 +1420,7 @@ e_util_uri_to_filename (const char *uri) * Mount point should be already mounted when calling this function. **/ gboolean -e_util_read_file (const char *filename, gboolean filename_is_uri, char **buffer, gsize *read, GError **error) +e_util_read_file (const gchar *filename, gboolean filename_is_uri, gchar **buffer, gsize *read, GError **error) { GFile *file; GFileInfo *info; @@ -1445,7 +1445,7 @@ e_util_read_file (const char *filename, gboolean filename_is_uri, char **buffer, if (!err && info) { guint64 sz; - char *buff; + gchar *buff; sz = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_STANDARD_SIZE); buff = g_malloc (sizeof (char) * sz); @@ -1495,7 +1495,7 @@ e_util_get_category_filter_options (void) clist = e_categories_get_list (); for (l = clist; l; l = l->next) { - const char *cname = l->data; + const gchar *cname = l->data; struct _filter_option *fo = g_new0 (struct _filter_option, 1); fo->title = g_strdup (cname); diff --git a/e-util/e-util.h b/e-util/e-util.h index e5126213f3..9cea65a6eb 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -58,7 +58,7 @@ gint e_action_compare_by_label (GtkAction *action1, void e_action_group_remove_all_actions (GtkActionGroup *action_group); -char * e_str_without_underscores (const char *s); +gchar * e_str_without_underscores (const gchar *s); gint e_str_compare (gconstpointer x, gconstpointer y); gint e_str_case_compare (gconstpointer x, @@ -113,8 +113,8 @@ gchar * e_ascii_dtostr (gchar *buffer, const gchar *format, gdouble d); -/* Alternating char * and int arguments with a NULL char * to end. - Less than 0 for the int means copy the whole string. */ +/* Alternating gchar * and gint arguments with a NULL gchar * to end. + Less than 0 for the gint means copy the whole string. */ gchar * e_strdup_append_strings (gchar *first_string, ...); diff --git a/e-util/e-win32-reloc.c b/e-util/e-win32-reloc.c index 04c70afd75..a080518d4c 100644 --- a/e-util/e-win32-reloc.c +++ b/e-util/e-win32-reloc.c @@ -32,28 +32,28 @@ /* localedir uses system codepage as it is passed to the non-UTF8ified * gettext library */ -static const char *localedir = NULL; +static const gchar *localedir = NULL; /* The others are in UTF-8 */ -static const char *category_icons; -static const char *datadir; -static const char *ecpsdir; -static const char *etspecdir; -static const char *galviewsdir; -static const char *gladedir; -static const char *helpdir; -static const char *iconsdir; -static const char *imagesdir; -static const char *libdir; -static const char *libexecdir; -static const char *plugindir; -static const char *prefix; -static const char *privdatadir; -static const char *search_rule_dir; -static const char *sounddir; -static const char *sysconfdir; -static const char *toolsdir; -static const char *uidir; +static const gchar *category_icons; +static const gchar *datadir; +static const gchar *ecpsdir; +static const gchar *etspecdir; +static const gchar *galviewsdir; +static const gchar *gladedir; +static const gchar *helpdir; +static const gchar *iconsdir; +static const gchar *imagesdir; +static const gchar *libdir; +static const gchar *libexecdir; +static const gchar *plugindir; +static const gchar *prefix; +static const gchar *privdatadir; +static const gchar *search_rule_dir; +static const gchar *sounddir; +static const gchar *sysconfdir; +static const gchar *toolsdir; +static const gchar *uidir; static HMODULE hmodule; G_LOCK_DEFINE_STATIC (mutex); @@ -77,9 +77,9 @@ DllMain (HINSTANCE hinstDLL, return TRUE; } -static char * -replace_prefix (const char *runtime_prefix, - const char *configure_time_path) +static gchar * +replace_prefix (const gchar *runtime_prefix, + const gchar *configure_time_path) { if (runtime_prefix && strncmp (configure_time_path, EVOLUTION_PREFIX "/", @@ -94,8 +94,8 @@ replace_prefix (const char *runtime_prefix, static void setup (void) { - char *full_prefix; - char *cp_prefix; + gchar *full_prefix; + gchar *cp_prefix; G_LOCK (mutex); if (localedir != NULL) { @@ -150,7 +150,7 @@ setup (void) #include "e-util-private.h" /* For prototypes */ #define GETTER(varbl) \ -const char * \ +const gchar * \ _e_get_##varbl (void) \ { \ setup (); \ diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c index 73dd415a6d..3f651e99b4 100644 --- a/e-util/e-xml-utils.c +++ b/e-util/e-xml-utils.c @@ -75,7 +75,7 @@ e_xml_get_child_by_name_by_lang (const xmlNode *parent, } for (child = parent->xmlChildrenNode; child != NULL; child = child->next) { if (xmlStrcmp (child->name, child_name) == 0) { - xmlChar *this_lang = xmlGetProp (child, (const unsigned char *)"lang"); + xmlChar *this_lang = xmlGetProp (child, (const guchar *)"lang"); if (this_lang == NULL) { C = child; } else if (xmlStrcmp(this_lang, (xmlChar *)lang) == 0) { @@ -103,10 +103,10 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent, for (node = parent->xmlChildrenNode; node != NULL; node = node->next) { xmlChar *lang; - if (node->name == NULL || strcmp ((char *)node->name, name) != 0) { + if (node->name == NULL || strcmp ((gchar *)node->name, name) != 0) { continue; } - lang = xmlGetProp (node, (const unsigned char *)"xml:lang"); + lang = xmlGetProp (node, (const guchar *)"xml:lang"); if (lang != NULL) { const GList *l; gint i; @@ -114,7 +114,7 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent, for (l = lang_list, i = 0; l != NULL && i < *best_lang_score; l = l->next, i++) { - if (strcmp ((char *) l->data, (char *)lang) == 0) { + if (strcmp ((gchar *) l->data, (gchar *)lang) == 0) { best_node = node; *best_lang_score = i; } @@ -153,7 +153,7 @@ e_xml_get_child_by_name_by_lang_list (const xmlNode *parent, language_names = g_get_language_names (); while (*language_names != NULL) lang_list = g_list_append ( - (GList *)lang_list, (char *)*language_names++); + (GList *)lang_list, (gchar *)*language_names++); } return e_xml_get_child_by_name_by_lang_list_with_score (parent,name, @@ -176,10 +176,10 @@ e_xml_get_child_by_name_no_lang (const xmlNode *parent, const gchar *name) for (node = parent->xmlChildrenNode; node != NULL; node = node->next) { xmlChar *lang; - if (node->name == NULL || strcmp ((char *)node->name, name) != 0) { + if (node->name == NULL || strcmp ((gchar *)node->name, name) != 0) { continue; } - lang = xmlGetProp (node, (const unsigned char *)"xml:lang"); + lang = xmlGetProp (node, (const guchar *)"xml:lang"); if (lang == NULL) { return node; } @@ -211,7 +211,7 @@ e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - (void) sscanf ((char *)prop, "%d", &ret_val); + (void) sscanf ((gchar *)prop, "%d", &ret_val); xmlFree (prop); } return ret_val; @@ -228,7 +228,7 @@ e_xml_set_integer_prop_by_name (xmlNode *parent, g_return_if_fail (prop_name != NULL); valuestr = g_strdup_printf ("%d", value); - xmlSetProp (parent, prop_name, (unsigned char *)valuestr); + xmlSetProp (parent, prop_name, (guchar *)valuestr); g_free (valuestr); } @@ -254,7 +254,7 @@ e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - (void) sscanf ((char *)prop, "%u", &ret_val); + (void) sscanf ((gchar *)prop, "%u", &ret_val); xmlFree (prop); } return ret_val; @@ -271,7 +271,7 @@ e_xml_set_uint_prop_by_name (xmlNode *parent, g_return_if_fail (prop_name != NULL); valuestr = g_strdup_printf ("%u", value); - xmlSetProp (parent, prop_name, (unsigned char *)valuestr); + xmlSetProp (parent, prop_name, (guchar *)valuestr); g_free (valuestr); } @@ -300,9 +300,9 @@ e_xml_get_bool_prop_by_name_with_default(const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - if (g_ascii_strcasecmp ((char *)prop, "true") == 0) { + if (g_ascii_strcasecmp ((gchar *)prop, "true") == 0) { ret_val = TRUE; - } else if (g_ascii_strcasecmp ((char *)prop, "false") == 0) { + } else if (g_ascii_strcasecmp ((gchar *)prop, "false") == 0) { ret_val = FALSE; } xmlFree(prop); @@ -317,9 +317,9 @@ e_xml_set_bool_prop_by_name (xmlNode *parent, const xmlChar *prop_name, gboolean g_return_if_fail (prop_name != NULL); if (value) { - xmlSetProp (parent, prop_name, (const unsigned char *)"true"); + xmlSetProp (parent, prop_name, (const guchar *)"true"); } else { - xmlSetProp (parent, prop_name, (const unsigned char *)"false"); + xmlSetProp (parent, prop_name, (const guchar *)"false"); } } @@ -343,7 +343,7 @@ e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, const xmlChar prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - ret_val = e_flexible_strtod ((char *)prop, NULL); + ret_val = e_flexible_strtod ((gchar *)prop, NULL); xmlFree (prop); } return ret_val; @@ -352,8 +352,8 @@ e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, const xmlChar void e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, gdouble value) { - char buffer[E_ASCII_DTOSTR_BUF_SIZE]; - char *format; + gchar buffer[E_ASCII_DTOSTR_BUF_SIZE]; + gchar *format; g_return_if_fail (parent != NULL); g_return_if_fail (prop_name != NULL); @@ -366,7 +366,7 @@ e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, gdouble e_ascii_dtostr (buffer, sizeof (buffer), format, value); g_free (format); - xmlSetProp (parent, prop_name, (const unsigned char *)buffer); + xmlSetProp (parent, prop_name, (const guchar *)buffer); } gchar * @@ -389,7 +389,7 @@ e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, const xmlChar prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - ret_val = g_strdup ((char *)prop); + ret_val = g_strdup ((gchar *)prop); xmlFree (prop); } else { ret_val = g_strdup (def); @@ -404,7 +404,7 @@ e_xml_set_string_prop_by_name (xmlNode *parent, const xmlChar *prop_name, const g_return_if_fail (prop_name != NULL); if (value != NULL) { - xmlSetProp (parent, prop_name, (unsigned char *)value); + xmlSetProp (parent, prop_name, (guchar *)value); } } @@ -420,15 +420,15 @@ e_xml_get_translated_string_prop_by_name (const xmlNode *parent, const xmlChar * 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/e-util/gconf-bridge.c b/e-util/gconf-bridge.c index f0fd2ed3e2..2c0f0f2d4f 100644 --- a/e-util/gconf-bridge.c +++ b/e-util/gconf-bridge.c @@ -46,7 +46,7 @@ typedef struct { gboolean delayed_mode; - char *key; + gchar *key; guint val_notify_id; GSList *val_changes; /* List of changes made to GConf value, that have not received change notification @@ -66,7 +66,7 @@ typedef struct { gboolean bind_size; gboolean bind_pos; - char *key_prefix; + gchar *key_prefix; GtkWindow *window; gulong configure_event_id; @@ -79,7 +79,7 @@ typedef struct { BindingType type; guint id; - char *key; + gchar *key; guint val_notify_id; GSList *val_changes; /* List of changes made to GConf value, that have not received change notification @@ -479,14 +479,14 @@ prop_binding_object_destroyed (gpointer user_data, **/ guint gconf_bridge_bind_property_full (GConfBridge *bridge, - const char *key, + const gchar *key, GObject *object, - const char *prop, + const gchar *prop, gboolean delayed_sync) { GParamSpec *pspec; PropBinding *binding; - char *signal; + gchar *signal; GConfValue *val; g_return_val_if_fail (bridge != NULL, 0); @@ -593,8 +593,8 @@ static gboolean window_binding_perform_scheduled_sync (WindowBinding *binding) { if (binding->bind_size) { - int width, height; - char *key; + gint width, height; + gchar *key; GdkWindowState state; state = gdk_window_get_state (GTK_WIDGET (binding->window)->window); @@ -621,8 +621,8 @@ window_binding_perform_scheduled_sync (WindowBinding *binding) } if (binding->bind_pos) { - int x, y; - char *key; + gint x, y; + gchar *key; gtk_window_get_position (binding->window, &x, &y); @@ -727,7 +727,7 @@ window_binding_window_destroyed (gpointer user_data, **/ guint gconf_bridge_bind_window (GConfBridge *bridge, - const char *key_prefix, + const gchar *key_prefix, GtkWindow *window, gboolean bind_size, gboolean bind_pos) @@ -751,7 +751,7 @@ gconf_bridge_bind_window (GConfBridge *bridge, /* Set up GConf keys & sync window to GConf values */ if (bind_size) { - char *key; + gchar *key; GConfValue *width_val, *height_val, *maximized_val; key = g_strconcat (key_prefix, "_width", NULL); @@ -788,7 +788,7 @@ gconf_bridge_bind_window (GConfBridge *bridge, } if (bind_pos) { - char *key; + gchar *key; GConfValue *x_val, *y_val; key = g_strconcat (key_prefix, "_x", NULL); @@ -891,7 +891,7 @@ list_store_binding_sync_pref_to_store (ListStoreBinding *binding, list = gconf_value_get_list (value); for (l = list; l; l = l->next) { GConfValue *l_value; - const char *string; + const gchar *string; l_value = (GConfValue *) l->data; string = gconf_value_get_string (l_value); @@ -915,7 +915,7 @@ list_store_binding_sync_store_to_pref (ListStoreBinding *binding) GtkTreeModel *tree_model; GtkTreeIter iter; GSList *list; - int res; + gint res; GConfValue *gconf_value; tree_model = GTK_TREE_MODEL (binding->list_store); @@ -924,7 +924,7 @@ list_store_binding_sync_store_to_pref (ListStoreBinding *binding) list = NULL; res = gtk_tree_model_get_iter_first (tree_model, &iter); while (res) { - char *string; + gchar *string; GConfValue *tmp_value; gtk_tree_model_get (tree_model, &iter, @@ -1035,7 +1035,7 @@ list_store_binding_store_changed_cb (ListStoreBinding *binding) **/ guint gconf_bridge_bind_string_list_store (GConfBridge *bridge, - const char *key, + const gchar *key, GtkListStore *list_store) { GtkTreeModel *tree_model; @@ -1216,7 +1216,7 @@ error_handler (GConfClient *client, g_warning ("GConf error:\n %s", error->message); if (!shown_dialog) { - char *message; + gchar *message; GtkWidget *dlg; message = g_strdup_printf (_("GConf error: %s"), diff --git a/e-util/gconf-bridge.h b/e-util/gconf-bridge.h index 7edd2476dd..b3cdd2bbeb 100644 --- a/e-util/gconf-bridge.h +++ b/e-util/gconf-bridge.h @@ -36,9 +36,9 @@ GConfBridge *gconf_bridge_get (void); GConfClient *gconf_bridge_get_client (GConfBridge *bridge); guint gconf_bridge_bind_property_full (GConfBridge *bridge, - const char *key, + const gchar *key, GObject *object, - const char *prop, + const gchar *prop, gboolean delayed_sync); /** @@ -71,7 +71,7 @@ guint gconf_bridge_bind_property_full (GConfBridge *bridge, (object), (prop), TRUE) guint gconf_bridge_bind_window (GConfBridge *bridge, - const char *key_prefix, + const gchar *key_prefix, GtkWindow *window, gboolean bind_size, gboolean bind_pos); @@ -105,7 +105,7 @@ guint gconf_bridge_bind_window (GConfBridge *bridge, gconf_bridge_bind_window ((bridge), (key_prefix), (window), FALSE, TRUE) guint gconf_bridge_bind_string_list_store (GConfBridge *bridge, - const char *key, + const gchar *key, GtkListStore *list_store); void gconf_bridge_unbind (GConfBridge *bridge, diff --git a/filter/filter-code.c b/filter/filter-code.c index fb0880b260..c0f0420d19 100644 --- a/filter/filter-code.c +++ b/filter/filter-code.c @@ -80,7 +80,7 @@ filter_code_class_init (FilterCodeClass *klass) static void filter_code_init (FilterCode *fc) { - ((FilterInput *) fc)->type = (char *)xmlStrdup ((const unsigned char *)"code"); + ((FilterInput *) fc)->type = (gchar *)xmlStrdup ((const guchar *)"code"); } static void @@ -104,7 +104,7 @@ filter_code_new (gboolean raw_code) if (fc && raw_code) { xmlFree (((FilterInput *) fc)->type); - ((FilterInput *) fc)->type = (char *)xmlStrdup ((const unsigned char *)"rawcode"); + ((FilterInput *) fc)->type = (gchar *)xmlStrdup ((const guchar *)"rawcode"); } return fc; @@ -123,7 +123,7 @@ build_code (FilterElement *fe, GString *out, struct _FilterPart *ff) l = fi->values; while (l) { - g_string_append(out, (char *)l->data); + g_string_append(out, (gchar *)l->data); l = g_list_next(l); } diff --git a/filter/filter-colour.c b/filter/filter-colour.c index a5cc3534ad..c175829a5e 100644 --- a/filter/filter-colour.c +++ b/filter/filter-colour.c @@ -32,10 +32,10 @@ #define d(x) -static int colour_eq (FilterElement *fe, FilterElement *cm); +static gint colour_eq (FilterElement *fe, FilterElement *cm); static void xml_create (FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode (FilterElement *fe); -static int xml_decode (FilterElement *fe, xmlNodePtr node); +static gint xml_decode (FilterElement *fe, xmlNodePtr node); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff); static void format_sexp (FilterElement *, GString *); @@ -143,10 +143,10 @@ xml_encode (FilterElement *fe) g_snprintf (spec, sizeof (spec), "#%04x%04x%04x", fc->color.red, fc->color.green, fc->color.blue); - value = xmlNewNode(NULL, (const unsigned char *)"value"); - xmlSetProp(value, (const unsigned char *)"type", (const unsigned char *)"colour"); - xmlSetProp(value, (const unsigned char *)"name", (unsigned char *)fe->name); - xmlSetProp(value, (const unsigned char *)"spec", (unsigned char *)spec); + value = xmlNewNode(NULL, (const guchar *)"value"); + xmlSetProp(value, (const guchar *)"type", (const guchar *)"colour"); + xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name); + xmlSetProp(value, (const guchar *)"spec", (guchar *)spec); return value; } @@ -158,22 +158,22 @@ xml_decode (FilterElement *fe, xmlNodePtr node) xmlChar *prop; xmlFree (fe->name); - fe->name = (char *)xmlGetProp(node, (const unsigned char *)"name"); + fe->name = (gchar *)xmlGetProp(node, (const guchar *)"name"); - prop = xmlGetProp(node, (const unsigned char *)"spec"); + prop = xmlGetProp(node, (const guchar *)"spec"); if (prop != NULL) { - gdk_color_parse((char *)prop, &fc->color); + gdk_color_parse((gchar *)prop, &fc->color); xmlFree (prop); } else { /* try reading the old RGB properties */ - prop = xmlGetProp(node, (const unsigned char *)"red"); - sscanf((char *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.red); + prop = xmlGetProp(node, (const guchar *)"red"); + sscanf((gchar *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.red); xmlFree (prop); - prop = xmlGetProp(node, (const unsigned char *)"green"); - sscanf((char *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.green); + prop = xmlGetProp(node, (const guchar *)"green"); + sscanf((gchar *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.green); xmlFree (prop); - prop = xmlGetProp(node, (const unsigned char *)"blue"); - sscanf((char *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.blue); + prop = xmlGetProp(node, (const guchar *)"blue"); + sscanf((gchar *)prop, "%" G_GINT16_MODIFIER "x", &fc->color.blue); xmlFree (prop); } diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index d0a7b591a5..4ab85d36bf 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -46,10 +46,10 @@ #define d(x) static gboolean validate (FilterElement *fe); -static int date_eq (FilterElement *fe, FilterElement *cm); +static gint date_eq (FilterElement *fe, FilterElement *cm); static void xml_create (FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode (FilterElement *fe); -static int xml_decode (FilterElement *fe, xmlNodePtr node); +static gint xml_decode (FilterElement *fe, xmlNodePtr node); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *fds); static void format_sexp (FilterElement *, GString *); @@ -62,10 +62,10 @@ static void filter_datespec_finalise (GObject *obj); typedef struct _timespan { guint32 seconds; - const char *past_singular; - const char *past_plural; - const char *future_singular; - const char *future_plural; + const gchar *past_singular; + const gchar *past_plural; + const gchar *future_singular; + const gchar *future_plural; float max; } timespan; @@ -97,7 +97,7 @@ struct _FilterDatespecPrivate { GtkWidget *label_button; GtkWidget *notebook_type, *combobox_type, *calendar_specify, *spin_relative, *combobox_relative, *combobox_past_future; FilterDatespec_type type; - int span; + gint span; }; static FilterElementClass *parent_class; @@ -217,19 +217,19 @@ xml_encode (FilterElement *fe) { xmlNodePtr value, work; FilterDatespec *fds = (FilterDatespec *)fe; - char str[32]; + gchar str[32]; d(printf ("Encoding datespec as xml\n")); - value = xmlNewNode (NULL, (const unsigned char *)"value"); - xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name); - xmlSetProp (value, (const unsigned char *)"type", (const unsigned char *)"datespec"); + value = xmlNewNode (NULL, (const guchar *)"value"); + xmlSetProp (value, (const guchar *)"name", (guchar *)fe->name); + xmlSetProp (value, (const guchar *)"type", (const guchar *)"datespec"); - work = xmlNewChild (value, NULL, (const unsigned char *)"datespec", NULL); + work = xmlNewChild (value, NULL, (const guchar *)"datespec", NULL); sprintf (str, "%d", fds->type); - xmlSetProp (work, (const unsigned char *)"type", (unsigned char *)str); + xmlSetProp (work, (const guchar *)"type", (guchar *)str); sprintf (str, "%d", (int)fds->value); - xmlSetProp (work, (const unsigned char *)"value", (unsigned char *)str); + xmlSetProp (work, (const guchar *)"value", (guchar *)str); return value; } @@ -244,16 +244,16 @@ xml_decode (FilterElement *fe, xmlNodePtr node) d(printf ("Decoding datespec from xml %p\n", fe)); xmlFree (fe->name); - fe->name = (char *)xmlGetProp (node, (const unsigned char *)"name"); + fe->name = (gchar *)xmlGetProp (node, (const guchar *)"name"); n = node->children; while (n) { - if (!strcmp ((char *)n->name, "datespec")) { - val = xmlGetProp (n, (const unsigned char *)"type"); - fds->type = atoi ((char *)val); + if (!strcmp ((gchar *)n->name, "datespec")) { + val = xmlGetProp (n, (const guchar *)"type"); + fds->type = atoi ((gchar *)val); xmlFree (val); - val = xmlGetProp (n, (const unsigned char *)"value"); - fds->value = atoi ((char *)val); + val = xmlGetProp (n, (const guchar *)"value"); + fds->value = atoi ((gchar *)val); xmlFree (val); break; } @@ -266,7 +266,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node) static int get_best_span (time_t val) { - int i; + gint i; for (i=N_TIMESPANS-1;i>=0;i--) { if (val % timespans[i].seconds == 0) @@ -280,8 +280,8 @@ get_best_span (time_t val) static void set_button (FilterDatespec *fds) { - char buf[128]; - char *label = buf; + gchar buf[128]; + gchar *label = buf; switch (fds->type) { case FDST_UNKNOWN: @@ -301,7 +301,7 @@ set_button (FilterDatespec *fds) if (fds->value == 0) label = _("now"); else { - int span, count; + gint span, count; span = get_best_span(fds->value); count = fds->value / timespans[span].seconds; @@ -312,7 +312,7 @@ set_button (FilterDatespec *fds) if (fds->value == 0) label = _("now"); else { - int span, count; + gint span, count; span = get_best_span(fds->value); count = fds->value / timespans[span].seconds; @@ -344,7 +344,7 @@ get_values (FilterDatespec *fds) break; } case FDST_X_FUTURE: case FDST_X_AGO: { - int val; + gint val; val = gtk_spin_button_get_value_as_int((GtkSpinButton *)p->spin_relative); fds->value = timespans[p->span].seconds * val; @@ -360,7 +360,7 @@ get_values (FilterDatespec *fds) static void set_values (FilterDatespec *fds) { - int note_type; + gint note_type; struct _FilterDatespecPrivate *p = PRIV(fds); @@ -430,7 +430,7 @@ button_clicked (GtkButton *button, FilterDatespec *fds) GtkWidget *toplevel; GtkDialog *dialog; GladeXML *gui; - char *filter_glade = g_build_filename (EVOLUTION_GLADEDIR, + gchar *filter_glade = g_build_filename (EVOLUTION_GLADEDIR, "filter.glade", NULL); diff --git a/filter/filter-element.c b/filter/filter-element.c index 1fa0a14ee8..f2d65d63b4 100644 --- a/filter/filter-element.c +++ b/filter/filter-element.c @@ -31,14 +31,14 @@ #include "filter-element.h" struct _element_type { - char *name; + gchar *name; FilterElementFunc create; - void *data; + gpointer data; }; static gboolean validate (FilterElement *fe); -static int element_eq(FilterElement *fe, FilterElement *cm); +static gint element_eq(FilterElement *fe, FilterElement *cm); static void xml_create(FilterElement *fe, xmlNodePtr node); static FilterElement *clone(FilterElement *fe); static void copy_value(FilterElement *de, FilterElement *se); @@ -122,7 +122,7 @@ filter_element_validate (FilterElement *fe) return FILTER_ELEMENT_GET_CLASS (fe)->validate (fe); } -int +gint filter_element_eq (FilterElement *fe, FilterElement *cm) { FilterElementClass *klass; @@ -168,7 +168,7 @@ filter_element_xml_encode (FilterElement *fe) * * Return value: **/ -int +gint filter_element_xml_decode (FilterElement *fe, xmlNodePtr node) { return FILTER_ELEMENT_GET_CLASS (fe)->xml_decode (fe, node); @@ -254,7 +254,7 @@ element_eq (FilterElement *fe, FilterElement *cm) static void xml_create (FilterElement *fe, xmlNodePtr node) { - fe->name = (char *)xmlGetProp (node, (const unsigned char *)"name"); + fe->name = (gchar *)xmlGetProp (node, (const guchar *)"name"); } static FilterElement * @@ -288,7 +288,7 @@ copy_value(FilterElement *de, FilterElement *se) if (((FilterInput *)se)->values) filter_input_set_value((FilterInput*)de, ((FilterInput *)se)->values->data); } else if (IS_FILTER_INT(de)) { - ((FilterInt *)de)->val = atoi((char *) ((FilterInput *)se)->values->data); + ((FilterInt *)de)->val = atoi((gchar *) ((FilterInput *)se)->values->data); } } else if (IS_FILTER_COLOUR(se)) { if (IS_FILTER_COLOUR(de)) { @@ -312,7 +312,7 @@ copy_value(FilterElement *de, FilterElement *se) } else if (IS_FILTER_INPUT(de)) { FilterInt *s = (FilterInt *)se; FilterInput *d = (FilterInput *)de; - char *v; + gchar *v; v = g_strdup_printf("%d", s->val); filter_input_set_value(d, v); diff --git a/filter/filter-element.h b/filter/filter-element.h index 76894542a2..4c105a77c3 100644 --- a/filter/filter-element.h +++ b/filter/filter-element.h @@ -38,12 +38,12 @@ typedef struct _FilterElement FilterElement; typedef struct _FilterElementClass FilterElementClass; -typedef FilterElement *(*FilterElementFunc)(void *data); +typedef FilterElement *(*FilterElementFunc)(gpointer data); struct _FilterElement { GObject parent_object; - char *name; + gchar *name; gpointer data; }; @@ -54,11 +54,11 @@ struct _FilterElementClass { /* virtual methods */ gboolean (*validate) (FilterElement *fe); - int (*eq) (FilterElement *fe, FilterElement *cm); + gint (*eq) (FilterElement *fe, FilterElement *cm); void (*xml_create) (FilterElement *, xmlNodePtr); xmlNodePtr (*xml_encode) (FilterElement *); - int (*xml_decode) (FilterElement *, xmlNodePtr); + gint (*xml_decode) (FilterElement *, xmlNodePtr); FilterElement *(*clone) (FilterElement *fe); void (*copy_value)(FilterElement *fe, FilterElement *se); diff --git a/filter/filter-file.c b/filter/filter-file.c index 2c0ac87c7f..0d421042e6 100644 --- a/filter/filter-file.c +++ b/filter/filter-file.c @@ -38,10 +38,10 @@ #define d(x) static gboolean validate (FilterElement *fe); -static int file_eq (FilterElement *fe, FilterElement *cm); +static gint file_eq (FilterElement *fe, FilterElement *cm); static void xml_create (FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode (FilterElement *fe); -static int xml_decode (FilterElement *fe, xmlNodePtr node); +static gint xml_decode (FilterElement *fe, xmlNodePtr node); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff); static void format_sexp (FilterElement *, GString *); @@ -131,18 +131,18 @@ filter_file_new (void) FilterFile * -filter_file_new_type_name (const char *type) +filter_file_new_type_name (const gchar *type) { FilterFile *file; file = filter_file_new (); - file->type = (char *)xmlStrdup ((xmlChar *)type); + file->type = (gchar *)xmlStrdup ((xmlChar *)type); return file; } void -filter_file_set_path (FilterFile *file, const char *path) +filter_file_set_path (FilterFile *file, const gchar *path) { g_free (file->path); file->path = g_strdup (path); @@ -214,12 +214,12 @@ xml_encode (FilterElement *fe) d(printf ("Encoding %s as xml\n", type)); - value = xmlNewNode (NULL, (const unsigned char *)"value"); - xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name); - xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)type); + value = xmlNewNode (NULL, (const guchar *)"value"); + xmlSetProp (value, (const guchar *)"name", (guchar *)fe->name); + xmlSetProp (value, (const guchar *)"type", (guchar *)type); - cur = xmlNewChild (value, NULL, (unsigned char *)type, NULL); - xmlNodeSetContent (cur, (unsigned char *)file->path); + cur = xmlNewChild (value, NULL, (guchar *)type, NULL); + xmlNodeSetContent (cur, (guchar *)file->path); return value; } @@ -228,11 +228,11 @@ static int xml_decode (FilterElement *fe, xmlNodePtr node) { FilterFile *file = (FilterFile *)fe; - char *name, *str, *type; + gchar *name, *str, *type; xmlNodePtr n; - name = (char *)xmlGetProp (node, (const unsigned char *)"name"); - type = (char *)xmlGetProp (node, (const unsigned char *)"type"); + name = (gchar *)xmlGetProp (node, (const guchar *)"name"); + type = (gchar *)xmlGetProp (node, (const guchar *)"type"); d(printf("Decoding %s from xml %p\n", type, fe)); d(printf ("Name = %s\n", name)); @@ -247,8 +247,8 @@ xml_decode (FilterElement *fe, xmlNodePtr node) n = node->children; while (n != NULL) { - if (!strcmp ((char *)n->name, type)) { - str = (char *)xmlNodeGetContent (n); + if (!strcmp ((gchar *)n->name, type)) { + str = (gchar *)xmlNodeGetContent (n); file->path = g_strdup (str ? str : ""); xmlFree (str); @@ -268,7 +268,7 @@ static void filename_changed (GtkWidget *widget, FilterElement *fe) { FilterFile *file = (FilterFile *) fe; - const char *new; + const gchar *new; new = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); g_free (file->path); diff --git a/filter/filter-file.h b/filter/filter-file.h index 02dabdb2e8..3aa30adbf1 100644 --- a/filter/filter-file.h +++ b/filter/filter-file.h @@ -44,8 +44,8 @@ typedef struct _FilterFileClass FilterFileClass; struct _FilterFile { FilterElement parent_object; - char *type; - char *path; + gchar *type; + gchar *path; }; struct _FilterFileClass { @@ -61,10 +61,10 @@ GType filter_file_get_type (void); FilterFile *filter_file_new (void); -FilterFile *filter_file_new_type_name (const char *type); +FilterFile *filter_file_new_type_name (const gchar *type); /* methods */ -void filter_file_set_path (FilterFile *file, const char *path); +void filter_file_set_path (FilterFile *file, const gchar *path); #ifdef __cplusplus } diff --git a/filter/filter-input.c b/filter/filter-input.c index 30d6ed9c45..5eeed60de7 100644 --- a/filter/filter-input.c +++ b/filter/filter-input.c @@ -39,10 +39,10 @@ #define d(x) static gboolean validate (FilterElement *fe); -static int input_eq (FilterElement *fe, FilterElement *cm); +static gint input_eq (FilterElement *fe, FilterElement *cm); static void xml_create (FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode (FilterElement *fe); -static int xml_decode (FilterElement *fe, xmlNodePtr node); +static gint xml_decode (FilterElement *fe, xmlNodePtr node); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff); static void format_sexp (FilterElement *, GString *); @@ -132,12 +132,12 @@ filter_input_new (void) } FilterInput * -filter_input_new_type_name (const char *type) +filter_input_new_type_name (const gchar *type) { FilterInput *fi; fi = filter_input_new (); - fi->type = (char *)xmlStrdup ((xmlChar *)type); + fi->type = (gchar *)xmlStrdup ((xmlChar *)type); d(printf("new type %s = %p\n", type, fi)); @@ -145,7 +145,7 @@ filter_input_new_type_name (const char *type) } void -filter_input_set_value (FilterInput *fi, const char *value) +filter_input_set_value (FilterInput *fi, const gchar *value) { GList *l; @@ -168,15 +168,15 @@ validate (FilterElement *fe) gboolean valid = TRUE; if (fi->values && !strcmp (fi->type, "regex")) { - const char *pattern; + const gchar *pattern; regex_t regexpat; - int regerr; + gint regerr; pattern = fi->values->data; if ((regerr = regcomp (®expat, pattern, REG_EXTENDED | REG_NEWLINE | REG_ICASE))) { size_t reglen; - char *regmsg; + gchar *regmsg; /* regerror gets called twice to get the full error string length to do proper posix error reporting */ @@ -203,10 +203,10 @@ validate (FilterElement *fe) static int list_eq (GList *al, GList *bl) { - int truth = TRUE; + gint truth = TRUE; while (truth && al && bl) { - truth = strcmp ((char *) al->data, (char *) bl->data) == 0; + truth = strcmp ((gchar *) al->data, (gchar *) bl->data) == 0; al = al->next; bl = bl->next; } @@ -243,15 +243,15 @@ xml_encode (FilterElement *fe) d(printf ("Encoding %s as xml\n", type)); - value = xmlNewNode (NULL, (const unsigned char *)"value"); - xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name); - xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)type); + value = xmlNewNode (NULL, (const guchar *)"value"); + xmlSetProp (value, (const guchar *)"name", (guchar *)fe->name); + xmlSetProp (value, (const guchar *)"type", (guchar *)type); l = fi->values; while (l) { xmlNodePtr cur; xmlChar *str = l->data; - cur = xmlNewChild (value, NULL, (unsigned char *)type, NULL); + cur = xmlNewChild (value, NULL, (guchar *)type, NULL); str = xmlEncodeEntitiesReentrant (NULL, str); xmlNodeSetContent (cur, str); @@ -267,7 +267,7 @@ static int xml_decode (FilterElement *fe, xmlNodePtr node) { FilterInput *fi = (FilterInput *)fe; - char *name, *str, *type; + gchar *name, *str, *type; xmlNodePtr n; GList *l; @@ -279,8 +279,8 @@ xml_decode (FilterElement *fe, xmlNodePtr node) g_list_free (fi->values); fi->values = NULL; - name = (char *)xmlGetProp (node, (const unsigned char *)"name"); - type = (char *)xmlGetProp (node, (const unsigned char *)"type"); + name = (gchar *)xmlGetProp (node, (const guchar *)"name"); + type = (gchar *)xmlGetProp (node, (const guchar *)"type"); d(printf("Decoding %s from xml %p\n", type, fe)); d(printf ("Name = %s\n", name)); @@ -290,9 +290,9 @@ xml_decode (FilterElement *fe, xmlNodePtr node) fi->type = type; n = node->children; while (n) { - if (!strcmp ((char *)n->name, type)) { - if (!(str = (char *)xmlNodeGetContent (n))) - str = (char *)xmlStrdup ((const unsigned char *)""); + if (!strcmp ((gchar *)n->name, type)) { + if (!(str = (gchar *)xmlNodeGetContent (n))) + str = (gchar *)xmlStrdup ((const guchar *)""); d(printf (" '%s'\n", str)); fi->values = g_list_append (fi->values, g_strdup (str)); @@ -310,7 +310,7 @@ static void entry_changed (GtkEntry *entry, FilterElement *fe) { FilterInput *fi = (FilterInput *) fe; - const char *new; + const gchar *new; GList *l; new = gtk_entry_get_text (entry); @@ -337,7 +337,7 @@ get_widget (FilterElement *fe) entry = gtk_entry_new (); if (fi->values && fi->values->data) - gtk_entry_set_text (GTK_ENTRY (entry), (const char *) fi->values->data); + gtk_entry_set_text (GTK_ENTRY (entry), (const gchar *) fi->values->data); g_signal_connect (entry, "changed", G_CALLBACK (entry_changed), fe); diff --git a/filter/filter-input.h b/filter/filter-input.h index ac71847a76..9a5e181eaa 100644 --- a/filter/filter-input.h +++ b/filter/filter-input.h @@ -39,7 +39,7 @@ typedef struct _FilterInputClass FilterInputClass; struct _FilterInput { FilterElement parent_object; - char *type; /* name of type */ + gchar *type; /* name of type */ GList *values; /* strings */ }; @@ -54,9 +54,9 @@ struct _FilterInputClass { GType filter_input_get_type (void); FilterInput *filter_input_new (void); -FilterInput *filter_input_new_type_name (const char *type); +FilterInput *filter_input_new_type_name (const gchar *type); /* methods */ -void filter_input_set_value (FilterInput *fi, const char *value); +void filter_input_set_value (FilterInput *fi, const gchar *value); #endif /* ! _FILTER_INPUT_H */ diff --git a/filter/filter-int.c b/filter/filter-int.c index 170657e2dd..220e12fb38 100644 --- a/filter/filter-int.c +++ b/filter/filter-int.c @@ -32,11 +32,11 @@ #define d(x) -static int int_eq (FilterElement *fe, FilterElement *cm); +static gint int_eq (FilterElement *fe, FilterElement *cm); static FilterElement *int_clone(FilterElement *fe); static void xml_create (FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode (FilterElement *fe); -static int xml_decode (FilterElement *fe, xmlNodePtr node); +static gint xml_decode (FilterElement *fe, xmlNodePtr node); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff); static void format_sexp (FilterElement *fe, GString *out); @@ -125,7 +125,7 @@ filter_int_new (void) } FilterInt * -filter_int_new_type (const char *type, int min, int max) +filter_int_new_type (const gchar *type, gint min, gint max) { FilterInt *fi; @@ -139,7 +139,7 @@ filter_int_new_type (const char *type, int min, int max) } void -filter_int_set_value (FilterInt *fi, int val) +filter_int_set_value (FilterInt *fi, gint val) { fi->val = val; } @@ -176,19 +176,19 @@ xml_encode (FilterElement *fe) { xmlNodePtr value; FilterInt *fs = (FilterInt *)fe; - char intval[32]; - const char *type; + gchar intval[32]; + const gchar *type; type = fs->type?fs->type:"integer"; d(printf("Encoding %s as xml\n", type)); - value = xmlNewNode (NULL, (const unsigned char *)"value"); - xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name); - xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)type); + value = xmlNewNode (NULL, (const guchar *)"value"); + xmlSetProp (value, (const guchar *)"name", (guchar *)fe->name); + xmlSetProp (value, (const guchar *)"type", (guchar *)type); sprintf(intval, "%d", fs->val); - xmlSetProp (value, (unsigned char *)type, (unsigned char *)intval); + xmlSetProp (value, (guchar *)type, (guchar *)intval); return value; } @@ -197,23 +197,23 @@ static int xml_decode (FilterElement *fe, xmlNodePtr node) { FilterInt *fs = (FilterInt *)fe; - char *name, *type; - char *intval; + gchar *name, *type; + gchar *intval; d(printf("Decoding integer from xml %p\n", fe)); - name = (char *)xmlGetProp (node, (const unsigned char *)"name"); + name = (gchar *)xmlGetProp (node, (const guchar *)"name"); d(printf ("Name = %s\n", name)); xmlFree (fe->name); fe->name = name; - type = (char *)xmlGetProp(node, (const unsigned char *)"type"); + type = (gchar *)xmlGetProp(node, (const guchar *)"type"); d(printf ("Type = %s\n", type)); g_free(fs->type); fs->type = g_strdup(type); xmlFree(type); - intval = (char *)xmlGetProp (node, (unsigned char *)(fs->type ? fs->type : "integer")); + intval = (gchar *)xmlGetProp (node, (guchar *)(fs->type ? fs->type : "integer")); if (intval) { d(printf ("Value = %s\n", intval)); fs->val = atoi (intval); diff --git a/filter/filter-int.h b/filter/filter-int.h index 60e1b2bf85..4167bc8cf3 100644 --- a/filter/filter-int.h +++ b/filter/filter-int.h @@ -38,10 +38,10 @@ typedef struct _FilterIntClass FilterIntClass; struct _FilterInt { FilterElement parent_object; - char *type; - int val; - int min; - int max; + gchar *type; + gint val; + gint min; + gint max; }; struct _FilterIntClass { @@ -54,8 +54,8 @@ struct _FilterIntClass { GType filter_int_get_type (void); FilterInt *filter_int_new (void); -FilterInt *filter_int_new_type (const char *type, int min, int max); -void filter_int_set_value (FilterInt *fi, int val); +FilterInt *filter_int_new_type (const gchar *type, gint min, gint max); +void filter_int_set_value (FilterInt *fi, gint val); /* methods */ diff --git a/filter/filter-option.c b/filter/filter-option.c index f4b208c59d..5341705986 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -37,10 +37,10 @@ #define d(x) -static int option_eq (FilterElement *fe, FilterElement *cm); +static gint option_eq (FilterElement *fe, FilterElement *cm); static void xml_create (FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode (FilterElement *fe); -static int xml_decode (FilterElement *fe, xmlNodePtr node); +static gint xml_decode (FilterElement *fe, xmlNodePtr node); static FilterElement *clone (FilterElement *fe); static GtkWidget *get_widget (FilterElement *fe); static void build_code (FilterElement *fe, GString *out, struct _FilterPart *ff); @@ -108,7 +108,7 @@ filter_option_init (FilterOption *fo) } static void -free_option (struct _filter_option *o, void *data) +free_option (struct _filter_option *o, gpointer data) { g_free (o->title); g_free (o->value); @@ -142,7 +142,7 @@ filter_option_new (void) } static struct _filter_option * -find_option (FilterOption *fo, const char *name) +find_option (FilterOption *fo, const gchar *name) { GList *l = fo->options; struct _filter_option *op; @@ -159,7 +159,7 @@ find_option (FilterOption *fo, const char *name) } void -filter_option_set_current (FilterOption *option, const char *name) +filter_option_set_current (FilterOption *option, const gchar *name) { g_return_if_fail (IS_FILTER_OPTION(option)); @@ -168,7 +168,7 @@ filter_option_set_current (FilterOption *option, const char *name) /* used by implementers to add additional options */ struct _filter_option * -filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code, gboolean is_dynamic) +filter_option_add(FilterOption *fo, const gchar *value, const gchar *title, const gchar *code, gboolean is_dynamic) { struct _filter_option *op; @@ -188,7 +188,7 @@ filter_option_add(FilterOption *fo, const char *value, const char *title, const return op; } -const char * +const gchar * filter_option_get_current (FilterOption *option) { g_return_val_if_fail (IS_FILTER_OPTION (option), NULL); @@ -232,24 +232,24 @@ xml_create (FilterElement *fe, xmlNodePtr node) n = node->children; while (n) { - if (!strcmp ((char *)n->name, "option")) { - char *tmp, *value, *title = NULL, *code = NULL; + if (!strcmp ((gchar *)n->name, "option")) { + gchar *tmp, *value, *title = NULL, *code = NULL; - value = (char *)xmlGetProp (n, (const unsigned char *)"value"); + value = (gchar *)xmlGetProp (n, (const guchar *)"value"); work = n->children; while (work) { - if (!strcmp ((char *)work->name, "title") || !strcmp ((char *)work->name, "_title")) { + if (!strcmp ((gchar *)work->name, "title") || !strcmp ((gchar *)work->name, "_title")) { if (!title) { - if (!(tmp = (char *)xmlNodeGetContent (work))) - tmp = (char *)xmlStrdup ((const unsigned char *)""); + if (!(tmp = (gchar *)xmlNodeGetContent (work))) + tmp = (gchar *)xmlStrdup ((const guchar *)""); title = g_strdup (tmp); xmlFree (tmp); } - } else if (!strcmp ((char *)work->name, "code")) { + } else if (!strcmp ((gchar *)work->name, "code")) { if (!code) { - if (!(tmp = (char*)xmlNodeGetContent (work))) - tmp = (char *)xmlStrdup ((const unsigned char *)""); + if (!(tmp = (gchar *)xmlNodeGetContent (work))) + tmp = (gchar *)xmlStrdup ((const guchar *)""); code = g_strdup (tmp); xmlFree (tmp); @@ -262,7 +262,7 @@ xml_create (FilterElement *fe, xmlNodePtr node) xmlFree (value); g_free (title); g_free (code); - } else if (g_str_equal ((char *)n->name, "dynamic")) { + } else if (g_str_equal ((gchar *)n->name, "dynamic")) { if (fo->dynamic_func) { g_warning ("Only one 'dynamic' node is acceptable in the optionlist '%s'", fe->name); } else { @@ -274,12 +274,12 @@ xml_create (FilterElement *fe, xmlNodePtr node) */ xmlChar *fn; - fn = xmlGetProp (n, (const unsigned char *)"func"); + fn = xmlGetProp (n, (const guchar *)"func"); if (fn && *fn) { GSList *items, *i; struct _filter_option *op; - fo->dynamic_func = g_strdup ((const char *)fn); + fo->dynamic_func = g_strdup ((const gchar *)fn); /* get options now, to have them available when reading saved rules */ items = get_dynamic_options (fo); @@ -313,11 +313,11 @@ xml_encode (FilterElement *fe) FilterOption *fo = (FilterOption *)fe; d(printf ("Encoding option as xml\n")); - value = xmlNewNode (NULL, (const unsigned char *)"value"); - xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name); - xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)fo->type); + value = xmlNewNode (NULL, (const guchar *)"value"); + xmlSetProp (value, (const guchar *)"name", (guchar *)fe->name); + xmlSetProp (value, (const guchar *)"type", (guchar *)fo->type); if (fo->current) - xmlSetProp (value, (const unsigned char *)"value", (unsigned char *)fo->current->value); + xmlSetProp (value, (const guchar *)"value", (guchar *)fo->current->value); return value; } @@ -326,12 +326,12 @@ static int xml_decode (FilterElement *fe, xmlNodePtr node) { FilterOption *fo = (FilterOption *)fe; - char *value; + gchar *value; d(printf ("Decoding option from xml\n")); xmlFree (fe->name); - fe->name = (char *)xmlGetProp (node, (const unsigned char *)"name"); - value = (char *)xmlGetProp (node, (const unsigned char *)"value"); + fe->name = (gchar *)xmlGetProp (node, (const guchar *)"name"); + value = (gchar *)xmlGetProp (node, (const guchar *)"value"); if (value) { fo->current = find_option (fo, value); xmlFree (value); @@ -379,7 +379,7 @@ get_widget (FilterElement *fe) GtkWidget *combobox; GList *l; struct _filter_option *op; - int index = 0, current = 0; + gint index = 0, current = 0; if (fo->dynamic_func) { /* it is dynamically filled, thus remove all dynamics and put there the fresh ones */ diff --git a/filter/filter-option.h b/filter/filter-option.h index 8a4931a009..9fa1670951 100644 --- a/filter/filter-option.h +++ b/filter/filter-option.h @@ -37,9 +37,9 @@ typedef struct _FilterOption FilterOption; typedef struct _FilterOptionClass FilterOptionClass; struct _filter_option { - char *title; /* button title */ - char *value; /* value, if it has one */ - char *code; /* used to string code segments together */ + gchar *title; /* button title */ + gchar *value; /* value, if it has one */ + gchar *code; /* used to string code segments together */ gboolean is_dynamic; /* whether is the option dynamic, FALSE if static */ }; @@ -47,11 +47,11 @@ struct _filter_option { struct _FilterOption { FilterElement parent_object; - const char *type; /* static memory, type name written to xml */ + const gchar *type; /* static memory, type name written to xml */ GList *options; struct _filter_option *current; - char *dynamic_func; /* name of the dynamic fill func, called in get_widget */ + gchar *dynamic_func; /* name of the dynamic fill func, called in get_widget */ }; struct _FilterOptionClass { @@ -66,10 +66,10 @@ GType filter_option_get_type (void); FilterOption *filter_option_new (void); /* methods */ -void filter_option_set_current (FilterOption *option, const char *name); -const char *filter_option_get_current (FilterOption *option); +void filter_option_set_current (FilterOption *option, const gchar *name); +const gchar *filter_option_get_current (FilterOption *option); -struct _filter_option *filter_option_add (FilterOption *fo, const char *name, const char *title, const char *code, gboolean is_dynamic); +struct _filter_option *filter_option_add (FilterOption *fo, const gchar *name, const gchar *title, const gchar *code, gboolean is_dynamic); void filter_option_remove_all (FilterOption *fo); #endif /* ! _FILTER_OPTION_H */ diff --git a/filter/filter-part.c b/filter/filter-part.c index 799e7fcb36..2247810e6c 100644 --- a/filter/filter-part.c +++ b/filter/filter-part.c @@ -136,10 +136,10 @@ filter_part_validate (FilterPart *fp) return correct; } -int +gint filter_part_eq (FilterPart *fp, FilterPart *fc) { - int truth; + gint truth; GList *al, *bl; truth = ((fp->name && fc->name && strcmp(fp->name, fc->name) == 0) @@ -163,22 +163,22 @@ filter_part_eq (FilterPart *fp, FilterPart *fc) return truth && al == NULL && bl == NULL; } -int +gint filter_part_xml_create (FilterPart *ff, xmlNodePtr node, RuleContext *rc) { xmlNodePtr n; - char *type, *str; + gchar *type, *str; FilterElement *el; - str = (char *)xmlGetProp (node, (const unsigned char *)"name"); + str = (gchar *)xmlGetProp (node, (const guchar *)"name"); ff->name = g_strdup (str); if (str) xmlFree (str); n = node->children; while (n) { - if (!strcmp ((char *)n->name, "input")) { - type = (char *)xmlGetProp (n, (const unsigned char *)"type"); + if (!strcmp ((gchar *)n->name, "input")) { + type = (gchar *)xmlGetProp (n, (const guchar *)"type"); d(printf ("creating new element type input '%s'\n", type)); if (type != NULL && (el = rule_context_new_element(rc, type)) != NULL) { @@ -189,16 +189,16 @@ filter_part_xml_create (FilterPart *ff, xmlNodePtr node, RuleContext *rc) } else { g_warning ("Invalid xml format, missing/unknown input type"); } - } else if (!strcmp ((char *)n->name, "title") || !strcmp ((char *)n->name, "_title")) { + } else if (!strcmp ((gchar *)n->name, "title") || !strcmp ((gchar *)n->name, "_title")) { if (!ff->title) { - str = (char *)xmlNodeGetContent (n); + str = (gchar *)xmlNodeGetContent (n); ff->title = g_strdup (str); if (str) xmlFree (str); } - } else if (!strcmp ((char *)n->name, "code")) { + } else if (!strcmp ((gchar *)n->name, "code")) { if (!ff->code) { - str = (char *)xmlNodeGetContent (n); + str = (gchar *)xmlNodeGetContent (n); ff->code = g_strdup (str); if (str) xmlFree (str); @@ -221,8 +221,8 @@ filter_part_xml_encode (FilterPart *fp) g_return_val_if_fail (fp != NULL, NULL); - part = xmlNewNode (NULL, (const unsigned char *)"part"); - xmlSetProp (part, (const unsigned char *)"name", (unsigned char *)fp->name); + part = xmlNewNode (NULL, (const guchar *)"part"); + xmlSetProp (part, (const guchar *)"name", (guchar *)fp->name); l = fp->elements; while (l) { fe = l->data; @@ -235,20 +235,20 @@ filter_part_xml_encode (FilterPart *fp) } -int +gint filter_part_xml_decode (FilterPart *fp, xmlNodePtr node) { FilterElement *fe; xmlNodePtr n; - char *name; + gchar *name; g_return_val_if_fail (fp != NULL, -1); g_return_val_if_fail (node != NULL, -1); n = node->children; while (n) { - if (!strcmp ((char *)n->name, "value")) { - name = (char *)xmlGetProp (n, (const unsigned char *)"name"); + if (!strcmp ((gchar *)n->name, "value")) { + name = (gchar *)xmlGetProp (n, (const guchar *)"name"); d(printf ("finding element part %p %s = %p\n", name, name, fe)); fe = filter_part_find_element (fp, name); d(printf ("finding element part %p %s = %p\n", name, name, fe)); @@ -315,7 +315,7 @@ filter_part_copy_values (FilterPart *dst, FilterPart *src) } FilterElement * -filter_part_find_element (FilterPart *ff, const char *name) +filter_part_find_element (FilterPart *ff, const gchar *name) { GList *l = ff->elements; FilterElement *fe; @@ -412,7 +412,7 @@ filter_part_build_code_list (GList *l, GString *out) * Return value: **/ FilterPart * -filter_part_find_list (GList *l, const char *name) +filter_part_find_list (GList *l, const gchar *name) { FilterPart *part; @@ -469,11 +469,11 @@ filter_part_next_list (GList *l, FilterPart *last) * Expands the variables in string @str based on the values of the part. **/ void -filter_part_expand_code (FilterPart *ff, const char *source, GString *out) +filter_part_expand_code (FilterPart *ff, const gchar *source, GString *out) { - const char *newstart, *start, *end; - char *name = alloca (32); - int len, namelen = 32; + const gchar *newstart, *start, *end; + gchar *name = alloca (32); + gint len, namelen = 32; FilterElement *fe; start = source; @@ -505,7 +505,7 @@ filter_part_expand_code (FilterPart *ff, const char *source, GString *out) } #if 0 -int main(int argc, char **argv) +gint main(gint argc, gchar **argv) { GtkWidget *dialog, *w; xmlDocPtr system; diff --git a/filter/filter-part.h b/filter/filter-part.h index 1827433b1c..10337b95df 100644 --- a/filter/filter-part.h +++ b/filter/filter-part.h @@ -45,9 +45,9 @@ struct _FilterPart { GObject parent_object; struct _FilterPartPrivate *priv; - char *name; - char *title; - char *code; + gchar *name; + gchar *title; + gchar *code; GList *elements; }; @@ -64,25 +64,25 @@ FilterPart *filter_part_new (void); /* methods */ gboolean filter_part_validate (FilterPart *fp); -int filter_part_eq (FilterPart *fp, FilterPart *fc); +gint filter_part_eq (FilterPart *fp, FilterPart *fc); -int filter_part_xml_create (FilterPart *ff, xmlNodePtr node, struct _RuleContext *rc); +gint filter_part_xml_create (FilterPart *ff, xmlNodePtr node, struct _RuleContext *rc); xmlNodePtr filter_part_xml_encode (FilterPart *fe); -int filter_part_xml_decode (FilterPart *fe, xmlNodePtr node); +gint filter_part_xml_decode (FilterPart *fe, xmlNodePtr node); FilterPart *filter_part_clone (FilterPart *fp); void filter_part_copy_values (FilterPart *dfp, FilterPart *sfp); -FilterElement *filter_part_find_element (FilterPart *ff, const char *name); +FilterElement *filter_part_find_element (FilterPart *ff, const gchar *name); GtkWidget *filter_part_get_widget (FilterPart *ff); void filter_part_build_code (FilterPart *ff, GString *out); -void filter_part_expand_code (FilterPart *ff, const char *str, GString *out); +void filter_part_expand_code (FilterPart *ff, const gchar *str, GString *out); /* static functions */ void filter_part_build_code_list (GList *l, GString *out); -FilterPart *filter_part_find_list (GList *l, const char *name); +FilterPart *filter_part_find_list (GList *l, const gchar *name); FilterPart *filter_part_next_list (GList *l, FilterPart *last); #endif /* ! _FILTER_PART_H */ diff --git a/filter/filter-rule.c b/filter/filter-rule.c index cdc9f374f1..00610c48ea 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -36,10 +36,10 @@ #define d(x) -static int validate(FilterRule *); -static int rule_eq(FilterRule *fr, FilterRule *cm); +static gint validate(FilterRule *); +static gint rule_eq(FilterRule *fr, FilterRule *cm); static xmlNodePtr xml_encode (FilterRule *); -static int xml_decode (FilterRule *, xmlNodePtr, RuleContext *); +static gint xml_decode (FilterRule *, xmlNodePtr, RuleContext *); static void build_code (FilterRule *, GString * out); static void rule_copy (FilterRule *dest, FilterRule *src); static GtkWidget *get_widget (FilterRule * fr, struct _RuleContext *f); @@ -51,7 +51,7 @@ static void filter_rule_finalise (GObject *obj); #define _PRIVATE(x) (((FilterRule *)(x))->priv) struct _FilterRulePrivate { - int frozen; + gint frozen; }; static GObjectClass *parent_class = NULL; @@ -166,7 +166,7 @@ filter_rule_clone (FilterRule *base) } void -filter_rule_set_name (FilterRule *fr, const char *name) +filter_rule_set_name (FilterRule *fr, const gchar *name) { g_return_if_fail (IS_FILTER_RULE (fr)); @@ -181,7 +181,7 @@ filter_rule_set_name (FilterRule *fr, const char *name) } void -filter_rule_set_source (FilterRule *fr, const char *source) +filter_rule_set_source (FilterRule *fr, const gchar *source) { g_return_if_fail (IS_FILTER_RULE (fr)); @@ -195,7 +195,7 @@ filter_rule_set_source (FilterRule *fr, const char *source) filter_rule_emit_changed (fr); } -int +gint filter_rule_validate (FilterRule *fr) { g_return_val_if_fail (IS_FILTER_RULE (fr), 0); @@ -206,7 +206,7 @@ filter_rule_validate (FilterRule *fr) static int validate (FilterRule *fr) { - int valid = TRUE; + gint valid = TRUE; GList *parts; if (!fr->name || !*fr->name) { @@ -230,7 +230,7 @@ validate (FilterRule *fr) return valid; } -int +gint filter_rule_eq (FilterRule *fr, FilterRule *cm) { g_return_val_if_fail (IS_FILTER_RULE (fr), 0); @@ -243,7 +243,7 @@ filter_rule_eq (FilterRule *fr, FilterRule *cm) static int list_eq(GList *al, GList *bl) { - int truth = TRUE; + gint truth = TRUE; while (truth && al && bl) { FilterPart *a = al->data, *b = bl->data; @@ -283,16 +283,16 @@ xml_encode (FilterRule *fr) xmlNodePtr node, set, work; GList *l; - node = xmlNewNode (NULL, (const unsigned char *)"rule"); + node = xmlNewNode (NULL, (const guchar *)"rule"); - xmlSetProp (node, (const unsigned char *)"enabled", (const unsigned char *)(fr->enabled ? "true" : "false")); + xmlSetProp (node, (const guchar *)"enabled", (const guchar *)(fr->enabled ? "true" : "false")); switch (fr->grouping) { case FILTER_GROUP_ALL: - xmlSetProp (node, (const unsigned char *)"grouping", (const unsigned char *)"all"); + xmlSetProp (node, (const guchar *)"grouping", (const guchar *)"all"); break; case FILTER_GROUP_ANY: - xmlSetProp (node, (const unsigned char *)"grouping", (const unsigned char *)"any"); + xmlSetProp (node, (const guchar *)"grouping", (const guchar *)"any"); break; } @@ -300,37 +300,37 @@ xml_encode (FilterRule *fr) case FILTER_THREAD_NONE: break; case FILTER_THREAD_ALL: - xmlSetProp(node, (const unsigned char *)"threading", (const unsigned char *)"all"); + xmlSetProp(node, (const guchar *)"threading", (const guchar *)"all"); break; case FILTER_THREAD_REPLIES: - xmlSetProp(node, (const unsigned char *)"threading", (const unsigned char *)"replies"); + xmlSetProp(node, (const guchar *)"threading", (const guchar *)"replies"); break; case FILTER_THREAD_REPLIES_PARENTS: - xmlSetProp(node, (const unsigned char *)"threading", (const unsigned char *)"replies_parents"); + xmlSetProp(node, (const guchar *)"threading", (const guchar *)"replies_parents"); break; case FILTER_THREAD_SINGLE: - xmlSetProp(node, (const unsigned char *)"threading", (const unsigned char *)"single"); + xmlSetProp(node, (const guchar *)"threading", (const guchar *)"single"); break; } if (fr->source) { - xmlSetProp (node, (const unsigned char *)"source", (unsigned char *)fr->source); + xmlSetProp (node, (const guchar *)"source", (guchar *)fr->source); } else { /* set to the default filter type */ - xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming"); + xmlSetProp (node, (const guchar *)"source", (const guchar *)"incoming"); } if (fr->name) { - char *escaped = g_markup_escape_text (fr->name, -1); + gchar *escaped = g_markup_escape_text (fr->name, -1); - work = xmlNewNode (NULL, (const unsigned char *)"title"); - xmlNodeSetContent (work, (unsigned char *)escaped); + work = xmlNewNode (NULL, (const guchar *)"title"); + xmlNodeSetContent (work, (guchar *)escaped); xmlAddChild (node, work); g_free (escaped); } - set = xmlNewNode (NULL, (const unsigned char *)"partset"); + set = xmlNewNode (NULL, (const guchar *)"partset"); xmlAddChild (node, set); l = fr->parts; while (l) { @@ -346,13 +346,13 @@ static void load_set (xmlNodePtr node, FilterRule *fr, RuleContext *f) { xmlNodePtr work; - char *rulename; + gchar *rulename; FilterPart *part; work = node->children; while (work) { - if (!strcmp ((char *)work->name, "part")) { - rulename = (char *)xmlGetProp (work, (const unsigned char *)"name"); + if (!strcmp ((gchar *)work->name, "part")) { + rulename = (gchar *)xmlGetProp (work, (const guchar *)"name"); part = rule_context_find_part (f, rulename); if (part) { part = filter_part_clone (part); @@ -369,10 +369,10 @@ load_set (xmlNodePtr node, FilterRule *fr, RuleContext *f) } } -int +gint filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f) { - int res; + gint res; g_return_val_if_fail (IS_FILTER_RULE (fr), 0); g_return_val_if_fail (IS_RULE_CONTEXT (f), 0); @@ -391,15 +391,15 @@ static int xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f) { xmlNodePtr work; - char *grouping; - char *source; + gchar *grouping; + gchar *source; if (fr->name) { g_free (fr->name); fr->name = NULL; } - grouping = (char *)xmlGetProp (node, (const unsigned char *)"enabled"); + grouping = (gchar *)xmlGetProp (node, (const guchar *)"enabled"); if (!grouping) fr->enabled = TRUE; else { @@ -407,7 +407,7 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f) xmlFree (grouping); } - grouping = (char *)xmlGetProp (node, (const unsigned char *)"grouping"); + grouping = (gchar *)xmlGetProp (node, (const guchar *)"grouping"); if (!strcmp (grouping, "any")) fr->grouping = FILTER_GROUP_ANY; else @@ -416,7 +416,7 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f) fr->threading = FILTER_THREAD_NONE; if (f->flags & RULE_CONTEXT_THREADING - && (grouping = (char *)xmlGetProp (node, (const unsigned char *)"threading"))) { + && (grouping = (gchar *)xmlGetProp (node, (const guchar *)"threading"))) { if (!strcmp(grouping, "all")) fr->threading = FILTER_THREAD_ALL; else if (!strcmp(grouping, "replies")) @@ -429,7 +429,7 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f) } g_free (fr->source); - source = (char *)xmlGetProp (node, (const unsigned char *)"source"); + source = (gchar *)xmlGetProp (node, (const guchar *)"source"); if (source) { fr->source = g_strdup (source); xmlFree (source); @@ -440,13 +440,13 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f) work = node->children; while (work) { - if (!strcmp ((char *)work->name, "partset")) { + if (!strcmp ((gchar *)work->name, "partset")) { load_set (work, fr, f); - } else if (!strcmp ((char *)work->name, "title") || !strcmp ((char *)work->name, "_title")) { + } else if (!strcmp ((gchar *)work->name, "title") || !strcmp ((gchar *)work->name, "_title")) { if (!fr->name) { - char *str, *decstr = NULL; + gchar *str, *decstr = NULL; - str = (char *)xmlNodeGetContent (work); + str = (gchar *)xmlNodeGetContent (work); if (str) { decstr = g_strdup (_(str)); xmlFree (str); @@ -626,7 +626,7 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) { FilterPart *part = NULL; FilterPart *newpart; - int index, i; + gint index, i; index = gtk_combo_box_get_active (combobox); for (i = 0, part = rule_context_next_part (data->f, part); part && i < index; i++, part = rule_context_next_part (data->f, part)) { @@ -662,7 +662,7 @@ get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr) GtkWidget *combobox; GtkWidget *hbox; GtkWidget *p; - int index = 0, current = 0; + gint index = 0, current = 0; struct _part_data *data; data = g_malloc0 (sizeof (*data)); @@ -732,7 +732,7 @@ less_parts (GtkWidget *button, struct _rule_data *data) } static void -attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row) +attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, gint row) { GtkWidget *remove; @@ -784,7 +784,7 @@ more_parts (GtkWidget *button, struct _rule_data *data) new = rule_context_next_part (data->f, NULL); if (new) { GtkWidget *w; - int rows; + gint rows; new = filter_part_clone (new); filter_rule_add_part (data->fr, new); @@ -845,7 +845,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) gchar *text; FilterPart *part; struct _rule_data *data; - int rows, i; + gint rows, i; /* this stuff should probably be a table, but the rule parts need to be a vbox */ @@ -919,7 +919,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 0); if (f->flags & RULE_CONTEXT_GROUPING) { - const char *thread_types[] = { N_("If all conditions are met"), N_("If any conditions are met") }; + const gchar *thread_types[] = { N_("If all conditions are met"), N_("If any conditions are met") }; label = gtk_label_new_with_mnemonic (_("_Find items:")); combobox = gtk_combo_box_new_text (); @@ -939,7 +939,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) } if (f->flags & RULE_CONTEXT_THREADING) { - const char *thread_types[] = { N_("None"), N_("All related"), N_("Replies"), N_("Replies and parents"), N_("No reply or parent") }; + const gchar *thread_types[] = { N_("None"), N_("All related"), N_("Replies"), N_("Replies and parents"), N_("No reply or parent") }; label = gtk_label_new_with_mnemonic (_("I_nclude threads")); combobox = gtk_combo_box_new_text (); @@ -989,7 +989,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f) } FilterRule * -filter_rule_next_list (GList *l, FilterRule *last, const char *source) +filter_rule_next_list (GList *l, FilterRule *last, const gchar *source) { GList *node = l; @@ -1018,7 +1018,7 @@ filter_rule_next_list (GList *l, FilterRule *last, const char *source) } FilterRule * -filter_rule_find_list (GList * l, const char *name, const char *source) +filter_rule_find_list (GList * l, const gchar *name, const gchar *source) { while (l) { FilterRule *rule = l->data; @@ -1034,7 +1034,7 @@ filter_rule_find_list (GList * l, const char *name, const char *source) #ifdef FOR_TRANSLATIONS_ONLY -static char *list[] = { +static gchar *list[] = { N_("Incoming"), N_("Outgoing") }; #endif diff --git a/filter/filter-rule.h b/filter/filter-rule.h index 24419fec09..ecada873d1 100644 --- a/filter/filter-rule.h +++ b/filter/filter-rule.h @@ -65,13 +65,13 @@ struct _FilterRule { GObject parent_object; struct _FilterRulePrivate *priv; - char *name; - char *source; + gchar *name; + gchar *source; enum _filter_grouping_t grouping; enum _filter_threading_t threading; - unsigned int system:1; /* this is a system rule, cannot be edited/deleted */ + guint system:1; /* this is a system rule, cannot be edited/deleted */ GList *parts; gboolean enabled; @@ -81,11 +81,11 @@ struct _FilterRuleClass { GObjectClass parent_class; /* virtual methods */ - int (*validate) (FilterRule *); - int (*eq) (FilterRule *fr, FilterRule *cm); + gint (*validate) (FilterRule *); + gint (*eq) (FilterRule *fr, FilterRule *cm); xmlNodePtr (*xml_encode) (FilterRule *); - int (*xml_decode) (FilterRule *, xmlNodePtr, struct _RuleContext *); + gint (*xml_decode) (FilterRule *, xmlNodePtr, struct _RuleContext *); void (*build_code) (FilterRule *, GString *out); @@ -104,14 +104,14 @@ FilterRule *filter_rule_new (void); FilterRule *filter_rule_clone (FilterRule *base); /* methods */ -void filter_rule_set_name (FilterRule *fr, const char *name); -void filter_rule_set_source (FilterRule *fr, const char *source); +void filter_rule_set_name (FilterRule *fr, const gchar *name); +void filter_rule_set_source (FilterRule *fr, const gchar *source); -int filter_rule_validate (FilterRule *fr); -int filter_rule_eq (FilterRule *fr, FilterRule *cm); +gint filter_rule_validate (FilterRule *fr); +gint filter_rule_eq (FilterRule *fr, FilterRule *cm); xmlNodePtr filter_rule_xml_encode (FilterRule *fr); -int filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f); +gint filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f); void filter_rule_copy (FilterRule *dest, FilterRule *src); @@ -129,8 +129,8 @@ void filter_rule_build_action(FilterRule *fr, GString *out); void filter_rule_emit_changed (FilterRule *fr); /* static functions */ -FilterRule *filter_rule_next_list (GList *l, FilterRule *last, const char *source); -FilterRule *filter_rule_find_list (GList *l, const char *name, const char *source); +FilterRule *filter_rule_next_list (GList *l, FilterRule *last, const gchar *source); +FilterRule *filter_rule_find_list (GList *l, const gchar *name, const gchar *source); #endif /* ! _FILTER_RULE_H */ diff --git a/filter/rule-context.c b/filter/rule-context.c index 4bd364f0b8..e9dc71a150 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -54,12 +54,12 @@ #define d(x) -static int load(RuleContext *rc, const char *system, const char *user); -static int save(RuleContext *rc, const char *user); -static int revert(RuleContext *rc, const char *user); -static GList *rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp); -static GList *delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp); -static FilterElement *new_element(RuleContext *rc, const char *name); +static gint load(RuleContext *rc, const gchar *system, const gchar *user); +static gint save(RuleContext *rc, const gchar *user); +static gint revert(RuleContext *rc, const gchar *user); +static GList *rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp); +static GList *delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp); +static FilterElement *new_element(RuleContext *rc, const gchar *name); static void rule_context_class_init(RuleContextClass *klass); static void rule_context_init(RuleContext *rc); @@ -68,7 +68,7 @@ static void rule_context_finalise(GObject *obj); #define _PRIVATE(x)(((RuleContext *)(x))->priv) struct _RuleContextPrivate { - int frozen; + gint frozen; }; static GObjectClass *parent_class = NULL; @@ -168,14 +168,14 @@ rule_context_init(RuleContext *rc) } static void -free_part_set(struct _part_set_map *map, void *data) +free_part_set(struct _part_set_map *map, gpointer data) { g_free(map->name); g_free(map); } static void -free_rule_set(struct _rule_set_map *map, void *data) +free_rule_set(struct _rule_set_map *map, gpointer data) { g_free(map->name); g_free(map); @@ -220,7 +220,7 @@ rule_context_new(void) } void -rule_context_add_part_set(RuleContext *rc, const char *setname, GType part_type, RCPartFunc append, RCNextPartFunc next) +rule_context_add_part_set(RuleContext *rc, const gchar *setname, GType part_type, RCPartFunc append, RCNextPartFunc next) { struct _part_set_map *map; @@ -237,7 +237,7 @@ rule_context_add_part_set(RuleContext *rc, const char *setname, GType part_type, } void -rule_context_add_rule_set(RuleContext *rc, const char *setname, GType rule_type, RCRuleFunc append, RCNextRuleFunc next) +rule_context_add_rule_set(RuleContext *rc, const gchar *setname, GType rule_type, RCRuleFunc append, RCNextRuleFunc next) { struct _rule_set_map *map; @@ -261,7 +261,7 @@ rule_context_add_rule_set(RuleContext *rc, const char *setname, GType rule_type, * Set the text error for the context, or NULL to clear it. **/ static void -rule_context_set_error(RuleContext *rc, char *error) +rule_context_set_error(RuleContext *rc, gchar *error) { g_return_if_fail (rc); @@ -279,10 +279,10 @@ rule_context_set_error(RuleContext *rc, char *error) * * Return value: **/ -int -rule_context_load(RuleContext *rc, const char *system, const char *user) +gint +rule_context_load(RuleContext *rc, const gchar *system, const gchar *user) { - int res; + gint res; g_return_val_if_fail (rc, -1); @@ -296,7 +296,7 @@ rule_context_load(RuleContext *rc, const char *system, const char *user) } static int -load(RuleContext *rc, const char *system, const char *user) +load(RuleContext *rc, const gchar *system, const gchar *user) { xmlNodePtr set, rule, root; xmlDocPtr systemdoc, userdoc; @@ -315,7 +315,7 @@ load(RuleContext *rc, const char *system, const char *user) } root = xmlDocGetRootElement(systemdoc); - if (root == NULL || strcmp((char *)root->name, "filterdescription")) { + if (root == NULL || strcmp((gchar *)root->name, "filterdescription")) { rule_context_set_error(rc, g_strdup_printf("Unable to load system rules '%s': Invalid format", system)); xmlFreeDoc(systemdoc); return -1; @@ -335,7 +335,7 @@ load(RuleContext *rc, const char *system, const char *user) d(printf("loading parts ...\n")); rule = set->children; while (rule) { - if (!strcmp((char *)rule->name, "part")) { + if (!strcmp((gchar *)rule->name, "part")) { FilterPart *part = FILTER_PART(g_object_new(part_map->type, NULL, NULL)); if (filter_part_xml_create(part, rule, rc) == 0) { @@ -352,7 +352,7 @@ load(RuleContext *rc, const char *system, const char *user) rule = set->children; while (rule) { d(printf("checking node: %s\n", rule->name)); - if (!strcmp((char *)rule->name, "rule")) { + if (!strcmp((gchar *)rule->name, "rule")) { FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL)); if (filter_rule_xml_decode(part, rule, rc) == 0) { @@ -381,7 +381,7 @@ load(RuleContext *rc, const char *system, const char *user) rule = set->children; while (rule) { d(printf("checking node: %s\n", rule->name)); - if (!strcmp((char *)rule->name, "rule")) { + if (!strcmp((gchar *)rule->name, "rule")) { FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL)); if (filter_rule_xml_decode(part, rule, rc) == 0) { @@ -413,8 +413,8 @@ load(RuleContext *rc, const char *system, const char *user) * * Return value: **/ -int -rule_context_save(RuleContext *rc, const char *user) +gint +rule_context_save(RuleContext *rc, const gchar *user) { g_return_val_if_fail (rc, -1); g_return_val_if_fail (user, -1); @@ -423,23 +423,23 @@ rule_context_save(RuleContext *rc, const char *user) } static int -save(RuleContext *rc, const char *user) +save(RuleContext *rc, const gchar *user) { xmlDocPtr doc; xmlNodePtr root, rules, work; GList *l; FilterRule *rule; struct _rule_set_map *map; - int ret; + gint ret; - doc = xmlNewDoc((const unsigned char *)"1.0"); + doc = xmlNewDoc((const guchar *)"1.0"); /* FIXME: set character encoding to UTF-8? */ - root = xmlNewDocNode(doc, NULL, (const unsigned char *)"filteroptions", NULL); + root = xmlNewDocNode(doc, NULL, (const guchar *)"filteroptions", NULL); xmlDocSetRootElement(doc, root); l = rc->rule_set_list; while (l) { map = l->data; - rules = xmlNewDocNode(doc, NULL, (unsigned char *)map->name, NULL); + rules = xmlNewDocNode(doc, NULL, (guchar *)map->name, NULL); xmlAddChild(root, rules); rule = NULL; while ((rule = map->next(rc, rule, NULL))) { @@ -469,8 +469,8 @@ save(RuleContext *rc, const char *user) * * Return value: **/ -int -rule_context_revert(RuleContext *rc, const char *user) +gint +rule_context_revert(RuleContext *rc, const gchar *user) { g_return_val_if_fail (rc, 0); @@ -481,18 +481,18 @@ rule_context_revert(RuleContext *rc, const char *user) struct _revert_data { GHashTable *rules; - int rank; + gint rank; }; static void -revert_rule_remove(void *key, FilterRule *frule, RuleContext *rc) +revert_rule_remove(gpointer key, FilterRule *frule, RuleContext *rc) { rule_context_remove_rule(rc, frule); g_object_unref(frule); } static void -revert_source_remove(void *key, struct _revert_data *rest_data, RuleContext *rc) +revert_source_remove(gpointer key, struct _revert_data *rest_data, RuleContext *rc) { g_hash_table_foreach(rest_data->rules, (GHFunc)revert_rule_remove, rc); g_hash_table_destroy(rest_data->rules); @@ -500,7 +500,7 @@ revert_source_remove(void *key, struct _revert_data *rest_data, RuleContext *rc) } static guint -source_hashf(const char *a) +source_hashf(const gchar *a) { if (a) return g_str_hash(a); @@ -508,14 +508,14 @@ source_hashf(const char *a) } static int -source_eqf(const char *a, const char *b) +source_eqf(const gchar *a, const gchar *b) { return((a && b && strcmp(a, b) == 0)) || (a == NULL && b == NULL); } static int -revert(RuleContext *rc, const char *user) +revert(RuleContext *rc, const gchar *user) { xmlNodePtr set, rule; /*struct _part_set_map *part_map;*/ @@ -561,7 +561,7 @@ revert(RuleContext *rc, const char *user) rule = set->children; while (rule) { d(printf("checking node: %s\n", rule->name)); - if (!strcmp((char *)rule->name, "rule")) { + if (!strcmp((gchar *)rule->name, "rule")) { FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL)); if (filter_rule_xml_decode(part, rule, rc) == 0) { @@ -606,7 +606,7 @@ revert(RuleContext *rc, const char *user) } FilterPart * -rule_context_find_part(RuleContext *rc, const char *name) +rule_context_find_part(RuleContext *rc, const gchar *name) { g_return_val_if_fail (rc, NULL); g_return_val_if_fail (name, NULL); @@ -616,7 +616,7 @@ rule_context_find_part(RuleContext *rc, const char *name) } FilterPart * -rule_context_create_part(RuleContext *rc, const char *name) +rule_context_create_part(RuleContext *rc, const gchar *name) { FilterPart *part; @@ -638,7 +638,7 @@ rule_context_next_part(RuleContext *rc, FilterPart *last) } FilterRule * -rule_context_next_rule(RuleContext *rc, FilterRule *last, const char *source) +rule_context_next_rule(RuleContext *rc, FilterRule *last, const gchar *source) { g_return_val_if_fail (rc, NULL); @@ -646,7 +646,7 @@ rule_context_next_rule(RuleContext *rc, FilterRule *last, const char *source) } FilterRule * -rule_context_find_rule(RuleContext *rc, const char *name, const char *source) +rule_context_find_rule(RuleContext *rc, const gchar *name, const gchar *source) { g_return_val_if_fail (name, NULL); g_return_val_if_fail (rc, NULL); @@ -680,11 +680,11 @@ rule_context_add_rule(RuleContext *rc, FilterRule *new) } static void -new_rule_response(GtkWidget *dialog, int button, RuleContext *context) +new_rule_response(GtkWidget *dialog, gint button, RuleContext *context) { if (button == GTK_RESPONSE_OK) { FilterRule *rule = g_object_get_data((GObject *) dialog, "rule"); - char *user = g_object_get_data((GObject *) dialog, "path"); + gchar *user = g_object_get_data((GObject *) dialog, "path"); if (!filter_rule_validate(rule)) { /* no need to popup a dialog because the validate code does that. */ @@ -708,7 +708,7 @@ new_rule_response(GtkWidget *dialog, int button, RuleContext *context) /* add a rule, with a gui, asking for confirmation first ... optionally save to path */ void -rule_context_add_rule_gui(RuleContext *rc, FilterRule *rule, const char *title, const char *path) +rule_context_add_rule_gui(RuleContext *rc, FilterRule *rule, const gchar *title, const gchar *path) { GtkDialog *dialog; GtkWidget *widget; @@ -764,10 +764,10 @@ rule_context_remove_rule(RuleContext *rc, FilterRule *rule) } void -rule_context_rank_rule(RuleContext *rc, FilterRule *rule, const char *source, int rank) +rule_context_rank_rule(RuleContext *rc, FilterRule *rule, const gchar *source, gint rank) { GList *node; - int i = 0, index = 0; + gint i = 0, index = 0; g_return_if_fail (rc); g_return_if_fail (rule); @@ -800,11 +800,11 @@ rule_context_rank_rule(RuleContext *rc, FilterRule *rule, const char *source, in g_signal_emit(rc, signals[CHANGED], 0); } -int -rule_context_get_rank_rule(RuleContext *rc, FilterRule *rule, const char *source) +gint +rule_context_get_rank_rule(RuleContext *rc, FilterRule *rule, const gchar *source) { GList *node; - int i = 0; + gint i = 0; g_return_val_if_fail (rc, -1); g_return_val_if_fail (rule, -1); @@ -830,10 +830,10 @@ rule_context_get_rank_rule(RuleContext *rc, FilterRule *rule, const char *source } FilterRule * -rule_context_find_rank_rule(RuleContext *rc, int rank, const char *source) +rule_context_find_rank_rule(RuleContext *rc, gint rank, const gchar *source) { GList *node; - int i = 0; + gint i = 0; g_return_val_if_fail (rc, NULL); @@ -858,25 +858,25 @@ rule_context_find_rank_rule(RuleContext *rc, int rank, const char *source) } static GList * -delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp) +delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp) { return NULL; } GList * -rule_context_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp) +rule_context_delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp) { return RULE_CONTEXT_GET_CLASS(rc)->delete_uri(rc, uri, cmp); } static GList * -rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp) +rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp) { return NULL; } GList * -rule_context_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp) +rule_context_rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp) { return RULE_CONTEXT_GET_CLASS(rc)->rename_uri(rc, olduri, newuri, cmp); } @@ -897,7 +897,7 @@ rule_context_free_uri_list(RuleContext *rc, GList *uris) } static FilterElement * -new_element(RuleContext *rc, const char *type) +new_element(RuleContext *rc, const gchar *type) { if (!strcmp (type, "string")) { return (FilterElement *) filter_input_new (); @@ -941,7 +941,7 @@ new_element(RuleContext *rc, const char *type) * Return value: **/ FilterElement * -rule_context_new_element(RuleContext *rc, const char *name) +rule_context_new_element(RuleContext *rc, const gchar *name) { if (name == NULL) return NULL; diff --git a/filter/rule-context.h b/filter/rule-context.h index 539c5b3b56..63c9abaa67 100644 --- a/filter/rule-context.h +++ b/filter/rule-context.h @@ -52,7 +52,7 @@ struct _RuleContext { GObject parent_object; struct _RuleContextPrivate *priv; - char *error; /* string version of error */ + gchar *error; /* string version of error */ guint32 flags; /* capability flags */ @@ -71,14 +71,14 @@ struct _RuleContextClass { GObjectClass parent_class; /* virtual methods */ - int (*load) (RuleContext *rc, const char *system, const char *user); - int (*save) (RuleContext *rc, const char *user); - int (*revert) (RuleContext *rc, const char *user); + gint (*load) (RuleContext *rc, const gchar *system, const gchar *user); + gint (*save) (RuleContext *rc, const gchar *user); + gint (*revert) (RuleContext *rc, const gchar *user); - GList *(*delete_uri) (RuleContext *rc, const char *uri, GCompareFunc cmp); - GList *(*rename_uri) (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp); + GList *(*delete_uri) (RuleContext *rc, const gchar *uri, GCompareFunc cmp); + GList *(*rename_uri) (RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp); - FilterElement *(*new_element)(RuleContext *rc, const char *name); + FilterElement *(*new_element)(RuleContext *rc, const gchar *name); /* signals */ void (*rule_added) (RuleContext *rc, FilterRule *rule); @@ -89,17 +89,17 @@ struct _RuleContextClass { typedef void (*RCPartFunc) (RuleContext *rc, FilterPart *part); typedef void (*RCRuleFunc) (RuleContext *rc, FilterRule *part); typedef FilterPart * (*RCNextPartFunc) (RuleContext *rc, FilterPart *part); -typedef FilterRule * (*RCNextRuleFunc) (RuleContext *rc, FilterRule *rule, const char *source); +typedef FilterRule * (*RCNextRuleFunc) (RuleContext *rc, FilterRule *rule, const gchar *source); struct _part_set_map { - char *name; + gchar *name; GType type; RCPartFunc append; RCNextPartFunc next; }; struct _rule_set_map { - char *name; + gchar *name; GType type; RCRuleFunc append; RCNextRuleFunc next; @@ -111,38 +111,38 @@ GType rule_context_get_type (void); RuleContext *rule_context_new (void); /* io */ -int rule_context_load (RuleContext *rc, const char *system, const char *user); -int rule_context_save (RuleContext *rc, const char *user); -int rule_context_revert (RuleContext *rc, const char *user); +gint rule_context_load (RuleContext *rc, const gchar *system, const gchar *user); +gint rule_context_save (RuleContext *rc, const gchar *user); +gint rule_context_revert (RuleContext *rc, const gchar *user); void rule_context_add_part (RuleContext *rc, FilterPart *new); -FilterPart *rule_context_find_part (RuleContext *rc, const char *name); -FilterPart *rule_context_create_part (RuleContext *rc, const char *name); +FilterPart *rule_context_find_part (RuleContext *rc, const gchar *name); +FilterPart *rule_context_create_part (RuleContext *rc, const gchar *name); FilterPart *rule_context_next_part (RuleContext *rc, FilterPart *last); -FilterRule *rule_context_next_rule (RuleContext *rc, FilterRule *last, const char *source); -FilterRule *rule_context_find_rule (RuleContext *rc, const char *name, const char *source); -FilterRule *rule_context_find_rank_rule (RuleContext *rc, int rank, const char *source); +FilterRule *rule_context_next_rule (RuleContext *rc, FilterRule *last, const gchar *source); +FilterRule *rule_context_find_rule (RuleContext *rc, const gchar *name, const gchar *source); +FilterRule *rule_context_find_rank_rule (RuleContext *rc, gint rank, const gchar *source); void rule_context_add_rule (RuleContext *rc, FilterRule *new); -void rule_context_add_rule_gui (RuleContext *rc, FilterRule *rule, const char *title, const char *path); +void rule_context_add_rule_gui (RuleContext *rc, FilterRule *rule, const gchar *title, const gchar *path); void rule_context_remove_rule (RuleContext *rc, FilterRule *rule); /* get/set the rank (position) of a rule */ -void rule_context_rank_rule (RuleContext *rc, FilterRule *rule, const char *source, int rank); -int rule_context_get_rank_rule (RuleContext *rc, FilterRule *rule, const char *source); +void rule_context_rank_rule (RuleContext *rc, FilterRule *rule, const gchar *source, gint rank); +gint rule_context_get_rank_rule (RuleContext *rc, FilterRule *rule, const gchar *source); /* setup type for set parts */ -void rule_context_add_part_set (RuleContext *rc, const char *setname, GType part_type, +void rule_context_add_part_set (RuleContext *rc, const gchar *setname, GType part_type, RCPartFunc append, RCNextPartFunc next); -void rule_context_add_rule_set (RuleContext *rc, const char *setname, GType rule_type, +void rule_context_add_rule_set (RuleContext *rc, const gchar *setname, GType rule_type, RCRuleFunc append, RCNextRuleFunc next); /* dynamic element types */ -FilterElement *rule_context_new_element(RuleContext *rc, const char *name); +FilterElement *rule_context_new_element(RuleContext *rc, const gchar *name); /* uri's disappear/renamed externally */ -GList *rule_context_delete_uri (RuleContext *rc, const char *uri, GCompareFunc cmp); -GList *rule_context_rename_uri (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp); +GList *rule_context_delete_uri (RuleContext *rc, const gchar *uri, GCompareFunc cmp); +GList *rule_context_rename_uri (RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp); void rule_context_free_uri_list (RuleContext *rc, GList *uris); diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 07ea3fd1e4..4a1e831451 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -35,11 +35,11 @@ #include "e-util/e-util-private.h" #include "rule-editor.h" -static int enable_undo = 0; +static gint enable_undo = 0; #define d(x) -static void set_source (RuleEditor *re, const char *source); +static void set_source (RuleEditor *re, const gchar *source); static void set_sensitive (RuleEditor *re); static FilterRule *create_rule (RuleEditor *re); @@ -164,11 +164,11 @@ rule_editor_destroy (GtkObject *obj) * Return value: A new #RuleEditor object. **/ RuleEditor * -rule_editor_new (RuleContext *rc, const char *source, const char *label) +rule_editor_new (RuleContext *rc, const gchar *source, const gchar *label) { RuleEditor *re = (RuleEditor *) g_object_new (RULE_TYPE_EDITOR, NULL); GladeXML *gui; - char *filter_glade = g_build_filename (EVOLUTION_GLADEDIR, + gchar *filter_glade = g_build_filename (EVOLUTION_GLADEDIR, "filter.glade", NULL); @@ -191,7 +191,7 @@ rule_editor_set_sensitive (RuleEditor *re) /* used internally by implementations */ void -rule_editor_set_source (RuleEditor *re, const char *source) +rule_editor_set_source (RuleEditor *re, const gchar *source) { RULE_EDITOR_GET_CLASS (re)->set_source (re, source); } @@ -231,7 +231,7 @@ editor_destroy (RuleEditor *re, GObject *deadbeef) } static void -rule_editor_add_undo (RuleEditor *re, int type, FilterRule *rule, int rank, int newrank) +rule_editor_add_undo (RuleEditor *re, gint type, FilterRule *rule, gint rank, gint newrank) { RuleEditorUndo *undo; @@ -299,7 +299,7 @@ rule_editor_play_undo (RuleEditor *re) } static void -editor_response (GtkWidget *dialog, int button, RuleEditor *re) +editor_response (GtkWidget *dialog, gint button, RuleEditor *re) { if (button == GTK_RESPONSE_CANCEL) { if (enable_undo) @@ -320,7 +320,7 @@ editor_response (GtkWidget *dialog, int button, RuleEditor *re) } static void -add_editor_response (GtkWidget *dialog, int button, RuleEditor *re) +add_editor_response (GtkWidget *dialog, gint button, RuleEditor *re) { GtkTreeSelection *selection; GtkTreePath *path; @@ -399,12 +399,12 @@ rule_add (GtkWidget *widget, RuleEditor *re) } static void -edit_editor_response (GtkWidget *dialog, int button, RuleEditor *re) +edit_editor_response (GtkWidget *dialog, gint button, RuleEditor *re) { FilterRule *rule; GtkTreePath *path; GtkTreeIter iter; - int pos; + gint pos; if (button == GTK_RESPONSE_OK) { if (!filter_rule_validate (re->edit)) { @@ -485,7 +485,7 @@ rule_delete (GtkWidget *widget, RuleEditor *re) GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; - int pos, len; + gint pos, len; update_selected_rule(re); @@ -536,7 +536,7 @@ rule_delete (GtkWidget *widget, RuleEditor *re) } static void -rule_move (RuleEditor *re, int from, int to) +rule_move (RuleEditor *re, gint from, gint to) { GtkTreeSelection *selection; GtkTreePath *path; @@ -580,7 +580,7 @@ rule_move (RuleEditor *re, int from, int to) static void rule_top (GtkWidget *widget, RuleEditor *re) { - int pos; + gint pos; update_selected_rule(re); @@ -593,7 +593,7 @@ rule_top (GtkWidget *widget, RuleEditor *re) static void rule_up (GtkWidget *widget, RuleEditor *re) { - int pos; + gint pos; update_selected_rule(re); @@ -606,7 +606,7 @@ rule_up (GtkWidget *widget, RuleEditor *re) static void rule_down (GtkWidget *widget, RuleEditor *re) { - int pos; + gint pos; update_selected_rule(re); @@ -619,8 +619,8 @@ rule_down (GtkWidget *widget, RuleEditor *re) static void rule_bottom (GtkWidget *widget, RuleEditor *re) { - int pos; - int index = -1, count = 0; + gint pos; + gint index = -1, count = 0; FilterRule *rule = NULL; update_selected_rule(re); @@ -655,7 +655,7 @@ static void set_sensitive (RuleEditor *re) { FilterRule *rule = NULL; - int index = -1, count = 0; + gint index = -1, count = 0; while ((rule = rule_context_next_rule (re->context, rule, re->source))) { if (rule == re->current) @@ -725,7 +725,7 @@ double_click (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *colum } static void -set_source (RuleEditor *re, const char *source) +set_source (RuleEditor *re, const gchar *source) { FilterRule *rule = NULL; GtkTreeIter iter; @@ -746,7 +746,7 @@ set_source (RuleEditor *re, const char *source) } static void -rule_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user_data) +rule_able_toggled (GtkCellRendererToggle *renderer, gchar *arg1, gpointer user_data) { GtkWidget *table = user_data; GtkTreeSelection *selection; @@ -772,11 +772,11 @@ rule_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user_da gtk_tree_path_free (path); } -GtkWidget *rule_editor_treeview_new (char *widget_name, char *string1, char *string2, - int int1, int int2); +GtkWidget *rule_editor_treeview_new (gchar *widget_name, gchar *string1, gchar *string2, + gint int1, gint int2); GtkWidget * -rule_editor_treeview_new (char *widget_name, char *string1, char *string2, int int1, int int2) +rule_editor_treeview_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { GtkWidget *table, *scrolled; GtkTreeSelection *selection; @@ -826,11 +826,11 @@ rule_editor_treeview_new (char *widget_name, char *string1, char *string2, int i } void -rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source, const char *label) +rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const gchar *source, const gchar *label) { GtkWidget *w; - int i; - char *tmp; + gint i; + gchar *tmp; re->context = context; g_object_ref (context); diff --git a/filter/rule-editor.h b/filter/rule-editor.h index 40cc90ef90..e5017eac25 100644 --- a/filter/rule-editor.h +++ b/filter/rule-editor.h @@ -53,10 +53,10 @@ struct _RuleEditor { GtkWidget *dialog; - char *source; + gchar *source; struct _RuleEditorUndo *undo_log; /* cancel/undo log */ - unsigned int undo_active:1; /* we're performing undo */ + guint undo_active:1; /* we're performing undo */ struct _RuleEditorPrivate *priv; }; @@ -66,7 +66,7 @@ struct _RuleEditorClass { /* virtual methods */ void (*set_sensitive) (RuleEditor *); - void (*set_source) (RuleEditor *, const char *source); + void (*set_source) (RuleEditor *, const gchar *source); FilterRule *(*create_rule) (RuleEditor *); @@ -83,19 +83,19 @@ enum { struct _RuleEditorUndo { struct _RuleEditorUndo *next; - unsigned int type; + guint type; FilterRule *rule; - int rank; - int newrank; + gint rank; + gint newrank; }; GType rule_editor_get_type(void); -RuleEditor *rule_editor_new(RuleContext *rc, const char *source, const char *label); +RuleEditor *rule_editor_new(RuleContext *rc, const gchar *source, const gchar *label); -void rule_editor_construct(RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source, const char *label); +void rule_editor_construct(RuleEditor *re, RuleContext *context, GladeXML *gui, const gchar *source, const gchar *label); /* methods */ -void rule_editor_set_source(RuleEditor *re, const char *source); +void rule_editor_set_source(RuleEditor *re, const gchar *source); /* calculates the sensitivity of the editor */ void rule_editor_set_sensitive(RuleEditor *re); /* used internally to create a new rule appropriate for the editor */ diff --git a/iconv-detect.c b/iconv-detect.c index 4eb6597225..7cd6bde85e 100644 --- a/iconv-detect.c +++ b/iconv-detect.c @@ -52,9 +52,9 @@ enum { typedef struct { - char *charset; - char *format; - int id; + gchar *charset; + gchar *format; + gint id; } CharInfo; @@ -67,7 +67,7 @@ static CharInfo iso8859_tests[] = { { "8859-1", "%d-%d", NO_ISO_D_DASH_D }, }; -static int num_iso8859_tests = sizeof (iso8859_tests) / sizeof (CharInfo); +static gint num_iso8859_tests = sizeof (iso8859_tests) / sizeof (CharInfo); static CharInfo iso2022_tests[] = { { "iso-2022-jp", "iso-%d-%s", ISO_DASH_D_DASH_S_LOWER }, @@ -75,7 +75,7 @@ static CharInfo iso2022_tests[] = { { "ISO2022-JP", "ISO%d-%s", ISO_D_DASH_S }, }; -static int num_iso2022_tests = sizeof (iso2022_tests) / sizeof (CharInfo); +static gint num_iso2022_tests = sizeof (iso2022_tests) / sizeof (CharInfo); static CharInfo iso10646_tests[] = { { "iso-10646-1", "iso-%d-%d", ISO_DASH_D_DASH_D_LOWER }, @@ -87,16 +87,16 @@ static CharInfo iso10646_tests[] = { { "UCS-4BE", "UCS-4BE", UCS4 }, }; -static int num_iso10646_tests = sizeof (iso10646_tests) / sizeof (CharInfo); +static gint num_iso10646_tests = sizeof (iso10646_tests) / sizeof (CharInfo); -int main (int argc, char **argv) +gint main (gint argc, gchar **argv) { - unsigned int iso8859, iso2022, iso10646; + guint iso8859, iso2022, iso10646; CharInfo *info; iconv_t cd; FILE *fp; - int i; + gint i; fp = fopen ("iconv-detect.h", "w"); if (fp == NULL) diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c index 724cc3b74a..b0b1db1879 100644 --- a/mail/e-searching-tokenizer.c +++ b/mail/e-searching-tokenizer.c @@ -45,10 +45,10 @@ enum { static guint signals[LAST_SIGNAL] = { 0, }; -static void e_searching_tokenizer_begin (HTMLTokenizer *, const char *); +static void e_searching_tokenizer_begin (HTMLTokenizer *, const gchar *); static void e_searching_tokenizer_end (HTMLTokenizer *); -static char *e_searching_tokenizer_peek_token (HTMLTokenizer *); -static char *e_searching_tokenizer_next_token (HTMLTokenizer *); +static gchar *e_searching_tokenizer_peek_token (HTMLTokenizer *); +static gchar *e_searching_tokenizer_next_token (HTMLTokenizer *); static gboolean e_searching_tokenizer_has_more (HTMLTokenizer *); static HTMLTokenizer *e_searching_tokenizer_clone (HTMLTokenizer *); @@ -114,10 +114,10 @@ shared_state_unref (SharedState *shared) /* This is faster and safer than glib2's utf8 abomination, but isn't exported from camel as yet */ static inline guint32 -camel_utf8_getc(const unsigned char **ptr) +camel_utf8_getc(const guchar **ptr) { - register unsigned char *p = (unsigned char *)*ptr; - register unsigned char c, r; + register guchar *p = (guchar *)*ptr; + register guchar c, r; register guint32 v, m; again: @@ -158,11 +158,11 @@ static const gchar *ignored_tags[] = { "B", "I", "FONT", "TT", "EM", /* and more? */}; static int -ignore_tag (const char *tag) +ignore_tag (const gchar *tag) { - char *t = alloca(strlen(tag)+1), c, *out; - const char *in; - int i; + gchar *t = alloca(strlen(tag)+1), c, *out; + const gchar *in; + gint i; /* we could use a aho-corasick matcher here too ... but we wont */ @@ -206,7 +206,7 @@ struct _match { /* tree state node */ struct _state { struct _match *matches; - unsigned int final; /* max no of chars we just matched */ + guint final; /* max no of chars we just matched */ struct _state *fail; /* where to try next if we fail */ struct _state *next; /* next on this level? */ }; @@ -214,7 +214,7 @@ struct _state { /* base tree structure */ struct _trie { struct _state root; - int max_depth; + gint max_depth; EMemChunk *state_chunks; EMemChunk *match_chunks; @@ -223,9 +223,9 @@ struct _trie { /* will be enabled only if debug is enabled */ #if d(1) -1 != -1 static void -dump_trie(struct _state *s, int d) +dump_trie(struct _state *s, gint d) { - char *p = alloca(d*2+1); + gchar *p = alloca(d*2+1); struct _match *m; memset(p, ' ', d*2); @@ -259,15 +259,15 @@ g(struct _state *q, guint32 c) } static struct _trie * -build_trie(int nocase, int len, unsigned char **words) +build_trie(gint nocase, gint len, guchar **words) { struct _state *q, *qt, *r; - const unsigned char *word; + const guchar *word; struct _match *m, *n = NULL; - int i, depth; + gint i, depth; guint32 c; struct _trie *trie; - int state_depth_max, state_depth_size; + gint state_depth_max, state_depth_size; struct _state **state_depth; trie = g_malloc(sizeof(*trie)); @@ -385,14 +385,14 @@ free_trie(struct _trie *t) struct _token { struct _token *next; struct _token *prev; - unsigned int offset; + guint offset; /* we need to copy the token for memory management, so why not copy it whole */ - char tok[1]; + gchar tok[1]; }; /* stack of submatches currently being scanned, used for merging */ struct _submatch { - unsigned int offstart, offend; /* in bytes */ + guint offstart, offend; /* in bytes */ }; /* flags for new func */ @@ -402,17 +402,17 @@ struct _submatch { struct _searcher { struct _trie *t; - char *(*next_token)(); /* callbacks for more tokens */ - void *next_data; + gchar *(*next_token)(); /* callbacks for more tokens */ + gpointer next_data; - int words; /* how many words */ - char *tags, *tage; /* the tag we used to highlight */ + gint words; /* how many words */ + gchar *tags, *tage; /* the tag we used to highlight */ - int flags; /* case sensitive or not */ + gint flags; /* case sensitive or not */ struct _state *state; /* state is the current trie state */ - int matchcount; + gint matchcount; EDList input; /* pending 'input' tokens, processed but might match */ EDList output; /* output tokens ready for source */ @@ -422,25 +422,25 @@ struct _searcher { guint32 offset; /* current offset through searchable stream? */ guint32 offout; /* last output position */ - unsigned int lastp; /* current position in rotating last buffer */ + guint lastp; /* current position in rotating last buffer */ guint32 *last; /* buffer that goes back last 'n' positions */ guint32 last_mask; /* bitmask for efficient rotation calculation */ - unsigned int submatchp; /* submatch stack */ + guint submatchp; /* submatch stack */ struct _submatch *submatches; }; static void -searcher_set_tokenfunc(struct _searcher *s, char *(*next)(), void *data) +searcher_set_tokenfunc(struct _searcher *s, gchar *(*next)(), gpointer data) { s->next_token = next; s->next_data = data; } static struct _searcher * -searcher_new (int flags, int argc, unsigned char **argv, const char *tags, const char *tage) +searcher_new (gint flags, gint argc, guchar **argv, const gchar *tags, const gchar *tage) { - int i, m; + gint i, m; struct _searcher *s; s = g_malloc(sizeof(*s)); @@ -493,7 +493,7 @@ searcher_free(struct _searcher *s) g_free(s); } static struct _token * -append_token(EDList *list, const char *tok, int len) +append_token(EDList *list, const gchar *tok, gint len) { struct _token *token; @@ -513,8 +513,8 @@ append_token(EDList *list, const char *tok, int len) static void output_token(struct _searcher *s, struct _token *token) { - int offend; - int left, pre; + gint offend; + gint left, pre; if (token->tok[0] == TAG_ESCAPE) { if (token->offset >= s->offout) { @@ -542,7 +542,7 @@ output_token(struct _searcher *s, struct _token *token) } static struct _token * -find_token(struct _searcher *s, int start) +find_token(struct _searcher *s, gint start) { register struct _token *token; @@ -558,11 +558,11 @@ find_token(struct _searcher *s, int start) } static void -output_match(struct _searcher *s, unsigned int start, unsigned int end) +output_match(struct _searcher *s, guint start, guint end) { register struct _token *token; struct _token *starttoken, *endtoken; - char b[8]; + gchar b[8]; d(printf("output match: %d-%d at %d\n", start, end, s->offout)); @@ -630,7 +630,7 @@ output_match(struct _searcher *s, unsigned int start, unsigned int end) static void output_subpending(struct _searcher *s) { - int i; + gint i; for (i=s->submatchp-1;i>=0;i--) output_match(s, s->submatches[i].offstart, s->submatches[i].offend); @@ -639,9 +639,9 @@ output_subpending(struct _searcher *s) /* returns true if a merge took place */ static int -merge_subpending(struct _searcher *s, int offstart, int offend) +merge_subpending(struct _searcher *s, gint offstart, gint offend) { - int i; + gint i; /* merges overlapping or abutting match strings */ if (s->submatchp && @@ -664,7 +664,7 @@ merge_subpending(struct _searcher *s, int offstart, int offend) } static void -push_subpending(struct _searcher *s, int offstart, int offend) +push_subpending(struct _searcher *s, gint offstart, gint offend) { /* This is really an assertion, we just ignore the last pending match instead of crashing though */ if (s->submatchp >= s->words) { @@ -691,11 +691,11 @@ output_pending(struct _searcher *s) static void flush_extra(struct _searcher *s) { - unsigned int start; - int i; + guint start; + gint i; struct _token *starttoken, *token; - /* find earliest char that can be in contention */ + /* find earliest gchar that can be in contention */ start = s->offset - s->t->max_depth; for (i=0;i<s->submatchp;i++) if (s->submatches[i].offstart < start) @@ -712,20 +712,20 @@ flush_extra(struct _searcher *s) } } -static char * +static gchar * searcher_next_token(struct _searcher *s) { struct _token *token; - const unsigned char *tok, *stok, *pre_tok; + const guchar *tok, *stok, *pre_tok; struct _trie *t = s->t; struct _state *q = s->state; struct _match *m = NULL; - int offstart, offend; + gint offstart, offend; guint32 c; while (e_dlist_empty(&s->output)) { /* get next token */ - tok = (unsigned char *)s->next_token(s->next_data); + tok = (guchar *)s->next_token(s->next_data); if (tok == NULL) { output_subpending(s); output_pending(s); @@ -733,15 +733,15 @@ searcher_next_token(struct _searcher *s) } /* we dont always have to copy each token, e.g. if we dont match anything */ - token = append_token(&s->input, (char *)tok, -1); + token = append_token(&s->input, (gchar *)tok, -1); token->offset = s->offset; - tok = (unsigned char *)token->tok; + tok = (guchar *)token->tok; d(printf("new token %d '%s'\n", token->offset, token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); /* tag test, reset state on unknown tags */ if (tok[0] == TAG_ESCAPE) { - if (!ignore_tag ((char *)tok)) { + if (!ignore_tag ((gchar *)tok)) { /* force reset */ output_subpending(s); output_pending(s); @@ -772,7 +772,7 @@ searcher_next_token(struct _searcher *s) if (q->final) { s->matchcount++; - /* use the last buffer to find the real offset of this char */ + /* use the last buffer to find the real offset of this gchar */ offstart = s->last[(s->lastp - q->final)&s->last_mask]; offend = s->offset + (tok - stok); @@ -815,10 +815,10 @@ searcher_next_token(struct _searcher *s) return token ? g_strdup (token->tok) : NULL; } -static char * +static gchar * searcher_peek_token(struct _searcher *s) { - char *tok; + gchar *tok; /* we just get it and then put it back, it's fast enuf */ tok = searcher_next_token(s); @@ -841,9 +841,9 @@ searcher_pending(struct _searcher *s) struct _search_info { GPtrArray *strv; - char *colour; - unsigned int size:8; - unsigned int flags:8; + gchar *colour; + guint size:8; + guint flags:8; }; /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/ @@ -860,26 +860,26 @@ search_info_new(void) } static void -search_info_set_flags(struct _search_info *si, unsigned int flags, unsigned int mask) +search_info_set_flags(struct _search_info *si, guint flags, guint mask) { si->flags = (si->flags & ~mask) | (flags & mask); } static void -search_info_set_colour(struct _search_info *si, const char *colour) +search_info_set_colour(struct _search_info *si, const gchar *colour) { g_free(si->colour); si->colour = g_strdup(colour); } static void -search_info_add_string(struct _search_info *si, const char *s) +search_info_add_string(struct _search_info *si, const gchar *s) { - const unsigned char *start; + const guchar *start; guint32 c; if (s && s[0]) { - const unsigned char *us = (unsigned char *) s; + const guchar *us = (guchar *) s; /* strip leading whitespace */ start = us; while ((c = camel_utf8_getc (&us))) { @@ -890,14 +890,14 @@ search_info_add_string(struct _search_info *si, const char *s) } /* should probably also strip trailing, but i'm lazy today */ if (start[0]) - g_ptr_array_add(si->strv, g_strdup ((char *)start)); + g_ptr_array_add(si->strv, g_strdup ((gchar *)start)); } } static void search_info_clear(struct _search_info *si) { - int i; + gint i; for (i=0;i<si->strv->len;i++) g_free(si->strv->pdata[i]); @@ -908,7 +908,7 @@ search_info_clear(struct _search_info *si) static void search_info_free(struct _search_info *si) { - int i; + gint i; for (i=0;i<si->strv->len;i++) g_free(si->strv->pdata[i]); @@ -922,7 +922,7 @@ static struct _search_info * search_info_clone(struct _search_info *si) { struct _search_info *out; - int i; + gint i; out = search_info_new(); for (i=0;i<si->strv->len;i++) @@ -937,7 +937,7 @@ search_info_clone(struct _search_info *si) static struct _searcher * search_info_to_searcher(struct _search_info *si) { - char *tags, *tage; + gchar *tags, *tage; const gchar *col; if (si->strv->len == 0) @@ -953,7 +953,7 @@ search_info_to_searcher(struct _search_info *si) tage = alloca(20); sprintf(tage, "%c</font>", TAG_ESCAPE); - return searcher_new (si->flags, si->strv->len, (unsigned char **)si->strv->pdata, tags, tage); + return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage); } /* ********************************************************************** */ @@ -1063,7 +1063,7 @@ e_searching_tokenizer_new (void) /* blah blah the htmltokeniser doesn't like being asked for a token if it doens't hvae any! */ -static char *get_token(HTMLTokenizer *t) +static gchar *get_token(HTMLTokenizer *t) { HTMLTokenizerClass *klass = HTML_TOKENIZER_CLASS (parent_class); @@ -1071,7 +1071,7 @@ static char *get_token(HTMLTokenizer *t) } static void -e_searching_tokenizer_begin (HTMLTokenizer *t, const char *content_type) +e_searching_tokenizer_begin (HTMLTokenizer *t, const gchar *content_type) { ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (t); struct _ESearchingTokenizerPrivate *p = st->priv; @@ -1113,7 +1113,7 @@ e_searching_tokenizer_end (HTMLTokenizer *t) HTML_TOKENIZER_CLASS (parent_class)->end (t); } -static char * +static gchar * e_searching_tokenizer_peek_token (HTMLTokenizer *tok) { ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok); @@ -1125,12 +1125,12 @@ e_searching_tokenizer_peek_token (HTMLTokenizer *tok) return searcher_peek_token(st->priv->engine); } -static char * +static gchar * e_searching_tokenizer_next_token (HTMLTokenizer *tok) { ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok); - int oldmatched; - char *token; + gint oldmatched; + gchar *token; /* If no search is active, just use the default method. */ if (st->priv->engine == NULL) diff --git a/mail/e-searching-tokenizer.h b/mail/e-searching-tokenizer.h index f96c37ed49..e9b1a94343 100644 --- a/mail/e-searching-tokenizer.h +++ b/mail/e-searching-tokenizer.h @@ -56,15 +56,15 @@ ESearchingTokenizer *e_searching_tokenizer_new (void); /* For now, just a simple API */ -void e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *, const char *); -void e_searching_tokenizer_add_primary_search_string (ESearchingTokenizer *, const char *); +void e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *, const gchar *); +void e_searching_tokenizer_add_primary_search_string (ESearchingTokenizer *, const gchar *); void e_searching_tokenizer_set_primary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive); -void e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *, const char *); -void e_searching_tokenizer_add_secondary_search_string (ESearchingTokenizer *st, const char *search_str); +void e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *, const gchar *); +void e_searching_tokenizer_add_secondary_search_string (ESearchingTokenizer *st, const gchar *search_str); void e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive); -int e_searching_tokenizer_match_count (ESearchingTokenizer *); +gint e_searching_tokenizer_match_count (ESearchingTokenizer *); #endif /* __E_SEARCHING_TOKENIZER_H__ */ diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 2b13e7e015..570858cd68 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -117,13 +117,13 @@ typedef struct _EMAccountEditorService { struct _GtkToggleButton *needs_auth; struct _GtkWidget *check_dialog; - int check_id; + gint check_id; GList *authtypes; /* if "Check supported" */ CamelProvider *provider; CamelProviderType type; - int auth_changed_id; + gint auth_changed_id; } EMAccountEditorService; typedef struct _EMAccountEditorPrivate { @@ -135,7 +135,7 @@ typedef struct _EMAccountEditorPrivate { guint sig_added_id; guint sig_removed_id; guint sig_changed_id; - const char *sig_uid; + const gchar *sig_uid; /* incoming mail */ EMAccountEditorService source; @@ -177,13 +177,13 @@ typedef struct _EMAccountEditorPrivate { /* for e-config callbacks, each page sets up its widgets, then they are dealed out by the get_widget callback in order*/ GtkWidget *widgets[5]; - const char *widgets_name[5]; - int widgets_index; + const gchar *widgets_name[5]; + gint widgets_index; /* for druid page preparation */ - unsigned int identity_set:1; - unsigned int receive_set:1; - unsigned int management_set:1; + guint identity_set:1; + guint receive_set:1; + guint management_set:1; } EMAccountEditorPrivate; static void emae_refresh_authtype(EMAccountEditor *emae, EMAccountEditorService *service); @@ -287,7 +287,7 @@ EMAccountEditor *em_account_editor_new(EAccount *account, em_account_editor_t ty * * Return value: **/ -EMAccountEditor *em_account_editor_new_for_pages(EAccount *account, em_account_editor_t type, char *id, GtkWidget **pages) +EMAccountEditor *em_account_editor_new_for_pages(EAccount *account, em_account_editor_t type, gchar *id, GtkWidget **pages) { EMAccountEditor *emae = g_object_new(em_account_editor_get_type(), NULL); emae->pages = pages; @@ -318,14 +318,14 @@ static struct { #define num_ssl_options (sizeof (ssl_options) / sizeof (ssl_options[0])) static gboolean -is_email (const char *address) +is_email (const gchar *address) { /* This is supposed to check if the address's domain could be an FQDN but alas, it's not worth the pain and suffering. */ - const char *at; + const gchar *at; at = strchr (address, '@'); - /* make sure we have an '@' and that it's not the first or last char */ + /* make sure we have an '@' and that it's not the first or last gchar */ if (!at || at == address || *(at + 1) == '\0') return FALSE; @@ -333,10 +333,10 @@ is_email (const char *address) } static CamelURL * -emae_account_url(EMAccountEditor *emae, int urlid) +emae_account_url(EMAccountEditor *emae, gint urlid) { CamelURL *url = NULL; - const char *uri; + const gchar *uri; uri = e_account_get_string(emae->account, urlid); @@ -360,13 +360,13 @@ emae_license_state(GtkToggleButton *button, GtkDialog *dialog) } static gboolean -emae_load_text(GtkTextView *view, const char *filename) +emae_load_text(GtkTextView *view, const gchar *filename) { FILE *fd; - char filebuf[1024]; + gchar filebuf[1024]; GtkTextIter iter; GtkTextBuffer *buffer; - int count; + gint count; g_return_val_if_fail (filename != NULL , FALSE); @@ -391,9 +391,9 @@ emae_display_license(EMAccountEditor *emae, CamelProvider *prov) { GladeXML *xml; GtkWidget *w, *dialog; - char *tmp; + gchar *tmp; GtkResponseType response = GTK_RESPONSE_NONE; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "mail-dialogs.glade", @@ -443,7 +443,7 @@ emae_check_license(EMAccountEditor *emae, CamelProvider *prov) providers_list = gconf_client_get_list (gconf, "/apps/evolution/mail/licenses", GCONF_VALUE_STRING, NULL); for (l = providers_list, accepted = FALSE; l && !accepted; l = g_slist_next(l)) - accepted = (strcmp((char *)l->data, prov->protocol) == 0); + accepted = (strcmp((gchar *)l->data, prov->protocol) == 0); if (!accepted && (accepted = emae_display_license(emae, prov)) == TRUE) { @@ -465,7 +465,7 @@ static void default_folders_clicked (GtkButton *button, gpointer user_data) { EMAccountEditor *emae = user_data; - const char *uri; + const gchar *uri; uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS); em_folder_selection_button_set_selection((EMFolderSelectionButton *)emae->priv->drafts_folder_button, uri); @@ -477,31 +477,31 @@ default_folders_clicked (GtkButton *button, gpointer user_data) } /* custom widget factories */ -GtkWidget *em_account_editor_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2); +GtkWidget *em_account_editor_folder_selector_button_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2); GtkWidget * -em_account_editor_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2) +em_account_editor_folder_selector_button_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { return (GtkWidget *)em_folder_selection_button_new(string1 ? string1 : _("Select Folder"), NULL); } -GtkWidget *em_account_editor_dropdown_new(char *widget_name, char *string1, char *string2, int int1, int int2); +GtkWidget *em_account_editor_dropdown_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2); GtkWidget * -em_account_editor_dropdown_new(char *widget_name, char *string1, char *string2, int int1, int int2) +em_account_editor_dropdown_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { return (GtkWidget *)gtk_combo_box_new(); } -GtkWidget *em_account_editor_ssl_selector_new(char *widget_name, char *string1, char *string2, int int1, int int2); +GtkWidget *em_account_editor_ssl_selector_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2); GtkWidget * -em_account_editor_ssl_selector_new(char *widget_name, char *string1, char *string2, int int1, int int2) +em_account_editor_ssl_selector_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { GtkComboBox *dropdown = (GtkComboBox *)gtk_combo_box_new(); GtkCellRenderer *cell = gtk_cell_renderer_text_new(); GtkListStore *store; - int i; + gint i; GtkTreeIter iter; gtk_widget_show((GtkWidget *)dropdown); @@ -539,8 +539,8 @@ emae_auto_detect(EMAccountEditor *emae) GHashTable *auto_detected; GSList *l; CamelProviderConfEntry *entries; - char *value; - int i; + gchar *value; + gint i; CamelURL *url; if (service->provider == NULL @@ -615,7 +615,7 @@ static int emae_signature_get_iter(EMAccountEditor *emae, ESignature *sig, GtkTreeModel **modelp, GtkTreeIter *iter) { GtkTreeModel *model; - int found = 0; + gint found = 0; model = gtk_combo_box_get_model(emae->priv->signatures_dropdown); *modelp = model; @@ -623,7 +623,7 @@ emae_signature_get_iter(EMAccountEditor *emae, ESignature *sig, GtkTreeModel **m return FALSE; do { - char *uid; + gchar *uid; gtk_tree_model_get(model, iter, 1, &uid, -1); if (uid && !strcmp(uid, sig->uid)) @@ -657,10 +657,10 @@ emae_signature_changed(ESignatureList *signatures, ESignature *sig, EMAccountEdi static void emae_signaturetype_changed(GtkComboBox *dropdown, EMAccountEditor *emae) { - int id = gtk_combo_box_get_active(dropdown); + gint id = gtk_combo_box_get_active(dropdown); GtkTreeModel *model; GtkTreeIter iter; - char *uid = NULL; + gchar *uid = NULL; if (id != -1) { model = gtk_combo_box_get_model(dropdown); @@ -688,11 +688,11 @@ emae_setup_signatures(EMAccountEditor *emae, GladeXML *xml) GtkComboBox *dropdown = (GtkComboBox *)glade_xml_get_widget(xml, "signature_dropdown"); GtkCellRenderer *cell = gtk_cell_renderer_text_new(); GtkListStore *store; - int i, active=0; + gint i, active=0; GtkTreeIter iter; ESignatureList *signatures; EIterator *it; - const char *current = e_account_get_string(emae->account, E_ACCOUNT_ID_SIGNATURE); + const gchar *current = e_account_get_string(emae->account, E_ACCOUNT_ID_SIGNATURE); GtkWidget *button; emae->priv->signatures_dropdown = dropdown; @@ -749,7 +749,7 @@ emae_setup_signatures(EMAccountEditor *emae, GladeXML *xml) static void emae_receipt_policy_changed(GtkComboBox *dropdown, EMAccountEditor *emae) { - int id = gtk_combo_box_get_active(dropdown); + gint id = gtk_combo_box_get_active(dropdown); GtkTreeModel *model; GtkTreeIter iter; EAccountReceiptPolicy policy; @@ -769,7 +769,7 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml) { GtkComboBox *dropdown = (GtkComboBox *)glade_xml_get_widget(xml, "receipt_policy_dropdown"); GtkListStore *store; - int i = 0, active = 0; + gint i = 0, active = 0; GtkTreeIter iter; EAccountReceiptPolicy current = emae->account->receipt_policy; static struct { @@ -807,16 +807,16 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml) static void emae_account_entry_changed(GtkEntry *entry, EMAccountEditor *emae) { - int item = GPOINTER_TO_INT(g_object_get_data((GObject *)entry, "account-item")); + gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)entry, "account-item")); e_account_set_string(emae->account, item, gtk_entry_get_text(entry)); } static GtkEntry * -emae_account_entry(EMAccountEditor *emae, const char *name, int item, GladeXML *xml) +emae_account_entry(EMAccountEditor *emae, const gchar *name, gint item, GladeXML *xml) { GtkEntry *entry; - const char *text; + const gchar *text; entry = (GtkEntry *)glade_xml_get_widget(xml, name); text = e_account_get_string(emae->account, item); @@ -832,13 +832,13 @@ emae_account_entry(EMAccountEditor *emae, const char *name, int item, GladeXML * static void emae_account_toggle_changed(GtkToggleButton *toggle, EMAccountEditor *emae) { - int item = GPOINTER_TO_INT(g_object_get_data((GObject *)toggle, "account-item")); + gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)toggle, "account-item")); e_account_set_bool(emae->account, item, gtk_toggle_button_get_active(toggle)); } static void -emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, int item) +emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, gint item) { gtk_toggle_button_set_active(toggle, e_account_get_bool(emae->account, item)); g_object_set_data((GObject *)toggle, "account-item", GINT_TO_POINTER(item)); @@ -847,7 +847,7 @@ emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, int i } static GtkToggleButton * -emae_account_toggle(EMAccountEditor *emae, const char *name, int item, GladeXML *xml) +emae_account_toggle(EMAccountEditor *emae, const gchar *name, gint item, GladeXML *xml) { GtkToggleButton *toggle; @@ -860,13 +860,13 @@ emae_account_toggle(EMAccountEditor *emae, const char *name, int item, GladeXML static void emae_account_spinint_changed(GtkSpinButton *spin, EMAccountEditor *emae) { - int item = GPOINTER_TO_INT(g_object_get_data((GObject *)spin, "account-item")); + gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)spin, "account-item")); e_account_set_int(emae->account, item, gtk_spin_button_get_value(spin)); } static void -emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, int item) +emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, gint item) { gtk_spin_button_set_value(spin, e_account_get_int(emae->account, item)); g_object_set_data((GObject *)spin, "account-item", GINT_TO_POINTER(item)); @@ -876,7 +876,7 @@ emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, int item #if 0 static GtkSpinButton * -emae_account_spinint(EMAccountEditor *emae, const char *name, int item) +emae_account_spinint(EMAccountEditor *emae, const gchar *name, gint item) { GtkSpinButton *spin; @@ -890,21 +890,21 @@ emae_account_spinint(EMAccountEditor *emae, const char *name, int item) static void emae_account_folder_changed(EMFolderSelectionButton *folder, EMAccountEditor *emae) { - int item = GPOINTER_TO_INT(g_object_get_data((GObject *)folder, "account-item")); + gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)folder, "account-item")); e_account_set_string(emae->account, item, em_folder_selection_button_get_selection(folder)); } static EMFolderSelectionButton * -emae_account_folder(EMAccountEditor *emae, const char *name, int item, int deffolder, GladeXML *xml) +emae_account_folder(EMAccountEditor *emae, const gchar *name, gint item, gint deffolder, GladeXML *xml) { EMFolderSelectionButton *folder; - const char *uri; + const gchar *uri; folder = (EMFolderSelectionButton *)glade_xml_get_widget(xml, name); uri = e_account_get_string(emae->account, item); if (uri) { - char *tmp = em_uri_to_camel(uri); + gchar *tmp = em_uri_to_camel(uri); em_folder_selection_button_set_selection(folder, tmp); g_free(tmp); @@ -927,8 +927,8 @@ static void smime_changed(EMAccountEditor *emae) { EMAccountEditorPrivate *gui = emae->priv; - int act; - const char *tmp; + gint act; + const gchar *tmp; tmp = gtk_entry_get_text(gui->smime_sign_key); act = tmp && tmp[0]; @@ -949,7 +949,7 @@ smime_changed(EMAccountEditor *emae) } static void -smime_sign_key_selected(GtkWidget *dialog, const char *key, EMAccountEditor *emae) +smime_sign_key_selected(GtkWidget *dialog, const gchar *key, EMAccountEditor *emae) { EMAccountEditorPrivate *gui = emae->priv; @@ -984,7 +984,7 @@ smime_sign_key_clear(GtkWidget *w, EMAccountEditor *emae) } static void -smime_encrypt_key_selected(GtkWidget *dialog, const char *key, EMAccountEditor *emae) +smime_encrypt_key_selected(GtkWidget *dialog, const gchar *key, EMAccountEditor *emae) { EMAccountEditorPrivate *gui = emae->priv; @@ -1020,10 +1020,10 @@ smime_encrypt_key_clear(GtkWidget *w, EMAccountEditor *emae) #endif static void -emae_url_set_hostport(CamelURL *url, const char *txt) +emae_url_set_hostport(CamelURL *url, const gchar *txt) { - const char *port; - char *host; + const gchar *port; + gchar *host; /* FIXME: what if this was a raw IPv6 address? */ if (txt && (port = strchr(txt, ':'))) { @@ -1049,7 +1049,7 @@ emae_url_set_hostport(CamelURL *url, const char *txt) We need our own function for host:port decoding, as above */ struct _provider_host_info { guint32 flag; - void (*setval)(CamelURL *, const char *); + void (*setval)(CamelURL *, const gchar *); glong widgets[3]; }; @@ -1126,7 +1126,7 @@ static struct _service_info { static void emae_uri_changed(EMAccountEditorService *service, CamelURL *url) { - char *uri; + gchar *uri; uri = camel_url_to_string(url, 0); @@ -1142,16 +1142,16 @@ emae_uri_changed(EMAccountEditorService *service, CamelURL *url) } static void -emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const char *), GtkEntry *entry) +emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const gchar *), GtkEntry *entry) { GtkComboBox *dropdown; - int id; + gint id; GtkTreeModel *model; GtkTreeIter iter; CamelServiceAuthType *authtype; CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key); - const char *text = gtk_entry_get_text(entry); + const gchar *text = gtk_entry_get_text(entry); setval(url, (text && text[0])?text:NULL); @@ -1175,16 +1175,16 @@ emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelUR } static void -emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const char *), GtkWidget *widget) +emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const gchar *), GtkWidget *widget) { GtkComboBox *dropdown; - int id; + gint id; GtkTreeModel *model; GtkTreeIter iter; CamelServiceAuthType *authtype; CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key); - const char *text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); + const gchar *text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); setval(url, (text && text[0])?text:NULL); @@ -1228,10 +1228,10 @@ emae_path_changed(GtkWidget *widget, EMAccountEditorService *service) static int emae_ssl_update(EMAccountEditorService *service, CamelURL *url) { - int id = gtk_combo_box_get_active(service->use_ssl); + gint id = gtk_combo_box_get_active(service->use_ssl); GtkTreeModel *model; GtkTreeIter iter; - char *ssl; + gchar *ssl; if (id == -1) return 0; @@ -1261,12 +1261,12 @@ emae_ssl_changed(GtkComboBox *dropdown, EMAccountEditorService *service) static void emae_service_provider_changed(EMAccountEditorService *service) { - int i, j; + gint i, j; void (*show)(GtkWidget *); CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key); if (service->provider) { - int enable; + gint enable; GtkWidget *dwidget = NULL; camel_url_set_protocol(url, service->provider->protocol); @@ -1288,7 +1288,7 @@ emae_service_provider_changed(EMAccountEditorService *service) for (i=0;emae_service_info[service->type].host_info[i].flag;i++) { GtkWidget *w; - int hide; + gint hide; struct _provider_host_info *info = &emae_service_info[service->type].host_info[i]; enable = CAMEL_PROVIDER_ALLOWS(service->provider, info->flag); @@ -1369,7 +1369,7 @@ emae_service_provider_changed(EMAccountEditorService *service) static void emae_provider_changed(GtkComboBox *dropdown, EMAccountEditorService *service) { - int id = gtk_combo_box_get_active(dropdown); + gint id = gtk_combo_box_get_active(dropdown); GtkTreeModel *model; GtkTreeIter iter; @@ -1399,19 +1399,19 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service) GList *l; GtkCellRenderer *cell = gtk_cell_renderer_text_new(); GtkComboBox *dropdown; - int active = 0, i; + gint active = 0, i; struct _service_info *info = &emae_service_info[service->type]; - const char *uri = e_account_get_string(account, info->account_uri_key); - const char *tmp; - char *current = NULL; + const gchar *uri = e_account_get_string(account, info->account_uri_key); + const gchar *tmp; + gchar *current = NULL; CamelURL *url; dropdown = service->providers; gtk_widget_show((GtkWidget *)dropdown); if (uri) { - const char *colon = strchr(uri, ':'); - int len; + const gchar *colon = strchr(uri, ':'); + gint len; if (colon) { len = colon-uri; @@ -1495,7 +1495,7 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service) static void emae_authtype_changed(GtkComboBox *dropdown, EMAccountEditorService *service) { - int id = gtk_combo_box_get_active(dropdown); + gint id = gtk_combo_box_get_active(dropdown); GtkTreeModel *model; GtkTreeIter iter; CamelServiceAuthType *authtype; @@ -1525,7 +1525,7 @@ emae_authtype_changed(GtkComboBox *dropdown, EMAccountEditorService *service) static void emae_needs_auth(GtkToggleButton *toggle, EMAccountEditorService *service) { - int need = gtk_toggle_button_get_active(toggle); + gint need = gtk_toggle_button_get_active(toggle); gtk_widget_set_sensitive(service->auth_frame, need); @@ -1549,10 +1549,10 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service) GtkListStore *store; GtkTreeIter iter; GtkComboBox *dropdown; - int active = 0; - int i; + gint active = 0; + gint i; struct _service_info *info = &emae_service_info[service->type]; - const char *uri = e_account_get_string(account, info->account_uri_key); + const gchar *uri = e_account_get_string(account, info->account_uri_key); GList *l, *ll; CamelURL *url = NULL; @@ -1567,7 +1567,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service) if (service->provider) { for (i=0, l=service->provider->authtypes; l; l=l->next, i++) { CamelServiceAuthType *authtype = l->data; - int avail; + gint avail; /* if we have some already shown */ if (service->authtypes) { @@ -1606,7 +1606,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service) camel_url_free(url); } -static void emae_check_authtype_done(const char *uri, CamelProviderType type, GList *types, void *data) +static void emae_check_authtype_done(const gchar *uri, CamelProviderType type, GList *types, gpointer data) { EMAccountEditorService *service = data; @@ -1626,7 +1626,7 @@ static void emae_check_authtype_done(const char *uri, CamelProviderType type, GL g_object_unref(service->emae); } -static void emae_check_authtype_response(GtkWidget *d, int button, EMAccountEditorService *service) +static void emae_check_authtype_response(GtkWidget *d, gint button, EMAccountEditorService *service) { mail_msg_cancel(service->check_id); gtk_widget_destroy(service->check_dialog); @@ -1639,7 +1639,7 @@ static void emae_check_authtype_response(GtkWidget *d, int button, EMAccountEdit static void emae_check_authtype(GtkWidget *w, EMAccountEditorService *service) { EMAccountEditor *emae = service->emae; - const char *uri; + const gchar *uri; /* TODO: do we need to remove the auth mechanism from the uri? */ uri = e_account_get_string(emae->account, emae_service_info[service->type].account_uri_key); @@ -1659,9 +1659,9 @@ emae_setup_service(EMAccountEditor *emae, EMAccountEditorService *service, Glade { struct _service_info *info = &emae_service_info[service->type]; CamelURL *url = emae_account_url(emae, info->account_uri_key); - const char *uri = e_account_get_string(emae->account, info->account_uri_key); - const char *tmp; - int i; + const gchar *uri = e_account_get_string(emae->account, info->account_uri_key); + const gchar *tmp; + gint i; service->provider = uri?camel_provider_get(uri, NULL):NULL; service->frame = glade_xml_get_widget(xml, info->frame); @@ -1685,7 +1685,7 @@ emae_setup_service(EMAccountEditor *emae, EMAccountEditorService *service, Glade /* configure ui for current settings */ if (url->host) { if (url->port) { - char *host = g_strdup_printf("%s:%d", url->host, url->port); + gchar *host = g_strdup_printf("%s:%d", url->host, url->port); gtk_entry_set_text(service->hostname, host); g_free(host); @@ -1769,16 +1769,16 @@ static struct { /* its a bit obtuse, but its simple */ static void -emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const char *first, ...) +emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const gchar *first, ...) { - int i = 0; + gint i = 0; va_list ap; va_start(ap, first); while (first) { emae->priv->widgets_name[i] = first; emae->priv->widgets[i++] = glade_xml_get_widget(xml, first); - first = va_arg(ap, const char *); + first = va_arg(ap, const gchar *); } va_end(ap); @@ -1789,15 +1789,15 @@ emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const char *first, ...) } static GtkWidget * -emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; EMAccountEditorPrivate *gui = emae->priv; EAccount *account = emae->account; - int i; + gint i; GtkWidget *w; GladeXML *xml; - char *gladefile; + gchar *gladefile; /*if (old) return old;*/ @@ -1862,13 +1862,13 @@ emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st } static GtkWidget * -emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; EMAccountEditorPrivate *gui = emae->priv; GtkWidget *w; GladeXML *xml; - char *gladefile; + gchar *gladefile; /*if (old) return old;*/ @@ -1915,9 +1915,9 @@ emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str static void emae_option_toggle_changed(GtkToggleButton *toggle, EMAccountEditorService *service) { - const char *name = g_object_get_data((GObject *)toggle, "option-name"); + const gchar *name = g_object_get_data((GObject *)toggle, "option-name"); GSList *depl = g_object_get_data((GObject *)toggle, "dependent-list"); - int active = gtk_toggle_button_get_active(toggle); + gint active = gtk_toggle_button_get_active(toggle); CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key); for (;depl;depl = g_slist_next(depl)) @@ -1929,13 +1929,13 @@ emae_option_toggle_changed(GtkToggleButton *toggle, EMAccountEditorService *serv } static GtkWidget * -emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const char *text, const char *name, int def) +emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const gchar *text, const gchar *name, gint def) { GtkWidget *w; /* FIXME: how do we get the default value ever? */ w = gtk_check_button_new_with_mnemonic(text); - g_object_set_data((GObject *)w, "option-name", (void *)name); + g_object_set_data((GObject *)w, "option-name", (gpointer)name); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), camel_url_get_param (url, name) != NULL); g_signal_connect(w, "toggled", G_CALLBACK(emae_option_toggle_changed), service); gtk_widget_show(w); @@ -1946,8 +1946,8 @@ emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const char *t static void emae_option_entry_changed(GtkEntry *entry, EMAccountEditorService *service) { - const char *name = g_object_get_data((GObject *)entry, "option-name"); - const char *text = gtk_entry_get_text(entry); + const gchar *name = g_object_get_data((GObject *)entry, "option-name"); + const gchar *text = gtk_entry_get_text(entry); CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key); camel_url_set_param(url, name, text && text[0]?text:NULL); @@ -1956,10 +1956,10 @@ emae_option_entry_changed(GtkEntry *entry, EMAccountEditorService *service) } static GtkWidget * -emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *name, const char *def, GtkWidget *l) +emae_option_entry(EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *def, GtkWidget *l) { GtkWidget *w; - const char *val = camel_url_get_param(url, name); + const gchar *val = camel_url_get_param(url, name); if (val == NULL) { if (def) { @@ -1974,7 +1974,7 @@ emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *na "text", val, NULL); gtk_label_set_mnemonic_widget ((GtkLabel*)l, w); - g_object_set_data((GObject *)w, "option-name", (void *)name); + g_object_set_data((GObject *)w, "option-name", (gpointer)name); g_signal_connect(w, "changed", G_CALLBACK(emae_option_entry_changed), service); gtk_widget_show(w); @@ -1984,8 +1984,8 @@ emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *na static void emae_option_checkspin_changed(GtkSpinButton *spin, EMAccountEditorService *service) { - const char *name = g_object_get_data((GObject *)spin, "option-name"); - char value[16]; + const gchar *name = g_object_get_data((GObject *)spin, "option-name"); + gchar value[16]; CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key); sprintf(value, "%d", gtk_spin_button_get_value_as_int(spin)); @@ -1997,7 +1997,7 @@ emae_option_checkspin_changed(GtkSpinButton *spin, EMAccountEditorService *servi static void emae_option_checkspin_check_changed(GtkToggleButton *toggle, EMAccountEditorService *service) { - const char *name = g_object_get_data((GObject *)toggle, "option-name"); + const gchar *name = g_object_get_data((GObject *)toggle, "option-name"); GtkSpinButton *spin = g_object_get_data((GObject *)toggle, "option-target"); if (gtk_toggle_button_get_active(toggle)) { @@ -2015,14 +2015,14 @@ emae_option_checkspin_check_changed(GtkToggleButton *toggle, EMAccountEditorServ /* this is a fugly api */ static GtkWidget * -emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char *name, const char *fmt, const char *info) +emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *fmt, const gchar *info) { GtkWidget *hbox, *check, *spin, *label = NULL; double min, def, max; - char *pre, *post; - const char *val; - char on; - int enable; + gchar *pre, *post; + const gchar *val; + gchar on; + gint enable; pre = g_alloca(strlen(fmt)+1); strcpy(pre, fmt); @@ -2054,9 +2054,9 @@ emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char if (label) gtk_box_pack_start((GtkBox *)hbox, label, FALSE, TRUE, 4); - g_object_set_data((GObject *)spin, "option-name", (void *)name); - g_object_set_data((GObject *)check, "option-name", (void *)name); - g_object_set_data((GObject *)check, "option-target", (void *)spin); + g_object_set_data((GObject *)spin, "option-name", (gpointer)name); + g_object_set_data((GObject *)check, "option-name", (gpointer)name); + g_object_set_data((GObject *)check, "option-target", (gpointer)spin); g_signal_connect(spin, "value_changed", G_CALLBACK(emae_option_checkspin_changed), service); g_signal_connect(check, "toggled", G_CALLBACK(emae_option_checkspin_check_changed), service); @@ -2069,10 +2069,10 @@ emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char static void emae_option_options_changed (GtkComboBox *options, EMAccountEditorService *service) { - const char *name = g_object_get_data (G_OBJECT (options), "option-name"); - char *value = NULL; + const gchar *name = g_object_get_data (G_OBJECT (options), "option-name"); + gchar *value = NULL; CamelURL *url = emae_account_url (service->emae, emae_service_info[service->type].account_uri_key); - int id = gtk_combo_box_get_active (options); + gint id = gtk_combo_box_get_active (options); if (id != -1) { GtkTreeModel *model; @@ -2092,16 +2092,16 @@ emae_option_options_changed (GtkComboBox *options, EMAccountEditorService *servi /* 'values' is in format "value0:caption0:value2:caption2:...valueN:captionN" */ static GtkWidget * -emae_option_options (EMAccountEditorService *service, CamelURL *url, const char *name, const char *values, GtkWidget *l) +emae_option_options (EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *values, GtkWidget *l) { GtkComboBox *w; GtkListStore *store; GtkTreeIter iter; - const char *p, *value, *caption; + const gchar *p, *value, *caption; GtkCellRenderer *cell; - int active = 0; /* the first item entered is always a default item */ - int i; - const char *val = camel_url_get_param (url, name); + gint active = 0; /* the first item entered is always a default item */ + gint i; + const gchar *val = camel_url_get_param (url, name); w = GTK_COMBO_BOX (gtk_combo_box_new ()); @@ -2110,7 +2110,7 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const char p = values; for (p = values, i = 0; p; i++) { - char *vl, *cp; + gchar *vl, *cp; value = p; caption = strchr (p, ':'); @@ -2150,18 +2150,18 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const char gtk_label_set_mnemonic_widget (GTK_LABEL (l), GTK_WIDGET (w)); - g_object_set_data (G_OBJECT (w), "option-name", (void *)name); + g_object_set_data (G_OBJECT (w), "option-name", (gpointer)name); g_signal_connect (w, "changed", G_CALLBACK (emae_option_options_changed), service); return GTK_WIDGET (w); } static GtkWidget * -emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; GtkWidget *w, *box, *spin; - int row; + gint row; if (emae->priv->source.provider == NULL || emae->priv->source.provider->extra_conf == NULL) @@ -2194,7 +2194,7 @@ emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *par } static GtkWidget * -emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; struct _receive_options_item *item = (struct _receive_options_item *)eitem; @@ -2203,7 +2203,7 @@ emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidg GtkWidget *depw; GSList *depl = NULL, *n; EMAccountEditorService *service = &emae->priv->source; - int row, i; + gint row, i; GHashTable *extra; CamelURL *url; @@ -2306,7 +2306,7 @@ section: } if (depw && depl) { - int act = gtk_toggle_button_get_active((GtkToggleButton *)depw); + gint act = gtk_toggle_button_get_active((GtkToggleButton *)depw); g_object_set_data_full((GObject *)depw, "dependent-list", depl, (GDestroyNotify)g_slist_free); for (n=depl;n;n=g_slist_next(n)) @@ -2328,17 +2328,17 @@ section: } static GtkWidget * -emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; EMAccountEditorPrivate *gui = emae->priv; GtkWidget *w; GladeXML *xml; - char *gladefile; + gchar *gladefile; /* no transport options page at all for these types of providers */ if (gui->source.provider && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(gui->source.provider)) { - memset(&gui->transport.frame, 0, ((char *)&gui->transport.check_dialog)-((char *)&gui->transport.frame)); + memset(&gui->transport.frame, 0, ((gchar *)&gui->transport.check_dialog)-((gchar *)&gui->transport.frame)); return NULL; } @@ -2383,13 +2383,13 @@ emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct } static GtkWidget * -emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; EMAccountEditorPrivate *gui = emae->priv; GtkWidget *w; GladeXML *xml; - char *gladefile; + gchar *gladefile; /*if (old) return old;*/ @@ -2441,7 +2441,7 @@ emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st } static GtkWidget * -emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; #if defined (HAVE_NSS) @@ -2449,7 +2449,7 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st #endif GtkWidget *w; GladeXML *xml; - char *gladefile; + gchar *gladefile; /*if (old) return old;*/ @@ -2505,10 +2505,10 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st } static GtkWidget * -emae_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; - int i; + gint i; for (i=0;emae->priv->widgets[i];i++) if (!strcmp(emae->priv->widgets_name[i], item->label)) @@ -2556,7 +2556,7 @@ static EMConfigItem emae_editor_items[] = { static gboolean emae_editor_items_translated = FALSE; static GtkWidget * -emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; EMAccountEditorPrivate *gui = emae->priv; @@ -2566,7 +2566,7 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) { GladeXML *druidxml; GtkWidget *page; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "mail-config.glade", @@ -2586,11 +2586,11 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, } static GtkWidget * -emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { GladeXML *druidxml; GtkWidget *w; - char *gladefile; + gchar *gladefile; EMAccountEditor *emae = (EMAccountEditor *)data; if (emae->type == EMAE_PAGES) @@ -2647,13 +2647,13 @@ static EMConfigItem emae_druid_items[] = { static gboolean emae_druid_items_translated = FALSE; static void -emae_free(EConfig *ec, GSList *items, void *data) +emae_free(EConfig *ec, GSList *items, gpointer data) { g_slist_free(items); } static void -emae_free_auto(EConfig *ec, GSList *items, void *data) +emae_free_auto(EConfig *ec, GSList *items, gpointer data) { GSList *l, *n; @@ -2674,8 +2674,8 @@ static gboolean emae_service_complete(EMAccountEditor *emae, EMAccountEditorService *service) { CamelURL *url; - int ok = TRUE; - const char *uri; + gint ok = TRUE; + const gchar *uri; if (service->provider == NULL) return TRUE; @@ -2728,9 +2728,9 @@ struct _server_prefill { }; static int -check_servers (char *server) +check_servers (gchar *server) { - int len = G_N_ELEMENTS(mail_servers), i; + gint len = G_N_ELEMENTS(mail_servers), i; for (i=0; i<len; i++) { if (strstr(server, mail_servers[i].key) != NULL) @@ -2741,11 +2741,11 @@ check_servers (char *server) } static gboolean -emae_check_complete(EConfig *ec, const char *pageid, void *data) +emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data) { EMAccountEditor *emae = data; - int ok = TRUE; - const char *tmp; + gint ok = TRUE; + const gchar *tmp; EAccount *ea; gboolean refresh = FALSE; @@ -2755,7 +2755,7 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) && ((EConfig *)emae->priv->config)->type == E_CONFIG_DRUID) { if (!strcmp(pageid, "00.identity")) { if (!emae->priv->identity_set) { - char *uname; + gchar *uname; emae->priv->identity_set = 1; #ifndef G_OS_WIN32 @@ -2770,13 +2770,13 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) } } else if (!strcmp(pageid, "10.receive")) { if (!emae->priv->receive_set) { - char *user, *at; - int index; - char *uri = (char *)e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL); + gchar *user, *at; + gint index; + gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL); CamelURL *url; emae->priv->receive_set = 1; - tmp = (char *)e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS); + tmp = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS); at = strchr(tmp, '@'); user = g_alloca(at-tmp+1); memcpy(user, tmp, at-tmp); @@ -2806,9 +2806,9 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) } } else if (!strcmp(pageid, "30.send")) { CamelURL *url; - char *at, *user; - int index; - char *uri = (char *)e_account_get_string(emae->account, E_ACCOUNT_TRANSPORT_URL); + gchar *at, *user; + gint index; + gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_TRANSPORT_URL); tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS); at = strchr(tmp, '@'); @@ -2841,8 +2841,8 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) } } else if (!strcmp(pageid, "40.management")) { if (!emae->priv->management_set) { - char *template; - unsigned int i = 0, len; + gchar *template; + guint i = 0, len; emae->priv->management_set = 1; tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS); @@ -2913,14 +2913,14 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) } void -em_account_editor_check (EMAccountEditor *emae, const char *page) +em_account_editor_check (EMAccountEditor *emae, const gchar *page) { emae_check_complete((EConfig *)emae->config, page, emae); } /* HACK: FIXME: the component should listen to the account object directly */ static void -add_new_store (char *uri, CamelStore *store, void *user_data) +add_new_store (gchar *uri, CamelStore *store, gpointer user_data) { MailComponent *component = mail_component_peek (); EAccount *account = user_data; @@ -2932,7 +2932,7 @@ add_new_store (char *uri, CamelStore *store, void *user_data) } static void -emae_commit(EConfig *ec, GSList *items, void *data) +emae_commit(EConfig *ec, GSList *items, gpointer data) { EMAccountEditor *emae = data; EAccountList *accounts = mail_config_get_accounts(); @@ -2981,7 +2981,7 @@ static void em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account_editor_t type, const gchar *id) { EMAccountEditorPrivate *gui = emae->priv; - int i, index; + gint i, index; GSList *l; GList *prov; EMConfig *ec; @@ -2992,7 +2992,7 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account emae->type = type; emae->original = account; if (emae->original) { - char *xml; + gchar *xml; g_object_ref(emae->original); xml = e_account_to_xml(emae->original); @@ -3050,8 +3050,8 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account for (i=0;entries && entries[i].type != CAMEL_PROVIDER_CONF_END;i++) { struct _receive_options_item *item; - char *name = entries[i].name; - int myindex = index; + gchar *name = entries[i].name; + gint myindex = index; if (entries[i].type != CAMEL_PROVIDER_CONF_SECTION_START || name == NULL diff --git a/mail/em-account-editor.h b/mail/em-account-editor.h index e17236e865..4567f36cbe 100644 --- a/mail/em-account-editor.h +++ b/mail/em-account-editor.h @@ -66,10 +66,10 @@ struct _EMAccountEditorClass { GType em_account_editor_get_type(void); -EMAccountEditor *em_account_editor_new(struct _EAccount *account, em_account_editor_t type, const char *id); -EMAccountEditor *em_account_editor_new_for_pages(struct _EAccount *account, em_account_editor_t type, char *id, struct _GtkWidget **pages); +EMAccountEditor *em_account_editor_new(struct _EAccount *account, em_account_editor_t type, const gchar *id); +EMAccountEditor *em_account_editor_new_for_pages(struct _EAccount *account, em_account_editor_t type, gchar *id, struct _GtkWidget **pages); void em_account_editor_commit (EMAccountEditor *emae); -void em_account_editor_check (EMAccountEditor *emae, const char *page); +void em_account_editor_check (EMAccountEditor *emae, const gchar *page); gboolean em_account_editor_save (EMAccountEditor *gui); void em_account_editor_destroy (EMAccountEditor *gui); @@ -79,7 +79,7 @@ gboolean em_account_editor_source_complete (EMAccountEditor *gui, struct _GtkWid gboolean em_account_editor_transport_complete (EMAccountEditor *gui, struct _GtkWidget **incomplete); gboolean em_account_editor_management_complete (EMAccountEditor *gui, struct _GtkWidget **incomplete); -void em_account_editor_build_extra_conf (EMAccountEditor *gui, const char *url); +void em_account_editor_build_extra_conf (EMAccountEditor *gui, const gchar *url); void em_account_editor_auto_detect_extra_conf (EMAccountEditor *gui); diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c index d2303aa73b..f5a86fe9b0 100644 --- a/mail/em-account-prefs.c +++ b/mail/em-account-prefs.c @@ -220,7 +220,7 @@ account_delete_clicked (GtkButton *button, gpointer user_data) EAccountList *accounts; GtkTreeModel *model; GtkTreeIter iter; - int ans; + gint ans; gboolean has_proxies = FALSE; selection = gtk_tree_view_get_selection (prefs->table); @@ -235,7 +235,7 @@ account_delete_clicked (GtkButton *button, gpointer user_data) ans = e_error_run(PREFS_WINDOW(prefs), has_proxies?"mail:ask-delete-account-with-proxies":"mail:ask-delete-account",NULL); if (ans == GTK_RESPONSE_YES) { - int len; + gint len; /* remove it from the folder-tree in the shell */ if (account->enabled && account->source && account->source->url) @@ -309,7 +309,7 @@ account_able_changed(EAccount *account) } static void -account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user_data) +account_able_toggled (GtkCellRendererToggle *renderer, gchar *arg1, gpointer user_data) { EMAccountPrefs *prefs = user_data; GtkTreeSelection *selection; @@ -326,7 +326,7 @@ account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user gtk_tree_model_get (model, &iter, 3, &account, -1); if (mail_config_has_proxies (account)) { - int ans; + gint ans; ans = e_error_run(PREFS_WINDOW(prefs), "mail:ask-delete-proxy-accounts",NULL); @@ -363,8 +363,8 @@ account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs) EAccount *account = NULL; GtkTreeModel *model; GtkTreeIter iter; - const char *url = NULL; - int state; + const gchar *url = NULL; + gint state; EAccount *default_account; default_account = mail_config_get_default_account (); @@ -400,9 +400,9 @@ mail_accounts_load (EMAccountPrefs *prefs) EAccountList *accounts; GtkListStore *model; GtkTreeIter iter; - char *name, *val; + gchar *name, *val; EIterator *node; - int row = 0; + gint row = 0; GtkTreeSelection *selection; model = (GtkListStore *) gtk_tree_view_get_model (prefs->table); @@ -435,7 +435,7 @@ mail_accounts_load (EMAccountPrefs *prefs) gtk_list_store_set (model, &iter, 0, account->enabled, 1, val, - 2, url && url->protocol ? url->protocol : (char *) _("None"), + 2, url && url->protocol ? url->protocol : (gchar *) _("None"), 3, account, -1); g_free (name); @@ -457,11 +457,11 @@ mail_accounts_load (EMAccountPrefs *prefs) -GtkWidget *em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2, - int int1, int int2); +GtkWidget *em_account_prefs_treeview_new (gchar *widget_name, gchar *string1, gchar *string2, + gint int1, gint int2); GtkWidget * -em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2, int int1, int int2) +em_account_prefs_treeview_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { GtkWidget *table, *scrolled; GtkTreeSelection *selection; @@ -515,7 +515,7 @@ em_account_prefs_construct (EMAccountPrefs *prefs) GtkWidget *toplevel, *widget; GtkCellRenderer *renderer; GladeXML *gui; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "mail-config.glade", diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 8c704a2827..6c01dffa08 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -178,7 +178,7 @@ sig_load_preview (EMComposerPrefs *prefs, gtk_html_load_from_string (html, str, strlen (str)); } else { GtkHTMLStream *stream; - int len; + gint len; len = strlen (str); stream = gtk_html_begin_content (html, "text/html; charset=utf-8"); @@ -376,12 +376,12 @@ sig_add_cb (GtkWidget *widget, EMComposerPrefs *prefs) } static void -sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs) +sig_add_script_response (GtkWidget *widget, gint button, EMComposerPrefs *prefs) { gchar *script, **argv = NULL; GtkWidget *entry; const gchar *name; - int argc; + gint argc; if (button == GTK_RESPONSE_ACCEPT) { entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script"); @@ -821,12 +821,12 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) GConfBridge *bridge; GConfClient *client; const gchar *key; - int style; + gint style; gchar *buf; EMConfig *ec; EMConfigTargetPrefs *target; GSList *l; - int i; + gint i; gchar *gladefile; gboolean sensitive; diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 4ed3e70b8f..e8abdd30b3 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -73,14 +73,14 @@ static EAccount * guess_account (CamelMimeMessage *message, CamelFolder *folder); struct emcs_t { - unsigned int ref_count; + guint ref_count; CamelFolder *drafts_folder; - char *drafts_uid; + gchar *drafts_uid; CamelFolder *folder; guint32 flags, set; - char *uid; + gchar *uid; }; static struct emcs_t * @@ -138,12 +138,12 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip { gboolean res; GString *str; - int i; + gint i; str = g_string_new(""); for (i = 0; recipients[i] != NULL; ++i) { if (!e_destination_get_html_mail_pref (recipients[i])) { - const char *name; + const gchar *name; name = e_destination_get_textrep (recipients[i], FALSE); @@ -190,7 +190,7 @@ struct _send_data { static void composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, - int queued, const char *appended_uid, void *data) + gint queued, const gchar *appended_uid, gpointer data) { struct emcs_t *emcs; struct _send_data *send = data; @@ -257,12 +257,12 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data) EDestination **recipients, **recipients_bcc; gboolean html_mode, send_html, confirm_html; CamelInternetAddress *cia; - int hidden = 0, shown = 0; - int num = 0, num_bcc = 0, num_post = 0; - const char *subject; + gint hidden = 0, shown = 0; + gint num = 0, num_bcc = 0, num_post = 0; + const gchar *subject; GConfClient *gconf; EAccount *account; - int i; + gint i; GList *postlist; EMEvent *eme; EMEventTargetComposer *target; @@ -283,7 +283,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data) /* see which ones are visible/present, etc */ if (recipients) { for (i = 0; recipients[i] != NULL; i++) { - const char *addr = e_destination_get_address (recipients[i]); + const gchar *addr = e_destination_get_address (recipients[i]); if (addr && addr[0]) { camel_address_decode ((CamelAddress *) cia, addr); @@ -304,7 +304,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data) recipients_bcc = e_composer_header_table_get_destinations_bcc (table); if (recipients_bcc) { for (i = 0; recipients_bcc[i] != NULL; i++) { - const char *addr = e_destination_get_address (recipients_bcc[i]); + const gchar *addr = e_destination_get_address (recipients_bcc[i]); if (addr && addr[0]) { camel_address_decode ((CamelAddress *) cia, addr); @@ -400,9 +400,9 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data) camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Transport", account->transport->url); camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", account->sent_folder_uri); if (account->id->organization && *account->id->organization) { - char *org; + gchar *org; - org = camel_header_encode_string ((const unsigned char *)account->id->organization); + org = camel_header_encode_string ((const guchar *)account->id->organization); camel_medium_set_header (CAMEL_MEDIUM (message), "Organization", org); g_free (org); } @@ -484,8 +484,8 @@ composer_set_no_change (EMsgComposer *composer, gboolean drop_undo, gboolean edi } static void -save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, - const char *appended_uid, void *user_data) +save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, + const gchar *appended_uid, gpointer user_data) { struct _save_draft_info *sdi = user_data; struct emcs_t *emcs; @@ -547,7 +547,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i } static void -save_draft_folder (char *uri, CamelFolder *folder, gpointer data) +save_draft_folder (gchar *uri, CamelFolder *folder, gpointer data) { CamelFolder **save = data; @@ -560,7 +560,7 @@ save_draft_folder (char *uri, CamelFolder *folder, gpointer data) void em_utils_composer_save_draft_cb (EMsgComposer *composer, gpointer user_data) { - const char *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS); + const gchar *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS); CamelFolder *drafts_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS); EComposerHeaderTable *table; struct _save_draft_info *sdi; @@ -586,7 +586,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, gpointer user_data) if (account && account->drafts_folder_uri && strcmp (account->drafts_folder_uri, default_drafts_folder_uri) != 0) { - int id; + gint id; id = mail_get_folder (account->drafts_folder_uri, 0, save_draft_folder, &folder, mail_msg_unordered_push); mail_msg_wait (id); @@ -620,11 +620,11 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, gpointer user_data) void em_composer_utils_setup_callbacks (EMsgComposer *composer, CamelFolder *folder, - const char *uid, + const gchar *uid, guint32 flags, guint32 set, CamelFolder *drafts, - const char *drafts_uid) + const gchar *drafts_uid) { struct emcs_t *emcs; @@ -653,7 +653,7 @@ em_composer_utils_setup_callbacks (EMsgComposer *composer, /* Composing messages... */ static EMsgComposer * -create_new_composer (const char *subject, const char *fromuri, gboolean use_default_callbacks, gboolean lite) +create_new_composer (const gchar *subject, const gchar *fromuri, gboolean use_default_callbacks, gboolean lite) { EMsgComposer *composer; EComposerHeaderTable *table; @@ -691,7 +691,7 @@ create_new_composer (const char *subject, const char *fromuri, gboolean use_defa * window. **/ void -em_utils_compose_new_message (const char *fromuri) +em_utils_compose_new_message (const gchar *fromuri) { GtkWidget *composer; @@ -711,7 +711,7 @@ em_utils_compose_new_message (const char *fromuri) * window. **/ struct _EMsgComposer * -em_utils_compose_lite_new_message (const char *fromuri) +em_utils_compose_lite_new_message (const gchar *fromuri) { GtkWidget *composer; @@ -733,7 +733,7 @@ em_utils_compose_lite_new_message (const char *fromuri) * according to the values in the mailto url. **/ void -em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri) +em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri) { EMsgComposer *composer; EComposerHeaderTable *table; @@ -760,7 +760,7 @@ em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri) /* Editing messages... */ static void -edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid) +edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid) { EMsgComposer *composer; @@ -775,11 +775,11 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid) CamelMultipart *body = camel_multipart_new (); CamelStream *stream; CamelMimePart *part; - int count1 = 0, string_changed = 0; - const char *cur; - int i; + gint count1 = 0, string_changed = 0; + const gchar *cur; + gint i; - char *str; + gchar *str; gint count = 2; content = camel_medium_get_content_object ((CamelMedium *) message); @@ -806,17 +806,17 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid) mem = camel_stream_mem_new (); camel_data_wrapper_decode_to_stream (content, mem); - str = g_strndup ((const gchar*)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); + str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); camel_object_unref (mem); cur = str; for (i = 0; i < strlen(str); i++) { if (!g_ascii_strncasecmp (cur, "$", 1)) { - const char *end = cur, *check_env; - char *out; + const gchar *end = cur, *check_env; + gchar *out; GConfClient *gconf; GSList *clue_list = NULL, *list; - char **temp_str; + gchar **temp_str; gconf = gconf_client_get_default (); @@ -834,7 +834,7 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid) g_object_unref (gconf); for (list = clue_list; list; list = g_slist_next (list)) { - char **temp = g_strsplit (list->data, "=", 2); + gchar **temp = g_strsplit (list->data, "=", 2); if (!g_ascii_strcasecmp(temp[0], out+1)) { str = g_strdup_printf("%s%s%s", temp_str[0], temp[1], temp_str[1]); cur = str + i; @@ -929,10 +929,10 @@ em_utils_edit_message (CamelMimeMessage *message, CamelFolder *folder) } static void -edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user_data) +edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer user_data) { gboolean replace = GPOINTER_TO_INT (user_data); - int i; + gint i; if (msgs == NULL) return; @@ -969,7 +969,7 @@ struct forward_attached_data { CamelFolder *folder; GPtrArray *uids; - char *fromuri; + gchar *fromuri; }; static void @@ -1021,7 +1021,7 @@ setup_forward_attached_callbacks (EMsgComposer *composer, CamelFolder *folder, G } static void -forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, CamelMimePart *part, char *subject, const char *fromuri) +forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, CamelMimePart *part, gchar *subject, const gchar *fromuri) { EMsgComposer *composer; @@ -1041,7 +1041,7 @@ forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, Cam } static void -forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *user_data) +forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer user_data) { struct forward_attached_data *fad = (struct forward_attached_data *) user_data; @@ -1065,7 +1065,7 @@ forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *pa * forwarded as a simple message/rfc822 attachment. **/ void -em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const char *fromuri) +em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri) { struct forward_attached_data *fad; @@ -1080,12 +1080,12 @@ em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const char *fro } static void -forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, int style, const char *fromuri) +forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gint style, const gchar *fromuri) { CamelMimeMessage *message; EMsgComposer *composer; - char *subject, *text; - int i; + gchar *subject, *text; + gint i; guint32 flags; if (messages->len == 0) @@ -1127,9 +1127,9 @@ forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, } static void -forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data) +forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer user_data) { - forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_INLINE, (char *)user_data); + forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_INLINE, (gchar *)user_data); g_free(user_data); } @@ -1142,7 +1142,7 @@ forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void * Forwards each message in the 'inline' form, each in its own composer window. **/ void -em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const char *fromuri) +em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri) { g_return_if_fail (CAMEL_IS_FOLDER (folder)); g_return_if_fail (uids != NULL); @@ -1151,9 +1151,9 @@ em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const char *fromu } static void -forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data) +forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer user_data) { - forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_QUOTED, (char *)user_data); + forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_QUOTED, (gchar *)user_data); g_free(user_data); } @@ -1167,7 +1167,7 @@ forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void * a "> "), each in its own composer window. **/ void -em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const char *fromuri) +em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri) { g_return_if_fail (CAMEL_IS_FOLDER (folder)); g_return_if_fail (uids != NULL); @@ -1184,13 +1184,13 @@ em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const char *fromu * Forwards a message in the user's configured default style. **/ void -em_utils_forward_message (CamelMimeMessage *message, const char *fromuri) +em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri) { GPtrArray *messages; CamelMimePart *part; GConfClient *gconf; - char *subject; - int mode; + gchar *subject; + gint mode; messages = g_ptr_array_new (); g_ptr_array_add (messages, message); @@ -1229,10 +1229,10 @@ em_utils_forward_message (CamelMimeMessage *message, const char *fromuri) * style. **/ void -em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids, const char *fromuri) +em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri) { GConfClient *gconf; - int mode; + gint mode; gconf = mail_config_get_gconf_client (); mode = gconf_client_get_int (gconf, "/apps/evolution/mail/format/forward_style", NULL); @@ -1296,7 +1296,7 @@ em_utils_redirect_message (CamelMimeMessage *message) } static void -redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data) +redirect_msg (CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data) { if (message == NULL) return; @@ -1313,7 +1313,7 @@ redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, v * be editable). Adds Resent-From/Resent-To/etc headers. **/ void -em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid) +em_utils_redirect_message_by_uid (CamelFolder *folder, const gchar *uid) { g_return_if_fail (CAMEL_IS_FOLDER (folder)); g_return_if_fail (uid != NULL); @@ -1322,7 +1322,7 @@ em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid) } static void -emu_handle_receipt_message(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *ex) +emu_handle_receipt_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *ex) { if (msg) em_utils_handle_receipt(folder, uid, msg); @@ -1333,10 +1333,10 @@ emu_handle_receipt_message(CamelFolder *folder, const char *uid, CamelMimeMessag /* Message disposition notifications, rfc 2298 */ void -em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage *msg) +em_utils_handle_receipt (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg) { EAccount *account; - const char *addr; + const gchar *addr; CamelMessageInfo *info; info = camel_folder_get_message_info(folder, uid); @@ -1379,7 +1379,7 @@ em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage static void em_utils_receipt_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, - int queued, const char *appended_uid, void *data) + gint queued, const gchar *appended_uid, gpointer data) { camel_message_info_free (info); mail_send (); @@ -1400,14 +1400,14 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message) CamelStream *stream; CamelFolder *out_folder; CamelMessageInfo *info; - const char *message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-ID"); - const char *message_date = camel_medium_get_header (CAMEL_MEDIUM (message), "Date"); - const char *message_subject = camel_mime_message_get_subject (message); - const char *receipt_address = camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To"); - char *fake_msgid; - char *hostname; - char *self_address, *receipt_subject; - char *ua, *recipient; + const gchar *message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-ID"); + const gchar *message_date = camel_medium_get_header (CAMEL_MEDIUM (message), "Date"); + const gchar *message_subject = camel_mime_message_get_subject (message); + const gchar *receipt_address = camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To"); + gchar *fake_msgid; + gchar *hostname; + gchar *self_address, *receipt_subject; + gchar *ua, *recipient; if (!receipt_address) return; @@ -1521,7 +1521,7 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message) static void emu_forward_raw_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, - int queued, const char *appended_uid, void *data) + gint queued, const gchar *appended_uid, gpointer data) { camel_message_info_free (info); /* do not call mail send, just pile them all in the outbox */ @@ -1537,7 +1537,7 @@ emu_forward_raw_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageIn * Forwards message to the address, in very similar way as redirect does. **/ void -em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex) +em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex) { EAccount *account; CamelMimeMessage *forward; @@ -1546,7 +1546,7 @@ em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, co CamelFolder *out_folder; CamelMessageInfo *info; struct _camel_header_raw *xev; - char *subject; + gchar *subject; g_return_if_fail (folder != NULL); g_return_if_fail (message != NULL); @@ -1650,7 +1650,7 @@ generate_account_hash (void) } if (!acnt) - g_hash_table_insert (account_hash, (char *) account->id->address, (void *) account); + g_hash_table_insert (account_hash, (gchar *) account->id->address, (gpointer) account); } e_iterator_next (iter); @@ -1660,7 +1660,7 @@ generate_account_hash (void) /* The default account has to be there if none of the enabled accounts are present */ if (g_hash_table_size (account_hash) == 0 && def && def->id->address) - g_hash_table_insert (account_hash, (char *) def->id->address, (void *) def); + g_hash_table_insert (account_hash, (gchar *) def->id->address, (gpointer) def); return account_hash; } @@ -1669,7 +1669,7 @@ EDestination ** em_utils_camel_address_to_destination (CamelInternetAddress *iaddr) { EDestination *dest, **destv; - int n, i, j; + gint n, i, j; if (iaddr == NULL) return NULL; @@ -1679,7 +1679,7 @@ em_utils_camel_address_to_destination (CamelInternetAddress *iaddr) destv = g_malloc (sizeof (EDestination *) * (n + 1)); for (i = 0, j = 0; i < n; i++) { - const char *name, *addr; + const gchar *name, *addr; if (camel_internet_address_get (iaddr, i, &name, &addr)) { dest = e_destination_new (); @@ -1705,11 +1705,11 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account, CamelInternetAddress *to, CamelInternetAddress *cc, CamelFolder *folder, CamelNNTPAddress *postto) { - const char *message_id, *references; + const gchar *message_id, *references; EDestination **tov, **ccv; EMsgComposer *composer; EComposerHeaderTable *table; - char *subject; + gchar *subject; g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL); g_return_val_if_fail (to == NULL || CAMEL_IS_INTERNET_ADDRESS (to), NULL); @@ -1722,7 +1722,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account, ccv = em_utils_camel_address_to_destination (cc); /* Set the subject of the new message. */ - if ((subject = (char *) camel_mime_message_get_subject (message))) { + if ((subject = (gchar *) camel_mime_message_get_subject (message))) { if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0) subject = g_strdup_printf ("Re: %s", subject); else @@ -1744,8 +1744,8 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account, /* add post-to, if nessecary */ if (postto && camel_address_length((CamelAddress *)postto)) { - char *store_url = NULL; - char *post; + gchar *store_url = NULL; + gchar *post; if (folder) { store_url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL); @@ -1764,7 +1764,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account, message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id"); references = camel_medium_get_header (CAMEL_MEDIUM (message), "References"); if (message_id) { - char *reply_refs; + gchar *reply_refs; e_msg_composer_add_header (composer, "In-Reply-To", message_id); @@ -1786,7 +1786,7 @@ static EAccount * guess_account_folder(CamelFolder *folder) { EAccount *account; - char *tmp; + gchar *tmp; tmp = camel_url_to_string(CAMEL_SERVICE(folder->parent_store)->url, CAMEL_URL_HIDE_ALL); account = mail_config_get_account_by_source_url(tmp); @@ -1800,8 +1800,8 @@ guess_account (CamelMimeMessage *message, CamelFolder *folder) { GHashTable *account_hash = NULL; EAccount *account = NULL; - const char *tmp; - int i, j; + const gchar *tmp; + gint i, j; const gchar *types[2] = { CAMEL_RECIPIENT_TYPE_TO, CAMEL_RECIPIENT_TYPE_CC @@ -1851,8 +1851,8 @@ static void get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTPAddress *postto) { const CamelInternetAddress *reply_to; - const char *name, *addr, *posthdr; - int i; + const gchar *name, *addr, *posthdr; + gint i; /* check whether there is a 'Newsgroups: ' header in there */ if (postto @@ -1881,8 +1881,8 @@ em_utils_get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, static gboolean get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to) { - const char *header, *p; - char *addr; + const gchar *header, *p; + gchar *addr; /* Examples: * @@ -1921,13 +1921,13 @@ get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to) static void concat_unique_addrs (CamelInternetAddress *dest, const CamelInternetAddress *src, GHashTable *rcpt_hash) { - const char *name, *addr; - int i; + const gchar *name, *addr; + gint i; for (i = 0; camel_internet_address_get (src, i, &name, &addr); i++) { if (!g_hash_table_lookup (rcpt_hash, addr)) { camel_internet_address_add (dest, name, addr); - g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1)); + g_hash_table_insert (rcpt_hash, (gchar *) addr, GINT_TO_POINTER (1)); } } } @@ -1936,9 +1936,9 @@ static void get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInternetAddress *cc, CamelNNTPAddress *postto) { const CamelInternetAddress *reply_to, *to_addrs, *cc_addrs; - const char *name, *addr, *posthdr; + const gchar *name, *addr, *posthdr; GHashTable *rcpt_hash; - int i; + gint i; /* check whether there is a 'Newsgroups: ' header in there */ if (postto) { @@ -1966,7 +1966,7 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne is kinda silly. */ camel_internet_address_add (to, name, addr); - g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1)); + g_hash_table_insert (rcpt_hash, (gchar *) addr, GINT_TO_POINTER (1)); } } } @@ -2015,13 +2015,13 @@ enum { ATTRIB_TM_YDAY }; -typedef void (* AttribFormatter) (GString *str, const char *attr, CamelMimeMessage *message); +typedef void (* AttribFormatter) (GString *str, const gchar *attr, CamelMimeMessage *message); static void -format_sender (GString *str, const char *attr, CamelMimeMessage *message) +format_sender (GString *str, const gchar *attr, CamelMimeMessage *message) { const CamelInternetAddress *sender; - const char *name, *addr; + const gchar *name, *addr; sender = camel_mime_message_get_from (message); if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) { @@ -2042,10 +2042,10 @@ format_sender (GString *str, const char *attr, CamelMimeMessage *message) } static struct { - const char *name; - int type; + const gchar *name; + gint type; struct { - const char *format; /* strftime or printf format */ + const gchar *format; /* strftime or printf format */ AttribFormatter formatter; /* custom formatter */ } v; } attribvars[] = { @@ -2076,17 +2076,17 @@ static struct { * variables, see em-composer-utils.c:1514 */ #define ATTRIBUTION _("On ${AbbrevWeekdayName}, ${Year}-${Month}-${Day} at ${24Hour}:${Minute} ${TimeZone}, ${Sender} wrote:") -static char * -attribution_format (const char *format, CamelMimeMessage *message) +static gchar * +attribution_format (const gchar *format, CamelMimeMessage *message) { - register const char *inptr; - const char *start; - int tzone, len, i; - char buf[64], *s; + register const gchar *inptr; + const gchar *start; + gint tzone, len, i; + gchar buf[64], *s; GString *str; struct tm tm; time_t date; - int type; + gint type; str = g_string_new (""); @@ -2197,7 +2197,7 @@ attribution_format (const char *format, CamelMimeMessage *message) static void composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *source) { - char *text, *credits; + gchar *text, *credits; CamelMimePart *part; GConfClient *gconf; ssize_t len = 0; @@ -2252,13 +2252,13 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat * struct _reply_data { EMFormat *source; - int mode; + gint mode; }; -char * +gchar * em_utils_construct_composer_text (CamelMimeMessage *message, EMFormat *source) { - char *text, *credits; + gchar *text, *credits; ssize_t len = 0; gboolean start_bottom = 0; @@ -2271,7 +2271,7 @@ em_utils_construct_composer_text (CamelMimeMessage *message, EMFormat *source) static void -reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data) +reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data) { struct _reply_data *rd = user_data; @@ -2301,7 +2301,7 @@ reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message * been replied to. **/ struct _EMsgComposer * -em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message, int mode, EMFormat *source) +em_utils_reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gint mode, EMFormat *source) { CamelInternetAddress *to, *cc; CamelNNTPAddress *postto = NULL; diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h index 60944cb840..2f78f2769f 100644 --- a/mail/em-composer-utils.h +++ b/mail/em-composer-utils.h @@ -41,36 +41,36 @@ struct _EMFormat; struct _EAccount; struct _EDestination; -void em_composer_utils_setup_callbacks (struct _EMsgComposer *composer, struct _CamelFolder *folder, const char *uid, - guint32 flags, guint32 set, struct _CamelFolder *drafts, const char *drafts_uid); +void em_composer_utils_setup_callbacks (struct _EMsgComposer *composer, struct _CamelFolder *folder, const gchar *uid, + guint32 flags, guint32 set, struct _CamelFolder *drafts, const gchar *drafts_uid); #define em_composer_utils_setup_default_callbacks(composer) em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, NULL, NULL) void em_utils_composer_send_cb(struct _EMsgComposer *composer, gpointer user_data); void em_utils_composer_save_draft_cb(struct _EMsgComposer *composer, gpointer user_data); -void em_utils_compose_new_message (const char *fromuri); -struct _EMsgComposer * em_utils_compose_lite_new_message (const char *fromuri); +void em_utils_compose_new_message (const gchar *fromuri); +struct _EMsgComposer * em_utils_compose_lite_new_message (const gchar *fromuri); /* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */ -void em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri); +void em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri); void em_utils_edit_message (struct _CamelMimeMessage *message, struct _CamelFolder *folder); void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids, gboolean replace); -void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri); -void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri); -void em_utils_forward_quoted (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri); +void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri); +void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri); +void em_utils_forward_quoted (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri); -void em_utils_forward_message (struct _CamelMimeMessage *msg, const char *fromuri); -void em_utils_forward_messages (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri); +void em_utils_forward_message (struct _CamelMimeMessage *msg, const gchar *fromuri); +void em_utils_forward_messages (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri); void em_utils_redirect_message (struct _CamelMimeMessage *message); -void em_utils_redirect_message_by_uid (struct _CamelFolder *folder, const char *uid); +void em_utils_redirect_message_by_uid (struct _CamelFolder *folder, const gchar *uid); -void em_utils_forward_message_raw (struct _CamelFolder *folder, struct _CamelMimeMessage *message, const char *address, struct _CamelException *ex); +void em_utils_forward_message_raw (struct _CamelFolder *folder, struct _CamelMimeMessage *message, const gchar *address, struct _CamelException *ex); -void em_utils_handle_receipt (struct _CamelFolder *folder, const char *uid, struct _CamelMimeMessage *msg); +void em_utils_handle_receipt (struct _CamelFolder *folder, const gchar *uid, struct _CamelMimeMessage *msg); void em_utils_send_receipt (struct _CamelFolder *folder, struct _CamelMimeMessage *message); enum { @@ -79,10 +79,10 @@ enum { REPLY_MODE_LIST }; -char *em_utils_construct_composer_text (struct _CamelMimeMessage *message, struct _EMFormat *source); +gchar *em_utils_construct_composer_text (struct _CamelMimeMessage *message, struct _EMFormat *source); void em_utils_get_reply_sender (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelNNTPAddress *postto); void em_utils_get_reply_all (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelInternetAddress *cc, struct _CamelNNTPAddress *postto); -struct _EMsgComposer * em_utils_reply_to_message (struct _CamelFolder *, const char *uid, struct _CamelMimeMessage *message, int mode, struct _EMFormat *source); +struct _EMsgComposer * em_utils_reply_to_message (struct _CamelFolder *, const gchar *uid, struct _CamelMimeMessage *message, gint mode, struct _EMFormat *source); struct _EDestination ** em_utils_camel_address_to_destination (struct _CamelInternetAddress *iaddr); #ifdef __cplusplus diff --git a/mail/em-config.c b/mail/em-config.c index 160cec851e..985a02d56c 100644 --- a/mail/em-config.c +++ b/mail/em-config.c @@ -124,7 +124,7 @@ emp_target_free(EConfig *ep, EConfigTarget *t) } static void -emp_account_changed(struct _EAccount *ea, int id, EMConfig *emc) +emp_account_changed(struct _EAccount *ea, gint id, EMConfig *emc) { e_config_target_changed((EConfig *)emc, E_CONFIG_TARGET_CHANGED_STATE); } @@ -180,7 +180,7 @@ em_config_get_type(void) return type; } -EMConfig *em_config_new(int type, const char *menuid) +EMConfig *em_config_new(gint type, const gchar *menuid) { EMConfig *emp = g_object_new(em_config_get_type(), NULL); @@ -190,7 +190,7 @@ EMConfig *em_config_new(int type, const char *menuid) } EMConfigTargetFolder * -em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const char *uri) +em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const gchar *uri) { EMConfigTargetFolder *t = e_config_target_new(&emp->config, EM_CONFIG_TARGET_FOLDER, sizeof(*t)); @@ -253,7 +253,7 @@ em_config_target_new_account(EMConfig *emp, struct _EAccount *account) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EMConfigHook *)eph) static const EConfigHookTargetMask emph_no_masks[] = { @@ -278,7 +278,7 @@ emph_finalise(GObject *o) static void emph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = emph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.config:1.0"; diff --git a/mail/em-config.h b/mail/em-config.h index 5f895305b0..4ebfa05ad1 100644 --- a/mail/em-config.h +++ b/mail/em-config.h @@ -53,7 +53,7 @@ struct _EMConfigTargetFolder { EConfigTarget target; struct _CamelFolder *folder; - char *uri; + gchar *uri; }; struct _EMConfigTargetPrefs { @@ -86,9 +86,9 @@ struct _EMConfigClass { GType em_config_get_type(void); -EMConfig *em_config_new(int type, const char *menuid); +EMConfig *em_config_new(gint type, const gchar *menuid); -EMConfigTargetFolder *em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const char *uri); +EMConfigTargetFolder *em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const gchar *uri); EMConfigTargetPrefs *em_config_target_new_prefs(EMConfig *emp, struct _GConfClient *gconf); EMConfigTargetAccount *em_config_target_new_account(EMConfig *emp, struct _EAccount *account); diff --git a/mail/em-event.c b/mail/em-event.c index b415d5f8a0..852e319e1b 100644 --- a/mail/em-event.c +++ b/mail/em-event.c @@ -135,7 +135,7 @@ EMEvent *em_event_peek(void) } EMEventTargetFolder * -em_event_target_new_folder (EMEvent *eme, const char *uri, unsigned int new) +em_event_target_new_folder (EMEvent *eme, const gchar *uri, guint new) { EMEventTargetFolder *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_FOLDER, sizeof(*t)); guint32 flags = new ? EM_EVENT_FOLDER_NEWMAIL : 0; @@ -169,7 +169,7 @@ em_event_target_new_composer (EMEvent *eme, const EMsgComposer *composer, guint3 } EMEventTargetMessage * -em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const char *uid, guint32 flags) +em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags) { EMEventTargetMessage *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_MESSAGE, sizeof(*t)); @@ -186,7 +186,7 @@ em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage } EMEventTargetSendReceive * -em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, int row, guint32 flags) +em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags) { EMEventTargetSendReceive *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_SEND_RECEIVE, sizeof(*t)); @@ -199,7 +199,7 @@ em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, } EMEventTargetCustomIcon * -em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const char *folder_name, guint32 flags) +em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *folder_name, guint32 flags) { EMEventTargetCustomIcon *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_CUSTOM_ICON, sizeof(*t)); @@ -212,7 +212,7 @@ em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const c /* ********************************************************************** */ -static void *emeh_parent_class; +static gpointer emeh_parent_class; #define emeh ((EMEventHook *)eph) static const EEventHookTargetMask emeh_folder_masks[] = { @@ -266,7 +266,7 @@ emeh_finalise(GObject *o) static void emeh_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = emeh_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.events:1.0"; diff --git a/mail/em-event.h b/mail/em-event.h index 7c2c4c639d..81173fe690 100644 --- a/mail/em-event.h +++ b/mail/em-event.h @@ -86,10 +86,10 @@ typedef struct _EMEventTargetFolder EMEventTargetFolder; struct _EMEventTargetFolder { EEventTarget target; - char *uri; + gchar *uri; guint new; gboolean is_inbox; - char *name; + gchar *name; }; typedef struct _EMEventTargetMessage EMEventTargetMessage; @@ -97,7 +97,7 @@ typedef struct _EMEventTargetMessage EMEventTargetMessage; struct _EMEventTargetMessage { EEventTarget target; struct _CamelFolder *folder; - char *uid; + gchar *uid; struct _CamelMimeMessage *message; }; @@ -125,7 +125,7 @@ struct _EMEventTargetSendReceive { struct _GtkWidget *table; gpointer data; - int row; + gint row; }; typedef struct _EMEventTargetCustomIcon EMEventTargetCustomIcon; @@ -134,7 +134,7 @@ struct _EMEventTargetCustomIcon { EEventTarget target; GtkCellRenderer *renderer; - const char *folder_name; + const gchar *folder_name; }; typedef struct _EEventItem EMEventItem; @@ -154,12 +154,12 @@ GType em_event_get_type(void); EMEvent *em_event_peek(void); -EMEventTargetFolder *em_event_target_new_folder(EMEvent *emp, const char *uri, guint32 flags); +EMEventTargetFolder *em_event_target_new_folder(EMEvent *emp, const gchar *uri, guint32 flags); EMEventTargetFolderBrowser *em_event_target_new_folder_browser (EMEvent *eme, EMFolderBrowser *emfb); EMEventTargetComposer *em_event_target_new_composer(EMEvent *emp, const struct _EMsgComposer *composer, guint32 flags); -EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, struct _CamelFolder *folder, struct _CamelMimeMessage *message, const char *uid, guint32 flags); -EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, struct _GtkWidget *table, gpointer data, int row, guint32 flags); -EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const char *uri, guint32 flags); +EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, struct _CamelFolder *folder, struct _CamelMimeMessage *message, const gchar *uid, guint32 flags); +EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, struct _GtkWidget *table, gpointer data, gint row, guint32 flags); +EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *uri, guint32 flags); /* ********************************************************************** */ diff --git a/mail/em-filter-context.c b/mail/em-filter-context.c index a2a699a36f..5a82c6ea9d 100644 --- a/mail/em-filter-context.c +++ b/mail/em-filter-context.c @@ -42,9 +42,9 @@ static void em_filter_context_class_init(EMFilterContextClass *klass); static void em_filter_context_init(EMFilterContext *fc); static void em_filter_context_finalise(GObject *obj); -static GList *filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp); -static GList *filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp); -static FilterElement *filter_new_element(RuleContext *rc, const char *name); +static GList *filter_rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp); +static GList *filter_delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp); +static FilterElement *filter_new_element(RuleContext *rc, const gchar *name); static RuleContextClass *parent_class = NULL; @@ -133,14 +133,14 @@ em_filter_context_add_action(EMFilterContext *fc, FilterPart *action) } FilterPart * -em_filter_context_find_action(EMFilterContext *fc, const char *name) +em_filter_context_find_action(EMFilterContext *fc, const gchar *name) { d(printf("find action : ")); return filter_part_find_list(fc->actions, name); } FilterPart * -em_filter_context_create_action(EMFilterContext *fc, const char *name) +em_filter_context_create_action(EMFilterContext *fc, const gchar *name) { FilterPart *part; @@ -158,13 +158,13 @@ em_filter_context_next_action(EMFilterContext *fc, FilterPart *last) /* We search for any folders in our actions list that need updating, update them */ static GList * -filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp) +filter_rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp) { FilterRule *rule; GList *l, *el; FilterPart *action; FilterElement *element; - int count = 0; + gint count = 0; GList *changed = NULL; d(printf("uri '%s' renamed to '%s'\n", olduri, newuri)); @@ -173,7 +173,7 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp /* Yes we could do this inside each part itself, but not today */ rule = NULL; while ((rule = rule_context_next_rule(rc, rule, NULL))) { - int rulecount = 0; + gint rulecount = 0; d(printf("checking rule '%s'\n", rule->name)); @@ -218,7 +218,7 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp } static GList * -filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp) +filter_delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp) { /* We basically do similar to above, but when we find it, Remove the action, and if thats the last action, this might create an empty rule? remove the rule? */ @@ -227,7 +227,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp) GList *l, *el; FilterPart *action; FilterElement *element; - int count = 0; + gint count = 0; GList *deleted = NULL; d(printf("uri '%s' deleted\n", uri)); @@ -236,7 +236,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp) /* Yes we could do this inside each part itself, but not today */ rule = NULL; while ((rule = rule_context_next_rule(rc, rule, NULL))) { - int recorded = 0; + gint recorded = 0; d(printf("checking rule '%s'\n", rule->name)); @@ -282,7 +282,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp) } static FilterElement * -filter_new_element(RuleContext *rc, const char *type) +filter_new_element(RuleContext *rc, const gchar *type) { if (!strcmp(type, "folder")) { return (FilterElement *) em_filter_folder_element_new(); diff --git a/mail/em-filter-context.h b/mail/em-filter-context.h index 56f11a3d81..31431b4a34 100644 --- a/mail/em-filter-context.h +++ b/mail/em-filter-context.h @@ -52,8 +52,8 @@ EMFilterContext *em_filter_context_new (void); /* methods */ void em_filter_context_add_action (EMFilterContext *fc, FilterPart *action); -FilterPart *em_filter_context_find_action (EMFilterContext *fc, const char *name); -FilterPart *em_filter_context_create_action (EMFilterContext *fc, const char *name); +FilterPart *em_filter_context_find_action (EMFilterContext *fc, const gchar *name); +FilterPart *em_filter_context_create_action (EMFilterContext *fc, const gchar *name); FilterPart *em_filter_context_next_action (EMFilterContext *fc, FilterPart *last); #endif /* ! _EM_FILTER_CONTEXT_H */ diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c index 4f68cf47df..378192a8da 100644 --- a/mail/em-filter-editor.c +++ b/mail/em-filter-editor.c @@ -107,7 +107,7 @@ em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names) { EMFilterEditor *fe = (EMFilterEditor *) g_object_new (em_filter_editor_get_type(), NULL); GladeXML *gui; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "filter.glade", @@ -133,8 +133,8 @@ free_sources (gpointer data) static void select_source (GtkComboBox *combobox, EMFilterEditor *fe) { - char *source; - int idx; + gchar *source; + gint idx; GSList *sources; g_return_if_fail (GTK_IS_COMBO_BOX (combobox)); @@ -144,7 +144,7 @@ select_source (GtkComboBox *combobox, EMFilterEditor *fe) g_return_if_fail (idx >= 0 && idx < g_slist_length (sources)); - source = (char *)g_slist_nth (sources, idx); + source = (gchar *)g_slist_nth (sources, idx); g_return_if_fail (source); rule_editor_set_source ((RuleEditor *)fe, source); @@ -154,7 +154,7 @@ void em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names) { GtkWidget *combobox; - int i; + gint i; GtkTreeViewColumn *column; GSList *sources = NULL; diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c index b975b81089..553fba0895 100644 --- a/mail/em-filter-folder-element.c +++ b/mail/em-filter-folder-element.c @@ -41,10 +41,10 @@ #define d(x) static gboolean validate(FilterElement *fe); -static int folder_eq(FilterElement *fe, FilterElement *cm); +static gint folder_eq(FilterElement *fe, FilterElement *cm); static void xml_create(FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode(FilterElement *fe); -static int xml_decode(FilterElement *fe, xmlNodePtr node); +static gint xml_decode(FilterElement *fe, xmlNodePtr node); static GtkWidget *get_widget(FilterElement *fe); static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff); static void format_sexp(FilterElement *, GString *); @@ -132,7 +132,7 @@ em_filter_folder_element_new(void) } void -em_filter_folder_element_set_value(EMFilterFolderElement *ff, const char *uri) +em_filter_folder_element_set_value(EMFilterFolderElement *ff, const gchar *uri) { g_free(ff->uri); ff->uri = g_strdup(uri); @@ -178,15 +178,15 @@ xml_encode(FilterElement *fe) d(printf("Encoding folder as xml\n")); - value = xmlNewNode(NULL, (unsigned const char *)"value"); - xmlSetProp(value, (unsigned const char *)"name", (unsigned char *)fe->name); + value = xmlNewNode(NULL, (const guchar *)"value"); + xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name); if (ff->store_camel_uri) - xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder-curi"); + xmlSetProp(value, (const guchar *)"type", (const guchar *)"folder-curi"); else - xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder"); + xmlSetProp(value, (const guchar *)"type", (const guchar *)"folder"); - work = xmlNewChild(value, NULL, (unsigned const char *)"folder", NULL); - xmlSetProp(work, (unsigned const char *)"uri", (unsigned const char *)ff->uri); + work = xmlNewChild(value, NULL, (const guchar *)"folder", NULL); + xmlSetProp(work, (const guchar *)"uri", (const guchar *)ff->uri); return value; } @@ -201,11 +201,11 @@ xml_decode(FilterElement *fe, xmlNodePtr node) d(printf("Decoding folder from xml %p\n", fe)); xmlFree(fe->name); - fe->name = (char *)xmlGetProp(node, (unsigned const char *)"name"); + fe->name = (gchar *)xmlGetProp(node, (const guchar *)"name"); - type = xmlGetProp (node, (unsigned const char *)"type"); + type = xmlGetProp (node, (const guchar *)"type"); if (type) { - ff->store_camel_uri = g_str_equal ((const char *)type, "folder-curi"); + ff->store_camel_uri = g_str_equal ((const gchar *)type, "folder-curi"); xmlFree (type); } else { ff->store_camel_uri = FALSE; @@ -213,10 +213,10 @@ xml_decode(FilterElement *fe, xmlNodePtr node) n = node->children; while(n) { - if (!strcmp((char *)n->name, "folder")) { - char *uri; + if (!strcmp((gchar *)n->name, "folder")) { + gchar *uri; - uri = (char *)xmlGetProp(n, (unsigned const char *)"uri"); + uri = (gchar *)xmlGetProp(n, (const guchar *)"uri"); g_free(ff->uri); ff->uri = g_strdup(uri); xmlFree(uri); @@ -231,7 +231,7 @@ xml_decode(FilterElement *fe, xmlNodePtr node) static void folder_selected(EMFolderSelectionButton *button, EMFilterFolderElement *ff) { - const char *uri; + const gchar *uri; uri = em_folder_selection_button_get_selection(button); g_free(ff->uri); @@ -249,7 +249,7 @@ get_widget(FilterElement *fe) { EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; GtkWidget *button; - char *uri; + gchar *uri; if (ff->store_camel_uri) uri = ff->uri; diff --git a/mail/em-filter-folder-element.h b/mail/em-filter-folder-element.h index 0d7d3b50b2..149d0226e7 100644 --- a/mail/em-filter-folder-element.h +++ b/mail/em-filter-folder-element.h @@ -39,7 +39,7 @@ typedef struct _EMFilterFolderElementClass EMFilterFolderElementClass; struct _EMFilterFolderElement { FilterElement parent_object; - char *uri; + gchar *uri; gboolean store_camel_uri; /* true if uri should contain camel uri, otherwise contains evolution's uri with an Account ID */ }; @@ -51,6 +51,6 @@ GType em_filter_folder_element_get_type (void); EMFilterFolderElement *em_filter_folder_element_new (void); /* methods */ -void em_filter_folder_element_set_value (EMFilterFolderElement *ff, const char *uri); +void em_filter_folder_element_set_value (EMFilterFolderElement *ff, const gchar *uri); #endif /* ! _EM_FILTER_FOLDER_ELEMENT_H */ diff --git a/mail/em-filter-i18n.h b/mail/em-filter-i18n.h index c0b2925cc2..ba16ee3ebf 100644 --- a/mail/em-filter-i18n.h +++ b/mail/em-filter-i18n.h @@ -1,75 +1,75 @@ /* Automatically generated. Do not edit. */ -char *s = N_("Adjust Score"); -char *s = N_("Assign Color"); -char *s = N_("Assign Score"); -char *s = N_("Attachments"); -char *s = N_("BCC"); -char *s = N_("Beep"); -char *s = N_("CC"); -char *s = N_("Completed On"); -char *s = N_("contains"); -char *s = N_("Copy to Folder"); -char *s = N_("Date received"); -char *s = N_("Date sent"); -char *s = N_("Delete"); -char *s = N_("Deleted"); -char *s = N_("does not contain"); -char *s = N_("does not end with"); -char *s = N_("does not exist"); -char *s = N_("does not return"); -char *s = N_("does not sound like"); -char *s = N_("does not start with"); -char *s = N_("Do Not Exist"); -char *s = N_("Draft"); -char *s = N_("ends with"); -char *s = N_("Exist"); -char *s = N_("exists"); -char *s = N_("Expression"); -char *s = N_("Follow Up"); -char *s = N_("Forward to"); -char *s = N_("Important"); -char *s = N_("is"); -char *s = N_("is after"); -char *s = N_("is before"); -char *s = N_("is Flagged"); -char *s = N_("is greater than"); -char *s = N_("is less than"); -char *s = N_("is not"); -char *s = N_("is not Flagged"); -char *s = N_("is not set"); -char *s = N_("is set"); -char *s = N_("Junk"); -char *s = N_("Junk Test"); -char *s = N_("Label"); -char *s = N_("Mailing list"); -char *s = N_("Match All"); -char *s = N_("Message Body"); -char *s = N_("Message Header"); -char *s = N_("Message is Junk"); -char *s = N_("Message is not Junk"); -char *s = N_("Message Location"); -char *s = N_("Move to Folder"); -char *s = N_("Pipe to Program"); -char *s = N_("Play Sound"); -char *s = N_("Read"); -char *s = N_("Recipients"); -char *s = N_("Regex Match"); -char *s = N_("Replied to"); -char *s = N_("returns"); -char *s = N_("returns greater than"); -char *s = N_("returns less than"); -char *s = N_("Run Program"); -char *s = N_("Score"); -char *s = N_("Sender"); -char *s = N_("Sender or Recipients"); -char *s = N_("Set Label"); -char *s = N_("Set Status"); -char *s = N_("Size (kB)"); -char *s = N_("sounds like"); -char *s = N_("Source Account"); -char *s = N_("Specific header"); -char *s = N_("starts with"); -char *s = N_("Status"); -char *s = N_("Stop Processing"); -char *s = N_("Subject"); -char *s = N_("Unset Status"); +gchar *s = N_("Adjust Score"); +gchar *s = N_("Assign Color"); +gchar *s = N_("Assign Score"); +gchar *s = N_("Attachments"); +gchar *s = N_("BCC"); +gchar *s = N_("Beep"); +gchar *s = N_("CC"); +gchar *s = N_("Completed On"); +gchar *s = N_("contains"); +gchar *s = N_("Copy to Folder"); +gchar *s = N_("Date received"); +gchar *s = N_("Date sent"); +gchar *s = N_("Delete"); +gchar *s = N_("Deleted"); +gchar *s = N_("does not contain"); +gchar *s = N_("does not end with"); +gchar *s = N_("does not exist"); +gchar *s = N_("does not return"); +gchar *s = N_("does not sound like"); +gchar *s = N_("does not start with"); +gchar *s = N_("Do Not Exist"); +gchar *s = N_("Draft"); +gchar *s = N_("ends with"); +gchar *s = N_("Exist"); +gchar *s = N_("exists"); +gchar *s = N_("Expression"); +gchar *s = N_("Follow Up"); +gchar *s = N_("Forward to"); +gchar *s = N_("Important"); +gchar *s = N_("is"); +gchar *s = N_("is after"); +gchar *s = N_("is before"); +gchar *s = N_("is Flagged"); +gchar *s = N_("is greater than"); +gchar *s = N_("is less than"); +gchar *s = N_("is not"); +gchar *s = N_("is not Flagged"); +gchar *s = N_("is not set"); +gchar *s = N_("is set"); +gchar *s = N_("Junk"); +gchar *s = N_("Junk Test"); +gchar *s = N_("Label"); +gchar *s = N_("Mailing list"); +gchar *s = N_("Match All"); +gchar *s = N_("Message Body"); +gchar *s = N_("Message Header"); +gchar *s = N_("Message is Junk"); +gchar *s = N_("Message is not Junk"); +gchar *s = N_("Message Location"); +gchar *s = N_("Move to Folder"); +gchar *s = N_("Pipe to Program"); +gchar *s = N_("Play Sound"); +gchar *s = N_("Read"); +gchar *s = N_("Recipients"); +gchar *s = N_("Regex Match"); +gchar *s = N_("Replied to"); +gchar *s = N_("returns"); +gchar *s = N_("returns greater than"); +gchar *s = N_("returns less than"); +gchar *s = N_("Run Program"); +gchar *s = N_("Score"); +gchar *s = N_("Sender"); +gchar *s = N_("Sender or Recipients"); +gchar *s = N_("Set Label"); +gchar *s = N_("Set Status"); +gchar *s = N_("Size (kB)"); +gchar *s = N_("sounds like"); +gchar *s = N_("Source Account"); +gchar *s = N_("Specific header"); +gchar *s = N_("starts with"); +gchar *s = N_("Status"); +gchar *s = N_("Stop Processing"); +gchar *s = N_("Subject"); +gchar *s = N_("Unset Status"); diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 583f82977c..03d0028b6e 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -35,10 +35,10 @@ #define d(x) -static int validate(FilterRule *fr); -static int filter_eq(FilterRule *fr, FilterRule *cm); +static gint validate(FilterRule *fr); +static gint filter_eq(FilterRule *fr, FilterRule *cm); static xmlNodePtr xml_encode(FilterRule *fr); -static int xml_decode(FilterRule *fr, xmlNodePtr, RuleContext *rc); +static gint xml_decode(FilterRule *fr, xmlNodePtr, RuleContext *rc); static void rule_copy(FilterRule *dest, FilterRule *src); /*static void build_code(FilterRule *, GString *out);*/ static GtkWidget *get_widget(FilterRule *fr, RuleContext *rc); @@ -176,7 +176,7 @@ validate(FilterRule *fr) { EMFilterRule *ff =(EMFilterRule *)fr; GList *parts; - int valid; + gint valid; valid = FILTER_RULE_CLASS(parent_class)->validate(fr); @@ -193,7 +193,7 @@ validate(FilterRule *fr) static int list_eq(GList *al, GList *bl) { - int truth = TRUE; + gint truth = TRUE; while (truth && al && bl) { FilterPart *a = al->data, *b = bl->data; @@ -222,7 +222,7 @@ xml_encode(FilterRule *fr) node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr); g_return_val_if_fail (node != NULL, NULL); - set = xmlNewNode(NULL, (const unsigned char *)"actionset"); + set = xmlNewNode(NULL, (const guchar *)"actionset"); xmlAddChild(node, set); l = ff->actions; while (l) { @@ -239,13 +239,13 @@ static void load_set(xmlNodePtr node, EMFilterRule *ff, RuleContext *rc) { xmlNodePtr work; - char *rulename; + gchar *rulename; FilterPart *part; work = node->children; while (work) { - if (!strcmp((char *)work->name, "part")) { - rulename = (char *)xmlGetProp(work, (const unsigned char *)"name"); + if (!strcmp((gchar *)work->name, "part")) { + rulename = (gchar *)xmlGetProp(work, (const guchar *)"name"); part = em_filter_context_find_action((EMFilterContext *)rc, rulename); if (part) { part = filter_part_clone(part); @@ -267,7 +267,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc) { EMFilterRule *ff =(EMFilterRule *)fr; xmlNodePtr work; - int result; + gint result; result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, rc); if (result != 0) @@ -275,7 +275,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc) work = node->children; while (work) { - if (!strcmp((char *)work->name, "actionset")) { + if (!strcmp((gchar *)work->name, "actionset")) { load_set(work, ff, rc); } work = work->next; @@ -328,7 +328,7 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) { FilterPart *part = NULL; FilterPart *newpart; - int index, i; + gint index, i; index = gtk_combo_box_get_active (combobox); for (i = 0, part = em_filter_context_next_action (data->f, part); part && i < index; i++, part = em_filter_context_next_action (data->f, part)) { @@ -364,7 +364,7 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr) GtkWidget *combobox; GtkWidget *hbox; GtkWidget *p; - int index = 0, current = 0; + gint index = 0, current = 0; struct _part_data *data; data = g_malloc0(sizeof(*data)); @@ -431,7 +431,7 @@ less_parts(GtkWidget *button, struct _rule_data *data) } static void -attach_rule(GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row) +attach_rule(GtkWidget *rule, struct _rule_data *data, FilterPart *part, gint row) { GtkWidget *remove; @@ -512,7 +512,7 @@ get_widget(FilterRule *fr, RuleContext *rc) FilterPart *part; struct _rule_data *data; EMFilterRule *ff =(EMFilterRule *)fr; - int rows, i = 0; + gint rows, i = 0; gchar *msg; widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc); diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c index 23a1b762cd..126cbe2a50 100644 --- a/mail/em-filter-source-element.c +++ b/mail/em-filter-source-element.c @@ -39,29 +39,29 @@ static void em_filter_source_element_class_init(EMFilterSourceElementClass *klas static void em_filter_source_element_init(EMFilterSourceElement *fs); static void em_filter_source_element_finalize(GObject *obj); -static int source_eq(FilterElement *fe, FilterElement *cm); +static gint source_eq(FilterElement *fe, FilterElement *cm); static void xml_create(FilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode(FilterElement *fe); -static int xml_decode(FilterElement *fe, xmlNodePtr node); +static gint xml_decode(FilterElement *fe, xmlNodePtr node); static FilterElement *clone(FilterElement *fe); static GtkWidget *get_widget(FilterElement *fe); static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff); static void format_sexp(FilterElement *, GString *); -static void em_filter_source_element_add_source (EMFilterSourceElement *fs, const char *account_name, const char *name, - const char *addr, const char *url); +static void em_filter_source_element_add_source (EMFilterSourceElement *fs, const gchar *account_name, const gchar *name, + const gchar *addr, const gchar *url); static void em_filter_source_element_get_sources(EMFilterSourceElement *fs); typedef struct _SourceInfo { - char *account_name; - char *name; - char *address; - char *url; + gchar *account_name; + gchar *name; + gchar *address; + gchar *url; } SourceInfo; struct _EMFilterSourceElementPrivate { GList *sources; - char *current_url; + gchar *current_url; }; @@ -176,12 +176,12 @@ xml_encode(FilterElement *fe) EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; - value = xmlNewNode(NULL, (const unsigned char *)"value"); - xmlSetProp(value, (const unsigned char *)"name", (unsigned char *)fe->name); - xmlSetProp(value, (const unsigned char *)"type", (const unsigned char *)"uri"); + value = xmlNewNode(NULL, (const guchar *)"value"); + xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name); + xmlSetProp(value, (const guchar *)"type", (const guchar *)"uri"); if (fs->priv->current_url) - xmlNewTextChild(value, NULL, (const unsigned char *)"uri", (unsigned char *)fs->priv->current_url); + xmlNewTextChild(value, NULL, (const guchar *)"uri", (guchar *)fs->priv->current_url); return value; } @@ -191,12 +191,12 @@ xml_decode(FilterElement *fe, xmlNodePtr node) { EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; CamelURL *url; - char *uri; + gchar *uri; node = node->children; while (node != NULL) { - if (!strcmp((char *)node->name, "uri")) { - uri = (char *)xmlNodeGetContent(node); + if (!strcmp((gchar *)node->name, "uri")) { + uri = (gchar *)xmlNodeGetContent(node); url = camel_url_new(uri, NULL); xmlFree(uri); @@ -219,7 +219,7 @@ clone(FilterElement *fe) EMFilterSourceElement *cpy = em_filter_source_element_new(); GList *i; - ((FilterElement *)cpy)->name = (char *)xmlStrdup((unsigned char *)fe->name); + ((FilterElement *)cpy)->name = (gchar *)xmlStrdup((guchar *)fe->name); cpy->priv->current_url = g_strdup(fs->priv->current_url); @@ -235,7 +235,7 @@ static void source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs) { SourceInfo *info; - int idx; + gint idx; idx = gtk_combo_box_get_active (combobox); g_return_if_fail (idx >= 0 && idx < g_list_length (fs->priv->sources)); @@ -254,7 +254,7 @@ get_widget(FilterElement *fe) GtkWidget *combobox; GList *i; SourceInfo *first = NULL; - int index, current_index; + gint index, current_index; if (fs->priv->sources == NULL) em_filter_source_element_get_sources(fs); @@ -266,7 +266,7 @@ get_widget(FilterElement *fe) for (i = fs->priv->sources; i != NULL; i = g_list_next(i)) { SourceInfo *info = (SourceInfo *)i->data; - char *label; + gchar *label; if (info->url != NULL) { if (first == NULL) @@ -321,8 +321,8 @@ format_sexp(FilterElement *fe, GString *out) static void -em_filter_source_element_add_source(EMFilterSourceElement *fs, const char *account_name, const char *name, - const char *addr, const char *url) +em_filter_source_element_add_source(EMFilterSourceElement *fs, const gchar *account_name, const gchar *name, + const gchar *addr, const gchar *url) { SourceInfo *info; @@ -344,7 +344,7 @@ em_filter_source_element_get_sources(EMFilterSourceElement *fs) const EAccount *account; GConfClient *gconf; EIterator *it; - char *uri; + gchar *uri; CamelURL *url; /* should this get the global object from mail? */ diff --git a/mail/em-filter-source-element.h b/mail/em-filter-source-element.h index ac9a1ff911..d4d6a75890 100644 --- a/mail/em-filter-source-element.h +++ b/mail/em-filter-source-element.h @@ -47,6 +47,6 @@ struct _EMFilterSourceElementClass { GType em_filter_source_element_get_type (void); EMFilterSourceElement *em_filter_source_element_new (void); -void em_filter_source_element_set_current (EMFilterSourceElement *src, const char *url); +void em_filter_source_element_set_current (EMFilterSourceElement *src, const gchar *url); #endif /* _EM_FILTER_SOURCE_ELEMENT_H */ diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index c835a1b593..0fc37b46bd 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -121,7 +121,7 @@ struct _EMFolderBrowserPrivate { guint vpane_resize_id; guint list_built_id; /* hook onto list-built for delayed 'select first unread' stuff */ - char *select_uid; + gchar *select_uid; guint folder_changed_id; guint show_wide:1; @@ -139,20 +139,20 @@ typedef struct EMFBSearchBarItem { const gchar *image; } EMFBSearchBarItem; -static void emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state); -static void emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri); -static void emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri); +static void emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint state); +static void emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri); +static void emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri); /* FilterBar stuff ... */ -static void emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data); -static void emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb); +static void emfb_search_config_search(EFilterBar *efb, FilterRule *rule, gint id, const gchar *query, gpointer data); +static void emfb_search_menu_activated(ESearchBar *esb, gint id, EMFolderBrowser *emfb); static void emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb); static void emfb_search_search_cleared(ESearchBar *esb); -static int emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderBrowser *emfb); -static void emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *emfb); +static gint emfb_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderBrowser *emfb); +static void emfb_list_message_selected (MessageList *ml, const gchar *uid, EMFolderBrowser *emfb); -static void emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path); +static void emfb_expand_all_threads(BonoboUIComponent *uid, gpointer data, const gchar *path); static const EMFolderViewEnable emfb_enable_map[] = { { "EditInvertSelection", EM_POPUP_SELECT_FOLDER }, @@ -294,7 +294,7 @@ generate_viewoption_menu (GtkWidget *emfv) for (i = 0; emfb_view_items[i].search.id != -1; ++i) { if (emfb_view_items[i].search.text) { - char *str; + gchar *str; str = e_str_without_underscores (_(emfb_view_items[i].search.text)); menu_item = gtk_image_menu_item_new_with_label (str); @@ -325,7 +325,7 @@ generate_viewoption_menu (GtkWidget *emfv) for (l = mail_config_get_labels (), i = 0; l; l = l->next, i++) { EUtilLabel *label = l->data; if (label->name && *(label->name)) { - char *str; + gchar *str; GdkPixmap *pixmap; GdkColor colour; GdkGC *gc; @@ -359,7 +359,7 @@ generate_viewoption_menu (GtkWidget *emfv) for (i = 0; temp_view_items[i].search.id != -1; ++i) { if (temp_view_items[i].search.text) { - char *str; + gchar *str; str = e_str_without_underscores (_(temp_view_items[i].search.text)); menu_item = gtk_image_menu_item_new_with_label (str); if (temp_view_items[i].image) { @@ -423,7 +423,7 @@ emfb_realize (GtkWidget *widget) { GtkWidget *menu; EMFolderBrowser *emfb = (EMFolderBrowser *)widget; - int id; + gint id; menu = generate_viewoption_menu (widget); id = e_search_bar_get_viewitem_id (E_SEARCH_BAR (emfb->search)); @@ -512,11 +512,11 @@ emfb_init(GObject *o) "evolution-mail-message.xml", NULL)); - emfb->view.enable_map = g_slist_prepend(emfb->view.enable_map, (void *)emfb_enable_map); + emfb->view.enable_map = g_slist_prepend(emfb->view.enable_map, (gpointer)emfb_enable_map); if (search_context) { - const char *systemrules = g_object_get_data (G_OBJECT (search_context), "system"); - const char *userrules = g_object_get_data (G_OBJECT (search_context), "user"); + const gchar *systemrules = g_object_get_data (G_OBJECT (search_context), "system"); + const gchar *userrules = g_object_get_data (G_OBJECT (search_context), "user"); EFilterBar *efb; GConfClient *gconf; @@ -736,7 +736,7 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state) if (state) { GConfClient *gconf = mail_config_get_gconf_client (); - int paned_size /*, y*/; + gint paned_size /*, y*/; paned_size = gconf_client_get_int(gconf, emfb->priv->show_wide ? "/apps/evolution/mail/display/hpaned_size":"/apps/evolution/mail/display/paned_size", NULL); @@ -745,7 +745,7 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state) gtk_widget_show (GTK_WIDGET (emfb->priv->preview)); if (emfb->view.list->cursor_uid) { - char *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1); + gchar *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1); emfb->priv->scope_restricted = FALSE; strcpy(uid, emfb->view.list->cursor_uid); @@ -779,7 +779,7 @@ gboolean em_folder_browser_get_wide (EMFolderBrowser *emfb) void em_folder_browser_show_wide(EMFolderBrowser *emfb, gboolean state) { GtkWidget *w; - int paned_size; + gint paned_size; if ((emfb->priv->show_wide && state) || emfb->view.list == NULL) { @@ -818,7 +818,7 @@ void em_folder_browser_show_wide(EMFolderBrowser *emfb, gboolean state) /* FIXME: Ugh! */ static void -emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb) +emfb_search_menu_activated(ESearchBar *esb, gint id, EMFolderBrowser *emfb) { EFilterBar *efb = (EFilterBar *)esb; @@ -829,7 +829,7 @@ emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb) d(printf("Save vfolder\n")); if (efb->current_query) { FilterRule *rule; - char *name, *text; + gchar *name, *text; /* ensures vfolder is running */ vfolder_load_storage (); @@ -850,14 +850,14 @@ emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb) } static void -emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data) +emfb_search_config_search(EFilterBar *efb, FilterRule *rule, gint id, const gchar *query, gpointer data) { EMFolderBrowser *emfb = data; EMailSearchBar *search_bar; ESearchingTokenizer *tokenizer; GList *partl; struct _camel_search_words *words; - int i; + gint i; GSList *strings = NULL; /* we scan the parts of a rule, and set all the types we know about to the query string */ @@ -874,7 +874,7 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char if (input) filter_input_set_value(input, query); - words = camel_search_words_split((unsigned char *)query); + words = camel_search_words_split((guchar *)query); for (i=0;i<words->len;i++) strings = g_slist_prepend(strings, g_strdup(words->words[i]->word)); camel_search_words_free (words); @@ -914,12 +914,12 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char } static const gchar * -get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri) +get_view_query (ESearchBar *esb, CamelFolder *folder, const gchar *folder_uri) { const gchar *view_sexp = NULL; gint id; GtkWidget *menu_item; - char *tag; + gchar *tag; gboolean duplicate = TRUE; /* Get the current selected view */ @@ -985,7 +985,7 @@ get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri) view_sexp = g_string_free (s, FALSE); } break; case VIEW_LABEL: - tag = (char *)g_object_get_data (G_OBJECT (menu_item), "LabelTag"); + tag = (gchar *)g_object_get_data (G_OBJECT (menu_item), "LabelTag"); view_sexp = g_strdup_printf ("(match-all (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\")))", tag, tag, tag); duplicate = FALSE; break; @@ -1013,7 +1013,7 @@ struct _setup_msg { CamelFolder *folder; CamelOperation *cancel; - char *query; + gchar *query; GList *sources_uri; GList *sources_folder; }; @@ -1039,12 +1039,12 @@ vfolder_setup_exec(struct _setup_msg *m) l = m->sources_uri; while (l) { - d(printf(" Adding uri: %s\n", (char *)l->data)); + d(printf(" Adding uri: %s\n", (gchar *)l->data)); folder = mail_tool_uri_to_folder (l->data, 0, &m->base.ex); if (folder) { list = g_list_append(list, folder); } else { - g_warning("Could not open vfolder source: %s", (char *)l->data); + g_warning("Could not open vfolder source: %s", (gchar *)l->data); camel_exception_clear(&m->base.ex); } l = l->next; @@ -1106,10 +1106,10 @@ static MailMsgInfo vfolder_setup_info = { /* sources_uri should be camel uri's */ static int -vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList *sources_folder, CamelOperation *cancel) +vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder, CamelOperation *cancel) { struct _setup_msg *m; - int id; + gint id; m = mail_msg_new(&vfolder_setup_info); m->folder = folder; @@ -1134,8 +1134,8 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb) EMFolderView *emfv = (EMFolderView *) emfb; EFilterBar *efb = (EFilterBar *)esb; const gchar *view_sexp; - char *search_state = NULL, *folder_uri=NULL; - char *word = NULL, *storeuri = NULL, *search_word = NULL; + gchar *search_state = NULL, *folder_uri=NULL; + gchar *word = NULL, *storeuri = NULL, *search_word = NULL; gint id, i; CamelFolder *folder; CamelStore *store; @@ -1260,11 +1260,11 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb) /* Add the local folders */ l = mail_vfolder_get_sources_local (); while (l) { - folder = mail_tool_uri_to_folder ((const char *)l->data, 0,ex); + folder = mail_tool_uri_to_folder ((const gchar *)l->data, 0,ex); if (folder) folder_list = g_list_append(folder_list, folder); else { - g_warning("Could not open vfolder source: %s", (char *)l->data); + g_warning("Could not open vfolder source: %s", (gchar *)l->data); camel_exception_clear(ex); } l = l->next; @@ -1273,11 +1273,11 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb) /* Add the remote source folder */ l = mail_vfolder_get_sources_remote (); while (l) { - folder = mail_tool_uri_to_folder ((const char *)l->data, 0,ex); + folder = mail_tool_uri_to_folder ((const gchar *)l->data, 0,ex); if (folder) folder_list = g_list_append(folder_list, folder); else { - g_warning("Could not open vfolder source: %s", (char *)l->data); + g_warning("Could not open vfolder source: %s", (gchar *)l->data); camel_exception_clear(ex); } l = l->next; @@ -1337,7 +1337,7 @@ emfb_search_search_cleared(ESearchBar *esb) /* ********************************************************************** */ static int -emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderBrowser *emfb) +emfb_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderBrowser *emfb) { gboolean state, folder_choose = TRUE; if ((ev->key.state & GDK_CONTROL_MASK) != 0) @@ -1391,7 +1391,7 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, } static void -emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *emfb) +emfb_list_message_selected (MessageList *ml, const gchar *uid, EMFolderBrowser *emfb) { EMFolderView *emfv = (EMFolderView *) emfb; @@ -1413,7 +1413,7 @@ emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *e /* ********************************************************************** */ static void -emfb_edit_cut(BonoboUIComponent *uid, void *data, const char *path) +emfb_edit_cut(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1428,7 +1428,7 @@ emfb_edit_cut(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_edit_copy(BonoboUIComponent *uid, void *data, const char *path) +emfb_edit_copy(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1441,7 +1441,7 @@ emfb_edit_copy(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_edit_paste(BonoboUIComponent *uid, void *data, const char *path) +emfb_edit_paste(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1452,7 +1452,7 @@ emfb_edit_paste(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_edit_invert_selection(BonoboUIComponent *uid, void *data, const char *path) +emfb_edit_invert_selection(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1468,7 +1468,7 @@ emfb_select_all_daemon (MessageList *ml) } static void -emfb_edit_select_all(BonoboUIComponent *uid, void *data, const char *path) +emfb_edit_select_all(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1491,7 +1491,7 @@ emfb_edit_select_all(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_edit_select_thread(BonoboUIComponent *uid, void *data, const char *path) +emfb_edit_select_thread(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1499,7 +1499,7 @@ emfb_edit_select_thread(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_edit_select_subthread(BonoboUIComponent *uid, void *data, const char *path) +emfb_edit_select_subthread(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1507,7 +1507,7 @@ emfb_edit_select_subthread(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_folder_properties(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_properties(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1517,7 +1517,7 @@ emfb_folder_properties(BonoboUIComponent *uid, void *data, const char *path) /* VIEWTHREADED*/ static void -emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path) +emfb_expand_all_threads(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1526,7 +1526,7 @@ emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_collapse_all_threads(BonoboUIComponent *uid, void *data, const char *path) +emfb_collapse_all_threads(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1534,7 +1534,7 @@ emfb_collapse_all_threads(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_folder_copy(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_copy(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; CamelFolderInfo *fi = NULL; @@ -1557,7 +1557,7 @@ emfb_folder_copy(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_folder_move(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_move(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; CamelFolderInfo *fi = NULL; @@ -1580,7 +1580,7 @@ emfb_folder_move(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_folder_delete(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_delete(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1590,7 +1590,7 @@ emfb_folder_delete(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_folder_refresh(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_refresh(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; EMFolderTree *tree = g_object_get_data (G_OBJECT (emfb), "foldertree"); @@ -1602,7 +1602,7 @@ emfb_folder_refresh(BonoboUIComponent *uid, void *data, const char *path) static void -emfb_folder_rename(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_rename(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1612,7 +1612,7 @@ emfb_folder_rename(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_folder_create(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_create(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; CamelFolderInfo *fi = NULL; @@ -1633,7 +1633,7 @@ emfb_folder_create(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_folder_expunge(BonoboUIComponent *uid, void *data, const char *path) +emfb_folder_expunge(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1642,12 +1642,12 @@ emfb_folder_expunge(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_mark_all_read(BonoboUIComponent *uid, void *data, const char *path) +emfb_mark_all_read(BonoboUIComponent *uid, gpointer data, const gchar *path) { /* FIXME: make a 'mark messages' function? */ EMFolderView *emfv = data; GPtrArray *uids; - int i; + gint i; if (emfv->folder == NULL) return; @@ -1662,7 +1662,7 @@ emfb_mark_all_read(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path) +emfb_view_hide_read(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1670,7 +1670,7 @@ emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_view_hide_selected(BonoboUIComponent *uid, void *data, const char *path) +emfb_view_hide_selected(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; GPtrArray *uids; @@ -1688,7 +1688,7 @@ emfb_view_hide_selected(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_view_show_all(BonoboUIComponent *uid, void *data, const char *path) +emfb_view_show_all(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1698,13 +1698,13 @@ emfb_view_show_all(BonoboUIComponent *uid, void *data, const char *path) /* ********************************************************************** */ static void -emfb_mail_stop(BonoboUIComponent *uid, void *data, const char *path) +emfb_mail_stop(BonoboUIComponent *uid, gpointer data, const gchar *path) { mail_cancel_all(); } static void -emfb_tools_filters(BonoboUIComponent *uid, void *data, const char *path) +emfb_tools_filters(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1718,7 +1718,7 @@ emfb_subscribe_editor_destroy(GtkWidget *w, EMFolderBrowser *emfb) } static void -emfb_tools_subscriptions(BonoboUIComponent *uid, void *data, const char *path) +emfb_tools_subscriptions(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1733,7 +1733,7 @@ emfb_tools_subscriptions(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_focus_search(BonoboUIComponent *uid, void *data, const char *path) +emfb_focus_search(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderBrowser *emfb = data; @@ -1741,13 +1741,13 @@ emfb_focus_search(BonoboUIComponent *uid, void *data, const char *path) } static void -emfb_help_debug (BonoboUIComponent *uid, void *data, const char *path) +emfb_help_debug (BonoboUIComponent *uid, gpointer data, const gchar *path) { mail_component_show_logger ((GtkWidget *) data); } static void -emfb_tools_vfolders(BonoboUIComponent *uid, void *data, const char *path) +emfb_tools_vfolders(BonoboUIComponent *uid, gpointer data, const gchar *path) { /* FIXME: rename/refactor this */ vfolder_edit(); @@ -1805,7 +1805,7 @@ static EPixmap emfb_pixmaps[] = { static void -emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfb_hide_deleted(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { GConfClient *gconf; EMFolderView *emfv = data; @@ -1819,7 +1819,7 @@ emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_E } static void -emfb_view_threaded(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfb_view_threaded(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { GConfClient *gconf; EMFolderView *emfv = data; @@ -1840,7 +1840,7 @@ emfb_view_threaded(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_ } static void -emfb_view_preview(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfb_view_preview(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { GConfClient *gconf; EMFolderView *emfv = data; @@ -1859,7 +1859,7 @@ emfb_view_preview(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_E } static void -emfb_show_next(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfb_show_next(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { GConfClient *gconf; EMFolderBrowser *emfb = data; @@ -1874,7 +1874,7 @@ emfb_show_next(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_Even } static void -emfb_show_below(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfb_show_below(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { GConfClient *gconf; EMFolderBrowser *emfb = data; @@ -1893,7 +1893,7 @@ emfb_list_scrolled (MessageList *ml, EMFolderBrowser *emfb) { EMFolderView *emfv = (EMFolderView *) emfb; double position; - char *state; + gchar *state; position = message_list_get_scrollbar_position (ml); state = g_strdup_printf ("%f", position); @@ -1909,7 +1909,7 @@ scroll_idle_cb (EMFolderBrowser *emfb) { EMFolderView *emfv = (EMFolderView *) emfb; double position; - char *state; + gchar *state; if ((state = camel_object_meta_get (emfv->folder, "evolution:list_scroll_position"))) { position = strtod (state, NULL); @@ -1928,7 +1928,7 @@ scroll_idle_cb (EMFolderBrowser *emfb) } static void -emfb_gui_folder_changed(CamelFolder *folder, void *dummy, EMFolderBrowser *emfb) +emfb_gui_folder_changed(CamelFolder *folder, gpointer dummy, EMFolderBrowser *emfb) { if (emfb->priv->select_uid) { CamelMessageInfo *mi; @@ -2008,7 +2008,7 @@ emfb_list_built (MessageList *ml, EMFolderBrowser *emfb) } static void -emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) +emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri) { EMFolderBrowser *emfb = (EMFolderBrowser *) emfv; const gchar *state; @@ -2045,7 +2045,7 @@ emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) static void -emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) +emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri) { EMFolderBrowser *emfb = (EMFolderBrowser *) emfv; struct _EMFolderBrowserPrivate *p = emfb->priv; @@ -2078,8 +2078,8 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) before the folder is open and need to override the defaults */ if (folder) { - char *sstate; - int state; + gchar *sstate; + gint state; gboolean safe; GConfClient *gconf = mail_config_get_gconf_client(); @@ -2178,12 +2178,12 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) } static void -emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) +emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint act) { if (act) { GConfClient *gconf; gboolean state; - char *sstate; + gchar *sstate; EMFolderBrowser *emfb = (EMFolderBrowser *) emfv; gconf = mail_config_get_gconf_client (); diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c index b0fbfc65d2..db8bff5315 100644 --- a/mail/em-folder-properties.c +++ b/mail/em-folder-properties.c @@ -46,20 +46,20 @@ #include "mail-config.h" struct _prop_data { - void *object; + gpointer object; CamelArgV *argv; GtkWidget **widgets; GSList *properties; - char *name; - int total; - int unread; + gchar *name; + gint total; + gint unread; EMConfig *config; CamelFolderQuotaInfo *quota; }; static void -emfp_dialog_response (GtkWidget *dialog, int response, struct _prop_data *prop_data) +emfp_dialog_response (GtkWidget *dialog, gint response, struct _prop_data *prop_data) { if (response == GTK_RESPONSE_OK) e_config_commit((EConfig *)prop_data->config); @@ -70,11 +70,11 @@ emfp_dialog_response (GtkWidget *dialog, int response, struct _prop_data *prop_d } static void -emfp_commit(EConfig *ec, GSList *items, void *data) +emfp_commit(EConfig *ec, GSList *items, gpointer data) { struct _prop_data *prop_data = data; CamelArgV *argv = prop_data->argv; - int i; + gint i; for (i = 0; i < argv->argc; i++) { CamelArg *arg = &argv->argv[i]; @@ -85,7 +85,7 @@ emfp_commit(EConfig *ec, GSList *items, void *data) break; case CAMEL_ARG_STR: g_free (arg->ca_str); - arg->ca_str = (char *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]); + arg->ca_str = (gchar *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]); break; case CAMEL_ARG_INT: arg->ca_int = gtk_spin_button_get_value_as_int ((GtkSpinButton *) prop_data->widgets[i]); @@ -103,10 +103,10 @@ emfp_commit(EConfig *ec, GSList *items, void *data) } static void -emfp_free(EConfig *ec, GSList *items, void *data) +emfp_free(EConfig *ec, GSList *items, gpointer data) { struct _prop_data *prop_data = data; - int i; + gint i; g_slist_free(items); @@ -127,9 +127,9 @@ emfp_free(EConfig *ec, GSList *items, void *data) } static int -add_numbered_row (GtkTable *table, int row, const char *description, const char *format, int num) +add_numbered_row (GtkTable *table, gint row, const gchar *description, const gchar *format, gint num) { - char *str; + gchar *str; GtkWidget *label; g_return_val_if_fail (table != NULL, row); @@ -154,11 +154,11 @@ add_numbered_row (GtkTable *table, int row, const char *description, const char } static GtkWidget * -emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { GtkWidget *w, *table, *label; struct _prop_data *prop_data = data; - int row = 0, i; + gint row = 0, i; GSList *l; if (old) @@ -182,8 +182,8 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, CamelFolderQuotaInfo *quota = prop_data->quota; for (info = quota; info; info = info->next) { - char *descr; - int procs; + gchar *descr; + gint procs; /* should not happen, but anyway... */ if (!info->total) @@ -287,7 +287,7 @@ static EMConfigItem emfp_items[] = { static gboolean emfp_items_translated = FALSE; static void -emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data) +emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data) { GtkWidget *dialog, *w; struct _prop_data *prop_data; @@ -300,7 +300,7 @@ emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota, gboolean hide_deleted; GConfClient *gconf; CamelStore *store; - char *uri = (char *)data; + gchar *uri = (gchar *)data; if (folder == NULL) { g_free (uri); @@ -426,7 +426,7 @@ emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota, } static void -emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data) +emfp_dialog_got_folder (gchar *uri, CamelFolder *folder, gpointer data) { /* this should be called in a thread too */ mail_get_folder_quota (folder, emfp_dialog_got_folder_quota, g_strdup (uri), mail_msg_unordered_push); @@ -442,7 +442,7 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data) * as NULL, then the folder @uri will be loaded first. **/ void -em_folder_properties_show(GtkWindow *parent, CamelFolder *folder, const char *uri) +em_folder_properties_show(GtkWindow *parent, CamelFolder *folder, const gchar *uri) { /* HACK: its the old behaviour, not very 'neat' but it works */ if (!strncmp(uri, "vfolder:", 8)) { @@ -464,5 +464,5 @@ em_folder_properties_show(GtkWindow *parent, CamelFolder *folder, const char *ur if (folder == NULL) mail_get_folder(uri, 0, emfp_dialog_got_folder, NULL, mail_msg_unordered_push); else - emfp_dialog_got_folder((char *)uri, folder, NULL); + emfp_dialog_got_folder((gchar *)uri, folder, NULL); } diff --git a/mail/em-folder-properties.h b/mail/em-folder-properties.h index cd58a9eeb4..cdaec27e4d 100644 --- a/mail/em-folder-properties.h +++ b/mail/em-folder-properties.h @@ -32,7 +32,7 @@ extern "C" { struct _CamelFolder; struct _GtkWindow; -void em_folder_properties_show(struct _GtkWindow *parent, struct _CamelFolder *folder, const char *uri); +void em_folder_properties_show(struct _GtkWindow *parent, struct _CamelFolder *folder, const gchar *uri); #ifdef __cplusplus } diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c index ce97dcb85d..a3a206fdcc 100644 --- a/mail/em-folder-selection-button.c +++ b/mail/em-folder-selection-button.c @@ -51,11 +51,11 @@ struct _EMFolderSelectionButtonPrivate { GtkWidget *selector; - char *uri; /* for single-select mode */ + gchar *uri; /* for single-select mode */ GList *uris; /* for multi-select mode */ - char *title; - char *caption; + gchar *title; + gchar *caption; gboolean multiple_select; }; @@ -124,13 +124,13 @@ static void set_contents (EMFolderSelectionButton *button) { struct _EMFolderSelectionButtonPrivate *priv = button->priv; - char *folder_name = em_utils_folder_name_from_uri (priv->uri); + gchar *folder_name = em_utils_folder_name_from_uri (priv->uri); if (folder_name) { EAccount *account = mail_config_get_account_by_source_url (priv->uri); if (account) { - char *tmp = folder_name; + gchar *tmp = folder_name; folder_name = g_strdup_printf ("%s/%s", e_account_get_string (account, E_ACCOUNT_NAME), _(folder_name)); g_free (tmp); gtk_label_set_text (GTK_LABEL (priv->label), folder_name); @@ -203,7 +203,7 @@ em_folder_selection_button_finalize (GObject *obj) } static void -emfsb_selector_response (EMFolderSelector *emfs, int response, EMFolderSelectionButton *button) +emfsb_selector_response (EMFolderSelector *emfs, gint response, EMFolderSelectionButton *button) { if (response == GTK_RESPONSE_OK) { if (button->priv->multiple_select) { @@ -212,7 +212,7 @@ emfsb_selector_response (EMFolderSelector *emfs, int response, EMFolderSelection em_folder_selection_button_set_selection_mult (button, uris); g_signal_emit (button, signals[SELECTED], 0); } else { - const char *uri = em_folder_selector_get_selected_uri (emfs); + const gchar *uri = em_folder_selector_get_selected_uri (emfs); em_folder_selection_button_set_selection (button, uri); g_signal_emit (button, signals[SELECTED], 0); @@ -255,7 +255,7 @@ em_folder_selection_button_clicked (GtkButton *button) } GtkWidget * -em_folder_selection_button_new (const char *title, const char *caption) +em_folder_selection_button_new (const gchar *title, const gchar *caption) { EMFolderSelectionButton *button = g_object_new (EM_TYPE_FOLDER_SELECTION_BUTTON, NULL); @@ -266,7 +266,7 @@ em_folder_selection_button_new (const char *title, const char *caption) } void -em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri) +em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const gchar *uri) { struct _EMFolderSelectionButtonPrivate *priv = button->priv; @@ -280,7 +280,7 @@ em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const set_contents (button); } -const char * +const gchar * em_folder_selection_button_get_selection (EMFolderSelectionButton *button) { g_return_val_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button), NULL); @@ -292,7 +292,7 @@ void em_folder_selection_button_set_selection_mult (EMFolderSelectionButton *button, GList *uris) { struct _EMFolderSelectionButtonPrivate *priv = button->priv; - char *caption, *tmp, *tmp2; + gchar *caption, *tmp, *tmp2; g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button)); diff --git a/mail/em-folder-selection-button.h b/mail/em-folder-selection-button.h index c0ab32f88e..7b2a1b471d 100644 --- a/mail/em-folder-selection-button.h +++ b/mail/em-folder-selection-button.h @@ -57,10 +57,10 @@ struct _EMFolderSelectionButtonClass { GType em_folder_selection_button_get_type (void); -GtkWidget *em_folder_selection_button_new (const char *title, const char *caption); +GtkWidget *em_folder_selection_button_new (const gchar *title, const gchar *caption); -void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri); -const char *em_folder_selection_button_get_selection (EMFolderSelectionButton *button); +void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const gchar *uri); +const gchar *em_folder_selection_button_get_selection (EMFolderSelectionButton *button); void em_folder_selection_button_set_selection_mult (EMFolderSelectionButton *button, GList *uris); GList *em_folder_selection_button_get_selection_mult (EMFolderSelectionButton *button); diff --git a/mail/em-folder-selection.c b/mail/em-folder-selection.c index cfb244c2eb..8fe6292e32 100644 --- a/mail/em-folder-selection.c +++ b/mail/em-folder-selection.c @@ -37,15 +37,15 @@ /* TODO: rmeove this file, it could just go on em-folder-selection or em-utils */ struct _select_folder_data { - void (*done) (const char *uri, void *data); - void *data; + void (*done) (const gchar *uri, gpointer data); + gpointer data; }; static void -emfs_selector_response(EMFolderSelector *emfs, int response, struct _select_folder_data *d) +emfs_selector_response(EMFolderSelector *emfs, gint response, struct _select_folder_data *d) { if (response == GTK_RESPONSE_OK) { - const char *uri = em_folder_selector_get_selected_uri(emfs); + const gchar *uri = em_folder_selector_get_selected_uri(emfs); d->done(uri, d->data); } @@ -54,9 +54,9 @@ emfs_selector_response(EMFolderSelector *emfs, int response, struct _select_fold } void -em_select_folder (GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri, +em_select_folder (GtkWindow *parent_window, const gchar *title, const gchar *oklabel, const gchar *default_uri, EMFTExcludeFunc exclude, - void (*done) (const char *uri, void *user_data), void *user_data) + void (*done) (const gchar *uri, gpointer user_data), gpointer user_data) { struct _select_folder_data *d; EMFolderTreeModel *model; diff --git a/mail/em-folder-selection.h b/mail/em-folder-selection.h index 25c35d254b..098fa2b227 100644 --- a/mail/em-folder-selection.h +++ b/mail/em-folder-selection.h @@ -33,10 +33,10 @@ extern "C" { struct _GtkWindow; -void em_select_folder (struct _GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri, +void em_select_folder (struct _GtkWindow *parent_window, const gchar *title, const gchar *oklabel, const gchar *default_uri, EMFTExcludeFunc exclude, - void (*done)(const char *uri, void *data), - void *data); + void (*done)(const gchar *uri, gpointer data), + gpointer data); #ifdef __cplusplus } diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c index ae6a8965a4..7a4f389482 100644 --- a/mail/em-folder-selector.c +++ b/mail/em-folder-selector.c @@ -126,7 +126,7 @@ em_folder_selector_finalize (GObject *obj) } static void -emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs) +emfs_response (GtkWidget *dialog, gint response, EMFolderSelector *emfs) { if (response != EM_FOLDER_SELECTOR_RESPONSE_NEW) return; @@ -140,8 +140,8 @@ emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs) static void emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs) { - char *path; - const char *text = NULL; + gchar *path; + const gchar *text = NULL; gboolean active; if (emfs->name_entry->text_length > 0) @@ -155,7 +155,7 @@ emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs) } static void -folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderSelector *emfs) +folder_selected_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, guint32 flags, EMFolderSelector *emfs) { if (emfs->name_entry) emfs_create_name_changed (emfs->name_entry, emfs); @@ -164,13 +164,13 @@ folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint } static void -folder_activated_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderSelector *emfs) +folder_activated_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, EMFolderSelector *emfs) { gtk_dialog_response ((GtkDialog *) emfs, GTK_RESPONSE_OK); } void -em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel) +em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel) { GtkWidget *label; @@ -213,7 +213,7 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3 } GtkWidget * -em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel) +em_folder_selector_new (EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel) { EMFolderSelector *emfs; @@ -228,8 +228,8 @@ static void emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs) { if (emfs->name_entry->text_length > 0) { - char *path; - const char *text; + gchar *path; + const gchar *text; text = gtk_entry_get_text (emfs->name_entry); path = em_folder_tree_get_selected_uri(emfs->emft); @@ -241,7 +241,7 @@ emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs) } GtkWidget * -em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text) +em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text) { EMFolderSelector *emfs; GtkWidget *hbox, *w; @@ -273,7 +273,7 @@ em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *ti void -em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri) +em_folder_selector_set_selected (EMFolderSelector *emfs, const gchar *uri) { em_folder_tree_set_selected (emfs->emft, uri, FALSE); } @@ -284,11 +284,11 @@ em_folder_selector_set_selected_list (EMFolderSelector *emfs, GList *list) em_folder_tree_set_selected_list (emfs->emft, list, FALSE); } -const char * +const gchar * em_folder_selector_get_selected_uri (EMFolderSelector *emfs) { - char *uri; - const char *name; + gchar *uri; + const gchar *name; if (!(uri = em_folder_tree_get_selected_uri (emfs->emft))) { d(printf ("no selected folder?\n")); @@ -298,7 +298,7 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs) if (uri && emfs->name_entry) { CamelProvider *provider; CamelURL *url; - char *newpath; + gchar *newpath; provider = camel_provider_get(uri, NULL); @@ -313,7 +313,7 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs) camel_url_set_fragment (url, newpath); } else { - char *path; + gchar *path; path = g_strdup_printf("%s/%s", (url->path == NULL || strcmp(url->path, "/") == 0) ? "":url->path, name); camel_url_set_path(url, path); @@ -349,10 +349,10 @@ em_folder_selector_get_selected_paths (EMFolderSelector *emfs) return em_folder_tree_get_selected_paths (emfs->emft); } -const char * +const gchar * em_folder_selector_get_selected_path (EMFolderSelector *emfs) { - char *uri, *path; + gchar *uri, *path; if (emfs->selected_path) { /* already did the work in a previous call */ @@ -367,8 +367,8 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs) path = em_folder_tree_get_selected_path(emfs->emft); if (emfs->name_entry) { - const char *name; - char *newpath; + const gchar *name; + gchar *newpath; name = gtk_entry_get_text (emfs->name_entry); newpath = g_strdup_printf ("%s/%s", path?path:"", name); diff --git a/mail/em-folder-selector.h b/mail/em-folder-selector.h index 12662ae5f7..5ac7152d61 100644 --- a/mail/em-folder-selector.h +++ b/mail/em-folder-selector.h @@ -48,10 +48,10 @@ struct _EMFolderSelector { struct _EMFolderTree *emft; struct _GtkEntry *name_entry; - char *selected_path; - char *selected_uri; + gchar *selected_path; + gchar *selected_uri; - char *created_uri; + gchar *created_uri; guint created_id; }; @@ -70,19 +70,19 @@ enum { GType em_folder_selector_get_type (void); -void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel); +void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel); /* for selecting folders */ -GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel); +GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel); /* for creating folders */ -GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text); +GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text); -void em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri); +void em_folder_selector_set_selected (EMFolderSelector *emfs, const gchar *uri); void em_folder_selector_set_selected_list (EMFolderSelector *emfs, GList *list); -const char *em_folder_selector_get_selected_uri (EMFolderSelector *emfs); -const char *em_folder_selector_get_selected_path (EMFolderSelector *emfs); +const gchar *em_folder_selector_get_selected_uri (EMFolderSelector *emfs); +const gchar *em_folder_selector_get_selected_path (EMFolderSelector *emfs); GList *em_folder_selector_get_selected_uris (EMFolderSelector *emfs); GList *em_folder_selector_get_selected_paths (EMFolderSelector *emfs); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index d90bcbbacb..2fedce05b3 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -188,11 +188,11 @@ em_folder_tree_model_class_init (EMFolderTreeModelClass *klass) static int sort_cb (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) { - char *aname, *bname; + gchar *aname, *bname; CamelStore *store; gboolean is_store; guint32 aflags, bflags; - int rv = -2; + gint rv = -2; gtk_tree_model_get (model, a, COL_BOOL_IS_STORE, &is_store, COL_POINTER_CAMEL_STORE, &store, @@ -336,7 +336,7 @@ tree_sortable_iface_init (GtkTreeSortableIface *iface) static void -em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename) +em_folder_tree_model_load_state (EMFolderTreeModel *model, const gchar *filename) { xmlNodePtr root, node; @@ -345,7 +345,7 @@ em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename) if ((model->state = e_xml_parse_file (filename)) != NULL) { node = xmlDocGetRootElement (model->state); - if (!node || strcmp ((char *)node->name, "tree-state") != 0) { + if (!node || strcmp ((gchar *)node->name, "tree-state") != 0) { /* it is not expected XML file, thus free it and use the default */ xmlFreeDoc (model->state); } else @@ -353,25 +353,25 @@ em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename) } /* setup some defaults - expand "Local Folders" and "Search Folders" */ - model->state = xmlNewDoc ((const unsigned char *)"1.0"); - root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL); + model->state = xmlNewDoc ((const guchar *)"1.0"); + root = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL); xmlDocSetRootElement (model->state, root); - node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL); - xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"local"); - xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true"); + node = xmlNewChild (root, NULL, (const guchar *)"node", NULL); + xmlSetProp (node, (const guchar *)"name", (const guchar *)"local"); + xmlSetProp (node, (const guchar *)"expand", (const guchar *)"true"); - node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL); - xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"vfolder"); - xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true"); + node = xmlNewChild (root, NULL, (const guchar *)"node", NULL); + xmlSetProp (node, (const guchar *)"name", (const guchar *)"vfolder"); + xmlSetProp (node, (const guchar *)"expand", (const guchar *)"true"); } EMFolderTreeModel * -em_folder_tree_model_new (const char *evolution_dir) +em_folder_tree_model_new (const gchar *evolution_dir) { EMFolderTreeModel *model; - char *filename; + gchar *filename; model = g_object_new (EM_TYPE_FOLDER_TREE_MODEL, NULL); gtk_tree_store_set_column_types ((GtkTreeStore *) model, NUM_COLUMNS, col_types); @@ -395,7 +395,7 @@ account_changed (EAccountList *accounts, EAccount *account, gpointer user_data) CamelProvider *provider; CamelStore *store; CamelException ex; - char *uri; + gchar *uri; if (!(si = g_hash_table_lookup (model->account_hash, account))) return; @@ -440,17 +440,17 @@ account_removed (EAccountList *accounts, EAccount *account, gpointer user_data) void em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter, struct _EMFolderTreeModelStoreInfo *si, - CamelFolderInfo *fi, int fully_loaded) + CamelFolderInfo *fi, gint fully_loaded) { GtkTreeRowReference *uri_row, *path_row; GtkTreeStore *tree_store; - unsigned int unread; + guint unread; GtkTreePath *path; GtkTreeIter sub; gboolean load = FALSE; struct _CamelFolder *folder; gboolean emitted = FALSE; - const char *name; + const gchar *name; const gchar *icon_name; guint32 flags; @@ -477,10 +477,10 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite unread = fi->unread; if (mail_note_get_folder_from_uri(fi->uri, &folder) && folder) { if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) { - int total; + gint total; if ((total = camel_folder_get_message_count (folder)) > 0) { - int deleted = camel_folder_get_deleted_message_count (folder); + gint deleted = camel_folder_get_deleted_message_count (folder); if (deleted != -1) total -= deleted; @@ -489,10 +489,10 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite unread = total > 0 ? total : 0; } if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) { - int total; + gint total; if ((total = camel_folder_get_message_count (folder)) > 0) { - int deleted = camel_folder_get_deleted_message_count (folder); + gint deleted = camel_folder_get_deleted_message_count (folder); if (deleted != -1) total -= deleted; @@ -599,7 +599,7 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo GtkTreeIter parent, iter; GtkTreePath *path; gboolean load; - char *dirname, *p; + gchar *dirname, *p; if (!(si = g_hash_table_lookup (model->store_hash, store))) goto done; @@ -653,7 +653,7 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo } static void -folder_subscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model) +folder_subscribed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model) { CamelFolderInfo *fi; @@ -691,7 +691,7 @@ folder_unsubscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel * } static void -folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model) +folder_unsubscribed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model) { CamelFolderInfo *fi; @@ -701,7 +701,7 @@ folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel * } static void -folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model) +folder_created_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model) { CamelFolderInfo *fi; @@ -715,7 +715,7 @@ folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model } static void -folder_deleted_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model) +folder_deleted_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model) { CamelFolderInfo *fi; @@ -735,7 +735,7 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod GtkTreeRowReference *row; GtkTreeIter root, iter; GtkTreePath *path; - char *parent, *p; + gchar *parent, *p; if (!(si = g_hash_table_lookup (model->store_hash, store))) goto done; @@ -793,7 +793,7 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod } static void -folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model) +folder_renamed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model) { CamelRenameInfo *rinfo, *info = event_data; @@ -807,14 +807,14 @@ folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model } void -em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name) +em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const gchar *display_name) { struct _EMFolderTreeModelStoreInfo *si; GtkTreeRowReference *row; GtkTreeIter root, iter; GtkTreePath *path; EAccount *account; - char *uri; + gchar *uri; g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model)); g_return_if_fail (CAMEL_IS_STORE (store)); @@ -881,7 +881,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con } static void -em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const char *uri) +em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const gchar *uri) { g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model)); g_return_if_fail (uri != NULL); @@ -910,7 +910,7 @@ em_folder_tree_model_remove_store_info (EMFolderTreeModel *model, CamelStore *st void em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si, GtkTreeIter *toplevel) { - char *uri, *full_name; + gchar *uri, *full_name; gboolean is_store, go; GtkTreeIter iter; @@ -967,15 +967,15 @@ em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store) static xmlNodePtr -find_xml_node (xmlNodePtr root, const char *name) +find_xml_node (xmlNodePtr root, const gchar *name) { xmlNodePtr node; - char *nname; + gchar *nname; node = root->children; while (node != NULL) { - if (!strcmp ((char *)node->name, "node")) { - nname = (char *)xmlGetProp (node, (const unsigned char *)"name"); + if (!strcmp ((gchar *)node->name, "node")) { + nname = (gchar *)xmlGetProp (node, (const guchar *)"name"); if (nname && !strcmp (nname, name)) { xmlFree (nname); return node; @@ -991,18 +991,18 @@ find_xml_node (xmlNodePtr root, const char *name) } gboolean -em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key) +em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const gchar *key) { xmlNodePtr node; - const char *name; - char *buf, *p; + const gchar *name; + gchar *buf, *p; /* This code needs to be rewritten. First it doesn't belong on the model Second, it shouldn't use an xml tree to store a bit table in memory! */ node = model->state ? model->state->children : NULL; - if (!node || strcmp ((char *)node->name, "tree-state") != 0) + if (!node || strcmp ((gchar *)node->name, "tree-state") != 0) return FALSE; name = buf = g_alloca (strlen (key) + 1); @@ -1018,8 +1018,8 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key) if ((node = find_xml_node (node, name))) { gboolean expanded; - buf = (char *)xmlGetProp (node, (const unsigned char *)"expand"); - expanded = buf && !strcmp ((char *)buf, "true"); + buf = (gchar *)xmlGetProp (node, (const guchar *)"expand"); + expanded = buf && !strcmp ((gchar *)buf, "true"); xmlFree (buf); if (!expanded || p == NULL) @@ -1034,17 +1034,17 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key) void -em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded) +em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const gchar *key, gboolean expanded) { xmlNodePtr node, parent; - const char *name; - char *buf, *p; + const gchar *name; + gchar *buf, *p; if (model->state == NULL) - model->state = xmlNewDoc ((const unsigned char *)"1.0"); + model->state = xmlNewDoc ((const guchar *)"1.0"); if (!model->state->children) { - node = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL); + node = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL); xmlDocSetRootElement (model->state, node); } else { node = model->state->children; @@ -1068,11 +1068,11 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb } /* node (or parent node) doesn't exist, need to add it */ - node = xmlNewChild (parent, NULL, (const unsigned char *)"node", NULL); - xmlSetProp (node, (const unsigned char *)"name", (unsigned char *)name); + node = xmlNewChild (parent, NULL, (const guchar *)"node", NULL); + xmlSetProp (node, (const guchar *)"name", (guchar *)name); } - xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)(expanded || p ? "true" : "false")); + xmlSetProp (node, (const guchar *)"expand", (const guchar *)(expanded || p ? "true" : "false")); name = p ? p + 1 : NULL; } while (name); @@ -1085,7 +1085,7 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb * @return Key of the uri or NULL, if failed. Returned value should be clear by g_free. **/ static gchar * -emftm_uri_to_key (const char *uri) +emftm_uri_to_key (const gchar *uri) { CamelException ex = { 0 }; CamelStore *store; @@ -1103,7 +1103,7 @@ emftm_uri_to_key (const char *uri) if (store == NULL || url == NULL) { key = NULL; } else { - const char *path; + const gchar *path; EAccount *account; if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) @@ -1136,7 +1136,7 @@ emftm_uri_to_key (const char *uri) * Same as @ref em_folder_tree_model_get_expanded, but here we use uri, not key for node. **/ gboolean -em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri) +em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const gchar *uri) { gchar *key; gboolean expanded; @@ -1157,7 +1157,7 @@ em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri * Same as @ref em_folder_tree_model_set_expanded, but here we use uri, not key for node. **/ void -em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri, gboolean expanded) +em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const gchar *uri, gboolean expanded) { gchar *key; @@ -1174,7 +1174,7 @@ em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri void em_folder_tree_model_save_state (EMFolderTreeModel *model) { - char *dirname; + gchar *dirname; if (model->state == NULL) return; @@ -1192,17 +1192,17 @@ em_folder_tree_model_save_state (EMFolderTreeModel *model) static void -expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirname, EMFTModelExpandFunc func, void *user_data) +expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const gchar *dirname, EMFTModelExpandFunc func, gpointer user_data) { xmlNodePtr node = parent->children; - char *path, *name, *expand; + gchar *path, *name, *expand; while (node != NULL) { - if (!strcmp ((char *)node->name, "node")) { - name = (char *)xmlGetProp (node, (const unsigned char *)"name"); - expand = (char *)xmlGetProp (node, (const unsigned char *)"expand"); + if (!strcmp ((gchar *)node->name, "node")) { + name = (gchar *)xmlGetProp (node, (const guchar *)"name"); + expand = (gchar *)xmlGetProp (node, (const guchar *)"expand"); - if (expand && name && !strcmp ((char *)expand, "true")) { + if (expand && name && !strcmp ((gchar *)expand, "true")) { if (dirname) path = g_strdup_printf ("%s/%s", dirname, name); else @@ -1223,19 +1223,19 @@ expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirna } void -em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data) +em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, gpointer user_data) { xmlNodePtr root; root = model->state ? model->state->children : NULL; - if (!root || !root->children || strcmp ((char *)root->name, "tree-state") != 0) + if (!root || !root->children || strcmp ((gchar *)root->name, "tree-state") != 0) return; expand_foreach_r (model, root, NULL, func, user_data); } gboolean -em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const char *full) +em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const gchar *full) { struct _EMFolderTreeModelStoreInfo *si; GtkTreeRowReference *row; @@ -1275,14 +1275,14 @@ em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, return FALSE; } -char * -em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const char *full) +gchar * +em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const gchar *full) { struct _EMFolderTreeModelStoreInfo *si; GtkTreeRowReference *row; GtkTreePath *tree_path; GtkTreeIter iter; - char *name = NULL; + gchar *name = NULL; g_return_val_if_fail (EM_IS_FOLDER_TREE_MODEL (model), FALSE); g_return_val_if_fail (CAMEL_IS_STORE (store), FALSE); @@ -1312,7 +1312,7 @@ em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *stor } void -em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const char *full, int unread) +em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const gchar *full, gint unread) { struct _EMFolderTreeModelStoreInfo *si; GtkTreeRowReference *row; @@ -1353,19 +1353,19 @@ em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *sto } -char * +gchar * em_folder_tree_model_get_selected (EMFolderTreeModel *model) { xmlNodePtr node; - char *buf, *uri; + gchar *buf, *uri; node = model->state ? model->state->children : NULL; - if (!node || strcmp ((char *)node->name, "tree-state") != 0) + if (!node || strcmp ((gchar *)node->name, "tree-state") != 0) return NULL; node = node->children; while (node != NULL) { - if (!strcmp ((char *)node->name, "selected")) + if (!strcmp ((gchar *)node->name, "selected")) break; node = node->next; } @@ -1373,7 +1373,7 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model) if (node == NULL) return NULL; - buf = (char *)xmlGetProp (node, (unsigned char *)"uri"); + buf = (gchar *)xmlGetProp (node, (guchar *)"uri"); uri = g_strdup (buf); xmlFree (buf); @@ -1386,15 +1386,15 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model) void -em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri) +em_folder_tree_model_set_selected (EMFolderTreeModel *model, const gchar *uri) { xmlNodePtr root, node; if (model->state == NULL) - model->state = xmlNewDoc ((unsigned char *)"1.0"); + model->state = xmlNewDoc ((guchar *)"1.0"); if (!model->state->children) { - root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL); + root = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL); xmlDocSetRootElement (model->state, root); } else { root = model->state->children; @@ -1402,13 +1402,13 @@ em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri) node = root->children; while (node != NULL) { - if (!strcmp ((char *)node->name, "selected")) + if (!strcmp ((gchar *)node->name, "selected")) break; node = node->next; } if (node == NULL) - node = xmlNewChild (root, NULL, (const unsigned char *)"selected", NULL); + node = xmlNewChild (root, NULL, (const guchar *)"selected", NULL); - xmlSetProp (node, (const unsigned char *)"uri", (unsigned char *)uri); + xmlSetProp (node, (const guchar *)"uri", (guchar *)uri); } diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h index 706e3895b3..3748da79a0 100644 --- a/mail/em-folder-tree-model.h +++ b/mail/em-folder-tree-model.h @@ -71,19 +71,19 @@ struct _EMFolderTreeModelStoreInfo { GHashTable *full_hash; /* maps CamelFolderInfo::full_name's to GtkTreeRowReferences */ EAccount *account; - char *display_name; + gchar *display_name; - unsigned int created_id; - unsigned int deleted_id; - unsigned int renamed_id; - unsigned int subscribed_id; - unsigned int unsubscribed_id; + guint created_id; + guint deleted_id; + guint renamed_id; + guint subscribed_id; + guint unsubscribed_id; }; struct _EMFolderTreeModel { GtkTreeStore parent_object; - char *filename; /* state filename */ + gchar *filename; /* state filename */ xmlDocPtr state; /* saved expanded state from previous session */ GHashTable *store_hash; /* maps CamelStore's to store-info's */ @@ -108,46 +108,46 @@ struct _EMFolderTreeModelClass { GtkTreeIter *iter); void (* folder_added) (EMFolderTreeModel *model, - const char *path, - const char *uri); + const gchar *path, + const gchar *uri); void (* store_added) (EMFolderTreeModel *model, - const char *uri); + const gchar *uri); }; GType em_folder_tree_model_get_type (void); -EMFolderTreeModel *em_folder_tree_model_new (const char *evolution_dir); +EMFolderTreeModel *em_folder_tree_model_new (const gchar *evolution_dir); void em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter, struct _EMFolderTreeModelStoreInfo *si, - CamelFolderInfo *fi, int fully_loaded); + CamelFolderInfo *fi, gint fully_loaded); -void em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name); +void em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const gchar *display_name); void em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store); void em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si, GtkTreeIter *toplevel); -char *em_folder_tree_model_get_selected (EMFolderTreeModel *model); -void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri); +gchar *em_folder_tree_model_get_selected (EMFolderTreeModel *model); +void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const gchar *uri); -gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key); -void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded); +gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const gchar *key); +void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const gchar *key, gboolean expanded); -gboolean em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri); -void em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri, gboolean expanded); +gboolean em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const gchar *uri); +void em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const gchar *uri, gboolean expanded); void em_folder_tree_model_save_state (EMFolderTreeModel *model); -typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const char *path, void *user_data); -void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data); +typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const gchar *path, gpointer user_data); +void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, gpointer user_data); -void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const char *path, int unread); -gboolean em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const char *full); -char * em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const char *full); +void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const gchar *path, gint unread); +gboolean em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const gchar *full); +gchar * em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const gchar *full); #ifdef __cplusplus } diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 77e62dfbcf..3d1a8564f2 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -76,10 +76,10 @@ #define d(x) struct _selected_uri { - char *key; /* store:path or account/path */ - char *uri; + gchar *key; /* store:path or account/path */ + gchar *uri; CamelStore *store; - char *path; + gchar *path; }; struct _EMFolderTreePrivate { @@ -90,8 +90,8 @@ struct _EMFolderTreePrivate { GHashTable *select_uris_table; /*Removed as they're encountered, so use this to find uri's not presnet but selected */ guint32 excluded; - gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data); - void *excluded_data; + gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, gpointer data); + gpointer excluded_data; guint do_multiselect:1; /* multiple select mode */ guint cursor_set:1; /* set to TRUE means we or something @@ -244,7 +244,7 @@ em_folder_tree_class_init (EMFolderTreeClass *klass) static gboolean subdirs_contain_unread (GtkTreeModel *model, GtkTreeIter *root) { - unsigned int unread; + guint unread; GtkTreeIter iter; if (!gtk_tree_model_iter_children (model, &iter, root)) @@ -268,9 +268,9 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { gboolean is_store, bold; - unsigned int unread; - char *display; - char *name; + guint unread; + gchar *display; + gchar *name; gtk_tree_model_get (model, iter, COL_STRING_DISPLAY_NAME, &name, COL_BOOL_IS_STORE, &is_store, @@ -335,7 +335,7 @@ emft_select_func(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath * } static void -emft_free_select_uri(void *v, void *data) +emft_free_select_uri(gpointer v, gpointer data) { struct _selected_uri *u = v; @@ -522,11 +522,11 @@ emft_select_uri(EMFolderTree *emft, GtkTreePath *path, struct _selected_uri *u) gtk_tree_view_scroll_to_cell (priv->treeview, path, NULL, TRUE, 0.8f, 0.0f); g_hash_table_remove(priv->select_uris_table, u->key); priv->select_uris = g_slist_remove(priv->select_uris, u); - emft_free_select_uri((void *)u, NULL); + emft_free_select_uri((gpointer)u, NULL); } static void -emft_expand_node (EMFolderTreeModel *model, const char *key, EMFolderTree *emft) +emft_expand_node (EMFolderTreeModel *model, const gchar *key, EMFolderTree *emft) { struct _EMFolderTreePrivate *priv = emft->priv; struct _EMFolderTreeModelStoreInfo *si; @@ -534,8 +534,8 @@ emft_expand_node (EMFolderTreeModel *model, const char *key, EMFolderTree *emft) GtkTreePath *path; EAccount *account; CamelStore *store; - const char *p; - char *uid; + const gchar *p; + gchar *uid; size_t n; struct _selected_uri *u; @@ -602,8 +602,8 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree gboolean is_store; CamelStore *store; EAccount *account; - char *full_name; - char *key; + gchar *full_name; + gchar *key; struct _selected_uri *u; gboolean is_expanded; @@ -631,7 +631,7 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree gtk_tree_view_expand_to_path (priv->treeview, tree_path); gtk_tree_view_expand_row (priv->treeview, tree_path, FALSE); } else { - char *c = strrchr (key, '/'); + gchar *c = strrchr (key, '/'); *c = '\0'; emft_expand_node (model, key, emft); @@ -690,7 +690,7 @@ static void tree_drag_data_delete(GtkWidget *widget, GdkDragContext *context, EMFolderTree *emft) { struct _EMFolderTreePrivate *priv = emft->priv; - char *full_name = NULL; + gchar *full_name = NULL; GtkTreePath *src_path; gboolean is_store; CamelStore *store; @@ -724,7 +724,7 @@ static void tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft) { struct _EMFolderTreePrivate *priv = emft->priv; - char *full_name = NULL, *uri = NULL; + gchar *full_name = NULL, *uri = NULL; GtkTreePath *src_path; CamelFolder *folder; CamelStore *store; @@ -751,7 +751,7 @@ tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData switch (info) { case DND_DRAG_TYPE_FOLDER: /* dragging to a new location in the folder tree */ - gtk_selection_data_set(selection, drag_atoms[info], 8, (unsigned char *)uri, strlen (uri) + 1); + gtk_selection_data_set(selection, drag_atoms[info], 8, (guchar *)uri, strlen (uri) + 1); break; case DND_DRAG_TYPE_TEXT_URI_LIST: /* dragging to nautilus or something, probably */ @@ -787,13 +787,13 @@ struct _DragDataReceivedAsync { GtkSelectionData *selection; CamelStore *store; - char *full_name; + gchar *full_name; guint32 action; guint info; - unsigned int move:1; - unsigned int moved:1; - unsigned int aborted:1; + guint move:1; + guint moved:1; + guint aborted:1; }; static void @@ -803,7 +803,7 @@ emft_drop_folder(struct _DragDataReceivedAsync *m) d(printf(" * Drop folder '%s' onto '%s'\n", m->selection->data, m->full_name)); - if (!(src = mail_tool_uri_to_folder((char *)m->selection->data, 0, &m->base.ex))) + if (!(src = mail_tool_uri_to_folder((gchar *)m->selection->data, 0, &m->base.ex))) return; em_folder_utils_copy_folders(src->parent_store, src->full_name, m->store, m->full_name?m->full_name:"", m->move); @@ -814,10 +814,10 @@ static gchar * emft_drop_async__desc (struct _DragDataReceivedAsync *m) { CamelURL *url; - char *buf; + gchar *buf; if (m->info == DND_DROP_TYPE_FOLDER) { - url = camel_url_new ((char *)m->selection->data, NULL); + url = camel_url_new ((gchar *)m->selection->data, NULL); if (m->move) buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1); @@ -896,7 +896,7 @@ tree_drag_data_action(struct _DragDataReceivedAsync *m) } static void -emft_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data) +emft_drop_popup_copy(EPopup *ep, EPopupItem *item, gpointer data) { struct _DragDataReceivedAsync *m = data; @@ -905,7 +905,7 @@ emft_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data) } static void -emft_drop_popup_move(EPopup *ep, EPopupItem *item, void *data) +emft_drop_popup_move(EPopup *ep, EPopupItem *item, gpointer data) { struct _DragDataReceivedAsync *m = data; @@ -914,7 +914,7 @@ emft_drop_popup_move(EPopup *ep, EPopupItem *item, void *data) } static void -emft_drop_popup_cancel(EPopup *ep, EPopupItem *item, void *data) +emft_drop_popup_cancel(EPopup *ep, EPopupItem *item, gpointer data) { struct _DragDataReceivedAsync *m = data; @@ -932,13 +932,13 @@ static EPopupItem emft_drop_popup_menu[] = { }; static void -emft_drop_popup_free(EPopup *ep, GSList *items, void *data) +emft_drop_popup_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } static void -tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft) +tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft) { struct _EMFolderTreePrivate *priv = emft->priv; GtkTreeViewDropPosition pos; @@ -947,8 +947,8 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y gboolean is_store; CamelStore *store; GtkTreeIter iter; - char *full_name; - int i; + gchar *full_name; + gint i; if (!gtk_tree_view_get_dest_row_at_pos (priv->treeview, x, y, &dest_path, &pos)) return; @@ -992,7 +992,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y if (context->action == GDK_ACTION_ASK) { EMPopup *emp; - int mask; + gint mask; GSList *menus = NULL; GtkMenu *menu; @@ -1017,7 +1017,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y } static gboolean -is_special_local_folder (const char *name) +is_special_local_folder (const gchar *name) { return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates")); } @@ -1026,7 +1026,7 @@ static GdkAtom emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path) { struct _EMFolderTreePrivate *p = emft->priv; - char *full_name = NULL, *uri = NULL, *src_uri = NULL; + gchar *full_name = NULL, *uri = NULL, *src_uri = NULL; CamelStore *local, *sstore, *dstore; GdkAtom atom = GDK_NONE; gboolean is_store; @@ -1109,7 +1109,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path) /* Check for special sources, and vfolder stuff */ if (src_uri) { CamelURL *url; - char *url_path; + gchar *url_path; /* FIXME: this is a total hack, but i think all we can do at present */ /* Check for dragging from special folders which can't be moved/copied */ @@ -1196,7 +1196,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path) targets = targets->next; } } else { - int i; + gint i; while (targets != NULL) { for (i = 0; i < NUM_DROP_TYPES; i++) { @@ -1219,11 +1219,11 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path) } static gboolean -tree_drag_drop (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft) +tree_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, EMFolderTree *emft) { struct _EMFolderTreePrivate *priv = emft->priv; GtkTreeViewColumn *column; - int cell_x, cell_y; + gint cell_x, cell_y; GtkTreePath *path; GdkAtom target; @@ -1295,7 +1295,7 @@ tree_autoscroll (EMFolderTree *emft) GtkAdjustment *vadjustment; GdkRectangle rect; GdkWindow *window; - int offset, y; + gint offset, y; float value; /* get the y pointer position relative to the treeview */ @@ -1337,7 +1337,7 @@ tree_autoexpand (EMFolderTree *emft) } static gboolean -tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft) +tree_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, EMFolderTree *emft) { struct _EMFolderTreePrivate *priv = emft->priv; GtkTreeModel *model = (GtkTreeModel *) priv->model; @@ -1346,7 +1346,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin GtkTreePath *path; GtkTreeIter iter; GdkAtom target; - int i; + gint i; if (!gtk_tree_view_get_dest_row_at_pos(priv->treeview, x, y, &path, &pos)) return FALSE; @@ -1415,8 +1415,8 @@ void em_folder_tree_enable_drag_and_drop (EMFolderTree *emft) { struct _EMFolderTreePrivate *priv; - static int setup = 0; - int i; + static gint setup = 0; + gint i; g_return_if_fail (EM_IS_FOLDER_TREE (emft)); @@ -1458,7 +1458,7 @@ void em_folder_tree_set_excluded(EMFolderTree *emft, guint32 flags) emft->priv->excluded = flags; } -void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, void *data) +void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, gpointer data) { emft->priv->excluded_func = exclude; emft->priv->excluded_data = data; @@ -1482,7 +1482,7 @@ em_folder_tree_get_selected_uris (EMFolderTree *emft) GtkTreePath *path = l->data; if (gtk_tree_model_get_iter(model, &iter, path)) { - char *uri; + gchar *uri; gtk_tree_model_get(model, &iter, COL_STRING_URI, &uri, -1); list = g_list_prepend (list, uri); @@ -1498,7 +1498,7 @@ static void get_selected_uris_path_iterate (GtkTreeModel *model, GtkTreePath *treepath, GtkTreeIter *iter, gpointer data) { GList **list = (GList **) data; - char *full_name; + gchar *full_name; gtk_tree_model_get (model, iter, COL_STRING_FULL_NAME, &full_name, -1); *list = g_list_append (*list, full_name); @@ -1532,7 +1532,7 @@ void em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expand_only) { struct _EMFolderTreePrivate *priv = emft->priv; - int id = 0; + gint id = 0; /* FIXME: need to remove any currently selected stuff? */ if (!expand_only) @@ -1555,8 +1555,8 @@ em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expa priv->select_uris = g_slist_append(priv->select_uris, u); } } else { - const char *path; - char *expand_key, *end; + const gchar *path; + gchar *expand_key, *end; EAccount *account; if (((CamelService *)u->store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) @@ -1600,9 +1600,9 @@ em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expa #if 0 static void -dump_fi (CamelFolderInfo *fi, int depth) +dump_fi (CamelFolderInfo *fi, gint depth) { - int i; + gint i; while (fi != NULL) { for (i = 0; i < depth; i++) @@ -1626,7 +1626,7 @@ struct _EMFolderTreeGetFolderInfo { EMFolderTree *emft; CamelStore *store; guint32 flags; - char *top; + gchar *top; /* output data */ CamelFolderInfo *fi; @@ -1635,7 +1635,7 @@ struct _EMFolderTreeGetFolderInfo { static gchar * emft_get_folder_info__desc (struct _EMFolderTreeGetFolderInfo *m) { - char *ret, *name; + gchar *ret, *name; name = camel_service_get_name((CamelService *)m->store, TRUE); ret = g_strdup_printf(_("Scanning folders in \"%s\""), name); @@ -1728,7 +1728,7 @@ emft_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m) return; } } else { - int fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE; + gint fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE; do { em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi, fully_loaded); @@ -1768,8 +1768,8 @@ emft_update_model_expanded_state (struct _EMFolderTreePrivate *priv, GtkTreeIter gboolean is_store; CamelStore *store; EAccount *account; - char *full_name; - char *key; + gchar *full_name; + gchar *key; gtk_tree_model_get ((GtkTreeModel *) priv->model, iter, COL_STRING_FULL_NAME, &full_name, @@ -1800,7 +1800,7 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t struct _EMFolderTreeGetFolderInfo *m; GtkTreeModel *model; CamelStore *store; - char *full_name; + gchar *full_name; gboolean load; model = gtk_tree_view_get_model (treeview); @@ -1859,7 +1859,7 @@ emft_tree_row_activated (GtkTreeView *treeview, GtkTreePath *tree_path, GtkTreeV { struct _EMFolderTreePrivate *priv = emft->priv; GtkTreeModel *model = (GtkTreeModel *) priv->model; - char *full_name, *uri; + gchar *full_name, *uri; GtkTreeIter iter; guint32 flags; @@ -1895,7 +1895,7 @@ emft_popup_open_new (GtkWidget *item, EMFolderTree *emft) #endif static void -emft_popup_copy(EPopup *ep, EPopupItem *item, void *data) +emft_popup_copy(EPopup *ep, EPopupItem *item, gpointer data) { EMFolderTree *emft = data; CamelFolderInfo *fi = NULL; @@ -1906,7 +1906,7 @@ emft_popup_copy(EPopup *ep, EPopupItem *item, void *data) } static void -emft_popup_move(EPopup *ep, EPopupItem *item, void *data) +emft_popup_move(EPopup *ep, EPopupItem *item, gpointer data) { EMFolderTree *emft = data; CamelFolderInfo *fi = NULL; @@ -1917,7 +1917,7 @@ emft_popup_move(EPopup *ep, EPopupItem *item, void *data) } static void -emft_popup_new_folder (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_new_folder (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderTree *emft = data; CamelFolderInfo *fi; @@ -1955,7 +1955,7 @@ emft_selection_get_selected (GtkTreeSelection *selection, GtkTreeModel **model, } static void -emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderTree *emft = data; CamelFolder *folder; @@ -1966,7 +1966,7 @@ emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, void *data) } static void -emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderTree *emft = data; CamelFolder *folder; @@ -1977,7 +1977,7 @@ emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, void *data) } static void -emft_popup_refresh_folder (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_refresh_folder (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderTree *emft = data; CamelFolder *folder; @@ -1987,26 +1987,26 @@ emft_popup_refresh_folder (EPopup *ep, EPopupItem *pitem, void *data) } static void -emft_popup_flush_outbox (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_flush_outbox (EPopup *ep, EPopupItem *pitem, gpointer data) { mail_send (); } static void -emft_popup_empty_trash (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_empty_trash (EPopup *ep, EPopupItem *pitem, gpointer data) { em_utils_empty_trash (data); } static void -emft_popup_properties (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_properties (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderTree *emft = data; struct _EMFolderTreePrivate *priv = emft->priv; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - char *uri; + gchar *uri; selection = gtk_tree_view_get_selection (priv->treeview); if (!emft_selection_get_selected (selection, &model, &iter)) @@ -2018,13 +2018,13 @@ emft_popup_properties (EPopup *ep, EPopupItem *pitem, void *data) } static void -emft_popup_uvfolder (EPopup *ep, EPopupItem *pitem, void *data) +emft_popup_uvfolder (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderTree *emft = data; CamelFolder *folder; if ((folder = em_folder_tree_get_selected_folder (emft)) != NULL) { - char *meta = camel_object_meta_get(folder, "vfolder:unread"); + gchar *meta = camel_object_meta_get(folder, "vfolder:unread"); if (!meta || strcmp(meta, "false") == 0) camel_object_meta_set(folder, "vfolder:unread", "true"); else @@ -2063,7 +2063,7 @@ static EPopupItem emft_popup_items[] = { static EPopupItem trash_popup_item = {E_POPUP_ITEM, (gchar *) "30.emc.05", (gchar *) N_("_Empty Trash"), emft_popup_empty_trash,NULL,NULL, 1, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT}; static void -emft_popup_free(EPopup *ep, GSList *items, void *data) +emft_popup_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } @@ -2082,11 +2082,11 @@ emft_popup (EMFolderTree *emft, GdkEvent *event) guint32 flags = 0; guint32 folder_type_flags = 0; gboolean isstore; - char *uri, *full_name; + gchar *uri, *full_name; GtkMenu *menu; EMPopup *emp; CamelFolder *selfolder = NULL; - int i; + gint i; treeview = emft->priv->treeview; @@ -2154,7 +2154,7 @@ emft_popup (EMFolderTree *emft, GdkEvent *event) if (!isstore && strstr(uri, "vfolder")) { /* This is a vfolder, so lets add hacked up menu item. */ static EPopupItem *item = NULL; - char *meta = camel_object_meta_get (selfolder, "vfolder:unread"); + gchar *meta = camel_object_meta_get (selfolder, "vfolder:unread"); if (!item) item = g_malloc0(sizeof(*item)); @@ -2248,7 +2248,7 @@ emft_tree_user_event (GtkTreeView *treeview, GdkEvent *e, EMFolderTree *emft) static void emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft) { - char *full_name, *uri; + gchar *full_name, *uri; GtkTreeModel *model; GtkTreeIter iter; guint32 flags; @@ -2269,12 +2269,12 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft) } void -em_folder_tree_set_selected (EMFolderTree *emft, const char *uri, gboolean expand_only) +em_folder_tree_set_selected (EMFolderTree *emft, const gchar *uri, gboolean expand_only) { GList *l = NULL; if (uri && uri[0]) - l = g_list_append(l, (void *)uri); + l = g_list_append(l, (gpointer)uri); em_folder_tree_set_selected_list(emft, l, expand_only); g_list_free(l); @@ -2288,7 +2288,7 @@ em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders) GtkTreeModel *model; GtkTreeIter iter, parent, child; GtkTreePath *current_path, *path = NULL; - unsigned int unread = 0; + guint unread = 0; struct _EMFolderTreePrivate *priv = emft->priv; g_return_if_fail (EM_IS_FOLDER_TREE (emft)); @@ -2352,7 +2352,7 @@ get_last_child (GtkTreeModel *model, GtkTreeIter *iter) return get_last_child (model, iter); } else if (has_child) { /* Pick the last one */ - int nchildren = gtk_tree_model_iter_n_children (model, iter); + gint nchildren = gtk_tree_model_iter_n_children (model, iter); gtk_tree_model_iter_nth_child ( model, child, iter, nchildren-1); return get_last_child (model, child); } @@ -2367,7 +2367,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders) GtkTreeModel *model; GtkTreeIter iter, child; GtkTreePath *path = NULL, *current_path = NULL; - unsigned int unread = 0; + guint unread = 0; struct _EMFolderTreePrivate *priv = emft->priv; g_return_if_fail (EM_IS_FOLDER_TREE (emft)); @@ -2391,7 +2391,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders) } else { gtk_tree_model_get_iter (model, &iter, path); if (gtk_tree_model_iter_has_child (model, &iter)) { - int nchildren = gtk_tree_model_iter_n_children (model, &iter); + gint nchildren = gtk_tree_model_iter_n_children (model, &iter); gtk_tree_model_iter_nth_child ( model, &child, &iter, nchildren-1); path = gtk_tree_model_get_path (model, &child); } @@ -2422,13 +2422,13 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders) } -char * +gchar * em_folder_tree_get_selected_uri (EMFolderTree *emft) { GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - char *uri = NULL; + gchar *uri = NULL; g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL); @@ -2439,13 +2439,13 @@ em_folder_tree_get_selected_uri (EMFolderTree *emft) return uri; } -char * +gchar * em_folder_tree_get_selected_path (EMFolderTree *emft) { GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - char *name = NULL; + gchar *name = NULL; g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL); @@ -2462,7 +2462,7 @@ em_folder_tree_get_selected_folder (EMFolderTree *emft) GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - char *full_name = NULL; + gchar *full_name = NULL; CamelException ex; CamelStore *store = NULL; CamelFolder *folder = NULL; @@ -2490,7 +2490,7 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *emft) GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - char *full_name = NULL, *name = NULL, *uri = NULL; + gchar *full_name = NULL, *name = NULL, *uri = NULL; CamelException ex; CamelStore *store = NULL; CamelFolderInfo *fi = NULL; diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h index e76acf4df1..265616a00a 100644 --- a/mail/em-folder-tree.h +++ b/mail/em-folder-tree.h @@ -51,7 +51,7 @@ typedef struct _EMFolderTreeClass EMFolderTreeClass; #define EMFT_EXCLUDE_SYSTEM CAMEL_FOLDER_SYSTEM #define EMFT_EXCLUDE_VTRASH CAMEL_FOLDER_VTRASH -typedef gboolean (*EMFTExcludeFunc)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data); +typedef gboolean (*EMFTExcludeFunc)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, gpointer data); struct _EMFolderTree { GtkVBox parent_object; @@ -63,8 +63,8 @@ struct _EMFolderTreeClass { GtkVBoxClass parent_class; /* signals */ - void (* folder_activated) (EMFolderTree *emft, const char *full_name, const char *uri); - void (* folder_selected) (EMFolderTree *emft, const char *full_name, const char *uri, guint32 flags); + void (* folder_activated) (EMFolderTree *emft, const gchar *full_name, const gchar *uri); + void (* folder_selected) (EMFolderTree *emft, const gchar *full_name, const gchar *uri, guint32 flags); }; GType em_folder_tree_get_type (void); @@ -76,24 +76,24 @@ void em_folder_tree_enable_drag_and_drop (EMFolderTree *emft); void em_folder_tree_set_multiselect (EMFolderTree *emft, gboolean mode); void em_folder_tree_set_excluded(EMFolderTree *emft, guint32 flags); -void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, void *data); +void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, gpointer data); void em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expand_only); GList *em_folder_tree_get_selected_uris (EMFolderTree *emft); GList *em_folder_tree_get_selected_paths (EMFolderTree *emft); -void em_folder_tree_set_selected (EMFolderTree *emft, const char *uri, gboolean expand_only); +void em_folder_tree_set_selected (EMFolderTree *emft, const gchar *uri, gboolean expand_only); void em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders); void em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders); -char *em_folder_tree_get_selected_uri (EMFolderTree *emft); -char *em_folder_tree_get_selected_path (EMFolderTree *emft); +gchar *em_folder_tree_get_selected_uri (EMFolderTree *emft); +gchar *em_folder_tree_get_selected_path (EMFolderTree *emft); CamelFolder *em_folder_tree_get_selected_folder (EMFolderTree *emft); CamelFolderInfo *em_folder_tree_get_selected_folder_info (EMFolderTree *emft); EMFolderTreeModel *em_folder_tree_get_model (EMFolderTree *emft); EMFolderTreeModelStoreInfo *em_folder_tree_get_model_storeinfo (EMFolderTree *emft, CamelStore *store); -gboolean em_folder_tree_create_folder (EMFolderTree *emft, const char *full_name, const char *uri); +gboolean em_folder_tree_create_folder (EMFolderTree *emft, const gchar *full_name, const gchar *uri); GtkWidget * em_folder_tree_get_tree_view (EMFolderTree *emft); void em_folder_tree_set_skip_double_click (EMFolderTree *emft, gboolean skip); diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index ad60516bb1..682ffc77c5 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -75,7 +75,7 @@ extern CamelSession *session; static gboolean -emfu_is_special_local_folder (const char *name) +emfu_is_special_local_folder (const gchar *name) { return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates")); } @@ -87,10 +87,10 @@ struct _EMCopyFolders { CamelStore *fromstore; CamelStore *tostore; - char *frombase; - char *tobase; + gchar *frombase; + gchar *tobase; - int delete; + gint delete; }; static gchar * @@ -106,8 +106,8 @@ emft_copy_folders__exec (struct _EMCopyFolders *m) GList *pending = NULL, *deleting = NULL, *l; GString *fromname, *toname; CamelFolderInfo *fi; - const char *tmp; - int fromlen; + const gchar *tmp; + gint fromlen; if (!(fi = camel_store_get_folder_info (m->fromstore, m->frombase, flags, &m->base.ex))) return; @@ -132,7 +132,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m) while (info) { CamelFolder *fromfolder, *tofolder; GPtrArray *uids; - int deleted = 0; + gint deleted = 0; if (info->child) pending = g_list_append (pending, info->child); @@ -237,11 +237,11 @@ static MailMsgInfo copy_folders_info = { (MailMsgFreeFunc) emft_copy_folders__free }; -int -em_folder_utils_copy_folders(CamelStore *fromstore, const char *frombase, CamelStore *tostore, const char *tobase, int delete) +gint +em_folder_utils_copy_folders(CamelStore *fromstore, const gchar *frombase, CamelStore *tostore, const gchar *tobase, gint delete) { struct _EMCopyFolders *m; - int seq; + gint seq; m = mail_msg_new (©_folders_info); camel_object_ref (fromstore); @@ -264,7 +264,7 @@ struct _copy_folder_data { }; static void -emfu_copy_folder_selected (const char *uri, void *data) +emfu_copy_folder_selected (const gchar *uri, gpointer data) { struct _copy_folder_data *cfd = data; CamelStore *fromstore = NULL, *tostore = NULL; @@ -320,11 +320,11 @@ fail: /* tree here is the 'destination' selector, not 'self' */ static gboolean -emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, void *data) +emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { struct _copy_folder_data *cfd = data; - int fromvfolder, tovfolder; - char *touri; + gint fromvfolder, tovfolder; + gchar *touri; guint flags; gboolean is_store; @@ -351,7 +351,7 @@ emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *i /* FIXME: this interface references the folderinfo without copying it */ /* FIXME: these functions must be documented */ void -em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete) +em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, gint delete) { struct _copy_folder_data *cfd; @@ -365,7 +365,7 @@ em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete) } static void -emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, void *data) +emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data) { GtkWidget *dialog = data; @@ -381,7 +381,7 @@ emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, voi } static void -emfu_delete_response (GtkWidget *dialog, int response, gpointer data) +emfu_delete_response (GtkWidget *dialog, gint response, gpointer data) { if (response == GTK_RESPONSE_OK) { /* disable dialog until operation finishes */ @@ -399,7 +399,7 @@ em_folder_utils_delete_folder (CamelFolder *folder) { CamelStore *local; GtkWidget *dialog; - int flags = 0; + gint flags = 0; local = mail_component_peek_local_store (NULL); @@ -430,8 +430,8 @@ em_folder_utils_delete_folder (CamelFolder *folder) void em_folder_utils_rename_folder (CamelFolder *folder) { - char *prompt, *new_name; - const char *p; + gchar *prompt, *new_name; + const gchar *p; CamelStore *local; gboolean done = FALSE; size_t base_len; @@ -463,7 +463,7 @@ em_folder_utils_rename_folder (CamelFolder *folder) } else { CamelFolderInfo *fi; CamelException ex; - char *path, *tmp; + gchar *path, *tmp; if (base_len > 0) { path = g_malloc (base_len + strlen (new_name) + 2); @@ -481,7 +481,7 @@ em_folder_utils_rename_folder (CamelFolder *folder) e_error_run(NULL, "mail:no-rename-folder-exists", folder->name, new_name, NULL); } else { - const char *oldpath, *newpath; + const gchar *oldpath, *newpath; oldpath = folder->full_name; newpath = path; @@ -511,16 +511,16 @@ struct _EMCreateFolder { /* input data */ CamelStore *store; - char *full_name; - char *parent; - char *name; + gchar *full_name; + gchar *parent; + gchar *name; /* output data */ CamelFolderInfo *fi; /* callback data */ - void (* done) (CamelFolderInfo *fi, void *user_data); - void *user_data; + void (* done) (CamelFolderInfo *fi, gpointer user_data); + gpointer user_data; }; /* Temporary Structure to hold data to pass across function */ @@ -528,7 +528,7 @@ struct _EMCreateFolderTempData { EMFolderTree * emft; EMFolderSelector * emfs; - char *uri; + gchar *uri; }; static gchar * @@ -575,12 +575,12 @@ static MailMsgInfo create_folder_info = { static int -emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done) (CamelFolderInfo *fi, void *user_data), void *user_data) +emfu_create_folder_real (CamelStore *store, const gchar *full_name, void (* done) (CamelFolderInfo *fi, gpointer user_data), gpointer user_data) { - char *name, *namebuf = NULL; + gchar *name, *namebuf = NULL; struct _EMCreateFolder *m; - const char *parent; - int id; + const gchar *parent; + gint id; namebuf = g_strdup (full_name); if (!(name = strrchr (namebuf, '/'))) { @@ -609,7 +609,7 @@ emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done) } static void -new_folder_created_cb (CamelFolderInfo *fi, void *user_data) +new_folder_created_cb (CamelFolderInfo *fi, gpointer user_data) { struct _EMCreateFolderTempData *emcftd=user_data; if (fi){ @@ -625,10 +625,10 @@ new_folder_created_cb (CamelFolderInfo *fi, void *user_data) } static void -emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer data) +emfu_popup_new_folder_response (EMFolderSelector *emfs, gint response, gpointer data) { EMFolderTreeModelStoreInfo *si; - const char *uri, *path; + const gchar *uri, *path; CamelException ex; CamelStore *store; struct _EMCreateFolderTempData *emcftd; diff --git a/mail/em-folder-utils.h b/mail/em-folder-utils.h index c139a9e74c..d0c5e986c6 100644 --- a/mail/em-folder-utils.h +++ b/mail/em-folder-utils.h @@ -35,13 +35,13 @@ gint em_folder_utils_copy_folders (CamelStore *fromstore, const gchar *frombase, CamelStore *tostore, const gchar *tobase, - int delete); + gint delete); /* FIXME These API's are really busted. There is no consistency and * most rely on the wrong data. */ void em_folder_utils_copy_folder (CamelFolderInfo *folderinfo, - int delete); + gint delete); void em_folder_utils_delete_folder (CamelFolder *folder); void em_folder_utils_rename_folder (CamelFolder *folder); diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index d0f8289a15..5de430e34b 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -115,33 +115,33 @@ #include <X11/XF86keysym.h> #endif -static void emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv); +static void emfv_list_message_selected(MessageList *ml, const gchar *uid, EMFolderView *emfv); static void emfv_list_built(MessageList *ml, EMFolderView *emfv); -static int emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv); +static gint emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv); static void emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv); -static int emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv); +static gint emfv_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderView *emfv); static void emfv_list_selection_change(ETree *tree, EMFolderView *emfv); -static void emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderView *); -static int emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, CamelMimePart *part, EMFolderView *); +static void emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const gchar *uri, EMFolderView *); +static gint emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, CamelMimePart *part, EMFolderView *); static void emfv_enable_menus(EMFolderView *emfv); -static void emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri); -static void emfv_set_folder_uri(EMFolderView *emfv, const char *uri); -static void emfv_set_message(EMFolderView *emfv, const char *uid, int nomarkseen); -static void emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state); +static void emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri); +static void emfv_set_folder_uri(EMFolderView *emfv, const gchar *uri); +static void emfv_set_message(EMFolderView *emfv, const gchar *uid, gint nomarkseen); +static void emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint state); -static void emfv_message_reply(EMFolderView *emfv, int mode); -static void vfolder_type_current (EMFolderView *emfv, int type); -static void filter_type_current (EMFolderView *emfv, int type); +static void emfv_message_reply(EMFolderView *emfv, gint mode); +static void vfolder_type_current (EMFolderView *emfv, gint type); +static void filter_type_current (EMFolderView *emfv, gint type); static void emfv_setting_setup(EMFolderView *emfv); -static void emfv_on_url_cb(GObject *emitter, const char *url, EMFolderView *emfv); -static void emfv_on_url(EMFolderView *emfv, const char *uri, const char *nice_uri); +static void emfv_on_url_cb(GObject *emitter, const gchar *url, EMFolderView *emfv); +static void emfv_on_url(EMFolderView *emfv, const gchar *uri, const gchar *nice_uri); -static void emfv_set_seen (EMFolderView *emfv, const char *uid); +static void emfv_set_seen (EMFolderView *emfv, const gchar *uid); static gboolean emfv_on_html_button_released_cb (GtkHTML *html, GdkEventButton *button, EMFolderView *emfv); static gboolean emfv_popup_menu (GtkWidget *widget); @@ -224,12 +224,12 @@ struct _EMFolderViewPrivate { guint destroyed:1; GtkWidget *invisible; - char *selection_uri; + gchar *selection_uri; GalViewInstance *view_instance; GalViewMenus *view_menus; - char *selected_uid; + gchar *selected_uid; }; static GtkVBoxClass *emfv_parent; @@ -276,7 +276,7 @@ emfv_init(GObject *o) emfv->ui_app_name = "evolution-mail"; - emfv->enable_map = g_slist_prepend(NULL, (void *)emfv_enable_map); + emfv->enable_map = g_slist_prepend(NULL, (gpointer)emfv_enable_map); emfv->list = (MessageList *)message_list_new(); g_signal_connect(emfv->list, "message_selected", G_CALLBACK(emfv_list_message_selected), emfv); @@ -464,11 +464,11 @@ GtkWidget *em_folder_view_new(void) /* flag all selected messages. Return number flagged */ /* FIXME: Should this be part of message-list instead? */ -int +gint em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set) { GPtrArray *uids; - int i; + gint i; if (emfv->folder == NULL) return 0; @@ -488,17 +488,17 @@ em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set) } /* should this be elsewhere/take a uid list? */ -int +gint em_folder_view_open_selected(EMFolderView *emfv) { GPtrArray *uids, *views; - int i = 0; + gint i = 0; uids = message_list_get_selected(emfv->list); if (uids->len >= 10) { - char *num = g_strdup_printf("%d", uids->len); - int doit; + gchar *num = g_strdup_printf("%d", uids->len); + gint doit; doit = em_utils_prompt_user((GtkWindow *)gtk_widget_get_toplevel((GtkWidget *)emfv), "/apps/evolution/mail/prompts/open_many", @@ -524,10 +524,10 @@ em_folder_view_open_selected(EMFolderView *emfv) CamelVeeMessageInfo *vinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info(emfv->folder, uids->pdata[i]); if (vinfo) { - char *uid; + gchar *uid; /* TODO: get_location shouldn't strdup the uid */ CamelFolder *f = camel_vee_folder_get_location((CamelVeeFolder *)emfv->folder, vinfo, &uid); - char *uri = mail_tools_folder_to_url(f); + gchar *uri = mail_tools_folder_to_url(f); if (em_utils_folder_is_drafts(f, uri) || em_utils_folder_is_outbox(f, uri)) { GPtrArray *edits = g_ptr_array_new(); @@ -585,7 +585,7 @@ emfv_setup_view_instance(EMFolderView *emfv) static GalViewCollection *collection = NULL; struct _EMFolderViewPrivate *p = emfv->priv; gboolean outgoing, show_wide=FALSE; - char *id; + gchar *id; g_return_if_fail (emfv->folder); g_return_if_fail (emfv->folder_uri); @@ -593,10 +593,10 @@ emfv_setup_view_instance(EMFolderView *emfv) if (collection == NULL) { ETableSpecification *spec; GalViewFactory *factory; - const char *evolution_dir; - char *dir; - char *galviewsmaildir; - char *etspecfile; + const gchar *evolution_dir; + gchar *dir; + gchar *galviewsmaildir; + gchar *etspecfile; collection = gal_view_collection_new (); @@ -644,7 +644,7 @@ emfv_setup_view_instance(EMFolderView *emfv) show_wide = emfv->list_active ? em_folder_browser_get_wide ((EMFolderBrowser *) emfv):FALSE; if (show_wide) { - char *safe_id, *filename; + gchar *safe_id, *filename; /* Force to use the wide view */ g_free (p->view_instance->custom_filename); @@ -678,14 +678,14 @@ emfv_setup_view_instance(EMFolderView *emfv) if (!gal_view_instance_exists(p->view_instance)) { struct stat st; - char *path; + gchar *path; path = mail_config_folder_to_cachename (emfv->folder, "et-header-"); if (path && g_stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) { ETableSpecification *spec; ETableState *state; GalView *view; - char *etspecfile; + gchar *etspecfile; spec = e_table_specification_new (); etspecfile = g_build_filename (EVOLUTION_ETSPECDIR, @@ -725,9 +725,9 @@ void em_folder_view_setup_view_instance (EMFolderView *emfv) /* ********************************************************************** */ static void -emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) +emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri) { - int isout = (folder && uri + gint isout = (folder && uri && (em_utils_folder_is_drafts(folder, uri) || em_utils_folder_is_sent(folder, uri) || em_utils_folder_is_outbox(folder, uri))); @@ -766,7 +766,7 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) } static void -emfv_got_folder(char *uri, CamelFolder *folder, void *data) +emfv_got_folder(gchar *uri, CamelFolder *folder, gpointer data) { EMFolderView *emfv = data; @@ -774,13 +774,13 @@ emfv_got_folder(char *uri, CamelFolder *folder, void *data) } static void -emfv_set_folder_uri(EMFolderView *emfv, const char *uri) +emfv_set_folder_uri(EMFolderView *emfv, const gchar *uri) { mail_get_folder(uri, 0, emfv_got_folder, emfv, mail_msg_fast_ordered_push); } static void -emfv_set_message(EMFolderView *emfv, const char *uid, int nomarkseen) +emfv_set_message(EMFolderView *emfv, const gchar *uid, gint nomarkseen) { e_profile_event_emit("goto.uid", uid?uid:"<none>", 0); @@ -801,7 +801,7 @@ emfv_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint if (p->selection_uri == NULL) return; - gtk_selection_data_set(data, data->target, 8, (unsigned char *)p->selection_uri, strlen(p->selection_uri)); + gtk_selection_data_set(data, data->target, 8, (guchar *)p->selection_uri, strlen(p->selection_uri)); } static void @@ -821,14 +821,14 @@ emfv_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EMFolder In many cases these are the functions called by the bonobo callbacks too */ static void -emfv_popup_open(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_open(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; em_folder_view_open_selected(emfv); } static void -emfv_popup_edit (EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_edit (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids; @@ -841,7 +841,7 @@ emfv_popup_edit (EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_saveas(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_saveas(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids; @@ -851,7 +851,7 @@ emfv_popup_saveas(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_view_load_images(BonoboUIComponent *uic, void *data, const char *path) +emfv_view_load_images(BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -860,21 +860,21 @@ emfv_view_load_images(BonoboUIComponent *uic, void *data, const char *path) } static void -emfv_popup_print(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_print(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; em_folder_view_print(emfv, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG); } static void -emfv_popup_copy_text(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_copy_text(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; gtk_html_copy (((EMFormatHTML *)emfv->preview)->html); } static void -emfv_popup_source(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_source(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; EMMessageBrowser *emmb; @@ -894,7 +894,7 @@ emfv_popup_source(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_mail_compose(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_compose(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -905,28 +905,28 @@ emfv_mail_compose(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_popup_reply_sender(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_reply_sender(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; emfv_message_reply(emfv, REPLY_MODE_SENDER); } static void -emfv_popup_reply_list(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_reply_list(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; emfv_message_reply(emfv, REPLY_MODE_LIST); } static void -emfv_popup_reply_all(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_reply_all(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; emfv_message_reply(emfv, REPLY_MODE_ALL); } static void -emfv_popup_forward(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_forward(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids; @@ -939,7 +939,7 @@ emfv_popup_forward(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids = message_list_get_selected(emfv->list); @@ -948,7 +948,7 @@ emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids; @@ -961,7 +961,7 @@ emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids = message_list_get_selected(emfv->list); @@ -973,14 +973,14 @@ emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_mark_read(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_mark_read(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN); } static void -emfv_popup_mark_unread(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_mark_unread(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, 0); @@ -992,21 +992,21 @@ emfv_popup_mark_unread(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_mark_important(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_mark_important(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_FLAGGED); } static void -emfv_popup_mark_unimportant(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_mark_unimportant(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_FLAGGED, 0); } static void -emfv_select_next_message (EMFolderView *emfv, int count, gboolean always_can_previous) +emfv_select_next_message (EMFolderView *emfv, gint count, gboolean always_can_previous) { if (emfv && count == 1) { if (!message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0) && (emfv->hide_deleted || always_can_previous)) @@ -1015,10 +1015,10 @@ emfv_select_next_message (EMFolderView *emfv, int count, gboolean always_can_pre } static void -emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; - int count; + gint count; count = em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_NOTJUNK|CAMEL_MESSAGE_JUNK_LEARN, @@ -1028,10 +1028,10 @@ emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; - int count; + gint count; count = em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_NOTJUNK|CAMEL_MESSAGE_JUNK_LEARN, @@ -1044,11 +1044,11 @@ emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, void *data) #define DelInVFolderKey "/apps/evolution/mail/prompts/delete_in_vfolder" static void -emfv_delete_msg_response (GtkWidget *dialog, int response, gpointer data) +emfv_delete_msg_response (GtkWidget *dialog, gint response, gpointer data) { if (response == GTK_RESPONSE_OK) { EMFolderView *emfv = data; - int count; + gint count; GPtrArray *uids; if (dialog) { @@ -1113,7 +1113,7 @@ emfv_delete_msg_response (GtkWidget *dialog, int response, gpointer data) } static void -emfv_popup_delete (EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_delete (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GConfClient *gconf = gconf_client_get_default (); @@ -1142,7 +1142,7 @@ emfv_popup_delete (EPopup *ep, EPopupItem *pitem, void *data) #undef DelInVFolderKey static void -emfv_popup_undelete(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_undelete(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_DELETED, 0); @@ -1151,13 +1151,13 @@ emfv_popup_undelete(EPopup *ep, EPopupItem *pitem, void *data) struct _move_data { EMFolderView *emfv; GPtrArray *uids; - int delete; + gint delete; }; -static char *default_xfer_messages_uri = NULL; +static gchar *default_xfer_messages_uri = NULL; static void -emfv_popup_move_cb(const char *uri, void *data) +emfv_popup_move_cb(const gchar *uri, gpointer data) { struct _move_data *d = data; @@ -1173,7 +1173,7 @@ emfv_popup_move_cb(const char *uri, void *data) } static void -emfv_popup_move(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_move(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; struct _move_data *d; @@ -1188,7 +1188,7 @@ emfv_popup_move(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_copy(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_copy(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; struct _move_data *d; @@ -1203,10 +1203,10 @@ emfv_popup_copy(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_set_label (EMFolderView *emfv, const char *label) +emfv_set_label (EMFolderView *emfv, const gchar *label) { GPtrArray *uids = message_list_get_selected (emfv->list); - int i; + gint i; for (i = 0; i < uids->len; i++) camel_folder_set_message_user_flag (emfv->folder, uids->pdata[i], label, TRUE); @@ -1215,10 +1215,10 @@ emfv_set_label (EMFolderView *emfv, const char *label) } static void -emfv_unset_label (EMFolderView *emfv, const char *label) +emfv_unset_label (EMFolderView *emfv, const gchar *label) { GPtrArray *uids = message_list_get_selected (emfv->list); - int i; + gint i; for (i = 0; i < uids->len; i++) { camel_folder_set_message_user_flag (emfv->folder, uids->pdata[i], label, FALSE); @@ -1229,7 +1229,7 @@ emfv_unset_label (EMFolderView *emfv, const char *label) } static void -emfv_popup_label_clear(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_label_clear(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GSList *l; @@ -1242,7 +1242,7 @@ emfv_popup_label_clear(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_label_set(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_label_set(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; @@ -1253,10 +1253,10 @@ emfv_popup_label_set(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_label_new (EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_label_new (EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; - char *tag = e_util_labels_add_with_dlg (NULL, NULL); + gchar *tag = e_util_labels_add_with_dlg (NULL, NULL); if (tag) { emfv_set_label (emfv, tag); @@ -1265,12 +1265,12 @@ emfv_popup_label_new (EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_add_sender(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_add_sender(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids = message_list_get_selected(emfv->list); CamelMessageInfo *info; - const char *addr; + const gchar *addr; if (uids->len == 1 && (info = camel_folder_get_message_info(emfv->folder, uids->pdata[0])) != NULL @@ -1282,7 +1282,7 @@ emfv_popup_add_sender(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_apply_filters(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_apply_filters(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids = message_list_get_selected(emfv->list); @@ -1291,7 +1291,7 @@ emfv_popup_apply_filters(EPopup *ep, EPopupItem *pitem, void *data) } static void -emfv_popup_filter_junk(EPopup *ep, EPopupItem *pitem, void *data) +emfv_popup_filter_junk(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; GPtrArray *uids = message_list_get_selected(emfv->list); @@ -1304,7 +1304,7 @@ emfv_popup_filter_junk(EPopup *ep, EPopupItem *pitem, void *data) #define EMFV_POPUP_AUTO_TYPE(autotype, name, type) \ static void \ -name(EPopup *ep, EPopupItem *item, void *data) \ +name(EPopup *ep, EPopupItem *item, gpointer data) \ { \ EMFolderView *emfv = data; \ autotype(emfv, type); \ @@ -1382,10 +1382,10 @@ static EPopupItem emfv_popup_items[] = { }; static enum _e_popup_t -emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const char *label_tag) +emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const gchar *label_tag) { enum _e_popup_t state = 0; - int i; + gint i; gboolean exists = FALSE, not_exists = FALSE; g_return_val_if_fail (emfv != 0, state); @@ -1395,7 +1395,7 @@ emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const if (camel_folder_get_message_user_flag (emfv->folder, uids->pdata[i], label_tag)) exists = TRUE; else { - const char *label = e_util_labels_get_new_tag (camel_folder_get_message_user_tag (emfv->folder, uids->pdata[i], "label")); + const gchar *label = e_util_labels_get_new_tag (camel_folder_get_message_user_tag (emfv->folder, uids->pdata[i], "label")); /* backward compatibility... */ if (label && !strcmp (label, label_tag)) @@ -1414,7 +1414,7 @@ emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const } static void -emfv_popup_labels_free(EPopup *ep, GSList *l, void *data) +emfv_popup_labels_free(EPopup *ep, GSList *l, gpointer data) { while (l) { GSList *n = l->next; @@ -1429,19 +1429,19 @@ emfv_popup_labels_free(EPopup *ep, GSList *l, void *data) } static void -emfv_popup_items_free(EPopup *ep, GSList *items, void *data) +emfv_popup_items_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } static void -emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display) +emfv_popup(EMFolderView *emfv, GdkEvent *event, gint on_display) { GSList *menus = NULL, *l, *label_list = NULL; GtkMenu *menu; EMPopup *emp; EMPopupTargetSelect *target; - int i; + gint i; /** @HookPoint-EMPopup: Message List Context Menu * @Id: org.gnome.evolution.mail.folderview.popup.select @@ -1515,7 +1515,7 @@ emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display) /* a lot of stuff maps directly to the popup menu equivalent */ #define EMFV_MAP_CALLBACK(from, to) \ static void \ -from(BonoboUIComponent *uid, void *data, const char *path) \ +from(BonoboUIComponent *uid, gpointer data, const gchar *path) \ { \ to(NULL, NULL, data); \ } @@ -1547,7 +1547,7 @@ EMFV_MAP_CALLBACK(emfv_print_message, emfv_popup_print) EMFV_MAP_CALLBACK(emfv_message_source, emfv_popup_source) static void -emfv_empty_trash(BonoboUIComponent *uid, void *data, const char *path) +emfv_empty_trash(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1555,7 +1555,7 @@ emfv_empty_trash(BonoboUIComponent *uid, void *data, const char *path) } static void -prepare_offline(void *key, void *value, void *data) +prepare_offline(gpointer key, gpointer value, gpointer data) { CamelService *service = key; @@ -1566,13 +1566,13 @@ prepare_offline(void *key, void *value, void *data) } static void -emfv_prepare_offline(BonoboUIComponent *uid, void *data, const char *path) +emfv_prepare_offline(BonoboUIComponent *uid, gpointer data, const gchar *path) { mail_component_stores_foreach(mail_component_peek(), prepare_offline, NULL); } static void -emfv_edit_cut(BonoboUIComponent *uid, void *data, const char *path) +emfv_edit_cut(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1583,7 +1583,7 @@ emfv_edit_cut(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_edit_copy(BonoboUIComponent *uid, void *data, const char *path) +emfv_edit_copy(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1594,7 +1594,7 @@ emfv_edit_copy(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_edit_paste(BonoboUIComponent *uid, void *data, const char *path) +emfv_edit_paste(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1602,7 +1602,7 @@ emfv_edit_paste(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_select_all_text(BonoboUIComponent *uid, void *data, const char *path) +emfv_select_all_text(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; gboolean selected; @@ -1614,7 +1614,7 @@ emfv_select_all_text(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_mail_next(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_next(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1624,7 +1624,7 @@ emfv_mail_next(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_mail_next_flagged(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_next_flagged(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1632,7 +1632,7 @@ emfv_mail_next_flagged(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_mail_next_unread(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_next_unread(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1641,7 +1641,7 @@ emfv_mail_next_unread(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_mail_next_thread(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_next_thread(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1649,7 +1649,7 @@ emfv_mail_next_thread(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_mail_previous(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_previous(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1657,7 +1657,7 @@ emfv_mail_previous(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_mail_previous_flagged(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_previous_flagged(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1665,7 +1665,7 @@ emfv_mail_previous_flagged(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_mail_previous_unread(BonoboUIComponent *uid, void *data, const char *path) +emfv_mail_previous_unread(BonoboUIComponent *uid, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1674,7 +1674,7 @@ emfv_mail_previous_unread(BonoboUIComponent *uid, void *data, const char *path) } static void -emfv_message_forward_attached (BonoboUIComponent *uic, void *data, const char *path) +emfv_message_forward_attached (BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; GPtrArray *uids; @@ -1687,7 +1687,7 @@ emfv_message_forward_attached (BonoboUIComponent *uic, void *data, const char *p } static void -emfv_message_forward_inline (BonoboUIComponent *uic, void *data, const char *path) +emfv_message_forward_inline (BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; GPtrArray *uids; @@ -1700,7 +1700,7 @@ emfv_message_forward_inline (BonoboUIComponent *uic, void *data, const char *pat } static void -emfv_message_forward_quoted (BonoboUIComponent *uic, void *data, const char *path) +emfv_message_forward_quoted (BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; GPtrArray *uids; @@ -1713,7 +1713,7 @@ emfv_message_forward_quoted (BonoboUIComponent *uic, void *data, const char *pat } static void -emfv_message_redirect (BonoboUIComponent *uic, void *data, const char *path) +emfv_message_redirect (BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1727,9 +1727,9 @@ emfv_message_redirect (BonoboUIComponent *uic, void *data, const char *path) } static gboolean -html_contains_nonwhitespace (const char *html, gint len) +html_contains_nonwhitespace (const gchar *html, gint len) { - const char *p; + const gchar *p; gunichar c = 0; if (!html || len<=0) @@ -1765,9 +1765,9 @@ html_contains_nonwhitespace (const char *html, gint len) } static void -emfv_message_reply(EMFolderView *emfv, int mode) +emfv_message_reply(EMFolderView *emfv, gint mode) { - char *html = NULL; + gchar *html = NULL; gint len; if (emfv->list->cursor_uid == NULL) @@ -1805,7 +1805,7 @@ emfv_message_reply(EMFolderView *emfv, int mode) } static void -emfv_message_search(BonoboUIComponent *uic, void *data, const char *path) +emfv_message_search(BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1813,7 +1813,7 @@ emfv_message_search(BonoboUIComponent *uic, void *data, const char *path) } static void -emfv_print_preview_message(BonoboUIComponent *uic, void *data, const char *path) +emfv_print_preview_message(BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1821,7 +1821,7 @@ emfv_print_preview_message(BonoboUIComponent *uic, void *data, const char *path) } static void -emfv_text_zoom_in(BonoboUIComponent *uic, void *data, const char *path) +emfv_text_zoom_in(BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1830,7 +1830,7 @@ emfv_text_zoom_in(BonoboUIComponent *uic, void *data, const char *path) } static void -emfv_text_zoom_out(BonoboUIComponent *uic, void *data, const char *path) +emfv_text_zoom_out(BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1839,7 +1839,7 @@ emfv_text_zoom_out(BonoboUIComponent *uic, void *data, const char *path) } static void -emfv_text_zoom_reset(BonoboUIComponent *uic, void *data, const char *path) +emfv_text_zoom_reset(BonoboUIComponent *uic, gpointer data, const gchar *path) { EMFolderView *emfv = data; @@ -1850,9 +1850,9 @@ emfv_text_zoom_reset(BonoboUIComponent *uic, void *data, const char *path) /* ********************************************************************** */ struct _filter_data { - const char *source; - char *uri; - int type; + const gchar *source; + gchar *uri; + gint type; }; static void @@ -1863,7 +1863,7 @@ filter_data_free (struct _filter_data *fdata) } static void -filter_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data) +filter_type_got_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer user_data) { struct _filter_data *data = user_data; @@ -1874,7 +1874,7 @@ filter_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage } static void -filter_type_uid (CamelFolder *folder, const char *uid, const char *source, int type) +filter_type_uid (CamelFolder *folder, const gchar *uid, const gchar *source, gint type) { struct _filter_data *data; @@ -1886,9 +1886,9 @@ filter_type_uid (CamelFolder *folder, const char *uid, const char *source, int t } static void -filter_type_current (EMFolderView *emfv, int type) +filter_type_current (EMFolderView *emfv, gint type) { - const char *source; + const gchar *source; GPtrArray *uids; if (em_utils_folder_is_sent (emfv->folder, emfv->folder_uri) @@ -1900,7 +1900,7 @@ filter_type_current (EMFolderView *emfv, int type) uids = message_list_get_selected (emfv->list); if (uids->len == 1) - filter_type_uid (emfv->folder, (char *) uids->pdata[0], source, type); + filter_type_uid (emfv->folder, (gchar *) uids->pdata[0], source, type); em_utils_uids_free (uids); } @@ -1911,7 +1911,7 @@ EMFV_MAP_CALLBACK(emfv_tools_filter_recipient, emfv_popup_filter_recipients) EMFV_MAP_CALLBACK(emfv_tools_filter_mlist, emfv_popup_filter_mlist) static void -vfolder_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data) +vfolder_type_got_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer user_data) { struct _filter_data *data = user_data; @@ -1922,7 +1922,7 @@ vfolder_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage } static void -emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data) +emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target; @@ -1951,7 +1951,7 @@ emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data) static void -emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, void *data) +emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target; @@ -1978,7 +1978,7 @@ emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, void *data) } static void -vfolder_type_uid (CamelFolder *folder, const char *uid, const char *uri, int type) +vfolder_type_uid (CamelFolder *folder, const gchar *uid, const gchar *uri, gint type) { struct _filter_data *data; @@ -1990,7 +1990,7 @@ vfolder_type_uid (CamelFolder *folder, const char *uid, const char *uri, int typ } static void -vfolder_type_current (EMFolderView *emfv, int type) +vfolder_type_current (EMFolderView *emfv, gint type) { GPtrArray *uids; @@ -2000,7 +2000,7 @@ vfolder_type_current (EMFolderView *emfv, int type) /* ensures vfolder is running */ vfolder_load_storage (); - vfolder_type_uid (emfv->folder, (char *) uids->pdata[0], emfv->folder_uri, type); + vfolder_type_uid (emfv->folder, (gchar *) uids->pdata[0], emfv->folder_uri, type); } em_utils_uids_free (uids); @@ -2170,10 +2170,10 @@ emfv_enable_menus(EMFolderView *emfv) name = g_string_new(""); for (l = emfv->enable_map; l; l = l->next) { EMFolderViewEnable *map = l->data; - int i; + gint i; for (i=0;map[i].name;i++) { - int state = (map[i].mask & disable_mask) == 0; + gint state = (map[i].mask & disable_mask) == 0; g_string_printf(name, "/commands/%s", map[i].name); bonobo_ui_component_set_prop(emfv->uic, name->str, "sensitive", state?"1":"0", NULL); @@ -2184,10 +2184,10 @@ emfv_enable_menus(EMFolderView *emfv) } static void -emfv_view_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfv_view_mode(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { EMFolderView *emfv = data; - int i; + gint i; if (type != Bonobo_UIComponent_STATE_CHANGED) return; @@ -2208,7 +2208,7 @@ emfv_view_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_Even } static void -emfv_caret_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfv_caret_mode(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { EMFolderView *emfv = data; @@ -2221,7 +2221,7 @@ emfv_caret_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_Eve } static void -emfv_charset_changed(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data) +emfv_charset_changed(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data) { EMFolderView *emfv = data; @@ -2240,7 +2240,7 @@ emfv_charset_changed(BonoboUIComponent *uic, const char *path, Bonobo_UIComponen } static void -emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) +emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint act) { struct _EMFolderViewPrivate *p = emfv->priv; @@ -2252,7 +2252,7 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) emfv->uic = uic; for (l = emfv->ui_files;l;l = l->next) - bonobo_ui_util_set_ui(uic, PREFIX, (char *)l->data, emfv->ui_app_name, NULL); + bonobo_ui_util_set_ui(uic, PREFIX, (gchar *)l->data, emfv->ui_app_name, NULL); bonobo_ui_component_add_verb_list_with_data(uic, emfv_message_verbs, emfv); e_pixmaps_update(uic, emfv_message_pixmaps); @@ -2311,7 +2311,7 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act) } } -int +gint em_folder_view_print (EMFolderView *emfv, GtkPrintOperationAction action) { EMFormatHTMLPrint *efhp; @@ -2343,7 +2343,7 @@ exit: } EMPopupTargetSelect * -em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display) +em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, gint on_display) { EMPopupTargetSelect *t; @@ -2413,7 +2413,7 @@ em_folder_view_set_hide_deleted(EMFolderView *emfv, gboolean status) struct mst_t { EMFolderView *emfv; - char *uid; + gchar *uid; }; static void @@ -2439,7 +2439,7 @@ do_mark_seen (gpointer user_data) } static void -emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *ex) +emfv_list_done_message_selected(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *ex) { EMFolderView *emfv = data; EMEvent *eme; @@ -2533,7 +2533,7 @@ emfv_spin(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject) } static gboolean -emfv_message_selected_timeout(void *data) +emfv_message_selected_timeout(gpointer data) { EMFolderView *emfv = data; @@ -2576,7 +2576,7 @@ emfv_message_selected_timeout(void *data) } static void -emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv) +emfv_list_message_selected(MessageList *ml, const gchar *uid, EMFolderView *emfv) { e_profile_event_emit("goto.listuid", uid, 0); @@ -2623,10 +2623,10 @@ emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent } static int -emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv) +emfv_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderView *emfv) { GPtrArray *uids; - int i; + gint i; guint32 flags; if ((ev->key.state & GDK_CONTROL_MASK) != 0) @@ -2698,7 +2698,7 @@ emfv_list_selection_change(ETree *tree, EMFolderView *emfv) } static void -emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderView *emfv) +emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const gchar *uri, EMFolderView *emfv) { if (!strncmp (uri, "##", 2)) return; @@ -2718,7 +2718,7 @@ emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderVie } static void -emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data) +emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, gpointer data) { EMFolderView *emfv = data; struct _EMFolderViewPrivate *p = emfv->priv; @@ -2739,7 +2739,7 @@ static EPopupItem emfv_uri_popups[] = { }; static void -emfv_uri_popup_free(EPopup *ep, GSList *list, void *data) +emfv_uri_popup_free(EPopup *ep, GSList *list, gpointer data) { while (list) { GSList *n = list->next; @@ -2776,7 +2776,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu { GtkWidget *separator; GList *children, *p; - char *name; + gchar *name; if (!src_menu) return des_menu; @@ -2808,7 +2808,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu } static int -emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, CamelMimePart *part, EMFolderView *emfv) +emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, CamelMimePart *part, EMFolderView *emfv) { GtkMenu *menu = NULL; EMPopup *main_emp = NULL; @@ -2816,7 +2816,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const if (uri == NULL && part == NULL) { /* So we don't try and popup with nothing selected - rather odd result! */ GPtrArray *uids = message_list_get_selected(emfv->list); - int doit = uids->len > 0; + gint doit = uids->len > 0; message_list_free_uids(emfv->list, uids); if (doit) @@ -2848,10 +2848,10 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const if (uri) { gboolean have_more_uris = strchr (uri, '\n') != NULL; - const char *act, *next; + const gchar *act, *next; for (act = uri; act; act = next) { - char *u; + gchar *u; next = strchr (act, '\n'); if (next) { u = g_strndup (act, next - act); @@ -2861,7 +2861,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const if (u && *u) { GSList *menus = NULL; - int i; + gint i; EMPopupTargetURI *t; EMPopup *emp; EPopupTarget *target; @@ -2886,7 +2886,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const if (strlen (u) > 100) { GString *str; - char *c; + gchar *c; /* the url should be in the form of http://a.b.c/... and we want to see where the image comes from, so skip first 10 characters and @@ -2941,7 +2941,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const } static void -emfv_set_seen(EMFolderView *emfv, const char *uid) +emfv_set_seen(EMFolderView *emfv, const gchar *uid) { guint32 old_flags = camel_folder_get_message_flags(emfv->folder, uid); @@ -2974,7 +2974,7 @@ enum { }; /* IF these get too long, update key field */ -static const char * const emfv_display_keys[] = { +static const gchar * const emfv_display_keys[] = { "animate_images", "charset", "citation_colour", @@ -2999,7 +2999,7 @@ static void emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFolderView *emfv) { GConfValue *value; - char *tkey; + gchar *tkey; g_return_if_fail (gconf_entry_get_key (entry) != NULL); @@ -3017,7 +3017,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold em_format_set_default_charset((EMFormat *)emfv->preview, gconf_value_get_string (value)); break; case EMFV_CITATION_COLOUR: { - const char *s; + const gchar *s; GdkColor colour; guint32 rgb; @@ -3037,7 +3037,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold break; case EMFV_MESSAGE_STYLE: if (EM_FOLDER_VIEW_GET_CLASS (emfv)->update_message_style) { - int style = gconf_value_get_int (value); + gint style = gconf_value_get_int (value); if (style < EM_FORMAT_NORMAL || style > EM_FORMAT_SOURCE) style = EM_FORMAT_NORMAL; @@ -3062,7 +3062,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold p = header_config_list; while (p) { EMMailerPrefsHeader *h; - char *xml = (char *)p->data; + gchar *xml = (gchar *)p->data; h = em_mailer_prefs_header_from_xml(xml); if (h && h->enabled) { @@ -3093,7 +3093,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold break; } case EMFV_SHOW_PREVIEW: { gboolean state_gconf, state_camel; - char *ret; + gchar *ret; /* If emfv->folder hasn't been initialized, do nothing */ if (!emfv->folder) @@ -3128,7 +3128,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold break; } case EMFV_THREAD_LIST: { gboolean state_gconf, state_camel; - char *ret; + gchar *ret; /* If emfv->folder or emfv->list hasn't been initialized, do nothing */ if (!emfv->folder || !emfv->list) @@ -3149,7 +3149,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold break; } case EMFV_PANED_SIZE: { EMFolderBrowser *emfb = (EMFolderBrowser *)emfv; - int paned_size; + gint paned_size; if (!emfv->list_active || !emfb->vpane || !emfv->preview_active) return; @@ -3169,13 +3169,13 @@ emfv_setting_setup(EMFolderView *emfv) GConfClient *gconf = gconf_client_get_default(); GConfEntry *entry; GError *err = NULL; - int i; - char key[64]; + gint i; + gchar key[64]; if (emfv_setting_key == NULL) { emfv_setting_key = g_hash_table_new(g_str_hash, g_str_equal); for (i=1;i<EMFV_SETTINGS;i++) - g_hash_table_insert(emfv_setting_key, (void *)emfv_display_keys[i-1], GINT_TO_POINTER(i)); + g_hash_table_insert(emfv_setting_key, (gpointer)emfv_display_keys[i-1], GINT_TO_POINTER(i)); } gconf_client_add_dir(gconf, "/apps/evolution/mail/display", GCONF_CLIENT_PRELOAD_NONE, NULL); @@ -3201,7 +3201,7 @@ emfv_setting_setup(EMFolderView *emfv) } static void -emfv_on_url (EMFolderView *emfv, const char *uri, const char *nice_uri) +emfv_on_url (EMFolderView *emfv, const gchar *uri, const gchar *nice_uri) { if (emfv->statusbar_active) { if (emfv->uic) { @@ -3215,15 +3215,15 @@ emfv_on_url (EMFolderView *emfv, const char *uri, const char *nice_uri) } static void -emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv) +emfv_on_url_cb (GObject *emitter, const gchar *url, EMFolderView *emfv) { - char *nice_url = NULL; + gchar *nice_url = NULL; if (url) { if (strncmp (url, "mailto:", 7) == 0) { CamelInternetAddress *cia = camel_internet_address_new(); CamelURL *curl; - char *addr; + gchar *addr; curl = camel_url_new(url, NULL); camel_address_decode((CamelAddress *)cia, curl->path); @@ -3235,7 +3235,7 @@ emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv) } else if (strncmp (url, "callto:", 7) == 0 || strncmp (url, "h323:", 5) == 0 || strncmp (url, "sip:", 4) == 0) { CamelInternetAddress *cia = camel_internet_address_new(); CamelURL *curl; - char *addr; + gchar *addr; curl = camel_url_new(url, NULL); camel_address_decode((CamelAddress *)cia, curl->path); diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h index 3a7a153131..c9202dcfa3 100644 --- a/mail/em-folder-view.h +++ b/mail/em-folder-view.h @@ -71,7 +71,7 @@ enum { }; struct _EMFolderViewEnable { - const char *name; /* bonobo name, relative to /commands/ */ + const gchar *name; /* bonobo name, relative to /commands/ */ guint32 mask; /* disable mask, see EM_FOLDER_VIEW_CAN* flags */ }; @@ -85,13 +85,13 @@ struct _EMFolderView { struct _EMFormatHTMLDisplay *preview; struct _CamelFolder *folder; - char *folder_uri; + gchar *folder_uri; - char *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */ + gchar *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */ /* used to load ui from base activate implementation */ - GSList *ui_files; /* const char * list, TODO: should this be on class? */ - const char *ui_app_name; + GSList *ui_files; /* const gchar * list, TODO: should this be on class? */ + const gchar *ui_app_name; /* used to manage some menus, particularly plugins */ struct _EMMenu *menu; @@ -103,7 +103,7 @@ struct _EMFolderView { GSList *enable_map; /* bonobo menu enable map, entries are 0-terminated EMFolderViewEnable arryas TODO: should this be on class? */ - int mark_seen_timeout; /* local copy of gconf stuff */ + gint mark_seen_timeout; /* local copy of gconf stuff */ guint mark_seen:1; guint preview_active:1; /* is preview being used */ guint statusbar_active:1; /* should we manage the statusbar messages ourselves? */ @@ -118,16 +118,16 @@ struct _EMFolderViewClass { guint update_message_style:1; /* if used as a control, used to activate/deactivate custom menu's */ - void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, int state); + void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, gint state); - void (*set_folder_uri)(EMFolderView *emfv, const char *uri); - void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const char *uri); - void (*set_message)(EMFolderView *emfv, const char *uid, int nomarkseen); + void (*set_folder_uri)(EMFolderView *emfv, const gchar *uri); + void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const gchar *uri); + void (*set_message)(EMFolderView *emfv, const gchar *uid, gint nomarkseen); void (*show_search_bar)(EMFolderView *emfv); /* Signals */ - void (*on_url)(EMFolderView *emfv, const char *uri, const char *nice_uri); + void (*on_url)(EMFolderView *emfv, const gchar *uri, const gchar *nice_uri); void (*loaded)(EMFolderView *emfv); void (*changed)(EMFolderView *emfv); @@ -142,12 +142,12 @@ GtkWidget *em_folder_view_new(void); #define em_folder_view_set_folder_uri(emfv, uri) EM_FOLDER_VIEW_GET_CLASS (emfv)->set_folder_uri((emfv), (uri)) #define em_folder_view_set_message(emfv, uid, nomarkseen) EM_FOLDER_VIEW_GET_CLASS (emfv)->set_message((emfv), (uid), (nomarkseen)) -EMPopupTargetSelect *em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display); +EMPopupTargetSelect *em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, gint on_display); -int em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set); -int em_folder_view_open_selected(EMFolderView *emfv); +gint em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set); +gint em_folder_view_open_selected(EMFolderView *emfv); -int em_folder_view_print(EMFolderView *emfv, GtkPrintOperationAction action); +gint em_folder_view_print(EMFolderView *emfv, GtkPrintOperationAction action); /* this could be on message-list */ guint32 em_folder_view_disable_mask(EMFolderView *emfv); diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c index 9fec654ae5..ad7cbd7144 100644 --- a/mail/em-format-hook.c +++ b/mail/em-format-hook.c @@ -52,7 +52,7 @@ static GHashTable *emfh_types; */ -static void *emfh_parent_class; +static gpointer emfh_parent_class; #define emfh ((EMFormatHook *)eph) #define d(x) @@ -141,7 +141,7 @@ emfh_construct_group(EPluginHook *eph, xmlNodePtr root) node = root->children; while (node) { - if (0 == strcmp((char *)node->name, "item")) { + if (0 == strcmp((gchar *)node->name, "item")) { struct _EMFormatHookItem *item; item = emfh_construct_item(eph, group, node); @@ -169,7 +169,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "group") == 0) { + if (strcmp((gchar *)node->name, "group") == 0) { struct _EMFormatHookGroup *group; group = emfh_construct_group(eph, node); @@ -203,7 +203,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) } static void -emfh_enable(EPluginHook *eph, int state) +emfh_enable(EPluginHook *eph, gint state) { GSList *g, *l; EMFormatClass *klass; @@ -275,5 +275,5 @@ void em_format_hook_register_type(GType type) d(printf("registering formatter type '%s'\n", g_type_name(type))); klass = g_type_class_ref(type); - g_hash_table_insert(emfh_types, (void *)g_type_name(type), klass); + g_hash_table_insert(emfh_types, (gpointer)g_type_name(type), klass); } diff --git a/mail/em-format-hook.h b/mail/em-format-hook.h index 08d99dd63c..553eb7adab 100644 --- a/mail/em-format-hook.h +++ b/mail/em-format-hook.h @@ -55,12 +55,12 @@ struct _EMFormatHookItem { EMFormatHandler handler; struct _EMFormatHook *hook; /* parent pointer */ - char *format; /* format handler */ + gchar *format; /* format handler */ }; struct _EMFormatHookGroup { struct _EMFormatHook *hook; /* parent pointer */ - char *id; /* target formatter id */ + gchar *id; /* target formatter id */ GSList *items; /* items to consider */ }; diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 8d25923658..044ffe598a 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -98,9 +98,9 @@ struct _EMFormatHTMLDisplayPrivate { GtkWidget *attachment_view; /* weak reference */ }; -static int efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efh); -static void efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd); -static void efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd); +static gint efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efh); +static void efhd_html_link_clicked (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd); +static void efhd_html_on_url (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd); static void efhd_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri); static gboolean efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject); @@ -111,14 +111,14 @@ struct _attach_puri { const EMFormatHandler *handle; - const char *snoop_mime_type; + const gchar *snoop_mime_type; /* for the > and V buttons */ GtkWidget *forward, *down; /* currently no way to correlate this data to the frame :( */ GtkHTML *frame; CamelStream *output; - unsigned int shown:1; + guint shown:1; /* Embedded Frame */ GtkHTMLEmbedded *html; @@ -127,8 +127,8 @@ struct _attach_puri { EAttachment *attachment; /* image stuff */ - int fit_width; - int fit_height; + gint fit_width; + gint fit_height; GtkImage *image; GtkWidget *event_box; @@ -142,16 +142,16 @@ struct _attach_puri { static void efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh); -/*static void efhd_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTMLDisplay *efh); +/*static void efhd_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTMLDisplay *efh); static gboolean efhd_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTMLDisplay *efh);*/ static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info); -static const EMFormatHandler *efhd_find_handler(EMFormat *emf, const char *mime_type); -static void efhd_format_clone(EMFormat *, CamelFolder *folder, const char *, CamelMimeMessage *msg, EMFormat *); -static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *txt); +static const EMFormatHandler *efhd_find_handler(EMFormat *emf, const gchar *mime_type); +static void efhd_format_clone(EMFormat *, CamelFolder *folder, const gchar *, CamelMimeMessage *msg, EMFormat *); +static void efhd_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt); static void efhd_format_source(EMFormat *, CamelStream *, CamelMimePart *); -static void efhd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *); +static void efhd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const gchar *, const EMFormatHandler *); static void efhd_format_optional(EMFormat *, CamelStream *, CamelMimePart *, CamelStream *); static void efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid); @@ -181,7 +181,7 @@ efhd_gtkhtml_realise(GtkHTML *html, EMFormatHTMLDisplay *efhd) when we are printing. */ style = gtk_widget_get_style((GtkWidget *)html); if (style) { - int state = GTK_WIDGET_STATE(html); + gint state = GTK_WIDGET_STATE(html); gushort r, g, b; r = style->fg[state].red >> 8; @@ -254,7 +254,7 @@ efhd_finalise(GObject *o) } static gboolean -efhd_bool_accumulator(GSignalInvocationHint *ihint, GValue *out, const GValue *in, void *data) +efhd_bool_accumulator(GSignalInvocationHint *ihint, GValue *out, const GValue *in, gpointer data) { gboolean val = g_value_get_boolean(in); @@ -364,7 +364,7 @@ EMFormatHTMLDisplay *em_format_html_display_new(void) return efhd; } -void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const char *name) +void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const gchar *name) { printf("FIXME: go to anchor '%s'\n", name); } @@ -430,9 +430,9 @@ efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh) } static void -efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay *efhd, char **uri, EMFormatPURI **puri) +efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay *efhd, gchar **uri, EMFormatPURI **puri) { - char *url, *img_url; + gchar *url, *img_url; g_return_if_fail (html != NULL); g_return_if_fail (GTK_IS_HTML (html)); @@ -448,7 +448,7 @@ efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay * if (img_url) { if (!(strstr (img_url, "://") || g_ascii_strncasecmp (img_url, "cid:", 4) == 0)) { - char *u = g_filename_to_uri (img_url, NULL, NULL); + gchar *u = g_filename_to_uri (img_url, NULL, NULL); g_free (img_url); img_url = u; } @@ -484,7 +484,7 @@ efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay * static int efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efhd) { - char *uri = NULL; + gchar *uri = NULL; EMFormatPURI *puri = NULL; gboolean res = FALSE; @@ -511,7 +511,7 @@ gboolean em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd) { GtkHTML *html; - char *uri = NULL; + gchar *uri = NULL; EMFormatPURI *puri = NULL; gboolean res = FALSE; @@ -527,7 +527,7 @@ em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd) } static void -efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd) +efhd_html_link_clicked (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd) { d(printf("link clicked event '%s'\n", url)); if (url && !strncmp(url, "##", 2)) { @@ -553,7 +553,7 @@ efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efh } static void -efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd) +efhd_html_on_url (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd) { d(printf("on_url event '%s'\n", url)); @@ -565,7 +565,7 @@ efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd) /* TODO: move the dialogue elsehwere */ /* FIXME: also in em-format-html.c */ static const struct { - const char *icon, *shortdesc, *description; + const gchar *icon, *shortdesc, *description; } smime_sign_table[5] = { { "stock_signature-bad", N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") }, { "stock_signature-ok", N_("Valid signature"), N_("This message is signed and is valid meaning that it is very likely that this message is authentic.") }, @@ -576,7 +576,7 @@ static const struct { }; static const struct { - const char *icon, *shortdesc, *description; + const gchar *icon, *shortdesc, *description; } smime_encrypt_table[4] = { { "stock_lock-broken", N_("Unencrypted"), N_("This message is not encrypted. Its content may be viewed in transit across the Internet.") }, { "stock_lock-ok", N_("Encrypted, weak"), N_("This message is encrypted, but with a weak encryption algorithm. It would be difficult, but not impossible for an outsider to view the content of this message in a practical amount of time.") }, @@ -584,14 +584,14 @@ static const struct { { "stock_lock-ok", N_("Encrypted, strong"), N_("This message is encrypted, with a strong encryption algorithm. It would be very difficult for an outsider to view the content of this message in a practical amount of time.") }, }; -static const char *smime_sign_colour[5] = { +static const gchar *smime_sign_colour[5] = { "", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\"","" }; struct _smime_pobject { EMFormatHTMLPObject object; - int signature; + gint signature; CamelCipherValidity *valid; GtkWidget *widget; }; @@ -655,11 +655,11 @@ efhd_xpkcs7mime_add_cert_table(GtkWidget *vbox, CamelDList *certlist, struct _sm { CamelCipherCertInfo *info = (CamelCipherCertInfo *)certlist->head; GtkTable *table = (GtkTable *)gtk_table_new(camel_dlist_length(certlist), 2, FALSE); - int n = 0; + gint n = 0; while (info->next) { - char *la = NULL; - const char *l = NULL; + gchar *la = NULL; + const gchar *l = NULL; if (info->name) { if (info->email && strcmp(info->name, info->email) != 0) @@ -715,7 +715,7 @@ efhd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatHTMLPObject *pobject struct _smime_pobject *po = (struct _smime_pobject *)pobject; GladeXML *xml; GtkWidget *vbox, *w; - char *gladefile; + gchar *gladefile; if (po->widget) /* FIXME: window raise? */ @@ -804,7 +804,7 @@ efhd_xpkcs7mime_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje { GtkWidget *icon, *button; struct _smime_pobject *po = (struct _smime_pobject *)pobject; - const char *icon_name; + const gchar *icon_name; /* FIXME: need to have it based on encryption and signing too */ if (po->valid->sign.status != 0) @@ -835,7 +835,7 @@ efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came if (emf->valid == valid && (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE || valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) { - char *classid; + gchar *classid; struct _smime_pobject *pobj; camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>", @@ -865,7 +865,7 @@ efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came static void efhd_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *handle) { - char *classid; + gchar *classid; struct _attach_puri *info; classid = g_strdup_printf("image%s", ((EMFormat *)efh)->part_id->str); @@ -919,19 +919,19 @@ static EMFormatHandler type_builtin_table[] = { static void efhd_builtin_init(EMFormatHTMLDisplayClass *efhc) { - int i; + gint i; for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++) em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]); } static const EMFormatHandler * -efhd_find_handler(EMFormat *emf, const char *mime_type) +efhd_find_handler(EMFormat *emf, const gchar *mime_type) { return ((EMFormatClass *) efhd_parent)->find_handler (emf, mime_type); } -static void efhd_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src) +static void efhd_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *src) { if (emf != src) ((EMFormatHTML *) emf)->header_wrap_flags = 0; @@ -952,11 +952,11 @@ efhd_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri) static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info) { - const char *flag, *comp, *due; + const gchar *flag, *comp, *due; time_t date; - char due_date[128]; + gchar due_date[128]; struct tm due_tm; - char *iconpath; + gchar *iconpath; if (emf->folder == NULL || emf->uid == NULL || (flag = camel_folder_get_message_user_tag(emf->folder, emf->uid, "follow-up")) == NULL @@ -974,7 +974,7 @@ static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePar iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath); g_free (iconpath); if (iconpart) { - char *classid; + gchar *classid; classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp"); camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid); @@ -1010,7 +1010,7 @@ static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePar } /* TODO: if these aren't going to do anything should remove */ -static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *txt) +static void efhd_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt) { ((EMFormatClass *)efhd_parent)->format_error(emf, stream, txt); } @@ -1039,7 +1039,7 @@ efhd_can_process_attachment (GtkWidget *button) /* if it hasn't been processed yet, format the attachment */ static void -efhd_attachment_show(EPopup *ep, EPopupItem *item, void *data) +efhd_attachment_show(EPopup *ep, EPopupItem *item, gpointer data) { struct _attach_puri *info = data; @@ -1061,7 +1061,7 @@ efhd_attachment_button_expanded (GtkWidget *widget, } static void -efhd_image_fit(EPopup *ep, EPopupItem *item, void *data) +efhd_image_fit(EPopup *ep, EPopupItem *item, gpointer data) { struct _attach_puri *info = data; @@ -1070,7 +1070,7 @@ efhd_image_fit(EPopup *ep, EPopupItem *item, void *data) } static void -efhd_image_unfit(EPopup *ep, EPopupItem *item, void *data) +efhd_image_unfit(EPopup *ep, EPopupItem *item, gpointer data) { struct _attach_puri *info = data; @@ -1087,13 +1087,13 @@ static EPopupItem efhd_menu_items[] = { }; static void -efhd_menu_items_free(EPopup *ep, GSList *items, void *data) +efhd_menu_items_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } static void -efhd_popup_place_widget(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer user_data) +efhd_popup_place_widget(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { GtkWidget *w = user_data; @@ -1178,7 +1178,7 @@ static void efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, guint info, guint time, EMFormatHTMLPObject *pobject) { CamelMimePart *part = pobject->part; - char *uri, *uri_crlf, *path; + gchar *uri, *uri_crlf, *path; CamelStream *stream; switch (info) { @@ -1204,7 +1204,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g /* Kludge around Nautilus requesting the same data many times */ uri = g_object_get_data((GObject *)w, "e-drag-uri"); if (uri) { - gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri, strlen(uri)); + gtk_selection_data_set(data, data->target, 8, (guchar *)uri, strlen(uri)); return; } @@ -1216,7 +1216,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g g_free(path); uri_crlf = g_strconcat(uri, "\r\n", NULL); g_free(uri); - gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf)); + gtk_selection_data_set(data, data->target, 8, (guchar *)uri_crlf, strlen(uri_crlf)); g_object_set_data_full((GObject *)w, "e-drag-uri", uri_crlf, g_free); break; default: @@ -1227,7 +1227,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g static void efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *pobject) { - char *uri; + gchar *uri; uri = g_object_get_data((GObject *)w, "e-drag-uri"); if (uri) { @@ -1236,7 +1236,7 @@ efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *p /* NB even more: doesn't the e-drag-uri have \r\n * appended? (see efhd_drag_data_get()) */ - char *filename = g_filename_from_uri (uri, NULL, NULL); + gchar *filename = g_filename_from_uri (uri, NULL, NULL); g_unlink(filename); g_free(filename); g_object_set_data((GObject *)w, "e-drag-uri", NULL); @@ -1244,7 +1244,7 @@ efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *p } static void -efhd_write_icon_job(struct _EMFormatHTMLJob *job, int cancelled) +efhd_write_icon_job(struct _EMFormatHTMLJob *job, gint cancelled) { EMFormatHTMLPObject *pobject; CamelDataWrapper *dw; @@ -1262,7 +1262,7 @@ static void efhd_image_resized(GtkWidget *w, GtkAllocation *event, struct _attach_puri *info) { GdkPixbuf *pb; - int width; + gint width; if (info->fit_width == 0) return; @@ -1294,7 +1294,7 @@ efhd_change_cursor(GtkWidget *w, GdkEventCrossing *event, struct _attach_puri *i static void efhd_image_fit_width(GtkWidget *widget, GdkEventButton *event, struct _attach_puri *info) { - int width; + gint width; width = ((GtkWidget *)((EMFormatHTML *)info->puri.format)->html)->allocation.width - 12; @@ -1345,7 +1345,7 @@ efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObjec { NULL, 0, 0 }, { (gchar *) "text/uri-list", 0, 1 }, }; - char *simple_type; + gchar *simple_type; info = (struct _attach_puri *)em_format_find_puri((EMFormat *)efh, pobject->classid); @@ -1509,7 +1509,7 @@ efhd_message_add_bar (EMFormat *emf, CamelMimePart *part, const EMFormatHandler *info) { - const char *classid = "attachment-bar"; + const gchar *classid = "attachment-bar"; em_format_html_add_pobject ( (EMFormatHTML *) emf, @@ -1521,9 +1521,9 @@ efhd_message_add_bar (EMFormat *emf, } static void -efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle) +efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type, const EMFormatHandler *handle) { - char *classid, *text, *html; + gchar *classid, *text, *html; struct _attach_puri *info; classid = g_strdup_printf ("attachment%s", emf->part_id->str); @@ -1666,7 +1666,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW (view)); - gtk_text_buffer_set_text (buffer, (char *)info->mstream->buffer->data, info->mstream->buffer->len); + gtk_text_buffer_set_text (buffer, (gchar *)info->mstream->buffer->data, info->mstream->buffer->len); camel_object_unref(info->mstream); info->mstream = NULL; gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), @@ -1693,7 +1693,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb static void efhd_format_optional(EMFormat *emf, CamelStream *fstream, CamelMimePart *part, CamelStream *mstream) { - char *classid, *html; + gchar *classid, *html; struct _attach_puri *info; CamelStream *stream; diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index bd0ea0edd3..16bafc30fb 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -59,9 +59,9 @@ struct _EMFormatHTMLDisplay { struct _ESearchingTokenizer *search_tok; - unsigned int animate:1; - unsigned int caret_mode:1; - unsigned int nobar:1; + guint animate:1; + guint caret_mode:1; + guint nobar:1; }; #define EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY (0) @@ -72,11 +72,11 @@ struct _EMFormatHTMLDisplayClass { EMFormatHTMLClass formathtml_class; /* a link clicked normally */ - void (*link_clicked)(EMFormatHTMLDisplay *efhd, const char *uri); + void (*link_clicked)(EMFormatHTMLDisplay *efhd, const gchar *uri); /* a part or a link button pressed event */ - int (*popup_event)(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, struct _CamelMimePart *part); + gint (*popup_event)(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, struct _CamelMimePart *part); /* the mouse is over a link */ - void (*on_url)(EMFormatHTMLDisplay *efhd, const char *uri); + void (*on_url)(EMFormatHTMLDisplay *efhd, const gchar *uri); }; GType em_format_html_display_get_type (void); @@ -85,7 +85,7 @@ EMFormatHTMLDisplay * void em_format_html_display_goto_anchor (EMFormatHTMLDisplay *efhd, - const char *name); + const gchar *name); void em_format_html_display_set_animate (EMFormatHTMLDisplay *efhd, @@ -96,12 +96,12 @@ void em_format_html_display_set_caret_mode void em_format_html_display_set_search (EMFormatHTMLDisplay *efhd, - int type, + gint type, GSList *strings); void em_format_html_display_search (EMFormatHTMLDisplay *efhd); void em_format_html_display_search_with (EMFormatHTMLDisplay *efhd, - char *word); + gchar *word); void em_format_html_display_search_close (EMFormatHTMLDisplay *efhd); diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c index ef1bbb13c4..c5c99bcab1 100644 --- a/mail/em-format-html-print.c +++ b/mail/em-format-html-print.c @@ -200,7 +200,7 @@ emfhp_complete (EMFormatHTMLPrint *efhp) } static void -emfhp_got_message (CamelFolder *folder, const char *uid, +emfhp_got_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data) { EMFormatHTMLPrint *efhp = data; @@ -224,7 +224,7 @@ emfhp_got_message (CamelFolder *folder, const char *uid, void em_format_html_print_message (EMFormatHTMLPrint *efhp, CamelFolder *folder, - const char *uid) + const gchar *uid) { g_object_ref (efhp); diff --git a/mail/em-format-html.c b/mail/em-format-html.c index aa82851bc9..c7d35a3423 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -90,12 +90,12 @@ struct _EMFormatHTMLCache { CamelMultipart *textmp; - char partid[1]; + gchar partid[1]; }; struct _EMFormatHTMLPrivate { struct _CamelMimeMessage *last_part; /* not reffed, DO NOT dereference */ - volatile int format_id; /* format thread id */ + volatile gint format_id; /* format thread id */ guint format_timeout_id; struct _format_msg *format_timeout_msg; @@ -106,16 +106,16 @@ struct _EMFormatHTMLPrivate { GMutex *lock; }; -static void efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh); +static void efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh); static gboolean efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh); static void efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh); static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info); -static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource); -static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt); +static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource); +static void efh_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt); static void efh_format_source(EMFormat *, CamelStream *, CamelMimePart *); -static void efh_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *); +static void efh_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const gchar *, const EMFormatHandler *); static void efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid); static gboolean efh_busy(EMFormat *); @@ -196,7 +196,7 @@ efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh) } static struct _EMFormatHTMLCache * -efh_insert_cache(EMFormatHTML *efh, const char *partid) +efh_insert_cache(EMFormatHTML *efh, const gchar *partid) { struct _EMFormatHTMLCache *efhc; @@ -259,8 +259,8 @@ em_format_html_get_type(void) sizeof(EMFormatHTML), 0, (GInstanceInitFunc)efh_init }; - const char *base_directory = e_get_user_data_dir (); - char *path; + const gchar *base_directory = e_get_user_data_dir (); + gchar *path; /* Trigger creation of mail component. */ mail_component_peek (); @@ -303,7 +303,7 @@ void em_format_html_load_http(EMFormatHTML *emfh) } void -em_format_html_set_load_http(EMFormatHTML *emfh, int style) +em_format_html_set_load_http(EMFormatHTML *emfh, gint style) { if (emfh->load_http != style) { emfh->load_http = style; @@ -312,7 +312,7 @@ em_format_html_set_load_http(EMFormatHTML *emfh, int style) } void -em_format_html_set_mark_citations(EMFormatHTML *emfh, int state, guint32 citation_colour) +em_format_html_set_mark_citations(EMFormatHTML *emfh, gint state, guint32 citation_colour) { if (emfh->mark_citations ^ state || emfh->citation_colour != citation_colour) { emfh->mark_citations = state; @@ -328,12 +328,12 @@ em_format_html_set_mark_citations(EMFormatHTML *emfh, int state, guint32 citatio } CamelMimePart * -em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *filename) +em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar *filename) { CamelMimePart *part; CamelStream *stream; CamelDataWrapper *dw; - char *basename; + gchar *basename; stream = camel_stream_fs_new_with_name(filename, O_RDONLY, 0); if (stream == NULL) @@ -358,7 +358,7 @@ em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *f /* all this api is a pain in the bum ... */ EMFormatHTMLPObject * -em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func) +em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func) { EMFormatHTMLPObject *pobj; @@ -383,7 +383,7 @@ em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, } EMFormatHTMLPObject * -em_format_html_find_pobject(EMFormatHTML *emf, const char *classid) +em_format_html_find_pobject(EMFormatHTML *emf, const gchar *classid) { EMFormatHTMLPObject *pw; @@ -431,7 +431,7 @@ em_format_html_clear_pobject(EMFormatHTML *emf) } struct _EMFormatHTMLJob * -em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, int cancelled), void *data) +em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, gint cancelled), gpointer data) { struct _EMFormatHTMLJob *job = g_malloc0(sizeof(*job)); @@ -455,22 +455,22 @@ em_format_html_job_queue(EMFormatHTML *emfh, struct _EMFormatHTMLJob *job) /* ********************************************************************** */ -static void emfh_getpuri(struct _EMFormatHTMLJob *job, int cancelled) +static void emfh_getpuri(struct _EMFormatHTMLJob *job, gint cancelled) { d(printf(" running getpuri task\n")); if (!cancelled) job->u.puri->func((EMFormat *)job->format, job->stream, job->u.puri); } -static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled) +static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled) { CamelStream *cistream = NULL, *costream = NULL, *instream = NULL; CamelURL *url; CamelContentType *content_type; CamelHttpStream *tmp_stream; ssize_t n, total = 0, pc_complete = 0, nread = 0; - char buffer[1500]; - const char *length; + gchar buffer[1500]; + const gchar *length; if (cancelled || (url = camel_url_new(job->u.uri, NULL)) == NULL) @@ -482,7 +482,7 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled) instream = cistream = camel_data_cache_get(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL); if (instream == NULL) { - char *proxy; + gchar *proxy; if (!(job->format->load_http_now @@ -567,7 +567,7 @@ badurl: /* ********************************************************************** */ static void -efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh) +efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh) { EMFormatPURI *puri; struct _EMFormatHTMLJob *job = NULL; @@ -601,7 +601,7 @@ efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMForma d(printf(" adding job, get %s\n", url)); job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url)); } else if (g_ascii_strncasecmp(url, "/", 1) == 0) { - char *data = NULL; + gchar *data = NULL; gsize length = 0; gboolean status; @@ -626,7 +626,7 @@ static gboolean efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh) { EMFormatHTMLPObject *pobject; - int res = FALSE; + gint res = FALSE; if (eb->classid == NULL) return FALSE; @@ -650,7 +650,7 @@ efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh) /* FIXME: This is duplicated in em-format-html-display, should be exported or in security module */ static const struct { - const char *icon, *shortdesc; + const gchar *icon, *shortdesc; } smime_sign_table[5] = { { "stock_signature-bad", N_("Unsigned") }, { "stock_signature-ok", N_("Valid signature") }, @@ -660,7 +660,7 @@ static const struct { }; static const struct { - const char *icon, *shortdesc; + const gchar *icon, *shortdesc; } smime_encrypt_table[4] = { { "stock_lock-broken", N_("Unencrypted") }, { "stock_lock", N_("Encrypted, weak"),}, @@ -668,7 +668,7 @@ static const struct { { "stock_lock-ok", N_("Encrypted, strong") }, }; -static const char *smime_sign_colour[4] = { +static const gchar *smime_sign_colour[4] = { "", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\"" }; @@ -686,8 +686,8 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel if (emf->valid == valid && (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE || valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) { - char *classid, *iconpath; - const char *icon; + gchar *classid, *iconpath; + const gchar *icon; CamelMimePart *iconpart; camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>", @@ -729,9 +729,9 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo CamelMultipart *mp; CamelDataWrapper *dw; CamelContentType *type; - const char *format; + const gchar *format; guint32 flags; - int i, count, len; + gint i, count, len; struct _EMFormatHTMLCache *efhc; flags = efh->text_html_flags; @@ -859,7 +859,7 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri) { #if d(!)0 CamelStream *out; - int fd; + gint fd; CamelDataWrapper *dw; fd = dup(STDOUT_FILENO); @@ -876,10 +876,10 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri) static void efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info) { - const char *location; + const gchar *location; /* This is set but never used for anything */ EMFormatPURI *puri; - char *cid = NULL; + gchar *cid = NULL; camel_stream_printf (stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; color: #%06x;\">\n" @@ -923,8 +923,8 @@ static void efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info) { CamelContentType *type; - const char *access_type; - char *url = NULL, *desc = NULL; + const gchar *access_type; + gchar *url = NULL, *desc = NULL; if (!part) { camel_stream_printf(stream, _("Unknown external-body part.")); @@ -941,9 +941,9 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part if (!g_ascii_strcasecmp(access_type, "ftp") || !g_ascii_strcasecmp(access_type, "anon-ftp")) { - const char *name, *site, *dir, *mode; - char *path; - char ftype[16]; + const gchar *name, *site, *dir, *mode; + gchar *path; + gchar ftype[16]; name = camel_content_type_param (type, "name"); site = camel_content_type_param (type, "site"); @@ -967,7 +967,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part g_free (path); desc = g_strdup_printf (_("Pointer to FTP site (%s)"), url); } else if (!g_ascii_strcasecmp (access_type, "local-file")) { - const char *name, *site; + const gchar *name, *site; name = camel_content_type_param (type, "name"); site = camel_content_type_param (type, "site"); @@ -980,8 +980,8 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part else desc = g_strdup_printf(_("Pointer to local file (%s)"), name); } else if (!g_ascii_strcasecmp (access_type, "URL")) { - const char *urlparam; - char *s, *d; + const gchar *urlparam; + gchar *s, *d; /* RFC 2017 */ @@ -1046,11 +1046,11 @@ emfh_write_related(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri) } static void -emfh_multipart_related_check(struct _EMFormatHTMLJob *job, int cancelled) +emfh_multipart_related_check(struct _EMFormatHTMLJob *job, gint cancelled) { struct _EMFormatPURITree *ptree; EMFormatPURI *puri, *purin; - char *oldpartid; + gchar *oldpartid; if (cancelled) return; @@ -1085,8 +1085,8 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); CamelMimePart *body_part, *display_part = NULL; CamelContentType *content_type; - const char *start; - int i, nparts, partidlen, displayid = 0; + const gchar *start; + gint i, nparts, partidlen, displayid = 0; /* puri is set but never used */ EMFormatPURI *puri; struct _EMFormatHTMLJob *job; @@ -1100,8 +1100,8 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c content_type = camel_mime_part_get_content_type(part); start = camel_content_type_param (content_type, "start"); if (start && strlen(start)>2) { - int len; - const char *cid; + gint len; + const gchar *cid; /* strip <>'s */ len = strlen (start) - 2; @@ -1215,7 +1215,7 @@ static EMFormatHandler type_builtin_table[] = { static void efh_builtin_init(EMFormatHTMLClass *efhc) { - int i; + gint i; for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++) em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]); @@ -1231,7 +1231,7 @@ struct _format_msg { EMFormat *format_source; EMHTMLStream *estream; CamelFolder *folder; - char *uid; + gchar *uid; CamelMimeMessage *message; }; @@ -1246,7 +1246,7 @@ efh_format_exec (struct _format_msg *m) { struct _EMFormatHTMLJob *job; struct _EMFormatPURITree *puri_level; - int cancelled = FALSE; + gint cancelled = FALSE; CamelURL *base; if (m->format->html == NULL) @@ -1440,7 +1440,7 @@ efh_format_timeout(struct _format_msg *m) return FALSE; } -static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource) +static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource) { EMFormatHTML *efh = (EMFormatHTML *)emf; struct _format_msg *m; @@ -1485,9 +1485,9 @@ static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid } } -static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt) +static void efh_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt) { - char *html; + gchar *html; html = camel_text_to_html (txt, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL|CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0); camel_stream_printf(stream, "<em><font color=\"red\">%s</font></em><br>", html); @@ -1495,10 +1495,10 @@ static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt } static void -efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *label, const char *value, guint32 flags) +efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const gchar *label, const gchar *value, guint32 flags) { - const char *fmt, *html; - char *mhtml = NULL; + const gchar *fmt, *html; + gchar *mhtml = NULL; gboolean is_rtl; if (value == NULL) @@ -1557,11 +1557,11 @@ static gchar * efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_address *a, gchar *field) { guint32 flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES; - char *name, *mailto, *addr; - int i=0; + gchar *name, *mailto, *addr; + gint i=0; gboolean wrap = FALSE; - char *str = NULL; - int limit = mail_config_get_address_count (); + gchar *str = NULL; + gint limit = mail_config_get_address_count (); if (field ) { if ((!strcmp (field, _("To")) && !(efh->header_wrap_flags & EM_FORMAT_HTML_HEADER_TO)) @@ -1579,11 +1579,11 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres switch (a->type) { case CAMEL_HEADER_ADDRESS_NAME: if (name && *name) { - char *real, *mailaddr; + gchar *real, *mailaddr; g_string_append_printf (out, "%s <", name); /* rfc2368 for mailto syntax and url encoding extras */ - if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) { + if ((real = camel_header_encode_phrase ((guchar *)a->name))) { mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr); g_free (real); mailto = camel_url_encode (mailaddr, "?=&()"); @@ -1664,9 +1664,9 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres } static void -canon_header_name (char *name) +canon_header_name (gchar *name) { - char *inptr = name; + gchar *inptr = name; /* canonicalise the header name... first letter is * capitalised and any letter following a '-' also gets @@ -1688,14 +1688,14 @@ canon_header_name (char *name) } static void -efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const char *charset) +efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const gchar *charset) { EMFormatHTML *efh = (EMFormatHTML *)emf; - char *name, *buf, *value = NULL; - const char *label, *txt; + gchar *name, *buf, *value = NULL; + const gchar *label, *txt; gboolean addrspec = FALSE; - char *str_field = NULL; - int i; + gchar *str_field = NULL; + gint i; name = alloca(strlen(header->name)+1); strcpy(name, header->name); @@ -1713,7 +1713,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct if (addrspec) { struct _camel_header_address *addrs; GString *html; - char *img; + gchar *img; buf = camel_header_unfold (header->value); if (!(addrs = camel_header_address_decode (buf, emf->charset ? emf->charset : emf->default_charset))) { @@ -1724,7 +1724,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct g_free (buf); html = g_string_new(""); - img = efh_format_address(efh, html, addrs, (char *)label); + img = efh_format_address(efh, html, addrs, (gchar *)label); if (img) { str_field = g_strdup_printf ("%s%s:", img, label); @@ -1750,7 +1750,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct txt = value = camel_header_format_ctext (header->value, charset); flags |= EM_FORMAT_HEADER_BOLD; } else if (!strcmp (name, "Date") || !strcmp (name, "Resent-Date")) { - int msg_offset, local_tz; + gint msg_offset, local_tz; time_t msg_date; struct tm local; @@ -1768,17 +1768,17 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct msg_offset -= local_tz / 60; if (msg_offset) { - char buf[256], *html; + gchar buf[256], *html; msg_offset += (local.tm_hour * 60) + local.tm_min; if (msg_offset >= (24 * 60) || msg_offset < 0) { /* translators: strftime format for local time equivalent in Date header display, with day */ - char *msg = g_strdup_printf("<I>%s</I>", _(" (%a, %R %Z)")); + gchar *msg = g_strdup_printf("<I>%s</I>", _(" (%a, %R %Z)")); e_utf8_strftime(buf, sizeof(buf), msg, &local); g_free(msg); } else { /* translators: strftime format for local time equivalent in Date header display, without day */ - char *msg = g_strdup_printf("<I>%s</I>", _(" (%R %Z)")); + gchar *msg = g_strdup_printf("<I>%s</I>", _(" (%R %Z)")); e_utf8_strftime(buf, sizeof(buf), msg, &local); g_free(msg); } @@ -1838,18 +1838,18 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) { EMFormat *emf = (EMFormat *) efh; EMFormatHeader *h; - const char *charset; + const gchar *charset; CamelContentType *ct; struct _camel_header_raw *header; gboolean have_icon = FALSE; - const char *photo_name = NULL; + const gchar *photo_name = NULL; CamelInternetAddress *cia = NULL; gboolean face_decoded = FALSE, contact_has_photo = FALSE; guchar *face_header_value = NULL; gsize face_header_len = 0; - char *header_sender = NULL, *header_from = NULL, *name; + gchar *header_sender = NULL, *header_from = NULL, *name; gboolean mail_from_delegate = FALSE; - const char *hdr_charset; + const gchar *hdr_charset; if (!part) return; @@ -1935,9 +1935,9 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) header = header->next; } } else { - int mailer_shown = FALSE; + gint mailer_shown = FALSE; while (h->next) { - int mailer, face; + gint mailer, face; header = ((CamelMimePart *)part)->headers; mailer = !g_ascii_strcasecmp (h->name, "X-Evolution-Mailer"); @@ -1975,7 +1975,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) if (strstr(use_header->value, "Evolution")) have_icon = TRUE; } else if (!face_decoded && face && !g_ascii_strcasecmp (header->name, "Face")) { - char *cp = header->value; + gchar *cp = header->value; /* Skip over spaces */ while (*cp == ' ') @@ -2000,11 +2000,11 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) camel_stream_printf(stream, "</table></td>"); if (photo_name) { - char *classid; + gchar *classid; CamelMimePart *photopart; cia = camel_internet_address_new(); - camel_address_decode((CamelAddress *) cia, (const char *) photo_name); + camel_address_decode((CamelAddress *) cia, (const gchar *) photo_name); photopart = em_utils_contact_photo (cia, emf->photo_local); if (photopart) { @@ -2024,11 +2024,11 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) } if (!contact_has_photo && face_decoded) { - char *classid; + gchar *classid; CamelMimePart *part; part = camel_mime_part_new (); - camel_mime_part_set_content ((CamelMimePart *) part, (const char *) face_header_value, face_header_len, "image/png"); + camel_mime_part_set_content ((CamelMimePart *) part, (const gchar *) face_header_value, face_header_len, "image/png"); classid = g_strdup_printf("icon:///em-format-html/face/photo/header"); camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=48 src=\"%s\"></td>", classid); em_format_add_puri(emf, sizeof(EMFormatPURI), classid, part, efh_write_image); @@ -2037,7 +2037,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) if (have_icon && efh->show_icon) { GtkIconInfo *icon_info; - char *classid; + gchar *classid; CamelMimePart *iconpart = NULL; classid = g_strdup_printf("icon:///em-format-html/%s/icon/header", emf->part_id->str); @@ -2117,9 +2117,9 @@ static void efh_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart } static void -efh_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle) +efh_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type, const EMFormatHandler *handle) { - char *text, *html; + gchar *text, *html; /* we display all inlined attachments only */ diff --git a/mail/em-format-html.h b/mail/em-format-html.h index eb8aec96e9..776a5fb9c9 100644 --- a/mail/em-format-html.h +++ b/mail/em-format-html.h @@ -114,13 +114,13 @@ struct _EMFormatHTMLJob { struct _EMFormatPURITree *puri_level; CamelURL *base; - void (*callback)(EMFormatHTMLJob *job, int cancelled); + void (*callback)(EMFormatHTMLJob *job, gint cancelled); union { - char *uri; + gchar *uri; CamelMedium *msg; EMFormatPURI *puri; struct _EMFormatPURITree *puri_level; - void *data; + gpointer data; } u; }; @@ -154,7 +154,7 @@ struct _EMFormatHTMLPObject { void (*free)(EMFormatHTMLPObject *); EMFormatHTML *format; - char *classid; + gchar *classid; EMFormatHTMLPObjectFunc func; CamelMimePart *part; @@ -213,12 +213,12 @@ struct _EMFormatHTML { guint32 frame_colour; guint32 content_colour; guint32 citation_colour; - unsigned int load_http:2; - unsigned int load_http_now:1; - unsigned int mark_citations:1; - unsigned int simple_headers:1; /* simple header format, no box/table */ - unsigned int hide_headers:1; /* no headers at all */ - unsigned int show_icon:1; /* show an icon when the sender used Evo */ + guint load_http:2; + guint load_http_now:1; + guint mark_citations:1; + guint simple_headers:1; /* simple header format, no box/table */ + guint hide_headers:1; /* no headers at all */ + guint show_icon:1; /* show an icon when the sender used Evo */ guint32 header_wrap_flags; EMFormatHTMLState state; /* actual state of the object */ @@ -233,10 +233,10 @@ EMFormatHTML * em_format_html_new (void); void em_format_html_load_http (EMFormatHTML *efh); void em_format_html_set_load_http (EMFormatHTML *efh, - int style); + gint style); void em_format_html_set_mark_citations (EMFormatHTML *efh, - int state, + gint state, guint32 citation_colour); /* retrieves a pseudo-part icon wrapper for a file */ @@ -248,12 +248,12 @@ CamelMimePart * em_format_html_file_part (EMFormatHTML *efh, EMFormatHTMLPObject * em_format_html_add_pobject (EMFormatHTML *efh, size_t size, - const char *classid, + const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func); EMFormatHTMLPObject * em_format_html_find_pobject (EMFormatHTML *efh, - const char *classid); + const gchar *classid); EMFormatHTMLPObject * em_format_html_find_pobject_func(EMFormatHTML *efh, CamelMimePart *part, @@ -264,8 +264,8 @@ void em_format_html_clear_pobject (EMFormatHTML *efh); EMFormatHTMLJob * em_format_html_job_new (EMFormatHTML *efh, - void (*callback)(EMFormatHTMLJob *job, int cancelled), - void *data); + void (*callback)(EMFormatHTMLJob *job, gint cancelled), + gpointer data); void em_format_html_job_queue (EMFormatHTML *efh, EMFormatHTMLJob *job); diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c index 85249a293c..a61c3f26f5 100644 --- a/mail/em-format-quote.c +++ b/mail/em-format-quote.c @@ -44,14 +44,14 @@ #include "mail-config.h" struct _EMFormatQuotePrivate { - int dummy; + gint dummy; }; -static void emfq_format_clone(EMFormat *, CamelFolder *, const char *, CamelMimeMessage *, EMFormat *); -static void emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt); +static void emfq_format_clone(EMFormat *, CamelFolder *, const gchar *, CamelMimeMessage *, EMFormat *); +static void emfq_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt); static void emfq_format_message(EMFormat *, CamelStream *, CamelMimePart *, const EMFormatHandler *); static void emfq_format_source(EMFormat *, CamelStream *, CamelMimePart *); -static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *); +static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const gchar *, const EMFormatHandler *); static void emfq_builtin_init(EMFormatQuoteClass *efhc); @@ -122,7 +122,7 @@ em_format_quote_get_type(void) } EMFormatQuote * -em_format_quote_new(const char *credits, CamelStream *stream, guint32 flags) +em_format_quote_new(const gchar *credits, CamelStream *stream, guint32 flags) { EMFormatQuote *emfq; @@ -143,7 +143,7 @@ emfq_format_empty_line(EMFormat *emf, CamelStream *stream, CamelMimePart *part, } static void -emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src) +emfq_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *src) { EMFormatQuote *emfq = (EMFormatQuote *) emf; const EMFormatHandler *handle; @@ -166,16 +166,16 @@ emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMime } static void -emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt) +emfq_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt) { /* FIXME: should we even bother writing error text for quoting? probably not... */ } static void -emfq_format_text_header (EMFormatQuote *emfq, CamelStream *stream, const char *label, const char *value, guint32 flags, int is_html) +emfq_format_text_header (EMFormatQuote *emfq, CamelStream *stream, const gchar *label, const gchar *value, guint32 flags, gint is_html) { - const char *fmt, *html; - char *mhtml = NULL; + const gchar *fmt, *html; + gchar *mhtml = NULL; if (value == NULL) return; @@ -206,7 +206,7 @@ static const gchar *addrspec_hdrs[] = { #if 0 /* FIXME: include Sender and Resent-* headers too? */ /* For Translators only: The following strings are used in the header table in the preview pane */ -static char *i18n_hdrs[] = { +static gchar *i18n_hdrs[] = { N_("From"), N_("Reply-To"), N_("To"), N_("Cc"), N_("Bcc") }; #endif @@ -215,7 +215,7 @@ static void emfq_format_address (GString *out, struct _camel_header_address *a) { guint32 flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES; - char *name, *mailto, *addr; + gchar *name, *mailto, *addr; while (a) { if (a->name) @@ -226,11 +226,11 @@ emfq_format_address (GString *out, struct _camel_header_address *a) switch (a->type) { case CAMEL_HEADER_ADDRESS_NAME: if (name && *name) { - char *real, *mailaddr; + gchar *real, *mailaddr; g_string_append_printf (out, "%s <", name); /* rfc2368 for mailto syntax and url encoding extras */ - if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) { + if ((real = camel_header_encode_phrase ((guchar *)a->name))) { mailaddr = g_strdup_printf ("%s <%s>", real, a->v.addr); g_free (real); mailto = camel_url_encode (mailaddr, "?=&()"); @@ -268,9 +268,9 @@ emfq_format_address (GString *out, struct _camel_header_address *a) } static void -canon_header_name (char *name) +canon_header_name (gchar *name) { - char *inptr = name; + gchar *inptr = name; /* canonicalise the header name... first letter is * capitalised and any letter following a '-' also gets @@ -292,15 +292,15 @@ canon_header_name (char *name) } static void -emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const char *namein, guint32 flags, const char *charset) +emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const gchar *namein, guint32 flags, const gchar *charset) { CamelMimeMessage *msg = (CamelMimeMessage *) part; EMFormatQuote *emfq = (EMFormatQuote *) emf; - char *name, *buf, *value = NULL; - const char *txt, *label; + gchar *name, *buf, *value = NULL; + const gchar *txt, *label; gboolean addrspec = FALSE; - int is_html = FALSE; - int i; + gint is_html = FALSE; + gint i; name = g_alloca (strlen (namein) + 1); strcpy (name, namein); @@ -374,7 +374,7 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part { EMFormat *emf = (EMFormat *) emfq; CamelContentType *ct; - const char *charset; + const gchar *charset; EMFormatHeader *h; if (!part) @@ -442,10 +442,10 @@ emfq_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part) } static void -emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle) +emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type, const EMFormatHandler *handle) { if (handle && em_format_is_inline(emf, emf->part_id->str, part, handle)) { - char *text, *html; + gchar *text, *html; camel_stream_write_string(stream, "<table border=1 cellspacing=0 cellpadding=0><tr><td><font size=-1>\n"); @@ -475,7 +475,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E CamelMimeFilter *html_filter; CamelMimeFilter *sig_strip; CamelContentType *type; - const char *format; + const gchar *format; guint32 rgb = 0x737373, flags; if (!part) @@ -565,7 +565,7 @@ static EMFormatHandler type_builtin_table[] = { static void emfq_builtin_init(EMFormatQuoteClass *efhc) { - int i; + gint i; for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++) em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]); diff --git a/mail/em-format-quote.h b/mail/em-format-quote.h index 86d277b26e..be88be5956 100644 --- a/mail/em-format-quote.h +++ b/mail/em-format-quote.h @@ -59,7 +59,7 @@ struct _EMFormatQuote { EMFormatQuotePrivate *priv; - char *credits; + gchar *credits; CamelStream *stream; guint32 flags; diff --git a/mail/em-format.c b/mail/em-format.c index 6b12fedae4..85459682ad 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -65,9 +65,9 @@ struct _EMFormatCache { struct _CamelCipherValidity *valid; /* validity copy */ struct _CamelMimePart *secured; /* encrypted subpart */ - unsigned int state:2; /* inline state */ + guint state:2; /* inline state */ - char partid[1]; + gchar partid[1]; }; #define INLINE_UNSET (0) @@ -76,8 +76,8 @@ struct _EMFormatCache { static void emf_builtin_init(EMFormatClass *); -static const EMFormatHandler *emf_find_handler(EMFormat *emf, const char *mime_type); -static void emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource); +static const EMFormatHandler *emf_find_handler(EMFormat *emf, const gchar *mime_type); +static void emf_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource); static void emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid); static gboolean emf_busy(EMFormat *emf); enum { @@ -101,7 +101,7 @@ emf_free_cache(struct _EMFormatCache *efc) } static struct _EMFormatCache * -emf_insert_cache(EMFormat *emf, const char *partid) +emf_insert_cache(EMFormat *emf, const gchar *partid) { struct _EMFormatCache *new; @@ -297,7 +297,7 @@ em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info) * Return value: NULL if no handler is available. **/ static const EMFormatHandler * -emf_find_handler(EMFormat *emf, const char *mime_type) +emf_find_handler(EMFormat *emf, const gchar *mime_type) { EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS(emf); @@ -316,13 +316,13 @@ emf_find_handler(EMFormat *emf, const char *mime_type) * Return value: **/ const EMFormatHandler * -em_format_fallback_handler(EMFormat *emf, const char *mime_type) +em_format_fallback_handler(EMFormat *emf, const gchar *mime_type) { - char *mime, *s; + gchar *mime, *s; s = strchr(mime_type, '/'); if (s == NULL) - mime = (char *)mime_type; + mime = (gchar *)mime_type; else { size_t len = (s-mime_type)+1; @@ -359,10 +359,10 @@ em_format_fallback_handler(EMFormat *emf, const char *mime_type) * are resolved by forgetting the old PURI in the global index. **/ EMFormatPURI * -em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *part, EMFormatPURIFunc func) +em_format_add_puri(EMFormat *emf, size_t size, const gchar *cid, CamelMimePart *part, EMFormatPURIFunc func) { EMFormatPURI *puri; - const char *tmp; + const gchar *tmp; d(printf("adding puri for part: %s\n", emf->part_id->str)); @@ -479,7 +479,7 @@ em_format_pull_level(EMFormat *emf) * Return value: **/ EMFormatPURI * -em_format_find_visible_puri(EMFormat *emf, const char *uri) +em_format_find_visible_puri(EMFormat *emf, const gchar *uri) { EMFormatPURI *pw; struct _EMFormatPURITree *ptree; @@ -513,7 +513,7 @@ em_format_find_visible_puri(EMFormat *emf, const char *uri) **/ EMFormatPURI * -em_format_find_puri(EMFormat *emf, const char *uri) +em_format_find_puri(EMFormat *emf, const gchar *uri) { return g_hash_table_lookup(emf->pending_uri_table, uri); } @@ -582,12 +582,12 @@ em_format_clear_puri_tree(EMFormat *emf) /* use mime_type == NULL to force showing as application/octet-stream */ void -em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type) +em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type) { const EMFormatHandler *handle = NULL; - const char *snoop_save = emf->snoop_mime_type, *tmp; + const gchar *snoop_save = emf->snoop_mime_type, *tmp; CamelURL *base_save = emf->base, *base = NULL; - char *basestr = NULL; + gchar *basestr = NULL; d(printf("format_part_as()\n")); @@ -645,7 +645,7 @@ finish: void em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part) { - char *mime_type; + gchar *mime_type; CamelDataWrapper *dw; dw = camel_medium_get_content_object((CamelMedium *)part); @@ -659,7 +659,7 @@ em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part) } static void -emf_clone_inlines(void *key, void *val, void *data) +emf_clone_inlines(gpointer key, gpointer val, gpointer data) { struct _EMFormatCache *emfc = val, *new; @@ -672,7 +672,7 @@ emf_clone_inlines(void *key, void *val, void *data) } static void -emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource) +emf_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource) { em_format_clear_puri_tree(emf); @@ -729,7 +729,7 @@ static void emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid) { CamelCipherValidity *save = emf->valid_parent; - int len; + gint len; /* Note that this also requires support from higher up in the class chain - validity needs to be cleared when you start output @@ -861,7 +861,7 @@ em_format_set_mode(EMFormat *emf, em_format_mode_t type) * required. **/ void -em_format_set_charset(EMFormat *emf, const char *charset) +em_format_set_charset(EMFormat *emf, const gchar *charset) { if ((emf->charset && charset && g_ascii_strcasecmp(emf->charset, charset) == 0) || (emf->charset == NULL && charset == NULL) @@ -885,7 +885,7 @@ em_format_set_charset(EMFormat *emf, const char *charset) * when it isn't). **/ void -em_format_set_default_charset(EMFormat *emf, const char *charset) +em_format_set_default_charset(EMFormat *emf, const gchar *charset) { if ((emf->default_charset && charset && g_ascii_strcasecmp(emf->default_charset, charset) == 0) || (emf->default_charset == NULL && charset == NULL) @@ -917,7 +917,7 @@ em_format_clear_headers(EMFormat *emf) /* note: also copied in em-mailer-prefs.c */ static const struct { - const char *name; + const gchar *name; guint32 flags; } default_headers[] = { { N_("From"), EM_FORMAT_HEADER_BOLD }, @@ -942,7 +942,7 @@ static const struct { void em_format_default_headers(EMFormat *emf) { - int i; + gint i; em_format_clear_headers(emf); for (i=0; i<sizeof(default_headers)/sizeof(default_headers[0]); i++) @@ -960,7 +960,7 @@ em_format_default_headers(EMFormat *emf) * headers included in this list will be shown using special * formatting routines. **/ -void em_format_add_header(EMFormat *emf, const char *name, guint32 flags) +void em_format_add_header(EMFormat *emf, const gchar *name, guint32 flags) { EMFormatHeader *h; @@ -986,7 +986,7 @@ void em_format_add_header(EMFormat *emf, const char *name, guint32 flags) * * Return value: TRUE/FALSE **/ -int em_format_is_attachment(EMFormat *emf, CamelMimePart *part) +gint em_format_is_attachment(EMFormat *emf, CamelMimePart *part) { /*CamelContentType *ct = camel_mime_part_get_content_type(part);*/ CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part); @@ -1021,10 +1021,10 @@ int em_format_is_attachment(EMFormat *emf, CamelMimePart *part) * * Return value: **/ -int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, const EMFormatHandler *handle) +gint em_format_is_inline(EMFormat *emf, const gchar *partid, CamelMimePart *part, const EMFormatHandler *handle) { struct _EMFormatCache *emfc; - const char *tmp; + const gchar *tmp; if (handle == NULL) return FALSE; @@ -1055,7 +1055,7 @@ int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, * @state. This is used only to record the change for a redraw or * cloned layout render and does not force a redraw. **/ -void em_format_set_inline(EMFormat *emf, const char *partid, int state) +void em_format_set_inline(EMFormat *emf, const gchar *partid, gint state) { struct _EMFormatCache *emfc; @@ -1071,10 +1071,10 @@ void em_format_set_inline(EMFormat *emf, const char *partid, int state) em_format_redraw(emf); } -void em_format_format_error(EMFormat *emf, CamelStream *stream, const char *fmt, ...) +void em_format_format_error(EMFormat *emf, CamelStream *stream, const gchar *fmt, ...) { va_list ap; - char *txt; + gchar *txt; va_start(ap, fmt); txt = g_strdup_vprintf(fmt, ap); @@ -1118,7 +1118,7 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw) { CamelStreamFilter *filter_stream; CamelMimeFilterCharset *filter; - const char *charset = NULL; + const gchar *charset = NULL; CamelMimeFilterWindows *windows = NULL; CamelStream *mem_stream = NULL; size_t size; @@ -1187,12 +1187,12 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw) * * Return value: **/ -char * -em_format_describe_part(CamelMimePart *part, const char *mime_type) +gchar * +em_format_describe_part(CamelMimePart *part, const gchar *mime_type) { GString *stext; - const char *filename, *description; - char *content_type, *desc; + const gchar *filename, *description; + gchar *content_type, *desc; stext = g_string_new(""); content_type = g_content_type_from_mime_type (mime_type); @@ -1260,7 +1260,7 @@ emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *par { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); CamelMimePart *mime_part; - int len; + gint len; if (!CAMEL_IS_MULTIPART(mp)) { em_format_format_source(emf, stream, part); @@ -1284,7 +1284,7 @@ static void emf_multipart_mixed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info) { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); - int i, nparts, len; + gint i, nparts, len; if (!CAMEL_IS_MULTIPART(mp)) { em_format_format_source(emf, stream, part); @@ -1306,7 +1306,7 @@ static void emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info) { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); - int i, nparts, bestid = 0; + gint i, nparts, bestid = 0; CamelMimePart *best = NULL; if (!CAMEL_IS_MULTIPART(mp)) { @@ -1318,7 +1318,7 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par nparts = camel_multipart_get_number(mp); for (i = 0; i < nparts; i++) { CamelContentType *type; - char *mime_type; + gchar *mime_type; /* is it correct to use the passed in *part here? */ part = camel_multipart_get_part(mp, i); @@ -1344,7 +1344,7 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par } if (best) { - int len = emf->part_id->len; + gint len = emf->part_id->len; g_string_append_printf(emf->part_id, ".alternative.%d", bestid); em_format_part(emf, stream, best); @@ -1358,7 +1358,7 @@ emf_multipart_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *part, { CamelCipherContext *context; CamelException *ex; - const char *protocol; + const gchar *protocol; CamelMimePart *opart; CamelCipherValidity *valid; CamelMultipartEncrypted *mpe; @@ -1425,9 +1425,9 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part); CamelMimePart *body_part, *display_part = NULL; CamelContentType *content_type; - const char *start; - int i, nparts, partidlen, displayid = 0; - char *oldpartid; + const gchar *start; + gint i, nparts, partidlen, displayid = 0; + gchar *oldpartid; struct _EMFormatPURITree *ptree; EMFormatPURI *puri, *purin; @@ -1441,8 +1441,8 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c content_type = camel_mime_part_get_content_type(part); start = camel_content_type_param (content_type, "start"); if (start && strlen(start)>2) { - int len; - const char *cid; + gint len; + const gchar *cid; /* strip <>'s */ len = strlen (start) - 2; @@ -1581,7 +1581,7 @@ emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, cons { CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part); const EMFormatHandler *handle; - int len; + gint len; if (!CAMEL_IS_MIME_MESSAGE(dw)) { em_format_format_source(emf, stream, part); @@ -1616,7 +1616,7 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E CamelMimePart *opart; CamelStream *ostream; CamelException *ex; - char *type; + gchar *type; if (!ipart) { em_format_format_error(emf, stream, _("Unknown error verifying signature")); @@ -1694,7 +1694,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart CamelException *ex; CamelMimePart *opart; CamelDataWrapper *dw; - char *mime_type; + gchar *mime_type; cipher = camel_gpg_context_new(emf->session); ex = camel_exception_new(); @@ -1718,7 +1718,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart /* this ensures to show the 'opart' as inlined, if possible */ if (mime_type && g_ascii_strcasecmp (mime_type, "application/octet-stream") == 0) { - const char *snoop = em_utils_snoop_type (opart); + const gchar *snoop = em_utils_snoop_type (opart); if (snoop) camel_data_wrapper_set_mime_type (dw, snoop); @@ -1764,7 +1764,7 @@ static EMFormatHandler type_builtin_table[] = { static void emf_builtin_init(EMFormatClass *klass) { - int i; + gint i; for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++) g_hash_table_insert(klass->type_handlers, (gpointer) type_builtin_table[i].mime_type, &type_builtin_table[i]); diff --git a/mail/em-format.h b/mail/em-format.h index e2363c2b8e..3602e5b75e 100644 --- a/mail/em-format.h +++ b/mail/em-format.h @@ -140,14 +140,14 @@ struct _EMFormatPURI { void (*free)(struct _EMFormatPURI *p); /* optional callback for freeing user-fields */ struct _EMFormat *format; - char *uri; /* will be the location of the part, may be empty */ - char *cid; /* will always be set, a fake one created if needed */ - char *part_id; /* will always be set, emf->part_id->str for this part */ + gchar *uri; /* will be the location of the part, may be empty */ + gchar *cid; /* will always be set, a fake one created if needed */ + gchar *part_id; /* will always be set, emf->part_id->str for this part */ EMFormatPURIFunc func; CamelMimePart *part; - unsigned int use_count; /* used by multipart/related to see if it was accessed */ + guint use_count; /* used by multipart/related to see if it was accessed */ }; /** @@ -176,7 +176,7 @@ struct _EMFormatHeader { struct _EMFormatHeader *next, *prev; guint32 flags; /* E_FORMAT_HEADER_* */ - char name[1]; + gchar name[1]; }; #define EM_FORMAT_HEADER_BOLD (1<<0) @@ -218,7 +218,7 @@ struct _EMFormat { CamelMimeMessage *message; /* the current message */ CamelFolder *folder; - char *uid; + gchar *uid; GString *part_id; /* current part id prefix, for identifying parts directly */ @@ -227,7 +227,7 @@ struct _EMFormat { CamelSession *session; /* session, used for authentication when required */ CamelURL *base; /* content-base header or absolute content-location, for any part */ - const char *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */ + const gchar *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */ /* for validity enveloping */ CamelCipherValidity *valid; @@ -245,8 +245,8 @@ struct _EMFormat { struct _EMFormatPURITree *pending_uri_level; em_format_mode_t mode; /* source/headers/etc */ - char *charset; /* charset override */ - char *default_charset; /* charset fallback */ + gchar *charset; /* charset override */ + gchar *default_charset; /* charset fallback */ gboolean composer; /* Formatting from composer ?*/ gboolean print; gboolean show_photo; /* Want to show the photo of the sender ?*/ @@ -259,16 +259,16 @@ struct _EMFormatClass { GHashTable *type_handlers; /* lookup handler, default falls back to hashtable above */ - const EMFormatHandler *(*find_handler)(EMFormat *, const char *mime_type); + const EMFormatHandler *(*find_handler)(EMFormat *, const gchar *mime_type); /* start formatting a message */ - void (*format_clone)(EMFormat *, CamelFolder *, const char *uid, CamelMimeMessage *, EMFormat *); + void (*format_clone)(EMFormat *, CamelFolder *, const gchar *uid, CamelMimeMessage *, EMFormat *); /* some internel error/inconsistency */ - void (*format_error)(EMFormat *, CamelStream *, const char *msg); + void (*format_error)(EMFormat *, CamelStream *, const gchar *msg); /* use for external structured parts */ - void (*format_attachment)(EMFormat *, CamelStream *, CamelMimePart *, const char *mime_type, const struct _EMFormatHandler *info); + void (*format_attachment)(EMFormat *, CamelStream *, CamelMimePart *, const gchar *mime_type, const struct _EMFormatHandler *info); /* use for unparsable content */ void (*format_source)(EMFormat *, CamelStream *, CamelMimePart *); @@ -290,22 +290,22 @@ struct _EMFormatClass { void em_format_set_session(EMFormat *emf, CamelSession *s); void em_format_set_mode(EMFormat *emf, em_format_mode_t type); -void em_format_set_charset(EMFormat *emf, const char *charset); -void em_format_set_default_charset(EMFormat *emf, const char *charset); +void em_format_set_charset(EMFormat *emf, const gchar *charset); +void em_format_set_default_charset(EMFormat *emf, const gchar *charset); void em_format_clear_headers(EMFormat *emf); /* also indicates to show all headers */ void em_format_default_headers(EMFormat *emf); -void em_format_add_header(EMFormat *emf, const char *name, guint32 flags); +void em_format_add_header(EMFormat *emf, const gchar *name, guint32 flags); /* FIXME: Need a 'clone' api to copy details about the current view (inlines etc) Or maybe it should live with sub-classes? */ -int em_format_is_attachment(EMFormat *emf, CamelMimePart *part); +gint em_format_is_attachment(EMFormat *emf, CamelMimePart *part); -int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, const EMFormatHandler *handle); -void em_format_set_inline(EMFormat *emf, const char *partid, int state); +gint em_format_is_inline(EMFormat *emf, const gchar *partid, CamelMimePart *part, const EMFormatHandler *handle); +void em_format_set_inline(EMFormat *emf, const gchar *partid, gint state); -char *em_format_describe_part(CamelMimePart *part, const char *mimetype); +gchar *em_format_describe_part(CamelMimePart *part, const gchar *mimetype); /* for implementers */ GType em_format_get_type(void); @@ -313,12 +313,12 @@ GType em_format_get_type(void); void em_format_class_add_handler(EMFormatClass *emfc, EMFormatHandler *info); void em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info); #define em_format_find_handler(emf, type) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->find_handler((emf), (type)) -const EMFormatHandler *em_format_fallback_handler(EMFormat *emf, const char *mime_type); +const EMFormatHandler *em_format_fallback_handler(EMFormat *emf, const gchar *mime_type); /* puri is short for pending uri ... really */ -EMFormatPURI *em_format_add_puri(EMFormat *emf, size_t size, const char *uri, CamelMimePart *part, EMFormatPURIFunc func); -EMFormatPURI *em_format_find_visible_puri(EMFormat *emf, const char *uri); -EMFormatPURI *em_format_find_puri(EMFormat *emf, const char *uri); +EMFormatPURI *em_format_add_puri(EMFormat *emf, size_t size, const gchar *uri, CamelMimePart *part, EMFormatPURIFunc func); +EMFormatPURI *em_format_find_visible_puri(EMFormat *emf, const gchar *uri); +EMFormatPURI *em_format_find_puri(EMFormat *emf, const gchar *uri); void em_format_clear_puri_tree(EMFormat *emf); void em_format_push_level(EMFormat *emf); void em_format_pull_level(EMFormat *emf); @@ -328,7 +328,7 @@ void em_format_format_clone (EMFormat *emf, CamelFolder *folder, const gchar *ui /* formats a new message */ void em_format_format(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *message); void em_format_redraw(EMFormat *emf); -void em_format_format_error(EMFormat *emf, CamelStream *stream, const char *fmt, ...); +void em_format_format_error(EMFormat *emf, CamelStream *stream, const gchar *fmt, ...); #define em_format_format_attachment(emf, stream, msg, type, info) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment((emf), (stream), (msg), (type), (info)) #define em_format_format_source(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_source((emf), (stream), (msg)) void em_format_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid); @@ -340,7 +340,7 @@ void em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart /* raw content text parts - should this just be checked/done by above? */ void em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *part); -void em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type); +void em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type); void em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part); void em_format_merge_handler(EMFormat *new, EMFormat *old); diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c index a1615d2d6a..a3284ab33e 100644 --- a/mail/em-html-stream.c +++ b/mail/em-html-stream.c @@ -38,9 +38,9 @@ static void em_html_stream_class_init (EMHTMLStreamClass *klass); static void em_html_stream_init (CamelObject *object); static void em_html_stream_finalize (CamelObject *object); -static ssize_t emhs_sync_write(CamelStream *stream, const char *buffer, size_t n); -static int emhs_sync_close(CamelStream *stream); -static int emhs_sync_flush(CamelStream *stream); +static ssize_t emhs_sync_write(CamelStream *stream, const gchar *buffer, size_t n); +static gint emhs_sync_close(CamelStream *stream); +static gint emhs_sync_flush(CamelStream *stream); static EMSyncStreamClass *parent_class = NULL; @@ -104,7 +104,7 @@ em_html_stream_finalize (CamelObject *object) } static ssize_t -emhs_sync_write(CamelStream *stream, const char *buffer, size_t n) +emhs_sync_write(CamelStream *stream, const gchar *buffer, size_t n) { EMHTMLStream *emhs = EM_HTML_STREAM (stream); diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c index b06145acc0..91dc5e10ca 100644 --- a/mail/em-icon-stream.c +++ b/mail/em-icon-stream.c @@ -50,15 +50,15 @@ static void em_icon_stream_class_init (EMIconStreamClass *klass); static void em_icon_stream_init (CamelObject *object); static void em_icon_stream_finalize (CamelObject *object); -static ssize_t emis_sync_write(CamelStream *stream, const char *buffer, size_t n); -static int emis_sync_close(CamelStream *stream); -static int emis_sync_flush(CamelStream *stream); +static ssize_t emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n); +static gint emis_sync_close(CamelStream *stream); +static gint emis_sync_flush(CamelStream *stream); static EMSyncStreamClass *parent_class = NULL; static EMCache *emis_cache; static void -emis_cache_free(void *data) +emis_cache_free(gpointer data) { struct _emis_cache_node *node = data; @@ -133,14 +133,14 @@ em_icon_stream_finalize(CamelObject *object) } static ssize_t -emis_sync_write(CamelStream *stream, const char *buffer, size_t n) +emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n) { EMIconStream *emis = EM_ICON_STREAM (stream); if (emis->loader == NULL) return -1; - if (!gdk_pixbuf_loader_write(emis->loader, (const unsigned char *)buffer, n, NULL)) { + if (!gdk_pixbuf_loader_write(emis->loader, (const guchar *)buffer, n, NULL)) { emis_cleanup(emis); return -1; } @@ -155,10 +155,10 @@ emis_sync_flush(CamelStream *stream) } static GdkPixbuf * -emis_fit(GdkPixbuf *pixbuf, int maxwidth, int maxheight, int *scale) +emis_fit(GdkPixbuf *pixbuf, gint maxwidth, gint maxheight, gint *scale) { GdkPixbuf *mini = NULL; - int width, height; + gint width, height; width = gdk_pixbuf_get_width(pixbuf); height = gdk_pixbuf_get_height(pixbuf); @@ -196,8 +196,8 @@ emis_sync_close(CamelStream *stream) EMIconStream *emis = (EMIconStream *)stream; GdkPixbuf *pixbuf, *mini; struct _emis_cache_node *node; - char *scalekey; - int scale; + gchar *scalekey; + gint scale; if (emis->loader == NULL) return -1; @@ -244,7 +244,7 @@ emis_image_destroy(struct _GtkImage *image, EMIconStream *emis) } CamelStream * -em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsigned int maxheight, int keep) +em_icon_stream_new(GtkImage *image, const gchar *key, guint maxwidth, guint maxheight, gint keep) { EMIconStream *new; @@ -261,11 +261,11 @@ em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsi } GdkPixbuf * -em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int maxheight) +em_icon_stream_get_image(const gchar *tkey, guint maxwidth, guint maxheight) { struct _emis_cache_node *node; GdkPixbuf *pb = NULL; - const char *key; + const gchar *key; key = tkey ? tkey : ""; @@ -274,7 +274,7 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m node = (struct _emis_cache_node *)em_cache_lookup(emis_cache, key); if (node) { - int width, height; + gint width, height; pb = node->pixbuf; g_object_ref(pb); @@ -285,8 +285,8 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m if ((maxwidth && width > maxwidth) || (maxheight && height > maxheight)) { - unsigned int scale; - char *realkey; + guint scale; + gchar *realkey; if (maxheight == 0 || width >= height) scale = width * EMIS_SCALE / maxwidth; @@ -317,12 +317,12 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m return pb; } -int -em_icon_stream_is_resized(const char *tkey, unsigned int maxwidth, unsigned int maxheight) +gint +em_icon_stream_is_resized(const gchar *tkey, guint maxwidth, guint maxheight) { - int res = FALSE; + gint res = FALSE; struct _emis_cache_node *node; - const char *key; + const gchar *key; key = tkey ? tkey : ""; diff --git a/mail/em-icon-stream.h b/mail/em-icon-stream.h index 321e0cacae..24f4acedc1 100644 --- a/mail/em-icon-stream.h +++ b/mail/em-icon-stream.h @@ -41,11 +41,11 @@ struct _GtkIconStream; typedef struct _EMIconStream { EMSyncStream sync; - unsigned int width, height; + guint width, height; guint destroy_id; struct _GdkPixbufLoader *loader; struct _GtkImage *image; - char *key; + gchar *key; guint keep:1; } EMIconStream; @@ -55,10 +55,10 @@ typedef struct { } EMIconStreamClass; CamelType em_icon_stream_get_type (void); -CamelStream *em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsigned int maxheight, int keep); +CamelStream *em_icon_stream_new(GtkImage *image, const gchar *key, guint maxwidth, guint maxheight, gint keep); -struct _GdkPixbuf *em_icon_stream_get_image(const char *key, unsigned int maxwidth, unsigned int maxheight); -int em_icon_stream_is_resized(const char *key, unsigned int maxwidth, unsigned int maxheight); +struct _GdkPixbuf *em_icon_stream_get_image(const gchar *key, guint maxwidth, guint maxheight); +gint em_icon_stream_is_resized(const gchar *key, guint maxwidth, guint maxheight); void em_icon_stream_clear_cache(void); diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index ffe9f676b3..7da549cd34 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -39,8 +39,8 @@ static void em_inline_filter_class_init (EMInlineFilterClass *klass); static void em_inline_filter_init (CamelObject *object); static void em_inline_filter_finalize (CamelObject *object); -static void emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace); -static void emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace); +static void emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace); +static void emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace); static void emif_reset(CamelMimeFilter *f); static CamelMimeFilterClass *parent_class = NULL; @@ -106,8 +106,8 @@ enum { }; static const struct { - const char *type; - const char *subtype; + const gchar *type; + const gchar *subtype; CamelTransferEncoding encoding; guint plain:1; } emif_types[] = { @@ -120,22 +120,22 @@ static const struct { }; static void -emif_add_part(EMInlineFilter *emif, const char *data, int len) +emif_add_part(EMInlineFilter *emif, const gchar *data, gint len) { CamelTransferEncoding encoding; CamelContentType *content_type; CamelDataWrapper *dw; - const char *mimetype; + const gchar *mimetype; CamelMimePart *part; CamelStream *mem; - char *type; + gchar *type; if (emif->state == EMIF_PLAIN || emif->state == EMIF_PGPSIGNED || emif->state == EMIF_PGPENCRYPTED) encoding = emif->base_encoding; else encoding = emif_types[emif->state].encoding; - g_byte_array_append(emif->data, (unsigned char *)data, len); + g_byte_array_append(emif->data, (guchar *)data, len); /* check the part will actually have content */ if (emif->data->len <= 0) { return; @@ -191,12 +191,12 @@ emif_add_part(EMInlineFilter *emif, const char *data, int len) } static int -emif_scan(CamelMimeFilter *f, char *in, size_t len, int final) +emif_scan(CamelMimeFilter *f, gchar *in, size_t len, gint final) { EMInlineFilter *emif = (EMInlineFilter *)f; - char *inptr = in, *inend = in+len; - char *data_start = in; - char *start = in; + gchar *inptr = in, *inend = in+len; + gchar *data_start = in; + gchar *start = in; while (inptr < inend) { start = inptr; @@ -219,8 +219,8 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final) /* This could use some funky plugin shit, but this'll do for now */ if (strncmp(start, "begin ", 6) == 0 && start[6] >= '0' && start[6] <= '7') { - int i = 7; - char *name; + gint i = 7; + gchar *name; while (start[i] >='0' && start[i] <='7') i++; @@ -267,7 +267,7 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final) data_start = inptr; emif->state = EMIF_PLAIN; } else { - int linelen; + gint linelen; /* check the length byte matches the data, if not, output what we have and re-scan this line */ len = ((start[0] - ' ') & 077); @@ -327,14 +327,14 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final) if (final) { emif_add_part(emif, data_start, inend-data_start); } else { - g_byte_array_append(emif->data, (unsigned char *)data_start, inend-data_start); + g_byte_array_append(emif->data, (guchar *)data_start, inend-data_start); } return 0; } static void -emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace) +emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace) { emif_scan(f, in, len, FALSE); @@ -344,7 +344,7 @@ emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **ou } static void -emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace) +emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace) { emif_scan(f, in, len, TRUE); diff --git a/mail/em-inline-filter.h b/mail/em-inline-filter.h index b6bc38502f..ed5b688dfb 100644 --- a/mail/em-inline-filter.h +++ b/mail/em-inline-filter.h @@ -40,13 +40,13 @@ extern "C" { typedef struct _EMInlineFilter { CamelMimeFilter filter; - int state; + gint state; CamelTransferEncoding base_encoding; CamelContentType *base_type; GByteArray *data; - char *filename; + gchar *filename; GSList *parts; } EMInlineFilter; diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c index f95685e351..42c15f754e 100644 --- a/mail/em-junk-hook.c +++ b/mail/em-junk-hook.c @@ -37,7 +37,7 @@ static GHashTable *emjh_types; static GObjectClass *parent_class = NULL; -static void *emjh_parent_class; +static gpointer emjh_parent_class; static GObjectClass *emj_parent; #define emjh ((EMJunkHook *)eph) @@ -63,7 +63,7 @@ static const EPluginHookTargetKey emjh_flag_map[] = { */ -static void manage_error (const char *msg, GError *error); +static void manage_error (const gchar *msg, GError *error); GQuark em_junk_error_quark (void) @@ -71,7 +71,7 @@ em_junk_error_quark (void) return g_quark_from_static_string ("em-junk-error-quark"); } -static const char * +static const gchar * em_junk_get_name (CamelJunkPlugin *csp); static void @@ -82,7 +82,7 @@ em_junk_init(CamelJunkPlugin *csp) ((EPluginClass *)G_OBJECT_GET_CLASS(item->hook->hook.plugin))->enable(item->hook->hook.plugin, 1); } -static const char * +static const gchar * em_junk_get_name (CamelJunkPlugin *csp) { struct _EMJunkHookItem *item = (EMJunkHookItem *)csp; @@ -248,7 +248,7 @@ emjh_construct_group(EPluginHook *eph, xmlNodePtr root) /* We'll processs only the first item from xml file*/ while (node) { - if (0 == strcmp((char *)node->name, "item")) { + if (0 == strcmp((gchar *)node->name, "item")) { struct _EMJunkHookItem *item; item = emjh_construct_item(eph, group, node); @@ -284,7 +284,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) node = root->children; while (node) { - if (strcmp((char *)node->name, "group") == 0) { + if (strcmp((gchar *)node->name, "group") == 0) { struct _EMJunkHookGroup *group; group = emjh_construct_group(eph, node); @@ -302,7 +302,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) struct manage_error_idle_data { - const char *msg; + const gchar *msg; GError *error; }; @@ -334,7 +334,7 @@ manage_error_idle (gpointer data) } static void -manage_error (const char *msg, GError *error) +manage_error (const gchar *msg, GError *error) { struct manage_error_idle_data *mei; @@ -350,7 +350,7 @@ manage_error (const char *msg, GError *error) /*XXX: don't think we need here*/ static void -emjh_enable(EPluginHook *eph, int state) +emjh_enable(EPluginHook *eph, gint state) { GSList *g; @@ -436,5 +436,5 @@ em_junk_hook_register_type(GType type) d(printf("registering junk plugin type '%s'\n", g_type_name(type))); klass = g_type_class_ref(type); - g_hash_table_insert(emjh_types, (void *)g_type_name(type), klass); + g_hash_table_insert(emjh_types, (gpointer)g_type_name(type), klass); } diff --git a/mail/em-junk-hook.h b/mail/em-junk-hook.h index 0e467a20bd..9e7c999b29 100644 --- a/mail/em-junk-hook.h +++ b/mail/em-junk-hook.h @@ -56,17 +56,17 @@ struct _EMJunkHookTarget { struct _EMJunkHookItem { CamelJunkPlugin csp; struct _EMJunkHook *hook; /* parent pointer */ - char *check_junk; - char *report_junk; - char *report_non_junk; - char *commit_reports; - char *validate_binary; - char *plugin_name; + gchar *check_junk; + gchar *report_junk; + gchar *report_non_junk; + gchar *commit_reports; + gchar *validate_binary; + gchar *plugin_name; }; struct _EMJunkHookGroup { struct _EMJunkHook *hook; /* parent pointer */ - char *id; /* target id */ + gchar *id; /* target id */ GSList *items; /* items to consider */ }; diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index 27f27ca721..a03bcd6cf3 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -71,7 +71,7 @@ static GType col_types[] = { }; /* temporarily copied from em-format.c */ -static const char *default_headers[] = { +static const gchar *default_headers[] = { N_("From"), N_("Reply-To"), N_("To"), @@ -88,8 +88,8 @@ static const char *default_headers[] = { /* for empty trash on exit frequency */ static const struct { - const char *label; - int days; + const gchar *label; + gint days; } empty_trash_frequency[] = { { N_("Every time"), 0 }, { N_("Once per day"), 1 }, @@ -309,7 +309,7 @@ jh_tree_refill (EMMailerPrefs *prefs) for (l = cjh; l; l = l->next) { GtkTreeIter iter; - char **tokens = g_strsplit (l->data, "=", 2); + gchar **tokens = g_strsplit (l->data, "=", 2); gtk_list_store_append (store, &iter); gtk_list_store_set ( @@ -329,7 +329,7 @@ jh_add_cb (GtkWidget *widget, gpointer user_data) { EMMailerPrefs *prefs = (EMMailerPrefs *) user_data; GtkWidget *dialog, *l1, *l2, *entry1, *entry2, *vbox, *hbox; - int response; + gint response; dialog = gtk_dialog_new_with_buttons (_("Add Custom Junk Header"), (GtkWindow *)gtk_widget_get_toplevel (widget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); vbox = gtk_vbox_new (FALSE, 6); @@ -351,9 +351,9 @@ jh_add_cb (GtkWidget *widget, gpointer user_data) gtk_container_add ((GtkContainer *)((GtkDialog *)dialog)->vbox, vbox); response = gtk_dialog_run ((GtkDialog *)dialog); if (response == GTK_RESPONSE_ACCEPT) { - const char *name = gtk_entry_get_text ((GtkEntry *)entry1); - const char *value = gtk_entry_get_text ((GtkEntry *)entry2); - char *tok; + const gchar *name = gtk_entry_get_text ((GtkEntry *)entry1); + const gchar *value = gtk_entry_get_text ((GtkEntry *)entry2); + gchar *tok; GSList *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL); /* FIXME: Validate the values */ @@ -381,13 +381,13 @@ jh_remove_cb (GtkWidget *widget, gpointer user_data) selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (prefs->junk_header_tree)); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { - char *name=NULL, *value=NULL; + gchar *name=NULL, *value=NULL; GSList *prev = NULL, *node, *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL); gtk_tree_model_get (model, &iter, JH_LIST_COLUMN_NAME, &name, JH_LIST_COLUMN_VALUE, &value, -1); node = list; while (node) { - char *test; - int len = strlen (name); + gchar *test; + gint len = strlen (name); test = strncmp (node->data, name, len) == 0 ? (gchar *) node->data+len:NULL; if (test) { @@ -488,7 +488,7 @@ init_label_tree (GtkWidget *label_tree, EMMailerPrefs *prefs, gboolean locked) static void label_add_cb (GtkWidget *widget, gpointer user_data) { - char *tag; + gchar *tag; tag = e_util_labels_add_with_dlg (GTK_WINDOW (gtk_widget_get_toplevel (widget)), NULL); @@ -535,7 +535,7 @@ label_edit_cb (GtkWidget *widget, gpointer user_data) gtk_tree_model_get (model, &iter, LABEL_LIST_COLUMN_TAG, &tag, -1); if (tag) { - char *str = e_util_labels_add_with_dlg (GTK_WINDOW (gtk_widget_get_toplevel (widget)), tag); + gchar *str = e_util_labels_add_with_dlg (GTK_WINDOW (gtk_widget_get_toplevel (widget)), tag); g_free (str); } @@ -569,7 +569,7 @@ emmp_header_remove_sensitivity (EMMailerPrefs *prefs) } static gboolean -emmp_header_is_valid (const char *header) +emmp_header_is_valid (const gchar *header) { gint len = g_utf8_strlen (header, -1); @@ -584,7 +584,7 @@ emmp_header_is_valid (const char *header) static void emmp_header_add_sensitivity (EMMailerPrefs *prefs) { - const char *entry_contents; + const gchar *entry_contents; GtkTreeIter iter; gboolean valid; @@ -601,7 +601,7 @@ emmp_header_add_sensitivity (EMMailerPrefs *prefs) /* check if this is a duplicate */ valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (prefs->header_list_store), &iter); while (valid) { - char *header_name; + gchar *header_name; gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter, HEADER_LIST_HEADER_COLUMN, &header_name, @@ -630,7 +630,7 @@ emmp_save_headers (EMMailerPrefs *prefs) while (valid) { struct _EMMailerPrefsHeader h; gboolean enabled; - char *xml; + gchar *xml; gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter, HEADER_LIST_HEADER_COLUMN, &h.name, @@ -650,12 +650,12 @@ emmp_save_headers (EMMailerPrefs *prefs) } static void -emmp_header_list_enabled_toggled (GtkCellRendererToggle *cell, const char *path_string, EMMailerPrefs *prefs) +emmp_header_list_enabled_toggled (GtkCellRendererToggle *cell, const gchar *path_string, EMMailerPrefs *prefs) { GtkTreeModel *model = GTK_TREE_MODEL (prefs->header_list_store); GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; - int enabled; + gint enabled; gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, HEADER_LIST_ENABLED_COLUMN, &enabled, -1); @@ -728,7 +728,7 @@ emmp_header_entry_changed (GtkWidget *entry, gpointer user_data) static void mark_seen_timeout_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) { - int timeout; + gint timeout; timeout = (int) (gtk_spin_button_get_value (prefs->timeout) * 1000.0); gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/mark_seen_timeout", timeout, NULL); @@ -737,7 +737,7 @@ mark_seen_timeout_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) static void address_compress_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) { - int count; + gint count; count = (int) gtk_spin_button_get_value (prefs->address_count); @@ -747,7 +747,7 @@ address_compress_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) static void mlimit_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) { - int count; + gint count; count = (int) gtk_spin_button_get_value (prefs->mlimit_count); @@ -755,12 +755,12 @@ mlimit_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs) } static void -spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, float div, GCallback value_changed) +spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const gchar *key, float div, GCallback value_changed) { GError *err = NULL; double min, max; - char *mkey, *p; - int val; + gchar *mkey, *p; + gint val; gtk_spin_button_get_range (spin, &min, &max); @@ -791,7 +791,7 @@ spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, fl gtk_spin_button_set_value (spin, (1.0 * val) / div); if (value_changed) { - g_object_set_data ((GObject *) spin, "key", (void *) key); + g_object_set_data ((GObject *) spin, "key", (gpointer) key); g_signal_connect (spin, "value-changed", value_changed, prefs); } @@ -802,7 +802,7 @@ spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, fl static void toggle_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs) { - const char *key; + const gchar *key; key = g_object_get_data ((GObject *) toggle, "key"); gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL); @@ -867,7 +867,7 @@ font_changed (GtkFontButton *font_button, EMMailerPrefs *prefs) } static void -toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, const char *key, GCallback toggled) +toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, gint not, const gchar *key, GCallback toggled) { gboolean bool; @@ -875,7 +875,7 @@ toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, cons gtk_toggle_button_set_active (toggle, not ? !bool : bool); if (toggled) { - g_object_set_data ((GObject *) toggle, "key", (void *) key); + g_object_set_data ((GObject *) toggle, "key", (gpointer) key); g_signal_connect (toggle, "toggled", toggled, prefs); } @@ -887,7 +887,7 @@ static void charset_activate (GtkWidget *item, EMMailerPrefs *prefs) { GtkWidget *menu; - char *string; + gchar *string; menu = gtk_option_menu_get_menu (prefs->charset); if (!(string = e_charset_picker_get_charset (menu))) @@ -902,7 +902,7 @@ charset_menu_init (EMMailerPrefs *prefs) { GtkWidget *menu, *item; GList *items; - char *buf; + gchar *buf; buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/charset", NULL); menu = e_charset_picker_new (buf && *buf ? buf : camel_iconv_locale_charset ()); @@ -923,7 +923,7 @@ charset_menu_init (EMMailerPrefs *prefs) static void trash_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) { - int idx; + gint idx; idx = gtk_combo_box_get_active (combobox); g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency)); @@ -934,7 +934,7 @@ trash_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) static void emmp_empty_trash_init (EMMailerPrefs *prefs) { - int locked, days, hist = 0, i; + gint locked, days, hist = 0, i; toggle_button_init (prefs, prefs->empty_trash, FALSE, "/apps/evolution/mail/trash/empty_on_exit", @@ -960,7 +960,7 @@ emmp_empty_trash_init (EMMailerPrefs *prefs) static void junk_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) { - int idx; + gint idx; idx = gtk_combo_box_get_active (combobox); g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency)); @@ -971,7 +971,7 @@ junk_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs) static void emmp_empty_junk_init (EMMailerPrefs *prefs) { - int locked, days, hist = 0, i; + gint locked, days, hist = 0, i; toggle_button_init (prefs, prefs->empty_junk, FALSE, "/apps/evolution/mail/junk/empty_on_exit", @@ -997,7 +997,7 @@ emmp_empty_junk_init (EMMailerPrefs *prefs) static void http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs) { - int when; + gint when; if (gtk_toggle_button_get_active (prefs->images_always)) when = MAIL_CONFIG_HTTP_ALWAYS; @@ -1011,7 +1011,7 @@ http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs) static GtkWidget * -emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMMailerPrefs *prefs = data; @@ -1039,7 +1039,7 @@ static EMConfigItem emmp_items[] = { }; static void -emmp_free(EConfig *ec, GSList *items, void *data) +emmp_free(EConfig *ec, GSList *items, gpointer data) { /* the prefs data is freed automagically */ @@ -1049,7 +1049,7 @@ emmp_free(EConfig *ec, GSList *items, void *data) static void junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs) { - char *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo)); + gchar *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo)); const GList *plugins = mail_session_get_junk_plugins(); gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL); @@ -1062,7 +1062,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs) session->junk_plugin = CAMEL_JUNK_PLUGIN (&(item->csp)); status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL; if ((gboolean)status == TRUE) { - char *text, *html; + gchar *text, *html; gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU); text = g_strdup_printf (_("%s plugin is available and the binary is installed."), item->plugin_name); html = g_strdup_printf ("<i>%s</i>", text); @@ -1070,7 +1070,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs) g_free (html); g_free (text); } else { - char *text, *html; + gchar *text, *html; gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-warning", GTK_ICON_SIZE_MENU); text = g_strdup_printf (_("%s plugin is not available. Please check whether the package is installed."), item->plugin_name); html = g_strdup_printf ("<i>%s</i>", text); @@ -1087,10 +1087,10 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs) static void junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs) { - int index = 0; + gint index = 0; gboolean def_set = FALSE; const GList *plugins = mail_session_get_junk_plugins(); - char *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL); + gchar *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL); if (!plugins || !g_list_length ((GList *)plugins)) { gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("No Junk plugin available")); @@ -1115,7 +1115,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs) gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index); status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL; if (status) { - char *text, *html; + gchar *text, *html; gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU); /* May be a better text */ text = g_strdup_printf (_("%s plugin is available and the binary is installed."), item->plugin_name); @@ -1124,7 +1124,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs) g_free (html); g_free (text); } else { - char *text, *html; + gchar *text, *html; gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-warning", GTK_ICON_SIZE_MENU); /* May be a better text */ text = g_strdup_printf (_("%s plugin is not available. Please check whether the package is installed."), item->plugin_name); @@ -1156,14 +1156,14 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) GtkTreeSelection *selection; GtkCellRenderer *renderer; GtkTreeIter iter; - char *font, *buf; + gchar *font, *buf; GladeXML *gui; gboolean locked; - int val, i; + gint val, i; EMConfig *ec; EMConfigTargetPrefs *target; GSList *l; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "mail-config.glade", @@ -1399,7 +1399,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) h = g_malloc (sizeof (struct _EMMailerPrefsHeader)); h->is_default = TRUE; h->name = g_strdup (default_headers[i]); - h->enabled = strcmp ((char *)default_headers[i], "x-evolution-mailer") != 0; + h->enabled = strcmp ((gchar *)default_headers[i], "x-evolution-mailer") != 0; g_hash_table_insert (default_header_hash, (gpointer) default_headers[i], h); header_add_list = g_slist_append (header_add_list, h); } @@ -1409,7 +1409,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) p = header_config_list; while (p) { struct _EMMailerPrefsHeader *h, *def; - char *xml = (char *) p->data; + gchar *xml = (gchar *) p->data; h = em_mailer_prefs_header_from_xml (xml); if (h) { @@ -1433,7 +1433,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) p = header_add_list; while (p) { struct _EMMailerPrefsHeader *h = (struct _EMMailerPrefsHeader *) p->data; - const char *name; + const gchar *name; if (g_ascii_strcasecmp (h->name, EM_FORMAT_HEADER_XMAILER) == 0) name = _("Mailer"); @@ -1525,10 +1525,10 @@ emmp_header_from_xmldoc (xmlDocPtr doc) return NULL; root = doc->children; - if (strcmp ((char *)root->name, "header") != 0) + if (strcmp ((gchar *)root->name, "header") != 0) return NULL; - name = xmlGetProp (root, (const unsigned char *)"name"); + name = xmlGetProp (root, (const guchar *)"name"); if (name == NULL) return NULL; @@ -1536,7 +1536,7 @@ emmp_header_from_xmldoc (xmlDocPtr doc) h->name = g_strdup ((gchar *)name); xmlFree (name); - if (xmlHasProp (root, (const unsigned char *)"enabled")) + if (xmlHasProp (root, (const guchar *)"enabled")) h->enabled = 1; else h->enabled = 0; @@ -1554,12 +1554,12 @@ emmp_header_from_xmldoc (xmlDocPtr doc) * is an error. **/ struct _EMMailerPrefsHeader * -em_mailer_prefs_header_from_xml (const char *xml) +em_mailer_prefs_header_from_xml (const gchar *xml) { struct _EMMailerPrefsHeader *header; xmlDocPtr doc; - if (!(doc = xmlParseDoc ((unsigned char *) xml))) + if (!(doc = xmlParseDoc ((guchar *) xml))) return NULL; header = emmp_header_from_xmldoc (doc); @@ -1592,24 +1592,24 @@ em_mailer_prefs_header_free (struct _EMMailerPrefsHeader *header) * Returns the passed header as a XML structure, * or NULL on error */ -char * +gchar * em_mailer_prefs_header_to_xml (struct _EMMailerPrefsHeader *header) { xmlDocPtr doc; xmlNodePtr root; xmlChar *xml; - char *out; - int size; + gchar *out; + gint size; g_return_val_if_fail (header != NULL, NULL); g_return_val_if_fail (header->name != NULL, NULL); - doc = xmlNewDoc ((const unsigned char *)"1.0"); + doc = xmlNewDoc ((const guchar *)"1.0"); - root = xmlNewDocNode (doc, NULL, (const unsigned char *)"header", NULL); - xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)header->name); + root = xmlNewDocNode (doc, NULL, (const guchar *)"header", NULL); + xmlSetProp (root, (const guchar *)"name", (guchar *)header->name); if (header->enabled) - xmlSetProp (root, (const unsigned char *)"enabled", NULL); + xmlSetProp (root, (const guchar *)"enabled", NULL); xmlDocSetRootElement (doc, root); xmlDocDumpMemory (doc, &xml, &size); diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h index 10503a8461..917c00c932 100644 --- a/mail/em-mailer-prefs.h +++ b/mail/em-mailer-prefs.h @@ -56,7 +56,7 @@ typedef struct _EMMailerPrefsClass EMMailerPrefsClass; typedef struct _EMMailerPrefsHeader EMMailerPrefsHeader; struct _EMMailerPrefsHeader { - char *name; + gchar *name; guint enabled:1; guint is_default:1; }; @@ -150,8 +150,8 @@ GtkWidget * create_combo_text_widget (void); struct _GtkWidget *em_mailer_prefs_new (void); -EMMailerPrefsHeader *em_mailer_prefs_header_from_xml(const char *xml); -char *em_mailer_prefs_header_to_xml(EMMailerPrefsHeader *header); +EMMailerPrefsHeader *em_mailer_prefs_header_from_xml(const gchar *xml); +gchar *em_mailer_prefs_header_to_xml(EMMailerPrefsHeader *header); void em_mailer_prefs_header_free(EMMailerPrefsHeader *header); /* needed by global config */ diff --git a/mail/em-menu.c b/mail/em-menu.c index b504bd3304..f0da9c8820 100644 --- a/mail/em-menu.c +++ b/mail/em-menu.c @@ -50,7 +50,7 @@ #include <e-util/e-util.h> -static void emp_standard_menu_factory(EMenu *emp, void *data); +static void emp_standard_menu_factory(EMenu *emp, gpointer data); static GObjectClass *emp_parent; @@ -114,7 +114,7 @@ em_menu_get_type(void) return type; } -EMMenu *em_menu_new(const char *menuid) +EMMenu *em_menu_new(const gchar *menuid) { EMMenu *emp = g_object_new(em_menu_get_type(), NULL); @@ -134,12 +134,12 @@ EMMenu *em_menu_new(const char *menuid) * Return value: **/ EMMenuTargetSelect * -em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids) +em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids) { EMMenuTargetSelect *t = e_menu_target_new(&emp->popup, EM_MENU_TARGET_SELECT, sizeof(*t)); guint32 mask = ~0; - int i; - const char *tmp; + gint i; + const gchar *tmp; /* NB: This is identical to em-popup-target-new-select function */ @@ -243,7 +243,7 @@ em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w) } static void -emp_standard_menu_factory(EMenu *emp, void *data) +emp_standard_menu_factory(EMenu *emp, gpointer data) { /* noop */ } @@ -276,7 +276,7 @@ emp_standard_menu_factory(EMenu *emp, void *data) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EMMenuHook *)eph) static const EMenuHookTargetMask emph_select_masks[] = { @@ -323,7 +323,7 @@ emph_finalise(GObject *o) static void emph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = emph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.bonobomenu:1.0"; diff --git a/mail/em-menu.h b/mail/em-menu.h index cdcc12bcae..96f571407c 100644 --- a/mail/em-menu.h +++ b/mail/em-menu.h @@ -73,7 +73,7 @@ typedef struct _EMMenuTargetSelect EMMenuTargetSelect; struct _EMMenuTargetSelect { EMenuTarget target; struct _CamelFolder *folder; - char *uri; + gchar *uri; GPtrArray *uids; }; @@ -98,9 +98,9 @@ struct _EMMenuClass { GType em_menu_get_type(void); -EMMenu *em_menu_new(const char *menuid); +EMMenu *em_menu_new(const gchar *menuid); -EMMenuTargetSelect *em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids); +EMMenuTargetSelect *em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids); EMMenuTargetWidget *em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w); /* ********************************************************************** */ diff --git a/mail/em-migrate.c b/mail/em-migrate.c index 3f5beb3f84..1745171ac0 100644 --- a/mail/em-migrate.c +++ b/mail/em-migrate.c @@ -84,11 +84,11 @@ /* upgrade helper functions */ static xmlDocPtr -emm_load_xml (const char *dirname, const char *filename) +emm_load_xml (const gchar *dirname, const gchar *filename) { xmlDocPtr doc; struct stat st; - char *path; + gchar *path; path = g_strdup_printf ("%s/%s", dirname, filename); if (stat (path, &st) == -1 || !(doc = xmlParseFile (path))) { @@ -102,10 +102,10 @@ emm_load_xml (const char *dirname, const char *filename) } static int -emm_save_xml (xmlDocPtr doc, const char *dirname, const char *filename) +emm_save_xml (xmlDocPtr doc, const gchar *dirname, const gchar *filename) { - char *path; - int retval; + gchar *path; + gint retval; path = g_strdup_printf ("%s/%s", dirname, filename); retval = e_xml_save_file (path, doc); @@ -115,13 +115,13 @@ emm_save_xml (xmlDocPtr doc, const char *dirname, const char *filename) } static xmlNodePtr -xml_find_node (xmlNodePtr parent, const char *name) +xml_find_node (xmlNodePtr parent, const gchar *name) { xmlNodePtr node; node = parent->children; while (node != NULL) { - if (node->name && !strcmp ((char *)node->name, name)) + if (node->name && !strcmp ((gchar *)node->name, name)) return node; node = node->next; @@ -131,15 +131,15 @@ xml_find_node (xmlNodePtr parent, const char *name) } static void -upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri)) +upgrade_xml_uris (xmlDocPtr doc, gchar * (* upgrade_uri) (const gchar *uri)) { xmlNodePtr root, node; - char *uri, *new; + gchar *uri, *new; if (!doc || !(root = xmlDocGetRootElement (doc))) return; - if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) { + if (!root->name || strcmp ((gchar *)root->name, "filteroptions") != 0) { /* root node is not <filteroptions>, nothing to upgrade */ return; } @@ -151,27 +151,27 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri)) node = node->children; while (node != NULL) { - if (node->name && !strcmp ((char *)node->name, "rule")) { + if (node->name && !strcmp ((gchar *)node->name, "rule")) { xmlNodePtr actionset, part, val, n; if ((actionset = xml_find_node (node, "actionset"))) { /* filters.xml */ part = actionset->children; while (part != NULL) { - if (part->name && !strcmp ((char *)part->name, "part")) { + if (part->name && !strcmp ((gchar *)part->name, "part")) { val = part->children; while (val != NULL) { - if (val->name && !strcmp ((char *)val->name, "value")) { - char *type; + if (val->name && !strcmp ((gchar *)val->name, "value")) { + gchar *type; - type = (char *)xmlGetProp (val, (const unsigned char *)"type"); - if (type && !strcmp ((char *)type, "folder")) { + type = (gchar *)xmlGetProp (val, (const guchar *)"type"); + if (type && !strcmp ((gchar *)type, "folder")) { if ((n = xml_find_node (val, "folder"))) { - uri = (char *)xmlGetProp (n, (const unsigned char *)"uri"); + uri = (gchar *)xmlGetProp (n, (const guchar *)"uri"); new = upgrade_uri (uri); xmlFree (uri); - xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new); + xmlSetProp (n, (const guchar *)"uri", (guchar *)new); g_free (new); } } @@ -189,12 +189,12 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri)) /* vfolders.xml */ n = actionset->children; while (n != NULL) { - if (n->name && !strcmp ((char *)n->name, "folder")) { - uri = (char *)xmlGetProp (n, (const unsigned char *)"uri"); + if (n->name && !strcmp ((gchar *)n->name, "folder")) { + uri = (gchar *)xmlGetProp (n, (const guchar *)"uri"); new = upgrade_uri (uri); xmlFree (uri); - xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new); + xmlSetProp (n, (const guchar *)"uri", (guchar *)new); g_free (new); } @@ -211,25 +211,25 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri)) /* as much info as we have on a given account */ struct _account_info_1_0 { - char *name; - char *uri; - char *base_uri; + gchar *name; + gchar *uri; + gchar *base_uri; union { struct { /* for imap */ - char *namespace; - char *namespace_full; + gchar *namespace; + gchar *namespace_full; guint32 capabilities; GHashTable *folders; - char dir_sep; + gchar dir_sep; } imap; } u; }; struct _imap_folder_info_1_0 { - char *folder; + gchar *folder; /* encoded? decoded? canonicalised? */ - char dir_sep; + gchar dir_sep; }; static GHashTable *accounts_1_0 = NULL; @@ -254,10 +254,10 @@ account_info_1_0_free (struct _account_info_1_0 *ai) g_free(ai); } -static char * -get_base_uri(const char *val) +static gchar * +get_base_uri(const gchar *val) { - const char *tmp; + const gchar *tmp; tmp = strchr(val, ':'); if (tmp) { @@ -273,14 +273,14 @@ get_base_uri(const char *val) return g_strdup(val); } -static char * -upgrade_xml_uris_1_0 (const char *uri) +static gchar * +upgrade_xml_uris_1_0 (const gchar *uri) { - char *out = NULL; + gchar *out = NULL; /* upgrades camel uri's */ if (strncmp (uri, "imap:", 5) == 0) { - char *base_uri, dir_sep, *folder, *p; + gchar *base_uri, dir_sep, *folder, *p; struct _account_info_1_0 *ai; /* add namespace, canonicalise dir_sep to / */ @@ -318,7 +318,7 @@ upgrade_xml_uris_1_0 (const char *uri) folder = g_strdup (uri + strlen (base_uri) + 1); /* Add the namespace before the mailbox name, unless the mailbox is INBOX */ - if (ai->u.imap.namespace && strcmp ((char *)folder, "INBOX") != 0) + if (ai->u.imap.namespace && strcmp ((gchar *)folder, "INBOX") != 0) out = g_strdup_printf ("%s/%s/%s", base_uri, ai->u.imap.namespace, folder); else out = g_strdup_printf ("%s/%s", base_uri, folder); @@ -333,7 +333,7 @@ upgrade_xml_uris_1_0 (const char *uri) g_free (folder); g_free (base_uri); } else if (strncmp (uri, "exchange:", 9) == 0) { - char *base_uri, *folder, *p; + gchar *base_uri, *folder, *p; /* exchange://user@host/exchange/ * -> exchange://user@host/personal/ * */ /* Any url encoding (%xx) in the folder name is also removed */ @@ -353,10 +353,10 @@ upgrade_xml_uris_1_0 (const char *uri) return out; } -static char * -parse_lsub (const char *lsub, char *dir_sep) +static gchar * +parse_lsub (const gchar *lsub, gchar *dir_sep) { - static int comp; + static gint comp; static regex_t pat; regmatch_t match[3]; const gchar *m = "^\\* LSUB \\([^)]*\\) \"?([^\" ]+)\"? \"?(.*)\"?$"; @@ -385,7 +385,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si) { FILE *storeinfo; guint32 tmp; - char *buf, *folder, dir_sep, *path, *name, *p; + gchar *buf, *folder, dir_sep, *path, *name, *p; struct _imap_folder_info_1_0 *fi; si->u.imap.folders = g_hash_table_new_full ( @@ -398,7 +398,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si) if (name) { name = strstr (si->uri, ";namespace="); if (name) { - char *end; + gchar *end; name += strlen (";namespace="); if (*name == '\"') { @@ -480,9 +480,9 @@ static int load_accounts_1_0 (xmlDocPtr doc) { xmlNodePtr source; - char *val, *tmp; - int count = 0, i; - char key[32]; + gchar *val, *tmp; + gint count = 0, i; + gchar key[32]; if (!(source = e_bconf_get_path (doc, "/Mail/Accounts"))) return 0; @@ -495,7 +495,7 @@ load_accounts_1_0 (xmlDocPtr doc) /* load account upgrade info for each account */ for (i = 0; i < count; i++) { struct _account_info_1_0 *ai; - char *rawuri; + gchar *rawuri; sprintf (key, "source_url_%d", i); if (!(rawuri = e_bconf_get_value (source, key))) @@ -519,11 +519,11 @@ load_accounts_1_0 (xmlDocPtr doc) - this will be picked up later in the conversion */ sprintf (key, "transport_url_%d", i); node = e_bconf_get_entry (source, key); - if (node && (val = (char *)xmlGetProp (node, (const unsigned char *)"value"))) { + if (node && (val = (gchar *)xmlGetProp (node, (const guchar *)"value"))) { tmp = e_bconf_hex_decode (val); xmlFree (val); if (strncmp (tmp, "exchanget:", 10) == 0) - xmlSetProp (node, (const unsigned char *)"value", (unsigned char *)rawuri); + xmlSetProp (node, (const guchar *)"value", (guchar *)rawuri); g_free (tmp); } else { d(printf (" couldn't find transport uri?\n")); @@ -540,7 +540,7 @@ load_accounts_1_0 (xmlDocPtr doc) } static int -em_migrate_1_0 (const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex) +em_migrate_1_0 (const gchar *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex) { accounts_1_0 = g_hash_table_new_full ( g_str_hash, g_str_equal, @@ -560,13 +560,13 @@ em_migrate_1_0 (const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr fil /* 1.2 upgrade functions */ static int -is_xml1encoded (const char *txt) +is_xml1encoded (const gchar *txt) { - const unsigned char *p; - int isxml1 = FALSE; - int is8bit = FALSE; + const guchar *p; + gint isxml1 = FALSE; + gint is8bit = FALSE; - p = (const unsigned char *)txt; + p = (const guchar *)txt; while (*p) { if (p[0] == '\\' && p[1] == 'U' && p[2] == '+' && isxdigit (p[3]) && isxdigit (p[4]) && isxdigit (p[5]) && isxdigit (p[6]) @@ -585,24 +585,24 @@ is_xml1encoded (const char *txt) return isxml1; } -static char * -decode_xml1 (const char *txt) +static gchar * +decode_xml1 (const gchar *txt) { GString *out = g_string_new (""); - const unsigned char *p; - char *res; + const guchar *p; + gchar *res; /* convert: \U+XXXX\ -> utf8 8 bit characters -> utf8 (iso-8859-1) */ - p = (const unsigned char *) txt; + p = (const guchar *) txt; while (*p) { if (p[0] > 0x80 || (p[0] == '\\' && p[1] == 'U' && p[2] == '+' && isxdigit (p[3]) && isxdigit (p[4]) && isxdigit (p[5]) && isxdigit (p[6]) && p[7] == '\\')) { - char utf8[8]; + gchar utf8[8]; gunichar u; if (p[0] == '\\') { @@ -626,12 +626,12 @@ decode_xml1 (const char *txt) return res; } -static char * -utf8_reencode (const char *txt) +static gchar * +utf8_reencode (const gchar *txt) { GString *out = g_string_new (""); gchar *p; - char *res; + gchar *res; /* convert: libxml1 8 bit utf8 converted to xml entities byte-by-byte chars -> utf8 */ @@ -656,13 +656,13 @@ utf8_reencode (const char *txt) static int upgrade_xml_1_2_rec (xmlNodePtr node) { - const char *value_tags[] = { "string", "address", "regex", "file", "command", NULL }; - const char *rule_tags[] = { "title", NULL }; - const char *item_props[] = { "name", NULL }; + const gchar *value_tags[] = { "string", "address", "regex", "file", "command", NULL }; + const gchar *rule_tags[] = { "title", NULL }; + const gchar *item_props[] = { "name", NULL }; struct { - const char *name; - const char **tags; - const char **props; + const gchar *name; + const gchar **tags; + const gchar **props; } tags[] = { { "value", value_tags, NULL }, { "rule", rule_tags, NULL }, @@ -670,24 +670,24 @@ upgrade_xml_1_2_rec (xmlNodePtr node) { 0 }, }; xmlNodePtr work; - int i,j; - char *txt, *tmp; + gint i,j; + gchar *txt, *tmp; /* upgrades the content of a node, if the node has a specific parent/node name */ for (i = 0; tags[i].name; i++) { - if (!strcmp ((char *)node->name, tags[i].name)) { + if (!strcmp ((gchar *)node->name, tags[i].name)) { if (tags[i].tags != NULL) { work = node->children; while (work) { for (j = 0; tags[i].tags[j]; j++) { - if (!strcmp ((char *)work->name, tags[i].tags[j])) { - txt = (char *)xmlNodeGetContent (work); + if (!strcmp ((gchar *)work->name, tags[i].tags[j])) { + txt = (gchar *)xmlNodeGetContent (work); if (is_xml1encoded (txt)) { tmp = decode_xml1 (txt); d(printf ("upgrading xml node %s/%s '%s' -> '%s'\n", tags[i].name, tags[i].tags[j], txt, tmp)); - xmlNodeSetContent (work, (unsigned char *)tmp); + xmlNodeSetContent (work, (guchar *)tmp); g_free (tmp); } xmlFree (txt); @@ -700,11 +700,11 @@ upgrade_xml_1_2_rec (xmlNodePtr node) if (tags[i].props != NULL) { for (j = 0; tags[i].props[j]; j++) { - txt = (char *)xmlGetProp (node, (unsigned char *)tags[i].props[j]); + txt = (gchar *)xmlGetProp (node, (guchar *)tags[i].props[j]); tmp = utf8_reencode (txt); d(printf ("upgrading xml property %s on node %s '%s' -> '%s'\n", tags[i].props[j], tags[i].name, txt, tmp)); - xmlSetProp (node, (const unsigned char *)tags[i].props[j], (unsigned char *)tmp); + xmlSetProp (node, (const guchar *)tags[i].props[j], (guchar *)tmp); g_free (tmp); xmlFree (txt); } @@ -967,10 +967,10 @@ static int bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb) { xmlNodePtr source; - char labx[16], colx[16]; - char *val, *lab, *col; + gchar labx[16], colx[16]; + gchar *val, *lab, *col; GSList *list, *l; - int i; + gint i; e_bconf_import(gconf, config_xmldb, gconf_remap_list); @@ -1018,7 +1018,7 @@ bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb) } static int -em_migrate_1_2(const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex) +em_migrate_1_2(const gchar *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex) { GConfClient *gconf; @@ -1043,7 +1043,7 @@ typedef struct _EMMigrateSession { CamelSession parent_object; CamelStore *store; /* new folder tree store */ - char *srcdir; /* old folder tree path */ + gchar *srcdir; /* old folder tree path */ } EMMigrateSession; typedef struct _EMMigrateSessionClass { @@ -1052,7 +1052,7 @@ typedef struct _EMMigrateSessionClass { } EMMigrateSessionClass; static CamelType em_migrate_session_get_type (void); -static CamelSession *em_migrate_session_new (const char *path); +static CamelSession *em_migrate_session_new (const gchar *path); static void class_init (EMMigrateSessionClass *klass) @@ -1081,7 +1081,7 @@ em_migrate_session_get_type (void) } static CamelSession * -em_migrate_session_new (const char *path) +em_migrate_session_new (const gchar *path) { CamelSession *session; @@ -1100,7 +1100,7 @@ static GtkLabel *label; static GtkProgressBar *progress; static void -em_migrate_setup_progress_dialog (const char *title, const char *desc) +em_migrate_setup_progress_dialog (const gchar *title, const gchar *desc) { GtkWidget *vbox, *hbox, *w; gchar *markup; @@ -1162,7 +1162,7 @@ em_migrate_close_progress_dialog (void) } static void -em_migrate_set_folder_name (const char *folder_name) +em_migrate_set_folder_name (const gchar *folder_name) { gchar *text; @@ -1178,7 +1178,7 @@ em_migrate_set_folder_name (const char *folder_name) static void em_migrate_set_progress (double percent) { - char text[5]; + gchar text[5]; snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f)); @@ -1192,11 +1192,11 @@ em_migrate_set_progress (double percent) #ifndef G_OS_WIN32 static gboolean -is_mail_folder (const char *metadata) +is_mail_folder (const gchar *metadata) { xmlNodePtr node; xmlDocPtr doc; - char *type; + gchar *type; if (!(doc = xmlParseFile (metadata))) { g_warning ("Cannot parse `%s'", metadata); @@ -1209,7 +1209,7 @@ is_mail_folder (const char *metadata) return FALSE; } - if (!node->name || strcmp ((char *)node->name, "efolder") != 0) { + if (!node->name || strcmp ((gchar *)node->name, "efolder") != 0) { g_warning ("`%s' corrupt: root node is not 'efolder'", metadata); xmlFreeDoc (doc); return FALSE; @@ -1217,9 +1217,9 @@ is_mail_folder (const char *metadata) node = node->children; while (node != NULL) { - if (node->name && !strcmp ((char *)node->name, "type")) { - type = (char *)xmlNodeGetContent (node); - if (!strcmp ((char *)type, "mail")) { + if (node->name && !strcmp ((gchar *)node->name, "type")) { + type = (gchar *)xmlNodeGetContent (node); + if (!strcmp ((gchar *)type, "mail")) { xmlFreeDoc (doc); xmlFree (type); @@ -1240,13 +1240,13 @@ is_mail_folder (const char *metadata) } static int -get_local_et_expanded (const char *dirname) +get_local_et_expanded (const gchar *dirname) { xmlNodePtr node; xmlDocPtr doc; struct stat st; - char *buf, *p; - int thread_list; + gchar *buf, *p; + gint thread_list; buf = g_strdup_printf ("%s/evolution/config/file:%s", g_get_home_dir (), dirname); p = buf + strlen (g_get_home_dir ()) + strlen ("/evolution/config/file:"); @@ -1264,12 +1264,12 @@ get_local_et_expanded (const char *dirname) g_free (buf); - if (!(node = xmlDocGetRootElement (doc)) || strcmp ((char *)node->name, "expanded_state") != 0) { + if (!(node = xmlDocGetRootElement (doc)) || strcmp ((gchar *)node->name, "expanded_state") != 0) { xmlFreeDoc (doc); return -1; } - if (!(buf = (char *)xmlGetProp (node, (const unsigned char *)"default"))) { + if (!(buf = (gchar *)xmlGetProp (node, (const guchar *)"default"))) { xmlFreeDoc (doc); return -1; } @@ -1282,11 +1282,11 @@ get_local_et_expanded (const char *dirname) return thread_list; } -static char * -get_local_store_uri (const char *dirname, char **namep, int *indexp) +static gchar * +get_local_store_uri (const gchar *dirname, gchar **namep, gint *indexp) { gchar *name, *protocol, *metadata, *tmp; - int index; + gint index; struct stat st; xmlNodePtr node; xmlDocPtr doc; @@ -1308,24 +1308,24 @@ get_local_store_uri (const char *dirname, char **namep, int *indexp) goto nofile; node = doc->children; - if (strcmp((char *)node->name, "folderinfo")) + if (strcmp((gchar *)node->name, "folderinfo")) goto dodefault; for (node = node->children; node; node = node->next) { - if (node->name && !strcmp ((char *)node->name, "folder")) { - tmp = (char *)xmlGetProp (node, (const unsigned char *)"type"); + if (node->name && !strcmp ((gchar *)node->name, "folder")) { + tmp = (gchar *)xmlGetProp (node, (const guchar *)"type"); if (tmp) { protocol = alloca(strlen(tmp)+1); strcpy(protocol, tmp); xmlFree(tmp); } - tmp = (char *)xmlGetProp (node, (const unsigned char *)"name"); + tmp = (gchar *)xmlGetProp (node, (const guchar *)"name"); if (tmp) { name = alloca(strlen(tmp)+1); strcpy(name, tmp); xmlFree(tmp); } - tmp = (char *)xmlGetProp (node, (const unsigned char *)"index"); + tmp = (gchar *)xmlGetProp (node, (const guchar *)"index"); if (tmp) { index = atoi(tmp); xmlFree(tmp); @@ -1351,18 +1351,18 @@ enum { CP_APPEND }; -static int open_flags[3] = { +static gint open_flags[3] = { O_WRONLY | O_CREAT | O_TRUNC, O_WRONLY | O_CREAT | O_TRUNC, O_WRONLY | O_CREAT | O_APPEND, }; static int -cp (const char *src, const char *dest, gboolean show_progress, int mode) +cp (const gchar *src, const gchar *dest, gboolean show_progress, gint mode) { - unsigned char readbuf[65536]; + guchar readbuf[65536]; ssize_t nread, nwritten; - int errnosav, readfd, writefd; + gint errnosav, readfd, writefd; size_t total = 0; struct stat st; struct utimbuf ut; @@ -1440,7 +1440,7 @@ cp (const char *src, const char *dest, gboolean show_progress, int mode) #ifndef G_OS_WIN32 static int -cp_r (const char *src, const char *dest, const char *pattern, int mode) +cp_r (const gchar *src, const gchar *dest, const gchar *pattern, gint mode) { GString *srcpath, *destpath; struct dirent *dent; @@ -1491,10 +1491,10 @@ cp_r (const char *src, const char *dest, const char *pattern, int mode) } static void -mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_name) +mbox_build_filename (GString *path, const gchar *toplevel_dir, const gchar *full_name) { - const char *start, *inptr = full_name; - int subdirs = 0; + const gchar *start, *inptr = full_name; + gint subdirs = 0; while (*inptr != '\0') { if (*inptr == '/') @@ -1525,17 +1525,17 @@ mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_n } static int -em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *full_name, CamelException *ex) +em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar *full_name, CamelException *ex) { CamelFolder *old_folder = NULL, *new_folder = NULL; CamelStore *local_store = NULL; - char *name, *uri; + gchar *name, *uri; GPtrArray *uids; struct stat st; - int thread_list; - int index, i; + gint thread_list; + gint index, i; GString *src, *dest; - int res = -1; + gint res = -1; src = g_string_new(""); @@ -1558,8 +1558,8 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu static const gchar *meta_ext[] = { ".summary", ".ibex.index", ".ibex.index.data" }; size_t slen, dlen; FILE *fp; - char *p; - int mode; + gchar *p; + gint mode; g_string_printf (src, "%s/%s", uri + 5, name); mbox_build_filename (dest, ((CamelService *)session->store)->url->path, full_name); @@ -1581,7 +1581,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu retry_copy: if (cp (src->str, dest->str, TRUE, mode) == -1) { if (errno == EEXIST) { - int save = errno; + gint save = errno; switch (e_error_run(NULL, "mail:ask-migrate-existing", src->str, dest->str, NULL)) { case GTK_RESPONSE_ACCEPT: @@ -1607,7 +1607,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu g_string_truncate (dest, dlen); g_string_append (dest, ".cmeta"); if ((fp = fopen (dest->str, "w")) != NULL) { - int fd = fileno (fp); + gint fd = fileno (fp); /* write the magic string */ if (fwrite ("CLMD", 4, 1, fp) != 1) @@ -1723,13 +1723,13 @@ fatal: } static int -em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full_name, CamelException *ex) +em_migrate_dir (EMMigrateSession *session, const gchar *dirname, const gchar *full_name, CamelException *ex) { - char *path; + gchar *path; DIR *dir; struct stat st; struct dirent *dent; - int res = 0; + gint res = 0; if (em_migrate_folder(session, dirname, full_name, ex) == -1) return -1; @@ -1747,8 +1747,8 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full } while (res == 0 && (dent = readdir (dir))) { - char *full_path; - char *name; + gchar *full_path; + gchar *name; if (dent->d_name[0] == '.') continue; @@ -1778,7 +1778,7 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex) struct dirent *dent; struct stat st; DIR *dir; - int res = 0; + gint res = 0; if (!(dir = opendir (session->srcdir))) { camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, @@ -1792,7 +1792,7 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex) "patient while Evolution migrates your folders...")); while (res == 0 && (dent = readdir (dir))) { - char *full_path; + gchar *full_path; if (dent->d_name[0] == '.') continue; @@ -1814,10 +1814,10 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex) return res; } -static char * -upgrade_xml_uris_1_4 (const char *uri) +static gchar * +upgrade_xml_uris_1_4 (const gchar *uri) { - char *path, *prefix, *p; + gchar *path, *prefix, *p; CamelURL *url; if (!strncmp (uri, "file:", 5)) { @@ -1866,7 +1866,7 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc) if (!doc || !(root = xmlDocGetRootElement (doc))) return; - if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) { + if (!root->name || strcmp ((gchar *)root->name, "filteroptions") != 0) { /* root node is not <filteroptions>, nothing to upgrade */ return; } @@ -1878,19 +1878,19 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc) node = node->children; while (node != NULL) { - if (node->name && !strcmp ((char *)node->name, "rule")) { + if (node->name && !strcmp ((gchar *)node->name, "rule")) { xmlNodePtr sources; - char *src; + gchar *src; - if (!(src = (char *)xmlGetProp (node, (const unsigned char *)"source"))) - src = (char *)xmlStrdup ((const unsigned char *)"local"); /* default to all local folders? */ + if (!(src = (gchar *)xmlGetProp (node, (const guchar *)"source"))) + src = (gchar *)xmlStrdup ((const guchar *)"local"); /* default to all local folders? */ - xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming"); + xmlSetProp (node, (const guchar *)"source", (const guchar *)"incoming"); if (!(sources = xml_find_node (node, "sources"))) - sources = xmlNewChild (node, NULL, (const unsigned char *)"sources", NULL); + sources = xmlNewChild (node, NULL, (const guchar *)"sources", NULL); - xmlSetProp (sources, (const unsigned char *)"with", (unsigned char *)src); + xmlSetProp (sources, (const guchar *)"with", (guchar *)src); xmlFree (src); } @@ -1898,14 +1898,14 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc) } } -static char * -get_nth_sig (int id) +static gchar * +get_nth_sig (gint id) { ESignatureList *list; ESignature *sig; EIterator *iter; - char *uid = NULL; - int i = 0; + gchar *uid = NULL; + gint i = 0; list = mail_config_get_signatures (); iter = e_list_get_iterator ((EList *) list); @@ -1937,7 +1937,7 @@ em_upgrade_accounts_1_4 (void) iter = e_list_get_iterator ((EList *) accounts); while (e_iterator_is_valid (iter)) { EAccount *account = (EAccount *) e_iterator_get (iter); - char *url; + gchar *url; if (account->drafts_folder_uri) { url = upgrade_xml_uris_1_4 (account->drafts_folder_uri); @@ -1952,7 +1952,7 @@ em_upgrade_accounts_1_4 (void) } if (account->id->sig_uid && !strncmp (account->id->sig_uid, "::", 2)) { - int sig_id; + gint sig_id; sig_id = strtol (account->id->sig_uid + 2, NULL, 10); g_free (account->id->sig_uid); @@ -1968,14 +1968,14 @@ em_upgrade_accounts_1_4 (void) } static int -em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex) +em_migrate_pop_uid_caches_1_4 (const gchar *evolution_dir, CamelException *ex) { GString *oldpath, *newpath; struct dirent *dent; size_t olen, nlen; - char *cache_dir; + gchar *cache_dir; DIR *dir; - int res = 0; + gint res = 0; /* Sigh, too many unique strings to translate, for cases which shouldn't ever happen */ @@ -2047,9 +2047,9 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex) } static int -em_migrate_imap_caches_1_4 (const char *evolution_dir, CamelException *ex) +em_migrate_imap_caches_1_4 (const gchar *evolution_dir, CamelException *ex) { - char *src, *dest; + gchar *src, *dest; struct stat st; src = g_build_filename (g_get_home_dir (), "evolution", "mail", "imap", NULL); @@ -2070,11 +2070,11 @@ em_migrate_imap_caches_1_4 (const char *evolution_dir, CamelException *ex) } static int -em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *ex) +em_migrate_folder_expand_state_1_4 (const gchar *evolution_dir, CamelException *ex) { GString *srcpath, *destpath; size_t slen, dlen, rlen; - char *evo14_mbox_root; + gchar *evo14_mbox_root; struct dirent *dent; struct stat st; DIR *dir; @@ -2107,8 +2107,8 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e evo14_mbox_root[rlen] = '\0'; while ((dent = readdir (dir))) { - char *full_name, *inptr, *buf = NULL; - const char *filename; + gchar *full_name, *inptr, *buf = NULL; + const gchar *filename; GString *new; if (strncmp (dent->d_name, "et-expanded-", 12) != 0) @@ -2168,11 +2168,11 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e } static int -em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *ex) +em_migrate_folder_view_settings_1_4 (const gchar *evolution_dir, CamelException *ex) { GString *srcpath, *destpath; size_t slen, dlen, rlen; - char *evo14_mbox_root; + gchar *evo14_mbox_root; struct dirent *dent; struct stat st; DIR *dir; @@ -2205,8 +2205,8 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException * evo14_mbox_root[rlen] = '\0'; while ((dent = readdir (dir))) { - char *full_name, *inptr, *buf = NULL; - const char *filename, *ext; + gchar *full_name, *inptr, *buf = NULL; + const gchar *filename, *ext; size_t prelen = 0; GString *new; @@ -2216,7 +2216,7 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException * if (!(ext = strrchr (dent->d_name, '.'))) continue; - if (!strcmp (ext, ".galview") || !strcmp ((char *)dent->d_name, "galview.xml")) { + if (!strcmp (ext, ".galview") || !strcmp ((gchar *)dent->d_name, "galview.xml")) { /* just copy the file */ filename = dent->d_name; goto copy; @@ -2224,9 +2224,9 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException * continue; } - if (!strncmp ((const char *)dent->d_name, "current_view-", 13)) { + if (!strncmp ((const gchar *)dent->d_name, "current_view-", 13)) { prelen = 13; - } else if (!strncmp ((const char *)dent->d_name, "custom_view-", 12)) { + } else if (!strncmp ((const gchar *)dent->d_name, "custom_view-", 12)) { prelen = 12; } else { /* huh? wtf is this file? */ @@ -2292,14 +2292,14 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException * #define SUBFOLDER_DIR_NAME "subfolders" #define SUBFOLDER_DIR_NAME_LEN 10 -static char * -e_path_to_physical (const char *prefix, const char *vpath) +static gchar * +e_path_to_physical (const gchar *prefix, const gchar *vpath) { - const char *p, *newp; - char *dp; - char *ppath; - int ppath_len; - int prefix_len; + const gchar *p, *newp; + gchar *dp; + gchar *ppath; + gint ppath_len; + gint prefix_len; while (*vpath == '/') vpath++; @@ -2368,7 +2368,7 @@ e_path_to_physical (const char *prefix, const char *vpath) } static int -em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex) +em_migrate_imap_cmeta_1_4(const gchar *evolution_dir, CamelException *ex) { GConfClient *gconf; GSList *paths, *p; @@ -2381,7 +2381,7 @@ em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex) gconf = gconf_client_get_default(); paths = gconf_client_get_list(gconf, "/apps/evolution/shell/offline/folder_paths", GCONF_VALUE_STRING, NULL); for (p = paths;p;p = g_slist_next(p)) { - char *name, *path; + gchar *name, *path; name = p->data; if (*name) @@ -2394,7 +2394,7 @@ em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex) CamelURL *url = camel_url_new(account->source->url, NULL); if (url) { - char *dir, *base; + gchar *dir, *base; base = g_strdup_printf("%s/mail/imap/%s@%s/folders", evolution_dir, @@ -2403,7 +2403,7 @@ em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex) dir = e_path_to_physical(base, path); if (g_mkdir_with_parents(dir, 0777) == 0) { - char *cmeta; + gchar *cmeta; FILE *fp; cmeta = g_build_filename(dir, "cmeta", NULL); @@ -2455,7 +2455,7 @@ remove_system_searches(xmlDocPtr searches) * searchtypes.xml file instead */ node = xmlDocGetRootElement(searches); - if (!node->name || strcmp((char *)node->name, "filteroptions")) + if (!node->name || strcmp((gchar *)node->name, "filteroptions")) return; if (!(node = xml_find_node(node, "ruleset"))) @@ -2465,11 +2465,11 @@ remove_system_searches(xmlDocPtr searches) while (node != NULL) { xmlNodePtr nnode = node->next; - if (node->name && !strcmp ((char *)node->name, "rule")) { - char *src; + if (node->name && !strcmp ((gchar *)node->name, "rule")) { + gchar *src; - src = (char *)xmlGetProp(node, (unsigned char *)"source"); - if (src && !strcmp((char *)src, "demand")) { + src = (gchar *)xmlGetProp(node, (guchar *)"source"); + if (src && !strcmp((gchar *)src, "demand")) { xmlUnlinkNode(node); xmlFreeNodeList(node); } @@ -2481,12 +2481,12 @@ remove_system_searches(xmlDocPtr searches) } static int -em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex) +em_migrate_1_4 (const gchar *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex) { EMMigrateSession *session; CamelException lex; struct stat st; - char *path; + gchar *path; xmlDocPtr searches; path = g_build_filename (evolution_dir, "mail", NULL); @@ -2581,7 +2581,7 @@ em_update_accounts_2_11 (void) if (g_str_has_prefix (account->source->url, "spool://")) { if (g_file_test (account->source->url + 8, G_FILE_TEST_IS_DIR)) { - char *str = g_strdup_printf ("spooldir://%s", account->source->url + 8); + gchar *str = g_strdup_printf ("spooldir://%s", account->source->url + 8); g_free (account->source->url); account->source->url = str; @@ -2601,11 +2601,11 @@ em_update_accounts_2_11 (void) #endif /* !G_OS_WIN32 */ static int -emm_setup_initial(const char *evolution_dir) +emm_setup_initial(const gchar *evolution_dir) { GDir *dir; - const char *d; - char *local = NULL, *base; + const gchar *d; + gchar *local = NULL, *base; const gchar * const *language_names; /* special-case - this means brand new install of evolution */ @@ -2637,7 +2637,7 @@ emm_setup_initial(const char *evolution_dir) dir = g_dir_open(local, 0, NULL); if (dir) { while ((d = g_dir_read_name(dir))) { - char *src, *dest; + gchar *src, *dest; src = g_build_filename(local, d, NULL); dest = g_build_filename(base, d, NULL); @@ -2750,7 +2750,7 @@ em_update_sa_junk_setting_2_23 (void) key = gconf_client_get (client, "/apps/evolution/mail/junk/default_plugin", NULL); if (key) { - const char *str = gconf_value_get_string (key); + const gchar *str = gconf_value_get_string (key); if (str && strcmp (str, "Spamassasin") == 0) gconf_client_set_string (client, "/apps/evolution/mail/junk/default_plugin", "SpamAssassin", NULL); @@ -2772,13 +2772,13 @@ update_progress_in_main_thread (double *progress) } static void -migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const char *acc, CamelException *ex, gboolean *done, int *nth_folder, int total_folders) +migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const gchar *acc, CamelException *ex, gboolean *done, gint *nth_folder, gint total_folders) { CamelFolder *folder; while (fi) { double progress; - char *tmp; + gchar *tmp; *nth_folder = *nth_folder + 1; @@ -2808,7 +2808,7 @@ migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const /* This could be in CamelStore.ch */ static void -count_folders (CamelFolderInfo *fi, int *count) +count_folders (CamelFolderInfo *fi, gint *count) { while (fi) { *count = *count + 1; @@ -2821,7 +2821,7 @@ static CamelStore * setup_local_store (MailComponent *mc) { CamelURL *url; - char *tmp; + gchar *tmp; CamelStore *store; url = camel_url_new("mbox:", NULL); @@ -2837,7 +2837,7 @@ setup_local_store (MailComponent *mc) } struct migrate_folders_to_db_structure { - char *account_name; + gchar *account_name; CamelException ex; CamelStore *store; CamelFolderInfo *info; @@ -2847,7 +2847,7 @@ struct migrate_folders_to_db_structure { static void migrate_folders_to_db_thread (struct migrate_folders_to_db_structure *migrate_dbs) { - int num_of_folders = 0, nth_folder = 0; + gint num_of_folders = 0, nth_folder = 0; count_folders (migrate_dbs->info, &num_of_folders); migrate_folders (migrate_dbs->store, migrate_dbs->is_local_store, migrate_dbs->info, migrate_dbs->account_name, &(migrate_dbs->ex), &(migrate_dbs->done), @@ -2859,7 +2859,7 @@ migrate_to_db() { EAccountList *accounts; EIterator *iter; - int i=0, len; + gint i=0, len; MailComponent *component = mail_component_peek (); CamelStore *store = NULL; CamelFolderInfo *info; @@ -2901,7 +2901,7 @@ migrate_to_db() while (e_iterator_is_valid (iter)) { EAccount *account = (EAccount *) e_iterator_get (iter); EAccountService *service; - const char *name; + const gchar *name; service = account->source; name = account->name; @@ -2943,11 +2943,11 @@ migrate_to_db() } -int -em_migrate (const char *evolution_dir, int major, int minor, int revision, CamelException *ex) +gint +em_migrate (const gchar *evolution_dir, gint major, gint minor, gint revision, CamelException *ex) { struct stat st; - char *path; + gchar *path; /* make sure ~/.evolution/mail exists */ path = g_build_filename (evolution_dir, "mail", NULL); diff --git a/mail/em-migrate.h b/mail/em-migrate.h index 238f4fda1c..f6d43c159a 100644 --- a/mail/em-migrate.h +++ b/mail/em-migrate.h @@ -30,7 +30,7 @@ extern "C" { #pragma } #endif /* __cplusplus */ -int em_migrate (const char *evolution_dir, int major, int minor, int revision, CamelException *ex); +gint em_migrate (const gchar *evolution_dir, gint major, gint minor, gint revision, CamelException *ex); #ifdef __cplusplus } diff --git a/mail/em-network-prefs.c b/mail/em-network-prefs.c index b0c51ed863..47df87a062 100644 --- a/mail/em-network-prefs.c +++ b/mail/em-network-prefs.c @@ -132,7 +132,7 @@ em_network_prefs_destroy (GtkObject *obj) static void toggle_button_toggled (GtkToggleButton *toggle, EMNetworkPrefs *prefs) { - const char *key; + const gchar *key; key = g_object_get_data ((GObject *) toggle, "key"); gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL); @@ -146,14 +146,14 @@ toggle_button_toggled (GtkToggleButton *toggle, EMNetworkPrefs *prefs) } static void -toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const char *key) +toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const gchar *key) { gboolean bool; bool = gconf_client_get_bool (prefs->gconf, key, NULL); gtk_toggle_button_set_active (toggle, bool); - g_object_set_data ((GObject *) toggle, "key", (void *) key); + g_object_set_data ((GObject *) toggle, "key", (gpointer) key); g_signal_connect (toggle, "toggled", G_CALLBACK (toggle_button_toggled), prefs); if (!gconf_client_key_is_writable (prefs->gconf, key, NULL)) @@ -161,7 +161,7 @@ toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const char * } static GtkWidget * -emnp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) +emnp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data) { EMNetworkPrefs *prefs = data; @@ -210,7 +210,7 @@ emnp_set_sensitiveness (EMNetworkPrefs *prefs, NetworkConfigProxyType type, gboo static void notify_proxy_type_changed (GtkWidget *widget, EMNetworkPrefs *prefs) { - int type; + gint type; if (gtk_toggle_button_get_active (prefs->sys_proxy)) type = NETWORK_PROXY_SYS_SETTINGS; @@ -249,8 +249,8 @@ notify_proxy_type_changed (GtkWidget *widget, EMNetworkPrefs *prefs) static void widget_entry_changed_cb (GtkWidget *widget, gpointer data) { - const char *value; - int port = -1; + const gchar *value; + gint port = -1; GConfClient *gconf = mail_config_get_gconf_client (); /* @@ -259,12 +259,12 @@ widget_entry_changed_cb (GtkWidget *widget, gpointer data) */ if (GTK_IS_SPIN_BUTTON (widget)) { port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget)); - gconf_client_set_int (gconf, (const char *)data, port, NULL); - d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const char *)data, port)); + gconf_client_set_int (gconf, (const gchar *)data, port, NULL); + d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, port)); } else if (GTK_IS_ENTRY (widget)) { value = gtk_entry_get_text (GTK_ENTRY (widget)); - gconf_client_set_string (gconf, (const char *)data, value, NULL); - d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const char *)data, value)); + gconf_client_set_string (gconf, (const gchar *)data, value, NULL); + d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, value)); } } @@ -277,7 +277,7 @@ static EMConfigItem emnp_items[] = { }; static void -emnp_free(EConfig *ec, GSList *items, void *data) +emnp_free(EConfig *ec, GSList *items, gpointer data) { /* the prefs data is freed automagically */ @@ -301,12 +301,12 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) GtkWidget *toplevel; GladeXML *gui; GSList* l; - char *buf; + gchar *buf; EMConfig *ec; EMConfigTargetPrefs *target; gboolean locked; - int i, val, port; - char *gladefile; + gint i, val, port; + gchar *gladefile; prefs->gconf = mail_config_get_gconf_client (); diff --git a/mail/em-popup.c b/mail/em-popup.c index ad738fca57..5caabca171 100644 --- a/mail/em-popup.c +++ b/mail/em-popup.c @@ -55,7 +55,7 @@ #include <e-util/e-util.h> #include "e-attachment.h" -static void emp_standard_menu_factory(EPopup *emp, void *data); +static void emp_standard_menu_factory(EPopup *emp, gpointer data); static GObjectClass *emp_parent; @@ -135,7 +135,7 @@ em_popup_get_type(void) return type; } -EMPopup *em_popup_new(const char *menuid) +EMPopup *em_popup_new(const gchar *menuid) { EMPopup *emp = g_object_new(em_popup_get_type(), NULL); @@ -155,14 +155,14 @@ EMPopup *em_popup_new(const char *menuid) * Return value: **/ EMPopupTargetSelect * -em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids) +em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids) { EMPopupTargetSelect *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_SELECT, sizeof(*t)); CamelStore *store = CAMEL_STORE (folder->parent_store); guint32 mask = ~0; gboolean draft_or_outbox; - int i; - const char *tmp; + gint i; + const gchar *tmp; t->uids = uids; t->folder = folder; @@ -251,7 +251,7 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char } EMPopupTargetURI * -em_popup_target_new_uri(EMPopup *emp, const char *uri) +em_popup_target_new_uri(EMPopup *emp, const gchar *uri) { EMPopupTargetURI *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_URI, sizeof(*t)); guint32 mask = ~0; @@ -273,7 +273,7 @@ em_popup_target_new_uri(EMPopup *emp, const char *uri) } EMPopupTargetPart * -em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *mime_type) +em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const gchar *mime_type) { EMPopupTargetPart *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_PART, sizeof(*t)); guint32 mask = ~0; @@ -300,7 +300,7 @@ em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char * /* TODO: This should be based on the CamelFolderInfo, but ... em-folder-tree doesn't keep it? */ EMPopupTargetFolder * -em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, guint32 popup_flags) +em_popup_target_new_folder (EMPopup *emp, const gchar *uri, guint32 info_flags, guint32 popup_flags) { EMPopupTargetFolder *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_FOLDER, sizeof(*t)); guint32 mask = ~0; @@ -318,7 +318,7 @@ em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, g goto done; if (!(popup_flags & EM_POPUP_FOLDER_STORE)) { - const char *path; + const gchar *path; if (popup_flags & EM_POPUP_FOLDER_DELETE) mask &= ~EM_POPUP_FOLDER_DELETE; @@ -354,7 +354,7 @@ done: /* ********************************************************************** */ static void -emp_part_popup_saveas(EPopup *ep, EPopupItem *item, void *data) +emp_part_popup_saveas(EPopup *ep, EPopupItem *item, gpointer data) { EPopupTarget *t = ep->target; CamelMimePart *part = NULL; @@ -365,12 +365,12 @@ emp_part_popup_saveas(EPopup *ep, EPopupItem *item, void *data) } static void -emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data) +emp_part_popup_set_background(EPopup *ep, EPopupItem *item, gpointer data) { EPopupTarget *t = ep->target; GConfClient *gconf; - char *str, *filename, *path, *extension; - unsigned int i=1; + gchar *str, *filename, *path, *extension; + guint i=1; CamelMimePart *part = NULL; part = ((EMPopupTargetPart *) t)->part; @@ -399,7 +399,7 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data) /* if file exists, stick a (number) on the end */ while (g_file_test(path, G_FILE_TEST_EXISTS)) { - char *name; + gchar *name; name = g_strdup_printf(extension?"%s (%d).%s":"%s (%d)", filename, i++, extension); g_free(path); path = g_build_filename(g_get_home_dir(), ".gnome2", "wallpapers", name, NULL); @@ -438,7 +438,7 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data) } static void -emp_part_popup_reply_sender(EPopup *ep, EPopupItem *item, void *data) +emp_part_popup_reply_sender(EPopup *ep, EPopupItem *item, gpointer data) { EPopupTarget *t = ep->target; CamelMimeMessage *message; @@ -451,7 +451,7 @@ emp_part_popup_reply_sender(EPopup *ep, EPopupItem *item, void *data) } static void -emp_part_popup_reply_list (EPopup *ep, EPopupItem *item, void *data) +emp_part_popup_reply_list (EPopup *ep, EPopupItem *item, gpointer data) { EPopupTarget *t = ep->target; CamelMimeMessage *message; @@ -464,7 +464,7 @@ emp_part_popup_reply_list (EPopup *ep, EPopupItem *item, void *data) } static void -emp_part_popup_reply_all (EPopup *ep, EPopupItem *item, void *data) +emp_part_popup_reply_all (EPopup *ep, EPopupItem *item, gpointer data) { EPopupTarget *t = ep->target; CamelMimeMessage *message; @@ -477,7 +477,7 @@ emp_part_popup_reply_all (EPopup *ep, EPopupItem *item, void *data) } static void -emp_part_popup_forward (EPopup *ep, EPopupItem *item, void *data) +emp_part_popup_forward (EPopup *ep, EPopupItem *item, gpointer data) { EPopupTarget *t = ep->target; CamelMimeMessage *message; @@ -506,7 +506,7 @@ static const EPopupItem emp_standard_part_apps_bar = { E_POPUP_BAR, (gchar *) "9 /* ********************************************************************** */ static void -emp_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data) +emp_uri_popup_link_open(EPopup *ep, EPopupItem *item, gpointer data) { EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target; @@ -515,7 +515,7 @@ emp_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data) } static void -emp_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data) +emp_uri_popup_address_send(EPopup *ep, EPopupItem *item, gpointer data) { EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target; @@ -524,7 +524,7 @@ emp_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data) } static void -emp_uri_popup_address_add(EPopup *ep, EPopupItem *item, void *data) +emp_uri_popup_address_add(EPopup *ep, EPopupItem *item, gpointer data) { EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target; CamelURL *url; @@ -552,9 +552,9 @@ static EPopupItem emp_standard_uri_popups[] = { #define LEN(x) (sizeof(x)/sizeof(x[0])) static void -emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data) +emp_apps_open_in(EPopup *ep, EPopupItem *item, gpointer data) { - char *path; + gchar *path; EPopupTarget *target = ep->target; CamelMimePart *part; @@ -573,7 +573,7 @@ emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data) g_app_info_launch (app, uris, NULL, &error); g_object_unref (file); } else { - char *uri; + gchar *uri; uri = e_util_filename_to_uri (path); uris = g_list_append (uris, uri); @@ -593,7 +593,7 @@ emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data) } static void -emp_apps_popup_free(EPopup *ep, GSList *free_list, void *data) +emp_apps_popup_free(EPopup *ep, GSList *free_list, gpointer data) { while (free_list) { GSList *n = free_list->next; @@ -612,13 +612,13 @@ emp_apps_popup_free(EPopup *ep, GSList *free_list, void *data) } static void -emp_standard_items_free(EPopup *ep, GSList *items, void *data) +emp_standard_items_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); } static void -emp_add_vcard (EPopup *ep, EPopupItem *item, void *data) +emp_add_vcard (EPopup *ep, EPopupItem *item, gpointer data) { EPopupTarget *target = ep->target; CamelMimePart *part; @@ -649,14 +649,14 @@ emp_add_vcard (EPopup *ep, EPopupItem *item, void *data) } static void -emp_standard_menu_factory(EPopup *emp, void *data) +emp_standard_menu_factory(EPopup *emp, gpointer data) { - int i, len; + gint i, len; EPopupItem *items; GSList *menus = NULL; GList *apps = NULL; - char *mime_type = NULL; - const char *filename = NULL; + gchar *mime_type = NULL; + const gchar *filename = NULL; switch (emp->target->type) { #if 0 @@ -714,7 +714,7 @@ emp_standard_menu_factory(EPopup *emp, void *data) GSList *open_menus = NULL; GList *l; - menus = g_slist_prepend(menus, (void *)&emp_standard_part_apps_bar); + menus = g_slist_prepend(menus, (gpointer)&emp_standard_part_apps_bar); for (l = apps, i = 0; l; l = l->next, i++) { GAppInfo *app = l->data; @@ -792,7 +792,7 @@ emp_standard_menu_factory(EPopup *emp, void *data) */ -static void *emph_parent_class; +static gpointer emph_parent_class; #define emph ((EMPopupHook *)eph) static const EPopupHookTargetMask emph_select_masks[] = { @@ -859,7 +859,7 @@ emph_finalise(GObject *o) static void emph_class_init(EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = emph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.popup:1.0"; diff --git a/mail/em-popup.h b/mail/em-popup.h index cde903a4ec..dea4aee5d2 100644 --- a/mail/em-popup.h +++ b/mail/em-popup.h @@ -169,7 +169,7 @@ typedef struct _EMPopupTargetFolder EMPopupTargetFolder; **/ struct _EMPopupTargetURI { EPopupTarget target; - char *uri; + gchar *uri; }; /** @@ -187,7 +187,7 @@ struct _EMPopupTargetURI { struct _EMPopupTargetSelect { EPopupTarget target; struct _CamelFolder *folder; - char *uri; + gchar *uri; GPtrArray *uids; }; @@ -204,7 +204,7 @@ struct _EMPopupTargetSelect { **/ struct _EMPopupTargetPart { EPopupTarget target; - char *mime_type; + gchar *mime_type; struct _CamelMimePart *part; }; @@ -218,7 +218,7 @@ struct _EMPopupTargetPart { **/ struct _EMPopupTargetFolder { EPopupTarget target; - char *uri; + gchar *uri; }; typedef struct _EPopupItem EMPopupItem; @@ -236,12 +236,12 @@ struct _EMPopupClass { GType em_popup_get_type(void); -EMPopup *em_popup_new(const char *menuid); +EMPopup *em_popup_new(const gchar *menuid); -EMPopupTargetURI *em_popup_target_new_uri(EMPopup *emp, const char *uri); -EMPopupTargetSelect *em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids); -EMPopupTargetPart *em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *mime_type); -EMPopupTargetFolder *em_popup_target_new_folder(EMPopup *emp, const char *uri, guint32 info_flags, guint32 popup_flags); +EMPopupTargetURI *em_popup_target_new_uri(EMPopup *emp, const gchar *uri); +EMPopupTargetSelect *em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids); +EMPopupTargetPart *em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const gchar *mime_type); +EMPopupTargetFolder *em_popup_target_new_folder(EMPopup *emp, const gchar *uri, guint32 info_flags, guint32 popup_flags); /* ********************************************************************** */ diff --git a/mail/em-search-context.c b/mail/em-search-context.c index ac03d40a80..22369b4f60 100644 --- a/mail/em-search-context.c +++ b/mail/em-search-context.c @@ -33,7 +33,7 @@ #include "filter/filter-option.h" #include "filter/filter-int.h" -static FilterElement *em_search_new_element(RuleContext *rc, const char *type); +static FilterElement *em_search_new_element(RuleContext *rc, const gchar *type); static RuleContextClass *parent_class = NULL; @@ -102,7 +102,7 @@ em_search_context_new (void) } static FilterElement * -em_search_new_element(RuleContext *rc, const char *type) +em_search_new_element(RuleContext *rc, const gchar *type) { if (!strcmp (type, "system-flag")) { return (FilterElement *) filter_option_new (); diff --git a/mail/em-stripsig-filter.c b/mail/em-stripsig-filter.c index 1600eeaed0..1b977e975f 100644 --- a/mail/em-stripsig-filter.c +++ b/mail/em-stripsig-filter.c @@ -34,10 +34,10 @@ static void em_stripsig_filter_class_init (EMStripSigFilterClass *klass); static void em_stripsig_filter_init (EMStripSigFilter *filter, EMStripSigFilterClass *klass); -static void filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace); -static void filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace); +static void filter_filter (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace); +static void filter_complete (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace); static void filter_reset (CamelMimeFilter *filter); @@ -83,13 +83,13 @@ em_stripsig_filter_init (EMStripSigFilter *filter, EMStripSigFilterClass *klass) } static void -strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace, int flush) +strip_signature (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace, gint flush) { EMStripSigFilter *stripsig = (EMStripSigFilter *) filter; - register const char *inptr = in; - const char *inend = in + len; - const char *start = NULL; + register const gchar *inptr = in; + const gchar *inend = in + len; + const gchar *start = NULL; if (stripsig->midline) { while (inptr < inend && *inptr != '\n') @@ -132,15 +132,15 @@ strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, } static void -filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace) +filter_filter (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace) { strip_signature (filter, in, len, prespace, out, outlen, outprespace, FALSE); } static void -filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace, - char **out, size_t *outlen, size_t *outprespace) +filter_complete (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace, + gchar **out, size_t *outlen, size_t *outprespace) { strip_signature (filter, in, len, prespace, out, outlen, outprespace, TRUE); } diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index 25c447d62e..df58c808db 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -52,7 +52,7 @@ typedef struct _EMSubscribeEditor EMSubscribeEditor; struct _EMSubscribeEditor { EDList stores; - int busy; + gint busy; guint busy_id; struct _EMSubscribe *current; /* the current one, if any */ @@ -69,14 +69,14 @@ struct _EMSubscribe { struct _EMSubscribe *next; struct _EMSubscribe *prev; - int ref_count; - int cancel; - int seq; /* upped every time we refresh */ + gint ref_count; + gint cancel; + gint seq; /* upped every time we refresh */ struct _EMSubscribeEditor *editor; /* parent object*/ - char *store_uri; - int store_id; /* looking up a store */ + gchar *store_uri; + gint store_id; /* looking up a store */ CamelStore *store; GHashTable *folders; @@ -88,16 +88,16 @@ struct _EMSubscribe { GSList *info_list; /* pending LISTs, EMSubscribeNode's */ - int pending_id; + gint pending_id; EDList pending; /* queue of pending UN/SUBSCRIBEs, EMsg's */ - int subscribe_id; + gint subscribe_id; EDList subscribe; /* working variables at runtime */ - int selected_count; - int selected_subscribed_count; + gint selected_count; + gint selected_subscribed_count; guint subscribed_state:1; /* for setting the selection*/ }; @@ -116,8 +116,8 @@ struct _MailMsgListNode { MailMsg *msg; }; -static void sub_editor_busy(EMSubscribeEditor *se, int dir); -static int sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node); +static void sub_editor_busy(EMSubscribeEditor *se, gint dir); +static gint sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node); static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub); static void @@ -169,8 +169,8 @@ struct _zsubscribe_msg { EMSubscribe *sub; EMSubscribeNode *node; - int subscribe; - char *path; + gint subscribe; + gchar *path; }; static void @@ -246,11 +246,11 @@ static MailMsgInfo sub_subscribe_folder_info = { /* spath is tree path in string form */ static int -sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, int state, const char *spath) +sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, gint state, const gchar *spath) { struct _zsubscribe_msg *m; MailMsgListNode *msgListNode; - int id; + gint id; m = mail_msg_new (&sub_subscribe_folder_info); m->sub = sub; @@ -276,7 +276,7 @@ sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, int state, const /* ********************************************************************** */ static void -sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, int pending) +sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, gint pending) { CamelFolderInfo *fi; GtkTreeStore *treestore; @@ -343,7 +343,7 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in struct _emse_folderinfo_msg { MailMsg base; - int seq; + gint seq; EMSubscribe *sub; EMSubscribeNode *node; @@ -353,7 +353,7 @@ struct _emse_folderinfo_msg { static void sub_folderinfo_exec (struct _emse_folderinfo_msg *m) { - char *pub_full_name=NULL; + gchar *pub_full_name=NULL; if (m->seq == m->sub->seq) { camel_operation_register(m->base.cancel); @@ -424,7 +424,7 @@ static int sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node) { struct _emse_folderinfo_msg *m; - int id; + gint id; d(printf("%s:%s: Starting get folderinfo of '%s'\n", G_STRLOC, G_STRFUNC, node?node->info->full_name:"<root>")); @@ -450,7 +450,7 @@ sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node) /* (un) subscribes the current selection */ static void -sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscribe *sub) +sub_subscribe_toggled(GtkCellRendererToggle *render, const gchar *spath, EMSubscribe *sub) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(sub->tree); @@ -468,7 +468,7 @@ sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscr } } -static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *data) +static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { EMSubscribe *sub = data; EMSubscribeNode *node; @@ -484,7 +484,7 @@ static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter * static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub) { - int dosub = TRUE, dounsub = TRUE; + gint dosub = TRUE, dounsub = TRUE; sub->selected_count = 0; sub->selected_subscribed_count = 0; @@ -516,7 +516,7 @@ sub_row_expanded(GtkTreeView *tree, GtkTreeIter *iter, GtkTreePath *path, EMSubs EMSubscribeNode *node; GtkTreeIter child; GtkTreeModel *model = (GtkTreeModel *)gtk_tree_view_get_model(tree); - char *row_name; + gchar *row_name; gtk_tree_model_get(model, iter, 1, &row_name, -1); d(printf("%s:%s: row-expanded '%s'\n", G_STRLOC, G_STRFUNC, @@ -582,7 +582,7 @@ sub_destroy(GtkWidget *w, EMSubscribe *sub) } static EMSubscribe * -subscribe_new(EMSubscribeEditor *se, const char *uri) +subscribe_new(EMSubscribeEditor *se, const gchar *uri) { EMSubscribe *sub; @@ -720,7 +720,7 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se) } static void -sub_editor_got_store(char *uri, CamelStore *store, void *data) +sub_editor_got_store(gchar *uri, CamelStore *store, gpointer data) { struct _EMSubscribe *sub = data; @@ -732,7 +732,7 @@ sub_editor_got_store(char *uri, CamelStore *store, void *data) static void sub_editor_combobox_changed (GtkWidget *w, EMSubscribeEditor *se) { - int i, n; + gint i, n; struct _EMSubscribe *sub; d(printf("combobox changed\n")); @@ -784,9 +784,9 @@ static gboolean sub_editor_timeout(EMSubscribeEditor *se) return TRUE; } -static void sub_editor_busy(EMSubscribeEditor *se, int dir) +static void sub_editor_busy(EMSubscribeEditor *se, gint dir) { - int was; + gint was; was = se->busy != 0; se->busy += dir; @@ -831,7 +831,7 @@ GtkDialog *em_subscribe_editor_new(void) GtkCellRenderer *cell; GtkListStore *store; GtkTreeIter gtiter; - char *gladefile; + gchar *gladefile; se = g_malloc0(sizeof(*se)); e_dlist_init(&se->stores); diff --git a/mail/em-utils.c b/mail/em-utils.c index ba180e5011..2f0fb39789 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -82,7 +82,7 @@ #include "e-attachment.h" #include "e-activity-handler.h" -static void emu_save_part_done (CamelMimePart *part, char *name, int done, void *data); +static void emu_save_part_done (CamelMimePart *part, gchar *name, gint done, gpointer data); extern struct _CamelSession *session; @@ -103,11 +103,11 @@ extern struct _CamelSession *session; * Returns %TRUE if the user clicks Yes or %FALSE otherwise. **/ gboolean -em_utils_prompt_user(GtkWindow *parent, const char *promptkey, const char *tag, const char *arg0, ...) +em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...) { GtkWidget *mbox, *check = NULL; va_list ap; - int button; + gint button; GConfClient *gconf = mail_config_get_gconf_client(); if (promptkey @@ -148,7 +148,7 @@ GPtrArray * em_utils_uids_copy (GPtrArray *uids) { GPtrArray *copy; - int i; + gint i; copy = g_ptr_array_new (); g_ptr_array_set_size (copy, uids->len); @@ -168,7 +168,7 @@ em_utils_uids_copy (GPtrArray *uids) void em_utils_uids_free (GPtrArray *uids) { - int i; + gint i; for (i = 0; i < uids->len; i++) g_free (uids->pdata[i]); @@ -248,12 +248,12 @@ em_utils_check_user_can_send_mail (GtkWidget *parent) static GtkWidget *filter_editor = NULL; static void -em_filter_editor_response (GtkWidget *dialog, int button, gpointer user_data) +em_filter_editor_response (GtkWidget *dialog, gint button, gpointer user_data) { EMFilterContext *fc; if (button == GTK_RESPONSE_OK) { - char *user; + gchar *user; fc = g_object_get_data ((GObject *) dialog, "context"); user = g_strdup_printf ("%s/filters.xml", @@ -284,8 +284,8 @@ static EMFilterSource em_filter_source_element_names[] = { void em_utils_edit_filters (GtkWidget *parent) { - const char *base_directory = mail_component_peek_base_directory (mail_component_peek ()); - char *user, *system; + const gchar *base_directory = mail_component_peek_base_directory (mail_component_peek ()); + gchar *user, *system; EMFilterContext *fc; if (filter_editor) { @@ -331,9 +331,9 @@ em_filename_make_safe (gchar *string) gchar *p, *ts; gunichar c; #ifdef G_OS_WIN32 - const char *unsafe_chars = "/\":*?<>|\\#"; + const gchar *unsafe_chars = "/\":*?<>|\\#"; #else - const char *unsafe_chars = "/#"; + const gchar *unsafe_chars = "/#"; #endif g_return_if_fail (string != NULL); @@ -385,7 +385,7 @@ emu_save_get_filename_for_part (CamelMimePart *part) * Saves a mime part to disk (prompting the user for filename). **/ void -em_utils_save_part (GtkWidget *parent, const char *prompt, CamelMimePart *part) +em_utils_save_part (GtkWidget *parent, const gchar *prompt, CamelMimePart *part) { GtkWidget *file_chooser; const gchar *utf8_filename; @@ -462,7 +462,7 @@ get_unique_file_names (GSList *parts) sorted_file_names = g_slist_sort (g_slist_copy (file_names), cmp_func); last = sorted_file_names->data; for (iter = sorted_file_names->next; iter; iter = iter->next) { - char *name = iter->data; + gchar *name = iter->data; if (name && last && cmp_func (name, last) == 0) { gchar *new_name; @@ -556,10 +556,10 @@ exit: * Returns %TRUE if saving succeeded, %FALSE otherwise **/ gboolean -em_utils_save_part_to_file(GtkWidget *parent, const char *filename, CamelMimePart *part) +em_utils_save_part_to_file(GtkWidget *parent, const gchar *filename, CamelMimePart *part) { - int done; - char *dirname; + gint done; + gchar *dirname; struct stat st; if (filename[0] == 0) @@ -599,9 +599,9 @@ struct _save_messages_data { }; static void -emu_save_messages_response(GtkWidget *filesel, int response, struct _save_messages_data *data) +emu_save_messages_response(GtkWidget *filesel, gint response, struct _save_messages_data *data) { - char *uri; + gchar *uri; if (response == GTK_RESPONSE_OK) { uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel)); @@ -639,7 +639,7 @@ em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids) { struct _save_messages_data *data; GtkWidget *filesel; - char *filename = NULL; + gchar *filename = NULL; CamelMessageInfo *info = NULL; g_return_if_fail (CAMEL_IS_FOLDER (folder)); @@ -669,9 +669,9 @@ em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids) /* ********************************************************************** */ static void -emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *any, CORBA_Environment *ev, void *data) +emu_add_address_cb(BonoboListener *listener, const gchar *name, const CORBA_any *any, CORBA_Environment *ev, gpointer data) { - char *type = bonobo_event_subtype(name); + gchar *type = bonobo_event_subtype(name); if (!strcmp(type, "Destroy")) gtk_widget_destroy((GtkWidget *)data); @@ -681,12 +681,12 @@ emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any * /* one of email or vcard should be always NULL, never both of them */ static void -emu_add_address_or_vcard (struct _GtkWidget *parent, const char *email, const char *vcard) +emu_add_address_or_vcard (struct _GtkWidget *parent, const gchar *email, const gchar *vcard) { GtkWidget *win; GtkWidget *control; /*GtkWidget *socket;*/ - char *email_buf = NULL; + gchar *email_buf = NULL; if (email) { CamelInternetAddress *cia; @@ -742,7 +742,7 @@ emu_add_address_or_vcard (struct _GtkWidget *parent, const char *email, const ch * Add address @email to the addressbook. **/ void -em_utils_add_address (struct _GtkWidget *parent, const char *email) +em_utils_add_address (struct _GtkWidget *parent, const gchar *email) { emu_add_address_or_vcard (parent, email, NULL); } @@ -752,7 +752,7 @@ em_utils_add_address (struct _GtkWidget *parent, const char *email) * Adds whole vCard to the addressbook. **/ void -em_utils_add_vcard (struct _GtkWidget *parent, const char *vcard) +em_utils_add_vcard (struct _GtkWidget *parent, const gchar *vcard) { emu_add_address_or_vcard (parent, NULL, vcard); } @@ -777,12 +777,12 @@ ted_free (struct ted_t *ted) } static void -tag_editor_response (GtkWidget *dialog, int button, struct ted_t *ted) +tag_editor_response (GtkWidget *dialog, gint button, struct ted_t *ted) { CamelFolder *folder; CamelTag *tags, *t; GPtrArray *uids; - int i; + gint i; if (button == GTK_RESPONSE_OK && (tags = message_tag_editor_get_tag_list (ted->editor))) { folder = ted->folder; @@ -824,7 +824,7 @@ em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *u { GtkWidget *editor; struct ted_t *ted; - int i; + gint i; g_return_if_fail (CAMEL_IS_FOLDER (folder)); g_return_if_fail (uids != NULL); @@ -886,7 +886,7 @@ em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *u void em_utils_flag_for_followup_clear (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids) { - int i; + gint i; g_return_if_fail (CAMEL_IS_FOLDER (folder)); g_return_if_fail (uids != NULL); @@ -920,8 +920,8 @@ em_utils_flag_for_followup_clear (GtkWidget *parent, CamelFolder *folder, GPtrAr void em_utils_flag_for_followup_completed (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids) { - char *now; - int i; + gchar *now; + gint i; g_return_if_fail (CAMEL_IS_FOLDER (folder)); g_return_if_fail (uids != NULL); @@ -930,7 +930,7 @@ em_utils_flag_for_followup_completed (GtkWidget *parent, CamelFolder *folder, GP camel_folder_freeze (folder); for (i = 0; i < uids->len; i++) { - const char *tag; + const gchar *tag; CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]); if (mi) { @@ -958,7 +958,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr { CamelStreamFilter *filtered_stream; CamelMimeFilterFrom *from_filter; - int i, res = 0; + gint i, res = 0; from_filter = camel_mime_filter_from_new(); filtered_stream = camel_stream_filter_new_with_stream(stream); @@ -967,7 +967,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr for (i=0; i<uids->len; i++) { CamelMimeMessage *message; - char *from; + gchar *from; message = camel_folder_get_message(folder, uids->pdata[i], NULL); if (message == NULL) { @@ -1003,7 +1003,7 @@ em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream) { CamelException *ex = camel_exception_new(); CamelMimeParser *mp = camel_mime_parser_new(); - int res = -1; + gint res = -1; camel_mime_parser_scan_from(mp, TRUE); camel_mime_parser_init_with_stream(mp, stream); @@ -1079,7 +1079,7 @@ em_utils_selection_get_mailbox(GtkSelectionData *data, CamelFolder *folder) /* TODO: a stream mem with read-only access to existing data? */ /* NB: Although copying would let us run this async ... which it should */ - stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length); + stream = (CamelStream *)camel_stream_mem_new_with_buffer((gchar *)data->data, data->length); em_utils_read_messages_from_stream(folder, stream); camel_object_unref(stream); } @@ -1102,7 +1102,7 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder) return; ex = camel_exception_new(); - stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length); + stream = (CamelStream *)camel_stream_mem_new_with_buffer((gchar *)data->data, data->length); msg = camel_mime_message_new(); if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) == 0) camel_folder_append_message(folder, msg, NULL, NULL, ex); @@ -1122,14 +1122,14 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder) * FIXME: be nice if this could take a folder argument rather than uri **/ void -em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArray *uids) +em_utils_selection_set_uidlist(GtkSelectionData *data, const gchar *uri, GPtrArray *uids) { GByteArray *array = g_byte_array_new(); - int i; + gint i; /* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */ - g_byte_array_append(array, (unsigned char *)uri, strlen(uri)+1); + g_byte_array_append(array, (guchar *)uri, strlen(uri)+1); for (i=0; i<uids->len; i++) g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1); @@ -1148,10 +1148,10 @@ em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArra * Warning: Could take some time to run. **/ void -em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int move, CamelException *ex) +em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, gint move, CamelException *ex) { /* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */ - char *inptr, *inend; + gchar *inptr, *inend; GPtrArray *uids; CamelFolder *folder; @@ -1160,15 +1160,15 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo uids = g_ptr_array_new(); - inptr = (char *)data->data; - inend = (char *)(data->data + data->length); + inptr = (gchar *)data->data; + inend = (gchar *)(data->data + data->length); while (inptr < inend) { - char *start = inptr; + gchar *start = inptr; while (inptr < inend && *inptr) inptr++; - if (start > (char *)data->data) + if (start > (gchar *)data->data) g_ptr_array_add(uids, g_strndup(start, inptr-start)); inptr++; @@ -1179,7 +1179,7 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo return; } - folder = mail_tool_uri_to_folder((char *)data->data, 0, ex); + folder = mail_tool_uri_to_folder((gchar *)data->data, 0, ex); if (folder) { camel_folder_transfer_messages_to(folder, uids, dest, NULL, move, ex); camel_object_unref(folder); @@ -1201,10 +1201,10 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo void em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids) { - char *tmpdir; + gchar *tmpdir; CamelStream *fstream; - char *uri, *file = NULL, *tmpfile; - int fd; + gchar *uri, *file = NULL, *tmpfile; + gint fd; CamelMessageInfo *info; tmpdir = e_mkdtemp("drag-n-drop-XXXXXX"); @@ -1244,9 +1244,9 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr if (fstream) { if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0) { /* terminate with \r\n to be compliant with the spec */ - char *uri_crlf = g_strconcat(uri, "\r\n", NULL); + gchar *uri_crlf = g_strconcat(uri, "\r\n", NULL); - gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf)); + gtk_selection_data_set(data, data->target, 8, (guchar *)uri_crlf, strlen(uri_crlf)); g_free(uri_crlf); } @@ -1272,12 +1272,12 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder) { CamelStream *stream; CamelURL *url; - int fd, i, res = 0; - char *tmp, **uris; + gint fd, i, res = 0; + gchar *tmp, **uris; d(printf(" * drop uri list\n")); - tmp = g_strndup((char *)data->data, data->length); + tmp = g_strndup((gchar *)data->data, data->length); uris = g_strsplit(tmp, "\n", 0); g_free(tmp); for (i=0;res == 0 && uris[i];i++) { @@ -1305,9 +1305,9 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder) } static void -emu_save_part_done(CamelMimePart *part, char *name, int done, void *data) +emu_save_part_done(CamelMimePart *part, gchar *name, gint done, gpointer data) { - ((int *)data)[0] = done; + ((gint *)data)[0] = done; } /** @@ -1321,12 +1321,12 @@ emu_save_part_done(CamelMimePart *part, char *name, int done, void *data) * * Return value: NULL if anything failed. **/ -char * +gchar * em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode) { - const char *filename; - char *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL; - int done; + const gchar *filename; + gchar *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL; + gint done; GtkWidget *w; tmpdir = e_mkdtemp("evolution-tmp-XXXXXX"); @@ -1343,9 +1343,9 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode) } else { utf8_mfilename = g_strdup (filename); e_filename_make_safe (utf8_mfilename); - mfilename = g_filename_from_utf8 ((const char *) utf8_mfilename, -1, NULL, NULL, NULL); + mfilename = g_filename_from_utf8 ((const gchar *) utf8_mfilename, -1, NULL, NULL, NULL); g_free (utf8_mfilename); - filename = (const char *) mfilename; + filename = (const gchar *) mfilename; } path = g_build_filename(tmpdir, filename, NULL); @@ -1376,13 +1376,13 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode) **/ gboolean -em_utils_folder_is_templates (CamelFolder *folder, const char *uri) +em_utils_folder_is_templates (CamelFolder *folder, const gchar *uri) { EAccountList *accounts; EAccount *account; EIterator *iter; - int is = FALSE; - char *templates_uri; + gint is = FALSE; + gchar *templates_uri; if (folder == mail_component_get_folder (NULL, MAIL_COMPONENT_FOLDER_TEMPLATES)) return TRUE; @@ -1423,13 +1423,13 @@ em_utils_folder_is_templates (CamelFolder *folder, const char *uri) * Returns %TRUE if this is a Drafts folder or %FALSE otherwise. **/ gboolean -em_utils_folder_is_drafts(CamelFolder *folder, const char *uri) +em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri) { EAccountList *accounts; EAccount *account; EIterator *iter; - int is = FALSE; - char *drafts_uri; + gint is = FALSE; + gchar *drafts_uri; if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) return TRUE; @@ -1470,13 +1470,13 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri) * Returns %TRUE if this is a Sent folder or %FALSE otherwise. **/ gboolean -em_utils_folder_is_sent(CamelFolder *folder, const char *uri) +em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri) { EAccountList *accounts; EAccount *account; EIterator *iter; - int is = FALSE; - char *sent_uri; + gint is = FALSE; + gchar *sent_uri; if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT)) return TRUE; @@ -1517,7 +1517,7 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri) * Returns %TRUE if this is an Outbox folder or %FALSE otherwise. **/ gboolean -em_utils_folder_is_outbox(CamelFolder *folder, const char *uri) +em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri) { /* <Highlander>There can be only one.</Highlander> */ return folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX); @@ -1556,8 +1556,8 @@ em_utils_adjustment_page(GtkAdjustment *adj, gboolean down) static EProxy *emu_proxy = NULL; static GStaticMutex emu_proxy_lock = G_STATIC_MUTEX_INIT; -static void * -emu_proxy_setup (void *data) +static gpointer +emu_proxy_setup (gpointer data) { if (!emu_proxy) { emu_proxy = e_proxy_new (); @@ -1575,10 +1575,10 @@ emu_proxy_setup (void *data) * * Return value: Must be freed when finished with. **/ -char * -em_utils_get_proxy_uri (const char *pUri) +gchar * +em_utils_get_proxy_uri (const gchar *pUri) { - char *uri = NULL; + gchar *uri = NULL; g_static_mutex_lock (&emu_proxy_lock); @@ -1605,13 +1605,13 @@ em_utils_get_proxy_uri (const char *pUri) * * Return Value: The part in displayable html format. **/ -char * +gchar * em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source) { EMFormatQuote *emfq; CamelStreamMem *mem; GByteArray *buf; - char *text; + gchar *text; buf = g_byte_array_new (); mem = (CamelStreamMem *) camel_stream_mem_new (); @@ -1633,7 +1633,7 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source) camel_stream_write((CamelStream *) mem, "", 1); camel_object_unref(mem); - text = (char *)buf->data; + text = (gchar *)buf->data; if (len) *len = buf->len-1; g_byte_array_free (buf, FALSE); @@ -1655,13 +1655,13 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source) * * Return value: The html version. **/ -char * -em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags, ssize_t *len, EMFormat *source, const char *append) +gchar * +em_utils_message_to_html(CamelMimeMessage *message, const gchar *credits, guint32 flags, ssize_t *len, EMFormat *source, const gchar *append) { EMFormatQuote *emfq; CamelStreamMem *mem; GByteArray *buf; - char *text; + gchar *text; buf = g_byte_array_new (); mem = (CamelStreamMem *) camel_stream_mem_new (); @@ -1673,7 +1673,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 if (!source) { GConfClient *gconf; - char *charset; + gchar *charset; /* FIXME: we should be getting this from the current view, not the global setting. */ gconf = gconf_client_get_default (); @@ -1692,7 +1692,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 camel_stream_write((CamelStream *)mem, "", 1); camel_object_unref(mem); - text = (char *)buf->data; + text = (gchar *)buf->data; if (len) *len = buf->len-1; g_byte_array_free(buf, FALSE); @@ -1712,7 +1712,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 void em_utils_expunge_folder (GtkWidget *parent, CamelFolder *folder) { - char *name; + gchar *name; camel_object_get(folder, NULL, CAMEL_OBJECT_DESCRIPTION, &name, 0); @@ -1772,11 +1772,11 @@ em_utils_empty_trash (GtkWidget *parent) mail_empty_trash (NULL, NULL, NULL); } -char * -em_utils_folder_name_from_uri (const char *uri) +gchar * +em_utils_folder_name_from_uri (const gchar *uri) { CamelURL *url; - char *folder_name = NULL; + gchar *folder_name = NULL; if (uri == NULL || (url = camel_url_new (uri, NULL)) == NULL) return NULL; @@ -1805,12 +1805,12 @@ em_utils_folder_name_from_uri (const char *uri) * local local:/storage/path#folder -> email://local@local/folder */ -char *em_uri_from_camel(const char *curi) +gchar *em_uri_from_camel(const gchar *curi) { CamelURL *curl; EAccount *account; - const char *uid, *path; - char *euri, *tmp; + const gchar *uid, *path; + gchar *euri, *tmp; CamelProvider *provider; CamelException ex; @@ -1856,14 +1856,14 @@ char *em_uri_from_camel(const char *curi) return euri; } -char *em_uri_to_camel(const char *euri) +gchar *em_uri_to_camel(const gchar *euri) { EAccountList *accounts; const EAccount *account; EAccountService *service; CamelProvider *provider; CamelURL *eurl, *curl; - char *uid, *curi; + gchar *uid, *curi; if (strncmp(euri, "email:", 6) != 0) { d(printf("em uri to camel not euri '%s'\n", euri)); @@ -1880,7 +1880,7 @@ char *em_uri_to_camel(const char *euri) /* Sigh, shoul'dve used mbox@local for mailboxes, not local@local */ if (strcmp(eurl->host, "local") == 0 && (strcmp(eurl->user, "local") == 0 || strcmp(eurl->user, "vfolder") == 0)) { - char *base; + gchar *base; if (strcmp(eurl->user, "vfolder") == 0) curl = camel_url_new("vfolder:", NULL); @@ -1891,7 +1891,7 @@ char *em_uri_to_camel(const char *euri) #ifdef G_OS_WIN32 /* Turn backslashes into slashes to avoid URI encoding */ { - char *p = base; + gchar *p = base; while ((p = strchr (p, '\\'))) *p++ = '/'; } @@ -1946,9 +1946,9 @@ char *em_uri_to_camel(const char *euri) #include <libebook/e-book.h> struct _addr_node { - char *addr; + gchar *addr; time_t stamp; - int found; + gint found; }; #define EMU_ADDR_CACHE_TIME (60*30) /* in seconds */ @@ -1958,8 +1958,8 @@ static ESourceList *emu_addr_list; static GHashTable *emu_addr_cache; /* runs sync, in main thread */ -static void * -emu_addr_setup(void *dummy) +static gpointer +emu_addr_setup(gpointer dummy) { GError *err = NULL; @@ -1972,7 +1972,7 @@ emu_addr_setup(void *dummy) } static void -emu_addr_cancel_book(void *data) +emu_addr_cancel_book(gpointer data) { EBook *book = data; GError *err = NULL; @@ -2067,9 +2067,9 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only) { GError *err = NULL; GSList *s, *g, *addr_sources = NULL; - int stop = FALSE, found = FALSE; + gint stop = FALSE, found = FALSE; EBookQuery *query; - const char *addr; + const gchar *addr; struct _addr_node *node; time_t now; @@ -2119,7 +2119,7 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only) for (s = e_source_group_peek_sources((ESourceGroup *)g->data);s;s=g_slist_next(s)) { ESource *src = s->data; - const char *completion = e_source_get_property (src, "completion"); + const gchar *completion = e_source_get_property (src, "completion"); if (completion && !g_ascii_strcasecmp (completion, "true")) { addr_sources = g_slist_prepend(addr_sources, src); @@ -2194,8 +2194,8 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only) struct _CamelMimePart * em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local) { - const char *addr; - int stop = FALSE, found = FALSE; + const gchar *addr; + gint stop = FALSE, found = FALSE; GSList *s, *g, *addr_sources = NULL; GError *err = NULL; EBookQuery *query = NULL; @@ -2224,7 +2224,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local) for (s = e_source_group_peek_sources((ESourceGroup *)g->data); s; s=g_slist_next(s)) { ESource *src = s->data; - const char *completion = e_source_get_property (src, "completion"); + const gchar *completion = e_source_get_property (src, "completion"); if (completion && !g_ascii_strcasecmp (completion, "true")) { addr_sources = g_slist_prepend(addr_sources, src); @@ -2289,7 +2289,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local) /* Form a mime part out of the photo */ part = camel_mime_part_new(); camel_mime_part_set_content(part, - (const char *) photo->data.inlined.data, + (const gchar *) photo->data.inlined.data, photo->data.inlined.length, "image/jpeg"); e_contact_photo_free (photo); @@ -2305,14 +2305,14 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local) * * Return value: NULL if unknown (more likely application/octet-stream). **/ -const char * +const gchar * em_utils_snoop_type(CamelMimePart *part) { - /* cache is here only to be able still return const char * */ + /* cache is here only to be able still return const gchar * */ static GHashTable *types_cache = NULL; - const char *filename; - char *name_type = NULL, *magic_type = NULL, *res, *tmp; + const gchar *filename; + gchar *name_type = NULL, *magic_type = NULL, *res, *tmp; CamelDataWrapper *dw; filename = camel_mime_part_get_filename (part); @@ -2324,7 +2324,7 @@ em_utils_snoop_type(CamelMimePart *part) CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new(); if (camel_data_wrapper_decode_to_stream(dw, (CamelStream *)mem) > 0) { - char *ct = g_content_type_guess (filename, mem->buffer->data, mem->buffer->len, NULL); + gchar *ct = g_content_type_guess (filename, mem->buffer->data, mem->buffer->len, NULL); if (ct) magic_type = g_content_type_get_mime_type (ct); @@ -2405,7 +2405,7 @@ em_utils_clear_get_password_canceled_accounts_flag (void) } -static void error_response(GtkObject *o, int button, void *data) +static void error_response(GtkObject *o, gint button, gpointer data) { gtk_widget_destroy((GtkWidget *)o); } diff --git a/mail/em-utils.h b/mail/em-utils.h index 1b60205168..76674bea11 100644 --- a/mail/em-utils.h +++ b/mail/em-utils.h @@ -44,7 +44,7 @@ struct _GtkAdjustment; struct _CamelException; struct _EMFormat; -gboolean em_utils_prompt_user(struct _GtkWindow *parent, const char *promptkey, const char *tag, const char *arg0, ...); +gboolean em_utils_prompt_user(struct _GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...); GPtrArray *em_utils_uids_copy (GPtrArray *uids); void em_utils_uids_free (GPtrArray *uids); @@ -56,12 +56,12 @@ void em_utils_edit_filters (struct _GtkWidget *parent); void em_filename_make_safe (gchar *string); void em_utils_edit_vfolders (struct _GtkWidget *parent); -void em_utils_save_part(struct _GtkWidget *parent, const char *prompt, struct _CamelMimePart *part); -gboolean em_utils_save_part_to_file(struct _GtkWidget *parent, const char *filename, struct _CamelMimePart *part); +void em_utils_save_part(struct _GtkWidget *parent, const gchar *prompt, struct _CamelMimePart *part); +gboolean em_utils_save_part_to_file(struct _GtkWidget *parent, const gchar *filename, struct _CamelMimePart *part); void em_utils_save_messages (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids); -void em_utils_add_address(struct _GtkWidget *parent, const char *email); -void em_utils_add_vcard(struct _GtkWidget *parent, const char *vcard); +void em_utils_add_address(struct _GtkWidget *parent, const gchar *email); +void em_utils_add_vcard(struct _GtkWidget *parent, const gchar *vcard); void em_utils_flag_for_followup (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids); void em_utils_flag_for_followup_clear (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids); @@ -73,36 +73,36 @@ void em_utils_selection_set_mailbox(struct _GtkSelectionData *data, struct _Came void em_utils_selection_get_mailbox(struct _GtkSelectionData *data, struct _CamelFolder *folder); void em_utils_selection_get_message(struct _GtkSelectionData *data, struct _CamelFolder *folder); /* FIXME: be nice if these also worked on struct _CamelFolder's, no easy way to get uri from folder yet tho */ -void em_utils_selection_set_uidlist(struct _GtkSelectionData *data, const char *uri, GPtrArray *uids); -void em_utils_selection_get_uidlist(struct _GtkSelectionData *data, struct _CamelFolder *dest, int move, struct _CamelException *ex); +void em_utils_selection_set_uidlist(struct _GtkSelectionData *data, const gchar *uri, GPtrArray *uids); +void em_utils_selection_get_uidlist(struct _GtkSelectionData *data, struct _CamelFolder *dest, gint move, struct _CamelException *ex); void em_utils_selection_set_urilist(struct _GtkSelectionData *data, struct _CamelFolder *folder, GPtrArray *uids); void em_utils_selection_get_urilist(struct _GtkSelectionData *data, struct _CamelFolder *folder); -char *em_utils_temp_save_part(struct _GtkWidget *parent, struct _CamelMimePart *part, gboolean mode); -void em_utils_save_parts (struct _GtkWidget *parent, const char *prompt, GSList * parts); +gchar *em_utils_temp_save_part(struct _GtkWidget *parent, struct _CamelMimePart *part, gboolean mode); +void em_utils_save_parts (struct _GtkWidget *parent, const gchar *prompt, GSList * parts); -gboolean em_utils_folder_is_drafts(struct _CamelFolder *folder, const char *uri); -gboolean em_utils_folder_is_templates(struct _CamelFolder *folder, const char *uri); -gboolean em_utils_folder_is_sent(struct _CamelFolder *folder, const char *uri); -gboolean em_utils_folder_is_outbox(struct _CamelFolder *folder, const char *uri); +gboolean em_utils_folder_is_drafts(struct _CamelFolder *folder, const gchar *uri); +gboolean em_utils_folder_is_templates(struct _CamelFolder *folder, const gchar *uri); +gboolean em_utils_folder_is_sent(struct _CamelFolder *folder, const gchar *uri); +gboolean em_utils_folder_is_outbox(struct _CamelFolder *folder, const gchar *uri); void em_utils_adjustment_page(struct _GtkAdjustment *adj, gboolean down); -char *em_utils_get_proxy_uri (const char *uri); +gchar *em_utils_get_proxy_uri (const gchar *uri); /* FIXME: should this have an override charset? */ -char *em_utils_part_to_html(struct _CamelMimePart *part, ssize_t *len, struct _EMFormat *source); -char *em_utils_message_to_html(struct _CamelMimeMessage *msg, const char *credits, guint32 flags, ssize_t *len, struct _EMFormat *source, const char *append); +gchar *em_utils_part_to_html(struct _CamelMimePart *part, ssize_t *len, struct _EMFormat *source); +gchar *em_utils_message_to_html(struct _CamelMimeMessage *msg, const gchar *credits, guint32 flags, ssize_t *len, struct _EMFormat *source, const gchar *append); void em_utils_expunge_folder (struct _GtkWidget *parent, struct _CamelFolder *folder); void em_utils_empty_trash (struct _GtkWidget *parent); /* returns the folder name portion of an URI */ -char *em_utils_folder_name_from_uri (const char *uri); +gchar *em_utils_folder_name_from_uri (const gchar *uri); /* internal/camel uri translation */ -char *em_uri_from_camel (const char *curi); -char *em_uri_to_camel (const char *euri); +gchar *em_uri_from_camel (const gchar *curi); +gchar *em_uri_to_camel (const gchar *euri); /* Run errors silently on the status bar */ void em_utils_show_error_silent (struct _GtkWidget *widget); @@ -112,7 +112,7 @@ void em_utils_show_info_silent (struct _GtkWidget *widget); gboolean em_utils_in_addressbook (struct _CamelInternetAddress *addr, gboolean local_only); struct _CamelMimePart *em_utils_contact_photo (struct _CamelInternetAddress *addr, gboolean local); -const char *em_utils_snoop_type(struct _CamelMimePart *part); +const gchar *em_utils_snoop_type(struct _CamelMimePart *part); /* clears flag 'get_password_canceled' at every known accounts, so if needed, get_password will show dialog */ void em_utils_clear_get_password_canceled_accounts_flag (void); diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c index e317b5cabf..b111376b20 100644 --- a/mail/em-vfolder-context.c +++ b/mail/em-vfolder-context.c @@ -35,7 +35,7 @@ #include "em-filter-folder-element.h" -static FilterElement *vfolder_new_element(RuleContext *rc, const char *type); +static FilterElement *vfolder_new_element(RuleContext *rc, const gchar *type); static RuleContextClass *parent_class = NULL; @@ -104,7 +104,7 @@ em_vfolder_context_new(void) } static FilterElement * -vfolder_new_element(RuleContext *rc, const char *type) +vfolder_new_element(RuleContext *rc, const gchar *type) { if (!strcmp(type, "system-flag")) { return (FilterElement *) filter_option_new(); diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c index dcc6f03e75..4182f7a3a3 100644 --- a/mail/em-vfolder-editor.c +++ b/mail/em-vfolder-editor.c @@ -104,7 +104,7 @@ em_vfolder_editor_new (EMVFolderContext *vc) { EMVFolderEditor *ve = (EMVFolderEditor *) g_object_new (em_vfolder_editor_get_type(), NULL); GladeXML *gui; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "filter.glade", diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c index 03f46afff8..d3090a672d 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -43,10 +43,10 @@ #define d(x) -static int validate(FilterRule *); -static int vfolder_eq(FilterRule *fr, FilterRule *cm); +static gint validate(FilterRule *); +static gint vfolder_eq(FilterRule *fr, FilterRule *cm); static xmlNodePtr xml_encode(FilterRule *); -static int xml_decode(FilterRule *, xmlNodePtr, RuleContext *f); +static gint xml_decode(FilterRule *, xmlNodePtr, RuleContext *f); static void rule_copy(FilterRule *dest, FilterRule *src); /*static void build_code(FilterRule *, GString *out);*/ static GtkWidget *get_widget(FilterRule *fr, RuleContext *f); @@ -56,7 +56,7 @@ static void em_vfolder_rule_init(EMVFolderRule *vr); static void em_vfolder_rule_finalise(GObject *obj); /* DO NOT internationalise these strings */ -static const char *with_names[] = { +static const gchar *with_names[] = { "specific", "local_remote_active", "remote_active", @@ -141,7 +141,7 @@ em_vfolder_rule_new(void) } void -em_vfolder_rule_add_source(EMVFolderRule *vr, const char *uri) +em_vfolder_rule_add_source(EMVFolderRule *vr, const gchar *uri) { g_return_if_fail (EM_IS_VFOLDER_RULE(vr)); g_return_if_fail (uri); @@ -151,8 +151,8 @@ em_vfolder_rule_add_source(EMVFolderRule *vr, const char *uri) filter_rule_emit_changed((FilterRule *)vr); } -const char * -em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri) +const gchar * +em_vfolder_rule_find_source(EMVFolderRule *vr, const gchar *uri) { GList *l; @@ -171,13 +171,13 @@ em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri) } void -em_vfolder_rule_remove_source(EMVFolderRule *vr, const char *uri) +em_vfolder_rule_remove_source(EMVFolderRule *vr, const gchar *uri) { - char *found; + gchar *found; g_return_if_fail (EM_IS_VFOLDER_RULE(vr)); - found =(char *)em_vfolder_rule_find_source(vr, uri); + found =(gchar *)em_vfolder_rule_find_source(vr, uri); if (found) { vr->sources = g_list_remove(vr->sources, found); g_free(found); @@ -185,15 +185,15 @@ em_vfolder_rule_remove_source(EMVFolderRule *vr, const char *uri) } } -const char * -em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last) +const gchar * +em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last) { GList *node; if (last == NULL) { node = vr->sources; } else { - node = g_list_find(vr->sources, (char *)last); + node = g_list_find(vr->sources, (gchar *)last); if (node == NULL) node = vr->sources; else @@ -201,7 +201,7 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last) } if (node) - return (const char *)node->data; + return (const gchar *)node->data; return NULL; } @@ -231,10 +231,10 @@ validate(FilterRule *fr) static int list_eq(GList *al, GList *bl) { - int truth = TRUE; + gint truth = TRUE; while (truth && al && bl) { - char *a = al->data, *b = bl->data; + gchar *a = al->data, *b = bl->data; truth = strcmp(a, b)== 0; al = al->next; @@ -262,13 +262,13 @@ xml_encode(FilterRule *fr) g_return_val_if_fail (node != NULL, NULL); g_return_val_if_fail (vr->with < sizeof(with_names)/sizeof(with_names[0]), NULL); - set = xmlNewNode(NULL, (const unsigned char *)"sources"); + set = xmlNewNode(NULL, (const guchar *)"sources"); xmlAddChild(node, set); - xmlSetProp(set, (const unsigned char *)"with", (unsigned char *)with_names[vr->with]); + xmlSetProp(set, (const guchar *)"with", (guchar *)with_names[vr->with]); l = vr->sources; while (l) { - work = xmlNewNode(NULL, (const unsigned char *)"folder"); - xmlSetProp(work, (const unsigned char *)"uri", (unsigned char *)l->data); + work = xmlNewNode(NULL, (const guchar *)"folder"); + xmlSetProp(work, (const guchar *)"uri", (guchar *)l->data); xmlAddChild(set, work); l = l->next; } @@ -277,9 +277,9 @@ xml_encode(FilterRule *fr) } static void -set_with(EMVFolderRule *vr, const char *name) +set_with(EMVFolderRule *vr, const gchar *name) { - int i; + gint i; for(i=0;i<sizeof(with_names)/sizeof(with_names[0]);i++) { if (!strcmp(name, with_names[i])) { @@ -295,9 +295,9 @@ static int xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f) { xmlNodePtr set, work; - int result; + gint result; EMVFolderRule *vr =(EMVFolderRule *)fr; - char *tmp; + gchar *tmp; result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, f); if (result != 0) @@ -312,16 +312,16 @@ xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f) set = node->children; while (set) { - if (!strcmp((char *)set->name, "sources")) { - tmp = (char *)xmlGetProp(set, (const unsigned char *)"with"); + if (!strcmp((gchar *)set->name, "sources")) { + tmp = (gchar *)xmlGetProp(set, (const guchar *)"with"); if (tmp) { set_with(vr, tmp); xmlFree(tmp); } work = set->children; while (work) { - if (!strcmp((char *)work->name, "folder")) { - tmp = (char *)xmlGetProp(work, (const unsigned char *)"uri"); + if (!strcmp((gchar *)work->name, "folder")) { + tmp = (gchar *)xmlGetProp(work, (const guchar *)"uri"); if (tmp) { vr->sources = g_list_append(vr->sources, g_strdup(tmp)); xmlFree(tmp); @@ -352,7 +352,7 @@ rule_copy(FilterRule *dest, FilterRule *src) node = vsrc->sources; while (node) { - char *uri = node->data; + gchar *uri = node->data; vdest->sources = g_list_append(vdest->sources, g_strdup(uri)); node = node->next; @@ -372,7 +372,7 @@ enum { struct _source_data { RuleContext *rc; EMVFolderRule *vr; - const char *current; + const gchar *current; GtkListStore *model; GtkTreeView *list; GtkWidget *source_selector; @@ -439,11 +439,11 @@ select_source_with_changed(GtkWidget *widget, struct _source_data *data) } /* attempt to make a 'nice' folder name out of the raw uri */ -static char *format_source(const char *euri) +static gchar *format_source(const gchar *euri) { CamelURL *url; GString *out; - char *res, *uri; + gchar *res, *uri; /* This should really probably base it on the account name? */ uri = em_uri_to_camel(euri); @@ -476,10 +476,10 @@ static char *format_source(const char *euri) static void vfr_folder_response(GtkWidget *dialog, gint button, struct _source_data *data) { - const char *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog); + const gchar *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog); if (button == GTK_RESPONSE_OK && uri != NULL) { - char *urinice, *euri; + gchar *urinice, *euri; GtkTreeSelection *selection; GtkTreeIter iter; @@ -521,11 +521,11 @@ static void source_remove(GtkWidget *widget, struct _source_data *data) { GtkTreeSelection *selection; - const char *source; + const gchar *source; GtkTreePath *path; GtkTreeIter iter; - int index = 0; - int n; + gint index = 0; + gint n; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data->list)); @@ -568,11 +568,11 @@ source_remove(GtkWidget *widget, struct _source_data *data) } -GtkWidget *em_vfolder_editor_sourcelist_new(char *widget_name, char *string1, char *string2, - int int1, int int2); +GtkWidget *em_vfolder_editor_sourcelist_new(gchar *widget_name, gchar *string1, gchar *string2, + gint int1, gint int2); GtkWidget * -em_vfolder_editor_sourcelist_new(char *widget_name, char *string1, char *string2, int int1, int int2) +em_vfolder_editor_sourcelist_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { GtkWidget *table, *scrolled; GtkTreeSelection *selection; @@ -616,11 +616,11 @@ get_widget(FilterRule *fr, RuleContext *rc) GtkWidget *widget, *frame, *list; struct _source_data *data; GtkRadioButton *rb; - const char *source; + const gchar *source; GtkTreeIter iter; GladeXML *gui; - int i; - char *gladefile; + gint i; + gchar *gladefile; widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc); @@ -649,7 +649,7 @@ get_widget(FilterRule *fr, RuleContext *rc) source = NULL; while ((source = em_vfolder_rule_next_source(vr, source))) { - char *nice = format_source(source); + gchar *nice = format_source(source); gtk_list_store_append(data->model, &iter); gtk_list_store_set(data->model, &iter, 0, nice, 1, source, -1); diff --git a/mail/em-vfolder-rule.h b/mail/em-vfolder-rule.h index 9274c94b5c..1c0b2a3113 100644 --- a/mail/em-vfolder-rule.h +++ b/mail/em-vfolder-rule.h @@ -60,9 +60,9 @@ GType em_vfolder_rule_get_type (void); EMVFolderRule *em_vfolder_rule_new (void); /* methods */ -void em_vfolder_rule_add_source (EMVFolderRule *vr, const char *uri); -void em_vfolder_rule_remove_source (EMVFolderRule *vr, const char *uri); -const char *em_vfolder_rule_find_source (EMVFolderRule *vr, const char *uri); -const char *em_vfolder_rule_next_source (EMVFolderRule *vr, const char *last); +void em_vfolder_rule_add_source (EMVFolderRule *vr, const gchar *uri); +void em_vfolder_rule_remove_source (EMVFolderRule *vr, const gchar *uri); +const gchar *em_vfolder_rule_find_source (EMVFolderRule *vr, const gchar *uri); +const gchar *em_vfolder_rule_next_source (EMVFolderRule *vr, const gchar *last); #endif /* ! _EM_VFOLDER_RULE_H */ diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c index 39bfd7bc3f..6e65418441 100644 --- a/mail/importers/elm-importer.c +++ b/mail/importers/elm-importer.c @@ -55,16 +55,16 @@ struct _elm_import_msg { EImportTargetHome *target; GMutex *status_lock; - char *status_what; - int status_pc; - int status_timeout_id; + gchar *status_what; + gint status_pc; + gint status_timeout_id; CamelOperation *status; }; static GHashTable * -parse_elm_rc(const char *elmrc) +parse_elm_rc(const gchar *elmrc) { - char line[4096]; + gchar line[4096]; FILE *handle; GHashTable *prefs; @@ -81,8 +81,8 @@ parse_elm_rc(const char *elmrc) return prefs; while (fgets (line, 4096, handle) != NULL) { - char *linestart, *end; - char *key, *value; + gchar *linestart, *end; + gchar *key, *value; if (*line == '#' && (line[1] != '#' && line[2] != '#')) { continue; @@ -122,11 +122,11 @@ parse_elm_rc(const char *elmrc) return prefs; } -static char * -elm_get_rc(EImport *ei, const char *name) +static gchar * +elm_get_rc(EImport *ei, const gchar *name) { GHashTable *prefs; - char *elmrc; + gchar *elmrc; prefs = g_object_get_data((GObject *)ei, "elm-rc"); if (prefs == NULL) { @@ -146,8 +146,8 @@ static gboolean elm_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { EImportTargetHome *s; - const char *maildir; - char *elmdir; + const gchar *maildir; + gchar *elmdir; gboolean mailexists, exists; if (target->type != E_IMPORT_TARGET_HOME) @@ -190,8 +190,8 @@ static MailImporterSpecial elm_special_folders[] = { static void elm_import_exec (struct _elm_import_msg *m) { - const char *maildir; - char *elmdir; + const gchar *maildir; + gchar *elmdir; maildir = elm_get_rc(m->import, "maildir"); if (maildir == NULL) @@ -237,7 +237,7 @@ elm_import_free(struct _elm_import_msg *m) } static void -elm_status(CamelOperation *op, const char *what, int pc, void *data) +elm_status(CamelOperation *op, const gchar *what, gint pc, gpointer data) { struct _elm_import_msg *importer = data; @@ -254,11 +254,11 @@ elm_status(CamelOperation *op, const char *what, int pc, void *data) } static gboolean -elm_status_timeout(void *data) +elm_status_timeout(gpointer data) { struct _elm_import_msg *importer = data; - int pc; - char *what; + gint pc; + gchar *what; if (importer->status_what) { g_mutex_lock(importer->status_lock); @@ -285,7 +285,7 @@ static int mail_importer_elm_import(EImport *ei, EImportTarget *target) { struct _elm_import_msg *m; - int id; + gint id; m = mail_msg_new(&elm_import_info); g_datalist_set_data(&target->data, "elm-msg", m); diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c index f42afec151..7cd2b34b22 100644 --- a/mail/importers/evolution-mbox-importer.c +++ b/mail/importers/evolution-mbox-importer.c @@ -54,12 +54,12 @@ typedef struct { EImportTarget *target; GMutex *status_lock; - char *status_what; - int status_pc; - int status_timeout_id; + gchar *status_what; + gint status_pc; + gint status_timeout_id; CamelOperation *cancel; /* cancel/status port */ - char *uri; + gchar *uri; } MboxImporter; static void @@ -95,11 +95,11 @@ mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im) static gboolean mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { - char signature[6]; + gchar signature[6]; gboolean ret = FALSE; - int fd, n; + gint fd, n; EImportTargetURI *s; - char *filename; + gchar *filename; if (target->type != E_IMPORT_TARGET_URI) return FALSE; @@ -124,7 +124,7 @@ mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im) } static void -mbox_status(CamelOperation *op, const char *what, int pc, void *data) +mbox_status(CamelOperation *op, const gchar *what, gint pc, gpointer data) { MboxImporter *importer = data; @@ -141,11 +141,11 @@ mbox_status(CamelOperation *op, const char *what, int pc, void *data) } static gboolean -mbox_status_timeout(void *data) +mbox_status_timeout(gpointer data) { MboxImporter *importer = data; - int pc; - char *what; + gint pc; + gchar *what; if (importer->status_what) { g_mutex_lock(importer->status_lock); @@ -161,7 +161,7 @@ mbox_status_timeout(void *data) } static void -mbox_import_done(void *data, CamelException *ex) +mbox_import_done(gpointer data, CamelException *ex) { MboxImporter *importer = data; @@ -178,7 +178,7 @@ static void mbox_import(EImport *ei, EImportTarget *target, EImportImporter *im) { MboxImporter *importer; - char *filename; + gchar *filename; /* TODO: do we validate target? */ diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c index 29a2dddd97..bfaf7896aa 100644 --- a/mail/importers/mail-importer.c +++ b/mail/importers/mail-importer.c @@ -62,8 +62,8 @@ * Return value: The physical uri of the folder, or NULL if the folder did * not exist and could not be created. **/ -char * -mail_importer_make_local_folder(const char *folderpath) +gchar * +mail_importer_make_local_folder(const gchar *folderpath) { return g_strdup_printf("mbox:/home/notzed/.evolution/mail/local/%s", folderpath); } @@ -79,7 +79,7 @@ mail_importer_make_local_folder(const char *folderpath) */ void mail_importer_add_line (MailImporter *importer, - const char *str, + const gchar *str, gboolean finished) { CamelMimeMessage *msg; @@ -113,7 +113,7 @@ mail_importer_add_line (MailImporter *importer, camel_message_info_free(info); } -struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data) +struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const gchar *iid, gpointer data) { #if 0 if (strcmp(iid, ELM_INTELLIGENT_IMPORTER_IID) == 0) @@ -133,12 +133,12 @@ struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *fac struct _import_mbox_msg { MailMsg base; - char *path; - char *uri; + gchar *path; + gchar *uri; CamelOperation *cancel; - void (*done)(void *data, CamelException *ex); - void *done_data; + void (*done)(gpointer data, CamelException *ex); + gpointer done_data; }; static gchar * @@ -148,7 +148,7 @@ import_mbox_desc (struct _import_mbox_msg *m) } static struct { - char tag; + gchar tag; guint32 mozflag; guint32 flag; } status_flags[] = { @@ -159,11 +159,11 @@ static struct { }; static guint32 -decode_status(const char *status) +decode_status(const gchar *status) { - const char *p; + const gchar *p; guint32 flags = 0; - int i; + gint i; p = status; while ((*p++)) { @@ -176,11 +176,11 @@ decode_status(const char *status) } static guint32 -decode_mozilla_status(const char *tmp) +decode_mozilla_status(const gchar *tmp) { unsigned long status = strtoul(tmp, NULL, 16); guint32 flags = 0; - int i; + gint i; for (i=0;i<sizeof(status_flags)/sizeof(status_flags[0]);i++) if (status_flags[i].mozflag & status) @@ -194,7 +194,7 @@ import_mbox_exec (struct _import_mbox_msg *m) CamelFolder *folder; CamelMimeParser *mp = NULL; struct stat st; - int fd; + gint fd; CamelMessageInfo *info; if (g_stat(m->path, &st) == -1) { @@ -232,8 +232,8 @@ import_mbox_exec (struct _import_mbox_msg *m) camel_folder_freeze(folder); while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) { CamelMimeMessage *msg; - const char *tmp; - int pc = 0; + const gchar *tmp; + gint pc = 0; guint32 flags = 0; if (st.st_size > 0) @@ -307,11 +307,11 @@ static MailMsgInfo import_mbox_info = { (MailMsgFreeFunc) import_mbox_free }; -int -mail_importer_import_mbox(const char *path, const char *folderuri, CamelOperation *cancel, void (*done)(void *data, CamelException *), void *data) +gint +mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, CamelException *), gpointer data) { struct _import_mbox_msg *m; - int id; + gint id; m = mail_msg_new(&import_mbox_info); m->path = g_strdup(path); @@ -330,7 +330,7 @@ mail_importer_import_mbox(const char *path, const char *folderuri, CamelOperatio } void -mail_importer_import_mbox_sync(const char *path, const char *folderuri, CamelOperation *cancel) +mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, CamelOperation *cancel) { struct _import_mbox_msg *m; @@ -355,13 +355,13 @@ struct _import_folders_data { }; static void -import_folders_rec(struct _import_folders_data *m, const char *filepath, const char *folderparent) +import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const gchar *folderparent) { GDir *dir; - const char *d; + const gchar *d; struct stat st; - char *filefull, *foldersub, *uri, *utf8_filename; - const char *folder; + gchar *filefull, *foldersub, *uri, *utf8_filename; + const gchar *folder; dir = g_dir_open(filepath, 0, NULL); if (dir == NULL) @@ -387,7 +387,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c folder = d; if (folderparent == NULL) { - int i; + gint i; for (i=0;m->special_folders[i].orig;i++) if (strcmp(m->special_folders[i].orig, folder) == 0) { @@ -406,7 +406,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c /* This little gem re-uses the stat buffer and filefull to automagically scan mozilla-format folders */ if (!m->elmfmt) { - char *tmp = g_strdup_printf("%s.sbd", filefull); + gchar *tmp = g_strdup_printf("%s.sbd", filefull); g_free(filefull); filefull = tmp; @@ -445,7 +445,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c * standard unix directories. **/ void -mail_importer_import_folders_sync(const char *filepath, MailImporterSpecial special_folders[], int flags, CamelOperation *cancel) +mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel) { struct _import_folders_data m; CamelOperation *oldcancel = NULL; diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h index f108967ebc..92f555cf75 100644 --- a/mail/importers/mail-importer.h +++ b/mail/importers/mail-importer.h @@ -38,14 +38,14 @@ void mail_importer_init (struct _MailComponent *mc); void mail_importer_uninit (void); void mail_importer_add_line (MailImporter *importer, - const char *str, + const gchar *str, gboolean finished); -void mail_importer_create_folder (const char *parent_path, - const char *name, - const char *description); +void mail_importer_create_folder (const gchar *parent_path, + const gchar *name, + const gchar *description); /* creates a folder at folderpath on the local storage */ -char *mail_importer_make_local_folder(const char *folderpath); +gchar *mail_importer_make_local_folder(const gchar *folderpath); struct _BonoboObject; struct _BonoboGenericFactory; @@ -71,7 +71,7 @@ struct _BonoboObject *netscape_intelligent_importer_new(void); struct _BonoboObject *mbox_importer_new(void); struct _BonoboObject *outlook_importer_new(void); -struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data); +struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const gchar *iid, gpointer data); /* Defines copied from nsMsgMessageFlags.h in Mozilla source. */ @@ -81,8 +81,8 @@ struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *fac #define MSG_FLAG_MARKED 0x0004 #define MSG_FLAG_EXPUNGED 0x0008 -int mail_importer_import_mbox(const char *path, const char *folderuri, struct _CamelOperation *cancel, void (*done)(void *data, struct _CamelException *), void *data); -void mail_importer_import_mbox_sync(const char *path, const char *folderuri, struct _CamelOperation *cancel); +gint mail_importer_import_mbox(const gchar *path, const gchar *folderuri, struct _CamelOperation *cancel, void (*done)(gpointer data, struct _CamelException *), gpointer data); +void mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, struct _CamelOperation *cancel); struct _MailImporterSpecial { const gchar *orig, *new; @@ -93,6 +93,6 @@ typedef struct _MailImporterSpecial MailImporterSpecial; #define MAIL_IMPORTER_MOZFMT (1<<0) /* api in flux */ -void mail_importer_import_folders_sync(const char *filepath, MailImporterSpecial special_folders[], int flags, struct _CamelOperation *cancel); +void mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, struct _CamelOperation *cancel); #endif diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c index 3a4e6d9cc1..e460d66d2e 100644 --- a/mail/importers/pine-importer.c +++ b/mail/importers/pine-importer.c @@ -58,9 +58,9 @@ struct _pine_import_msg { EImportTarget *target; GMutex *status_lock; - char *status_what; - int status_pc; - int status_timeout_id; + gchar *status_what; + gint status_pc; + gint status_timeout_id; CamelOperation *status; }; @@ -68,7 +68,7 @@ static gboolean pine_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { EImportTargetHome *s; - char *maildir, *addrfile; + gchar *maildir, *addrfile; gboolean md_exists, addr_exists; if (target->type != E_IMPORT_TARGET_HOME) @@ -102,10 +102,10 @@ FIXME: we dont handle aliases in lists. */ static void -import_contact(EBook *book, char *line) +import_contact(EBook *book, gchar *line) { - char **strings, *addr, **addrs; - int i; + gchar **strings, *addr, **addrs; + gint i; GList *list; /*EContactName *name;*/ EContact *card; @@ -165,7 +165,7 @@ import_contacts(void) ESource *primary; ESourceList *source_list; EBook *book; - char *name; + gchar *name; GString *line; FILE *fp; size_t offset; @@ -238,7 +238,7 @@ pine_import_exec(struct _pine_import_msg *m) import_contacts(); if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-mail"))) { - char *path; + gchar *path; path = g_build_filename(g_get_home_dir(), "mail", NULL); mail_importer_import_folders_sync(path, pine_special_folders, 0, m->status); @@ -280,7 +280,7 @@ pine_import_free(struct _pine_import_msg *m) } static void -pine_status(CamelOperation *op, const char *what, int pc, void *data) +pine_status(CamelOperation *op, const gchar *what, gint pc, gpointer data) { struct _pine_import_msg *importer = data; @@ -297,11 +297,11 @@ pine_status(CamelOperation *op, const char *what, int pc, void *data) } static gboolean -pine_status_timeout(void *data) +pine_status_timeout(gpointer data) { struct _pine_import_msg *importer = data; - int pc; - char *what; + gint pc; + gchar *what; if (importer->status_what) { g_mutex_lock(importer->status_lock); @@ -328,7 +328,7 @@ static int mail_importer_pine_import(EImport *ei, EImportTarget *target) { struct _pine_import_msg *m; - int id; + gint id; m = mail_msg_new(&pine_import_info); g_datalist_set_data(&target->data, "pine-msg", m); diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 53a0411f08..ef5e8787a6 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -56,9 +56,9 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr { FilterPart *part; FilterElement *element; - int i; - const char *real, *addr; - char *namestr; + gint i; + const gchar *real, *addr; + gchar *namestr; /* address types etc should handle multiple values */ for (i = 0; camel_internet_address_get (iaddr, i, &real, &addr); i++) { @@ -77,12 +77,12 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr /* remove 're' part of a subject */ -static const char * -strip_re (const char *subject) +static const gchar * +strip_re (const gchar *subject) { - const unsigned char *s, *p; + const guchar *s, *p; - s = (unsigned char *) subject; + s = (guchar *) subject; while (*s) { while (isspace (*s)) @@ -102,16 +102,16 @@ strip_re (const char *subject) break; } - return (char *) s; + return (gchar *) s; } #if 0 -int -reg_match (char *str, char *regstr) +gint +reg_match (gchar *str, gchar *regstr) { regex_t reg; - int error; - int ret; + gint error; + gint ret; error = regcomp(®, regstr, REG_EXTENDED|REG_ICASE|REG_NOSUB); if (error != 0) { @@ -124,7 +124,7 @@ reg_match (char *str, char *regstr) #endif static void -rule_add_subject (RuleContext *context, FilterRule *rule, const char *text) +rule_add_subject (RuleContext *context, FilterRule *rule, const gchar *text) { FilterPart *part; FilterElement *element; @@ -141,7 +141,7 @@ rule_add_subject (RuleContext *context, FilterRule *rule, const char *text) } static void -rule_add_sender (RuleContext *context, FilterRule *rule, const char *text) +rule_add_sender (RuleContext *context, FilterRule *rule, const gchar *text) { FilterPart *part; FilterElement *element; @@ -160,11 +160,11 @@ rule_add_sender (RuleContext *context, FilterRule *rule, const char *text) /* do a bunch of things on the subject to try and detect mailing lists, remove unneeded stuff, etc */ static void -rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject) +rule_match_subject (RuleContext *context, FilterRule *rule, const gchar *subject) { - const char *s; - const char *s1, *s2; - char *tmp; + const gchar *s; + const gchar *s1, *s2; + gchar *tmp; s = strip_re (subject); /* dont match on empty subject */ @@ -202,7 +202,7 @@ rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject) } static void -rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist) +rule_match_mlist(RuleContext *context, FilterRule *rule, const gchar *mlist) { FilterPart *part; FilterElement *element; @@ -221,13 +221,13 @@ rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist) } static void -rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress* addr, int flags) +rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress* addr, gint flags) { rule->grouping = FILTER_GROUP_ANY; if (flags & AUTO_FROM) { - const char *name, *address; - char *namestr; + const gchar *name, *address; + gchar *namestr; camel_internet_address_get (addr, 0, &name, &address); rule_add_sender (context, rule, address); @@ -244,15 +244,15 @@ rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress* } static void -rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, int flags) +rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, gint flags) { CamelInternetAddress *addr; rule->grouping = FILTER_GROUP_ANY; if (flags & AUTO_SUBJECT) { - const char *subject = msg->subject ? msg->subject : ""; - char *namestr; + const gchar *subject = msg->subject ? msg->subject : ""; + gchar *namestr; rule_match_subject (context, rule, subject); @@ -263,9 +263,9 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg /* should parse the from address into an internet address? */ if (flags & AUTO_FROM) { const CamelInternetAddress *from; - int i; - const char *name, *address; - char *namestr; + gint i; + const gchar *name, *address; + gchar *namestr; from = camel_mime_message_get_from (msg); for (i = 0; from && camel_internet_address_get (from, i, &name, &address); i++) { @@ -286,7 +286,7 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg rule_match_recipients (context, rule, addr); } if (flags & AUTO_MLIST) { - char *name, *mlist; + gchar *name, *mlist; mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *)msg)->headers); if (mlist) { @@ -300,10 +300,10 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg } FilterRule * -em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, int flags, const char *source) +em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, gint flags, const gchar *source) { EMVFolderRule *rule; - char *euri = em_uri_from_camel(source); + gchar *euri = em_uri_from_camel(source); rule = em_vfolder_rule_new (); em_vfolder_rule_add_source (rule, euri); @@ -314,10 +314,10 @@ em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, } FilterRule * -em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, int flags, const char *source) +em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, gint flags, const gchar *source) { EMVFolderRule *rule; - char *euri = em_uri_from_camel(source); + gchar *euri = em_uri_from_camel(source); rule = em_vfolder_rule_new (); em_vfolder_rule_add_source (rule, euri); @@ -328,7 +328,7 @@ em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *a } FilterRule * -filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, int flags) +filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, gint flags) { EMFilterRule *rule; FilterPart *part; @@ -343,10 +343,10 @@ filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, int f } void -filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flags) +filter_gui_add_from_message (CamelMimeMessage *msg, const gchar *source, gint flags) { EMFilterContext *fc; - char *user, *system; + gchar *user, *system; FilterRule *rule; g_return_if_fail (msg != NULL); @@ -368,12 +368,12 @@ filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flag } void -mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri) +mail_filter_rename_uri(CamelStore *store, const gchar *olduri, const gchar *newuri) { EMFilterContext *fc; - char *user, *system; + gchar *user, *system; GList *changed; - char *eolduri, *enewuri; + gchar *eolduri, *enewuri; eolduri = em_uri_from_camel(olduri); enewuri = em_uri_from_camel(newuri); @@ -400,12 +400,12 @@ mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri } void -mail_filter_delete_uri(CamelStore *store, const char *uri) +mail_filter_delete_uri(CamelStore *store, const gchar *uri) { EMFilterContext *fc; - char *user, *system; + gchar *user, *system; GList *deleted; - char *euri; + gchar *euri; euri = em_uri_from_camel(uri); @@ -424,7 +424,7 @@ mail_filter_delete_uri(CamelStore *store, const char *uri) s = g_string_new(""); l = deleted; while (l) { - g_string_append_printf (s, " %s\n", (char *)l->data); + g_string_append_printf (s, " %s\n", (gchar *)l->data); l = l->next; } diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h index c12539a9d2..67ff5d6310 100644 --- a/mail/mail-autofilter.h +++ b/mail/mail-autofilter.h @@ -38,15 +38,15 @@ enum { AUTO_MLIST = 8 }; -struct _FilterRule *em_vfolder_rule_from_message(struct _EMVFolderContext *context, struct _CamelMimeMessage *msg, int flags, const char *source); -struct _FilterRule *filter_rule_from_message(struct _EMFilterContext *context, struct _CamelMimeMessage *msg, int flags); -struct _FilterRule *em_vfolder_rule_from_address(struct _EMVFolderContext *context, struct _CamelInternetAddress *addr, int flags, const char *source); +struct _FilterRule *em_vfolder_rule_from_message(struct _EMVFolderContext *context, struct _CamelMimeMessage *msg, gint flags, const gchar *source); +struct _FilterRule *filter_rule_from_message(struct _EMFilterContext *context, struct _CamelMimeMessage *msg, gint flags); +struct _FilterRule *em_vfolder_rule_from_address(struct _EMVFolderContext *context, struct _CamelInternetAddress *addr, gint flags, const gchar *source); /* easiest place to put this */ -void filter_gui_add_from_message(struct _CamelMimeMessage *msg, const char *source, int flags); +void filter_gui_add_from_message(struct _CamelMimeMessage *msg, const gchar *source, gint flags); /* Also easiest place for these, we should really share a global rule context for this stuff ... */ -void mail_filter_rename_uri(struct _CamelStore *store, const char *olduri, const char *newuri); -void mail_filter_delete_uri(struct _CamelStore *store, const char *uri); +void mail_filter_rename_uri(struct _CamelStore *store, const gchar *olduri, const gchar *newuri); +void mail_filter_delete_uri(struct _CamelStore *store, const gchar *uri); #endif diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c index 268f0b5e3c..9a95823bd4 100644 --- a/mail/mail-component-factory.c +++ b/mail/mail-component-factory.c @@ -57,7 +57,7 @@ #define FOLDER_INFO_ID "OAFIID:GNOME_Evolution_FolderInfo:" BASE_VERSION static BonoboObject * -factory(BonoboGenericFactory *factory, const char *component_id, void *closure) +factory(BonoboGenericFactory *factory, const gchar *component_id, gpointer closure) { BonoboObject *o; @@ -81,9 +81,9 @@ factory(BonoboGenericFactory *factory, const char *component_id, void *closure) } static Bonobo_Unknown -make_factory (PortableServer_POA poa, const char *iid, gpointer impl_ptr, CORBA_Environment *ev) +make_factory (PortableServer_POA poa, const gchar *iid, gpointer impl_ptr, CORBA_Environment *ev) { - static int init = 0; + static gint init = 0; if (!init) { EImportClass *klass; diff --git a/mail/mail-component.c b/mail/mail-component.c index 698cc940f8..339e2345e0 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -99,32 +99,32 @@ #define d(x) -static void create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data); +static void create_local_item_cb(EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data); static void view_changed_timeout_remove (EComponentView *component_view); #define MAIL_COMPONENT_DEFAULT(mc) if (mc == NULL) mc = mail_component_peek(); -extern int camel_application_is_exiting; +extern gint camel_application_is_exiting; #define PARENT_TYPE evolution_component_get_type () static BonoboObjectClass *parent_class = NULL; -const char *x_mailer = "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT; +const gchar *x_mailer = "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT; #define OFFLINE 0 #define ONLINE 1 struct _store_info { CamelStore *store; - char *name; + gchar *name; /* we keep a reference to these so they remain around for the session */ CamelFolder *vtrash; CamelFolder *vjunk; /* for setup only */ - void (*done)(CamelStore *store, CamelFolderInfo *info, void *data); - void *done_data; + void (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data); + gpointer done_data; - int ref_count:31; + gint ref_count:31; guint removed:1; }; @@ -133,10 +133,10 @@ struct _MailComponentPrivate { /* states/data used during shutdown */ enum { MC_QUIT_START, MC_QUIT_SYNC, MC_QUIT_THREADS } quit_state; - int quit_count; - int quit_expunge; /* expunge on quit this time around? */ + gint quit_count; + gint quit_expunge; /* expunge on quit this time around? */ - char *base_directory; + gchar *base_directory; EMFolderTreeModel *model; @@ -147,7 +147,7 @@ struct _MailComponentPrivate { RuleContext *search_context; - char *context_path; /* current path for right-click menu */ + gchar *context_path; /* current path for right-click menu */ CamelStore *local_store; ELogger *logger; @@ -161,7 +161,7 @@ struct _MailComponentPrivate { /* indexed by _mail_component_folder_t */ static struct { const gchar *name; - char *uri; + gchar *uri; CamelFolder *folder; } mc_default_folders[] = { /* translators: standard local mailbox names */ @@ -174,7 +174,7 @@ static struct { }; static struct _store_info * -store_info_new(CamelStore *store, const char *name) +store_info_new(CamelStore *store, const gchar *name) { struct _store_info *si; @@ -220,7 +220,7 @@ store_info_unref(struct _store_info *si) } static gboolean -mc_add_store_done(CamelStore *store, CamelFolderInfo *info, void *data) +mc_add_store_done(CamelStore *store, CamelFolderInfo *info, gpointer data) { struct _store_info *si = data; @@ -242,7 +242,7 @@ mc_add_store_done(CamelStore *store, CamelFolderInfo *info, void *data) /* Utility functions. */ static void -mc_add_store(MailComponent *component, CamelStore *store, const char *name, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data)) +mc_add_store(MailComponent *component, CamelStore *store, const gchar *name, void (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data)) { struct _store_info *si; @@ -257,10 +257,10 @@ mc_add_store(MailComponent *component, CamelStore *store, const char *name, void } static void -mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, void *data) +mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, gpointer data) { /*MailComponent *mc = data;*/ - int i; + gint i; for (i=0;i<sizeof(mc_default_folders)/sizeof(mc_default_folders[0]);i++) { if (mc_default_folders[i].folder) @@ -269,7 +269,7 @@ mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, void *data) } static void -mc_add_local_store(CamelStore *store, const char *name, MailComponent *mc) +mc_add_local_store(CamelStore *store, const gchar *name, MailComponent *mc) { mc_add_store(mc, store, name, mc_add_local_store_done); camel_object_unref(store); @@ -281,9 +281,9 @@ mc_setup_local_store(MailComponent *mc) { MailComponentPrivate *p = mc->priv; CamelURL *url; - char *tmp; + gchar *tmp; CamelException ex; - int i; + gint i; g_mutex_lock(p->lock); if (p->local_store != NULL) { @@ -343,7 +343,7 @@ load_accounts (MailComponent *component, EAccountList *accounts) while (e_iterator_is_valid (iter)) { EAccountService *service; EAccount *account; - const char *name; + const gchar *name; account = (EAccount *) e_iterator_get (iter); service = account->source; @@ -369,8 +369,8 @@ setup_search_context (MailComponent *component) MailComponentPrivate *priv = component->priv; if (priv->search_context == NULL) { - char *user = g_build_filename(component->priv->base_directory, "searches.xml", NULL); - char *system = g_build_filename (EVOLUTION_PRIVDATADIR, "searchtypes.xml", NULL); + gchar *user = g_build_filename(component->priv->base_directory, "searches.xml", NULL); + gchar *system = g_build_filename (EVOLUTION_PRIVDATADIR, "searchtypes.xml", NULL); priv->search_context = (RuleContext *)em_search_context_new (); g_object_set_data_full (G_OBJECT (priv->search_context), "user", user, g_free); @@ -382,7 +382,7 @@ setup_search_context (MailComponent *component) static void mc_startup(MailComponent *mc) { - static int started = 0; + static gint started = 0; GConfClient *gconf; if (started) @@ -399,7 +399,7 @@ mc_startup(MailComponent *mc) } static void -folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderView *view) +folder_selected_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, guint32 flags, EMFolderView *view) { EMFolderTreeModel *model; @@ -415,7 +415,7 @@ folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint } static int -check_autosave(void *data) +check_autosave(gpointer data) { e_msg_composer_check_autosave(NULL); @@ -426,7 +426,7 @@ static void view_control_activate_cb (BonoboControl *control, gboolean activate, EMFolderView *view) { BonoboUIComponent *uic; - static int recover = 0; + static gint recover = 0; uic = bonobo_control_get_ui_component (control); g_return_if_fail (uic != NULL); @@ -515,7 +515,7 @@ impl_finalize (GObject *object) } static void -view_on_url (GObject *emitter, const char *url, const char *nice_url, MailComponent *mail_component) +view_on_url (GObject *emitter, const gchar *url, const gchar *nice_url, MailComponent *mail_component) { MailComponentPrivate *priv = mail_component->priv; @@ -531,8 +531,8 @@ view_changed(EMFolderView *emfv, EComponentView *component_view) CORBA_exception_init(&ev); if (emfv->folder) { - char *name, *title; - const char *use_name; /* will contain localized name, if necessary */ + gchar *name, *title; + const gchar *use_name; /* will contain localized name, if necessary */ guint32 visible, unread, deleted, junked, junked_not_deleted; GPtrArray *selected; GString *tmp = g_string_new(""); @@ -623,7 +623,7 @@ view_changed_timeout_remove (EComponentView *component_view) } static int -view_changed_timeout(void *d) +view_changed_timeout(gpointer d) { EComponentView *component_view = d; EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label"); @@ -643,7 +643,7 @@ static void view_changed_cb(EMFolderView *emfv, EComponentView *component_view) { MailComponent *mc = mail_component_peek (); - void *v; + gpointer v; EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label"); v = g_object_get_data((GObject *)component_view, "view-changed-timeout"); @@ -726,7 +726,7 @@ impl_createView (PortableServer_Servant servant, GtkWidget *tree_widget, *vbox, *info; GtkWidget *view_widget; GtkWidget *statusbar_widget; - char *uri; + gchar *uri; mail_session_set_interactive(TRUE); mc_startup(mail_component); @@ -822,7 +822,7 @@ impl_requestQuit(PortableServer_Servant servant, CORBA_Environment *ev) } static void -mc_quit_sync_done(CamelStore *store, void *data) +mc_quit_sync_done(CamelStore *store, gpointer data) { MailComponent *mc = data; @@ -843,7 +843,7 @@ mc_quit_delete (CamelStore *store, struct _store_info *si, MailComponent *mc) if (folder) { GPtrArray *uids; - int i; + gint i; uids = camel_folder_get_uids (folder); camel_folder_freeze(folder); @@ -865,7 +865,7 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev) mail_config_prune_proxies (); switch (mc->priv->quit_state) { case MC_QUIT_START: { - int now = time(NULL)/60/60/24, days; + gint now = time(NULL)/60/60/24, days; gboolean empty_junk; GConfClient *gconf = mail_config_get_gconf_client(); @@ -926,27 +926,27 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_Environment CORBA_sequence_set_release (list, FALSE); - list->_buffer[0].id = (char *) "message"; + list->_buffer[0].id = (gchar *) "message"; list->_buffer[0].description = _("New Mail Message"); - list->_buffer[0].menuDescription = (char *) C_("New", "_Mail Message"); + list->_buffer[0].menuDescription = (gchar *) C_("New", "_Mail Message"); list->_buffer[0].tooltip = _("Compose a new mail message"); list->_buffer[0].menuShortcut = 'm'; - list->_buffer[0].iconName = (char *) "mail-message-new"; + list->_buffer[0].iconName = (gchar *) "mail-message-new"; list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT; - list->_buffer[1].id = (char *) "folder"; + list->_buffer[1].id = (gchar *) "folder"; list->_buffer[1].description = _("New Mail Folder"); - list->_buffer[1].menuDescription = (char *) C_("New", "Mail _Folder"); + list->_buffer[1].menuDescription = (gchar *) C_("New", "Mail _Folder"); list->_buffer[1].tooltip = _("Create a new mail folder"); list->_buffer[1].menuShortcut = '\0'; - list->_buffer[1].iconName = (char *) "folder-new"; + list->_buffer[1].iconName = (gchar *) "folder-new"; list->_buffer[1].type = GNOME_Evolution_CREATABLE_FOLDER; return list; } static int -create_item(const char *type, EMFolderTreeModel *model, const char *uri, gpointer tree) +create_item(const gchar *type, EMFolderTreeModel *model, const gchar *uri, gpointer tree) { if (strcmp(type, "message") == 0) { if (!em_utils_check_user_can_send_mail(NULL)) @@ -962,10 +962,10 @@ create_item(const char *type, EMFolderTreeModel *model, const char *uri, gpointe } static void -create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data) +create_local_item_cb(EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data) { EMFolderTree *tree = data; - char *uri = em_folder_tree_get_selected_uri(tree); + gchar *uri = em_folder_tree_get_selected_uri(tree); create_item(item_type_name, em_folder_tree_get_model(tree), uri, (gpointer) tree); g_free(uri); @@ -985,15 +985,15 @@ impl_requestCreateItem (PortableServer_Servant servant, } static void -handleuri_got_folder(char *uri, CamelFolder *folder, void *data) +handleuri_got_folder(gchar *uri, CamelFolder *folder, gpointer data) { CamelURL *url = data; EMMessageBrowser *emmb; if (folder != NULL) { - const char *reply = camel_url_get_param(url, "reply"); - const char *forward = camel_url_get_param(url, "forward"); - int mode; + const gchar *reply = camel_url_get_param(url, "reply"); + const gchar *forward = camel_url_get_param(url, "forward"); + gint mode; if (reply) { @@ -1007,7 +1007,7 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data) em_utils_reply_to_message(folder, camel_url_get_param(url, "uid"), NULL, mode, NULL); } else if (forward) { GPtrArray *uids; - const char* uid; + const gchar * uid; uid = camel_url_get_param(url, "uid"); if (uid == NULL) @@ -1042,7 +1042,7 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data) } static void -impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environment *ev) +impl_handleURI (PortableServer_Servant servant, const gchar *uri, CORBA_Environment *ev) { if (!strncmp (uri, "mailto:", 7)) { if (!em_utils_check_user_can_send_mail(NULL)) @@ -1053,7 +1053,7 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme CamelURL *url = camel_url_new(uri, NULL); if (camel_url_get_param(url, "uid") != NULL) { - char *curi = em_uri_to_camel(uri); + gchar *curi = em_uri_to_camel(uri); mail_get_folder(curi, 0, handleuri_got_folder, url, mail_msg_unordered_push); g_free(curi); @@ -1093,7 +1093,7 @@ impl_upgradeFromVersion (PortableServer_Servant servant, const short major, cons } static void -mc_sync_store_done (CamelStore *store, void *data) +mc_sync_store_done (CamelStore *store, gpointer data) { MailComponent *mc = (MailComponent *) data; @@ -1130,11 +1130,11 @@ call_mail_sync (gpointer user_data) struct _setline_data { GNOME_Evolution_Listener listener; CORBA_boolean status; - int pending; + gint pending; }; static void -setline_done(CamelStore *store, void *data) +setline_done(CamelStore *store, gpointer data) { struct _setline_data *sd = data; @@ -1155,7 +1155,7 @@ setline_done(CamelStore *store, void *data) } static void -setline_check(void *key, void *value, void *data) +setline_check(gpointer key, gpointer value, gpointer data) { CamelService *service = key; struct _setline_data *sd = data; @@ -1167,10 +1167,10 @@ setline_check(void *key, void *value, void *data) } } -int +gint status_check (GNOME_Evolution_ShellState shell_state) { - int status = 0; + gint status = 0; switch (shell_state) { @@ -1197,7 +1197,7 @@ static void impl_setLineStatus(PortableServer_Servant servant, GNOME_Evolution_ShellState shell_state, GNOME_Evolution_Listener listener, CORBA_Environment *ev) { struct _setline_data *sd; - int status = status_check(shell_state); + gint status = status_check(shell_state); /* This will dis/enable further auto-mail-check action. */ /* FIXME: If send/receive active, wait for it to finish? */ @@ -1289,7 +1289,7 @@ mail_component_init (MailComponent *component) priv->base_directory = g_build_filename (e_get_user_data_dir (), "mail", NULL); #ifdef G_OS_WIN32 { - char *p = priv->base_directory; + gchar *p = priv->base_directory; while ((p = strchr(p, '\\'))) *p++ = '/'; } @@ -1333,7 +1333,7 @@ mail_component_peek (void) return component; } -const char * +const gchar * mail_component_peek_base_directory (MailComponent *component) { MAIL_COMPONENT_DEFAULT(component); @@ -1367,7 +1367,7 @@ struct _CamelSession *mail_component_peek_session(MailComponent *component) } void -mail_component_add_store (MailComponent *component, CamelStore *store, const char *name) +mail_component_add_store (MailComponent *component, CamelStore *store, const gchar *name) { mc_add_store(component, store, name, NULL); } @@ -1382,7 +1382,7 @@ mail_component_add_store (MailComponent *component, CamelStore *store, const cha * to ref the object if it wants to store it. **/ CamelStore * -mail_component_load_store_by_uri (MailComponent *component, const char *uri, const char *name) +mail_component_load_store_by_uri (MailComponent *component, const gchar *uri, const gchar *name) { CamelException ex; CamelStore *store; @@ -1425,7 +1425,7 @@ mail_component_load_store_by_uri (MailComponent *component, const char *uri, con } static void -store_disconnect (CamelStore *store, void *event_data, void *user_data) +store_disconnect (CamelStore *store, gpointer event_data, gpointer user_data) { camel_service_disconnect (CAMEL_SERVICE (store), TRUE, NULL); camel_object_unref (store); @@ -1462,7 +1462,7 @@ mail_component_remove_store (MailComponent *component, CamelStore *store) } void -mail_component_remove_store_by_uri (MailComponent *component, const char *uri) +mail_component_remove_store_by_uri (MailComponent *component, const gchar *uri) { CamelProvider *prov; CamelStore *store; @@ -1482,7 +1482,7 @@ mail_component_remove_store_by_uri (MailComponent *component, const char *uri) } } -int +gint mail_component_get_store_count (MailComponent *component) { MAIL_COMPONENT_DEFAULT(component); @@ -1493,17 +1493,17 @@ mail_component_get_store_count (MailComponent *component) /* need to map from internal struct to external api */ struct _store_foreach_data { GHFunc func; - void *data; + gpointer data; }; static void mc_stores_foreach(CamelStore *store, struct _store_info *si, struct _store_foreach_data *data) { - data->func((void *)store, (void *)si->name, data->data); + data->func((gpointer)store, (gpointer)si->name, data->data); } void -mail_component_stores_foreach (MailComponent *component, GHFunc func, void *user_data) +mail_component_stores_foreach (MailComponent *component, GHFunc func, gpointer user_data) { struct _store_foreach_data data = { func, user_data }; @@ -1513,7 +1513,7 @@ mail_component_stores_foreach (MailComponent *component, GHFunc func, void *user } void -mail_component_remove_folder (MailComponent *component, CamelStore *store, const char *path) +mail_component_remove_folder (MailComponent *component, CamelStore *store, const gchar *path) { MAIL_COMPONENT_DEFAULT(component); @@ -1566,7 +1566,7 @@ mail_component_get_folder(MailComponent *mc, enum _mail_component_folder_t id) * * Return value: **/ -const char * +const gchar * mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id) { g_return_val_if_fail (id <= MAIL_COMPONENT_FOLDER_LOCAL_INBOX, NULL); @@ -1585,7 +1585,7 @@ mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t i void mail_indicate_new_mail (gboolean have_new_mail) { - const char *icon = NULL; + const gchar *icon = NULL; MailComponent *mc = mail_component_peek (); g_return_if_fail (mc != NULL); diff --git a/mail/mail-component.h b/mail/mail-component.h index 9af5caa40f..ef781d119a 100644 --- a/mail/mail-component.h +++ b/mail/mail-component.h @@ -67,7 +67,7 @@ GType mail_component_get_type (void); MailComponent *mail_component_peek (void); /* NOTE: Using NULL as the component implies using the default component */ -const char *mail_component_peek_base_directory (MailComponent *component); +const gchar *mail_component_peek_base_directory (MailComponent *component); struct _RuleContext *mail_component_peek_search_context (MailComponent *component); struct _EActivityHandler *mail_component_peek_activity_handler (MailComponent *component); @@ -75,30 +75,30 @@ struct _CamelSession *mail_component_peek_session(MailComponent *); void mail_component_add_store (MailComponent *component, struct _CamelStore *store, - const char *name); + const gchar *name); struct _CamelStore *mail_component_load_store_by_uri (MailComponent *component, - const char *uri, - const char *name); + const gchar *uri, + const gchar *name); void mail_component_remove_store (MailComponent *component, struct _CamelStore *store); void mail_component_remove_store_by_uri (MailComponent *component, - const char *uri); + const gchar *uri); -int mail_component_get_store_count (MailComponent *component); +gint mail_component_get_store_count (MailComponent *component); void mail_component_stores_foreach (MailComponent *component, GHFunc func, void *data); -void mail_component_remove_folder (MailComponent *component, struct _CamelStore *store, const char *path); +void mail_component_remove_folder (MailComponent *component, struct _CamelStore *store, const gchar *path); struct _EMFolderTreeModel *mail_component_peek_tree_model (MailComponent *component); struct _CamelStore *mail_component_peek_local_store (MailComponent *mc); struct _CamelFolder *mail_component_get_folder(MailComponent *mc, enum _mail_component_folder_t id); -const char *mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id); +const gchar *mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id); -int status_check (GNOME_Evolution_ShellState shell_state); +gint status_check (GNOME_Evolution_ShellState shell_state); void mail_indicate_new_mail (gboolean have_new_mail); void mail_component_show_logger (gpointer); diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c index f89383580c..75442b27fb 100644 --- a/mail/mail-config-factory.c +++ b/mail/mail-config-factory.c @@ -37,7 +37,7 @@ #define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ConfigControlFactory:" BASE_VERSION BonoboObject * -mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data) +mail_config_control_factory_cb (BonoboGenericFactory *factory, const gchar *component_id, gpointer user_data) { GNOME_Evolution_Shell shell = (GNOME_Evolution_Shell) user_data; EvolutionConfigControl *control; diff --git a/mail/mail-config-factory.h b/mail/mail-config-factory.h index 430058364e..428598a663 100644 --- a/mail/mail-config-factory.h +++ b/mail/mail-config-factory.h @@ -35,7 +35,7 @@ extern "C" { gboolean mail_config_register_factory (GNOME_Evolution_Shell shell); -BonoboObject *mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data); +BonoboObject *mail_config_control_factory_cb (BonoboGenericFactory *factory, const gchar *component_id, gpointer user_data); #ifdef __cplusplus } diff --git a/mail/mail-config.c b/mail/mail-config.c index bcf8dd7854..d414f75f0c 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -81,7 +81,7 @@ typedef struct { gboolean corrupt; - char *gtkrc; + gchar *gtkrc; EAccountList *accounts; ESignatureList *signatures; @@ -105,7 +105,7 @@ typedef struct { gboolean scripts_disabled; } MailConfig; -extern int camel_header_param_encode_filenames_in_rfc_2047; +extern gint camel_header_param_encode_filenames_in_rfc_2047; static MailConfig *config = NULL; static guint config_write_timeout = 0; @@ -125,7 +125,7 @@ mail_config_save_signatures (void) static void config_clear_mime_types (void) { - int i; + gint i; for (i = 0; i < config->mime_types->len; i++) g_free (config->mime_types->pdata[i]); @@ -278,13 +278,13 @@ gconf_jh_check_changed (GConfClient *client, guint cnxn_id, name = g_ptr_array_new (); value = g_ptr_array_new (); while (node && node->data) { - char **tok = g_strsplit (node->data, "=", 2); + gchar **tok = g_strsplit (node->data, "=", 2); g_ptr_array_add (name, g_strdup(tok[0])); g_ptr_array_add (value, g_strdup(tok[1])); node = node->next; g_strfreev (tok); } - mail_session_set_junk_headers ((const char **)name->pdata, (const char **)value->pdata, name->len); + mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len); g_ptr_array_free (name, TRUE); g_ptr_array_free (value, TRUE); } @@ -302,13 +302,13 @@ gconf_jh_headers_changed (GConfClient *client, guint cnxn_id, name = g_ptr_array_new (); value = g_ptr_array_new (); while (node && node->data) { - char **tok = g_strsplit (node->data, "=", 2); + gchar **tok = g_strsplit (node->data, "=", 2); g_ptr_array_add (name, g_strdup(tok[0])); g_ptr_array_add (value, g_strdup(tok[1])); node = node->next; g_strfreev (tok); } - mail_session_set_junk_headers ((const char **)name->pdata, (const char **)value->pdata, name->len); + mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len); } static void @@ -594,7 +594,7 @@ mail_config_write_on_exit (void) session cache */ iter = e_list_get_iterator ((EList *) config->accounts); while (e_iterator_is_valid (iter)) { - char *passwd; + gchar *passwd; account = (EAccount *) e_iterator_get (iter); @@ -667,7 +667,7 @@ mail_config_is_corrupt (void) return config->corrupt; } -int +gint mail_config_get_address_count (void) { if (!config->address_compress) @@ -694,7 +694,7 @@ mail_config_get_error_level (void) return config->error_level; } -int +gint mail_config_get_message_limit (void) { if (!config->mlimit) @@ -746,10 +746,10 @@ mail_config_get_labels (void) return config->labels; } -const char ** +const gchar ** mail_config_get_allowable_mime_types (void) { - return (const char **) config->mime_types->pdata; + return (const gchar **) config->mime_types->pdata; } gboolean @@ -788,19 +788,19 @@ mail_config_get_default_account (void) } EAccount * -mail_config_get_account_by_name (const char *account_name) +mail_config_get_account_by_name (const gchar *account_name) { return (EAccount *)e_account_list_find(config->accounts, E_ACCOUNT_FIND_NAME, account_name); } EAccount * -mail_config_get_account_by_uid (const char *uid) +mail_config_get_account_by_uid (const gchar *uid) { return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid); } static EAccount * -mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount *account)) +mc_get_account_by (const gchar *given_url, const gchar * (get_url_string)(EAccount *account)) { EAccount *account = NULL; EIterator *iter; @@ -819,7 +819,7 @@ mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount iter = e_list_get_iterator ((EList *) config->accounts); while (account == NULL && e_iterator_is_valid (iter)) { CamelURL *account_url; - const char *account_url_string; + const gchar *account_url_string; account = (EAccount *) e_iterator_get (iter); @@ -850,7 +850,7 @@ mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount return account; } -static const char * +static const gchar * get_source_url_string (EAccount *account) { if (account && account->source && account->source->url && *account->source->url) @@ -858,7 +858,7 @@ get_source_url_string (EAccount *account) return NULL; } -static const char * +static const gchar * get_transport_url_string (EAccount *account) { if (account && account->transport && account->transport->url && *account->transport->url) @@ -867,18 +867,18 @@ get_transport_url_string (EAccount *account) } EAccount * -mail_config_get_account_by_source_url (const char *source_url) +mail_config_get_account_by_source_url (const gchar *source_url) { return mc_get_account_by (source_url, get_source_url_string); } EAccount * -mail_config_get_account_by_transport_url (const char *transport_url) +mail_config_get_account_by_transport_url (const gchar *transport_url) { return mc_get_account_by (transport_url, get_transport_url_string); } -int +gint mail_config_has_proxies (EAccount *account) { return e_account_list_account_has_proxies (config->accounts, account); @@ -966,12 +966,12 @@ mail_config_get_default_transport (void) return NULL; } -static char * -uri_to_evname (const char *uri, const char *prefix) +static gchar * +uri_to_evname (const gchar *uri, const gchar *prefix) { - const char *base_directory = mail_component_peek_base_directory (mail_component_peek ()); - char *safe; - char *tmp; + const gchar *base_directory = mail_component_peek_base_directory (mail_component_peek ()); + gchar *safe; + gchar *tmp; safe = g_strdup (uri); e_filename_make_safe (safe); @@ -985,12 +985,12 @@ uri_to_evname (const char *uri, const char *prefix) } void -mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new) +mail_config_uri_renamed (GCompareFunc uri_cmp, const gchar *old, const gchar *new) { EAccount *account; EIterator *iter; - int i, work = 0; - char *oldname, *newname; + gint i, work = 0; + gchar *oldname, *newname; const gchar *cachenames[] = { "config/hidestate-", "config/et-expanded-", @@ -1038,14 +1038,14 @@ mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new) } void -mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri) +mail_config_uri_deleted (GCompareFunc uri_cmp, const gchar *uri) { EAccount *account; EIterator *iter; - int work = 0; + gint work = 0; /* assumes these can't be removed ... */ - const char *default_sent_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT); - const char *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS); + const gchar *default_sent_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT); + const gchar *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS); iter = e_list_get_iterator ((EList *) config->accounts); while (e_iterator_is_valid (iter)) { @@ -1077,10 +1077,10 @@ mail_config_service_set_save_passwd (EAccountService *service, gboolean save_pas service->save_passwd = save_passwd; } -char * +gchar * mail_config_folder_to_safe_url (CamelFolder *folder) { - char *url; + gchar *url; url = mail_tools_folder_to_url (folder); e_filename_make_safe (url); @@ -1088,11 +1088,11 @@ mail_config_folder_to_safe_url (CamelFolder *folder) return url; } -char * -mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix) +gchar * +mail_config_folder_to_cachename (CamelFolder *folder, const gchar *prefix) { - char *url, *basename, *filename; - const char *evolution_dir; + gchar *url, *basename, *filename; + const gchar *evolution_dir; evolution_dir = mail_component_peek_base_directory (mail_component_peek ()); @@ -1111,13 +1111,13 @@ mail_config_get_signatures (void) return config->signatures; } -static char * +static gchar * get_new_signature_filename (void) { - const char *base_directory; - char *filename, *id; + const gchar *base_directory; + gchar *filename, *id; struct stat st; - int i; + gint i; base_directory = e_get_user_data_dir (); filename = g_build_filename (base_directory, "signatures", NULL); @@ -1137,7 +1137,7 @@ get_new_signature_filename (void) for (i = 0; i < (INT_MAX - 1); i++) { sprintf (id, "%d", i); if (g_lstat (filename, &st) == -1 && errno == ENOENT) { - int fd; + gint fd; fd = g_creat (filename, 0600); if (fd >= 0) { @@ -1154,7 +1154,7 @@ get_new_signature_filename (void) ESignature * -mail_config_signature_new (const char *filename, gboolean script, gboolean html) +mail_config_signature_new (const gchar *filename, gboolean script, gboolean html) { ESignature *sig; @@ -1172,13 +1172,13 @@ mail_config_signature_new (const char *filename, gboolean script, gboolean html) } ESignature * -mail_config_get_signature_by_uid (const char *uid) +mail_config_get_signature_by_uid (const gchar *uid) { return (ESignature *) e_signature_list_find (config->signatures, E_SIGNATURE_FIND_UID, uid); } ESignature * -mail_config_get_signature_by_name (const char *name) +mail_config_get_signature_by_name (const gchar *name) { return (ESignature *) e_signature_list_find (config->signatures, E_SIGNATURE_FIND_NAME, name); } @@ -1240,12 +1240,12 @@ mail_config_scripts_disabled (void) return config->scripts_disabled; } -char * -mail_config_signature_run_script (const char *script) +gchar * +mail_config_signature_run_script (const gchar *script) { #ifndef G_OS_WIN32 - int result, status; - int in_fds[2]; + gint result, status; + gint in_fds[2]; pid_t pid; if (mail_config_scripts_disabled ()) @@ -1258,7 +1258,7 @@ mail_config_signature_run_script (const char *script) if (!(pid = fork ())) { /* child process */ - int maxfd, i; + gint maxfd, i; close (in_fds [0]); if (dup2 (in_fds[1], STDOUT_FILENO) < 0) @@ -1287,8 +1287,8 @@ mail_config_signature_run_script (const char *script) CamelMimeFilter *charenc; CamelStream *stream; GByteArray *buffer; - char *charset; - char *content; + gchar *charset; + gchar *content; /* parent process */ close (in_fds[1]); @@ -1306,7 +1306,7 @@ mail_config_signature_run_script (const char *script) are known to not ever read the manual... we try to do our best if the content isn't valid UTF-8 by assuming that the content is in the user's preferred charset. */ - if (!g_utf8_validate ((char *)buffer->data, buffer->len, NULL)) { + if (!g_utf8_validate ((gchar *)buffer->data, buffer->len, NULL)) { stream = (CamelStream *) memstream; memstream = (CamelStreamMem *) camel_stream_mem_new (); camel_stream_mem_set_byte_array (memstream, g_byte_array_new ()); @@ -1332,8 +1332,8 @@ mail_config_signature_run_script (const char *script) camel_object_unref (memstream); - g_byte_array_append (buffer, (const unsigned char *)"", 1); - content = (char *)buffer->data; + g_byte_array_append (buffer, (const guchar *)"", 1); + content = (gchar *)buffer->data; g_byte_array_free (buffer, FALSE); /* wait for the script process to terminate */ diff --git a/mail/mail-config.h b/mail/mail-config.h index aea5c5da94..d2fef97d8e 100644 --- a/mail/mail-config.h +++ b/mail/mail-config.h @@ -46,10 +46,10 @@ extern "C" { #endif /* __cplusplus */ typedef struct _MailConfigSignature { - int id; - char *name; - char *filename; - char *script; + gint id; + gchar *name; + gchar *filename; + gchar *script; gboolean html; } MailConfigSignature; @@ -101,29 +101,29 @@ gboolean mail_config_is_corrupt (void); GSList *mail_config_get_labels (void); -const char **mail_config_get_allowable_mime_types (void); +const gchar **mail_config_get_allowable_mime_types (void); void mail_config_service_set_save_passwd (struct _EAccountService *service, gboolean save_passwd); /* accounts */ gboolean mail_config_find_account (struct _EAccount *account); struct _EAccount *mail_config_get_default_account (void); -struct _EAccount *mail_config_get_account_by_name (const char *account_name); -struct _EAccount *mail_config_get_account_by_uid (const char *uid); -struct _EAccount *mail_config_get_account_by_source_url (const char *url); -struct _EAccount *mail_config_get_account_by_transport_url (const char *url); +struct _EAccount *mail_config_get_account_by_name (const gchar *account_name); +struct _EAccount *mail_config_get_account_by_uid (const gchar *uid); +struct _EAccount *mail_config_get_account_by_source_url (const gchar *url); +struct _EAccount *mail_config_get_account_by_transport_url (const gchar *url); struct _EAccountList *mail_config_get_accounts (void); void mail_config_add_account (struct _EAccount *account); void mail_config_remove_account (struct _EAccount *account); void mail_config_set_default_account (struct _EAccount *account); -int mail_config_get_address_count (void); -int mail_config_get_message_limit (void); +gint mail_config_get_address_count (void); +gint mail_config_get_message_limit (void); gboolean mail_config_get_enable_magic_spacebar (void); void mail_config_remove_account_proxies (struct _EAccount *account); void mail_config_prune_proxies (void); -int mail_config_has_proxies (struct _EAccount *account); +gint mail_config_has_proxies (struct _EAccount *account); struct _EAccountIdentity *mail_config_get_default_identity (void); struct _EAccountService *mail_config_get_default_transport (void); @@ -131,9 +131,9 @@ struct _EAccountService *mail_config_get_default_transport (void); void mail_config_save_accounts (void); /* signatures */ -struct _ESignature *mail_config_signature_new (const char *filename, gboolean script, gboolean html); -struct _ESignature *mail_config_get_signature_by_uid (const char *uid); -struct _ESignature *mail_config_get_signature_by_name (const char *name); +struct _ESignature *mail_config_signature_new (const gchar *filename, gboolean script, gboolean html); +struct _ESignature *mail_config_get_signature_by_uid (const gchar *uid); +struct _ESignature *mail_config_get_signature_by_name (const gchar *name); struct _ESignatureList *mail_config_get_signatures (void); void mail_config_add_signature (struct _ESignature *signature); @@ -141,16 +141,16 @@ void mail_config_remove_signature (struct _ESignature *signature); void mail_config_save_signatures (void); -char *mail_config_signature_run_script (const char *script); +gchar *mail_config_signature_run_script (const gchar *script); /* uri's got changed by the store, etc */ -void mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new); -void mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri); +void mail_config_uri_renamed (GCompareFunc uri_cmp, const gchar *old, const gchar *new); +void mail_config_uri_deleted (GCompareFunc uri_cmp, const gchar *uri); /* static utility functions */ -char *mail_config_folder_to_cachename (struct _CamelFolder *folder, const char *prefix); -char *mail_config_folder_to_safe_url (struct _CamelFolder *folder); +gchar *mail_config_folder_to_cachename (struct _CamelFolder *folder, const gchar *prefix); +gchar *mail_config_folder_to_safe_url (struct _CamelFolder *folder); guint mail_config_get_error_timeout (void); guint mail_config_get_error_level (void); diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index a84dfcbf74..a6c4b800ad 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -81,8 +81,8 @@ static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER; struct _folder_info { struct _store_info *store_info; /* 'parent' link */ - char *full_name; /* full name of folder/folderinfo */ - char *uri; /* uri of folder */ + gchar *full_name; /* full name of folder/folderinfo */ + gchar *uri; /* uri of folder */ guint32 flags; @@ -94,18 +94,18 @@ struct _folder_update { struct _folder_update *next; struct _folder_update *prev; - unsigned int remove:1; /* removing from vfolders */ - unsigned int delete:1; /* deleting as well? */ - unsigned int add:1; /* add to vfolder */ - unsigned int unsub:1; /* unsubcribing? */ - unsigned int new; /* new mail arrived? */ + guint remove:1; /* removing from vfolders */ + guint delete:1; /* deleting as well? */ + guint add:1; /* add to vfolder */ + guint unsub:1; /* unsubcribing? */ + guint new; /* new mail arrived? */ - char *full_name; - char *uri; - char *oldfull; - char *olduri; + gchar *full_name; + gchar *uri; + gchar *oldfull; + gchar *olduri; - int unread; + gint unread; CamelStore *store; }; @@ -131,11 +131,11 @@ static GHashTable *stores = NULL; /* List of folder changes to be executed in gui thread */ static EDList updates = E_DLIST_INITIALISER(updates); -static int update_id = -1; +static gint update_id = -1; /* hack for people who LIKE to have unsent count */ -static int count_sent = FALSE; -static int count_trash = FALSE; +static gint count_sent = FALSE; +static gint count_trash = FALSE; static void free_update(struct _folder_update *up) @@ -150,7 +150,7 @@ free_update(struct _folder_update *up) } static void -real_flush_updates(void *o, void *event_data, void *data) +real_flush_updates(gpointer o, gpointer event_data, gpointer data) { struct _MailComponent *component; struct _EMFolderTreeModel *model; @@ -224,7 +224,7 @@ flush_updates(void) } static void -unset_folder_info(struct _folder_info *mfi, int delete, int unsub) +unset_folder_info(struct _folder_info *mfi, gint delete, gint unsub) { struct _folder_update *up; @@ -285,12 +285,12 @@ free_folder_info(struct _folder_info *mfi) * it's correct. */ static void -update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info) +update_1folder(struct _folder_info *mfi, gint new, CamelFolderInfo *info) { struct _folder_update *up; CamelFolder *folder; - int unread = -1; - int deleted; + gint unread = -1; + gint deleted; folder = mfi->folder; if (folder) { @@ -399,8 +399,8 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) CamelMessageInfo *info; struct _store_info *si; struct _folder_info *mfi; - int new = 0; - int i; + gint new = 0; + gint i; guint32 flags; d(printf("folder '%s' changed\n", folder->full_name)); @@ -462,7 +462,7 @@ static void folder_renamed(CamelObject *o, gpointer event_data, gpointer user_data) { CamelFolder *folder = (CamelFolder *)o; - char *old = event_data; + gchar *old = event_data; d(printf("Folder renamed from '%s' to '%s'\n", old, folder->full_name)); @@ -506,7 +506,7 @@ void mail_note_folder(CamelFolder *folder) } static void -store_folder_subscribed(CamelObject *o, void *event_data, void *data) +store_folder_subscribed(CamelObject *o, gpointer event_data, gpointer data) { struct _store_info *si; CamelFolderInfo *fi = event_data; @@ -521,7 +521,7 @@ store_folder_subscribed(CamelObject *o, void *event_data, void *data) } static void -store_folder_created(CamelObject *o, void *event_data, void *data) +store_folder_created(CamelObject *o, gpointer event_data, gpointer data) { /* we only want created events to do more work if we dont support subscriptions */ if (!camel_store_supports_subscriptions(CAMEL_STORE(o))) @@ -529,7 +529,7 @@ store_folder_created(CamelObject *o, void *event_data, void *data) } static void -store_folder_opened(CamelObject *o, void *event_data, void *data) +store_folder_opened(CamelObject *o, gpointer event_data, gpointer data) { CamelFolder *folder = event_data; @@ -537,7 +537,7 @@ store_folder_opened(CamelObject *o, void *event_data, void *data) } static void -store_folder_unsubscribed(CamelObject *o, void *event_data, void *data) +store_folder_unsubscribed(CamelObject *o, gpointer event_data, gpointer data) { struct _store_info *si; CamelFolderInfo *fi = event_data; @@ -561,24 +561,24 @@ store_folder_unsubscribed(CamelObject *o, void *event_data, void *data) } static void -store_folder_deleted(CamelObject *o, void *event_data, void *data) +store_folder_deleted(CamelObject *o, gpointer event_data, gpointer data) { /* we only want deleted events to do more work if we dont support subscriptions */ if (!camel_store_supports_subscriptions(CAMEL_STORE(o))) store_folder_unsubscribed(o, event_data, data); } -static char * -folder_to_url(CamelStore *store, const char *full_name) +static gchar * +folder_to_url(CamelStore *store, const gchar *full_name) { CamelURL *url; - char *out; + gchar *out; url = camel_url_copy(((CamelService *)store)->url); if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) { camel_url_set_fragment(url, full_name); } else { - char *name = g_alloca(strlen(full_name)+2); + gchar *name = g_alloca(strlen(full_name)+2); sprintf(name, "/%s", full_name); camel_url_set_path(url, name); @@ -591,9 +591,9 @@ folder_to_url(CamelStore *store, const char *full_name) } static void -rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, CamelFolderInfo *fi) +rename_folders(struct _store_info *si, const gchar *oldbase, const gchar *newbase, CamelFolderInfo *fi) { - char *old, *olduri, *oldfile, *newuri, *newfile; + gchar *old, *olduri, *oldfile, *newuri, *newfile; struct _folder_info *mfi; struct _folder_update *up; @@ -685,7 +685,7 @@ get_folders(CamelFolderInfo *fi, GPtrArray *folders) } static int -folder_cmp(const void *ap, const void *bp) +folder_cmp(gconstpointer ap, gconstpointer bp) { const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0]; const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0]; @@ -694,7 +694,7 @@ folder_cmp(const void *ap, const void *bp) } static void -store_folder_renamed(CamelObject *o, void *event_data, void *data) +store_folder_renamed(CamelObject *o, gpointer event_data, gpointer data) { CamelStore *store = (CamelStore *)o; CamelRenameInfo *info = event_data; @@ -707,7 +707,7 @@ store_folder_renamed(CamelObject *o, void *event_data, void *data) if (si) { GPtrArray *folders = g_ptr_array_new(); CamelFolderInfo *top; - int i; + gint i; /* Ok, so for some reason the folderinfo we have comes in all messed up from imap, should find out why ... this makes it workable */ @@ -729,21 +729,21 @@ struct _update_data { struct _update_data *next; struct _update_data *prev; - int id; /* id for cancellation */ + gint id; /* id for cancellation */ guint cancel:1; /* also tells us we're cancelled */ - gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data); - void *data; + gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data); + gpointer data; }; static void -unset_folder_info_hash(char *path, struct _folder_info *mfi, void *data) +unset_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data) { unset_folder_info(mfi, FALSE, FALSE); } static void -free_folder_info_hash(char *path, struct _folder_info *mfi, void *data) +free_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data) { free_folder_info(mfi); } @@ -792,7 +792,7 @@ mail_note_store_remove(CamelStore *store) } static gboolean -update_folders(CamelStore *store, CamelFolderInfo *fi, void *data) +update_folders(CamelStore *store, CamelFolderInfo *fi, gpointer data) { struct _update_data *ud = data; struct _store_info *si; @@ -829,8 +829,8 @@ struct _ping_store_msg { static gchar * ping_store_desc (struct _ping_store_msg *m) { - char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); - char *msg; + gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); + gchar *msg; msg = g_strdup_printf (_("Pinging %s"), service_name); g_free (service_name); @@ -898,7 +898,7 @@ ping_cb (gpointer user_data) } static void -store_online_cb (CamelStore *store, void *data) +store_online_cb (CamelStore *store, gpointer data) { struct _update_data *ud = data; @@ -918,13 +918,13 @@ store_online_cb (CamelStore *store, void *data) void mail_note_store(CamelStore *store, CamelOperation *op, - gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data) + gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), gpointer data) { struct _store_info *si; struct _update_data *ud; - const char *buf; + const gchar *buf; guint timeout; - int hook = 0; + gint hook = 0; g_return_if_fail (CAMEL_IS_STORE(store)); g_return_if_fail (mail_in_main_thread()); @@ -998,7 +998,7 @@ mail_note_store(CamelStore *store, CamelOperation *op, } struct _find_info { - const char *uri; + const gchar *uri; struct _folder_info *fi; CamelURL *url; }; @@ -1008,7 +1008,7 @@ static void storeinfo_find_folder_info(CamelStore *store, struct _store_info *si { if (fi->fi == NULL) { if (((CamelService *)store)->provider->url_equal(fi->url, ((CamelService *)store)->url)) { - char *path = fi->url->fragment?fi->url->fragment:fi->url->path; + gchar *path = fi->url->fragment?fi->url->fragment:fi->url->path; if (path[0] == '/') path++; @@ -1019,7 +1019,7 @@ static void storeinfo_find_folder_info(CamelStore *store, struct _store_info *si /* returns TRUE if the uri is available, folderp is set to a reffed folder if the folder has also already been opened */ -int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp) +gint mail_note_get_folder_from_uri(const gchar *uri, CamelFolder **folderp) { struct _find_info fi = { uri, NULL, NULL }; @@ -1046,9 +1046,9 @@ int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp) } gboolean -mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags) +mail_folder_cache_get_folder_info_flags (CamelFolder *folder, gint *flags) { - char *uri = mail_tools_folder_to_url (folder); + gchar *uri = mail_tools_folder_to_url (folder); struct _find_info fi = { uri, NULL, NULL }; if (stores == NULL) diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h index 932f5c3f78..41f36ac0cf 100644 --- a/mail/mail-folder-cache.h +++ b/mail/mail-folder-cache.h @@ -34,8 +34,8 @@ The 'done' function returns if we can free folder info. */ void mail_note_store (CamelStore *store, CamelOperation *op, - gboolean (*done) (CamelStore *store, CamelFolderInfo *info, void *data), - void *data); + gboolean (*done) (CamelStore *store, CamelFolderInfo *info, gpointer data), + gpointer data); /* de-note a store */ void mail_note_store_remove (CamelStore *store); @@ -48,7 +48,7 @@ void mail_note_folder (CamelFolder *folder); /* Returns true if a folder is available (yet), and also sets *folderp (if supplied) to a (referenced) copy of the folder if it has already been opened */ -int mail_note_get_folder_from_uri (const char *uri, CamelFolder **folderp); -gboolean mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags); +gint mail_note_get_folder_from_uri (const gchar *uri, CamelFolder **folderp); +gboolean mail_folder_cache_get_folder_info_flags (CamelFolder *folder, gint *flags); #endif diff --git a/mail/mail-mt.c b/mail/mail-mt.c index ed7e257fba..f820f78a76 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -50,8 +50,8 @@ #define LOG_LOCKS #define d(x) -static void set_stop(int sensitive); -static void mail_operation_status(struct _CamelOperation *op, const char *what, int pc, void *data); +static void set_stop(gint sensitive); +static void mail_operation_status(struct _CamelOperation *op, const gchar *what, gint pc, gpointer data); #ifdef LOG_LOCKS #define MAIL_MT_LOCK(x) (log_locks?fprintf(log, "%" G_GINT64_MODIFIER "x: lock " # x "\n", e_util_pthread_id(pthread_self())):0, pthread_mutex_lock(&x)) @@ -63,9 +63,9 @@ static void mail_operation_status(struct _CamelOperation *op, const char *what, /* background operation status stuff */ struct _MailMsgPrivate { - int activity_state; /* sigh sigh sigh, we need to keep track of the state external to the + gint activity_state; /* sigh sigh sigh, we need to keep track of the state external to the pointer itself for locking/race conditions */ - int activity_id; + gint activity_id; GtkWidget *error; gboolean cancelable; }; @@ -73,10 +73,10 @@ struct _MailMsgPrivate { /* mail_msg stuff */ #ifdef LOG_OPS static FILE *log; -static int log_ops, log_locks, log_init; +static gint log_ops, log_locks, log_init; #endif -static unsigned int mail_msg_seq; /* sequence number of each message */ +static guint mail_msg_seq; /* sequence number of each message */ static GHashTable *mail_msg_active_table; /* table of active messages, must hold mail_msg_lock to access */ static pthread_mutex_t mail_msg_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t mail_msg_cond = PTHREAD_COND_INITIALIZER; @@ -140,7 +140,7 @@ mail_msg_new (MailMsgInfo *info) } static void -end_event_callback (CamelObject *o, void *event_data, void *error) +end_event_callback (CamelObject *o, gpointer event_data, gpointer error) { MailComponent *component; EActivityHandler *activity_handler; @@ -161,10 +161,10 @@ end_event_callback (CamelObject *o, void *event_data, void *error) #include <mcheck.h> static void -checkmem(void *p) +checkmem(gpointer p) { if (p) { - int status = mprobe(p); + gint status = mprobe(p); switch (status) { case MCHECK_HEAD: @@ -277,12 +277,12 @@ mail_msg_unref (gpointer msg) /* hash table of ops->dialogue of active errors */ static GHashTable *active_errors = NULL; -static void error_destroy(GtkObject *o, void *data) +static void error_destroy(GtkObject *o, gpointer data) { g_hash_table_remove(active_errors, data); } -static void error_response(GtkObject *o, int button, void *data) +static void error_response(GtkObject *o, gint button, gpointer data) { gtk_widget_destroy((GtkWidget *)o); } @@ -291,7 +291,7 @@ void mail_msg_check_error (gpointer msg) { MailMsg *m = msg; - char *what; + gchar *what; GtkDialog *gd; #ifdef MALLOC_CHECK @@ -336,7 +336,7 @@ mail_msg_check_error (gpointer msg) gtk_widget_show((GtkWidget *)gd); } -void mail_msg_cancel(unsigned int msgid) +void mail_msg_cancel(guint msgid) { MailMsg *m; @@ -352,7 +352,7 @@ void mail_msg_cancel(unsigned int msgid) /* waits for a message to be finished processing (freed) the messageid is from MailMsg->seq */ -void mail_msg_wait(unsigned int msgid) +void mail_msg_wait(guint msgid) { MailMsg *m; @@ -377,9 +377,9 @@ void mail_msg_wait(unsigned int msgid) } } -int mail_msg_active(unsigned int msgid) +gint mail_msg_active(guint msgid) { - int active; + gint active; MAIL_MT_LOCK(mail_msg_lock); if (msgid == (unsigned int)-1) @@ -665,12 +665,12 @@ struct _proxy_msg { mail_async_event_t type; pthread_t thread; - int have_thread; + gint have_thread; MailAsyncFunc func; - void *o; - void *event_data; - void *data; + gpointer o; + gpointer event_data; + gpointer data; }; static void @@ -687,7 +687,7 @@ do_async_event(struct _proxy_msg *m) } static int -idle_async_event(void *mm) +idle_async_event(gpointer mm) { do_async_event(mm); mail_msg_unref(mm); @@ -713,10 +713,10 @@ MailAsyncEvent *mail_async_event_new(void) return ea; } -int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *o, void *event_data, void *data) +gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer o, gpointer event_data, gpointer data) { struct _proxy_msg *m; - int id; + gint id; /* we dont have a reply port for this, we dont care when/if it gets executed, just queue it */ m = mail_msg_new(&async_event_info); @@ -746,9 +746,9 @@ int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsync return id; } -int mail_async_event_destroy(MailAsyncEvent *ea) +gint mail_async_event_destroy(MailAsyncEvent *ea) { - int id; + gint id; pthread_t thread = pthread_self(); struct _proxy_msg *m; @@ -781,7 +781,7 @@ struct _call_msg { mail_call_t type; MailMainFunc func; - void *ret; + gpointer ret; va_list ap; EFlag *done; }; @@ -789,50 +789,50 @@ struct _call_msg { static void do_call(struct _call_msg *m) { - void *p1, *p2, *p3, *p4, *p5; - int i1; + gpointer p1, *p2, *p3, *p4, *p5; + gint i1; va_list ap; G_VA_COPY(ap, m->ap); switch(m->type) { case MAIL_CALL_p_p: - p1 = va_arg(ap, void *); + p1 = va_arg(ap, gpointer ); m->ret = m->func(p1); break; case MAIL_CALL_p_pp: - p1 = va_arg(ap, void *); - p2 = va_arg(ap, void *); + p1 = va_arg(ap, gpointer ); + p2 = va_arg(ap, gpointer ); m->ret = m->func(p1, p2); break; case MAIL_CALL_p_ppp: - p1 = va_arg(ap, void *); - p2 = va_arg(ap, void *); - p3 = va_arg(ap, void *); + p1 = va_arg(ap, gpointer ); + p2 = va_arg(ap, gpointer ); + p3 = va_arg(ap, gpointer ); m->ret = m->func(p1, p2, p3); break; case MAIL_CALL_p_pppp: - p1 = va_arg(ap, void *); - p2 = va_arg(ap, void *); - p3 = va_arg(ap, void *); - p4 = va_arg(ap, void *); + p1 = va_arg(ap, gpointer ); + p2 = va_arg(ap, gpointer ); + p3 = va_arg(ap, gpointer ); + p4 = va_arg(ap, gpointer ); m->ret = m->func(p1, p2, p3, p4); break; case MAIL_CALL_p_ppppp: - p1 = va_arg(ap, void *); - p2 = va_arg(ap, void *); - p3 = va_arg(ap, void *); - p4 = va_arg(ap, void *); - p5 = va_arg(ap, void *); + p1 = va_arg(ap, gpointer ); + p2 = va_arg(ap, gpointer ); + p3 = va_arg(ap, gpointer ); + p4 = va_arg(ap, gpointer ); + p5 = va_arg(ap, gpointer ); m->ret = m->func(p1, p2, p3, p4, p5); break; case MAIL_CALL_p_ppippp: - p1 = va_arg(ap, void *); - p2 = va_arg(ap, void *); + p1 = va_arg(ap, gpointer ); + p2 = va_arg(ap, gpointer ); i1 = va_arg(ap, int); - p3 = va_arg(ap, void *); - p4 = va_arg(ap, void *); - p5 = va_arg(ap, void *); + p3 = va_arg(ap, gpointer ); + p4 = va_arg(ap, gpointer ); + p5 = va_arg(ap, gpointer ); m->ret = m->func(p1, p2, i1, p3, p4, p5); break; } @@ -849,11 +849,11 @@ static MailMsgInfo mail_call_info = { (MailMsgFreeFunc) NULL }; -void * +gpointer mail_call_main (mail_call_t type, MailMainFunc func, ...) { struct _call_msg *m; - void *ret; + gpointer ret; va_list ap; va_start(ap, func); @@ -883,7 +883,7 @@ mail_call_main (mail_call_t type, MailMainFunc func, ...) /* ********************************************************************** */ /* locked via status_lock */ -static int busy_state; +static gint busy_state; static void do_set_busy(MailMsg *mm) @@ -931,9 +931,9 @@ struct _op_status_msg { MailMsg base; struct _CamelOperation *op; - char *what; - int pc; - void *data; + gchar *what; + gint pc; + gpointer data; }; static void @@ -942,8 +942,8 @@ op_status_exec (struct _op_status_msg *m) EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ()); MailMsg *msg; MailMsgPrivate *data; - char *out, *p, *o, c; - int pc; + gchar *out, *p, *o, c; + gint pc; g_return_if_fail (mail_in_main_thread ()); @@ -971,7 +971,7 @@ op_status_exec (struct _op_status_msg *m) pc = m->pc; if (data->activity_id == 0) { - char *what; + gchar *what; /* its being created/removed? well leave it be */ if (data->activity_state == 1 || data->activity_state == 3) { @@ -995,7 +995,7 @@ op_status_exec (struct _op_status_msg *m) g_free (what); MAIL_MT_LOCK (mail_msg_lock); if (data->activity_state == 3) { - int activity_id = data->activity_id; + gint activity_id = data->activity_id; MAIL_MT_UNLOCK (mail_msg_lock); mail_msg_free (msg); @@ -1032,7 +1032,7 @@ static MailMsgInfo op_status_info = { }; static void -mail_operation_status (struct _CamelOperation *op, const char *what, int pc, void *data) +mail_operation_status (struct _CamelOperation *op, const gchar *what, gint pc, gpointer data) { struct _op_status_msg *m; @@ -1057,9 +1057,9 @@ mail_operation_status (struct _CamelOperation *op, const char *what, int pc, voi /* ******************** */ static void -set_stop (int sensitive) +set_stop (gint sensitive) { - static int last = FALSE; + static gint last = FALSE; if (last == sensitive) return; diff --git a/mail/mail-mt.h b/mail/mail-mt.h index ed23c3beeb..396eb77ad2 100644 --- a/mail/mail-mt.h +++ b/mail/mail-mt.h @@ -40,7 +40,7 @@ typedef void (*MailMsgDispatchFunc) (gpointer msg); struct _MailMsg { MailMsgInfo *info; volatile gint ref_count; - unsigned int seq; /* seq number for synchronisation */ + guint seq; /* seq number for synchronisation */ gint priority; /* priority (default = 0) */ CamelOperation *cancel; /* a cancellation/status handle */ CamelException ex; /* an initialised camel exception, upto the caller to use this */ @@ -66,10 +66,10 @@ gpointer mail_msg_new (MailMsgInfo *info); gpointer mail_msg_ref (gpointer msg); void mail_msg_unref (gpointer msg); void mail_msg_check_error (gpointer msg); -void mail_msg_cancel(unsigned int msgid); -void mail_msg_wait(unsigned int msgid); +void mail_msg_cancel(guint msgid); +void mail_msg_wait(guint msgid); void mail_msg_wait_all(void); -int mail_msg_active(unsigned int msgid); +gint mail_msg_active(guint msgid); /* dispatch a message */ void mail_msg_main_loop_push (gpointer msg); @@ -84,13 +84,13 @@ void mail_cancel_all (void); void mail_msg_set_cancelable (gpointer msg, gboolean status); /* request a string/password */ -char *mail_get_password (CamelService *service, const char *prompt, +gchar *mail_get_password (CamelService *service, const gchar *prompt, gboolean secret, gboolean *cache); /* present information and get an ok (or possibly cancel) * "type" is as for gnome_message_box_new(); */ -gboolean mail_user_message (const char *type, const char *prompt, gboolean allow_cancel); +gboolean mail_user_message (const gchar *type, const gchar *prompt, gboolean allow_cancel); /* asynchronous event proxies */ typedef struct _MailAsyncEvent { @@ -103,14 +103,14 @@ typedef enum _mail_async_event_t { MAIL_ASYNC_THREAD } mail_async_event_t; -typedef void (*MailAsyncFunc)(void *, void *, void *); +typedef void (*MailAsyncFunc)(gpointer , gpointer , gpointer ); /* create a new async event handler */ MailAsyncEvent *mail_async_event_new(void); /* forward a camel event (or other call) to the gui thread */ -int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *, void *, void *); +gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer ); /* wait for all outstanding async events to complete */ -int mail_async_event_destroy(MailAsyncEvent *ea); +gint mail_async_event_destroy(MailAsyncEvent *ea); /* Call a function in the gui thread, wait for it to return, type is the marshaller to use */ typedef enum { @@ -122,9 +122,9 @@ typedef enum { MAIL_CALL_p_ppippp } mail_call_t; -typedef void *(*MailMainFunc)(); +typedef gpointer (*MailMainFunc)(); -void *mail_call_main(mail_call_t type, MailMainFunc func, ...); +gpointer mail_call_main(mail_call_t type, MailMainFunc func, ...); /* use with caution. only works with active message's anyway */ void mail_enable_stop(void); diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 4f310db812..06ea94a594 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -72,7 +72,7 @@ #define w(x) #define d(x) -extern const char *x_mailer; +extern const gchar *x_mailer; /* used for both just filtering a folder + uid's, and for filtering a whole folder */ /* used both for fetching mail, and for filtering mail */ @@ -84,7 +84,7 @@ struct _filter_mail_msg { CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */ CamelOperation *cancel; CamelFilterDriver *driver; - int delete; /* delete messages after filtering them? */ + gint delete; /* delete messages after filtering them? */ CamelFolder *destination; /* default destination for any messages, NULL for none */ }; @@ -93,12 +93,12 @@ struct _fetch_mail_msg { struct _filter_mail_msg fmsg; CamelOperation *cancel; /* we have our own cancellation struct, the other should be empty */ - int keep; /* keep on server? */ + gint keep; /* keep on server? */ - char *source_uri; + gchar *source_uri; - void (*done)(const char *source, void *data); - void *data; + void (*done)(const gchar *source, gpointer data); + gpointer data; }; static gchar * @@ -197,7 +197,7 @@ static MailMsgInfo em_filter_folder_element_info = { void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, - const char *type, gboolean notify, + const gchar *type, gboolean notify, CamelOperation *cancel) { struct _filter_mail_msg *m; @@ -240,12 +240,12 @@ mail_filter_junk (CamelFolder *folder, GPtrArray *uids) /* ********************************************************************** */ /* Temporary workaround for various issues. Gone before 0.11 */ -static char * +static gchar * uid_cachename_hack (CamelStore *store) { CamelURL *url = CAMEL_SERVICE (store)->url; - char *encoded_url, *filename; - const char *evolution_dir; + gchar *encoded_url, *filename; + const gchar *evolution_dir; encoded_url = g_strdup_printf ("%s%s%s@%s", url->user, url->authmech ? ";auth=" : "", @@ -270,7 +270,7 @@ static void fetch_mail_exec (struct _fetch_mail_msg *m) { struct _filter_mail_msg *fm = (struct _filter_mail_msg *)m; - int i; + gint i; if (m->cancel) camel_operation_register (m->cancel); @@ -282,7 +282,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m) /* FIXME: this should support keep_on_server too, which would then perform a spool access thingy, right? problem is matching raw messages to uid's etc. */ if (!strncmp (m->source_uri, "mbox:", 5)) { - char *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex); + gchar *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex); if (path && !camel_exception_is_set (&fm->base.ex)) { camel_folder_freeze (fm->destination); @@ -301,7 +301,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m) /* this handles 'keep on server' stuff, if we have any new uid's to copy across, we need to copy them to a new array 'cause of the way fetch_mail_free works */ CamelUIDCache *cache = NULL; - char *cachename; + gchar *cachename; cachename = uid_cachename_hack (folder->parent_store); cache = camel_uid_cache_new (cachename); @@ -334,7 +334,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m) if (fm->delete && !camel_exception_is_set (&fm->base.ex)) { /* not keep on server - just delete all the actual messages on the server */ for (i=0;i<folder_uids->len;i++) { - d(printf("force delete uid '%s'\n", (char *)folder_uids->pdata[i])); + d(printf("force delete uid '%s'\n", (gchar *)folder_uids->pdata[i])); camel_folder_delete_message(folder, folder_uids->pdata[i]); } } @@ -397,10 +397,10 @@ static MailMsgInfo fetch_mail_info = { /* ouch, a 'do everything' interface ... */ void -mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation *cancel, - CamelFilterGetFolderFunc get_folder, void *get_data, - CamelFilterStatusFunc *status, void *status_data, - void (*done)(const char *source, void *data), void *data) +mail_fetch_mail (const gchar *source, gint keep, const gchar *type, CamelOperation *cancel, + CamelFilterGetFolderFunc get_folder, gpointer get_data, + CamelFilterStatusFunc *status, gpointer status_data, + void (*done)(const gchar *source, gpointer data), gpointer data) { struct _fetch_mail_msg *m; struct _filter_mail_msg *fm; @@ -443,21 +443,21 @@ static const gchar *resent_recipients[] = { /* send 1 message to a specific transport */ static void -mail_send_message(CamelFolder *queue, const char *uid, const char *destination, CamelFilterDriver *driver, CamelException *ex) +mail_send_message(CamelFolder *queue, const gchar *uid, const gchar *destination, CamelFilterDriver *driver, CamelException *ex) { EAccount *account = NULL; const CamelInternetAddress *iaddr; CamelAddress *from, *recipients; CamelMessageInfo *info = NULL; CamelTransport *xport = NULL; - char *transport_url = NULL; - char *sent_folder_uri = NULL; - const char *resent_from, *tmp; + gchar *transport_url = NULL; + gchar *sent_folder_uri = NULL; + const gchar *resent_from, *tmp; CamelFolder *folder = NULL; GString *err = NULL; struct _camel_header_raw *xev, *header; CamelMimeMessage *message; - int i; + gint i; message = camel_folder_get_message(queue, uid, ex); if (!message) @@ -470,7 +470,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, tmp = camel_header_raw_find(&xev, "X-Evolution-Account", NULL); if (tmp) { - char *name; + gchar *name; name = g_strstrip(g_strdup(tmp)); if ((account = mail_config_get_account_by_uid(name)) @@ -507,7 +507,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, recipients = (CamelAddress *) camel_internet_address_new (); for (i = 0; i < 3; i++) { - const char *type; + const gchar *type; type = resent_from ? resent_recipients[i] : normal_recipients[i]; iaddr = camel_mime_message_get_recipients (message, type); @@ -530,7 +530,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, camel_mime_message_set_date(message, CAMEL_MESSAGE_DATE_CURRENT, 0); for (header = xev;header;header=header->next) { - char *uri; + gchar *uri; if (strcmp(header->name, "X-Evolution-PostTo") != 0) continue; @@ -595,9 +595,9 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination, sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT); if (folder != sent_folder) { - const char *name; + const gchar *name; - camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (char **) &name, 0); + camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (gchar **) &name, 0); if (err->len) g_string_append(err, "\n\n"); g_string_append_printf (err, _("Failed to append to %s: %s\n" @@ -656,24 +656,24 @@ struct _send_queue_msg { MailMsg base; CamelFolder *queue; - char *destination; + gchar *destination; CamelFilterDriver *driver; CamelOperation *cancel; /* we use camelfilterstatusfunc, even though its not the filter doing it */ CamelFilterStatusFunc *status; - void *status_data; + gpointer status_data; - void (*done)(const char *destination, void *data); - void *data; + void (*done)(const gchar *destination, gpointer data); + gpointer data; }; static void -report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, int pc, const char *desc, ...) +report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, gint pc, const gchar *desc, ...) { va_list ap; - char *str; + gchar *str; if (m->status) { va_start (ap, desc); @@ -690,7 +690,7 @@ send_queue_exec (struct _send_queue_msg *m) CamelFolder *sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT); GPtrArray *uids, *send_uids = NULL; CamelException ex; - int i, j; + gint i, j; d(printf("sending queue\n")); @@ -731,7 +731,7 @@ send_queue_exec (struct _send_queue_msg *m) used as a mechanism to accumualte warning messages and present them back to the user. */ for (i = 0, j = 0; i < send_uids->len; i++) { - int pc = (100 * i) / send_uids->len; + gint pc = (100 * i) / send_uids->len; report_status (m, CAMEL_FILTER_STATUS_START, pc, _("Sending message %d of %d"), i+1, send_uids->len); if (!m->cancel) @@ -828,11 +828,11 @@ static MailMsgInfo send_queue_info = { /* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */ void -mail_send_queue(CamelFolder *queue, const char *destination, - const char *type, CamelOperation *cancel, - CamelFilterGetFolderFunc get_folder, void *get_data, - CamelFilterStatusFunc *status, void *status_data, - void (*done)(const char *destination, void *data), void *data) +mail_send_queue(CamelFolder *queue, const gchar *destination, + const gchar *type, CamelOperation *cancel, + CamelFilterGetFolderFunc get_folder, gpointer get_data, + CamelFilterStatusFunc *status, gpointer status_data, + void (*done)(const gchar *destination, gpointer data), gpointer data) { struct _send_queue_msg *m; @@ -867,10 +867,10 @@ struct _append_msg { CamelFolder *folder; CamelMimeMessage *message; CamelMessageInfo *info; - char *appended_uid; + gchar *appended_uid; - void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data); - void *data; + void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data); + gpointer data; }; static gchar * @@ -911,8 +911,8 @@ static MailMsgInfo append_mail_info = { void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info, - void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data), - void *data) + void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data), + gpointer data) { struct _append_msg *m; @@ -943,11 +943,11 @@ struct _transfer_msg { CamelFolder *source; GPtrArray *uids; gboolean delete; - char *dest_uri; + gchar *dest_uri; guint32 dest_flags; - void (*done)(gboolean ok, void *data); - void *data; + void (*done)(gboolean ok, gpointer data); + gpointer data; }; static gchar * @@ -981,7 +981,7 @@ transfer_messages_exec (struct _transfer_msg *m) /* make sure all deleted messages are marked as seen */ if (m->delete) { - int i; + gint i; for (i = 0; i < m->uids->len; i++) camel_folder_set_message_flags (m->source, m->uids->pdata[i], @@ -1020,10 +1020,10 @@ static MailMsgInfo transfer_messages_info = { void mail_transfer_messages (CamelFolder *source, GPtrArray *uids, gboolean delete_from_source, - const char *dest_uri, + const gchar *dest_uri, guint32 dest_flags, - void (*done) (gboolean ok, void *data), - void *data) + void (*done) (gboolean ok, gpointer data), + gpointer data) { struct _transfer_msg *m; @@ -1051,15 +1051,15 @@ struct _get_folderinfo_msg { CamelStore *store; CamelFolderInfo *info; - gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data); - void *data; + gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data); + gpointer data; gboolean can_clear; /* whether we can clear folder info */ }; static gchar * get_folderinfo_desc (struct _get_folderinfo_msg *m) { - char *ret, *name; + gchar *ret, *name; name = camel_service_get_name((CamelService *)m->store, TRUE); ret = g_strdup_printf(_("Scanning folders in \"%s\""), name); @@ -1079,7 +1079,7 @@ static void get_folderinfo_done (struct _get_folderinfo_msg *m) { if (!m->info && camel_exception_is_set (&m->base.ex)) { - char *url; + gchar *url; url = camel_service_get_url (CAMEL_SERVICE (m->store)); w(g_warning ("Error getting folder info from store at %s: %s", @@ -1109,11 +1109,11 @@ static MailMsgInfo get_folderinfo_info = { (MailMsgFreeFunc) get_folderinfo_free }; -int -mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data) +gint +mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), gpointer data) { struct _get_folderinfo_msg *m; - int id; + gint id; m = mail_msg_new(&get_folderinfo_info); if (op) { @@ -1135,18 +1135,18 @@ mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(Cam /* ** ATTACH MESSAGES ****************************************************** */ struct _build_data { - void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, char *subject, void *data); - void *data; + void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, gchar *subject, gpointer data); + gpointer data; }; static void -do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data) +do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer data) { struct _build_data *d = data; CamelMultipart *multipart; CamelMimePart *part; - char *subject; - int i; + gchar *subject; + gint i; if (messages->len == 0) { d->done(folder, messages, NULL, NULL, d->data); @@ -1183,7 +1183,7 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void mail_build_attachment(CamelFolder *folder, GPtrArray *uids, - void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data), void *data) + void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer data), gpointer data) { struct _build_data *d; @@ -1201,11 +1201,11 @@ mail_build_attachment(CamelFolder *folder, GPtrArray *uids, struct _get_folder_msg { MailMsg base; - char *uri; + gchar *uri; guint32 flags; CamelFolder *folder; - void (*done) (char *uri, CamelFolder *folder, void *data); - void *data; + void (*done) (gchar *uri, CamelFolder *folder, gpointer data); + gpointer data; }; static gchar * @@ -1243,13 +1243,13 @@ static MailMsgInfo get_folder_info = { (MailMsgFreeFunc) get_folder_free }; -int -mail_get_folder (const char *uri, guint32 flags, - void (*done)(char *uri, CamelFolder *folder, void *data), - void *data, MailMsgDispatchFunc dispatch) +gint +mail_get_folder (const gchar *uri, guint32 flags, + void (*done)(gchar *uri, CamelFolder *folder, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_folder_msg *m; - int id; + gint id; m = mail_msg_new(&get_folder_info); m->uri = g_strdup (uri); @@ -1269,8 +1269,8 @@ struct _get_quota_msg { CamelFolder *folder; CamelFolderQuotaInfo *quota; - void (*done) (CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data); - void *data; + void (*done) (CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data); + gpointer data; }; static gchar * @@ -1309,13 +1309,13 @@ static MailMsgInfo get_quota_info = { (MailMsgFreeFunc) get_quota_free }; -int +gint mail_get_folder_quota (CamelFolder *folder, - void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data), - void *data, MailMsgDispatchFunc dispatch) + void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_quota_msg *m; - int id; + gint id; g_return_val_if_fail (folder != NULL, -1); @@ -1336,10 +1336,10 @@ mail_get_folder_quota (CamelFolder *folder, struct _get_store_msg { MailMsg base; - char *uri; + gchar *uri; CamelStore *store; - void (*done) (char *uri, CamelStore *store, void *data); - void *data; + void (*done) (gchar *uri, CamelStore *store, gpointer data); + gpointer data; }; static gchar * @@ -1381,11 +1381,11 @@ static MailMsgInfo get_store_info = { (MailMsgFreeFunc) get_store_free }; -int -mail_get_store (const char *uri, CamelOperation *op, void (*done) (char *uri, CamelStore *store, void *data), void *data) +gint +mail_get_store (const gchar *uri, CamelOperation *op, void (*done) (gchar *uri, CamelStore *store, gpointer data), gpointer data) { struct _get_store_msg *m; - int id; + gint id; m = mail_msg_new (&get_store_info); if (op) { @@ -1409,8 +1409,8 @@ struct _remove_folder_msg { CamelFolder *folder; gboolean removed; - void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data); - void *data; + void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data); + gpointer data; }; static gchar * @@ -1438,7 +1438,7 @@ remove_folder_rec (CamelStore *store, CamelFolderInfo *fi, CamelException *ex) if (!CAMEL_IS_VEE_FOLDER (folder)) { GPtrArray *uids = camel_folder_get_uids (folder); - int i; + gint i; /* Delete every message in this folder, then expunge it */ camel_folder_freeze (folder); @@ -1506,7 +1506,7 @@ static MailMsgInfo remove_folder_info = { }; void -mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data), void *data) +mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data), gpointer data) { struct _remove_folder_msg *m; @@ -1527,8 +1527,8 @@ struct _sync_folder_msg { MailMsg base; CamelFolder *folder; - void (*done) (CamelFolder *folder, void *data); - void *data; + void (*done) (CamelFolder *folder, gpointer data); + gpointer data; }; static gchar * @@ -1566,7 +1566,7 @@ static MailMsgInfo sync_folder_info = { }; void -mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data) +mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data) { struct _sync_folder_msg *m; @@ -1585,15 +1585,15 @@ struct _sync_store_msg { MailMsg base; CamelStore *store; - int expunge; - void (*done) (CamelStore *store, void *data); - void *data; + gint expunge; + void (*done) (CamelStore *store, gpointer data); + gpointer data; }; static gchar * sync_store_desc (struct _sync_store_msg *m) { - char *uri, *res; + gchar *uri, *res; uri = camel_url_to_string(((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL); res = g_strdup_printf(m->expunge @@ -1633,7 +1633,7 @@ static MailMsgInfo sync_store_info = { }; void -mail_sync_store(CamelStore *store, int expunge, void (*done) (CamelStore *store, void *data), void *data) +mail_sync_store(CamelStore *store, gint expunge, void (*done) (CamelStore *store, gpointer data), gpointer data) { struct _sync_store_msg *m; @@ -1674,7 +1674,7 @@ static MailMsgInfo refresh_folder_info = { }; void -mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data) +mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data) { struct _sync_folder_msg *m; @@ -1711,7 +1711,7 @@ static MailMsgInfo expunge_folder_info = { }; void -mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data) +mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data) { struct _sync_folder_msg *m; @@ -1730,8 +1730,8 @@ struct _empty_trash_msg { MailMsg base; EAccount *account; - void (*done) (EAccount *account, void *data); - void *data; + void (*done) (EAccount *account, gpointer data); + gpointer data; }; static gchar * @@ -1749,9 +1749,9 @@ empty_trash_desc (struct _empty_trash_msg *m) static void empty_trash_exec (struct _empty_trash_msg *m) { - const char *evolution_dir; + const gchar *evolution_dir; CamelFolder *trash; - char *uri; + gchar *uri; if (m->account) { trash = mail_tool_get_trash (m->account->source->url, FALSE, &m->base.ex); @@ -1791,7 +1791,7 @@ static MailMsgInfo empty_trash_info = { }; void -mail_empty_trash(EAccount *account, void (*done) (EAccount *account, void *data), void *data) +mail_empty_trash(EAccount *account, void (*done) (EAccount *account, gpointer data), gpointer data) { struct _empty_trash_msg *m; @@ -1811,9 +1811,9 @@ struct _get_message_msg { MailMsg base; CamelFolder *folder; - char *uid; - void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data); - void *data; + gchar *uid; + void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data); + gpointer data; CamelMimeMessage *message; CamelOperation *cancel; }; @@ -1857,9 +1857,9 @@ static MailMsgInfo get_message_info = { }; void -mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, - CamelMimeMessage *msg, void *data), - void *data, MailMsgDispatchFunc dispatch) +mail_get_message(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid, + CamelMimeMessage *msg, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_message_msg *m; @@ -1868,13 +1868,13 @@ mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder camel_object_ref(folder); m->uid = g_strdup(uid); m->data = data; - m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done; + m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done; m->cancel = camel_operation_new(NULL, NULL); dispatch (m); } -typedef void (*get_done)(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *); +typedef void (*get_done)(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *); static void get_messagex_done (struct _get_message_msg *m) @@ -1896,8 +1896,8 @@ static MailMsgInfo get_messagex_info = { /* This is temporary, to avoid having to rewrite everything that uses mail_get_message; it adds an exception argument to the callback */ CamelOperation * -mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *), - void *data, MailMsgDispatchFunc dispatch) +mail_get_messagex(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *), + gpointer data, MailMsgDispatchFunc dispatch) { struct _get_message_msg *m; @@ -1906,7 +1906,7 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde camel_object_ref(folder); m->uid = g_strdup(uid); m->data = data; - m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done; + m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done; m->cancel = camel_operation_new(NULL, NULL); dispatch (m); @@ -1923,8 +1923,8 @@ struct _get_messages_msg { GPtrArray *uids; GPtrArray *messages; - void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data); - void *data; + void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data); + gpointer data; }; static gchar * @@ -1938,11 +1938,11 @@ get_messages_desc (struct _get_messages_msg *m) static void get_messages_exec (struct _get_messages_msg *m) { - int i; + gint i; CamelMimeMessage *message; for (i=0; i<m->uids->len; i++) { - int pc = ((i+1) * 100) / m->uids->len; + gint pc = ((i+1) * 100) / m->uids->len; message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex); camel_operation_progress(m->base.cancel, pc); @@ -1963,7 +1963,7 @@ get_messages_done (struct _get_messages_msg *m) static void get_messages_free (struct _get_messages_msg *m) { - int i; + gint i; em_utils_uids_free (m->uids); for (i=0;i<m->messages->len;i++) { @@ -1984,8 +1984,8 @@ static MailMsgInfo get_messages_info = { void mail_get_messages(CamelFolder *folder, GPtrArray *uids, - void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data), - void *data) + void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data), + gpointer data) { struct _get_messages_msg *m; @@ -2007,9 +2007,9 @@ struct _save_messages_msg { CamelFolder *folder; GPtrArray *uids; - char *path; - void (*done)(CamelFolder *folder, GPtrArray *uids, char *path, void *data); - void *data; + gchar *path; + void (*done)(CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data); + gpointer data; }; static gchar * @@ -2024,7 +2024,7 @@ static void save_prepare_part (CamelMimePart *mime_part) { CamelDataWrapper *wrapper; - int parts, i; + gint parts, i; wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)); if (!wrapper) @@ -2058,8 +2058,8 @@ save_messages_exec (struct _save_messages_msg *m) CamelStreamFilter *filtered_stream; CamelMimeFilterFrom *from_filter; CamelStream *stream; - int i; - char *from, *path; + gint i; + gchar *from, *path; if (strstr (m->path, "://")) path = m->path; @@ -2077,7 +2077,7 @@ save_messages_exec (struct _save_messages_msg *m) for (i=0; i<m->uids->len; i++) { CamelMimeMessage *message; - int pc = ((i+1) * 100) / m->uids->len; + gint pc = ((i+1) * 100) / m->uids->len; message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex); camel_operation_progress(m->base.cancel, pc); @@ -2129,12 +2129,12 @@ static MailMsgInfo save_messages_info = { (MailMsgFreeFunc) save_messages_free }; -int -mail_save_messages(CamelFolder *folder, GPtrArray *uids, const char *path, - void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data), void *data) +gint +mail_save_messages(CamelFolder *folder, GPtrArray *uids, const gchar *path, + void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data), gpointer data) { struct _save_messages_msg *m; - int id; + gint id; m = mail_msg_new(&save_messages_info); m->folder = folder; @@ -2156,9 +2156,9 @@ struct _save_part_msg { MailMsg base; CamelMimePart *part; - char *path; - void (*done)(CamelMimePart *part, char *path, int saved, void *data); - void *data; + gchar *path; + void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data); + gpointer data; gboolean readonly; }; @@ -2173,7 +2173,7 @@ save_part_exec (struct _save_part_msg *m) { CamelDataWrapper *content; CamelStream *stream; - char *path; + gchar *path; if (strstr (m->path, "://")) path = m->path; @@ -2234,12 +2234,12 @@ static MailMsgInfo save_part_info = { (MailMsgFreeFunc) save_part_free }; -int -mail_save_part (CamelMimePart *part, const char *path, - void (*done)(CamelMimePart *part, char *path, int saved, void *data), void *data, gboolean readonly) +gint +mail_save_part (CamelMimePart *part, const gchar *path, + void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data), gpointer data, gboolean readonly) { struct _save_part_msg *m; - int id; + gint id; m = mail_msg_new (&save_part_info); m->part = part; camel_object_ref (part); @@ -2261,9 +2261,9 @@ struct _prep_offline_msg { MailMsg base; CamelOperation *cancel; - char *uri; - void (*done)(const char *uri, void *data); - void *data; + gchar *uri; + void (*done)(const gchar *uri, gpointer data); + gpointer data; }; static void @@ -2317,10 +2317,10 @@ static MailMsgInfo prep_offline_info = { }; void -mail_prep_offline(const char *uri, +mail_prep_offline(const gchar *uri, CamelOperation *cancel, - void (*done)(const char *, void *data), - void *data) + void (*done)(const gchar *, gpointer data), + gpointer data) { struct _prep_offline_msg *m; @@ -2342,15 +2342,15 @@ struct _set_offline_msg { CamelStore *store; gboolean offline; - void (*done)(CamelStore *store, void *data); - void *data; + void (*done)(CamelStore *store, gpointer data); + gpointer data; }; static gchar * set_offline_desc (struct _set_offline_msg *m) { - char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); - char *msg; + gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); + gchar *msg; msg = g_strdup_printf(m->offline?_("Disconnecting from %s"):_("Reconnecting to %s"), service_name); @@ -2413,13 +2413,13 @@ static MailMsgInfo set_offline_info = { (MailMsgFreeFunc) set_offline_free }; -int +gint mail_store_set_offline (CamelStore *store, gboolean offline, - void (*done)(CamelStore *, void *data), - void *data) + void (*done)(CamelStore *, gpointer data), + gpointer data) { struct _set_offline_msg *m; - int id; + gint id; /* Cancel any pending connect first so the set_offline_op * thread won't get queued behind a hung connect op. @@ -2442,11 +2442,11 @@ mail_store_set_offline (CamelStore *store, gboolean offline, /* ** Prepare OFFLINE ***************************************************** */ -static char * +static gchar * prepare_offline_desc (struct _set_offline_msg *m) { - char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); - char *msg; + gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); + gchar *msg; msg = g_strdup_printf (_("Preparing account '%s' for offline"), service_name); g_free(service_name); @@ -2487,11 +2487,11 @@ static MailMsgInfo prepare_offline_info = { (MailMsgFreeFunc) prepare_offline_free }; -int +gint mail_store_prepare_offline (CamelStore *store) { struct _set_offline_msg *m; - int id; + gint id; /* Cancel any pending connect first so the set_offline_op * thread won't get queued behind a hung connect op. @@ -2511,7 +2511,7 @@ mail_store_prepare_offline (CamelStore *store) /* ** Execute Shell Command ***************************************************** */ void -mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data) +mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data) { if (argc <= 0) return; @@ -2523,12 +2523,12 @@ mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, vo struct _check_msg { MailMsg base; - char *url; + gchar *url; CamelProviderType type; GList *authtypes; - void (*done)(const char *url, CamelProviderType type, GList *types, void *data); - void *data; + void (*done)(const gchar *url, CamelProviderType type, GList *types, gpointer data); + gpointer data; }; static gchar * @@ -2574,11 +2574,11 @@ static MailMsgInfo check_service_info = { (MailMsgFreeFunc) check_service_free }; -int -mail_check_service(const char *url, CamelProviderType type, void (*done)(const char *url, CamelProviderType type, GList *authtypes, void *data), void *data) +gint +mail_check_service(const gchar *url, CamelProviderType type, void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data) { struct _check_msg *m; - int id; + gint id; m = mail_msg_new (&check_service_info); m->url = g_strdup(url); diff --git a/mail/mail-ops.h b/mail/mail-ops.h index 39905fb06c..12e8632f88 100644 --- a/mail/mail-ops.h +++ b/mail/mail-ops.h @@ -40,113 +40,113 @@ extern "C" { #include "libedataserver/e-account.h" void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info, - void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, - const char *appended_uid, void *data), - void *data); + void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, + const gchar *appended_uid, gpointer data), + gpointer data); void mail_transfer_messages (CamelFolder *source, GPtrArray *uids, gboolean delete_from_source, - const char *dest_uri, + const gchar *dest_uri, guint32 dest_flags, - void (*done) (gboolean ok, void *data), - void *data); + void (*done) (gboolean ok, gpointer data), + gpointer data); /* get a single message, asynchronously */ -void mail_get_message (CamelFolder *folder, const char *uid, - void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data), - void *data, +void mail_get_message (CamelFolder *folder, const gchar *uid, + void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch); CamelOperation * -mail_get_messagex(CamelFolder *folder, const char *uid, - void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *), - void *data, MailMsgDispatchFunc dispatch); +mail_get_messagex(CamelFolder *folder, const gchar *uid, + void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *), + gpointer data, MailMsgDispatchFunc dispatch); /* get several messages */ void mail_get_messages (CamelFolder *folder, GPtrArray *uids, - void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data), - void *data); + void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data), + gpointer data); /* same for a folder */ -int mail_get_folder (const char *uri, guint32 flags, - void (*done) (char *uri, CamelFolder *folder, void *data), void *data, +gint mail_get_folder (const gchar *uri, guint32 flags, + void (*done) (gchar *uri, CamelFolder *folder, gpointer data), gpointer data, MailMsgDispatchFunc dispatch); /* get quota information for a folder */ -int mail_get_folder_quota (CamelFolder *folder, - void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data), - void *data, MailMsgDispatchFunc dispatch); +gint mail_get_folder_quota (CamelFolder *folder, + void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data), + gpointer data, MailMsgDispatchFunc dispatch); /* and for a store */ -int mail_get_store (const char *uri, CamelOperation *op, - void (*done) (char *uri, CamelStore *store, void *data), void *data); +gint mail_get_store (const gchar *uri, CamelOperation *op, + void (*done) (gchar *uri, CamelStore *store, gpointer data), gpointer data); /* build an attachment */ void mail_build_attachment (CamelFolder *folder, GPtrArray *uids, void (*done)(CamelFolder *folder, GPtrArray *messages, - CamelMimePart *part, char *subject, void *data), - void *data); + CamelMimePart *part, gchar *subject, gpointer data), + gpointer data); void mail_sync_folder (CamelFolder *folder, - void (*done) (CamelFolder *folder, void *data), void *data); + void (*done) (CamelFolder *folder, gpointer data), gpointer data); -void mail_sync_store(CamelStore *store, int expunge, - void (*done) (CamelStore *store, void *data), void *data); +void mail_sync_store(CamelStore *store, gint expunge, + void (*done) (CamelStore *store, gpointer data), gpointer data); void mail_refresh_folder (CamelFolder *folder, - void (*done) (CamelFolder *folder, void *data), - void *data); + void (*done) (CamelFolder *folder, gpointer data), + gpointer data); void mail_expunge_folder (CamelFolder *folder, - void (*done) (CamelFolder *folder, void *data), - void *data); + void (*done) (CamelFolder *folder, gpointer data), + gpointer data); void mail_empty_trash (EAccount *account, - void (*done) (EAccount *account, void *data), - void *data); + void (*done) (EAccount *account, gpointer data), + gpointer data); /* get folder info asynchronously */ -int mail_get_folderinfo (CamelStore *store, CamelOperation *op, - gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), - void *data); +gint mail_get_folderinfo (CamelStore *store, CamelOperation *op, + gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), + gpointer data); /* remove an existing folder */ void mail_remove_folder (CamelFolder *folder, - void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data), - void *data); + void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data), + gpointer data); /* transfer (copy/move) a folder */ -void mail_xfer_folder (const char *src_uri, const char *dest_uri, gboolean remove_source, - void (*done) (char *src_uri, char *dest_uri, gboolean remove_source, - CamelFolder *folder, void *data), - void *data); +void mail_xfer_folder (const gchar *src_uri, const gchar *dest_uri, gboolean remove_source, + void (*done) (gchar *src_uri, gchar *dest_uri, gboolean remove_source, + CamelFolder *folder, gpointer data), + gpointer data); /* save messages */ -int mail_save_messages (CamelFolder *folder, GPtrArray *uids, const char *path, - void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data), - void *data); +gint mail_save_messages (CamelFolder *folder, GPtrArray *uids, const gchar *path, + void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data), + gpointer data); -int mail_save_part (CamelMimePart *part, const char *path, - void (*done)(CamelMimePart *part, char *path, int saved, void *data), - void *data, gboolean readonly); +gint mail_save_part (CamelMimePart *part, const gchar *path, + void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data), + gpointer data, gboolean readonly); /* yeah so this is messy, but it does a lot, maybe i can consolidate all user_data's to be the one */ -void mail_send_queue (CamelFolder *queue, const char *destination, - const char *type, CamelOperation *cancel, - CamelFilterGetFolderFunc get_folder, void *get_data, - CamelFilterStatusFunc *status, void *status_data, - void (*done)(const char *destination, void *data), - void *data); - -void mail_fetch_mail (const char *source, int keep, - const char *type, CamelOperation *cancel, - CamelFilterGetFolderFunc get_folder, void *get_data, - CamelFilterStatusFunc *status, void *status_data, - void (*done)(const char *source, void *data), - void *data); +void mail_send_queue (CamelFolder *queue, const gchar *destination, + const gchar *type, CamelOperation *cancel, + CamelFilterGetFolderFunc get_folder, gpointer get_data, + CamelFilterStatusFunc *status, gpointer status_data, + void (*done)(const gchar *destination, gpointer data), + gpointer data); + +void mail_fetch_mail (const gchar *source, gint keep, + const gchar *type, CamelOperation *cancel, + CamelFilterGetFolderFunc get_folder, gpointer get_data, + CamelFilterStatusFunc *status, gpointer status_data, + void (*done)(const gchar *source, gpointer data), + gpointer data); void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, - const char *type, gboolean notify, + const gchar *type, gboolean notify, CamelOperation *cancel); /* convenience functions for above */ @@ -154,19 +154,19 @@ void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids); void mail_filter_junk (CamelFolder *folder, GPtrArray *uids); /* Work Offline */ -void mail_prep_offline(const char *uri, CamelOperation *cancel, - void (*done)(const char *, void *data), - void *data); -int mail_store_set_offline(CamelStore *store, gboolean offline, - void (*done)(CamelStore *, void *data), - void *data); -int mail_store_prepare_offline (CamelStore *store); +void mail_prep_offline(const gchar *uri, CamelOperation *cancel, + void (*done)(const gchar *, gpointer data), + gpointer data); +gint mail_store_set_offline(CamelStore *store, gboolean offline, + void (*done)(CamelStore *, gpointer data), + gpointer data); +gint mail_store_prepare_offline (CamelStore *store); /* filter driver execute shell command async callback */ -void mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data); +void mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data); -int mail_check_service(const char *url, CamelProviderType type, - void (*done)(const char *url, CamelProviderType type, GList *authtypes, void *data), void *data); +gint mail_check_service(const gchar *url, CamelProviderType type, + void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data); #ifdef __cplusplus } diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index be834bb0d3..c6f7df9c2d 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -67,17 +67,17 @@ /* this stuff is used to keep track of which folders filters have accessed, and what not. the thaw/refreeze thing doesn't really seem to work though */ struct _folder_info { - char *uri; + gchar *uri; CamelFolder *folder; time_t update; - int count; /* how many times updated, to slow it down as we go, if we have lots */ + gint count; /* how many times updated, to slow it down as we go, if we have lots */ }; struct _send_data { GList *infos; GtkDialog *gd; - int cancelled; + gint cancelled; CamelFolder *inbox; /* since we're never asked to update this one, do it ourselves */ time_t inbox_update; @@ -104,24 +104,24 @@ typedef enum { struct _send_info { send_info_t type; /* 0 = fetch, 1 = send */ CamelOperation *cancel; - char *uri; + gchar *uri; gboolean keep_on_server; send_state_t state; GtkWidget *progress_bar; GtkWidget *cancel_button; GtkWidget *status_label; - int again; /* need to run send again */ + gint again; /* need to run send again */ - int timeout_id; - char *what; - int pc; + gint timeout_id; + gchar *what; + gint pc; /*time_t update;*/ struct _send_data *data; }; -static CamelFolder *receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex); +static CamelFolder *receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex); static struct _send_data *send_data = NULL; static GtkWidget *send_recv_dialog = NULL; @@ -207,13 +207,13 @@ free_send_data(void) } static void -cancel_send_info(void *key, struct _send_info *info, void *data) +cancel_send_info(gpointer key, struct _send_info *info, gpointer data) { receive_cancel (GTK_BUTTON (info->cancel_button), info); } static void -hide_send_info(void *key, struct _send_info *info, void *data) +hide_send_info(gpointer key, struct _send_info *info, gpointer data) { info->cancel_button = NULL; info->progress_bar = NULL; @@ -234,7 +234,7 @@ dialog_destroy_cb (struct _send_data *data, GObject *deadbeef) } static void -dialog_response(GtkDialog *gd, int button, struct _send_data *data) +dialog_response(GtkDialog *gd, gint button, struct _send_data *data) { switch(button) { case GTK_RESPONSE_CANCEL: @@ -255,7 +255,7 @@ dialog_response(GtkDialog *gd, int button, struct _send_data *data) } static int -operation_status_timeout(void *data) +operation_status_timeout(gpointer data) { struct _send_info *info = data; @@ -274,7 +274,7 @@ operation_status_timeout(void *data) } static void -set_send_status(struct _send_info *info, const char *desc, int pc) +set_send_status(struct _send_info *info, const gchar *desc, gint pc) { /* FIXME: LOCK */ g_free(info->what); @@ -284,7 +284,7 @@ set_send_status(struct _send_info *info, const char *desc, int pc) /* for camel operation status */ static void -operation_status(CamelOperation *op, const char *what, int pc, void *data) +operation_status(CamelOperation *op, const gchar *what, gint pc, gpointer data) { struct _send_info *info = data; @@ -301,11 +301,11 @@ operation_status(CamelOperation *op, const char *what, int pc, void *data) set_send_status(info, what, pc); } -static char * -format_url(const char *internal_url, const char *account_name) +static gchar * +format_url(const gchar *internal_url, const gchar *account_name) { CamelURL *url; - char *pretty_url; + gchar *pretty_url; url = camel_url_new(internal_url, NULL); if (account_name) { @@ -330,7 +330,7 @@ format_url(const char *internal_url, const char *account_name) } static send_info_t -get_receive_type(const char *url) +get_receive_type(const gchar *url) { CamelProvider *provider; CamelException ex; @@ -360,11 +360,11 @@ get_receive_type(const char *url) } static struct _send_data * -build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destination) +build_dialog (EAccountList *accounts, CamelFolder *outbox, const gchar *destination) { GtkDialog *gd; GtkWidget *table; - int row, num_sources; + gint row, num_sources; GList *list = NULL; struct _send_data *data; GtkWidget *send_icon; @@ -375,7 +375,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati GtkWidget *progress_bar; GtkWidget *cancel_button; struct _send_info *info; - char *pretty_url; + gchar *pretty_url; EAccount *account; EIterator *iter; EMEventTargetSendReceive *target; @@ -623,7 +623,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati } static void -update_folders(char *uri, struct _folder_info *info, void *data) +update_folders(gchar *uri, struct _folder_info *info, gpointer data) { time_t now = *((time_t *)data); @@ -641,7 +641,7 @@ update_folders(char *uri, struct _folder_info *info, void *data) } static void -receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, void *data) +receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, gint pc, const gchar *desc, gpointer data) { struct _send_info *info = data; time_t now = time(NULL); @@ -673,7 +673,7 @@ receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, in /* when receive/send is complete */ static void -receive_done (const gchar *uri, void *data) +receive_done (const gchar *uri, gpointer data) { struct _send_info *info = data; @@ -731,7 +731,7 @@ receive_done (const gchar *uri, void *data) This can also be used to hook into which folders are being updated, and occasionally let them refresh */ static CamelFolder * -receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex) +receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex) { struct _send_info *info = data; CamelFolder *folder; @@ -809,7 +809,7 @@ refresh_folders_desc (struct _refresh_folders_msg *m) static void refresh_folders_exec (struct _refresh_folders_msg *m) { - int i; + gint i; CamelFolder *folder; CamelException ex = CAMEL_EXCEPTION_INITIALISER; @@ -842,7 +842,7 @@ refresh_folders_done (struct _refresh_folders_msg *m) static void refresh_folders_free (struct _refresh_folders_msg *m) { - int i; + gint i; for (i=0;i<m->folders->len;i++) g_free(m->folders->pdata[i]); @@ -861,7 +861,7 @@ static MailMsgInfo refresh_folders_info = { }; static gboolean -receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *data) +receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, gpointer data) { if (info) { GPtrArray *folders = g_ptr_array_new(); @@ -887,7 +887,7 @@ receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *da } static void -receive_update_got_store (char *uri, CamelStore *store, void *data) +receive_update_got_store (gchar *uri, CamelStore *store, gpointer data) { struct _send_info *info = data; @@ -962,14 +962,14 @@ mail_send_receive (void) struct _auto_data { EAccount *account; - int period; /* in seconds */ - int timeout_id; + gint period; /* in seconds */ + gint timeout_id; }; static GHashTable *auto_active; static gboolean -auto_timeout(void *data) +auto_timeout(gpointer data) { struct _auto_data *info = data; @@ -988,7 +988,7 @@ auto_timeout(void *data) } static void -auto_account_removed(EAccountList *eal, EAccount *ea, void *dummy) +auto_account_removed(EAccountList *eal, EAccount *ea, gpointer dummy) { struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive"); @@ -1011,7 +1011,7 @@ auto_account_finalised(struct _auto_data *info) static void auto_account_commit(struct _auto_data *info) { - int period, check; + gint period, check; check = info->account->enabled && e_account_get_bool(info->account, E_ACCOUNT_SOURCE_AUTO_CHECK) @@ -1031,7 +1031,7 @@ auto_account_commit(struct _auto_data *info) } static void -auto_account_added(EAccountList *eal, EAccount *ea, void *dummy) +auto_account_added(EAccountList *eal, EAccount *ea, gpointer dummy) { struct _auto_data *info; @@ -1042,7 +1042,7 @@ auto_account_added(EAccountList *eal, EAccount *ea, void *dummy) } static void -auto_account_changed(EAccountList *eal, EAccount *ea, void *dummy) +auto_account_changed(EAccountList *eal, EAccount *ea, gpointer dummy) { struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive"); @@ -1052,7 +1052,7 @@ auto_account_changed(EAccountList *eal, EAccount *ea, void *dummy) } static void -auto_online(CamelObject *o, void *ed, void *d) +auto_online(CamelObject *o, gpointer ed, gpointer d) { EIterator *iter; EAccountList *accounts; diff --git a/mail/mail-session.c b/mail/mail-session.c index d9e34ccff4..96b4edf574 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -60,7 +60,7 @@ #define d(x) CamelSession *session; -static int session_check_junk_notify_id = -1; +static gint session_check_junk_notify_id = -1; #define MAIL_SESSION_TYPE (mail_session_get_type ()) #define MAIL_SESSION(obj) (CAMEL_CHECK_CAST((obj), MAIL_SESSION_TYPE, MailSession)) @@ -84,16 +84,16 @@ typedef struct _MailSessionClass { static CamelSessionClass *ms_parent_class; -static char *get_password(CamelSession *session, CamelService *service, const char *domain, const char *prompt, const char *item, guint32 flags, CamelException *ex); -static void forget_password(CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex); -static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel); -static CamelFilterDriver *get_filter_driver(CamelSession *session, const char *type, CamelException *ex); -static gboolean lookup_addressbook(CamelSession *session, const char *name); +static gchar *get_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *prompt, const gchar *item, guint32 flags, CamelException *ex); +static void forget_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, CamelException *ex); +static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel); +static CamelFilterDriver *get_filter_driver(CamelSession *session, const gchar *type, CamelException *ex); +static gboolean lookup_addressbook(CamelSession *session, const gchar *name); -static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc); -static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size); +static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc); +static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size); static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m); -static void ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex); +static void ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex); static void init (MailSession *session) @@ -150,10 +150,10 @@ mail_session_get_type (void) } -static char * -make_key (CamelService *service, const char *item) +static gchar * +make_key (CamelService *service, const gchar *item) { - char *key; + gchar *key; if (service) key = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); @@ -165,12 +165,12 @@ make_key (CamelService *service, const char *item) /* ********************************************************************** */ -static char * -get_password (CamelSession *session, CamelService *service, const char *domain, - const char *prompt, const char *item, guint32 flags, CamelException *ex) +static gchar * +get_password (CamelSession *session, CamelService *service, const gchar *domain, + const gchar *prompt, const gchar *item, guint32 flags, CamelException *ex) { - char *url; - char *ret = NULL; + gchar *url; + gchar *ret = NULL; EAccount *account = NULL; url = service?camel_url_to_string(service->url, CAMEL_URL_HIDE_ALL):NULL; @@ -183,7 +183,7 @@ get_password (CamelSession *session, CamelService *service, const char *domain, else ret = g_strdup(url); } else { - char *key = make_key(service, item); + gchar *key = make_key(service, item); EAccountService *config_service = NULL; if (domain == NULL) @@ -204,7 +204,7 @@ get_password (CamelSession *session, CamelService *service, const char *domain, if (!config_service || (config_service && !config_service->get_password_canceled)) { guint32 eflags; - char *title; + gchar *title; if (flags & CAMEL_SESSION_PASSPHRASE) { if (account) @@ -263,9 +263,9 @@ get_password (CamelSession *session, CamelService *service, const char *domain, } static void -forget_password (CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex) +forget_password (CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, CamelException *ex) { - char *key = make_key (service, item); + gchar *key = make_key (service, item); e_passwords_forget_password (domain?domain:"Mail", key); g_free (key); @@ -280,18 +280,18 @@ struct _user_message_msg { MailMsg base; CamelSessionAlertType type; - char *prompt; + gchar *prompt; EFlag *done; - unsigned int allow_cancel:1; - unsigned int result:1; - unsigned int ismain:1; + guint allow_cancel:1; + guint result:1; + guint ismain:1; }; static void user_message_exec (struct _user_message_msg *m); static void -user_message_response_free (GtkDialog *dialog, int button, struct _user_message_msg *m) +user_message_response_free (GtkDialog *dialog, gint button, struct _user_message_msg *m) { gtk_widget_destroy ((GtkWidget *) dialog); @@ -307,7 +307,7 @@ user_message_response_free (GtkDialog *dialog, int button, struct _user_message_ /* clicked, send back the reply */ static void -user_message_response (GtkDialog *dialog, int button, struct _user_message_msg *m) +user_message_response (GtkDialog *dialog, gint button, struct _user_message_msg *m) { /* if !allow_cancel, then we've already replied */ if (m->allow_cancel) { @@ -398,7 +398,7 @@ static MailMsgInfo user_message_info = { }; static gboolean -lookup_addressbook(CamelSession *session, const char *name) +lookup_addressbook(CamelSession *session, const gchar *name) { CamelInternetAddress *addr; gboolean ret; @@ -415,7 +415,7 @@ lookup_addressbook(CamelSession *session, const char *name) } static gboolean -alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel) +alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel) { MailSession *mail_session = MAIL_SESSION (session); struct _user_message_msg *m; @@ -452,13 +452,13 @@ alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt } static CamelFolder * -get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *ex) +get_folder (CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex) { return mail_tool_uri_to_folder(uri, 0, ex); } static void -main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data) +main_play_sound (CamelFilterDriver *driver, gchar *filename, gpointer user_data) { if (filename && *filename) gnome_sound_play (filename); @@ -470,7 +470,7 @@ main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data) } static void -session_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data) +session_play_sound (CamelFilterDriver *driver, const gchar *filename, gpointer user_data) { MailSession *ms = (MailSession *) session; @@ -499,11 +499,11 @@ session_system_beep (CamelFilterDriver *driver, gpointer user_data) } static CamelFilterDriver * -main_get_filter_driver (CamelSession *session, const char *type, CamelException *ex) +main_get_filter_driver (CamelSession *session, const gchar *type, CamelException *ex) { CamelFilterDriver *driver; FilterRule *rule = NULL; - char *user, *system; + gchar *user, *system; GConfClient *gconf; RuleContext *fc; @@ -523,7 +523,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException MailSession *ms = (MailSession *) session; if (ms->filter_logfile == NULL) { - char *filename; + gchar *filename; filename = gconf_client_get_string (gconf, "/apps/evolution/mail/filters/logfile", NULL); if (filename) { @@ -579,7 +579,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException } static CamelFilterDriver * -get_filter_driver (CamelSession *session, const char *type, CamelException *ex) +get_filter_driver (CamelSession *session, const gchar *type, CamelException *ex) { return (CamelFilterDriver *) mail_call_main (MAIL_CALL_p_ppp, (MailMainFunc) main_get_filter_driver, session, type, ex); @@ -590,7 +590,7 @@ get_filter_driver (CamelSession *session, const char *type, CamelException *ex) static MailMsgInfo ms_thread_info_dummy = { sizeof (MailMsg) }; -static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size) +static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size) { CamelSessionThreadMsg *msg = ms_parent_class->thread_msg_new(session, ops, size); @@ -614,14 +614,14 @@ static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m) ms_parent_class->thread_msg_free(session, m); } -static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc) +static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc) { /* This should never be called since we bypass it in alloc! */ printf("Thread status '%s' %d%%\n", text, pc); } static void -ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex) +ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex) { g_return_if_fail (session != NULL); g_return_if_fail (message != NULL); @@ -630,12 +630,12 @@ ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *mes em_utils_forward_message_raw (folder, message, address, ex); } -char * -mail_session_get_password (const char *url_string) +gchar * +mail_session_get_password (const gchar *url_string) { CamelURL *url; - char *simple_url; - char *passwd; + gchar *simple_url; + gchar *passwd; url = camel_url_new (url_string, NULL); simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); @@ -649,11 +649,11 @@ mail_session_get_password (const char *url_string) } void -mail_session_add_password (const char *url_string, - const char *passwd) +mail_session_add_password (const gchar *url_string, + const gchar *passwd) { CamelURL *url; - char *simple_url; + gchar *simple_url; url = camel_url_new (url_string, NULL); simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); @@ -665,10 +665,10 @@ mail_session_add_password (const char *url_string, } void -mail_session_remember_password (const char *url_string) +mail_session_remember_password (const gchar *url_string) { CamelURL *url; - char *simple_url; + gchar *simple_url; url = camel_url_new (url_string, NULL); simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); @@ -680,7 +680,7 @@ mail_session_remember_password (const char *url_string) } void -mail_session_forget_password (const char *key) +mail_session_forget_password (const gchar *key) { e_passwords_forget_password ("Mail", key); } @@ -702,9 +702,9 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry, } void -mail_session_init (const char *base_directory) +mail_session_init (const gchar *base_directory) { - char *camel_dir; + gchar *camel_dir; GConfClient *gconf; if (camel_init (base_directory, TRUE) != 0) @@ -773,8 +773,8 @@ mail_session_set_interactive (gboolean interactive) } void -mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data, - const char *path) +mail_session_forget_passwords (BonoboUIComponent *uih, gpointer user_data, + const gchar *path) { e_passwords_forget_passwords (); } @@ -789,11 +789,11 @@ mail_session_flush_filter_log (void) } void -mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plugin) +mail_session_add_junk_plugin (const gchar *plugin_name, CamelJunkPlugin *junk_plugin) { MailSession *ms = (MailSession *) session; GConfClient *gconf; - char *def_plugin; + gchar *def_plugin; gconf = mail_config_get_gconf_client (); def_plugin = gconf_client_get_string (gconf, "/apps/evolution/mail/junk/default_plugin", NULL); @@ -818,7 +818,7 @@ mail_session_get_junk_plugins (void) } void -mail_session_set_junk_headers (const char **name, const char **value, int len) +mail_session_set_junk_headers (const gchar **name, const gchar **value, gint len) { if (!session) return; diff --git a/mail/mail-session.h b/mail/mail-session.h index 60d6b9ab2a..d0595ba548 100644 --- a/mail/mail-session.h +++ b/mail/mail-session.h @@ -32,28 +32,28 @@ extern "C" { #pragma } #endif /* __cplusplus */ -void mail_session_init (const char *base_directory); +void mail_session_init (const gchar *base_directory); void mail_session_shutdown (void); gboolean mail_session_get_interactive (void); void mail_session_set_interactive (gboolean interactive); -char *mail_session_request_dialog (const char *prompt, gboolean secret, - const char *key, gboolean async); -gboolean mail_session_accept_dialog (const char *prompt, const char *key, +gchar *mail_session_request_dialog (const gchar *prompt, gboolean secret, + const gchar *key, gboolean async); +gboolean mail_session_accept_dialog (const gchar *prompt, const gchar *key, gboolean async); -char *mail_session_get_password (const char *url); -void mail_session_add_password (const char *url, const char *passwd); -void mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data, - const char *path); -void mail_session_remember_password (const char *url); +gchar *mail_session_get_password (const gchar *url); +void mail_session_add_password (const gchar *url, const gchar *passwd); +void mail_session_forget_passwords (BonoboUIComponent *uih, gpointer user_data, + const gchar *path); +void mail_session_remember_password (const gchar *url); -void mail_session_forget_password (const char *key); +void mail_session_forget_password (const gchar *key); void mail_session_flush_filter_log (void); -void mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plugin); +void mail_session_add_junk_plugin (const gchar *plugin_name, CamelJunkPlugin *junk_plugin); const GList * mail_session_get_junk_plugins (void); -void mail_session_set_junk_headers (const char **name, const char **value, int len); +void mail_session_set_junk_headers (const gchar **name, const gchar **value, gint len); extern CamelSession *session; diff --git a/mail/mail-tools.c b/mail/mail-tools.c index a256e7e107..33c47462f9 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -78,7 +78,7 @@ mail_tool_get_inbox (const gchar *url, CamelException *ex) } CamelFolder * -mail_tool_get_trash (const gchar *url, int connect, CamelException *ex) +mail_tool_get_trash (const gchar *url, gint connect, CamelException *ex) { CamelStore *store; CamelFolder *trash; @@ -103,14 +103,14 @@ mail_tool_get_trash (const gchar *url, int connect, CamelException *ex) #ifndef G_OS_WIN32 -static char * -mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex) +static gchar * +mail_tool_get_local_movemail_path (const guchar *uri, CamelException *ex) { - unsigned char *safe_uri, *c; - char *path, *full; + guchar *safe_uri, *c; + gchar *path, *full; struct stat st; - safe_uri = (unsigned char *)g_strdup ((const gchar *)uri); + safe_uri = (guchar *)g_strdup ((const gchar *)uri); for (c = safe_uri; *c; c++) if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((int) *c)) *c = '_'; @@ -132,11 +132,11 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex) #endif -char * -mail_tool_do_movemail (const char *source_url, CamelException *ex) +gchar * +mail_tool_do_movemail (const gchar *source_url, CamelException *ex) { #ifndef G_OS_WIN32 - char *dest_path; + gchar *dest_path; struct stat sb; CamelURL *uri; @@ -154,7 +154,7 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex) } /* Set up our destination. */ - dest_path = mail_tool_get_local_movemail_path ((unsigned char *)source_url, ex); + dest_path = mail_tool_get_local_movemail_path ((guchar *)source_url, ex); if (dest_path == NULL) return NULL; @@ -183,12 +183,12 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex) #endif } -char * +gchar * mail_tool_generate_forward_subject (CamelMimeMessage *msg) { - const char *subject; - char *fwd_subj; - const int max_subject_length = 1024; + const gchar *subject; + gchar *fwd_subj; + const gint max_subject_length = 1024; subject = camel_mime_message_get_subject(msg); @@ -207,7 +207,7 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg) } } else { const CamelInternetAddress *from; - char *fromstr; + gchar *fromstr; from = camel_mime_message_get_from (msg); if (from) { @@ -247,9 +247,9 @@ CamelMimePart * mail_tool_make_message_attachment (CamelMimeMessage *message) { CamelMimePart *part; - const char *subject; + const gchar *subject; struct _camel_header_raw *xev; - char *desc; + gchar *desc; subject = camel_mime_message_get_subject (message); if (subject) @@ -276,13 +276,13 @@ mail_tool_make_message_attachment (CamelMimeMessage *message) } CamelFolder * -mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex) +mail_tool_uri_to_folder (const gchar *uri, guint32 flags, CamelException *ex) { CamelURL *url; CamelStore *store = NULL; CamelFolder *folder = NULL; - int offset = 0; - char *curi = NULL; + gint offset = 0; + gchar *curi = NULL; g_return_val_if_fail (uri != NULL, NULL); @@ -309,7 +309,7 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex) store = (CamelStore *)camel_session_get_service(session, uri+offset, CAMEL_PROVIDER_STORE, ex); if (store) { - const char *name; + const gchar *name; /* if we have a fragment, then the path is actually used by the store, so the fragment is the path to the folder instead */ @@ -351,10 +351,10 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex) * UIDs specified by the selection. **/ CamelFolder * -mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids) +mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids) { /* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */ - char *inptr, *inend; + gchar *inptr, *inend; CamelFolder *folder; if (in == NULL) @@ -370,7 +370,7 @@ mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray ** inptr = in + strlen (in) + 1; *uids = g_ptr_array_new (); while (inptr < inend) { - char *start = inptr; + gchar *start = inptr; while (inptr < inend && *inptr) inptr++; @@ -383,11 +383,11 @@ mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray ** } /* FIXME: This should be a property on CamelFolder */ -char * +gchar * mail_tools_folder_to_url (CamelFolder *folder) { CamelURL *url; - char *out; + gchar *out; g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL); @@ -395,7 +395,7 @@ mail_tools_folder_to_url (CamelFolder *folder) if (((CamelService *)folder->parent_store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) { camel_url_set_fragment(url, folder->full_name); } else { - char *name = g_alloca(strlen(folder->full_name)+2); + gchar *name = g_alloca(strlen(folder->full_name)+2); sprintf(name, "/%s", folder->full_name); camel_url_set_path(url, name); diff --git a/mail/mail-tools.h b/mail/mail-tools.h index 1590636e5c..11e7c87dcd 100644 --- a/mail/mail-tools.h +++ b/mail/mail-tools.h @@ -32,14 +32,14 @@ struct _CamelMimePart; struct _camel_header_raw; /* Get the "inbox" for a url (uses global session) */ -struct _CamelFolder *mail_tool_get_inbox (const char *url, struct _CamelException *ex); +struct _CamelFolder *mail_tool_get_inbox (const gchar *url, struct _CamelException *ex); /* Get the "trash" for a url (uses global session) */ -struct _CamelFolder *mail_tool_get_trash (const char *url, int connect, struct _CamelException *ex); +struct _CamelFolder *mail_tool_get_trash (const gchar *url, gint connect, struct _CamelException *ex); /* Does a camel_movemail into the local movemail folder * and returns the path to the new movemail folder that was created. which shoudl be freed later */ -char *mail_tool_do_movemail (const char *source_url, struct _CamelException *ex); +gchar *mail_tool_do_movemail (const gchar *source_url, struct _CamelException *ex); struct _camel_header_raw *mail_tool_remove_xevolution_headers (struct _CamelMimeMessage *message); void mail_tool_restore_xevolution_headers (struct _CamelMimeMessage *message, struct _camel_header_raw *); @@ -51,12 +51,12 @@ gchar *mail_tool_generate_forward_subject (struct _CamelMimeMessage *msg); struct _CamelMimePart *mail_tool_make_message_attachment (struct _CamelMimeMessage *message); /* Parse the ui into a real struct _CamelFolder any way we know how. */ -struct _CamelFolder *mail_tool_uri_to_folder (const char *uri, guint32 flags, struct _CamelException *ex); +struct _CamelFolder *mail_tool_uri_to_folder (const gchar *uri, guint32 flags, struct _CamelException *ex); GHashTable *mail_lookup_url_table (struct _CamelMimeMessage *mime_message); -struct _CamelFolder *mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids); +struct _CamelFolder *mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids); -char *mail_tools_folder_to_url (struct _CamelFolder *folder); +gchar *mail_tools_folder_to_url (struct _CamelFolder *folder); #endif diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index aab8625807..5014594a00 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -63,7 +63,7 @@ static GList *source_folders_local; /* list of source folder uri's - local ones static GHashTable *vfolder_hash; /* This is a slightly hacky solution to shutting down, we poll this variable in various loops, and just quit processing if it is set. */ -static volatile int shutdown; /* are we shutting down? */ +static volatile gint shutdown; /* are we shutting down? */ /* more globals ... */ extern CamelSession *session; @@ -78,7 +78,7 @@ struct _setup_msg { MailMsg base; CamelFolder *folder; - char *query; + gchar *query; GList *sources_uri; GList *sources_folder; }; @@ -101,13 +101,13 @@ vfolder_setup_exec (struct _setup_msg *m) l = m->sources_uri; while (l && !shutdown) { - d(printf(" Adding uri: %s\n", (char *)l->data)); + d(printf(" Adding uri: %s\n", (gchar *)l->data)); folder = mail_tool_uri_to_folder (l->data, 0, &m->base.ex); if (folder) { list = g_list_append(list, folder); } else { - g_warning("Could not open vfolder source: %s", (char *)l->data); + g_warning("Could not open vfolder source: %s", (gchar *)l->data); camel_exception_clear(&m->base.ex); } l = l->next; @@ -170,10 +170,10 @@ static MailMsgInfo vfolder_setup_info = { /* sources_uri should be camel uri's */ static int -vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList *sources_folder) +vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder) { struct _setup_msg *m; - int id; + gint id; m = mail_msg_new(&vfolder_setup_info); m->folder = folder; @@ -193,15 +193,15 @@ vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList struct _adduri_msg { MailMsg base; - char *uri; + gchar *uri; GList *folders; - int remove; + gint remove; }; static gchar * vfolder_adduri_desc (struct _adduri_msg *m) { - char *euri, *desc = NULL; + gchar *euri, *desc = NULL; /* Yuck yuck. Lookup the account name and use that to describe the path */ /* We really need to normalise this across all of camel and evolution :-/ */ @@ -210,13 +210,13 @@ vfolder_adduri_desc (struct _adduri_msg *m) CamelURL *url = camel_url_new(euri, NULL); if (url) { - const char *loc = NULL; + const gchar *loc = NULL; if (url->host && !strcmp(url->host, "local") && url->user && !strcmp(url->user, "local")) { loc = _("On This Computer"); } else { - char *uid; + gchar *uid; const EAccount *account; if (url->user == NULL) @@ -301,10 +301,10 @@ static MailMsgInfo vfolder_adduri_info = { /* uri should be a camel uri */ static int -vfolder_adduri(const char *uri, GList *folders, int remove) +vfolder_adduri(const gchar *uri, GList *folders, gint remove) { struct _adduri_msg *m; - int id; + gint id; m = mail_msg_new(&vfolder_adduri_info); m->folders = folders; @@ -320,7 +320,7 @@ vfolder_adduri(const char *uri, GList *folders, int remove) /* ********************************************************************** */ static GList * -mv_find_folder(GList *l, CamelStore *store, const char *uri) +mv_find_folder(GList *l, CamelStore *store, const gchar *uri) { while (l) { if (camel_store_folder_uri_equal(store, l->data, uri)) @@ -332,12 +332,12 @@ mv_find_folder(GList *l, CamelStore *store, const char *uri) /* uri is a camel uri */ static int -uri_is_ignore(CamelStore *store, const char *uri) +uri_is_ignore(CamelStore *store, const gchar *uri) { EAccountList *accounts; EAccount *account; EIterator *iter; - int found = FALSE; + gint found = FALSE; d(printf("checking '%s' against:\n %s\n %s\n %s\n", uri, mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_OUTBOX), @@ -354,7 +354,7 @@ uri_is_ignore(CamelStore *store, const char *uri) accounts = mail_config_get_accounts (); iter = e_list_get_iterator ((EList *) accounts); while (e_iterator_is_valid (iter)) { - char *curi; + gchar *curi; account = (EAccount *) e_iterator_get (iter); @@ -385,10 +385,10 @@ uri_is_ignore(CamelStore *store, const char *uri) /* so special we never use it */ static int -uri_is_spethal(CamelStore *store, const char *uri) +uri_is_spethal(CamelStore *store, const gchar *uri) { CamelURL *url; - int res; + gint res; /* This is a bit of a hack, but really the only way it can be done at the moment. */ @@ -420,15 +420,15 @@ uri_is_spethal(CamelStore *store, const char *uri) /* called when a new uri becomes (un)available */ void -mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove) +mail_vfolder_add_uri(CamelStore *store, const gchar *curi, gint remove) { FilterRule *rule; - const char *source; + const gchar *source; CamelVeeFolder *vf; GList *folders = NULL, *link; - int remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0; - int is_ignore; - char *uri; + gint remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0; + gint is_ignore; + gchar *uri; uri = em_uri_from_camel(curi); if (uri_is_spethal (store, curi)) { @@ -475,7 +475,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove) rule = NULL; while ((rule = rule_context_next_rule((RuleContext *)context, rule, NULL))) { - int found = FALSE; + gint found = FALSE; if (!rule->name) { d(printf("invalid rule (%p): rule->name is set to NULL\n", rule)); @@ -491,7 +491,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove) source = NULL; while (!found && (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source))) { - char *csource; + gchar *csource; csource = em_uri_to_camel(source); found = camel_store_folder_uri_equal(store, curi, csource); d(printf(found?" '%s' == '%s'?\n":" '%s' != '%s'\n", curi, csource)); @@ -520,13 +520,13 @@ done: /* called when a uri is deleted from a store */ void -mail_vfolder_delete_uri(CamelStore *store, const char *curi) +mail_vfolder_delete_uri(CamelStore *store, const gchar *curi) { FilterRule *rule; - const char *source; + const gchar *source; CamelVeeFolder *vf; GString *changed; - char *uri; + gchar *uri; GList *link; if (uri_is_spethal (store, curi)) @@ -556,7 +556,7 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi) source = NULL; while ((source = em_vfolder_rule_next_source ((EMVFolderRule *) rule, source))) { - char *csource = em_uri_to_camel(source); + gchar *csource = em_uri_to_camel(source); /* Remove all sources that match, ignore changed events though because the adduri call above does the work async */ @@ -592,7 +592,7 @@ done: if (changed->str[0]) { GtkWidget *dialog; - char *user; + gchar *user; dialog = e_error_new(NULL, "mail:vfolder-updated", changed->str, uri, NULL); em_utils_show_info_silent (dialog); @@ -610,13 +610,13 @@ done: /* called when a uri is renamed in a store */ void -mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto) +mail_vfolder_rename_uri(CamelStore *store, const gchar *cfrom, const gchar *cto) { FilterRule *rule; - const char *source; + const gchar *source; CamelVeeFolder *vf; - int changed = 0; - char *from, *to; + gint changed = 0; + gchar *from, *to; d(printf("vfolder rename uri: %s to %s\n", cfrom, cto)); @@ -635,7 +635,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto) while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) { source = NULL; while ( (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source)) ) { - char *csource = em_uri_to_camel(source); + gchar *csource = em_uri_to_camel(source); /* Remove all sources that match, ignore changed events though because the adduri call above does the work async */ @@ -661,7 +661,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto) UNLOCK(); if (changed) { - char *user; + gchar *user; d(printf("Vfolders updated from renamed folder\n")); user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ())); @@ -697,7 +697,7 @@ rule_add_sources(GList *l, GList **sources_folderp, GList **sources_urip) CamelFolder *newfolder; while (l) { - char *curi = em_uri_to_camel(l->data); + gchar *curi = em_uri_to_camel(l->data); if (mail_note_get_folder_from_uri(curi, &newfolder)) { if (newfolder) @@ -721,7 +721,7 @@ rule_changed(FilterRule *rule, CamelFolder *folder) /* if the folder has changed name, then add it, then remove the old manually */ if (strcmp(folder->full_name, rule->name) != 0) { - char *oldname; + gchar *oldname; gpointer key; gpointer oldfolder; @@ -785,7 +785,7 @@ static void context_rule_added(RuleContext *ctx, FilterRule *rule) static void context_rule_removed(RuleContext *ctx, FilterRule *rule) { - char *path; + gchar *path; gpointer key, folder = NULL; @@ -814,7 +814,7 @@ static void context_rule_removed(RuleContext *ctx, FilterRule *rule) } static void -store_folder_created(CamelObject *o, void *event_data, void *data) +store_folder_created(CamelObject *o, gpointer event_data, gpointer data) { CamelStore *store = (CamelStore *)o; CamelFolderInfo *info = event_data; @@ -824,12 +824,12 @@ store_folder_created(CamelObject *o, void *event_data, void *data) } static void -store_folder_deleted(CamelObject *o, void *event_data, void *data) +store_folder_deleted(CamelObject *o, gpointer event_data, gpointer data) { CamelStore *store = (CamelStore *)o; CamelFolderInfo *info = event_data; FilterRule *rule; - char *user; + gchar *user; d(printf("Folder deleted: %s\n", info->name)); store = store; @@ -859,11 +859,11 @@ store_folder_deleted(CamelObject *o, void *event_data, void *data) } static void -store_folder_renamed(CamelObject *o, void *event_data, void *data) +store_folder_renamed(CamelObject *o, gpointer event_data, gpointer data) { CamelRenameInfo *info = event_data; FilterRule *rule; - char *user; + gchar *user; gpointer key, folder; @@ -908,9 +908,9 @@ vfolder_load_storage(void) /* lock for loading storage, it is safe to call it more than once */ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; - char *user, *storeuri; + gchar *user, *storeuri; FilterRule *rule; - char *xmlfile; + gchar *xmlfile; GConfClient *gconf; pthread_mutex_lock (&lock); @@ -982,7 +982,7 @@ vfolder_load_storage(void) void vfolder_revert(void) { - char *user; + gchar *user; d(printf("vfolder_revert\n")); user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ())); @@ -993,9 +993,9 @@ vfolder_revert(void) static GtkWidget *vfolder_editor = NULL; static void -em_vfolder_editor_response (GtkWidget *dialog, int button, void *data) +em_vfolder_editor_response (GtkWidget *dialog, gint button, gpointer data) { - char *user; + gchar *user; user = g_strdup_printf ("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ())); @@ -1033,10 +1033,10 @@ vfolder_edit (void) } static void -edit_rule_response(GtkWidget *w, int button, void *data) +edit_rule_response(GtkWidget *w, gint button, gpointer data) { if (button == GTK_RESPONSE_OK) { - char *user; + gchar *user; FilterRule *rule = g_object_get_data (G_OBJECT (w), "rule"); FilterRule *orig = g_object_get_data (G_OBJECT (w), "orig"); @@ -1050,7 +1050,7 @@ edit_rule_response(GtkWidget *w, int button, void *data) } void -vfolder_edit_rule(const char *uri) +vfolder_edit_rule(const gchar *uri) { GtkWidget *w; GtkDialog *gd; @@ -1095,10 +1095,10 @@ vfolder_edit_rule(const char *uri) } static void -new_rule_clicked(GtkWidget *w, int button, void *data) +new_rule_clicked(GtkWidget *w, gint button, gpointer data) { if (button == GTK_RESPONSE_OK) { - char *user; + gchar *user; FilterRule *rule = g_object_get_data((GObject *)w, "rule"); if (!filter_rule_validate(rule)) { @@ -1123,7 +1123,7 @@ new_rule_clicked(GtkWidget *w, int button, void *data) } FilterPart * -vfolder_create_part(const char *name) +vfolder_create_part(const gchar *name) { return rule_context_create_part((RuleContext *)context, name); } @@ -1175,7 +1175,7 @@ vfolder_gui_add_rule(EMVFolderRule *rule) } void -vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *source) +vfolder_gui_add_from_message(CamelMimeMessage *msg, gint flags, const gchar *source) { EMVFolderRule *rule; @@ -1189,7 +1189,7 @@ vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *sourc } void -vfolder_gui_add_from_address(CamelInternetAddress *addr, int flags, const char *source) +vfolder_gui_add_from_address(CamelInternetAddress *addr, gint flags, const gchar *source) { EMVFolderRule *rule; diff --git a/mail/mail-vfolder.h b/mail/mail-vfolder.h index 002541371f..9eb1f85ac2 100644 --- a/mail/mail-vfolder.h +++ b/mail/mail-vfolder.h @@ -33,24 +33,24 @@ void vfolder_load_storage(void); void vfolder_revert(void); void vfolder_edit (void); -void vfolder_edit_rule(const char *name); -struct _FilterPart *vfolder_create_part (const char *name); +void vfolder_edit_rule(const gchar *name); +struct _FilterPart *vfolder_create_part (const gchar *name); struct _FilterRule *vfolder_clone_rule (struct _FilterRule *in); void vfolder_gui_add_rule (struct _EMVFolderRule *rule); -void vfolder_gui_add_from_message (struct _CamelMimeMessage *msg, int flags, const char *source); -void vfolder_gui_add_from_address (struct _CamelInternetAddress *addr, int flags, const char *source); +void vfolder_gui_add_from_message (struct _CamelMimeMessage *msg, gint flags, const gchar *source); +void vfolder_gui_add_from_address (struct _CamelInternetAddress *addr, gint flags, const gchar *source); GList * mail_vfolder_get_sources_local (void); GList * mail_vfolder_get_sources_remote (void); /* add a uri that is now (un)available to vfolders in a transient manner */ -void mail_vfolder_add_uri(struct _CamelStore *store, const char *uri, int remove); +void mail_vfolder_add_uri(struct _CamelStore *store, const gchar *uri, gint remove); /* note that a folder has changed name (uri) */ -void mail_vfolder_rename_uri(struct _CamelStore *store, const char *from, const char *to); +void mail_vfolder_rename_uri(struct _CamelStore *store, const gchar *from, const gchar *to); /* remove a uri that should be removed from vfolders permanently */ -void mail_vfolder_delete_uri(struct _CamelStore *store, const char *uri); +void mail_vfolder_delete_uri(struct _CamelStore *store, const gchar *uri); /* close up, clean up */ void mail_vfolder_shutdown (void); diff --git a/mail/message-list.c b/mail/message-list.c index 09f080cae0..a5a344f4e5 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -100,7 +100,7 @@ struct _MLSelection { GPtrArray *uids; CamelFolder *folder; - char *folder_uri; + gchar *folder_uri; }; struct _MessageListPrivate { @@ -178,7 +178,7 @@ enum { #ifdef SMART_ADDRESS_COMPARE struct _EMailAddress { ENameWestern *wname; - char *address; + gchar *address; }; typedef struct _EMailAddress EMailAddress; @@ -186,11 +186,11 @@ typedef struct _EMailAddress EMailAddress; G_DEFINE_TYPE (MessageList, message_list, E_TREE_SCROLLED_TYPE) -static void on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data); +static void on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data); static void on_selection_changed_cmd(ETree *tree, MessageList *ml); static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list); -static char *filter_date (time_t date); -static char *filter_size (int size); +static gchar *filter_date (time_t date); +static gchar *filter_size (gint size); static void folder_changed (CamelObject *o, gpointer event_data, gpointer user_data); @@ -198,11 +198,11 @@ static void save_hide_state(MessageList *ml); static void load_hide_state(MessageList *ml); /* note: @changes is owned/freed by the caller */ -/*static void mail_do_regenerate_messagelist (MessageList *list, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);*/ -static void mail_regen_list(MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes); +/*static void mail_do_regenerate_messagelist (MessageList *list, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);*/ +static void mail_regen_list(MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes); static void mail_regen_cancel(MessageList *ml); -static void clear_info(char *key, ETreePath *node, MessageList *ml); +static void clear_info(gchar *key, ETreePath *node, MessageList *ml); enum { MESSAGE_SELECTED, @@ -243,11 +243,11 @@ static gboolean junk_folder = TRUE; #ifdef SMART_ADDRESS_COMPARE static EMailAddress * -e_mail_address_new (const char *address) +e_mail_address_new (const gchar *address) { CamelInternetAddress *cia; EMailAddress *new; - const char *name = NULL, *addr = NULL; + const gchar *name = NULL, *addr = NULL; cia = camel_internet_address_new (); if (camel_address_unformat (CAMEL_ADDRESS (cia), address) == -1) { @@ -288,7 +288,7 @@ e_mail_address_compare (gconstpointer address1, gconstpointer address2) { const EMailAddress *addr1 = address1; const EMailAddress *addr2 = address2; - int retval; + gint retval; g_return_val_if_fail (addr1 != NULL, 1); g_return_val_if_fail (addr2 != NULL, -1); @@ -351,7 +351,7 @@ address_compare (gconstpointer address1, gconstpointer address2) #ifdef SMART_ADDRESS_COMPARE EMailAddress *addr1, *addr2; #endif /* SMART_ADDRESS_COMPARE */ - int retval; + gint retval; g_return_val_if_fail (address1 != NULL, 1); g_return_val_if_fail (address2 != NULL, -1); @@ -363,13 +363,13 @@ address_compare (gconstpointer address1, gconstpointer address2) e_mail_address_free (addr1); e_mail_address_free (addr2); #else - retval = strcmp ((char *) address1, (char *) address2); + retval = strcmp ((gchar *) address1, (gchar *) address2); #endif /* SMART_ADDRESS_COMPARE */ return retval; } -static char * +static gchar * filter_size (gint size) { gfloat fsize; @@ -388,7 +388,7 @@ filter_size (gint size) } /* Gets the uid of the message displayed at a given view row */ -static const char * +static const gchar * get_message_uid (MessageList *message_list, ETreePath node) { CamelMessageInfo *info; @@ -416,13 +416,13 @@ get_message_info (MessageList *message_list, ETreePath node) return info; } -static const char * -get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int col) +static const gchar * +get_normalised_string (MessageList *message_list, CamelMessageInfo *info, gint col) { - const char *string, *str; - char *normalised; + const gchar *string, *str; + gchar *normalised; EPoolv *poolv; - int index; + gint index; switch (col) { case COL_SUBJECT_NORM: @@ -450,7 +450,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co poolv = g_hash_table_lookup (message_list->normalised_hash, camel_message_info_uid (info)); if (poolv == NULL) { poolv = e_poolv_new (NORMALISED_LAST); - g_hash_table_insert (message_list->normalised_hash, (char *) camel_message_info_uid (info), poolv); + g_hash_table_insert (message_list->normalised_hash, (gchar *) camel_message_info_uid (info), poolv); } else { str = e_poolv_get (poolv, index); if (*str) @@ -458,10 +458,10 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co } if (col == COL_SUBJECT_NORM) { - const unsigned char *subject; + const guchar *subject; - subject = (const unsigned char *) string; - while (!g_ascii_strncasecmp ((char *)subject, "Re:", 3)) { + subject = (const guchar *) string; + while (!g_ascii_strncasecmp ((gchar *)subject, "Re:", 3)) { subject += 3; /* jump over any spaces */ @@ -473,7 +473,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co while (*subject && isspace ((int) *subject)) subject++; - string = (const char *) subject; + string = (const gchar *) subject; normalised = g_utf8_collate_key (string, -1); } else { /* because addresses require strings, not collate keys */ @@ -501,10 +501,10 @@ clear_selection(MessageList *ml, struct _MLSelection *selection) } static ETreePath -ml_search_forward(MessageList *ml, int start, int end, guint32 flags, guint32 mask) +ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask) { ETreePath path; - int row; + gint row; CamelMessageInfo *info; ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); @@ -520,10 +520,10 @@ ml_search_forward(MessageList *ml, int start, int end, guint32 flags, guint32 ma } static ETreePath -ml_search_backward(MessageList *ml, int start, int end, guint32 flags, guint32 mask) +ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask) { ETreePath path; - int row; + gint row; CamelMessageInfo *info; ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); @@ -542,7 +542,7 @@ static ETreePath ml_search_path(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask) { ETreePath node; - int row, count; + gint row, count; ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); if (ml->cursor_uid == NULL @@ -639,7 +639,7 @@ message_list_can_select(MessageList *ml, MessageListSelectDirection direction, g * Selects the message with the given UID. **/ void -message_list_select_uid (MessageList *message_list, const char *uid) +message_list_select_uid (MessageList *message_list, const gchar *uid) { ETreePath node; @@ -667,7 +667,7 @@ message_list_select_next_thread (MessageList *ml) { ETreePath node; ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree); - int i, count, row; + gint i, count, row; if (!ml->cursor_uid || (node = g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) == NULL) @@ -818,7 +818,7 @@ message_list_copy(MessageList *ml, gboolean cut) if (uids->len > 0) { if (cut) { - int i; + gint i; camel_folder_freeze(ml->folder); for (i=0;i<uids->len;i++) @@ -852,7 +852,7 @@ message_list_paste(MessageList *ml) * SimpleTableModel::col_count */ static int -ml_column_count (ETreeModel *etm, void *data) +ml_column_count (ETreeModel *etm, gpointer data) { return COL_LAST; } @@ -861,7 +861,7 @@ ml_column_count (ETreeModel *etm, void *data) * SimpleTableModel::has_save_id */ static gboolean -ml_has_save_id (ETreeModel *etm, void *data) +ml_has_save_id (ETreeModel *etm, gpointer data) { return TRUE; } @@ -869,8 +869,8 @@ ml_has_save_id (ETreeModel *etm, void *data) /* * SimpleTableModel::get_save_id */ -static char * -ml_get_save_id (ETreeModel *etm, ETreePath path, void *data) +static gchar * +ml_get_save_id (ETreeModel *etm, ETreePath path, gpointer data) { CamelMessageInfo *info; @@ -890,7 +890,7 @@ ml_get_save_id (ETreeModel *etm, ETreePath path, void *data) * SimpleTableModel::has_save_id */ static gboolean -ml_has_get_node_by_id (ETreeModel *etm, void *data) +ml_has_get_node_by_id (ETreeModel *etm, gpointer data) { return TRUE; } @@ -899,7 +899,7 @@ ml_has_get_node_by_id (ETreeModel *etm, void *data) * SimpleTableModel::get_save_id */ static ETreePath -ml_get_node_by_id (ETreeModel *etm, const char *save_id, void *data) +ml_get_node_by_id (ETreeModel *etm, const gchar *save_id, gpointer data) { MessageList *ml; @@ -911,8 +911,8 @@ ml_get_node_by_id (ETreeModel *etm, const char *save_id, void *data) return g_hash_table_lookup(ml->uid_nodemap, save_id); } -static void * -ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data) +static gpointer +ml_duplicate_value (ETreeModel *etm, gint col, gconstpointer value, gpointer data) { switch (col){ case COL_MESSAGE_STATUS: @@ -926,7 +926,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data) case COL_SIZE: case COL_FOLLOWUP_FLAG_STATUS: case COL_FOLLOWUP_DUE_BY: - return (void *) value; + return (gpointer) value; case COL_FROM: case COL_SUBJECT: @@ -946,7 +946,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data) } static void -ml_free_value (ETreeModel *etm, int col, void *value, void *data) +ml_free_value (ETreeModel *etm, gint col, gpointer value, gpointer data) { switch (col){ case COL_MESSAGE_STATUS: @@ -979,8 +979,8 @@ ml_free_value (ETreeModel *etm, int col, void *value, void *data) } } -static void * -ml_initialize_value (ETreeModel *etm, int col, void *data) +static gpointer +ml_initialize_value (ETreeModel *etm, gint col, gpointer data) { switch (col){ case COL_MESSAGE_STATUS: @@ -1015,7 +1015,7 @@ ml_initialize_value (ETreeModel *etm, int col, void *data) } static gboolean -ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data) +ml_value_is_empty (ETreeModel *etm, gint col, gconstpointer value, gpointer data) { switch (col){ case COL_MESSAGE_STATUS: @@ -1041,14 +1041,14 @@ ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data) case COL_MIXED_SENDER: case COL_MIXED_RECIPIENTS: case COL_LABELS: - return !(value && *(char *)value); + return !(value && *(gchar *)value); default: g_warning ("This shouldn't be reached\n"); return FALSE; } } -static const char *status_map[] = { +static const gchar *status_map[] = { N_("Unseen"), N_("Seen"), N_("Answered"), @@ -1057,7 +1057,7 @@ static const char *status_map[] = { N_("Multiple Messages"), }; -static const char *score_map[] = { +static const gchar *score_map[] = { N_("Lowest"), N_("Lower"), N_("Low"), @@ -1068,10 +1068,10 @@ static const char *score_map[] = { }; -static char * -ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data) +static gchar * +ml_value_to_string (ETreeModel *etm, gint col, gconstpointer value, gpointer data) { - unsigned int i; + guint i; switch (col){ case COL_MESSAGE_STATUS: @@ -1119,7 +1119,7 @@ ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data) } static GdkPixbuf * -ml_tree_icon_at (ETreeModel *etm, ETreePath path, void *model_data) +ml_tree_icon_at (ETreeModel *etm, ETreePath path, gpointer model_data) { /* we dont really need an icon ... */ return NULL; @@ -1148,7 +1148,7 @@ subtree_unread(MessageList *ml, ETreePath node) } static time_t -subtree_latest(MessageList *ml, ETreePath node, int sent) +subtree_latest(MessageList *ml, ETreePath node, gint sent) { CamelMessageInfo *info; time_t latest = 0, date; @@ -1185,8 +1185,8 @@ sanitize_recipients (const gchar *string) gboolean quoted = FALSE; const gchar *p; GString *recipients = g_string_new (""); - char *single_add; - char **name; + gchar *single_add; + gchar **name; if (!string || !*string) return (gchar *) ""; @@ -1222,11 +1222,11 @@ sanitize_recipients (const gchar *string) } static int -get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags) +get_all_labels (CamelMessageInfo *msg_info, gchar **label_str, gboolean get_tags) { GString *str; - const char *old_label; - int count = 0; + const gchar *old_label; + gint count = 0; const CamelFlag *flag; GSList *labels; @@ -1234,7 +1234,7 @@ get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags) str = g_string_new (""); for (flag = camel_message_info_user_flags (msg_info); flag; flag = flag->next) { - const char *name = e_util_labels_get_name (labels, flag->name); + const gchar *name = e_util_labels_get_name (labels, flag->name); if (name) { if (str->len) @@ -1251,7 +1251,7 @@ get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags) old_label = e_util_labels_get_new_tag (camel_message_info_user_tag (msg_info, "label")); if (old_label != NULL) { - const char *name = NULL; + const gchar *name = NULL; if (str->len) g_string_append (str, ", "); @@ -1268,12 +1268,12 @@ get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags) return count; } -static const char * +static const gchar * get_trimmed_subject (CamelMessageInfo *info) { - const char *subject; - const char *mlist; - int mlist_len = 0; + const gchar *subject; + const gchar *mlist; + gint mlist_len = 0; gboolean found_mlist; subject = camel_message_info_subject (info); @@ -1283,7 +1283,7 @@ get_trimmed_subject (CamelMessageInfo *info) mlist = camel_message_info_mlist (info); if (mlist && *mlist) { - const char *mlist_end; + const gchar *mlist_end; mlist_end = strchr (mlist, '@'); if (mlist_end) @@ -1295,7 +1295,7 @@ get_trimmed_subject (CamelMessageInfo *info) do { found_mlist = FALSE; - while (!g_ascii_strncasecmp ((char *) subject, "Re:", 3)) { + while (!g_ascii_strncasecmp ((gchar *) subject, "Re:", 3)) { subject += 3; /* jump over any spaces */ @@ -1305,7 +1305,7 @@ get_trimmed_subject (CamelMessageInfo *info) if (mlist_len && *subject == '[' && - !g_ascii_strncasecmp ((char *) subject + 1, mlist, mlist_len) && + !g_ascii_strncasecmp ((gchar *) subject + 1, mlist, mlist_len) && subject [1 + mlist_len] == ']') { subject += 1 + mlist_len + 1; /* jump over "[mailing-list]" */ found_mlist = TRUE; @@ -1323,14 +1323,14 @@ get_trimmed_subject (CamelMessageInfo *info) return subject; } -static void * -ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) +static gpointer +ml_tree_value_at (ETreeModel *etm, ETreePath path, gint col, gpointer model_data) { MessageList *message_list = model_data; CamelMessageInfo *msg_info; CamelException ex; - const char *str; + const gchar *str; guint32 flags; camel_exception_init (&ex); @@ -1356,8 +1356,8 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) case COL_FLAGGED: return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_FLAGGED) != 0); case COL_SCORE: { - const char *tag; - int score = 0; + const gchar *tag; + gint score = 0; tag = camel_message_info_user_tag(msg_info, "score"); if (tag) @@ -1366,7 +1366,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) return GINT_TO_POINTER (score); } case COL_FOLLOWUP_FLAG_STATUS: { - const char *tag, *cmp; + const gchar *tag, *cmp; /* FIXME: this all should be methods off of message-tag-followup class, FIXME: the tag names should be namespaced :( */ @@ -1381,7 +1381,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) return GINT_TO_POINTER(0); } case COL_FOLLOWUP_DUE_BY: { - const char *tag; + const gchar *tag; time_t due_by; tag = camel_message_info_user_tag(msg_info, "due-by"); @@ -1394,24 +1394,24 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) } case COL_FOLLOWUP_FLAG: str = camel_message_info_user_tag(msg_info, "follow-up"); - return (void *)(str ? str : ""); + return (gpointer)(str ? str : ""); case COL_ATTACHMENT: if (camel_message_info_user_flag (msg_info, "$has_cal")) return GINT_TO_POINTER (2); return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_ATTACHMENTS) != 0); case COL_FROM: str = camel_message_info_from (msg_info); - return (void *)(str ? str : ""); + return (gpointer)(str ? str : ""); case COL_FROM_NORM: - return (void *) get_normalised_string (message_list, msg_info, col); + return (gpointer) get_normalised_string (message_list, msg_info, col); case COL_SUBJECT: str = camel_message_info_subject (msg_info); - return (void *)(str ? str : ""); + return (gpointer)(str ? str : ""); case COL_SUBJECT_TRIMMED: str = get_trimmed_subject (msg_info); - return (void *)(str ? str : ""); + return (gpointer)(str ? str : ""); case COL_SUBJECT_NORM: - return (void *) get_normalised_string (message_list, msg_info, col); + return (gpointer) get_normalised_string (message_list, msg_info, col); case COL_SENT: { ETreePath child; @@ -1433,9 +1433,9 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) } case COL_TO: str = camel_message_info_to (msg_info); - return (void *)(str ? str : ""); + return (gpointer)(str ? str : ""); case COL_TO_NORM: - return (void *) get_normalised_string (message_list, msg_info, col); + return (gpointer) get_normalised_string (message_list, msg_info, col); case COL_SIZE: return GINT_TO_POINTER (camel_message_info_size(msg_info)); case COL_DELETED: @@ -1453,9 +1453,9 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) return GINT_TO_POINTER (!(flags & CAMEL_MESSAGE_SEEN)); } case COL_COLOUR: { - const char *colour, *due_by, *completed, *followup; - char *labels_string = NULL; - int n; + const gchar *colour, *due_by, *completed, *followup; + gchar *labels_string = NULL; + gint n; /* Priority: colour tag; label tag; important flag; due-by tag */ @@ -1485,15 +1485,15 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) g_free (labels_string); - return (void *) colour; + return (gpointer) colour; } case COL_LOCATION: { /* Fixme : freeing memory stuff (mem leaks) */ CamelFolder *folder; CamelURL *curl; EAccount *account; - char *location = NULL; - char *euri, *url; + gchar *location = NULL; + gchar *euri, *url; if (CAMEL_IS_VEE_FOLDER(message_list->folder)) { folder = camel_vee_folder_get_location((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL); @@ -1532,34 +1532,34 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) } case COL_MIXED_SENDER: case COL_SENDER:{ - char **sender_name = NULL; + gchar **sender_name = NULL; str = camel_message_info_from (msg_info); if(str && str[0] != '\0'){ - char *res; + gchar *res; sender_name = g_strsplit (str,"<",2); res = g_strdup (*sender_name); g_strfreev (sender_name); - return (void *)(res); + return (gpointer)(res); } else - return (void *)(""); + return (gpointer)(""); } case COL_LABELS:{ - char *str = NULL; + gchar *str = NULL; GString *cleansed_str; cleansed_str = g_string_new (""); if (get_all_labels (msg_info, &str, FALSE)) { - int i; + gint i; for (i = 0; str[i] != '\0'; ++i) { if (str[i] != '_') { g_string_append_c (cleansed_str, str[i]); } } - return (void *) (g_string_free (cleansed_str, FALSE)); + return (gpointer) (g_string_free (cleansed_str, FALSE)); } else - return (void *) (""); + return (gpointer) (""); } default: g_warning ("This shouldn't be reached\n"); @@ -1567,8 +1567,8 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) } } -static void * -ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) +static gpointer +ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, gint col, gpointer model_data) { MessageList *message_list = model_data; CamelMessageInfo *msg_info; @@ -1612,14 +1612,14 @@ ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, int col, void *model_dat } static void -ml_tree_set_value_at (ETreeModel *etm, ETreePath path, int col, - const void *val, void *model_data) +ml_tree_set_value_at (ETreeModel *etm, ETreePath path, gint col, + gconstpointer val, gpointer model_data) { g_warning ("This shouldn't be reached\n"); } static gboolean -ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, int col, void *model_data) +ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, gint col, gpointer model_data) { return FALSE; } @@ -1627,7 +1627,7 @@ ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, int col, void *model_ static void message_list_init_images (void) { - int i; + gint i; /* * Only load once, and share @@ -1639,17 +1639,17 @@ message_list_init_images (void) if (states_pixmaps[i].icon_name) states_pixmaps[i].pixbuf = e_icon_factory_get_icon (states_pixmaps[i].icon_name, GTK_ICON_SIZE_MENU); else - states_pixmaps[i].pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) empty_xpm); + states_pixmaps[i].pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **) empty_xpm); } } -static char * +static gchar * filter_date (time_t date) { time_t nowdate = time(NULL); time_t yesdate; struct tm then, now, yesterday; - char buf[26]; + gchar buf[26]; gboolean done = FALSE; if (date == 0) @@ -1674,7 +1674,7 @@ filter_date (time_t date) } } if (!done) { - int i; + gint i; for (i = 2; i < 7; i++) { yesdate = nowdate - 60 * 60 * 24 * i; localtime_r (&yesdate, &yesterday); @@ -1705,15 +1705,15 @@ filter_date (time_t date) return g_strdup (buf); } -static ECell * create_composite_cell (int col) +static ECell * create_composite_cell (gint col) { ECell *cell_vbox, *cell_hbox, *cell_sub, *cell_date, *cell_from, *cell_tree, *cell_attach; GdkPixbuf *images [7]; GConfClient *gconf; - char *fixed_name = NULL; + gchar *fixed_name = NULL; gboolean show_email; - int i; - int alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS; + gint i; + gint alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS; gboolean same_font = FALSE; gconf = mail_config_get_gconf_client (); @@ -1765,7 +1765,7 @@ static ECell * create_composite_cell (int col) } static void -composite_cell_set_strike_col (ECell *cell, int col) +composite_cell_set_strike_col (ECell *cell, gint col) { g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_date")), "strikeout_column", col, NULL); g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_from")), "strikeout_column", col, NULL); @@ -1774,7 +1774,7 @@ composite_cell_set_strike_col (ECell *cell, int col) static ETableExtras * message_list_create_extras (void) { - int i; + gint i; GdkPixbuf *images [7]; ETableExtras *extras; ECell *cell; @@ -1852,7 +1852,7 @@ message_list_create_extras (void) static void save_tree_state(MessageList *ml) { - char *filename; + gchar *filename; if (ml->folder == NULL || ml->tree == NULL) return; @@ -1873,7 +1873,7 @@ load_tree_state (MessageList *ml, xmlDoc *expand_state) if (expand_state) { e_tree_load_expanded_state_xml (ml->tree, expand_state); } else { - char *filename; + gchar *filename; filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-"); e_tree_load_expanded_state (ml->tree, filename); @@ -1896,9 +1896,9 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing) /* build the spec based on the folder, and possibly from a saved file */ /* otherwise, leave default */ if (message_list->folder) { - char *path; - char *name; - int data = 1; + gchar *path; + gchar *name; + gint data = 1; struct stat st; ETableItem *item = e_tree_get_item (message_list->tree); @@ -1965,7 +1965,7 @@ ml_selection_received(GtkWidget *widget, GtkSelectionData *data, guint time, Mes } static void -ml_tree_drag_data_get (ETree *tree, int row, ETreePath path, int col, +ml_tree_drag_data_get (ETree *tree, gint row, ETreePath path, gint col, GdkDragContext *context, GtkSelectionData *data, guint info, guint time, MessageList *ml) { @@ -2002,9 +2002,9 @@ struct _drop_msg { guint32 action; guint info; - unsigned int move:1; - unsigned int moved:1; - unsigned int aborted:1; + guint move:1; + guint moved:1; + guint aborted:1; }; static gchar * @@ -2075,7 +2075,7 @@ ml_drop_action(struct _drop_msg *m) } static void -ml_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data) +ml_drop_popup_copy(EPopup *ep, EPopupItem *item, gpointer data) { struct _drop_msg *m = data; @@ -2084,7 +2084,7 @@ ml_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data) } static void -ml_drop_popup_move(EPopup *ep, EPopupItem *item, void *data) +ml_drop_popup_move(EPopup *ep, EPopupItem *item, gpointer data) { struct _drop_msg *m = data; @@ -2093,7 +2093,7 @@ ml_drop_popup_move(EPopup *ep, EPopupItem *item, void *data) } static void -ml_drop_popup_cancel(EPopup *ep, EPopupItem *item, void *data) +ml_drop_popup_cancel(EPopup *ep, EPopupItem *item, gpointer data) { struct _drop_msg *m = data; @@ -2109,7 +2109,7 @@ static EPopupItem ml_drop_popup_menu[] = { }; static void -ml_drop_popup_free(EPopup *ep, GSList *items, void *data) +ml_drop_popup_free(EPopup *ep, GSList *items, gpointer data) { g_slist_free(items); @@ -2117,7 +2117,7 @@ ml_drop_popup_free(EPopup *ep, GSList *items, void *data) } static void -ml_tree_drag_data_received (ETree *tree, int row, ETreePath path, int col, +ml_tree_drag_data_received (ETree *tree, gint row, ETreePath path, gint col, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, MessageList *ml) @@ -2146,7 +2146,7 @@ ml_tree_drag_data_received (ETree *tree, int row, ETreePath path, int col, EMPopup *emp; GSList *menus = NULL; GtkMenu *menu; - int i; + gint i; emp = em_popup_new("org.gnome.mail.messagelist.popup.drop"); for (i=0;i<sizeof(ml_drop_popup_menu)/sizeof(ml_drop_popup_menu[0]);i++) @@ -2205,11 +2205,11 @@ ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint } for (targets = context->targets; targets; targets = targets->next) { - int i; + gint i; d(printf("atom drop '%s'\n", gdk_atom_name(targets->data))); for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++) - if (targets->data == (void *)ml_drag_info[i].atom) + if (targets->data == (gpointer)ml_drag_info[i].atom) actions |= ml_drag_info[i].actions; } d(printf("\n")); @@ -2233,7 +2233,7 @@ ml_scrolled (GtkAdjustment *adj, MessageList *ml) } static void -on_model_row_changed (ETableModel *model, int row, MessageList *ml) +on_model_row_changed (ETableModel *model, gint row, MessageList *ml) { ml->priv->any_row_changed = TRUE; } @@ -2401,7 +2401,7 @@ message_list_class_init (MessageListClass *message_list_class) { GObjectClass *object_class = (GObjectClass *) message_list_class; GtkObjectClass *gtkobject_class = (GtkObjectClass *) message_list_class; - int i; + gint i; for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++) ml_drag_info[i].atom = gdk_atom_intern(ml_drag_info[i].target, FALSE); @@ -2443,7 +2443,7 @@ message_list_class_init (MessageListClass *message_list_class) } static gboolean -read_boolean_with_default (GConfClient *gconf, const char *key, gboolean def_value) +read_boolean_with_default (GConfClient *gconf, const gchar *key, gboolean def_value) { GConfValue *value; gboolean res; @@ -2466,7 +2466,7 @@ message_list_construct (MessageList *message_list) { AtkObject *a11y; gboolean construct_failed; - char *etspecfile; + gchar *etspecfile; GConfClient *gconf = mail_config_get_gconf_client (); message_list->model = @@ -2574,7 +2574,7 @@ message_list_new (void) } static void -clear_info(char *key, ETreePath *node, MessageList *ml) +clear_info(gchar *key, ETreePath *node, MessageList *ml) { CamelMessageInfo *info; @@ -2671,13 +2671,13 @@ is_node_selectable (MessageList *ml, CamelMessageInfo *info) /* We try and find something that is selectable in our tree. There is * actually no assurance that we'll find something that will still be * there next time, but its probably going to work most of the time. */ -static char * +static gchar * find_next_selectable (MessageList *ml) { ETreePath node; - int last; - int vrow_orig; - int vrow; + gint last; + gint vrow_orig; + gint vrow; ETree *et = ml->tree; CamelMessageInfo *info; @@ -2725,19 +2725,19 @@ find_next_selectable (MessageList *ml) #define BROKEN_ETREE /* avoid some broken code in etree(?) by not using the incremental update */ -static void build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row); +static void build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint *row); -static void build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row); +static void build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row); static void build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *changes) { - int row = 0; + gint row = 0; ETreeModel *etm = ml->model; #ifndef BROKEN_ETREE ETreePath *top; #endif - char *saveuid = NULL; + gchar *saveuid = NULL; #ifdef BROKEN_ETREE GPtrArray *selected; #endif @@ -2779,7 +2779,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c message_list_free_uids(ml, selected); #else } else { - static int tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp); + static gint tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp); build_subtree_diff(ml, ml->tree_root, top, thread->tree, &row); top = e_tree_model_node_get_first_child(etm, ml->tree_root); @@ -2815,7 +2815,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c is faster than inserting to the right row :( */ /* Otherwise, this code would probably go as it does the same thing essentially */ static void -build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row) +build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint *row) { ETreeModel *tree = ml->model; ETreePath node; @@ -2828,8 +2828,8 @@ build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int continue; } - node = e_tree_memory_node_insert(E_TREE_MEMORY(tree), parent, -1, (void *)c->message); - g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node); + node = e_tree_memory_node_insert(E_TREE_MEMORY(tree), parent, -1, (gpointer)c->message); + g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(c->message), node); camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message); if (c->child) { @@ -2897,7 +2897,7 @@ tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp) /* adds a single node, retains save state, and handles adding children if required */ static void -add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row, int myrow) +add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row, gint myrow) { ETreeModel *etm = ml->model; ETreePath node; @@ -2906,8 +2906,8 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre /* we just update the hashtable key, umm, does this leak the info on the message node? */ g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(c->message)); - node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (void *)c->message); - g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node); + node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (gpointer)c->message); + g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(c->message), node); camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message); (*row)++; @@ -2918,13 +2918,13 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre /* removes node, children recursively and all associated data */ static void -remove_node_diff(MessageList *ml, ETreePath node, int depth) +remove_node_diff(MessageList *ml, ETreePath node, gint depth) { ETreeModel *etm = ml->model; ETreePath cp, cn; CamelMessageInfo *info; - t(printf("Removing node: %s\n", (char *)e_tree_memory_node_get_data(etm, node))); + t(printf("Removing node: %s\n", (gchar *)e_tree_memory_node_get_data(etm, node))); /* we depth-first remove all node data's ... */ cp = e_tree_model_node_get_first_child(etm, node); @@ -2949,12 +2949,12 @@ remove_node_diff(MessageList *ml, ETreePath node, int depth) /* applies a new tree structure to an existing tree, but only by changing things that have changed */ static void -build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row) +build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row) { ETreeModel *etm = ml->model; ETreePath ap, *ai, *at, *tmp; CamelFolderThreadNode *bp, *bi, *bt; - int i, j, myrow = 0; + gint i, j, myrow = 0; ap = path; bp = c; @@ -2982,7 +2982,7 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde /* if this is a message row, check/update the row id map */ if (g_hash_table_lookup_extended(ml->uid_rowmap, camel_message_info_uid(bp->message), &olduid, &oldrow)) { if ((int)oldrow != (*row)) { - g_hash_table_insert(ml->uid_rowmap, olduid, (void *)(*row)); + g_hash_table_insert(ml->uid_rowmap, olduid, (gpointer)(*row)); } } else { g_warning("Cannot find uid %s in table?", camel_message_info_uid(bp->message)); @@ -3065,8 +3065,8 @@ static void build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes) { ETreeModel *etm = ml->model; - char *saveuid = NULL; - int i; + gchar *saveuid = NULL; + gint i; #ifdef BROKEN_ETREE GPtrArray *selected; #endif @@ -3095,7 +3095,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes) CamelMessageInfo *info = summary->pdata[i]; node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), ml->tree_root, -1, info); - g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(info), node); + g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(info), node); camel_folder_ref_message_info(ml->folder, info); } e_tree_memory_thaw(E_TREE_MEMORY(etm)); @@ -3148,7 +3148,7 @@ message_list_change_first_visible_parent (MessageList *ml, ETreePath node) static void build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes) { - int i; + gint i; ETreePath node; CamelMessageInfo *info; @@ -3178,9 +3178,9 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes) for (i=0;i<changes->uid_added->len;i++) { info = camel_folder_get_message_info (ml->folder, changes->uid_added->pdata[i]); if (info) { - d(printf(" %s\n", (char *)changes->uid_added->pdata[i])); + d(printf(" %s\n", (gchar *)changes->uid_added->pdata[i])); node = e_tree_memory_node_insert (E_TREE_MEMORY (ml->model), ml->tree_root, -1, info); - g_hash_table_insert (ml->uid_nodemap, (void *)camel_message_info_uid (info), node); + g_hash_table_insert (ml->uid_nodemap, (gpointer)camel_message_info_uid (info), node); } } @@ -3208,11 +3208,11 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes) static void -mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, int flag) +mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, gint flag) { CamelFolderChangeInfo *newchanges, *oldchanges = *changes; CamelMessageInfo *info; - int i; + gint i; newchanges = camel_folder_change_info_new (); @@ -3252,7 +3252,7 @@ main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) MessageList *ml = MESSAGE_LIST (user_data); CamelFolderChangeInfo *changes = (CamelFolderChangeInfo *)event_data; CamelFolder *folder = (CamelFolder *)o; - int i; + gint i; /* may be NULL if we're in the process of being destroyed */ if (ml->async_event == NULL) @@ -3324,7 +3324,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) * the "Outgoing folder" column view. **/ void -message_list_set_folder (MessageList *message_list, CamelFolder *folder, const char *uri, gboolean outgoing) +message_list_set_folder (MessageList *message_list, CamelFolder *folder, const gchar *uri, gboolean outgoing) { ETreeModel *etm = message_list->model; gboolean hide_deleted; @@ -3382,7 +3382,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c } if (folder) { - int strikeout_col = -1; + gint strikeout_col = -1; ECell *cell; camel_object_ref (folder); @@ -3429,7 +3429,7 @@ on_cursor_activated_idle (gpointer data) { MessageList *message_list = data; ESelectionModel *esm = e_tree_get_selection_model (message_list->tree); - int selected = e_selection_model_selected_count (esm); + gint selected = e_selection_model_selected_count (esm); if (selected == 1 && message_list->cursor_uid) { d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid)); @@ -3443,10 +3443,10 @@ on_cursor_activated_idle (gpointer data) } static void -on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data) +on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data) { MessageList *message_list = MESSAGE_LIST (user_data); - const char *new_uid; + const gchar *new_uid; if (path == NULL) new_uid = NULL; @@ -3476,7 +3476,7 @@ static void on_selection_changed_cmd(ETree *tree, MessageList *ml) { GPtrArray *uids; - char *newuid; + gchar *newuid; ETreePath cursor; /* not sure if we could just ignore this for the cursor, i think sometimes you @@ -3485,7 +3485,7 @@ on_selection_changed_cmd(ETree *tree, MessageList *ml) if (uids->len == 1) newuid = uids->pdata[0]; else if ((cursor = e_tree_get_cursor(tree))) - newuid = (char *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor)); + newuid = (gchar *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor)); else newuid = NULL; @@ -3511,7 +3511,7 @@ static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list) { CamelMessageInfo *info; - int flag; + gint flag; guint32 flags; if (col == COL_MESSAGE_STATUS) @@ -3553,10 +3553,10 @@ struct _ml_selected_data { }; static void -ml_getselected_cb(ETreePath path, void *user_data) +ml_getselected_cb(ETreePath path, gpointer user_data) { struct _ml_selected_data *data = user_data; - const char *uid; + const gchar *uid; if (e_tree_model_node_is_root (data->ml->model, path)) return; @@ -3601,7 +3601,7 @@ message_list_get_selected(MessageList *ml) void message_list_set_selected(MessageList *ml, GPtrArray *uids) { - int i; + gint i; ETreeSelectionModel *etsm; ETreePath node; GPtrArray *paths = g_ptr_array_new(); @@ -3638,7 +3638,7 @@ message_list_thaw(MessageList *ml) void message_list_free_uids(MessageList *ml, GPtrArray *uids) { - int i; + gint i; for (i=0;i<uids->len;i++) g_free(uids->pdata[i]); @@ -3691,7 +3691,7 @@ message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted) } void -message_list_set_search (MessageList *ml, const char *search) +message_list_set_search (MessageList *ml, const gchar *search) { if (search == NULL || search[0] == '\0') if (ml->search == NULL || ml->search[0] == '\0') @@ -3715,7 +3715,7 @@ message_list_set_search (MessageList *ml, const char *search) /* will ensure that the message with UID uid will be in the message list after the next rebuild */ void -message_list_ensure_message (MessageList *ml, const char *uid) +message_list_ensure_message (MessageList *ml, const gchar *uid) { g_return_if_fail (ml != NULL); @@ -3731,12 +3731,12 @@ message_list_length (MessageList *ml) } struct _glibsuxcrap { - unsigned int count; + guint count; CamelFolder *folder; }; static void -glib_crapback(void *key, void *data, void *x) +glib_crapback(gpointer key, gpointer data, gpointer x) { struct _glibsuxcrap *y = x; CamelMessageInfo *mi; @@ -3755,7 +3755,7 @@ glib_crapback(void *key, void *data, void *x) unsigned int message_list_hidden(MessageList *ml) { - unsigned int hidden = 0; + guint hidden = 0; MESSAGE_LIST_LOCK (ml, hide_lock); if (ml->hidden && ml->folder) { @@ -3783,7 +3783,7 @@ message_list_hidden(MessageList *ml) 100 messages. */ void -message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper) +message_list_hide_add (MessageList *ml, const gchar *expr, guint lower, guint upper) { MESSAGE_LIST_LOCK (ml, hide_lock); @@ -3801,8 +3801,8 @@ message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, un void message_list_hide_uids (MessageList *ml, GPtrArray *uids) { - int i; - char *uid; + gint i; + gchar *uid; /* first see if we need to do any work, if so, then do it all at once */ for (i = 0; i < uids->len; i++) { @@ -3869,7 +3869,7 @@ message_list_hide_clear (MessageList *ml) static void load_hide_state (MessageList *ml) { - char *filename; + gchar *filename; FILE *in; gint32 version, lower, upper; @@ -3895,7 +3895,7 @@ load_hide_state (MessageList *ml) camel_file_util_decode_fixed_int32 (in, &upper); ml->hide_after = upper; while (!feof(in)) { - char *olduid, *uid; + gchar *olduid, *uid; if (camel_file_util_decode_string (in, &olduid) != -1) { uid = e_mempool_strdup(ml->hidden_pool, olduid); @@ -3912,7 +3912,7 @@ load_hide_state (MessageList *ml) } static void -hide_save_1 (char *uid, char *keydata, FILE *out) +hide_save_1 (gchar *uid, gchar *keydata, FILE *out) { camel_file_util_encode_string (out, uid); } @@ -3922,7 +3922,7 @@ hide_save_1 (char *uid, char *keydata, FILE *out) static void save_hide_state (MessageList *ml) { - char *filename; + gchar *filename; FILE *out; if (ml->folder == NULL) @@ -3950,11 +3950,11 @@ save_hide_state (MessageList *ml) struct _regen_list_msg { MailMsg base; - int complete; + gint complete; MessageList *ml; - char *search; - char *hideexpr; + gchar *search; + gchar *hideexpr; CamelFolderChangeInfo *changes; gboolean dotree; /* we are building a tree */ gboolean hidedel; /* we want to/dont want to show deleted messages */ @@ -3965,7 +3965,7 @@ struct _regen_list_msg { CamelFolder *folder; GPtrArray *summary; - int last_row; /* last selected (cursor) row */ + gint last_row; /* last selected (cursor) row */ xmlDoc *expand_state; /* stored expanded state of the previous view */ }; @@ -3992,7 +3992,7 @@ regen_list_exec (struct _regen_list_msg *m) GPtrArray *uids, *uidnew, *showuids, *searchuids = NULL; CamelMessageInfo *info; ETreePath cursor; - int i; + gint i; gchar *expr = NULL; if (m->folder != m->ml->folder) @@ -4042,7 +4042,7 @@ regen_list_exec (struct _regen_list_msg *m) thus we will keep the selected message to be sure it doesn't disappear because it no longer belong to our search filter. */ if (uids && ((m->changes && m->ml->cursor_uid) || m->ml->ensure_uid)) { - const char *looking_for = m->ml->cursor_uid; + const gchar *looking_for = m->ml->cursor_uid; /* ensure_uid has precedence of cursor_uid */ if (m->ml->ensure_uid) looking_for = m->ml->ensure_uid; @@ -4094,7 +4094,7 @@ regen_list_exec (struct _regen_list_msg *m) for (i = 0; i < uidnew->len; i++) { if (g_hash_table_lookup (m->ml->hidden, uidnew->pdata[i]) == NULL) { - char *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]); + gchar *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]); g_hash_table_insert (m->ml->hidden, uid, uid); } } @@ -4114,12 +4114,12 @@ regen_list_exec (struct _regen_list_msg *m) /* perform uid hiding */ if (m->ml->hidden || m->ml->hide_before != ML_HIDE_NONE_START || m->ml->hide_after != ML_HIDE_NONE_END) { - int start, end; + gint start, end; uidnew = g_ptr_array_new (); /* first, hide matches */ if (m->ml->hidden) { - int subtr = 0; + gint subtr = 0; for (i = 0; i < uids->len; i++) { if (g_hash_table_lookup (m->ml->hidden, uids->pdata[i]) == NULL) @@ -4127,7 +4127,7 @@ regen_list_exec (struct _regen_list_msg *m) else if (m->last_row >= 0) { /* if we are going to hide message above last selected row, then we should decrease our last row number, to put cursor on a proper place. */ - ETreePath node = g_hash_table_lookup (m->ml->uid_nodemap, (const char *) uids->pdata[i]); + ETreePath node = g_hash_table_lookup (m->ml->uid_nodemap, (const gchar *) uids->pdata[i]); if (node && m->last_row > e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (m->ml->tree), node)) subtr ++; @@ -4272,7 +4272,7 @@ regen_list_done (struct _regen_list_msg *m) g_mutex_unlock (m->ml->regen_lock); if (m->ml->regen == NULL && m->ml->pending_select_uid) { - char *uid = m->ml->pending_select_uid; + gchar *uid = m->ml->pending_select_uid; m->ml->pending_select_uid = NULL; message_list_select_uid(m->ml, uid); @@ -4310,7 +4310,7 @@ regen_list_done (struct _regen_list_msg *m) static void regen_list_free (struct _regen_list_msg *m) { - int i; + gint i; e_profile_event_emit("list.regenerated", m->folder->full_name, 0); @@ -4398,7 +4398,7 @@ mail_regen_cancel(MessageList *ml) } static void -mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes) +mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes) { struct _regen_list_msg *m; GConfClient *gconf; @@ -4457,7 +4457,7 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came if (message_list_length (ml) <= 0) { if (GTK_WIDGET_VISIBLE (GTK_WIDGET (ml))) { /* there is some info why the message list is empty, let it be something useful */ - char *txt = g_strconcat (_("Generating message list"), "..." , NULL); + gchar *txt = g_strconcat (_("Generating message list"), "..." , NULL); e_tree_set_info_message (m->ml->tree, txt); diff --git a/mail/message-list.h b/mail/message-list.h index 4d0866fe20..eb908a7c9b 100644 --- a/mail/message-list.h +++ b/mail/message-list.h @@ -99,7 +99,7 @@ struct _MessageList { /* The folder & matching uri */ CamelFolder *folder; - char *folder_uri; + gchar *folder_uri; GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */ @@ -109,15 +109,15 @@ struct _MessageList { /* IMPORTANT: You MUST have obtained the hide lock, to operate on this data */ GHashTable *hidden; struct _EMemPool *hidden_pool; - int hide_unhidden; /* total length, before hiding */ - int hide_before, hide_after; /* hide ranges of messages */ + gint hide_unhidden; /* total length, before hiding */ + gint hide_before, hide_after; /* hide ranges of messages */ /* Current search string, or %NULL */ - char *search; + gchar *search; /* which message uid should be left in the list even not in a search after rebuild; rebuild will clear the value to NULL */ - char *ensure_uid; + gchar *ensure_uid; /* are we regenerating the message_list because set_folder was just called? */ guint just_set_folder : 1; @@ -138,7 +138,7 @@ struct _MessageList { guint frozen:16; /* Where the ETree cursor is. */ - char *cursor_uid; + gchar *cursor_uid; /* whether the last selection was on a single row or none/multi */ gboolean last_sel_single; @@ -152,11 +152,11 @@ struct _MessageList { /* list of outstanding regeneration requests */ GList *regen; GMutex *regen_lock; /* when writing to the regen, guard with this lock too */ - char *pending_select_uid; /* set if we were busy regnerating while we had a select come in */ + gchar *pending_select_uid; /* set if we were busy regnerating while we had a select come in */ guint regen_timeout_id; - void *regen_timeout_msg; + gpointer regen_timeout_msg; - char *frozen_search; /* to save search took place while we were frozen */ + gchar *frozen_search; /* to save search took place while we were frozen */ /* the current camel folder thread tree, if any */ struct _CamelFolderThread *thread_tree; @@ -169,7 +169,7 @@ typedef struct { ETreeScrolledClass parent_class; /* signals - select a message */ - void (*message_selected) (MessageList *ml, const char *uid); + void (*message_selected) (MessageList *ml, const gchar *uid); void (*message_list_built) (MessageList *ml); void (*message_list_scrolled) (MessageList *ml); } MessageListClass; @@ -183,7 +183,7 @@ typedef enum { GType message_list_get_type (void); GtkWidget *message_list_new (void); -void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing); +void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const gchar *uri, gboolean outgoing); void message_list_freeze(MessageList *ml); void message_list_thaw(MessageList *ml); @@ -201,7 +201,7 @@ gboolean message_list_select (MessageList *message_list, gboolean message_list_can_select(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask); void message_list_select_uid (MessageList *message_list, - const char *uid); + const gchar *uid); void message_list_select_next_thread (MessageList *ml); @@ -216,11 +216,11 @@ void message_list_copy(MessageList *ml, gboolean cut); void message_list_paste (MessageList *ml); /* info */ -unsigned int message_list_length (MessageList *ml); -unsigned int message_list_hidden (MessageList *ml); +guint message_list_length (MessageList *ml); +guint message_list_hidden (MessageList *ml); /* hide specific messages */ -void message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper); +void message_list_hide_add (MessageList *ml, const gchar *expr, guint lower, guint upper); void message_list_hide_uids (MessageList *ml, GPtrArray *uids); void message_list_hide_clear (MessageList *ml); @@ -229,8 +229,8 @@ void message_list_set_threaded_expand_all (MessageList *ml); void message_list_set_threaded_collapse_all (MessageList *ml); void message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted); -void message_list_set_search (MessageList *ml, const char *search); -void message_list_ensure_message (MessageList *ml, const char *uid); +void message_list_set_search (MessageList *ml, const gchar *search); +void message_list_ensure_message (MessageList *ml, const gchar *uid); void message_list_save_state (MessageList *ml); diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c index 827fc6813a..b59154c47e 100644 --- a/mail/message-tag-followup.c +++ b/mail/message-tag-followup.c @@ -65,7 +65,7 @@ static const gchar *available_flags[] = { N_("Review"), }; -static int num_available_flags = sizeof (available_flags) / sizeof (available_flags[0]); +static gint num_available_flags = sizeof (available_flags) / sizeof (available_flags[0]); static MessageTagEditorClass *parent_class = NULL; @@ -137,7 +137,7 @@ get_tag_list (MessageTagEditor *editor) MessageTagFollowUp *followup = (MessageTagFollowUp *) editor; CamelTag *tags = NULL; time_t date; - char *text; + gchar *text; camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (followup->combo_entry))))); @@ -165,7 +165,7 @@ static void set_tag_list (MessageTagEditor *editor, CamelTag *tags) { MessageTagFollowUp *followup = (MessageTagFollowUp *) editor; - const char *text; + const gchar *text; time_t date; text = camel_tag_get (&tags, "follow-up"); @@ -224,22 +224,22 @@ get_week_start_day (void) static gboolean locale_supports_12_hour_format (void) { - char s[16]; + gchar s[16]; time_t t = 0; strftime(s, sizeof s, "%p", gmtime (&t)); return s[0] != '\0'; } -GtkWidget *target_date_new (const char *s1, const char *s2, int i1, int i2); +GtkWidget *target_date_new (const gchar *s1, const gchar *s2, gint i1, gint i2); GtkWidget * -target_date_new (const char *s1, const char *s2, int i1, int i2) +target_date_new (const gchar *s1, const gchar *s2, gint i1, gint i2) { gboolean time_24hour = TRUE; GConfClient *gconf; GtkWidget *widget; - int start; + gint start; widget = e_date_edit_new (); e_date_edit_set_show_date (E_DATE_EDIT (widget), TRUE); @@ -269,8 +269,8 @@ construct (MessageTagEditor *editor) GtkListStore *model; GtkWidget *widget; GladeXML *gui; - int i; - char *gladefile; + gint i; + gchar *gladefile; gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up")); @@ -308,7 +308,7 @@ construct (MessageTagEditor *editor) followup->combo_entry = GTK_COMBO_BOX (glade_xml_get_widget (gui, "combo")); gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (followup->combo_entry))); for (i = 0; i < num_available_flags; i++) - gtk_combo_box_append_text (followup->combo_entry, (char *) _(available_flags[i])); + gtk_combo_box_append_text (followup->combo_entry, (gchar *) _(available_flags[i])); gtk_combo_box_set_active (followup->combo_entry, DEFAULT_FLAG); followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date")); @@ -337,7 +337,7 @@ message_tag_followup_new (void) } void -message_tag_followup_append_message (MessageTagFollowUp *editor, const char *from, const char *subject) +message_tag_followup_append_message (MessageTagFollowUp *editor, const gchar *from, const gchar *subject) { GtkTreeIter iter; GtkListStore *model; diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h index 5c229fe36e..7e362df300 100644 --- a/mail/message-tag-followup.h +++ b/mail/message-tag-followup.h @@ -69,8 +69,8 @@ GType message_tag_followup_get_type (void); MessageTagEditor *message_tag_followup_new (void); void message_tag_followup_append_message (MessageTagFollowUp *editor, - const char *from, - const char *subject); + const gchar *from, + const gchar *subject); #ifdef __cplusplus } diff --git a/plugins/addressbook-file/addressbook-file.c b/plugins/addressbook-file/addressbook-file.c index 3bccf0a229..d651ad4a56 100644 --- a/plugins/addressbook-file/addressbook-file.c +++ b/plugins/addressbook-file/addressbook-file.c @@ -32,8 +32,8 @@ e_book_file_dummy (EPlugin *epl, EConfigHookItemFactoryData *data) { EABConfigTargetSource *t = (EABConfigTargetSource *) data->target; ESource *source = t->source; - char *uri_text; - const char *relative_uri; + gchar *uri_text; + const gchar *relative_uri; uri_text = e_source_get_uri (source); if (strncmp (uri_text, "file", 4)) { diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c index ccf14beb30..e0b85f5b89 100644 --- a/plugins/attachment-reminder/attachment-reminder.c +++ b/plugins/attachment-reminder/attachment-reminder.c @@ -68,7 +68,7 @@ enum { CLUE_N_COLUMNS }; -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); GtkWidget *e_plugin_lib_get_configure_widget (EPlugin *epl); void org_gnome_evolution_attachment_reminder (EPlugin *ep, EMEventTargetComposer *t); @@ -77,7 +77,7 @@ GtkWidget* org_gnome_attachment_reminder_config_option (struct _EPlugin *epl, st static gboolean ask_for_missing_attachment (EPlugin *ep, GtkWindow *widget); static gboolean check_for_attachment_clues (gchar *msg); static gboolean check_for_attachment (EMsgComposer *composer); -static gchar* strip_text_msg (gchar *msg); +static gchar * strip_text_msg (gchar *msg); static void commit_changes (UIData *ui); static void cell_edited_callback (GtkCellRendererText *cell, gchar *path_string, @@ -85,8 +85,8 @@ static void cell_edited_callback (GtkCellRendererText *cell, gchar *path_string static gboolean clue_foreach_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, UIData *ui); -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { return 0; } @@ -193,7 +193,7 @@ check_for_attachment (EMsgComposer *composer) return (e_attachment_store_get_num_attachments (store) > 0); } -static gchar* +static gchar * strip_text_msg (gchar *msg) { gchar **lines = g_strsplit ( msg, "\n", -1); @@ -233,7 +233,7 @@ commit_changes (UIData *ui) valid = gtk_tree_model_get_iter_first (model, &iter); while (valid) { - char *keyword; + gchar *keyword; gtk_tree_model_get (model, &iter, CLUE_KEYWORD_COLUMN, &keyword, -1); /* Check if the keyword is not empty */ @@ -252,7 +252,7 @@ static void clue_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, UIData *ui) { GtkTreeSelection *selection; - char *keyword = NULL; + gchar *keyword = NULL; gboolean valid; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview)); @@ -285,7 +285,7 @@ clue_foreach_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter valid = gtk_tree_model_get_iter_first (model, iter); while (valid && gtk_list_store_iter_is_valid (ui->store, iter)) { - char *keyword = NULL; + gchar *keyword = NULL; gtk_tree_model_get (model, iter, CLUE_KEYWORD_COLUMN, &keyword, -1); /* Check if the keyword is not empty and then emit the row-changed signal (if we delete the row, then the iter gets corrupted) */ @@ -458,7 +458,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl) UIData *ui = g_new0 (UIData, 1); - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_PLUGINDIR, "attachment-reminder.glade", diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c index c4c3c098ae..41744fc641 100644 --- a/plugins/audio-inline/audio-inline.c +++ b/plugins/audio-inline/audio-inline.c @@ -38,15 +38,15 @@ #define d(x) -void org_gnome_audio_inline_format (void *ep, EMFormatHookTarget *t); +void org_gnome_audio_inline_format (gpointer ep, EMFormatHookTarget *t); -static volatile int org_gnome_audio_class_id_counter = 0; +static volatile gint org_gnome_audio_class_id_counter = 0; struct _org_gnome_audio_inline_pobject { EMFormatHTMLPObject object; CamelMimePart *part; - char *filename; + gchar *filename; GstElement *playbin; gulong bus_id; GstState target_state; @@ -197,7 +197,7 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button, EMFormatHTMLPObject *pob CamelStream *stream; CamelDataWrapper *data; GError *error = NULL; - int argc = 1; + gint argc = 1; const gchar *argv [] = { "org_gnome_audio_inline", NULL }; /* FIXME this is ugly, we should stream this directly to gstreamer */ @@ -213,8 +213,8 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button, EMFormatHTMLPObject *pob d(printf ("audio inline formatter: init gst playbin\n")); - if (gst_init_check (&argc, (char ***) &argv, &error)) { - char *uri; + if (gst_init_check (&argc, (gchar ***) &argv, &error)) { + gchar *uri; GstBus *bus; /* create a disk reader */ @@ -254,7 +254,7 @@ org_gnome_audio_inline_play_clicked (GtkWidget *button, EMFormatHTMLPObject *pob } static GtkWidget * -org_gnome_audio_inline_add_button (GtkWidget *box, const char *stock_icon, GCallback cb, gpointer data, gboolean sensitive) +org_gnome_audio_inline_add_button (GtkWidget *box, const gchar *stock_icon, GCallback cb, gpointer data, gboolean sensitive) { GtkWidget *button; @@ -288,10 +288,10 @@ org_gnome_audio_inline_button_panel (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMF } void -org_gnome_audio_inline_format (void *ep, EMFormatHookTarget *t) +org_gnome_audio_inline_format (gpointer ep, EMFormatHookTarget *t) { struct _org_gnome_audio_inline_pobject *pobj; - char *classid = g_strdup_printf ("org-gnome-audio-inline-button-panel-%d", org_gnome_audio_class_id_counter); + gchar *classid = g_strdup_printf ("org-gnome-audio-inline-button-panel-%d", org_gnome_audio_class_id_counter); org_gnome_audio_class_id_counter ++; diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c index 59c04a605b..92d36e71d8 100644 --- a/plugins/backup-restore/backup-restore.c +++ b/plugins/backup-restore/backup-restore.c @@ -52,7 +52,7 @@ typedef enum _br_flags { }br_flags; static void -backup (const char *filename, gboolean restart) +backup (const gchar *filename, gboolean restart) { if (restart) execl (EVOLUTION_TOOLSDIR "/evolution-backup", "evolution-backup", "--gui", "--backup", "--restart", filename, NULL); @@ -61,7 +61,7 @@ backup (const char *filename, gboolean restart) } static void -restore (const char *filename, gboolean restart) +restore (const gchar *filename, gboolean restart) { if (restart) execl (EVOLUTION_TOOLSDIR "/evolution-backup", "evolution-backup", "--gui", "--restore", "--restart", filename, NULL); @@ -70,10 +70,10 @@ restore (const char *filename, gboolean restart) } static gboolean -sanity_check (const char *filename) +sanity_check (const gchar *filename) { - char *command; - int result; + gchar *command; + gint result; command = g_strdup_printf ("%s/evolution-backup --check %s", EVOLUTION_TOOLSDIR, filename); result = system (command); @@ -89,11 +89,11 @@ sanity_check (const char *filename) } static guint32 -dialog_prompt_user(GtkWindow *parent, const char *string, const char *tag, const char *arg0, ...) +dialog_prompt_user(GtkWindow *parent, const gchar *string, const gchar *tag, const gchar *arg0, ...) { GtkWidget *mbox, *check = NULL; va_list ap; - int button; + gint button; guint32 mask = 0; va_start(ap, arg0); @@ -120,7 +120,7 @@ dialog_prompt_user(GtkWindow *parent, const char *string, const char *tag, const } static gboolean -epbr_perform_pre_backup_checks (char* dir) +epbr_perform_pre_backup_checks (gchar * dir) { #ifdef G_OS_WIN32 return TRUE; @@ -134,7 +134,7 @@ org_gnome_backup_restore_backup (EPlugin *ep, ESMenuTargetShell *target) { GtkWidget *dlg; GtkWidget *vbox; - int response; + gint response; dlg = e_file_get_save_filesel(target->target.widget, _("Select name of the Evolution backup file"), NULL, GTK_FILE_CHOOSER_ACTION_SAVE); @@ -150,10 +150,10 @@ org_gnome_backup_restore_backup (EPlugin *ep, ESMenuTargetShell *target) response = gtk_dialog_run (GTK_DIALOG (dlg)); if (response == GTK_RESPONSE_OK) { - char *filename; + gchar *filename; guint32 mask; - char *uri = NULL; - char *dir; + gchar *uri = NULL; + gchar *dir; uri = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER (dlg)); e_file_update_save_path(uri, TRUE); @@ -186,7 +186,7 @@ org_gnome_backup_restore_restore (EPlugin *ep, ESMenuTargetShell *target) { GtkWidget *dlg; GtkWidget *vbox; - int response; + gint response; dlg = e_file_get_save_filesel(target->target.widget, _("Select name of the Evolution backup file to restore"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN); @@ -200,8 +200,8 @@ org_gnome_backup_restore_restore (EPlugin *ep, ESMenuTargetShell *target) response = gtk_dialog_run (GTK_DIALOG (dlg)); if (response == GTK_RESPONSE_OK) { - char *filename; - char *uri = NULL; + gchar *filename; + gchar *uri = NULL; uri = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER (dlg)); e_file_update_save_path(uri, TRUE); @@ -232,7 +232,7 @@ check_toggled (GtkToggleButton *button, GnomeDruid *druid) { GtkWidget *box = g_object_get_data ((GObject *)button, "box"); gboolean state = gtk_toggle_button_get_active ((GtkToggleButton *)button); - char *prevfile = g_object_get_data ((GObject *)druid, "restore-file"); + gchar *prevfile = g_object_get_data ((GObject *)druid, "restore-file"); gtk_widget_set_sensitive (box, state); gnome_druid_set_show_finish (druid, state); @@ -249,7 +249,7 @@ static void restore_wizard (GnomeDruidPage *druidpage, GnomeDruid *druid, gpointer user_data) { gboolean state = GPOINTER_TO_INT(g_object_get_data((GObject *)druid, "restore")) ? TRUE:FALSE; - char *file = g_object_get_data ((GObject *)druid, "restore-file"); + gchar *file = g_object_get_data ((GObject *)druid, "restore-file"); if (state) { if (!file ||!sanity_check (file)) { @@ -263,8 +263,8 @@ restore_wizard (GnomeDruidPage *druidpage, GnomeDruid *druid, gpointer user_data static void file_changed (GtkFileChooser *chooser, GnomeDruid *druid) { - char *file = NULL, *prevfile=NULL; - char *uri = NULL; + gchar *file = NULL, *prevfile=NULL; + gchar *uri = NULL; uri = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER (chooser)); e_file_update_save_path(uri, TRUE); diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c index 19e9e98bb1..67dea3e6a3 100644 --- a/plugins/backup-restore/backup.c +++ b/plugins/backup-restore/backup.c @@ -43,18 +43,18 @@ #define ARCHIVE_NAME "evolution-backup.tar.gz" static gboolean backup_op = FALSE; -static char *bk_file = NULL; +static gchar *bk_file = NULL; static gboolean restore_op = FALSE; -static char *res_file = NULL; +static gchar *res_file = NULL; static gboolean check_op = FALSE; -static char *chk_file = NULL; +static gchar *chk_file = NULL; static gboolean restart_arg = FALSE; static gboolean gui_arg = FALSE; static gchar **opt_remaining = NULL; -static int result=0; +static gint result=0; static GtkWidget *progress_dialog; static GtkWidget *pbar; -static char *txt = NULL; +static gchar *txt = NULL; gboolean complete = FALSE; static GOptionEntry options[] = { @@ -80,11 +80,11 @@ static GOptionEntry options[] = { #define CANCEL(x) if (x) return; static GString * -replace_string (const char *text, const char *find, const char *replace) +replace_string (const gchar *text, const gchar *find, const gchar *replace) { - const char *p, *next; + const gchar *p, *next; GString *str; - int find_len; + gint find_len; g_return_val_if_fail (text != NULL, NULL); g_return_val_if_fail (find != NULL, NULL); @@ -110,9 +110,9 @@ replace_string (const char *text, const char *find, const char *replace) } static void -replace_in_file (const char *filename, const char *find, const char *replace) +replace_in_file (const gchar *filename, const gchar *find, const gchar *replace) { - char *content = NULL; + gchar *content = NULL; GError *error = NULL; GString *filenamestr = NULL; @@ -157,7 +157,7 @@ replace_in_file (const char *filename, const char *find, const char *replace) } static void -run_cmd (const char *cmd) +run_cmd (const gchar *cmd) { if (!cmd) return; @@ -175,10 +175,10 @@ run_cmd (const char *cmd) } static void -backup (const char *filename) +backup (const gchar *filename) { - char *command; - char *quotedfname; + gchar *command; + gchar *quotedfname; g_return_if_fail (filename && *filename); quotedfname = g_shell_quote(filename); @@ -222,10 +222,10 @@ backup (const char *filename) } static void -restore (const char *filename) +restore (const gchar *filename) { - char *command; - char *quotedfname; + gchar *command; + gchar *quotedfname; g_return_if_fail (filename && *filename); quotedfname = g_shell_quote(filename); @@ -274,10 +274,10 @@ restore (const char *filename) } static void -check (const char *filename) +check (const gchar *filename) { - char *command; - char *quotedfname; + gchar *command; + gchar *quotedfname; g_return_if_fail (filename && *filename); quotedfname = g_shell_quote(filename); @@ -359,10 +359,10 @@ dlg_response (GtkWidget *dlg, gint response, gpointer data) gtk_main_quit (); } -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { - char *file = NULL, *oper = NULL; + gchar *file = NULL, *oper = NULL; gint i; GError *error = NULL; @@ -384,17 +384,17 @@ main (int argc, char **argv) for (i = 0; i < g_strv_length (opt_remaining); i++) { if (backup_op) { oper = _("Backing up to the folder %s"); - d(g_message ("Backing up to the folder %s", (char *) opt_remaining[i])); - bk_file = g_strdup ((char *) opt_remaining[i]); + d(g_message ("Backing up to the folder %s", (gchar *) opt_remaining[i])); + bk_file = g_strdup ((gchar *) opt_remaining[i]); file = bk_file; } else if (restore_op) { oper = _("Restoring from the folder %s"); - d(g_message ("Restoring from the folder %s", (char *) opt_remaining[i])); - res_file = g_strdup ((char *) opt_remaining[i]); + d(g_message ("Restoring from the folder %s", (gchar *) opt_remaining[i])); + res_file = g_strdup ((gchar *) opt_remaining[i]); file = res_file; } else if (check_op) { - d(g_message ("Checking %s", (char *) opt_remaining[i])); - chk_file = g_strdup ((char *) opt_remaining[i]); + d(g_message ("Checking %s", (gchar *) opt_remaining[i])); + chk_file = g_strdup ((gchar *) opt_remaining[i]); } } } diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index 2f375ac43b..8cd8535a73 100644 --- a/plugins/bbdb/bbdb.c +++ b/plugins/bbdb/bbdb.c @@ -42,7 +42,7 @@ #define d(x) /* Plugin hooks */ -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); void bbdb_handle_send (EPlugin *ep, EMEventTargetComposer *target); GtkWidget *bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data); @@ -59,11 +59,11 @@ struct bbdb_stuff { /* Static forward declarations */ static gboolean bbdb_timeout (gpointer data); -static void bbdb_do_it (EBook *book, const char *name, const char *email); -static void add_email_to_contact (EContact *contact, const char *email); +static void bbdb_do_it (EBook *book, const gchar *name, const gchar *email); +static void add_email_to_contact (EContact *contact, const gchar *email); static void enable_toggled_cb (GtkWidget *widget, gpointer data); static void source_changed_cb (ESourceComboBox *source_combo_box, struct bbdb_stuff *stuff); -static GtkWidget *create_addressbook_option_menu (struct bbdb_stuff *stuff, int type); +static GtkWidget *create_addressbook_option_menu (struct bbdb_stuff *stuff, gint type); static void cleanup_cb (GObject *o, gpointer data); static ESource * @@ -105,8 +105,8 @@ find_esource_by_uri (ESourceList *source_list, const gchar *target_uri) return NULL; } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { /* Start up the plugin. */ if (enable) { @@ -134,8 +134,8 @@ bbdb_timeout (gpointer data) typedef struct { - char *name; - char *email; + gchar *name; + gchar *email; } todo_struct; static void @@ -192,7 +192,7 @@ bbdb_do_in_thread (gpointer data) } static void -bbdb_do_thread (const char *name, const char *email) +bbdb_do_thread (const gchar *name, const gchar *email) { todo_struct *td; @@ -271,9 +271,9 @@ bbdb_handle_send (EPlugin *ep, EMEventTargetComposer *target) } static void -bbdb_do_it (EBook *book, const char *name, const char *email) +bbdb_do_it (EBook *book, const gchar *name, const gchar *email) { - char *query_string, *delim, *temp_name = NULL; + gchar *query_string, *delim, *temp_name = NULL; EBookQuery *query; GList *contacts, *l; EContact *contact; @@ -375,10 +375,10 @@ bbdb_do_it (EBook *book, const char *name, const char *email) } EBook * -bbdb_open_addressbook (int type) +bbdb_open_addressbook (gint type) { GConfClient *gconf; - char *uri; + gchar *uri; EBook *book = NULL; gboolean status; @@ -439,7 +439,7 @@ bbdb_check_gaim_enabled (void) } static void -add_email_to_contact (EContact *contact, const char *email) +add_email_to_contact (EContact *contact, const gchar *email) { GList *emails; @@ -497,7 +497,7 @@ enable_gaim_toggled_cb (GtkWidget *widget, gpointer data) struct bbdb_stuff *stuff = (struct bbdb_stuff *) data; gboolean active; ESource *selected_source; - char *addressbook_gaim; + gchar *addressbook_gaim; active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); @@ -562,12 +562,12 @@ gaim_source_changed_cb (ESourceComboBox *source_combo_box, } static GtkWidget * -create_addressbook_option_menu (struct bbdb_stuff *stuff, int type) +create_addressbook_option_menu (struct bbdb_stuff *stuff, gint type) { GtkWidget *combo_box; ESourceList *source_list; ESource *selected_source; - char *selected_source_uri; + gchar *selected_source_uri; GConfClient *gconf = stuff->target->gconf; diff --git a/plugins/bbdb/bbdb.h b/plugins/bbdb/bbdb.h index 62887a8ed0..994aab0385 100644 --- a/plugins/bbdb/bbdb.h +++ b/plugins/bbdb/bbdb.h @@ -36,7 +36,7 @@ #define BBDB_BLIST_CHECK_INTERVAL (2 * 60) /* bbdb.c */ -EBook *bbdb_open_addressbook (int type); +EBook *bbdb_open_addressbook (gint type); gboolean bbdb_check_gaim_enabled (void); /* gaimbuddies.c */ diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c index d23749de66..f50498fc48 100644 --- a/plugins/bbdb/gaimbuddies.c +++ b/plugins/bbdb/gaimbuddies.c @@ -50,20 +50,20 @@ #include "bbdb.h" typedef struct { - char *account_name; - char *proto; - char *alias; - char *icon; + gchar *account_name; + gchar *proto; + gchar *alias; + gchar *icon; } GaimBuddy; /* Forward declarations for this file. */ static gboolean bbdb_merge_buddy_to_contact (EBook *book, GaimBuddy *b, EContact *c); static GList *bbdb_get_gaim_buddy_list (void); -static char *get_node_text (xmlNodePtr node); -static char *get_buddy_icon_from_setting (xmlNodePtr setting); +static gchar *get_node_text (xmlNodePtr node); +static gchar *get_buddy_icon_from_setting (xmlNodePtr setting); static void free_buddy_list (GList *blist); static void parse_buddy_group (xmlNodePtr group, GList **buddies, GSList *blocked); -static EContactField proto_to_contact_field (const char *proto); +static EContactField proto_to_contact_field (const gchar *proto); void bbdb_sync_buddy_list_check (void) @@ -71,8 +71,8 @@ bbdb_sync_buddy_list_check (void) GConfClient *gconf; struct stat statbuf; time_t last_sync; - char *blist_path; - char *last_sync_str; + gchar *blist_path; + gchar *last_sync_str; gconf = gconf_client_get_default (); @@ -87,7 +87,7 @@ bbdb_sync_buddy_list_check (void) /* Reprocess the buddy list if it's been updated. */ last_sync_str = gconf_client_get_string (gconf, GCONF_KEY_GAIM_LAST_SYNC, NULL); - if (last_sync_str == NULL || ! strcmp ((const char *)last_sync_str, "")) + if (last_sync_str == NULL || ! strcmp ((const gchar *)last_sync_str, "")) last_sync = (time_t) 0; else last_sync = (time_t) g_ascii_strtoull (last_sync_str, NULL, 10); @@ -179,7 +179,7 @@ bbdb_sync_buddy_list (void) { GConfClient *gconf; time_t last_sync; - char *last_sync_str; + gchar *last_sync_str; gconf = gconf_client_get_default (); @@ -199,7 +199,7 @@ im_list_contains_buddy (GList *ims, GaimBuddy *b) GList *l; for (l = ims; l != NULL; l = l->next) { - char *im = (char *) l->data; + gchar *im = (gchar *) l->data; if (! strcmp (im, b->account_name)) return TRUE; @@ -241,12 +241,12 @@ bbdb_merge_buddy_to_contact (EBook *book, GaimBuddy *b, EContact *c) g_warning ("bbdb: Could not read buddy icon: %s\n", error->message); g_error_free (error); for (l = ims; l != NULL; l = l->next) - g_free ((char *) l->data); + g_free ((gchar *) l->data); g_list_free (ims); return dirty; } - photo->data.inlined.data = (unsigned char *)contents; + photo->data.inlined.data = (guchar *)contents; e_contact_set (c, E_CONTACT_PHOTO, (gpointer) photo); dirty = TRUE; } @@ -257,14 +257,14 @@ bbdb_merge_buddy_to_contact (EBook *book, GaimBuddy *b, EContact *c) e_contact_photo_free (photo); for (l = ims; l != NULL; l = l->next) - g_free ((char *) l->data); + g_free ((gchar *) l->data); g_list_free (ims); return dirty; } static EContactField -proto_to_contact_field (const char *proto) +proto_to_contact_field (const gchar *proto) { if (! strcmp (proto, "prpl-oscar")) return E_CONTACT_IM_AIM; @@ -296,8 +296,8 @@ get_all_blocked (xmlNodePtr node, GSList **blocked) if (child->children) get_all_blocked (child, blocked); - if (!strcmp ((const char *)child->name, "block")) { - char *name = get_node_text (child); + if (!strcmp ((const gchar *)child->name, "block")) { + gchar *name = get_node_text (child); if (name) *blocked = g_slist_prepend (*blocked, name); @@ -308,7 +308,7 @@ get_all_blocked (xmlNodePtr node, GSList **blocked) static GList * bbdb_get_gaim_buddy_list (void) { - char *blist_path; + gchar *blist_path; xmlDocPtr buddy_xml; xmlNodePtr root, child, blist; GList *buddies = NULL; @@ -324,14 +324,14 @@ bbdb_get_gaim_buddy_list (void) } root = xmlDocGetRootElement (buddy_xml); - if (strcmp ((const char *)root->name, "purple")) { + if (strcmp ((const gchar *)root->name, "purple")) { fprintf (stderr, "bbdb: Could not parse Pidgin buddy list.\n"); xmlFreeDoc (buddy_xml); return NULL; } for (child = root->children; child != NULL; child = child->next) { - if (! strcmp ((const char *)child->name, "privacy")) { + if (! strcmp ((const gchar *)child->name, "privacy")) { get_all_blocked (child, &blocked); break; } @@ -339,7 +339,7 @@ bbdb_get_gaim_buddy_list (void) blist = NULL; for (child = root->children; child != NULL; child = child->next) { - if (! strcmp ((const char *)child->name, "blist")) { + if (! strcmp ((const gchar *)child->name, "blist")) { blist = child; break; } @@ -351,7 +351,7 @@ bbdb_get_gaim_buddy_list (void) } for (child = blist->children; child != NULL; child = child->next) { - if (! strcmp ((const char *)child->name, "group")) + if (! strcmp ((const gchar *)child->name, "group")) parse_buddy_group (child, &buddies, blocked); } @@ -383,24 +383,24 @@ free_buddy_list (GList *blist) g_list_free (blist); } -static char * +static gchar * get_node_text (xmlNodePtr node) { if (node->children == NULL || node->children->content == NULL || - strcmp ((char *)node->children->name, "text")) + strcmp ((gchar *)node->children->name, "text")) return NULL; - return g_strdup ((char *)node->children->content); + return g_strdup ((gchar *)node->children->content); } -static char * +static gchar * get_buddy_icon_from_setting (xmlNodePtr setting) { - char *icon = NULL; + gchar *icon = NULL; icon = get_node_text (setting); if (icon [0] != '/') { - char *path; + gchar *path; path = g_build_path ("/", getenv ("HOME"), ".purple/icons", icon, NULL); g_free (icon); @@ -420,7 +420,7 @@ parse_contact (xmlNodePtr contact, GList **buddies, GSList *blocked) gboolean is_blocked = FALSE; for (child = contact->children; child != NULL; child = child->next) { - if (! strcmp ((const char *)child->name, "buddy")) { + if (! strcmp ((const gchar *)child->name, "buddy")) { buddy = child; break; } @@ -433,21 +433,21 @@ parse_contact (xmlNodePtr contact, GList **buddies, GSList *blocked) gb = g_new0 (GaimBuddy, 1); - gb->proto = e_xml_get_string_prop_by_name (buddy, (const unsigned char *)"proto"); + gb->proto = e_xml_get_string_prop_by_name (buddy, (const guchar *)"proto"); for (child = buddy->children; child != NULL && !is_blocked; child = child->next) { - if (! strcmp ((const char *)child->name, "setting")) { - char *setting_type; - setting_type = e_xml_get_string_prop_by_name (child, (const unsigned char *)"name"); + if (! strcmp ((const gchar *)child->name, "setting")) { + gchar *setting_type; + setting_type = e_xml_get_string_prop_by_name (child, (const guchar *)"name"); - if (! strcmp ((const char *)setting_type, "buddy_icon")) + if (! strcmp ((const gchar *)setting_type, "buddy_icon")) gb->icon = get_buddy_icon_from_setting (child); g_free (setting_type); - } else if (! strcmp ((const char *)child->name, "name")) { + } else if (! strcmp ((const gchar *)child->name, "name")) { gb->account_name = get_node_text (child); is_blocked = g_slist_find_custom (blocked, gb->account_name, (GCompareFunc)strcmp) != NULL; - } else if (! strcmp ((const char *)child->name, "alias")) + } else if (! strcmp ((const gchar *)child->name, "alias")) gb->alias = get_node_text (child); } @@ -464,7 +464,7 @@ parse_buddy_group (xmlNodePtr group, GList **buddies, GSList *blocked) xmlNodePtr child; for (child = group->children; child != NULL; child = child->next) { - if (strcmp ((const char *)child->name, "contact")) + if (strcmp ((const gchar *)child->name, "contact")) continue; parse_contact (child, buddies, blocked); diff --git a/plugins/bbdb/test-evobuddy.c b/plugins/bbdb/test-evobuddy.c index 9d14aabebe..8d8486ac73 100644 --- a/plugins/bbdb/test-evobuddy.c +++ b/plugins/bbdb/test-evobuddy.c @@ -22,7 +22,7 @@ void bbdb_sync_buddy_list (void); -int +gint main (void) { printf ("Syncing...\n"); diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c index 77aa377751..105d97e245 100644 --- a/plugins/bogo-junk-plugin/bf-junk-filter.c +++ b/plugins/bogo-junk-plugin/bf-junk-filter.c @@ -73,14 +73,14 @@ GtkWidget * org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfi /* plugin fonction prototypes */ gboolean em_junk_bf_check_junk (EPlugin *ep, EMJunkHookTarget *target); -void *em_junk_bf_validate_binary (EPlugin *ep, EMJunkHookTarget *target); +gpointer em_junk_bf_validate_binary (EPlugin *ep, EMJunkHookTarget *target); void em_junk_bf_report_junk (EPlugin *ep, EMJunkHookTarget *target); void em_junk_bf_report_non_junk (EPlugin *ep, EMJunkHookTarget *target); void em_junk_bf_commit_reports (EPlugin *ep, EMJunkHookTarget *target); static gint pipe_to_bogofilter (CamelMimeMessage *msg, const gchar **argv, GError **error); /* eplugin stuff */ -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); #define EM_JUNK_BF_GCONF_DIR_LENGTH (G_N_ELEMENTS (em_junk_bf_gconf_dir) - 1) @@ -132,7 +132,7 @@ pipe_to_bogofilter (CamelMimeMessage *msg, const gchar **argv, GError **error) retry: if (camel_debug_start ("junk")) { - int i; + gint i; printf ("pipe_to_bogofilter "); for (i = 0; argv[i]; i++) @@ -221,7 +221,7 @@ em_junk_bf_setting_notify (GConfClient *gconf, GConfEntry *entry, void *data) { - const char *key; + const gchar *key; GConfValue *value; value = gconf_entry_get_value (entry); @@ -247,7 +247,7 @@ gboolean em_junk_bf_check_junk (EPlugin *ep, EMJunkHookTarget *target) { CamelMimeMessage *msg = target->m; - int rv; + gint rv; const gchar *argv[] = { em_junk_bf_binary, @@ -315,14 +315,14 @@ em_junk_bf_commit_reports (EPlugin *ep, EMJunkHookTarget *target) { } -void * +gpointer em_junk_bf_validate_binary (EPlugin *ep, EMJunkHookTarget *target) { - return g_file_test (em_junk_bf_binary, G_FILE_TEST_EXISTS) ? (void *) "1" : NULL; + return g_file_test (em_junk_bf_binary, G_FILE_TEST_EXISTS) ? (gpointer) "1" : NULL; } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { GConfClient *gconf; diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c index 1dd5ae35b5..76d19a9929 100644 --- a/plugins/caldav/caldav-source.c +++ b/plugins/caldav/caldav-source.c @@ -42,8 +42,8 @@ /*****************************************************************************/ /* prototypes */ -int e_plugin_lib_enable (EPluginLib *ep, - int enable); +gint e_plugin_lib_enable (EPluginLib *ep, + gint enable); GtkWidget * oge_caldav (EPlugin *epl, EConfigHookItemFactoryData *data); @@ -65,8 +65,8 @@ ensure_caldav_source_group (ECalSourceType source_type) g_object_unref (slist); } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { if (enable) { @@ -80,17 +80,17 @@ e_plugin_lib_enable (EPluginLib *ep, int enable) } /* replaces all '@' with '%40' in str; returns newly allocated string */ -static char * -replace_at_sign (const char *str) +static gchar * +replace_at_sign (const gchar *str) { - char *res, *at; + gchar *res, *at; if (!str) return NULL; res = g_strdup (str); while (at = strchr (res, '@'), at) { - char *tmp = g_malloc0 (sizeof (char) * (1 + strlen (res) + 2)); + gchar *tmp = g_malloc0 (sizeof (char) * (1 + strlen (res) + 2)); strncpy (tmp, res, at - res); strcat (tmp, "%40"); @@ -160,8 +160,8 @@ static void location_changed (GtkEntry *editable, ESource *source) { EUri *euri; - char *ruri; - const char *uri, *username; + gchar *ruri; + const gchar *uri, *username; uri = gtk_entry_get_text (GTK_ENTRY (editable)); @@ -194,9 +194,9 @@ static void user_changed (GtkEntry *editable, ESource *source) { EUri *euri; - char *uri; - char *ruri; - const char *user; + gchar *uri; + gchar *ruri; + const gchar *user; uri = e_source_get_uri (source); user = gtk_entry_get_text (GTK_ENTRY (editable)); @@ -227,9 +227,9 @@ user_changed (GtkEntry *editable, ESource *source) static void set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { - int time; - int item_num = 0; - const char *refresh_str = e_source_get_property (source, "refresh"); + gint time; + gint item_num = 0; + const gchar *refresh_str = e_source_get_property (source, "refresh"); time = refresh_str ? atoi (refresh_str) : 30; if (time && !(time % 10080)) { @@ -249,10 +249,10 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } -static char * +static gchar * get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { - int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); + gint setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ @@ -280,7 +280,7 @@ get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) static void spin_changed (GtkSpinButton *spin, ESource *source) { - char *refresh_str; + gchar *refresh_str; GtkWidget *combobox; combobox = g_object_get_data (G_OBJECT (spin), "combobox"); @@ -293,7 +293,7 @@ spin_changed (GtkSpinButton *spin, ESource *source) static void combobox_changed (GtkComboBox *combobox, ESource *source) { - char *refresh_str; + gchar *refresh_str; GtkWidget *spin; spin = g_object_get_data (G_OBJECT (combobox), "spin"); @@ -319,11 +319,11 @@ oge_caldav (EPlugin *epl, GtkWidget *luser; GtkWidget *user; GtkWidget *label, *hbox, *spin, *combobox; - char *uri; - char *username; - const char *ssl_prop; + gchar *uri; + gchar *username; + const gchar *ssl_prop; gboolean ssl_enabled; - int row; + gint row; source = t->source; group = e_source_peek_group (source); diff --git a/plugins/calendar-file/calendar-file.c b/plugins/calendar-file/calendar-file.c index 6670d23293..9d21d62688 100644 --- a/plugins/calendar-file/calendar-file.c +++ b/plugins/calendar-file/calendar-file.c @@ -34,8 +34,8 @@ e_calendar_file_dummy (EPlugin *epl, EConfigHookItemFactoryData *data) { ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; - char *uri_text; - const char *relative_uri; + gchar *uri_text; + const gchar *relative_uri; uri_text = e_source_get_uri (source); if (strncmp (uri_text, "file", 4)) { diff --git a/plugins/calendar-http/calendar-http.c b/plugins/calendar-http/calendar-http.c index 7814ef5ea0..e6d4aee6a2 100644 --- a/plugins/calendar-http/calendar-http.c +++ b/plugins/calendar-http/calendar-http.c @@ -72,7 +72,7 @@ static void url_changed (GtkEntry *entry, ESource *source) { EUri *uri; - char *relative_uri; + gchar *relative_uri; uri = e_uri_new (gtk_entry_get_text (GTK_ENTRY (entry))); @@ -96,10 +96,10 @@ e_calendar_http_url (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; GtkWidget *entry, *parent; - int row; + gint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; EUri *uri; - char *uri_text; + gchar *uri_text; static GtkWidget *hidden = NULL; if (!hidden) @@ -142,9 +142,9 @@ e_calendar_http_url (EPlugin *epl, EConfigHookItemFactoryData *data) static void set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { - int time; - int item_num = 0; - const char *refresh_str = e_source_get_property (source, "refresh"); + gint time; + gint item_num = 0; + const gchar *refresh_str = e_source_get_property (source, "refresh"); time = refresh_str ? atoi (refresh_str) : 30; if (time && !(time % 10080)) { @@ -164,10 +164,10 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } -static char * +static gchar * get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { - int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); + gint setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ @@ -195,7 +195,7 @@ get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { - char *refresh_str; + gchar *refresh_str; GtkWidget *combobox; combobox = g_object_get_data (G_OBJECT (spin), "combobox"); @@ -208,7 +208,7 @@ spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) static void combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { - char *refresh_str; + gchar *refresh_str; GtkWidget *spin; spin = g_object_get_data (G_OBJECT (combobox), "spin"); @@ -232,11 +232,11 @@ e_calendar_http_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; GtkWidget *combobox, *spin, *hbox, *parent; - int row; + gint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; - char* uri_text; + gchar * uri_text; static GtkWidget *hidden = NULL; if (!hidden) @@ -297,10 +297,10 @@ e_calendar_http_secure (EPlugin *epl, EConfigHookItemFactoryData *data) { ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; GtkWidget *secure_setting, *parent; - const char *secure_prop; - int row; + const gchar *secure_prop; + gint row; EUri *uri; - char* uri_text; + gchar * uri_text; static GtkWidget *hidden = NULL; if (!hidden) @@ -358,11 +358,11 @@ e_calendar_http_auth (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; GtkWidget *entry, *parent; - int row; + gint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; EUri *uri; - char *uri_text; - const char *username; + gchar *uri_text; + const gchar *username; static GtkWidget *hidden = NULL; if (!hidden) @@ -412,7 +412,7 @@ e_calendar_http_check (EPlugin *epl, EConfigHookPageCheckData *data) EUri *uri; gboolean ok = FALSE; ESourceGroup *group = e_source_peek_group (t->source); - char *uri_text; + gchar *uri_text; if (strncmp (e_source_group_peek_base_uri (group), "webcal", 6)) return TRUE; diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c index 9354cbb0b1..694effccaa 100644 --- a/plugins/calendar-weather/calendar-weather.c +++ b/plugins/calendar-weather/calendar-weather.c @@ -43,20 +43,20 @@ GtkWidget *e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData GtkWidget *e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data); gboolean e_calendar_weather_check (EPlugin *epl, EConfigHookPageCheckData *data); void e_calendar_weather_migrate (EPlugin *epl, ECalEventTargetComponent *data); -int e_plugin_lib_enable (EPluginLib *epl, int enable); +gint e_plugin_lib_enable (EPluginLib *epl, gint enable); #define WEATHER_BASE_URI "weather://" -int -e_plugin_lib_enable (EPluginLib *epl, int enable) +gint +e_plugin_lib_enable (EPluginLib *epl, gint enable) { GList *l; gboolean found = FALSE; - const char *tmp; + const gchar *tmp; static struct { - const char *description; - const char *icon_name; + const gchar *description; + const gchar *icon_name; } categories[] = { { N_("Weather: Fog"), "weather-fog" }, { N_("Weather: Cloudy"), "weather-few-clouds" }, @@ -74,17 +74,17 @@ e_plugin_lib_enable (EPluginLib *epl, int enable) /* Add the categories icons if we don't have them. */ for (l = e_categories_get_list (); l; l = g_list_next (l)) { - if (!strcmp ((const char *)l->data, tmp)) { + if (!strcmp ((const gchar *)l->data, tmp)) { found = TRUE; break; } } if (!found) { - int i; + gint i; for (i = 0; categories[i].description; i++) { - char *filename; + gchar *filename; filename = e_icon_factory_get_icon_filename (categories[i].icon_name, GTK_ICON_SIZE_MENU); e_categories_add (_(categories[i].description), NULL, filename, FALSE); @@ -330,7 +330,7 @@ location_clicked (GtkButton *button, ESource *source) label = GTK_WIDGET (gtk_bin_get_child (GTK_BIN (button))); text = gtk_label_get_text (GTK_LABEL (label)); - if (strcmp ((const char *)text, _("None")) == 0) + if (strcmp ((const gchar *)text, _("None")) == 0) e_source_set_relative_uri (source, ""); } @@ -342,11 +342,11 @@ e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; GtkWidget *button, *parent, *text; - int row; + gint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; - char *uri_text; + gchar *uri_text; static GtkWidget *hidden; if (store == NULL) @@ -360,7 +360,7 @@ e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data) uri_text = e_source_get_uri (t->source); uri = e_uri_new (uri_text); - if (strcmp ((const char *)uri->protocol, "weather")) { + if (strcmp ((const gchar *)uri->protocol, "weather")) { e_uri_free (uri); return hidden; } @@ -399,9 +399,9 @@ e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data) static void set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { - int time; - int item_num = 0; - const char *refresh_str = e_source_get_property (source, "refresh"); + gint time; + gint item_num = 0; + const gchar *refresh_str = e_source_get_property (source, "refresh"); time = refresh_str ? atoi (refresh_str) : 30; if (time && !(time % 10080)) { @@ -421,10 +421,10 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } -static char * +static gchar * get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { - int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); + gint setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ @@ -451,7 +451,7 @@ get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { - char *refresh_str; + gchar *refresh_str; GtkWidget *combobox; combobox = g_object_get_data (G_OBJECT (spin), "combobox"); @@ -464,7 +464,7 @@ spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) static void combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { - char *refresh_str; + gchar *refresh_str; GtkWidget *spin; spin = g_object_get_data (G_OBJECT (combobox), "spin"); @@ -479,11 +479,11 @@ e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; GtkWidget *spin, *combobox, *hbox, *parent; - int row; + gint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; - char *uri_text; + gchar *uri_text; static GtkWidget *hidden = NULL; if (!hidden) @@ -495,7 +495,7 @@ e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) uri_text = e_source_get_uri (t->source); uri = e_uri_new (uri_text); g_free (uri_text); - if (strcmp ((const char *)uri->protocol, "weather")) { + if (strcmp ((const gchar *)uri->protocol, "weather")) { e_uri_free (uri); return hidden; } @@ -540,13 +540,13 @@ e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) static void set_units (ESource *source, GtkWidget *combobox) { - const char *format = e_source_get_property (source, "units"); + const gchar *format = e_source_get_property (source, "units"); if (format == NULL) { format = e_source_get_property (source, "temperature"); if (format == NULL) { e_source_set_property (source, "units", "metric"); gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); - } else if (strcmp ((const char *)format, "fahrenheit") == 0) { + } else if (strcmp ((const gchar *)format, "fahrenheit") == 0) { /* old format, convert */ e_source_set_property (source, "units", "imperial"); gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 1); @@ -555,7 +555,7 @@ set_units (ESource *source, GtkWidget *combobox) gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); } } else { - if (strcmp ((const char *)format, "metric") == 0) + if (strcmp ((const gchar *)format, "metric") == 0) gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); else gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 1); @@ -565,7 +565,7 @@ set_units (ESource *source, GtkWidget *combobox) static void units_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { - int choice = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox)); + gint choice = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox)); if (choice == 0) e_source_set_property (t->source, "units", "metric"); else @@ -577,11 +577,11 @@ e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; GtkWidget *combobox, *parent; - int row; + gint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; - char *uri_text; + gchar *uri_text; static GtkWidget *hidden = NULL; if (!hidden) @@ -593,7 +593,7 @@ e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data) uri_text = e_source_get_uri (t->source); uri = e_uri_new (uri_text); g_free (uri_text); - if (strcmp ((const char *)uri->protocol, "weather")) { + if (strcmp ((const gchar *)uri->protocol, "weather")) { e_uri_free (uri); return hidden; } diff --git a/plugins/copy-tool/copy-tool.c b/plugins/copy-tool/copy-tool.c index 1f33ba71db..769bd00431 100644 --- a/plugins/copy-tool/copy-tool.c +++ b/plugins/copy-tool/copy-tool.c @@ -39,17 +39,17 @@ #include "camel/camel-internet-address.h" #include "camel/camel-url.h" -void org_gnome_copy_tool_copy_address(void *ep, EMPopupTargetURI *t); +void org_gnome_copy_tool_copy_address(gpointer ep, EMPopupTargetURI *t); void -org_gnome_copy_tool_copy_address(void *ep, EMPopupTargetURI *t) +org_gnome_copy_tool_copy_address(gpointer ep, EMPopupTargetURI *t) { if (t->uri) { CamelInternetAddress *cia = camel_internet_address_new(); CamelURL *curl; GtkClipboard *clipboard; - char *addr; - const char *tmp; + gchar *addr; + const gchar *tmp; curl = camel_url_new(t->uri, NULL); camel_address_decode((CamelAddress *)cia, curl->path); diff --git a/plugins/default-source/default-source.c b/plugins/default-source/default-source.c index a3611cc730..3f2c4635d5 100644 --- a/plugins/default-source/default-source.c +++ b/plugins/default-source/default-source.c @@ -94,10 +94,10 @@ org_gnome_default_book (EPlugin *epl, EConfigHookItemFactoryData *data) return widget; } -static const char * +static const gchar * get_calendar_option_caption (ECalSourceType source_type) { - const char *res = "???"; + const gchar *res = "???"; switch (source_type) { case E_CAL_SOURCE_TYPE_EVENT: res = _("Mark as _default calendar"); break; @@ -117,7 +117,7 @@ org_gnome_default_cal (EPlugin *epl, EConfigHookItemFactoryData *data) GtkWidget *widget; ESource *source; ECalConfigTargetSource *cal_target; - int i; + gint i; if (data->old) return data->old; diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c index 7b065e0de5..10d812368d 100644 --- a/plugins/email-custom-header/email-custom-header.c +++ b/plugins/email-custom-header/email-custom-header.c @@ -70,7 +70,7 @@ struct _EmailCustomHeaderOptionsDialogPrivate { GArray *email_custom_header_details; GArray *header_index_type; gint flag; - char *help_section; + gchar *help_section; }; /* epech - e-plugin email custom header*/ @@ -81,13 +81,13 @@ static void epech_dialog_dispose (GObject *object); static void epech_setup_widgets (CustomHeaderOptionsDialog *mch); static gint epech_check_existing_composer_window(gconstpointer a, gconstpointer b); static void commit_changes (ConfigData *cd); -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); GtkWidget *e_plugin_lib_get_configure_widget (EPlugin *epl); gboolean e_plugin_ui_init(GtkUIManager *ui_manager, EMsgComposer *composer); GtkWidget *org_gnome_email_custom_header_config_option (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data); -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { return 0; } @@ -274,14 +274,14 @@ epech_get_header_list (CustomHeaderOptionsDialog *mch) } static void -epech_load_from_gconf (GConfClient *client,const char *path,CustomHeaderOptionsDialog *mch) +epech_load_from_gconf (GConfClient *client,const gchar *path,CustomHeaderOptionsDialog *mch) { EmailCustomHeaderOptionsDialogPrivate *priv; EmailCustomHeaderDetails temp_header_details= {-1, -1, NULL, NULL}; CustomSubHeader temp_header_value_details = {NULL}; GSList *header_list,*q; gchar *buffer; - char *str_colon; + gchar *str_colon; gint index,pos; priv = mch->priv; @@ -641,8 +641,8 @@ static void header_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, ConfigData *cd) { GtkTreeSelection *selection; - char *keyword = NULL; - char *value = NULL; + gchar *keyword = NULL; + gchar *value = NULL; gboolean valid; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (cd->treeview)); @@ -677,8 +677,8 @@ header_foreach_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIte valid = gtk_tree_model_get_iter_first (model, iter); while (valid && gtk_list_store_iter_is_valid (cd->store, iter)) { - char *keyword = NULL; - char *value = NULL; + gchar *keyword = NULL; + gchar *value = NULL; gtk_tree_model_get (model, iter, HEADER_KEY_COLUMN, &keyword, -1); /* Check if the keyword is not empty and then emit the row-changed signal (if we delete the row, then the iter gets corrupted) */ @@ -879,15 +879,15 @@ e_plugin_lib_get_configure_widget (EPlugin *epl) GtkTreeModel *model; gint index; gchar *buffer; - char *str_colon = NULL, *str1_colon = NULL; + gchar *str_colon = NULL, *str1_colon = NULL; GtkTreeViewColumn *col; - int col_pos; + gint col_pos; GConfClient *client = gconf_client_get_default(); ConfigData *cd = g_new0 (ConfigData, 1); - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "email-custom-header.glade", diff --git a/plugins/email-custom-header/email-custom-header.h b/plugins/email-custom-header/email-custom-header.h index 30e0f7061a..9bba66d655 100644 --- a/plugins/email-custom-header/email-custom-header.h +++ b/plugins/email-custom-header/email-custom-header.h @@ -82,6 +82,6 @@ GType epech_dialog_get_type (void); CustomHeaderOptionsDialog *epech_dialog_new (void); static gboolean epech_dialog_run (CustomHeaderOptionsDialog *mch, GtkWidget *parent); static void epech_get_header_list (CustomHeaderOptionsDialog *mch); -static void epech_load_from_gconf (GConfClient *client,const char *path,CustomHeaderOptionsDialog *mch); +static void epech_load_from_gconf (GConfClient *client,const gchar *path,CustomHeaderOptionsDialog *mch); #endif diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c index 2c08341ef3..53af222142 100644 --- a/plugins/exchange-operations/exchange-account-setup.c +++ b/plugins/exchange-operations/exchange-account-setup.c @@ -83,7 +83,7 @@ CamelServiceAuthType camel_exchange_password_authtype = { typedef struct { gboolean state; - char *message; + gchar *message; GtkWidget *text_view; }OOFData; @@ -119,7 +119,7 @@ static void btn_chpass_clicked (GtkButton *button, gpointer data) { ExchangeAccount *account; - char *old_password, *new_password; + gchar *old_password, *new_password; ExchangeAccountResult result; account = exchange_operations_get_exchange_account (); @@ -178,8 +178,8 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) EMConfigTargetAccount *target_account; ExchangeAccount *account = NULL; CamelURL *url; - const char *source_url; - char *message = NULL, *txt = NULL, *oof_message; + const gchar *source_url; + gchar *message = NULL, *txt = NULL, *oof_message; gboolean oof_state = FALSE; gint offline_status; @@ -386,7 +386,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data) } static void -print_error (const char *owa_url, E2kAutoconfigResult result) +print_error (const gchar *owa_url, E2kAutoconfigResult result) { switch (result) { @@ -430,7 +430,7 @@ print_error (const char *owa_url, E2kAutoconfigResult result) } } -static const char * +static const gchar * gal_auth_to_string (E2kAutoconfigGalAuthPref ad_auth) { switch (ad_auth) { @@ -449,9 +449,9 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) E2kAutoconfigResult result; CamelURL *url=NULL; gboolean remember_password; - char *url_string, *key; - const char *source_url, *id_name, *owa_url; - char *at, *user; + gchar *url_string, *key; + const gchar *source_url, *id_name, *owa_url; + gchar *at, *user; gboolean valid = FALSE; ExchangeParams *exchange_params; GtkWidget *mailbox_entry = g_object_get_data (G_OBJECT (button), "mailbox-entry"); @@ -520,7 +520,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) camel_url_set_param (url, "ad_auth", valid ? gal_auth_to_string (exchange_params->ad_auth) : NULL); if (mailbox_entry) { - const char *par = camel_url_get_param (url, "mailbox"); + const gchar *par = camel_url_get_param (url, "mailbox"); gtk_entry_set_text (GTK_ENTRY (mailbox_entry), par ? par : ""); } @@ -544,16 +544,16 @@ owa_authenticate_user(GtkWidget *button, EConfig *config) static void owa_editor_entry_changed(GtkWidget *entry, EConfig *config) { - const char *uri, *ssl = NULL; + const gchar *uri, *ssl = NULL; CamelURL *url, *owaurl = NULL; - char *url_string; + gchar *url_string; EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target; GtkWidget *button = g_object_get_data((GObject *)entry, "authenticate-button"); - int active = FALSE; + gint active = FALSE; /* NB: we set the button active only if we have a parsable uri entered */ - const char * target_url = e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL); + const gchar * target_url = e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL); if (target_url && target_url[0] != '\0') url = camel_url_new(target_url, NULL); else url = NULL; @@ -583,11 +583,11 @@ owa_editor_entry_changed(GtkWidget *entry, EConfig *config) } static void -update_mailbox_param_in_url (EAccount *account, e_account_item_t item, const char *mailbox) +update_mailbox_param_in_url (EAccount *account, e_account_item_t item, const gchar *mailbox) { CamelURL *url; - char *url_string; - const char *target_url; + gchar *url_string; + const gchar *target_url; if (!account) return; @@ -613,7 +613,7 @@ static void mailbox_editor_entry_changed (GtkWidget *entry, EConfig *config) { EMConfigTargetAccount *target; - const char *mailbox; + const gchar *mailbox; target = (EMConfigTargetAccount *)config->target; mailbox = gtk_entry_get_text (GTK_ENTRY (entry)); @@ -634,7 +634,7 @@ want_mailbox_toggled (GtkWidget *toggle, EConfig *config) if (entry) { gboolean is_active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)); EMConfigTargetAccount *target; - const char *mailbox; + const gchar *mailbox; gtk_widget_set_sensitive (entry, is_active); @@ -646,12 +646,12 @@ want_mailbox_toggled (GtkWidget *toggle, EConfig *config) } } -static char * +static gchar * construct_owa_url (CamelURL *url) { - const char *owa_path, *use_ssl = NULL; - const char *protocol = "http", *mailbox_name; - char *owa_url; + const gchar *owa_path, *use_ssl = NULL; + const gchar *protocol = "http", *mailbox_name; + gchar *owa_url; use_ssl = camel_url_get_param (url, "use_ssl"); if (use_ssl) { @@ -677,11 +677,11 @@ GtkWidget * org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data) { EMConfigTargetAccount *target_account; - const char *source_url; - char *owa_url = NULL, *mailbox_name, *username; + const gchar *source_url; + gchar *owa_url = NULL, *mailbox_name, *username; GtkWidget *owa_entry, *mailbox_entry, *want_mailbox_check; CamelURL *url; - int row; + gint row; GtkWidget *hbox, *label, *button; target_account = (EMConfigTargetAccount *)data->config->target; @@ -716,7 +716,7 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data) /* if the host is null, then user+other info is dropped silently, force it to be kept */ if (url->host == NULL) { - char *uri; + gchar *uri; camel_url_set_host(url, ""); uri = camel_url_to_string(url, 0); @@ -734,7 +734,7 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data) if (!owa_url) { if (url->host[0] != 0) { - char *uri; + gchar *uri; /* url has hostname but not owa_url. * Account has been created using x-c-s or evo is upgraded to 2.2 @@ -818,7 +818,7 @@ gboolean org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data) { EMConfigTargetAccount *target = (EMConfigTargetAccount *)data->config->target; - int status = TRUE; + gint status = TRUE; /* We assume that if the host is set, then the setting is valid. The host gets set when the provider validate() call is made */ @@ -831,7 +831,7 @@ org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data) strcmp (data->pageid, "20.receive_options") == 0) { CamelURL *url; - const char * target_url = e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL); + const gchar * target_url = e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL); if (target_url && target_url[0] != '\0') url = camel_url_new(target_url, NULL); else @@ -875,7 +875,7 @@ void org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data) { EMConfigTargetAccount *target_account; - const char *source_url; + const gchar *source_url; CamelURL *url; gint offline_status; @@ -922,13 +922,13 @@ static void exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config) { EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target; - int id = gtk_combo_box_get_active(dropdown); + gint id = gtk_combo_box_get_active(dropdown); GtkTreeModel *model; GtkTreeIter iter; CamelServiceAuthType *authtype; CamelURL *url_source, *url_transport; - const char *source_url, *transport_url; - char *source_url_string, *transport_url_string; + const gchar *source_url, *transport_url; + gchar *source_url_string, *transport_url_string; source_url = e_account_get_string (target->account, E_ACCOUNT_SOURCE_URL); @@ -969,14 +969,14 @@ GtkWidget * org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) { EMConfigTargetAccount *target_account; - const char *source_url; - char *label_text, *exchange_account_authtype = NULL; + const gchar *source_url; + gchar *label_text, *exchange_account_authtype = NULL; CamelURL *url; GtkWidget *hbox, *button, *auth_label, *vbox, *label_hide; GtkComboBox *dropdown; GtkTreeIter iter; GtkListStore *store; - int i, active=0, auth_changed_id = 0; + gint i, active=0, auth_changed_id = 0; GList *authtypes, *l, *ll; ExchangeAccount *account; @@ -1025,7 +1025,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data) for (i=0, l=authtypes; l; l=l->next, i++) { CamelServiceAuthType *authtype = l->data; - int avail = TRUE; + gint avail = TRUE; if (authtypes) { for (ll = authtypes; ll; ll = g_list_next(ll)) @@ -1104,8 +1104,8 @@ org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactor GtkListStore *model; GtkVBox *vbx; GtkHBox *hbx_size; - char *folder_name, *folder_size; - int mode; + gchar *folder_name, *folder_size; + gint mode; service = CAMEL_SERVICE (camel_folder_get_parent_store (cml_folder)); if (!service) @@ -1126,7 +1126,7 @@ org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactor if (mode == OFFLINE_MODE) return NULL; - folder_name = (char*) camel_folder_get_name (cml_folder); + folder_name = (gchar *) camel_folder_get_name (cml_folder); if (!folder_name) folder_name = g_strdup ("name"); diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c index 58af042c0c..e43d3b0531 100644 --- a/plugins/exchange-operations/exchange-calendar.c +++ b/plugins/exchange-operations/exchange-calendar.c @@ -62,7 +62,7 @@ e_exchange_calendar_get_calendars (ECalSourceType ftype) GPtrArray *folder_array; GPtrArray *calendar_list; EFolder *folder; - int i, prefix_len; + gint i, prefix_len; gchar *type; gchar *uri_prefix; gchar *tmp, *ruri; @@ -155,11 +155,11 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data) gchar *account_name; gchar *uri_text; gchar *cal_name; - char *folder_size; - const char *rel_uri; - int row, i; + gchar *folder_size; + const gchar *rel_uri; + gint row, i; gint offline_status; - char *offline_msg; + gchar *offline_msg; GtkWidget *lbl_offline_msg; gboolean is_personal; @@ -225,7 +225,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data) g_free (uri_text); if (calendar_src_exists && is_personal) { - cal_name = (gchar*) e_source_peek_name (source); + cal_name = (gchar *) e_source_peek_name (source); model = exchange_account_folder_size_get_model (account); if (model) folder_size = g_strdup_printf ("%s KB", exchange_folder_size_get_val (model, cal_name)); @@ -281,13 +281,13 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data) if (calendar_src_exists) { gchar *uri_prefix, *sruri, *tmpruri; - int prefix_len; + gint prefix_len; GtkTreeSelection *selection; uri_prefix = g_strconcat (account->account_filename, "/;", NULL); prefix_len = strlen (uri_prefix); - tmpruri = (gchar*) rel_uri; + tmpruri = (gchar *) rel_uri; if (g_str_has_prefix (tmpruri, uri_prefix)) { sruri = g_strdup (tmpruri+prefix_len); @@ -313,12 +313,12 @@ e_exchange_calendar_check (EPlugin *epl, EConfigHookPageCheckData *data) /* FIXME - check pageid */ ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESourceGroup *group; - const char *base_uri; - const char *rel_uri; + const gchar *base_uri; + const gchar *rel_uri; gint offline_status; ExchangeAccount *account; EUri *euri; - int uri_len; + gint uri_len; gchar *uri_text, *uri_string, *path, *folder_name; gboolean is_personal; @@ -381,7 +381,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target) ESource *source = t->source; gchar *uri_text, *gruri, *gname, *ruri, *ftype, *path, *path_prefix, *oldpath=NULL; gchar *username, *windows_domain, *authtype; - int prefix_len; + gint prefix_len; ExchangeAccount *account; ExchangeAccountFolderResult result; ExchangeConfigListenerStatus status; @@ -429,13 +429,13 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target) ftype = g_strdup ("mail"); } - gname = (gchar*) e_source_peek_name (source); - gruri = (gchar*) e_source_peek_relative_uri (source); + gname = (gchar *) e_source_peek_name (source); + gruri = (gchar *) e_source_peek_relative_uri (source); if (calendar_src_exists) { gchar *tmpruri, *uri_string, *temp_path, *prefix; EUri *euri; - int uri_len; + gint uri_len; /* sample uri_string: exchange://user;auth=NTLM@host/ */ /* sample uri_text: exchange://user;auth=NTLM@host/;personal/Calendar */ diff --git a/plugins/exchange-operations/exchange-change-password.c b/plugins/exchange-operations/exchange-change-password.c index 539bd24d3a..82382f6f9f 100644 --- a/plugins/exchange-operations/exchange-change-password.c +++ b/plugins/exchange-operations/exchange-change-password.c @@ -42,7 +42,7 @@ entry_changed (GtkEntry *entry, gpointer user_data) GladeXML *xml = user_data; GtkEntry *new_entry, *confirm_entry; GtkWidget *ok_button; - const char *text; + const gchar *text; new_entry = GTK_ENTRY (glade_xml_get_widget (xml, "new_pass_entry")); confirm_entry = GTK_ENTRY (glade_xml_get_widget (xml, "confirm_pass_entry")); @@ -71,15 +71,15 @@ entry_changed (GtkEntry *entry, gpointer user_data) * * Prompt the user for a new password. */ -char * -exchange_get_new_password (const char *existing_password, gboolean voluntary) +gchar * +exchange_get_new_password (const gchar *existing_password, gboolean voluntary) { GladeXML *xml; GtkWidget *top_widget; GtkEntry *cur_entry, *new_entry, *confirm_entry; GtkResponseType response; GtkLabel *top_label; - char *new_pass; + gchar *new_pass; xml = glade_xml_new (FILENAME, ROOTNODE, NULL); top_widget = glade_xml_get_widget (xml, ROOTNODE); @@ -100,7 +100,7 @@ exchange_get_new_password (const char *existing_password, gboolean voluntary) run_dialog_again: response = gtk_dialog_run (GTK_DIALOG (top_widget)); if (response == GTK_RESPONSE_OK) { - const char *cur_pass, *new_pass1, *new_pass2; + const gchar *cur_pass, *new_pass1, *new_pass2; cur_pass = gtk_entry_get_text (cur_entry); new_pass1 = gtk_entry_get_text (new_entry); diff --git a/plugins/exchange-operations/exchange-change-password.h b/plugins/exchange-operations/exchange-change-password.h index e320d89cf9..389922f1b3 100644 --- a/plugins/exchange-operations/exchange-change-password.h +++ b/plugins/exchange-operations/exchange-change-password.h @@ -28,7 +28,7 @@ extern "C" { #pragma } #endif /* __cplusplus */ -char *exchange_get_new_password (const char *existing_password, +gchar *exchange_get_new_password (const gchar *existing_password, gboolean voluntary); #ifdef __cplusplus diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c index 5ff53fb171..35d06d527d 100644 --- a/plugins/exchange-operations/exchange-config-listener.c +++ b/plugins/exchange-operations/exchange-config-listener.c @@ -53,16 +53,16 @@ struct _ExchangeConfigListenerPrivate { GConfClient *gconf; guint idle_id; - char *configured_uri, *configured_name; + gchar *configured_uri, *configured_name; EAccount *configured_account; ExchangeAccount *exchange_account; }; typedef struct { - const char *name; - const char *uri; - int type; + const gchar *name; + const gchar *uri; + gint type; }FolderInfo; enum { @@ -96,7 +96,7 @@ static void exchange_add_autocompletion_folders (GConfClient *gc_client, static gboolean exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2); static void remove_selected_non_offline_esources (ExchangeAccount *account, - const char *gconf_key); + const gchar *gconf_key); static void class_init (GObjectClass *object_class) { @@ -182,9 +182,9 @@ E2K_MAKE_TYPE (exchange_config_listener, ExchangeConfigListener, class_init, ini #define EVOLUTION_URI_PREFIX_LEN (sizeof (EVOLUTION_URI_PREFIX) - 1) static EFolder * -standard_folder (ExchangeAccount *account, const char *folder_type) +standard_folder (ExchangeAccount *account, const gchar *folder_type) { - const char *uri; + const gchar *uri; uri = exchange_account_get_standard_uri (account, folder_type); if (!uri) @@ -193,14 +193,14 @@ standard_folder (ExchangeAccount *account, const char *folder_type) } static void -set_special_mail_folder (ExchangeAccount *account, const char *folder_type, - char **folder_uri) +set_special_mail_folder (ExchangeAccount *account, const gchar *folder_type, + gchar **folder_uri) { EFolder *folder; - const char *physical_uri; - char *url_string, *path; + const gchar *physical_uri; + gchar *url_string, *path; CamelURL *camel_url; - int uri_len; + gint uri_len; folder = standard_folder (account, folder_type); if (!folder) @@ -271,12 +271,12 @@ add_account_esources (ExchangeAccount *account, ESourceGroup *cal_source_group = NULL; ESourceGroup *tasks_source_group = NULL; ESourceGroup *contacts_source_group = NULL; - char *relative_uri = NULL, *username = NULL; + gchar *relative_uri = NULL, *username = NULL; #if 0 GSList *ids; #endif GConfClient *client; - int mode; + gint mode; ESourceList *cal_source_list, *tasks_source_list, *contacts_source_list; FolderInfo *folder=NULL; gboolean offline_mode = FALSE; @@ -409,11 +409,11 @@ add_new_sources (ExchangeAccount *account) exchange_folders = exchange_account_get_folders (account); if (exchange_folders && exchange_folders->len > 0) { - int i; - const char *folder_type; - const char *folder_name; - const char *folder_uri; - int type; + gint i; + const gchar *folder_type; + const gchar *folder_name; + const gchar *folder_uri; + gint type; EFolder *folder; ExchangeHierarchy *hier; gboolean create_esource = FALSE; @@ -462,8 +462,8 @@ add_sources (ExchangeAccount *account) exchange_folders = exchange_account_get_folders (account); if (exchange_folders && exchange_folders->len > 0) { - int i; - const char *folder_type; + gint i; + const gchar *folder_type; EFolder *folder; GSList *folders = NULL; @@ -516,7 +516,7 @@ remove_account_esource (ExchangeAccount *account, GSList *sources; GSList *ids, *node_to_be_deleted; gboolean found_group; - const char *source_uid; + const gchar *source_uid; GConfClient *client; ESourceList *source_list = NULL; @@ -614,10 +614,10 @@ remove_account_esources (ExchangeAccount *account) } #ifdef HAVE_KRB5 -static char * +static gchar * get_new_exchange_password (ExchangeAccount *account) { - char *old_password, *new_password; + gchar *old_password, *new_password; old_password = exchange_account_get_password (account); new_password = exchange_get_new_password (old_password, 0); @@ -638,7 +638,7 @@ get_new_exchange_password (ExchangeAccount *account) static void change_passwd_cb (GtkWidget *button, ExchangeAccount *account) { - char *current_passwd, *new_passwd; + gchar *current_passwd, *new_passwd; gtk_widget_hide (gtk_widget_get_toplevel(button)); current_passwd = exchange_account_get_password (account); @@ -650,13 +650,13 @@ change_passwd_cb (GtkWidget *button, ExchangeAccount *account) #endif static void -display_passwd_expiry_message (int max_passwd_age, ExchangeAccount *account) +display_passwd_expiry_message (gint max_passwd_age, ExchangeAccount *account) { GladeXML *xml; GtkWidget *top_widget, *change_passwd_button; GtkResponseType response; GtkLabel *warning_msg_label; - char *passwd_expiry_msg = + gchar *passwd_expiry_msg = g_strdup_printf (_("Your password will expire in the next %d days"), max_passwd_age); xml = glade_xml_new (FILENAME, ROOTNODE, NULL); @@ -688,13 +688,13 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener, { ExchangeConfigListenerPrivate *priv; ExchangeAccountResult result; - char *key, *password, *title, *url_string; + gchar *key, *password, *title, *url_string; #ifdef HAVE_KRB5 - char *new_password; + gchar *new_password; #endif gboolean oldremember, remember = FALSE; CamelURL *camel_url; - const char *remember_password; + const gchar *remember_password; g_return_val_if_fail (EXCHANGE_IS_CONFIG_LISTENER (ex_conf_listener), EXCHANGE_ACCOUNT_CONFIG_ERROR); priv = ex_conf_listener->priv; @@ -752,7 +752,7 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener, result == EXCHANGE_ACCOUNT_QUOTA_SEND_ERROR || result == EXCHANGE_ACCOUNT_QUOTA_WARN) { gchar *current_quota_usage = NULL; - const char *error_code = NULL; + const gchar *error_code = NULL; GtkWidget *widget; switch (result) { @@ -789,7 +789,7 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener, result = EXCHANGE_ACCOUNT_CONNECT_SUCCESS; } if (result == EXCHANGE_ACCOUNT_CONNECT_SUCCESS) { - int max_pwd_age_days; + gint max_pwd_age_days; GladeXML *xml; GtkWidget *dialog; GtkResponseType response; @@ -905,13 +905,13 @@ configured_account_destroyed (gpointer user_data, GObject *where_account_was) } static gboolean -requires_relogin (char *current_url, char *new_url) +requires_relogin (gchar *current_url, gchar *new_url) { E2kUri *current_uri, *new_uri; - const char *current_param_val, *new_param_val; - const char *params [] = { "owa_url", "ad_server", "use_ssl" }; - const int n_params = G_N_ELEMENTS (params); - int i; + const gchar *current_param_val, *new_param_val; + const gchar *params [] = { "owa_url", "ad_server", "use_ssl" }; + const gint n_params = G_N_ELEMENTS (params); + gint i; gboolean relogin = FALSE; current_uri = e2k_uri_new (current_url); @@ -1176,8 +1176,8 @@ exchange_config_listener_get_accounts (ExchangeConfigListener *config_listener) **/ void exchange_config_listener_modify_esource_group_name (ExchangeConfigListener *excl, - const char *old_name, - const char *new_name) + const gchar *old_name, + const gchar *new_name) { GConfClient *client; ESourceGroup *group; @@ -1299,22 +1299,22 @@ exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2) { CamelURL *curl1, *curl2; gchar *param1, *param2; - const char *params[] = { + const gchar *params[] = { "auth", "owa_url", "owa_path", "mailbox", "ad_server", }; - const int n_params = 5; - int i; + const gint n_params = 5; + gint i; curl1 = camel_url_new (url1, NULL); curl2 = camel_url_new (url2, NULL); for (i = 0; i < n_params; ++i) { - param1 = (gchar*) camel_url_get_param (curl1, params[i]); - param2 = (gchar*) camel_url_get_param (curl2, params[i]); + param1 = (gchar *) camel_url_get_param (curl1, params[i]); + param2 = (gchar *) camel_url_get_param (curl2, params[i]); if ((param1 && !param2) || (!param1 && param2) || /* Missing */ (param1 && param2 && strcmp (param1, param2))) { /* Differing */ g_free (param1); @@ -1342,7 +1342,7 @@ exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2) * selection list **/ static void -remove_selected_non_offline_esources (ExchangeAccount *account, const char *gconf_key) +remove_selected_non_offline_esources (ExchangeAccount *account, const gchar *gconf_key) { ESourceGroup *group; ESource *source = NULL; @@ -1350,11 +1350,11 @@ remove_selected_non_offline_esources (ExchangeAccount *account, const char *gcon GSList *sources; GSList *ids, *node_to_be_deleted; gboolean found_group; - const char *source_uid; + const gchar *source_uid; GConfClient *client; ESourceList *source_list = NULL; - const char *offline_mode=NULL; - char *selected_gconf_key; + const gchar *offline_mode=NULL; + gchar *selected_gconf_key; if (gconf_key && !strcmp (gconf_key, CONF_KEY_CAL)) { diff --git a/plugins/exchange-operations/exchange-config-listener.h b/plugins/exchange-operations/exchange-config-listener.h index b5ceca2a27..3ec2d5c62f 100644 --- a/plugins/exchange-operations/exchange-config-listener.h +++ b/plugins/exchange-operations/exchange-config-listener.h @@ -71,13 +71,13 @@ ExchangeConfigListener *exchange_config_listener_new (void); GSList *exchange_config_listener_get_accounts (ExchangeConfigListener *config_listener); -void add_folder_esource (ExchangeAccount *account, FolderType folder_type, const char *folder_name, const char *physical_uri); -void remove_folder_esource (ExchangeAccount *account, FolderType folder_type, const char *physical_uri); +void add_folder_esource (ExchangeAccount *account, FolderType folder_type, const gchar *folder_name, const gchar *physical_uri); +void remove_folder_esource (ExchangeAccount *account, FolderType folder_type, const gchar *physical_uri); ExchangeConfigListenerStatus exchange_config_listener_get_offline_status (ExchangeConfigListener *excl, gint *mode); void exchange_config_listener_modify_esource_group_name (ExchangeConfigListener *excl, - const char *old_name, - const char *new_name); + const gchar *old_name, + const gchar *new_name); ExchangeAccountResult exchange_config_listener_authenticate (ExchangeConfigListener *excl, ExchangeAccount *account); diff --git a/plugins/exchange-operations/exchange-contacts.c b/plugins/exchange-operations/exchange-contacts.c index 1955f58eba..aec27f3f69 100644 --- a/plugins/exchange-operations/exchange-contacts.c +++ b/plugins/exchange-operations/exchange-contacts.c @@ -67,7 +67,7 @@ e_exchange_contacts_get_contacts (void) GPtrArray *contacts_list; EFolder *folder; - int i, prefix_len; + gint i, prefix_len; gchar *uri_prefix, *ruri; account = exchange_operations_get_exchange_account (); @@ -84,9 +84,9 @@ e_exchange_contacts_get_contacts (void) for (i=0; i<folder_array->len; ++i) { gchar *type, *tmp; folder = g_ptr_array_index (folder_array, i); - type = (gchar*) e_folder_get_type_string (folder); + type = (gchar *) e_folder_get_type_string (folder); if (!strcmp (type, "contacts")) { - tmp = (gchar*) e_folder_get_physical_uri (folder); + tmp = (gchar *) e_folder_get_physical_uri (folder); if (g_str_has_prefix (tmp, uri_prefix)) { ruri = g_strdup (tmp+prefix_len); g_ptr_array_add (contacts_list, ruri); @@ -136,14 +136,14 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data) GPtrArray *conlist; gchar *ruri, *account_name, *uri_text; ExchangeAccount *account; - int i; - char *folder_size, *abook_name; - const char *rel_uri; - const char *uid; + gint i; + gchar *folder_size, *abook_name; + const gchar *rel_uri; + const gchar *uid; EABConfigTargetSource *t = (EABConfigTargetSource *) data->target; ESource *source = t->source; GtkWidget *lbl_offline_msg, *vb_offline_msg; - char *offline_msg; + gchar *offline_msg; gint offline_status; gboolean gal_folder = FALSE, is_personal; @@ -212,7 +212,7 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data) g_free (uri_text); if (contacts_src_exists && is_personal ) { - abook_name = (char*)e_source_peek_name (source); + abook_name = (gchar *)e_source_peek_name (source); model = exchange_account_folder_size_get_model (account); if (model) folder_size = g_strdup_printf (_("%s KB"), exchange_folder_size_get_val (model, abook_name)); @@ -275,10 +275,10 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data) if (contacts_src_exists) { gchar *uri_prefix, *sruri, *tmpruri; - int prefix_len; + gint prefix_len; GtkTreeSelection *selection; - tmpruri = (gchar*) rel_uri; + tmpruri = (gchar *) rel_uri; uri_prefix = g_strconcat (account->account_filename, "/;", NULL); prefix_len = strlen (uri_prefix); @@ -311,8 +311,8 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data) /* FIXME - check pageid */ EABConfigTargetSource *t = (EABConfigTargetSource *) data->target; ESourceGroup *group; - const char *base_uri; - const char *rel_uri; + const gchar *base_uri; + const gchar *rel_uri; gint offline_status; ExchangeAccount *account; @@ -375,7 +375,7 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data) } else { EUri *euri; - int uri_len; + gint uri_len; gchar *uri_text, *uri_string, *path, *folder_name; gboolean is_personal; @@ -414,7 +414,7 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target) ESource *source = t->source; gchar *uri_text, *gname, *gruri, *ruri = NULL, *path = NULL, *path_prefix, *oldpath=NULL; gchar *username, *windows_domain, *authtype; - int prefix_len; + gint prefix_len; ExchangeAccount *account; ExchangeAccountFolderResult result; gint offline_status; @@ -451,13 +451,13 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target) prefix_len = strlen (path_prefix); g_free (path_prefix); - gname = (gchar*) e_source_peek_name (source); - gruri = (gchar*) e_source_peek_relative_uri (source); + gname = (gchar *) e_source_peek_name (source); + gruri = (gchar *) e_source_peek_relative_uri (source); if (contacts_src_exists) { gchar *tmpruri, *uri_string, *temp_path, *prefix; EUri *euri; - int uri_len; + gint uri_len; euri = e_uri_new (uri_text); uri_string = e_uri_to_string (euri, FALSE); diff --git a/plugins/exchange-operations/exchange-delegates-user.c b/plugins/exchange-operations/exchange-delegates-user.c index 7de3948814..437aeec51f 100644 --- a/plugins/exchange-operations/exchange-delegates-user.c +++ b/plugins/exchange-operations/exchange-delegates-user.c @@ -54,7 +54,7 @@ * means "end of list" to e_dialog_combo_box_get/set */ -static const int exchange_perm_map[] = { +static const gint exchange_perm_map[] = { E2K_PERMISSIONS_ROLE_NONE, E2K_PERMISSIONS_ROLE_REVIEWER, E2K_PERMISSIONS_ROLE_AUTHOR, @@ -65,18 +65,18 @@ static const int exchange_perm_map[] = { -1 }; -const char *exchange_delegates_user_folder_names[] = { +const gchar *exchange_delegates_user_folder_names[] = { "calendar", "tasks", "inbox", "contacts" }; /* To translators: The folder names to be displayed in the message being sent to the delegatee. */ -static const char *folder_names_for_display[] = { +static const gchar *folder_names_for_display[] = { N_("Calendar"), N_("Tasks"), N_("Inbox"), N_("Contacts") }; -static const char *widget_names[] = { +static const gchar *widget_names[] = { "calendar_perms_combobox", "task_perms_combobox", "inbox_perms_combobox", "contact_perms_combobox", }; @@ -156,10 +156,10 @@ parent_window_destroyed (gpointer dialog, GObject *where_parent_window_was) /* Maps the role_nam parameter to their corresponding Full role name */ -static const char * +static const gchar * map_to_full_role_name (E2kPermissionsRole role_nam) { - const char *role_name; + const gchar *role_name; switch (role_nam) { @@ -187,7 +187,7 @@ map_to_full_role_name (E2kPermissionsRole role_nam) static void em_utils_delegates_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, - int queued, const char *appended_uid, void *data) + gint queued, const gchar *appended_uid, gpointer data) { camel_message_info_free (info); mail_send (); @@ -211,8 +211,8 @@ exchange_delegates_user_edit (ExchangeAccount *account, { GladeXML *xml; GtkWidget *dialog, *table, *label, *combobox, *check, *check_delegate; - char *title; - int button, i; + gchar *title; + gint button, i; E2kPermissionsRole role; gboolean modified; @@ -299,13 +299,13 @@ exchange_delegates_user_edit (ExchangeAccount *account, CamelStream *stream; CamelFolder *out_folder; CamelMessageInfo *info; - char *self_address, *delegate_mail_subject; - char *role_name; + gchar *self_address, *delegate_mail_subject; + gchar *role_name; GString *role_name_final; - const char *recipient_address; - const char *delegate_exchange_dn; - const char *msg_part1 = NULL, *msg_part2 = NULL; + const gchar *recipient_address; + const gchar *delegate_exchange_dn; + const gchar *msg_part1 = NULL, *msg_part2 = NULL; role_name_final = g_string_new (""); @@ -456,10 +456,10 @@ exchange_delegates_user_edit (ExchangeAccount *account, * with most of the internal data blank). **/ ExchangeDelegatesUser * -exchange_delegates_user_new (const char *display_name) +exchange_delegates_user_new (const gchar *display_name) { ExchangeDelegatesUser *user; - int i; + gint i; user = g_object_new (EXCHANGE_TYPE_DELEGATES_USER, NULL); user->display_name = g_strdup (display_name); @@ -487,7 +487,7 @@ exchange_delegates_user_new (const char *display_name) **/ ExchangeDelegatesUser * exchange_delegates_user_new_from_gc (E2kGlobalCatalog *gc, - const char *email, + const gchar *email, GByteArray *creator_entryid) { E2kGlobalCatalogStatus status; diff --git a/plugins/exchange-operations/exchange-delegates-user.h b/plugins/exchange-operations/exchange-delegates-user.h index 251a09de9d..d1a38ca876 100644 --- a/plugins/exchange-operations/exchange-delegates-user.h +++ b/plugins/exchange-operations/exchange-delegates-user.h @@ -52,7 +52,7 @@ enum { struct _ExchangeDelegatesUser { GObject parent; - char *display_name, *dn; + gchar *display_name, *dn; GByteArray *entryid; E2kSid *sid; @@ -71,9 +71,9 @@ struct _ExchangeDelegatesUserClass { GType exchange_delegates_user_get_type (void); -ExchangeDelegatesUser *exchange_delegates_user_new (const char *display_name); +ExchangeDelegatesUser *exchange_delegates_user_new (const gchar *display_name); ExchangeDelegatesUser *exchange_delegates_user_new_from_gc (E2kGlobalCatalog *gc, - const char *email, + const gchar *email, GByteArray *creator_entryid); gboolean exchange_delegates_user_edit (ExchangeAccount *account, ExchangeDelegatesUser *user, diff --git a/plugins/exchange-operations/exchange-delegates.c b/plugins/exchange-operations/exchange-delegates.c index 4038ef0baf..f5e8891b77 100644 --- a/plugins/exchange-operations/exchange-delegates.c +++ b/plugins/exchange-operations/exchange-delegates.c @@ -47,14 +47,14 @@ #include <glade/glade-xml.h> typedef struct { - const char *uri; + const gchar *uri; E2kSecurityDescriptor *sd; gboolean changed; } ExchangeDelegatesFolder; typedef struct { ExchangeAccount *account; - char *self_dn; + gchar *self_dn; GladeXML *xml; GtkWidget *dialog, *parent; @@ -69,18 +69,18 @@ typedef struct { ExchangeDelegatesFolder freebusy_folder; } ExchangeDelegates; -extern const char *exchange_delegates_user_folder_names[]; +extern const gchar *exchange_delegates_user_folder_names[]; -const char *exchange_localfreebusy_path = "NON_IPM_SUBTREE/Freebusy%20Data/LocalFreebusy.EML"; +const gchar *exchange_localfreebusy_path = "NON_IPM_SUBTREE/Freebusy%20Data/LocalFreebusy.EML"; static void set_perms_for_user (ExchangeDelegatesUser *user, gpointer user_data); static void set_sd_for_href (ExchangeDelegates *delegates, - const char *href, + const gchar *href, E2kSecurityDescriptor *sd) { - int i; + gint i; for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { if (!delegates->folder[i].uri) @@ -112,7 +112,7 @@ set_sd_for_href (ExchangeDelegates *delegates, static gboolean fill_in_sids (ExchangeDelegates *delegates) { - int u, u2, sd, needed_sids; + gint u, u2, sd, needed_sids; ExchangeDelegatesUser *user, *user2; GList *sids, *s; E2kSid *sid; @@ -186,11 +186,11 @@ fill_in_sids (ExchangeDelegates *delegates) return ok; } -static const char *sd_props[] = { +static const gchar *sd_props[] = { E2K_PR_EXCHANGE_SD_BINARY, E2K_PR_EXCHANGE_SD_XML }; -static const int n_sd_props = sizeof (sd_props) / sizeof (sd_props[0]); +static const gint n_sd_props = sizeof (sd_props) / sizeof (sd_props[0]); /* Read the folder security descriptors and match them up with the * list of delegates. @@ -207,7 +207,7 @@ get_folder_security (ExchangeDelegates *delegates) GByteArray *binary_form; ExchangeDelegatesUser *user; guint32 perms; - int i, u; + gint i, u; /* If we've been here before, just return the success or * failure result from last time. @@ -228,16 +228,16 @@ get_folder_security (ExchangeDelegates *delegates) delegates->folder[i].uri = exchange_account_get_standard_uri ( delegates->account, exchange_delegates_user_folder_names[i]); if (delegates->folder[i].uri) { - g_ptr_array_add (hrefs, (char *)e2k_uri_relative ( + g_ptr_array_add (hrefs, (gchar *)e2k_uri_relative ( delegates->account->home_uri, delegates->folder[i].uri)); } } - g_ptr_array_add (hrefs, (char *)exchange_localfreebusy_path); + g_ptr_array_add (hrefs, (gchar *)exchange_localfreebusy_path); iter = e2k_context_bpropfind_start ( ctx, NULL, delegates->account->home_uri, - (const char **)hrefs->pdata, hrefs->len, + (const gchar **)hrefs->pdata, hrefs->len, sd_props, n_sd_props); g_ptr_array_free (hrefs, TRUE); @@ -281,13 +281,13 @@ get_folder_security (ExchangeDelegates *delegates) } -static const char *delegation_props[] = { +static const gchar *delegation_props[] = { PR_DELEGATES_DISPLAY_NAMES, PR_DELEGATES_ENTRYIDS, PR_DELEGATES_SEE_PRIVATE, PR_CREATOR_ENTRYID }; -static const int n_delegation_props = sizeof (delegation_props) / sizeof (delegation_props[0]); +static const gint n_delegation_props = sizeof (delegation_props) / sizeof (delegation_props[0]); /* Fetch the list of delegates from the freebusy message. */ static gboolean @@ -299,7 +299,7 @@ get_user_list (ExchangeDelegates *delegates) GPtrArray *display_names, *entryids, *privflags; GByteArray *entryid; ExchangeDelegatesUser *user; - int i; + gint i; ctx = exchange_account_get_context (delegates->account); iter = e2k_context_bpropfind_start (ctx, NULL, @@ -359,7 +359,7 @@ add_remove_user (ExchangeDelegatesUser *user, GPtrArray *to_array, GPtrArray *from_array) { ExchangeDelegatesUser *match; - int i; + gint i; for (i = 0; i < from_array->len; i++) { match = from_array->pdata[i]; @@ -379,7 +379,7 @@ static void set_perms_for_user (ExchangeDelegatesUser *user, gpointer user_data) { ExchangeDelegates *delegates = user_data; - int i, role; + gint i, role; guint32 perms; for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { @@ -401,10 +401,10 @@ add_button_clicked_cb (GtkWidget *widget, gpointer data) ExchangeDelegates *delegates = data; E2kGlobalCatalog *gc; GtkWidget *dialog, *parent_window; - const char *delegate_exchange_dn; - char *email; + const gchar *delegate_exchange_dn; + gchar *email; ExchangeDelegatesUser *user, *match; - int response, u; + gint response, u; GtkTreeIter iter; if (!get_folder_security (delegates)) @@ -478,7 +478,7 @@ get_selected_row (GtkWidget *tree_view, GtkTreeIter *iter) GtkTreeSelection *selection; GtkTreeModel *model; GtkTreePath *path; - int *indices, row; + gint *indices, row; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); if (!gtk_tree_selection_get_selected (selection, &model, iter)) @@ -498,7 +498,7 @@ edit_button_clicked_cb (GtkWidget *widget, gpointer data) ExchangeDelegates *delegates = data; GtkWidget *parent_window; GtkTreeIter iter; - int row; + gint row; if (!get_folder_security (delegates)) return; @@ -512,14 +512,14 @@ edit_button_clicked_cb (GtkWidget *widget, gpointer data) parent_window); } -const char * -email_look_up (const char *delegate_legacy, ExchangeAccount *account) +const gchar * +email_look_up (const gchar *delegate_legacy, ExchangeAccount *account) { E2kGlobalCatalog *gc; E2kGlobalCatalogEntry *entry; E2kGlobalCatalogStatus status; - const char *email_id; + const gchar *email_id; gc = exchange_account_get_global_catalog (account); @@ -541,7 +541,7 @@ table_click_cb (GtkWidget *widget, GdkEventButton *event, gpointer data) ExchangeDelegates *delegates = data; GtkWidget *parent_window; GtkTreeIter iter; - int row; + gint row; if (event->type != GDK_2BUTTON_PRESS) return FALSE; @@ -565,7 +565,7 @@ remove_button_clicked_cb (GtkWidget *widget, gpointer data) ExchangeDelegates *delegates = data; ExchangeDelegatesUser *user; GtkWidget *dialog; - int row, btn, i; + gint row, btn, i; GtkTreeIter iter; if (!get_folder_security (delegates)) @@ -609,7 +609,7 @@ proppatch_sd (E2kContext *ctx, ExchangeDelegatesFolder *folder) { GByteArray *binsd; E2kProperties *props; - const char *href = ""; + const gchar *href = ""; E2kResultIter *iter; E2kResult *result; E2kHTTPStatus status; @@ -640,7 +640,7 @@ get_user_dn (E2kGlobalCatalog *gc, ExchangeDelegatesUser *user) { E2kGlobalCatalogEntry *entry; E2kGlobalCatalogStatus status; - const char *exchange_dn; + const gchar *exchange_dn; exchange_dn = e2k_entryid_to_dn (user->entryid); status = e2k_global_catalog_lookup ( @@ -663,9 +663,9 @@ delegates_apply (ExchangeDelegates *delegates) E2kContext *ctx; GPtrArray *display_names, *entryids, *privflags; GByteArray *entryid_dup; - char *error = NULL; + gchar *error = NULL; E2kProperties *props; - int i; + gint i; E2kGlobalCatalogStatus status; if (!delegates->loaded_folders) @@ -837,7 +837,7 @@ static void parent_destroyed (gpointer user_data, GObject *ex_parent); static void delegates_destroy (ExchangeDelegates *delegates) { - int i; + gint i; g_object_unref (delegates->account); @@ -879,7 +879,7 @@ delegates_destroy (ExchangeDelegates *delegates) if (delegates->freebusy_folder.sd) g_object_unref (delegates->freebusy_folder.sd); if (delegates->freebusy_folder.uri) - g_free ((char *)delegates->freebusy_folder.uri); + g_free ((gchar *)delegates->freebusy_folder.uri); if (delegates->xml) g_object_unref (delegates->xml); @@ -889,7 +889,7 @@ delegates_destroy (ExchangeDelegates *delegates) static void -dialog_response (GtkDialog *dialog, int response, gpointer user_data) +dialog_response (GtkDialog *dialog, gint response, gpointer user_data) { ExchangeDelegates *delegates = user_data; @@ -915,7 +915,7 @@ exchange_delegates (ExchangeAccount *account, GtkWidget *parent) ExchangeDelegatesUser *user; GtkTreeViewColumn *column; GtkTreeIter iter; - int i; + gint i; g_return_if_fail (GTK_IS_WIDGET (parent)); g_return_if_fail (EXCHANGE_IS_ACCOUNT (account)); diff --git a/plugins/exchange-operations/exchange-delegates.h b/plugins/exchange-operations/exchange-delegates.h index 77fc354c60..5defd27f9a 100644 --- a/plugins/exchange-operations/exchange-delegates.h +++ b/plugins/exchange-operations/exchange-delegates.h @@ -30,7 +30,7 @@ extern "C" { #endif /* __cplusplus */ void exchange_delegates (ExchangeAccount *account, GtkWidget *parent); -const char *email_look_up (const char *delegate_legacy, ExchangeAccount *account); +const gchar *email_look_up (const gchar *delegate_legacy, ExchangeAccount *account); #ifdef __cplusplus } diff --git a/plugins/exchange-operations/exchange-folder-permission.c b/plugins/exchange-operations/exchange-folder-permission.c index 63874c793a..03d7ac7aa9 100644 --- a/plugins/exchange-operations/exchange-folder-permission.c +++ b/plugins/exchange-operations/exchange-folder-permission.c @@ -47,7 +47,7 @@ #define d(x) -static void org_folder_permissions_cb (EPopup *ep, EPopupItem *p, void *data); +static void org_folder_permissions_cb (EPopup *ep, EPopupItem *p, gpointer data); void org_gnome_exchange_folder_permissions (EPlugin *ep, EMPopupTargetFolder *t); void org_gnome_exchange_menu_folder_permissions (EPlugin *ep, EMMenuTargetSelect *target); void org_gnome_exchange_calendar_permissions (EPlugin *ep, ECalPopupTargetSource *target); @@ -63,7 +63,7 @@ static EPopupItem popup_items[] = { }; static void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } @@ -72,8 +72,8 @@ void org_gnome_exchange_calendar_permissions (EPlugin *ep, ECalPopupTargetSource *target) { GSList *menus = NULL; - int i = 0, mode; - static int first =0; + gint i = 0, mode; + static gint first =0; ExchangeAccount *account = NULL; ESource *source = NULL; gchar *uri = NULL; @@ -113,8 +113,8 @@ void org_gnome_exchange_addressbook_permissions (EPlugin *ep, EABPopupTargetSource *target) { GSList *menus = NULL; - int i = 0, mode; - static int first =0; + gint i = 0, mode; + static gint first =0; ExchangeAccount *account = NULL; ESource *source = NULL; gchar *uri = NULL; @@ -152,10 +152,10 @@ void org_gnome_exchange_folder_permissions (EPlugin *ep, EMPopupTargetFolder *target) { GSList *menus = NULL; - int i = 0, mode; - static int first =0; + gint i = 0, mode; + static gint first =0; gchar *path = NULL; - char *fixed_path = NULL; + gchar *fixed_path = NULL; ExchangeAccount *account = NULL; d(g_print ("exchange-folder-permission.c: entry\n")); @@ -201,7 +201,7 @@ org_gnome_exchange_folder_permissions (EPlugin *ep, EMPopupTargetFolder *target) } static void -org_folder_permissions_cb (EPopup *ep, EPopupItem *p, void *data) +org_folder_permissions_cb (EPopup *ep, EPopupItem *p, gpointer data) { ExchangeAccount *account = NULL; EFolder *folder = NULL; @@ -223,7 +223,7 @@ org_gnome_exchange_menu_folder_permissions (EPlugin *ep, EMMenuTargetSelect *tar ExchangeAccount *account = NULL; EFolder *folder = NULL; gchar *path = NULL; - int mode; + gint mode; if (!g_str_has_prefix (target->uri, "exchange://")) return; @@ -249,7 +249,7 @@ org_gnome_exchange_menu_cal_permissions (EPlugin *ep, ECalMenuTargetSelect *targ ECalModel *model = NULL; ECal *ecal = NULL; gchar *uri = NULL; - int mode; + gint mode; if (!target) return; @@ -283,7 +283,7 @@ org_gnome_exchange_menu_tasks_permissions (EPlugin *ep, ECalMenuTargetSelect *ta ECalModel *model = NULL; ECal *ecal = NULL; gchar *uri = NULL; - int mode; + gint mode; if (!target) return; @@ -315,7 +315,7 @@ org_gnome_exchange_menu_ab_permissions (EPlugin *ep, EABMenuTargetSelect *target EFolder *folder = NULL; EBook *ebook = NULL; gchar *uri = NULL; - int mode; + gint mode; if (!target) return; diff --git a/plugins/exchange-operations/exchange-folder-size-display.c b/plugins/exchange-operations/exchange-folder-size-display.c index ff3634341a..1a916a9f1b 100644 --- a/plugins/exchange-operations/exchange-folder-size-display.c +++ b/plugins/exchange-operations/exchange-folder-size-display.c @@ -46,7 +46,7 @@ get_folder_size_func (GtkTreeModel *model, { GHashTable *info = (GHashTable *) user_data; gdouble folder_size; - char *folder_name; + gchar *folder_name; gtk_tree_model_get(model, iter, COLUMN_SIZE, &folder_size, COLUMN_NAME, &folder_name, -1); @@ -54,11 +54,11 @@ get_folder_size_func (GtkTreeModel *model, return FALSE; } -char * -exchange_folder_size_get_val (GtkListStore *model, const char *folder_name) +gchar * +exchange_folder_size_get_val (GtkListStore *model, const gchar *folder_name) { GHashTable *finfo; - char *folder_size, *fsize; + gchar *folder_size, *fsize; finfo = g_hash_table_new_full ( g_str_hash, g_str_equal, @@ -86,7 +86,7 @@ format_size_func (GtkTreeViewColumn *col, { GtkCellRendererText *cell = (GtkCellRendererText *)renderer; gdouble folder_size; - char * new_text; + gchar * new_text; gtk_tree_model_get(model, iter, COLUMN_SIZE, &folder_size, -1); @@ -108,7 +108,7 @@ exchange_folder_size_display (GtkListStore *model, GtkWidget *parent) GladeXML *xml; GtkWidget *dialog, *table; GList *l; - char *col_name; + gchar *col_name; printf ("exchange_folder_size_display called\n"); g_return_if_fail (GTK_IS_WIDGET (parent)); diff --git a/plugins/exchange-operations/exchange-folder-size-display.h b/plugins/exchange-operations/exchange-folder-size-display.h index 95c795686d..08f22c7114 100644 --- a/plugins/exchange-operations/exchange-folder-size-display.h +++ b/plugins/exchange-operations/exchange-folder-size-display.h @@ -29,7 +29,7 @@ extern "C" { #endif /* __cplusplus */ void exchange_folder_size_display (GtkListStore *model, GtkWidget *parent); -char * exchange_folder_size_get_val (GtkListStore *model, const char *folder_name); +gchar * exchange_folder_size_get_val (GtkListStore *model, const gchar *folder_name); #ifdef __cplusplus } diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c index 2f72552983..6b5d2375bc 100644 --- a/plugins/exchange-operations/exchange-folder-subscription.c +++ b/plugins/exchange-operations/exchange-folder-subscription.c @@ -105,7 +105,7 @@ setup_folder_name_combo (GladeXML *glade_xml, const gchar *fname) NULL /* FIXME: Should these be translated? */ }; - int i; + gint i; combo = GTK_COMBO_BOX (glade_xml_get_widget (glade_xml, "folder-name-combo")); g_assert (GTK_IS_COMBO_BOX_ENTRY (combo)); @@ -120,10 +120,10 @@ setup_folder_name_combo (GladeXML *glade_xml, const gchar *fname) static void folder_name_entry_changed_callback (GtkEditable *editable, - void *data) + gpointer data) { GtkDialog *dialog = GTK_DIALOG (data); - const char *folder_name_text = gtk_entry_get_text (GTK_ENTRY (editable)); + const gchar *folder_name_text = gtk_entry_get_text (GTK_ENTRY (editable)); if (*folder_name_text == '\0') gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE); @@ -132,10 +132,10 @@ folder_name_entry_changed_callback (GtkEditable *editable, } static void -user_name_entry_changed_callback (GtkEditable *editable, void *data) +user_name_entry_changed_callback (GtkEditable *editable, gpointer data) { GtkDialog *dialog = GTK_DIALOG (data); - const char *user_name_text = gtk_entry_get_text (GTK_ENTRY (editable)); + const gchar *user_name_text = gtk_entry_get_text (GTK_ENTRY (editable)); if (*user_name_text == '\0') gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE); @@ -181,7 +181,7 @@ subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data) { SubscriptionInfo *subscription_info = data; gchar *user_email_address = NULL, *folder_name = NULL, *path = NULL; - char *subscriber_email; + gchar *subscriber_email; EFolder *folder = NULL; EDestinationStore *destination_store; GList *destinations; @@ -292,7 +292,7 @@ create_folder_subscription_dialog (ExchangeAccount *account, const gchar *fname) GladeXML *glade_xml; GtkWidget *dialog, *ok_button; SubscriptionInfo *subscription_info; - int mode; + gint mode; exchange_account_is_offline (account, &mode); if (mode == OFFLINE_MODE) diff --git a/plugins/exchange-operations/exchange-folder.c b/plugins/exchange-operations/exchange-folder.c index 3362f0ae83..959bdec8e5 100644 --- a/plugins/exchange-operations/exchange-folder.c +++ b/plugins/exchange-operations/exchange-folder.c @@ -50,15 +50,15 @@ void org_gnome_exchange_addressbook_subscription (EPlugin *ep, EMMenuTargetSelec void org_gnome_exchange_calendar_subscription (EPlugin *ep, EMMenuTargetSelect *target); void org_gnome_exchange_tasks_subscription (EPlugin *ep, EMMenuTargetSelect *target); void org_gnome_exchange_check_subscribed (EPlugin *ep, ECalPopupTargetSource *target); -void org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, void *data); +void org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, gpointer data); void org_gnome_exchange_check_address_book_subscribed (EPlugin *ep, EABPopupTargetSource *target); -void org_gnome_exchange_folder_ab_unsubscribe (EPopup *ep, EPopupItem *p, void *data); +void org_gnome_exchange_folder_ab_unsubscribe (EPopup *ep, EPopupItem *p, gpointer data); void org_gnome_exchange_check_inbox_subscribed (EPlugin *ep, EMPopupTargetFolder *target); -void org_gnome_exchange_folder_inbox_unsubscribe (EPopup *ep, EPopupItem *p, void *data); -void popup_free (EPopup *ep, GSList *items, void *data); -void popup_inbox_free (EPopup *ep, GSList *items, void *data); -void popup_ab_free (EPopup *ep, GSList *items, void *data); -static void exchange_get_folder (char *uri, CamelFolder *folder, void *data); +void org_gnome_exchange_folder_inbox_unsubscribe (EPopup *ep, EPopupItem *p, gpointer data); +void popup_free (EPopup *ep, GSList *items, gpointer data); +void popup_inbox_free (EPopup *ep, GSList *items, gpointer data); +void popup_ab_free (EPopup *ep, GSList *items, gpointer data); +static void exchange_get_folder (gchar *uri, CamelFolder *folder, gpointer data); #define CONF_KEY_SELECTED_CAL_SOURCES "/apps/evolution/calendar/display/selected_calendars" @@ -68,20 +68,20 @@ static EPopupItem popup_inbox_items[] = { }; void -popup_inbox_free (EPopup *ep, GSList *items, void *data) +popup_inbox_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } void -org_gnome_exchange_folder_inbox_unsubscribe (EPopup *ep, EPopupItem *p, void *data) +org_gnome_exchange_folder_inbox_unsubscribe (EPopup *ep, EPopupItem *p, gpointer data) { ExchangeAccount *account = NULL; EMPopupTargetFolder *target = data; gchar *path = NULL; gchar *stored_path = NULL; - const char *inbox_uri = NULL; - const char *inbox_physical_uri = NULL; + const gchar *inbox_uri = NULL; + const gchar *inbox_physical_uri = NULL; gchar *target_uri = NULL; EFolder *inbox; ExchangeAccountFolderResult result; @@ -147,11 +147,11 @@ org_gnome_exchange_folder_inbox_unsubscribe (EPopup *ep, EPopupItem *p, void *da } static CamelFolderInfo * -ex_create_folder_info (CamelStore *store, char *name, char *uri, - int unread_count, int flags) +ex_create_folder_info (CamelStore *store, gchar *name, gchar *uri, + gint unread_count, gint flags) { CamelFolderInfo *info; - const char *path; + const gchar *path; path = strstr (uri, "://"); if (!path) @@ -170,7 +170,7 @@ ex_create_folder_info (CamelStore *store, char *name, char *uri, } static void -exchange_get_folder (char *uri, CamelFolder *folder, void *data) +exchange_get_folder (gchar *uri, CamelFolder *folder, gpointer data) { CamelStore *store; CamelException ex; @@ -206,7 +206,7 @@ void org_gnome_exchange_check_inbox_subscribed (EPlugin *ep, EMPopupTargetFolder *target) { GSList *menus = NULL; - int i = 0; + gint i = 0; ExchangeAccount *account = NULL; gchar *path = NULL; gchar *sub_folder = NULL; @@ -237,7 +237,7 @@ static EPopupItem popup_items[] = { }; void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } @@ -247,7 +247,7 @@ static EPopupItem popup_ab_items[] = { }; void -popup_ab_free (EPopup *ep, GSList *items, void *data) +popup_ab_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } @@ -256,12 +256,12 @@ void org_gnome_exchange_check_address_book_subscribed (EPlugin *ep, EABPopupTargetSource *target) { GSList *menus = NULL; - int i = 0; + gint i = 0; ESource *source = NULL; gchar *uri = NULL; gchar *path = NULL; - char *sub_folder = NULL; - const char *base_uri; + gchar *sub_folder = NULL; + const gchar *base_uri; ExchangeAccount *account = NULL; ESourceGroup *group; @@ -298,12 +298,12 @@ void org_gnome_exchange_check_subscribed (EPlugin *ep, ECalPopupTargetSource *target) { GSList *menus = NULL; - int i = 0; + gint i = 0; ESource *source = NULL; gchar *ruri = NULL; gchar *path = NULL; - char *sub_folder = NULL; - const char *base_uri; + gchar *sub_folder = NULL; + const gchar *base_uri; ExchangeAccount *account = NULL; ESourceGroup *group; @@ -335,14 +335,14 @@ org_gnome_exchange_check_subscribed (EPlugin *ep, ECalPopupTargetSource *target) } static void -unsubscribe_dialog_ab_response (GtkDialog *dialog, int response, gpointer data) +unsubscribe_dialog_ab_response (GtkDialog *dialog, gint response, gpointer data) { if (response == GTK_RESPONSE_OK) { ExchangeAccount *account = NULL; gchar *path = NULL; gchar *uri = NULL; - const char *source_uid = NULL; + const gchar *source_uid = NULL; ESourceGroup *source_group = NULL; ESource *source = NULL; EABPopupTargetSource *target = data; @@ -371,7 +371,7 @@ unsubscribe_dialog_ab_response (GtkDialog *dialog, int response, gpointer data) } static void -unsubscribe_dialog_response (GtkDialog *dialog, int response, gpointer data) +unsubscribe_dialog_response (GtkDialog *dialog, gint response, gpointer data) { if (response == GTK_RESPONSE_OK) { @@ -379,7 +379,7 @@ unsubscribe_dialog_response (GtkDialog *dialog, int response, gpointer data) ExchangeAccount *account = NULL; gchar *path = NULL; gchar *ruri = NULL; - const char *source_uid = NULL; + const gchar *source_uid = NULL; GConfClient *client; ESourceGroup *source_group = NULL; ESource *source = NULL; @@ -430,7 +430,7 @@ unsubscribe_dialog_response (GtkDialog *dialog, int response, gpointer data) } void -org_gnome_exchange_folder_ab_unsubscribe (EPopup *ep, EPopupItem *p, void *data) +org_gnome_exchange_folder_ab_unsubscribe (EPopup *ep, EPopupItem *p, gpointer data) { GtkWidget *dialog = NULL; EABPopupTargetSource *target = data; @@ -485,7 +485,7 @@ org_gnome_exchange_folder_ab_unsubscribe (EPopup *ep, EPopupItem *p, void *data) unsubscribe_dialog_ab_response (GTK_DIALOG (dialog), response, data); } void -org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, void *data) +org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, gpointer data) { GtkWidget *dialog = NULL; ECalPopupTargetSource *target = data; diff --git a/plugins/exchange-operations/exchange-mail-send-options.c b/plugins/exchange-operations/exchange-mail-send-options.c index 74d3af258e..39929eaa5b 100644 --- a/plugins/exchange-operations/exchange-mail-send-options.c +++ b/plugins/exchange-operations/exchange-mail-send-options.c @@ -44,7 +44,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data) { EMsgComposer *composer; CamelAddress *sender_address; - const char *sender_id, *recipient_id; + const gchar *sender_id, *recipient_id; struct _camel_header_address *addr; struct _camel_header_address *sender_addr; @@ -86,7 +86,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data) e_msg_composer_remove_header (composer, "Sensitivity"); sender_address = (CamelAddress *) e_msg_composer_get_from (composer); - sender_id = (const char*) camel_address_encode (sender_address); + sender_id = (const gchar *) camel_address_encode (sender_address); addr = camel_header_address_decode (dialog->options->delegate_address, NULL); sender_addr = camel_header_address_decode (sender_id, NULL); @@ -122,7 +122,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data) if (dialog->options->delivery_enabled) { EComposerHeaderTable *table; EAccount *account; - char *mdn_address; + gchar *mdn_address; table = e_msg_composer_get_header_table (composer); account = e_composer_header_table_get_account (table); @@ -137,7 +137,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data) if (dialog->options->read_enabled) { EComposerHeaderTable *table; EAccount *account; - char *mdn_address; + gchar *mdn_address; table = e_msg_composer_get_header_table (composer); account = e_composer_header_table_get_account (table); @@ -171,7 +171,7 @@ org_gnome_exchange_send_options (EPlugin *ep, EMEventTargetComposer *target) EMsgComposer *composer = target->composer; EComposerHeaderTable *table; EAccount *account = NULL; - char *temp = NULL; + gchar *temp = NULL; table = e_msg_composer_get_header_table (composer); account = e_composer_header_table_get_account (table); diff --git a/plugins/exchange-operations/exchange-operations.c b/plugins/exchange-operations/exchange-operations.c index 553a41695e..e9b8d3fd5d 100644 --- a/plugins/exchange-operations/exchange-operations.c +++ b/plugins/exchange-operations/exchange-operations.c @@ -57,8 +57,8 @@ free_exchange_listener (void) g_object_unref (exchange_global_config_listener); } -int -e_plugin_lib_enable (EPluginLib *eplib, int enable) +gint +e_plugin_lib_enable (EPluginLib *eplib, gint enable) { if (!exchange_global_config_listener) { exchange_global_config_listener = exchange_config_listener_new (); @@ -75,10 +75,10 @@ exchange_is_offline (gint *mode) /* FIXME: See if a GLib variant of this function available */ gboolean -exchange_operations_tokenize_string (char **string, char *token, char delimit, unsigned int maxsize) +exchange_operations_tokenize_string (gchar **string, gchar *token, gchar delimit, guint maxsize) { - unsigned int i=0; - char *str=*string; + guint i=0; + gchar *str=*string; while (*str!=delimit && *str!='\0' && i<maxsize-1) { token[i++]=*str++; } @@ -92,11 +92,11 @@ exchange_operations_tokenize_string (char **string, char *token, char delimit, u } gboolean -exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *ruri) +exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent, const gchar *ruri) { GtkTreeIter iter; - char *luri=(char *)ruri; - char nodename[80]; + gchar *luri=(gchar *)ruri; + gchar nodename[80]; gchar *uri; gboolean status, found; @@ -146,10 +146,10 @@ exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *pare } void -exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *nuri, const char *ruri, GtkTreeSelection *selection) +exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter *parent, const gchar *nuri, const gchar *ruri, GtkTreeSelection *selection) { - char *luri=(char *)nuri; - char nodename[80]; + gchar *luri=(gchar *)nuri; + gchar nodename[80]; GtkTreeIter iter; gboolean status; @@ -273,7 +273,7 @@ void exchange_operations_update_child_esources (ESource *source, const gchar *ol sources = e_source_group_peek_sources (group); for (tsource = sources; tsource != NULL; tsource = tsource->next) { gchar *ruri; - ruri = (gchar*) e_source_peek_relative_uri (tsource->data); + ruri = (gchar *) e_source_peek_relative_uri (tsource->data); if (ruri && g_strrstr (ruri, old_path)) { /* This ESource points to one of the child folders */ gchar **tmpv, *truri; @@ -288,7 +288,7 @@ void exchange_operations_update_child_esources (ESource *source, const gchar *ol } gboolean -is_exchange_personal_folder (ExchangeAccount *account, char *uri) +is_exchange_personal_folder (ExchangeAccount *account, gchar *uri) { ExchangeHierarchy *hier; EFolder *folder; diff --git a/plugins/exchange-operations/exchange-operations.h b/plugins/exchange-operations/exchange-operations.h index c453b0b978..5de844ba7f 100644 --- a/plugins/exchange-operations/exchange-operations.h +++ b/plugins/exchange-operations/exchange-operations.h @@ -38,21 +38,21 @@ extern "C" { extern ExchangeConfigListener *exchange_global_config_listener; -int e_plugin_lib_enable (EPluginLib *eplib, int enable); +gint e_plugin_lib_enable (EPluginLib *eplib, gint enable); ExchangeAccount *exchange_operations_get_exchange_account (void); ExchangeConfigListenerStatus exchange_is_offline (gint *mode); -gboolean exchange_operations_tokenize_string (char **string, char *token, char delimit, unsigned int maxsize); +gboolean exchange_operations_tokenize_string (gchar **string, gchar *token, gchar delimit, guint maxsize); -gboolean exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *nuri); -void exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *nuri, const char *ruri, GtkTreeSelection *selection) ; +gboolean exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent, const gchar *nuri); +void exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter *parent, const gchar *nuri, const gchar *ruri, GtkTreeSelection *selection) ; void exchange_operations_report_error (ExchangeAccount *account, ExchangeAccountResult result); void exchange_operations_update_child_esources (ESource *source, const gchar *old_path, const gchar *new_path); -gboolean is_exchange_personal_folder (ExchangeAccount *account, char *uri); +gboolean is_exchange_personal_folder (ExchangeAccount *account, gchar *uri); #ifdef __cplusplus } diff --git a/plugins/exchange-operations/exchange-permissions-dialog.c b/plugins/exchange-operations/exchange-permissions-dialog.c index a83d54c517..9456754377 100644 --- a/plugins/exchange-operations/exchange-permissions-dialog.c +++ b/plugins/exchange-operations/exchange-permissions-dialog.c @@ -45,7 +45,7 @@ struct _ExchangePermissionsDialogPrivate { ExchangeAccount *account; - char *base_uri, *folder_path; + gchar *base_uri, *folder_path; E2kSecurityDescriptor *sd; gboolean changed; gboolean frozen; @@ -129,13 +129,13 @@ static void get_widgets (ExchangePermissionsDialog *dialog, static void setup_user_list (ExchangePermissionsDialog *dialog); static void display_permissions (ExchangePermissionsDialog *dialog); static void dialog_response (ExchangePermissionsDialog *dialog, - int response, gpointer user_data); + gint response, gpointer user_data); -static const char *sd_props[] = { +static const gchar *sd_props[] = { E2K_PR_EXCHANGE_SD_BINARY, E2K_PR_EXCHANGE_SD_XML }; -static const int n_sd_props = sizeof (sd_props) / sizeof (sd_props[0]); +static const gint n_sd_props = sizeof (sd_props) / sizeof (sd_props[0]); /** * exchange_permissions_dialog_new: @@ -151,15 +151,15 @@ exchange_permissions_dialog_new (ExchangeAccount *account, GtkWidget *parent) { ExchangePermissionsDialog *dialog; - const char *base_uri, *folder_uri, *folder_path; + const gchar *base_uri, *folder_uri, *folder_path; E2kContext *ctx; ExchangeHierarchy *hier; GladeXML *xml; GtkWidget *box; - char *title; + gchar *title; E2kHTTPStatus status; E2kResult *results; - int nresults = 0; + gint nresults = 0; xmlNode *xml_form; GByteArray *binary_form; @@ -242,7 +242,7 @@ exchange_permissions_dialog_new (ExchangeAccount *account, } static void -dialog_response (ExchangePermissionsDialog *dialog, int response, +dialog_response (ExchangePermissionsDialog *dialog, gint response, gpointer user_data) { E2kContext *ctx; @@ -276,7 +276,7 @@ dialog_response (ExchangePermissionsDialog *dialog, int response, * folder hierarchy. #29726 */ iter = e2k_context_bproppatch_start (ctx, NULL, dialog->priv->base_uri, - (const char **)&dialog->priv->folder_path, 1, + (const gchar **)&dialog->priv->folder_path, 1, props, FALSE); e2k_properties_free (props); @@ -388,7 +388,7 @@ add_clicked (GtkButton *button, gpointer user_data) const guint8 *bsid, *bsid2; GList *email_list = NULL; GList *l = NULL; - char *email = NULL; + gchar *email = NULL; gboolean valid; gint result; @@ -525,7 +525,7 @@ static void role_changed (GtkWidget *role_combo, gpointer user_data) { ExchangePermissionsDialog *dialog = user_data; - int role; + gint role; if (dialog->priv->frozen) return; @@ -548,7 +548,7 @@ role_changed (GtkWidget *role_combo, gpointer user_data) static void display_role (ExchangePermissionsDialog *dialog) { - int role = dialog->priv->selected_role; + gint role = dialog->priv->selected_role; GtkTreeModel *model; GtkTreeIter iter; @@ -772,17 +772,17 @@ get_widgets (ExchangePermissionsDialog *dialog, GladeXML *xml) "toggled", G_CALLBACK (rv_toggle), dialog); } -GtkWidget *exchange_permissions_role_optionmenu_new (char *widget_name, char *string1, char *string2, int int1, int int2); +GtkWidget *exchange_permissions_role_optionmenu_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2); GtkWidget * -exchange_permissions_role_optionmenu_new (char *widget_name, char *string1, char *string2, int int1, int int2) +exchange_permissions_role_optionmenu_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2) { GtkWidget *menu; - const char **roles; - int role; + const gchar **roles; + gint role; menu = gtk_combo_box_new_text (); - roles = g_new (const char *, E2K_PERMISSIONS_ROLE_NUM_ROLES + 1); + roles = g_new (const gchar *, E2K_PERMISSIONS_ROLE_NUM_ROLES + 1); for (role = 0; role < E2K_PERMISSIONS_ROLE_NUM_ROLES; role++) { roles[role] = e2k_permissions_role_get_name (role); gtk_combo_box_append_text (GTK_COMBO_BOX (menu), roles[role]); diff --git a/plugins/exchange-operations/exchange-send-options.c b/plugins/exchange-operations/exchange-send-options.c index a9858d324a..783887cb24 100644 --- a/plugins/exchange-operations/exchange-send-options.c +++ b/plugins/exchange-operations/exchange-send-options.c @@ -68,7 +68,7 @@ struct _ExchangeSendOptionsDialogPrivate { /*Label Widgets*/ GtkWidget *importance_label; GtkWidget *sensitivity_label; - char *help_section; + gchar *help_section; }; static void exchange_sendoptions_dialog_class_init (GObjectClass *object_class); @@ -92,7 +92,7 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod) { ExchangeSendOptionsDialogPrivate *priv; ExchangeSendOptions *options; - const char *address, *email, *name; + const gchar *address, *email, *name; guint count=0; ENameSelectorEntry *name_selector_entry; @@ -120,8 +120,8 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod) produced ambiguous results. Hence count is used :) */ for (; tmp != NULL; tmp = g_list_next (tmp)) { - address = g_strdup ((char *) e_destination_get_address (tmp->data)); - email = g_strdup ((char *) e_destination_get_email (tmp->data)); + address = g_strdup ((gchar *) e_destination_get_address (tmp->data)); + email = g_strdup ((gchar *) e_destination_get_email (tmp->data)); name = g_strdup (e_destination_get_name (tmp->data)); if (g_str_equal (email, "")) continue; diff --git a/plugins/exchange-operations/exchange-send-options.h b/plugins/exchange-operations/exchange-send-options.h index b7bb9dd58b..8a6d37d947 100644 --- a/plugins/exchange-operations/exchange-send-options.h +++ b/plugins/exchange-operations/exchange-send-options.h @@ -60,9 +60,9 @@ typedef struct { gboolean send_as_del_enabled; gboolean delivery_enabled; gboolean read_enabled; - const char *delegate_name; - const char *delegate_email; - const char *delegate_address; + const gchar *delegate_name; + const gchar *delegate_email; + const gchar *delegate_address; } ExchangeSendOptions ; struct _ExchangeSendOptionsDialog { diff --git a/plugins/exchange-operations/exchange-user-dialog.c b/plugins/exchange-operations/exchange-user-dialog.c index 9285b9680e..3b7602f6e4 100644 --- a/plugins/exchange-operations/exchange-user-dialog.c +++ b/plugins/exchange-operations/exchange-user-dialog.c @@ -30,7 +30,7 @@ #include "e2k-xml-utils.h" struct _E2kUserDialogPrivate { - char *section_name; + gchar *section_name; ENameSelector *name_selector; GtkWidget *entry, *parent_window; }; @@ -125,8 +125,8 @@ addressbook_clicked_cb (GtkWidget *widget, gpointer data) static gboolean e2k_user_dialog_construct (E2kUserDialog *dialog, GtkWidget *parent_window, - const char *label_text, - const char *section_name) + const gchar *label_text, + const gchar *section_name) { E2kUserDialogPrivate *priv; GtkWidget *hbox, *vbox, *label, *button; @@ -197,7 +197,7 @@ e2k_user_dialog_construct (E2kUserDialog *dialog, **/ GtkWidget * e2k_user_dialog_new (GtkWidget *parent_window, - const char *label_text, const char *section_name) + const gchar *label_text, const gchar *section_name) { E2kUserDialog *dialog; @@ -243,7 +243,7 @@ e2k_user_dialog_get_user_list (E2kUserDialog *dialog) return NULL; for (l = destinations; l; l = g_list_next (l)) { - const char *mail; + const gchar *mail; destination = l->data; mail = e_destination_get_email (destination); @@ -263,7 +263,7 @@ e2k_user_dialog_get_user_list (E2kUserDialog *dialog) * * Return value: the email address, which must be freed with g_free(). **/ -char * +gchar * e2k_user_dialog_get_user (E2kUserDialog *dialog) { E2kUserDialogPrivate *priv; diff --git a/plugins/exchange-operations/exchange-user-dialog.h b/plugins/exchange-operations/exchange-user-dialog.h index 6bf191bc6e..8b6134befe 100644 --- a/plugins/exchange-operations/exchange-user-dialog.h +++ b/plugins/exchange-operations/exchange-user-dialog.h @@ -48,9 +48,9 @@ struct _E2kUserDialogClass { GType e2k_user_dialog_get_type (void); GtkWidget *e2k_user_dialog_new (GtkWidget *parent_window, - const char *label_text, - const char *section_name); -char *e2k_user_dialog_get_user (E2kUserDialog *dialog); + const gchar *label_text, + const gchar *section_name); +gchar *e2k_user_dialog_get_user (E2kUserDialog *dialog); GList *e2k_user_dialog_get_user_list (E2kUserDialog *dialog); #endif /* __E2K_USER_DIALOG_H__ */ diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c index a07bb6e80e..10cfdb4fd6 100644 --- a/plugins/external-editor/external-editor.c +++ b/plugins/external-editor/external-editor.c @@ -69,7 +69,7 @@ static GThread *editor_thread; void ee_editor_command_changed (GtkWidget *textbox) { - const char *editor; + const gchar *editor; GConfClient *gconf; editor = gtk_entry_get_text (GTK_ENTRY(textbox)); @@ -101,7 +101,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl) GtkWidget *vbox, *textbox, *label, *help; GtkWidget *checkbox; GConfClient *gconf; - char *editor; + gchar *editor; gboolean checked; vbox = gtk_vbox_new (FALSE, 10); @@ -209,8 +209,8 @@ run_error_dialog (gchar *text) void async_external_editor (EMsgComposer *composer) { - char *filename = NULL; - int status = 0; + gchar *filename = NULL; + gint status = 0; GConfClient *gconf; gchar *editor_cmd_line = NULL; gint fd; diff --git a/plugins/face/face.c b/plugins/face/face.c index 1b772863a4..6bbc7bbf1a 100644 --- a/plugins/face/face.c +++ b/plugins/face/face.c @@ -50,7 +50,7 @@ action_face_cb (GtkAction *action, if (error) { GtkWidget *filesel; - const char *image_filename; + const gchar *image_filename; gsize length; GtkFileFilter *filter; @@ -89,7 +89,7 @@ action_face_cb (GtkAction *action, pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); if (pixbuf) { - int width, height; + gint width, height; g_object_ref (pixbuf); diff --git a/plugins/folder-unsubscribe/folder-unsubscribe.c b/plugins/folder-unsubscribe/folder-unsubscribe.c index 308aea35f0..1d5e4fb8dc 100644 --- a/plugins/folder-unsubscribe/folder-unsubscribe.c +++ b/plugins/folder-unsubscribe/folder-unsubscribe.c @@ -46,7 +46,7 @@ void org_gnome_mail_folder_unsubscribe (EPlugin *plug, EMPopupTargetFolder *targ struct _folder_unsub_t { MailMsg base; - char *uri; + gchar *uri; }; static gchar * @@ -60,7 +60,7 @@ static void folder_unsubscribe_exec (struct _folder_unsub_t *msg) { extern CamelSession *session; - const char *path = NULL; + const gchar *path = NULL; CamelStore *store; CamelURL *url; diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c index 23314a44cc..2253d8a7a0 100644 --- a/plugins/google-account-setup/google-contacts-source.c +++ b/plugins/google-account-setup/google-contacts-source.c @@ -83,8 +83,8 @@ static void on_username_entry_changed (GtkEntry *entry, gpointer user_data) { ESource *source = user_data; - const char *text; - char *username; + const gchar *text; + gchar *username; text = gtk_entry_get_text (entry); @@ -120,9 +120,9 @@ typedef enum { } IntervalType; static void -seconds_to_interval (guint seconds, IntervalType *type, int *time) +seconds_to_interval (guint seconds, IntervalType *type, gint *time) { - int minutes = seconds / 60; + gint minutes = seconds / 60; *type = MINUTES; *time = minutes; @@ -139,7 +139,7 @@ seconds_to_interval (guint seconds, IntervalType *type, int *time) } static guint -interval_to_seconds (IntervalType type, int time) +interval_to_seconds (IntervalType type, gint time) { switch (type) { case MINUTES: @@ -163,7 +163,7 @@ on_interval_sb_value_changed (GtkSpinButton *sb, gpointer user_data) ESource *source = user_data; gdouble time; guint seconds; - char *value_string; + gchar *value_string; GtkWidget *interval_combo; IntervalType type; @@ -185,7 +185,7 @@ on_interval_combo_changed (GtkComboBox *combo, gpointer user_data) ESource *source = user_data; gdouble time; guint seconds; - char *value_string; + gchar *value_string; GtkWidget *sb; IntervalType type; @@ -223,11 +223,11 @@ plugin_google_contacts (EPlugin *epl, EABConfigTargetSource *t = (EABConfigTargetSource *) data->target; ESource *source; ESourceGroup *group; - const char *base_uri; - const char *username; - const char *refresh_interval_str; + const gchar *base_uri; + const gchar *username; + const gchar *refresh_interval_str; guint refresh_interval; - const char *use_ssl_str; + const gchar *use_ssl_str; gboolean use_ssl; GtkWidget *parent; GtkWidget *vbox; @@ -243,7 +243,7 @@ plugin_google_contacts (EPlugin *epl, GtkWidget *interval_sb; GtkWidget *interval_combo; IntervalType type; - int time; + gint time; GtkWidget *ssl_cb; struct ui_data *ui; diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c index 97d87c666d..cc18b0a3af 100644 --- a/plugins/google-account-setup/google-source.c +++ b/plugins/google-account-setup/google-source.c @@ -57,8 +57,8 @@ /*****************************************************************************/ /* prototypes */ -int e_plugin_lib_enable (EPluginLib *ep, - int enable); +gint e_plugin_lib_enable (EPluginLib *ep, + gint enable); GtkWidget * plugin_google (EPlugin *epl, EConfigHookItemFactoryData *data); @@ -82,8 +82,8 @@ ensure_google_source_group (void) g_object_unref (slist); } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { if (enable) { @@ -114,22 +114,22 @@ ssl_changed (GtkToggleButton *button, ESource *source) static gboolean -is_email (const char *address) +is_email (const gchar *address) { /* This is supposed to check if the address's domain could be an FQDN but alas, it's not worth the pain and suffering. */ - const char *at; + const gchar *at; at = strchr (address, '@'); - /* make sure we have an '@' and that it's not the first or last char */ + /* make sure we have an '@' and that it's not the first or last gchar */ if (!at || at == address || *(at + 1) == '\0') return FALSE; return TRUE; } -static char * -sanitize_user_mail (const char *user) +static gchar * +sanitize_user_mail (const gchar *user) { if (!user) return NULL; @@ -137,8 +137,8 @@ sanitize_user_mail (const char *user) if (!is_email (user)) { return g_strconcat (user, "%40gmail.com", NULL); } else { - char *tmp = g_malloc0 (sizeof (char) * (1 + strlen (user) + 2)); - char *at = strchr (user, '@'); + gchar *tmp = g_malloc0 (sizeof (char) * (1 + strlen (user) + 2)); + gchar *at = strchr (user, '@'); strncpy (tmp, user, at - user); strcat (tmp, "%40"); @@ -148,10 +148,10 @@ sanitize_user_mail (const char *user) } } -static char * -construct_default_uri (const char *username) +static gchar * +construct_default_uri (const gchar *username) { - char *user, *uri; + gchar *user, *uri; user = sanitize_user_mail (username); uri = g_strconcat (CALENDAR_LOCATION, user, CALENDAR_DEFAULT_PATH, NULL); @@ -162,10 +162,10 @@ construct_default_uri (const char *username) /* checks whether the given_uri is pointing to the default user's calendar or not */ static gboolean -is_default_uri (const char *given_uri, const char *username) +is_default_uri (const gchar *given_uri, const gchar *username) { - char *uri, *at; - int ats; + gchar *uri, *at; + gint ats; gboolean res; if (!given_uri) @@ -182,8 +182,8 @@ is_default_uri (const char *given_uri, const char *username) if (!ats) res = g_ascii_strcasecmp (given_uri, uri) == 0; else { - const char *last; - char *tmp = g_malloc0 (sizeof (char) * (1 + strlen (given_uri) + (2 * ats))); + const gchar *last; + gchar *tmp = g_malloc0 (sizeof (char) * (1 + strlen (given_uri) + (2 * ats))); last = given_uri; for (at = strchr (last, '@'); at; at = strchr (at + 1, '@')) { @@ -203,13 +203,13 @@ is_default_uri (const char *given_uri, const char *username) return res; } -static void init_combo_values (GtkComboBox *combo, const char *deftitle, const char *defuri); +static void init_combo_values (GtkComboBox *combo, const gchar *deftitle, const gchar *defuri); static void user_changed (GtkEntry *editable, ESource *source) { - char *uri; - const char *user; + gchar *uri; + const gchar *user; /* two reasons why set readonly to FALSE: a) the e_source_set_relative_uri does nothing for readonly sources @@ -232,10 +232,10 @@ user_changed (GtkEntry *editable, ESource *source) init_combo_values (GTK_COMBO_BOX (g_object_get_data (G_OBJECT (editable), "CalendarCombo")), _("Default"), NULL); } -static char * +static gchar * get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { - int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); + gint setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ @@ -289,9 +289,9 @@ combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) static void set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { - int time; - int item_num = 0; - const char *refresh_str = e_source_get_property (source, "refresh"); + gint time; + gint item_num = 0; + const gchar *refresh_str = e_source_get_property (source, "refresh"); time = refresh_str ? atoi (refresh_str) : 30; if (time && !(time % 10080)) { @@ -320,7 +320,7 @@ enum { }; static void -init_combo_values (GtkComboBox *combo, const char *deftitle, const char *defuri) +init_combo_values (GtkComboBox *combo, const gchar *deftitle, const gchar *defuri) { GtkTreeIter iter; GtkListStore *store; @@ -355,7 +355,7 @@ cal_combo_changed (GtkComboBox *combo, ESource *source) store = GTK_LIST_STORE (gtk_combo_box_get_model (combo)); if (gtk_combo_box_get_active_iter (combo, &iter)) { - char *uri = NULL, *title = NULL; + gchar *uri = NULL, *title = NULL; gboolean readonly = FALSE; gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, COL_TITLE, &title, COL_URL_PATH, &uri, COL_READ_ONLY, &readonly, -1); @@ -383,7 +383,7 @@ cal_combo_changed (GtkComboBox *combo, ESource *source) } static void -claim_error (GtkWindow *parent, const char *error) +claim_error (GtkWindow *parent, const gchar *error) { GtkWidget *dialog; @@ -403,8 +403,8 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo) ESource *source; GDataGoogleService *service; GDataFeed *feed; - char *password, *tmp; - const char *username; + gchar *password, *tmp; + const gchar *username; GError *error = NULL; GtkWindow *parent; @@ -438,8 +438,8 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo) if (feed) { GSList *l; - char *old_selected = NULL; - int idx, active = -1, default_idx = -1; + gchar *old_selected = NULL; + gint idx, active = -1, default_idx = -1; GtkListStore *store = GTK_LIST_STORE (gtk_combo_box_get_model (combo)); GtkTreeIter iter; @@ -449,7 +449,7 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo) gtk_list_store_clear (store); for (l = gdata_feed_get_entries (feed), idx = 1; l != NULL; l = l->next) { - const char *uri, *title, *color, *access; + const gchar *uri, *title, *color, *access; GSList *links; GDataEntry *entry = (GDataEntry *) l->data; @@ -559,11 +559,11 @@ plugin_google (EPlugin *epl, GtkWidget *user; GtkWidget *label; GtkWidget *combo; - char *uri; - const char *username; - const char *ssl_prop; + gchar *uri; + const gchar *username; + const gchar *ssl_prop; gboolean ssl_enabled; - int row; + gint row; GtkCellRenderer *renderer; GtkListStore *store; diff --git a/plugins/groupwise-account-setup/camel-gw-listener.c b/plugins/groupwise-account-setup/camel-gw-listener.c index 3d1fb15214..46beaac0b8 100644 --- a/plugins/groupwise-account-setup/camel-gw-listener.c +++ b/plugins/groupwise-account-setup/camel-gw-listener.c @@ -45,9 +45,9 @@ struct _CamelGwListenerPrivate { }; struct _GwAccountInfo { - char *uid; - char *name; - char *source_url; + gchar *uid; + gchar *name; + gchar *source_url; gboolean auto_check; guint auto_check_time; }; @@ -139,11 +139,11 @@ is_groupwise_account (EAccount *account) /* looks up for an existing groupwise account info in the groupwise_accounts list based on uid */ static GwAccountInfo* -lookup_account_info (const char *key) +lookup_account_info (const gchar *key) { GList *list; GwAccountInfo *info ; - int found = 0; + gint found = 0; if (!key) return NULL; @@ -169,7 +169,7 @@ lookup_account_info (const char *key) #define SELECTED_NOTES "/apps/evolution/calendar/memos/selected_memos" static void -add_esource (const char *conf_key, GwAccountInfo *info, const char *source_name, CamelURL *url, const char* parent_id_name, gboolean can_create) +add_esource (const gchar *conf_key, GwAccountInfo *info, const gchar *source_name, CamelURL *url, const gchar * parent_id_name, gboolean can_create) { ESourceList *source_list; ESourceGroup *group; @@ -177,12 +177,12 @@ add_esource (const char *conf_key, GwAccountInfo *info, const char *source_name GConfClient* client; GSList *ids, *temp ; const gchar *source_selection_key; - char *relative_uri; - const char *soap_port; - const char * use_ssl; - const char *poa_address; - const char *offline_sync; - const char *group_name; + gchar *relative_uri; + const gchar *soap_port; + const gchar * use_ssl; + const gchar *poa_address; + const gchar *offline_sync; + const gchar *group_name; poa_address = url->host; if (!poa_address || strlen (poa_address) ==0) @@ -220,7 +220,7 @@ add_esource (const char *conf_key, GwAccountInfo *info, const char *source_name e_source_set_property (source, "use_ssl", use_ssl); if (info->auto_check) { - char *str = g_strdup_printf ("%d", info->auto_check_time); + gchar *str = g_strdup_printf ("%d", info->auto_check_time); e_source_set_property (source, "refresh", str); g_free (str); @@ -266,7 +266,7 @@ add_esource (const char *conf_key, GwAccountInfo *info, const char *source_name } static void -remove_esource (const char *conf_key, const char *group_name, char* source_name, const char* relative_uri) +remove_esource (const gchar *conf_key, const gchar *group_name, gchar * source_name, const gchar * relative_uri) { ESourceList *list; GSList *groups; @@ -338,17 +338,17 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name, /* looks up for e-source with having same info as old_account_info and changes its values passed in new values */ static void -modify_esource (const char* conf_key, GwAccountInfo *old_account_info, EAccount *a, CamelURL *new_url) +modify_esource (const gchar * conf_key, GwAccountInfo *old_account_info, EAccount *a, CamelURL *new_url) { ESourceList *list; GSList *groups; - char *old_relative_uri; + gchar *old_relative_uri; CamelURL *url; gboolean found_group; GConfClient* client; - const char *poa_address; - const char *new_poa_address; - const char* new_group_name = a->name; + const gchar *poa_address; + const gchar *new_poa_address; + const gchar * new_group_name = a->name; url = camel_url_new (old_account_info->source_url, NULL); poa_address = url->host; @@ -389,7 +389,7 @@ modify_esource (const char* conf_key, GwAccountInfo *old_account_info, EAccount e_source_set_property (source, "offline_sync", camel_url_get_param (url, "offline_sync") ? "1" : "0"); if (a->source->auto_check) { - char *str = g_strdup_printf ("%d", a->source->auto_check_time); + gchar *str = g_strdup_printf ("%d", a->source->auto_check_time); e_source_set_property (source, "refresh", str); g_free (str); @@ -437,9 +437,9 @@ static void remove_calendar_tasks_sources (GwAccountInfo *info) { CamelURL *url; - char *relative_uri; - const char *soap_port; - const char *poa_address; + gchar *relative_uri; + const gchar *soap_port; + const gchar *poa_address; url = camel_url_new (info->source_url, NULL); @@ -462,22 +462,22 @@ remove_calendar_tasks_sources (GwAccountInfo *info) } static GList* -get_addressbook_names_from_server (char *source_url) +get_addressbook_names_from_server (gchar *source_url) { - char *key; + gchar *key; EGwConnection *cnc; - char *password; + gchar *password; GList *book_list = NULL; - int status, count = 0; - const char *soap_port; + gint status, count = 0; + const gchar *soap_port; CamelURL *url; gboolean remember; - char *failed_auth = NULL; - char *prompt; - char *password_prompt; - char *uri; - const char *use_ssl; - const char *poa_address; + gchar *failed_auth = NULL; + gchar *prompt; + gchar *password_prompt; + gchar *uri; + const gchar *use_ssl; + const gchar *poa_address; guint32 flags = E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET; url = camel_url_new (source_url, NULL); @@ -552,10 +552,10 @@ get_addressbook_names_from_server (char *source_url) } static void -add_proxy_sources (GwAccountInfo *info, const char *parent_name) +add_proxy_sources (GwAccountInfo *info, const gchar *parent_name) { CamelURL *url; - char *color; + gchar *color; url = camel_url_new (info->source_url, NULL); @@ -580,12 +580,12 @@ add_addressbook_sources (EAccount *account) ESourceList *list; ESourceGroup *group; ESource *source; - char *base_uri; - const char *soap_port; + gchar *base_uri; + const gchar *soap_port; GList *books_list, *temp_list; GConfClient* client; - const char* use_ssl; - const char *poa_address; + const gchar * use_ssl; + const gchar *poa_address; gboolean is_frequent_contacts = FALSE, is_writable = FALSE; url = camel_url_new (account->source->url, NULL); @@ -610,7 +610,7 @@ add_addressbook_sources (EAccount *account) if (!temp_list) return FALSE; for (; temp_list != NULL; temp_list = g_list_next (temp_list)) { - const char *book_name = e_gw_container_get_name (E_GW_CONTAINER(temp_list->data)); + const gchar *book_name = e_gw_container_get_name (E_GW_CONTAINER(temp_list->data)); /* is_writable is set to TRUE if the book has isPersonal property, * by e_gw_connection_get_address_book_list() */ @@ -673,14 +673,14 @@ modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_ GSList *groups; gboolean found_group; gboolean delete_group; - char *old_base_uri; - char *new_base_uri; - const char *soap_port; - const char *use_ssl; + gchar *old_base_uri; + gchar *new_base_uri; + const gchar *soap_port; + const gchar *use_ssl; GSList *sources; ESource *source; GConfClient *client; - const char *poa_address; + const gchar *poa_address; url = camel_url_new (existing_account_info->source_url, NULL); @@ -758,10 +758,10 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info) GSList *groups; gboolean found_group; CamelURL *url; - char *base_uri; - const char *soap_port; + gchar *base_uri; + const gchar *soap_port; GConfClient *client; - const char *poa_address; + const gchar *poa_address; url = camel_url_new (existing_account_info->source_url, NULL); if (url == NULL) { @@ -863,10 +863,10 @@ account_changed (EAccountList *account_listener, EAccount *account) { gboolean is_gw_account; CamelURL *old_url, *new_url; - const char *old_soap_port, *new_soap_port; + const gchar *old_soap_port, *new_soap_port; GwAccountInfo *existing_account_info; - const char *old_use_ssl, *new_use_ssl; - const char *old_poa_address, *new_poa_address; + const gchar *old_use_ssl, *new_use_ssl; + const gchar *old_poa_address, *new_poa_address; is_gw_account = is_groupwise_account (account); @@ -953,7 +953,7 @@ prune_proxies (void) { ESource *source; GError *err = NULL; const gchar *parent_id_name = NULL; - int i; + gint i; ECalSourceType types [] = { E_CAL_SOURCE_TYPE_EVENT, E_CAL_SOURCE_TYPE_TODO, E_CAL_SOURCE_TYPE_JOURNAL diff --git a/plugins/groupwise-account-setup/groupwise-account-setup.c b/plugins/groupwise-account-setup/groupwise-account-setup.c index aee5e90623..71bb1ee31e 100644 --- a/plugins/groupwise-account-setup/groupwise-account-setup.c +++ b/plugins/groupwise-account-setup/groupwise-account-setup.c @@ -32,7 +32,7 @@ static CamelGwListener *config_listener = NULL; -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); GtkWidget* org_gnome_gw_account_setup(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data); void ensure_mandatory_esource_properties (EPlugin *ep, ESEventTargetUpgrade *target); @@ -47,7 +47,7 @@ is_groupwise_account (EAccount *account) } static void -set_esource_props (const char *path, EAccount *a, GConfClient *client, const char *name) +set_esource_props (const gchar *path, EAccount *a, GConfClient *client, const gchar *name) { ESourceList *list; GSList *groups; @@ -66,7 +66,7 @@ set_esource_props (const char *path, EAccount *a, GConfClient *client, const cha ESource *source = E_SOURCE (sources->data); if (a->source->auto_check) { - char *str = g_strdup_printf ("%d",a->source->auto_check_time); + gchar *str = g_strdup_printf ("%d",a->source->auto_check_time); e_source_set_property (source, "refresh", str); g_free (str); @@ -113,8 +113,8 @@ free_groupwise_listener ( void ) g_object_unref (config_listener); } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { if (!config_listener) { config_listener = camel_gw_listener_new (); diff --git a/plugins/groupwise-features/addressbook-groupwise.c b/plugins/groupwise-features/addressbook-groupwise.c index b6519c636e..ae0c5e1e8a 100644 --- a/plugins/groupwise-features/addressbook-groupwise.c +++ b/plugins/groupwise-features/addressbook-groupwise.c @@ -34,9 +34,9 @@ commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target) { EABConfigTargetSource *t = (EABConfigTargetSource *) target; ESource *source = t->source; - char *uri_text; + gchar *uri_text; ESourceGroup *source_group; - char *relative_uri; + gchar *relative_uri; GSList *l; uri_text = e_source_get_uri (source); diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c index 29c5ed2855..c9d4ad54e4 100644 --- a/plugins/groupwise-features/install-shared.c +++ b/plugins/groupwise-features/install-shared.c @@ -57,17 +57,17 @@ struct AcceptData { void org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target); static void -install_folder_response (EMFolderSelector *emfs, int response, gpointer *data) +install_folder_response (EMFolderSelector *emfs, gint response, gpointer *data) { struct AcceptData *accept_data = (struct AcceptData *)data; EMFolderTreeModel *model; - const char *uri, *path; - int parts = 0; + const gchar *uri, *path; + gint parts = 0; gchar **names; gchar *folder_name; gchar *parent_name; gchar *container_id; - const char *item_id; + const gchar *item_id; CamelException ex; CamelStore *store; CamelFolder *folder; @@ -106,12 +106,12 @@ install_folder_response (EMFolderSelector *emfs, int response, gpointer *data) if(E_IS_GW_CONNECTION (cnc)) { container_id = get_container_id (cnc, parent_name); - if(e_gw_connection_accept_shared_folder (cnc, folder_name, container_id, (char *)item_id, NULL) == E_GW_CONNECTION_STATUS_OK) { + if(e_gw_connection_accept_shared_folder (cnc, folder_name, container_id, (gchar *)item_id, NULL) == E_GW_CONNECTION_STATUS_OK) { folder = camel_store_get_folder (store, "Mailbox", 0, NULL); /*changes = camel_folder_change_info_new (); - camel_folder_change_info_remove_uid (changes, (char *) item_id); + camel_folder_change_info_remove_uid (changes, (gchar *) item_id); camel_folder_summary_remove_uid (folder->summary, item_id);*/ /* camel_folder_delete_message (folder, item_id); */ camel_folder_set_message_flags (folder, item_id, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED); @@ -146,7 +146,7 @@ install_folder_response (EMFolderSelector *emfs, int response, gpointer *data) } static void -accept_free(void *data) +accept_free(gpointer data) { struct AcceptData *accept_data = data; @@ -161,7 +161,7 @@ accept_clicked(GnomeDruidPage *page, GtkWidget *druid, CamelMimeMessage *msg) EMFolderTree *folder_tree; GtkWidget *dialog; struct AcceptData *accept_data; - char *uri; + gchar *uri; accept_data = g_new0(struct AcceptData, 1); model = mail_component_peek_tree_model (NULL); @@ -186,20 +186,20 @@ void org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target) { const CamelInternetAddress *from_addr = NULL; - const char *name; - const char *email; + const gchar *name; + const gchar *email; GtkWidget *window; GnomeDruid *wizard; GnomeDruidPageEdge *title_page; CamelMimeMessage *msg = (CamelMimeMessage *) target->message; CamelStreamMem *content; CamelDataWrapper *dw; - char *start_message; + gchar *start_message; if (!msg) return; - if (((char *)camel_medium_get_header (CAMEL_MEDIUM(msg),"X-notification")) == NULL + if (((gchar *)camel_medium_get_header (CAMEL_MEDIUM(msg),"X-notification")) == NULL || (from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message)) == NULL || !camel_internet_address_get(from_addr, 0, &name, &email) || (dw = camel_medium_get_content_object (CAMEL_MEDIUM (msg))) == NULL) { diff --git a/plugins/groupwise-features/junk-mail-settings.c b/plugins/groupwise-features/junk-mail-settings.c index 3e7d522c19..aa8c96368d 100644 --- a/plugins/groupwise-features/junk-mail-settings.c +++ b/plugins/groupwise-features/junk-mail-settings.c @@ -52,7 +52,7 @@ abort_changes (JunkSettings *js) } static void -junk_dialog_response (GtkWidget *dialog, int response, JunkSettings *js) +junk_dialog_response (GtkWidget *dialog, gint response, JunkSettings *js) { if (response == GTK_RESPONSE_ACCEPT) { commit_changes(js); @@ -66,11 +66,11 @@ junk_dialog_response (GtkWidget *dialog, int response, JunkSettings *js) } static void -junk_mail_settings (EPopup *ep, EPopupItem *item, void *data) +junk_mail_settings (EPopup *ep, EPopupItem *item, gpointer data) { GtkWidget *dialog ,*w, *notebook, *box; JunkSettings *junk_tab; - int page_count =0; + gint page_count =0; EGwConnection *cnc; gchar *msg; CamelFolder *folder = (CamelFolder *)data; @@ -118,7 +118,7 @@ static EPopupItem popup_items[] = { }; static void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } @@ -128,8 +128,8 @@ org_gnome_junk_settings(EPlugin *ep, EMPopupTargetSelect *t) { GSList *menus = NULL; - int i = 0; - static int first = 0; + gint i = 0; + static gint first = 0; if (! g_strrstr (t->uri, "groupwise://")) return ; diff --git a/plugins/groupwise-features/junk-settings.c b/plugins/groupwise-features/junk-settings.c index 3d66a1c518..cc735feee1 100644 --- a/plugins/groupwise-features/junk-settings.c +++ b/plugins/groupwise-features/junk-settings.c @@ -35,7 +35,7 @@ struct _JunkEntry { EGwJunkEntry *entry; - int flag; + gint flag; }; typedef struct _JunkEntry JunkEntry; @@ -175,9 +175,9 @@ static void get_junk_list (JunkSettings *js) { GList *list = NULL; - char *entry; - char *msg; - int use_junk, use_block, use_pab, persistence; + gchar *entry; + gchar *msg; + gint use_junk, use_block, use_pab, persistence; if (E_IS_GW_CONNECTION (js->cnc)) { if (e_gw_connection_get_junk_settings (js->cnc, &use_junk, &use_block, &use_pab, &persistence) == E_GW_CONNECTION_STATUS_OK) { @@ -227,7 +227,7 @@ commit_changes (JunkSettings *js) GList *node = NULL; JunkEntry *junk_entry = NULL; EGwJunkEntry *entry; - int use_junk, use_pab, use_block, persistence; + gint use_junk, use_pab, use_block, persistence; for (node = js->junk_list; node; node = node->next) { @@ -301,8 +301,8 @@ disable_clicked (GtkRadioButton *button, JunkSettings *js) static void add_clicked(GtkButton *button, JunkSettings *js) { - const char *email = NULL; - const char *self_email = NULL; + const gchar *email = NULL; + const gchar *self_email = NULL; JunkEntry *new_entry = NULL; EGwJunkEntry *junk_entry = NULL; gchar *msg = NULL; @@ -372,7 +372,7 @@ static void junk_settings_construct (JunkSettings *js) { GladeXML *xml; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "junk-settings.glade", diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c index cf039931a5..7007ba5760 100644 --- a/plugins/groupwise-features/mail-retract.c +++ b/plugins/groupwise-features/mail-retract.c @@ -36,19 +36,19 @@ void org_gnome_retract_message (EPlugin *ep, EMPopupTargetSelect *t); -static void retract_mail_settings (EPopup *ep, EPopupItem *item, void *data) +static void retract_mail_settings (EPopup *ep, EPopupItem *item, gpointer data) { EGwConnection *cnc; CamelFolder *folder = (CamelFolder *)data; CamelStore *store = folder->parent_store; - char *id; + gchar *id; GtkWidget *confirm_dialog, *confirm_warning; - int n; + gint n; cnc = get_cnc (store); if (cnc && E_IS_GW_CONNECTION(cnc)) { - id = (char *)item->user_data; + id = (gchar *)item->user_data; confirm_dialog = gtk_dialog_new_with_buttons (_("Message Retract"), NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, @@ -87,7 +87,7 @@ static EPopupItem popup_items[] = { { E_POPUP_ITEM, (gchar *) "20.emfv.04", (gchar *) N_("Retract Mail"), retract_mail_settings, NULL, NULL, 0, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY} }; -static void popup_free (EPopup *ep, GSList *items, void *data) +static void popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } @@ -96,8 +96,8 @@ void org_gnome_retract_message (EPlugin *ep, EMPopupTargetSelect *t) { GSList *menus = NULL; GPtrArray *uids; - int i = 0; - static int first = 0; + gint i = 0; + static gint first = 0; uids = t->uids; if (g_strrstr (t->uri, "groupwise://") && !g_ascii_strcasecmp((t->folder)->full_name, "Sent Items")) { @@ -105,7 +105,7 @@ void org_gnome_retract_message (EPlugin *ep, EMPopupTargetSelect *t) /* for translation*/ if (!first) { popup_items[1].label = _(popup_items[1].label); - popup_items[1].user_data = g_strdup((char *) g_ptr_array_index(uids, 0)); + popup_items[1].user_data = g_strdup((gchar *) g_ptr_array_index(uids, 0)); } first++; diff --git a/plugins/groupwise-features/mail-send-options.c b/plugins/groupwise-features/mail-send-options.c index 7954f9e1a4..05b3452091 100644 --- a/plugins/groupwise-features/mail-send-options.c +++ b/plugins/groupwise-features/mail-send-options.c @@ -46,7 +46,7 @@ static ESendOptionsDialog * dialog = NULL ; void org_gnome_composer_send_options (EPlugin *ep, EMEventTargetComposer *t); static time_t -add_day_to_time (time_t time, int days) +add_day_to_time (time_t time, gint days) { struct tm *tm; @@ -61,8 +61,8 @@ static void feed_input_data(ESendOptionsDialog * dialog, gint state, gpointer data) { EMsgComposer *comp; - char value [100]; - char *temp = NULL; + gchar value [100]; + gchar *temp = NULL; comp = (EMsgComposer *) data; /* we are bothered only for ok response: other cases are handled generally*/ @@ -145,7 +145,7 @@ org_gnome_composer_send_options (EPlugin *ep, EMEventTargetComposer *t) EMsgComposer *comp = (struct _EMsgComposer *)t->composer ; EComposerHeaderTable *table; EAccount *account = NULL; - char *temp = NULL; + gchar *temp = NULL; table = e_msg_composer_get_header_table (comp); account = e_composer_header_table_get_account (table); diff --git a/plugins/groupwise-features/process-meeting.c b/plugins/groupwise-features/process-meeting.c index 67123decf4..57eba9392c 100644 --- a/plugins/groupwise-features/process-meeting.c +++ b/plugins/groupwise-features/process-meeting.c @@ -44,10 +44,10 @@ ECalendarView *c_view; void org_gnome_accept(EPlugin *ep, ECalPopupTargetSelect *target); void org_gnome_retract_resend (EPlugin *ep, ECalPopupTargetSelect *target); -static void on_accept_meeting (EPopup *ep, EPopupItem *pitem, void *data); -static void on_accept_meeting_tentative (EPopup *ep, EPopupItem *pitem, void *data); -static void on_decline_meeting (EPopup *ep, EPopupItem *pitem, void *data); -static void on_resend_meeting (EPopup *ep, EPopupItem *pitem, void *data); +static void on_accept_meeting (EPopup *ep, EPopupItem *pitem, gpointer data); +static void on_accept_meeting_tentative (EPopup *ep, EPopupItem *pitem, gpointer data); +static void on_decline_meeting (EPopup *ep, EPopupItem *pitem, gpointer data); +static void on_resend_meeting (EPopup *ep, EPopupItem *pitem, gpointer data); static EPopupItem popup_items[] = { { E_POPUP_ITEM, (gchar *) "41.accept", (gchar *) N_("Accept"), on_accept_meeting, NULL, (gchar *) GTK_STOCK_APPLY, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_MEETING | E_CAL_POPUP_SELECT_ACCEPTABLE}, @@ -56,7 +56,7 @@ static EPopupItem popup_items[] = { }; static void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); items = NULL; @@ -67,9 +67,9 @@ org_gnome_accept (EPlugin *ep, ECalPopupTargetSelect *target) { GSList *menus = NULL; GList *selected; - int i = 0; - static int first = 0; - const char *uri = NULL; + gint i = 0; + static gint first = 0; + const gchar *uri = NULL; ECalendarView *cal_view = E_CALENDAR_VIEW (target->target.widget); c_view = cal_view; @@ -135,7 +135,7 @@ receive_objects (gpointer data) } static icalproperty * -find_attendee (icalcomponent *ical_comp, const char *address) +find_attendee (icalcomponent *ical_comp, const gchar *address) { icalproperty *prop; @@ -146,8 +146,8 @@ find_attendee (icalcomponent *ical_comp, const char *address) prop != NULL; prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) { icalvalue *value; - const char *attendee; - char *text; + const gchar *attendee; + gchar *text; value = icalproperty_get_value (prop); if (!value) @@ -167,7 +167,7 @@ find_attendee (icalcomponent *ical_comp, const char *address) return prop; } static void -change_status (icalcomponent *ical_comp, const char *address, icalparameter_partstat status) +change_status (icalcomponent *ical_comp, const gchar *address, icalparameter_partstat status) { icalproperty *prop; @@ -206,7 +206,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status) gboolean recurring = FALSE; GThread *thread = NULL; GError *error = NULL; - char *address = NULL; + gchar *address = NULL; e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp)); address = itip_get_comp_attendee (comp, event->comp_data->client); @@ -226,7 +226,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status) if (recurring) { gint response; - const char *msg; + const gchar *msg; if (status == ICAL_PARTSTAT_ACCEPTED || status == ICAL_PARTSTAT_TENTATIVE) msg = "org.gnome.evolution.process_meeting:recurrence-accept"; @@ -236,7 +236,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status) response = e_error_run (NULL, msg, NULL); if (response == GTK_RESPONSE_YES) { icalproperty *prop; - const char *uid = icalcomponent_get_uid (r_data->icalcomp); + const gchar *uid = icalcomponent_get_uid (r_data->icalcomp); prop = icalproperty_new_x ("All"); icalproperty_set_x_name (prop, "X-GW-RECUR-INSTANCES-MOD-TYPE"); @@ -263,14 +263,14 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status) /*FIXME the data does not give us the ECalendarView object. we should remove the global c_view variable once we get it from the data*/ static void -on_accept_meeting (EPopup *ep, EPopupItem *pitem, void *data) +on_accept_meeting (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = c_view; process_meeting (cal_view, ICAL_PARTSTAT_ACCEPTED); } static void -on_accept_meeting_tentative (EPopup *ep, EPopupItem *pitem, void *data) +on_accept_meeting_tentative (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = c_view; @@ -278,7 +278,7 @@ on_accept_meeting_tentative (EPopup *ep, EPopupItem *pitem, void *data) } static void -on_decline_meeting (EPopup *ep, EPopupItem *pitem, void *data) +on_decline_meeting (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = c_view; @@ -289,8 +289,8 @@ static gboolean is_meeting_owner (ECalComponent *comp, ECal *client) { ECalComponentOrganizer org; - char *email = NULL; - const char *strip = NULL; + gchar *email = NULL; + const gchar *strip = NULL; gboolean ret_val = FALSE; if (!(e_cal_component_has_attendees (comp) && @@ -327,9 +327,9 @@ org_gnome_retract_resend (EPlugin *ep, ECalPopupTargetSelect *target) { GSList *menus = NULL; GList *selected; - int i = 0; - static int first = 0; - const char *uri = NULL; + gint i = 0; + static gint first = 0; + const gchar *uri = NULL; ECalendarView *cal_view = E_CALENDAR_VIEW (target->target.widget); ECalComponent *comp = NULL; ECalendarViewEvent *event = NULL; @@ -373,7 +373,7 @@ org_gnome_retract_resend (EPlugin *ep, ECalPopupTargetSelect *target) } static void -add_retract_data (ECalComponent *comp, const char *retract_comment, CalObjModType mod) +add_retract_data (ECalComponent *comp, const gchar *retract_comment, CalObjModType mod) { icalcomponent *icalcomp = NULL; icalproperty *icalprop = NULL; @@ -415,8 +415,8 @@ retract_object (gpointer val) ThreadData *data = val; icalcomponent *icalcomp = NULL, *mod_comp = NULL; GList *users = NULL; - char *rid = NULL; - const char *uid; + gchar *rid = NULL; + const gchar *uid; GError *error = NULL; add_retract_data (data->comp, NULL, data->mod); @@ -459,7 +459,7 @@ static void object_created_cb (CompEditor *ce, gpointer data) { GThread *thread = NULL; - int response; + gint response; GError *error = NULL; gtk_widget_hide (GTK_WIDGET (ce)); @@ -478,7 +478,7 @@ object_created_cb (CompEditor *ce, gpointer data) } static void -on_resend_meeting (EPopup *ep, EPopupItem *pitem, void *data) +on_resend_meeting (EPopup *ep, EPopupItem *pitem, gpointer data) { ECalendarView *cal_view = c_view; GList *selected; @@ -492,7 +492,7 @@ on_resend_meeting (EPopup *ep, EPopupItem *pitem, void *data) CalObjModType mod = CALOBJ_MOD_THIS; ThreadData *data = NULL; gint response; - const char *msg; + const gchar *msg; /* inserting the boolean to share the code between resend and retract */ gboolean resend = TRUE; @@ -521,7 +521,7 @@ on_resend_meeting (EPopup *ep, EPopupItem *pitem, void *data) if (resend) { guint flags = 0; - char *new_uid = NULL; + gchar *new_uid = NULL; CompEditor *ce; icalcomponent *icalcomp; diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c index ebcf068bf0..29c6545f01 100644 --- a/plugins/groupwise-features/proxy-login.c +++ b/plugins/groupwise-features/proxy-login.c @@ -69,7 +69,7 @@ struct _proxyLoginPrivate { /*Tree View*/ GtkTreeView *tree; - char *help_section; + gchar *help_section; }; static void @@ -175,12 +175,12 @@ proxy_login_new (void) } static int -proxy_get_password (EAccount *account, char **user_name, char **password) +proxy_get_password (EAccount *account, gchar **user_name, gchar **password) { const gchar *failed_auth; - char *uri, *key, *prompt; + gchar *uri, *key, *prompt; CamelURL *url; - const char *poa_address, *use_ssl = NULL, *soap_port; + const gchar *poa_address, *use_ssl = NULL, *soap_port; url = camel_url_new (account->source->url, NULL); if (url == NULL) @@ -223,8 +223,8 @@ proxy_login_get_cnc (EAccount *account, GtkWindow *password_dlg_parrent) EGwConnection *cnc; CamelURL *url; const gchar *failed_auth; - char *uri = NULL, *key = NULL, *prompt = NULL, *password = NULL; - const char *use_ssl = NULL, *soap_port; + gchar *uri = NULL, *key = NULL, *prompt = NULL, *password = NULL; + const gchar *use_ssl = NULL, *soap_port; gboolean remember; url = camel_url_new (account->source->url, NULL); @@ -259,7 +259,7 @@ proxy_login_get_cnc (EAccount *account, GtkWindow *password_dlg_parrent) g_free (prompt); cnc = e_gw_connection_new (uri, url->user, password); if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) { - char *http_uri = g_strconcat ("http://", uri + 8, NULL); + gchar *http_uri = g_strconcat ("http://", uri + 8, NULL); cnc = e_gw_connection_new (http_uri, url->user, password); g_free (http_uri); } @@ -278,11 +278,11 @@ proxy_login_cb (GtkDialog *dialog, gint state) { GtkWidget *account_name_tbox; proxyLoginPrivate *priv; - char *proxy_name; + gchar *proxy_name; priv = pld->priv; account_name_tbox = glade_xml_get_widget (priv->xml, "account_name"); - proxy_name = g_strdup ((char *) gtk_entry_get_text ((GtkEntry *) account_name_tbox)); + proxy_name = g_strdup ((gchar *) gtk_entry_get_text ((GtkEntry *) account_name_tbox)); switch (state) { case GTK_RESPONSE_OK: @@ -302,18 +302,18 @@ proxy_login_cb (GtkDialog *dialog, gint state) } static void -proxy_soap_login (char *email) +proxy_soap_login (gchar *email) { EAccountList *accounts = mail_config_get_accounts(); EAccount *srcAccount; EAccount *dstAccount; EGwConnection *proxy_cnc, *cnc; CamelURL *uri = NULL, *parent = NULL ; - char *password = NULL, *user_name = NULL; - char *proxy_source_url = NULL, *parent_source_url = NULL ; - char *name; - int i; - int permissions = 0; + gchar *password = NULL, *user_name = NULL; + gchar *proxy_source_url = NULL, *parent_source_url = NULL ; + gchar *name; + gint i; + gint permissions = 0; for (i=0; email[i]!='\0' && email[i]!='@' ; i++); if (email[i]=='@') @@ -374,11 +374,11 @@ proxy_soap_login (char *email) static void -proxy_login_add_new_store (char *uri, CamelStore *store, void *user_data) +proxy_login_add_new_store (gchar *uri, CamelStore *store, gpointer user_data) { MailComponent *component = mail_component_peek (); EAccount *account = user_data; - int permissions = GPOINTER_TO_INT(g_object_get_data ((GObject *)account, "permissions")); + gint permissions = GPOINTER_TO_INT(g_object_get_data ((GObject *)account, "permissions")); if (store == NULL) return; @@ -398,7 +398,7 @@ proxy_login_tree_view_changed_cb(GtkDialog *dialog) GtkTreeIter iter; GtkWidget *account_name_tbox; GtkTreeModel *model; - char *account_mailid; + gchar *account_mailid; account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree)); gtk_tree_selection_get_selected (account_select, &model, &iter); @@ -436,11 +436,11 @@ static void proxy_login_update_tree (void) { GtkTreeIter iter; - int i,n; + gint i,n; GdkPixbuf *broken_image = NULL; GList *proxy_list = NULL; - char *proxy_name; - char *proxy_email; + gchar *proxy_name; + gchar *proxy_email; EGwConnection *cnc; proxyLoginPrivate *priv = pld->priv; gchar *file_name = e_icon_factory_get_icon_filename ("stock_person", GTK_ICON_SIZE_DIALOG); @@ -471,12 +471,12 @@ proxy_login_update_tree (void) } void -org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, void *data) +org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, gpointer data) { - char *uri = data; + gchar *uri = data; proxyLoginPrivate *priv; EGwConnection *cnc; - char *gladefile; + gchar *gladefile; /* This pops-up the password dialog in case the User has forgot-passwords explicitly */ cnc = proxy_login_get_cnc (mail_config_get_account_by_source_url (uri), NULL); @@ -513,7 +513,7 @@ static EPopupItem popup_items[] = { }; static void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } @@ -523,7 +523,7 @@ org_gnome_create_proxy_login_option (EPlugin *ep, EMPopupTargetFolder *t) { EAccount *account; GSList *menus = NULL; - int i; + gint i; account = mail_config_get_account_by_source_url (t->uri); if (g_strrstr (t->uri,"groupwise://") && !account->parent_uid) { diff --git a/plugins/groupwise-features/proxy-login.h b/plugins/groupwise-features/proxy-login.h index 24717f8cc7..47c2b3b901 100644 --- a/plugins/groupwise-features/proxy-login.h +++ b/plugins/groupwise-features/proxy-login.h @@ -53,13 +53,13 @@ struct _proxyLoginClass { GType proxy_login_get_type (void); proxyLogin * proxy_login_new (void); static void proxy_login_cb (GtkDialog *dialog, gint state); -static void proxy_login_add_new_store (char *uri, CamelStore *store, void *user_data); +static void proxy_login_add_new_store (gchar *uri, CamelStore *store, gpointer user_data); static void proxy_login_setup_tree_view (void); -void org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, void *data); +void org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, gpointer data); proxyLogin* proxy_dialog_new (void); -static void proxy_soap_login (char *email); -char *parse_email_for_name (char *email); +static void proxy_soap_login (gchar *email); +gchar *parse_email_for_name (gchar *email); static void proxy_login_update_tree (void); static void proxy_login_tree_view_changed_cb(GtkDialog *dialog); void org_gnome_create_proxy_login_option(EPlugin *ep, EMPopupTargetFolder *t); -static int proxy_get_password (EAccount *account, char **user_name, char **password); +static gint proxy_get_password (EAccount *account, gchar **user_name, gchar **password); diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c index 7ab0095dbf..6a18348002 100644 --- a/plugins/groupwise-features/proxy.c +++ b/plugins/groupwise-features/proxy.c @@ -62,7 +62,7 @@ static GObjectClass *parent_class = NULL; -static gboolean proxy_page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, int num, EAccount *account); +static gboolean proxy_page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, gint num, EAccount *account); struct _proxyDialogPrivate { /* Glade XML data for the Add/Edit Proxy dialog*/ @@ -94,7 +94,7 @@ struct _proxyDialogPrivate { GtkWidget *notifications; GtkWidget *options; GtkWidget *private; - char *help_section; + gchar *help_section; GList *proxy_list; }; @@ -254,7 +254,7 @@ proxy_dialog_new (void) static int proxy_get_permissions_from_dialog (EAccount *account) { - int permissions; + gint permissions; proxyDialogPrivate *priv; proxyDialog *prd = NULL; @@ -309,7 +309,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog) GtkTreeModel *model; proxyHandler *new_proxy = NULL; proxyDialogPrivate *priv; - char *account_mailid; + gchar *account_mailid; proxyDialog *prd = NULL; prd = g_object_get_data ((GObject *)account, "prd"); @@ -322,7 +322,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog) ENameSelectorEntry *name_selector_entry; EDestinationStore *destination_store; GList *destinations, *tmp; - char *name, *email; + gchar *name, *email; GList *existing_list; name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector, "Add User"); destination_store = e_name_selector_entry_peek_destination_store (E_NAME_SELECTOR_ENTRY ( @@ -337,7 +337,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog) for (; tmp != NULL; tmp = g_list_next (tmp)) { email = NULL; - email = (char *)e_destination_get_email (tmp->data); + email = (gchar *)e_destination_get_email (tmp->data); if (g_str_equal(email, "")) continue; @@ -376,12 +376,12 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog) for (; tmp != NULL; tmp = g_list_next (tmp)) { name = NULL; email = NULL; - email = (char *) e_destination_get_email (tmp->data); + email = (gchar *) e_destination_get_email (tmp->data); if (g_str_equal(email, "")) continue; - name = (char *) e_destination_get_name (tmp->data); + name = (gchar *) e_destination_get_name (tmp->data); new_proxy = (proxyHandler *) g_malloc0 (sizeof (proxyHandler)); if (name) @@ -460,9 +460,9 @@ proxy_get_cnc (EAccount *account, GtkWindow *parent_window) { EGwConnection *cnc; const gchar *failed_auth; - char *uri, *key, *prompt, *password = NULL; + gchar *uri, *key, *prompt, *password = NULL; CamelURL *url; - const char *poa_address, *use_ssl, *soap_port; + const gchar *poa_address, *use_ssl, *soap_port; gboolean remember; url = camel_url_new (account->source->url, NULL); @@ -498,7 +498,7 @@ proxy_get_cnc (EAccount *account, GtkWindow *parent_window) cnc = e_gw_connection_new (uri, url->user, password); if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) { - char *http_uri = g_strconcat ("http://", uri + 8, NULL); + gchar *http_uri = g_strconcat ("http://", uri + 8, NULL); cnc = e_gw_connection_new (http_uri, url->user, password); g_free (http_uri); } @@ -640,8 +640,8 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data) proxyDialogPrivate *priv; CamelOfflineStore *store; CamelException ex; - int pag_num; - char *gladefile; + gint pag_num; + gchar *gladefile; target_account = (EMConfigTargetAccount *)data->config->target; account = target_account->account; @@ -723,7 +723,7 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data) } static gboolean -proxy_page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, int num, EAccount *account) +proxy_page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, gint num, EAccount *account) { proxyDialog *prd; proxyDialogPrivate *priv; @@ -823,7 +823,7 @@ proxy_edit_ok (GtkWidget *button, EAccount *account) } static proxyHandler * -proxy_get_item_from_list (EAccount *account, char *account_name) +proxy_get_item_from_list (EAccount *account, gchar *account_name) { proxyDialogPrivate *priv; proxyDialog *prd = NULL; @@ -852,7 +852,7 @@ proxy_remove_account (GtkWidget *button, EAccount *account) proxyDialogPrivate *priv; proxyHandler *deleted; GtkTreeSelection* account_select; - char *account_mailid; + gchar *account_mailid; proxyDialog *prd = NULL; prd = g_object_get_data ((GObject *)account, "prd"); @@ -906,7 +906,7 @@ proxy_add_account (GtkWidget *button, EAccount *account) ENameSelectorEntry *name_selector_entry; GtkWidget *proxy_name, *name_box; proxyDialog *prd = NULL; - char *gladefile; + gchar *gladefile; prd = g_object_get_data ((GObject *)account, "prd"); priv = prd->priv; @@ -1004,10 +1004,10 @@ proxy_edit_account (GtkWidget *button, EAccount *account) GtkTreeSelection* account_select; proxyHandler *edited; GtkButton *okButton, *proxyCancel; - char *account_mailid; + gchar *account_mailid; GtkWidget *contacts; proxyDialog *prd = NULL; - char *gladefile; + gchar *gladefile; prd = g_object_get_data ((GObject *)account, "prd"); priv = prd->priv; diff --git a/plugins/groupwise-features/proxy.h b/plugins/groupwise-features/proxy.h index c2bd933db4..ca1b651f2c 100644 --- a/plugins/groupwise-features/proxy.h +++ b/plugins/groupwise-features/proxy.h @@ -61,6 +61,6 @@ static void proxy_edit_account (GtkWidget *button, EAccount *account); void proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data); void proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data); static void proxy_setup_meta_tree_view (EAccount *account); -static proxyHandler *proxy_get_item_from_list (EAccount *account, char *account_name); +static proxyHandler *proxy_get_item_from_list (EAccount *account, gchar *account_name); static void proxy_load_edit_dialog (EAccount *account, proxyHandler *edited); void free_proxy_list (GList *proxy_list); diff --git a/plugins/groupwise-features/send-options.c b/plugins/groupwise-features/send-options.c index 33f1dd2cb4..a739571b83 100644 --- a/plugins/groupwise-features/send-options.c +++ b/plugins/groupwise-features/send-options.c @@ -56,9 +56,9 @@ get_cnc (GtkWindow *parent_window) { EGwConnection *cnc; const gchar *failed_auth; - char *uri, *key, *prompt, *password = NULL; + gchar *uri, *key, *prompt, *password = NULL; CamelURL *url; - const char *poa_address, *use_ssl, *soap_port; + const gchar *poa_address, *use_ssl, *soap_port; gboolean remember; url = camel_url_new (account->source->url, NULL); @@ -94,7 +94,7 @@ get_cnc (GtkWindow *parent_window) cnc = e_gw_connection_new (uri, url->user, password); if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) { - char *http_uri = g_strconcat ("http://", uri + 8, NULL); + gchar *http_uri = g_strconcat ("http://", uri + 8, NULL); cnc = e_gw_connection_new (http_uri, url->user, password); g_free (http_uri); } @@ -122,7 +122,7 @@ e_send_options_load_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGene gopts->delay_enabled = ggopts->delay_enabled; - /* TODO convert int to timet comparing the current day */ + /* TODO convert gint to timet comparing the current day */ if (ggopts->delay_until) { gopts->delay_until = time_add_day_with_zone (temp, ggopts->delay_until, NULL); } else @@ -273,7 +273,7 @@ e_send_options_copy_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGene ggopts->delay_enabled = gopts->delay_enabled; if (gopts->delay_until) { - int diff; + gint diff; icaltimetype temp, current; temp = icaltime_from_timet (gopts->delay_until, 0); @@ -361,14 +361,14 @@ static ESource * get_source (ESourceList *list) { GSList *p, *l; - char **temp = g_strsplit (account->source->url, ";", -1); - char *uri = temp [0]; + gchar **temp = g_strsplit (account->source->url, ";", -1); + gchar *uri = temp [0]; l = e_source_list_peek_groups (list); for (p = l; p != NULL; p = p->next) { - char *so_uri; + gchar *so_uri; GSList *r, *s; ESourceGroup *group = E_SOURCE_GROUP (p->data); @@ -398,7 +398,7 @@ add_return_value (EGwSendOptionsReturnNotify track, ESource *source, const gchar *notify) { - char *value; + gchar *value; switch (track) { case E_GW_RETURN_NOTIFY_MAIL: @@ -415,8 +415,8 @@ add_return_value (EGwSendOptionsReturnNotify track, static void put_options_in_source (ESource *source, EGwSendOptionsGeneral *gopts, EGwSendOptionsStatusTracking *sopts) { - char *value; - const char *val; + gchar *value; + const gchar *val; icaltimetype tt; CamelURL *url; diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c index 74ca71fbb4..c7c315c7f0 100644 --- a/plugins/groupwise-features/share-folder-common.c +++ b/plugins/groupwise-features/share-folder-common.c @@ -62,8 +62,8 @@ struct ShareInfo { GtkWidget * org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data); void org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *target); -static void create_shared_folder(EPopup *ep, EPopupItem *p, void *data); -static void popup_free (EPopup *ep, GSList *items, void *data); +static void create_shared_folder(EPopup *ep, EPopupItem *p, gpointer data); +static void popup_free (EPopup *ep, GSList *items, gpointer data); void shared_folder_commit (EPlugin *ep, EConfigTarget *tget); void shared_folder_abort (EPlugin *ep, EConfigTarget *target); @@ -126,16 +126,16 @@ struct _EMCreateFolder { /* input data */ CamelStore *store; - char *full_name; - char *parent; - char *name; + gchar *full_name; + gchar *parent; + gchar *name; /* output data */ CamelFolderInfo *fi; /* callback data */ - void (* done) (struct _EMCreateFolder *m, void *user_data); - void *user_data; + void (* done) (struct _EMCreateFolder *m, gpointer user_data); + gpointer user_data; }; static gchar * @@ -194,7 +194,7 @@ static MailMsgInfo create_folder_info = { }; static void -new_folder_created_cb (struct _EMCreateFolder *m, void *user_data) +new_folder_created_cb (struct _EMCreateFolder *m, gpointer user_data) { struct ShareInfo *ssi = (struct ShareInfo *) user_data; EMFolderSelector *emfs = ssi->emfs; @@ -208,12 +208,12 @@ new_folder_created_cb (struct _EMCreateFolder *m, void *user_data) } static int -create_folder (CamelStore *store, const char *full_name, void (* done) (struct _EMCreateFolder *m, void *user_data), void *user_data) +create_folder (CamelStore *store, const gchar *full_name, void (* done) (struct _EMCreateFolder *m, gpointer user_data), gpointer user_data) { - char *name, *namebuf = NULL; + gchar *name, *namebuf = NULL; struct _EMCreateFolder *m; - const char *parent; - int id; + const gchar *parent; + gint id; namebuf = g_strdup (full_name); if (!(name = strrchr (namebuf, '/'))) { @@ -240,11 +240,11 @@ create_folder (CamelStore *store, const char *full_name, void (* done) (struct _ } static void -users_dialog_response(GtkWidget *dialog, int response, struct ShareInfo *ssi) +users_dialog_response(GtkWidget *dialog, gint response, struct ShareInfo *ssi) { struct _EMFolderTreeModelStoreInfo *si; EMFolderSelector *emfs = ssi->emfs; - const char *uri, *path; + const gchar *uri, *path; CamelException ex; CamelStore *store; @@ -291,12 +291,12 @@ users_dialog_response(GtkWidget *dialog, int response, struct ShareInfo *ssi) } static void -new_folder_response (EMFolderSelector *emfs, int response, EMFolderTreeModel *model) +new_folder_response (EMFolderSelector *emfs, gint response, EMFolderTreeModel *model) { GtkWidget *users_dialog; GtkWidget *w; struct ShareInfo *ssi; - const char *uri; + const gchar *uri; EGwConnection *cnc; CamelException ex; CamelStore *store; @@ -341,7 +341,7 @@ static EPopupItem popup_items[] = { }; static void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } @@ -350,8 +350,8 @@ void org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *t) { GSList *menus = NULL; - int i = 0; - static int first = 0; + gint i = 0; + static gint first = 0; if (! g_strrstr (t->uri, "groupwise://")) @@ -373,13 +373,13 @@ org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *t) } static void -create_shared_folder(EPopup *ep, EPopupItem *p, void *data) +create_shared_folder(EPopup *ep, EPopupItem *p, gpointer data) { EMFolderTreeModel *model; EMFolderTree *folder_tree; GtkWidget *dialog ; - char *uri; + gchar *uri; model = mail_component_peek_tree_model (mail_component_peek ()); folder_tree = (EMFolderTree *) em_folder_tree_new_with_model (model); @@ -457,8 +457,8 @@ EGwConnection * get_cnc (CamelStore *store) { EGwConnection *cnc; - const char *uri, *property_value, *server_name, *user, *port; - char *use_ssl; + const gchar *uri, *property_value, *server_name, *user, *port; + gchar *use_ssl; CamelService *service; CamelURL *url; @@ -485,7 +485,7 @@ get_cnc (CamelStore *store) cnc = e_gw_connection_new (uri, user, service->url->passwd); if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) { - char *http_uri = g_strconcat ("http://", uri + 8, NULL); + gchar *http_uri = g_strconcat ("http://", uri + 8, NULL); cnc = e_gw_connection_new (http_uri, user, service->url->passwd); g_free (http_uri); } @@ -503,7 +503,7 @@ get_container_id(EGwConnection *cnc, const gchar *fname) gchar *id = NULL; gchar *name; gchar **names; - int i = 0, parts = 0; + gint i = 0, parts = 0; names = g_strsplit (fname, "/", -1); if(names){ diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c index 382cf75124..2b12d4be9b 100644 --- a/plugins/groupwise-features/share-folder.c +++ b/plugins/groupwise-features/share-folder.c @@ -37,7 +37,7 @@ struct _SharedUser { EShUsers *user_node; - int flag; + gint flag; }; typedef struct _SharedUser SharedUser; @@ -321,8 +321,8 @@ not_shared_clicked (GtkRadioButton *button, ShareFolder *sf) static void add_clicked(GtkButton *button, ShareFolder *sf) { - const char *email = NULL; - const char *self_email = NULL; + const gchar *email = NULL; + const gchar *self_email = NULL; SharedUser *new_user = NULL; EShUsers *usr = NULL; gint rights = 0; @@ -513,7 +513,7 @@ notification_clicked(GtkButton *button, ShareFolder *sf) GtkButton *not_ok; GtkButton *not_cancel; GtkWidget *vbox; - char *gladefile; + gchar *gladefile; sf->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_type_hint (GTK_WINDOW (sf->window), GDK_WINDOW_TYPE_HINT_DIALOG); @@ -580,7 +580,7 @@ add_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf ) gboolean right = FALSE; SharedUser *usr = NULL; EShUsers *user = NULL; - char *email = NULL; + gchar *email = NULL; GtkTreePath *path = NULL; path = gtk_tree_path_new_from_string (arg1); @@ -613,7 +613,7 @@ edit_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf ) gboolean right = FALSE; SharedUser *usr = NULL; EShUsers *user = NULL; - char *email = NULL; + gchar *email = NULL; GtkTreePath *path = NULL; path = gtk_tree_path_new_from_string (arg1); @@ -647,7 +647,7 @@ delete_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf ) gboolean right = FALSE; SharedUser *usr = NULL; EShUsers *user = NULL; - char *email = NULL; + gchar *email = NULL; GtkTreePath *path = NULL; path = gtk_tree_path_new_from_string (arg1); @@ -682,7 +682,7 @@ share_folder_construct (ShareFolder *sf) ENameSelectorModel *name_selector_model; ENameSelectorEntry *name_selector_entry; GtkWidget *box; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "properties.glade", diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c index a465752c95..2569cbebd7 100644 --- a/plugins/groupwise-features/status-track.c +++ b/plugins/groupwise-features/status-track.c @@ -43,14 +43,14 @@ #include "share-folder.h" -void org_gnome_track_status (void *ep, EMPopupTargetSelect *t); +void org_gnome_track_status (gpointer ep, EMPopupTargetSelect *t); -static char * -format_date (const char * value) +static gchar * +format_date (const gchar * value) { time_t time; time_t actual_time; - char *str; + gchar *str; time = e_gw_connection_get_date_from_string (value); actual_time = camel_header_decode_date (ctime(&time), NULL); @@ -61,12 +61,12 @@ format_date (const char * value) } static void -track_status (EPopup *ep, EPopupItem *item, void *data) +track_status (EPopup *ep, EPopupItem *item, gpointer data) { EMPopupTargetSelect *t = (EMPopupTargetSelect *)data; CamelMimeMessage *msg = NULL ; const CamelInternetAddress *from ; - const char *namep, *addp ; + const gchar *namep, *addp ; GtkDialog *d ; GtkTable *table ; @@ -75,11 +75,11 @@ track_status (EPopup *ep, EPopupItem *item, void *data) GtkVBox *vbox; time_t time ; - char *time_str ; + gchar *time_str ; gchar *boldmsg; - int row = 0; + gint row = 0; EGwConnection *cnc; EGwItem *gwitem; @@ -242,17 +242,17 @@ static EPopupItem popup_items[] = { }; static void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } -void org_gnome_track_status (void *ep, EMPopupTargetSelect *t) +void org_gnome_track_status (gpointer ep, EMPopupTargetSelect *t) { GSList *menus = NULL; - int i = 0; - static int first = 0; + gint i = 0; + static gint first = 0; if (! g_strrstr (t->uri, "groupwise://") || g_ascii_strncasecmp ((t->folder)->full_name, "Sent Items", 10)) return; diff --git a/plugins/hula-account-setup/camel-hula-listener.c b/plugins/hula-account-setup/camel-hula-listener.c index 1094bec34b..966abd114f 100644 --- a/plugins/hula-account-setup/camel-hula-listener.c +++ b/plugins/hula-account-setup/camel-hula-listener.c @@ -41,9 +41,9 @@ struct _CamelHulaListenerPrivate { }; struct _HulaAccountInfo { - char *uid; - char *name; - char *source_url; + gchar *uid; + gchar *name; + gchar *source_url; }; typedef struct _HulaAccountInfo HulaAccountInfo; @@ -144,11 +144,11 @@ is_hula_caldav_account (EAccount *account) /* looks up for an existing hula account info in the hula_accounts list based on uid */ static HulaAccountInfo* -lookup_account_info (const char *key) +lookup_account_info (const gchar *key) { GList *list; HulaAccountInfo *info ; - int found = 0; + gint found = 0; if (!key) return NULL; @@ -170,7 +170,7 @@ lookup_account_info (const char *key) #define SELECTED_CALENDARS "/apps/evolution/calendar/display/selected_calendars" static void -add_esource (const char *conf_key, const char *group_name, const char *source_name, CamelURL *url) +add_esource (const gchar *conf_key, const gchar *group_name, const gchar *source_name, CamelURL *url) { ESourceList *source_list; ESourceGroup *group; @@ -178,10 +178,10 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n GConfClient *client; GSList *ids, *temp ; gboolean result; - char *source_selection_key; - char *relative_uri; - const char *cal_port = "8081"; - /* const char *use_ssl = ""; */ + gchar *source_selection_key; + gchar *relative_uri; + const gchar *cal_port = "8081"; + /* const gchar *use_ssl = ""; */ /* offline_sync to come soon */ /* TODO use_ssl = camel_url_get_param (url, "use_ssl"); */ @@ -237,7 +237,7 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n static void -remove_esource (const char *conf_key, const char *group_name, char* source_name, const char* relative_uri) +remove_esource (const gchar *conf_key, const gchar *group_name, gchar * source_name, const gchar * relative_uri) { ESourceList *list; GSList *groups; @@ -245,7 +245,7 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name, GConfClient* client; GSList *ids; GSList *node_tobe_deleted; - char *source_selection_key; + gchar *source_selection_key; client = gconf_client_get_default(); list = e_source_list_new_for_gconf (client, conf_key); @@ -305,11 +305,11 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name, /* looks for e-source with the same info as old_account_info and changes its values to the values passed in */ static void -modify_esource (const char* conf_key, HulaAccountInfo *old_account_info, const char* new_group_name, CamelURL *new_url) +modify_esource (const gchar * conf_key, HulaAccountInfo *old_account_info, const gchar * new_group_name, CamelURL *new_url) { ESourceList *list; GSList *groups; - char *old_relative_uri; + gchar *old_relative_uri; CamelURL *url; gboolean found_group; GConfClient* client; @@ -388,9 +388,9 @@ static void remove_calendar_sources (HulaAccountInfo *info) { CamelURL *url; - char *relative_uri; - const char *address; - const char *caldav_port; + gchar *relative_uri; + const gchar *address; + const gchar *caldav_port; url = camel_url_new (info->source_url, NULL); @@ -463,10 +463,10 @@ account_changed (EAccountList *account_listener, EAccount *account) { gboolean is_hula; CamelURL *old_url, *new_url; - const char *old_caldav_port, *new_caldav_port; + const gchar *old_caldav_port, *new_caldav_port; HulaAccountInfo *existing_account_info; - const char *old_use_ssl, *new_use_ssl; - const char *old_address, *new_address; + const gchar *old_use_ssl, *new_use_ssl; + const gchar *old_address, *new_address; is_hula = is_hula_account (account); if (is_hula == FALSE) diff --git a/plugins/hula-account-setup/hula-account-setup.c b/plugins/hula-account-setup/hula-account-setup.c index 84a7a4127c..29b334f115 100644 --- a/plugins/hula-account-setup/hula-account-setup.c +++ b/plugins/hula-account-setup/hula-account-setup.c @@ -27,7 +27,7 @@ static CamelHulaListener *config_listener = NULL; -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); GtkWidget* org_gnome_evolution_hula_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data); static void @@ -36,8 +36,8 @@ free_hula_listener ( void ) g_object_unref (config_listener); } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { if (!config_listener) { config_listener = camel_hula_listener_new (); diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c index c33a02bdef..64f64dc16a 100644 --- a/plugins/imap-features/imap-headers.c +++ b/plugins/imap-features/imap-headers.c @@ -135,7 +135,7 @@ imap_headers_commit (EPlugin *efp, EConfigHookItemFactoryData *data) /* return true is the header is considered valid */ static gboolean -epif_header_is_valid (const char *header) +epif_header_is_valid (const gchar *header) { gint len = g_utf8_strlen (header, -1); @@ -150,7 +150,7 @@ epif_header_is_valid (const char *header) static void epif_add_sensitivity (EPImapFeaturesData *ui) { - const char *entry_contents; + const gchar *entry_contents; GtkTreeIter iter; gboolean valid; @@ -166,7 +166,7 @@ epif_add_sensitivity (EPImapFeaturesData *ui) /* check if this is a duplicate */ valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ui->store), &iter); while (valid) { - char *header_name; + gchar *header_name; gtk_tree_model_get (GTK_TREE_MODEL (ui->store), &iter, 0, &header_name, @@ -254,7 +254,7 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data) GtkWidget *vbox; CamelURL *url = NULL; CamelException ex; - char *gladefile; + gchar *gladefile; GladeXML *gladexml; GtkCellRenderer *renderer; GtkTreeViewColumn *column; @@ -289,11 +289,11 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_tree_view_set_model (ui->custom_headers_tree, GTK_TREE_MODEL(ui->store)); if (url) { - char *custom_headers; + gchar *custom_headers; custom_headers = g_strdup(camel_url_get_param (url, "imap_custom_headers")); if (custom_headers) { - int i=0; + gint i=0; ui->custom_headers_array = g_strsplit (custom_headers, " ", -1); while (ui->custom_headers_array[i] ) { diff --git a/plugins/ipod-sync/evolution-ipod-sync.c b/plugins/ipod-sync/evolution-ipod-sync.c index 487d9f14c5..11df39777a 100644 --- a/plugins/ipod-sync/evolution-ipod-sync.c +++ b/plugins/ipod-sync/evolution-ipod-sync.c @@ -32,7 +32,7 @@ #include <gtk/gtk.h> #include <glade/glade.h> -char * mount_point = NULL; +gchar * mount_point = NULL; LibHalContext *ctx; gboolean @@ -100,7 +100,7 @@ ipod_check_status (gboolean silent) return TRUE; } -char * +gchar * ipod_get_mount (void) { return mount_point; diff --git a/plugins/ipod-sync/evolution-ipod-sync.h b/plugins/ipod-sync/evolution-ipod-sync.h index 662b16eff0..8760c43ceb 100644 --- a/plugins/ipod-sync/evolution-ipod-sync.h +++ b/plugins/ipod-sync/evolution-ipod-sync.h @@ -30,9 +30,9 @@ gboolean check_hal (void); gboolean ipod_check_status (gboolean silent); -gboolean try_umount (char *device); +gboolean try_umount (gchar *device); -char *find_ipod_mount_point (LibHalContext *ctx); -char *ipod_get_mount (void); +gchar *find_ipod_mount_point (LibHalContext *ctx); +gchar *ipod_get_mount (void); diff --git a/plugins/ipod-sync/format-handler.h b/plugins/ipod-sync/format-handler.h index 145bcb7d6d..4a9207a474 100644 --- a/plugins/ipod-sync/format-handler.h +++ b/plugins/ipod-sync/format-handler.h @@ -44,9 +44,9 @@ struct _FormatHandler gpointer data; - void (*save) (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri); + void (*save) (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri); }; FormatHandler *ical_format_handler_new (void); -GOutputStream *open_for_writing (GtkWindow *parent, const char *uri, GError **error); +GOutputStream *open_for_writing (GtkWindow *parent, const gchar *uri, GError **error); diff --git a/plugins/ipod-sync/ical-format.c b/plugins/ipod-sync/ical-format.c index 49c042f705..d8961e2520 100644 --- a/plugins/ipod-sync/ical-format.c +++ b/plugins/ipod-sync/ical-format.c @@ -37,7 +37,7 @@ #include "format-handler.h" static void -display_error_message (GtkWidget *parent, const char *message) +display_error_message (GtkWidget *parent, const gchar *message) { GtkWidget *dialog; @@ -47,7 +47,7 @@ display_error_message (GtkWidget *parent, const char *message) } static void -do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri) +do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri) { ESource *primary_source; ECal *source_client; @@ -89,7 +89,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error); if (stream && !error) { - char *ical_str = icalcomponent_as_ical_string_r (top_level); + gchar *ical_str = icalcomponent_as_ical_string_r (top_level); g_output_stream_write_all (stream, ical_str, strlen (ical_str), NULL, NULL, &error); g_output_stream_close (stream, NULL, NULL); diff --git a/plugins/ipod-sync/ipod-sync.c b/plugins/ipod-sync/ipod-sync.c index 1f589bfdc0..7615d6e7cb 100644 --- a/plugins/ipod-sync/ipod-sync.c +++ b/plugins/ipod-sync/ipod-sync.c @@ -56,7 +56,7 @@ void org_gnome_sync_addressbook (EPlugin *ep, EABPopupTargetSource *target); static void -display_error_message (GtkWidget *parent, const char *message) +display_error_message (GtkWidget *parent, const gchar *message) { GtkWidget *dialog; @@ -70,7 +70,7 @@ display_error_message (GtkWidget *parent, const char *message) It will ask for overwrite if file already exists. */ GOutputStream * -open_for_writing (GtkWindow *parent, const char *uri, GError **error) +open_for_writing (GtkWindow *parent, const gchar *uri, GError **error) { GFile *file; GFileOutputStream *fostream; @@ -125,8 +125,8 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target) gchar *uri; GOutputStream *stream; GError *error = NULL; - char *dest_uri = NULL; - char *mount = ipod_get_mount(); + gchar *dest_uri = NULL; + gchar *mount = ipod_get_mount(); primary_source = e_source_selector_peek_primary_selection (target->selector); @@ -199,8 +199,8 @@ static void destination_save_cal (EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type) { FormatHandler *handler = NULL; - char *mount = ipod_get_mount(); - char *dest_uri = NULL, *path; + gchar *mount = ipod_get_mount(); + gchar *dest_uri = NULL, *path; ESource *primary_source = e_source_selector_peek_primary_selection (target->selector); /* The available formathandlers */ diff --git a/plugins/ipod-sync/ipod.c b/plugins/ipod-sync/ipod.c index 5f399f23e6..baef16e0d5 100644 --- a/plugins/ipod-sync/ipod.c +++ b/plugins/ipod-sync/ipod.c @@ -35,8 +35,8 @@ gboolean check_hal (void) { LibHalContext *ctx; - char **devices; - int num; + gchar **devices; + gint num; DBusConnection *conn; conn = dbus_bus_get (DBUS_BUS_SYSTEM, NULL); @@ -64,9 +64,9 @@ check_hal (void) * Try to mount a given device. */ static gboolean -try_mount (char *device) +try_mount (gchar *device) { - char *argv[3]; + gchar *argv[3]; GError *err = NULL; gint exit_status; @@ -88,9 +88,9 @@ try_mount (char *device) * Try to unmount a given device. */ gboolean -try_umount (char *device) +try_umount (gchar *device) { - char *argv[3]; + gchar *argv[3]; GError *err = NULL; gint exit_status; @@ -117,11 +117,11 @@ try_umount (char *device) * database at <mount_point>/iPod_Control/iTunes/. */ static gboolean -is_ipod (char *mount_point) +is_ipod (gchar *mount_point) { gboolean ret = FALSE; - char *itunes_path; + gchar *itunes_path; itunes_path = g_build_path (G_DIR_SEPARATOR_S, mount_point, "iPod_Control", "iTunes", @@ -140,17 +140,17 @@ out: /** * Try to find a mount point for an iPod. */ -char * +gchar * find_ipod_mount_point (LibHalContext *ctx) { - char **apple_devices = NULL; - char **volumes = NULL; - char *udi, *udi2, *device, *fsusage, *mount_point = NULL; - char *retval = NULL; - int apple_count = 0; - int volume_count = 0; - int has_fs = 0; - int i, j; + gchar **apple_devices = NULL; + gchar **volumes = NULL; + gchar *udi, *udi2, *device, *fsusage, *mount_point = NULL; + gchar *retval = NULL; + gint apple_count = 0; + gint volume_count = 0; + gint has_fs = 0; + gint i, j; /* First, we look for things made by Apple. */ apple_devices = libhal_manager_find_device_string_match (ctx, diff --git a/plugins/ipod-sync/sync.c b/plugins/ipod-sync/sync.c index 8fe83d1b5a..cc2febc5e3 100644 --- a/plugins/ipod-sync/sync.c +++ b/plugins/ipod-sync/sync.c @@ -50,7 +50,7 @@ static void pulse (void) /** * Something bad happened. */ -static void error_dialog (char *title, char *error) +static void error_dialog (gchar *title, gchar *error) { GtkWidget *error_dlg = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, @@ -71,7 +71,7 @@ static void error_dialog (char *title, char *error) /** * Something really bad happened. */ -static void critical_error (char *title, char *error) +static void critical_error (gchar *title, gchar *error) { error_dialog (title, error); gtk_main_quit (); @@ -79,7 +79,7 @@ static void critical_error (char *title, char *error) } static GSList * -get_source_uris_for_type (char *key) +get_source_uris_for_type (gchar *key) { ESourceList *sources; GSList *groups; @@ -124,9 +124,9 @@ free_uri_list (GSList *uris) * Note: data must be of even length. */ static void -force_little_endian (gunichar2 *data, int length) +force_little_endian (gunichar2 *data, gint length) { - int i; + gint i; /* We're big-endian? (A little tidier than before) */ @@ -151,10 +151,10 @@ force_little_endian (gunichar2 *data, int length) * display an error dialog and end the program. */ static void -write_to_ipod (GString *str, char *path, char *filename) +write_to_ipod (GString *str, gchar *path, gchar *filename) { - char *output_path; - char *output_file; + gchar *output_path; + gchar *output_file; FILE *f; guchar *utf8; gunichar2 *utf16; diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 293c4e3fca..18aa1ea82a 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -70,7 +70,7 @@ struct _itip_puri { CamelMimeMessage *msg; CamelMimePart *part; - char *uid; + gchar *uid; GtkWidget *view; ESourceList *source_lists[E_CAL_SOURCE_TYPE_LAST]; @@ -79,7 +79,7 @@ struct _itip_puri { ECal *current_ecal; ECalSourceType type; - char *vcalendar; + gchar *vcalendar; ECalComponent *comp; icalcomponent *main_comp; icalcomponent *ical_comp; @@ -89,8 +89,8 @@ struct _itip_puri { time_t start_time; time_t end_time; - int current; - int total; + gint current; + gint total; gchar *calendar_uid; @@ -144,12 +144,12 @@ static void itip_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPU typedef struct { struct _itip_puri *puri; - char *uid; - char *rid; + gchar *uid; + gchar *rid; - char *sexp; + gchar *sexp; - int count; + gint count; } FormatItipFindData; typedef void (* FormatItipOpenFunc) (ECal *ecal, ECalendarStatus status, gpointer data); @@ -157,7 +157,7 @@ typedef void (* FormatItipOpenFunc) (ECal *ecal, ECalendarStatus status, gpointe static gboolean check_is_instance (icalcomponent *icalcomp); static icalproperty * -find_attendee (icalcomponent *ical_comp, const char *address) +find_attendee (icalcomponent *ical_comp, const gchar *address) { icalproperty *prop; @@ -167,8 +167,8 @@ find_attendee (icalcomponent *ical_comp, const char *address) for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY); prop != NULL; prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) { - char *attendee; - char *text; + gchar *attendee; + gchar *text; attendee = icalproperty_get_value_as_string_r (prop); @@ -190,7 +190,7 @@ find_attendee (icalcomponent *ical_comp, const char *address) } static icalproperty * -find_attendee_if_sentby (icalcomponent *ical_comp, const char *address) +find_attendee_if_sentby (icalcomponent *ical_comp, const gchar *address) { icalproperty *prop; @@ -201,8 +201,8 @@ find_attendee_if_sentby (icalcomponent *ical_comp, const char *address) prop != NULL; prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) { icalparameter *param; - const char *attendee_sentby; - char *text; + const gchar *attendee_sentby; + gchar *text; param = icalproperty_get_first_parameter (prop, ICAL_SENTBY_PARAMETER); if (!param) @@ -247,7 +247,7 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet prop = find_attendee (ical_comp, account->id->address); if (prop) { - char *text; + gchar *text; icalparameter *param; param = icalproperty_get_first_parameter (prop, ICAL_CN_PARAMETER); @@ -303,7 +303,7 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet prop = find_attendee_if_sentby (ical_comp, account->id->address); if (prop) { - char *text; + gchar *text; icalparameter *param; param = icalproperty_get_first_parameter (prop, ICAL_CN_PARAMETER); @@ -342,11 +342,11 @@ find_from_address (struct _itip_puri *pitip, icalcomponent *ical_comp) { EIterator *it; icalproperty *prop; - char *organizer; + gchar *organizer; icalparameter *param; - const char *organizer_sentby; - char *organizer_clean = NULL; - char *organizer_sentby_clean = NULL; + const gchar *organizer_sentby; + gchar *organizer_clean = NULL; + gchar *organizer_sentby_clean = NULL; prop = icalcomponent_get_first_property (ical_comp, ICAL_ORGANIZER_PROPERTY); @@ -406,7 +406,7 @@ get_real_item (struct _itip_puri *pitip) ECalComponent *comp; icalcomponent *icalcomp; gboolean found = FALSE; - const char *uid; + const gchar *uid; e_cal_component_get_uid (pitip->comp, &uid); @@ -432,7 +432,7 @@ adjust_item (struct _itip_puri *pitip, ECalComponent *comp) real_comp = get_real_item (pitip); if (real_comp != NULL) { ECalComponentText text; - const char *string; + const gchar *string; GSList *l; e_cal_component_get_summary (real_comp, &text); @@ -551,9 +551,9 @@ start_calendar_server (struct _itip_puri *pitip, ESource *source, ECalSourceType } static ECal * -start_calendar_server_by_uid (struct _itip_puri *pitip, const char *uid, ECalSourceType type) +start_calendar_server_by_uid (struct _itip_puri *pitip, const gchar *uid, ECalSourceType type) { - int i; + gint i; itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), FALSE); @@ -716,7 +716,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data) && !pitip->current_ecal) { /* Reuse already declared one or rename? */ ESource *source = NULL; - char *uid; + gchar *uid; switch (pitip->type) { case E_CAL_SOURCE_TYPE_EVENT: @@ -784,10 +784,10 @@ find_server (struct _itip_puri *pitip, ECalComponent *comp) { FormatItipFindData *fd = NULL; GSList *groups, *l, *sources_conflict = NULL, *all_sources = NULL; - const char *uid; - char *rid = NULL; + const gchar *uid; + gchar *rid = NULL; CamelURL *url; - char *uri; + gchar *uri; ESource *source = NULL, *current_source = NULL; e_cal_component_get_uid (comp, &uid); @@ -807,7 +807,7 @@ find_server (struct _itip_puri *pitip, ECalComponent *comp) sources = e_source_group_peek_sources (group); for (m = sources; m; m = m->next) { - char *source_uri = NULL; + gchar *source_uri = NULL; source = m->data; @@ -849,7 +849,7 @@ find_server (struct _itip_puri *pitip, ECalComponent *comp) source = l->data; if (!fd) { - char *start = NULL, *end = NULL; + gchar *start = NULL, *end = NULL; fd = g_new0 (FormatItipFindData, 1); fd->puri = pitip; @@ -898,7 +898,7 @@ cleanup_ecal (gpointer data) } static gboolean -change_status (icalcomponent *ical_comp, const char *address, icalparameter_partstat status) +change_status (icalcomponent *ical_comp, const gchar *address, icalparameter_partstat status) { icalproperty *prop; @@ -947,8 +947,8 @@ static void message_foreach_part (CamelMimePart *part, GSList **part_list) { CamelDataWrapper *containee; - int parts, i; - int go = TRUE; + gint parts, i; + gint go = TRUE; if (!part) return; @@ -984,7 +984,7 @@ update_item (struct _itip_puri *pitip, ItipViewResponse response) ESource *source; GError *error = NULL; gboolean result = TRUE; - char *str; + gchar *str; /* Set X-MICROSOFT-CDO-REPLYTIME to record the time at which * the user accepted/declined the request. (Outlook ignores @@ -1037,7 +1037,7 @@ update_item (struct _itip_puri *pitip, ItipViewResponse response) alarms = e_cal_component_get_alarm_uids (real_comp); for (l = alarms; l; l = l->next) { - alarm = e_cal_component_get_alarm (real_comp, (const char *)l->data); + alarm = e_cal_component_get_alarm (real_comp, (const gchar *)l->data); if (alarm) { ECalComponentAlarm *aclone = e_cal_component_alarm_clone (alarm); @@ -1065,7 +1065,7 @@ update_item (struct _itip_puri *pitip, ItipViewResponse response) for (l = attachments; l; l = l->next) { GSList *parts = NULL, *m; - char *uri, *new_uri; + gchar *uri, *new_uri; CamelMimePart *part; uri = l->data; @@ -1152,7 +1152,7 @@ update_item (struct _itip_puri *pitip, ItipViewResponse response) /* TODO These operations should be available in e-cal-component.c */ static void -set_attendee (ECalComponent *comp, const char *address) +set_attendee (ECalComponent *comp, const gchar *address) { icalproperty *prop; icalcomponent *icalcomp; @@ -1163,7 +1163,7 @@ set_attendee (ECalComponent *comp, const char *address) for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY); prop; prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) { - const char *attendee = icalproperty_get_attendee (prop); + const gchar *attendee = icalproperty_get_attendee (prop); if (!(g_str_equal (itip_strip_mailto (attendee), address))) icalcomponent_remove_property (icalcomp, prop); @@ -1173,9 +1173,9 @@ set_attendee (ECalComponent *comp, const char *address) if (!found) { icalparameter *param; - char *temp = g_strdup_printf ("MAILTO:%s", address); + gchar *temp = g_strdup_printf ("MAILTO:%s", address); - prop = icalproperty_new_attendee ((const char *) temp); + prop = icalproperty_new_attendee ((const gchar *) temp); icalcomponent_add_property (icalcomp, prop); param = icalparameter_new_partstat (ICAL_PARTSTAT_NEEDSACTION); @@ -1196,7 +1196,7 @@ set_attendee (ECalComponent *comp, const char *address) } static gboolean -send_comp_to_attendee (ECalComponentItipMethod method, ECalComponent *comp, const char *user, ECal *client, const char *comment) +send_comp_to_attendee (ECalComponentItipMethod method, ECalComponent *comp, const gchar *user, ECal *client, const gchar *comment) { gboolean status; ECalComponent *send_comp = e_cal_component_clone (comp); @@ -1225,10 +1225,10 @@ send_comp_to_attendee (ECalComponentItipMethod method, ECalComponent *comp, cons } static void -remove_delegate (struct _itip_puri *pitip, const char *delegate, const char *delegator, ECalComponent *comp) +remove_delegate (struct _itip_puri *pitip, const gchar *delegate, const gchar *delegator, ECalComponent *comp) { gboolean status; - char *comment = g_strdup_printf (_("Organizer has removed the delegate %s "), itip_strip_mailto (delegate)); + gchar *comment = g_strdup_printf (_("Organizer has removed the delegate %s "), itip_strip_mailto (delegate)); /* send cancellation notice to delegate */ status = send_comp_to_attendee (E_CAL_COMPONENT_METHOD_CANCEL, pitip->comp, delegate, pitip->current_ecal, comment); @@ -1251,7 +1251,7 @@ update_x (ECalComponent *pitip_comp, ECalComponent *comp) icalproperty *prop = icalcomponent_get_first_property (itip_icalcomp, ICAL_X_PROPERTY); while (prop) { - const char *name = icalproperty_get_x_name (prop); + const gchar *name = icalproperty_get_x_name (prop); if (!g_ascii_strcasecmp (name, "X-EVOLUTION-IS-REPLY")) { icalproperty *new_prop = icalproperty_new_x (icalproperty_get_x (prop)); icalproperty_set_x_name (new_prop, "X-EVOLUTION-IS-REPLY"); @@ -1268,9 +1268,9 @@ update_attendee_status (struct _itip_puri *pitip) { ECalComponent *comp = NULL; icalcomponent *icalcomp = NULL, *org_icalcomp; - const char *uid; - char *rid = NULL; - const char *delegate; + const gchar *uid; + gchar *rid = NULL; + const gchar *delegate; GError *error = NULL; /* Obtain our version */ @@ -1455,10 +1455,10 @@ get_next (icalcompiter *iter) } static void -set_itip_error (struct _itip_puri *pitip, GtkContainer *container, const char *primary, const char *secondary) +set_itip_error (struct _itip_puri *pitip, GtkContainer *container, const gchar *primary, const gchar *secondary) { GtkWidget *vbox, *label; - char *message; + gchar *message; vbox = gtk_vbox_new (FALSE, 12); gtk_widget_show (vbox); @@ -1489,7 +1489,7 @@ extract_itip_data (struct _itip_puri *pitip, GtkContainer *container, gboolean * icalcomponent *alarm_comp; icalcompiter alarm_iter; ECalComponent *comp; - char *my_address; + gchar *my_address; if (!pitip->vcalendar) { @@ -1610,7 +1610,7 @@ extract_itip_data (struct _itip_puri *pitip, GtkContainer *container, gboolean * prop = find_attendee_if_sentby (pitip->ical_comp, my_address); if (prop) { icalparameter *param; - const char * delfrom; + const gchar * delfrom; if ((param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER))) { delfrom = icalparameter_get_delegatedfrom (param); @@ -1623,7 +1623,7 @@ extract_itip_data (struct _itip_puri *pitip, GtkContainer *container, gboolean * /* Determine any delegate sections */ prop = icalcomponent_get_first_property (pitip->ical_comp, ICAL_X_PROPERTY); while (prop) { - const char *x_name, *x_val; + const gchar *x_name, *x_val; x_name = icalproperty_get_x_name (prop); x_val = icalproperty_get_x (prop); @@ -1675,7 +1675,7 @@ extract_itip_data (struct _itip_puri *pitip, GtkContainer *container, gboolean * /* Add default reminder if the config says so */ if (calendar_config_get_use_default_reminder ()) { ECalComponentAlarm *acomp; - int interval; + gint interval; CalUnits units; ECalComponentAlarmTrigger trigger; @@ -1720,10 +1720,10 @@ extract_itip_data (struct _itip_puri *pitip, GtkContainer *container, gboolean * struct _opencal_msg { MailMsg base; - char *command; /* command line to run */ + gchar *command; /* command line to run */ }; -static char * +static gchar * open_calendar__desc (struct _opencal_msg *m, gint complete) { return g_strdup (_("Opening calendar")); @@ -1757,7 +1757,7 @@ idle_open_cb (gpointer data) { struct _itip_puri *pitip = data; struct _opencal_msg *m; - char *start, *end; + gchar *start, *end; start = isodate_from_time_t (pitip->start_time); end = isodate_from_time_t (pitip->end_time); @@ -1869,7 +1869,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data) /* FIXME Remove this and handle this at the groupwise mail provider */ if (delete_invitation_from_cache) { CamelFolderChangeInfo *changes = NULL; - const char *tag = NULL; + const gchar *tag = NULL; CamelMessageInfo *mi; mi = camel_folder_summary_uid (pitip->folder->summary, pitip->uid); if (mi) { @@ -1881,7 +1881,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data) tag = camel_message_info_user_tag (mi, "recurrence-key"); camel_message_info_free (mi); if (tag) { - int i = 0, count; + gint i = 0, count; GSList *list = NULL; count = camel_folder_summary_count (pitip->folder->summary); @@ -1891,8 +1891,8 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data) continue; camel_message_info_ref (mi); if ( camel_message_info_user_tag (mi, "recurrence-key") && g_str_equal (camel_message_info_user_tag (mi, "recurrence-key"), tag)) { - camel_folder_summary_remove_uid_fast (pitip->folder->summary, (char *)(mi->uid)); - camel_folder_change_info_remove_uid (changes, (char *) mi->uid); + camel_folder_summary_remove_uid_fast (pitip->folder->summary, (gchar *)(mi->uid)); + camel_folder_change_info_remove_uid (changes, (gchar *) mi->uid); list = g_slist_prepend (list, (gpointer) mi->uid); /* step back once to have the right index */ @@ -1924,7 +1924,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data) ECalComponent *comp = NULL; icalcomponent *ical_comp; icalvalue *value; - const char *attendee, *comment; + const gchar *attendee, *comment; GSList *l, *list = NULL; gboolean found; @@ -1944,7 +1944,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data) prop != NULL; prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) { - char *text; + gchar *text; value = icalproperty_get_value (prop); if (!value) @@ -2003,7 +2003,7 @@ check_is_instance (icalcomponent *icalcomp) icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); while (icalprop) { - const char *x_name; + const gchar *x_name; x_name = icalproperty_get_x_name (icalprop); if (!strcmp (x_name, "X-GW-RECURRENCE-KEY")) { @@ -2047,8 +2047,8 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject GString *gstring = NULL; GSList *list, *l; icalcomponent *icalcomp; - const char *string, *org; - int i; + const gchar *string, *org; + gint i; gboolean response_enabled; gboolean have_alarms = FALSE; @@ -2351,7 +2351,7 @@ static void puri_free (EMFormatPURI *puri) { struct _itip_puri *pitip = (struct _itip_puri*) puri; - int i; + gint i; for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) { if (pitip->source_lists[i]) @@ -2407,7 +2407,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target) { EMFormatHTMLPObject *pobj; GConfClient *gconf; - char *classid; + gchar *classid; struct _itip_puri *puri; CamelDataWrapper *content; CamelStream *mem; @@ -2442,7 +2442,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target) if (((CamelStreamMem *) mem)->buffer->len == 0) puri->vcalendar = NULL; else - puri->vcalendar = g_strndup ((char *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); + puri->vcalendar = g_strndup ((gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); camel_object_unref (mem); @@ -2471,7 +2471,7 @@ initialize_selection (ESourceSelector *selector, ESourceList *source_list) GSList *sources; for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) { ESource *source = E_SOURCE (sources->data); - const char *completion = e_source_get_property (source, "conflict"); + const gchar *completion = e_source_get_property (source, "conflict"); if (completion && !g_ascii_strcasecmp (completion, "true")) e_source_selector_select_source (selector, source); } diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c index 30dbe135cc..c2fe0e163a 100644 --- a/plugins/itip-formatter/itip-view.c +++ b/plugins/itip-formatter/itip-view.c @@ -50,7 +50,7 @@ G_DEFINE_TYPE (ItipView, itip_view, GTK_TYPE_HBOX) typedef struct { ItipViewInfoItemType type; - char *message; + gchar *message; guint id; } ItipViewInfoItem; @@ -60,27 +60,27 @@ struct _ItipViewPrivate { ECalSourceType type; GtkWidget *sender_label; - char *organizer; - char *organizer_sentby; - char *delegator; - char *attendee; - char *attendee_sentby; - char *proxy; + gchar *organizer; + gchar *organizer_sentby; + gchar *delegator; + gchar *attendee; + gchar *attendee_sentby; + gchar *proxy; GtkWidget *summary_label; - char *summary; + gchar *summary; GtkWidget *location_header; GtkWidget *location_label; - char *location; + gchar *location; GtkWidget *status_header; GtkWidget *status_label; - char *status; + gchar *status; GtkWidget *comment_header; GtkWidget *comment_label; - char *comment; + gchar *comment; GtkWidget *start_header; GtkWidget *start_label; @@ -99,7 +99,7 @@ struct _ItipViewPrivate { guint next_info_item_id; GtkWidget *description_label; - char *description; + gchar *description; GtkWidget *selector_box; GtkWidget *escb; @@ -148,7 +148,7 @@ format_date_and_time_x (struct tm *date_tm, char *buffer, int buffer_size) { - char *format; + gchar *format; struct tm tomorrow_tm, week_tm; /* Calculate a normalized "tomorrow" */ @@ -337,9 +337,9 @@ static void set_calendar_sender_text (ItipView *view) { ItipViewPrivate *priv; - const char *organizer, *attendee; - char *sender = NULL; - char *on_behalf_of = NULL; + const gchar *organizer, *attendee; + gchar *sender = NULL; + gchar *on_behalf_of = NULL; priv = view->priv; @@ -425,9 +425,9 @@ static void set_tasklist_sender_text (ItipView *view) { ItipViewPrivate *priv; - const char *organizer, *attendee; - char *sender = NULL; - char *on_behalf_of = NULL; + const gchar *organizer, *attendee; + gchar *sender = NULL; + gchar *on_behalf_of = NULL; priv = view->priv; @@ -513,9 +513,9 @@ static void set_journal_sender_text (ItipView *view) { ItipViewPrivate *priv; - const char *organizer, *attendee; - char *sender = NULL; - char *on_behalf_of = NULL; + const gchar *organizer, *attendee; + gchar *sender = NULL; + gchar *on_behalf_of = NULL; priv = view->priv; @@ -589,7 +589,7 @@ static void set_summary_text (ItipView *view) { ItipViewPrivate *priv; - char *summary = NULL; + gchar *summary = NULL; priv = view->priv; @@ -656,7 +656,7 @@ static void set_start_text (ItipView *view) { ItipViewPrivate *priv; - char buffer[256]; + gchar buffer[256]; time_t now; struct tm *now_tm; @@ -680,7 +680,7 @@ static void set_end_text (ItipView *view) { ItipViewPrivate *priv; - char buffer[256]; + gchar buffer[256]; time_t now; struct tm *now_tm; @@ -1242,7 +1242,7 @@ itip_view_get_item_type (ItipView *view) /* ensures the returned text will be valid UTF-8 text, thus gtk functions expecting only valid UTF-8 texts will not crash. Returned pointer should be freed with g_free. */ static gchar * -ensure_utf8 (const char *text) +ensure_utf8 (const gchar *text) { gchar *res = g_strdup (text), *p; @@ -1259,7 +1259,7 @@ ensure_utf8 (const char *text) } void -itip_view_set_organizer (ItipView *view, const char *organizer) +itip_view_set_organizer (ItipView *view, const gchar *organizer) { ItipViewPrivate *priv; @@ -1276,7 +1276,7 @@ itip_view_set_organizer (ItipView *view, const char *organizer) set_sender_text (view); } -const char * +const gchar * itip_view_get_organizer (ItipView *view) { ItipViewPrivate *priv; @@ -1290,7 +1290,7 @@ itip_view_get_organizer (ItipView *view) } void -itip_view_set_organizer_sentby (ItipView *view, const char *sentby) +itip_view_set_organizer_sentby (ItipView *view, const gchar *sentby) { ItipViewPrivate *priv; @@ -1307,7 +1307,7 @@ itip_view_set_organizer_sentby (ItipView *view, const char *sentby) set_sender_text (view); } -const char * +const gchar * itip_view_get_organizer_sentby (ItipView *view) { ItipViewPrivate *priv; @@ -1321,7 +1321,7 @@ itip_view_get_organizer_sentby (ItipView *view) } void -itip_view_set_attendee (ItipView *view, const char *attendee) +itip_view_set_attendee (ItipView *view, const gchar *attendee) { ItipViewPrivate *priv; @@ -1338,7 +1338,7 @@ itip_view_set_attendee (ItipView *view, const char *attendee) set_sender_text (view); } -const char * +const gchar * itip_view_get_attendee (ItipView *view) { ItipViewPrivate *priv; @@ -1352,7 +1352,7 @@ itip_view_get_attendee (ItipView *view) } void -itip_view_set_attendee_sentby (ItipView *view, const char *sentby) +itip_view_set_attendee_sentby (ItipView *view, const gchar *sentby) { ItipViewPrivate *priv; @@ -1369,7 +1369,7 @@ itip_view_set_attendee_sentby (ItipView *view, const char *sentby) set_sender_text (view); } -const char * +const gchar * itip_view_get_attendee_sentby (ItipView *view) { ItipViewPrivate *priv; @@ -1383,7 +1383,7 @@ itip_view_get_attendee_sentby (ItipView *view) } void -itip_view_set_proxy (ItipView *view, const char *proxy) +itip_view_set_proxy (ItipView *view, const gchar *proxy) { ItipViewPrivate *priv; @@ -1400,7 +1400,7 @@ itip_view_set_proxy (ItipView *view, const char *proxy) set_sender_text (view); } -const char * +const gchar * itip_view_get_proxy (ItipView *view) { ItipViewPrivate *priv; @@ -1414,7 +1414,7 @@ itip_view_get_proxy (ItipView *view) } void -itip_view_set_delegator (ItipView *view, const char *delegator) +itip_view_set_delegator (ItipView *view, const gchar *delegator) { ItipViewPrivate *priv; @@ -1431,7 +1431,7 @@ itip_view_set_delegator (ItipView *view, const char *delegator) set_sender_text (view); } -const char * +const gchar * itip_view_get_delegator (ItipView *view) { ItipViewPrivate *priv; @@ -1445,7 +1445,7 @@ itip_view_get_delegator (ItipView *view) } void -itip_view_set_summary (ItipView *view, const char *summary) +itip_view_set_summary (ItipView *view, const gchar *summary) { ItipViewPrivate *priv; @@ -1462,7 +1462,7 @@ itip_view_set_summary (ItipView *view, const char *summary) set_summary_text (view); } -const char * +const gchar * itip_view_get_summary (ItipView *view) { ItipViewPrivate *priv; @@ -1476,7 +1476,7 @@ itip_view_get_summary (ItipView *view) } void -itip_view_set_location (ItipView *view, const char *location) +itip_view_set_location (ItipView *view, const gchar *location) { ItipViewPrivate *priv; @@ -1493,7 +1493,7 @@ itip_view_set_location (ItipView *view, const char *location) set_location_text (view); } -const char * +const gchar * itip_view_get_location (ItipView *view) { ItipViewPrivate *priv; @@ -1507,7 +1507,7 @@ itip_view_get_location (ItipView *view) } void -itip_view_set_status (ItipView *view, const char *status) +itip_view_set_status (ItipView *view, const gchar *status) { ItipViewPrivate *priv; @@ -1524,7 +1524,7 @@ itip_view_set_status (ItipView *view, const char *status) set_status_text (view); } -const char * +const gchar * itip_view_get_status (ItipView *view) { ItipViewPrivate *priv; @@ -1538,7 +1538,7 @@ itip_view_get_status (ItipView *view) } void -itip_view_set_comment (ItipView *view, const char *comment) +itip_view_set_comment (ItipView *view, const gchar *comment) { ItipViewPrivate *priv; @@ -1555,7 +1555,7 @@ itip_view_set_comment (ItipView *view, const char *comment) set_comment_text (view); } -const char * +const gchar * itip_view_get_comment (ItipView *view) { ItipViewPrivate *priv; @@ -1570,7 +1570,7 @@ itip_view_get_comment (ItipView *view) void -itip_view_set_description (ItipView *view, const char *description) +itip_view_set_description (ItipView *view, const gchar *description) { ItipViewPrivate *priv; @@ -1587,7 +1587,7 @@ itip_view_set_description (ItipView *view, const char *description) set_description_text (view); } -const char * +const gchar * itip_view_get_description (ItipView *view) { ItipViewPrivate *priv; @@ -1674,7 +1674,7 @@ itip_view_get_end (ItipView *view) } guint -itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const char *message) +itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const gchar *message) { ItipViewPrivate *priv; ItipViewInfoItem *item; @@ -1698,10 +1698,10 @@ itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const } guint -itip_view_add_upper_info_item_printf (ItipView *view, ItipViewInfoItemType type, const char *format, ...) +itip_view_add_upper_info_item_printf (ItipView *view, ItipViewInfoItemType type, const gchar *format, ...) { va_list args; - char *message; + gchar *message; guint id; g_return_val_if_fail (view != NULL, 0); @@ -1769,7 +1769,7 @@ itip_view_clear_upper_info_items (ItipView *view) } guint -itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const char *message) +itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const gchar *message) { ItipViewPrivate *priv; ItipViewInfoItem *item; @@ -1793,10 +1793,10 @@ itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const } guint -itip_view_add_lower_info_item_printf (ItipView *view, ItipViewInfoItemType type, const char *format, ...) +itip_view_add_lower_info_item_printf (ItipView *view, ItipViewInfoItemType type, const gchar *format, ...) { va_list args; - char *message; + gchar *message; guint id; g_return_val_if_fail (view != NULL, 0); @@ -2084,7 +2084,7 @@ itip_view_get_show_update (ItipView *view) } void -itip_view_set_rsvp_comment (ItipView *view, const char *comment) +itip_view_set_rsvp_comment (ItipView *view, const gchar *comment) { ItipViewPrivate *priv; @@ -2096,7 +2096,7 @@ itip_view_set_rsvp_comment (ItipView *view, const char *comment) gtk_entry_set_text (GTK_ENTRY (priv->rsvp_comment_entry), comment); } -const char * +const gchar * itip_view_get_rsvp_comment (ItipView *view) { ItipViewPrivate *priv; diff --git a/plugins/itip-formatter/itip-view.h b/plugins/itip-formatter/itip-view.h index 88d01204fb..2b834b01c8 100644 --- a/plugins/itip-formatter/itip-view.h +++ b/plugins/itip-formatter/itip-view.h @@ -87,7 +87,7 @@ struct _ItipViewClass { GtkHBoxClass parent_class; void (* source_selected) (ItipView *view, ESource *selected_source); - void (* response) (ItipView *view, int response); + void (* response) (ItipView *view, gint response); }; GType itip_view_get_type (void); @@ -99,38 +99,38 @@ ItipViewMode itip_view_get_mode (ItipView *view); void itip_view_set_item_type (ItipView *view, ECalSourceType type); ECalSourceType itip_view_get_item_type (ItipView *view); -void itip_view_set_organizer (ItipView *view, const char *organizer); -const char *itip_view_get_organizer (ItipView *view); +void itip_view_set_organizer (ItipView *view, const gchar *organizer); +const gchar *itip_view_get_organizer (ItipView *view); -void itip_view_set_organizer_sentby (ItipView *view, const char *sentby); -const char *itip_view_get_organizer_sentby (ItipView *view); +void itip_view_set_organizer_sentby (ItipView *view, const gchar *sentby); +const gchar *itip_view_get_organizer_sentby (ItipView *view); -void itip_view_set_attendee (ItipView *view, const char *attendee); -const char *itip_view_get_attendee (ItipView *view); +void itip_view_set_attendee (ItipView *view, const gchar *attendee); +const gchar *itip_view_get_attendee (ItipView *view); -void itip_view_set_attendee_sentby (ItipView *view, const char *sentby); -const char *itip_view_get_attendee_sentby (ItipView *view); +void itip_view_set_attendee_sentby (ItipView *view, const gchar *sentby); +const gchar *itip_view_get_attendee_sentby (ItipView *view); -void itip_view_set_delegator (ItipView *view, const char *delegator); -const char *itip_view_get_delegator (ItipView *view); +void itip_view_set_delegator (ItipView *view, const gchar *delegator); +const gchar *itip_view_get_delegator (ItipView *view); -void itip_view_set_proxy (ItipView *view, const char *proxy); -const char *itip_view_get_proxy (ItipView *view); +void itip_view_set_proxy (ItipView *view, const gchar *proxy); +const gchar *itip_view_get_proxy (ItipView *view); -void itip_view_set_summary (ItipView *view, const char *summary); -const char *itip_view_get_summary (ItipView *view); +void itip_view_set_summary (ItipView *view, const gchar *summary); +const gchar *itip_view_get_summary (ItipView *view); -void itip_view_set_location (ItipView *view, const char *location); -const char *itip_view_get_location (ItipView *view); +void itip_view_set_location (ItipView *view, const gchar *location); +const gchar *itip_view_get_location (ItipView *view); -void itip_view_set_status (ItipView *view, const char *status); -const char *itip_view_get_status (ItipView *view); +void itip_view_set_status (ItipView *view, const gchar *status); +const gchar *itip_view_get_status (ItipView *view); -void itip_view_set_comment (ItipView *view, const char *comment); -const char *itip_view_get_comment (ItipView *view); +void itip_view_set_comment (ItipView *view, const gchar *comment); +const gchar *itip_view_get_comment (ItipView *view); -void itip_view_set_description (ItipView *view, const char *description); -const char *itip_view_get_description (ItipView *view); +void itip_view_set_description (ItipView *view, const gchar *description); +const gchar *itip_view_get_description (ItipView *view); void itip_view_set_start (ItipView *view, struct tm *start); const struct tm *itip_view_get_start (ItipView *view); @@ -138,13 +138,13 @@ const struct tm *itip_view_get_start (ItipView *view); void itip_view_set_end (ItipView *view, struct tm *end); const struct tm *itip_view_get_end (ItipView *view); -guint itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const char *message); -guint itip_view_add_upper_info_item_printf (ItipView *view, ItipViewInfoItemType, const char *format, ...) G_GNUC_PRINTF (3, 4); +guint itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const gchar *message); +guint itip_view_add_upper_info_item_printf (ItipView *view, ItipViewInfoItemType, const gchar *format, ...) G_GNUC_PRINTF (3, 4); void itip_view_remove_upper_info_item (ItipView *view, guint id); void itip_view_clear_upper_info_items (ItipView *view); -guint itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const char *message); -guint itip_view_add_lower_info_item_printf (ItipView *view, ItipViewInfoItemType type, const char *format, ...) G_GNUC_PRINTF (3, 4); +guint itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const gchar *message); +guint itip_view_add_lower_info_item_printf (ItipView *view, ItipViewInfoItemType type, const gchar *format, ...) G_GNUC_PRINTF (3, 4); void itip_view_remove_lower_info_item (ItipView *view, guint id); void itip_view_clear_lower_info_items (ItipView *view); @@ -166,8 +166,8 @@ gboolean itip_view_get_update (ItipView *view); void itip_view_set_show_update (ItipView *view, gboolean update); gboolean itip_view_get_show_update (ItipView *view); -void itip_view_set_rsvp_comment (ItipView *view, const char *comment); -const char *itip_view_get_rsvp_comment (ItipView *view); +void itip_view_set_rsvp_comment (ItipView *view, const gchar *comment); +const gchar *itip_view_get_rsvp_comment (ItipView *view); void itip_view_set_buttons_sensitive (ItipView *view, gboolean sensitive); gboolean itip_view_get_buttons_sensitive (ItipView *view); diff --git a/plugins/mail-account-disable/mail-account-disable.c b/plugins/mail-account-disable/mail-account-disable.c index d03e97d0f8..aee3043682 100644 --- a/plugins/mail-account-disable/mail-account-disable.c +++ b/plugins/mail-account-disable/mail-account-disable.c @@ -38,7 +38,7 @@ #define ACCOUNT_DISABLE 0 #define PROXY_LOGOUT 1 -void mail_account_disable (EPopup *ep, EPopupItem *p, void *data); +void mail_account_disable (EPopup *ep, EPopupItem *p, gpointer data); void org_gnome_create_mail_account_disable (EPlugin *ep, EMPopupTargetFolder *t); static EPopupItem popup_items[] = { @@ -47,13 +47,13 @@ static EPopupItem popup_items[] = { }; static void -popup_free (EPopup *ep, GSList *items, void *data) +popup_free (EPopup *ep, GSList *items, gpointer data) { g_slist_free (items); } void -mail_account_disable (EPopup *ep, EPopupItem *p, void *data) +mail_account_disable (EPopup *ep, EPopupItem *p, gpointer data) { MailComponent *component; EAccount *account = data; diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 466648d80f..d7c0f8a3dd 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -66,7 +66,7 @@ static GStaticMutex mlock = G_STATIC_MUTEX_INIT; * b) void read_notify_... (EMEventTargetMessage *t) * it is called when read_notify message is sent by Evolution * - * c) void enable_... (int enable) + * c) void enable_... (gint enable) * when plugin itself or the part is enabled/disabled * * d) GtkWidget *get_config_widget_...(void) @@ -127,7 +127,7 @@ static DBusConnection *bus = NULL; static gboolean init_dbus (void); static void -send_dbus_message (const char *name, const char *data, guint new) +send_dbus_message (const gchar *name, const gchar *data, guint new) { DBusMessage *message; @@ -145,7 +145,7 @@ send_dbus_message (const char *name, const char *data, guint new) DBUS_TYPE_INVALID); if (new) { - char * display_name = em_utils_folder_name_from_uri (data); + gchar * display_name = em_utils_folder_name_from_uri (data); dbus_message_append_args (message, #if FOUND_DBUS_VERSION >= 310 DBUS_TYPE_STRING, &display_name, DBUS_TYPE_UINT32, &new, @@ -174,7 +174,7 @@ reinit_dbus (gpointer user_data) } static DBusHandlerResult -filter_function (DBusConnection *connection, DBusMessage *message, void *user_data) +filter_function (DBusConnection *connection, DBusMessage *message, gpointer user_data) { if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected") && strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) { @@ -237,7 +237,7 @@ read_notify_dbus (EMEventTargetMessage *t) } static void -enable_dbus (int enable) +enable_dbus (gint enable) { if (enable) { /* we ignore errors here */ @@ -273,7 +273,7 @@ get_config_widget_dbus (void) static GtkStatusIcon *status_icon = NULL; static guint blink_timeout_id = 0; -static unsigned int status_count = 0; +static guint status_count = 0; #ifdef HAVE_LIBNOTIFY static gboolean notification_callback (gpointer notify); @@ -370,7 +370,7 @@ static void do_properties (GtkMenuItem *item, gpointer user_data) { GtkWidget *cfg, *dialog, *vbox, *label, *hbox; - char *text; + gchar *text; cfg = get_cfg_widget (); if (!cfg) @@ -465,7 +465,7 @@ notifyActionCallback (NotifyNotification *n, gchar *label, gpointer a) static void new_notify_status (EMEventTargetFolder *t) { - char *msg; + gchar *msg; gboolean new_icon = !status_icon; if (new_icon) { @@ -541,7 +541,7 @@ read_notify_status (EMEventTargetMessage *t) } static void -enable_status (int enable) +enable_status (gint enable) { /* this does nothing on enable, it's here just to be consistent with other parts of this plugin */ @@ -730,7 +730,7 @@ read_notify_sound (EMEventTargetMessage *t) } static void -enable_sound (int enable) +enable_sound (gint enable) { if (enable) gnome_sound_init ("localhost"); @@ -854,7 +854,7 @@ get_cfg_widget (void) void org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t); void org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t); -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); GtkWidget *e_plugin_lib_get_configure_widget (EPlugin *epl); @@ -904,8 +904,8 @@ org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t) g_static_mutex_unlock (&mlock); } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { if (enable) { #ifdef HAVE_DBUS diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c index 5560a4cabd..78fd37b999 100644 --- a/plugins/mail-to-task/mail-to-task.c +++ b/plugins/mail-to-task/mail-to-task.c @@ -53,14 +53,14 @@ #include <gtkhtml/gtkhtml.h> #include <calendar/common/authentication.h> -static char * -clean_name(const unsigned char *s) +static gchar * +clean_name(const guchar *s) { GString *out = g_string_new(""); guint32 c; - char *r; + gchar *r; - while ((c = camel_utf8_getc ((const unsigned char **)&s))) + while ((c = camel_utf8_getc ((const guchar **)&s))) { if (!g_unichar_isprint (c) || ( c < 0x7f && strchr (" /'\"`&();|<>$%{}!", c ))) c = '_'; @@ -74,12 +74,12 @@ clean_name(const unsigned char *s) } static void -set_attendees (ECalComponent *comp, CamelMimeMessage *message, const char *organizer) +set_attendees (ECalComponent *comp, CamelMimeMessage *message, const gchar *organizer) { GSList *attendees = NULL, *to_free = NULL; ECalComponentAttendee *ca; const CamelInternetAddress *from = NULL, *to, *cc, *bcc, *arr[4]; - int len, i, j; + gint len, i, j; if (message->reply_to) from = message->reply_to; @@ -98,10 +98,10 @@ set_attendees (ECalComponent *comp, CamelMimeMessage *message, const char *organ len = CAMEL_ADDRESS (arr[j])->addresses->len; for (i = 0; i < len; i++) { - const char *name, *addr; + const gchar *name, *addr; if (camel_internet_address_get (arr[j], i, &name, &addr)) { - char *temp; + gchar *temp; temp = g_strconcat ("mailto:", addr, NULL); if (organizer && g_ascii_strcasecmp (temp, organizer) == 0) { @@ -152,7 +152,7 @@ set_description (ECalComponent *comp, CamelMimeMessage *message) CamelMimePart *mime_part = CAMEL_MIME_PART (message); ECalComponentText text; GSList sl; - char *str, *convert_str = NULL; + gchar *str, *convert_str = NULL; gsize bytes_read, bytes_written; gint count = 2; @@ -180,7 +180,7 @@ set_description (ECalComponent *comp, CamelMimeMessage *message) mem = camel_stream_mem_new (); camel_data_wrapper_decode_to_stream (content, mem); - str = g_strndup ((const gchar*)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); + str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); camel_object_unref (mem); /* convert to UTF-8 string */ @@ -206,13 +206,13 @@ set_description (ECalComponent *comp, CamelMimeMessage *message) g_free (convert_str); } -static char * +static gchar * set_organizer (ECalComponent *comp) { EAccount *account; - const char *str, *name; + const gchar *str, *name; ECalComponentOrganizer organizer = {NULL, NULL, NULL, NULL}; - char *res; + gchar *res; account = mail_config_get_default_account (); if (!account) @@ -235,11 +235,11 @@ set_organizer (ECalComponent *comp) static void set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message) { - int parts, i; + gint parts, i; GSList *list = NULL; - const char *uid; - const char *store_uri; - char *store_dir; + const gchar *uid; + const gchar *store_uri; + gchar *store_dir; CamelDataWrapper *content; content = camel_medium_get_content_object ((CamelMedium *) message); @@ -258,8 +258,8 @@ set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message) for (i = 1; i < parts; i++) { - char *filename, *path, *tmp; - const char *orig_filename; + gchar *filename, *path, *tmp; + const gchar *orig_filename; CamelMimePart *mime_part; mime_part = camel_multipart_get_part (CAMEL_MULTIPART (content), i); @@ -268,13 +268,13 @@ set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message) if (!orig_filename) continue; - tmp = clean_name ((const unsigned char *)orig_filename); + tmp = clean_name ((const guchar *)orig_filename); filename = g_strdup_printf ("%s-%s", uid, tmp); path = g_build_filename (store_dir, filename, NULL); if (em_utils_save_part_to_file (NULL, path, mime_part)) { - char *uri; + gchar *uri; uri = g_filename_to_uri (path, NULL, NULL); list = g_slist_append (list, g_strdup (uri)); g_free (uri); @@ -292,8 +292,8 @@ set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message) struct _report_error { - char *format; - char *param; + gchar *format; + gchar *param; }; static gboolean @@ -310,7 +310,7 @@ do_report_error (struct _report_error *err) } static void -report_error_idle (const char *format, const char *param) +report_error_idle (const gchar *format, const gchar *param) { struct _report_error *err = g_new (struct _report_error, 1); @@ -325,7 +325,7 @@ typedef struct { ECal *client; struct _CamelFolder *folder; GPtrArray *uids; - char *selected_text; + gchar *selected_text; gboolean with_attendees; }AsyncData; @@ -361,7 +361,7 @@ do_mail_to_event (AsyncData *data) } } } else { - int i; + gint i; ECalSourceType source_type = e_cal_get_source_type (client); ECalComponentDateTime dt, dt2; struct icaltimetype tt, tt2; @@ -433,7 +433,7 @@ do_mail_to_event (AsyncData *data) set_description (comp, message); if (data->with_attendees) { - char *organizer; + gchar *organizer; /* set actual user as organizer, to be able to change event's properties */ organizer = set_organizer (comp); @@ -477,15 +477,15 @@ do_mail_to_event (AsyncData *data) } static void -copy_uids (char *uid, GPtrArray *uid_array) +copy_uids (gchar *uid, GPtrArray *uid_array) { g_ptr_array_add (uid_array, g_strdup (uid)); } static gboolean -text_contains_nonwhitespace (const char *text, gint len) +text_contains_nonwhitespace (const gchar *text, gint len) { - const char *p; + const gchar *p; gunichar c = 0; if (!text || len<=0) @@ -508,10 +508,10 @@ text_contains_nonwhitespace (const char *text, gint len) } /* should be freed with g_free after done with it */ -static char * +static gchar * get_selected_text (EMFolderView *emfv) { - char *text = NULL; + gchar *text = NULL; gint len; if (!emfv || !emfv->preview || !gtk_html_command (((EMFormatHTML *)emfv->preview)->html, "is-selection-active")) @@ -602,7 +602,7 @@ mail_to_event (ECalSourceType source_type, gboolean with_attendees, GPtrArray *u client = auth_new_cal_from_source (source, source_type); if (!client) { - char *uri = e_source_get_uri (source); + gchar *uri = e_source_get_uri (source); e_notice (NULL, GTK_MESSAGE_ERROR, "Could not create the client: %s", uri); @@ -635,24 +635,24 @@ mail_to_event (ECalSourceType source_type, gboolean with_attendees, GPtrArray *u /* ************************************************************************* */ -int e_plugin_lib_enable (EPluginLib *ep, int enable); -void org_gnome_mail_to_event (void *ep, EMPopupTargetSelect *t); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); +void org_gnome_mail_to_event (gpointer ep, EMPopupTargetSelect *t); void org_gnome_mail_to_event_menu (EPlugin *ep, EMMenuTargetSelect *t); -void org_gnome_mail_to_meeting (void *ep, EMPopupTargetSelect *t); +void org_gnome_mail_to_meeting (gpointer ep, EMPopupTargetSelect *t); void org_gnome_mail_to_meeting_menu (EPlugin *ep, EMMenuTargetSelect *t); -void org_gnome_mail_to_task (void *ep, EMPopupTargetSelect *t); +void org_gnome_mail_to_task (gpointer ep, EMPopupTargetSelect *t); void org_gnome_mail_to_task_menu (EPlugin *ep, EMMenuTargetSelect *t); -void org_gnome_mail_to_memo (void *ep, EMPopupTargetSelect *t); +void org_gnome_mail_to_memo (gpointer ep, EMPopupTargetSelect *t); void org_gnome_mail_to_memo_menu (EPlugin *ep, EMMenuTargetSelect *t); -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { return 0; } void -org_gnome_mail_to_event (void *ep, EMPopupTargetSelect *t) +org_gnome_mail_to_event (gpointer ep, EMPopupTargetSelect *t) { mail_to_event (E_CAL_SOURCE_TYPE_EVENT, FALSE, t->uids, t->folder, (EMFolderView *) t->target.widget); } @@ -664,7 +664,7 @@ org_gnome_mail_to_event_menu (EPlugin *ep, EMMenuTargetSelect *t) } void -org_gnome_mail_to_meeting (void *ep, EMPopupTargetSelect *t) +org_gnome_mail_to_meeting (gpointer ep, EMPopupTargetSelect *t) { mail_to_event (E_CAL_SOURCE_TYPE_EVENT, TRUE, t->uids, t->folder, (EMFolderView *) t->target.widget); } @@ -676,7 +676,7 @@ org_gnome_mail_to_meeting_menu (EPlugin *ep, EMMenuTargetSelect *t) } void -org_gnome_mail_to_task (void *ep, EMPopupTargetSelect *t) +org_gnome_mail_to_task (gpointer ep, EMPopupTargetSelect *t) { mail_to_event (E_CAL_SOURCE_TYPE_TODO, TRUE, t->uids, t->folder, (EMFolderView *) t->target.widget); } @@ -688,7 +688,7 @@ org_gnome_mail_to_task_menu (EPlugin *ep, EMMenuTargetSelect *t) } void -org_gnome_mail_to_memo (void *ep, EMPopupTargetSelect *t) +org_gnome_mail_to_memo (gpointer ep, EMPopupTargetSelect *t) { /* do not set organizer and attendees for memos */ mail_to_event (E_CAL_SOURCE_TYPE_JOURNAL, FALSE, t->uids, t->folder, (EMFolderView *) t->target.widget); diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c index 7dc1895389..f3ca8d1651 100644 --- a/plugins/mailing-list-actions/mailing-list-actions.c +++ b/plugins/mailing-list-actions/mailing-list-actions.c @@ -58,7 +58,7 @@ typedef enum { typedef struct { EmlaAction action; /* action enumeration */ gboolean interactive; /* whether the user needs to edit a mailto: message (e.g. for post action) */ - const char* header; /* header representing the action */ + const gchar * header; /* header representing the action */ } EmlaActionHeader; const EmlaActionHeader emla_action_headers[] = { @@ -70,7 +70,7 @@ const EmlaActionHeader emla_action_headers[] = { { EMLA_ACTION_ARCHIVE, FALSE, "List-Archive" }, }; -const int emla_n_action_headers = sizeof(emla_action_headers) / sizeof(EmlaActionHeader); +const gint emla_n_action_headers = sizeof(emla_action_headers) / sizeof(EmlaActionHeader); void emla_list_action (EPlugin *item, EMMenuTargetSelect* sel, EmlaAction action); void emla_list_help (EPlugin *item, EMMenuTargetSelect* sel); @@ -80,11 +80,11 @@ void emla_list_post (EPlugin *item, EMMenuTargetSelect* sel); void emla_list_owner (EPlugin *item, EMMenuTargetSelect* sel); void emla_list_archive (EPlugin *item, EMMenuTargetSelect* sel); -void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data); +void emla_list_action_do (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data); typedef struct { EmlaAction action; - char* uri; + gchar * uri; } emla_action_data; void emla_list_action (EPlugin *item, EMMenuTargetSelect* sel, EmlaAction action) @@ -97,19 +97,19 @@ void emla_list_action (EPlugin *item, EMMenuTargetSelect* sel, EmlaAction action data->action = action; data->uri = strdup (sel->uri); - mail_get_message (sel->folder, (const char*) g_ptr_array_index (sel->uids, 0), + mail_get_message (sel->folder, (const gchar *) g_ptr_array_index (sel->uids, 0), emla_list_action_do, data, mail_msg_unordered_push); } -void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data) +void emla_list_action_do (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data) { emla_action_data *action_data = (emla_action_data *) data; EmlaAction action = action_data->action; - const char* header = NULL, *headerpos; - char *end, *url = NULL; - int t; + const gchar * header = NULL, *headerpos; + gchar *end, *url = NULL; + gint t; EMsgComposer *composer; - int send_message_response; + gint send_message_response; EAccount *account; if (msg == NULL) diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c index dfcf75937b..87f52183fd 100644 --- a/plugins/mark-all-read/mark-all-read.c +++ b/plugins/mark-all-read/mark-all-read.c @@ -42,7 +42,7 @@ "only, or in the current folder as well as all subfolders?") void org_gnome_mark_all_read (EPlugin *ep, EMPopupTargetFolder *target); -static void mar_got_folder (char *uri, CamelFolder *folder, void *data); +static void mar_got_folder (gchar *uri, CamelFolder *folder, gpointer data); static void mar_all_sub_folders (CamelStore *store, CamelFolderInfo *fi, CamelException *ex); static void @@ -204,7 +204,7 @@ static void mark_all_as_read (CamelFolder *folder) { GPtrArray *uids; - int i; + gint i; uids = camel_folder_get_uids (folder); camel_folder_freeze(folder); @@ -215,7 +215,7 @@ mark_all_as_read (CamelFolder *folder) } static void -mar_got_folder (char *uri, CamelFolder *folder, void *data) +mar_got_folder (gchar *uri, CamelFolder *folder, gpointer data) { CamelFolderInfo *info; CamelStore *store; diff --git a/plugins/mono/mono-plugin.c b/plugins/mono/mono-plugin.c index 0bc95619ce..c7feb024b0 100644 --- a/plugins/mono/mono-plugin.c +++ b/plugins/mono/mono-plugin.c @@ -37,7 +37,7 @@ static MonoDomain *domain; /* ********************************************************************** */ -static void *epm_parent_class; +static gpointer epm_parent_class; typedef struct _EPluginMonoPrivate { MonoAssembly *assembly; @@ -48,13 +48,13 @@ typedef struct _EPluginMonoPrivate { #define epm ((EPluginMono *)ep) -void * load_plugin_type_register_function (void *a, void *b); +gpointer load_plugin_type_register_function (gpointer a, gpointer b); -static char * -get_xml_prop(xmlNodePtr node, const char *id) +static gchar * +get_xml_prop(xmlNodePtr node, const gchar *id) { - char *p = xmlGetProp(node, id); - char *out = NULL; + gchar *p = xmlGetProp(node, id); + gchar *out = NULL; if (p) { out = g_strdup(p); @@ -72,14 +72,14 @@ get_xml_prop(xmlNodePtr node, const char *id) All methods take a single (structured) argument. */ -static void * -epm_invoke(EPlugin *ep, const char *name, void *data) +static gpointer +epm_invoke(EPlugin *ep, const gchar *name, gpointer data) { EPluginMonoPrivate *p = epm->priv; MonoMethodDesc *d; MonoMethod *m; MonoObject *x = NULL, *res; - void **params; + gpointer *params; g_print ("\n\a epm_invoke in mono-plugin.c in mono plugin loader is called \n\a"); @@ -158,7 +158,7 @@ epm_invoke(EPlugin *ep, const char *name, void *data) mono_print_unhandled_exception(x); if (res) { - void **p = mono_object_unbox(res); + gpointer *p = mono_object_unbox(res); d(printf("mono method returned '%p' %ld\n", *p, (long int)*p)); return *p; } else @@ -217,8 +217,8 @@ epm_init(GObject *o) (GDestroyNotify) NULL); } -void * -load_plugin_type_register_function (void *a, void *b) +gpointer +load_plugin_type_register_function (gpointer a, gpointer b) { static GType type = 0; diff --git a/plugins/mono/mono-plugin.h b/plugins/mono/mono-plugin.h index 9dd8facdb3..8ea867e806 100644 --- a/plugins/mono/mono-plugin.h +++ b/plugins/mono/mono-plugin.h @@ -38,14 +38,14 @@ struct _EPluginMono { struct _EPluginMonoPrivate *priv; - char *location; /* location */ - char *handler; /* handler class */ + gchar *location; /* location */ + gchar *handler; /* handler class */ }; struct _EPluginMonoClass { EPluginClass plugin_class; }; -void *org_gnome_evolution_mono_get_type(void *a, void *b); +gpointer org_gnome_evolution_mono_get_type(gpointer a, gpointer b); #endif /* ! _ORG_GNOME_EVOLUTION_MONO_H */ diff --git a/plugins/plugin-manager/plugin-manager.c b/plugins/plugin-manager/plugin-manager.c index 54d166065b..816505b662 100644 --- a/plugins/plugin-manager/plugin-manager.c +++ b/plugins/plugin-manager/plugin-manager.c @@ -52,7 +52,7 @@ enum }; static struct { - const char *label; + const gchar *label; } label_info[LABEL_LAST] = { { N_("Name"), }, { N_("Author(s)"), }, @@ -81,10 +81,10 @@ static GtkWidget *configure_page; static gint last_selected_page; static gulong switch_page_handler_id; -void org_gnome_plugin_manager_manage(void *ep, ESMenuTargetShell *t); +void org_gnome_plugin_manager_manage(gpointer ep, ESMenuTargetShell *t); static void -eppm_set_label (GtkLabel *l, const char *v) +eppm_set_label (GtkLabel *l, const gchar *v) { gtk_label_set_label(l, v?v:_("Unknown")); } @@ -101,7 +101,7 @@ static void eppm_show_plugin (Manager *m, EPlugin *ep, GtkWidget *cfg_widget) { if (ep) { - char *string; + gchar *string; string = g_strdup_printf ("<span size=\"x-large\">%s</span>", ep->name); gtk_label_set_markup (GTK_LABEL (m->items[LABEL_NAME]), string); @@ -133,7 +133,7 @@ eppm_show_plugin (Manager *m, EPlugin *ep, GtkWidget *cfg_widget) eppm_set_label (m->items[LABEL_DESCRIPTION], ep->description); } else { - int i; + gint i; gtk_label_set_markup (GTK_LABEL (m->config_plugin_label), ""); for (i = 0; i < LABEL_LAST; i++) @@ -184,7 +184,7 @@ eppm_selection_changed (GtkTreeSelection *selection, Manager *m) } static void -eppm_enable_toggled (GtkCellRendererToggle *renderer, const char *path_string, Manager *m) +eppm_enable_toggled (GtkCellRendererToggle *renderer, const gchar *path_string, Manager *m) { GtkTreePath *path; GtkTreeIter iter; @@ -207,7 +207,7 @@ eppm_enable_toggled (GtkCellRendererToggle *renderer, const char *path_string, M } static void -eppm_free (void *data) +eppm_free (gpointer data) { Manager *m = data; GSList *l; @@ -221,24 +221,24 @@ eppm_free (void *data) } static void -eppm_response (GtkDialog *w, int button, Manager *m) +eppm_response (GtkDialog *w, gint button, Manager *m) { gtk_widget_destroy (GTK_WIDGET (w)); dialog = NULL; } void -org_gnome_plugin_manager_manage (void *ep, ESMenuTargetShell *t) +org_gnome_plugin_manager_manage (gpointer ep, ESMenuTargetShell *t) { Manager *m; - int i; + gint i; GtkWidget *hbox, *w; GtkWidget *overview_page; GtkListStore *store; GtkTreeSelection *selection; GtkCellRenderer *renderer; GSList *l; - char *string; + gchar *string; GtkWidget *subvbox; if (dialog) { @@ -391,7 +391,7 @@ org_gnome_plugin_manager_manage (void *ep, ESMenuTargetShell *t) /* this is every other data */ for (i = 1; i < LABEL_LAST; i++) { - char *markup; + gchar *markup; subvbox = gtk_vbox_new (FALSE, 6); @@ -431,10 +431,10 @@ org_gnome_plugin_manager_manage (void *ep, ESMenuTargetShell *t) gtk_widget_show (GTK_WIDGET (m->dialog)); } -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { if (enable) { } else { diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c index 13453b20f1..dd7e4539b8 100644 --- a/plugins/prefer-plain/prefer-plain.c +++ b/plugins/prefer-plain/prefer-plain.c @@ -37,8 +37,8 @@ #include <gconf/gconf-client.h> #include "mail/em-config.h" -void org_gnome_prefer_plain_multipart_alternative(void *ep, EMFormatHookTarget *t); -void org_gnome_prefer_plain_text_html(void *ep, EMFormatHookTarget *t); +void org_gnome_prefer_plain_multipart_alternative(gpointer ep, EMFormatHookTarget *t); +void org_gnome_prefer_plain_text_html(gpointer ep, EMFormatHookTarget *t); GtkWidget *org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data); enum { @@ -48,10 +48,10 @@ enum { }; static GConfClient *epp_gconf = NULL; -static int epp_mode = -1; +static gint epp_mode = -1; void -org_gnome_prefer_plain_text_html(void *ep, EMFormatHookTarget *t) +org_gnome_prefer_plain_text_html(gpointer ep, EMFormatHookTarget *t) { /* In text-only mode, all html output is suppressed */ if (epp_mode != EPP_TEXT) @@ -63,7 +63,7 @@ org_gnome_prefer_plain_text_html(void *ep, EMFormatHookTarget *t) static void export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream, CamelMimePart *except) { - int i, nparts, partidlen; + gint i, nparts, partidlen; CamelMimePart *part; if (!mp || !CAMEL_IS_MULTIPART (mp)) @@ -88,7 +88,7 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream camel_mime_part_set_disposition (part, "attachment"); if (!camel_mime_part_get_filename (part)) { - char *str = g_strdup_printf ("%s.html", _("attachment")); + gchar *str = g_strdup_printf ("%s.html", _("attachment")); camel_mime_part_set_filename (part, str); g_free (str); } @@ -104,11 +104,11 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream } void -org_gnome_prefer_plain_multipart_alternative(void *ep, EMFormatHookTarget *t) +org_gnome_prefer_plain_multipart_alternative(gpointer ep, EMFormatHookTarget *t) { CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)t->part); CamelMimePart *part, *display_part = NULL; - int i, nparts, partidlen, displayid = 0; + gint i, nparts, partidlen, displayid = 0; /* FIXME: this part-id stuff is poking private data, needs api */ partidlen = t->format->part_id->len; @@ -183,8 +183,8 @@ org_gnome_prefer_plain_multipart_alternative(void *ep, EMFormatHookTarget *t) } static struct { - const char *label; - const char *key; + const gchar *label; + const gchar *key; } epp_options[] = { { N_("Show HTML if present"), "normal" }, { N_("Prefer PLAIN"), "prefer_plain" }, @@ -192,7 +192,7 @@ static struct { }; static void -epp_mode_changed(GtkComboBox *dropdown, void *dummy) +epp_mode_changed(GtkComboBox *dropdown, gpointer dummy) { epp_mode = gtk_combo_box_get_active(dropdown); if (epp_mode > 2) @@ -209,7 +209,7 @@ org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItem GtkCellRenderer *cell; GtkListStore *store; GtkWidget *w; - int i; + gint i; GtkTreeIter iter; if (data->old) @@ -243,13 +243,13 @@ org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItem return (GtkWidget *)dropdown; } -int e_plugin_lib_enable(EPluginLib *ep, int enable); +gint e_plugin_lib_enable(EPluginLib *ep, gint enable); -int -e_plugin_lib_enable(EPluginLib *ep, int enable) +gint +e_plugin_lib_enable(EPluginLib *ep, gint enable) { - char *key; - int i; + gchar *key; + gint i; if (epp_gconf || epp_mode != -1) return 0; diff --git a/plugins/profiler/profiler.c b/plugins/profiler/profiler.c index 08787fc1fc..94984a3560 100644 --- a/plugins/profiler/profiler.c +++ b/plugins/profiler/profiler.c @@ -38,7 +38,7 @@ org_gnome_evolution_profiler_event(EPlugin *ep, EProfileEventTarget *t) static FILE *fp; if (!fp) { - char *name; + gchar *name; name = g_strdup_printf("eprofile.%ld", (long int)getpid()); fp = fopen(name, "w"); diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c index 4bfe66b41f..9c9f3ad244 100644 --- a/plugins/pst-import/pst-importer.c +++ b/plugins/pst-import/pst-importer.c @@ -72,9 +72,9 @@ typedef struct _PstImporter PstImporter; -int pst_init (pst_file *pst, char *filename); +gint pst_init (pst_file *pst, gchar *filename); gchar *get_pst_rootname (pst_file *pst, gchar *filename); -static void pst_error_msg (const char *fmt, ...); +static void pst_error_msg (const gchar *fmt, ...); static void pst_import_folders (PstImporter *m, pst_desc_ll *topitem); static void pst_process_item (PstImporter *m, pst_desc_ll *d_ptr); static void pst_process_folder (PstImporter *m, pst_item *item); @@ -89,13 +89,13 @@ gchar *foldername_to_utf8 (const gchar *pstname); gchar *string_to_utf8(const gchar *string); void contact_set_date (EContact *contact, EContactField id, FILETIME *date); struct icaltimetype get_ical_date (FILETIME *date, gboolean is_date); -char *rfc2445_datetime_format (FILETIME *ft); +gchar *rfc2445_datetime_format (FILETIME *ft); gboolean org_credativ_evolution_readpst_supported (EPlugin *epl, EImportTarget *target); GtkWidget *org_credativ_evolution_readpst_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im); void org_credativ_evolution_readpst_import (EImport *ei, EImportTarget *target, EImportImporter *im); void org_credativ_evolution_readpst_cancel (EImport *ei, EImportTarget *target, EImportImporter *im); -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); /* em-folder-selection-button.h is private, even though other internal evo plugins use it! @@ -103,11 +103,11 @@ int e_plugin_lib_enable (EPluginLib *ep, int enable); TODO: sort out whether this should really be private */ typedef struct _EMFolderSelectionButton EMFolderSelectionButton; -GtkWidget *em_folder_selection_button_new (const char *title, const char *caption); -void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri); -const char *em_folder_selection_button_get_selection (EMFolderSelectionButton *button); +GtkWidget *em_folder_selection_button_new (const gchar *title, const gchar *caption); +void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const gchar *uri); +const gchar *em_folder_selection_button_get_selection (EMFolderSelectionButton *button); -static unsigned char pst_signature [] = { '!', 'B', 'D', 'N' }; +static guchar pst_signature [] = { '!', 'B', 'D', 'N' }; struct _PstImporter { MailMsg base; @@ -116,9 +116,9 @@ struct _PstImporter { EImportTarget *target; GMutex *status_lock; - char *status_what; - int status_pc; - int status_timeout_id; + gchar *status_what; + gint status_pc; + gint status_timeout_id; CamelOperation *status; CamelException ex; @@ -129,8 +129,8 @@ struct _PstImporter { gchar *parent_uri; gchar *folder_name; gchar *folder_uri; - int folder_count; - int current_item; + gint folder_count; + gint current_item; EBook *addressbook; ECal *calendar; @@ -141,11 +141,11 @@ struct _PstImporter { gboolean org_credativ_evolution_readpst_supported (EPlugin *epl, EImportTarget *target) { - char signature[sizeof (pst_signature)]; + gchar signature[sizeof (pst_signature)]; gboolean ret = FALSE; - int fd, n; + gint fd, n; EImportTargetURI *s; - char *filename; + gchar *filename; if (target->type != E_IMPORT_TARGET_URI) { return FALSE; @@ -217,7 +217,7 @@ folder_selected (EMFolderSelectionButton *button, EImportTargetURI *target) * @param target * @return */ -static gchar* +static gchar * get_suggested_foldername (EImportTargetURI *target) { const gchar *inbox; @@ -259,7 +259,7 @@ get_suggested_foldername (EImportTargetURI *target) if (mail_tool_uri_to_folder (foldername->str, 0, NULL) != NULL) { /* Folder exists - add a number */ - int i, len; + gint i, len; len = foldername->len; CamelFolder *folder; @@ -346,14 +346,14 @@ org_credativ_evolution_readpst_getwidget (EImport *ei, EImportTarget *target, EI return framebox; } -static char * -pst_import_describe (PstImporter *m, int complete) +static gchar * +pst_import_describe (PstImporter *m, gint complete) { return g_strdup (_("Importing Outlook data")); } static ECal* -open_ecal (ECalSourceType type, char *name) +open_ecal (ECalSourceType type, gchar *name) { /* Hack - grab the first calendar we can find TODO - add a selection mechanism in get_widget */ @@ -446,7 +446,7 @@ pst_import_import (PstImporter *m) static void pst_import_file (PstImporter *m) { - int ret; + gint ret; gchar *filename; pst_item *item = NULL; pst_desc_ll *d_ptr; @@ -689,7 +689,7 @@ pst_create_folder (PstImporter *m) { const gchar *parent; gchar *dest, *dest_end, *pos; - int dest_len; + gint dest_len; parent = ((EImportTargetURI *)m->target)->uri_dest; dest = g_strdup (m->folder_uri); @@ -733,7 +733,7 @@ static CamelMimePart * attachment_to_part (PstImporter *m, pst_item_attach *attach) { CamelMimePart *part; - char *mimetype; + gchar *mimetype; part = camel_mime_part_new (); @@ -754,11 +754,11 @@ attachment_to_part (PstImporter *m, pst_item_attach *attach) if (attach->data != NULL) { camel_mime_part_set_content (part, attach->data, strlen (attach->data), mimetype); } else { - char *buf = NULL; + gchar *buf = NULL; size_t size; size = pst_attach_to_mem (&m->pst, attach, &buf); - camel_mime_part_set_content (part, (char*) buf, size, mimetype); + camel_mime_part_set_content (part, (gchar *) buf, size, mimetype); free(buf); } @@ -942,7 +942,7 @@ pst_process_email (PstImporter *m, pst_item *item) } static void -contact_set_string (EContact *contact, EContactField id, char *string) +contact_set_string (EContact *contact, EContactField id, gchar *string) { if (string != NULL) { e_contact_set (contact, id, string); @@ -950,7 +950,7 @@ contact_set_string (EContact *contact, EContactField id, char *string) } static void -unknown_field (EContact *contact, GString *notes, char *name, char *string) +unknown_field (EContact *contact, GString *notes, gchar *name, gchar *string) { /* Field could not be mapped directly so add to notes field */ if (string != NULL) { @@ -959,7 +959,7 @@ unknown_field (EContact *contact, GString *notes, char *name, char *string) } static void -contact_set_address (EContact *contact, EContactField id, char *address, char *city, char *country, char *po_box, char *postal_code, char *state, char *street) +contact_set_address (EContact *contact, EContactField id, gchar *address, gchar *city, gchar *country, gchar *po_box, gchar *postal_code, gchar *state, gchar *street) { EContactAddress *eaddress; @@ -1181,8 +1181,8 @@ get_ical_date (FILETIME *date, gboolean is_date) } } -char *rfc2445_datetime_format (FILETIME *ft) { - static char* buffer = NULL; +gchar *rfc2445_datetime_format (FILETIME *ft) { + static gchar * buffer = NULL; struct tm *stm = NULL; if (buffer == NULL) { @@ -1198,8 +1198,8 @@ static void set_cal_attachments (ECal *cal, ECalComponent *ec, PstImporter *m, pst_item_attach *attach) { GSList *list = NULL; - const char *uid; - char *store_dir; + const gchar *uid; + gchar *store_dir; if (attach == NULL) { return; @@ -1209,8 +1209,8 @@ set_cal_attachments (ECal *cal, ECalComponent *ec, PstImporter *m, pst_item_atta store_dir = g_filename_from_uri (e_cal_get_local_attachment_store (cal), NULL, NULL); while (attach != NULL) { - const char* orig_filename; - char *filename, *tmp, *path, *dirname, *uri; + const gchar * orig_filename; + gchar *filename, *tmp, *path, *dirname, *uri; CamelMimePart *part; CamelDataWrapper *content; CamelStream *stream; @@ -1292,7 +1292,7 @@ set_cal_attachments (ECal *cal, ECalComponent *ec, PstImporter *m, pst_item_atta } static void -fill_calcomponent (PstImporter *m, pst_item *item, ECalComponent *ec, const char *type) +fill_calcomponent (PstImporter *m, pst_item *item, ECalComponent *ec, const gchar *type) { pst_item_appointment *a; pst_item_email *e; @@ -1537,7 +1537,7 @@ pst_process_journal (PstImporter *m, pst_item *item) /* Print an error message - maybe later bring up an error dialog? */ static void -pst_error_msg (const char *fmt, ...) +pst_error_msg (const gchar *fmt, ...) { va_list ap; @@ -1580,11 +1580,11 @@ static MailMsgInfo pst_import_info = { }; static gboolean -pst_status_timeout (void *data) +pst_status_timeout (gpointer data) { PstImporter *importer = data; - int pc; - char *what; + gint pc; + gchar *what; if (importer->status_what) { g_mutex_lock (importer->status_lock); @@ -1600,7 +1600,7 @@ pst_status_timeout (void *data) } static void -pst_status (CamelOperation *op, const char *what, int pc, void *data) +pst_status (CamelOperation *op, const gchar *what, gint pc, gpointer data) { PstImporter *importer = data; @@ -1621,7 +1621,7 @@ static int pst_import (EImport *ei, EImportTarget *target) { PstImporter *m; - int id; + gint id; m = mail_msg_new (&pst_import_info); g_datalist_set_data (&target->data, "pst-msg", m); @@ -1675,8 +1675,8 @@ org_credativ_evolution_readpst_cancel (EImport *ei, EImportTarget *target, EImpo } } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { if (enable) { bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); @@ -1695,12 +1695,12 @@ e_plugin_lib_enable (EPluginLib *ep, int enable) * @param filename : path to file * @return 0 for sucess, -1 for failure */ -int +gint pst_init (pst_file *pst, gchar *filename) { #if 0 - char *d_log = "readpst.log"; + gchar *d_log = "readpst.log"; /* initialize log file */ DEBUG_INIT (d_log); DEBUG_REGISTER_CLOSE (); diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c index 943f0ed933..ad6e38e9f9 100644 --- a/plugins/publish-calendar/publish-calendar.c +++ b/plugins/publish-calendar/publish-calendar.c @@ -47,9 +47,9 @@ static gint online = 0; static GSList *error_queue = NULL; static GStaticMutex error_queue_lock = G_STATIC_MUTEX_INIT; static guint error_queue_show_idle_id = 0; -static void error_queue_add (char *descriptions, GError *error); +static void error_queue_add (gchar *descriptions, GError *error); -int e_plugin_lib_enable (EPlugin *ep, int enable); +gint e_plugin_lib_enable (EPlugin *ep, gint enable); void action_publish (EPlugin *ep, ECalMenuTargetSelect *t); void online_state_changed (EPlugin *ep, ESEventTargetState *target); void publish_calendar_context_activate (EPlugin *ep, ECalPopupTargetSource *target); @@ -233,14 +233,14 @@ ask_password (GMountOperation *op, const gchar *message, const gchar *default_us } static void -ask_question (GMountOperation *op, const char *message, const char *choices[]) +ask_question (GMountOperation *op, const gchar *message, const gchar *choices[]) { /* this has been stolen from file-chooser */ GtkWidget *dialog; - int cnt, len; - char *primary; - const char *secondary = NULL; - int res; + gint cnt, len; + gchar *primary; + const gchar *secondary = NULL; + gint res; primary = strstr (message, "\n"); if (primary) { @@ -452,7 +452,7 @@ url_list_changed (PublishUIData *ui) valid = gtk_tree_model_get_iter_first (model, &iter); while (valid) { EPublishUri *url; - char *xml; + gchar *xml; gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1); @@ -469,7 +469,7 @@ url_list_changed (PublishUIData *ui) static void url_list_enable_toggled (GtkCellRendererToggle *renderer, - const char *path_string, + const gchar *path_string, PublishUIData *ui) { GtkTreeSelection *selection; @@ -618,7 +618,7 @@ url_remove_clicked (GtkButton *button, PublishUIData *ui) gtk_widget_destroy (confirm); if (response == GTK_RESPONSE_YES) { - int len; + gint len; guint id; gtk_list_store_remove (GTK_LIST_STORE (model), &iter); @@ -685,7 +685,7 @@ publish_calendar_locations (EPlugin *epl, EConfigHookItemFactoryData *data) GSList *l; GtkTreeIter iter; GConfClient *client; - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_GLADEDIR, "publish-calendar.glade", @@ -806,8 +806,8 @@ publish_uris_set_timeout (GSList *uris) g_slist_free (uris); } -int -e_plugin_lib_enable (EPlugin *ep, int enable) +gint +e_plugin_lib_enable (EPlugin *ep, gint enable) { GSList *uris; GConfClient *client; @@ -831,7 +831,7 @@ e_plugin_lib_enable (EPlugin *ep, int enable) } struct eq_data { - char *description; + gchar *description; GError *error; }; @@ -899,7 +899,7 @@ error_queue_show_idle (gpointer user_data) } void -error_queue_add (char *description, GError *error) +error_queue_add (gchar *description, GError *error) { struct eq_data *data; diff --git a/plugins/publish-calendar/publish-format-fb.c b/plugins/publish-calendar/publish-format-fb.c index b28444458e..01b4e7a926 100644 --- a/plugins/publish-calendar/publish-format-fb.c +++ b/plugins/publish-calendar/publish-format-fb.c @@ -33,7 +33,7 @@ #include "publish-format-fb.h" static gboolean -write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, int dur_type, int dur_value, GError **error) +write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, gint dur_type, gint dur_value, GError **error) { ESource *source; ECal *client = NULL; @@ -41,7 +41,7 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, int icaltimezone *utc; time_t start = time(NULL), end; icalcomponent *top_level; - char *email = NULL; + gchar *email = NULL; GList *users = NULL; gboolean res = FALSE; @@ -83,7 +83,7 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, int top_level = e_cal_util_new_top_level (); if (e_cal_get_free_busy (client, users, start, end, &objects, error)) { - char *ical_string; + gchar *ical_string; while (objects) { ECalComponent *comp = objects->data; diff --git a/plugins/publish-calendar/publish-format-ical.c b/plugins/publish-calendar/publish-format-ical.c index 04e70ca8a8..f6e780daab 100644 --- a/plugins/publish-calendar/publish-format-ical.c +++ b/plugins/publish-calendar/publish-format-ical.c @@ -36,9 +36,9 @@ typedef struct { } CompTzData; static void -insert_tz_comps (icalparameter *param, void *cb_data) +insert_tz_comps (icalparameter *param, gpointer cb_data) { - const char *tzid; + const gchar *tzid; CompTzData *tdata = cb_data; icaltimezone *zone = NULL; icalcomponent *tzcomp; @@ -91,7 +91,7 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, GEr top_level = e_cal_util_new_top_level (); if (e_cal_get_object_list (client, "#t", &objects, error)) { - char *ical_string; + gchar *ical_string; CompTzData tdata; tdata.zones = g_hash_table_new (g_str_hash, g_str_equal); diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c index 71b82c8e07..98a8247725 100644 --- a/plugins/publish-calendar/publish-location.c +++ b/plugins/publish-calendar/publish-location.c @@ -54,12 +54,12 @@ migrateURI (const gchar *xml, xmlDocPtr doc) uri = g_new0 (EPublishUri, 1); root = doc->children; - location = xmlGetProp (root, (const unsigned char *)"location"); - enabled = xmlGetProp (root, (const unsigned char *)"enabled"); - frequency = xmlGetProp (root, (const unsigned char *)"frequency"); - username = xmlGetProp (root, (const unsigned char *)"username"); + location = xmlGetProp (root, (const guchar *)"location"); + enabled = xmlGetProp (root, (const guchar *)"enabled"); + frequency = xmlGetProp (root, (const guchar *)"frequency"); + username = xmlGetProp (root, (const guchar *)"username"); - euri = e_uri_new ((const char *)location); + euri = e_uri_new ((const gchar *)location); if (!euri) { g_warning ("Could not form the uri for %s \n", location); @@ -69,7 +69,7 @@ migrateURI (const gchar *xml, xmlDocPtr doc) if (euri->user) g_free (euri->user); - euri->user = g_strdup ((const char *)username); + euri->user = g_strdup ((const gchar *)username); temp = e_uri_to_string (euri, FALSE); uri->location = g_strdup_printf ("dav://%s", strstr (temp, "//") + 2); @@ -77,21 +77,21 @@ migrateURI (const gchar *xml, xmlDocPtr doc) e_uri_free (euri); if (enabled != NULL) - uri->enabled = atoi ((char *)enabled); + uri->enabled = atoi ((gchar *)enabled); if (frequency != NULL) - uri->publish_frequency = atoi ((char *)frequency); + uri->publish_frequency = atoi ((gchar *)frequency); uri->publish_format = URI_PUBLISH_AS_FB; - password = e_passwords_get_password ("Calendar", (char *)location); + password = e_passwords_get_password ("Calendar", (gchar *)location); if (password) { - e_passwords_forget_password ("Calendar", (char *)location); + e_passwords_forget_password ("Calendar", (gchar *)location); e_passwords_add_password (uri->location, password); e_passwords_remember_password ("Calendar", uri->location); } for (p = root->children; p != NULL; p = p->next) { - xmlChar *uid = xmlGetProp (p, (const unsigned char *)"uid"); - if (strcmp ((char *)p->name, "source") == 0) { + xmlChar *uid = xmlGetProp (p, (const guchar *)"uid"); + if (strcmp ((gchar *)p->name, "source") == 0) { events = g_slist_append (events, uid); } else { g_free (uid); @@ -125,15 +125,15 @@ e_publish_uri_from_xml (const gchar *xml) GSList *events = NULL; EPublishUri *uri; - doc = xmlParseDoc ((const unsigned char *)xml); + doc = xmlParseDoc ((const guchar *)xml); if (doc == NULL) return NULL; root = doc->children; - if (strcmp ((char *)root->name, "uri") != 0) + if (strcmp ((gchar *)root->name, "uri") != 0) return NULL; - if ((username = xmlGetProp (root, (const unsigned char *)"username"))) { + if ((username = xmlGetProp (root, (const guchar *)"username"))) { xmlFree (username); return migrateURI (xml, doc); @@ -141,27 +141,27 @@ e_publish_uri_from_xml (const gchar *xml) uri = g_new0 (EPublishUri, 1); - location = xmlGetProp (root, (const unsigned char *)"location"); - enabled = xmlGetProp (root, (const unsigned char *)"enabled"); - frequency = xmlGetProp (root, (const unsigned char *)"frequency"); - format = xmlGetProp (root, (const unsigned char *)"format"); - publish_time = xmlGetProp (root, (const unsigned char *)"publish_time"); + location = xmlGetProp (root, (const guchar *)"location"); + enabled = xmlGetProp (root, (const guchar *)"enabled"); + frequency = xmlGetProp (root, (const guchar *)"frequency"); + format = xmlGetProp (root, (const guchar *)"format"); + publish_time = xmlGetProp (root, (const guchar *)"publish_time"); fb_duration_value = xmlGetProp (root, (xmlChar *)"fb_duration_value"); fb_duration_type = xmlGetProp (root, (xmlChar *)"fb_duration_type"); if (location != NULL) - uri->location = (char *)location; + uri->location = (gchar *)location; if (enabled != NULL) - uri->enabled = atoi ((char *)enabled); + uri->enabled = atoi ((gchar *)enabled); if (frequency != NULL) - uri->publish_frequency = atoi ((char *)frequency); + uri->publish_frequency = atoi ((gchar *)frequency); if (format != NULL) - uri->publish_format = atoi ((char *)format); + uri->publish_format = atoi ((gchar *)format); if (publish_time != NULL) - uri->last_pub_time = (char *)publish_time; + uri->last_pub_time = (gchar *)publish_time; if (fb_duration_value) - uri->fb_duration_value = atoi ((char *)fb_duration_value); + uri->fb_duration_value = atoi ((gchar *)fb_duration_value); else uri->fb_duration_value = -1; @@ -170,9 +170,9 @@ e_publish_uri_from_xml (const gchar *xml) else if (uri->fb_duration_value > 100) uri->fb_duration_value = 100; - if (fb_duration_type && g_str_equal ((char *)fb_duration_type, "days")) + if (fb_duration_type && g_str_equal ((gchar *)fb_duration_type, "days")) uri->fb_duration_type = FB_DURATION_DAYS; - else if (fb_duration_type && g_str_equal ((char *)fb_duration_type, "months")) + else if (fb_duration_type && g_str_equal ((gchar *)fb_duration_type, "months")) uri->fb_duration_type = FB_DURATION_MONTHS; else uri->fb_duration_type = FB_DURATION_WEEKS; @@ -180,8 +180,8 @@ e_publish_uri_from_xml (const gchar *xml) uri->password = g_strdup (""); for (p = root->children; p != NULL; p = p->next) { - xmlChar *uid = xmlGetProp (p, (const unsigned char *)"uid"); - if (strcmp ((char *)p->name, "event") == 0) { + xmlChar *uid = xmlGetProp (p, (const guchar *)"uid"); + if (strcmp ((gchar *)p->name, "event") == 0) { events = g_slist_append (events, uid); } else { g_free (uid); @@ -207,23 +207,23 @@ e_publish_uri_to_xml (EPublishUri *uri) gchar *enabled, *frequency, *format; GSList *calendars = NULL; xmlChar *xml_buffer; - char *returned_buffer; - int xml_buffer_size; + gchar *returned_buffer; + gint xml_buffer_size; g_return_val_if_fail (uri != NULL, NULL); g_return_val_if_fail (uri->location != NULL, NULL); - doc = xmlNewDoc ((const unsigned char *)"1.0"); + doc = xmlNewDoc ((const guchar *)"1.0"); - root = xmlNewDocNode (doc, NULL, (const unsigned char *)"uri", NULL); + root = xmlNewDocNode (doc, NULL, (const guchar *)"uri", NULL); enabled = g_strdup_printf ("%d", uri->enabled); frequency = g_strdup_printf ("%d", uri->publish_frequency); format = g_strdup_printf ("%d", uri->publish_format); - xmlSetProp (root, (const unsigned char *)"location", (unsigned char *)uri->location); - xmlSetProp (root, (const unsigned char *)"enabled", (unsigned char *)enabled); - xmlSetProp (root, (const unsigned char *)"frequency", (unsigned char *)frequency); - xmlSetProp (root, (const unsigned char *)"format", (unsigned char *)format); - xmlSetProp (root, (const unsigned char *)"publish_time", (unsigned char *)uri->last_pub_time); + xmlSetProp (root, (const guchar *)"location", (guchar *)uri->location); + xmlSetProp (root, (const guchar *)"enabled", (guchar *)enabled); + xmlSetProp (root, (const guchar *)"frequency", (guchar *)frequency); + xmlSetProp (root, (const guchar *)"format", (guchar *)format); + xmlSetProp (root, (const guchar *)"publish_time", (guchar *)uri->last_pub_time); g_free (format); format = g_strdup_printf ("%d", uri->fb_duration_value); @@ -238,8 +238,8 @@ e_publish_uri_to_xml (EPublishUri *uri) for (calendars = uri->events; calendars != NULL; calendars = g_slist_next (calendars)) { xmlNodePtr node; - node = xmlNewChild (root, NULL, (const unsigned char *)"event", NULL); - xmlSetProp (node, (const unsigned char *)"uid", calendars->data); + node = xmlNewChild (root, NULL, (const guchar *)"event", NULL); + xmlSetProp (node, (const guchar *)"uid", calendars->data); } xmlDocSetRootElement (doc, root); diff --git a/plugins/publish-calendar/publish-location.h b/plugins/publish-calendar/publish-location.h index a6afc2c272..a55d432a8e 100644 --- a/plugins/publish-calendar/publish-location.h +++ b/plugins/publish-calendar/publish-location.h @@ -34,7 +34,7 @@ enum publish_frequency { URI_PUBLISH_MANUAL }; -static const int publish_frequency_type_map[] = { +static const gint publish_frequency_type_map[] = { URI_PUBLISH_DAILY, URI_PUBLISH_WEEKLY, URI_PUBLISH_MANUAL, @@ -46,7 +46,7 @@ enum publish_format { URI_PUBLISH_AS_FB }; -static const int publish_format_type_mask[] = { +static const gint publish_format_type_mask[] = { URI_PUBLISH_AS_ICAL, URI_PUBLISH_AS_FB, -1 @@ -67,8 +67,8 @@ struct _EPublishUri { gchar *password; GSList *events; gchar *last_pub_time; - int fb_duration_value; - int fb_duration_type; + gint fb_duration_value; + gint fb_duration_type; gint service_type; }; diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c index 08e59513e8..7456d4b193 100644 --- a/plugins/publish-calendar/url-editor-dialog.c +++ b/plugins/publish-calendar/url-editor-dialog.c @@ -43,7 +43,7 @@ create_uri (UrlEditorDialog *dialog) uri->location = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->server_entry))); } else { const gchar *method; - char *server, *file, *port, *username, *password; + gchar *server, *file, *port, *username, *password; server = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->server_entry))); file = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->file_entry))); @@ -279,7 +279,7 @@ static void set_from_uri (UrlEditorDialog *dialog) { EPublishUri *uri; - char *method; + gchar *method; EUri *euri = NULL; uri = dialog->uri; @@ -287,17 +287,17 @@ set_from_uri (UrlEditorDialog *dialog) euri = e_uri_new (uri->location); /* determine our method */ method = euri->protocol; - if (strcmp ((const char *)method, "smb") == 0) + if (strcmp ((const gchar *)method, "smb") == 0) uri->service_type = TYPE_SMB; - else if (strcmp ((const char *)method, "sftp") == 0) + else if (strcmp ((const gchar *)method, "sftp") == 0) uri->service_type = TYPE_SFTP; - else if (strcmp ((const char *)method, "ftp") == 0) + else if (strcmp ((const gchar *)method, "ftp") == 0) /* we set TYPE_FTP here for now. if we don't find a * username later, we'll change it to TYPE_ANON_FTP */ uri->service_type = TYPE_FTP; - else if (strcmp ((const char *)method, "dav") == 0) + else if (strcmp ((const gchar *)method, "dav") == 0) uri->service_type = TYPE_DAV; - else if (strcmp ((const char *)method, "davs") == 0) + else if (strcmp ((const gchar *)method, "davs") == 0) uri->service_type = TYPE_DAVS; else uri->service_type = TYPE_URI; @@ -309,7 +309,7 @@ set_from_uri (UrlEditorDialog *dialog) gtk_entry_set_text (GTK_ENTRY (dialog->server_entry), euri->host); if (euri->port) { - char *port; + gchar *port; port = g_strdup_printf ("%d", euri->port); gtk_entry_set_text (GTK_ENTRY (dialog->port_entry), port); g_free (port); @@ -331,7 +331,7 @@ url_editor_dialog_construct (UrlEditorDialog *dialog) GConfClient *gconf; GtkSizeGroup *group; EPublishUri *uri; - char *gladefile; + gchar *gladefile; gconf = gconf_client_get_default (); diff --git a/plugins/python/python-plugin-loader.c b/plugins/python/python-plugin-loader.c index ea9ab4bfb0..4d7ead37da 100644 --- a/plugins/python/python-plugin-loader.c +++ b/plugins/python/python-plugin-loader.c @@ -28,7 +28,7 @@ #define d(x) -static void *epp_parent_class; +static gpointer epp_parent_class; typedef struct _EPluginPythonPrivate { PyObject *pModule; @@ -40,13 +40,13 @@ typedef struct _EPluginPythonPrivate { #define epp ((EPluginPython *)ep) -void * load_plugin_type_register_function (void *a, void *b); +gpointer load_plugin_type_register_function (gpointer a, gpointer b); -static char * -get_xml_prop(xmlNodePtr node, const char *id) +static gchar * +get_xml_prop(xmlNodePtr node, const gchar *id) { - char *p = xmlGetProp(node, id); - char *out = NULL; + gchar *p = xmlGetProp(node, id); + gchar *out = NULL; if (p) { out = g_strdup(p); @@ -56,8 +56,8 @@ get_xml_prop(xmlNodePtr node, const char *id) return out; } -static void * -epp_invoke(EPlugin *ep, const char *name, void *data) +static gpointer +epp_invoke(EPlugin *ep, const gchar *name, gpointer data) { EPluginPythonPrivate *p = epp->priv; PyObject *pModuleName, *pFunc; @@ -168,8 +168,8 @@ epp_init(GObject *o) (GDestroyNotify) NULL); } -void * -load_plugin_type_register_function (void *a, void *b) +gpointer +load_plugin_type_register_function (gpointer a, gpointer b) { static GType type = 0; diff --git a/plugins/python/python-plugin-loader.h b/plugins/python/python-plugin-loader.h index 4f9656e119..4f31ddd5a7 100644 --- a/plugins/python/python-plugin-loader.h +++ b/plugins/python/python-plugin-loader.h @@ -33,16 +33,16 @@ struct _EPluginPython { struct _EPluginPythonPrivate *priv; - char *location; /* location */ - char *pClass; /* handler class */ - char *module_name; + gchar *location; /* location */ + gchar *pClass; /* handler class */ + gchar *module_name; }; struct _EPluginPythonClass { EPluginClass plugin_class; }; -void *org_gnome_evolution_python_get_type(void *a, void *b); +gpointer org_gnome_evolution_python_get_type(gpointer a, gpointer b); #endif /* ! _ORG_GNOME_EVOLUTION_PYTHON_H */ diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c index 8846e8b4be..3c92b386ae 100644 --- a/plugins/sa-junk-plugin/em-junk-filter.c +++ b/plugins/sa-junk-plugin/em-junk-filter.c @@ -58,12 +58,12 @@ static pthread_mutex_t em_junk_sa_report_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t em_junk_sa_preferred_socket_path_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t em_junk_sa_spamd_restart_lock = PTHREAD_MUTEX_INITIALIZER; -int e_plugin_lib_enable (EPluginLib *ep, int enable); +gint e_plugin_lib_enable (EPluginLib *ep, gint enable); gboolean em_junk_sa_check_junk (EPlugin *ep, EMJunkHookTarget *target); void em_junk_sa_report_junk (EPlugin *ep, EMJunkHookTarget *target); void em_junk_sa_report_non_junk (EPlugin *ep, EMJunkHookTarget *target); void em_junk_sa_commit_reports (EPlugin *ep); -void *em_junk_sa_validate_binary (EPlugin *ep); +gpointer em_junk_sa_validate_binary (EPlugin *ep); GtkWidget *org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data); static void em_junk_sa_init (void); @@ -79,41 +79,41 @@ static gboolean em_junk_sa_system_spamd_available = FALSE; static gboolean em_junk_sa_new_daemon_started = FALSE; static gboolean em_junk_sa_checked_spamassassin_version = FALSE; static guint em_junk_sa_spamassassin_version = 0; -static char *em_junk_sa_socket_path = NULL; -static char *em_junk_sa_spamd_pidfile = NULL; +static gchar *em_junk_sa_socket_path = NULL; +static gchar *em_junk_sa_spamd_pidfile = NULL; static const gchar *em_junk_sa_spamc_binary = NULL; static GConfClient *em_junk_sa_gconf = NULL; /* volatile so not cached between threads */ static volatile gboolean em_junk_sa_local_only; static volatile gboolean em_junk_sa_use_daemon; -static char * em_junk_sa_preferred_socket_path; +static gchar * em_junk_sa_preferred_socket_path; static const gchar *em_junk_sa_spamc_binaries [4] = {"spamc", "/usr/bin/spamc", "/usr/sbin/spamc", NULL}; static const gchar *em_junk_sa_spamd_binaries [4] = {"spamd", "/usr/bin/spamd", "/usr/sbin/spamd", NULL}; #define SPAMD_RESTARTS_SIZE 8 static time_t em_junk_sa_spamd_restarts [SPAMD_RESTARTS_SIZE] = {0, 0, 0, 0, 0, 0, 0, 0}; -static int em_junk_sa_spamd_restarts_count = 0; +static gint em_junk_sa_spamd_restarts_count = 0; /* Variables to indicate whether spamd is running with --allow-tell */ -static int no_allow_tell; +static gint no_allow_tell; static gboolean em_junk_sa_allow_tell_tested = FALSE; -char *em_junk_sa_spamc_gconf_binary = NULL; -char *em_junk_sa_spamd_gconf_binary = NULL; +gchar *em_junk_sa_spamc_gconf_binary = NULL; +gchar *em_junk_sa_spamd_gconf_binary = NULL; static int -pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, int rv_err, int wait_for_termination, GByteArray *output_buffer, GError **error) +pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gint rv_err, gint wait_for_termination, GByteArray *output_buffer, GError **error) { - int result, status, errnosav, fds[2], out_fds[2]; + gint result, status, errnosav, fds[2], out_fds[2]; CamelStream *stream; - char *program; + gchar *program; pid_t pid; if (camel_debug_start ("junk")) { - int i; + gint i; printf ("pipe_to_sa "); for (i = 0; argv[i]; i++) @@ -150,7 +150,7 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, int if (!(pid = fork ())) { /* child process */ - int maxfd, fd, nullfd; + gint maxfd, fd, nullfd; nullfd = open ("/dev/null", O_WRONLY); @@ -212,13 +212,13 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, int camel_stream_write_to_stream (stream, (CamelStream *) memstream); camel_object_unref (stream); - g_byte_array_append (output_buffer, (unsigned char *)"", 1); + g_byte_array_append (output_buffer, (guchar *)"", 1); d(printf ("child process output: %s len: %d\n", output_buffer->data, output_buffer->len)); } if (wait_for_termination) { - int res; + gint res; d(printf ("wait for child %d termination\n", pid)); result = waitpid (pid, &status, 0); @@ -259,7 +259,7 @@ pipe_to_sa (CamelMimeMessage *msg, const gchar *in, const gchar **argv, GError * return pipe_to_sa_full (msg, in, argv, -1, 1, NULL, error); } -static char * +static gchar * em_junk_sa_get_socket_path () { if (em_junk_sa_preferred_socket_path) @@ -272,7 +272,7 @@ static gboolean em_junk_sa_test_spamd_running (const gchar *binary, gboolean system) { const gchar *argv[5]; - int i = 0; + gint i = 0; gboolean rv; pthread_mutex_lock (&em_junk_sa_preferred_socket_path_lock); @@ -341,7 +341,7 @@ static gboolean em_junk_sa_run_spamd (const gchar *binary) { const gchar *argv[8]; - int i; + gint i; gboolean rv = FALSE; pthread_mutex_lock (&em_junk_sa_preferred_socket_path_lock); @@ -395,7 +395,7 @@ em_junk_sa_run_spamd (const gchar *binary) static void em_junk_sa_start_own_daemon () { - int b; + gint b; em_junk_sa_new_daemon_started = FALSE; @@ -415,7 +415,7 @@ static void em_junk_sa_find_spamc () { if (em_junk_sa_use_spamc && em_junk_sa_new_daemon_started) { - int b; + gint b; em_junk_sa_use_spamc = FALSE; for (b = 0; em_junk_sa_spamc_binaries [b]; b ++) { @@ -432,7 +432,7 @@ static void em_junk_sa_test_spamd (void) { const gchar *argv[4]; - int i, b; + gint i, b; gboolean try_system_spamd = TRUE; if (em_junk_sa_spamc_gconf_binary) { @@ -578,8 +578,8 @@ em_junk_sa_check_junk(EPlugin *ep, EMJunkHookTarget *target) { GByteArray *out = NULL; const gchar *argv[7]; - char *to_free = NULL; - int i = 0, socket_i; + gchar *to_free = NULL; + gint i = 0, socket_i; gboolean rv; CamelMimeMessage *msg = target->m; @@ -613,7 +613,7 @@ em_junk_sa_check_junk(EPlugin *ep, EMJunkHookTarget *target) rv = pipe_to_sa_full (msg, NULL, argv, 0, 1, out, &target->error) != 0; - if (!rv && out && out->data && !strcmp ((const char *)out->data, "0/0\n")) { + if (!rv && out && out->data && !strcmp ((const gchar *)out->data, "0/0\n")) { /* an error occurred */ if (em_junk_sa_respawn_spamd ()) { g_byte_array_set_size (out, 0); @@ -643,7 +643,7 @@ static guint get_spamassassin_version () { GByteArray *out = NULL; - int i; + gint i; const gchar *argv[3] = { "sa-learn", @@ -721,7 +721,7 @@ em_junk_sa_report_junk (EPlugin *ep, EMJunkHookTarget *target) void em_junk_sa_report_non_junk (EPlugin *ep, EMJunkHookTarget *target) { - const char *sync_op = + const gchar *sync_op = (get_spamassassin_version () >= 3) ? "--no-sync": "--no-rebuild"; const gchar *argv[6] = { @@ -783,17 +783,17 @@ em_junk_sa_commit_reports (EPlugin *ep) } } -void * +gpointer em_junk_sa_validate_binary (EPlugin *ep) { - return em_junk_sa_is_available (NULL) ? (void *) "1" : NULL; + return em_junk_sa_is_available (NULL) ? (gpointer) "1" : NULL; } static void -em_junk_sa_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, void *data) +em_junk_sa_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointer data) { GConfValue *value; - char *tkey; + gchar *tkey; g_return_if_fail (gconf_entry_get_key (entry) != NULL); @@ -815,8 +815,8 @@ em_junk_sa_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, } } -int -e_plugin_lib_enable (EPluginLib *ep, int enable) +gint +e_plugin_lib_enable (EPluginLib *ep, gint enable) { em_junk_sa_init(); @@ -862,15 +862,15 @@ em_junk_sa_kill_spamd (void) pthread_mutex_unlock (&em_junk_sa_preferred_socket_path_lock); if (em_junk_sa_new_daemon_started) { - int fd = open (em_junk_sa_spamd_pidfile, O_RDONLY); + gint fd = open (em_junk_sa_spamd_pidfile, O_RDONLY); if (fd != -1) { - char pid_str [16]; - int bytes; + gchar pid_str [16]; + gint bytes; bytes = read (fd, pid_str, 15); if (bytes > 0) { - int pid; + gint pid; pid_str [bytes] = 0; pid = atoi (pid_str); @@ -907,7 +907,7 @@ GtkWidget * org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data) { GtkWidget *check, *vbox, *label; - char *text = g_strdup_printf (" <small>%s</small>", _("This will make SpamAssassin more reliable, but slower")); + gchar *text = g_strdup_printf (" <small>%s</small>", _("This will make SpamAssassin more reliable, but slower")); guint i = ((GtkTable *)data->parent)->nrows; if (data->old) diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c index 2f9c92d6f7..4e59b80edd 100644 --- a/plugins/save-calendar/csv-format.c +++ b/plugins/save-calendar/csv-format.c @@ -47,7 +47,7 @@ struct _CsvConfig { gboolean header; }; -static gboolean string_needsquotes (const char *value, CsvConfig *config); +static gboolean string_needsquotes (const gchar *value, CsvConfig *config); typedef struct _CsvPluginData CsvPluginData; struct _CsvPluginData @@ -93,7 +93,7 @@ add_list_to_csv (GString *line, GSList *list_in, CsvConfig *config, gint type) GString *tmp = NULL; gint cnt=0; while (list) { - const char *str = NULL; + const gchar *str = NULL; if (cnt == 0) tmp = g_string_new (""); if (cnt > 0) @@ -113,7 +113,7 @@ add_list_to_csv (GString *line, GSList *list_in, CsvConfig *config, gint type) if (!needquotes) needquotes = string_needsquotes (str, config); if (str) - tmp = g_string_append (tmp, (const gchar*)str); + tmp = g_string_append (tmp, (const gchar *)str); list = g_slist_next (list); cnt++; if (list) tmp = g_string_append (tmp, config->delimiter); @@ -154,7 +154,7 @@ add_time_to_csv (GString *line, icaltimetype *time, CsvConfig *config) if (time) { gboolean needquotes = FALSE; struct tm mytm = icaltimetype_to_tm (time); - gchar *str = (gchar*) g_malloc (sizeof (gchar) * 200); + gchar *str = (gchar *) g_malloc (sizeof (gchar) * 200); /* * Translator: the %F %T is the thirth argument for a strftime function. @@ -182,7 +182,7 @@ add_time_to_csv (GString *line, icaltimetype *time, CsvConfig *config) } static gboolean -string_needsquotes (const char *value, CsvConfig *config) +string_needsquotes (const gchar *value, CsvConfig *config) { /* This is the actual need for quotes-checker */ @@ -243,7 +243,7 @@ string_needsquotes (const char *value, CsvConfig *config) } static GString * -add_string_to_csv (GString *line, const char *value, CsvConfig *config) +add_string_to_csv (GString *line, const gchar *value, CsvConfig *config) { /* Will add a string to the record and will check for the need for quotes */ @@ -252,7 +252,7 @@ add_string_to_csv (GString *line, const char *value, CsvConfig *config) if (needquotes) line = g_string_append (line, config->quote); - line = g_string_append (line, (const gchar*)value); + line = g_string_append (line, (const gchar *)value); if (needquotes) line = g_string_append (line, config->quote); } @@ -303,7 +303,7 @@ userstring_to_systemstring (const gchar *userstring) } static void -do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri) +do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri) { /* @@ -393,11 +393,11 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource while (objects != NULL) { ECalComponent *comp = objects->data; gchar *delimiter_temp = NULL; - const char *temp_constchar; + const gchar *temp_constchar; GSList *temp_list; ECalComponentDateTime temp_dt; struct icaltimetype *temp_time; - int *temp_int; + gint *temp_int; ECalComponentText temp_comptext; line = g_string_new (""); diff --git a/plugins/save-calendar/format-handler.h b/plugins/save-calendar/format-handler.h index a7bc2e8d85..f9e15dc771 100644 --- a/plugins/save-calendar/format-handler.h +++ b/plugins/save-calendar/format-handler.h @@ -43,11 +43,11 @@ struct _FormatHandler gpointer data; - void (*save) (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri); + void (*save) (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri); }; FormatHandler *csv_format_handler_new (void); FormatHandler *ical_format_handler_new (void); FormatHandler *rdf_format_handler_new (void); -GOutputStream *open_for_writing (GtkWindow *parent, const char *uri, GError **error); +GOutputStream *open_for_writing (GtkWindow *parent, const gchar *uri, GError **error); diff --git a/plugins/save-calendar/ical-format.c b/plugins/save-calendar/ical-format.c index f538a9e0a1..3b54176284 100644 --- a/plugins/save-calendar/ical-format.c +++ b/plugins/save-calendar/ical-format.c @@ -39,7 +39,7 @@ #include "e-util/e-error.h" static void -display_error_message (GtkWidget *parent, const char *message) +display_error_message (GtkWidget *parent, const gchar *message) { GtkWidget *dialog; @@ -54,9 +54,9 @@ typedef struct { } CompTzData; static void -insert_tz_comps (icalparameter *param, void *cb_data) +insert_tz_comps (icalparameter *param, gpointer cb_data) { - const char *tzid; + const gchar *tzid; CompTzData *tdata = cb_data; icaltimezone *zone = NULL; icalcomponent *tzcomp; @@ -84,7 +84,7 @@ append_tz_to_comp (gpointer key, gpointer value, icalcomponent *toplevel) } static void -do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri) +do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri) { ESource *primary_source; ECal *source_client; @@ -136,7 +136,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error); if (stream) { - char *ical_str = icalcomponent_as_ical_string_r (top_level); + gchar *ical_str = icalcomponent_as_ical_string_r (top_level); g_output_stream_write_all (stream, ical_str, strlen (ical_str), NULL, NULL, &error); g_output_stream_close (stream, NULL, NULL); diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c index 9c9f864a2a..685fbdd6e5 100644 --- a/plugins/save-calendar/rdf-format.c +++ b/plugins/save-calendar/rdf-format.c @@ -45,7 +45,7 @@ #include "format-handler.h" static void -add_string_to_rdf (xmlNodePtr node, const gchar *tag, const char *value); +add_string_to_rdf (xmlNodePtr node, const gchar *tag, const gchar *value); /* Use { */ @@ -100,7 +100,7 @@ add_list_to_rdf (xmlNodePtr node, const gchar *tag, GSList *list_in, gint type) GSList *list = list_in; while (list) { - const char *str = NULL; + const gchar *str = NULL; switch (type) { case ECALCOMPONENTATTENDEE: @@ -127,8 +127,8 @@ add_nummeric_to_rdf (xmlNodePtr node, const gchar *tag, gint *nummeric) { if (nummeric) { gchar *value = g_strdup_printf ("%d", *nummeric); - xmlNodePtr cur_node = xmlNewChild (node, NULL, (unsigned char *)tag, (unsigned char *)value); - xmlSetProp (cur_node, (const unsigned char *)"rdf:datatype", (const unsigned char *)"http://www.w3.org/2001/XMLSchema#integer"); + xmlNodePtr cur_node = xmlNewChild (node, NULL, (guchar *)tag, (guchar *)value); + xmlSetProp (cur_node, (const guchar *)"rdf:datatype", (const guchar *)"http://www.w3.org/2001/XMLSchema#integer"); g_free (value); } } @@ -139,7 +139,7 @@ add_time_to_rdf (xmlNodePtr node, const gchar *tag, icaltimetype *time) if (time) { xmlNodePtr cur_node = NULL; struct tm mytm = icaltimetype_to_tm (time); - gchar *str = (gchar*) g_malloc (sizeof (gchar) * 200); + gchar *str = (gchar *) g_malloc (sizeof (gchar) * 200); gchar *tmp = NULL; gchar *timezone; /* @@ -149,12 +149,12 @@ add_time_to_rdf (xmlNodePtr node, const gchar *tag, icaltimetype *time) * */ e_utf8_strftime (str, 200, _("%FT%T"), &mytm); - cur_node = xmlNewChild (node, NULL, (unsigned char *)tag, (unsigned char *)str); + cur_node = xmlNewChild (node, NULL, (guchar *)tag, (guchar *)str); /* Not sure about this property */ timezone = calendar_config_get_timezone (); tmp = g_strdup_printf ("http://www.w3.org/2002/12/cal/tzd/%s#tz", timezone); - xmlSetProp (cur_node, (const unsigned char *)"rdf:datatype", (unsigned char *)tmp); + xmlSetProp (cur_node, (const guchar *)"rdf:datatype", (guchar *)tmp); g_free (tmp); g_free (timezone); g_free (str); @@ -163,12 +163,12 @@ add_time_to_rdf (xmlNodePtr node, const gchar *tag, icaltimetype *time) static void -add_string_to_rdf (xmlNodePtr node, const gchar *tag, const char *value) +add_string_to_rdf (xmlNodePtr node, const gchar *tag, const gchar *value) { if (value) { xmlNodePtr cur_node = NULL; - cur_node = xmlNewChild (node, NULL, (unsigned char *)tag, (unsigned char *)value); - xmlSetProp (cur_node, (const unsigned char *)"rdf:datatype", (const unsigned char *)"http://www.w3.org/2001/XMLSchema#string"); + cur_node = xmlNewChild (node, NULL, (guchar *)tag, (guchar *)value); + xmlSetProp (cur_node, (const guchar *)"rdf:datatype", (const guchar *)"http://www.w3.org/2001/XMLSchema#string"); } } @@ -176,7 +176,7 @@ add_string_to_rdf (xmlNodePtr node, const gchar *tag, const char *value) static void -do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri) +do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri) { /* @@ -216,51 +216,51 @@ do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource xmlDocPtr doc = xmlNewDoc((xmlChar *) "1.0"); xmlNodePtr fnode = doc->children; - doc->children = xmlNewDocNode (doc, NULL, (const unsigned char *)"rdf:RDF", NULL); - xmlSetProp (doc->children, (const unsigned char *)"xmlns:rdf", (const unsigned char *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"); - xmlSetProp (doc->children, (const unsigned char *)"xmlns", (const unsigned char *)"http://www.w3.org/2002/12/cal/ical#"); + doc->children = xmlNewDocNode (doc, NULL, (const guchar *)"rdf:RDF", NULL); + xmlSetProp (doc->children, (const guchar *)"xmlns:rdf", (const guchar *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"); + xmlSetProp (doc->children, (const guchar *)"xmlns", (const guchar *)"http://www.w3.org/2002/12/cal/ical#"); - fnode = xmlNewChild (doc->children, NULL, (const unsigned char *)"Vcalendar", NULL); + fnode = xmlNewChild (doc->children, NULL, (const guchar *)"Vcalendar", NULL); /* Should Evolution publicise these? */ - xmlSetProp (fnode, (const unsigned char *)"xmlns:x-wr", (const unsigned char *)"http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#"); - xmlSetProp (fnode, (const unsigned char *)"xmlns:x-lic", (const unsigned char *)"http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#"); + xmlSetProp (fnode, (const guchar *)"xmlns:x-wr", (const guchar *)"http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#"); + xmlSetProp (fnode, (const guchar *)"xmlns:x-lic", (const guchar *)"http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#"); /* Not sure if it's correct like this */ - xmlNewChild (fnode, NULL, (const unsigned char *)"prodid", (const unsigned char *)"-//" PACKAGE_STRING "//iCal 1.0//EN"); + xmlNewChild (fnode, NULL, (const guchar *)"prodid", (const guchar *)"-//" PACKAGE_STRING "//iCal 1.0//EN"); /* Assuming GREGORIAN is the only supported calendar scale */ - xmlNewChild (fnode, NULL, (const unsigned char *)"calscale", (const unsigned char *)"GREGORIAN"); + xmlNewChild (fnode, NULL, (const guchar *)"calscale", (const guchar *)"GREGORIAN"); temp = calendar_config_get_timezone (); - xmlNewChild (fnode, NULL, (const unsigned char *)"x-wr:timezone", (unsigned char *)temp); + xmlNewChild (fnode, NULL, (const guchar *)"x-wr:timezone", (guchar *)temp); g_free (temp); - xmlNewChild (fnode, NULL, (const unsigned char *)"method", (const unsigned char *)"PUBLISH"); + xmlNewChild (fnode, NULL, (const guchar *)"method", (const guchar *)"PUBLISH"); - xmlNewChild (fnode, NULL, (const unsigned char *)"x-wr:relcalid", (unsigned char *)e_source_peek_uid (primary_source)); + xmlNewChild (fnode, NULL, (const guchar *)"x-wr:relcalid", (guchar *)e_source_peek_uid (primary_source)); - xmlNewChild (fnode, NULL, (const unsigned char *)"x-wr:calname", (unsigned char *)e_source_peek_name (primary_source)); + xmlNewChild (fnode, NULL, (const guchar *)"x-wr:calname", (guchar *)e_source_peek_name (primary_source)); /* Version of this RDF-format */ - xmlNewChild (fnode, NULL, (const unsigned char *)"version", (const unsigned char *)"2.0"); + xmlNewChild (fnode, NULL, (const guchar *)"version", (const guchar *)"2.0"); while (objects != NULL) { ECalComponent *comp = objects->data; - const char *temp_constchar; + const gchar *temp_constchar; gchar *tmp_str = NULL; GSList *temp_list; ECalComponentDateTime temp_dt; struct icaltimetype *temp_time; - int *temp_int; + gint *temp_int; ECalComponentText temp_comptext; - xmlNodePtr c_node = xmlNewChild (fnode, NULL, (const unsigned char *)"component", NULL); - xmlNodePtr node = xmlNewChild (c_node, NULL, (const unsigned char *)"Vevent", NULL); + xmlNodePtr c_node = xmlNewChild (fnode, NULL, (const guchar *)"component", NULL); + xmlNodePtr node = xmlNewChild (c_node, NULL, (const guchar *)"Vevent", NULL); /* Getting the stuff */ e_cal_component_get_uid (comp, &temp_constchar); tmp_str = g_strdup_printf ("#%s", temp_constchar); - xmlSetProp (node, (const unsigned char *)"about", (unsigned char *)tmp_str); + xmlSetProp (node, (const guchar *)"about", (guchar *)tmp_str); g_free (tmp_str); add_string_to_rdf (node, "uid",temp_constchar); diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c index e461821242..c63c1dab2b 100644 --- a/plugins/save-calendar/save-calendar.c +++ b/plugins/save-calendar/save-calendar.c @@ -109,7 +109,7 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource GtkListStore *store = GTK_LIST_STORE (model); GtkTreeIter iter; GtkWidget *dialog = NULL; - char *dest_uri = NULL; + gchar *dest_uri = NULL; GList *format_handlers = NULL; @@ -173,7 +173,7 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { - char *tmp = NULL; + gchar *tmp = NULL; gtk_combo_box_get_active_iter (combo, &iter); gtk_tree_model_get (model, &iter, @@ -186,7 +186,7 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource if (!(tmp && *(tmp + strlen (handler->filename_ext)) == '\0')) { - char *temp; + gchar *temp; temp = g_strconcat (dest_uri, handler->filename_ext, NULL); g_free (dest_uri); dest_uri = temp; @@ -210,7 +210,7 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource It will ask for overwrite if file already exists. */ GOutputStream * -open_for_writing (GtkWindow *parent, const char *uri, GError **error) +open_for_writing (GtkWindow *parent, const gchar *uri, GError **error) { GFile *file; GFileOutputStream *fostream; diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c index 71fb4d4ff1..cc8168159b 100644 --- a/plugins/startup-wizard/startup-wizard.c +++ b/plugins/startup-wizard/startup-wizard.c @@ -101,7 +101,7 @@ startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data { GtkWidget *page, *label, *sep, *table; GSList *l; - int row=0; + gint row=0; if (import == NULL) { import = e_import_new("org.gnome.evolution.shell.importer"); @@ -123,7 +123,7 @@ startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data table = gtk_table_new(g_slist_length(import_importers), 2, FALSE); for (l = import_importers; l; l = l->next) { EImportImporter *eii = l->data; - char *str; + gchar *str; /* *label already declared */ GtkWidget *w, *label; @@ -150,21 +150,21 @@ startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data } static void -import_status(EImport *import, const char *what, int pc, void *d) +import_status(EImport *import, const gchar *what, gint pc, gpointer d) { gtk_progress_bar_set_fraction((GtkProgressBar *)import_progress, (gfloat)(pc/100.0)); gtk_progress_bar_set_text((GtkProgressBar *)import_progress, what); } static void -import_dialog_response(GtkDialog *d, guint button, void *data) +import_dialog_response(GtkDialog *d, guint button, gpointer data) { if (button == GTK_RESPONSE_CANCEL) e_import_cancel(import, (EImportTarget *)import_target, import_importer); } static void -import_done(EImport *ei, void *d) +import_done(EImport *ei, gpointer d) { if (import_iterator && (import_iterator = import_iterator->next)) { import_status(ei, "", 0, NULL); @@ -188,7 +188,7 @@ import_done(EImport *ei, void *d) void startup_wizard_commit (EPlugin *ep, EMConfigTargetAccount *target) { - char *location; + gchar *location; /* Use System Timezone by default */ calendar_config_set_use_system_timezone (TRUE); diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c index a871399754..b0de28ad49 100644 --- a/plugins/templates/templates.c +++ b/plugins/templates/templates.c @@ -68,11 +68,11 @@ typedef struct { EMPopupTargetSelect *t; } UserData; -static char* get_content (CamelMimeMessage *message); +static gchar * get_content (CamelMimeMessage *message); -static void reply_with_template (EPopup *ep, EPopupItem *item, void *data); +static void reply_with_template (EPopup *ep, EPopupItem *item, gpointer data); -static void popup_free (EPopup *ep, GSList *l, void *data); +static void popup_free (EPopup *ep, GSList *l, gpointer data); static GSList *fill_submenu (CamelStore *store, CamelFolderInfo *info, @@ -143,8 +143,8 @@ commit_changes (UIData *ui) valid = gtk_tree_model_get_iter_first (model, &iter); while (valid) { - char *keyword, *value; - char *key; + gchar *keyword, *value; + gchar *key; gtk_tree_model_get (model, &iter, CLUE_KEYWORD_COLUMN, &keyword, -1); gtk_tree_model_get (model, &iter, CLUE_VALUE_COLUMN, &value, -1); @@ -168,7 +168,7 @@ static void clue_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, UIData *ui) { GtkTreeSelection *selection; - char *keyword = NULL; + gchar *keyword = NULL; gboolean valid; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview)); @@ -201,7 +201,7 @@ clue_foreach_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter valid = gtk_tree_model_get_iter_first (model, iter); while (valid && gtk_list_store_iter_is_valid (ui->store, iter)) { - char *keyword = NULL; + gchar *keyword = NULL; gtk_tree_model_get (model, iter, CLUE_KEYWORD_COLUMN, &keyword, -1); /* Check if the keyword is not empty and then emit the row-changed signal (if we delete the row, then the iter gets corrupted) */ @@ -223,7 +223,7 @@ key_cell_edited_callback (GtkCellRendererText *cell, { GtkTreeModel *model; GtkTreeIter iter; - char *value; + gchar *value; model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview)); @@ -244,7 +244,7 @@ value_cell_edited_callback (GtkCellRendererText *cell, { GtkTreeModel *model; GtkTreeIter iter; - char *keyword; + gchar *keyword; model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview)); @@ -370,7 +370,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl) UIData *ui = g_new0 (UIData, 1); - char *gladefile; + gchar *gladefile; gladefile = g_build_filename (EVOLUTION_PLUGINDIR, "templates.glade", @@ -421,7 +421,7 @@ e_plugin_lib_get_configure_widget (EPlugin *epl) clue_list = gconf_client_get_list ( gconf, GCONF_KEY_TEMPLATE_PLACEHOLDERS, GCONF_VALUE_STRING, NULL ); for (list = clue_list; list; list = g_slist_next (list)) { - char **temp = g_strsplit (list->data, "=", 2); + gchar **temp = g_strsplit (list->data, "=", 2); gtk_list_store_append (ui->store, &iter); gtk_list_store_set (ui->store, &iter, CLUE_KEYWORD_COLUMN, temp[0], CLUE_VALUE_COLUMN, temp[1], -1); g_strfreev(temp); @@ -445,14 +445,14 @@ e_plugin_lib_get_configure_widget (EPlugin *epl) } /* borrowed from plugins/mail-to-task/ */ -static char * +static gchar * get_content (CamelMimeMessage *message) { CamelDataWrapper *content; CamelStream *mem; CamelContentType *type; CamelMimePart *mime_part = CAMEL_MIME_PART (message); - char *str, *convert_str = NULL; + gchar *str, *convert_str = NULL; gsize bytes_read, bytes_written; gint count = 2; @@ -477,7 +477,7 @@ get_content (CamelMimeMessage *message) mem = camel_stream_mem_new (); camel_data_wrapper_decode_to_stream (content, mem); - str = g_strndup ((const gchar*)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); + str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); camel_object_unref (mem); /* convert to UTF-8 string */ @@ -497,13 +497,13 @@ get_content (CamelMimeMessage *message) } static void -reply_with_template (EPopup *ep, EPopupItem *item, void *data) +reply_with_template (EPopup *ep, EPopupItem *item, gpointer data) { CamelMimeMessage *new, *template, *reply_to; CamelFolder *templates_folder; struct _camel_header_raw *header; UserData *userdata = item->user_data; - char *cont; + gchar *cont; /* We get the templates folder and all the uids of the messages in there */ templates_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_TEMPLATES); @@ -559,7 +559,7 @@ reply_with_template (EPopup *ep, EPopupItem *item, void *data) } static void -popup_free (EPopup *ep, GSList *l, void *data) +popup_free (EPopup *ep, GSList *l, gpointer data) { g_slist_free (l); } @@ -567,15 +567,15 @@ popup_free (EPopup *ep, GSList *l, void *data) static GSList *append_to_menu (CamelFolder *folder, GPtrArray *uids, GSList *list, EMPopupTargetSelect *t) { - int i; + gint i; for (i = 0; i < uids->len; i++) { - const char *subject; - char *path; + const gchar *subject; + gchar *path; EPopupItem *item; CamelMimeMessage *message; UserData *user_data; - const char *uid; + const gchar *uid; uid = g_strdup (g_ptr_array_index (uids, i)); diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c index ae0dc378da..cdbdb09872 100644 --- a/plugins/tnef-attachments/tnef-plugin.c +++ b/plugins/tnef-attachments/tnef-plugin.c @@ -52,42 +52,42 @@ #include <e-util/e-error.h> #include <e-util/e-mktemp.h> -int verbose = 0; -int saveRTF = 0; -int saveintermediate = 0; -char *filepath = NULL; +gint verbose = 0; +gint saveRTF = 0; +gint saveintermediate = 0; +gchar *filepath = NULL; gboolean loaded = FALSE; void processTnef(TNEFStruct *tnef); void saveVCalendar(TNEFStruct *tnef); void saveVCard(TNEFStruct *tnef); void saveVTask(TNEFStruct *tnef); -void org_gnome_format_tnef(void *ep, EMFormatHookTarget *t); +void org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t); /* Other Prototypes */ -void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]); -void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]); +void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, gchar text[]); +void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, gchar text[]); void quotedfprint(FILE *fptr, variableLength *vl); void cstylefprint(FILE *fptr, variableLength *vl); void printRtf(FILE *fptr, variableLength *vl); -void printRrule(FILE *fptr, char *recur_data, int size, TNEFStruct *tnef); -unsigned char getRruleCount(unsigned char a, unsigned char b); -unsigned char getRruleMonthNum(unsigned char a, unsigned char b); -char * getRruleDayname(unsigned char a); +void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef); +guchar getRruleCount(guchar a, guchar b); +guchar getRruleMonthNum(guchar a, guchar b); +gchar * getRruleDayname(guchar a); void -org_gnome_format_tnef(void *ep, EMFormatHookTarget *t) +org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t) { - char *tmpdir = NULL, *name = NULL; + gchar *tmpdir = NULL, *name = NULL; CamelStream *out; struct dirent *d; DIR *dir; CamelMultipart *mp; CamelMimePart *mainpart; CamelDataWrapper *content; - int len; + gint len; TNEFStruct *tnef; tnef = (TNEFStruct *) g_malloc(sizeof(TNEFStruct)); @@ -139,8 +139,8 @@ org_gnome_format_tnef(void *ep, EMFormatHookTarget *t) CamelMimePart *part; CamelDataWrapper *content; CamelStream *stream; - char *path; - const char *type; + gchar *path; + const gchar *type; if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, "..") @@ -195,10 +195,10 @@ org_gnome_format_tnef(void *ep, EMFormatHookTarget *t) } -int e_plugin_lib_enable(EPluginLib *ep, int enable); +gint e_plugin_lib_enable(EPluginLib *ep, gint enable); -int -e_plugin_lib_enable(EPluginLib *ep, int enable) +gint +e_plugin_lib_enable(EPluginLib *ep, gint enable) { if (loaded) return 0; @@ -216,14 +216,14 @@ void processTnef(TNEFStruct *tnef) { variableLength *filename; variableLength *filedata; Attachment *p; - int RealAttachment; - int object; - char * ifilename; - int i, count; - int foundCal=0; + gint RealAttachment; + gint object; + gchar * ifilename; + gint i, count; + gint foundCal=0; FILE *fptr; - ifilename = (char *) g_malloc(sizeof(char) * 256); + ifilename = (gchar *) g_malloc(sizeof(char) * 256); /* First see if this requires special processing. */ /* ie: it's a Contact Card, Task, or Meeting request (vCal/vCard) */ @@ -361,7 +361,7 @@ void processTnef(TNEFStruct *tnef) { if (filename->size == 1) { filename = (variableLength*)malloc(sizeof(variableLength)); filename->size = 20; - filename->data = (char*)malloc(20); + filename->data = (gchar *)malloc(20); sprintf(filename->data, "file_%03i.dat", count); } if (filepath == NULL) { @@ -398,12 +398,12 @@ void processTnef(TNEFStruct *tnef) { } void saveVCard(TNEFStruct *tnef) { - char ifilename[512]; + gchar ifilename[512]; FILE *fptr; variableLength *vl; variableLength *pobox, *street, *city, *state, *zip, *country; dtr thedate; - int boolean, i; + gint boolean, i; if ((vl = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_DISPLAY_NAME))) == MAPI_UNDEFINED) { if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_COMPANY_NAME))) == MAPI_UNDEFINED) { @@ -699,11 +699,11 @@ void saveVCard(TNEFStruct *tnef) { } } -unsigned char getRruleCount(unsigned char a, unsigned char b) { +guchar getRruleCount(guchar a, guchar b) { return ((a << 8) | b); } -unsigned char getRruleMonthNum(unsigned char a, unsigned char b) { +guchar getRruleMonthNum(guchar a, guchar b) { switch (a) { case 0x00: switch (b) { @@ -773,8 +773,8 @@ unsigned char getRruleMonthNum(unsigned char a, unsigned char b) { return(0); } -char * getRruleDayname(unsigned char a) { - static char daystring[25]; +gchar * getRruleDayname(guchar a) { + static gchar daystring[25]; *daystring = 0; @@ -807,7 +807,7 @@ char * getRruleDayname(unsigned char a) { return(daystring); } -void printRrule(FILE *fptr, char *recur_data, int size, TNEFStruct *tnef) +void printRrule(FILE *fptr, gchar *recur_data, gint size, TNEFStruct *tnef) { variableLength *filename; @@ -882,11 +882,11 @@ void printRrule(FILE *fptr, char *recur_data, int size, TNEFStruct *tnef) } void saveVCalendar(TNEFStruct *tnef) { - char ifilename[256]; + gchar ifilename[256]; variableLength *filename; - char *charptr, *charptr2; + gchar *charptr, *charptr2; FILE *fptr; - int index; + gint index; DDWORD *ddword_ptr; DDWORD ddword_val; dtr thedate; @@ -1141,9 +1141,9 @@ void saveVCalendar(TNEFStruct *tnef) { void saveVTask(TNEFStruct *tnef) { variableLength *vl; variableLength *filename; - int index,i; - char ifilename[256]; - char *charptr, *charptr2; + gint index,i; + gchar ifilename[256]; + gchar *charptr, *charptr2; dtr thedate; FILE *fptr; DDWORD *ddword_ptr; @@ -1267,7 +1267,7 @@ void saveVTask(TNEFStruct *tnef) { } -void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]) { +void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, gchar text[]) { variableLength *vl; if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) { if (vl->size > 0) { @@ -1279,7 +1279,7 @@ void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, } } -void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]) { +void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, gchar text[]) { variableLength *vl; if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) { if (vl->size > 0) { @@ -1292,7 +1292,7 @@ void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, } void quotedfprint(FILE *fptr, variableLength *vl) { - int index; + gint index; for (index=0;index<vl->size-1; index++) { if (vl->data[index] == '\n') { @@ -1305,7 +1305,7 @@ void quotedfprint(FILE *fptr, variableLength *vl) { } void cstylefprint(FILE *fptr, variableLength *vl) { - int index; + gint index; for (index=0;index<vl->size-1; index++) { if (vl->data[index] == '\n') { @@ -1325,10 +1325,10 @@ void cstylefprint(FILE *fptr, variableLength *vl) { } void printRtf(FILE *fptr, variableLength *vl) { - int index; - char *byte; - int brace_ct; - int key; + gint index; + gchar *byte; + gint brace_ct; + gint key; key = 0; brace_ct = 0; diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c index fa0077f807..916774b4f0 100644 --- a/plugins/vcard-inline/vcard-inline.c +++ b/plugins/vcard-inline/vcard-inline.c @@ -52,7 +52,7 @@ struct _VCardInlinePObject { static gint org_gnome_vcard_inline_classid; /* Forward Declarations */ -void org_gnome_vcard_inline_format (void *ep, EMFormatHookTarget *target); +void org_gnome_vcard_inline_format (gpointer ep, EMFormatHookTarget *target); static void org_gnome_vcard_inline_pobject_free (EMFormatHTMLPObject *object) @@ -258,7 +258,7 @@ org_gnome_vcard_inline_embed (EMFormatHTML *format, } void -org_gnome_vcard_inline_format (void *ep, EMFormatHookTarget *target) +org_gnome_vcard_inline_format (gpointer ep, EMFormatHookTarget *target) { VCardInlinePObject *vcard_object; gchar *classid; diff --git a/plugins/webdav-account-setup/webdav-contacts-source.c b/plugins/webdav-account-setup/webdav-contacts-source.c index 79d4744c56..d338094726 100644 --- a/plugins/webdav-account-setup/webdav-contacts-source.c +++ b/plugins/webdav-account-setup/webdav-contacts-source.c @@ -51,8 +51,8 @@ typedef struct { GtkWidget * plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data); -int -e_plugin_lib_enable(EPluginLib *ep, int enable); +gint +e_plugin_lib_enable(EPluginLib *ep, gint enable); static void ensure_webdav_contacts_source_group(void) @@ -136,10 +136,10 @@ static void set_ui_from_source(ui_data *data) { ESource *source = data->source; - const char *url = e_source_get_uri(source); + const gchar *url = e_source_get_uri(source); EUri *uri = e_uri_new(url); - char *url_ui; - const char *property; + gchar *url_ui; + const gchar *property; gboolean use_ssl; gboolean avoid_ifmatch; @@ -183,9 +183,9 @@ set_source_from_ui(ui_data *data) { ESource *source = data->source; gboolean avoid_ifmatch = gtk_toggle_button_get_active(data->avoid_ifmatch_toggle); - const char *url = gtk_entry_get_text(data->url_entry); + const gchar *url = gtk_entry_get_text(data->url_entry); EUri *uri = e_uri_new(url); - char *url_noprotocol; + gchar *url_noprotocol; gboolean use_ssl; e_source_set_property(source, "avoid_ifmatch", avoid_ifmatch ? "1" : "0"); @@ -247,7 +247,7 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data) EABConfigTargetSource *t = (EABConfigTargetSource *) data->target; ESource *source; ESourceGroup *group; - const char *base_uri; + const gchar *base_uri; GtkWidget *parent; GtkWidget *vbox; @@ -342,8 +342,8 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data) return NULL; } -int -e_plugin_lib_enable(EPluginLib *ep, int enable) +gint +e_plugin_lib_enable(EPluginLib *ep, gint enable) { if (enable) { ensure_webdav_contacts_source_group(); diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index 18092979d2..877c410289 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -45,15 +45,15 @@ G_DEFINE_TYPE (EComponentRegistry, e_component_registry, G_TYPE_OBJECT) /* EComponentInfo handling. */ static EComponentInfo * -component_info_new (const char *id, +component_info_new (const gchar *id, GNOME_Evolution_Component iface, - const char *alias, - const char *button_label, - const char *button_tooltips, - const char *menu_label, - const char *menu_accelerator, - const char *icon_name, - int sort_order) + const gchar *alias, + const gchar *button_label, + const gchar *button_tooltips, + const gchar *menu_label, + const gchar *menu_accelerator, + const gchar *icon_name, + gint sort_order) { EComponentInfo *info = g_new0 (EComponentInfo, 1); @@ -108,7 +108,7 @@ set_schemas (EComponentInfo *component_info, { Bonobo_ActivationProperty *property = bonobo_server_info_prop_find (server_info, "evolution:uri_schemas"); Bonobo_StringList *list; - int i; + gint i; if (property == NULL) return; @@ -133,8 +133,8 @@ query_components (EComponentRegistry *registry) const gchar * const *language_names; CORBA_Environment ev; GSList *languages = NULL; - char *query; - int i; + gchar *query; + gint i; if (registry->priv->init) return; @@ -147,7 +147,7 @@ query_components (EComponentRegistry *registry) g_free (query); if (BONOBO_EX (&ev)) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot query for components: %s\n", ex_text); g_free (ex_text); CORBA_exception_free (&ev); @@ -159,22 +159,22 @@ query_components (EComponentRegistry *registry) languages = g_slist_append (languages, (gpointer)(*language_names++)); for (i = 0; i < info_list->_length; i++) { - const char *id; - const char *label; - const char *menu_label; - const char *menu_accelerator; - const char *alias; - const char *icon_name; - const char *sort_order_string; - const char *tooltips; + const gchar *id; + const gchar *label; + const gchar *menu_label; + const gchar *menu_accelerator; + const gchar *alias; + const gchar *icon_name; + const gchar *sort_order_string; + const gchar *tooltips; EComponentInfo *info; - int sort_order; + gint sort_order; GNOME_Evolution_Component iface; id = info_list->_buffer[i].iid; - iface = bonobo_activation_activate_from_id ((char *)id, 0, NULL, &ev); + iface = bonobo_activation_activate_from_id ((gchar *)id, 0, NULL, &ev); if (BONOBO_EX (&ev) || iface == CORBA_OBJECT_NIL) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning("Cannot activate '%s': %s\n", id, ex_text); g_free(ex_text); @@ -276,7 +276,7 @@ e_component_registry_peek_list (EComponentRegistry *registry) EComponentInfo * e_component_registry_peek_info (EComponentRegistry *registry, enum _EComponentRegistryField field, - const char *key) + const gchar *key) { GSList *p, *q; @@ -298,7 +298,7 @@ e_component_registry_peek_info (EComponentRegistry *registry, break; case ECR_FIELD_SCHEMA: for (q = info->uri_schemas; q != NULL; q = q->next) - if (strcmp((char *)q->data, key) == 0) + if (strcmp((gchar *)q->data, key) == 0) return info; break; } @@ -309,7 +309,7 @@ e_component_registry_peek_info (EComponentRegistry *registry, GNOME_Evolution_Component e_component_registry_activate (EComponentRegistry *registry, - const char *id, + const gchar *id, CORBA_Environment *ev) { EComponentInfo *info; diff --git a/shell/e-component-registry.h b/shell/e-component-registry.h index 927fcf0120..c8c292a935 100644 --- a/shell/e-component-registry.h +++ b/shell/e-component-registry.h @@ -63,20 +63,20 @@ enum _EComponentRegistryField { }; struct _EComponentInfo { - char *id; + gchar *id; - char *alias; + gchar *alias; /* NULL if not activated. */ GNOME_Evolution_Component iface; - char *button_label; - char *button_tooltips; - char *menu_label; - char *menu_accelerator; - char *icon_name; + gchar *button_label; + gchar *button_tooltips; + gchar *menu_label; + gchar *menu_accelerator; + gchar *icon_name; - int sort_order; + gint sort_order; /* List of URI schemas that this component supports. */ GSList *uri_schemas; /* <char *> */ @@ -90,10 +90,10 @@ EComponentRegistry *e_component_registry_new (void); GSList *e_component_registry_peek_list (EComponentRegistry *registry); EComponentInfo *e_component_registry_peek_info (EComponentRegistry *registry, enum _EComponentRegistryField type, - const char *key); + const gchar *key); GNOME_Evolution_Component e_component_registry_activate (EComponentRegistry *registry, - const char *id, + const gchar *id, CORBA_Environment *ev); diff --git a/shell/e-component-view.c b/shell/e-component-view.c index b87078e974..8e75b5b4a8 100644 --- a/shell/e-component-view.c +++ b/shell/e-component-view.c @@ -93,7 +93,7 @@ e_component_view_init (EComponentView *shell) { } -EComponentView *e_component_view_new(GNOME_Evolution_ShellView parent, const char *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *statusbar) +EComponentView *e_component_view_new(GNOME_Evolution_ShellView parent, const gchar *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *statusbar) { EComponentView *new = g_object_new (e_component_view_get_type (), NULL); CORBA_Environment ev = { NULL }; @@ -110,7 +110,7 @@ EComponentView *e_component_view_new(GNOME_Evolution_ShellView parent, const cha return new; } -EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const char *id, BonoboControl *side, BonoboControl *view, BonoboControl *statusbar) +EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const gchar *id, BonoboControl *side, BonoboControl *view, BonoboControl *statusbar) { EComponentView *new = g_object_new (e_component_view_get_type (), NULL); CORBA_Environment ev = { NULL }; @@ -128,7 +128,7 @@ EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, } void -e_component_view_set_title(EComponentView *ecv, const char *title) +e_component_view_set_title(EComponentView *ecv, const gchar *title) { CORBA_Environment ev = { NULL }; @@ -138,7 +138,7 @@ e_component_view_set_title(EComponentView *ecv, const char *title) } void -e_component_view_set_button_icon (EComponentView *ecv, const char *iconName) +e_component_view_set_button_icon (EComponentView *ecv, const gchar *iconName) { CORBA_Environment ev = { NULL }; diff --git a/shell/e-component-view.h b/shell/e-component-view.h index 51004e489e..9b741837b1 100644 --- a/shell/e-component-view.h +++ b/shell/e-component-view.h @@ -50,7 +50,7 @@ struct _EComponentView { EComponentViewPrivate *priv; - char *id; + gchar *id; GNOME_Evolution_ShellView shell_view; struct _BonoboControl *side_control; @@ -65,11 +65,11 @@ struct _EComponentViewClass { }; GType e_component_view_get_type(void); -EComponentView *e_component_view_new(GNOME_Evolution_ShellView shell_view, const char *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *status); -EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const char *id, struct _BonoboControl *side, struct _BonoboControl *view, struct _BonoboControl *statusbar); +EComponentView *e_component_view_new(GNOME_Evolution_ShellView shell_view, const gchar *id, struct _GtkWidget *side, struct _GtkWidget *view, struct _GtkWidget *status); +EComponentView *e_component_view_new_controls(GNOME_Evolution_ShellView parent, const gchar *id, struct _BonoboControl *side, struct _BonoboControl *view, struct _BonoboControl *statusbar); -void e_component_view_set_title(EComponentView *ecv, const char *title); -void e_component_view_set_button_icon (EComponentView *ecv, const char *iconName); +void e_component_view_set_title(EComponentView *ecv, const gchar *title); +void e_component_view_set_button_icon (EComponentView *ecv, const gchar *iconName); #ifdef __cplusplus } diff --git a/shell/e-config-upgrade.c b/shell/e-config-upgrade.c index 9aa71d3278..a933972b9b 100644 --- a/shell/e-config-upgrade.c +++ b/shell/e-config-upgrade.c @@ -132,12 +132,12 @@ static e_gconf_map_list_t remap_list[] = { { NULL }, }; -int -e_config_upgrade(int major, int minor, int revision) +gint +e_config_upgrade(gint major, gint minor, gint revision) { xmlDocPtr config_doc; - char *conf_file; - int res = 0; + gchar *conf_file; + gint res = 0; conf_file = g_build_filename (g_get_home_dir (), "evolution", "config.xmldb", NULL); config_doc = e_xml_parse_file (conf_file); diff --git a/shell/e-config-upgrade.h b/shell/e-config-upgrade.h index f4580425bd..36901109d7 100644 --- a/shell/e-config-upgrade.h +++ b/shell/e-config-upgrade.h @@ -24,6 +24,6 @@ #ifndef _E_CONFIG_UPGRADE_H #define _E_CONFIG_UPGRADE_H -int e_config_upgrade (int major, int minor, int revision); +gint e_config_upgrade (gint major, gint minor, gint revision); #endif /* _E_CONFIG_UPGRADE_H */ diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index 74a89cc2ec..0e0a07ea21 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -147,10 +147,10 @@ static struct { #define num_info (sizeof (info) / sizeof (info[0])) static GtkWidget * -create_help (const char *name) +create_help (const gchar *name) { GtkWidget *label; - int i; + gint i; for (i = 0; i < num_info; i++) { if (!strcmp (name, info[i].name)) @@ -175,8 +175,8 @@ filename_changed (GtkWidget *widget, ImportData *data) { ImportDialogFilePage *page; - const char *filename; - int fileok; + const gchar *filename; + gint fileok; page = data->filepage; @@ -189,7 +189,7 @@ filename_changed (GtkWidget *widget, gboolean valid; GSList *l; EImportImporter *first = NULL; - int i=0, firstitem=0; + gint i=0, firstitem=0; g_free(page->target->uri_src); page->target->uri_src = g_filename_to_uri(filename, NULL, NULL); @@ -253,12 +253,12 @@ filetype_changed_cb (GtkWidget *combobox, ImportData *data) #if 0 static int -compare_info_name (const void *data1, const void *data2) +compare_info_name (gconstpointer data1, const void *data2) { const Bonobo_ServerInfo *info1 = (Bonobo_ServerInfo *)data1; const Bonobo_ServerInfo *info2 = (Bonobo_ServerInfo *)data2; - const char *name1 = get_name_from_component_info (info1); - const char *name2 = get_name_from_component_info (info2); + const gchar *name1 = get_name_from_component_info (info1); + const gchar *name2 = get_name_from_component_info (info2); /* If we can't find a name for a plug-in, its iid will be used * for display. Put such plug-ins at the end of the list since @@ -281,7 +281,7 @@ importer_file_page_new (ImportData *data) GtkWidget *table, *label; GtkCellRenderer *cell; GtkListStore *store; - int row = 0; + gint row = 0; page = g_new0 (ImportDialogFilePage, 1); @@ -390,7 +390,7 @@ prepare_intelligent_page (GnomeDruidPage *dpage, { GSList *l; GtkWidget *table; - int row; + gint row; ImportDialogImporterPage *page = data->importerpage; if (page->target != NULL) @@ -412,7 +412,7 @@ prepare_intelligent_page (GnomeDruidPage *dpage, row = 0; for (;l;l=l->next) { EImportImporter *eii = l->data; - char *str; + gchar *str; GtkWidget *w, *label; w = e_import_get_widget(data->import, (EImportTarget *)page->target, eii); @@ -456,7 +456,7 @@ import_druid_esc (GnomeDruid *druid, } static void -import_druid_weak_notify (void *blah, +import_druid_weak_notify (gpointer blah, GObject *where_the_object_was) { ImportData *data = (ImportData *) blah; @@ -475,7 +475,7 @@ import_druid_weak_notify (void *blah, } static void -import_status(EImport *import, const char *what, int pc, void *d) +import_status(EImport *import, const gchar *what, gint pc, gpointer d) { ImportData *data = d; @@ -491,7 +491,7 @@ import_dialog_response(GtkDialog *d, guint button, ImportData *data) } static void -import_done(EImport *ei, void *d) +import_done(EImport *ei, gpointer d) { ImportData *data = d; @@ -500,7 +500,7 @@ import_done(EImport *ei, void *d) } static void -import_intelligent_done(EImport *ei, void *d) +import_intelligent_done(EImport *ei, gpointer d) { ImportData *data = d; @@ -519,7 +519,7 @@ import_druid_finish (GnomeDruidPage *page, ImportData *data) { EImportCompleteFunc done = NULL; - char *msg = NULL; + gchar *msg = NULL; if (gtk_toggle_button_get_active((GtkToggleButton *)data->typepage->intelligent)) { data->importerpage->current = data->importerpage->importers; @@ -677,7 +677,7 @@ back_intelligent_page (GnomeDruidPage *page, } static void -dialog_weak_notify (void *data, +dialog_weak_notify (gpointer data, GObject *where_the_dialog_was) { gboolean *dialog_open = (gboolean *) data; @@ -692,7 +692,7 @@ e_shell_importer_start_import (EShellWindow *shell_window) GtkWidget *html; static gboolean dialog_open = FALSE; GdkPixbuf *icon; - char *gladefile; + gchar *gladefile; if (dialog_open) { return; diff --git a/shell/e-shell-nm.c b/shell/e-shell-nm.c index f51a565486..c8b449bed1 100644 --- a/shell/e-shell-nm.c +++ b/shell/e-shell-nm.c @@ -55,9 +55,9 @@ reinit_dbus (gpointer user_data) static DBusHandlerResult e_shell_network_monitor (DBusConnection *connection G_GNUC_UNUSED, - DBusMessage *message, void *user_data) + DBusMessage *message, gpointer user_data) { - const char *object; + const gchar *object; EShell *shell = user_data; GNOME_Evolution_ShellState shell_state; EShellLineStatus line_status; diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c index 291a46c187..1a9529688e 100644 --- a/shell/e-shell-settings-dialog.c +++ b/shell/e-shell-settings-dialog.c @@ -55,7 +55,7 @@ set_dialog_size (EShellSettingsDialog *dialog) PangoLayout *layout; PangoContext *context; PangoFontMetrics *metrics; - int width, height; + gint width, height; layout = gtk_widget_create_pango_layout (GTK_WIDGET (dialog), "M"); context = pango_layout_get_context (layout); @@ -78,21 +78,21 @@ set_dialog_size (EShellSettingsDialog *dialog) /* Page handling. */ struct _Page { - char *title; - char *description; + gchar *title; + gchar *description; GdkPixbuf *icon; Bonobo_ActivationProperty *type; - int priority; + gint priority; EConfigPage *page_widget; }; typedef struct _Page Page; static Page * -page_new (const char *title, - const char *description, +page_new (const gchar *title, + const gchar *description, GdkPixbuf *icon, Bonobo_ActivationProperty *type, - int priority, + gint priority, EConfigPage *page_widget) { Page *page; @@ -124,8 +124,8 @@ page_free (Page *page) } static int -compare_page_func (const void *a, - const void *b) +compare_page_func (gconstpointer a, + gconstpointer b) { const Page *page_a; const Page *page_b; @@ -155,7 +155,7 @@ load_pages (EShellSettingsDialog *dialog) GSList *languages = NULL; GList *page_list; GList *p; - int i, j; + gint i, j; priv = dialog->priv; @@ -178,12 +178,12 @@ load_pages (EShellSettingsDialog *dialog) for (i = 0; i < control_list->_length; i ++) { CORBA_Object corba_object; Bonobo_ServerInfo *info; - const char *title; - const char *description; - const char *icon_path; - const char *priority_string; + const gchar *title; + const gchar *description; + const gchar *icon_path; + const gchar *priority_string; Bonobo_ActivationProperty *type; - int priority; + gint priority; GdkPixbuf *icon; CORBA_exception_init (&ev); @@ -213,7 +213,7 @@ load_pages (EShellSettingsDialog *dialog) else priority = atoi (priority_string); - corba_object = bonobo_activation_activate_from_id ((char *) info->iid, 0, NULL, &ev); + corba_object = bonobo_activation_activate_from_id ((gchar *) info->iid, 0, NULL, &ev); if (! BONOBO_EX (&ev)) { Page *page; @@ -223,7 +223,7 @@ load_pages (EShellSettingsDialog *dialog) page_list = g_list_prepend (page_list, page); } else { - char *bonobo_ex_text = bonobo_exception_get_text (&ev); + gchar *bonobo_ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot activate %s -- %s", info->iid, bonobo_ex_text); g_free (bonobo_ex_text); } @@ -326,11 +326,11 @@ e_shell_settings_dialog_new (void) } void -e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *type) +e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const gchar *type) { EShellSettingsDialogPrivate *priv; gpointer key, value; - int page; + gint page; g_return_if_fail (dialog != NULL); g_return_if_fail (E_IS_SHELL_SETTINGS_DIALOG (dialog)); @@ -339,7 +339,7 @@ e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *typ priv = dialog->priv; if (!g_hash_table_lookup_extended (priv->types, type, &key, &value)) { - char *slash, *supertype; + gchar *slash, *supertype; slash = strchr (type, '/'); if (slash) { diff --git a/shell/e-shell-settings-dialog.h b/shell/e-shell-settings-dialog.h index 55cce4a52f..ba636e6071 100644 --- a/shell/e-shell-settings-dialog.h +++ b/shell/e-shell-settings-dialog.h @@ -56,7 +56,7 @@ struct _EShellSettingsDialogClass { GType e_shell_settings_dialog_get_type (void); GtkWidget *e_shell_settings_dialog_new (void); void e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, - const char *type); + const gchar *type); #ifdef __cplusplus } diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index a6d071cc78..319a0d3c76 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -35,7 +35,7 @@ static BonoboObjectClass *parent_class = NULL; struct _EShellViewPrivate { - int dummy; + gint dummy; }; static void @@ -44,7 +44,7 @@ impl_ShellView_setTitle(PortableServer_Servant _servant, const CORBA_char *id, c EShellView *esw = (EShellView *)bonobo_object_from_servant(_servant); /* To translators: This is the window title and %s is the component name. Most translators will want to keep it as is. */ - char *tmp = g_strdup_printf(_("%s - Evolution"), title); + gchar *tmp = g_strdup_printf(_("%s - Evolution"), title); e_shell_window_set_title(esw->window, id, tmp); g_free(tmp); @@ -59,8 +59,8 @@ impl_ShellView_setComponent(PortableServer_Servant _servant, const CORBA_char *i } struct change_icon_struct { - const char *component_name; - const char *icon_name; + const gchar *component_name; + const gchar *icon_name; }; static gboolean diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c index 6f180012cb..a81bacf07a 100644 --- a/shell/e-shell-window-commands.c +++ b/shell/e-shell-window-commands.c @@ -63,7 +63,7 @@ launch_pilot_settings (void) { GError* error = NULL; - gchar* args = g_find_program_in_path ("gpilotd-control-applet"); + gchar * args = g_find_program_in_path ("gpilotd-control-applet"); if (args == NULL) { e_notice (NULL, GTK_MESSAGE_ERROR, _("The GNOME Pilot tools do not appear to be installed on this system.")); @@ -86,7 +86,7 @@ launch_pilot_settings (void) static void command_import (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_importer_start_import (window); } @@ -94,7 +94,7 @@ command_import (BonoboUIComponent *uih, static void command_page_setup (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_print_run_page_setup_dialog (GTK_WINDOW (window)); } @@ -102,7 +102,7 @@ command_page_setup (BonoboUIComponent *uih, static void command_close (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { if (e_shell_request_close_window (e_shell_window_peek_shell (window), window)) gtk_widget_destroy (GTK_WIDGET (window)); @@ -111,7 +111,7 @@ command_close (BonoboUIComponent *uih, static void command_quit (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { EShell *shell = e_shell_window_peek_shell (window); @@ -121,7 +121,7 @@ command_quit (BonoboUIComponent *uih, static void command_submit_bug (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { const gchar *command_line; GError *error = NULL; @@ -150,7 +150,7 @@ command_submit_bug (BonoboUIComponent *uih, No all environments are utf8 and not all editors can handle it. */ -static const char *authors[] = { +static const gchar *authors[] = { "Aaron Weber", "Abel Cheung", "Abhishek Parwal", @@ -915,7 +915,7 @@ static const char *authors[] = { NULL }; -static const char *documentors[] = { +static const gchar *documentors[] = { "Aaron Weber", "Binika Preet", "Dan Winship", @@ -929,7 +929,7 @@ static const char *documentors[] = { static void command_about (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { gchar *translator_credits; @@ -958,7 +958,7 @@ command_about (BonoboUIComponent *uih, static void command_open_faq (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { const gchar *uri; @@ -969,9 +969,9 @@ command_open_faq (BonoboUIComponent *uih, static void command_quick_reference (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { - char *quickref; + gchar *quickref; const gchar * const *language_names; language_names = g_get_language_names (); @@ -990,7 +990,7 @@ command_quick_reference (BonoboUIComponent *uih, if (file) { GError *error = NULL; - char *uri = g_file_get_uri (file); + gchar *uri = g_file_get_uri (file); g_app_info_launch_default_for_uri (uri, NULL, &error); @@ -1015,7 +1015,7 @@ command_quick_reference (BonoboUIComponent *uih, static void command_work_offline (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { EShell *shell; @@ -1026,7 +1026,7 @@ command_work_offline (BonoboUIComponent *uih, static void command_work_online (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { EShell *shell; @@ -1037,7 +1037,7 @@ command_work_online (BonoboUIComponent *uih, static void command_open_new_window (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_create_window (e_shell_window_peek_shell (window), e_shell_window_peek_current_component_id (window), @@ -1050,15 +1050,15 @@ command_open_new_window (BonoboUIComponent *uih, static void command_send_receive (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_send_receive (e_shell_window_peek_shell (window)); } static void command_forget_passwords (BonoboUIComponent *ui_component, - void *data, - const char *path) + gpointer data, + const gchar *path) { if (e_error_run (NULL, "shell:forget-passwords", NULL) == GTK_RESPONSE_OK) e_passwords_forget_passwords(); @@ -1069,7 +1069,7 @@ command_forget_passwords (BonoboUIComponent *ui_component, static void command_settings (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { e_shell_window_show_settings (window); } @@ -1077,7 +1077,7 @@ command_settings (BonoboUIComponent *uih, static void command_pilot_settings (BonoboUIComponent *uih, EShellWindow *window, - const char *path) + const gchar *path) { launch_pilot_settings (); } @@ -1216,9 +1216,9 @@ shell_line_status_changed_cb (EShell *shell, static void view_buttons_icontext_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1229,9 +1229,9 @@ view_buttons_icontext_item_toggled_handler (BonoboUIComponent *ui_comp static void view_buttons_icon_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1242,9 +1242,9 @@ view_buttons_icon_item_toggled_handler (BonoboUIComponent *ui_componen static void view_buttons_text_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1255,9 +1255,9 @@ view_buttons_text_item_toggled_handler (BonoboUIComponent *ui_componen static void view_buttons_toolbar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1268,9 +1268,9 @@ view_buttons_toolbar_item_toggled_handler (BonoboUIComponent *ui_compo static void view_buttons_hide_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { ESidebar *sidebar; @@ -1285,9 +1285,9 @@ view_buttons_hide_item_toggled_handler (BonoboUIComponent *ui_componen static void view_toolbar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { gboolean is_visible; @@ -1300,9 +1300,9 @@ view_toolbar_item_toggled_handler (BonoboUIComponent *ui_component, static void view_statusbar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { GtkWidget *status_bar = e_shell_window_peek_statusbar (shell_window); @@ -1321,9 +1321,9 @@ view_statusbar_item_toggled_handler (BonoboUIComponent *ui_component, static void view_sidebar_item_toggled_handler (BonoboUIComponent *ui_component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, EShellWindow *shell_window) { GtkWidget *side_bar = GTK_WIDGET(e_shell_window_peek_sidebar (shell_window)); diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 83e537c31b..8b24805fd4 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -60,18 +60,18 @@ gboolean e_shell_dbus_initialise (EShell *shell); to -1. When the views are created the first time, the widget pointers as well as the notebook page value get set. */ struct _ComponentView { - int button_id; - char *component_id; - char *component_alias; + gint button_id; + gchar *component_id; + gchar *component_alias; GNOME_Evolution_ComponentView component_view; - char *title; + gchar *title; GtkWidget *sidebar_widget; GtkWidget *view_widget; GtkWidget *statusbar_widget; - int notebook_page_num; + gint notebook_page_num; }; typedef struct _ComponentView ComponentView; @@ -132,7 +132,7 @@ static gboolean store_window_size (GtkWidget* widget); /* ComponentView handling. */ static ComponentView * -component_view_new (const char *id, const char *alias, int button_id) +component_view_new (const gchar *id, const gchar *alias, gint button_id) { ComponentView *view = g_new0 (ComponentView, 1); @@ -206,8 +206,8 @@ init_view (EShellWindow *window, Bonobo_Control statusbar_control; CORBA_boolean select_item; CORBA_Environment ev; - int sidebar_notebook_page_num; - int view_notebook_page_num; + gint sidebar_notebook_page_num; + gint view_notebook_page_num; g_return_if_fail (view->view_widget == NULL); g_return_if_fail (view->sidebar_widget == NULL); @@ -222,7 +222,7 @@ init_view (EShellWindow *window, component_iface = e_component_registry_activate (registry, view->component_id, &ev); if (BONOBO_EX (&ev) || component_iface == CORBA_OBJECT_NIL) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot activate component %s: %s", view->component_id, ex_text); g_free (ex_text); CORBA_exception_free (&ev); @@ -305,7 +305,7 @@ switch_view (EShellWindow *window, ComponentView *component_view) EComponentInfo *info = e_component_registry_peek_info (registry, ECR_FIELD_ID, component_view->component_id); - char *title; + gchar *title; if (component_view->sidebar_widget == NULL) { init_view (window, component_view); @@ -423,7 +423,7 @@ update_send_receive_sensitivity (EShellWindow *window) /* Callbacks. */ static ComponentView * -get_component_view (EShellWindow *window, int id) +get_component_view (EShellWindow *window, gint id) { GSList *p; @@ -438,7 +438,7 @@ get_component_view (EShellWindow *window, int id) static void sidebar_button_selected_callback (ESidebar *sidebar, - int button_id, + gint button_id, EShellWindow *window) { ComponentView *component_view; @@ -450,7 +450,7 @@ sidebar_button_selected_callback (ESidebar *sidebar, static gboolean sidebar_button_pressed_callback (ESidebar *sidebar, GdkEventButton *event, - int button_id, + gint button_id, EShellWindow *window) { if (event->type == GDK_BUTTON_PRESS && @@ -502,7 +502,7 @@ shell_line_status_changed_callback (EShell *shell, static void ui_engine_add_hint_callback (BonoboUIEngine *engine, - const char *hint, + const gchar *hint, EShellWindow *window) { gtk_label_set_text (GTK_LABEL (window->priv->menu_hint_label), hint); @@ -614,9 +614,9 @@ setup_status_bar (EShellWindow *window) static void menu_component_selected (BonoboUIComponent *uic, EShellWindow *window, - const char *path) + const gchar *path) { - char *component_id; + gchar *component_id; component_id = strchr(path, '-'); if (component_id) @@ -640,10 +640,10 @@ setup_widgets (EShellWindow *window) GtkWidget *contents_vbox; GSList *p; GString *xml; - int button_id; + gint button_id; gboolean visible; - char *style; - int mode; + gchar *style; + gint mode; priv->paned = gtk_hpaned_new (); gtk_widget_show (priv->paned); @@ -754,7 +754,7 @@ setup_widgets (EShellWindow *window) button_id = 0; xml = g_string_new(""); for (p = e_component_registry_peek_list (registry); p != NULL; p = p->next) { - char *tmp, *tmp2; + gchar *tmp, *tmp2; EComponentInfo *info = p->data; ComponentView *view = component_view_new (info->id, info->alias, button_id); GtkIconInfo *icon_info; @@ -983,14 +983,14 @@ e_shell_window_init (EShellWindow *shell_window) GtkWidget * e_shell_window_new (EShell *shell, - const char *component_id) + const gchar *component_id) { EShellWindow *window = g_object_new (e_shell_window_get_type (), NULL); EShellWindowPrivate *priv = window->priv; GConfClient *gconf_client = gconf_client_get_default (); BonoboUIContainer *ui_container; - char *default_component_id = NULL; - char *xmlfile; + gchar *default_component_id = NULL; + gchar *xmlfile; gint width, height; if (bonobo_window_construct (BONOBO_WINDOW (window), @@ -1063,7 +1063,7 @@ e_shell_window_new (EShell *shell, void -e_shell_window_switch_to_component (EShellWindow *window, const char *component_id) +e_shell_window_switch_to_component (EShellWindow *window, const gchar *component_id) { EShellWindowPrivate *priv = window->priv; ComponentView *view = NULL; @@ -1093,7 +1093,7 @@ e_shell_window_switch_to_component (EShellWindow *window, const char *component_ } -const char * +const gchar * e_shell_window_peek_current_component_id (EShellWindow *window) { g_return_val_if_fail (E_IS_SHELL_WINDOW (window), NULL); @@ -1140,8 +1140,8 @@ void e_shell_window_save_defaults (EShellWindow *window) { GConfClient *client = gconf_client_get_default (); - char *prop; - const char *style; + gchar *prop; + const gchar *style; gboolean visible; gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/folder_bar/width", @@ -1209,7 +1209,7 @@ e_shell_window_show_settings (EShellWindow *window) } void -e_shell_window_set_title(EShellWindow *window, const char *component_id, const char *title) +e_shell_window_set_title(EShellWindow *window, const gchar *component_id, const gchar *title) { EShellWindowPrivate *priv = window->priv; ComponentView *view = NULL; @@ -1246,7 +1246,7 @@ e_shell_window_set_title(EShellWindow *window, const char *component_id, const c * @param icon Icon buffer. **/ void -e_shell_window_change_component_button_icon (EShellWindow *window, const char *component_id, const char *icon_name) +e_shell_window_change_component_button_icon (EShellWindow *window, const gchar *component_id, const gchar *icon_name) { EShellWindowPrivate *priv; GSList *p; diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h index 869352b01c..d3abe1f201 100644 --- a/shell/e-shell-window.h +++ b/shell/e-shell-window.h @@ -58,22 +58,22 @@ struct _EShellWindowClass { GType e_shell_window_get_type (void); GtkWidget *e_shell_window_new (EShell *shell, - const char *component_id); + const gchar *component_id); void e_shell_window_switch_to_component (EShellWindow *shell, - const char *component_id); -const char *e_shell_window_peek_current_component_id (EShellWindow *shell); + const gchar *component_id); +const gchar *e_shell_window_peek_current_component_id (EShellWindow *shell); EShell *e_shell_window_peek_shell (EShellWindow *window); BonoboUIComponent *e_shell_window_peek_bonobo_ui_component (EShellWindow *window); ESidebar *e_shell_window_peek_sidebar (EShellWindow *window); GtkWidget *e_shell_window_peek_statusbar (EShellWindow *window); -void e_shell_window_set_title(EShellWindow *window, const char *component_id, const char *title); +void e_shell_window_set_title(EShellWindow *window, const gchar *component_id, const gchar *title); void e_shell_window_save_defaults (EShellWindow *window); void e_shell_window_show_settings (EShellWindow *window); -void e_shell_window_change_component_button_icon (EShellWindow *window, const char *component_id, const char *icon_name); +void e_shell_window_change_component_button_icon (EShellWindow *window, const gchar *component_id, const gchar *icon_name); #endif /* _E_SHELL_WINDOW_H_ */ diff --git a/shell/e-shell.c b/shell/e-shell.c index 9b4e6bc53a..ed7f8cc4b0 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -68,7 +68,7 @@ #include "evolution-listener.h" #include "evolution-shell-component-utils.h" -static void set_line_status_complete(EvolutionListener *el, void *data); +static void set_line_status_complete(EvolutionListener *el, gpointer data); #define PARENT_TYPE bonobo_object_get_type () static BonoboObjectClass *parent_class = NULL; @@ -76,7 +76,7 @@ static gboolean session_started = FALSE; struct _EShellPrivate { /* IID for registering the object on OAF. */ - char *iid; + gchar *iid; GList *windows; @@ -85,11 +85,11 @@ struct _EShellPrivate { /* Names for the types of the folders that have maybe crashed. */ /* FIXME TODO */ - GList *crash_type_names; /* char * */ + GList *crash_type_names; /* gchar * */ /* Line status and controllers */ EShellLineStatus line_status; - int line_status_pending; + gint line_status_pending; EShellLineStatus line_status_working; EvolutionListener *line_status_listener; @@ -105,19 +105,19 @@ struct _EShellPrivate { /* Whether the shell is succesfully initialized. This is needed during the start-up sequence, to avoid CORBA calls to do make wrong things to happen while the shell is initializing. */ - unsigned int is_initialized : 1; + guint is_initialized : 1; /* Wether the shell is working in "interactive" mode or not. (Currently, it's interactive IIF there is at least one active view.) */ - unsigned int is_interactive : 1; + guint is_interactive : 1; /* Whether quit has been requested, and the shell is now waiting for permissions from all the components to quit. */ - unsigned int preparing_to_quit : 1; + guint preparing_to_quit : 1; /* Whether we are recovering from a crash in the previous session. */ - unsigned int crash_recovery : 1; + guint crash_recovery : 1; }; @@ -160,7 +160,7 @@ set_interactive (EShell *shell, GSList *component_list; GSList *p; GList *first_element; - int num_windows; + gint num_windows; GtkWidget *view; g_return_if_fail (E_IS_SHELL (shell)); @@ -260,8 +260,8 @@ impl_Shell_handleURI (PortableServer_Servant servant, { EShell *shell = E_SHELL (bonobo_object_from_servant (servant)); EComponentInfo *component_info; - char *schema, *p; - int show = FALSE; + gchar *schema, *p; + gint show = FALSE; schema = g_alloca(strlen(uri)+1); strcpy(schema, uri); @@ -349,7 +349,7 @@ impl_Shell_findComponent(PortableServer_Servant servant, static int window_delete_event_cb (GtkWidget *widget, GdkEventAny *ev, - void *data) + gpointer data) { EShell *shell; @@ -360,7 +360,7 @@ window_delete_event_cb (GtkWidget *widget, } static gboolean -notify_no_windows_left_idle_cb (void *data) +notify_no_windows_left_idle_cb (gpointer data) { EShell *shell; EShellPrivate *priv; @@ -381,11 +381,11 @@ notify_no_windows_left_idle_cb (void *data) } static void -window_weak_notify (void *data, +window_weak_notify (gpointer data, GObject *where_the_object_was) { EShell *shell; - int num_windows; + gint num_windows; shell = E_SHELL (data); @@ -551,9 +551,9 @@ e_shell_init (EShell *shell) } static void -detect_version (GConfClient *gconf, int *major, int *minor, int *revision) +detect_version (GConfClient *gconf, gint *major, gint *minor, gint *revision) { - char *val, *evolution_dir; + gchar *val, *evolution_dir; struct stat st; evolution_dir = g_build_filename (g_get_home_dir (), "evolution", NULL); @@ -571,7 +571,7 @@ detect_version (GConfClient *gconf, int *major, int *minor, int *revision) } else { xmlDocPtr config_doc; xmlNodePtr source; - char *tmp; + gchar *tmp; tmp = g_build_filename (evolution_dir, "config.xmldb", NULL); config_doc = e_xml_parse_file (tmp); @@ -600,11 +600,11 @@ detect_version (GConfClient *gconf, int *major, int *minor, int *revision) /* calls components to perform upgrade */ static gboolean -attempt_upgrade (EShell *shell, int major, int minor, int revision) +attempt_upgrade (EShell *shell, gint major, gint minor, gint revision) { GSList *component_infos, *p; gboolean success; - int res; + gint res; success = TRUE; @@ -618,7 +618,7 @@ attempt_upgrade (EShell *shell, int major, int minor, int revision) GNOME_Evolution_Component_upgradeFromVersion (info->iface, major, minor, revision, &ev); if (BONOBO_EX (&ev)) { - char *exception_text; + gchar *exception_text; CORBA_char *id = CORBA_exception_id(&ev); if (strcmp (id, ex_CORBA_NO_IMPLEMENT) == 0) { @@ -660,7 +660,7 @@ attempt_upgrade (EShell *shell, int major, int minor, int revision) **/ EShellConstructResult e_shell_construct (EShell *shell, - const char *iid, + const gchar *iid, EShellStartupLineMode startup_line_mode) { EShellPrivate *priv; @@ -753,12 +753,12 @@ e_shell_new (EShellStartupLineMode startup_line_mode, } static int -remove_dir(const char *root, const char *path) +remove_dir(const gchar *root, const gchar *path) { GDir *dir; - const char *dname; - int res = -1; - char *new = NULL; + const gchar *dname; + gint res = -1; + gchar *new = NULL; struct stat st; dir = g_dir_open(path, 0, NULL); @@ -804,12 +804,12 @@ gboolean e_shell_attempt_upgrade (EShell *shell) { GConfClient *gconf_client; - int major = 0, minor = 0, revision = 0; - int lmajor, lminor, lrevision; - int cmajor, cminor, crevision; - char *version_string, *last_version = NULL; - int done_upgrade = FALSE; - char *oldpath; + gint major = 0, minor = 0, revision = 0; + gint lmajor, lminor, lrevision; + gint cmajor, cminor, crevision; + gchar *version_string, *last_version = NULL; + gint done_upgrade = FALSE; + gchar *oldpath; struct stat st; ESEvent *ese; @@ -834,8 +834,8 @@ e_shell_attempt_upgrade (EShell *shell) size = e_fsutils_usage(oldpath); space = e_fsutils_avail(g_get_home_dir()); if (size != -1 && space != -1 && space < size) { - char *required = g_strdup_printf(_("%ld KB"), size); - char *have = g_strdup_printf(_("%ld KB"), space); + gchar *required = g_strdup_printf(_("%ld KB"), size); + gchar *have = g_strdup_printf(_("%ld KB"), space); e_error_run(NULL, "shell:upgrade-nospace", required, have, NULL); g_free(required); @@ -866,7 +866,7 @@ check_old: if (lmajor == 1 && lminor < 5 && g_stat(oldpath, &st) == 0 && S_ISDIR(st.st_mode)) { - int res; + gint res; last_version = g_strdup_printf("%d.%d.%d", lmajor, lminor, lrevision); res = e_error_run(NULL, "shell:upgrade-remove-1-4", last_version, NULL); @@ -927,7 +927,7 @@ check_old: **/ EShellWindow * e_shell_create_window (EShell *shell, - const char *component_id, + const gchar *component_id, EShellWindow *template_window) { EShellWindow *window; @@ -1111,7 +1111,7 @@ set_line_status_finished(EShell *shell) } static void -set_line_status_complete(EvolutionListener *el, void *data) +set_line_status_complete(EvolutionListener *el, gpointer data) { EShell *shell = data; EShellPrivate *priv = shell->priv; @@ -1224,7 +1224,7 @@ e_shell_send_receive (EShell *shell) void e_shell_show_settings (EShell *shell, - const char *type, + const gchar *type, EShellWindow *shell_window) { EShellPrivate *priv; @@ -1252,7 +1252,7 @@ e_shell_show_settings (EShell *shell, } -const char * +const gchar * e_shell_construct_result_to_string (EShellConstructResult result) { switch (result) { diff --git a/shell/e-shell.h b/shell/e-shell.h index e8451e3b5b..4f26846071 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -95,7 +95,7 @@ typedef enum _EShellConstructResult EShellConstructResult; GType e_shell_get_type (void); EShellConstructResult e_shell_construct (EShell *shell, - const char *iid, + const gchar *iid, EShellStartupLineMode startup_line_mode); EShell *e_shell_new (EShellStartupLineMode startup_line_mode, EShellConstructResult *construct_result_return); @@ -103,7 +103,7 @@ EShell *e_shell_new (EShellStartupLineMode startup_line_m gboolean e_shell_attempt_upgrade (EShell *shell); EShellWindow *e_shell_create_window (EShell *shell, - const char *component_id, + const gchar *component_id, EShellWindow *template_window); gboolean e_shell_request_close_window (EShell *shell, EShellWindow *window); @@ -129,14 +129,14 @@ void e_shell_set_crash_recovery (EShell *shell, void e_shell_send_receive (EShell *shell); void e_shell_show_settings (EShell *shell, - const char *type, + const gchar *type, EShellWindow *shell_window); gboolean e_shell_can_quit (EShell *shell); gboolean e_shell_do_quit (EShell *shell); gboolean e_shell_quit (EShell *shell); -const char *e_shell_construct_result_to_string (EShellConstructResult result); +const gchar *e_shell_construct_result_to_string (EShellConstructResult result); typedef gboolean (*EMainShellFunc) (EShell *shell, EShellWindow *window, gpointer user_data); void e_shell_foreach_shell_window (EShell *shell, EMainShellFunc func, gpointer user_data); diff --git a/shell/e-sidebar.c b/shell/e-sidebar.c index d4c02e63ce..3326c5d1dc 100644 --- a/shell/e-sidebar.c +++ b/shell/e-sidebar.c @@ -36,7 +36,7 @@ typedef struct { GtkWidget *icon; GtkWidget *hbox; gchar *default_icon_name; - int id; + gint id; } Button; struct _ESidebarPrivate { @@ -60,7 +60,7 @@ enum { NUM_SIGNALS }; -static unsigned int signals[NUM_SIGNALS] = { 0 }; +static guint signals[NUM_SIGNALS] = { 0 }; G_DEFINE_TYPE (ESidebar, e_sidebar, GTK_TYPE_CONTAINER) @@ -75,7 +75,7 @@ button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon, GtkWidget *hbox, - int id) + gint id) { Button *button = g_new (Button, 1); const gchar *icon_name; @@ -109,7 +109,7 @@ button_free (Button *button) } static void -update_buttons (ESidebar *sidebar, int new_selected_id) +update_buttons (ESidebar *sidebar, gint new_selected_id) { GSList *p; @@ -134,7 +134,7 @@ static void button_toggled_callback (GtkToggleButton *toggle_button, ESidebar *sidebar) { - int id = 0; + gint id = 0; gboolean is_active = FALSE; GSList *p; @@ -192,7 +192,7 @@ button_query_tooltip (GtkWidget *widget, { /* Show the tooltip only if the label is hidden */ if (INTERNAL_MODE (sidebar) == E_SIDEBAR_MODE_ICON) { - char *tip; + gchar *tip; tip = g_object_get_data (G_OBJECT (widget), "ESidebar:button-tooltip"); @@ -215,14 +215,14 @@ layout_buttons (ESidebar *sidebar) GtkAllocation *allocation = & GTK_WIDGET (sidebar)->allocation; ESidebarMode mode; gboolean icons_only; - int num_btns = g_slist_length (sidebar->priv->buttons), btns_per_row; + gint num_btns = g_slist_length (sidebar->priv->buttons), btns_per_row; GSList **rows, *p; Button *button; - int row_number; - int max_btn_width = 0, max_btn_height = 0; - int row_last; - int x, y; - int i; + gint row_number; + gint max_btn_width = 0, max_btn_height = 0; + gint row_last; + gint x, y; + gint i; y = allocation->y + allocation->height - V_PADDING - 1; @@ -281,7 +281,7 @@ layout_buttons (ESidebar *sidebar) /* Layout the buttons. */ for (i = row_last; i >= 0; i --) { - int len, extra_width; + gint len, extra_width; y -= max_btn_height; x = H_PADDING + allocation->x; @@ -318,7 +318,7 @@ do_layout (ESidebar *sidebar) { GtkAllocation *allocation = & GTK_WIDGET (sidebar)->allocation; GtkAllocation child_allocation; - int y; + gint y; if (sidebar->priv->show) y = layout_buttons (sidebar); @@ -341,7 +341,7 @@ static void impl_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, - void *callback_data) + gpointer callback_data) { ESidebar *sidebar = E_SIDEBAR (container); GSList *p; @@ -544,10 +544,10 @@ e_sidebar_set_selection_widget (ESidebar *sidebar, GtkWidget *widget) void e_sidebar_add_button (ESidebar *sidebar, - const char *label, - const char *tooltips, - const char *icon_name, - int id) + const gchar *label, + const gchar *tooltips, + const gchar *icon_name, + gint id) { GtkWidget *button_widget; GtkWidget *hbox; @@ -613,7 +613,7 @@ e_sidebar_add_button (ESidebar *sidebar, * You cannot change icon as in a stack, only one default icon will be stored. **/ void -e_sidebar_change_button_icon (ESidebar *sidebar, const gchar *icon_name, int button_id) +e_sidebar_change_button_icon (ESidebar *sidebar, const gchar *icon_name, gint button_id) { GSList *p; @@ -639,7 +639,7 @@ e_sidebar_change_button_icon (ESidebar *sidebar, const gchar *icon_name, int but } void -e_sidebar_select_button (ESidebar *sidebar, int id) +e_sidebar_select_button (ESidebar *sidebar, gint id) { update_buttons (sidebar, id); @@ -712,11 +712,11 @@ set_mode_internal (ESidebar *sidebar, ESidebarMode mode ) } static void -style_changed_notify (GConfClient *gconf, guint id, GConfEntry *entry, void *data) +style_changed_notify (GConfClient *gconf, guint id, GConfEntry *entry, gpointer data) { ESidebar *sidebar = data; - char *val; - int mode; + gchar *val; + gint mode; val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL); if (val == NULL || !gconf_string_to_enum (toolbar_styles, val, &mode)) diff --git a/shell/e-sidebar.h b/shell/e-sidebar.h index 2585592363..9a06e5a377 100644 --- a/shell/e-sidebar.h +++ b/shell/e-sidebar.h @@ -54,8 +54,8 @@ struct _ESidebarClass { GtkContainerClass parent_class; /* signals */ - void (* button_selected) (ESidebar *sidebar, int id); - void (* button_pressed) (ESidebar *sidebar, GdkEventButton *event, int id); + void (* button_selected) (ESidebar *sidebar, gint id); + void (* button_pressed) (ESidebar *sidebar, GdkEventButton *event, gint id); }; @@ -66,17 +66,17 @@ void e_sidebar_set_selection_widget (ESidebar *sidebar, GtkWidget *widget); void e_sidebar_add_button (ESidebar *sidebar, - const char *label, - const char *tooltips, - const char *icon_name, - int id); + const gchar *label, + const gchar *tooltips, + const gchar *icon_name, + gint id); void e_sidebar_select_button (ESidebar *sidebar, - int id); + gint id); void e_sidebar_change_button_icon (ESidebar *sidebar, - const char *icon_name, - int button_id); + const gchar *icon_name, + gint button_id); ESidebarMode e_sidebar_get_mode (ESidebar *sidebar); void e_sidebar_set_mode (ESidebar *sidebar, ESidebarMode mode); diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c index a49d7dbdc4..f5af1575dd 100644 --- a/shell/e-user-creatable-items-handler.c +++ b/shell/e-user-creatable-items-handler.c @@ -45,7 +45,7 @@ #include <gconf/gconf-client.h> struct _Component { - char *id, *alias; + gchar *id, *alias; GNOME_Evolution_Component component; GNOME_Evolution_CreatableItemTypeList *type_list; }; @@ -53,11 +53,11 @@ typedef struct _Component Component; /* Representation of a single menu item. */ struct _MenuItem { - const char *label; - char shortcut; - char *verb; - char *tooltip; - char *component; + const gchar *label; + gchar shortcut; + gchar *verb; + gchar *tooltip; + gchar *component; GdkPixbuf *icon; GdkPixbuf *icon_toolbar; }; @@ -65,11 +65,11 @@ typedef struct _MenuItem MenuItem; struct _EUserCreatableItemsHandlerPrivate { /* This component's alias */ - char *this_component; + gchar *this_component; /* For creating items on the view */ EUserCreatableItemsHandlerCreate create_local; - void *create_data; + gpointer create_data; /* The components that register user creatable items. */ GSList *components; /* Component */ @@ -85,7 +85,7 @@ struct _EUserCreatableItemsHandlerPrivate { const MenuItem *fallback_menu_item; const MenuItem *default_menu_item; - char *menu_xml; + gchar *menu_xml; GtkWidget *new_button, *new_menu; BonoboControl *new_control; GtkAccelGroup *accel_group; @@ -101,8 +101,8 @@ G_DEFINE_TYPE (EUserCreatableItemsHandler, e_user_creatable_items_handler, G_TYP /* Component struct handling. */ static Component * -component_new (const char *id, - const char *component_alias, +component_new (const gchar *id, + const gchar *component_alias, GNOME_Evolution_Component component) { CORBA_Environment ev; @@ -149,7 +149,7 @@ component_free (Component *component) g_free (component); } -static const char *component_query = +static const gchar *component_query = "repo_ids.has ('IDL:GNOME/Evolution/Component:" BASE_VERSION "')"; static void @@ -159,15 +159,15 @@ get_components_from_bonobo (EUserCreatableItemsHandler *handler) Bonobo_ActivationProperty *property; CORBA_Environment ev; const gchar *alias; - char *iid; + gchar *iid; GNOME_Evolution_Component corba_component; Component *component; - int i; + gint i; CORBA_exception_init (&ev); info_list = bonobo_activation_query (component_query, NULL, &ev); if (BONOBO_EX (&ev)) { - char *ex_text = bonobo_exception_get_text (&ev); + gchar *ex_text = bonobo_exception_get_text (&ev); g_warning ("Cannot query for components: %s\n", ex_text); g_free (ex_text); CORBA_exception_free (&ev); @@ -198,7 +198,7 @@ get_components_from_bonobo (EUserCreatableItemsHandler *handler) static gboolean item_is_default (const MenuItem *item, - const char *component) + const gchar *component) { if (component == NULL) return FALSE; @@ -209,8 +209,8 @@ item_is_default (const MenuItem *item, return FALSE; } -static char * -create_verb (EUserCreatableItemsHandler *handler, int component_num, const char *comp, const char *type_id) +static gchar * +create_verb (EUserCreatableItemsHandler *handler, gint component_num, const gchar *comp, const gchar *type_id) { return g_strdup_printf ("EUserCreatableItemsHandler-%s:%d:%s", comp, component_num, type_id); } @@ -224,8 +224,8 @@ ensure_menu_items (EUserCreatableItemsHandler *handler) EUserCreatableItemsHandlerPrivate *priv; GSList *objects, *folders; GSList *p; - int component_num; - const char *default_verb; + gint component_num; + const gchar *default_verb; priv = handler->priv; if (priv->objects != NULL) @@ -236,7 +236,7 @@ ensure_menu_items (EUserCreatableItemsHandler *handler) default_verb = NULL; for (p = priv->components; p != NULL; p = p->next) { const Component *component; - int i; + gint i; component = (const Component *) p->data; if (component->type_list != NULL) { @@ -344,15 +344,15 @@ get_default_action_for_view (EUserCreatableItemsHandler *handler) static void execute_verb (EUserCreatableItemsHandler *handler, - const char *verb_name) + const gchar *verb_name) { EUserCreatableItemsHandlerPrivate *priv; const Component *component; - int component_number; - const char *p; - const char *id; + gint component_number; + const gchar *p; + const gchar *id; GSList *component_list_item; - int i; + gint i; priv = handler->priv; @@ -397,8 +397,8 @@ execute_verb (EUserCreatableItemsHandler *handler, static void verb_fn (BonoboUIComponent *ui_component, - void *data, - const char *verb_name) + gpointer data, + const gchar *verb_name) { EUserCreatableItemsHandler *handler= E_USER_CREATABLE_ITEMS_HANDLER (data); @@ -411,7 +411,7 @@ add_verbs (EUserCreatableItemsHandler *handler, BonoboUIComponent *ui_component) { EUserCreatableItemsHandlerPrivate *priv; - int component_num; + gint component_num; GSList *p; priv = handler->priv; @@ -419,13 +419,13 @@ add_verbs (EUserCreatableItemsHandler *handler, component_num = 0; for (p = priv->components; p != NULL; p = p->next) { const Component *component; - int i; + gint i; component = (const Component *) p->data; if (component->type_list != NULL) { for (i = 0; i < component->type_list->_length; i ++) { - char *verb_name; + gchar *verb_name; verb_name = create_verb (handler, component_num, @@ -446,12 +446,12 @@ add_verbs (EUserCreatableItemsHandler *handler, /* Generic menu construction code */ static int -item_types_sort_func (const void *a, - const void *b) +item_types_sort_func (gconstpointer a, + gconstpointer b) { const MenuItem *item_a; const MenuItem *item_b; - const char *p1, *p2; + const gchar *p1, *p2; item_a = (const MenuItem *) a; item_b = (const MenuItem *) b; @@ -559,8 +559,8 @@ xml_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, MenuItem *item, gboolean first) { GString *xml = menu; - char *encoded_label; - char *encoded_tooltip; + gchar *encoded_label; + gchar *encoded_tooltip; encoded_label = bonobo_ui_util_encode_str (item->label); g_string_append_printf (xml, "<menuitem name=\"New:%s\" verb=\"%s\" label=\"%s\"", @@ -572,7 +572,7 @@ xml_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, g_string_append_printf (xml, " accel=\"*Control**Shift*%c\"", item->shortcut); if (item->icon != NULL) { - char *icon_xml; + gchar *icon_xml; icon_xml = bonobo_ui_util_pixbuf_to_xml (item->icon); g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", icon_xml); @@ -589,7 +589,7 @@ xml_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, } static void -xml_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, int nth) +xml_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, gint nth) { GString *xml = menu; @@ -616,7 +616,7 @@ static void menuitem_activate (GtkMenuItem *item, gpointer data) { EUserCreatableItemsHandler *handler = data; - const char *verb; + const gchar *verb; verb = g_object_get_data (G_OBJECT (item), "EUserCreatableItemsHandler:verb"); execute_verb (handler, verb); @@ -665,7 +665,7 @@ gtk_menu_item_func (EUserCreatableItemsHandler *handler, gpointer menu, } static void -gtk_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, int nth) +gtk_separator_func (EUserCreatableItemsHandler *handler, gpointer menu, gint nth) { gtk_menu_shell_append (menu, gtk_separator_menu_item_new ()); } @@ -696,12 +696,12 @@ set_combo_button_style (EComboButton *button, const gchar *style, GdkPixbuf *ico static void new_button_change (GConfClient *gconf, - unsigned int connection_id, + guint connection_id, GConfEntry *entry, EUserCreatableItemsHandler *handler) { EUserCreatableItemsHandlerPrivate *priv; - char *val; + gchar *val; priv = handler->priv; val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL); @@ -718,7 +718,7 @@ setup_toolbar_button (EUserCreatableItemsHandler *handler) { EUserCreatableItemsHandlerPrivate *priv; GConfClient *gconf = gconf_client_get_default (); - char *val; + gchar *val; priv = handler->priv; val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL); @@ -866,8 +866,8 @@ e_user_creatable_items_handler_init (EUserCreatableItemsHandler *handler) EUserCreatableItemsHandler * -e_user_creatable_items_handler_new (const char *component_alias, - EUserCreatableItemsHandlerCreate create_local, void *data) +e_user_creatable_items_handler_new (const gchar *component_alias, + EUserCreatableItemsHandlerCreate create_local, gpointer data) { EUserCreatableItemsHandler *handler; diff --git a/shell/e-user-creatable-items-handler.h b/shell/e-user-creatable-items-handler.h index b9be272af1..5350691eae 100644 --- a/shell/e-user-creatable-items-handler.h +++ b/shell/e-user-creatable-items-handler.h @@ -43,7 +43,7 @@ typedef struct _EUserCreatableItemsHandler EUserCreatableItemsHandler; typedef struct _EUserCreatableItemsHandlerPrivate EUserCreatableItemsHandlerPrivate; typedef struct _EUserCreatableItemsHandlerClass EUserCreatableItemsHandlerClass; -typedef void (*EUserCreatableItemsHandlerCreate)(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data); +typedef void (*EUserCreatableItemsHandlerCreate)(EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data); struct _EUserCreatableItemsHandler { GObject parent; @@ -57,8 +57,8 @@ struct _EUserCreatableItemsHandlerClass { GType e_user_creatable_items_handler_get_type (void); -EUserCreatableItemsHandler *e_user_creatable_items_handler_new (const char *component_alias, - EUserCreatableItemsHandlerCreate create_local, void *data); +EUserCreatableItemsHandler *e_user_creatable_items_handler_new (const gchar *component_alias, + EUserCreatableItemsHandlerCreate create_local, gpointer data); void e_user_creatable_items_handler_activate (EUserCreatableItemsHandler *handler, BonoboUIComponent *ui_component); diff --git a/shell/es-event.c b/shell/es-event.c index 43a55c3fd5..5740d585c7 100644 --- a/shell/es-event.c +++ b/shell/es-event.c @@ -113,7 +113,7 @@ ESEvent *es_event_peek(void) } ESEventTargetState * -es_event_target_new_state(ESEvent *eme, int state) +es_event_target_new_state(ESEvent *eme, gint state) { ESEventTargetState *t = e_event_target_new(&eme->event, ES_EVENT_TARGET_STATE, sizeof(*t)); guint32 mask = ~0; @@ -141,7 +141,7 @@ es_event_target_new_shell(ESEvent *eme, EShell *shell) } ESEventTargetUpgrade * -es_event_target_new_upgrade(ESEvent *eme, int major, int minor, int revision) +es_event_target_new_upgrade(ESEvent *eme, gint major, gint minor, gint revision) { ESEventTargetUpgrade *t = e_event_target_new(&eme->event, ES_EVENT_TARGET_UPGRADE, sizeof(*t)); @@ -153,7 +153,7 @@ es_event_target_new_upgrade(ESEvent *eme, int major, int minor, int revision) } ESEventTargetComponent * -es_event_target_new_component (ESEvent *eme, const char *id) +es_event_target_new_component (ESEvent *eme, const gchar *id) { ESEventTargetComponent *t = e_event_target_new (&eme->event, ES_EVENT_TARGET_COMPONENT, sizeof (*t)); @@ -164,7 +164,7 @@ es_event_target_new_component (ESEvent *eme, const char *id) /* ********************************************************************** */ -static void *emeh_parent_class; +static gpointer emeh_parent_class; #define emeh ((ESEventHook *)eph) static const EEventHookTargetMask emeh_state_masks[] = { @@ -192,7 +192,7 @@ emeh_finalise(GObject *o) static void emeh_class_init(EPluginHookClass *klass) { - int i; + gint i; /** @HookClass: Shell Main Menu * @Id: org.gnome.evolution.shell.events:1.0 diff --git a/shell/es-event.h b/shell/es-event.h index 5ac363b8c8..0fa2ae0484 100644 --- a/shell/es-event.h +++ b/shell/es-event.h @@ -66,21 +66,21 @@ struct _ESEventTargetShell { struct _ESEventTargetState { EEventTarget target; - int state; + gint state; }; struct _ESEventTargetUpgrade { EEventTarget target; - int major; - int minor; - int revision; + gint major; + gint minor; + gint revision; }; struct _ESEventTargetComponent { EEventTarget target; - const char *id; + const gchar *id; }; typedef struct _EEventItem ESEventItem; @@ -100,10 +100,10 @@ GType es_event_get_type(void); ESEvent *es_event_peek(void); -ESEventTargetState *es_event_target_new_state(ESEvent *emp, int state); +ESEventTargetState *es_event_target_new_state(ESEvent *emp, gint state); ESEventTargetShell *es_event_target_new_shell(ESEvent *eme, struct _EShell *shell); -ESEventTargetUpgrade *es_event_target_new_upgrade(ESEvent *emp, int major, int minor, int revision); -ESEventTargetComponent *es_event_target_new_component(ESEvent *eme, const char *id); +ESEventTargetUpgrade *es_event_target_new_upgrade(ESEvent *emp, gint major, gint minor, gint revision); +ESEventTargetComponent *es_event_target_new_component(ESEvent *eme, const gchar *id); /* ********************************************************************** */ diff --git a/shell/es-menu.c b/shell/es-menu.c index 3b459268a3..93fa3b339d 100644 --- a/shell/es-menu.c +++ b/shell/es-menu.c @@ -87,7 +87,7 @@ es_menu_get_type(void) return type; } -ESMenu *es_menu_new(const char *menuid) +ESMenu *es_menu_new(const gchar *menuid) { ESMenu *esm = g_object_new(es_menu_get_type(), NULL); @@ -120,7 +120,7 @@ es_menu_target_new_shell(ESMenu *esm, guint32 flags) /* ********************************************************************** */ -static void *esph_parent_class; +static gpointer esph_parent_class; #define esph ((ESMenuHook *)eph) static const EMenuHookTargetMask esph_shell_masks[] = { @@ -145,7 +145,7 @@ esph_finalise(GObject *o) static void esph_class_init(EPluginHookClass *klass) { - int i; + gint i; /** @HookClass: Shell Main Menu * @Id: org.gnome.evolution.shell.bonobomenu:1.0 diff --git a/shell/es-menu.h b/shell/es-menu.h index 9e9e0613b0..298de64e6e 100644 --- a/shell/es-menu.h +++ b/shell/es-menu.h @@ -71,7 +71,7 @@ struct _ESMenuClass { GType es_menu_get_type(void); -ESMenu *es_menu_new(const char *menuid); +ESMenu *es_menu_new(const gchar *menuid); ESMenuTargetShell *es_menu_target_new_shell(ESMenu *emp, guint32 flags); diff --git a/shell/evolution-listener.c b/shell/evolution-listener.c index 4bf9a76376..3209450134 100644 --- a/shell/evolution-listener.c +++ b/shell/evolution-listener.c @@ -59,7 +59,7 @@ evolution_listener_init(EvolutionListener *emf, EvolutionListenerClass *klass) BONOBO_TYPE_FUNC_FULL (EvolutionListener, GNOME_Evolution_Listener, PARENT_TYPE, evolution_listener) EvolutionListener * -evolution_listener_new(EvolutionListenerFunc complete, void *data) +evolution_listener_new(EvolutionListenerFunc complete, gpointer data) { EvolutionListener *el; diff --git a/shell/evolution-listener.h b/shell/evolution-listener.h index 7b79b3bab8..9637342099 100644 --- a/shell/evolution-listener.h +++ b/shell/evolution-listener.h @@ -32,14 +32,14 @@ typedef struct _EvolutionListener EvolutionListener; typedef struct _EvolutionListenerClass EvolutionListenerClass; -typedef void (*EvolutionListenerFunc)(EvolutionListener *, void *); +typedef void (*EvolutionListenerFunc)(EvolutionListener *, gpointer ); struct _EvolutionListener { BonoboObject parent; /* we dont need signals, so why bother wasting resources on it */ EvolutionListenerFunc complete; - void *data; + gpointer data; }; struct _EvolutionListenerClass { @@ -49,6 +49,6 @@ struct _EvolutionListenerClass { }; GType evolution_listener_get_type(void); -EvolutionListener *evolution_listener_new(EvolutionListenerFunc complete, void *data); +EvolutionListener *evolution_listener_new(EvolutionListenerFunc complete, gpointer data); #endif /* _EVOLUTION_LISTENER_H_ */ diff --git a/shell/evolution-shell-component-utils.c b/shell/evolution-shell-component-utils.c index a8ce855268..bcbe610e4e 100644 --- a/shell/evolution-shell-component-utils.c +++ b/shell/evolution-shell-component-utils.c @@ -39,8 +39,8 @@ static GSList *inited_arrays = NULL; void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache) { - static int done_init = 0; - int i; + static gint done_init = 0; + gint i; if (!done_init) { g_atexit (free_pixmaps); @@ -72,7 +72,7 @@ void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache) static void free_pixmaps (void) { - int i; + gint i; GSList *li; for (li = inited_arrays; li != NULL; li = li->next) { @@ -93,7 +93,7 @@ free_pixmaps (void) * * Return value: A newly allocated string with the printable error message. **/ -char * +gchar * e_get_activation_failure_msg (CORBA_Environment *ev) { g_return_val_if_fail (ev != NULL, NULL); diff --git a/shell/evolution-shell-component-utils.h b/shell/evolution-shell-component-utils.h index ce4fa11229..477643e93d 100644 --- a/shell/evolution-shell-component-utils.h +++ b/shell/evolution-shell-component-utils.h @@ -31,10 +31,10 @@ extern "C" { #endif /* __cplusplus */ typedef struct _EPixmap { - const char *path; - const char *name; + const gchar *path; + const gchar *name; GtkIconSize size; - char *pixbuf; + gchar *pixbuf; } EPixmap; #define E_PIXMAP(path,name,size) { (path), (name), (size), NULL } @@ -43,7 +43,7 @@ typedef struct _EPixmap { /* Takes an array of pixmaps, terminated by E_PIXMAP_END, and loads into uic */ void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache); -char *e_get_activation_failure_msg (CORBA_Environment *ev); +gchar *e_get_activation_failure_msg (CORBA_Environment *ev); #ifdef __cplusplus } diff --git a/shell/importer/evolution-importer-client.c b/shell/importer/evolution-importer-client.c index 06d30d5733..66a82836e3 100644 --- a/shell/importer/evolution-importer-client.c +++ b/shell/importer/evolution-importer-client.c @@ -92,7 +92,7 @@ evolution_importer_client_new (const CORBA_Object objref) * Returns: A newly created EvolutionImporterClient. */ EvolutionImporterClient * -evolution_importer_client_new_from_id (const char *id) +evolution_importer_client_new_from_id (const gchar *id) { CORBA_Environment ev; CORBA_Object objref; @@ -100,7 +100,7 @@ evolution_importer_client_new_from_id (const char *id) g_return_val_if_fail (id != NULL, NULL); CORBA_exception_init (&ev); - objref = bonobo_activation_activate_from_id ((char *) id, 0, NULL, &ev); + objref = bonobo_activation_activate_from_id ((gchar *) id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { CORBA_exception_free (&ev); g_warning ("Could not start %s.", id); @@ -154,7 +154,7 @@ evolution_importer_client_create_control (EvolutionImporterClient *client) */ gboolean evolution_importer_client_support_format (EvolutionImporterClient *client, - const char *filename) + const gchar *filename) { GNOME_Evolution_Importer corba_importer; gboolean result; @@ -185,7 +185,7 @@ evolution_importer_client_support_format (EvolutionImporterClient *client, * Returns: TRUE on sucess, FALSE on failure. */ gboolean -evolution_importer_client_load_file (EvolutionImporterClient *client, const char *filename) +evolution_importer_client_load_file (EvolutionImporterClient *client, const gchar *filename) { GNOME_Evolution_Importer corba_importer; gboolean result; @@ -248,7 +248,7 @@ evolution_importer_client_process_item (EvolutionImporterClient *client, * Returns: The error as a string. If there is no error NULL is returned. * Importers need not support this method and if so, NULL is also returned. */ -const char * +const gchar * evolution_importer_client_get_error (EvolutionImporterClient *client) { GNOME_Evolution_Importer corba_importer; diff --git a/shell/importer/evolution-importer-client.h b/shell/importer/evolution-importer-client.h index 3ae4b2f7b0..2a71e58a45 100644 --- a/shell/importer/evolution-importer-client.h +++ b/shell/importer/evolution-importer-client.h @@ -56,16 +56,16 @@ struct _EvolutionImporterClientClass { GType evolution_importer_client_get_type (void); EvolutionImporterClient *evolution_importer_client_new (const CORBA_Object objref); -EvolutionImporterClient *evolution_importer_client_new_from_id (const char *id); +EvolutionImporterClient *evolution_importer_client_new_from_id (const gchar *id); GtkWidget *evolution_importer_client_create_control (EvolutionImporterClient *client); gboolean evolution_importer_client_support_format (EvolutionImporterClient *client, - const char *filename); + const gchar *filename); gboolean evolution_importer_client_load_file (EvolutionImporterClient *client, - const char *filename); + const gchar *filename); void evolution_importer_client_process_item (EvolutionImporterClient *client, EvolutionImporterListener *listener); -const char *evolution_importer_client_get_error (EvolutionImporterClient *client); +const gchar *evolution_importer_client_get_error (EvolutionImporterClient *client); #ifdef __cplusplus } diff --git a/shell/importer/evolution-importer-listener.c b/shell/importer/evolution-importer-listener.c index 8915202d30..ffac2d3ab4 100644 --- a/shell/importer/evolution-importer-listener.c +++ b/shell/importer/evolution-importer-listener.c @@ -37,7 +37,7 @@ static BonoboObjectClass *parent_class = NULL; struct _EvolutionImporterListenerPrivate { EvolutionImporterListenerCallback callback; - void *closure; + gpointer closure; }; #if 0 @@ -185,7 +185,7 @@ evolution_importer_listener_init (EvolutionImporterListener *listener) static void evolution_importer_listener_construct (EvolutionImporterListener *listener, EvolutionImporterListenerCallback callback, - void *closure) + gpointer closure) { EvolutionImporterListenerPrivate *priv; @@ -209,7 +209,7 @@ evolution_importer_listener_construct (EvolutionImporterListener *listener, */ EvolutionImporterListener * evolution_importer_listener_new (EvolutionImporterListenerCallback callback, - void *closure) + gpointer closure) { EvolutionImporterListener *listener; diff --git a/shell/importer/evolution-importer-listener.h b/shell/importer/evolution-importer-listener.h index 63f480e4dd..e4df945271 100644 --- a/shell/importer/evolution-importer-listener.h +++ b/shell/importer/evolution-importer-listener.h @@ -46,7 +46,7 @@ typedef struct _EvolutionImporterListenerClass EvolutionImporterListenerClass; typedef void (* EvolutionImporterListenerCallback) (EvolutionImporterListener *listener, EvolutionImporterResult result, gboolean more_items, - void *closure); + gpointer closure); struct _EvolutionImporterListener { BonoboObject parent; @@ -62,7 +62,7 @@ struct _EvolutionImporterListenerClass { GType evolution_importer_listener_get_type (void); EvolutionImporterListener *evolution_importer_listener_new (EvolutionImporterListenerCallback callback, - void *closure); + gpointer closure); #ifdef __cplusplus } diff --git a/shell/importer/evolution-importer.c b/shell/importer/evolution-importer.c index f8e6847891..26b06e7c20 100644 --- a/shell/importer/evolution-importer.c +++ b/shell/importer/evolution-importer.c @@ -41,7 +41,7 @@ struct _EvolutionImporterPrivate { EvolutionImporterProcessItemFn process_item_fn; EvolutionImporterGetErrorFn get_error_fn; - void *closure; + gpointer closure; }; @@ -194,7 +194,7 @@ evolution_importer_construct (EvolutionImporter *importer, EvolutionImporterLoadFileFn load_file_fn, EvolutionImporterProcessItemFn process_item_fn, EvolutionImporterGetErrorFn get_error_fn, - void *closure) + gpointer closure) { EvolutionImporterPrivate *priv; @@ -233,7 +233,7 @@ evolution_importer_new (EvolutionImporterCreateControlFn create_control_fn, EvolutionImporterLoadFileFn load_file_fn, EvolutionImporterProcessItemFn process_item_fn, EvolutionImporterGetErrorFn get_error_fn, - void *closure) + gpointer closure) { EvolutionImporter *importer; diff --git a/shell/importer/evolution-importer.h b/shell/importer/evolution-importer.h index 4925fad4fc..b4bf54928f 100644 --- a/shell/importer/evolution-importer.h +++ b/shell/importer/evolution-importer.h @@ -44,20 +44,20 @@ typedef struct _EvolutionImporterClass EvolutionImporterClass; typedef void (* EvolutionImporterCreateControlFn) (EvolutionImporter *importer, Bonobo_Control *control, - void *closure); + gpointer closure); typedef gboolean (* EvolutionImporterSupportFormatFn) (EvolutionImporter *importer, - const char *filename, - void *closure); + const gchar *filename, + gpointer closure); typedef gboolean (* EvolutionImporterLoadFileFn) (EvolutionImporter *importer, - const char *filename, - void *closure); + const gchar *filename, + gpointer closure); typedef void (* EvolutionImporterProcessItemFn) (EvolutionImporter *importer, CORBA_Object listener, - void *closure, + gpointer closure, CORBA_Environment *ev); -typedef char *(* EvolutionImporterGetErrorFn) (EvolutionImporter *importer, - void *closure); +typedef gchar *(* EvolutionImporterGetErrorFn) (EvolutionImporter *importer, + gpointer closure); typedef enum { EVOLUTION_IMPORTER_OK, diff --git a/shell/importer/evolution-intelligent-importer.c b/shell/importer/evolution-intelligent-importer.c index d867c120b8..48c767cfde 100644 --- a/shell/importer/evolution-intelligent-importer.c +++ b/shell/importer/evolution-intelligent-importer.c @@ -37,9 +37,9 @@ struct _EvolutionIntelligentImporterPrivate { EvolutionIntelligentImporterCanImportFn can_import_fn; EvolutionIntelligentImporterImportDataFn import_data_fn; - char *importername; - char *message; - void *closure; + gchar *importername; + gchar *message; + gpointer closure; }; @@ -148,9 +148,9 @@ static void evolution_intelligent_importer_construct (EvolutionIntelligentImporter *ii, EvolutionIntelligentImporterCanImportFn can_import_fn, EvolutionIntelligentImporterImportDataFn import_data_fn, - const char *importername, - const char *message, - void *closure) + const gchar *importername, + const gchar *message, + gpointer closure) { g_return_if_fail (ii != NULL); ii->priv->importername = g_strdup (importername); @@ -178,9 +178,9 @@ evolution_intelligent_importer_construct (EvolutionIntelligentImporter *ii, EvolutionIntelligentImporter * evolution_intelligent_importer_new (EvolutionIntelligentImporterCanImportFn can_import_fn, EvolutionIntelligentImporterImportDataFn import_data_fn, - const char *importername, - const char *message, - void *closure) + const gchar *importername, + const gchar *message, + gpointer closure) { EvolutionIntelligentImporter *ii; diff --git a/shell/importer/evolution-intelligent-importer.h b/shell/importer/evolution-intelligent-importer.h index 2d36d498e9..99d5d2b26d 100644 --- a/shell/importer/evolution-intelligent-importer.h +++ b/shell/importer/evolution-intelligent-importer.h @@ -43,9 +43,9 @@ typedef struct _EvolutionIntelligentImporterPrivate EvolutionIntelligentImporter typedef struct _EvolutionIntelligentImporterClass EvolutionIntelligentImporterClass; typedef gboolean (* EvolutionIntelligentImporterCanImportFn) (EvolutionIntelligentImporter *ii, - void *closure); + gpointer closure); typedef void (* EvolutionIntelligentImporterImportDataFn) (EvolutionIntelligentImporter *ii, - void *closure); + gpointer closure); struct _EvolutionIntelligentImporter { BonoboObject parent; @@ -63,9 +63,9 @@ GType evolution_intelligent_importer_get_type (void); EvolutionIntelligentImporter *evolution_intelligent_importer_new (EvolutionIntelligentImporterCanImportFn can_import_fn, EvolutionIntelligentImporterImportDataFn import_data_fn, - const char *importername, - const char *message, - void *closure); + const gchar *importername, + const gchar *message, + gpointer closure); #ifdef __cplusplus } diff --git a/shell/importer/intelligent.c b/shell/importer/intelligent.c index 20927d2742..8b7ebaa743 100644 --- a/shell/importer/intelligent.c +++ b/shell/importer/intelligent.c @@ -48,9 +48,9 @@ typedef struct { Bonobo_Control control; GtkWidget *widget; - char *name; - char *blurb; - char *iid; + gchar *name; + gchar *blurb; + gchar *iid; } IntelligentImporterData; typedef struct { @@ -61,12 +61,12 @@ typedef struct { GList *importers; - int running; + gint running; } IntelligentImporterDialog; typedef struct { CORBA_Object importer; - char *iid; + gchar *iid; } SelectedImporterData; static void @@ -119,7 +119,7 @@ get_intelligent_importers (void) Bonobo_ServerInfoList *info_list; GList *iids_ret = NULL; CORBA_Environment ev; - int i; + gint i; CORBA_exception_init (&ev); info_list = bonobo_activation_query ("repo_ids.has ('IDL:GNOME/Evolution/IntelligentImporter:" BASE_VERSION "')", NULL, &ev); @@ -137,8 +137,8 @@ get_intelligent_importers (void) static void select_row_cb (GtkCList *clist, - int row, - int column, + gint row, + gint column, GdkEvent *ev, IntelligentImporterDialog *d) { @@ -147,8 +147,8 @@ select_row_cb (GtkCList *clist, static void unselect_row_cb (GtkCList *clist, - int row, - int column, + gint row, + gint column, GdkEvent *ev, IntelligentImporterDialog *d) { @@ -162,7 +162,7 @@ create_gui (GList *importers) GtkWidget *hbox, *vbox, *dummy; IntelligentImporterDialog *d; GList *l; - int running = 0; + gint running = 0; d = g_new (IntelligentImporterDialog, 1); d->dialog = dialog = gtk_dialog_new(); @@ -220,7 +220,7 @@ create_gui (GList *importers) IntelligentImporterData *data; CORBA_Environment ev; gboolean dontaskagain, can_run; - char *text[1], *prefix; + gchar *text[1], *prefix; /* Check if we want to show this one again */ prefix = g_strdup_printf ("=%s/evolution/config/Shell=/intelligent-importers/", g_get_home_dir ()); @@ -237,7 +237,7 @@ create_gui (GList *importers) data->iid = g_strdup (l->data); CORBA_exception_init (&ev); - data->object = bonobo_activation_activate_from_id ((char *) data->iid, 0, + data->object = bonobo_activation_activate_from_id ((gchar *) data->iid, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { g_warning ("Could not start %s: %s", data->iid, @@ -359,9 +359,9 @@ intelligent_importer_init (void) { GList *importers, *l, *selected = NULL; IntelligentImporterDialog *d; - char *prefix; + gchar *prefix; gboolean dontaskagain; - int resp; + gint resp; prefix = g_strdup_printf ("=%s/evolution/config/Shell=/intelligent-importers/", g_get_home_dir()); gnome_config_push_prefix (prefix); @@ -395,7 +395,7 @@ intelligent_importer_init (void) IntelligentImporterData *data; SelectedImporterData *new_data; CORBA_Environment ev; - char *iid; + gchar *iid; data = g_list_nth_data (d->importers, GPOINTER_TO_INT (l->data)); iid = g_strdup (data->iid); diff --git a/shell/main.c b/shell/main.c index c6959d7663..4032c5544e 100644 --- a/shell/main.c +++ b/shell/main.c @@ -106,8 +106,8 @@ static gboolean disable_eplugin = FALSE; static gboolean disable_preview = FALSE; static gboolean idle_cb (gchar **uris); -static char *default_component_id = NULL; -static char *evolution_debug_log = NULL; +static gchar *default_component_id = NULL; +static gchar *evolution_debug_log = NULL; static gchar **remaining_args; static void @@ -118,7 +118,7 @@ no_windows_left_cb (EShell *shell, gpointer data) } static void -shell_weak_notify (void *data, +shell_weak_notify (gpointer data, GObject *where_the_object_was) { bonobo_main_quit (); @@ -199,7 +199,7 @@ show_development_warning(void) GtkWidget *checkbox; GtkWidget *alignment; gboolean skip; - char *text; + gchar *text; warning_dialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (warning_dialog), "Evolution " VERSION); @@ -422,7 +422,7 @@ static GStaticMutex segv_mutex = G_STATIC_MUTEX_INIT; static pthread_t main_thread; static void -segv_redirect (int sig) +segv_redirect (gint sig) { if (pthread_self () == main_thread) gnome_segv_handler (sig); @@ -562,8 +562,8 @@ set_paths (void) } #endif -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { #ifdef G_OS_WIN32 extern void link_shutdown (void); @@ -576,7 +576,7 @@ main (int argc, char **argv) GnomeProgram *program; GnomeClient *master_client; GOptionContext *context; - char *filename; + gchar *filename; /* Make ElectricFence work. */ free (malloc (10)); @@ -645,7 +645,7 @@ main (int argc, char **argv) setup_segv_redirect (); if (evolution_debug_log) { - int fd; + gint fd; fd = g_open (evolution_debug_log, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd != -1) { diff --git a/shell/test/evolution-test-component.c b/shell/test/evolution-test-component.c index 9fdeab7a3f..25df4d547a 100644 --- a/shell/test/evolution-test-component.c +++ b/shell/test/evolution-test-component.c @@ -103,7 +103,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, list->_buffer[0].id = CREATE_TEST_ID; list->_buffer[0].description = _("New Test"); - list->_buffer[0].menuDescription = (char *) C_("New", "_Test"); + list->_buffer[0].menuDescription = (gchar *) C_("New", "_Test"); list->_buffer[0].tooltip = _("Create a new test item"); list->_buffer[0].menuShortcut = 'i'; list->_buffer[0].iconName = ""; @@ -161,8 +161,8 @@ BONOBO_TYPE_FUNC_FULL (EvolutionTestComponent, GNOME_Evolution_Component, PARENT static BonoboObject * factory (BonoboGenericFactory *factory, - const char *component_id, - void *closure) + const gchar *component_id, + gpointer closure) { if (strcmp (component_id, TEST_COMPONENT_ID) == 0) { BonoboObject *object = BONOBO_OBJECT (g_object_new (EVOLUTION_TEST_TYPE_COMPONENT, NULL)); diff --git a/smime/gui/ca-trust-dialog.c b/smime/gui/ca-trust-dialog.c index f3a47e1181..1f79754757 100644 --- a/smime/gui/ca-trust-dialog.c +++ b/smime/gui/ca-trust-dialog.c @@ -75,8 +75,8 @@ ca_trust_dialog_show (ECert *cert, gboolean importing) { CATrustDialogData *ctd_data; GtkWidget *w; - char *txt; - char *gladefile; + gchar *txt; + gchar *gladefile; ctd_data = g_new0 (CATrustDialogData, 1); diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c index 0e4af90edc..b32a7c58c7 100644 --- a/smime/gui/cert-trust-dialog.c +++ b/smime/gui/cert-trust-dialog.c @@ -51,7 +51,7 @@ typedef struct { } CertTrustDialogData; static void -free_data (void *data) +free_data (gpointer data) { CertTrustDialogData *ctd = data; @@ -116,7 +116,7 @@ cert_trust_dialog_show (ECert *cert) { CertTrustDialogData *ctd_data; CERTCertificate *icert; - char *gladefile; + gchar *gladefile; ctd_data = g_new0 (CertTrustDialogData, 1); diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index c5261e879b..e0663f0578 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -93,7 +93,7 @@ static void add_ca_cert (CertificateManagerData *cfm, ECert *cert); static void handle_selection_changed (GtkTreeSelection *selection, - int cert_column, + gint cert_column, GtkWidget *view_button, GtkWidget *edit_button, GtkWidget *delete_button) @@ -153,7 +153,7 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); /* destroy dialog to get rid of it in the GUI */ gtk_widget_destroy (filesel); @@ -400,7 +400,7 @@ import_contact (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); /* destroy dialog to get rid of it in the GUI */ gtk_widget_destroy (filesel); @@ -627,7 +627,7 @@ import_ca (GtkWidget *widget, CertificateManagerData *cfm) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (filesel), filter); if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) { - char *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); + gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); /* destroy dialog to get rid of it in the GUI */ gtk_widget_destroy (filesel); @@ -739,7 +739,7 @@ add_user_cert (CertificateManagerData *cfm, ECert *cert) { GtkTreeIter iter; GtkTreeIter *parent_iter = NULL; - const char *organization = e_cert_get_org (cert); + const gchar *organization = e_cert_get_org (cert); GtkTreeModel *model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (cfm->yourcerts_streemodel)); if (organization) { @@ -783,7 +783,7 @@ add_contact_cert (CertificateManagerData *cfm, ECert *cert) { GtkTreeIter iter; GtkTreeIter *parent_iter = NULL; - const char *organization = e_cert_get_org (cert); + const gchar *organization = e_cert_get_org (cert); GtkTreeModel *model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (cfm->contactcerts_streemodel)); if (organization) { @@ -825,7 +825,7 @@ add_ca_cert (CertificateManagerData *cfm, ECert *cert) { GtkTreeIter iter; GtkTreeIter *parent_iter = NULL; - const char *organization = e_cert_get_org (cert); + const gchar *organization = e_cert_get_org (cert); GtkTreeModel *model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (cfm->authoritycerts_streemodel)); if (organization) { @@ -994,7 +994,7 @@ certificate_manager_config_control_new (void) { CertificateManagerData *cfm_data; GtkWidget *control_widget; - char *gladefile; + gchar *gladefile; /* We need to peek the db here to make sure it (and NSS) are fully initialized. */ e_cert_db_peek (); diff --git a/smime/gui/certificate-viewer.c b/smime/gui/certificate-viewer.c index 997bbace46..37289c3e8b 100644 --- a/smime/gui/certificate-viewer.c +++ b/smime/gui/certificate-viewer.c @@ -64,8 +64,8 @@ static void fill_in_general (CertificateViewerData *cvm_data, ECert *cert) { GtkWidget *label; - const char *text; - char *markup; + const gchar *text; + gchar *markup; /* issued to */ label = glade_xml_get_widget (cvm_data->gui, "issued-to-cn"); @@ -225,7 +225,7 @@ fields_selection_changed (GtkTreeSelection *selection, CertificateViewerData *cv &model, &iter)) { EASN1Object *asn1_object; - const char *value; + const gchar *value; gtk_tree_model_get (model, &iter, @@ -296,7 +296,7 @@ fill_in_details (CertificateViewerData *cvm_data, ECert *cert) cvm_data->cert_chain = g_list_reverse (cvm_data->cert_chain); for (l = cvm_data->cert_chain; l; l = l->next) { ECert *c = l->data; - const char *str; + const gchar *str; GtkTreeIter new_iter; str = e_cert_get_cn (c); @@ -319,8 +319,8 @@ GtkWidget* certificate_viewer_show (ECert *cert) { CertificateViewerData *cvm_data; - char *title; - char *gladefile; + gchar *title; + gchar *gladefile; cvm_data = g_new0 (CertificateViewerData, 1); diff --git a/smime/gui/component.c b/smime/gui/component.c index 1096aa2a5e..48546bf75f 100644 --- a/smime/gui/component.c +++ b/smime/gui/component.c @@ -36,10 +36,10 @@ #include "pk11func.h" static gboolean -smime_pk11_passwd (ECertDB *db, PK11SlotInfo* slot, gboolean retry, char **passwd, gpointer arg) +smime_pk11_passwd (ECertDB *db, PK11SlotInfo* slot, gboolean retry, gchar **passwd, gpointer arg) { - char *prompt; - char *slot_name = g_strdup (PK11_GetSlotName (slot)); + gchar *prompt; + gchar *slot_name = g_strdup (PK11_GetSlotName (slot)); g_strchomp (slot_name); @@ -58,9 +58,9 @@ smime_pk11_passwd (ECertDB *db, PK11SlotInfo* slot, gboolean retry, char **passw } static gboolean -smime_pk11_change_passwd (ECertDB *db, char **old_passwd, char **passwd, gpointer arg) +smime_pk11_change_passwd (ECertDB *db, gchar **old_passwd, gchar **passwd, gpointer arg) { - char *prompt; + gchar *prompt; /* XXX need better strings here, just copy mozilla's? */ @@ -86,7 +86,7 @@ static gboolean smime_confirm_ca_cert_import (ECertDB *db, ECert *cert, gboolean *trust_ssl, gboolean *trust_email, gboolean *trust_objsign, gpointer arg) { GtkWidget *dialog = ca_trust_dialog_show (cert, TRUE); - int response; + gint response; response = gtk_dialog_run (GTK_DIALOG (dialog)); diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c index 0ac946b5b8..e84b933a81 100644 --- a/smime/gui/e-cert-selector.c +++ b/smime/gui/e-cert-selector.c @@ -68,7 +68,7 @@ ecs_find_current(ECertSelector *ecs) { struct _ECertSelectorPrivate *p = ecs->priv; CERTCertListNode *node; - int n; + gint n; if (p->certlist == NULL || CERT_LIST_EMPTY(p->certlist)) return NULL; @@ -141,7 +141,7 @@ ecs_cert_changed(GtkWidget *w, ECertSelector *ecs) * Return value: A dialogue to be shown. **/ GtkWidget * -e_cert_selector_new(int type, const char *currentid) +e_cert_selector_new(gint type, const gchar *currentid) { ECertSelector *ecs; struct _ECertSelectorPrivate *p; @@ -150,8 +150,8 @@ e_cert_selector_new(int type, const char *currentid) CERTCertListNode *node; GladeXML *gui; GtkWidget *w; - int n=0, active=0; - char *gladefile; + gint n=0, active=0; + gchar *gladefile; ecs = g_object_new(e_cert_selector_get_type(), NULL); p = ecs->priv; diff --git a/smime/gui/e-cert-selector.h b/smime/gui/e-cert-selector.h index 85cfa0ba9f..5520b5621c 100644 --- a/smime/gui/e-cert-selector.h +++ b/smime/gui/e-cert-selector.h @@ -49,7 +49,7 @@ struct _ECertSelector { struct _ECertSelectorClass { GtkDialogClass parent_class; - void (*selected)(ECertSelector *, const char *certid); + void (*selected)(ECertSelector *, const gchar *certid); }; enum _e_cert_selector_type { @@ -58,7 +58,7 @@ enum _e_cert_selector_type { }; GType e_cert_selector_get_type (void); -GtkWidget *e_cert_selector_new (int type, const char *currentid); +GtkWidget *e_cert_selector_new (gint type, const gchar *currentid); #ifdef cplusplus } diff --git a/smime/lib/e-asn1-object.c b/smime/lib/e-asn1-object.c index b3cfe9e726..6e490f6123 100644 --- a/smime/lib/e-asn1-object.c +++ b/smime/lib/e-asn1-object.c @@ -54,10 +54,10 @@ struct _EASN1ObjectPrivate { GList *children; - char *display_name; - char *value; + gchar *display_name; + gchar *value; - char *data; + gchar *data; guint data_len; }; @@ -137,9 +137,9 @@ e_asn1_object_get_type (void) ASN1. */ static int -get_integer_256 (unsigned char *data, unsigned int nb) +get_integer_256 (guchar *data, guint nb) { - int val; + gint val; switch (nb) { case 1: @@ -171,10 +171,10 @@ get_integer_256 (unsigned char *data, unsigned int nb) <tag><length<data consisting of lenght bytes> */ static guint32 -get_der_item_length (unsigned char *data, unsigned char *end, +get_der_item_length (guchar *data, guchar *end, unsigned long *bytesUsed, gboolean *indefinite) { - unsigned char lbyte = *data++; + guchar lbyte = *data++; PRInt32 length = -1; *indefinite = FALSE; @@ -205,13 +205,13 @@ get_der_item_length (unsigned char *data, unsigned char *end, } static gboolean -build_from_der (EASN1Object *parent, char *data, char *end) +build_from_der (EASN1Object *parent, gchar *data, gchar *end) { unsigned long bytesUsed; gboolean indefinite; PRInt32 len; PRUint32 type; - unsigned char code, tagnum; + guchar code, tagnum; EASN1Object *asn1object = NULL; if (data >= end) @@ -221,7 +221,7 @@ build_from_der (EASN1Object *parent, char *data, char *end) A DER item has the form of |tag|len|data tag is one byte and describes the type of elment we are dealing with. - len is a DER encoded int telling us how long the data is + len is a DER encoded gint telling us how long the data is data is a buffer that is len bytes long and has to be interpreted according to its type. */ @@ -237,7 +237,7 @@ build_from_der (EASN1Object *parent, char *data, char *end) return FALSE; } data++; - len = get_der_item_length ((unsigned char *)data, (unsigned char *)end, &bytesUsed, &indefinite); + len = get_der_item_length ((guchar *)data, (guchar *)end, &bytesUsed, &indefinite); data += bytesUsed; if ((len < 0) || ((data+len) > end)) return FALSE; @@ -277,7 +277,7 @@ build_from_der (EASN1Object *parent, char *data, char *end) asn1object->priv->type = tagnum; asn1object->priv->tag = tagnum; - /*printableItem->SetData((char*)data, len);*/ + /*printableItem->SetData((gchar *)data, len);*/ } data += len; @@ -288,7 +288,7 @@ build_from_der (EASN1Object *parent, char *data, char *end) } EASN1Object* -e_asn1_object_new_from_der (char *data, guint32 len) +e_asn1_object_new_from_der (gchar *data, guint32 len) { EASN1Object *obj = g_object_new (E_TYPE_ASN1_OBJECT, NULL); @@ -348,33 +348,33 @@ e_asn1_object_append_child (EASN1Object *parent, EASN1Object *child) } void -e_asn1_object_set_display_name (EASN1Object *obj, const char *name) +e_asn1_object_set_display_name (EASN1Object *obj, const gchar *name) { g_free (obj->priv->display_name); obj->priv->display_name = g_strdup (name); } -const char* +const gchar * e_asn1_object_get_display_name (EASN1Object *obj) { return obj->priv->display_name; } void -e_asn1_object_set_display_value (EASN1Object *obj, const char *value) +e_asn1_object_set_display_value (EASN1Object *obj, const gchar *value) { g_free (obj->priv->value); obj->priv->value = g_strdup (value); } -const char* +const gchar * e_asn1_object_get_display_value (EASN1Object *obj) { return obj->priv->value; } void -e_asn1_object_get_data (EASN1Object *obj, char **data, guint32 *len) +e_asn1_object_get_data (EASN1Object *obj, gchar **data, guint32 *len) { *data = obj->priv->data; *len = obj->priv->data_len; diff --git a/smime/lib/e-asn1-object.h b/smime/lib/e-asn1-object.h index 0c976dd827..35824967d4 100644 --- a/smime/lib/e-asn1-object.h +++ b/smime/lib/e-asn1-object.h @@ -85,7 +85,7 @@ struct _EASN1ObjectClass { void (*_ecert_reserved4) (void); }; -EASN1Object *e_asn1_object_new_from_der (char *data, guint32 len); +EASN1Object *e_asn1_object_new_from_der (gchar *data, guint32 len); EASN1Object *e_asn1_object_new (void); void e_asn1_object_set_valid_container (EASN1Object *obj, gboolean flag); @@ -94,12 +94,12 @@ PRUint32 e_asn1_object_get_asn1_type (EASN1Object *obj); PRUint32 e_asn1_object_get_asn1_tag (EASN1Object *obj); GList *e_asn1_object_get_children (EASN1Object *obj); void e_asn1_object_append_child (EASN1Object *parent, EASN1Object *child); -void e_asn1_object_set_display_name (EASN1Object *obj, const char *name); -const char *e_asn1_object_get_display_name (EASN1Object *obj); -void e_asn1_object_set_display_value (EASN1Object *obj, const char *value); -const char *e_asn1_object_get_display_value (EASN1Object *obj); +void e_asn1_object_set_display_name (EASN1Object *obj, const gchar *name); +const gchar *e_asn1_object_get_display_name (EASN1Object *obj); +void e_asn1_object_set_display_value (EASN1Object *obj, const gchar *value); +const gchar *e_asn1_object_get_display_value (EASN1Object *obj); -void e_asn1_object_get_data (EASN1Object *obj, char **data, guint32 *len); +void e_asn1_object_get_data (EASN1Object *obj, gchar **data, guint32 *len); GType e_asn1_object_get_type (void); diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c index ae8a79ae23..d0528f7d2f 100644 --- a/smime/lib/e-cert-db.c +++ b/smime/lib/e-cert-db.c @@ -93,7 +93,7 @@ struct _ECertDBPrivate { #define PARENT_TYPE G_TYPE_OBJECT static GObjectClass *parent_class; -static CERTDERCerts* e_cert_db_get_certs_from_package (PRArenaPool *arena, char *data, guint32 length); +static CERTDERCerts* e_cert_db_get_certs_from_package (PRArenaPool *arena, gchar *data, guint32 length); @@ -117,22 +117,22 @@ e_cert_db_dispose (GObject *object) #ifdef notyet PRBool ucs2_ascii_conversion_fn (PRBool toUnicode, - unsigned char *inBuf, - unsigned int inBufLen, - unsigned char *outBuf, - unsigned int maxOutBufLen, - unsigned int *outBufLen, + guchar *inBuf, + guint inBufLen, + guchar *outBuf, + guint maxOutBufLen, + guint *outBufLen, PRBool swapBytes) { printf ("in ucs2_ascii_conversion_fn\n"); } #endif -static char* PR_CALLBACK -pk11_password (PK11SlotInfo* slot, PRBool retry, void* arg) +static gchar * PR_CALLBACK +pk11_password (PK11SlotInfo* slot, PRBool retry, gpointer arg) { - char *pwd; - char *nsspwd; + gchar *pwd; + gchar *nsspwd; gboolean rv = FALSE; @@ -155,7 +155,7 @@ pk11_password (PK11SlotInfo* slot, PRBool retry, void* arg) static void initialize_nss (void) { - char *evolution_dir_path; + gchar *evolution_dir_path; gboolean success; #ifdef G_OS_WIN32 @@ -207,7 +207,7 @@ install_loadable_roots (void) SECMODModuleList *list = SECMOD_GetDefaultModuleList (); SECMODListLock *lock = SECMOD_GetDefaultModuleListLock (); SECMODModule *RootsModule = NULL; - int i; + gint i; SECMOD_GetReadLock (lock); while (!RootsModule && list) { @@ -270,7 +270,7 @@ install_loadable_roots (void) }; for (i = 0; i < G_N_ELEMENTS (paths_to_check); i ++) { - char *dll_path = g_module_build_path (paths_to_check [i], "nssckbi"); + gchar *dll_path = g_module_build_path (paths_to_check [i], "nssckbi"); if (g_file_test (dll_path, G_FILE_TEST_EXISTS)) { PRInt32 modType; @@ -395,16 +395,16 @@ e_cert_db_shutdown (void) /* searching for certificates */ ECert* e_cert_db_find_cert_by_nickname (ECertDB *certdb, - const char *nickname, + const gchar *nickname, GError **error) { /* nsNSSShutDownPreventionLock locker;*/ CERTCertificate *cert = NULL; /*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Getting \"%s\"\n", asciiname));*/ - cert = PK11_FindCertFromNickname((char*)nickname, NULL); + cert = PK11_FindCertFromNickname((gchar *)nickname, NULL); if (!cert) { - cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), (char*)nickname); + cert = CERT_FindCertByNickname(CERT_GetDefaultCertDB(), (gchar *)nickname); } @@ -422,7 +422,7 @@ e_cert_db_find_cert_by_nickname (ECertDB *certdb, #ifdef notyet ECert* e_cert_db_find_cert_by_key (ECertDB *certdb, - const char *db_key, + const gchar *db_key, GError **error) { /* nsNSSShutDownPreventionLock locker;*/ @@ -471,14 +471,14 @@ e_cert_db_get_cert_nicknames (ECertDB *certdb, ECert* e_cert_db_find_email_encryption_cert (ECertDB *certdb, - const char *nickname, + const gchar *nickname, GError **error) { } ECert* e_cert_db_find_email_signing_cert (ECertDB *certdb, - const char *nickname, + const gchar *nickname, GError **error) { } @@ -486,13 +486,13 @@ e_cert_db_find_email_signing_cert (ECertDB *certdb, ECert* e_cert_db_find_cert_by_email_address (ECertDB *certdb, - const char *email, + const gchar *email, GError **error) { /* nsNSSShutDownPreventionLock locker; */ ECert *cert; CERTCertificate *any_cert = CERT_FindCertByNicknameOrEmailAddr(CERT_GetDefaultCertDB(), - (char*)email); + (gchar *)email); CERTCertList *certlist; if (!any_cert) { @@ -555,7 +555,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) { ECert *certToShow; SECItem der; - char *raw_der = NULL; + gchar *raw_der = NULL; CERTCertificate *tmpCert; /* First thing we have to do is figure out which certificate @@ -587,10 +587,10 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) /* there are multiple certs */ ECert *cert0; ECert *cert1; - const char* cert0SubjectName; - const char* cert0IssuerName; - const char* cert1SubjectName; - const char* cert1IssuerName; + const gchar * cert0SubjectName; + const gchar * cert0IssuerName; + const gchar * cert1SubjectName; + const gchar * cert1IssuerName; cert0 = E_CERT (certs->data); cert1 = E_CERT (certs->next->data); @@ -628,7 +628,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) return FALSE; } - der.data = (unsigned char *)raw_der; + der.data = (guchar *)raw_der; { /*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Creating temp cert\n"));*/ @@ -656,7 +656,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) } else { gboolean trust_ssl, trust_email, trust_objsign; - char *nickname; + gchar *nickname; SECStatus srv; CERTCertTrust trust; @@ -709,7 +709,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error) continue; /* Let's try to import the rest of 'em */ } nickname.Adopt(CERT_MakeCANickname(tmpCert2)); - CERT_AddTempCertToPerm(tmpCert2, NS_CONST_CAST(char*,nickname.get()), + CERT_AddTempCertToPerm(tmpCert2, NS_CONST_CAST(gchar *,nickname.get()), defaultTrust.GetTrust()); CERT_DestroyCertificate(tmpCert2); } @@ -755,7 +755,7 @@ e_cert_db_delete_cert (ECertDB *certdb, /* importing certificates */ gboolean e_cert_db_import_certs (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, ECertType cert_type, GError **error) { @@ -763,7 +763,7 @@ e_cert_db_import_certs (ECertDB *certdb, PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); GList *certs = NULL; CERTDERCerts *certCollection = e_cert_db_get_certs_from_package (arena, data, length); - int i; + gint i; gboolean rv; if (!certCollection) { @@ -777,7 +777,7 @@ e_cert_db_import_certs (ECertDB *certdb, SECItem *currItem = &certCollection->rawCerts[i]; ECert *cert; - cert = e_cert_new_from_der ((char*)currItem->data, currItem->len); + cert = e_cert_new_from_der ((gchar *)currItem->data, currItem->len); if (!cert) { /* XXX gerror */ g_list_foreach (certs, (GFunc)g_object_unref, NULL); @@ -806,7 +806,7 @@ e_cert_db_import_certs (ECertDB *certdb, gboolean e_cert_db_import_email_cert (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, GError **error) { /*nsNSSShutDownPreventionLock locker;*/ @@ -814,8 +814,8 @@ e_cert_db_import_email_cert (ECertDB *certdb, gboolean rv = TRUE; CERTCertificate * cert; SECItem **rawCerts; - int numcerts; - int i; + gint numcerts; + gint i; PRArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); CERTDERCerts *certCollection = e_cert_db_get_certs_from_package (arena, data, length); @@ -827,7 +827,7 @@ e_cert_db_import_email_cert (ECertDB *certdb, } cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), certCollection->rawCerts, - (char *)NULL, PR_FALSE, PR_TRUE); + (gchar *)NULL, PR_FALSE, PR_TRUE); if (!cert) { /* XXX g_error */ rv = FALSE; @@ -863,16 +863,16 @@ e_cert_db_import_email_cert (ECertDB *certdb, return rv; } -static char * +static gchar * default_nickname (CERTCertificate *cert) { /* nsNSSShutDownPreventionLock locker; */ - char *username = NULL; - char *caname = NULL; - char *nickname = NULL; - char *tmp = NULL; - int count; - const char *nickFmt=NULL; + gchar *username = NULL; + gchar *caname = NULL; + gchar *nickname = NULL; + gchar *tmp = NULL; + gint count; + const gchar *nickFmt=NULL; CERTCertificate *dummycert; PK11SlotInfo *slot=NULL; CK_OBJECT_HANDLE keyHandle; @@ -990,14 +990,14 @@ default_nickname (CERTCertificate *cert) gboolean e_cert_db_import_user_cert (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, GError **error) { /* nsNSSShutDownPreventionLock locker;*/ PK11SlotInfo *slot; - char * nickname = NULL; + gchar * nickname = NULL; gboolean rv = FALSE; - int numCACerts; + gint numCACerts; SECItem *CACerts; CERTDERCerts * collectArgs; PRArenaPool *arena; @@ -1016,7 +1016,7 @@ e_cert_db_import_user_cert (ECertDB *certdb, } cert = CERT_NewTempCertificate(CERT_GetDefaultCertDB(), collectArgs->rawCerts, - (char *)NULL, PR_FALSE, PR_TRUE); + (gchar *)NULL, PR_FALSE, PR_TRUE); if (!cert) { /* XXX g_error */ goto loser; @@ -1068,7 +1068,7 @@ e_cert_db_import_user_cert (ECertDB *certdb, gboolean e_cert_db_import_server_cert (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, GError **error) { /* not c&p'ing this over at the moment, as we don't have a UI @@ -1078,15 +1078,15 @@ e_cert_db_import_server_cert (ECertDB *certdb, gboolean e_cert_db_import_certs_from_file (ECertDB *cert_db, - const char *file_path, + const gchar *file_path, ECertType cert_type, GError **error) { gboolean rv; - int fd; + gint fd; struct stat sb; - char *buf; - int bytes_read; + gchar *buf; + gint bytes_read; switch (cert_type) { case E_CERT_CA: @@ -1156,7 +1156,7 @@ e_cert_db_import_certs_from_file (ECertDB *cert_db, gboolean e_cert_db_import_pkcs12_file (ECertDB *cert_db, - const char *file_path, + const gchar *file_path, GError **error) { EPKCS12 *pkcs12 = e_pkcs12_new (); @@ -1173,7 +1173,7 @@ e_cert_db_import_pkcs12_file (ECertDB *cert_db, #ifdef notyet gboolean e_cert_db_export_pkcs12_file (ECertDB *cert_db, - const char *file_path, + const gchar *file_path, GList *certs, GError **error) { @@ -1188,7 +1188,7 @@ e_cert_db_login_to_slot (ECertDB *cert_db, PK11_Logout (slot); if (PK11_NeedUserInit (slot)) { - char *pwd; + gchar *pwd; gboolean rv = FALSE; printf ("initializing slot password\n"); @@ -1219,7 +1219,7 @@ e_cert_db_login_to_slot (ECertDB *cert_db, static SECStatus PR_CALLBACK -collect_certs(void *arg, SECItem **certs, int numcerts) +collect_certs(gpointer arg, SECItem **certs, gint numcerts) { CERTDERCerts *collectArgs; SECItem *cert; @@ -1247,7 +1247,7 @@ collect_certs(void *arg, SECItem **certs, int numcerts) static CERTDERCerts* e_cert_db_get_certs_from_package (PRArenaPool *arena, - char *data, + gchar *data, guint32 length) { /*nsNSSShutDownPreventionLock locker;*/ @@ -1261,7 +1261,7 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena, collectArgs->arena = arena; sec_rv = CERT_DecodeCertPackage(data, length, collect_certs, - (void *)collectArgs); + (gpointer)collectArgs); if (sec_rv != SECSuccess) return NULL; diff --git a/smime/lib/e-cert-db.h b/smime/lib/e-cert-db.h index f628ba2073..30d20448cb 100644 --- a/smime/lib/e-cert-db.h +++ b/smime/lib/e-cert-db.h @@ -48,8 +48,8 @@ struct _ECertDBClass { GObjectClass parent_class; /* signals */ - gboolean (*pk11_passwd) (ECertDB *db, PK11SlotInfo *slot, gboolean retry, char **passwd); - gboolean (*pk11_change_passwd) (ECertDB *db, char **orig_passwd, char **passwd); + gboolean (*pk11_passwd) (ECertDB *db, PK11SlotInfo *slot, gboolean retry, gchar **passwd); + gboolean (*pk11_change_passwd) (ECertDB *db, gchar **orig_passwd, gchar **passwd); gboolean (*confirm_ca_cert_import) (ECertDB *db, ECert *cert, gboolean *trust_ssl, gboolean *trust_email, gboolean *trust_objsign); /* Padding for future expansion */ @@ -69,12 +69,12 @@ void e_cert_db_shutdown (void); /* searching for certificates */ ECert* e_cert_db_find_cert_by_nickname (ECertDB *certdb, - const char *nickname, + const gchar *nickname, GError **error); #ifdef notyet ECert* e_cert_db_find_cert_by_key (ECertDB *certdb, - const char *db_key, + const gchar *db_key, GError **error); GList* e_cert_db_get_cert_nicknames (ECertDB *certdb, @@ -83,16 +83,16 @@ GList* e_cert_db_get_cert_nicknames (ECertDB *certdb, ECert* e_cert_db_find_email_encryption_cert (ECertDB *certdb, - const char *nickname, + const gchar *nickname, GError **error); ECert* e_cert_db_find_email_signing_cert (ECertDB *certdb, - const char *nickname, + const gchar *nickname, GError **error); #endif ECert* e_cert_db_find_cert_by_email_address (ECertDB *certdb, - const char *nickname, + const gchar *nickname, GError **error); /* deleting certificates */ @@ -101,34 +101,34 @@ gboolean e_cert_db_delete_cert (ECertDB *certdb, /* importing certificates */ gboolean e_cert_db_import_certs (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, ECertType cert_type, GError **error); gboolean e_cert_db_import_email_cert (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, GError **error); gboolean e_cert_db_import_user_cert (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, GError **error); gboolean e_cert_db_import_server_cert (ECertDB *certdb, - char *data, guint32 length, + gchar *data, guint32 length, GError **error); gboolean e_cert_db_import_certs_from_file (ECertDB *cert_db, - const char *file_path, + const gchar *file_path, ECertType cert_type, GError **error); gboolean e_cert_db_import_pkcs12_file (ECertDB *cert_db, - const char *file_path, + const gchar *file_path, GError **error); #ifdef notyet gboolean e_cert_db_export_pkcs12_file (ECertDB *cert_db, - const char *file_path, + const gchar *file_path, GList *certs, GError **error); #endif diff --git a/smime/lib/e-cert-trust.c b/smime/lib/e-cert-trust.c index 8509f3ffee..8a8329c7f8 100644 --- a/smime/lib/e-cert-trust.c +++ b/smime/lib/e-cert-trust.c @@ -53,9 +53,9 @@ e_cert_trust_init (CERTCertTrust *trust) void e_cert_trust_init_with_values (CERTCertTrust *trust, - unsigned int ssl, - unsigned int email, - unsigned int objsign) + guint ssl, + guint email, + guint objsign) { memset(trust, 0, sizeof(CERTCertTrust)); e_cert_trust_add_trust(&trust->sslFlags, ssl); @@ -389,13 +389,13 @@ e_cert_trust_has_trusted_peer (CERTCertTrust *trust, } void -e_cert_trust_add_trust (unsigned int *t, unsigned int v) +e_cert_trust_add_trust (guint *t, guint v) { *t |= v; } PRBool -e_cert_trust_has_trust (unsigned int t, unsigned int v) +e_cert_trust_has_trust (guint t, guint v) { return (t & v); } diff --git a/smime/lib/e-cert-trust.h b/smime/lib/e-cert-trust.h index 6b515b1a24..71608f8415 100644 --- a/smime/lib/e-cert-trust.h +++ b/smime/lib/e-cert-trust.h @@ -32,9 +32,9 @@ G_BEGIN_DECLS void e_cert_trust_init (CERTCertTrust *trust); void e_cert_trust_init_with_values (CERTCertTrust *trust, - unsigned int ssl, - unsigned int email, - unsigned int objsign); + guint ssl, + guint email, + guint objsign); void e_cert_trust_copy (CERTCertTrust *dst_trust, CERTCertTrust *src_trust); void e_cert_trust_add_ca_trust (CERTCertTrust *trust, PRBool ssl, PRBool email, PRBool objSign); void e_cert_trust_add_peer_trust (CERTCertTrust *trust, PRBool ssl, PRBool email, PRBool objSign); @@ -79,8 +79,8 @@ PRBool e_cert_trust_has_trusted_peer (CERTCertTrust *trust, PRBool checkSSL, PRBool checkEmail, PRBool checkObjSign); -void e_cert_trust_add_trust (unsigned int *t, unsigned int v); -PRBool e_cert_trust_has_trust (unsigned int t, unsigned int v); +void e_cert_trust_add_trust (guint *t, guint v); +PRBool e_cert_trust_has_trust (guint t, guint v); G_END_DECLS diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c index 2146fc3d32..8367b7b8fd 100644 --- a/smime/lib/e-cert.c +++ b/smime/lib/e-cert.c @@ -60,26 +60,26 @@ struct _ECertPrivate { /* pointers we cache since the nss implementation allocs the string */ - char *org_name; - char *org_unit_name; - char *cn; + gchar *org_name; + gchar *org_unit_name; + gchar *cn; - char *issuer_org_name; - char *issuer_org_unit_name; - char *issuer_cn; + gchar *issuer_org_name; + gchar *issuer_org_unit_name; + gchar *issuer_cn; PRTime issued_on; PRTime expires_on; - char *issued_on_string; - char *expires_on_string; + gchar *issued_on_string; + gchar *expires_on_string; - char *serial_number; + gchar *serial_number; - char *usage_string; + gchar *usage_string; - char *sha1_fingerprint; - char *md5_fingerprint; + gchar *sha1_fingerprint; + gchar *md5_fingerprint; EASN1Object *asn1; @@ -195,7 +195,7 @@ static void e_cert_populate (ECert *cert) { CERTCertificate *c = cert->priv->cert; - unsigned char fingerprint[20]; + guchar fingerprint[20]; SECItem fpItem; cert->priv->org_name = CERT_GetOrgName (&c->subject); @@ -210,7 +210,7 @@ e_cert_populate (ECert *cert) if (SECSuccess == CERT_GetCertTimes (c, &cert->priv->issued_on, &cert->priv->expires_on)) { PRExplodedTime explodedTime; struct tm exploded_tm; - char buf[32]; + gchar buf[32]; PR_ExplodeTime (cert->priv->issued_on, PR_LocalTimeParameters, &explodedTime); exploded_tm.tm_sec = explodedTime.tm_sec; @@ -265,7 +265,7 @@ e_cert_new (CERTCertificate *cert) } ECert* -e_cert_new_from_der (char *data, guint32 len) +e_cert_new_from_der (gchar *data, guint32 len) { CERTCertificate *cert = CERT_DecodeCertFromPackage (data, len); @@ -289,13 +289,13 @@ e_cert_get_internal_cert (ECert *cert) } gboolean -e_cert_get_raw_der (ECert *cert, char **data, guint32 *len) +e_cert_get_raw_der (ECert *cert, gchar **data, guint32 *len) { /* XXX do we really need to check if cert->priv->cert is NULL here? it should always be non-null if we have the ECert.. */ if (cert->priv->cert) { - *data = (char*)cert->priv->cert->derCert.data; + *data = (gchar *)cert->priv->cert->derCert.data; *len = (guint32)cert->priv->cert->derCert.len; return TRUE; } @@ -305,7 +305,7 @@ e_cert_get_raw_der (ECert *cert, char **data, guint32 *len) } -const char* +const gchar * e_cert_get_window_title (ECert *cert) { if (cert->priv->cert->nickname) @@ -316,61 +316,61 @@ e_cert_get_window_title (ECert *cert) return cert->priv->cert->subjectName; } -const char* +const gchar * e_cert_get_nickname (ECert *cert) { return cert->priv->cert->nickname; } -const char* +const gchar * e_cert_get_email (ECert *cert) { return cert->priv->cert->emailAddr; } -const char* +const gchar * e_cert_get_org (ECert *cert) { return cert->priv->org_name; } -const char* +const gchar * e_cert_get_org_unit (ECert *cert) { return cert->priv->org_unit_name; } -const char* +const gchar * e_cert_get_cn (ECert *cert) { return cert->priv->cn; } -const char* +const gchar * e_cert_get_issuer_name (ECert *cert) { return cert->priv->cert->issuerName; } -const char* +const gchar * e_cert_get_issuer_cn (ECert *cert) { return cert->priv->issuer_cn; } -const char* +const gchar * e_cert_get_issuer_org (ECert *cert) { return cert->priv->issuer_org_name; } -const char* +const gchar * e_cert_get_issuer_org_unit (ECert *cert) { return cert->priv->issuer_org_unit_name; } -const char* +const gchar * e_cert_get_subject_name (ECert *cert) { return cert->priv->cert->subjectName; @@ -382,7 +382,7 @@ e_cert_get_issued_on_time (ECert *cert) return cert->priv->issued_on; } -const char* +const gchar * e_cert_get_issued_on (ECert *cert) { return cert->priv->issued_on_string; @@ -394,26 +394,26 @@ e_cert_get_expires_on_time (ECert *cert) return cert->priv->expires_on; } -const char* +const gchar * e_cert_get_expires_on (ECert *cert) { return cert->priv->expires_on_string; } static struct { - int bit; - const char *text; + gint bit; + const gchar *text; } usageinfo[] = { /* x509 certificate usage types */ { certificateUsageEmailSigner, N_("Sign") }, { certificateUsageEmailRecipient, N_("Encrypt") }, }; -const char* +const gchar * e_cert_get_usage(ECert *cert) { if (cert->priv->usage_string == NULL) { - int i; + gint i; GString *str = g_string_new(""); CERTCertificate *icert = e_cert_get_internal_cert (cert); @@ -432,19 +432,19 @@ e_cert_get_usage(ECert *cert) return cert->priv->usage_string; } -const char* +const gchar * e_cert_get_serial_number (ECert *cert) { return cert->priv->serial_number; } -const char* +const gchar * e_cert_get_sha1_fingerprint (ECert *cert) { return cert->priv->sha1_fingerprint; } -const char* +const gchar * e_cert_get_md5_fingerprint (ECert *cert) { return cert->priv->md5_fingerprint; @@ -547,7 +547,7 @@ static gboolean process_serial_number_der (SECItem *serialItem, EASN1Object **retItem) { - char *serialNumber; + gchar *serialNumber; EASN1Object *item = e_asn1_object_new (); e_asn1_object_set_display_name (item, _("Serial Number")); @@ -563,14 +563,14 @@ process_serial_number_der (SECItem *serialItem, static gboolean get_default_oid_format (SECItem *oid, - char **text) + gchar **text) { - char buf[300]; - unsigned int len; - int written; + gchar buf[300]; + guint len; + gint written; unsigned long val = oid->data[0]; - unsigned int i = val % 40; + guint i = val % 40; val /= 40; written = PR_snprintf(buf, 300, "%lu %u ", val, i); if (written < 0) @@ -607,10 +607,10 @@ get_default_oid_format (SECItem *oid, } static gboolean -get_oid_text (SECItem *oid, char **text) +get_oid_text (SECItem *oid, gchar **text) { SECOidTag oidTag = SECOID_FindOIDTag(oid); - char *temp; + gchar *temp; switch (oidTag) { case SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION: @@ -678,7 +678,7 @@ get_oid_text (SECItem *oid, char **text) static gboolean -process_raw_bytes (SECItem *data, char **text) +process_raw_bytes (SECItem *data, gchar **text) { /* This function is used to display some DER bytes that we have not added support for decoding. @@ -689,7 +689,7 @@ process_raw_bytes (SECItem *data, char **text) */ GString *str = g_string_new (""); PRUint32 i; - char buffer[5]; + gchar buffer[5]; for (i=0; i<data->len; i++) { PR_snprintf(buffer, 5, "%02x ", data->data[i]); g_string_append (str, buffer); @@ -706,7 +706,7 @@ process_sec_algorithm_id (SECAlgorithmID *algID, EASN1Object **retSequence) { EASN1Object *sequence = e_asn1_object_new (); - char *text; + gchar *text; *retSequence = NULL; @@ -747,7 +747,7 @@ process_subject_public_key_info (CERTSubjectPublicKeyInfo *spki, EASN1Object *sequenceItem; EASN1Object *printableItem; SECItem data; - char *text; + gchar *text; e_asn1_object_set_display_name (spkiSequence, _("Subject Public Key Info")); @@ -784,7 +784,7 @@ process_ns_cert_type_extensions (SECItem *extData, GString *text) { SECItem decoded; - unsigned char nsCertType; + guchar nsCertType; decoded.data = NULL; decoded.len = 0; @@ -833,7 +833,7 @@ static gboolean process_key_usage_extensions (SECItem *extData, GString *text) { SECItem decoded; - unsigned char keyUsage; + guchar keyUsage; decoded.data = NULL; decoded.len = 0; @@ -891,7 +891,7 @@ process_extension_data (SECOidTag oidTag, SECItem *extData, rv = process_key_usage_extensions (extData, str); break; default: { - char *text; + gchar *text; rv = process_raw_bytes (extData, &text); g_string_append (str, text); g_free (text); @@ -906,7 +906,7 @@ process_single_extension (CERTCertExtension *extension, EASN1Object **retExtension) { GString *str = g_string_new (""); - char *text; + gchar *text; EASN1Object *extensionItem; SECOidTag oidTag = SECOID_FindOIDTag(&extension->id); @@ -961,7 +961,7 @@ process_extensions (CERTCertExtension **extensions, } static gboolean -process_name (CERTName *name, char **value) +process_name (CERTName *name, gchar **value) { CERTRDN** rdns; CERTRDN** rdn; @@ -970,9 +970,9 @@ process_name (CERTName *name, char **value) SECItem *decodeItem = NULL; GString *final_string = g_string_new (""); - char *type; + gchar *type; GString *avavalue; - char *temp; + gchar *temp; CERTRDN **lastRdn; rdns = name->rdns; @@ -1012,7 +1012,7 @@ process_name (CERTName *name, char **value) return FALSE; } - avavalue = g_string_new_len ((char*)decodeItem->data, decodeItem->len); + avavalue = g_string_new_len ((gchar *)decodeItem->data, decodeItem->len); SECITEM_FreeItem(decodeItem, PR_TRUE); @@ -1053,7 +1053,7 @@ create_tbs_certificate_asn1_struct (ECert *cert, EASN1Object **seq) ** and then add more user friendly text for that field. */ EASN1Object *sequence = e_asn1_object_new (); - char *text; + gchar *text; EASN1Object *subitem; SECItem data; @@ -1176,7 +1176,7 @@ create_asn1_struct (ECert *cert) { EASN1Object *sequence; SECItem temp; - char *text; + gchar *text; cert->priv->asn1 = e_asn1_object_new (); @@ -1248,8 +1248,8 @@ e_cert_mark_for_deletion (ECert *cert) ECertType e_cert_get_cert_type (ECert *ecert) { - const char *nick = e_cert_get_nickname (ecert); - const char *email = e_cert_get_email (ecert); + const gchar *nick = e_cert_get_nickname (ecert); + const gchar *email = e_cert_get_email (ecert); CERTCertificate *cert = ecert->priv->cert; if (nick) { diff --git a/smime/lib/e-cert.h b/smime/lib/e-cert.h index 63125c1871..8c70bcded2 100644 --- a/smime/lib/e-cert.h +++ b/smime/lib/e-cert.h @@ -67,33 +67,33 @@ struct _ECertClass { GType e_cert_get_type (void); ECert* e_cert_new (CERTCertificate *cert); -ECert* e_cert_new_from_der (char *data, guint32 len); +ECert* e_cert_new_from_der (gchar *data, guint32 len); CERTCertificate* e_cert_get_internal_cert (ECert *cert); -gboolean e_cert_get_raw_der (ECert *cert, char **data, guint32 *len); -const char* e_cert_get_window_title (ECert *cert); -const char* e_cert_get_nickname (ECert *cert); -const char* e_cert_get_email (ECert *cert); -const char* e_cert_get_org (ECert *cert); -const char* e_cert_get_org_unit (ECert *cert); -const char* e_cert_get_cn (ECert *cert); -const char* e_cert_get_subject_name (ECert *cert); +gboolean e_cert_get_raw_der (ECert *cert, gchar **data, guint32 *len); +const gchar * e_cert_get_window_title (ECert *cert); +const gchar * e_cert_get_nickname (ECert *cert); +const gchar * e_cert_get_email (ECert *cert); +const gchar * e_cert_get_org (ECert *cert); +const gchar * e_cert_get_org_unit (ECert *cert); +const gchar * e_cert_get_cn (ECert *cert); +const gchar * e_cert_get_subject_name (ECert *cert); -const char* e_cert_get_issuer_name (ECert *cert); -const char* e_cert_get_issuer_cn (ECert *cert); -const char* e_cert_get_issuer_org (ECert *cert); -const char* e_cert_get_issuer_org_unit (ECert *cert); +const gchar * e_cert_get_issuer_name (ECert *cert); +const gchar * e_cert_get_issuer_cn (ECert *cert); +const gchar * e_cert_get_issuer_org (ECert *cert); +const gchar * e_cert_get_issuer_org_unit (ECert *cert); PRTime e_cert_get_issued_on_time (ECert *cert); -const char* e_cert_get_issued_on (ECert *cert); +const gchar * e_cert_get_issued_on (ECert *cert); PRTime e_cert_get_expires_on_time (ECert *cert); -const char* e_cert_get_expires_on (ECert *cert); -const char* e_cert_get_usage(ECert *cert); +const gchar * e_cert_get_expires_on (ECert *cert); +const gchar * e_cert_get_usage(ECert *cert); -const char* e_cert_get_serial_number (ECert *cert); -const char* e_cert_get_sha1_fingerprint (ECert *cert); -const char* e_cert_get_md5_fingerprint (ECert *cert); +const gchar * e_cert_get_serial_number (ECert *cert); +const gchar * e_cert_get_sha1_fingerprint (ECert *cert); +const gchar * e_cert_get_md5_fingerprint (ECert *cert); GList* e_cert_get_chain (ECert *cert); ECert * e_cert_get_ca_cert (ECert *ecert); diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c index 759a7fd1d6..5caa13e4f4 100644 --- a/smime/lib/e-pkcs12.c +++ b/smime/lib/e-pkcs12.c @@ -65,16 +65,16 @@ #include "secerr.h" struct _EPKCS12Private { - int mumble; + gint mumble; }; #define PARENT_TYPE G_TYPE_OBJECT static GObjectClass *parent_class; /* static callback functions for the NSS PKCS#12 library */ -static SECItem * PR_CALLBACK nickname_collision(SECItem *, PRBool *, void *); +static SECItem * PR_CALLBACK nickname_collision(SECItem *, PRBool *, gpointer ); -static gboolean handle_error(int myerr); +static gboolean handle_error(gint myerr); #define PKCS12_BUFFER_SIZE 2048 #define PKCS12_RESTORE_OK 1 @@ -155,12 +155,12 @@ e_pkcs12_new (void) } static gboolean -input_to_decoder (SEC_PKCS12DecoderContext *dcx, const char *path, GError **error) +input_to_decoder (SEC_PKCS12DecoderContext *dcx, const gchar *path, GError **error) { /* nsNSSShutDownPreventionLock locker; */ SECStatus srv; - int amount; - char buf[PKCS12_BUFFER_SIZE]; + gint amount; + gchar buf[PKCS12_BUFFER_SIZE]; FILE *fp; /* open path */ @@ -180,7 +180,7 @@ input_to_decoder (SEC_PKCS12DecoderContext *dcx, const char *path, GError **erro /* feed the file data into the decoder */ srv = SEC_PKCS12DecoderUpdate(dcx, - (unsigned char*) buf, + (guchar *) buf, amount); if (srv) { /* XXX g_error */ @@ -198,9 +198,9 @@ input_to_decoder (SEC_PKCS12DecoderContext *dcx, const char *path, GError **erro e_cert_db_login_to_slot stuff, instead of a direct gui dep here.. for now, though, it stays. */ static gboolean -prompt_for_password (char *title, char *prompt, SECItem *pwd) +prompt_for_password (gchar *title, gchar *prompt, SECItem *pwd) { - char *passwd; + gchar *passwd; passwd = e_passwords_ask_password (title, "SMIME-PKCS12", "", prompt, E_PASSWORDS_REMEMBER_NEVER|E_PASSWORDS_SECRET, NULL, @@ -208,8 +208,8 @@ prompt_for_password (char *title, char *prompt, SECItem *pwd) if (passwd) { size_t len = strlen (passwd); - const char *inptr = passwd; - unsigned char *outptr; + const gchar *inptr = passwd; + guchar *outptr; gunichar2 c; SECITEM_AllocItem(NULL, pwd, sizeof (gunichar2) * (len + 1)); @@ -218,8 +218,8 @@ prompt_for_password (char *title, char *prompt, SECItem *pwd) while (inptr && (c = (gunichar2) (g_utf8_get_char (inptr) & 0xffff))) { inptr = g_utf8_next_char (inptr); c = GUINT16_TO_BE (c); - *outptr++ = ((char *) &c)[0]; - *outptr++ = ((char *) &c)[1]; + *outptr++ = ((gchar *) &c)[0]; + *outptr++ = ((gchar *) &c)[1]; } *outptr++ = 0; @@ -234,7 +234,7 @@ prompt_for_password (char *title, char *prompt, SECItem *pwd) static gboolean import_from_file_helper (EPKCS12 *pkcs12, PK11SlotInfo *slot, - const char *path, gboolean *aWantRetry, GError **error) + const gchar *path, gboolean *aWantRetry, GError **error) { /*nsNSSShutDownPreventionLock locker; */ gboolean rv; @@ -310,7 +310,7 @@ import_from_file_helper (EPKCS12 *pkcs12, PK11SlotInfo *slot, } gboolean -e_pkcs12_import_from_file (EPKCS12 *pkcs12, const char *path, GError **error) +e_pkcs12_import_from_file (EPKCS12 *pkcs12, const gchar *path, GError **error) { /*nsNSSShutDownPreventionLock locker;*/ gboolean rv = TRUE; @@ -332,7 +332,7 @@ e_pkcs12_import_from_file (EPKCS12 *pkcs12, const char *path, GError **error) } gboolean -e_pkcs12_export_to_file (EPKCS12 *pkcs12, const char *path, GList *certs, GError **error) +e_pkcs12_export_to_file (EPKCS12 *pkcs12, const gchar *path, GList *certs, GError **error) { return FALSE; } @@ -340,12 +340,12 @@ e_pkcs12_export_to_file (EPKCS12 *pkcs12, const char *path, GList *certs, GError /* what to do when the nickname collides with one already in the db. TODO: not handled, throw a dialog allowing the nick to be changed? */ static SECItem * PR_CALLBACK -nickname_collision(SECItem *oldNick, PRBool *cancel, void *wincx) +nickname_collision(SECItem *oldNick, PRBool *cancel, gpointer wincx) { /* nsNSSShutDownPreventionLock locker; */ - int count = 1; - char *nickname = NULL; - char *default_nickname = _("Imported Certificate"); + gint count = 1; + gchar *nickname = NULL; + gchar *default_nickname = _("Imported Certificate"); SECItem *new_nick; *cancel = PR_FALSE; @@ -397,13 +397,13 @@ nickname_collision(SECItem *oldNick, PRBool *cancel, void *wincx) new_nick = PR_Malloc (sizeof (SECItem)); new_nick->type = siAsciiString; - new_nick->data = (unsigned char *)nickname; - new_nick->len = strlen((char*)new_nick->data); + new_nick->data = (guchar *)nickname; + new_nick->len = strlen((gchar *)new_nick->data); return new_nick; } static gboolean -handle_error(int myerr) +handle_error(gint myerr) { printf ("handle_error (%d)\n", myerr); diff --git a/smime/lib/e-pkcs12.h b/smime/lib/e-pkcs12.h index 5717edb14c..444afcaadd 100644 --- a/smime/lib/e-pkcs12.h +++ b/smime/lib/e-pkcs12.h @@ -63,7 +63,7 @@ EPKCS12* e_pkcs12_new (void); gboolean e_pkcs12_set_token (void); #endif -gboolean e_pkcs12_import_from_file (EPKCS12 *pkcs12, const char *path, GError **error); -gboolean e_pkcs12_export_to_file (EPKCS12 *pkcs12, const char *path, GList *certs, GError **error); +gboolean e_pkcs12_import_from_file (EPKCS12 *pkcs12, const gchar *path, GError **error); +gboolean e_pkcs12_export_to_file (EPKCS12 *pkcs12, const gchar *path, GList *certs, GError **error); #endif /* _E_CERT_H_ */ diff --git a/smime/tests/import-cert.c b/smime/tests/import-cert.c index b202053e6d..850590789a 100644 --- a/smime/tests/import-cert.c +++ b/smime/tests/import-cert.c @@ -23,8 +23,8 @@ #include "e-cert-db.h" #include "e-pkcs12.h" -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { ECertDB *db; EPKCS12 *pkcs12; diff --git a/tools/killev.c b/tools/killev.c index d26093986f..a978fea0d8 100644 --- a/tools/killev.c +++ b/tools/killev.c @@ -35,7 +35,7 @@ #include <libgnome/gnome-util.h> typedef struct { - char *location; + gchar *location; GPtrArray *names; } KillevComponent; @@ -43,10 +43,10 @@ static GSList *languages = NULL; static GHashTable *components; static gboolean -kill_process (const char *proc_name, KillevComponent *comp) +kill_process (const gchar *proc_name, KillevComponent *comp) { - int status, i; - char *command; + gint status, i; + gchar *command; GString *desc; command = g_strdup_printf (KILL_PROCESS_CMD " -0 %s 2> /dev/null", @@ -82,16 +82,16 @@ kill_process (const char *proc_name, KillevComponent *comp) return TRUE; } -static const char *patterns[] = { +static const gchar *patterns[] = { "%s", "%.16s", "lt-%s", "lt-%.13s", "%s.bin" }; -static const int n_patterns = G_N_ELEMENTS (patterns); +static const gint n_patterns = G_N_ELEMENTS (patterns); static void kill_component (KillevComponent *comp) { - char *base_name, *exe_name, *dash; - int i; + gchar *base_name, *exe_name, *dash; + gint i; base_name = g_strdup (comp->location); try_again: @@ -115,14 +115,14 @@ kill_component (KillevComponent *comp) } static void -add_matching_query (const char *query) +add_matching_query (const gchar *query) { Bonobo_ServerInfoList *info_list; Bonobo_ServerInfo *info; CORBA_Environment ev; - const char *location, *name; + const gchar *location, *name; KillevComponent *comp; - int i; + gint i; CORBA_exception_init (&ev); @@ -162,9 +162,9 @@ add_matching_query (const char *query) } static void -add_matching_repo_id (const char *repo_id) +add_matching_repo_id (const gchar *repo_id) { - char *query; + gchar *query; query = g_strdup_printf ("repo_ids.has ('%s')", repo_id); add_matching_query (query); @@ -172,17 +172,17 @@ add_matching_repo_id (const char *repo_id) } static void -add_matching_iid (const char *iid) +add_matching_iid (const gchar *iid) { - char *query; + gchar *query; query = g_strdup_printf ("iid == '%s'", iid); add_matching_query (query); g_free (query); } -int -main (int argc, char **argv) +gint +main (gint argc, gchar **argv) { const gchar * const *language_names; diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index 80a4485739..33b7eeb68d 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -102,9 +102,9 @@ static void on_combo_changed (GtkComboBox *combo, ETimezoneDialog *etd); static void timezone_combo_get_active_text (GtkComboBox *combo, - const char **zone_name); + const gchar **zone_name); static gboolean timezone_combo_set_active_text (GtkComboBox *combo, - const char *zone_name); + const gchar *zone_name); static void map_destroy_cb (gpointer data, GObject *where_object_was); @@ -198,7 +198,7 @@ e_timezone_dialog_add_timezones (ETimezoneDialog *etd) GtkTreeIter iter; GtkCellRenderer *cell; GHashTable *index; - int i; + gint i; priv = etd->priv; @@ -328,7 +328,7 @@ get_local_offset (void) { time_t now = time(NULL), t_gmt, t_local; struct tm gmt, local; - int diff; + gint diff; gmtime_r (&now, &gmt); localtime_r (&now, &local); @@ -400,7 +400,7 @@ format_utc_offset (int utc_offset, char *buffer) { const gchar *sign = "+"; - int hours, minutes, seconds; + gint hours, minutes, seconds; if (utc_offset < 0) { utc_offset = -utc_offset; @@ -429,14 +429,14 @@ format_utc_offset (int utc_offset, } -static char * +static gchar * zone_display_name_with_offset (icaltimezone *zone) { - const char *display_name; + const gchar *display_name; struct tm local; struct icaltimetype tt; - int offset; - char buffer [100]; + gint offset; + gchar buffer [100]; time_t now = time(NULL); gmtime_r ((const time_t *) &now, &local); @@ -452,10 +452,10 @@ zone_display_name_with_offset (icaltimezone *zone) return g_strdup_printf("%s (%s)\n", display_name, buffer);; } -static const char * +static const gchar * zone_display_name (icaltimezone *zone) { - const char *display_name; + const gchar *display_name; display_name = icaltimezone_get_display_name (zone); if (icaltimezone_get_builtin_timezone (display_name)) @@ -496,7 +496,7 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data) ETimezoneDialogPrivate *priv; double longitude, latitude; icaltimezone *new_zone; - char *display=NULL; + gchar *display=NULL; etd = E_TIMEZONE_DIALOG (data); priv = etd->priv; @@ -625,7 +625,7 @@ get_zone_from_point (ETimezoneDialog *etd, { icalarray *zones; double longitude, latitude; - int i; + gint i; if (point == NULL) return NULL; @@ -690,7 +690,7 @@ e_timezone_dialog_set_timezone (ETimezoneDialog *etd, icaltimezone *zone) { ETimezoneDialogPrivate *priv; - char *display = NULL; + gchar *display = NULL; g_return_if_fail (E_IS_TIMEZONE_DIALOG (etd)); @@ -762,11 +762,11 @@ static void on_combo_changed (GtkComboBox *combo_box, ETimezoneDialog *etd) { ETimezoneDialogPrivate *priv; - const char *new_zone_name; + const gchar *new_zone_name; icalarray *zones; icaltimezone *map_zone = NULL; - char *location; - int i; + gchar *location; + gint i; priv = etd->priv; @@ -794,7 +794,7 @@ on_combo_changed (GtkComboBox *combo_box, ETimezoneDialog *etd) } static void -timezone_combo_get_active_text (GtkComboBox *combo, const char **zone_name) +timezone_combo_get_active_text (GtkComboBox *combo, const gchar **zone_name) { GtkTreeModel *list_store; GtkTreeIter iter; @@ -809,7 +809,7 @@ timezone_combo_get_active_text (GtkComboBox *combo, const char **zone_name) } static gboolean -timezone_combo_set_active_text (GtkComboBox *combo, const char *zone_name) +timezone_combo_set_active_text (GtkComboBox *combo, const gchar *zone_name) { GtkTreeModel *list_store; GHashTable *index; diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c index e820a51a6a..8ecbcba061 100644 --- a/widgets/menus/gal-define-views-dialog.c +++ b/widgets/menus/gal-define-views-dialog.c @@ -48,7 +48,7 @@ enum { }; typedef struct { - char *title; + gchar *title; GtkTreeView *treeview; GtkTreeModel *model; @@ -80,7 +80,7 @@ gal_define_views_dialog_class_init (GalDefineViewsDialogClass *klass) /* Button callbacks */ static void -gdvd_button_new_dialog_callback (GtkWidget *widget, int id, GalDefineViewsDialog *dialog) +gdvd_button_new_dialog_callback (GtkWidget *widget, gint id, GalDefineViewsDialog *dialog) { gchar *name; GtkTreeIter iter; @@ -146,7 +146,7 @@ gdvd_button_modify_callback(GtkWidget *widget, GalDefineViewsDialog *dialog) static void gdvd_button_delete_callback(GtkWidget *widget, GalDefineViewsDialog *dialog) { - int row; + gint row; GtkTreeIter iter; GtkTreePath *path; GtkTreeSelection *selection; @@ -182,7 +182,7 @@ gdvd_button_delete_callback(GtkWidget *widget, GalDefineViewsDialog *dialog) static void gdvd_button_copy_callback(GtkWidget *widget, GalDefineViewsDialog *dialog) { - int row; + gint row; GtkWidget *scrolled; ETable *etable; @@ -219,7 +219,7 @@ gdvd_cursor_changed_callback (GtkWidget *widget, GalDefineViewsDialog *dialog) } static void -gdvd_connect_signal(GalDefineViewsDialog *dialog, const char *widget_name, const char *signal, GCallback handler) +gdvd_connect_signal(GalDefineViewsDialog *dialog, const gchar *widget_name, const gchar *signal, GCallback handler) { GtkWidget *widget; @@ -230,7 +230,7 @@ gdvd_connect_signal(GalDefineViewsDialog *dialog, const char *widget_name, const } static void -dialog_response (GalDefineViewsDialog *dialog, int response_id, gpointer data) +dialog_response (GalDefineViewsDialog *dialog, gint response_id, gpointer data) { gal_view_collection_save (dialog->collection); } @@ -303,7 +303,7 @@ static void gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog, GalViewCollection *collection) { - int i; + gint i; GtkListStore *store; GtkCellRenderer *renderer; dialog->collection = collection; @@ -318,7 +318,7 @@ gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog, /*if (item->built_in == 1) continue;*/ - char *title = NULL; + gchar *title = NULL; title = e_str_without_underscores (item->title); gtk_list_store_append (store, &iter); @@ -353,7 +353,7 @@ gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog, GtkWidget *widget = glade_xml_get_widget(dialog->gui, "label-views"); if (widget && GTK_IS_LABEL (widget)) { if (collection->title) { - char *text = g_strdup_printf (_("Define Views for %s"), + gchar *text = g_strdup_printf (_("Define Views for %s"), collection->title); gtk_label_set_text (GTK_LABEL (widget), text); diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c index 9f67473c32..82ab22eedc 100644 --- a/widgets/menus/gal-define-views-model.c +++ b/widgets/menus/gal-define-views-model.c @@ -78,20 +78,20 @@ gdvm_row_count (ETableModel *etc) } /* This function returns the value at a particular point in our ETableModel. */ -static void * -gdvm_value_at (ETableModel *etc, int col, int row) +static gpointer +gdvm_value_at (ETableModel *etc, gint col, gint row) { GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc); - const char *value; + const gchar *value; value = gal_view_get_title (gal_view_collection_get_view(views->collection, row)); - return (void *)(value ? value : ""); + return (gpointer)(value ? value : ""); } /* This function sets the value at a particular point in our ETableModel. */ static void -gdvm_set_value_at (ETableModel *etc, int col, int row, const void *val) +gdvm_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val) { GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc); if (views->editable) { @@ -103,7 +103,7 @@ gdvm_set_value_at (ETableModel *etc, int col, int row, const void *val) /* This function returns whether a particular cell is editable. */ static gboolean -gdvm_is_cell_editable (ETableModel *etc, int col, int row) +gdvm_is_cell_editable (ETableModel *etc, gint col, gint row) { return GAL_DEFINE_VIEWS_MODEL(etc)->editable; } @@ -114,33 +114,33 @@ gdvm_append_row (ETableModel *etm, ETableModel *source, gint row) } /* This function duplicates the value passed to it. */ -static void * -gdvm_duplicate_value (ETableModel *etc, int col, const void *value) +static gpointer +gdvm_duplicate_value (ETableModel *etc, gint col, gconstpointer value) { return g_strdup(value); } /* This function frees the value passed to it. */ static void -gdvm_free_value (ETableModel *etc, int col, void *value) +gdvm_free_value (ETableModel *etc, gint col, gpointer value) { g_free(value); } -static void * -gdvm_initialize_value (ETableModel *etc, int col) +static gpointer +gdvm_initialize_value (ETableModel *etc, gint col) { return g_strdup(""); } static gboolean -gdvm_value_is_empty (ETableModel *etc, int col, const void *value) +gdvm_value_is_empty (ETableModel *etc, gint col, gconstpointer value) { - return !(value && *(char *)value); + return !(value && *(gchar *)value); } -static char * -gdvm_value_to_string (ETableModel *etc, int col, const void *value) +static gchar * +gdvm_value_to_string (ETableModel *etc, gint col, gconstpointer value) { return g_strdup(value); } @@ -279,7 +279,7 @@ gal_define_views_model_new (void) */ GalView * gal_define_views_model_get_view (GalDefineViewsModel *model, - int n) + gint n) { return gal_view_collection_get_view(model->collection, n); } @@ -293,7 +293,7 @@ gal_define_views_model_get_view (GalDefineViewsModel *model, */ void gal_define_views_model_delete_view (GalDefineViewsModel *model, - int n) + gint n) { e_table_model_pre_change(E_TABLE_MODEL(model)); gal_view_collection_delete_view(model->collection, n); @@ -309,7 +309,7 @@ gal_define_views_model_delete_view (GalDefineViewsModel *model, */ void gal_define_views_model_copy_view (GalDefineViewsModel *model, - int n) + gint n) { ETableModel *etm = E_TABLE_MODEL(model); e_table_model_pre_change(etm); diff --git a/widgets/menus/gal-define-views-model.h b/widgets/menus/gal-define-views-model.h index d0ccfb16b9..2441cf7654 100644 --- a/widgets/menus/gal-define-views-model.h +++ b/widgets/menus/gal-define-views-model.h @@ -59,11 +59,11 @@ ETableModel *gal_define_views_model_new (void); void gal_define_views_model_append (GalDefineViewsModel *model, GalView *view); GalView *gal_define_views_model_get_view (GalDefineViewsModel *model, - int i); + gint i); void gal_define_views_model_delete_view (GalDefineViewsModel *model, - int i); + gint i); void gal_define_views_model_copy_view (GalDefineViewsModel *model, - int i); + gint i); #ifdef __cplusplus } diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c index c32e791809..958759326a 100644 --- a/widgets/menus/gal-view-collection.c +++ b/widgets/menus/gal-view-collection.c @@ -92,13 +92,13 @@ gal_view_collection_item_free (GalViewCollectionItem *item) g_free(item); } -static char * +static gchar * gal_view_generate_string (GalViewCollection *collection, GalView *view, - int which) + gint which) { - char *ret_val; - char *pointer; + gchar *ret_val; + gchar *pointer; if (which == 1) ret_val = g_strdup(gal_view_get_title(view)); @@ -106,7 +106,7 @@ gal_view_generate_string (GalViewCollection *collection, ret_val = g_strdup_printf("%s_%d", gal_view_get_title(view), which); for (pointer = ret_val; *pointer; pointer = g_utf8_next_char(pointer)) { if (!g_unichar_isalnum(g_utf8_get_char(pointer))) { - char *ptr = pointer; + gchar *ptr = pointer; for (; ptr < g_utf8_next_char(pointer); *ptr = '_', ptr++) ; } @@ -116,9 +116,9 @@ gal_view_generate_string (GalViewCollection *collection, static gint gal_view_check_string (GalViewCollection *collection, - char *string) + gchar *string) { - int i; + gint i; if (!strcmp (string, "current_view")) return FALSE; @@ -134,13 +134,13 @@ gal_view_check_string (GalViewCollection *collection, return TRUE; } -static char * +static gchar * gal_view_generate_id (GalViewCollection *collection, GalView *view) { - int i; + gint i; for (i = 1; TRUE; i++) { - char *try; + gchar *try; try = gal_view_generate_string(collection, view, i); if (gal_view_check_string(collection, try)) @@ -153,7 +153,7 @@ static void gal_view_collection_dispose (GObject *object) { GalViewCollection *collection = GAL_VIEW_COLLECTION(object); - int i; + gint i; for (i = 0; i < collection->view_count; i++) { gal_view_collection_item_free (collection->view_data[i]); @@ -253,7 +253,7 @@ gal_view_collection_new (void) void gal_view_collection_set_title (GalViewCollection *collection, - const char *title) + const gchar *title) { g_free (collection->title); collection->title = g_strdup (title); @@ -269,8 +269,8 @@ gal_view_collection_set_title (GalViewCollection *collection, */ void gal_view_collection_set_storage_directories (GalViewCollection *collection, - const char *system_dir, - const char *local_dir) + const gchar *system_dir, + const gchar *local_dir) { g_return_if_fail (collection != NULL); g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection)); @@ -322,7 +322,7 @@ view_changed (GalView *view, /* Use factory list to load a GalView file. */ static GalView * -gal_view_collection_real_load_view_from_file (GalViewCollection *collection, const char *type, const char *title, const char *dir, const char *filename) +gal_view_collection_real_load_view_from_file (GalViewCollection *collection, const gchar *type, const gchar *title, const gchar *dir, const gchar *filename) { GalViewFactory *factory; GList *factories; @@ -346,7 +346,7 @@ gal_view_collection_real_load_view_from_file (GalViewCollection *collection, con } GalView * -gal_view_collection_load_view_from_file (GalViewCollection *collection, const char *type, const char *filename) +gal_view_collection_load_view_from_file (GalViewCollection *collection, const gchar *type, const gchar *filename) { return gal_view_collection_real_load_view_from_file (collection, type, "", collection->local_dir, filename); } @@ -362,15 +362,15 @@ load_single_file (GalViewCollection *collection, item->ever_changed = local; item->changed = FALSE; item->built_in = !local; - item->id = e_xml_get_string_prop_by_name(node, (const unsigned char *)"id"); - item->filename = e_xml_get_string_prop_by_name(node, (const unsigned char *)"filename"); - item->title = e_xml_get_translated_utf8_string_prop_by_name(node, (const unsigned char *)"title"); - item->type = e_xml_get_string_prop_by_name(node, (const unsigned char *)"type"); + item->id = e_xml_get_string_prop_by_name(node, (const guchar *)"id"); + item->filename = e_xml_get_string_prop_by_name(node, (const guchar *)"filename"); + item->title = e_xml_get_translated_utf8_string_prop_by_name(node, (const guchar *)"title"); + item->type = e_xml_get_string_prop_by_name(node, (const guchar *)"type"); item->collection = collection; item->view_changed_id = 0; if (item->filename) { - char *fullpath; + gchar *fullpath; fullpath = g_build_filename(dir, item->filename, NULL); item->view = gal_view_collection_real_load_view_from_file (collection, item->type, item->title, dir, fullpath); g_free(fullpath); @@ -385,14 +385,14 @@ load_single_file (GalViewCollection *collection, static void load_single_dir (GalViewCollection *collection, - char *dir, + gchar *dir, gboolean local) { xmlDoc *doc = NULL; xmlNode *root; xmlNode *child; - char *filename = g_build_filename(dir, "galview.xml", NULL); - char *default_view; + gchar *filename = g_build_filename(dir, "galview.xml", NULL); + gchar *default_view; if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) { #ifdef G_OS_WIN32 @@ -413,12 +413,12 @@ load_single_dir (GalViewCollection *collection, for (child = root->xmlChildrenNode; child; child = child->next) { gchar *id; gboolean found = FALSE; - int i; + gint i; - if (!strcmp ((char *)child->name, "text")) + if (!strcmp ((gchar *)child->name, "text")) continue; - id = e_xml_get_string_prop_by_name(child, (const unsigned char *)"id"); + id = e_xml_get_string_prop_by_name(child, (const guchar *)"id"); for (i = 0; i < collection->view_count; i++) { if (!strcmp(id, collection->view_data[i]->id)) { if (!local) @@ -453,7 +453,7 @@ load_single_dir (GalViewCollection *collection, g_free(id); } - default_view = e_xml_get_string_prop_by_name (root, (const unsigned char *)"default-view"); + default_view = e_xml_get_string_prop_by_name (root, (const guchar *)"default-view"); if (default_view) { if (local) collection->default_view_built_in = FALSE; @@ -505,21 +505,21 @@ gal_view_collection_load (GalViewCollection *collection) void gal_view_collection_save (GalViewCollection *collection) { - int i; + gint i; xmlDoc *doc; xmlNode *root; - char *filename; + gchar *filename; g_return_if_fail (collection != NULL); g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection)); g_return_if_fail (collection->local_dir != NULL); - doc = xmlNewDoc((const unsigned char *)"1.0"); - root = xmlNewNode(NULL, (const unsigned char *)"GalViewCollection"); + doc = xmlNewDoc((const guchar *)"1.0"); + root = xmlNewNode(NULL, (const guchar *)"GalViewCollection"); xmlDocSetRootElement(doc, root); if (collection->default_view && !collection->default_view_built_in) { - e_xml_set_string_prop_by_name(root, (const unsigned char *)"default-view", collection->default_view); + e_xml_set_string_prop_by_name(root, (const guchar *)"default-view", collection->default_view); } for (i = 0; i < collection->view_count; i++) { @@ -528,11 +528,11 @@ gal_view_collection_save (GalViewCollection *collection) item = collection->view_data[i]; if (item->ever_changed) { - child = xmlNewChild(root, NULL, (const unsigned char *)"GalView", NULL); - e_xml_set_string_prop_by_name(child, (const unsigned char *)"id", item->id); - e_xml_set_string_prop_by_name(child, (const unsigned char *)"title", item->title); - e_xml_set_string_prop_by_name(child, (const unsigned char *)"filename", item->filename); - e_xml_set_string_prop_by_name(child, (const unsigned char *)"type", item->type); + child = xmlNewChild(root, NULL, (const guchar *)"GalView", NULL); + e_xml_set_string_prop_by_name(child, (const guchar *)"id", item->id); + e_xml_set_string_prop_by_name(child, (const guchar *)"title", item->title); + e_xml_set_string_prop_by_name(child, (const guchar *)"filename", item->filename); + e_xml_set_string_prop_by_name(child, (const guchar *)"type", item->type); if (item->changed) { filename = g_build_filename(collection->local_dir, item->filename, NULL); @@ -547,10 +547,10 @@ gal_view_collection_save (GalViewCollection *collection) item = collection->removed_view_data[i]; - child = xmlNewChild(root, NULL, (const unsigned char *)"GalView", NULL); - e_xml_set_string_prop_by_name(child, (const unsigned char *)"id", item->id); - e_xml_set_string_prop_by_name(child, (const unsigned char *)"title", item->title); - e_xml_set_string_prop_by_name(child, (const unsigned char *)"type", item->type); + child = xmlNewChild(root, NULL, (const guchar *)"GalView", NULL); + e_xml_set_string_prop_by_name(child, (const guchar *)"id", item->id); + e_xml_set_string_prop_by_name(child, (const guchar *)"title", item->title); + e_xml_set_string_prop_by_name(child, (const guchar *)"type", item->type); } filename = g_build_filename(collection->local_dir, "galview.xml", NULL); if (e_xml_save_file (filename, doc) == -1) @@ -585,7 +585,7 @@ gal_view_collection_get_count (GalViewCollection *collection) */ GalView * gal_view_collection_get_view (GalViewCollection *collection, - int n) + gint n) { g_return_val_if_fail (collection != NULL, NULL); g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL); @@ -604,7 +604,7 @@ gal_view_collection_get_view (GalViewCollection *collection, */ GalViewCollectionItem * gal_view_collection_get_view_item (GalViewCollection *collection, - int n) + gint n) { g_return_val_if_fail (collection != NULL, NULL); g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL); @@ -614,10 +614,10 @@ gal_view_collection_get_view_item (GalViewCollection *collection, return collection->view_data[n]; } -int -gal_view_collection_get_view_index_by_id (GalViewCollection *collection, const char *view_id) +gint +gal_view_collection_get_view_index_by_id (GalViewCollection *collection, const gchar *view_id) { - int i; + gint i; for (i = 0; i < collection->view_count; i++) { if (!strcmp (collection->view_data[i]->id, view_id)) return i; @@ -625,8 +625,8 @@ gal_view_collection_get_view_index_by_id (GalViewCollection *collection, con return -1; } -char * -gal_view_collection_get_view_id_by_index (GalViewCollection *collection, int n) +gchar * +gal_view_collection_get_view_id_by_index (GalViewCollection *collection, gint n) { g_return_val_if_fail (collection != NULL, NULL); g_return_val_if_fail (GAL_IS_VIEW_COLLECTION (collection), NULL); @@ -673,7 +673,7 @@ gal_view_collection_append (GalViewCollection *collection, void gal_view_collection_delete_view (GalViewCollection *collection, - int i) + gint i) { GalViewCollectionItem *item; @@ -700,7 +700,7 @@ gal_view_collection_delete_view (GalViewCollection *collection, void gal_view_collection_copy_view (GalViewCollection *collection, - int i) + gint i) { GalViewCollectionItem *item; GalView *view; @@ -739,8 +739,8 @@ gal_view_collection_loaded (GalViewCollection *collection) return collection->loaded; } -const char * -gal_view_collection_append_with_title (GalViewCollection *collection, const char *title, GalView *view) +const gchar * +gal_view_collection_append_with_title (GalViewCollection *collection, const gchar *title, GalView *view) { GalViewCollectionItem *item; @@ -777,8 +777,8 @@ gal_view_collection_append_with_title (GalViewCollection *collection, const char return item->id; } -const char * -gal_view_collection_set_nth_view (GalViewCollection *collection, int i, GalView *view) +const gchar * +gal_view_collection_set_nth_view (GalViewCollection *collection, gint i, GalView *view) { GalViewCollectionItem *item; @@ -814,14 +814,14 @@ gal_view_collection_set_nth_view (GalViewCollection *collection, int i, GalView return item->id; } -const char * +const gchar * gal_view_collection_get_default_view (GalViewCollection *collection) { return collection->default_view; } void -gal_view_collection_set_default_view (GalViewCollection *collection, const char *id) +gal_view_collection_set_default_view (GalViewCollection *collection, const gchar *id) { g_free (collection->default_view); collection->default_view = g_strdup (id); diff --git a/widgets/menus/gal-view-collection.h b/widgets/menus/gal-view-collection.h index 83e5217131..d443aa9bc2 100644 --- a/widgets/menus/gal-view-collection.h +++ b/widgets/menus/gal-view-collection.h @@ -41,22 +41,22 @@ typedef struct { GObject base; GalViewCollectionItem **view_data; - int view_count; + gint view_count; GList *factory_list; GalViewCollectionItem **removed_view_data; - int removed_view_count; + gint removed_view_count; guint loaded : 1; guint default_view_built_in : 1; - char *system_dir; - char *local_dir; + gchar *system_dir; + gchar *local_dir; - char *default_view; + gchar *default_view; - char *title; + gchar *title; } GalViewCollection; typedef struct { @@ -72,13 +72,13 @@ typedef struct { struct GalViewCollectionItem { GalView *view; - char *id; + gchar *id; guint changed : 1; guint ever_changed : 1; guint built_in : 1; - char *filename; - char *title; - char *type; + gchar *filename; + gchar *title; + gchar *type; GalViewCollection *collection; guint view_changed_id; }; @@ -88,11 +88,11 @@ GType gal_view_collection_get_type (void); GalViewCollection *gal_view_collection_new (void); void gal_view_collection_set_title (GalViewCollection *collection, - const char *title); + const gchar *title); /* Set up the view collection. Call these two functions before ever doing load or save and never call them again. */ void gal_view_collection_set_storage_directories (GalViewCollection *collection, - const char *system_dir, - const char *local_dir); + const gchar *system_dir, + const gchar *local_dir); void gal_view_collection_add_factory (GalViewCollection *collection, GalViewFactory *factory); @@ -104,21 +104,21 @@ void gal_view_collection_display_view (GalViewColl /* Query the view collection. */ gint gal_view_collection_get_count (GalViewCollection *collection); GalView *gal_view_collection_get_view (GalViewCollection *collection, - int n); + gint n); GalViewCollectionItem *gal_view_collection_get_view_item (GalViewCollection *collection, - int n); -int gal_view_collection_get_view_index_by_id (GalViewCollection *collection, - const char *view_id); -char *gal_view_collection_get_view_id_by_index (GalViewCollection *collection, - int n); + gint n); +gint gal_view_collection_get_view_index_by_id (GalViewCollection *collection, + const gchar *view_id); +gchar *gal_view_collection_get_view_id_by_index (GalViewCollection *collection, + gint n); /* Manipulate the view collection */ void gal_view_collection_append (GalViewCollection *collection, GalView *view); void gal_view_collection_delete_view (GalViewCollection *collection, - int i); + gint i); void gal_view_collection_copy_view (GalViewCollection *collection, - int i); + gint i); /* Call set_storage_directories and add factories for anything that * might be found there before doing either of these. */ void gal_view_collection_load (GalViewCollection *collection); @@ -127,21 +127,21 @@ gboolean gal_view_collection_loaded (GalViewColl /* Use factory list to load a GalView file. */ GalView *gal_view_collection_load_view_from_file (GalViewCollection *collection, - const char *type, - const char *filename); + const gchar *type, + const gchar *filename); /* Returns id of the new view. These functions are used for GalViewInstanceSaveAsDialog. */ -const char *gal_view_collection_append_with_title (GalViewCollection *collection, - const char *title, +const gchar *gal_view_collection_append_with_title (GalViewCollection *collection, + const gchar *title, GalView *view); -const char *gal_view_collection_set_nth_view (GalViewCollection *collection, - int i, +const gchar *gal_view_collection_set_nth_view (GalViewCollection *collection, + gint i, GalView *view); -const char *gal_view_collection_get_default_view (GalViewCollection *collection); +const gchar *gal_view_collection_get_default_view (GalViewCollection *collection); void gal_view_collection_set_default_view (GalViewCollection *collection, - const char *id); + const gchar *id); G_END_DECLS diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c index 89ce837686..688e833aeb 100644 --- a/widgets/menus/gal-view-etable.c +++ b/widgets/menus/gal-view-etable.c @@ -88,19 +88,19 @@ gal_view_etable_edit (GalView *view, GtkWindow *parent) static void gal_view_etable_load (GalView *view, - const char *filename) + const gchar *filename) { e_table_state_load_from_file(GAL_VIEW_ETABLE(view)->state, filename); } static void gal_view_etable_save (GalView *view, - const char *filename) + const gchar *filename) { e_table_state_save_to_file(GAL_VIEW_ETABLE(view)->state, filename); } -static const char * +static const gchar * gal_view_etable_get_title (GalView *view) { return GAL_VIEW_ETABLE(view)->title; @@ -108,13 +108,13 @@ gal_view_etable_get_title (GalView *view) static void gal_view_etable_set_title (GalView *view, - const char *title) + const gchar *title) { g_free(GAL_VIEW_ETABLE(view)->title); GAL_VIEW_ETABLE(view)->title = g_strdup(title); } -static const char * +static const gchar * gal_view_etable_get_type_code (GalView *view) { return "etable"; diff --git a/widgets/menus/gal-view-etable.h b/widgets/menus/gal-view-etable.h index fdc34b2710..201c1573ef 100644 --- a/widgets/menus/gal-view-etable.h +++ b/widgets/menus/gal-view-etable.h @@ -44,7 +44,7 @@ typedef struct { ETableSpecification *spec; ETableState *state; - char *title; + gchar *title; ETable *table; guint table_state_changed_id; diff --git a/widgets/menus/gal-view-factory-etable.c b/widgets/menus/gal-view-factory-etable.c index 52f759ab37..def35a82b4 100644 --- a/widgets/menus/gal-view-factory-etable.c +++ b/widgets/menus/gal-view-factory-etable.c @@ -31,7 +31,7 @@ G_DEFINE_TYPE (GalViewFactoryEtable, gal_view_factory_etable, GAL_VIEW_FACTORY_TYPE) -static const char * +static const gchar * gal_view_factory_etable_get_title (GalViewFactory *factory) { return _("Table"); @@ -39,12 +39,12 @@ gal_view_factory_etable_get_title (GalViewFactory *factory) static GalView * gal_view_factory_etable_new_view (GalViewFactory *factory, - const char *name) + const gchar *name) { return gal_view_etable_new(GAL_VIEW_FACTORY_ETABLE(factory)->spec, name); } -static const char * +static const gchar * gal_view_factory_etable_get_type_code (GalViewFactory *factory) { return "etable"; diff --git a/widgets/menus/gal-view-factory.c b/widgets/menus/gal-view-factory.c index 5b100654de..d58a1545d0 100644 --- a/widgets/menus/gal-view-factory.c +++ b/widgets/menus/gal-view-factory.c @@ -38,7 +38,7 @@ d(static gint depth = 0;) * * Returns: The title of the factory. */ -const char * +const gchar * gal_view_factory_get_title (GalViewFactory *factory) { g_return_val_if_fail (factory != NULL, NULL); @@ -59,7 +59,7 @@ gal_view_factory_get_title (GalViewFactory *factory) */ GalView * gal_view_factory_new_view (GalViewFactory *factory, - const char *name) + const gchar *name) { g_return_val_if_fail (factory != NULL, NULL); g_return_val_if_fail (GAL_IS_VIEW_FACTORY (factory), NULL); @@ -76,7 +76,7 @@ gal_view_factory_new_view (GalViewFactory *factory, * * Returns: The type code */ -const char * +const gchar * gal_view_factory_get_type_code (GalViewFactory *factory) { g_return_val_if_fail (factory != NULL, NULL); diff --git a/widgets/menus/gal-view-factory.h b/widgets/menus/gal-view-factory.h index d2c4b4aa45..59f46a20e9 100644 --- a/widgets/menus/gal-view-factory.h +++ b/widgets/menus/gal-view-factory.h @@ -48,10 +48,10 @@ typedef struct { /* * Virtual methods */ - const char *(*get_title) (GalViewFactory *factory); - const char *(*get_type_code) (GalViewFactory *factory); + const gchar *(*get_title) (GalViewFactory *factory); + const gchar *(*get_type_code) (GalViewFactory *factory); GalView *(*new_view) (GalViewFactory *factory, - const char *name); + const gchar *name); } GalViewFactoryClass; /* Standard functions */ @@ -59,17 +59,17 @@ GType gal_view_factory_get_type (void); /* Query functions */ /* Returns already translated title. */ -const char *gal_view_factory_get_title (GalViewFactory *factory); +const gchar *gal_view_factory_get_title (GalViewFactory *factory); /* Returns the code for use in identifying this type of object in the * view list. This identifier should identify this as being the * unique factory for xml files which were written out with this * identifier. Thus each factory should have a unique type code. */ -const char *gal_view_factory_get_type_code (GalViewFactory *factory); +const gchar *gal_view_factory_get_type_code (GalViewFactory *factory); /* Create a new view */ GalView *gal_view_factory_new_view (GalViewFactory *factory, - const char *name); + const gchar *name); #ifdef __cplusplus } diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c index 02283c630e..610c03a663 100644 --- a/widgets/menus/gal-view-instance-save-as-dialog.c +++ b/widgets/menus/gal-view-instance-save-as-dialog.c @@ -48,7 +48,7 @@ static void gal_view_instance_save_as_dialog_set_instance (GalViewInstanceSaveAsDialog *dialog, GalViewInstance *instance) { - int i; + gint i; GtkListStore *store; GtkCellRenderer *renderer; dialog->instance = instance; @@ -58,7 +58,7 @@ gal_view_instance_save_as_dialog_set_instance (GalViewInstanceSaveAsDialog *dial for (i=0; i<instance->collection->view_count; i++) { GalViewCollectionItem *item = instance->collection->view_data[i]; GtkTreeIter iter; - char *title = NULL; + gchar *title = NULL; /* hide built in views */ /*if (item->built_in == 1) @@ -304,9 +304,9 @@ void gal_view_instance_save_as_dialog_save (GalViewInstanceSaveAsDialog *dialog) { GalView *view = gal_view_instance_get_current_view (dialog->instance); - const char *title; - int n; - const char *id = NULL; + const gchar *title; + gint n; + const gchar *id = NULL; GalViewCollectionItem *item; view = gal_view_clone (view); diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c index 9e0e2eb7c9..6ed7f9a604 100644 --- a/widgets/menus/gal-view-instance.c +++ b/widgets/menus/gal-view-instance.c @@ -87,14 +87,14 @@ save_current_view (GalViewInstance *instance) xmlDoc *doc; xmlNode *root; - doc = xmlNewDoc((const unsigned char *)"1.0"); - root = xmlNewNode (NULL, (const unsigned char *)"GalViewCurrentView"); + doc = xmlNewDoc((const guchar *)"1.0"); + root = xmlNewNode (NULL, (const guchar *)"GalViewCurrentView"); xmlDocSetRootElement(doc, root); if (instance->current_id) - e_xml_set_string_prop_by_name (root, (const unsigned char *)"current_view", instance->current_id); + e_xml_set_string_prop_by_name (root, (const guchar *)"current_view", instance->current_id); if (instance->current_type) - e_xml_set_string_prop_by_name (root, (const unsigned char *)"current_view_type", instance->current_type); + e_xml_set_string_prop_by_name (root, (const guchar *)"current_view_type", instance->current_type); if (e_xml_save_file (instance->current_view_filename, doc) == -1) g_warning ("Unable to save view to %s - %s", instance->current_view_filename, g_strerror(errno)); @@ -229,7 +229,7 @@ static void collection_changed (GalView *view, GalViewInstance *instance) { if (instance->current_id) { - char *view_id = instance->current_id; + gchar *view_id = instance->current_id; instance->current_id = NULL; gal_view_instance_set_current_view_id (instance, view_id); g_free (view_id); @@ -258,7 +258,7 @@ load_current_view (GalViewInstance *instance) instance->current_id = g_strdup (gal_view_instance_get_default_view (instance)); if (instance->current_id) { - int index = gal_view_collection_get_view_index_by_id (instance->collection, + gint index = gal_view_collection_get_view_index_by_id (instance->collection, instance->current_id); if (index != -1) { @@ -272,10 +272,10 @@ load_current_view (GalViewInstance *instance) } root = xmlDocGetRootElement(doc); - instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"current_view", NULL); + instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view", NULL); if (instance->current_id != NULL) { - int index = gal_view_collection_get_view_index_by_id (instance->collection, + gint index = gal_view_collection_get_view_index_by_id (instance->collection, instance->current_id); if (index != -1) { @@ -285,8 +285,8 @@ load_current_view (GalViewInstance *instance) } } if (view == NULL) { - char *type; - type = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"current_view_type", NULL); + gchar *type; + type = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view_type", NULL); view = gal_view_collection_load_view_from_file (instance->collection, type, instance->custom_filename); @@ -308,7 +308,7 @@ load_current_view (GalViewInstance *instance) * Return value: The new %GalViewInstance. **/ GalViewInstance * -gal_view_instance_new (GalViewCollection *collection, const char *instance_id) +gal_view_instance_new (GalViewCollection *collection, const gchar *instance_id) { GalViewInstance *instance = g_object_new (GAL_VIEW_INSTANCE_TYPE, NULL); if (gal_view_instance_construct (instance, collection, instance_id)) @@ -320,10 +320,10 @@ gal_view_instance_new (GalViewCollection *collection, const char *instance_id) } GalViewInstance * -gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *collection, const char *instance_id) +gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *collection, const gchar *instance_id) { - char *filename; - char *safe_id; + gchar *filename; + gchar *safe_id; g_return_val_if_fail (gal_view_collection_loaded (collection), NULL); @@ -356,7 +356,7 @@ gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *colle } /* Manipulate the current view. */ -char * +gchar * gal_view_instance_get_current_view_id (GalViewInstance *instance) { if (instance->current_id && gal_view_collection_get_view_index_by_id (instance->collection, instance->current_id) != -1) @@ -366,10 +366,10 @@ gal_view_instance_get_current_view_id (GalViewInstance *instance) } void -gal_view_instance_set_current_view_id (GalViewInstance *instance, const char *view_id) +gal_view_instance_set_current_view_id (GalViewInstance *instance, const gchar *view_id) { GalView *view; - int index; + gint index; g_return_if_fail (instance != NULL); g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance)); @@ -412,7 +412,7 @@ gal_view_instance_set_custom_view (GalViewInstance *instance, GalView *view) } static void -dialog_response(GtkWidget *dialog, int id, GalViewInstance *instance) +dialog_response(GtkWidget *dialog, gint id, GalViewInstance *instance) { if (id == GTK_RESPONSE_OK) { gal_view_instance_save_as_dialog_save (GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (dialog)); @@ -440,7 +440,7 @@ gal_view_instance_load (GalViewInstance *instance) } /* These only mean anything before gal_view_instance_load is called the first time. */ -const char * +const gchar * gal_view_instance_get_default_view (GalViewInstance *instance) { if (instance->default_view) @@ -450,7 +450,7 @@ gal_view_instance_get_default_view (GalViewInstance *instance) } void -gal_view_instance_set_default_view (GalViewInstance *instance, const char *id) +gal_view_instance_set_default_view (GalViewInstance *instance, const gchar *id) { g_free (instance->default_view); instance->default_view = g_strdup (id); @@ -470,7 +470,7 @@ gal_view_instance_exists (GalViewInstance *instance) typedef struct { GalViewInstance *instance; - char *id; + gchar *id; } ListenerClosure; static void @@ -518,7 +518,7 @@ add_popup_menu_item (EPopupMenu *menu_item, } static void -define_views_dialog_response(GtkWidget *dialog, int id, GalViewInstance *instance) +define_views_dialog_response(GtkWidget *dialog, gint id, GalViewInstance *instance) { if (id == GTK_RESPONSE_OK) { gal_view_collection_save(instance->collection); @@ -547,10 +547,10 @@ EPopupMenu * gal_view_instance_get_popup_menu (GalViewInstance *instance) { EPopupMenu *ret_val; - int length; - int i; + gint length; + gint i; gboolean found = FALSE; - char *id; + gchar *id; length = gal_view_collection_get_count(instance->collection); id = gal_view_instance_get_current_view_id (instance); @@ -595,7 +595,7 @@ gal_view_instance_get_popup_menu (GalViewInstance *instance) void gal_view_instance_free_popup_menu (GalViewInstance *instance, EPopupMenu *menu) { - int i; + gint i; /* This depends on the first non-custom closure to be a separator or a terminator. */ for (i = 0; menu[i].name && *(menu[i].name); i++) { g_object_unref (((ListenerClosure *)(menu[i].closure))->instance); diff --git a/widgets/menus/gal-view-instance.h b/widgets/menus/gal-view-instance.h index 787bc09713..a7ce2778c9 100644 --- a/widgets/menus/gal-view-instance.h +++ b/widgets/menus/gal-view-instance.h @@ -41,13 +41,13 @@ typedef struct { GalViewCollection *collection; - char *instance_id; - char *current_view_filename; - char *custom_filename; + gchar *instance_id; + gchar *current_view_filename; + gchar *custom_filename; - char *current_title; - char *current_type; - char *current_id; + gchar *current_title; + gchar *current_type; + gchar *current_id; GalView *current_view; @@ -55,7 +55,7 @@ typedef struct { guint collection_changed_id; guint loaded : 1; - char *default_view; + gchar *default_view; } GalViewInstance; typedef struct { @@ -76,15 +76,15 @@ GType gal_view_instance_get_type (void); /*collection should be loaded when you call this. instance_id: Which instance of this type of object is this (for most of evo, this is the folder id.) */ GalViewInstance *gal_view_instance_new (GalViewCollection *collection, - const char *instance_id); + const gchar *instance_id); GalViewInstance *gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *collection, - const char *instance_id); + const gchar *instance_id); /* Manipulate the current view. */ -char *gal_view_instance_get_current_view_id (GalViewInstance *instance); +gchar *gal_view_instance_get_current_view_id (GalViewInstance *instance); void gal_view_instance_set_current_view_id (GalViewInstance *instance, - const char *view_id); + const gchar *view_id); GalView *gal_view_instance_get_current_view (GalViewInstance *instance); /* Sets the current view to the given custom view. */ @@ -103,9 +103,9 @@ void gal_view_instance_save_as (GalViewInstance *inst void gal_view_instance_load (GalViewInstance *instance); /* These only mean anything before gal_view_instance_load is called the first time. */ -const char *gal_view_instance_get_default_view (GalViewInstance *instance); +const gchar *gal_view_instance_get_default_view (GalViewInstance *instance); void gal_view_instance_set_default_view (GalViewInstance *instance, - const char *id); + const gchar *id); EPopupMenu *gal_view_instance_get_popup_menu (GalViewInstance *instance); void gal_view_instance_free_popup_menu (GalViewInstance *instance, diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c index 4f76eb6cca..c1b75aee4b 100644 --- a/widgets/menus/gal-view-menus.c +++ b/widgets/menus/gal-view-menus.c @@ -43,8 +43,8 @@ struct _GalViewMenusPrivate { GalViewInstance *instance; - int collection_changed_id; - int instance_changed_id; + gint collection_changed_id; + gint instance_changed_id; BonoboUIComponent *component; EList *listenerClosures; GtkWidget *define_views_dialog; @@ -54,8 +54,8 @@ struct _GalViewMenusPrivate { typedef struct { GalViewInstance *instance; - char *id; - int ref_count; + gchar *id; + gint ref_count; } ListenerClosure; static void collection_changed (GalViewCollection *collection, @@ -69,7 +69,7 @@ static void instance_changed (GalViewInstance *instance, G_DEFINE_TYPE(GalViewMenus, gal_view_menus, G_TYPE_OBJECT) static void -closure_free (void *data, void *user_data) +closure_free (gpointer data, gpointer user_data) { ListenerClosure *closure = data; GalViewMenus *gvm = user_data; @@ -83,10 +83,10 @@ closure_free (void *data, void *user_data) } } -static void * -closure_copy (const void *data, void *user_data) +static gpointer +closure_copy (gconstpointer data, gpointer user_data) { - ListenerClosure *closure = (void *) data; + ListenerClosure *closure = (gpointer) data; closure->ref_count ++; return closure; @@ -226,7 +226,7 @@ gal_view_menus_construct (GalViewMenus *gvm, } static void -dialog_response(GtkWidget *dialog, int id, GalViewMenus *menus) +dialog_response(GtkWidget *dialog, gint id, GalViewMenus *menus) { if (id == GTK_RESPONSE_OK) { gal_view_collection_save(menus->priv->instance->collection); @@ -237,7 +237,7 @@ dialog_response(GtkWidget *dialog, int id, GalViewMenus *menus) static void define_views(BonoboUIComponent *component, GalViewMenus *menus, - char *cname) + gchar *cname) { if (menus->priv->define_views_dialog) { gdk_window_raise (menus->priv->define_views_dialog->window); @@ -254,16 +254,16 @@ define_views(BonoboUIComponent *component, static void save_current_view(BonoboUIComponent *component, GalViewMenus *menus, - char *cname) + gchar *cname) { gal_view_instance_save_as (menus->priv->instance); } static void toggled_cb (BonoboUIComponent *component, - const char *path, + const gchar *path, Bonobo_UIComponent_EventType type, - const char *state, + const gchar *state, gpointer user_data) { ListenerClosure *closure = user_data; @@ -277,16 +277,16 @@ toggled_cb (BonoboUIComponent *component, gal_view_instance_set_current_view_id (closure->instance, closure->id); } -static char * +static gchar * build_menus(GalViewMenus *menus) { BonoboUINode *root, *menu, *submenu, *place, *menuitem, *commands, *command; - char *xml; - int length; - int i; + gchar *xml; + gint length; + gint i; GalViewInstance *instance = menus->priv->instance; GalViewCollection *collection = instance->collection; - char *id; + gchar *id; gboolean found = FALSE; root = bonobo_ui_node_new("Root"); @@ -313,8 +313,8 @@ build_menus(GalViewMenus *menus) for (i = 0; i < length; i++) { GalViewCollectionItem *item = gal_view_collection_get_view_item(collection, i); ListenerClosure *closure; - char *label; - char *tip; + gchar *label; + gchar *tip; menuitem = bonobo_ui_node_new_child(submenu, "menuitem"); bonobo_ui_node_set_attr(menuitem, "name", item->id); @@ -416,7 +416,7 @@ static BonoboUIVerb verbs [] = { static void set_state (GalViewMenus *gvm, const gchar *path, CORBA_Environment *ev) { - char *full_path = g_strdup_printf ("/commands/%s", path); + gchar *full_path = g_strdup_printf ("/commands/%s", path); bonobo_ui_component_set_prop (gvm->priv->component, full_path, "state", "1", ev); g_free (full_path); @@ -426,7 +426,7 @@ static void set_radio (GalViewMenus *gvm, CORBA_Environment *ev) { - char *id; + gchar *id; id = gal_view_instance_get_current_view_id (gvm->priv->instance); @@ -442,7 +442,7 @@ static void build_stuff (GalViewMenus *gvm, CORBA_Environment *ev) { - char *xml; + gchar *xml; g_object_ref (gvm); diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c index 8bfc84fa15..ea38e155a2 100644 --- a/widgets/menus/gal-view-new-dialog.c +++ b/widgets/menus/gal-view-new-dialog.c @@ -132,7 +132,7 @@ static void sensitize_ok_response (GalViewNewDialog *dialog) { gboolean ok = TRUE; - const char *text; + const gchar *text; text = gtk_entry_get_text (GTK_ENTRY (dialog->entry)); if (!text || !text[0]) diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c index fd3cdc2a5e..7b52d74864 100644 --- a/widgets/menus/gal-view.c +++ b/widgets/menus/gal-view.c @@ -65,7 +65,7 @@ gal_view_edit (GalView *view, */ void gal_view_load (GalView *view, - const char *filename) + const gchar *filename) { g_return_if_fail (view != NULL); g_return_if_fail (GAL_IS_VIEW (view)); @@ -81,7 +81,7 @@ gal_view_load (GalView *view, */ void gal_view_save (GalView *view, - const char *filename) + const gchar *filename) { g_return_if_fail (view != NULL); g_return_if_fail (GAL_IS_VIEW (view)); @@ -96,7 +96,7 @@ gal_view_save (GalView *view, * * Returns: The title of the view. */ -const char * +const gchar * gal_view_get_title (GalView *view) { g_return_val_if_fail (view != NULL, NULL); @@ -115,7 +115,7 @@ gal_view_get_title (GalView *view) */ void gal_view_set_title (GalView *view, - const char *title) + const gchar *title) { g_return_if_fail (view != NULL); g_return_if_fail (GAL_IS_VIEW (view)); @@ -130,7 +130,7 @@ gal_view_set_title (GalView *view, * * Returns: The type of the view. */ -const char * +const gchar * gal_view_get_type_code (GalView *view) { g_return_val_if_fail (view != NULL, NULL); diff --git a/widgets/menus/gal-view.h b/widgets/menus/gal-view.h index b0ac4f3176..ce73400033 100644 --- a/widgets/menus/gal-view.h +++ b/widgets/menus/gal-view.h @@ -50,13 +50,13 @@ typedef struct { */ void (*edit) (GalView *view, GtkWindow *parent_window); void (*load) (GalView *view, - const char *filename); + const gchar *filename); void (*save) (GalView *view, - const char *filename); - const char *(*get_title) (GalView *view); + const gchar *filename); + const gchar *(*get_title) (GalView *view); void (*set_title) (GalView *view, - const char *title); - const char *(*get_type_code) (GalView *view); + const gchar *title); + const gchar *(*get_type_code) (GalView *view); GalView *(*clone) (GalView *view); /* Signals */ @@ -72,17 +72,17 @@ void gal_view_edit (GalView *view, /* xml load and save functions */ void gal_view_load (GalView *view, - const char *filename); + const gchar *filename); void gal_view_save (GalView *view, - const char *filename); + const gchar *filename); /* Title functions */ -const char *gal_view_get_title (GalView *view); +const gchar *gal_view_get_title (GalView *view); void gal_view_set_title (GalView *view, - const char *title); + const gchar *title); /* View type. */ -const char *gal_view_get_type_code (GalView *view); +const gchar *gal_view_get_type_code (GalView *view); /* Cloning the view */ GalView *gal_view_clone (GalView *view); 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; diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c index 09e2187b82..583793e85f 100644 --- a/widgets/table/e-cell-checkbox.c +++ b/widgets/table/e-cell-checkbox.c @@ -41,11 +41,11 @@ static GdkPixbuf *checks [2]; static void ecc_print (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width, double height) { cairo_t *cr = gtk_print_context_get_cairo_context (context); - const int value = GPOINTER_TO_INT ( + const gint value = GPOINTER_TO_INT ( e_table_model_value_at (ecell_view->e_table_model, model_col, row)); cairo_save (cr); diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c index 80d6294b2d..638058621d 100644 --- a/widgets/table/e-cell-combo.c +++ b/widgets/table/e-cell-combo.c @@ -78,15 +78,15 @@ static void e_cell_combo_dispose (GObject *object); static gint e_cell_combo_do_popup (ECellPopup *ecp, GdkEvent *event, - int row, - int view_col); + gint row, + gint view_col); static void e_cell_combo_select_matching_item (ECellCombo *ecc); static void e_cell_combo_show_popup (ECellCombo *ecc, - int row, - int view_col); + gint row, + gint view_col); static void e_cell_combo_get_popup_pos (ECellCombo *ecc, - int row, - int view_col, + gint row, + gint view_col, gint *x, gint *y, gint *height, @@ -100,7 +100,7 @@ static gint e_cell_combo_button_press (GtkWidget *popup_window, static gint e_cell_combo_button_release (GtkWidget *popup_window, GdkEventButton *event, ECellCombo *ecc); -static int e_cell_combo_key_press (GtkWidget *popup_window, +static gint e_cell_combo_key_press (GtkWidget *popup_window, GdkEventKey *event, ECellCombo *ecc); @@ -240,7 +240,7 @@ e_cell_combo_set_popdown_strings (ECellCombo *ecc, for (elem = strings; elem; elem = elem->next) { GtkTreeIter iter; - char *utf8_text = elem->data; + gchar *utf8_text = elem->data; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, utf8_text, -1); @@ -251,8 +251,8 @@ e_cell_combo_set_popdown_strings (ECellCombo *ecc, static gint e_cell_combo_do_popup (ECellPopup *ecp, GdkEvent *event, - int row, - int view_col) + gint row, + gint view_col) { ECellCombo *ecc = E_CELL_COMBO (ecp); guint32 time; @@ -297,7 +297,7 @@ e_cell_combo_select_matching_item (ECellCombo *ecc) ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view); ETableCol *ecol; gboolean found = FALSE; - char *cell_text; + gchar *cell_text; gboolean valid; GtkTreeSelection *selection; GtkTreeIter iter; @@ -313,7 +313,7 @@ e_cell_combo_select_matching_item (ECellCombo *ecc) 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); @@ -336,7 +336,7 @@ e_cell_combo_select_matching_item (ECellCombo *ecc) } static void -e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col) +e_cell_combo_show_popup (ECellCombo *ecc, gint row, gint view_col) { gint x, y, width, height, old_width, old_height; @@ -366,8 +366,8 @@ e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col) /* Calculates the size and position of the popup window (like GtkCombo). */ static void e_cell_combo_get_popup_pos (ECellCombo *ecc, - int row, - int view_col, + gint row, + gint view_col, gint *x, gint *y, gint *height, diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c index 92c0dd98b6..6e95a1f5ea 100644 --- a/widgets/table/e-cell-date.c +++ b/widgets/table/e-cell-date.c @@ -40,15 +40,15 @@ G_DEFINE_TYPE (ECellDate, e_cell_date, E_CELL_TEXT_TYPE) #define localtime_r(timep, result) (localtime (timep) ? memcpy ((result), localtime (timep), sizeof (*(result))) : 0) #endif -static char * -ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) +static gchar * +ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row) { time_t date = GPOINTER_TO_INT (e_table_model_value_at(model, col, row)); time_t nowdate = time(NULL); time_t yesdate; struct tm then, now, yesterday; - char buf[100]; - char *temp; + gchar buf[100]; + gchar *temp; gboolean done = FALSE; if (date == 0) { @@ -83,7 +83,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) } } if (!done) { - int i; + gint i; for (i = 2; i < 7; i++) { yesdate = nowdate - 60 * 60 * 24 * i; localtime_r (&yesdate, &yesterday); @@ -111,7 +111,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) } static void -ecd_free_text(ECellText *cell, char *text) +ecd_free_text(ECellText *cell, gchar *text) { g_free(text); } @@ -156,7 +156,7 @@ e_cell_date_init (ECellDate *ecd) * Returns: an ECell object that can be used to render dates. */ ECell * -e_cell_date_new (const char *fontname, GtkJustification justify) +e_cell_date_new (const gchar *fontname, GtkJustification justify) { ECellDate *ecd = g_object_new (E_CELL_DATE_TYPE, NULL); diff --git a/widgets/table/e-cell-date.h b/widgets/table/e-cell-date.h index fece501726..968e387198 100644 --- a/widgets/table/e-cell-date.h +++ b/widgets/table/e-cell-date.h @@ -43,7 +43,7 @@ typedef struct { } ECellDateClass; GType e_cell_date_get_type (void); -ECell *e_cell_date_new (const char *fontname, GtkJustification justify); +ECell *e_cell_date_new (const gchar *fontname, GtkJustification justify); G_END_DECLS diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c index f84d8761c7..273343aaa1 100644 --- a/widgets/table/e-cell-hbox.c +++ b/widgets/table/e-cell-hbox.c @@ -48,11 +48,11 @@ G_DEFINE_TYPE (ECellHbox, e_cell_hbox, E_CELL_TYPE) * ECell::new_view method */ static ECellView * -ecv_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellHbox *ecv = E_CELL_HBOX (ecell); ECellHboxView *hbox_view = g_new0 (ECellHboxView, 1); - int i; + gint i; hbox_view->cell_view.ecell = ecell; hbox_view->cell_view.e_table_model = table_model; @@ -82,7 +82,7 @@ static void ecv_kill_view (ECellView *ecv) { ECellHboxView *hbox_view = (ECellHboxView *) ecv; - int i; + gint i; if (hbox_view->cell_view.kill_view_cb) (hbox_view->cell_view.kill_view_cb)(ecv, hbox_view->cell_view.kill_view_cb_data); @@ -107,7 +107,7 @@ static void ecv_realize (ECellView *ecell_view) { ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; - int i; + gint i; /* realize our subcell view */ for (i = 0; i < hbox_view->subcell_view_count; i++) @@ -124,7 +124,7 @@ static void ecv_unrealize (ECellView *ecv) { ECellHboxView *hbox_view = (ECellHboxView *) ecv; - int i; + gint i; /* unrealize our subcell view. */ for (i = 0; i < hbox_view->subcell_view_count; i++) @@ -139,19 +139,19 @@ ecv_unrealize (ECellView *ecv) */ static void ecv_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; - int subcell_offset = 0; - int i; - int allotted_width = x2-x1; + gint subcell_offset = 0; + gint i; + gint allotted_width = x2-x1; for (i = 0; i < hbox_view->subcell_view_count; i++) { /* Now cause our subcells to draw their contents, shifted by subcell_offset pixels */ - int width = allotted_width * hbox_view->def_size_cols[i] / 100; + gint width = allotted_width * hbox_view->def_size_cols[i] / 100; /* e_cell_max_width_by_row (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row); if (width < hbox_view->def_size_cols[i]) width = hbox_view->def_size_cols[i]; @@ -168,12 +168,12 @@ ecv_draw (ECellView *ecell_view, GdkDrawable *drawable, * ECell::event method */ static gint -ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions) +ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; - int y = 0; - int i; - int subcell_offset = 0; + gint y = 0; + gint i; + gint subcell_offset = 0; switch (event->type) { case GDK_BUTTON_PRESS: @@ -191,7 +191,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, } for (i = 0; i < hbox_view->subcell_view_count; i++) { - int width = e_cell_max_width_by_row (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row); + gint width = e_cell_max_width_by_row (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row); if (width < hbox_view->def_size_cols[i]) width = hbox_view->def_size_cols[i]; if (y < subcell_offset + width) @@ -205,11 +205,11 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, * ECell::height method */ static int -ecv_height (ECellView *ecell_view, int model_col, int view_col, int row) +ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; - int height = 0, max_height = 0; - int i; + gint height = 0, max_height = 0; + gint i; for (i = 0; i < hbox_view->subcell_view_count; i++) { height = e_cell_height (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row); @@ -222,14 +222,14 @@ ecv_height (ECellView *ecell_view, int model_col, int view_col, int row) * ECell::max_width method */ static int -ecv_max_width (ECellView *ecell_view, int model_col, int view_col) +ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; - int width = 0; - int i; + gint width = 0; + gint i; for (i = 0; i < hbox_view->subcell_view_count; i++) { - int cell_width = e_cell_max_width (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col); + gint cell_width = e_cell_max_width (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col); if (cell_width < hbox_view->def_size_cols[i]) cell_width = hbox_view->def_size_cols[i]; @@ -246,7 +246,7 @@ static void ecv_dispose (GObject *object) { ECellHbox *ecv = E_CELL_HBOX (object); - int i; + gint i; /* destroy our subcell */ for (i = 0; i < ecv->subcell_count; i++) @@ -305,7 +305,7 @@ e_cell_hbox_new (void) } void -e_cell_hbox_append (ECellHbox *hbox, ECell *subcell, int model_col, int size) +e_cell_hbox_append (ECellHbox *hbox, ECell *subcell, gint model_col, gint size) { hbox->subcell_count ++; diff --git a/widgets/table/e-cell-hbox.h b/widgets/table/e-cell-hbox.h index dc726960fa..366d01fffe 100644 --- a/widgets/table/e-cell-hbox.h +++ b/widgets/table/e-cell-hbox.h @@ -38,18 +38,18 @@ G_BEGIN_DECLS typedef struct { ECell parent; - int subcell_count; + gint subcell_count; ECell **subcells; - int *model_cols; - int *def_size_cols; + gint *model_cols; + gint *def_size_cols; } ECellHbox; typedef struct { ECellView cell_view; - int subcell_view_count; + gint subcell_view_count; ECellView **subcell_views; - int *model_cols; - int *def_size_cols; + gint *model_cols; + gint *def_size_cols; } ECellHboxView; typedef struct { @@ -60,8 +60,8 @@ GType e_cell_hbox_get_type (void); ECell *e_cell_hbox_new (void); void e_cell_hbox_append (ECellHbox *vbox, ECell *subcell, - int model_col, - int size); + gint model_col, + gint size); G_END_DECLS diff --git a/widgets/table/e-cell-number.c b/widgets/table/e-cell-number.c index 56754a05e5..63f55eb1c4 100644 --- a/widgets/table/e-cell-number.c +++ b/widgets/table/e-cell-number.c @@ -32,14 +32,14 @@ G_DEFINE_TYPE (ECellNumber, e_cell_number, E_CELL_TEXT_TYPE) -static char * -ecn_get_text(ECellText *cell, ETableModel *model, int col, int row) +static gchar * +ecn_get_text(ECellText *cell, ETableModel *model, gint col, gint row) { return e_format_number(GPOINTER_TO_INT (e_table_model_value_at(model, col, row))); } static void -ecn_free_text(ECellText *cell, char *text) +ecn_free_text(ECellText *cell, gchar *text) { g_free(text); } @@ -72,7 +72,7 @@ e_cell_number_init (ECellNumber *cell_number) * Returns: an ECell object that can be used to render numbers. */ ECell * -e_cell_number_new (const char *fontname, GtkJustification justify) +e_cell_number_new (const gchar *fontname, GtkJustification justify) { ECellNumber *ecn = g_object_new (E_CELL_NUMBER_TYPE, NULL); diff --git a/widgets/table/e-cell-number.h b/widgets/table/e-cell-number.h index 75471f7a2c..fcba9f517a 100644 --- a/widgets/table/e-cell-number.h +++ b/widgets/table/e-cell-number.h @@ -43,7 +43,7 @@ typedef struct { } ECellNumberClass; GType e_cell_number_get_type (void); -ECell *e_cell_number_new (const char *fontname, GtkJustification justify); +ECell *e_cell_number_new (const gchar *fontname, GtkJustification justify); G_END_DECLS diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index ea141305b9..cf90909d6f 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -76,7 +76,7 @@ e_cell_pixbuf_construct (ECellPixbuf *ecp) */ static ECellView * -pixbuf_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +pixbuf_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellPixbufView *pixbuf_view = g_new0 (ECellPixbufView, 1); ETableItem *eti = E_TABLE_ITEM (e_table_item_view); @@ -109,12 +109,12 @@ pixbuf_kill_view (ECellView *ecell_view) static void pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { GdkPixbuf *cell_pixbuf; - int real_x, real_y, real_w, real_h; - int pix_w, pix_h; + gint real_x, real_y, real_w, real_h; + gint pix_w, pix_h; cairo_t *cr; cell_pixbuf = e_table_model_value_at (ecell_view->e_table_model, @@ -133,7 +133,7 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable, /* We center the pixbuf within our allocated space */ if (x2 - x1 > pix_w) { - int diff = (x2 - x1) - pix_w; + gint diff = (x2 - x1) - pix_w; real_x = x1 + diff/2; real_w = pix_w; } else { @@ -142,7 +142,7 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable, } if (y2 - y1 > pix_h) { - int diff = (y2 - y1) - pix_h; + gint diff = (y2 - y1) - pix_h; real_y = y1 + diff/2; real_h = pix_h; } else { @@ -160,7 +160,7 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable, static gint pixbuf_event (ECellView *ecell_view, GdkEvent *event, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { /* noop */ @@ -169,7 +169,7 @@ pixbuf_event (ECellView *ecell_view, GdkEvent *event, } static gint -pixbuf_height (ECellView *ecell_view, int model_col, int view_col, int row) +pixbuf_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { GdkPixbuf *pixbuf; if (row == -1) { @@ -193,11 +193,11 @@ pixbuf_height (ECellView *ecell_view, int model_col, int view_col, int row) */ static void pixbuf_print (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width, double height) { GdkPixbuf *pixbuf; - int scale; + gint scale; cairo_t *cr = gtk_print_context_get_cairo_context (context); pixbuf = (GdkPixbuf *) e_table_model_value_at (ecell_view->e_table_model, 1, row); @@ -214,7 +214,7 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context, static gdouble pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width) { GdkPixbuf *pixbuf; @@ -236,9 +236,9 @@ pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context, } static gint -pixbuf_max_width (ECellView *ecell_view, int model_col, int view_col) +pixbuf_max_width (ECellView *ecell_view, gint model_col, gint view_col) { - int pw; + gint pw; gint num_rows, i; gint max_width = -1; diff --git a/widgets/table/e-cell-pixbuf.h b/widgets/table/e-cell-pixbuf.h index 850e9d535d..f6d3c5173d 100644 --- a/widgets/table/e-cell-pixbuf.h +++ b/widgets/table/e-cell-pixbuf.h @@ -39,9 +39,9 @@ typedef struct _ECellPixbufClass ECellPixbufClass; struct _ECellPixbuf { ECell parent; - int selected_column; - int focused_column; - int unselected_column; + gint selected_column; + gint focused_column; + gint unselected_column; }; struct _ECellPixbufClass { diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c index 8a8918dc70..5fcd13fce4 100644 --- a/widgets/table/e-cell-popup.c +++ b/widgets/table/e-cell-popup.c @@ -76,7 +76,7 @@ static int ecp_height (ECellView *ecv, int model_col, int view_col, int row); -static void* ecp_enter_edit (ECellView *ecv, +static gpointer ecp_enter_edit (ECellView *ecv, int model_col, int view_col, int row); @@ -107,12 +107,12 @@ static void ecp_show_tooltip (ECellView *ecv, int row, int col_width, ETableTooltip *tooltip); -static char *ecp_get_bg_color (ECellView *ecell_view, int row); +static gchar *ecp_get_bg_color (ECellView *ecell_view, gint row); static gint e_cell_popup_do_popup (ECellPopupView *ecp_view, GdkEvent *event, - int row, - int model_col); + gint row, + gint model_col); G_DEFINE_TYPE (ECellPopup, e_cell_popup, E_CELL_TYPE) @@ -189,7 +189,7 @@ e_cell_popup_dispose (GObject *object) * ECell::new_view method */ static ECellView * -ecp_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +ecp_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellPopup *ecp = E_CELL_POPUP (ecell); ECellPopupView *ecp_view; @@ -267,8 +267,8 @@ ecp_unrealize (ECellView *ecv) */ static void ecp_draw (ECellView *ecv, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { ECellPopup *ecp = E_CELL_POPUP (ecv->ecell); ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -326,13 +326,13 @@ ecp_draw (ECellView *ecv, GdkDrawable *drawable, * ECell::event method */ static gint -ecp_event (ECellView *ecv, GdkEvent *event, int model_col, int view_col, - int row, ECellFlags flags, ECellActions *actions) +ecp_event (ECellView *ecv, GdkEvent *event, gint model_col, gint view_col, + gint row, ECellFlags flags, ECellActions *actions) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; ECellPopup *ecp = E_CELL_POPUP (ecp_view->cell_view.ecell); ETableItem *eti = E_TABLE_ITEM (ecv->e_table_item_view); - int width; + gint width; switch (event->type) { case GDK_BUTTON_PRESS: @@ -369,7 +369,7 @@ ecp_event (ECellView *ecv, GdkEvent *event, int model_col, int view_col, * ECell::height method */ static int -ecp_height (ECellView *ecv, int model_col, int view_col, int row) +ecp_height (ECellView *ecv, gint model_col, gint view_col, gint row) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -380,8 +380,8 @@ ecp_height (ECellView *ecv, int model_col, int view_col, int row) /* * ECellView::enter_edit method */ -static void * -ecp_enter_edit (ECellView *ecv, int model_col, int view_col, int row) +static gpointer +ecp_enter_edit (ECellView *ecv, gint model_col, gint view_col, gint row) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -393,8 +393,8 @@ ecp_enter_edit (ECellView *ecv, int model_col, int view_col, int row) * ECellView::leave_edit method */ static void -ecp_leave_edit (ECellView *ecv, int model_col, int view_col, int row, - void *edit_context) +ecp_leave_edit (ECellView *ecv, gint model_col, gint view_col, gint row, + gpointer edit_context) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -405,7 +405,7 @@ ecp_leave_edit (ECellView *ecv, int model_col, int view_col, int row, static void ecp_print (ECellView *ecv, GtkPrintContext *context, - int model_col, int view_col, int row, double width, double height) + gint model_col, gint view_col, gint row, double width, double height) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -416,7 +416,7 @@ ecp_print (ECellView *ecv, GtkPrintContext *context, static gdouble ecp_print_height (ECellView *ecv, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -428,8 +428,8 @@ ecp_print_height (ECellView *ecv, GtkPrintContext *context, static int ecp_max_width (ECellView *ecv, - int model_col, - int view_col) + gint model_col, + gint view_col) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -439,10 +439,10 @@ ecp_max_width (ECellView *ecv, static void ecp_show_tooltip (ECellView *ecv, - int model_col, - int view_col, - int row, - int col_width, + gint model_col, + gint view_col, + gint row, + gint col_width, ETableTooltip *tooltip) { ECellPopupView *ecp_view = (ECellPopupView *) ecv; @@ -451,8 +451,8 @@ ecp_show_tooltip (ECellView *ecv, col_width, tooltip); } -static char * -ecp_get_bg_color (ECellView *ecell_view, int row) +static gchar * +ecp_get_bg_color (ECellView *ecell_view, gint row) { ECellPopupView *ecp_view = (ECellPopupView *) ecell_view; @@ -487,11 +487,11 @@ e_cell_popup_set_child (ECellPopup *ecp, static gint e_cell_popup_do_popup (ECellPopupView *ecp_view, GdkEvent *event, - int row, - int view_col) + gint row, + gint view_col) { ECellPopup *ecp = E_CELL_POPUP (ecp_view->cell_view.ecell); - gint (*popup_func) (ECellPopup *ecp, GdkEvent *event, int row, int view_col); + gint (*popup_func) (ECellPopup *ecp, GdkEvent *event, gint row, gint view_col); ecp->popup_cell_view = ecp_view; diff --git a/widgets/table/e-cell-popup.h b/widgets/table/e-cell-popup.h index c1262a1234..b1e40a9845 100644 --- a/widgets/table/e-cell-popup.h +++ b/widgets/table/e-cell-popup.h @@ -71,7 +71,7 @@ typedef struct { ECellClass parent_class; /* Virtual function for subclasses to override. */ - gint (*popup) (ECellPopup *ecp, GdkEvent *event, int row, int view_col); + gint (*popup) (ECellPopup *ecp, GdkEvent *event, gint row, gint view_col); } ECellPopupClass; diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c index ca4078512f..1fa949ec6a 100644 --- a/widgets/table/e-cell-size.c +++ b/widgets/table/e-cell-size.c @@ -31,8 +31,8 @@ G_DEFINE_TYPE (ECellSize, e_cell_size, E_CELL_TEXT_TYPE) -static char * -ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) +static gchar * +ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row) { gint size = GPOINTER_TO_INT(e_table_model_value_at(model, col, row)); gfloat fsize; @@ -51,7 +51,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) } static void -ecd_free_text(ECellText *cell, char *text) +ecd_free_text(ECellText *cell, gchar *text) { g_free(text); } @@ -96,7 +96,7 @@ e_cell_size_init (ECellSize *e_cell_size) * * Returns: an ECell object that can be used to render file sizes. */ ECell * -e_cell_size_new (const char *fontname, GtkJustification justify) +e_cell_size_new (const gchar *fontname, GtkJustification justify) { ECellSize *ecd = g_object_new (E_CELL_SIZE_TYPE, NULL); diff --git a/widgets/table/e-cell-size.h b/widgets/table/e-cell-size.h index ed0d279f6b..2b335d7717 100644 --- a/widgets/table/e-cell-size.h +++ b/widgets/table/e-cell-size.h @@ -44,7 +44,7 @@ typedef struct { } ECellSizeClass; GType e_cell_size_get_type (void); -ECell *e_cell_size_new (const char *fontname, GtkJustification justify); +ECell *e_cell_size_new (const gchar *fontname, GtkJustification justify); G_END_DECLS diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 3a03fe51e7..409f933dae 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -73,10 +73,10 @@ /* This defines a line of text */ struct line { - char *text; /* Line's text UTF-8, it is a pointer into the text->text string */ - int length; /* Line's length in BYTES */ - int width; /* Line's width in pixels */ - int ellipsis_length; /* Length before adding ellipsis in BYTES */ + gchar *text; /* Line's text UTF-8, it is a pointer into the text->text string */ + gint length; /* Line's length in BYTES */ + gint width; /* Line's width in pixels */ + gint ellipsis_length; /* Length before adding ellipsis in BYTES */ }; /* Object argument IDs */ @@ -116,9 +116,9 @@ G_DEFINE_TYPE (ECellText, e_cell_text, E_CELL_TYPE) typedef struct { gpointer lines; /* Text split into lines (private field) */ - int num_lines; /* Number of lines of text */ - int max_width; - int ref_count; + gint num_lines; /* Number of lines of text */ + gint max_width; + gint ref_count; } ECellTextLineBreaks; @@ -138,7 +138,7 @@ typedef struct { CellEdit *edit; - int xofs, yofs; /* This gets added to the x + gint xofs, yofs; /* This gets added to the x and y for the cell text. */ double ellipsis_width[2]; /* The width of the ellipsis. */ } ECellTextView; @@ -147,26 +147,26 @@ struct _CellEdit { ECellTextView *text_view; - int model_col, view_col, row; - int cell_width; + gint model_col, view_col, row; + gint cell_width; PangoLayout *layout; - char *text; + gchar *text; - char *old_text; + gchar *old_text; /* * Where the editing is taking place */ - int xofs_edit, yofs_edit; /* Offset because of editing. + gint xofs_edit, yofs_edit; /* Offset because of editing. This is negative compared to the other offsets. */ /* This needs to be reworked a bit once we get line wrapping. */ - int selection_start; /* Start of selection - IN BYTES */ - int selection_end; /* End of selection - IN BYTES */ + gint selection_start; /* Start of selection - IN BYTES */ + gint selection_end; /* End of selection - IN BYTES */ gboolean select_by_word; /* Current selection is by word */ /* This section is for drag scrolling and blinking cursor. */ @@ -200,7 +200,7 @@ struct _CellEdit { static void e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *command, gpointer data); static void e_cell_text_view_get_selection (CellEdit *edit, GdkAtom selection, guint32 time); -static void e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, char *data, gint length); +static void e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, gchar *data, gint length); static void _get_tep (CellEdit *edit); @@ -213,13 +213,13 @@ static void e_cell_text_preedit_changed_cb (GtkIMContext *context, ECellTextView static void e_cell_text_commit_cb (GtkIMContext *context, const gchar *str, ECellTextView *text_view); static gboolean e_cell_text_retrieve_surrounding_cb (GtkIMContext *context, ECellTextView *text_view); static gboolean e_cell_text_delete_surrounding_cb (GtkIMContext *context, gint offset, gint n_chars, ECellTextView *text_view); -static void _insert (ECellTextView *text_view, const gchar *string, int value); +static void _insert (ECellTextView *text_view, const gchar *string, gint value); static void _delete_selection (ECellTextView *text_view); -static PangoAttrList* build_attr_list (ECellTextView *text_view, int row, int text_length); +static PangoAttrList* build_attr_list (ECellTextView *text_view, gint row, gint text_length); static void update_im_cursor_location (ECellTextView *tv); -char * -e_cell_text_get_text (ECellText *cell, ETableModel *model, int col, int row) +gchar * +e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row) { if (ECT_CLASS(cell)->get_text) return ECT_CLASS(cell)->get_text (cell, model, col, row); @@ -228,44 +228,44 @@ e_cell_text_get_text (ECellText *cell, ETableModel *model, int col, int row) } void -e_cell_text_free_text (ECellText *cell, char *text) +e_cell_text_free_text (ECellText *cell, gchar *text) { if (ECT_CLASS(cell)->free_text) ECT_CLASS(cell)->free_text (cell, text); } void -e_cell_text_set_value (ECellText *cell, ETableModel *model, int col, int row, - const char *text) +e_cell_text_set_value (ECellText *cell, ETableModel *model, gint col, gint row, + const gchar *text) { if (ECT_CLASS(cell)->set_value) ECT_CLASS(cell)->set_value (cell, model, col, row, text); } -static char * -ect_real_get_text (ECellText *cell, ETableModel *model, int col, int row) +static gchar * +ect_real_get_text (ECellText *cell, ETableModel *model, gint col, gint row) { return e_table_model_value_at(model, col, row); } static void -ect_real_free_text (ECellText *cell, char *text) +ect_real_free_text (ECellText *cell, gchar *text) { } /* This is the default method for setting the ETableModel value based on the text in the ECellText. This simply uses the text as it is - it assumes - the value in the model is a char*. Subclasses may parse the text into + the value in the model is a gchar *. Subclasses may parse the text into data structures to pass to the model. */ static void -ect_real_set_value (ECellText *cell, ETableModel *model, int col, int row, - const char *text) +ect_real_set_value (ECellText *cell, ETableModel *model, gint col, gint row, + const gchar *text) { e_table_model_set_value_at (model, col, row, text); } static void -ect_queue_redraw (ECellTextView *text_view, int view_col, int view_row) +ect_queue_redraw (ECellTextView *text_view, gint view_col, gint view_row) { e_table_item_redraw_range ( text_view->cell_view.e_table_item_view, @@ -279,8 +279,8 @@ static void ect_stop_editing (ECellTextView *text_view, gboolean commit) { CellEdit *edit = text_view->edit; - int row, view_col, model_col; - char *old_text, *text; + gint row, view_col, model_col; + gchar *old_text, *text; if (!edit) return; @@ -350,7 +350,7 @@ ect_cancel_edit (ECellTextView *text_view) * ECell::new_view method */ static ECellView * -ect_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellTextView *text_view = g_new0 (ECellTextView, 1); GnomeCanvas *canvas = GNOME_CANVAS_ITEM (e_table_item_view)->canvas; @@ -456,7 +456,7 @@ ect_free_color (gchar *color_spec, GdkColor *color, GdkColormap *colormap) static PangoAttrList* -build_attr_list (ECellTextView *text_view, int row, int text_length) +build_attr_list (ECellTextView *text_view, gint row, gint text_length) { ECellView *ecell_view = (ECellView *) text_view; @@ -501,7 +501,7 @@ build_attr_list (ECellTextView *text_view, int row, int text_length) } static PangoLayout * -layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint width) +layout_with_preedit (ECellTextView *text_view, gint row, const gchar *text, gint width) { CellEdit *edit = text_view->edit; PangoAttrList *attrs ; @@ -563,7 +563,7 @@ layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint w } static PangoLayout * -build_layout (ECellTextView *text_view, int row, const char *text, gint width) +build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width) { ECellView *ecell_view = (ECellView *) text_view; ECellText *ect = E_CELL_TEXT (ecell_view->ecell); @@ -592,13 +592,13 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width) if (ect->font_name) { PangoFontDescription *desc = NULL, *fixed_desc = NULL; - char *fixed_family = NULL; + gchar *fixed_family = NULL; gint fixed_size = 0; gboolean fixed_points = TRUE; fixed_desc = pango_font_description_from_string (ect->font_name); if (fixed_desc) { - fixed_family = (char *)pango_font_description_get_family (fixed_desc); + fixed_family = (gchar *)pango_font_description_get_family (fixed_desc); fixed_size = pango_font_description_get_size (fixed_desc); fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc); } @@ -637,7 +637,7 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width) } static PangoLayout * -generate_layout (ECellTextView *text_view, int model_col, int view_col, int row, int width) +generate_layout (ECellTextView *text_view, gint model_col, gint view_col, gint row, gint width) { ECellView *ecell_view = (ECellView *) text_view; ECellText *ect = E_CELL_TEXT (ecell_view->ecell); @@ -650,7 +650,7 @@ generate_layout (ECellTextView *text_view, int model_col, int view_col, int row, } if (row >= 0) { - char *temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row); + gchar *temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row); layout = build_layout (text_view, row, temp ? temp : "?", width); e_cell_text_free_text(ect, temp); } else @@ -661,10 +661,10 @@ generate_layout (ECellTextView *text_view, int model_col, int view_col, int row, static void -draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, int x1, int y1, PangoRectangle rect) +draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, gint x1, gint y1, PangoRectangle rect) { - int width = rect.width / PANGO_SCALE; - int height = rect.height / PANGO_SCALE; + gint width = rect.width / PANGO_SCALE; + gint height = rect.height / PANGO_SCALE; if (width <= 0) width = 1; if (height <= 0) @@ -676,15 +676,15 @@ draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, int x1, int y1, PangoRec static gboolean show_pango_rectangle (CellEdit *edit, PangoRectangle rect) { - int x1 = rect.x / PANGO_SCALE; - int x2 = (rect.x + rect.width) / PANGO_SCALE; + gint x1 = rect.x / PANGO_SCALE; + gint x2 = (rect.x + rect.width) / PANGO_SCALE; #if 0 - int y1 = rect.y / PANGO_SCALE; - int y2 = (rect.y + rect.height) / PANGO_SCALE; + gint y1 = rect.y / PANGO_SCALE; + gint y2 = (rect.y + rect.height) / PANGO_SCALE; #endif - int new_xofs_edit = edit->xofs_edit; - int new_yofs_edit = edit->yofs_edit; + gint new_xofs_edit = edit->xofs_edit; + gint new_yofs_edit = edit->yofs_edit; if (x1 < new_xofs_edit) new_xofs_edit = x1; @@ -717,8 +717,8 @@ show_pango_rectangle (CellEdit *edit, PangoRectangle rect) */ static void ect_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { PangoLayout *layout; ECellTextView *text_view = (ECellTextView *) ecell_view; @@ -728,7 +728,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, GdkColor *foreground; GtkWidget *canvas = GTK_WIDGET (text_view->canvas); GdkRectangle clip_rect; - int x_origin, y_origin; + gint x_origin, y_origin; selected = flags & E_CELL_SELECTED; @@ -741,7 +741,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, foreground = &canvas->style->text [GTK_STATE_NORMAL]; if (ect->color_column != -1) { - char *color_spec; + gchar *color_spec; GdkColor *cell_foreground; color_spec = e_table_model_value_at (ecell_view->e_table_model, @@ -783,7 +783,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, if (edit && edit->view_col == view_col && edit->row == row) { if (edit->selection_start != edit->selection_end) { - int start_index, end_index; + gint start_index, end_index; PangoLayoutLine *line; gint *ranges; gint n_ranges, i; @@ -861,7 +861,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, * Get the background color */ static gchar * -ect_get_bg_color(ECellView *ecell_view, int row) +ect_get_bg_color(ECellView *ecell_view, gint row) { ECellText *ect = E_CELL_TEXT (ecell_view->ecell); gchar *color_spec; @@ -902,7 +902,7 @@ key_begins_editing (GdkEventKey *event) * ECell::event method */ static gint -ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions) +ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { ECellTextView *text_view = (ECellTextView *) ecell_view; ETextEventProcessorEvent e_tep_event; @@ -1146,7 +1146,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, * ECell::height method */ static int -ect_height (ECellView *ecell_view, int model_col, int view_col, int row) +ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellTextView *text_view = (ECellTextView *) ecell_view; gint height; @@ -1161,13 +1161,13 @@ ect_height (ECellView *ecell_view, int model_col, int view_col, int row) /* * ECellView::enter_edit method */ -static void * -ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) +static gpointer +ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellTextView *text_view = (ECellTextView *) ecell_view; CellEdit *edit; ECellText *ect = E_CELL_TEXT(ecell_view->ecell); - char *temp; + gchar *temp; edit = g_new0 (CellEdit, 1); text_view->edit = edit; @@ -1238,7 +1238,7 @@ ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) * ECellView::leave_edit method */ static void -ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context) +ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context) { ECellTextView *text_view = (ECellTextView *) ecell_view; CellEdit *edit = text_view->edit; @@ -1255,13 +1255,13 @@ ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi /* * ECellView::save_state method */ -static void * -ect_save_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context) +static gpointer +ect_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context) { ECellTextView *text_view = (ECellTextView *) ecell_view; CellEdit *edit = text_view->edit; - int *save_state = g_new (int, 2); + gint *save_state = g_new (int, 2); save_state[0] = edit->selection_start; save_state[1] = edit->selection_end; @@ -1272,12 +1272,12 @@ ect_save_state (ECellView *ecell_view, int model_col, int view_col, int row, voi * ECellView::load_state method */ static void -ect_load_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context, void *save_state) +ect_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context, gpointer save_state) { ECellTextView *text_view = (ECellTextView *) ecell_view; CellEdit *edit = text_view->edit; - int length; - int *selection = save_state; + gint length; + gint *selection = save_state; length = strlen (edit->text); @@ -1291,7 +1291,7 @@ ect_load_state (ECellView *ecell_view, int model_col, int view_col, int row, voi * ECellView::free_state method */ static void -ect_free_state (ECellView *ecell_view, int model_col, int view_col, int row, void *save_state) +ect_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state) { g_free (save_state); } @@ -1308,11 +1308,11 @@ get_font_description_for_size (double h) } static void -get_font_size (PangoLayout *layout, PangoFontDescription *font, const char *text, +get_font_size (PangoLayout *layout, PangoFontDescription *font, const gchar *text, double *width, double *height) { - int w; - int h; + gint w; + gint h; g_return_if_fail (layout != NULL); pango_layout_set_font_description (layout, font); @@ -1328,7 +1328,7 @@ get_font_size (PangoLayout *layout, PangoFontDescription *font, const char *text static void ect_print (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width, double height) { PangoFontDescription *font_des = get_font_description_for_size (12); @@ -1341,7 +1341,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, PangoDirection dir; gboolean strikeout, underline; cairo_t *cr; - char *string; + gchar *string; double ty, ly, text_width = 0.0, text_height = 0.0; @@ -1417,7 +1417,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, static gdouble ect_print_height (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width) { /* @@ -1432,20 +1432,20 @@ ect_print_height (ECellView *ecell_view, GtkPrintContext *context, static int ect_max_width (ECellView *ecell_view, - int model_col, - int view_col) + gint model_col, + gint view_col) { /* New ECellText */ ECellTextView *text_view = (ECellTextView *) ecell_view; - int row; - int number_of_rows; - int max_width = 0; + gint row; + gint number_of_rows; + gint max_width = 0; number_of_rows = e_table_model_row_count (ecell_view->e_table_model); for (row = 0; row < number_of_rows; row++) { PangoLayout *layout = generate_layout (text_view, model_col, view_col, row, 0); - int width; + gint width; pango_layout_get_pixel_size (layout, &width, NULL); @@ -1458,13 +1458,13 @@ ect_max_width (ECellView *ecell_view, static int ect_max_width_by_row (ECellView *ecell_view, - int model_col, - int view_col, - int row) + gint model_col, + gint view_col, + gint row) { /* New ECellText */ ECellTextView *text_view = (ECellTextView *) ecell_view; - int width; + gint width; PangoLayout *layout; if (row >= e_table_model_row_count (ecell_view->e_table_model)) @@ -1519,10 +1519,10 @@ tooltip_event (GtkWidget *window, static void ect_show_tooltip (ECellView *ecell_view, - int model_col, - int view_col, - int row, - int col_width, + gint model_col, + gint view_col, + gint row, + gint col_width, ETableTooltip *tooltip) { ECellTextView *text_view = (ECellTextView *) ecell_view; @@ -1530,7 +1530,7 @@ ect_show_tooltip (ECellView *ecell_view, double i2c[6]; ArtPoint origin = {0, 0}; ArtPoint pixel_origin; - int canvas_x, canvas_y; + gint canvas_x, canvas_y; GnomeCanvasItem *tooltip_text; double tooltip_width; double tooltip_height; @@ -1540,7 +1540,7 @@ ect_show_tooltip (ECellView *ecell_view, ECellText *ect = E_CELL_TEXT(ecell_view->ecell); GtkWidget *window; PangoLayout *layout; - int width, height; + gint width, height; tooltip->timer = 0; @@ -1733,7 +1733,7 @@ ect_get_property (GObject *object, } } -static char *ellipsis_default = NULL; +static gchar *ellipsis_default = NULL; static gboolean use_ellipsis_default = TRUE; static void @@ -1741,7 +1741,7 @@ e_cell_text_class_init (ECellTextClass *klass) { ECellClass *ecc = E_CELL_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); - const char *ellipsis_env; + const gchar *ellipsis_env; object_class->finalize = ect_finalize; @@ -1972,7 +1972,7 @@ e_cell_text_delete_surrounding_cb (GtkIMContext *context, gint n_chars, ECellTextView *tv) { - int begin_pos, end_pos; + gint begin_pos, end_pos; glong text_len; CellEdit *edit = tv->edit; @@ -2020,7 +2020,7 @@ e_cell_text_init (ECellText *ect) * Returns: The ECellText. */ ECell * -e_cell_text_construct (ECellText *cell, const char *fontname, GtkJustification justify) +e_cell_text_construct (ECellText *cell, const gchar *fontname, GtkJustification justify) { if(!cell) return E_CELL(NULL); @@ -2037,7 +2037,7 @@ e_cell_text_construct (ECellText *cell, const char *fontname, GtkJustification j * * Creates a new ECell renderer that can be used to render strings that * that come from the model. The value returned from the model is - * interpreted as being a char *. + * interpreted as being a gchar *. * * The ECellText object support a large set of properties that can be * configured through the Gtk argument system and allows the user to have @@ -2056,7 +2056,7 @@ e_cell_text_construct (ECellText *cell, const char *fontname, GtkJustification j * Returns: an ECell object that can be used to render strings. */ ECell * -e_cell_text_new (const char *fontname, GtkJustification justify) +e_cell_text_new (const gchar *fontname, GtkJustification justify) { ECellText *ect = g_object_new (E_CELL_TEXT_TYPE, NULL); @@ -2072,9 +2072,9 @@ e_cell_text_new (const char *fontname, GtkJustification justify) static gint get_position_from_xy (CellEdit *edit, gint x, gint y) { - int index; - int trailing; - const char *text; + gint index; + gint trailing; + const gchar *text; PangoLayout *layout = generate_layout (edit->text_view, edit->model_col, edit->view_col, edit->row, edit->cell_width); ECellTextView *text_view = edit->text_view; @@ -2102,7 +2102,7 @@ _blink_scroll_timeout (gpointer data) gulong current_time; gboolean scroll = FALSE; gboolean redraw = FALSE; - int width, height; + gint width, height; g_timer_elapsed (edit->timer, ¤t_time); @@ -2164,10 +2164,10 @@ _blink_scroll_timeout (gpointer data) } static int -next_word (CellEdit *edit, int start) +next_word (CellEdit *edit, gint start) { - char *p; - int length; + gchar *p; + gint length; length = strlen (edit->text); if (start >= length) @@ -2188,12 +2188,12 @@ next_word (CellEdit *edit, int start) static int _get_position (ECellTextView *text_view, ETextEventProcessorCommand *command) { - int length; + gint length; CellEdit *edit = text_view->edit; gchar *p; - int unival; - int index; - int trailing; + gint unival; + gint index; + gint trailing; switch (command->position) { @@ -2360,10 +2360,10 @@ _delete_selection (ECellTextView *text_view) /* NB! We expect value to be length IN BYTES */ static void -_insert (ECellTextView *text_view, const gchar *string, int value) +_insert (ECellTextView *text_view, const gchar *string, gint value) { CellEdit *edit = text_view->edit; - char *temp; + gchar *temp; if (value <= 0) return; @@ -2386,16 +2386,16 @@ _insert (ECellTextView *text_view, const gchar *string, int value) } static void -capitalize (CellEdit *edit, int start, int end, ETextEventProcessorCaps type) +capitalize (CellEdit *edit, gint start, gint end, ETextEventProcessorCaps type) { ECellTextView *text_view = edit->text_view; gboolean first = TRUE; - int character_length = g_utf8_strlen (edit->text + start, start - end); - const char *p = edit->text + start; - const char *text_end = edit->text + end; - char *new_text = g_new0 (char, character_length * 6 + 1); - char *output = new_text; + gint character_length = g_utf8_strlen (edit->text + start, start - end); + const gchar *p = edit->text + start; + const gchar *text_end = edit->text + end; + gchar *new_text = g_new0 (char, character_length * 6 + 1); + gchar *output = new_text; while (p && *p && p < text_end && g_unichar_validate (g_utf8_get_char (p))) { gunichar unival = g_utf8_get_char (p); @@ -2446,7 +2446,7 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand * gboolean change = FALSE; gboolean redraw = FALSE; - int sel_start, sel_end; + gint sel_start, sel_end; /* If the EText isn't editable, then ignore any commands that would modify the text. */ @@ -2540,8 +2540,8 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand * if (edit->selection_start == edit->selection_end) { capitalize (edit, edit->selection_start, next_word (edit, edit->selection_start), command->value); } else { - int selection_start = MIN (edit->selection_start, edit->selection_end); - int selection_end = edit->selection_start + edit->selection_end - selection_start; /* Slightly faster than MAX */ + gint selection_start = MIN (edit->selection_start, edit->selection_end); + gint selection_end = edit->selection_start + edit->selection_end - selection_start; /* Slightly faster than MAX */ capitalize (edit, selection_start, selection_end, command->value); } if (edit->timer) { @@ -2581,7 +2581,7 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand * } static void -e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, char *data, gint length) +e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection, gchar *data, gint length) { #if DO_SELECTION GtkClipboard *clipboard; @@ -2612,7 +2612,7 @@ paste_received (GtkClipboard *clipboard, ETextEventProcessorCommand command; command.action = E_TEP_INSERT; command.position = E_TEP_SELECTION; - command.string = (char *)text; + command.string = (gchar *)text; command.value = strlen (text); command.time = GDK_CURRENT_TIME; e_cell_text_view_command (edit->tep, &command, edit); @@ -2736,8 +2736,8 @@ e_cell_text_set_selection (ECellView *cell_view, * @cell_view: the given cell view * @col: column of the given cell in the view * @row: row of the given cell in the view - * @start: a pointer to an int value indicates the start offset of the selection - * @end: a pointer to an int value indicates the end offset of the selection + * @start: a pointer to an gint value indicates the start offset of the selection + * @end: a pointer to an gint value indicates the end offset of the selection * * Gets the selection of given text cell. * If the current editing cell is not the given cell, this function @@ -2875,7 +2875,7 @@ e_cell_text_delete_selection (ECellView *cell_view, gint col, gint row) * * This API is most likely to be used by a11y implementations. */ -char * +gchar * e_cell_text_get_text_by_view (ECellView *cell_view, gint col, gint row) { ECellTextView *ectv; diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h index d92b025aa5..df4a6f827c 100644 --- a/widgets/table/e-cell-text.h +++ b/widgets/table/e-cell-text.h @@ -54,27 +54,27 @@ typedef struct { ECell parent; GtkJustification justify; - char *font_name; + gchar *font_name; double x, y; /* Position at anchor */ gulong pixel; /* Fill color */ /* Clip handling */ - char *ellipsis; /* The ellipsis characters. NULL = "...". */ + gchar *ellipsis; /* The ellipsis characters. NULL = "...". */ guint use_ellipsis : 1; /* Whether to use the ellipsis. */ guint editable : 1; /* Whether the text can be edited. */ - int strikeout_column; - int underline_column; - int bold_column; + gint strikeout_column; + gint underline_column; + gint bold_column; /* This column in the ETable should return a string specifying a color, either a color name like "red" or a color spec like "rgb:F/0/0". See the XParseColor man page for the formats available. */ - int color_column; - int bg_color_column; + gint color_column; + gint bg_color_column; /* This stores the colors we have allocated. */ GHashTable *colors; @@ -83,28 +83,28 @@ typedef struct { typedef struct { ECellClass parent_class; - char *(*get_text) (ECellText *cell, ETableModel *model, int col, int row); - void (*free_text) (ECellText *cell, char *text); - void (*set_value) (ECellText *cell, ETableModel *model, int col, int row, const char *text); + gchar *(*get_text) (ECellText *cell, ETableModel *model, gint col, gint row); + void (*free_text) (ECellText *cell, gchar *text); + void (*set_value) (ECellText *cell, ETableModel *model, gint col, gint row, const gchar *text); /* signal handlers */ - void (*text_inserted) (ECellText *cell, ECellView *cell_view, int pos, int len, int row, int model_col); - void (*text_deleted) (ECellText *cell, ECellView *cell_view, int pos, int len, int row, int model_col); + void (*text_inserted) (ECellText *cell, ECellView *cell_view, gint pos, gint len, gint row, gint model_col); + void (*text_deleted) (ECellText *cell, ECellView *cell_view, gint pos, gint len, gint row, gint model_col); } ECellTextClass; GType e_cell_text_get_type (void); -ECell *e_cell_text_new (const char *fontname, GtkJustification justify); -ECell *e_cell_text_construct(ECellText *cell, const char *fontname, GtkJustification justify); +ECell *e_cell_text_new (const gchar *fontname, GtkJustification justify); +ECell *e_cell_text_construct(ECellText *cell, const gchar *fontname, GtkJustification justify); /* Gets the value from the model and converts it into a string. In ECellText - itself, the value is assumed to be a char* and so needs no conversion. + itself, the value is assumed to be a gchar * and so needs no conversion. In subclasses the ETableModel value may be a more complicated datatype. */ -char *e_cell_text_get_text (ECellText *cell, ETableModel *model, int col, int row); +char *e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row); /* Frees the value returned by e_cell_text_get_text(). */ -void e_cell_text_free_text (ECellText *cell, char *text); +void e_cell_text_free_text (ECellText *cell, gchar *text); /* Sets the ETableModel value, based on the given string. */ -void e_cell_text_set_value (ECellText *cell, ETableModel *model, int col, int row, const char *text); +void e_cell_text_set_value (ECellText *cell, ETableModel *model, gint col, gint row, const gchar *text); /* Sets the selection of given text cell */ gboolean e_cell_text_set_selection (ECellView *cell_view, gint col, gint row, gint start, gint end); @@ -122,7 +122,7 @@ void e_cell_text_paste_clipboard (ECellView *cell_view, gint col, gint row); void e_cell_text_delete_selection (ECellView *cell_view, gint col, gint row); /* get text directly from view, both col and row are model format */ -char *e_cell_text_get_text_by_view (ECellView *cell_view, gint col, gint row); +gchar *e_cell_text_get_text_by_view (ECellView *cell_view, gint col, gint row); G_END_DECLS diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index 69dc1b27bb..4248666ce6 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -50,7 +50,7 @@ typedef struct { * ECell::realize method */ static ECellView * -etog_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +etog_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellToggleView *toggle_view = g_new0 (ECellToggleView, 1); ETableItem *eti = E_TABLE_ITEM (e_table_item_view); @@ -109,17 +109,17 @@ etog_unrealize (ECellView *ecv) */ static void etog_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell); ECellToggleView *toggle_view = (ECellToggleView *) ecell_view; GdkPixbuf *image; - int x, y, width, height; - int cache_seq; + gint x, y, width, height; + gint cache_seq; cairo_t *cr; - const int value = GPOINTER_TO_INT ( + const gint value = GPOINTER_TO_INT ( e_table_model_value_at (ecell_view->e_table_model, model_col, row)); if (value < 0 || value >= toggle->n_states){ @@ -168,7 +168,7 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable, } static void -etog_set_value (ECellToggleView *toggle_view, int model_col, int view_col, int row, int value) +etog_set_value (ECellToggleView *toggle_view, gint model_col, gint view_col, gint row, gint value) { ECell *ecell = toggle_view->cell_view.ecell; ECellToggle *toggle = E_CELL_TOGGLE (ecell); @@ -184,11 +184,11 @@ etog_set_value (ECellToggleView *toggle_view, int model_col, int view_col, int r * ECell::event method */ static gint -etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions) +etog_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { ECellToggleView *toggle_view = (ECellToggleView *) ecell_view; - void *_value = e_table_model_value_at (ecell_view->e_table_model, model_col, row); - const int value = GPOINTER_TO_INT (_value); + gpointer _value = e_table_model_value_at (ecell_view->e_table_model, model_col, row); + const gint value = GPOINTER_TO_INT (_value); #if 0 if (!(flags & E_CELL_EDITING)) @@ -216,7 +216,7 @@ etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, * ECell::height method */ static int -etog_height (ECellView *ecell_view, int model_col, int view_col, int row) +etog_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell); @@ -228,13 +228,13 @@ etog_height (ECellView *ecell_view, int model_col, int view_col, int row) */ static void etog_print (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width, double height) { ECellToggle *toggle = E_CELL_TOGGLE(ecell_view->ecell); GdkPixbuf *image; double image_width, image_height; - const int value = GPOINTER_TO_INT ( + const gint value = GPOINTER_TO_INT ( e_table_model_value_at (ecell_view->e_table_model, model_col, row)); cairo_t *cr; @@ -264,7 +264,7 @@ etog_print (ECellView *ecell_view, GtkPrintContext *context, static gdouble etog_print_height (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width) { ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell); @@ -276,16 +276,16 @@ etog_print_height (ECellView *ecell_view, GtkPrintContext *context, * ECell::max_width method */ static int -etog_max_width (ECellView *ecell_view, int model_col, int view_col) +etog_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell); - int max_width = 0; - int number_of_rows; - int row; + gint max_width = 0; + gint number_of_rows; + gint row; number_of_rows = e_table_model_row_count (ecell_view->e_table_model); for (row = 0; row < number_of_rows; row++) { - void *value = e_table_model_value_at (ecell_view->e_table_model, + gpointer value = e_table_model_value_at (ecell_view->e_table_model, model_col, row); max_width = MAX (max_width, gdk_pixbuf_get_width (toggle->images[GPOINTER_TO_INT (value)])); } @@ -297,7 +297,7 @@ static void etog_finalize (GObject *object) { ECellToggle *etog = E_CELL_TOGGLE (object); - int i; + gint i; for (i = 0; i < etog->n_states; i++) g_object_unref (etog->images [i]); @@ -351,10 +351,10 @@ e_cell_toggle_init (ECellToggle *etog) * arguments. */ void -e_cell_toggle_construct (ECellToggle *etog, int border, int n_states, GdkPixbuf **images) +e_cell_toggle_construct (ECellToggle *etog, gint border, gint n_states, GdkPixbuf **images) { - int max_height = 0; - int i; + gint max_height = 0; + gint i; etog->border = border; etog->n_states = n_states; @@ -389,7 +389,7 @@ e_cell_toggle_construct (ECellToggle *etog, int border, int n_states, GdkPixbuf * toggle cells. */ ECell * -e_cell_toggle_new (int border, int n_states, GdkPixbuf **images) +e_cell_toggle_new (gint border, gint n_states, GdkPixbuf **images) { ECellToggle *etog = g_object_new (E_CELL_TOGGLE_TYPE, NULL); diff --git a/widgets/table/e-cell-toggle.h b/widgets/table/e-cell-toggle.h index 97d16dc659..96e3d01a55 100644 --- a/widgets/table/e-cell-toggle.h +++ b/widgets/table/e-cell-toggle.h @@ -41,11 +41,11 @@ G_BEGIN_DECLS typedef struct { ECell parent; - int border; - int n_states; + gint border; + gint n_states; GdkPixbuf **images; - int height; + gint height; } ECellToggle; typedef struct { @@ -53,9 +53,9 @@ typedef struct { } ECellToggleClass; GType e_cell_toggle_get_type (void); -ECell *e_cell_toggle_new (int border, int n_states, GdkPixbuf **images); -void e_cell_toggle_construct (ECellToggle *etog, int border, - int n_states, GdkPixbuf **images); +ECell *e_cell_toggle_new (gint border, gint n_states, GdkPixbuf **images); +void e_cell_toggle_construct (ECellToggle *etog, gint border, + gint n_states, GdkPixbuf **images); G_END_DECLS diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index eb7e428fb9..0b61253c61 100644 --- a/widgets/table/e-cell-tree.c +++ b/widgets/table/e-cell-tree.c @@ -76,25 +76,25 @@ e_cell_tree_view_get_subcell_view (ECellView *ect) } static ETreePath -e_cell_tree_get_node (ETableModel *table_model, int row) +e_cell_tree_get_node (ETableModel *table_model, gint row) { return e_table_model_value_at (table_model, -1, row); } static ETreeModel* -e_cell_tree_get_tree_model (ETableModel *table_model, int row) +e_cell_tree_get_tree_model (ETableModel *table_model, gint row) { return e_table_model_value_at (table_model, -2, row); } static ETreeTableAdapter * -e_cell_tree_get_tree_table_adapter (ETableModel *table_model, int row) +e_cell_tree_get_tree_table_adapter (ETableModel *table_model, gint row) { return e_table_model_value_at (table_model, -3, row); } static int -visible_depth_of_node (ETableModel *model, int row) +visible_depth_of_node (ETableModel *model, gint row) { ETreeModel *tree_model = e_cell_tree_get_tree_model(model, row); ETreeTableAdapter *adapter = e_cell_tree_get_tree_table_adapter(model, row); @@ -107,7 +107,7 @@ visible_depth_of_node (ETableModel *model, int row) if the path is not expandable, then max_width needs to change as well. */ static gint -offset_of_node (ETableModel *table_model, int row) +offset_of_node (ETableModel *table_model, gint row) { ETreeModel *tree_model = e_cell_tree_get_tree_model(table_model, row); ETreePath path = e_cell_tree_get_node(table_model, row); @@ -124,7 +124,7 @@ offset_of_node (ETableModel *table_model, int row) * ECell::new_view method */ static ECellView * -ect_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellTree *ect = E_CELL_TREE (ecell); ECellTreeView *tree_view = g_new0 (ECellTreeView, 1); @@ -209,7 +209,7 @@ static void draw_retro_expander (ECellTreeView *ectv, GdkDrawable *drawable, gboolean expanded, GdkRectangle *rect) { GdkPixbuf *image; - int image_width, image_height; + gint image_width, image_height; ECellTree *ect = E_CELL_TREE(ectv->cell_view.ecell); image = expanded ? ect->open_pixbuf : ect->closed_pixbuf; @@ -243,8 +243,8 @@ draw_expander (ECellTreeView *ectv, GdkDrawable *drawable, GtkExpanderStyle expa */ static void ect_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { ECellTreeView *tree_view = (ECellTreeView *)ecell_view; ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row); @@ -256,14 +256,14 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, GdkColor *foreground; gboolean selected; - int offset, subcell_offset; + gint offset, subcell_offset; selected = flags & E_CELL_SELECTED; /* only draw the tree effects if we're the active sort */ if (/* XXX */ TRUE) { GdkPixbuf *node_image; - int node_image_width = 0, node_image_height = 0; + gint node_image_width = 0, node_image_height = 0; ETreePath parent_node; ETree *tree = E_TREE (canvas->parent); @@ -307,7 +307,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, /* draw our lines */ if (tree_view->retro_look && E_CELL_TREE(tree_view->cell_view.ecell)->draw_lines) { - int depth; + gint depth; if (visible_depth_of_node (ecell_view->e_table_model, row) > 0 || e_tree_model_node_get_children (tree_model, node, NULL) > 0) @@ -428,7 +428,7 @@ event_in_expander (GdkEvent *event, gint offset, gint height) * ECell::height method */ static int -ect_height (ECellView *ecell_view, int model_col, int view_col, int row) +ect_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; @@ -468,13 +468,13 @@ animate_expander (gpointer data) * ECell::event method */ static gint -ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions) +ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row); ETreeTableAdapter *etta = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row); ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row); - int offset = offset_of_node (ecell_view->e_table_model, row); + gint offset = offset_of_node (ecell_view->e_table_model, row); gint result; switch (event->type) { @@ -489,7 +489,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, gint tmp_row = row; GdkRectangle area; animate_closure_t *closure = g_new0 (animate_closure_t, 1); - int hgt; + gint hgt; e_table_item_get_cell_geometry (tree_view->cell_view.e_table_item_view, &tmp_row, &view_col, &area.x, &area.y, NULL, &area.height); @@ -568,14 +568,14 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, * ECell::max_width method */ static int -ect_max_width (ECellView *ecell_view, int model_col, int view_col) +ect_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; - int row; - int number_of_rows; - int max_width = 0; - int width = 0; - int subcell_max_width = 0; + gint row; + gint number_of_rows; + gint max_width = 0; + gint width = 0; + gint subcell_max_width = 0; gboolean per_row = e_cell_max_width_by_row_implemented (tree_view->subcell_view); number_of_rows = e_table_model_row_count (ecell_view->e_table_model); @@ -587,9 +587,9 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col) ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row); ETreePath node; GdkPixbuf *node_image; - int node_image_width = 0; + gint node_image_width = 0; - int offset, subcell_offset; + gint offset, subcell_offset; #if 0 gboolean expanded, expandable; ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row); @@ -642,13 +642,13 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col) * ECellView::show_tooltip method */ static void -ect_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, - int col_width, ETableTooltip *tooltip) +ect_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col, gint row, + gint col_width, ETableTooltip *tooltip) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row); ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row); - int offset = offset_of_node (ecell_view->e_table_model, row); + gint offset = offset_of_node (ecell_view->e_table_model, row); GdkPixbuf *node_image; node_image = e_tree_model_icon_at (tree_model, node); @@ -662,8 +662,8 @@ ect_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, /* * ECellView::get_bg_color method */ -static char * -ect_get_bg_color (ECellView *ecell_view, int row) +static gchar * +ect_get_bg_color (ECellView *ecell_view, gint row) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; @@ -673,8 +673,8 @@ ect_get_bg_color (ECellView *ecell_view, int row) /* * ECellView::enter_edit method */ -static void * -ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) +static gpointer +ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row) { /* just defer to our subcell's view */ ECellTreeView *tree_view = (ECellTreeView *) ecell_view; @@ -686,7 +686,7 @@ ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) * ECellView::leave_edit method */ static void -ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context) +ect_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context) { /* just defer to our subcell's view */ ECellTreeView *tree_view = (ECellTreeView *) ecell_view; @@ -696,7 +696,7 @@ ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi static void ect_print (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width, double height) { ECellTreeView *tree_view = (ECellTreeView *) ecell_view; @@ -708,14 +708,14 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row); ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row); ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row); - int offset = offset_of_node (ecell_view->e_table_model, row); - int subcell_offset = offset; + gint offset = offset_of_node (ecell_view->e_table_model, row); + gint subcell_offset = offset; gboolean expandable = e_tree_model_node_is_expandable (tree_model, node); gboolean expanded = e_tree_table_adapter_node_is_expanded (tree_table_adapter, node); /* draw our lines */ if (E_CELL_TREE(tree_view->cell_view.ecell)->draw_lines) { - int depth; + gint depth; if (!e_tree_model_node_is_root (tree_model, node) || e_tree_model_node_get_children (tree_model, node, NULL) > 0) { @@ -791,7 +791,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, static gdouble ect_print_height (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width) { return 12; /* XXX */ @@ -878,11 +878,11 @@ e_cell_tree_construct (ECellTree *ect, if (open_pixbuf) ect->open_pixbuf = open_pixbuf; else - ect->open_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)tree_expanded_xpm); + ect->open_pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **)tree_expanded_xpm); if (closed_pixbuf) ect->closed_pixbuf = closed_pixbuf; else - ect->closed_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)tree_unexpanded_xpm); + ect->closed_pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **)tree_unexpanded_xpm); ect->draw_lines = draw_lines; } diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c index 1fd770ab6a..cfd9ddde72 100644 --- a/widgets/table/e-cell-vbox.c +++ b/widgets/table/e-cell-vbox.c @@ -44,11 +44,11 @@ G_DEFINE_TYPE (ECellVbox, e_cell_vbox, E_CELL_TYPE) * ECell::new_view method */ static ECellView * -ecv_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { ECellVbox *ecv = E_CELL_VBOX (ecell); ECellVboxView *vbox_view = g_new0 (ECellVboxView, 1); - int i; + gint i; vbox_view->cell_view.ecell = ecell; vbox_view->cell_view.e_table_model = table_model; @@ -76,7 +76,7 @@ static void ecv_kill_view (ECellView *ecv) { ECellVboxView *vbox_view = (ECellVboxView *) ecv; - int i; + gint i; if (vbox_view->cell_view.kill_view_cb) (vbox_view->cell_view.kill_view_cb)(ecv, vbox_view->cell_view.kill_view_cb_data); @@ -100,7 +100,7 @@ static void ecv_realize (ECellView *ecell_view) { ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; - int i; + gint i; /* realize our subcell view */ for (i = 0; i < vbox_view->subcell_view_count; i++) @@ -117,7 +117,7 @@ static void ecv_unrealize (ECellView *ecv) { ECellVboxView *vbox_view = (ECellVboxView *) ecv; - int i; + gint i; /* unrealize our subcell view. */ for (i = 0; i < vbox_view->subcell_view_count; i++) @@ -132,18 +132,18 @@ ecv_unrealize (ECellView *ecv) */ static void ecv_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; - int subcell_offset = 0; - int i; + gint subcell_offset = 0; + gint i; for (i = 0; i < vbox_view->subcell_view_count; i++) { /* Now cause our subcells to draw their contents, shifted by subcell_offset pixels */ - int height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row); + gint height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row); e_cell_draw (vbox_view->subcell_views[i], drawable, vbox_view->model_cols[i], view_col, row, flags, x1, y1 + subcell_offset, x2, y1 + subcell_offset + height); @@ -156,12 +156,12 @@ ecv_draw (ECellView *ecell_view, GdkDrawable *drawable, * ECell::event method */ static gint -ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions) +ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; - int y = 0; - int i; - int subcell_offset = 0; + gint y = 0; + gint i; + gint subcell_offset = 0; switch (event->type) { case GDK_BUTTON_PRESS: @@ -180,7 +180,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, for (i = 0; i < vbox_view->subcell_view_count; i++) { - int height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row); + gint height = e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row); if (y < subcell_offset + height) return e_cell_event(vbox_view->subcell_views[i], event, vbox_view->model_cols[i], view_col, row, flags, actions); subcell_offset += height; @@ -192,11 +192,11 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, * ECell::height method */ static int -ecv_height (ECellView *ecell_view, int model_col, int view_col, int row) +ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; - int height = 0; - int i; + gint height = 0; + gint i; for (i = 0; i < vbox_view->subcell_view_count; i++) { height += e_cell_height (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col, row); @@ -208,14 +208,14 @@ ecv_height (ECellView *ecell_view, int model_col, int view_col, int row) * ECell::max_width method */ static int -ecv_max_width (ECellView *ecell_view, int model_col, int view_col) +ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; - int max_width = 0; - int i; + gint max_width = 0; + gint i; for (i = 0; i < vbox_view->subcell_view_count; i++) { - int width = e_cell_max_width (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col); + gint width = e_cell_max_width (vbox_view->subcell_views[i], vbox_view->model_cols[i], view_col); max_width = MAX(width, max_width); } @@ -227,13 +227,13 @@ ecv_max_width (ECellView *ecell_view, int model_col, int view_col) * ECellView::show_tooltip method */ static void -ecv_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, - int col_width, ETableTooltip *tooltip) +ecv_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col, gint row, + gint col_width, ETableTooltip *tooltip) { ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; EVboxModel *vbox_model = e_cell_vbox_get_vbox_model (ecell_view->e_table_model, row); EVboxPath node = e_cell_vbox_get_node (ecell_view->e_table_model, row); - int offset = offset_of_node (ecell_view->e_table_model, row); + gint offset = offset_of_node (ecell_view->e_table_model, row); GdkPixbuf *node_image; node_image = e_vbox_model_icon_at (vbox_model, node); @@ -247,8 +247,8 @@ ecv_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, /* * ECellView::get_bg_color method */ -static char * -ecv_get_bg_color (ECellView *ecell_view, int row) +static gchar * +ecv_get_bg_color (ECellView *ecell_view, gint row) { ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; @@ -258,8 +258,8 @@ ecv_get_bg_color (ECellView *ecell_view, int row) /* * ECellView::enter_edit method */ -static void * -ecv_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) +static gpointer +ecv_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row) { /* just defer to our subcell's view */ ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; @@ -271,7 +271,7 @@ ecv_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) * ECellView::leave_edit method */ static void -ecv_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context) +ecv_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context) { /* just defer to our subcell's view */ ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; @@ -281,7 +281,7 @@ ecv_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi static void ecv_print (ECellView *ecell_view, GnomePrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width, double height) { ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; @@ -290,14 +290,14 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context, EVboxModel *vbox_model = e_cell_vbox_get_vbox_model (ecell_view->e_table_model, row); EVboxTableAdapter *vbox_table_adapter = e_cell_vbox_get_vbox_table_adapter(ecell_view->e_table_model, row); EVboxPath node = e_cell_vbox_get_node (ecell_view->e_table_model, row); - int offset = offset_of_node (ecell_view->e_table_model, row); - int subcell_offset = offset; + gint offset = offset_of_node (ecell_view->e_table_model, row); + gint subcell_offset = offset; gboolean expandable = e_vbox_model_node_is_expandable (vbox_model, node); gboolean expanded = e_vbox_table_adapter_node_is_expanded (vbox_table_adapter, node); /* draw our lines */ if (E_CELL_VBOX(vbox_view->cell_view.ecell)->draw_lines) { - int depth; + gint depth; if (!e_vbox_model_node_is_root (vbox_model, node) || e_vbox_model_node_get_children (vbox_model, node, NULL) > 0) { @@ -348,7 +348,7 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context, GdkPixbuf *image = (expanded ? E_CELL_VBOX(vbox_view->cell_view.ecell)->open_pixbuf : E_CELL_VBOX(vbox_view->cell_view.ecell)->closed_pixbuf); - int image_width, image_height, image_rowstride; + gint image_width, image_height, image_rowstride; guchar *image_pixels; image_width = gdk_pixbuf_get_width(image); @@ -379,7 +379,7 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context, static gdouble ecv_print_height (ECellView *ecell_view, GnomePrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width) { return 12; /* XXX */ @@ -393,7 +393,7 @@ static void ecv_dispose (GObject *object) { ECellVbox *ecv = E_CELL_VBOX (object); - int i; + gint i; /* destroy our subcell */ for (i = 0; i < ecv->subcell_count; i++) @@ -473,7 +473,7 @@ e_cell_vbox_new (void) } void -e_cell_vbox_append (ECellVbox *vbox, ECell *subcell, int model_col) +e_cell_vbox_append (ECellVbox *vbox, ECell *subcell, gint model_col) { vbox->subcell_count ++; diff --git a/widgets/table/e-cell-vbox.h b/widgets/table/e-cell-vbox.h index ae774dbb7c..58aa523c58 100644 --- a/widgets/table/e-cell-vbox.h +++ b/widgets/table/e-cell-vbox.h @@ -43,16 +43,16 @@ G_BEGIN_DECLS typedef struct { ECell parent; - int subcell_count; + gint subcell_count; ECell **subcells; - int *model_cols; + gint *model_cols; } ECellVbox; typedef struct { ECellView cell_view; - int subcell_view_count; + gint subcell_view_count; ECellView **subcell_views; - int *model_cols; + gint *model_cols; } ECellVboxView; typedef struct { @@ -63,7 +63,7 @@ GType e_cell_vbox_get_type (void); ECell *e_cell_vbox_new (void); void e_cell_vbox_append (ECellVbox *vbox, ECell *subcell, - int model_col); + gint model_col); G_END_DECLS diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c index 41ffe86685..1152a42e1a 100644 --- a/widgets/table/e-cell.c +++ b/widgets/table/e-cell.c @@ -33,7 +33,7 @@ G_DEFINE_TYPE (ECell, e_cell, GTK_TYPE_OBJECT) #define ECVIEW_EC_CLASS(v) (E_CELL_GET_CLASS (v->ecell)) static ECellView * -ec_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +ec_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { return NULL; } @@ -55,14 +55,14 @@ ec_unrealize (ECellView *e_cell) static void ec_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { g_critical ("e-cell-draw invoked"); } static gint -ec_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions) +ec_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { g_critical ("e-cell-event invoked"); @@ -70,7 +70,7 @@ ec_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, i } static gint -ec_height (ECellView *ecell_view, int model_col, int view_col, int row) +ec_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { g_critical ("e-cell-height invoked"); @@ -78,7 +78,7 @@ ec_height (ECellView *ecell_view, int model_col, int view_col, int row) } static void -ec_focus (ECellView *ecell_view, int model_col, int view_col, int row, int x1, int y1, int x2, int y2) +ec_focus (ECellView *ecell_view, gint model_col, gint view_col, gint row, gint x1, gint y1, gint x2, gint y2) { ecell_view->focus_col = view_col; ecell_view->focus_row = row; @@ -99,35 +99,35 @@ ec_unfocus (ECellView *ecell_view) ecell_view->focus_y2 = -1; } -static void * -ec_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) +static gpointer +ec_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row) { return NULL; } static void -ec_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *context) +ec_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context) { } -static void * -ec_save_state (ECellView *ecell_view, int model_col, int view_col, int row, void *context) +static gpointer +ec_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context) { return NULL; } static void -ec_load_state (ECellView *ecell_view, int model_col, int view_col, int row, void *context, void *save_state) +ec_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context, gpointer save_state) { } static void -ec_free_state (ECellView *ecell_view, int model_col, int view_col, int row, void *save_state) +ec_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state) { } static void -ec_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row, int col_width, ETableTooltip *tooltip) +ec_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col, gint row, gint col_width, ETableTooltip *tooltip) { /* Do nothing */ } @@ -176,7 +176,7 @@ e_cell_init (ECell *cell) * Returns: processing state from the GdkEvent handling. */ gint -e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions) +e_cell_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { return ECVIEW_EC_CLASS(ecell_view)->event ( ecell_view, event, model_col, view_col, row, flags, actions); @@ -198,7 +198,7 @@ e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_co * Returns: a new ECellView for this @ecell on the @table_model displayed on the @e_table_item_view. */ ECellView * -e_cell_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view) +e_cell_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view) { return E_CELL_GET_CLASS (ecell)->new_view ( ecell, table_model, e_table_item_view); @@ -265,8 +265,8 @@ e_cell_unrealize (ECellView *ecell_view) */ void e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, ECellFlags flags, - int x1, int y1, int x2, int y2) + gint model_col, gint view_col, gint row, ECellFlags flags, + gint x1, gint y1, gint x2, gint y2) { g_return_if_fail (ecell_view != NULL); g_return_if_fail (row >= 0); @@ -289,7 +289,7 @@ e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable, */ void e_cell_print (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width, double height) { if (ECVIEW_EC_CLASS(ecell_view)->print) @@ -303,7 +303,7 @@ e_cell_print (ECellView *ecell_view, GtkPrintContext *context, */ gdouble e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, double width) { if (ECVIEW_EC_CLASS(ecell_view)->print_height) @@ -323,8 +323,8 @@ e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context, * Returns: the height of the cell at @model_col, @row rendered at * @view_col, @row. */ -int -e_cell_height (ECellView *ecell_view, int model_col, int view_col, int row) +gint +e_cell_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { return ECVIEW_EC_CLASS(ecell_view)->height (ecell_view, model_col, view_col, row); } @@ -339,8 +339,8 @@ e_cell_height (ECellView *ecell_view, int model_col, int view_col, int row) * Notifies the ECellView that it is about to enter editing mode for * @model_col, @row rendered at @view_col, @row. */ -void * -e_cell_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) +gpointer +e_cell_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row) { return ECVIEW_EC_CLASS(ecell_view)->enter_edit (ecell_view, model_col, view_col, row); } @@ -357,7 +357,7 @@ e_cell_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row) * rendered at @view_col, @row. */ void -e_cell_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context) +e_cell_leave_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context) { ECVIEW_EC_CLASS(ecell_view)->leave_edit (ecell_view, model_col, view_col, row, edit_context); } @@ -372,12 +372,12 @@ e_cell_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, * * Returns: The save state. * - * Requests that the ECellView return a void * representing the state + * Requests that the ECellView return a gpointer representing the state * of the ECell. This is primarily intended for things like selection * or scrolling. */ -void * -e_cell_save_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context) +gpointer +e_cell_save_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context) { if (ECVIEW_EC_CLASS(ecell_view)->save_state) return ECVIEW_EC_CLASS(ecell_view)->save_state (ecell_view, model_col, view_col, row, edit_context); @@ -397,7 +397,7 @@ e_cell_save_state (ECellView *ecell_view, int model_col, int view_col, int row, * Requests that the ECellView load from the given save state. */ void -e_cell_load_state (ECellView *ecell_view, int model_col, int view_col, int row, void *edit_context, void *save_state) +e_cell_load_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer edit_context, gpointer save_state) { if (ECVIEW_EC_CLASS(ecell_view)->load_state) ECVIEW_EC_CLASS(ecell_view)->load_state (ecell_view, model_col, view_col, row, edit_context, save_state); @@ -415,7 +415,7 @@ e_cell_load_state (ECellView *ecell_view, int model_col, int view_col, int row, * Requests that the ECellView free the given save state. */ void -e_cell_free_state (ECellView *ecell_view, int model_col, int view_col, int row, void *save_state) +e_cell_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state) { if (ECVIEW_EC_CLASS(ecell_view)->free_state) ECVIEW_EC_CLASS(ecell_view)->free_state (ecell_view, model_col, view_col, row, save_state); @@ -430,8 +430,8 @@ e_cell_free_state (ECellView *ecell_view, int model_col, int view_col, int row, * Returns: the maximum width for the ECellview at @model_col which * is being rendered as @view_col */ -int -e_cell_max_width (ECellView *ecell_view, int model_col, int view_col) +gint +e_cell_max_width (ECellView *ecell_view, gint model_col, gint view_col) { return ECVIEW_EC_CLASS(ecell_view)->max_width (ecell_view, model_col, view_col); @@ -447,8 +447,8 @@ e_cell_max_width (ECellView *ecell_view, int model_col, int view_col) * Returns: the maximum width for the ECellview at @model_col which * is being rendered as @view_col for the data in @row. */ -int -e_cell_max_width_by_row (ECellView *ecell_view, int model_col, int view_col, int row) +gint +e_cell_max_width_by_row (ECellView *ecell_view, gint model_col, gint view_col, gint row) { if (ECVIEW_EC_CLASS(ecell_view)->max_width_by_row) return ECVIEW_EC_CLASS(ecell_view)->max_width_by_row @@ -474,15 +474,15 @@ e_cell_max_width_by_row_implemented (ECellView *ecell_view) } void -e_cell_show_tooltip (ECellView *ecell_view, int model_col, int view_col, - int row, int col_width, ETableTooltip *tooltip) +e_cell_show_tooltip (ECellView *ecell_view, gint model_col, gint view_col, + gint row, gint col_width, ETableTooltip *tooltip) { ECVIEW_EC_CLASS(ecell_view)->show_tooltip (ecell_view, model_col, view_col, row, col_width, tooltip); } gchar * -e_cell_get_bg_color(ECellView *ecell_view, int row) +e_cell_get_bg_color(ECellView *ecell_view, gint row) { if (ECVIEW_EC_CLASS(ecell_view)->get_bg_color) return ECVIEW_EC_CLASS(ecell_view)->get_bg_color (ecell_view, row); diff --git a/widgets/table/e-cell.h b/widgets/table/e-cell.h index 5a0005095e..614e1ebe0e 100644 --- a/widgets/table/e-cell.h +++ b/widgets/table/e-cell.h @@ -38,7 +38,7 @@ G_BEGIN_DECLS #define E_IS_CELL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_CELL_TYPE)) typedef gboolean (*ETableSearchFunc) (gconstpointer haystack, - const char *needle); + const gchar *needle); typedef enum { E_CELL_SELECTED = 1 << 0, @@ -87,35 +87,35 @@ typedef struct _ECellView { typedef struct { GtkObjectClass parent_class; - ECellView *(*new_view) (ECell *ecell, ETableModel *table_model, void *e_table_item_view); + ECellView *(*new_view) (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view); void (*kill_view) (ECellView *ecell_view); void (*realize) (ECellView *ecell_view); void (*unrealize) (ECellView *ecell_view); void (*draw) (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, int view_col, int row, - ECellFlags flags, int x1, int y1, int x2, int y2); - gint (*event) (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions); - void (*focus) (ECellView *ecell_view, int model_col, int view_col, - int row, int x1, int y1, int x2, int y2); + gint model_col, gint view_col, gint row, + ECellFlags flags, gint x1, gint y1, gint x2, gint y2); + gint (*event) (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions); + void (*focus) (ECellView *ecell_view, gint model_col, gint view_col, + gint row, gint x1, gint y1, gint x2, gint y2); void (*unfocus) (ECellView *ecell_view); - int (*height) (ECellView *ecell_view, int model_col, int view_col, int row); + gint (*height) (ECellView *ecell_view, gint model_col, gint view_col, gint row); - void *(*enter_edit) (ECellView *ecell_view, int model_col, int view_col, int row); - void (*leave_edit) (ECellView *ecell_view, int model_col, int view_col, int row, void *context); - void *(*save_state) (ECellView *ecell_view, int model_col, int view_col, int row, void *context); - void (*load_state) (ECellView *ecell_view, int model_col, int view_col, int row, void *context, void *save_state); - void (*free_state) (ECellView *ecell_view, int model_col, int view_col, int row, void *save_state); + void *(*enter_edit) (ECellView *ecell_view, gint model_col, gint view_col, gint row); + void (*leave_edit) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context); + void *(*save_state) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context); + void (*load_state) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer context, gpointer save_state); + void (*free_state) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gpointer save_state); void (*print) (ECellView *ecell_view, GtkPrintContext *context, - int model_col, int view_col, int row, + gint model_col, gint view_col, gint row, gdouble width, gdouble height); gdouble (*print_height) (ECellView *ecell_view,GtkPrintContext *context, - int model_col, int view_col, int row, gdouble width); - int (*max_width) (ECellView *ecell_view, int model_col, int view_col); - int (*max_width_by_row) (ECellView *ecell_view, int model_col, int view_col, int row); - void (*show_tooltip) (ECellView *ecell_view, int model_col, int view_col, int row, int col_width, ETableTooltip *tooltip); - gchar *(*get_bg_color) (ECellView *ecell_view, int row); + gint model_col, gint view_col, gint row, gdouble width); + gint (*max_width) (ECellView *ecell_view, gint model_col, gint view_col); + gint (*max_width_by_row) (ECellView *ecell_view, gint model_col, gint view_col, gint row); + void (*show_tooltip) (ECellView *ecell_view, gint model_col, gint view_col, gint row, gint col_width, ETableTooltip *tooltip); + gchar *(*get_bg_color) (ECellView *ecell_view, gint row); void (*style_set) (ECellView *ecell_view, GtkStyle *previous_style); } ECellClass; @@ -131,92 +131,92 @@ void e_cell_kill_view (ECellView *ecell_view); /* Cell View methods. */ gint e_cell_event (ECellView *ecell_view, GdkEvent *event, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, ECellFlags flags, ECellActions *actions); void e_cell_realize (ECellView *ecell_view); void e_cell_unrealize (ECellView *ecell_view); void e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, ECellFlags flags, - int x1, - int y1, - int x2, - int y2); + gint x1, + gint y1, + gint x2, + gint y2); void e_cell_print (ECellView *ecell_view, GtkPrintContext *context, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, double width, double height); gdouble e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, gdouble width); -int e_cell_max_width (ECellView *ecell_view, - int model_col, - int view_col); -int e_cell_max_width_by_row (ECellView *ecell_view, - int model_col, - int view_col, - int row); +gint e_cell_max_width (ECellView *ecell_view, + gint model_col, + gint view_col); +gint e_cell_max_width_by_row (ECellView *ecell_view, + gint model_col, + gint view_col, + gint row); gboolean e_cell_max_width_by_row_implemented (ECellView *ecell_view); void e_cell_show_tooltip (ECellView *ecell_view, - int model_col, - int view_col, - int row, - int col_width, + gint model_col, + gint view_col, + gint row, + gint col_width, ETableTooltip *tooltip); gchar *e_cell_get_bg_color (ECellView *ecell_view, - int row); + gint row); void e_cell_style_set (ECellView *ecell_view, GtkStyle *previous_style); void e_cell_focus (ECellView *ecell_view, - int model_col, - int view_col, - int row, - int x1, - int y1, - int x2, - int y2); + gint model_col, + gint view_col, + gint row, + gint x1, + gint y1, + gint x2, + gint y2); void e_cell_unfocus (ECellView *ecell_view); -int e_cell_height (ECellView *ecell_view, - int model_col, - int view_col, - int row); +gint e_cell_height (ECellView *ecell_view, + gint model_col, + gint view_col, + gint row); void *e_cell_enter_edit (ECellView *ecell_view, - int model_col, - int view_col, - int row); + gint model_col, + gint view_col, + gint row); void e_cell_leave_edit (ECellView *ecell_view, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, void *edit_context); void *e_cell_save_state (ECellView *ecell_view, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, void *edit_context); void e_cell_load_state (ECellView *ecell_view, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, void *edit_context, void *state); void e_cell_free_state (ECellView *ecell_view, - int model_col, - int view_col, - int row, + gint model_col, + gint view_col, + gint row, void *state); G_END_DECLS diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c index 879b8c34af..10a0ba8223 100644 --- a/widgets/table/e-table-click-to-add.c +++ b/widgets/table/e-table-click-to-add.c @@ -314,7 +314,7 @@ etcta_unrealize (GnomeCanvasItem *item) static void finish_editing (ETableClickToAdd *etcta); static int -item_key_press (ETableItem *item, int row, int col, GdkEvent *event, ETableClickToAdd *etcta) +item_key_press (ETableItem *item, gint row, gint col, GdkEvent *event, ETableClickToAdd *etcta) { switch (event->key.keyval) { case GDK_Return: @@ -451,7 +451,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e) } static void -etcta_reflow (GnomeCanvasItem *item, int flags) +etcta_reflow (GnomeCanvasItem *item, gint flags) { ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item); diff --git a/widgets/table/e-table-click-to-add.h b/widgets/table/e-table-click-to-add.h index 31dded1989..17ac7f7fe3 100644 --- a/widgets/table/e-table-click-to-add.h +++ b/widgets/table/e-table-click-to-add.h @@ -46,7 +46,7 @@ typedef struct { ETableModel *model; /* The backend model. */ ETableHeader *eth; /* This is just to give to the ETableItem. */ - char *message; + gchar *message; GnomeCanvasItem *row; /* If row is NULL, we're sitting with no data and a "Click here" message. */ GnomeCanvasItem *text; /* If text is NULL, row shouldn't be. */ diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c index d844f53c45..de1cc48b18 100644 --- a/widgets/table/e-table-col.c +++ b/widgets/table/e-table-col.c @@ -139,8 +139,8 @@ e_table_col_init (ETableCol *etc) * Returns: the newly created ETableCol object. */ ETableCol * -e_table_col_new (int col_idx, const char *text, double expansion, int min_width, - ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, int priority) +e_table_col_new (gint col_idx, const gchar *text, double expansion, gint min_width, + ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, gint priority) { ETableCol *etc; @@ -200,8 +200,8 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width, * Returns: the newly created ETableCol object. */ ETableCol * -e_table_col_new_with_pixbuf (int col_idx, const char *text, GdkPixbuf *pixbuf, double expansion, int min_width, - ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, int priority) +e_table_col_new_with_pixbuf (gint col_idx, const gchar *text, GdkPixbuf *pixbuf, double expansion, gint min_width, + ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, gint priority) { ETableCol *etc; diff --git a/widgets/table/e-table-col.h b/widgets/table/e-table-col.h index f7d892d317..8e514675d5 100644 --- a/widgets/table/e-table-col.h +++ b/widgets/table/e-table-col.h @@ -47,23 +47,23 @@ typedef enum { */ typedef struct { GObject base; - char *text; + gchar *text; GdkPixbuf *pixbuf; - int min_width; - int width; + gint min_width; + gint width; double expansion; short x; GCompareFunc compare; ETableSearchFunc search; - unsigned int is_pixbuf:1; - unsigned int selected:1; - unsigned int resizable:1; - unsigned int disabled:1; - unsigned int sortable:1; - unsigned int groupable:1; - int col_idx; - int compare_col; - int priority; + guint is_pixbuf:1; + guint selected:1; + guint resizable:1; + guint disabled:1; + guint sortable:1; + guint groupable:1; + gint col_idx; + gint compare_col; + gint priority; GtkJustification justification; @@ -75,25 +75,25 @@ typedef struct { } ETableColClass; GType e_table_col_get_type (void); -ETableCol *e_table_col_new (int col_idx, - const char *text, +ETableCol *e_table_col_new (gint col_idx, + const gchar *text, double expansion, - int min_width, + gint min_width, ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, - int priority); -ETableCol *e_table_col_new_with_pixbuf (int col_idx, - const char *text, + gint priority); +ETableCol *e_table_col_new_with_pixbuf (gint col_idx, + const gchar *text, GdkPixbuf *pixbuf, double expansion, - int min_width, + gint min_width, ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, - int priority); + gint priority); G_END_DECLS diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c index c48451587f..0f6acd7fc6 100644 --- a/widgets/table/e-table-column-specification.c +++ b/widgets/table/e-table-column-specification.c @@ -106,21 +106,21 @@ e_table_column_specification_load_from_node (ETableColumnSpecification *etcs, { free_strings(etcs); - etcs->model_col = e_xml_get_integer_prop_by_name (node, (const unsigned char *)"model_col"); - etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, (const unsigned char *)"compare_col", etcs->model_col); - etcs->title = e_xml_get_string_prop_by_name (node, (const unsigned char *)"_title"); - etcs->pixbuf = e_xml_get_string_prop_by_name (node, (const unsigned char *)"pixbuf"); - - etcs->expansion = e_xml_get_double_prop_by_name (node, (const unsigned char *)"expansion"); - etcs->minimum_width = e_xml_get_integer_prop_by_name (node, (const unsigned char *)"minimum_width"); - etcs->resizable = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"resizable"); - etcs->disabled = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"disabled"); - - etcs->cell = e_xml_get_string_prop_by_name (node, (const unsigned char *)"cell"); - etcs->compare = e_xml_get_string_prop_by_name (node, (const unsigned char *)"compare"); - etcs->search = e_xml_get_string_prop_by_name (node, (const unsigned char *)"search"); - etcs->sortable = e_xml_get_string_prop_by_name (node, (const unsigned char *)"sortable"); - etcs->priority = e_xml_get_integer_prop_by_name_with_default (node, (const unsigned char *)"priority", 0); + etcs->model_col = e_xml_get_integer_prop_by_name (node, (const guchar *)"model_col"); + etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, (const guchar *)"compare_col", etcs->model_col); + etcs->title = e_xml_get_string_prop_by_name (node, (const guchar *)"_title"); + etcs->pixbuf = e_xml_get_string_prop_by_name (node, (const guchar *)"pixbuf"); + + etcs->expansion = e_xml_get_double_prop_by_name (node, (const guchar *)"expansion"); + etcs->minimum_width = e_xml_get_integer_prop_by_name (node, (const guchar *)"minimum_width"); + etcs->resizable = e_xml_get_bool_prop_by_name (node, (const guchar *)"resizable"); + etcs->disabled = e_xml_get_bool_prop_by_name (node, (const guchar *)"disabled"); + + etcs->cell = e_xml_get_string_prop_by_name (node, (const guchar *)"cell"); + etcs->compare = e_xml_get_string_prop_by_name (node, (const guchar *)"compare"); + etcs->search = e_xml_get_string_prop_by_name (node, (const guchar *)"search"); + etcs->sortable = e_xml_get_string_prop_by_name (node, (const guchar *)"sortable"); + etcs->priority = e_xml_get_integer_prop_by_name_with_default (node, (const guchar *)"priority", 0); if (etcs->title == NULL) etcs->title = g_strdup(""); @@ -132,26 +132,26 @@ e_table_column_specification_save_to_node (ETableColumnSpecification *specificat { xmlNode *node; if (parent) - node = xmlNewChild(parent, NULL, (const unsigned char *)"ETableColumn", NULL); + node = xmlNewChild(parent, NULL, (const guchar *)"ETableColumn", NULL); else - node = xmlNewNode(NULL, (const unsigned char *)"ETableColumn"); + node = xmlNewNode(NULL, (const guchar *)"ETableColumn"); - e_xml_set_integer_prop_by_name(node, (const unsigned char *)"model_col", specification->model_col); + e_xml_set_integer_prop_by_name(node, (const guchar *)"model_col", specification->model_col); if (specification->compare_col != specification->model_col) - e_xml_set_integer_prop_by_name(node, (const unsigned char *)"compare_col", specification->compare_col); - e_xml_set_string_prop_by_name(node, (const unsigned char *)"_title", specification->title); - e_xml_set_string_prop_by_name(node, (const unsigned char *)"pixbuf", specification->pixbuf); - - e_xml_set_double_prop_by_name(node, (const unsigned char *)"expansion", specification->expansion); - e_xml_set_integer_prop_by_name(node, (const unsigned char *)"minimum_width", specification->minimum_width); - e_xml_set_bool_prop_by_name(node, (const unsigned char *)"resizable", specification->resizable); - e_xml_set_bool_prop_by_name(node, (const unsigned char *)"disabled", specification->disabled); - - e_xml_set_string_prop_by_name(node, (const unsigned char *)"cell", specification->cell); - e_xml_set_string_prop_by_name(node, (const unsigned char *)"compare", specification->compare); - e_xml_set_string_prop_by_name(node, (const unsigned char *)"search", specification->search); + e_xml_set_integer_prop_by_name(node, (const guchar *)"compare_col", specification->compare_col); + e_xml_set_string_prop_by_name(node, (const guchar *)"_title", specification->title); + e_xml_set_string_prop_by_name(node, (const guchar *)"pixbuf", specification->pixbuf); + + e_xml_set_double_prop_by_name(node, (const guchar *)"expansion", specification->expansion); + e_xml_set_integer_prop_by_name(node, (const guchar *)"minimum_width", specification->minimum_width); + e_xml_set_bool_prop_by_name(node, (const guchar *)"resizable", specification->resizable); + e_xml_set_bool_prop_by_name(node, (const guchar *)"disabled", specification->disabled); + + e_xml_set_string_prop_by_name(node, (const guchar *)"cell", specification->cell); + e_xml_set_string_prop_by_name(node, (const guchar *)"compare", specification->compare); + e_xml_set_string_prop_by_name(node, (const guchar *)"search", specification->search); if (specification->priority != 0) - e_xml_set_integer_prop_by_name (node, (const unsigned char *)"priority", specification->priority); + e_xml_set_integer_prop_by_name (node, (const guchar *)"priority", specification->priority); return node; } diff --git a/widgets/table/e-table-column-specification.h b/widgets/table/e-table-column-specification.h index 688e194825..7ea6f23dc4 100644 --- a/widgets/table/e-table-column-specification.h +++ b/widgets/table/e-table-column-specification.h @@ -38,21 +38,21 @@ G_BEGIN_DECLS typedef struct { GObject base; - int model_col; - int compare_col; - char *title; - char *pixbuf; + gint model_col; + gint compare_col; + gchar *title; + gchar *pixbuf; double expansion; - int minimum_width; + gint minimum_width; guint resizable : 1; guint disabled : 1; - char *cell; - char *compare; - char *search; - char *sortable; - int priority; + gchar *cell; + gchar *compare; + gchar *search; + gchar *sortable; + gint priority; } ETableColumnSpecification; typedef struct { diff --git a/widgets/table/e-table-column.c b/widgets/table/e-table-column.c index d2180d88e5..0969a79410 100644 --- a/widgets/table/e-table-column.c +++ b/widgets/table/e-table-column.c @@ -38,7 +38,7 @@ static void e_table_column_finalize (GObject *object) { ETableColumn *etc = E_TABLE_COLUMN (object); - const int cols = etc->col_count; + const gint cols = etc->col_count; /* * Destroy listeners @@ -82,7 +82,7 @@ e_table_column_class_init (GtkObjectClass *object_class) } static void -etc_do_insert (ETableColumn *etc, int pos, ETableCol *val) +etc_do_insert (ETableColumn *etc, gint pos, ETableCol *val) { memcpy (&etc->columns [pos+1], &etc->columns [pos], sizeof (ETableCol *) * (etc->col_count - pos)); @@ -90,7 +90,7 @@ etc_do_insert (ETableColumn *etc, int pos, ETableCol *val) } void -e_table_column_add_column (ETableColumn *etc, ETableCol *tc, int pos) +e_table_column_add_column (ETableColumn *etc, ETableCol *tc, gint pos) { ETableCol **new_ptr; @@ -109,7 +109,7 @@ e_table_column_add_column (ETableColumn *etc, ETableCol *tc, int pos) } ETableCol * -e_table_column_get_column (ETableColumn *etc, int column) +e_table_column_get_column (ETableColumn *etc, gint column) { g_return_val_if_fail (etc != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), NULL); @@ -123,7 +123,7 @@ e_table_column_get_column (ETableColumn *etc, int column) return etc->columns [column]; } -int +gint e_table_column_count (ETableColumn *etc) { g_return_val_if_fail (etc != NULL, 0); @@ -132,10 +132,10 @@ e_table_column_count (ETableColumn *etc) return etc->col_count; } -int -e_table_column_index (ETableColumn *etc, const char *identifier) +gint +e_table_column_index (ETableColumn *etc, const gchar *identifier) { - int i; + gint i; g_return_val_if_fail (etc != NULL, 0); g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0); @@ -151,10 +151,10 @@ e_table_column_index (ETableColumn *etc, const char *identifier) return -1; } -int -e_table_column_get_index_at (ETableColumn *etc, int x_offset) +gint +e_table_column_get_index_at (ETableColumn *etc, gint x_offset) { - int i, total; + gint i, total; g_return_val_if_fail (etc != NULL, 0); g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0); @@ -175,7 +175,7 @@ ETableCol ** e_table_column_get_columns (ETableColumn *etc) { ETableCol **ret; - int i; + gint i; g_return_val_if_fail (etc != NULL, 0); g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0); @@ -196,11 +196,11 @@ e_table_column_selection_ok (ETableColumn *etc) return etc->selectable; } -int +gint ve_table_column_get_selected (ETableColumn *etc) { - int i; - int selected = 0; + gint i; + gint selected = 0; g_return_val_if_fail (etc != NULL, 0); g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0); @@ -213,10 +213,10 @@ ve_table_column_get_selected (ETableColumn *etc) return selected; } -int +gint e_table_column_total_width (ETableColumn *etc) { - int total; + gint total; g_return_val_if_fail (etc != NULL, 0); g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0); @@ -229,7 +229,7 @@ e_table_column_total_width (ETableColumn *etc) } static void -etc_do_remove (ETableColumn *etc, int idx) +etc_do_remove (ETableColumn *etc, gint idx) { memcpy (&etc->columns [idx], &etc->columns [idx+1], sizeof (ETableCol *) * etc->col_count - idx); @@ -237,7 +237,7 @@ etc_do_remove (ETableColumn *etc, int idx) } void -e_table_column_move (ETableColumn *etc, int source_index, int target_index) +e_table_column_move (ETableColumn *etc, gint source_index, gint target_index) { g_return_if_fail (etc != NULL); g_return_if_fail (E_IS_TABLE_COLUMN (etc)); @@ -253,7 +253,7 @@ e_table_column_move (ETableColumn *etc, int source_index, int target_index) } void -e_table_column_remove (ETableColumn *etc, int idx) +e_table_column_remove (ETableColumn *etc, gint idx) { g_return_if_fail (etc != NULL); g_return_if_fail (E_IS_TABLE_COLUMN (etc)); @@ -270,7 +270,7 @@ e_table_column_set_selection (ETableColumn *etc, gboolean allow_selection); } void -e_table_column_set_size (ETableColumn *etc, int idx, int size) +e_table_column_set_size (ETableColumn *etc, gint idx, gint size) { g_return_if_fail (etc != NULL); g_return_if_fail (E_IS_TABLE_COLUMN (etc)); diff --git a/widgets/table/e-table-config-field.c b/widgets/table/e-table-config-field.c index 6d3e5611da..0fd82bf0ed 100644 --- a/widgets/table/e-table-config-field.c +++ b/widgets/table/e-table-config-field.c @@ -120,7 +120,7 @@ etcf_truncate (ETableConfigField *etcf) static void etcf_set_sensitivity(ETableConfigField *etcf) { - int count = etcf_get_count(etcf); + gint count = etcf_get_count(etcf); if (etcf->n >= count) { gtk_widget_set_sensitive(etcf->radio_ascending, FALSE); @@ -138,7 +138,7 @@ etcf_set_sensitivity(ETableConfigField *etcf) static void toggled(GtkWidget *widget, ETableConfigField *etcf) { - int count; + gint count; count = etcf_get_count(etcf); if (count > etcf->n) { @@ -176,11 +176,11 @@ changed(GtkWidget *widget, ETableConfigField *etcf) static void etcf_setup(ETableConfigField *etcf) { - int count; + gint count; GList *list = NULL; ETableColumnSpecification **column; ETableColumnSpecification *chosen_column = NULL; - int model_col = -1; + gint model_col = -1; etcf_set_sensitivity(etcf); @@ -228,7 +228,7 @@ e_table_config_field_construct_nth (ETableConfigField *etcf, ETableSpecification *spec, ETableSortInfo *sort_info, gboolean grouping, - int n) + gint n) { GtkWidget *frame; GtkWidget *internal_hbox; diff --git a/widgets/table/e-table-config-field.h b/widgets/table/e-table-config-field.h index 9fbd21d694..eb13da90ab 100644 --- a/widgets/table/e-table-config-field.h +++ b/widgets/table/e-table-config-field.h @@ -41,7 +41,7 @@ typedef struct { ETableSpecification *spec; ETableSortInfo *sort_info; guint grouping : 1; - int n; + gint n; GtkWidget *combo; GtkWidget *radio_ascending; diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 06f98066bb..23ff88d2bd 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -233,7 +233,7 @@ configure_combo_box_set_active (GtkComboBox *combo_box, const gchar *value) } static ETableColumnSpecification * -find_column_in_spec (ETableSpecification *spec, int model_col) +find_column_in_spec (ETableSpecification *spec, gint model_col) { ETableColumnSpecification **column; @@ -250,7 +250,7 @@ find_column_in_spec (ETableSpecification *spec, int model_col) } static int -find_model_column_by_name (ETableSpecification *spec, const char *s) +find_model_column_by_name (ETableSpecification *spec, const gchar *s) { ETableColumnSpecification **column; @@ -268,7 +268,7 @@ static void update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort) { ETableConfigSortWidgets *widgets; - int count, i; + gint count, i; if (is_sort){ count = e_table_sort_info_sorting_get_count ( @@ -362,7 +362,7 @@ config_sort_info_update (ETableConfig *config) { ETableSortInfo *info = config->state->sort_info; GString *res; - int count, i; + gint count, i; count = e_table_sort_info_sorting_get_count (info); res = g_string_new (""); @@ -401,7 +401,7 @@ config_group_info_update (ETableConfig *config) { ETableSortInfo *info = config->state->sort_info; GString *res; - int count, i; + gint count, i; if (!e_table_sort_info_get_can_group (info)) return; @@ -439,7 +439,7 @@ config_group_info_update (ETableConfig *config) static void setup_fields (ETableConfig *config) { - int i; + gint i; e_table_model_freeze ((ETableModel *)config->available_model); e_table_model_freeze ((ETableModel *)config->shown_model); @@ -466,7 +466,7 @@ config_fields_info_update (ETableConfig *config) { ETableColumnSpecification **column; GString *res = g_string_new (""); - int i, j; + gint i, j; for (i = 0; i < config->state->col_count; i++){ for (j = 0, column = config->source_spec->columns; *column; column++, j++){ @@ -493,7 +493,7 @@ static void do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort) { GtkDialog *dialog; - int response, running = 1; + gint response, running = 1; config->temp_state = e_table_state_duplicate (config->state); @@ -554,7 +554,7 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort) static void do_fields_config_dialog (ETableConfig *config) { - int response, running = 1; + gint response, running = 1; gtk_widget_ensure_style (config->dialog_show_fields); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (config->dialog_show_fields)->vbox), 0); @@ -604,12 +604,12 @@ static ETableModel *global_store; /* Glade better not be reentrant any time soo static void create_global_store (ETableConfig *config) { - int i; + gint i; global_store = e_table_memory_store_new (store_columns); for (i = 0; config->source_spec->columns[i]; i++) { - char *text; + gchar *text; if (config->source_spec->columns[i]->disabled) continue; @@ -693,7 +693,7 @@ dialog_destroyed (gpointer data, GObject *where_object_was) } static void -dialog_response (GtkWidget *dialog, int response_id, ETableConfig *config) +dialog_response (GtkWidget *dialog, gint response_id, ETableConfig *config) { if (response_id == GTK_RESPONSE_APPLY || response_id == GTK_RESPONSE_OK) { @@ -741,7 +741,7 @@ e_table_proxy_gtk_combo_text_new (void) #if 0 static GtkWidget * -configure_dialog (GladeXML *gui, const char *widget_name, ETableConfig *config) +configure_dialog (GladeXML *gui, const gchar *widget_name, ETableConfig *config) { GtkWidget *w; @@ -752,7 +752,7 @@ configure_dialog (GladeXML *gui, const char *widget_name, ETableConfig *config) #endif static void -connect_button (ETableConfig *config, GladeXML *gui, const char *widget_name, GCallback cback) +connect_button (ETableConfig *config, GladeXML *gui, const gchar *widget_name, GCallback cback) { GtkWidget *button = glade_xml_get_widget (gui, widget_name); @@ -779,14 +779,14 @@ sort_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *sort) ETableConfig *config = sort->e_table_config; ETableSortInfo *sort_info = config->temp_state->sort_info; ETableConfigSortWidgets *base = &config->sort[0]; - int idx = sort - base; + gint idx = sort - base; gchar *s; s = configure_combo_box_get_active (combo_box); if (s != NULL) { ETableSortColumn c; - int col; + gint col; col = find_model_column_by_name (config->source_spec, s); if (col == -1){ @@ -815,7 +815,7 @@ sort_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *sort) ETableConfig *config = sort->e_table_config; ETableSortInfo *si = config->temp_state->sort_info; ETableConfigSortWidgets *base = &config->sort[0]; - int idx = sort - base; + gint idx = sort - base; ETableSortColumn c; c = e_table_sort_info_sorting_get_nth (si, idx); @@ -827,10 +827,10 @@ static void configure_sort_dialog (ETableConfig *config, GladeXML *gui) { GSList *l; - int i; + gint i; for (i = 0; i < 4; i++){ - char buffer [80]; + gchar buffer [80]; snprintf (buffer, sizeof (buffer), "sort-combo-%d", i + 1); config->sort [i].combo = glade_xml_get_widget (gui, buffer); @@ -858,7 +858,7 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui) } for (l = config->column_names; l; l = l->next){ - char *label = l->data; + gchar *label = l->data; for (i = 0; i < 4; i++){ configure_combo_box_add ( @@ -889,14 +889,14 @@ group_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *group) ETableConfig *config = group->e_table_config; ETableSortInfo *sort_info = config->temp_state->sort_info; ETableConfigSortWidgets *base = &config->group[0]; - int idx = group - base; + gint idx = group - base; gchar *s; s = configure_combo_box_get_active (combo_box); if (s != NULL) { ETableSortColumn c; - int col; + gint col; col = find_model_column_by_name (config->source_spec, s); if (col == -1){ @@ -925,7 +925,7 @@ group_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *group) ETableConfig *config = group->e_table_config; ETableSortInfo *si = config->temp_state->sort_info; ETableConfigSortWidgets *base = &config->group[0]; - int idx = group - base; + gint idx = group - base; ETableSortColumn c; c = e_table_sort_info_grouping_get_nth (si, idx); @@ -937,10 +937,10 @@ static void configure_group_dialog (ETableConfig *config, GladeXML *gui) { GSList *l; - int i; + gint i; for (i = 0; i < 4; i++){ - char buffer [80]; + gchar buffer [80]; snprintf (buffer, sizeof (buffer), "group-combo-%d", i + 1); config->group [i].combo = glade_xml_get_widget (gui, buffer); @@ -976,7 +976,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui) for (l = config->column_names; l; l = l->next){ - char *label = l->data; + gchar *label = l->data; for (i = 0; i < 4; i++){ configure_combo_box_add ( @@ -1002,7 +1002,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui) } static void -add_column (int model_row, gpointer closure) +add_column (gint model_row, gpointer closure) { GList **columns = closure; *columns = g_list_prepend (*columns, GINT_TO_POINTER (model_row)); @@ -1013,8 +1013,8 @@ config_button_add (GtkWidget *widget, ETableConfig *config) { GList *columns = NULL; GList *column; - int count; - int i; + gint count; + gint i; e_table_selected_row_foreach (config->available, add_column, &columns); columns = g_list_reverse (columns); @@ -1045,7 +1045,7 @@ config_button_remove (GtkWidget *widget, ETableConfig *config) e_table_selected_row_foreach (config->shown, add_column, &columns); for (column = columns; column; column = column->next) { - int row = GPOINTER_TO_INT (column->data); + gint row = GPOINTER_TO_INT (column->data); memmove (config->temp_state->columns + row, config->temp_state->columns + row + 1, sizeof (int) * (config->temp_state->col_count - row - 1)); memmove (config->temp_state->expansions + row, config->temp_state->expansions + row + 1, sizeof (double) * (config->temp_state->col_count - row - 1)); @@ -1064,11 +1064,11 @@ config_button_up (GtkWidget *widget, ETableConfig *config) { GList *columns = NULL; GList *column; - int *new_shown; + gint *new_shown; double *new_expansions; - int next_col; + gint next_col; double next_expansion; - int i; + gint i; e_table_selected_row_foreach (config->shown, add_column, &columns); @@ -1119,11 +1119,11 @@ config_button_down (GtkWidget *widget, ETableConfig *config) { GList *columns = NULL; GList *column; - int *new_shown; + gint *new_shown; double *new_expansions; - int next_col; + gint next_col; double next_expansion; - int i; + gint i; e_table_selected_row_foreach (config->shown, add_column, &columns); @@ -1274,7 +1274,7 @@ e_table_config_init (ETableConfig *config) ETableConfig * e_table_config_construct (ETableConfig *config, - const char *header, + const gchar *header, ETableSpecification *spec, ETableState *state, GtkWindow *parent_window) @@ -1298,7 +1298,7 @@ e_table_config_construct (ETableConfig *config, config->domain = g_strdup (spec->domain); for (column = config->source_spec->columns; *column; column++){ - char *label = (*column)->title; + gchar *label = (*column)->title; if ((*column)->disabled) continue; @@ -1330,7 +1330,7 @@ e_table_config_construct (ETableConfig *config, * Returns: The config object. */ ETableConfig * -e_table_config_new (const char *header, +e_table_config_new (const gchar *header, ETableSpecification *spec, ETableState *state, GtkWindow *parent_window) diff --git a/widgets/table/e-table-config.h b/widgets/table/e-table-config.h index d5366bf999..72357fb8f6 100644 --- a/widgets/table/e-table-config.h +++ b/widgets/table/e-table-config.h @@ -47,14 +47,14 @@ typedef struct { GtkWidget *radio_descending; GtkWidget *view_check; /* Only for group dialog */ guint changed_id, toggled_id; - void *e_table_config; + gpointer e_table_config; } ETableConfigSortWidgets; typedef struct { GObject parent; - char *header; + gchar *header; /* * Our various dialog boxes @@ -81,7 +81,7 @@ typedef struct { ETableWithout *available_model; ETable *shown; ETableSubsetVariable *shown_model; - char *domain; + gchar *domain; /* * List of valid column names @@ -97,12 +97,12 @@ typedef struct { } ETableConfigClass; GType e_table_config_get_type (void); -ETableConfig *e_table_config_new (const char *header, +ETableConfig *e_table_config_new (const gchar *header, ETableSpecification *spec, ETableState *state, GtkWindow *parent_window); ETableConfig *e_table_config_construct (ETableConfig *etco, - const char *header, + const gchar *header, ETableSpecification *spec, ETableState *state, GtkWindow *parent_window); diff --git a/widgets/table/e-table-example-1.c b/widgets/table/e-table-example-1.c index b1eae4cc40..b870967099 100644 --- a/widgets/table/e-table-example-1.c +++ b/widgets/table/e-table-example-1.c @@ -41,10 +41,10 @@ * class, you simply create a new object of the ETableSimple class. You * give it a bunch of functions that act as callbacks. * - * You also get to pass a void * to ETableSimple and it gets passed to + * You also get to pass a gpointer to ETableSimple and it gets passed to * your callbacks. This would be for having multiple models of the same * type. This is just an example though, so we statically define all the - * data and ignore the void *data parameter. + * data and ignore the gpointer data parameter. * * In our example we will be creating a table model with 6 columns and 10 * rows. This corresponds to having 6 different types of information and @@ -99,7 +99,7 @@ <grouping> <leaf column=\"1\" ascending=\"true\"/> </grouping> \ </ETableSpecification>" -char *headers [COLS] = { +gchar *headers [COLS] = { "Email", "Full Name", "Address", @@ -114,7 +114,7 @@ char *headers [COLS] = { * 3 Phone */ -char *table_data [ROWS] [COLS]; +gchar *table_data [ROWS] [COLS]; /* * ETableSimple callbacks @@ -128,28 +128,28 @@ char *table_data [ROWS] [COLS]; /* This function returns the number of columns in our ETableModel. */ static int -my_col_count (ETableModel *etc, void *data) +my_col_count (ETableModel *etc, gpointer data) { return COLS; } /* This function returns the number of rows in our ETableModel. */ static int -my_row_count (ETableModel *etc, void *data) +my_row_count (ETableModel *etc, gpointer data) { return ROWS; } /* This function returns the value at a particular point in our ETableModel. */ -static void * -my_value_at (ETableModel *etc, int col, int row, void *data) +static gpointer +my_value_at (ETableModel *etc, gint col, gint row, gpointer data) { - return (void *) table_data [row] [col]; + return (gpointer) table_data [row] [col]; } /* This function sets the value at a particular point in our ETableModel. */ static void -my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data) +my_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val, gpointer data) { g_free (table_data [row] [col]); table_data [row] [col] = g_strdup (val); @@ -157,42 +157,42 @@ my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data /* This function returns whether a particular cell is editable. */ static gboolean -my_is_cell_editable (ETableModel *etc, int col, int row, void *data) +my_is_cell_editable (ETableModel *etc, gint col, gint row, gpointer data) { return TRUE; } /* This function duplicates the value passed to it. */ -static void * -my_duplicate_value (ETableModel *etc, int col, const void *value, void *data) +static gpointer +my_duplicate_value (ETableModel *etc, gint col, gconstpointer value, gpointer data) { return g_strdup (value); } /* This function frees the value passed to it. */ static void -my_free_value (ETableModel *etc, int col, void *value, void *data) +my_free_value (ETableModel *etc, gint col, gpointer value, gpointer data) { g_free (value); } /* This function creates an empty value. */ -static void * -my_initialize_value (ETableModel *etc, int col, void *data) +static gpointer +my_initialize_value (ETableModel *etc, gint col, gpointer data) { return g_strdup (""); } /* This function reports if a value is empty. */ static gboolean -my_value_is_empty (ETableModel *etc, int col, const void *value, void *data) +my_value_is_empty (ETableModel *etc, gint col, gconstpointer value, gpointer data) { - return !(value && *(char *)value); + return !(value && *(gchar *)value); } /* This function reports if a value is empty. */ -static char * -my_value_to_string (ETableModel *etc, int col, const void *value, void *data) +static gchar * +my_value_to_string (ETableModel *etc, gint col, gconstpointer value, gpointer data) { return g_strdup(value); } @@ -204,7 +204,7 @@ create_table (void) GtkWidget *e_table, *window, *frame; ECell *cell_left_just; ETableHeader *e_table_header; - int i, j; + gint i, j; ETableModel *e_table_model = NULL; /* First we fill in the simple data. */ @@ -287,8 +287,8 @@ create_table (void) /* This is the main function which just initializes gnome and call our create_table function */ -int -main (int argc, char *argv []) +gint +main (gint argc, gchar *argv []) { gnome_init ("TableExample", "TableExample", argc, argv); e_cursors_init (); diff --git a/widgets/table/e-table-example-2.c b/widgets/table/e-table-example-2.c index ac12886813..ca4128590c 100644 --- a/widgets/table/e-table-example-2.c +++ b/widgets/table/e-table-example-2.c @@ -43,10 +43,10 @@ the ETableSimple class. Instead of creating your own ETableModel class, you simply create a new object of the ETableSimple class. You give it a bunch of functions that act as callbacks. -You also get to pass a void * to ETableSimple and it gets passed to +You also get to pass a gpointer to ETableSimple and it gets passed to your callbacks. This would be for having multiple models of the same type. This is just an example though, so we statically define all the -data and ignore the void *data parameter. +data and ignore the gpointer data parameter. In our example we will be creating a table model with 6 columns and 10 rows. This corresponds to having 6 different types of information and @@ -100,7 +100,7 @@ The headers will be hard coded, as will be the example data. <grouping> <leaf column=\"1\" ascending=\"true\"/> </grouping> \ </ETableSpecification>" -char *headers[VIEW_COLS] = { +gchar *headers[VIEW_COLS] = { "Email", "Full Name", "Address", @@ -119,7 +119,7 @@ char *headers[VIEW_COLS] = { Importance field. */ -char *table_data[ROWS][VIEW_COLS]; +gchar *table_data[ROWS][VIEW_COLS]; gboolean importance_data[ROWS]; /* @@ -134,19 +134,19 @@ static GdkColor *color1; static GdkColor *color2; static int -my_col_count (ETableModel *etc, void *data) +my_col_count (ETableModel *etc, gpointer data) { return VIRTUAL_COLS; } static int -my_row_count (ETableModel *etc, void *data) +my_row_count (ETableModel *etc, gpointer data) { return ROWS; } -static void * -my_value_at (ETableModel *etc, int col, int row, void *data) +static gpointer +my_value_at (ETableModel *etc, gint col, gint row, gpointer data) { if (col == COLOR_COLUMN){ if (importance_data[row]){ @@ -157,12 +157,12 @@ my_value_at (ETableModel *etc, int col, int row, void *data) } else if (col == IMPORTANCE_COLUMN){ return (gpointer) importance_data[row]; } else { - return (void *) table_data [row][col]; + return (gpointer) table_data [row][col]; } } static void -my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data) +my_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val, gpointer data) { if (col == COLOR_COLUMN){ } else if (col == IMPORTANCE_COLUMN){ @@ -174,7 +174,7 @@ my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data } static gboolean -my_is_cell_editable (ETableModel *etc, int col, int row, void *data) +my_is_cell_editable (ETableModel *etc, gint col, gint row, gpointer data) { if (col == IMPORTANCE_COLUMN) return FALSE; @@ -182,20 +182,20 @@ my_is_cell_editable (ETableModel *etc, int col, int row, void *data) return TRUE; } -static void * -my_duplicate_value (ETableModel *etc, int col, const void *value, void *data) +static gpointer +my_duplicate_value (ETableModel *etc, gint col, gconstpointer value, gpointer data) { if (col == COLOR_COLUMN){ - return (void *) value; + return (gpointer) value; } else if (col == IMPORTANCE_COLUMN){ - return (void *) value; + return (gpointer) value; } else { return g_strdup (value); } } static void -my_free_value (ETableModel *etc, int col, void *value, void *data) +my_free_value (ETableModel *etc, gint col, gpointer value, gpointer data) { if (col == COLOR_COLUMN){ } else if (col == IMPORTANCE_COLUMN){ @@ -204,8 +204,8 @@ my_free_value (ETableModel *etc, int col, void *value, void *data) } } -static void * -my_initialize_value (ETableModel *etc, int col, void *data) +static gpointer +my_initialize_value (ETableModel *etc, gint col, gpointer data) { if (col == COLOR_COLUMN){ return NULL; @@ -217,19 +217,19 @@ my_initialize_value (ETableModel *etc, int col, void *data) } static gboolean -my_value_is_empty (ETableModel *etc, int col, const void *value, void *data) +my_value_is_empty (ETableModel *etc, gint col, gconstpointer value, gpointer data) { if (col == COLOR_COLUMN){ return value == NULL; } else if (col == IMPORTANCE_COLUMN){ return value == NULL; } else { - return !(value && *(char *)value); + return !(value && *(gchar *)value); } } -static char * -my_value_to_string (ETableModel *etc, int col, const void *value, void *data) +static gchar * +my_value_to_string (ETableModel *etc, gint col, gconstpointer value, gpointer data) { if (col == COLOR_COLUMN){ return g_strdup_printf("%d", (int) value); @@ -248,7 +248,7 @@ create_table () ECell *cell_left_just; ECell *cell_checkbox; ETableHeader *e_table_header; - int i, j; + gint i, j; ETableModel *e_table_model = NULL; ETableCol *ecol; GdkPixbuf *pixbuf; @@ -333,8 +333,8 @@ create_table () -int -main (int argc, char *argv []) +gint +main (gint argc, gchar *argv []) { gnome_init ("TableExample", "TableExample", argc, argv); e_cursors_init (); diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c index 0099b23656..78513792f8 100644 --- a/widgets/table/e-table-extras.c +++ b/widgets/table/e-table-extras.c @@ -83,8 +83,8 @@ ete_class_init (ETableExtrasClass *klass) static gint e_strint_compare(gconstpointer data1, gconstpointer data2) { - int int1 = atoi(data1); - int int2 = atoi(data2); + gint int1 = atoi(data1); + gint int2 = atoi(data2); return e_int_compare(GINT_TO_POINTER(int1), GINT_TO_POINTER(int2)); } @@ -124,9 +124,9 @@ g_utf8_strncasecmp (const gchar *s1, } static gboolean -e_string_search(gconstpointer haystack, const char *needle) +e_string_search(gconstpointer haystack, const gchar *needle) { - int length; + gint length; if (haystack == NULL) return FALSE; diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c index 61dedd4e12..e3c059d748 100644 --- a/widgets/table/e-table-field-chooser-dialog.c +++ b/widgets/table/e-table-field-chooser-dialog.c @@ -208,7 +208,7 @@ e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValu } static void -e_table_field_chooser_dialog_response (GtkDialog *dialog, int id) +e_table_field_chooser_dialog_response (GtkDialog *dialog, gint id) { if (id == GTK_RESPONSE_OK) gtk_widget_destroy (GTK_WIDGET (dialog)); diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index 99b61f9ffa..9c62064b27 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -94,8 +94,8 @@ etfci_dispose (GObject *object) static gint etfci_find_button (ETableFieldChooserItem *etfci, double loc) { - int i; - int count; + gint i; + gint count; double height = 0; count = e_table_header_count(etfci->combined_header); @@ -115,9 +115,9 @@ etfci_find_button (ETableFieldChooserItem *etfci, double loc) static void etfci_rebuild_combined (ETableFieldChooserItem *etfci) { - int count; + gint count; GHashTable *hash; - int i; + gint i; if (etfci->combined_header != NULL) g_object_unref (etfci->combined_header); @@ -151,8 +151,8 @@ etfci_reflow (GnomeCanvasItem *item, gint flags) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); double old_height; - int i; - int count; + gint i; + gint count; double height = 0; etfci_rebuild_combined (etfci); @@ -178,7 +178,7 @@ etfci_reflow (GnomeCanvasItem *item, gint flags) } static void -etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); double i2c [6]; @@ -255,7 +255,7 @@ full_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *etf } static void -full_header_dimension_changed (ETableHeader *header, int col, ETableFieldChooserItem *etfci) +full_header_dimension_changed (ETableHeader *header, gint col, ETableFieldChooserItem *etfci) { e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci)); } @@ -305,7 +305,7 @@ table_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *et } static void -table_header_dimension_changed (ETableHeader *header, int col, ETableFieldChooserItem *etfci) +table_header_dimension_changed (ETableHeader *header, gint col, ETableFieldChooserItem *etfci) { e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci)); } @@ -396,7 +396,7 @@ etfci_drag_data_get (GtkWidget *widget, gtk_selection_data_set(selection_data, GDK_SELECTION_TYPE_STRING, sizeof(string[0]), - (unsigned char *)string, + (guchar *)string, strlen(string)); g_free(string); } @@ -449,13 +449,13 @@ etfci_unrealize (GnomeCanvasItem *item) } static void -etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) +etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); GnomeCanvas *canvas = item->canvas; - int rows; - int y1, y2; - int row; + gint rows; + gint y1, y2; + gint row; GtkStyle *style; GtkStateType state; @@ -495,7 +495,7 @@ etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int widt } static double -etfci_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, +etfci_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -503,7 +503,7 @@ etfci_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, } static gboolean -etfci_maybe_start_drag (ETableFieldChooserItem *etfci, int x, int y) +etfci_maybe_start_drag (ETableFieldChooserItem *etfci, gint x, gint y) { if (!etfci->maybe_drag) return FALSE; @@ -523,8 +523,8 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, doub GdkDragContext *context; ETableCol *ecol; GdkPixmap *pixmap; - int drag_col; - int button_height; + gint drag_col; + gint button_height; GtkTargetEntry etfci_drag_types [] = { { (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER }, @@ -580,7 +580,7 @@ etfci_event (GnomeCanvasItem *item, GdkEvent *e) { ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item); GnomeCanvas *canvas = item->canvas; - int x, y; + gint x, y; switch (e->type){ case GDK_MOTION_NOTIFY: diff --git a/widgets/table/e-table-field-chooser-item.h b/widgets/table/e-table-field-chooser-item.h index 3b9937bf3c..d0cbbd9f75 100644 --- a/widgets/table/e-table-field-chooser-item.h +++ b/widgets/table/e-table-field-chooser-item.h @@ -49,8 +49,8 @@ typedef struct { /* * Ids */ - int full_header_structure_change_id, full_header_dimension_change_id; - int table_header_structure_change_id, table_header_dimension_change_id; + gint full_header_structure_change_id, full_header_dimension_change_id; + gint table_header_structure_change_id, table_header_dimension_change_id; gchar *dnd_code; @@ -58,8 +58,8 @@ typedef struct { * For dragging columns */ guint maybe_drag:1; - int click_x, click_y; - int drag_col; + gint click_x, click_y; + gint drag_col; guint drag_data_get_id; guint drag_end_id; } ETableFieldChooserItem; diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 5af40532f8..28b7f4e45f 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -142,7 +142,7 @@ void e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContainer *etgc, ETableHeader *full_header, ETableHeader *header, - ETableModel *model, ETableSortInfo *sort_info, int n) + ETableModel *model, ETableSortInfo *sort_info, gint n) { ETableCol *col; ETableSortColumn column = e_table_sort_info_grouping_get_nth(sort_info, n); @@ -184,7 +184,7 @@ e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContaine ETableGroup * e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header, ETableHeader *header, - ETableModel *model, ETableSortInfo *sort_info, int n) + ETableModel *model, ETableSortInfo *sort_info, gint n) { ETableGroupContainer *etgc; @@ -359,56 +359,56 @@ compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_n } static void -child_cursor_change (ETableGroup *etg, int row, +child_cursor_change (ETableGroup *etg, gint row, ETableGroupContainer *etgc) { e_table_group_cursor_change (E_TABLE_GROUP (etgc), row); } static void -child_cursor_activated (ETableGroup *etg, int row, +child_cursor_activated (ETableGroup *etg, gint row, ETableGroupContainer *etgc) { e_table_group_cursor_activated (E_TABLE_GROUP (etgc), row); } static void -child_double_click (ETableGroup *etg, int row, int col, GdkEvent *event, +child_double_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { e_table_group_double_click (E_TABLE_GROUP (etgc), row, col, event); } static gint -child_right_click (ETableGroup *etg, int row, int col, GdkEvent *event, +child_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { return e_table_group_right_click (E_TABLE_GROUP (etgc), row, col, event); } static gint -child_click (ETableGroup *etg, int row, int col, GdkEvent *event, +child_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { return e_table_group_click (E_TABLE_GROUP (etgc), row, col, event); } static gint -child_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, +child_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { return e_table_group_key_press (E_TABLE_GROUP (etgc), row, col, event); } static gint -child_start_drag (ETableGroup *etg, int row, int col, GdkEvent *event, +child_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETableGroupContainer *etgc) { return e_table_group_start_drag (E_TABLE_GROUP (etgc), row, col, event); } static ETableGroupContainerChildNode * -create_child_node (ETableGroupContainer *etgc, void *val) +create_child_node (ETableGroupContainer *etgc, gpointer val) { ETableGroup *child; ETableGroupContainerChildNode *child_node; @@ -466,15 +466,15 @@ static void etgc_add (ETableGroup *etg, gint row) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); - void *val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, row); + gpointer val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, row); GCompareFunc comp = etgc->ecol->compare; GList *list = etgc->children; ETableGroup *child; ETableGroupContainerChildNode *child_node; - int i = 0; + gint i = 0; for (; list; list = g_list_next (list), i++){ - int comp_val; + gint comp_val; child_node = list->data; comp_val = (*comp)(child_node->key, val); @@ -504,12 +504,12 @@ etgc_add (ETableGroup *etg, gint row) } static void -etgc_add_array (ETableGroup *etg, const int *array, int count) +etgc_add_array (ETableGroup *etg, const gint *array, gint count) { - int i; + gint i; ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); - void *lastval = NULL; - int laststart = 0; + gpointer lastval = NULL; + gint laststart = 0; GCompareFunc comp = etgc->ecol->compare; ETableGroupContainerChildNode *child_node; ETableGroup *child; @@ -523,8 +523,8 @@ etgc_add_array (ETableGroup *etg, const int *array, int count) lastval = e_table_model_value_at (etg->model, etgc->ecol->col_idx, array[0]); for (i = 1; i < count; i++) { - void *val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, array[i]); - int comp_val; + gpointer val = e_table_model_value_at (etg->model, etgc->ecol->col_idx, array[i]); + gint comp_val; comp_val = (*comp)(lastval, val); if (comp_val != 0) { @@ -558,8 +558,8 @@ etgc_add_all (ETableGroup *etg) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); ESorter *sorter = etgc->selection_model->sorter; - int *array; - int count; + gint *array; + gint count; e_sorter_get_sorted_to_model_array(sorter, &array, &count); @@ -661,7 +661,7 @@ etgc_get_focus_column (ETableGroup *etg) } static void -etgc_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col) +etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); @@ -687,7 +687,7 @@ etgc_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col) } static void -etgc_get_mouse_over (ETableGroup *etg, int *row, int *col) +etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); @@ -697,7 +697,7 @@ etgc_get_mouse_over (ETableGroup *etg, int *row, int *col) *col = -1; if (etgc->children) { - int row_plus = 0; + gint row_plus = 0; GList *list; for (list = etgc->children; list; list = list->next) { @@ -718,11 +718,11 @@ etgc_get_mouse_over (ETableGroup *etg, int *row, int *col) } static void -etgc_get_cell_geometry (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *height) +etgc_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *height) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); - int ypos; + gint ypos; ypos = 0; @@ -731,7 +731,7 @@ etgc_get_cell_geometry (ETableGroup *etg, int *row, int *col, int *x, int *y, in for (list = etgc->children; list; list = list->next) { ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; ETableGroup *child = child_node->child; - int thisy; + gint thisy; e_table_group_get_cell_geometry (child, row, col, x, &thisy, width, height); ypos += thisy; @@ -1115,7 +1115,7 @@ etgc_init (ETableGroupContainer *container) } void -e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, void *closure) +e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, gpointer closure) { if (E_IS_TABLE_GROUP_CONTAINER (etg)){ ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); diff --git a/widgets/table/e-table-group-container.h b/widgets/table/e-table-group-container.h index 69791e376b..168b2f8a5a 100644 --- a/widgets/table/e-table-group-container.h +++ b/widgets/table/e-table-group-container.h @@ -62,8 +62,8 @@ typedef struct { gdouble width, height, minimum_width; ETableSortInfo *sort_info; - int n; - int length_threshold; + gint n; + gint length_threshold; ESelectionModel *selection_model; @@ -86,8 +86,8 @@ typedef struct { typedef struct { ETableGroup *child; - void *key; - char *string; + gpointer key; + gchar *string; GnomeCanvasItem *text; GnomeCanvasItem *rect; gint count; @@ -95,11 +95,11 @@ typedef struct { ETableGroup *e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header, ETableHeader *header, - ETableModel *model, ETableSortInfo *sort_info, int n); + ETableModel *model, ETableSortInfo *sort_info, gint n); void e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContainer *etgc, ETableHeader *full_header, ETableHeader *header, - ETableModel *model, ETableSortInfo *sort_info, int n); + ETableModel *model, ETableSortInfo *sort_info, gint n); GType e_table_group_container_get_type (void); diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 6076030737..5e269e284e 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -400,7 +400,7 @@ etgl_get_printable (ETableGroup *etg) } static void -etgl_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col) +etgl_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col) { ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); @@ -408,7 +408,7 @@ etgl_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col) } static void -etgl_get_mouse_over (ETableGroup *etg, int *row, int *col) +etgl_get_mouse_over (ETableGroup *etg, gint *row, gint *col) { ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); @@ -421,7 +421,7 @@ etgl_get_mouse_over (ETableGroup *etg, int *row, int *col) } static void -etgl_get_cell_geometry (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *height) +etgl_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *height) { ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); diff --git a/widgets/table/e-table-group-leaf.h b/widgets/table/e-table-group-leaf.h index e19bf8cdb8..8d05874c01 100644 --- a/widgets/table/e-table-group-leaf.h +++ b/widgets/table/e-table-group-leaf.h @@ -49,7 +49,7 @@ typedef struct { gdouble width; gdouble minimum_width; - int length_threshold; + gint length_threshold; ETableSubset *ets; guint is_grouped : 1; @@ -61,13 +61,13 @@ typedef struct { guint uniform_row_height : 1; ECursorMode cursor_mode; - int etgl_cursor_change_id; - int etgl_cursor_activated_id; - int etgl_double_click_id; - int etgl_right_click_id; - int etgl_click_id; - int etgl_key_press_id; - int etgl_start_drag_id; + gint etgl_cursor_change_id; + gint etgl_cursor_activated_id; + gint etgl_double_click_id; + gint etgl_right_click_id; + gint etgl_click_id; + gint etgl_key_press_id; + gint etgl_start_drag_id; ESelectionModel *selection_model; } ETableGroupLeaf; diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index 5cc03e90fc..a1d965b57a 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -101,7 +101,7 @@ e_table_group_new (GnomeCanvasGroup *parent, ETableHeader *header, ETableModel *model, ETableSortInfo *sort_info, - int n) + gint n) { g_return_val_if_fail (model != NULL, NULL); @@ -170,8 +170,8 @@ e_table_group_add (ETableGroup *etg, */ void e_table_group_add_array (ETableGroup *etg, - const int *array, - int count) + const gint *array, + gint count) { g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); @@ -372,7 +372,7 @@ e_table_group_get_printable (ETableGroup *etg) * %ETableGroup is removed from the value y points to. */ void -e_table_group_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col) +e_table_group_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col) { g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); @@ -382,7 +382,7 @@ e_table_group_compute_location (ETableGroup *etg, int *x, int *y, int *row, int } void -e_table_group_get_mouse_over (ETableGroup *etg, int *row, int *col) +e_table_group_get_mouse_over (ETableGroup *etg, gint *row, gint *col) { g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); @@ -407,12 +407,12 @@ e_table_group_get_mouse_over (ETableGroup *etg, int *row, int *col) */ void e_table_group_get_cell_geometry (ETableGroup *etg, - int *row, - int *col, - int *x, - int *y, - int *width, - int *height) + gint *row, + gint *col, + gint *x, + gint *y, + gint *width, + gint *height) { g_return_if_fail (etg != NULL); g_return_if_fail (E_IS_TABLE_GROUP (etg)); diff --git a/widgets/table/e-table-group.h b/widgets/table/e-table-group.h index 36868f7d35..7bf139e666 100644 --- a/widgets/table/e-table-group.h +++ b/widgets/table/e-table-group.h @@ -69,17 +69,17 @@ typedef struct { GnomeCanvasGroupClass parent_class; /* Signals */ - void (*cursor_change) (ETableGroup *etg, int row); - void (*cursor_activated) (ETableGroup *etg, int row); - void (*double_click) (ETableGroup *etg, int row, int col, GdkEvent *event); - gint (*right_click) (ETableGroup *etg, int row, int col, GdkEvent *event); - gint (*click) (ETableGroup *etg, int row, int col, GdkEvent *event); - gint (*key_press) (ETableGroup *etg, int row, int col, GdkEvent *event); - gint (*start_drag) (ETableGroup *etg, int row, int col, GdkEvent *event); + void (*cursor_change) (ETableGroup *etg, gint row); + void (*cursor_activated) (ETableGroup *etg, gint row); + void (*double_click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); + gint (*right_click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); + gint (*click) (ETableGroup *etg, gint row, gint col, GdkEvent *event); + gint (*key_press) (ETableGroup *etg, gint row, gint col, GdkEvent *event); + gint (*start_drag) (ETableGroup *etg, gint row, gint col, GdkEvent *event); /* Virtual functions. */ void (*add) (ETableGroup *etg, gint row); - void (*add_array) (ETableGroup *etg, const int *array, int count); + void (*add_array) (ETableGroup *etg, const gint *array, gint count); void (*add_all) (ETableGroup *etg); gboolean (*remove) (ETableGroup *etg, gint row); gint (*row_count) (ETableGroup *etg); @@ -89,9 +89,9 @@ typedef struct { gboolean (*get_focus) (ETableGroup *etg); gint (*get_focus_column) (ETableGroup *etg); EPrintable *(*get_printable) (ETableGroup *etg); - void (*compute_location) (ETableGroup *etg, int *x, int *y, int *row, int *col); - void (*get_mouse_over) (ETableGroup *etg, int *row, int *col); - void (*get_cell_geometry) (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *height); + void (*compute_location) (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col); + void (*get_mouse_over) (ETableGroup *etg, gint *row, gint *col); + void (*get_cell_geometry) (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y, gint *width, gint *height); } ETableGroupClass; @@ -99,8 +99,8 @@ typedef struct { void e_table_group_add (ETableGroup *etg, gint row); void e_table_group_add_array (ETableGroup *etg, - const int *array, - int count); + const gint *array, + gint count); void e_table_group_add_all (ETableGroup *etg); gboolean e_table_group_remove (ETableGroup *etg, gint row); @@ -119,26 +119,26 @@ gint e_table_group_get_focus_column (ETableGroup *etg); ETableHeader *e_table_group_get_header (ETableGroup *etg); EPrintable *e_table_group_get_printable (ETableGroup *etg); void e_table_group_compute_location (ETableGroup *etg, - int *x, - int *y, - int *row, - int *col); + gint *x, + gint *y, + gint *row, + gint *col); void e_table_group_get_mouse_over(ETableGroup *etg, - int *row, - int *col); + gint *row, + gint *col); void e_table_group_get_cell_geometry (ETableGroup *etg, - int *row, - int *col, - int *x, - int *y, - int *width, - int *height); + gint *row, + gint *col, + gint *x, + gint *y, + gint *width, + gint *height); ETableGroup *e_table_group_new (GnomeCanvasGroup *parent, ETableHeader *full_header, ETableHeader *header, ETableModel *model, ETableSortInfo *sort_info, - int n); + gint n); void e_table_group_construct (GnomeCanvasGroup *parent, ETableGroup *etg, ETableHeader *full_header, @@ -172,7 +172,7 @@ gint e_table_group_start_drag (ETableGroup *etg, GdkEvent *event); GType e_table_group_get_type (void); -typedef void (*ETableGroupLeafFn) (void *e_table_item, void *closure); +typedef void (*ETableGroupLeafFn) (gpointer e_table_item, gpointer closure); void e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, void *closure); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 62c00f94a4..d569e8dd9e 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -155,8 +155,8 @@ static int e_table_header_item_get_height (ETableHeaderItem *ethi) { ETableHeader *eth; - int numcols, col; - int maxheight; + gint numcols, col; + gint maxheight; g_return_val_if_fail (ethi != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER_ITEM (ethi), 0); @@ -168,7 +168,7 @@ e_table_header_item_get_height (ETableHeaderItem *ethi) for (col = 0; col < numcols; col++) { ETableCol *ecol = e_table_header_get_column (eth, col); - int height; + gint height; height = e_table_header_compute_height (ecol, GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas)); @@ -181,7 +181,7 @@ e_table_header_item_get_height (ETableHeaderItem *ethi) } static void -ethi_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +ethi_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); @@ -260,7 +260,7 @@ structure_changed (ETableHeader *header, ETableHeaderItem *ethi) } static void -dimension_changed (ETableHeader *header, int col, ETableHeaderItem *ethi) +dimension_changed (ETableHeader *header, gint col, ETableHeaderItem *ethi) { gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi)); } @@ -388,11 +388,11 @@ ethi_get_property (GObject *object, } static int -ethi_find_col_by_x (ETableHeaderItem *ethi, int x) +ethi_find_col_by_x (ETableHeaderItem *ethi, gint x) { - const int cols = e_table_header_count (ethi->eth); - int x1 = 0; - int col; + const gint cols = e_table_header_count (ethi->eth); + gint x1 = 0; + gint col; d(g_print ("%s:%d: x = %d, x1 = %d\n", __FUNCTION__, __LINE__, x, x1)); @@ -418,11 +418,11 @@ ethi_find_col_by_x (ETableHeaderItem *ethi, int x) } static int -ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, int x) +ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, gint x) { - const int cols = e_table_header_count (ethi->eth); - int x1 = 0; - int col; + const gint cols = e_table_header_count (ethi->eth); + gint x1 = 0; + gint col; x1 += ethi->group_indent_width; @@ -455,7 +455,7 @@ ethi_remove_drop_marker (ETableHeaderItem *ethi) } static GtkWidget * -make_shaped_window_from_xpm (const char **xpm) +make_shaped_window_from_xpm (const gchar **xpm) { GdkPixbuf *pixbuf; GdkPixmap *pixmap; @@ -483,10 +483,10 @@ make_shaped_window_from_xpm (const char **xpm) } static void -ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate) +ethi_add_drop_marker (ETableHeaderItem *ethi, gint col, gboolean recreate) { - int rx, ry; - int x; + gint rx, ry; + gint x; if (!recreate && ethi->drag_mark == col) return; @@ -518,7 +518,7 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate) #define gray50_width 2 #define gray50_height 2 -static char gray50_bits [] = { +static gchar gray50_bits [] = { 0x02, 0x01, }; static void @@ -592,7 +592,7 @@ do_drag_motion(ETableHeaderItem *ethi, if ((x >= 0) && (x <= (ethi->width)) && (y >= 0) && (y <= (ethi->height))){ - int col; + gint col; d(g_print("In header\n")); col = ethi_find_col_by_x_nearest (ethi, x); @@ -626,7 +626,7 @@ static gboolean scroll_timeout (gpointer data) { ETableHeaderItem *ethi = data; - int dx = 0; + gint dx = 0; GtkAdjustment *h, *v; double value; @@ -701,7 +701,7 @@ ethi_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, ETableHeaderItem *ethi) { - char *droptype, *headertype; + gchar *droptype, *headertype; guint direction = 0; gdk_drag_status (context, 0, time); @@ -768,15 +768,15 @@ ethi_drag_data_received (GtkWidget *canvas, guint time, ETableHeaderItem *ethi) { - int found = FALSE; - int count; - int column; - int drop_col; - int i; + gint found = FALSE; + gint count; + gint column; + gint drop_col; + gint i; if (data->data) { count = e_table_header_count(ethi->eth); - column = atoi((char *)data->data); + column = atoi((gchar *)data->data); drop_col = ethi->drop_col; ethi->drop_col = -1; @@ -820,7 +820,7 @@ ethi_drag_data_get (GtkWidget *canvas, gtk_selection_data_set(selection_data, GDK_SELECTION_TYPE_STRING, sizeof(string[0]), - (unsigned char *)string, + (guchar *)string, strlen(string)); g_free(string); } @@ -838,7 +838,7 @@ ethi_drag_drop (GtkWidget *canvas, if ((x >= 0) && (x <= (ethi->width)) && (y >= 0) && (y <= (ethi->height))){ - int col; + gint col; col = ethi_find_col_by_x_nearest (ethi, x); @@ -847,7 +847,7 @@ ethi_drag_drop (GtkWidget *canvas, ethi->drop_col = col; if (col != -1) { - char *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code); + gchar *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code); d(g_print ("ethi - %s\n", target)); gtk_drag_get_data (canvas, context, gdk_atom_intern(target, FALSE), time); g_free (target); @@ -935,19 +935,19 @@ ethi_unrealize (GnomeCanvasItem *item) } static void -ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) +ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); GnomeCanvas *canvas = item->canvas; - const int cols = e_table_header_count (ethi->eth); - int x1, x2; - int col; + const gint cols = e_table_header_count (ethi->eth); + gint x1, x2; + gint col; GHashTable *arrows = g_hash_table_new (NULL, NULL); if (ethi->sort_info) { - int length = e_table_sort_info_grouping_get_count(ethi->sort_info); - int i; + gint length = e_table_sort_info_grouping_get_count(ethi->sort_info); + gint i; for (i = 0; i < length; i++) { ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i); g_hash_table_insert (arrows, @@ -972,7 +972,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width x2 += ethi->group_indent_width; for (col = 0; col < cols; col++, x1 = x2){ ETableCol *ecol = e_table_header_get_column (ethi->eth, col); - int col_width; + gint col_width; col_width = ecol->width; @@ -1002,7 +1002,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width } static double -ethi_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, +ethi_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -1017,10 +1017,10 @@ ethi_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, * then the ETableCol that actually contains this point is returned here */ static gboolean -is_pointer_on_division (ETableHeaderItem *ethi, int pos, int *the_total, int *return_col) +is_pointer_on_division (ETableHeaderItem *ethi, gint pos, gint *the_total, gint *return_col) { - const int cols = e_table_header_count (ethi->eth); - int col, total; + const gint cols = e_table_header_count (ethi->eth); + gint col, total; total = 0; for (col = 0; col < cols; col++){ @@ -1052,9 +1052,9 @@ is_pointer_on_division (ETableHeaderItem *ethi, int pos, int *the_total, int *re #define convert(c,sx,sy,x,y) gnome_canvas_w2c (c,sx,sy,x,y) static void -set_cursor (ETableHeaderItem *ethi, int pos) +set_cursor (ETableHeaderItem *ethi, gint pos) { - int col; + gint col; GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas); gboolean resizable = FALSE; @@ -1063,12 +1063,12 @@ set_cursor (ETableHeaderItem *ethi, int pos) return; if (is_pointer_on_division (ethi, pos, NULL, &col)) { - int last_col = ethi->eth->col_count - 1; + gint last_col = ethi->eth->col_count - 1; ETableCol *ecol = e_table_header_get_column (ethi->eth, col); /* Last column is not resizable */ if (ecol->resizable && col != last_col) { - int c = col + 1; + gint c = col + 1; /* Column is not resizable if all columns after it are also not resizable */ @@ -1125,9 +1125,9 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event) GtkTargetList *list; GdkDragContext *context; ETableCol *ecol; - int col_width; + gint col_width; GdkPixmap *pixmap; - int group_indent = 0; + gint group_indent = 0; GHashTable *arrows = g_hash_table_new (NULL, NULL); GtkTargetEntry ethi_drag_types [] = { @@ -1140,8 +1140,8 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event) return; if (ethi->sort_info) { - int length = e_table_sort_info_grouping_get_count(ethi->sort_info); - int i; + gint length = e_table_sort_info_grouping_get_count(ethi->sort_info); + gint i; for (i = 0; i < length; i++) { ETableSortColumn column = e_table_sort_info_grouping_get_nth( @@ -1205,17 +1205,17 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event) typedef struct { ETableHeaderItem *ethi; - int col; + gint col; } EthiHeaderInfo; static void ethi_popup_sort_ascending(GtkWidget *widget, EthiHeaderInfo *info) { ETableCol *col; - int model_col = -1; - int length; - int i; - int found = FALSE; + gint model_col = -1; + gint length; + gint i; + gint found = FALSE; ETableHeaderItem *ethi = info->ethi; col = e_table_header_get_column (ethi->eth, info->col); @@ -1267,10 +1267,10 @@ static void ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info) { ETableCol *col; - int model_col=-1; - int length; - int i; - int found = FALSE; + gint model_col=-1; + gint length; + gint i; + gint found = FALSE; ETableHeaderItem *ethi = info->ethi; col = e_table_header_get_column (ethi->eth, info->col); @@ -1331,7 +1331,7 @@ static void ethi_popup_group_field(GtkWidget *widget, EthiHeaderInfo *info) { ETableCol *col; - int model_col; + gint model_col; ETableHeaderItem *ethi = info->ethi; ETableSortColumn column; @@ -1389,7 +1389,7 @@ static void ethi_popup_best_fit(GtkWidget *widget, EthiHeaderInfo *info) { ETableHeaderItem *ethi = info->ethi; - int width; + gint width; g_signal_emit_by_name (ethi->eth, "request_width", @@ -1416,7 +1416,7 @@ config_destroyed (gpointer data, GObject *where_object_was) static void apply_changes (ETableConfig *config, ETableHeaderItem *ethi) { - char *state = e_table_state_save_to_string (config->state); + gchar *state = e_table_state_save_to_string (config->state); if (ethi->table) e_table_set_state (ethi->table, state); @@ -1489,7 +1489,7 @@ static EPopupMenu ethi_context_menu [] = { static void sort_by_id (GtkWidget *menu_item, ETableHeaderItem *ethi) { - int col = GPOINTER_TO_INT (g_object_get_data(G_OBJECT (menu_item), "col-number")); + gint col = GPOINTER_TO_INT (g_object_get_data(G_OBJECT (menu_item), "col-number")); ETableCol *ecol; gboolean clearfirst; @@ -1520,7 +1520,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event) EthiHeaderInfo *info = g_new (EthiHeaderInfo, 1); ETableCol *col; GtkMenu *popup; - int ncol, sort_count, sort_col; + gint ncol, sort_count, sort_col; GtkWidget *menu_item, *sub_menu; ETableSortColumn column; gboolean ascending = TRUE; @@ -1571,7 +1571,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event) /* Headers */ for (ncol = 0; ncol<ethi->full_header->col_count; ncol++) { - char *text=NULL; + gchar *text=NULL; if (!ethi->full_header->columns[ncol]->sortable || ethi->full_header->columns[ncol]->disabled) @@ -1610,9 +1610,9 @@ ethi_button_pressed (ETableHeaderItem *ethi, GdkEventButton *event) void ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col) { - int model_col = -1; - int length; - int i; + gint model_col = -1; + gint length; + gint i; gboolean found = FALSE; if (col == NULL) @@ -1625,7 +1625,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col) for (i = 0; i < length; i++) { ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i); if (model_col == column.column || model_col == -1){ - int ascending = column.ascending; + gint ascending = column.ascending; ascending = ! ascending; column.ascending = ascending; e_table_sort_info_grouping_set_nth(ethi->sort_info, i, column); @@ -1641,14 +1641,14 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col) ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, i); if (model_col == column.column || model_col == -1){ - int ascending = column.ascending; + gint ascending = column.ascending; if (ascending == 0 && model_col != -1){ /* * This means the user has clicked twice * already, lets kill sorting of this column now. */ - int j; + gint j; for (j = i + 1; j < length; j++) e_table_sort_info_sorting_set_nth (ethi->sort_info, @@ -1688,8 +1688,8 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e) ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); GnomeCanvas *canvas = item->canvas; const gboolean resizing = ETHI_RESIZING (ethi); - int x, y, start, col; - int was_maybe_drag = 0; + gint x, y, start, col; + gint was_maybe_drag = 0; switch (e->type){ case GDK_ENTER_NOTIFY: @@ -1706,7 +1706,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e) convert (canvas, e->motion.x, e->motion.y, &x, &y); if (resizing){ - int new_width; + gint new_width; if (ethi->resize_guide == NULL){ /* Quick hack until I actually bind the views */ @@ -1776,7 +1776,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e) if (e->button.button != 1) break; else { - int width = 0; + gint width = 0; g_signal_emit_by_name (ethi->eth, "request_width", (int)ethi->resize_col, &width); diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h index 24a86939d8..db2aeb3508 100644 --- a/widgets/table/e-table-header-item.h +++ b/widgets/table/e-table-header-item.h @@ -51,26 +51,26 @@ typedef struct { /* * Used during resizing; Could be shorts */ - int resize_col; - int resize_start_pos; - int resize_min_width; + gint resize_col; + gint resize_start_pos; + gint resize_min_width; GtkObject *resize_guide; - int group_indent_width; + gint group_indent_width; /* * Ids */ - int structure_change_id, dimension_change_id; + gint structure_change_id, dimension_change_id; /* * For dragging columns */ guint maybe_drag:1; guint dnd_ready:1; - int click_x, click_y; - int drag_col, drop_col, drag_mark; + gint click_x, click_y; + gint drag_col, drop_col, drag_mark; guint drag_motion_id, drag_end_id, drag_leave_id, drag_drop_id, drag_data_received_id, drag_data_get_id; guint sort_info_changed_id, group_info_changed_id; GnomeCanvasItem *remove_item; @@ -84,11 +84,11 @@ typedef struct { ETableSortInfo *sort_info; guint scroll_direction : 4; - int last_drop_x; - int last_drop_y; - int last_drop_time; + gint last_drop_x; + gint last_drop_y; + gint last_drop_time; GdkDragContext *last_drop_context; - int scroll_idle_id; + gint scroll_idle_id; /* For adding fields. */ ETableHeader *full_header; @@ -102,7 +102,7 @@ typedef struct { } etfcd; /* For keyboard navigation*/ - int selected_col; + gint selected_col; } ETableHeaderItem; diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index ae5ebf871f..8044b73bfc 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -35,7 +35,7 @@ #include "e-table-header-utils.h" static PangoLayout* -build_header_layout (GtkWidget *widget, const char *str) +build_header_layout (GtkWidget *widget, const gchar *str) { PangoLayout *layout; @@ -70,8 +70,8 @@ build_header_layout (GtkWidget *widget, const char *str) double e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) { - int ythick; - int height; + gint ythick; + gint height; PangoLayout *layout; g_return_val_if_fail (ecol != NULL, -1); @@ -111,13 +111,13 @@ e_table_header_width_extras (GtkStyle *style) */ static GdkPixmap * make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, - GdkPixbuf *pixbuf, GdkColor *bg, int width, int height, - int dither_xofs, int dither_yofs) + GdkPixbuf *pixbuf, GdkColor *bg, gint width, gint height, + gint dither_xofs, gint dither_yofs) { - int pwidth, pheight; + gint pwidth, pheight; GdkPixmap *pixmap; GdkPixbuf *tmp; - int color; + gint color; pwidth = gdk_pixbuf_get_width (pixbuf); pheight = gdk_pixbuf_get_height (pixbuf); @@ -141,7 +141,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, 16, color, color); } else { - int x, y, rowstride; + gint x, y, rowstride; GdkPixbuf *fade; guchar *pixels; @@ -162,7 +162,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, for (y = 0; y < height; y++) { guchar *p; - int yfactor; + gint yfactor; p = pixels + y * rowstride; @@ -172,7 +172,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, yfactor = height; for (x = 0; x < width; x++) { - int xfactor; + gint xfactor; if (width < pwidth) xfactor = width - x; @@ -238,12 +238,12 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, **/ static void e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, - int x, int y, PangoLayout *layout, char *str, - int max_width, gboolean center) + gint x, gint y, PangoLayout *layout, gchar *str, + gint max_width, gboolean center) { - int width; - int height; - int index; + gint width; + gint height; + gint index; GSList *lines; PangoLayoutLine *line; @@ -257,7 +257,7 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, gdk_gc_set_clip_rectangle (gc, NULL); if (width <= max_width) { - int xpos; + gint xpos; if (center) xpos = x + (max_width - width) / 2; @@ -268,8 +268,8 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, xpos, y, layout); } else { - int arrow_width; - int i; + gint arrow_width; + gint i; if (max_width < ARROW_WIDTH + 1) arrow_width = max_width - 1; @@ -323,13 +323,13 @@ void e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, GtkStyle *style, GtkStateType state, GtkWidget *widget, - int x, int y, int width, int height, - int button_width, int button_height, + gint x, gint y, gint width, gint height, + gint button_width, gint button_height, ETableColArrow arrow) { - int xthick, ythick; - int inner_x, inner_y; - int inner_width, inner_height; + gint xthick, ythick; + gint inner_x, inner_y; + gint inner_width, inner_height; GdkGC *gc; PangoLayout *layout; static gpointer g_label = NULL; @@ -385,7 +385,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, case E_TABLE_COL_ARROW_UP: case E_TABLE_COL_ARROW_DOWN: { - int arrow_width, arrow_height; + gint arrow_width, arrow_height; arrow_width = MIN (MIN_ARROW_SIZE, inner_width); arrow_height = MIN (MIN_ARROW_SIZE, inner_height); @@ -413,9 +413,9 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, /* Pixbuf or label */ if (ecol->is_pixbuf) { - int pwidth, pheight; - int clip_width, clip_height; - int xpos; + gint pwidth, pheight; + gint clip_width, clip_height; + gint xpos; GdkPixmap *pixmap; g_return_if_fail (ecol->pixbuf != NULL); @@ -429,7 +429,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, xpos = inner_x; if (inner_width - pwidth > 11) { - int ypos; + gint ypos; pango_layout_get_pixel_size (layout, &width, NULL); diff --git a/widgets/table/e-table-header-utils.h b/widgets/table/e-table-header-utils.h index 2ae1f79b1b..7804bd12c5 100644 --- a/widgets/table/e-table-header-utils.h +++ b/widgets/table/e-table-header-utils.h @@ -40,12 +40,12 @@ void e_table_header_draw_button (GdkDrawable *drawable, GtkStyle *style, GtkStateType state, GtkWidget *widget, - int x, - int y, - int width, - int height, - int button_width, - int button_height, + gint x, + gint y, + gint width, + gint height, + gint button_width, + gint button_height, ETableColArrow arrow); #ifdef __cplusplus diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index 6fd40ae0fa..b931f48e20 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -49,7 +49,7 @@ enum { LAST_SIGNAL }; -static void eth_set_size (ETableHeader *eth, int idx, int size); +static void eth_set_size (ETableHeader *eth, gint idx, gint size); static void eth_calc_widths (ETableHeader *eth); static guint eth_signals [LAST_SIGNAL] = { 0, }; @@ -57,18 +57,18 @@ static guint eth_signals [LAST_SIGNAL] = { 0, }; G_DEFINE_TYPE (ETableHeader, e_table_header, G_TYPE_OBJECT) struct two_ints { - int column; - int width; + gint column; + gint width; }; static void -eth_set_width (ETableHeader *eth, int width) +eth_set_width (ETableHeader *eth, gint width) { eth->width = width; } static void -dequeue (ETableHeader *eth, int *column, int *width) +dequeue (ETableHeader *eth, gint *column, gint *width) { GSList *head; struct two_ints *store; @@ -88,7 +88,7 @@ dequeue (ETableHeader *eth, int *column, int *width) static gboolean dequeue_idle (ETableHeader *eth) { - int column, width; + gint column, width; dequeue (eth, &column, &width); while (eth->change_queue && ((struct two_ints *) eth->change_queue->data)->column == column) @@ -108,7 +108,7 @@ dequeue_idle (ETableHeader *eth) } static void -enqueue (ETableHeader *eth, int column, int width) +enqueue (ETableHeader *eth, gint column, gint width) { struct two_ints *store; store = g_new(struct two_ints, 1); @@ -125,7 +125,7 @@ enqueue (ETableHeader *eth, int column, int width) } void -e_table_header_set_size (ETableHeader *eth, int idx, int size) +e_table_header_set_size (ETableHeader *eth, gint idx, gint size) { g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); @@ -134,7 +134,7 @@ e_table_header_set_size (ETableHeader *eth, int idx, int size) } static void -eth_do_remove (ETableHeader *eth, int idx, gboolean do_unref) +eth_do_remove (ETableHeader *eth, gint idx, gboolean do_unref) { if (do_unref) g_object_unref (eth->columns [idx]); @@ -148,8 +148,8 @@ static void eth_finalize (GObject *object) { ETableHeader *eth = E_TABLE_HEADER (object); - const int cols = eth->col_count; - int i; + const gint cols = eth->col_count; + gint i; if (eth->sort_info) { if (eth->sort_info_group_change_id) @@ -345,8 +345,8 @@ e_table_header_new (void) static void eth_update_offsets (ETableHeader *eth) { - int i; - int x = 0; + gint i; + gint x = 0; for (i = 0; i < eth->col_count; i++){ ETableCol *etc = eth->columns [i]; @@ -357,7 +357,7 @@ eth_update_offsets (ETableHeader *eth) } static void -eth_do_insert (ETableHeader *eth, int pos, ETableCol *val) +eth_do_insert (ETableHeader *eth, gint pos, ETableCol *val) { memmove (ð->columns [pos+1], ð->columns [pos], sizeof (ETableCol *) * (eth->col_count - pos)); @@ -380,7 +380,7 @@ eth_do_insert (ETableHeader *eth, int pos, ETableCol *val) * The ETableCol is assumed */ void -e_table_header_add_column (ETableHeader *eth, ETableCol *tc, int pos) +e_table_header_add_column (ETableHeader *eth, ETableCol *tc, gint pos) { g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); @@ -411,7 +411,7 @@ e_table_header_add_column (ETableHeader *eth, ETableCol *tc, int pos) * Returns: The ETableCol at @column in the @eth object */ ETableCol * -e_table_header_get_column (ETableHeader *eth, int column) +e_table_header_get_column (ETableHeader *eth, gint column) { g_return_val_if_fail (eth != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL); @@ -433,9 +433,9 @@ e_table_header_get_column (ETableHeader *eth, int column) * Returns: The ETableCol with col_idx = @col_idx in the @eth object */ ETableCol * -e_table_header_get_column_by_col_idx (ETableHeader *eth, int col_idx) +e_table_header_get_column_by_col_idx (ETableHeader *eth, gint col_idx) { - int i; + gint i; g_return_val_if_fail (eth != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL); @@ -454,7 +454,7 @@ e_table_header_get_column_by_col_idx (ETableHeader *eth, int col_idx) * * Returns: the number of columns in this ETableHeader. */ -int +gint e_table_header_count (ETableHeader *eth) { g_return_val_if_fail (eth != NULL, 0); @@ -475,8 +475,8 @@ e_table_header_count (ETableHeader *eth) * * Returns: the column in the model that the @col column * in the ETableHeader points to. */ -int -e_table_header_index (ETableHeader *eth, int col) +gint +e_table_header_index (ETableHeader *eth, gint col) { g_return_val_if_fail (eth != NULL, -1); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), -1); @@ -496,10 +496,10 @@ e_table_header_index (ETableHeader *eth, int col) * Returns: the column that contains pixel @x_offset, or -1 * if no column inside this ETableHeader contains that pixel. */ -int -e_table_header_get_index_at (ETableHeader *eth, int x_offset) +gint +e_table_header_get_index_at (ETableHeader *eth, gint x_offset) { - int i, total; + gint i, total; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); @@ -529,7 +529,7 @@ ETableCol ** e_table_header_get_columns (ETableHeader *eth) { ETableCol **ret; - int i; + gint i; g_return_val_if_fail (eth != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL); @@ -551,11 +551,11 @@ e_table_header_get_columns (ETableHeader *eth) * * Returns: The number of selected columns in the @eth object. */ -int +gint e_table_header_get_selected (ETableHeader *eth) { - int i; - int selected = 0; + gint i; + gint selected = 0; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); @@ -575,10 +575,10 @@ e_table_header_get_selected (ETableHeader *eth) * Returns: the number of pixels used by the @eth object * when rendered on screen */ -int +gint e_table_header_total_width (ETableHeader *eth) { - int total, i; + gint total, i; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); @@ -596,10 +596,10 @@ e_table_header_total_width (ETableHeader *eth) * * Returns: the minimum number of pixels required by the @eth object. **/ -int +gint e_table_header_min_width (ETableHeader *eth) { - int total, i; + gint total, i; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); @@ -622,7 +622,7 @@ e_table_header_min_width (ETableHeader *eth) * and "structure_change" will be emmited */ void -e_table_header_move (ETableHeader *eth, int source_index, int target_index) +e_table_header_move (ETableHeader *eth, gint source_index, gint target_index) { ETableCol *old; @@ -654,7 +654,7 @@ e_table_header_move (ETableHeader *eth, int source_index, int target_index) * This emmits the "structure_change" signal on the @eth object. */ void -e_table_header_remove (ETableHeader *eth, int idx) +e_table_header_remove (ETableHeader *eth, gint idx) { g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); @@ -677,16 +677,16 @@ e_table_header_set_selection (ETableHeader *eth, gboolean allow_selection) } static void -eth_set_size (ETableHeader *eth, int idx, int size) +eth_set_size (ETableHeader *eth, gint idx, gint size) { double expansion; double old_expansion; - int min_width; - int left_width; - int total_extra; - int expandable_count; - int usable_width; - int i; + gint min_width; + gint left_width; + gint total_extra; + gint expandable_count; + gint usable_width; + gint i; g_return_if_fail (eth != NULL); g_return_if_fail (E_IS_TABLE_HEADER (eth)); g_return_if_fail (idx >= 0); @@ -813,10 +813,10 @@ eth_set_size (ETableHeader *eth, int idx, int size) * Returns: the number of pixels between @start_col and @end_col on the * @eth ETableHeader object */ -int -e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col) +gint +e_table_header_col_diff (ETableHeader *eth, gint start_col, gint end_col) { - int total, col; + gint total, col; g_return_val_if_fail (eth != NULL, 0); g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0); @@ -838,13 +838,13 @@ e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col) static void eth_calc_widths (ETableHeader *eth) { - int i; - int extra; + gint i; + gint extra; double expansion; - int last_position = 0; + gint last_position = 0; double next_position = 0; - int last_resizable = -1; - int *widths; + gint last_resizable = -1; + gint *widths; gboolean changed; widths = g_new (int, eth->col_count); @@ -887,13 +887,13 @@ eth_calc_widths (ETableHeader *eth) void e_table_header_update_horizontal (ETableHeader *eth) { - int i; - int cols; + gint i; + gint cols; cols = eth->col_count; for (i = 0; i < cols; i++) { - int width = 0; + gint width = 0; g_signal_emit_by_name (G_OBJECT (eth), "request_width", @@ -905,13 +905,13 @@ e_table_header_update_horizontal (ETableHeader *eth) g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0); } -int +gint e_table_header_prioritized_column (ETableHeader *eth) { - int best_model_col = 0; - int best_priority; - int i; - int count; + gint best_model_col = 0; + gint best_priority; + gint i; + gint count; count = e_table_header_count (eth); if (count == 0) @@ -919,7 +919,7 @@ e_table_header_prioritized_column (ETableHeader *eth) best_priority = e_table_header_get_column (eth, 0)->priority; best_model_col = e_table_header_get_column (eth, 0)->col_idx; for (i = 1; i < count; i++) { - int priority = e_table_header_get_column (eth, i)->priority; + gint priority = e_table_header_get_column (eth, i)->priority; if (priority > best_priority) { best_priority = priority; best_model_col = e_table_header_get_column (eth, i)->col_idx; @@ -932,9 +932,9 @@ ETableCol * e_table_header_prioritized_column_selected (ETableHeader *eth, ETableColCheckFunc check_func, gpointer user_data) { ETableCol *best_col = NULL; - int best_priority = G_MININT; - int i; - int count; + gint best_priority = G_MININT; + gint i; + gint count; count = e_table_header_count (eth); if (count == 0) diff --git a/widgets/table/e-table-header.h b/widgets/table/e-table-header.h index 00b145ef87..d724c2710f 100644 --- a/widgets/table/e-table-header.h +++ b/widgets/table/e-table-header.h @@ -49,13 +49,13 @@ typedef gboolean (*ETableColCheckFunc) (ETableCol *col, gpointer user_data); struct _ETableHeader { GObject base; - int col_count; - int width; - int nominal_width; - int width_extras; + gint col_count; + gint width; + gint nominal_width; + gint width_extras; ETableSortInfo *sort_info; - int sort_info_group_change_id; + gint sort_info_group_change_id; ETableCol **columns; @@ -67,9 +67,9 @@ typedef struct { GObjectClass parent_class; void (*structure_change) (ETableHeader *eth); - void (*dimension_change) (ETableHeader *eth, int width); + void (*dimension_change) (ETableHeader *eth, gint width); void (*expansion_change) (ETableHeader *eth); - int (*request_width) (ETableHeader *eth, int col); + gint (*request_width) (ETableHeader *eth, gint col); } ETableHeaderClass; GType e_table_header_get_type (void); @@ -77,39 +77,39 @@ ETableHeader *e_table_header_new (void); void e_table_header_add_column (ETableHeader *eth, ETableCol *tc, - int pos); + gint pos); ETableCol *e_table_header_get_column (ETableHeader *eth, - int column); + gint column); ETableCol *e_table_header_get_column_by_col_idx (ETableHeader *eth, - int col_idx); -int e_table_header_count (ETableHeader *eth); -int e_table_header_index (ETableHeader *eth, - int col); -int e_table_header_get_index_at (ETableHeader *eth, - int x_offset); + gint col_idx); +gint e_table_header_count (ETableHeader *eth); +gint e_table_header_index (ETableHeader *eth, + gint col); +gint e_table_header_get_index_at (ETableHeader *eth, + gint x_offset); ETableCol **e_table_header_get_columns (ETableHeader *eth); -int e_table_header_get_selected (ETableHeader *eth); +gint e_table_header_get_selected (ETableHeader *eth); -int e_table_header_total_width (ETableHeader *eth); -int e_table_header_min_width (ETableHeader *eth); +gint e_table_header_total_width (ETableHeader *eth); +gint e_table_header_min_width (ETableHeader *eth); void e_table_header_move (ETableHeader *eth, - int source_index, - int target_index); + gint source_index, + gint target_index); void e_table_header_remove (ETableHeader *eth, - int idx); + gint idx); void e_table_header_set_size (ETableHeader *eth, - int idx, - int size); + gint idx, + gint size); void e_table_header_set_selection (ETableHeader *eth, gboolean allow_selection); -int e_table_header_col_diff (ETableHeader *eth, - int start_col, - int end_col); +gint e_table_header_col_diff (ETableHeader *eth, + gint start_col, + gint end_col); void e_table_header_calc_widths (ETableHeader *eth); GList *e_table_header_get_selected_indexes (ETableHeader *eth); void e_table_header_update_horizontal (ETableHeader *eth); -int e_table_header_prioritized_column (ETableHeader *eth); +gint e_table_header_prioritized_column (ETableHeader *eth); ETableCol *e_table_header_prioritized_column_selected (ETableHeader *eth, ETableColCheckFunc check_func, gpointer user_data); diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index ce2484cafb..987b9610b3 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -108,23 +108,23 @@ enum { #define TRIPLE_CLICK_TIME 500 -static int eti_get_height (ETableItem *eti); -static int eti_row_height (ETableItem *eti, int row); -static void e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state); -static void eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti); -static void eti_cursor_activated (ESelectionModel *selection, int row, int col, ETableItem *eti); +static gint eti_get_height (ETableItem *eti); +static gint eti_row_height (ETableItem *eti, gint row); +static void e_table_item_focus (ETableItem *eti, gint col, gint row, GdkModifierType state); +static void eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *eti); +static void eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem *eti); static void eti_selection_change (ESelectionModel *selection, ETableItem *eti); -static void eti_selection_row_change (ESelectionModel *selection, int row, ETableItem *eti); -static void e_table_item_redraw_row (ETableItem *eti, int row); +static void eti_selection_row_change (ESelectionModel *selection, gint row, ETableItem *eti); +static void e_table_item_redraw_row (ETableItem *eti, gint row); #define ETI_SINGLE_ROW_HEIGHT(eti) ((eti)->uniform_row_height_cache != -1 ? (eti)->uniform_row_height_cache : eti_row_height((eti), -1)) #define ETI_MULTIPLE_ROW_HEIGHT(eti,row) ((eti)->height_cache && (eti)->height_cache[(row)] != -1 ? (eti)->height_cache[(row)] : eti_row_height((eti),(row))) #define ETI_ROW_HEIGHT(eti,row) ((eti)->uniform_row_height ? ETI_SINGLE_ROW_HEIGHT ((eti)) : ETI_MULTIPLE_ROW_HEIGHT((eti),(row))) inline static gint -model_to_view_row(ETableItem *eti, int row) +model_to_view_row(ETableItem *eti, gint row) { - int i; + gint i; if (row == -1) return -1; if (eti->uses_source_model) { @@ -144,7 +144,7 @@ model_to_view_row(ETableItem *eti, int row) } inline static gint -view_to_model_row(ETableItem *eti, int row) +view_to_model_row(ETableItem *eti, gint row) { if (eti->uses_source_model) { ETableSubset *etss = E_TABLE_SUBSET(eti->table_model); @@ -158,9 +158,9 @@ view_to_model_row(ETableItem *eti, int row) } inline static gint -model_to_view_col(ETableItem *eti, int col) +model_to_view_col(ETableItem *eti, gint col) { - int i; + gint i; if (col == -1) return -1; for (i = 0; i < eti->cols; i++) { @@ -172,7 +172,7 @@ model_to_view_col(ETableItem *eti, int col) } inline static gint -view_to_model_col(ETableItem *eti, int col) +view_to_model_col(ETableItem *eti, gint col) { ETableCol *ecol = e_table_header_get_column (eti->header, col); return ecol ? ecol->col_idx : -1; @@ -243,7 +243,7 @@ eti_editing (ETableItem *eti) } inline static GdkColor * -eti_get_cell_background_color (ETableItem *eti, int row, int col, gboolean selected, gboolean *allocatedp) +eti_get_cell_background_color (ETableItem *eti, gint row, gint col, gboolean selected, gboolean *allocatedp) { ECellView *ecell_view = eti->cell_views [col]; GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(eti)->canvas); @@ -291,7 +291,7 @@ eti_get_cell_background_color (ETableItem *eti, int row, int col, gboolean selec } inline static GdkColor * -eti_get_cell_foreground_color (ETableItem *eti, int row, int col, gboolean selected, gboolean *allocated) +eti_get_cell_foreground_color (ETableItem *eti, gint row, gint col, gboolean selected, gboolean *allocated) { GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(eti)->canvas); GdkColor *foreground; @@ -336,7 +336,7 @@ eti_free_save_state (ETableItem *eti) static void eti_realize_cell_views ( ETableItem *eti) { - int i; + gint i; if (eti->cell_views_realized) return; @@ -352,7 +352,7 @@ eti_realize_cell_views ( ETableItem *eti) static void eti_attach_cell_views (ETableItem *eti) { - int i; + gint i; g_return_if_fail (eti->header); g_return_if_fail (eti->table_model); @@ -390,7 +390,7 @@ eti_attach_cell_views (ETableItem *eti) static void eti_unrealize_cell_views (ETableItem *eti) { - int i; + gint i; if (eti->cell_views_realized == 0) return; @@ -405,7 +405,7 @@ eti_unrealize_cell_views (ETableItem *eti) static void eti_detach_cell_views (ETableItem *eti) { - int i; + gint i; eti_free_save_state (eti); @@ -449,7 +449,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags) ETableItem *eti = E_TABLE_ITEM (item); if (eti->needs_compute_height) { - int new_height = eti_get_height (eti); + gint new_height = eti_get_height (eti); if (new_height != eti->height) { eti->height = new_height; @@ -460,7 +460,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags) eti->needs_compute_height = 0; } if (eti->needs_compute_width) { - int new_width = e_table_header_total_width(eti->header); + gint new_width = e_table_header_total_width(eti->header); if (new_width != eti->width) { eti->width = new_width; e_canvas_item_request_parent_reflow (GNOME_CANVAS_ITEM (eti)); @@ -475,7 +475,7 @@ eti_reflow (GnomeCanvasItem *item, gint flags) * GnomeCanvasItem::update method */ static void -eti_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +eti_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) { ArtPoint o1, o2; ETableItem *eti = E_TABLE_ITEM (item); @@ -610,11 +610,11 @@ eti_remove_header_model (ETableItem *eti) * used as a separator between rows */ static int -eti_row_height_real (ETableItem *eti, int row) +eti_row_height_real (ETableItem *eti, gint row) { - const int cols = e_table_header_count (eti->header); - int col; - int h, max_h; + const gint cols = e_table_header_count (eti->header); + gint col; + gint h, max_h; g_return_val_if_fail (cols == 0 || eti->cell_views, 0); @@ -632,7 +632,7 @@ eti_row_height_real (ETableItem *eti, int row) static void confirm_height_cache (ETableItem *eti) { - int i; + gint i; if (eti->uniform_row_height || eti->height_cache) return; @@ -645,8 +645,8 @@ confirm_height_cache (ETableItem *eti) static gboolean height_cache_idle(ETableItem *eti) { - int changed = 0; - int i; + gint changed = 0; + gint i; confirm_height_cache(eti); for (i = eti->height_cache_idle_count; i < eti->rows; i++) { if (eti->height_cache[i] == -1) { @@ -699,7 +699,7 @@ calculate_height_cache (ETableItem *eti) * used as a separator between rows */ static int -eti_row_height (ETableItem *eti, int row) +eti_row_height (ETableItem *eti, gint row) { if (eti->uniform_row_height) { eti->uniform_row_height_cache = eti_row_height_real (eti, -1); @@ -737,21 +737,21 @@ eti_row_height (ETableItem *eti, int row) static int eti_get_height (ETableItem *eti) { - const int rows = eti->rows; - int height_extra = eti->horizontal_draw_grid ? 1 : 0; + const gint rows = eti->rows; + gint height_extra = eti->horizontal_draw_grid ? 1 : 0; if (rows == 0) return 0; if (eti->uniform_row_height) { - int row_height = eti_row_height(eti, -1); + gint row_height = eti_row_height(eti, -1); return ((row_height + height_extra) * rows + height_extra); } else { - int height; - int row; + gint height; + gint row; if (eti->length_threshold != -1){ if (rows > eti->length_threshold){ - int row_height = eti_row_height(eti, 0); + gint row_height = eti_row_height(eti, 0); if (eti->height_cache) { height = 0; for (row = 0; row < rows; row++) { @@ -781,7 +781,7 @@ eti_get_height (ETableItem *eti) } static void -eti_item_region_redraw (ETableItem *eti, int x0, int y0, int x1, int y1) +eti_item_region_redraw (ETableItem *eti, gint x0, gint y0, gint x1, gint y1) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti); ArtDRect rect; @@ -801,10 +801,10 @@ eti_item_region_redraw (ETableItem *eti, int x0, int y0, int x1, int y1) /* * Computes the distance between @start_row and @end_row in pixels */ -int -e_table_item_row_diff (ETableItem *eti, int start_row, int end_row) +gint +e_table_item_row_diff (ETableItem *eti, gint start_row, gint end_row) { - int height_extra = eti->horizontal_draw_grid ? 1 : 0; + gint height_extra = eti->horizontal_draw_grid ? 1 : 0; if (start_row < 0) start_row = 0; @@ -814,7 +814,7 @@ e_table_item_row_diff (ETableItem *eti, int start_row, int end_row) if (eti->uniform_row_height) { return ((end_row - start_row) * (eti_row_height(eti, -1) + height_extra)); } else { - int row, total; + gint row, total; total = 0; for (row = start_row; row < end_row; row++) total += eti_row_height (eti, row) + height_extra; @@ -825,12 +825,12 @@ e_table_item_row_diff (ETableItem *eti, int start_row, int end_row) static void eti_get_region (ETableItem *eti, - int start_col, int start_row, - int end_col, int end_row, - int *x1p, int *y1p, - int *x2p, int *y2p) + gint start_col, gint start_row, + gint end_col, gint end_row, + gint *x1p, gint *y1p, + gint *x2p, gint *y2p) { - int x1, y1, x2, y2; + gint x1, y1, x2, y2; x1 = e_table_header_col_diff (eti->header, 0, start_col); y1 = e_table_item_row_diff (eti, 0, start_row); @@ -858,10 +858,10 @@ eti_get_region (ETableItem *eti, */ static void eti_request_region_redraw (ETableItem *eti, - int start_col, int start_row, - int end_col, int end_row, int border) + gint start_col, gint start_row, + gint end_col, gint end_row, gint border) { - int x1, y1, x2, y2; + gint x1, y1, x2, y2; if (eti->rows > 0) { @@ -885,10 +885,10 @@ eti_request_region_redraw (ETableItem *eti, */ static void eti_request_region_show (ETableItem *eti, - int start_col, int start_row, - int end_col, int end_row, int delay) + gint start_col, gint start_row, + gint end_col, gint end_row, gint delay) { - int x1, y1, x2, y2; + gint x1, y1, x2, y2; eti_get_region (eti, start_col, start_row, @@ -902,9 +902,9 @@ eti_request_region_show (ETableItem *eti, } static void -eti_show_cursor (ETableItem *eti, int delay) +eti_show_cursor (ETableItem *eti, gint delay) { - int cursor_row; + gint cursor_row; if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized)) return; @@ -953,8 +953,8 @@ eti_check_cursor_on_screen (ETableItem *eti) static void eti_check_cursor_bounds (ETableItem *eti) { - int x1, y1, x2, y2; - int cursor_row; + gint x1, y1, x2, y2; + gint cursor_row; if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized)) return; @@ -1002,7 +1002,7 @@ eti_check_cursor_bounds (ETableItem *eti) } static void -eti_maybe_show_cursor(ETableItem *eti, int delay) +eti_maybe_show_cursor(ETableItem *eti, gint delay) { d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE")); if (eti->cursor_on_screen) @@ -1122,7 +1122,7 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti) } static void -eti_table_model_row_changed (ETableModel *table_model, int row, ETableItem *eti) +eti_table_model_row_changed (ETableModel *table_model, gint row, ETableItem *eti) { if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) { eti_unfreeze (eti); @@ -1140,7 +1140,7 @@ eti_table_model_row_changed (ETableModel *table_model, int row, ETableItem *eti) } static void -eti_table_model_cell_changed (ETableModel *table_model, int col, int row, ETableItem *eti) +eti_table_model_cell_changed (ETableModel *table_model, gint col, gint row, ETableItem *eti) { if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) { eti_unfreeze (eti); @@ -1158,7 +1158,7 @@ eti_table_model_cell_changed (ETableModel *table_model, int col, int row, ETable } static void -eti_table_model_rows_inserted (ETableModel *table_model, int row, int count, ETableItem *eti) +eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, ETableItem *eti) { if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) { eti_unfreeze (eti); @@ -1167,7 +1167,7 @@ eti_table_model_rows_inserted (ETableModel *table_model, int row, int count, ETa eti->rows = e_table_model_row_count (eti->table_model); if (eti->height_cache) { - int i; + gint i; eti->height_cache = g_renew(int, eti->height_cache, eti->rows); memmove(eti->height_cache + row + count, eti->height_cache + row, (eti->rows - count - row) * sizeof(int)); for (i = row; i < row + count; i++) @@ -1185,7 +1185,7 @@ eti_table_model_rows_inserted (ETableModel *table_model, int row, int count, ETa } static void -eti_table_model_rows_deleted (ETableModel *table_model, int row, int count, ETableItem *eti) +eti_table_model_rows_deleted (ETableModel *table_model, gint row, gint count, ETableItem *eti) { if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) { eti_unfreeze (eti); @@ -1221,11 +1221,11 @@ eti_table_model_rows_deleted (ETableModel *table_model, int row, int count, ETab */ void e_table_item_redraw_range (ETableItem *eti, - int start_col, int start_row, - int end_col, int end_row) + gint start_col, gint start_row, + gint end_col, gint end_row) { - int border; - int cursor_col, cursor_row; + gint border; + gint cursor_col, cursor_row; g_return_if_fail (eti != NULL); g_return_if_fail (E_IS_TABLE_ITEM (eti)); @@ -1248,7 +1248,7 @@ e_table_item_redraw_range (ETableItem *eti, static void e_table_item_redraw_row (ETableItem *eti, - int row) + gint row) { if (row != -1) e_table_item_redraw_range (eti, 0, row, eti->cols - 1, row); @@ -1337,7 +1337,7 @@ eti_add_selection_model (ETableItem *eti, ESelectionModel *selection) } static void -eti_header_dim_changed (ETableHeader *eth, int col, ETableItem *eti) +eti_header_dim_changed (ETableHeader *eth, gint col, ETableItem *eti) { eti->needs_compute_width = 1; e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti)); @@ -1373,9 +1373,9 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti) } static int -eti_request_column_width (ETableHeader *eth, int col, ETableItem *eti) +eti_request_column_width (ETableHeader *eth, gint col, ETableItem *eti) { - int width = 0; + gint width = 0; if (eti->cell_views && eti->cell_views_realized) { width = e_cell_max_width (eti->cell_views[col], view_to_model_col(eti, col), col); @@ -1462,7 +1462,7 @@ static void eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { ETableItem *eti; - int cursor_col; + gint cursor_col; eti = E_TABLE_ITEM (object); @@ -1546,7 +1546,7 @@ static void eti_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { ETableItem *eti; - int row; + gint row; eti = E_TABLE_ITEM (object); @@ -1653,7 +1653,7 @@ eti_init (ETableItem *eti) #define gray50_width 2 #define gray50_height 2 -static const char gray50_bits[] = { +static const gchar gray50_bits[] = { 0x02, 0x01, }; static void @@ -1729,7 +1729,7 @@ eti_realize (GnomeCanvasItem *item) free_height_cache(eti); if (item->canvas->focused_item == NULL && eti->selection) { - int row; + gint row; row = e_selection_model_cursor_row (E_SELECTION_MODEL (eti->selection)); row = model_to_view_row(eti, row); @@ -1815,21 +1815,21 @@ eti_unrealize (GnomeCanvasItem *item) static void -eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) +eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height) { ETableItem *eti = E_TABLE_ITEM (item); - const int rows = eti->rows; - const int cols = eti->cols; - int row, col; - int first_col, last_col, x_offset; - int first_row, last_row, y_offset, yd; - int x1, x2; - int f_x1, f_x2, f_y1, f_y2; + const gint rows = eti->rows; + const gint cols = eti->cols; + gint row, col; + gint first_col, last_col, x_offset; + gint first_row, last_row, y_offset, yd; + gint x1, x2; + gint f_x1, f_x2, f_y1, f_y2; gboolean f_found; double i2c [6]; ArtPoint eti_base, eti_base_item, lower_right; GtkWidget *canvas = GTK_WIDGET(item->canvas); - int height_extra = eti->horizontal_draw_grid ? 1 : 0; + gint height_extra = eti->horizontal_draw_grid ? 1 : 0; cairo_t *cr; cr = gdk_cairo_create (drawable); @@ -1888,7 +1888,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, if (last_row > eti->rows) last_row = eti->rows; } else { - int y1, y2; + gint y1, y2; y_offset = 0; first_row = -1; @@ -1934,7 +1934,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, yd += height_extra; for (row = first_row; row < last_row; row++){ - int xd; + gint xd; gboolean selected; gint cursor_col, cursor_row; @@ -1957,7 +1957,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, ECellFlags flags; gboolean free_background; GdkColor *background; - int x1, x2, y1, y2; + gint x1, x2, y1, y2; cairo_pattern_t *pat; switch (eti->cursor_mode) { @@ -2082,7 +2082,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, } if (eti->vertical_draw_grid){ - int xd = x_offset; + gint xd = x_offset; for (col = first_col; col <= last_col; col++){ ETableCol *ecol = e_table_header_get_column (eti->header, col); @@ -2113,7 +2113,7 @@ exit: } static double -eti_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, +eti_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; @@ -2122,14 +2122,14 @@ eti_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, } static gboolean -find_cell (ETableItem *eti, double x, double y, int *view_col_res, int *view_row_res, double *x1_res, double *y1_res) +find_cell (ETableItem *eti, double x, double y, gint *view_col_res, gint *view_row_res, double *x1_res, double *y1_res) { - const int cols = eti->cols; - const int rows = eti->rows; + const gint cols = eti->cols; + const gint rows = eti->rows; gdouble x1, y1, x2, y2; - int col, row; + gint col, row; - int height_extra = eti->horizontal_draw_grid ? 1 : 0; + gint height_extra = eti->horizontal_draw_grid ? 1 : 0; /* FIXME: this routine is inneficient, fix later */ @@ -2200,7 +2200,7 @@ eti_cursor_move (ETableItem *eti, gint row, gint column) static void eti_cursor_move_left (ETableItem *eti) { - int cursor_col, cursor_row; + gint cursor_col, cursor_row; g_object_get(eti->selection, "cursor_col", &cursor_col, "cursor_row", &cursor_row, @@ -2212,7 +2212,7 @@ eti_cursor_move_left (ETableItem *eti) static void eti_cursor_move_right (ETableItem *eti) { - int cursor_col, cursor_row; + gint cursor_col, cursor_row; g_object_get(eti->selection, "cursor_col", &cursor_col, "cursor_row", &cursor_row, @@ -2229,7 +2229,7 @@ _do_tooltip (ETableItem *eti) gboolean free_color; ETableCol *ecol; gboolean selected; - int cursor_row, cursor_col; + gint cursor_row, cursor_col; e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(eti)->canvas)); @@ -2287,7 +2287,7 @@ _do_tooltip (ETableItem *eti) #endif static gint -eti_e_cell_event (ETableItem *item, ECellView *ecell_view, GdkEvent *event, int time, int model_col, int view_col, int row, ECellFlags flags) +eti_e_cell_event (ETableItem *item, ECellView *ecell_view, GdkEvent *event, gint time, gint model_col, gint view_col, gint row, ECellFlags flags) { ECellActions actions = 0; gint ret_val; @@ -2330,7 +2330,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) double x1, y1; double realx, realy; GdkEventButton button; - int col, row; + gint col, row; gint cursor_row, cursor_col; gint new_cursor_row, new_cursor_col; ECellFlags flags = 0; @@ -2457,7 +2457,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) case GDK_BUTTON_RELEASE: { double x1, y1; - int col, row; + gint col, row; gint cursor_row, cursor_col; d(g_print("%s: GDK_BUTTON_RELEASE received, button %d\n", __FUNCTION__, e->button.button)); @@ -2540,7 +2540,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) } case GDK_2BUTTON_PRESS: { - int model_col, model_row; + gint model_col, model_row; #if 0 double x1, y1; #endif @@ -2596,7 +2596,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) break; } case GDK_MOTION_NOTIFY: { - int col, row, flags; + gint col, row, flags; double x1, y1; gint cursor_col, cursor_row; @@ -2956,8 +2956,8 @@ eti_style_set (ETableItem *eti, GtkStyle *previous_style) return; if (eti->cell_views_realized) { - int i; - int n_cells = eti->n_cells; + gint i; + gint n_cells = eti->n_cells; for (i = 0; i < n_cells; i++) { e_cell_style_set (eti->cell_views[i], previous_style); @@ -3209,13 +3209,13 @@ eti_class_init (ETableItemClass *klass) * This routine sets the cursor of the %ETableItem canvas item. */ void -e_table_item_set_cursor (ETableItem *eti, int col, int row) +e_table_item_set_cursor (ETableItem *eti, gint col, gint row) { e_table_item_focus(eti, col, view_to_model_row(eti, row), 0); } static void -e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state) +e_table_item_focus (ETableItem *eti, gint col, gint row, GdkModifierType state) { g_return_if_fail (eti != NULL); g_return_if_fail (E_IS_TABLE_ITEM (eti)); @@ -3246,7 +3246,7 @@ e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state) gint e_table_item_get_focused_column (ETableItem *eti) { - int cursor_col; + gint cursor_col; g_return_val_if_fail (eti != NULL, -1); g_return_val_if_fail (E_IS_TABLE_ITEM (eti), -1); @@ -3259,9 +3259,9 @@ e_table_item_get_focused_column (ETableItem *eti) } static void -eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti) +eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *eti) { - int view_row; + gint view_row; if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) return; @@ -3297,10 +3297,10 @@ eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti } static void -eti_cursor_activated (ESelectionModel *selection, int row, int col, ETableItem *eti) +eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem *eti) { - int view_row; - int view_col; + gint view_row; + gint view_col; if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) return; @@ -3338,7 +3338,7 @@ eti_selection_change (ESelectionModel *selection, ETableItem *eti) } static void -eti_selection_row_change (ESelectionModel *selection, int row, ETableItem *eti) +eti_selection_row_change (ESelectionModel *selection, gint row, ETableItem *eti) { if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) return; @@ -3359,7 +3359,7 @@ eti_selection_row_change (ESelectionModel *selection, int row, ETableItem *eti) * column and row. */ void -e_table_item_enter_edit (ETableItem *eti, int col, int row) +e_table_item_enter_edit (ETableItem *eti, gint col, gint row) { g_return_if_fail (eti != NULL); g_return_if_fail (E_IS_TABLE_ITEM (eti)); @@ -3384,8 +3384,8 @@ e_table_item_enter_edit (ETableItem *eti, int col, int row) void e_table_item_leave_edit (ETableItem *eti) { - int col, row; - void *edit_ctx; + gint col, row; + gpointer edit_ctx; g_return_if_fail (eti != NULL); g_return_if_fail (E_IS_TABLE_ITEM (eti)); @@ -3424,14 +3424,14 @@ e_table_item_leave_edit (ETableItem *eti) */ void e_table_item_compute_location (ETableItem *eti, - int *x, - int *y, - int *row, - int *col) + gint *x, + gint *y, + gint *row, + gint *col) { /* Save the grabbed row but make sure that we don't get flawed results because the cursor is grabbed. */ - int grabbed_row = eti->grabbed_row; + gint grabbed_row = eti->grabbed_row; eti->grabbed_row = -1; if (!find_cell (eti, *x, *y, col, row, NULL, NULL)) { @@ -3448,15 +3448,15 @@ e_table_item_compute_location (ETableItem *eti, **/ void e_table_item_compute_mouse_over (ETableItem *eti, - int x, - int y, - int *row, - int *col) + gint x, + gint y, + gint *row, + gint *col) { double realx, realy; /* Save the grabbed row but make sure that we don't get flawed results because the cursor is grabbed. */ - int grabbed_row = eti->grabbed_row; + gint grabbed_row = eti->grabbed_row; eti->grabbed_row = -1; realx = x; @@ -3474,12 +3474,12 @@ e_table_item_compute_mouse_over (ETableItem *eti, void e_table_item_get_cell_geometry (ETableItem *eti, - int *row, - int *col, - int *x, - int *y, - int *width, - int *height) + gint *row, + gint *col, + gint *x, + gint *y, + gint *width, + gint *height) { if (eti->rows > *row) { if (x) @@ -3499,16 +3499,16 @@ e_table_item_get_cell_geometry (ETableItem *eti, typedef struct { ETableItem *item; - int rows_printed; + gint rows_printed; } ETableItemPrintContext; static gdouble * e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width) { - int i; + gint i; double extra; double expansion; - int last_resizable = -1; + gint last_resizable = -1; gdouble scale = 1.0L; gdouble *widths = g_new(gdouble, e_table_header_count(eth)); /* - 1 to account for the last pixel border. */ @@ -3531,8 +3531,8 @@ e_table_item_calculate_print_widths (ETableHeader *eth, gdouble width) static gdouble eti_printed_row_height (ETableItem *eti, gdouble *widths, GtkPrintContext *context, gint row) { - int col; - int cols = eti->cols; + gint col; + gint cols = eti->cols; gdouble height = 0; for (col = 0; col < cols; col++) { ECellView *ecell_view = eti->cell_views [col]; @@ -3568,11 +3568,11 @@ e_table_item_print_page (EPrintable *ep, ETableItemPrintContext *itemcontext) { ETableItem *eti = itemcontext->item; - const int rows = eti->rows; - const int cols = eti->cols; + const gint rows = eti->rows; + const gint cols = eti->cols; gdouble max_height; - int rows_printed = itemcontext->rows_printed; - int row, col, next_page = 0; + gint rows_printed = itemcontext->rows_printed; + gint row, col, next_page = 0; double yd = height; cairo_t *cr; gdouble *widths; @@ -3655,7 +3655,7 @@ e_table_item_data_left (EPrintable *ep, ETableItemPrintContext *itemcontext) { ETableItem *item = itemcontext->item; - int rows_printed = itemcontext->rows_printed; + gint rows_printed = itemcontext->rows_printed; g_signal_stop_emission_by_name(ep, "data_left"); return rows_printed < item->rows; @@ -3677,10 +3677,10 @@ e_table_item_height (EPrintable *ep, ETableItemPrintContext *itemcontext) { ETableItem *item = itemcontext->item; - const int rows = item->rows; - int rows_printed = itemcontext->rows_printed; + const gint rows = item->rows; + gint rows_printed = itemcontext->rows_printed; gdouble *widths; - int row; + gint row; gdouble yd = 0; widths = e_table_item_calculate_print_widths (itemcontext->item->header, width); @@ -3727,10 +3727,10 @@ e_table_item_will_fit (EPrintable *ep, ETableItemPrintContext *itemcontext) { ETableItem *item = itemcontext->item; - const int rows = item->rows; - int rows_printed = itemcontext->rows_printed; + const gint rows = item->rows; + gint rows_printed = itemcontext->rows_printed; gdouble *widths; - int row; + gint row; gdouble yd = 0; gboolean ret_val = TRUE; diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h index befadb77ca..0536367c99 100644 --- a/widgets/table/e-table-item.h +++ b/widgets/table/e-table-item.h @@ -49,41 +49,41 @@ typedef struct { ETableModel *source_model; ESelectionModel *selection; - int x1, y1; - int minimum_width, width, height; + gint x1, y1; + gint minimum_width, width, height; - int cols, rows; + gint cols, rows; - int click_count; + gint click_count; /* * Ids for the signals we connect to */ - int header_dim_change_id; - int header_structure_change_id; - int header_request_width_id; - int table_model_pre_change_id; - int table_model_no_change_id; - int table_model_change_id; - int table_model_row_change_id; - int table_model_cell_change_id; - int table_model_rows_inserted_id; - int table_model_rows_deleted_id; - - int selection_change_id; - int selection_row_change_id; - int cursor_change_id; - int cursor_activated_id; + gint header_dim_change_id; + gint header_structure_change_id; + gint header_request_width_id; + gint table_model_pre_change_id; + gint table_model_no_change_id; + gint table_model_change_id; + gint table_model_row_change_id; + gint table_model_cell_change_id; + gint table_model_rows_inserted_id; + gint table_model_rows_deleted_id; + + gint selection_change_id; + gint selection_row_change_id; + gint cursor_change_id; + gint cursor_activated_id; guint cursor_idle_id; /* View row, -1 means unknown */ - int old_cursor_row; + gint old_cursor_row; - int hadjustment_change_id; - int hadjustment_value_change_id; - int vadjustment_change_id; - int vadjustment_value_change_id; + gint hadjustment_change_id; + gint hadjustment_value_change_id; + gint vadjustment_change_id; + gint vadjustment_value_change_id; GdkGC *fill_gc; GdkGC *grid_gc; @@ -117,52 +117,52 @@ typedef struct { guint queue_show_cursor : 1; guint grab_cancelled : 1; - int frozen_count; + gint frozen_count; - int cursor_x1; - int cursor_y1; - int cursor_x2; - int cursor_y2; + gint cursor_x1; + gint cursor_y1; + gint cursor_x2; + gint cursor_y2; - int drag_col; - int drag_row; - int drag_x; - int drag_y; + gint drag_col; + gint drag_row; + gint drag_x; + gint drag_y; guint drag_state; /* * Realized views, per column */ ECellView **cell_views; - int n_cells; + gint n_cells; - int *height_cache; - int uniform_row_height_cache; - int height_cache_idle_id; - int height_cache_idle_count; + gint *height_cache; + gint uniform_row_height_cache; + gint height_cache_idle_id; + gint height_cache_idle_count; /* * Lengh Threshold: above this, we stop computing correctly * the size */ - int length_threshold; + gint length_threshold; gint row_guess; ECursorMode cursor_mode; - int motion_col, motion_row; + gint motion_col, motion_row; /* * During editing */ - int editing_col, editing_row; + gint editing_col, editing_row; void *edit_ctx; - int save_col, save_row; + gint save_col, save_row; void *save_state; - int grabbed_col, grabbed_row; - int grabbed_count; + gint grabbed_col, grabbed_row; + gint grabbed_count; /* * Tooltip @@ -174,13 +174,13 @@ typedef struct { typedef struct { GnomeCanvasItemClass parent_class; - void (*cursor_change) (ETableItem *eti, int row); - void (*cursor_activated) (ETableItem *eti, int row); - void (*double_click) (ETableItem *eti, int row, int col, GdkEvent *event); - gint (*right_click) (ETableItem *eti, int row, int col, GdkEvent *event); - gint (*click) (ETableItem *eti, int row, int col, GdkEvent *event); - gint (*key_press) (ETableItem *eti, int row, int col, GdkEvent *event); - gint (*start_drag) (ETableItem *eti, int row, int col, GdkEvent *event); + void (*cursor_change) (ETableItem *eti, gint row); + void (*cursor_activated) (ETableItem *eti, gint row); + void (*double_click) (ETableItem *eti, gint row, gint col, GdkEvent *event); + gint (*right_click) (ETableItem *eti, gint row, gint col, GdkEvent *event); + gint (*click) (ETableItem *eti, gint row, gint col, GdkEvent *event); + gint (*key_press) (ETableItem *eti, gint row, gint col, GdkEvent *event); + gint (*start_drag) (ETableItem *eti, gint row, gint col, GdkEvent *event); void (*style_set) (ETableItem *eti, GtkStyle *previous_style); void (*selection_model_removed) (ETableItem *eti, ESelectionModel *selection); void (*selection_model_added) (ETableItem *eti, ESelectionModel *selection); @@ -192,40 +192,40 @@ GType e_table_item_get_type (void); * Focus */ void e_table_item_set_cursor (ETableItem *eti, - int col, - int row); + gint col, + gint row); gint e_table_item_get_focused_column (ETableItem *eti); void e_table_item_leave_edit (ETableItem *eti); void e_table_item_enter_edit (ETableItem *eti, - int col, - int row); + gint col, + gint row); void e_table_item_redraw_range (ETableItem *eti, - int start_col, - int start_row, - int end_col, - int end_row); + gint start_col, + gint start_row, + gint end_col, + gint end_row); EPrintable *e_table_item_get_printable (ETableItem *eti); void e_table_item_compute_location (ETableItem *eti, - int *x, - int *y, - int *row, - int *col); + gint *x, + gint *y, + gint *row, + gint *col); void e_table_item_compute_mouse_over (ETableItem *eti, - int x, - int y, - int *row, - int *col); + gint x, + gint y, + gint *row, + gint *col); void e_table_item_get_cell_geometry (ETableItem *eti, - int *row, - int *col, - int *x, - int *y, - int *width, - int *height); + gint *row, + gint *col, + gint *x, + gint *y, + gint *width, + gint *height); int e_table_item_row_diff (ETableItem *eti, int start_row, diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c index b1833aa2e1..c06303ca4b 100644 --- a/widgets/table/e-table-memory-callbacks.c +++ b/widgets/table/e-table-memory-callbacks.c @@ -40,8 +40,8 @@ etmc_column_count (ETableModel *etm) return 0; } -static void * -etmc_value_at (ETableModel *etm, int col, int row) +static gpointer +etmc_value_at (ETableModel *etm, gint col, gint row) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -52,7 +52,7 @@ etmc_value_at (ETableModel *etm, int col, int row) } static void -etmc_set_value_at (ETableModel *etm, int col, int row, const void *val) +etmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -61,7 +61,7 @@ etmc_set_value_at (ETableModel *etm, int col, int row, const void *val) } static gboolean -etmc_is_cell_editable (ETableModel *etm, int col, int row) +etmc_is_cell_editable (ETableModel *etm, gint col, gint row) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -72,19 +72,19 @@ etmc_is_cell_editable (ETableModel *etm, int col, int row) } /* The default for etmc_duplicate_value is to return the raw value. */ -static void * -etmc_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +etmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); if (etmc->duplicate_value) return etmc->duplicate_value (etm, col, value, etmc->data); else - return (void *)value; + return (gpointer)value; } static void -etmc_free_value (ETableModel *etm, int col, void *value) +etmc_free_value (ETableModel *etm, gint col, gpointer value) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -92,8 +92,8 @@ etmc_free_value (ETableModel *etm, int col, void *value) etmc->free_value (etm, col, value, etmc->data); } -static void * -etmc_initialize_value (ETableModel *etm, int col) +static gpointer +etmc_initialize_value (ETableModel *etm, gint col) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -104,7 +104,7 @@ etmc_initialize_value (ETableModel *etm, int col) } static gboolean -etmc_value_is_empty (ETableModel *etm, int col, const void *value) +etmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -114,8 +114,8 @@ etmc_value_is_empty (ETableModel *etm, int col, const void *value) return FALSE; } -static char * -etmc_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +etmc_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -126,7 +126,7 @@ etmc_value_to_string (ETableModel *etm, int col, const void *value) } static void -etmc_append_row (ETableModel *etm, ETableModel *source, int row) +etmc_append_row (ETableModel *etm, ETableModel *source, gint row) { ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm); @@ -194,7 +194,7 @@ e_table_memory_callbacks_new (ETableMemoryCalbacksColumnCountFn col_count, ETableMemoryCalbacksInitializeValueFn initialize_value, ETableMemoryCalbacksValueIsEmptyFn value_is_empty, ETableMemoryCalbacksValueToStringFn value_to_string, - void *data) + gpointer data) { ETableMemoryCalbacks *et; diff --git a/widgets/table/e-table-memory-callbacks.h b/widgets/table/e-table-memory-callbacks.h index bfeacb284c..97e2e53421 100644 --- a/widgets/table/e-table-memory-callbacks.h +++ b/widgets/table/e-table-memory-callbacks.h @@ -34,18 +34,18 @@ G_BEGIN_DECLS #define E_IS_TABLE_MEMORY_CALLBACKS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_MEMORY_CALLBACKS_TYPE)) #define E_TABLE_MEMORY_CALLBACKS_GET_CLASS(k) (G_TYPE_INSTANCE_GET_CLASS((k), E_TABLE_MEMORY_CALLBACKS_TYPE, ETableMemoryCalbacksClass)) -typedef int (*ETableMemoryCalbacksColumnCountFn) (ETableModel *etm, void *data); -typedef void (*ETableMemoryCalbacksAppendRowFn) (ETableModel *etm, ETableModel *model, int row, void *data); +typedef gint (*ETableMemoryCalbacksColumnCountFn) (ETableModel *etm, gpointer data); +typedef void (*ETableMemoryCalbacksAppendRowFn) (ETableModel *etm, ETableModel *model, gint row, gpointer data); -typedef void *(*ETableMemoryCalbacksValueAtFn) (ETableModel *etm, int col, int row, void *data); -typedef void (*ETableMemoryCalbacksSetValueAtFn) (ETableModel *etm, int col, int row, const void *val, void *data); -typedef gboolean (*ETableMemoryCalbacksIsCellEditableFn) (ETableModel *etm, int col, int row, void *data); +typedef void *(*ETableMemoryCalbacksValueAtFn) (ETableModel *etm, gint col, gint row, gpointer data); +typedef void (*ETableMemoryCalbacksSetValueAtFn) (ETableModel *etm, gint col, gint row, gconstpointer val, gpointer data); +typedef gboolean (*ETableMemoryCalbacksIsCellEditableFn) (ETableModel *etm, gint col, gint row, gpointer data); -typedef void *(*ETableMemoryCalbacksDuplicateValueFn) (ETableModel *etm, int col, const void *val, void *data); -typedef void (*ETableMemoryCalbacksFreeValueFn) (ETableModel *etm, int col, void *val, void *data); -typedef void *(*ETableMemoryCalbacksInitializeValueFn) (ETableModel *etm, int col, void *data); -typedef gboolean (*ETableMemoryCalbacksValueIsEmptyFn) (ETableModel *etm, int col, const void *val, void *data); -typedef char *(*ETableMemoryCalbacksValueToStringFn) (ETableModel *etm, int col, const void *val, void *data); +typedef void *(*ETableMemoryCalbacksDuplicateValueFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data); +typedef void (*ETableMemoryCalbacksFreeValueFn) (ETableModel *etm, gint col, gpointer val, gpointer data); +typedef void *(*ETableMemoryCalbacksInitializeValueFn) (ETableModel *etm, gint col, gpointer data); +typedef gboolean (*ETableMemoryCalbacksValueIsEmptyFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data); +typedef gchar *(*ETableMemoryCalbacksValueToStringFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data); typedef struct { ETableMemory parent; @@ -62,7 +62,7 @@ typedef struct { ETableMemoryCalbacksInitializeValueFn initialize_value; ETableMemoryCalbacksValueIsEmptyFn value_is_empty; ETableMemoryCalbacksValueToStringFn value_to_string; - void *data; + gpointer data; } ETableMemoryCalbacks; typedef struct { @@ -82,7 +82,7 @@ ETableModel *e_table_memory_callbacks_new (ETableMemoryCalbacksColumnCountFn col ETableMemoryCalbacksInitializeValueFn initialize_value, ETableMemoryCalbacksValueIsEmptyFn value_is_empty, ETableMemoryCalbacksValueToStringFn value_to_string, - void *data); + gpointer data); G_END_DECLS diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c index 284823bc3d..622de851c0 100644 --- a/widgets/table/e-table-memory-store.c +++ b/widgets/table/e-table-memory-store.c @@ -31,27 +31,27 @@ #define STORE_LOCATOR(etms, col, row) (*((etms)->priv->store + (row) * (etms)->priv->col_count + (col))) struct _ETableMemoryStorePrivate { - int col_count; + gint col_count; ETableMemoryStoreColumnInfo *columns; - void **store; + gpointer *store; }; G_DEFINE_TYPE (ETableMemoryStore, e_table_memory_store, E_TABLE_MEMORY_TYPE) -static void * -duplicate_value (ETableMemoryStore *etms, int col, const void *val) +static gpointer +duplicate_value (ETableMemoryStore *etms, gint col, gconstpointer val) { switch (etms->priv->columns[col].type) { case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING: return g_strdup (val); case E_TABLE_MEMORY_STORE_COLUMN_TYPE_PIXBUF: if (val) - g_object_ref ((void *) val); - return (void *) val; + g_object_ref ((gpointer) val); + return (gpointer) val; case E_TABLE_MEMORY_STORE_COLUMN_TYPE_OBJECT: if (val) - g_object_ref ((void *) val); - return (void *) val; + g_object_ref ((gpointer) val); + return (gpointer) val; case E_TABLE_MEMORY_STORE_COLUMN_TYPE_CUSTOM: if (etms->priv->columns[col].custom.duplicate_value) return etms->priv->columns[col].custom.duplicate_value (E_TABLE_MODEL (etms), col, val, NULL); @@ -59,11 +59,11 @@ duplicate_value (ETableMemoryStore *etms, int col, const void *val) default: break; } - return (void *) val; + return (gpointer) val; } static void -free_value (ETableMemoryStore *etms, int col, void *value) +free_value (ETableMemoryStore *etms, gint col, gpointer value) { switch (etms->priv->columns[col].type) { case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING: @@ -95,8 +95,8 @@ etms_column_count (ETableModel *etm) return etms->priv->col_count; } -static void * -etms_value_at (ETableModel *etm, int col, int row) +static gpointer +etms_value_at (ETableModel *etm, gint col, gint row) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); @@ -104,7 +104,7 @@ etms_value_at (ETableModel *etm, int col, int row) } static void -etms_set_value_at (ETableModel *etm, int col, int row, const void *val) +etms_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); @@ -116,7 +116,7 @@ etms_set_value_at (ETableModel *etm, int col, int row, const void *val) } static gboolean -etms_is_cell_editable (ETableModel *etm, int col, int row) +etms_is_cell_editable (ETableModel *etm, gint col, gint row) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); @@ -124,8 +124,8 @@ etms_is_cell_editable (ETableModel *etm, int col, int row) } /* The default for etms_duplicate_value is to return the raw value. */ -static void * -etms_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +etms_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); @@ -133,15 +133,15 @@ etms_duplicate_value (ETableModel *etm, int col, const void *value) } static void -etms_free_value (ETableModel *etm, int col, void *value) +etms_free_value (ETableModel *etm, gint col, gpointer value) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); free_value (etms, col, value); } -static void * -etms_initialize_value (ETableModel *etm, int col) +static gpointer +etms_initialize_value (ETableModel *etm, gint col) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); @@ -162,13 +162,13 @@ etms_initialize_value (ETableModel *etm, int col) } static gboolean -etms_value_is_empty (ETableModel *etm, int col, const void *value) +etms_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); switch (etms->priv->columns[col].type) { case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING: - return !(value && *(char *) value); + return !(value && *(gchar *) value); case E_TABLE_MEMORY_STORE_COLUMN_TYPE_PIXBUF: return value == NULL; case E_TABLE_MEMORY_STORE_COLUMN_TYPE_CUSTOM: @@ -182,8 +182,8 @@ etms_value_is_empty (ETableModel *etm, int col, const void *value) return value == NULL; } -static char * -etms_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +etms_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); @@ -204,14 +204,14 @@ etms_value_to_string (ETableModel *etm, int col, const void *value) } static void -etms_append_row (ETableModel *etm, ETableModel *source, int row) +etms_append_row (ETableModel *etm, ETableModel *source, gint row) { ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm); - void **new_data; - int i; - int row_count; + gpointer *new_data; + gint i; + gint row_count; - new_data = g_new (void *, etms->priv->col_count); + new_data = g_new (gpointer , etms->priv->col_count); for (i = 0; i < etms->priv->col_count; i++) { new_data[i] = e_table_model_value_at (source, i, row); @@ -311,7 +311,7 @@ e_table_memory_store_new (ETableMemoryStoreColumnInfo *columns) ETableModel * e_table_memory_store_construct (ETableMemoryStore *etms, ETableMemoryStoreColumnInfo *columns) { - int i; + gint i; for (i = 0; columns[i].type != E_TABLE_MEMORY_STORE_COLUMN_TYPE_TERMINATOR; i++) /* Intentionally blank */; etms->priv->col_count = i; @@ -325,7 +325,7 @@ e_table_memory_store_construct (ETableMemoryStore *etms, ETableMemoryStoreColumn void -e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, int col, int row, void *value) +e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, gint col, gint row, gpointer value) { e_table_model_pre_change (E_TABLE_MODEL (etms)); @@ -336,18 +336,18 @@ e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, int col, int row, /* The size of these arrays is the number of columns. */ void -e_table_memory_store_insert_array (ETableMemoryStore *etms, int row, void **store, gpointer data) +e_table_memory_store_insert_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data) { - int row_count; - int i; + gint row_count; + gint i; row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) + 1; if (row == -1) row = row_count - 1; - etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *)); + etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer)); memmove (etms->priv->store + etms->priv->col_count * (row + 1), etms->priv->store + etms->priv->col_count * row, - etms->priv->col_count * (row_count - row - 1) * sizeof (void *)); + etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer)); for (i = 0; i < etms->priv->col_count; i++) { STORE_LOCATOR(etms, i, row) = duplicate_value(etms, i, store[i]); @@ -357,17 +357,17 @@ e_table_memory_store_insert_array (ETableMemoryStore *etms, int row, void **stor } void -e_table_memory_store_insert (ETableMemoryStore *etms, int row, gpointer data, ...) +e_table_memory_store_insert (ETableMemoryStore *etms, gint row, gpointer data, ...) { - void **store; + gpointer *store; va_list args; - int i; + gint i; - store = g_new (void *, etms->priv->col_count + 1); + store = g_new (gpointer , etms->priv->col_count + 1); va_start (args, data); for (i = 0; i < etms->priv->col_count; i++) { - store[i] = va_arg (args, void *); + store[i] = va_arg (args, gpointer ); } va_end (args); @@ -377,18 +377,18 @@ e_table_memory_store_insert (ETableMemoryStore *etms, int row, gpointer data, .. } void -e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, int row, void **store, gpointer data) +e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data) { - int row_count; - int i; + gint row_count; + gint i; row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) + 1; if (row == -1) row = row_count - 1; - etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *)); + etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer)); memmove (etms->priv->store + etms->priv->col_count * (row + 1), etms->priv->store + etms->priv->col_count * row, - etms->priv->col_count * (row_count - row - 1) * sizeof (void *)); + etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer)); for (i = 0; i < etms->priv->col_count; i++) { STORE_LOCATOR(etms, i, row) = store[i]; @@ -398,17 +398,17 @@ e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, int row, void } void -e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, gpointer data, ...) +e_table_memory_store_insert_adopt (ETableMemoryStore *etms, gint row, gpointer data, ...) { - void **store; + gpointer *store; va_list args; - int i; + gint i; - store = g_new (void *, etms->priv->col_count + 1); + store = g_new (gpointer , etms->priv->col_count + 1); va_start (args, data); for (i = 0; i < etms->priv->col_count; i++) { - store[i] = va_arg (args, void *); + store[i] = va_arg (args, gpointer ); } va_end (args); @@ -429,9 +429,9 @@ e_table_memory_store_insert_adopt (ETableMemoryStore *etms, int row, gpointer da * */ void -e_table_memory_store_change_array (ETableMemoryStore *etms, int row, void **store, gpointer data) +e_table_memory_store_change_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data) { - int i; + gint i; g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms))); @@ -456,19 +456,19 @@ e_table_memory_store_change_array (ETableMemoryStore *etms, int row, void **stor * pass in etms->col_count args. */ void -e_table_memory_store_change (ETableMemoryStore *etms, int row, gpointer data, ...) +e_table_memory_store_change (ETableMemoryStore *etms, gint row, gpointer data, ...) { - void **store; + gpointer *store; va_list args; - int i; + gint i; g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms))); - store = g_new0 (void *, etms->priv->col_count + 1); + store = g_new0 (gpointer , etms->priv->col_count + 1); va_start (args, data); for (i = 0; i < etms->priv->col_count; i++) { - store[i] = va_arg (args, void *); + store[i] = va_arg (args, gpointer ); } va_end (args); @@ -490,9 +490,9 @@ e_table_memory_store_change (ETableMemoryStore *etms, int row, gpointer data, .. * duplicate the data. */ void -e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, int row, void **store, gpointer data) +e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, gint row, gpointer *store, gpointer data) { - int i; + gint i; g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms))); @@ -515,19 +515,19 @@ e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, int row, void * must pass in etms->col_count args. */ void -e_table_memory_store_change_adopt (ETableMemoryStore *etms, int row, gpointer data, ...) +e_table_memory_store_change_adopt (ETableMemoryStore *etms, gint row, gpointer data, ...) { - void **store; + gpointer *store; va_list args; - int i; + gint i; g_return_if_fail (row >= 0 && row < e_table_model_row_count (E_TABLE_MODEL (etms))); - store = g_new0 (void *, etms->priv->col_count + 1); + store = g_new0 (gpointer , etms->priv->col_count + 1); va_start (args, data); for (i = 0; i < etms->priv->col_count; i++) { - store[i] = va_arg (args, void *); + store[i] = va_arg (args, gpointer ); } va_end (args); @@ -537,11 +537,11 @@ e_table_memory_store_change_adopt (ETableMemoryStore *etms, int row, gpointer da } void -e_table_memory_store_remove (ETableMemoryStore *etms, int row) +e_table_memory_store_remove (ETableMemoryStore *etms, gint row) { ETableModel *model; - int column_count, row_count; - int i; + gint column_count, row_count; + gint i; model = E_TABLE_MODEL (etms); column_count = e_table_model_column_count (model); @@ -552,8 +552,8 @@ e_table_memory_store_remove (ETableMemoryStore *etms, int row) row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) - 1; memmove (etms->priv->store + etms->priv->col_count * row, etms->priv->store + etms->priv->col_count * (row + 1), - etms->priv->col_count * (row_count - row) * sizeof (void *)); - etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (void *)); + etms->priv->col_count * (row_count - row) * sizeof (gpointer)); + etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer)); e_table_memory_remove (E_TABLE_MEMORY (etms), row); } @@ -562,8 +562,8 @@ void e_table_memory_store_clear (ETableMemoryStore *etms) { ETableModel *model; - int row_count, column_count; - int i, j; + gint row_count, column_count; + gint i, j; model = E_TABLE_MODEL (etms); row_count = e_table_model_row_count (model); diff --git a/widgets/table/e-table-memory-store.h b/widgets/table/e-table-memory-store.h index f197e11fe6..96da50f71c 100644 --- a/widgets/table/e-table-memory-store.h +++ b/widgets/table/e-table-memory-store.h @@ -92,45 +92,45 @@ ETableModel *e_table_memory_store_construct (ETableMemoryStore /* Adopt a value instead of copying it. */ void e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, - int col, - int row, + gint col, + gint row, void *value); /* The size of these arrays is the number of columns. */ void e_table_memory_store_insert_array (ETableMemoryStore *etms, - int row, + gint row, void **store, gpointer data); void e_table_memory_store_insert (ETableMemoryStore *etms, - int row, + gint row, gpointer data, ...); void e_table_memory_store_insert_adopt (ETableMemoryStore *etms, - int row, + gint row, gpointer data, ...); void e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms, - int row, + gint row, void **store, gpointer data); void e_table_memory_store_change_array (ETableMemoryStore *etms, - int row, + gint row, void **store, gpointer data); void e_table_memory_store_change (ETableMemoryStore *etms, - int row, + gint row, gpointer data, ...); void e_table_memory_store_change_adopt (ETableMemoryStore *etms, - int row, + gint row, gpointer data, ...); void e_table_memory_store_change_adopt_array (ETableMemoryStore *etms, - int row, + gint row, void **store, gpointer data); void e_table_memory_store_remove (ETableMemoryStore *etms, - int row); + gint row); void e_table_memory_store_clear (ETableMemoryStore *etms); G_END_DECLS diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c index 3fb85a9553..98fd65c460 100644 --- a/widgets/table/e-table-memory.c +++ b/widgets/table/e-table-memory.c @@ -41,7 +41,7 @@ G_DEFINE_TYPE (ETableMemory, e_table_memory, E_TABLE_MODEL_TYPE) struct ETableMemoryPriv { gpointer *data; - int num_rows; + gint num_rows; gint frozen; }; @@ -120,7 +120,7 @@ e_table_memory_new (void) * Return value: **/ gpointer -e_table_memory_get_data (ETableMemory *etmm, int row) +e_table_memory_get_data (ETableMemory *etmm, gint row) { g_return_val_if_fail(row >= 0, NULL); g_return_val_if_fail(row < etmm->priv->num_rows, NULL); @@ -137,7 +137,7 @@ e_table_memory_get_data (ETableMemory *etmm, int row) * **/ void -e_table_memory_set_data (ETableMemory *etmm, int row, gpointer data) +e_table_memory_set_data (ETableMemory *etmm, gint row, gpointer data) { g_return_if_fail(row >= 0); g_return_if_fail(row < etmm->priv->num_rows); @@ -158,7 +158,7 @@ e_table_memory_set_data (ETableMemory *etmm, int row, gpointer data) **/ void e_table_memory_insert (ETableMemory *etmm, - int row, + gint row, gpointer data) { g_return_if_fail(row >= -1); @@ -189,7 +189,7 @@ e_table_memory_insert (ETableMemory *etmm, * Return value: **/ gpointer -e_table_memory_remove (ETableMemory *etmm, int row) +e_table_memory_remove (ETableMemory *etmm, gint row) { gpointer ret; diff --git a/widgets/table/e-table-memory.h b/widgets/table/e-table-memory.h index 889eec5d33..07a79b6856 100644 --- a/widgets/table/e-table-memory.h +++ b/widgets/table/e-table-memory.h @@ -55,19 +55,19 @@ ETableMemory *e_table_memory_new (void); /* row operations */ void e_table_memory_insert (ETableMemory *etable, - int row, + gint row, gpointer data); gpointer e_table_memory_remove (ETableMemory *etable, - int row); + gint row); void e_table_memory_clear (ETableMemory *etable); /* Freeze and thaw */ void e_table_memory_freeze (ETableMemory *etable); void e_table_memory_thaw (ETableMemory *etable); gpointer e_table_memory_get_data (ETableMemory *etm, - int row); + gint row); void e_table_memory_set_data (ETableMemory *etm, - int row, + gint row, gpointer data); G_END_DECLS diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c index efe097c4e1..2badb768c9 100644 --- a/widgets/table/e-table-model.c +++ b/widgets/table/e-table-model.c @@ -59,7 +59,7 @@ static guint e_table_model_signals [LAST_SIGNAL] = { 0, }; * * Returns: the number of columns in the table model. */ -int +gint e_table_model_column_count (ETableModel *e_table_model) { g_return_val_if_fail (e_table_model != NULL, 0); @@ -75,7 +75,7 @@ e_table_model_column_count (ETableModel *e_table_model) * * Returns: the number of rows in the Table model. */ -int +gint e_table_model_row_count (ETableModel *e_table_model) { g_return_val_if_fail (e_table_model != NULL, 0); @@ -92,7 +92,7 @@ e_table_model_row_count (ETableModel *e_table_model) * */ void -e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, int row) +e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, gint row) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -120,8 +120,8 @@ e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, int r * data in that cell. rows_deleted affects all data in those rows. * rows_inserted and no_change don't affect any data in this way. **/ -void * -e_table_model_value_at (ETableModel *e_table_model, int col, int row) +gpointer +e_table_model_value_at (ETableModel *e_table_model, gint col, gint row) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -142,10 +142,10 @@ e_table_model_value_at (ETableModel *e_table_model, int col, int row) * * There should be an agreement between the Table Model and the user * of this function about the data being stored. Typically it will - * be a pointer to a set of data, or a datum that fits inside a void *. + * be a pointer to a set of data, or a datum that fits inside a gpointer . */ void -e_table_model_set_value_at (ETableModel *e_table_model, int col, int row, const void *value) +e_table_model_set_value_at (ETableModel *e_table_model, gint col, gint row, gconstpointer value) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -163,7 +163,7 @@ e_table_model_set_value_at (ETableModel *e_table_model, int col, int row, const * edited, %FALSE otherwise */ gboolean -e_table_model_is_cell_editable (ETableModel *e_table_model, int col, int row) +e_table_model_is_cell_editable (ETableModel *e_table_model, gint col, gint row) { g_return_val_if_fail (e_table_model != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), FALSE); @@ -172,8 +172,8 @@ e_table_model_is_cell_editable (ETableModel *e_table_model, int col, int row) } -void * -e_table_model_duplicate_value (ETableModel *e_table_model, int col, const void *value) +gpointer +e_table_model_duplicate_value (ETableModel *e_table_model, gint col, gconstpointer value) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -185,7 +185,7 @@ e_table_model_duplicate_value (ETableModel *e_table_model, int col, const void * } void -e_table_model_free_value (ETableModel *e_table_model, int col, void *value) +e_table_model_free_value (ETableModel *e_table_model, gint col, gpointer value) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -206,8 +206,8 @@ e_table_model_has_save_id (ETableModel *e_table_model) return FALSE; } -char * -e_table_model_get_save_id (ETableModel *e_table_model, int row) +gchar * +e_table_model_get_save_id (ETableModel *e_table_model, gint row) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -230,8 +230,8 @@ e_table_model_has_change_pending(ETableModel *e_table_model) return FALSE; } -void * -e_table_model_initialize_value (ETableModel *e_table_model, int col) +gpointer +e_table_model_initialize_value (ETableModel *e_table_model, gint col) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -243,7 +243,7 @@ e_table_model_initialize_value (ETableModel *e_table_model, int col) } gboolean -e_table_model_value_is_empty (ETableModel *e_table_model, int col, const void *value) +e_table_model_value_is_empty (ETableModel *e_table_model, gint col, gconstpointer value) { g_return_val_if_fail (e_table_model != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), FALSE); @@ -254,8 +254,8 @@ e_table_model_value_is_empty (ETableModel *e_table_model, int col, const void *v return FALSE; } -char * -e_table_model_value_to_string (ETableModel *e_table_model, int col, const void *value) +gchar * +e_table_model_value_to_string (ETableModel *e_table_model, gint col, gconstpointer value) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -381,7 +381,7 @@ e_table_model_init (ETableModel *e_table_model) static void print_tabs (void) { - int i; + gint i; for (i = 0; i < depth; i++) g_print("\t"); } @@ -475,7 +475,7 @@ e_table_model_changed (ETableModel *e_table_model) * object */ void -e_table_model_row_changed (ETableModel *e_table_model, int row) +e_table_model_row_changed (ETableModel *e_table_model, gint row) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -503,7 +503,7 @@ e_table_model_row_changed (ETableModel *e_table_model, int row) * object */ void -e_table_model_cell_changed (ETableModel *e_table_model, int col, int row) +e_table_model_cell_changed (ETableModel *e_table_model, gint col, gint row) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -531,7 +531,7 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row) * @e_table_model object */ void -e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count) +e_table_model_rows_inserted (ETableModel *e_table_model, gint row, gint count) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -557,7 +557,7 @@ e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count) * the "model_rows_inserted" signal on the @e_table_model object */ void -e_table_model_row_inserted (ETableModel *e_table_model, int row) +e_table_model_row_inserted (ETableModel *e_table_model, gint row) { e_table_model_rows_inserted(e_table_model, row, 1); } @@ -574,7 +574,7 @@ e_table_model_row_inserted (ETableModel *e_table_model, int row) * @e_table_model object */ void -e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count) +e_table_model_rows_deleted (ETableModel *e_table_model, gint row, gint count) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -600,7 +600,7 @@ e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count) * the "model_rows_deleted" signal on the @e_table_model object */ void -e_table_model_row_deleted (ETableModel *e_table_model, int row) +e_table_model_row_deleted (ETableModel *e_table_model, gint row) { e_table_model_rows_deleted(e_table_model, row, 1); } diff --git a/widgets/table/e-table-model.h b/widgets/table/e-table-model.h index d647eee4e1..571c2f8a12 100644 --- a/widgets/table/e-table-model.h +++ b/widgets/table/e-table-model.h @@ -45,29 +45,29 @@ typedef struct { /* * Virtual methods */ - int (*column_count) (ETableModel *etm); - int (*row_count) (ETableModel *etm); - void (*append_row) (ETableModel *etm, ETableModel *source, int row); + gint (*column_count) (ETableModel *etm); + gint (*row_count) (ETableModel *etm); + void (*append_row) (ETableModel *etm, ETableModel *source, gint row); - void *(*value_at) (ETableModel *etm, int col, int row); - void (*set_value_at) (ETableModel *etm, int col, int row, const void *value); - gboolean (*is_cell_editable) (ETableModel *etm, int col, int row); + void *(*value_at) (ETableModel *etm, gint col, gint row); + void (*set_value_at) (ETableModel *etm, gint col, gint row, gconstpointer value); + gboolean (*is_cell_editable) (ETableModel *etm, gint col, gint row); gboolean (*has_save_id) (ETableModel *etm); - gchar *(*get_save_id) (ETableModel *etm, int row); + gchar *(*get_save_id) (ETableModel *etm, gint row); gboolean (*has_change_pending) (ETableModel *etm); /* Allocate a copy of the given value. */ - void *(*duplicate_value) (ETableModel *etm, int col, const void *value); + void *(*duplicate_value) (ETableModel *etm, gint col, gconstpointer value); /* Free an allocated value. */ - void (*free_value) (ETableModel *etm, int col, void *value); + void (*free_value) (ETableModel *etm, gint col, gpointer value); /* Return an allocated empty value. */ - void *(*initialize_value) (ETableModel *etm, int col); + void *(*initialize_value) (ETableModel *etm, gint col); /* Return TRUE if value is equivalent to an empty cell. */ - gboolean (*value_is_empty) (ETableModel *etm, int col, const void *value); + gboolean (*value_is_empty) (ETableModel *etm, gint col, gconstpointer value); /* Return an allocated string. */ - char *(*value_to_string) (ETableModel *etm, int col, const void *value); + gchar *(*value_to_string) (ETableModel *etm, gint col, gconstpointer value); /* @@ -87,39 +87,39 @@ typedef struct { void (*model_no_change) (ETableModel *etm); void (*model_changed) (ETableModel *etm); - void (*model_row_changed) (ETableModel *etm, int row); - void (*model_cell_changed) (ETableModel *etm, int col, int row); - void (*model_rows_inserted) (ETableModel *etm, int row, int count); - void (*model_rows_deleted) (ETableModel *etm, int row, int count); + void (*model_row_changed) (ETableModel *etm, gint row); + void (*model_cell_changed) (ETableModel *etm, gint col, gint row); + void (*model_rows_inserted) (ETableModel *etm, gint row, gint count); + void (*model_rows_deleted) (ETableModel *etm, gint row, gint count); } ETableModelClass; GType e_table_model_get_type (void); /**/ -int e_table_model_column_count (ETableModel *e_table_model); -const char *e_table_model_column_name (ETableModel *e_table_model, - int col); -int e_table_model_row_count (ETableModel *e_table_model); +gint e_table_model_column_count (ETableModel *e_table_model); +const gchar *e_table_model_column_name (ETableModel *e_table_model, + gint col); +gint e_table_model_row_count (ETableModel *e_table_model); void e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, - int row); + gint row); /**/ void *e_table_model_value_at (ETableModel *e_table_model, - int col, - int row); + gint col, + gint row); void e_table_model_set_value_at (ETableModel *e_table_model, - int col, - int row, + gint col, + gint row, const void *value); gboolean e_table_model_is_cell_editable (ETableModel *e_table_model, - int col, - int row); + gint col, + gint row); /**/ gboolean e_table_model_has_save_id (ETableModel *etm); -char *e_table_model_get_save_id (ETableModel *etm, - int row); +gchar *e_table_model_get_save_id (ETableModel *etm, + gint row); /**/ gboolean e_table_model_has_change_pending (ETableModel *etm); @@ -127,18 +127,18 @@ gboolean e_table_model_has_change_pending (ETableModel *etm); /**/ void *e_table_model_duplicate_value (ETableModel *e_table_model, - int col, + gint col, const void *value); void e_table_model_free_value (ETableModel *e_table_model, - int col, + gint col, void *value); void *e_table_model_initialize_value (ETableModel *e_table_model, - int col); + gint col); gboolean e_table_model_value_is_empty (ETableModel *e_table_model, - int col, + gint col, const void *value); -char *e_table_model_value_to_string (ETableModel *e_table_model, - int col, +gchar *e_table_model_value_to_string (ETableModel *e_table_model, + gint col, const void *value); /* @@ -148,22 +148,22 @@ void e_table_model_pre_change (ETableModel *e_table_model); void e_table_model_no_change (ETableModel *e_table_model); void e_table_model_changed (ETableModel *e_table_model); void e_table_model_row_changed (ETableModel *e_table_model, - int row); + gint row); void e_table_model_cell_changed (ETableModel *e_table_model, - int col, - int row); + gint col, + gint row); void e_table_model_rows_inserted (ETableModel *e_table_model, -int row, -int count); +gint row, +gint count); void e_table_model_rows_deleted (ETableModel *e_table_model, -int row, -int count); +gint row, +gint count); /**/ void e_table_model_row_inserted (ETableModel *e_table_model, -int row); +gint row); void e_table_model_row_deleted (ETableModel *e_table_model, -int row); +gint row); void e_table_model_freeze (ETableModel *e_table_model); void e_table_model_thaw (ETableModel *e_table_model); diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c index 56cd8b6549..c8cea32963 100644 --- a/widgets/table/e-table-one.c +++ b/widgets/table/e-table-one.c @@ -46,8 +46,8 @@ one_row_count (ETableModel *etm) return 1; } -static void * -one_value_at (ETableModel *etm, int col, int row) +static gpointer +one_value_at (ETableModel *etm, gint col, gint row) { ETableOne *one = E_TABLE_ONE(etm); @@ -58,7 +58,7 @@ one_value_at (ETableModel *etm, int col, int row) } static void -one_set_value_at (ETableModel *etm, int col, int row, const void *val) +one_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { ETableOne *one = E_TABLE_ONE(etm); @@ -69,7 +69,7 @@ one_set_value_at (ETableModel *etm, int col, int row, const void *val) } static gboolean -one_is_cell_editable (ETableModel *etm, int col, int row) +one_is_cell_editable (ETableModel *etm, gint col, gint row) { ETableOne *one = E_TABLE_ONE(etm); @@ -80,19 +80,19 @@ one_is_cell_editable (ETableModel *etm, int col, int row) } /* The default for one_duplicate_value is to return the raw value. */ -static void * -one_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +one_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { ETableOne *one = E_TABLE_ONE(etm); if (one->source) return e_table_model_duplicate_value(one->source, col, value); else - return (void *)value; + return (gpointer)value; } static void -one_free_value (ETableModel *etm, int col, void *value) +one_free_value (ETableModel *etm, gint col, gpointer value) { ETableOne *one = E_TABLE_ONE(etm); @@ -100,8 +100,8 @@ one_free_value (ETableModel *etm, int col, void *value) e_table_model_free_value(one->source, col, value); } -static void * -one_initialize_value (ETableModel *etm, int col) +static gpointer +one_initialize_value (ETableModel *etm, gint col) { ETableOne *one = E_TABLE_ONE(etm); @@ -112,7 +112,7 @@ one_initialize_value (ETableModel *etm, int col) } static gboolean -one_value_is_empty (ETableModel *etm, int col, const void *value) +one_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ETableOne *one = E_TABLE_ONE(etm); @@ -122,8 +122,8 @@ one_value_is_empty (ETableModel *etm, int col, const void *value) return FALSE; } -static char * -one_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +one_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ETableOne *one = E_TABLE_ONE(etm); @@ -146,8 +146,8 @@ one_dispose (GObject *object) if (one->data) { - int i; - int col_count; + gint i; + gint col_count; if (one->source) { col_count = e_table_model_column_count(one->source); @@ -199,14 +199,14 @@ ETableModel * e_table_one_new (ETableModel *source) { ETableOne *eto; - int col_count; - int i; + gint col_count; + gint i; eto = g_object_new (E_TABLE_ONE_TYPE, NULL); eto->source = source; col_count = e_table_model_column_count(source); - eto->data = g_new(void *, col_count); + eto->data = g_new(gpointer , col_count); for (i = 0; i < col_count; i++) { eto->data[i] = e_table_model_initialize_value(source, i); } @@ -221,9 +221,9 @@ void e_table_one_commit (ETableOne *one) { if (one->source) { - int empty = TRUE; - int col; - int cols = e_table_model_column_count(one->source); + gint empty = TRUE; + gint col; + gint cols = e_table_model_column_count(one->source); for (col = 0; col < cols; col++) { if (!e_table_model_value_is_empty(one->source, col, one->data[col])) { empty = FALSE; diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c index 42425efd9a..778041d73c 100644 --- a/widgets/table/e-table-scrolled.c +++ b/widgets/table/e-table-scrolled.c @@ -71,8 +71,8 @@ e_table_scrolled_real_construct (ETableScrolled *ets) ETableScrolled *e_table_scrolled_construct (ETableScrolled *ets, ETableModel *etm, ETableExtras *ete, - const char *spec, - const char *state) + const gchar *spec, + const gchar *state) { g_return_val_if_fail(ets != NULL, NULL); g_return_val_if_fail(E_IS_TABLE_SCROLLED(ets), NULL); @@ -90,8 +90,8 @@ ETableScrolled *e_table_scrolled_construct (ETableScrolled *e GtkWidget *e_table_scrolled_new (ETableModel *etm, ETableExtras *ete, - const char *spec, - const char *state) + const gchar *spec, + const gchar *state) { ETableScrolled *ets; @@ -113,8 +113,8 @@ GtkWidget *e_table_scrolled_new (ETableModel *e ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *ets, ETableModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn) + const gchar *spec_fn, + const gchar *state_fn) { g_return_val_if_fail(ets != NULL, NULL); g_return_val_if_fail(E_IS_TABLE_SCROLLED(ets), NULL); @@ -132,8 +132,8 @@ ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *e GtkWidget *e_table_scrolled_new_from_spec_file (ETableModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn) + const gchar *spec_fn, + const gchar *state_fn) { ETableScrolled *ets; diff --git a/widgets/table/e-table-scrolled.h b/widgets/table/e-table-scrolled.h index d2f5024495..71e50b8cdd 100644 --- a/widgets/table/e-table-scrolled.h +++ b/widgets/table/e-table-scrolled.h @@ -51,22 +51,22 @@ GType e_table_scrolled_get_type (void); ETableScrolled *e_table_scrolled_construct (ETableScrolled *ets, ETableModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); GtkWidget *e_table_scrolled_new (ETableModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); ETableScrolled *e_table_scrolled_construct_from_spec_file (ETableScrolled *ets, ETableModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); GtkWidget *e_table_scrolled_new_from_spec_file (ETableModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); ETable *e_table_scrolled_get_table (ETableScrolled *ets); diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c index 401e0fd33f..e11510371a 100644 --- a/widgets/table/e-table-search.c +++ b/widgets/table/e-table-search.c @@ -35,7 +35,7 @@ d(static gint depth = 0) struct _ETableSearchPrivate { guint timeout_id; - char *search_string; + gchar *search_string; gunichar last_character; }; @@ -50,7 +50,7 @@ enum { static guint e_table_search_signals [LAST_SIGNAL] = { 0, }; static gboolean -e_table_search_search (ETableSearch *e_table_search, char *string, ETableSearchFlags flags) +e_table_search_search (ETableSearch *e_table_search, gchar *string, ETableSearchFlags flags) { gboolean ret_val; g_return_val_if_fail (e_table_search != NULL, FALSE); @@ -172,8 +172,8 @@ e_table_search_new (void) void e_table_search_input_character (ETableSearch *ets, gunichar character) { - char character_utf8[7]; - char *temp_string; + gchar character_utf8[7]; + gchar *temp_string; g_return_if_fail (ets != NULL); g_return_if_fail (E_IS_TABLE_SEARCH (ets)); @@ -202,7 +202,7 @@ e_table_search_input_character (ETableSearch *ets, gunichar character) gboolean e_table_search_backspace (ETableSearch *ets) { - char *end; + gchar *end; g_return_val_if_fail (ets != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_SEARCH (ets), FALSE); diff --git a/widgets/table/e-table-search.h b/widgets/table/e-table-search.h index 9866d07f94..798d81bd2d 100644 --- a/widgets/table/e-table-search.h +++ b/widgets/table/e-table-search.h @@ -53,7 +53,7 @@ typedef struct { /* * Signals */ - gboolean (*search) (ETableSearch *ets, char *string /* utf8 */, ETableSearchFlags flags); + gboolean (*search) (ETableSearch *ets, gchar *string /* utf8 */, ETableSearchFlags flags); void (*accept) (ETableSearch *ets); } ETableSearchClass; diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c index 7f6ab4d782..22ec5af7d5 100644 --- a/widgets/table/e-table-selection-model.c +++ b/widgets/table/e-table-selection-model.c @@ -42,7 +42,7 @@ enum { }; static void -save_to_hash(int model_row, gpointer closure) +save_to_hash(gint model_row, gpointer closure) { ETableSelectionModel *etsm = closure; const gchar *key = e_table_model_get_save_id(etsm->model, model_row); @@ -95,10 +95,10 @@ model_changed_idle(ETableSelectionModel *etsm) e_selection_model_clear(E_SELECTION_MODEL(etsm)); if (etsm->cursor_id && etm && e_table_model_has_save_id(etm)) { - int row_count = e_table_model_row_count(etm); - int cursor_row = -1; - int cursor_col = -1; - int i; + gint row_count = e_table_model_row_count(etm); + gint cursor_row = -1; + gint cursor_col = -1; + gint i; e_selection_model_array_confirm_row_count(E_SELECTION_MODEL_ARRAY(etsm)); for (i = 0; i < row_count; i++) { gchar *save_id = e_table_model_get_save_id(etm, i); @@ -138,27 +138,27 @@ model_changed(ETableModel *etm, ETableSelectionModel *etsm) } static void -model_row_changed(ETableModel *etm, int row, ETableSelectionModel *etsm) +model_row_changed(ETableModel *etm, gint row, ETableSelectionModel *etsm) { free_hash(etsm); } static void -model_cell_changed(ETableModel *etm, int col, int row, ETableSelectionModel *etsm) +model_cell_changed(ETableModel *etm, gint col, gint row, ETableSelectionModel *etsm) { free_hash(etsm); } #if 1 static void -model_rows_inserted(ETableModel *etm, int row, int count, ETableSelectionModel *etsm) +model_rows_inserted(ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm) { e_selection_model_array_insert_rows(E_SELECTION_MODEL_ARRAY(etsm), row, count); free_hash(etsm); } static void -model_rows_deleted(ETableModel *etm, int row, int count, ETableSelectionModel *etsm) +model_rows_deleted(ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm) { e_selection_model_array_delete_rows(E_SELECTION_MODEL_ARRAY(etsm), row, count); free_hash(etsm); @@ -167,13 +167,13 @@ model_rows_deleted(ETableModel *etm, int row, int count, ETableSelectionModel *e #else static void -model_rows_inserted(ETableModel *etm, int row, int count, ETableSelectionModel *etsm) +model_rows_inserted(ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm) { model_changed(etm, etsm); } static void -model_rows_deleted(ETableModel *etm, int row, int count, ETableSelectionModel *etsm) +model_rows_deleted(ETableModel *etm, gint row, gint count, ETableSelectionModel *etsm) { model_changed(etm, etsm); } diff --git a/widgets/table/e-table-simple.c b/widgets/table/e-table-simple.c index a220769ded..f2eceb9314 100644 --- a/widgets/table/e-table-simple.c +++ b/widgets/table/e-table-simple.c @@ -53,7 +53,7 @@ simple_row_count (ETableModel *etm) } static void -simple_append_row (ETableModel *etm, ETableModel *source, int row) +simple_append_row (ETableModel *etm, ETableModel *source, gint row) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -61,8 +61,8 @@ simple_append_row (ETableModel *etm, ETableModel *source, int row) simple->append_row (etm, source, row, simple->data); } -static void * -simple_value_at (ETableModel *etm, int col, int row) +static gpointer +simple_value_at (ETableModel *etm, gint col, gint row) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -73,7 +73,7 @@ simple_value_at (ETableModel *etm, int col, int row) } static void -simple_set_value_at (ETableModel *etm, int col, int row, const void *val) +simple_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -82,7 +82,7 @@ simple_set_value_at (ETableModel *etm, int col, int row, const void *val) } static gboolean -simple_is_cell_editable (ETableModel *etm, int col, int row) +simple_is_cell_editable (ETableModel *etm, gint col, gint row) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -103,8 +103,8 @@ simple_has_save_id (ETableModel *etm) return FALSE; } -static char * -simple_get_save_id (ETableModel *etm, int row) +static gchar * +simple_get_save_id (ETableModel *etm, gint row) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -115,19 +115,19 @@ simple_get_save_id (ETableModel *etm, int row) } /* The default for simple_duplicate_value is to return the raw value. */ -static void * -simple_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +simple_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { ETableSimple *simple = E_TABLE_SIMPLE(etm); if (simple->duplicate_value) return simple->duplicate_value (etm, col, value, simple->data); else - return (void *)value; + return (gpointer)value; } static void -simple_free_value (ETableModel *etm, int col, void *value) +simple_free_value (ETableModel *etm, gint col, gpointer value) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -135,8 +135,8 @@ simple_free_value (ETableModel *etm, int col, void *value) simple->free_value (etm, col, value, simple->data); } -static void * -simple_initialize_value (ETableModel *etm, int col) +static gpointer +simple_initialize_value (ETableModel *etm, gint col) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -147,7 +147,7 @@ simple_initialize_value (ETableModel *etm, int col) } static gboolean -simple_value_is_empty (ETableModel *etm, int col, const void *value) +simple_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -157,8 +157,8 @@ simple_value_is_empty (ETableModel *etm, int col, const void *value) return FALSE; } -static char * -simple_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +simple_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ETableSimple *simple = E_TABLE_SIMPLE(etm); @@ -266,32 +266,32 @@ e_table_simple_new (ETableSimpleColumnCountFn col_count, return (ETableModel *) et; } -void * -e_table_simple_string_duplicate_value (ETableModel *etm, int col, const void *val, void *data) +gpointer +e_table_simple_string_duplicate_value (ETableModel *etm, gint col, gconstpointer val, gpointer data) { return g_strdup (val); } void -e_table_simple_string_free_value (ETableModel *etm, int col, void *val, void *data) +e_table_simple_string_free_value (ETableModel *etm, gint col, gpointer val, gpointer data) { g_free (val); } -void * -e_table_simple_string_initialize_value (ETableModel *etm, int col, void *data) +gpointer +e_table_simple_string_initialize_value (ETableModel *etm, gint col, gpointer data) { return g_strdup (""); } gboolean -e_table_simple_string_value_is_empty (ETableModel *etm, int col, const void *val, void *data) +e_table_simple_string_value_is_empty (ETableModel *etm, gint col, gconstpointer val, gpointer data) { - return !(val && * (char *) val); + return !(val && * (gchar *) val); } -char * -e_table_simple_string_value_to_string (ETableModel *etm, int col, const void *val, void *data) +gchar * +e_table_simple_string_value_to_string (ETableModel *etm, gint col, gconstpointer val, gpointer data) { return g_strdup (val); } diff --git a/widgets/table/e-table-simple.h b/widgets/table/e-table-simple.h index 453a90a54d..c93b313a82 100644 --- a/widgets/table/e-table-simple.h +++ b/widgets/table/e-table-simple.h @@ -36,22 +36,22 @@ G_BEGIN_DECLS #define E_IS_TABLE_SIMPLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_SIMPLE_TYPE)) #define E_TABLE_SIMPLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TABLE_SIMPLE_TYPE, ETableSimpleClass)) -typedef int (*ETableSimpleColumnCountFn) (ETableModel *etm, void *data); -typedef int (*ETableSimpleRowCountFn) (ETableModel *etm, void *data); -typedef void (*ETableSimpleAppendRowFn) (ETableModel *etm, ETableModel *model, int row, void *data); +typedef gint (*ETableSimpleColumnCountFn) (ETableModel *etm, gpointer data); +typedef gint (*ETableSimpleRowCountFn) (ETableModel *etm, gpointer data); +typedef void (*ETableSimpleAppendRowFn) (ETableModel *etm, ETableModel *model, gint row, gpointer data); -typedef void *(*ETableSimpleValueAtFn) (ETableModel *etm, int col, int row, void *data); -typedef void (*ETableSimpleSetValueAtFn) (ETableModel *etm, int col, int row, const void *val, void *data); -typedef gboolean (*ETableSimpleIsCellEditableFn) (ETableModel *etm, int col, int row, void *data); +typedef void *(*ETableSimpleValueAtFn) (ETableModel *etm, gint col, gint row, gpointer data); +typedef void (*ETableSimpleSetValueAtFn) (ETableModel *etm, gint col, gint row, gconstpointer val, gpointer data); +typedef gboolean (*ETableSimpleIsCellEditableFn) (ETableModel *etm, gint col, gint row, gpointer data); -typedef gboolean (*ETableSimpleHasSaveIdFn) (ETableModel *etm, void *data); -typedef char *(*ETableSimpleGetSaveIdFn) (ETableModel *etm, int row, void *data); +typedef gboolean (*ETableSimpleHasSaveIdFn) (ETableModel *etm, gpointer data); +typedef gchar *(*ETableSimpleGetSaveIdFn) (ETableModel *etm, gint row, gpointer data); -typedef void *(*ETableSimpleDuplicateValueFn) (ETableModel *etm, int col, const void *val, void *data); -typedef void (*ETableSimpleFreeValueFn) (ETableModel *etm, int col, void *val, void *data); -typedef void *(*ETableSimpleInitializeValueFn) (ETableModel *etm, int col, void *data); -typedef gboolean (*ETableSimpleValueIsEmptyFn) (ETableModel *etm, int col, const void *val, void *data); -typedef char *(*ETableSimpleValueToStringFn) (ETableModel *etm, int col, const void *val, void *data); +typedef void *(*ETableSimpleDuplicateValueFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data); +typedef void (*ETableSimpleFreeValueFn) (ETableModel *etm, gint col, gpointer val, gpointer data); +typedef void *(*ETableSimpleInitializeValueFn) (ETableModel *etm, gint col, gpointer data); +typedef gboolean (*ETableSimpleValueIsEmptyFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data); +typedef gchar *(*ETableSimpleValueToStringFn) (ETableModel *etm, gint col, gconstpointer val, gpointer data); typedef struct { ETableModel parent; @@ -72,7 +72,7 @@ typedef struct { ETableSimpleInitializeValueFn initialize_value; ETableSimpleValueIsEmptyFn value_is_empty; ETableSimpleValueToStringFn value_to_string; - void *data; + gpointer data; } ETableSimple; typedef struct { @@ -98,22 +98,22 @@ ETableModel *e_table_simple_new (ETableSimpleColumnCountFn /* Helper functions for if your values are all just strings. */ void *e_table_simple_string_duplicate_value (ETableModel *etm, - int col, + gint col, const void *val, void *data); void e_table_simple_string_free_value (ETableModel *etm, - int col, + gint col, void *val, void *data); void *e_table_simple_string_initialize_value (ETableModel *etm, - int col, + gint col, void *data); gboolean e_table_simple_string_value_is_empty (ETableModel *etm, - int col, + gint col, const void *val, void *data); -char *e_table_simple_string_value_to_string (ETableModel *etm, - int col, +gchar *e_table_simple_string_value_to_string (ETableModel *etm, + gint col, const void *val, void *data); diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c index 8d722038e3..bed0c5d679 100644 --- a/widgets/table/e-table-sort-info.c +++ b/widgets/table/e-table-sort-info.c @@ -188,7 +188,7 @@ e_table_sort_info_grouping_get_count (ETableSortInfo *info) } static void -e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, int length) +e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, gint length) { if (length < info->group_count) { info->group_count = length; @@ -208,7 +208,7 @@ e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, int length) * criteria in the object. */ void -e_table_sort_info_grouping_truncate (ETableSortInfo *info, int length) +e_table_sort_info_grouping_truncate (ETableSortInfo *info, gint length) { e_table_sort_info_grouping_real_truncate(info, length); e_table_sort_info_group_info_changed(info); @@ -222,7 +222,7 @@ e_table_sort_info_grouping_truncate (ETableSortInfo *info, int length) * Returns: the description of the @n-th grouping criteria in the @info object. */ ETableSortColumn -e_table_sort_info_grouping_get_nth (ETableSortInfo *info, int n) +e_table_sort_info_grouping_get_nth (ETableSortInfo *info, gint n) { if (info->can_group && n < info->group_count) { return info->groupings[n]; @@ -242,7 +242,7 @@ e_table_sort_info_grouping_get_nth (ETableSortInfo *info, int n) * whether it is ascending or descending). */ void -e_table_sort_info_grouping_set_nth (ETableSortInfo *info, int n, ETableSortColumn column) +e_table_sort_info_grouping_set_nth (ETableSortInfo *info, gint n, ETableSortColumn column) { if (n >= info->group_count) { e_table_sort_info_grouping_real_truncate(info, n + 1); @@ -265,7 +265,7 @@ e_table_sort_info_sorting_get_count (ETableSortInfo *info) } static void -e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, int length) +e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, gint length) { if (length < info->sort_count) { info->sort_count = length; @@ -285,7 +285,7 @@ e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, int length) * criteria in the object. */ void -e_table_sort_info_sorting_truncate (ETableSortInfo *info, int length) +e_table_sort_info_sorting_truncate (ETableSortInfo *info, gint length) { e_table_sort_info_sorting_real_truncate (info, length); e_table_sort_info_sort_info_changed(info); @@ -299,7 +299,7 @@ e_table_sort_info_sorting_truncate (ETableSortInfo *info, int length) * Returns: the description of the @n-th grouping criteria in the @info object. */ ETableSortColumn -e_table_sort_info_sorting_get_nth (ETableSortInfo *info, int n) +e_table_sort_info_sorting_get_nth (ETableSortInfo *info, gint n) { if (n < info->sort_count) { return info->sortings[n]; @@ -319,7 +319,7 @@ e_table_sort_info_sorting_get_nth (ETableSortInfo *info, int n) * column number and whether it is ascending or descending). */ void -e_table_sort_info_sorting_set_nth (ETableSortInfo *info, int n, ETableSortColumn column) +e_table_sort_info_sorting_set_nth (ETableSortInfo *info, gint n, ETableSortColumn column) { if (n >= info->sort_count) { e_table_sort_info_sorting_real_truncate(info, n + 1); @@ -358,22 +358,22 @@ e_table_sort_info_load_from_node (ETableSortInfo *info, xmlNode *node, gdouble state_version) { - int i; + gint i; xmlNode *grouping; if (state_version <= 0.05) { i = 0; - for (grouping = node->xmlChildrenNode; grouping && !strcmp ((char *)grouping->name, "group"); grouping = grouping->xmlChildrenNode) { + for (grouping = node->xmlChildrenNode; grouping && !strcmp ((gchar *)grouping->name, "group"); grouping = grouping->xmlChildrenNode) { ETableSortColumn column; - column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column"); - column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending"); + column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column"); + column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending"); e_table_sort_info_grouping_set_nth(info, i++, column); } i = 0; - for (; grouping && !strcmp ((char *)grouping->name, "leaf"); grouping = grouping->xmlChildrenNode) { + for (; grouping && !strcmp ((gchar *)grouping->name, "leaf"); grouping = grouping->xmlChildrenNode) { ETableSortColumn column; - column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column"); - column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending"); + column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column"); + column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending"); e_table_sort_info_sorting_set_nth(info, i++, column); } } else { @@ -385,13 +385,13 @@ e_table_sort_info_load_from_node (ETableSortInfo *info, if (grouping->type != XML_ELEMENT_NODE) continue; - if (!strcmp ((char *)grouping->name, "group")) { - column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column"); - column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending"); + if (!strcmp ((gchar *)grouping->name, "group")) { + column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column"); + column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending"); e_table_sort_info_grouping_set_nth(info, gcnt++, column); - } else if (!strcmp ((char *)grouping->name, "leaf")) { - column.column = e_xml_get_integer_prop_by_name (grouping, (const unsigned char *)"column"); - column.ascending = e_xml_get_bool_prop_by_name (grouping, (const unsigned char *)"ascending"); + } else if (!strcmp ((gchar *)grouping->name, "leaf")) { + column.column = e_xml_get_integer_prop_by_name (grouping, (const guchar *)"column"); + column.ascending = e_xml_get_bool_prop_by_name (grouping, (const guchar *)"ascending"); e_table_sort_info_sorting_set_nth(info, scnt++, column); } } @@ -414,26 +414,26 @@ e_table_sort_info_save_to_node (ETableSortInfo *info, xmlNode *parent) { xmlNode *grouping; - int i; - const int sort_count = e_table_sort_info_sorting_get_count (info); - const int group_count = e_table_sort_info_grouping_get_count (info); + gint i; + const gint sort_count = e_table_sort_info_sorting_get_count (info); + const gint group_count = e_table_sort_info_grouping_get_count (info); - grouping = xmlNewChild (parent, NULL, (const unsigned char *)"grouping", NULL); + grouping = xmlNewChild (parent, NULL, (const guchar *)"grouping", NULL); for (i = 0; i < group_count; i++) { ETableSortColumn column = e_table_sort_info_grouping_get_nth(info, i); - xmlNode *new_node = xmlNewChild(grouping, NULL, (const unsigned char *)"group", NULL); + xmlNode *new_node = xmlNewChild(grouping, NULL, (const guchar *)"group", NULL); - e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"column", column.column); - e_xml_set_bool_prop_by_name (new_node, (const unsigned char *)"ascending", column.ascending); + e_xml_set_integer_prop_by_name (new_node, (const guchar *)"column", column.column); + e_xml_set_bool_prop_by_name (new_node, (const guchar *)"ascending", column.ascending); } for (i = 0; i < sort_count; i++) { ETableSortColumn column = e_table_sort_info_sorting_get_nth(info, i); - xmlNode *new_node = xmlNewChild(grouping, NULL, (const unsigned char *)"leaf", NULL); + xmlNode *new_node = xmlNewChild(grouping, NULL, (const guchar *)"leaf", NULL); - e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"column", column.column); - e_xml_set_bool_prop_by_name (new_node, (const unsigned char *)"ascending", column.ascending); + e_xml_set_integer_prop_by_name (new_node, (const guchar *)"column", column.column); + e_xml_set_bool_prop_by_name (new_node, (const guchar *)"ascending", column.ascending); } return grouping; diff --git a/widgets/table/e-table-sort-info.h b/widgets/table/e-table-sort-info.h index 4a0dde4d88..d9ffec9be2 100644 --- a/widgets/table/e-table-sort-info.h +++ b/widgets/table/e-table-sort-info.h @@ -74,20 +74,20 @@ void e_table_sort_info_thaw (ETableSortInfo *info) guint e_table_sort_info_grouping_get_count (ETableSortInfo *info); void e_table_sort_info_grouping_truncate (ETableSortInfo *info, - int length); + gint length); ETableSortColumn e_table_sort_info_grouping_get_nth (ETableSortInfo *info, - int n); + gint n); void e_table_sort_info_grouping_set_nth (ETableSortInfo *info, - int n, + gint n, ETableSortColumn column); guint e_table_sort_info_sorting_get_count (ETableSortInfo *info); void e_table_sort_info_sorting_truncate (ETableSortInfo *info, - int length); + gint length); ETableSortColumn e_table_sort_info_sorting_get_nth (ETableSortInfo *info, - int n); + gint n); void e_table_sort_info_sorting_set_nth (ETableSortInfo *info, - int n, + gint n, ETableSortColumn column); ETableSortInfo *e_table_sort_info_new (void); diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c index 02a2e8bf26..82b2d5b37d 100644 --- a/widgets/table/e-table-sorted-variable.c +++ b/widgets/table/e-table-sorted-variable.c @@ -127,7 +127,7 @@ etsv_add (ETableSubsetVariable *etssv, ETableModel *etm = E_TABLE_MODEL(etssv); ETableSubset *etss = E_TABLE_SUBSET(etssv); ETableSortedVariable *etsv = E_TABLE_SORTED_VARIABLE (etssv); - int i; + gint i; e_table_model_pre_change (etm); @@ -164,8 +164,8 @@ etsv_add_all (ETableSubsetVariable *etssv) ETableModel *etm = E_TABLE_MODEL(etssv); ETableSubset *etss = E_TABLE_SUBSET(etssv); ETableSortedVariable *etsv = E_TABLE_SORTED_VARIABLE (etssv); - int rows; - int i; + gint rows; + gint i; e_table_model_pre_change(etm); @@ -217,7 +217,7 @@ static void etsv_sort(ETableSortedVariable *etsv) { ETableSubset *etss = E_TABLE_SUBSET(etsv); - static int reentering = 0; + static gint reentering = 0; if (reentering) return; reentering = 1; diff --git a/widgets/table/e-table-sorted-variable.h b/widgets/table/e-table-sorted-variable.h index 53744dce72..48bb0e3aa0 100644 --- a/widgets/table/e-table-sorted-variable.h +++ b/widgets/table/e-table-sorted-variable.h @@ -46,8 +46,8 @@ typedef struct { ETableHeader *full_header; - int sort_info_changed_id; - int sort_idle_id; + gint sort_info_changed_id; + gint sort_idle_id; int insert_idle_id; int insert_count; diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c index 076863adfb..7eceeb875f 100644 --- a/widgets/table/e-table-sorted.c +++ b/widgets/table/e-table-sorted.c @@ -44,10 +44,10 @@ G_DEFINE_TYPE (ETableSorted, ets, E_TABLE_SUBSET_TYPE) static void ets_sort_info_changed (ETableSortInfo *info, ETableSorted *ets); static void ets_sort (ETableSorted *ets); static void ets_proxy_model_changed (ETableSubset *etss, ETableModel *source); -static void ets_proxy_model_row_changed (ETableSubset *etss, ETableModel *source, int row); -static void ets_proxy_model_cell_changed (ETableSubset *etss, ETableModel *source, int col, int row); -static void ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, int row, int count); -static void ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, int row, int count); +static void ets_proxy_model_row_changed (ETableSubset *etss, ETableModel *source, gint row); +static void ets_proxy_model_cell_changed (ETableSubset *etss, ETableModel *source, gint col, gint row); +static void ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row, gint count); +static void ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row, gint count); static void ets_dispose (GObject *object) @@ -158,7 +158,7 @@ ets_sort_info_changed (ETableSortInfo *info, ETableSorted *ets) static void ets_proxy_model_changed (ETableSubset *subset, ETableModel *source) { - int rows, i; + gint rows, i; rows = e_table_model_row_count(source); @@ -177,7 +177,7 @@ ets_proxy_model_changed (ETableSubset *subset, ETableModel *source) } static void -ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, int row) +ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, gint row) { if (!E_TABLE_SORTED(subset)->sort_idle_id) E_TABLE_SORTED(subset)->sort_idle_id = g_idle_add_full(50, (GSourceFunc) ets_sort_idle, subset, NULL); @@ -187,7 +187,7 @@ ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, int row) } static void -ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, int col, int row) +ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, gint col, gint row) { ETableSorted *ets = E_TABLE_SORTED(subset); if (e_table_sorting_utils_affects_sort(ets->sort_info, ets->full_header, col)) @@ -197,11 +197,11 @@ ets_proxy_model_cell_changed (ETableSubset *subset, ETableModel *source, int col } static void -ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, int row, int count) +ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, gint row, gint count) { ETableModel *etm = E_TABLE_MODEL(etss); ETableSorted *ets = E_TABLE_SORTED(etss); - int i; + gint i; gboolean full_change = FALSE; if (count == 0) { @@ -257,12 +257,12 @@ ets_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *source, int row, } static void -ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, int row, int count) +ets_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *source, gint row, gint count) { ETableModel *etm = E_TABLE_MODEL(etss); - int i; + gint i; gboolean shift; - int j; + gint j; shift = row == etss->n_map - count; @@ -297,7 +297,7 @@ static void ets_sort(ETableSorted *ets) { ETableSubset *etss = E_TABLE_SUBSET(ets); - static int reentering = 0; + static gint reentering = 0; if (reentering) return; reentering = 1; diff --git a/widgets/table/e-table-sorted.h b/widgets/table/e-table-sorted.h index 031d9c9647..cb802768d8 100644 --- a/widgets/table/e-table-sorted.h +++ b/widgets/table/e-table-sorted.h @@ -46,8 +46,8 @@ typedef struct { ETableHeader *full_header; - int sort_info_changed_id; - int sort_idle_id; + gint sort_info_changed_id; + gint sort_idle_id; int insert_idle_id; int insert_count; diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c index 154d5a2581..8851f31209 100644 --- a/widgets/table/e-table-sorter.c +++ b/widgets/table/e-table-sorter.c @@ -45,19 +45,19 @@ G_DEFINE_TYPE (ETableSorter, ets, E_SORTER_TYPE) #define INCREMENT_AMOUNT 100 static void ets_model_changed (ETableModel *etm, ETableSorter *ets); -static void ets_model_row_changed (ETableModel *etm, int row, ETableSorter *ets); -static void ets_model_cell_changed (ETableModel *etm, int col, int row, ETableSorter *ets); -static void ets_model_rows_inserted (ETableModel *etm, int row, int count, ETableSorter *ets); -static void ets_model_rows_deleted (ETableModel *etm, int row, int count, ETableSorter *ets); +static void ets_model_row_changed (ETableModel *etm, gint row, ETableSorter *ets); +static void ets_model_cell_changed (ETableModel *etm, gint col, gint row, ETableSorter *ets); +static void ets_model_rows_inserted (ETableModel *etm, gint row, gint count, ETableSorter *ets); +static void ets_model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSorter *ets); static void ets_sort_info_changed (ETableSortInfo *info, ETableSorter *ets); static void ets_clean (ETableSorter *ets); static void ets_sort (ETableSorter *ets); static void ets_backsort (ETableSorter *ets); -static gint ets_model_to_sorted (ESorter *sorter, int row); -static gint ets_sorted_to_model (ESorter *sorter, int row); -static void ets_get_model_to_sorted_array (ESorter *sorter, int **array, int *count); -static void ets_get_sorted_to_model_array (ESorter *sorter, int **array, int *count); +static gint ets_model_to_sorted (ESorter *sorter, gint row); +static gint ets_sorted_to_model (ESorter *sorter, gint row); +static void ets_get_model_to_sorted_array (ESorter *sorter, gint **array, gint *count); +static void ets_get_sorted_to_model_array (ESorter *sorter, gint **array, gint *count); static gboolean ets_needs_sorting (ESorter *ets); static void @@ -230,25 +230,25 @@ ets_model_changed (ETableModel *etm, ETableSorter *ets) } static void -ets_model_row_changed (ETableModel *etm, int row, ETableSorter *ets) +ets_model_row_changed (ETableModel *etm, gint row, ETableSorter *ets) { ets_clean(ets); } static void -ets_model_cell_changed (ETableModel *etm, int col, int row, ETableSorter *ets) +ets_model_cell_changed (ETableModel *etm, gint col, gint row, ETableSorter *ets) { ets_clean(ets); } static void -ets_model_rows_inserted (ETableModel *etm, int row, int count, ETableSorter *ets) +ets_model_rows_inserted (ETableModel *etm, gint row, gint count, ETableSorter *ets) { ets_clean(ets); } static void -ets_model_rows_deleted (ETableModel *etm, int row, int count, ETableSorter *ets) +ets_model_rows_deleted (ETableModel *etm, gint row, gint count, ETableSorter *ets) { ets_clean(ets); } @@ -261,22 +261,22 @@ ets_sort_info_changed (ETableSortInfo *info, ETableSorter *ets) } static ETableSorter *ets_closure; -static void **vals_closure; -static int cols_closure; -static int *ascending_closure; +static gpointer *vals_closure; +static gint cols_closure; +static gint *ascending_closure; static GCompareFunc *compare_closure; /* FIXME: Make it not cache the second and later columns (as if anyone cares.) */ static int -qsort_callback(const void *data1, const void *data2) +qsort_callback(gconstpointer data1, gconstpointer data2) { - gint row1 = *(int *)data1; - gint row2 = *(int *)data2; - int j; - int sort_count = e_table_sort_info_sorting_get_count(ets_closure->sort_info) + e_table_sort_info_grouping_get_count(ets_closure->sort_info); - int comp_val = 0; - int ascending = 1; + gint row1 = *(gint *)data1; + gint row2 = *(gint *)data2; + gint j; + gint sort_count = e_table_sort_info_sorting_get_count(ets_closure->sort_info) + e_table_sort_info_grouping_get_count(ets_closure->sort_info); + gint comp_val = 0; + gint ascending = 1; for (j = 0; j < sort_count; j++) { comp_val = (*(compare_closure[j]))(vals_closure[cols_closure * row1 + j], vals_closure[cols_closure * row2 + j]); ascending = ascending_closure[j]; @@ -310,11 +310,11 @@ ets_clean(ETableSorter *ets) static void ets_sort(ETableSorter *ets) { - int rows; - int i; - int j; - int cols; - int group_cols; + gint rows; + gint i; + gint j; + gint cols; + gint group_cols; if (ets->sorted) return; @@ -330,7 +330,7 @@ ets_sort(ETableSorter *ets) cols_closure = cols; ets_closure = ets; - vals_closure = g_new(void *, rows * cols); + vals_closure = g_new(gpointer , rows * cols); ascending_closure = g_new(int, cols); compare_closure = g_new(GCompareFunc, cols); @@ -365,7 +365,7 @@ ets_sort(ETableSorter *ets) static void ets_backsort(ETableSorter *ets) { - int i, rows; + gint i, rows; if (ets->backsorted) return; @@ -382,10 +382,10 @@ ets_backsort(ETableSorter *ets) static gint -ets_model_to_sorted (ESorter *es, int row) +ets_model_to_sorted (ESorter *es, gint row) { ETableSorter *ets = E_TABLE_SORTER(es); - int rows = e_table_model_row_count(ets->source); + gint rows = e_table_model_row_count(ets->source); g_return_val_if_fail(row >= 0, -1); g_return_val_if_fail(row < rows, -1); @@ -400,10 +400,10 @@ ets_model_to_sorted (ESorter *es, int row) } static gint -ets_sorted_to_model (ESorter *es, int row) +ets_sorted_to_model (ESorter *es, gint row) { ETableSorter *ets = E_TABLE_SORTER(es); - int rows = e_table_model_row_count(ets->source); + gint rows = e_table_model_row_count(ets->source); g_return_val_if_fail(row >= 0, -1); g_return_val_if_fail(row < rows, -1); @@ -418,7 +418,7 @@ ets_sorted_to_model (ESorter *es, int row) } static void -ets_get_model_to_sorted_array (ESorter *es, int **array, int *count) +ets_get_model_to_sorted_array (ESorter *es, gint **array, gint *count) { ETableSorter *ets = E_TABLE_SORTER(es); if (array || count) { @@ -432,7 +432,7 @@ ets_get_model_to_sorted_array (ESorter *es, int **array, int *count) } static void -ets_get_sorted_to_model_array (ESorter *es, int **array, int *count) +ets_get_sorted_to_model_array (ESorter *es, gint **array, gint *count) { ETableSorter *ets = E_TABLE_SORTER(es); if (array || count) { diff --git a/widgets/table/e-table-sorter.h b/widgets/table/e-table-sorter.h index 245539e36f..067da103f9 100644 --- a/widgets/table/e-table-sorter.h +++ b/widgets/table/e-table-sorter.h @@ -46,18 +46,18 @@ typedef struct { ETableSortInfo *sort_info; /* If needs_sorting is 0, then model_to_sorted and sorted_to_model are no-ops. */ - int needs_sorting; + gint needs_sorting; - int *sorted; - int *backsorted; + gint *sorted; + gint *backsorted; - int table_model_changed_id; - int table_model_row_changed_id; - int table_model_cell_changed_id; - int table_model_rows_inserted_id; - int table_model_rows_deleted_id; - int sort_info_changed_id; - int group_info_changed_id; + gint table_model_changed_id; + gint table_model_row_changed_id; + gint table_model_cell_changed_id; + gint table_model_rows_inserted_id; + gint table_model_rows_deleted_id; + gint sort_info_changed_id; + gint group_info_changed_id; } ETableSorter; typedef struct { diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c index d04144d5ad..a8ab92bf94 100644 --- a/widgets/table/e-table-sorting-utils.c +++ b/widgets/table/e-table-sorting-utils.c @@ -32,12 +32,12 @@ /* This takes source rows. */ static int -etsu_compare(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int row1, int row2) +etsu_compare(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint row1, gint row2) { - int j; - int sort_count = e_table_sort_info_sorting_get_count(sort_info); - int comp_val = 0; - int ascending = 1; + gint j; + gint sort_count = e_table_sort_info_sorting_get_count(sort_info); + gint comp_val = 0; + gint ascending = 1; for (j = 0; j < sort_count; j++) { ETableSortColumn column = e_table_sort_info_sorting_get_nth(sort_info, j); @@ -63,9 +63,9 @@ etsu_compare(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_ } typedef struct { - int cols; - void **vals; - int *ascending; + gint cols; + gpointer *vals; + gint *ascending; GCompareFunc *compare; } ETableSortClosure; @@ -78,15 +78,15 @@ typedef struct { /* FIXME: Make it not cache the second and later columns (as if anyone cares.) */ static int -e_sort_callback(const void *data1, const void *data2, gpointer user_data) +e_sort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data) { - gint row1 = *(int *)data1; - gint row2 = *(int *)data2; + gint row1 = *(gint *)data1; + gint row2 = *(gint *)data2; ETableSortClosure *closure = user_data; - int j; - int sort_count = closure->cols; - int comp_val = 0; - int ascending = 1; + gint j; + gint sort_count = closure->cols; + gint comp_val = 0; + gint ascending = 1; for (j = 0; j < sort_count; j++) { comp_val = (*(closure->compare[j]))(closure->vals[closure->cols * row1 + j], closure->vals[closure->cols * row2 + j]); ascending = closure->ascending[j]; @@ -105,12 +105,12 @@ e_sort_callback(const void *data1, const void *data2, gpointer user_data) } void -e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int *map_table, int rows) +e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows) { - int total_rows; - int i; - int j; - int cols; + gint total_rows; + gint i; + gint j; + gint cols; ETableSortClosure closure; g_return_if_fail(source != NULL); @@ -124,7 +124,7 @@ e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETabl cols = e_table_sort_info_sorting_get_count(sort_info); closure.cols = cols; - closure.vals = g_new(void *, total_rows * cols); + closure.vals = g_new(gpointer , total_rows * cols); closure.ascending = g_new(int, cols); closure.compare = g_new(GCompareFunc, cols); @@ -152,10 +152,10 @@ e_table_sorting_utils_sort(ETableModel *source, ETableSortInfo *sort_info, ETabl gboolean e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info, ETableHeader *full_header, - int col) + gint col) { - int j; - int cols; + gint j; + gint cols; g_return_val_if_fail(sort_info != NULL, TRUE); g_return_val_if_fail(E_IS_TABLE_SORT_INFO(sort_info), TRUE); @@ -178,10 +178,10 @@ e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info, /* FIXME: This could be done in time log n instead of time n with a binary search. */ -int -e_table_sorting_utils_insert(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int *map_table, int rows, int row) +gint +e_table_sorting_utils_insert(ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows, gint row) { - int i; + gint i; i = 0; /* handle insertions when we have a 'sort group' */ @@ -192,11 +192,11 @@ e_table_sorting_utils_insert(ETableModel *source, ETableSortInfo *sort_info, ETa } /* FIXME: This could be done in time log n instead of time n with a binary search. */ -int -e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, int *map_table, int rows, int view_row) +gint +e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, gint *map_table, gint rows, gint view_row) { - int i; - int row; + gint i; + gint row; i = view_row; row = map_table[i]; @@ -221,10 +221,10 @@ e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_ static int etsu_tree_compare(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath path1, ETreePath path2) { - int j; - int sort_count = e_table_sort_info_sorting_get_count(sort_info); - int comp_val = 0; - int ascending = 1; + gint j; + gint sort_count = e_table_sort_info_sorting_get_count(sort_info); + gint comp_val = 0; + gint ascending = 1; for (j = 0; j < sort_count; j++) { ETableSortColumn column = e_table_sort_info_sorting_get_nth(sort_info, j); @@ -244,7 +244,7 @@ etsu_tree_compare(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *f } static int -e_sort_tree_callback(const void *data1, const void *data2, gpointer user_data) +e_sort_tree_callback(gconstpointer data1, gconstpointer data2, gpointer user_data) { ETreePath *path1 = *(ETreePath *)data1; ETreePath *path2 = *(ETreePath *)data2; @@ -254,12 +254,12 @@ e_sort_tree_callback(const void *data1, const void *data2, gpointer user_data) } void -e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, int count) +e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count) { ETableSortClosure closure; - int cols; - int i, j; - int *map; + gint cols; + gint i, j; + gint *map; ETreePath *map_copy; g_return_if_fail(source != NULL); g_return_if_fail(E_IS_TREE_MODEL(source)); @@ -271,7 +271,7 @@ e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, E cols = e_table_sort_info_sorting_get_count(sort_info); closure.cols = cols; - closure.vals = g_new(void *, count * cols); + closure.vals = g_new(gpointer , count * cols); closure.ascending = g_new(int, cols); closure.compare = g_new(GCompareFunc, cols); @@ -315,10 +315,10 @@ e_table_sorting_utils_tree_sort(ETreeModel *source, ETableSortInfo *sort_info, E } /* FIXME: This could be done in time log n instead of time n with a binary search. */ -int -e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, int count, int old_index) +gint +e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count, gint old_index) { - int i; + gint i; ETreePath path; i = old_index; @@ -337,8 +337,8 @@ e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *s } /* FIXME: This does not pay attention to making sure that it's a stable insert. This needs to be fixed. */ -int -e_table_sorting_utils_tree_insert(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, int count, ETreePath path) +gint +e_table_sorting_utils_tree_insert(ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, gint count, ETreePath path) { size_t start; size_t end; diff --git a/widgets/table/e-table-sorting-utils.h b/widgets/table/e-table-sorting-utils.h index a0f43fb232..d348d4b6b1 100644 --- a/widgets/table/e-table-sorting-utils.h +++ b/widgets/table/e-table-sorting-utils.h @@ -31,27 +31,27 @@ G_BEGIN_DECLS #include <table/e-table-header.h> gboolean e_table_sorting_utils_affects_sort (ETableSortInfo *sort_info, ETableHeader *full_header, - int col); + gint col); void e_table_sorting_utils_sort (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, - int *map_table, - int rows); -int e_table_sorting_utils_insert (ETableModel *source, + gint *map_table, + gint rows); +gint e_table_sorting_utils_insert (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, - int *map_table, - int rows, - int row); -int e_table_sorting_utils_check_position (ETableModel *source, + gint *map_table, + gint rows, + gint row); +gint e_table_sorting_utils_check_position (ETableModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, - int *map_table, - int rows, - int view_row); + gint *map_table, + gint rows, + gint view_row); @@ -59,18 +59,18 @@ void e_table_sorting_utils_tree_sort (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, - int count); -int e_table_sorting_utils_tree_check_position (ETreeModel *source, + gint count); +gint e_table_sorting_utils_tree_check_position (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, - int count, - int old_index); -int e_table_sorting_utils_tree_insert (ETreeModel *source, + gint count, + gint old_index); +gint e_table_sorting_utils_tree_insert (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader *full_header, ETreePath *map_table, - int count, + gint count, ETreePath path); G_END_DECLS diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index f966b3ca6f..fd57f5b130 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -45,7 +45,7 @@ static void etsp_finalize (GObject *object) { ETableSpecification *etsp = E_TABLE_SPECIFICATION (object); - int i; + gint i; if (etsp->columns) { for (i = 0; etsp->columns[i]; i++) { @@ -128,7 +128,7 @@ e_table_specification_new (void) */ gboolean e_table_specification_load_from_file (ETableSpecification *specification, - const char *filename) + const gchar *filename) { xmlDoc *doc; @@ -155,10 +155,10 @@ e_table_specification_load_from_file (ETableSpecification *specification, */ gboolean e_table_specification_load_from_string (ETableSpecification *specification, - const char *xml) + const gchar *xml) { xmlDoc *doc; - doc = xmlParseMemory ( (char *) xml, strlen (xml)); + doc = xmlParseMemory ( (gchar *) xml, strlen (xml)); if (doc) { xmlNode *node = xmlDocGetRootElement (doc); e_table_specification_load_from_node (specification, node); @@ -181,29 +181,29 @@ void e_table_specification_load_from_node (ETableSpecification *specification, const xmlNode *node) { - char *temp; + gchar *temp; xmlNode *children; GList *list = NULL, *list2; - int i; - - specification->no_headers = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"no-headers"); - specification->click_to_add = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"click-to-add"); - specification->click_to_add_end = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"click-to-add-end") && specification->click_to_add; - specification->alternating_row_colors = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"alternating-row-colors", TRUE); - specification->horizontal_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"horizontal-draw-grid"); - specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"vertical-draw-grid"); - if (e_xml_get_bool_prop_by_name_with_default(node, (const unsigned char *)"draw-grid", TRUE) == - e_xml_get_bool_prop_by_name_with_default(node, (const unsigned char *)"draw-grid", FALSE)) { + gint i; + + specification->no_headers = e_xml_get_bool_prop_by_name (node, (const guchar *)"no-headers"); + specification->click_to_add = e_xml_get_bool_prop_by_name (node, (const guchar *)"click-to-add"); + specification->click_to_add_end = e_xml_get_bool_prop_by_name (node, (const guchar *)"click-to-add-end") && specification->click_to_add; + specification->alternating_row_colors = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"alternating-row-colors", TRUE); + specification->horizontal_draw_grid = e_xml_get_bool_prop_by_name (node, (const guchar *)"horizontal-draw-grid"); + specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const guchar *)"vertical-draw-grid"); + if (e_xml_get_bool_prop_by_name_with_default(node, (const guchar *)"draw-grid", TRUE) == + e_xml_get_bool_prop_by_name_with_default(node, (const guchar *)"draw-grid", FALSE)) { specification->horizontal_draw_grid = - specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const unsigned char *)"draw-grid"); + specification->vertical_draw_grid = e_xml_get_bool_prop_by_name (node, (const guchar *)"draw-grid"); } - specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"draw-focus", TRUE); - specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"horizontal-scrolling", FALSE); - specification->horizontal_resize = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"horizontal-resize", FALSE); - specification->allow_grouping = e_xml_get_bool_prop_by_name_with_default (node, (const unsigned char *)"allow-grouping", TRUE); + specification->draw_focus = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"draw-focus", TRUE); + specification->horizontal_scrolling = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"horizontal-scrolling", FALSE); + specification->horizontal_resize = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"horizontal-resize", FALSE); + specification->allow_grouping = e_xml_get_bool_prop_by_name_with_default (node, (const guchar *)"allow-grouping", TRUE); specification->selection_mode = GTK_SELECTION_MULTIPLE; - temp = e_xml_get_string_prop_by_name (node, (const unsigned char *)"selection-mode"); + temp = e_xml_get_string_prop_by_name (node, (const guchar *)"selection-mode"); if (temp && !g_ascii_strcasecmp (temp, "single")) { specification->selection_mode = GTK_SELECTION_SINGLE; } else if (temp && !g_ascii_strcasecmp (temp, "browse")) { @@ -214,7 +214,7 @@ e_table_specification_load_from_node (ETableSpecification *specification, g_free (temp); specification->cursor_mode = E_CURSOR_SIMPLE; - temp = e_xml_get_string_prop_by_name (node, (const unsigned char *)"cursor-mode"); + temp = e_xml_get_string_prop_by_name (node, (const guchar *)"cursor-mode"); if (temp && !g_ascii_strcasecmp (temp, "line")) { specification->cursor_mode = E_CURSOR_LINE; } else if (temp && !g_ascii_strcasecmp (temp, "spreadsheet")) { @@ -225,12 +225,12 @@ e_table_specification_load_from_node (ETableSpecification *specification, g_free (specification->click_to_add_message); specification->click_to_add_message = e_xml_get_string_prop_by_name ( - node, (const unsigned char *)"_click-to-add-message"); + node, (const guchar *)"_click-to-add-message"); g_free (specification->domain); specification->domain = e_xml_get_string_prop_by_name ( - node, (const unsigned char *)"gettext-domain"); + node, (const guchar *)"gettext-domain"); if (specification->domain && !*specification->domain) { g_free (specification->domain); specification->domain = NULL; @@ -248,12 +248,12 @@ e_table_specification_load_from_node (ETableSpecification *specification, specification->columns = NULL; for (children = node->xmlChildrenNode; children; children = children->next) { - if (!strcmp ((char *)children->name, "ETableColumn")) { + if (!strcmp ((gchar *)children->name, "ETableColumn")) { ETableColumnSpecification *col_spec = e_table_column_specification_new (); e_table_column_specification_load_from_node (col_spec, children); list = g_list_append (list, col_spec); - } else if (specification->state == NULL && !strcmp ((char *)children->name, "ETableState")) { + } else if (specification->state == NULL && !strcmp ((gchar *)children->name, "ETableState")) { specification->state = e_table_state_new (); e_table_state_load_from_node (specification->state, children); e_table_sort_info_set_can_group (specification->state->sort_info, specification->allow_grouping); @@ -282,18 +282,18 @@ e_table_specification_load_from_node (ETableSpecification *specification, * * Returns: 0 on success or -1 on error. */ -int +gint e_table_specification_save_to_file (ETableSpecification *specification, - const char *filename) + const gchar *filename) { xmlDoc *doc; - int ret; + gint ret; g_return_val_if_fail (specification != NULL, -1); g_return_val_if_fail (filename != NULL, -1); g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), -1); - if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL) + if ((doc = xmlNewDoc ((const guchar *)"1.0")) == NULL) return -1; xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc)); @@ -315,18 +315,18 @@ e_table_specification_save_to_file (ETableSpecification *specification, * representation of @specification. This stringified representation * uses XML as a convenience. */ -char * +gchar * e_table_specification_save_to_string (ETableSpecification *specification) { - char *ret_val; + gchar *ret_val; xmlChar *string; - int length; + gint length; xmlDoc *doc; g_return_val_if_fail (specification != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL); - doc = xmlNewDoc ((const unsigned char *)"1.0"); + doc = xmlNewDoc ((const guchar *)"1.0"); xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc)); xmlDocDumpMemory (doc, &string, &length); @@ -357,17 +357,17 @@ e_table_specification_save_to_node (ETableSpecification *specification, g_return_val_if_fail (specification != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL); - node = xmlNewNode (NULL, (const unsigned char *)"ETableSpecification"); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"no-headers", specification->no_headers); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"click-to-add", specification->click_to_add); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"click-to-add-end", specification->click_to_add_end && specification->click_to_add); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"alternating-row-colors", specification->alternating_row_colors); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-draw-grid", specification->horizontal_draw_grid); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"vertical-draw-grid", specification->vertical_draw_grid); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"draw-focus", specification->draw_focus); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-scrolling", specification->horizontal_scrolling); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"horizontal-resize", specification->horizontal_resize); - e_xml_set_bool_prop_by_name (node, (const unsigned char *)"allow-grouping", specification->allow_grouping); + node = xmlNewNode (NULL, (const guchar *)"ETableSpecification"); + e_xml_set_bool_prop_by_name (node, (const guchar *)"no-headers", specification->no_headers); + e_xml_set_bool_prop_by_name (node, (const guchar *)"click-to-add", specification->click_to_add); + e_xml_set_bool_prop_by_name (node, (const guchar *)"click-to-add-end", specification->click_to_add_end && specification->click_to_add); + e_xml_set_bool_prop_by_name (node, (const guchar *)"alternating-row-colors", specification->alternating_row_colors); + e_xml_set_bool_prop_by_name (node, (const guchar *)"horizontal-draw-grid", specification->horizontal_draw_grid); + e_xml_set_bool_prop_by_name (node, (const guchar *)"vertical-draw-grid", specification->vertical_draw_grid); + e_xml_set_bool_prop_by_name (node, (const guchar *)"draw-focus", specification->draw_focus); + e_xml_set_bool_prop_by_name (node, (const guchar *)"horizontal-scrolling", specification->horizontal_scrolling); + e_xml_set_bool_prop_by_name (node, (const guchar *)"horizontal-resize", specification->horizontal_resize); + e_xml_set_bool_prop_by_name (node, (const guchar *)"allow-grouping", specification->allow_grouping); switch (specification->selection_mode){ case GTK_SELECTION_SINGLE: @@ -380,18 +380,18 @@ e_table_specification_save_to_node (ETableSpecification *specification, case GTK_SELECTION_EXTENDED: s = "extended"; } - xmlSetProp (node, (const unsigned char *)"selection-mode", (unsigned char *)s); + xmlSetProp (node, (const guchar *)"selection-mode", (guchar *)s); if (specification->cursor_mode == E_CURSOR_LINE) s = "line"; else s = "cell"; - xmlSetProp (node, (const unsigned char *)"cursor-mode", (unsigned char *)s); + xmlSetProp (node, (const guchar *)"cursor-mode", (guchar *)s); - xmlSetProp (node, (const unsigned char *)"_click-to-add-message", (unsigned char *)specification->click_to_add_message); - xmlSetProp (node, (const unsigned char *)"gettext-domain", (unsigned char *)specification->domain); + xmlSetProp (node, (const guchar *)"_click-to-add-message", (guchar *)specification->click_to_add_message); + xmlSetProp (node, (const guchar *)"gettext-domain", (guchar *)specification->domain); if (specification->columns){ - int i; + gint i; for (i = 0; specification->columns [i]; i++) e_table_column_specification_save_to_node ( @@ -417,7 +417,7 @@ ETableSpecification * e_table_specification_duplicate (ETableSpecification *spec) { ETableSpecification *new_spec; - char *spec_str; + gchar *spec_str; g_return_val_if_fail (spec != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (spec), NULL); diff --git a/widgets/table/e-table-specification.h b/widgets/table/e-table-specification.h index 580cbc6ba3..c2ca7a018d 100644 --- a/widgets/table/e-table-specification.h +++ b/widgets/table/e-table-specification.h @@ -59,8 +59,8 @@ typedef struct { GtkSelectionMode selection_mode; ECursorMode cursor_mode; - char *click_to_add_message; - char *domain; + gchar *click_to_add_message; + gchar *domain; } ETableSpecification; typedef struct { @@ -71,15 +71,15 @@ GType e_table_specification_get_type (void); ETableSpecification *e_table_specification_new (void); gboolean e_table_specification_load_from_file (ETableSpecification *specification, - const char *filename); + const gchar *filename); gboolean e_table_specification_load_from_string (ETableSpecification *specification, - const char *xml); + const gchar *xml); void e_table_specification_load_from_node (ETableSpecification *specification, const xmlNode *node); -int e_table_specification_save_to_file (ETableSpecification *specification, - const char *filename); -char *e_table_specification_save_to_string (ETableSpecification *specification); +gint e_table_specification_save_to_file (ETableSpecification *specification, + const gchar *filename); +gchar *e_table_specification_save_to_string (ETableSpecification *specification); xmlNode *e_table_specification_save_to_node (ETableSpecification *specification, xmlDoc *doc); ETableSpecification *e_table_specification_duplicate (ETableSpecification *spec); diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index e9440ecd55..6cbdcbacb9 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -94,10 +94,10 @@ e_table_state_new (void) } ETableState * -e_table_state_vanilla (int col_count) +e_table_state_vanilla (gint col_count) { GString *str; - int i; + gint i; ETableState *res; str = g_string_new ("<ETableState>\n"); @@ -115,7 +115,7 @@ e_table_state_vanilla (int col_count) gboolean e_table_state_load_from_file (ETableState *state, - const char *filename) + const gchar *filename) { xmlDoc *doc; @@ -131,11 +131,11 @@ e_table_state_load_from_file (ETableState *state, void e_table_state_load_from_string (ETableState *state, - const char *xml) + const gchar *xml) { xmlDoc *doc; - doc = xmlParseMemory ((char *) xml, strlen(xml)); + doc = xmlParseMemory ((gchar *) xml, strlen(xml)); if (doc) { xmlNode *node = xmlDocGetRootElement(doc); e_table_state_load_from_node(state, node); @@ -144,7 +144,7 @@ e_table_state_load_from_string (ETableState *state, } typedef struct { - int column; + gint column; double expansion; } int_and_double; @@ -155,10 +155,10 @@ e_table_state_load_from_node (ETableState *state, xmlNode *children; GList *list = NULL, *iterator; gdouble state_version; - int i; + gint i; state_version = e_xml_get_double_prop_by_name_with_default ( - node, (const unsigned char *)"state-version", STATE_VERSION); + node, (const guchar *)"state-version", STATE_VERSION); if (state->sort_info) g_object_unref (state->sort_info); @@ -166,18 +166,18 @@ e_table_state_load_from_node (ETableState *state, state->sort_info = NULL; children = node->xmlChildrenNode; for (; children; children = children->next) { - if (!strcmp ((char *)children->name, "column")) { + if (!strcmp ((gchar *)children->name, "column")) { int_and_double *column_info = g_new(int_and_double, 1); column_info->column = e_xml_get_integer_prop_by_name( - children, (const unsigned char *)"source"); + children, (const guchar *)"source"); column_info->expansion = e_xml_get_double_prop_by_name_with_default( - children, (const unsigned char *)"expansion", 1); + children, (const guchar *)"expansion", 1); list = g_list_append (list, column_info); } else if (state->sort_info == NULL && - !strcmp ((char *)children->name, "grouping")) { + !strcmp ((gchar *)children->name, "grouping")) { state->sort_info = e_table_sort_info_new(); e_table_sort_info_load_from_node( state->sort_info, children, state_version); @@ -205,11 +205,11 @@ e_table_state_load_from_node (ETableState *state, void e_table_state_save_to_file (ETableState *state, - const char *filename) + const gchar *filename) { xmlDoc *doc; - if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL) + if ((doc = xmlNewDoc ((const guchar *)"1.0")) == NULL) return; xmlDocSetRootElement (doc, e_table_state_save_to_node (state, NULL)); @@ -219,15 +219,15 @@ e_table_state_save_to_file (ETableState *state, xmlFreeDoc (doc); } -char * +gchar * e_table_state_save_to_string (ETableState *state) { - char *ret_val; + gchar *ret_val; xmlChar *string; - int length; + gint length; xmlDoc *doc; - doc = xmlNewDoc((const unsigned char *)"1.0"); + doc = xmlNewDoc((const guchar *)"1.0"); xmlDocSetRootElement(doc, e_table_state_save_to_node(state, NULL)); xmlDocDumpMemory(doc, &string, &length); xmlFreeDoc(doc); @@ -241,25 +241,25 @@ xmlNode * e_table_state_save_to_node (ETableState *state, xmlNode *parent) { - int i; + gint i; xmlNode *node; if (parent) - node = xmlNewChild (parent, NULL, (const unsigned char *)"ETableState", NULL); + node = xmlNewChild (parent, NULL, (const guchar *)"ETableState", NULL); else - node = xmlNewNode (NULL, (const unsigned char *)"ETableState"); + node = xmlNewNode (NULL, (const guchar *)"ETableState"); - e_xml_set_double_prop_by_name(node, (const unsigned char *)"state-version", STATE_VERSION); + e_xml_set_double_prop_by_name(node, (const guchar *)"state-version", STATE_VERSION); for (i = 0; i < state->col_count; i++) { - int column = state->columns[i]; + gint column = state->columns[i]; double expansion = state->expansions[i]; xmlNode *new_node; - new_node = xmlNewChild(node, NULL, (const unsigned char *)"column", NULL); - e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"source", column); + new_node = xmlNewChild(node, NULL, (const guchar *)"column", NULL); + e_xml_set_integer_prop_by_name (new_node, (const guchar *)"source", column); if (expansion >= -1) - e_xml_set_double_prop_by_name(new_node, (const unsigned char *)"expansion", expansion); + e_xml_set_double_prop_by_name(new_node, (const guchar *)"expansion", expansion); } @@ -280,7 +280,7 @@ ETableState * e_table_state_duplicate (ETableState *state) { ETableState *new_state; - char *copy; + gchar *copy; g_return_val_if_fail (state != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_STATE (state), NULL); diff --git a/widgets/table/e-table-state.h b/widgets/table/e-table-state.h index 7a320c56ba..da3f11b93c 100644 --- a/widgets/table/e-table-state.h +++ b/widgets/table/e-table-state.h @@ -40,8 +40,8 @@ typedef struct { GObject base; ETableSortInfo *sort_info; - int col_count; - int *columns; + gint col_count; + gint *columns; double *expansions; } ETableState; @@ -52,18 +52,18 @@ typedef struct { GType e_table_state_get_type (void); ETableState *e_table_state_new (void); -ETableState *e_table_state_vanilla (int col_count); +ETableState *e_table_state_vanilla (gint col_count); gboolean e_table_state_load_from_file (ETableState *state, - const char *filename); + const gchar *filename); void e_table_state_load_from_string (ETableState *state, - const char *xml); + const gchar *xml); void e_table_state_load_from_node (ETableState *state, const xmlNode *node); void e_table_state_save_to_file (ETableState *state, - const char *filename); -char *e_table_state_save_to_string (ETableState *state); + const gchar *filename); +gchar *e_table_state_save_to_string (ETableState *state); xmlNode *e_table_state_save_to_node (ETableState *state, xmlNode *parent); ETableState *e_table_state_duplicate (ETableState *state); diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c index b088d8302a..93faeac0f8 100644 --- a/widgets/table/e-table-subset-variable.c +++ b/widgets/table/e-table-subset-variable.c @@ -63,7 +63,7 @@ etssv_add_array (ETableSubsetVariable *etssv, { ETableModel *etm = E_TABLE_MODEL(etssv); ETableSubset *etss = E_TABLE_SUBSET(etssv); - int i; + gint i; e_table_model_pre_change(etm); @@ -82,8 +82,8 @@ etssv_add_all (ETableSubsetVariable *etssv) { ETableModel *etm = E_TABLE_MODEL(etssv); ETableSubset *etss = E_TABLE_SUBSET(etssv); - int rows; - int i; + gint rows; + gint i; e_table_model_pre_change(etm); @@ -104,7 +104,7 @@ etssv_remove (ETableSubsetVariable *etssv, { ETableModel *etm = E_TABLE_MODEL(etssv); ETableSubset *etss = E_TABLE_SUBSET(etssv); - int i; + gint i; for (i = 0; i < etss->n_map; i++){ if (etss->map_table[i] == row) { @@ -213,7 +213,7 @@ e_table_subset_variable_clear (ETableSubsetVariable *etssv) e_table_model_pre_change (etm); etss->n_map = 0; g_free (etss->map_table); - etss->map_table = (int *)g_new (unsigned int, 1); + etss->map_table = (gint *)g_new (unsigned int, 1); etssv->n_vals_allocated = 1; e_table_model_changed (etm); @@ -224,7 +224,7 @@ e_table_subset_variable_increment (ETableSubsetVariable *etssv, gint position, gint amount) { - int i; + gint i; ETableSubset *etss = E_TABLE_SUBSET(etssv); for (i = 0; i < etss->n_map; i++) { if (etss->map_table[i] >= position) @@ -237,7 +237,7 @@ e_table_subset_variable_decrement (ETableSubsetVariable *etssv, gint position, gint amount) { - int i; + gint i; ETableSubset *etss = E_TABLE_SUBSET(etssv); for (i = 0; i < etss->n_map; i++) { if (etss->map_table[i] >= position) diff --git a/widgets/table/e-table-subset-variable.h b/widgets/table/e-table-subset-variable.h index 1aed0d3cb3..4654fb5d67 100644 --- a/widgets/table/e-table-subset-variable.h +++ b/widgets/table/e-table-subset-variable.h @@ -38,7 +38,7 @@ G_BEGIN_DECLS typedef struct { ETableSubset base; - int n_vals_allocated; + gint n_vals_allocated; } ETableSubsetVariable; typedef struct { diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c index 1cec532d03..bf137e0ef8 100644 --- a/widgets/table/e-table-subset.c +++ b/widgets/table/e-table-subset.c @@ -33,10 +33,10 @@ static void etss_proxy_model_pre_change_real (ETableSubset *etss, ETableModel *etm); static void etss_proxy_model_no_change_real (ETableSubset *etss, ETableModel *etm); static void etss_proxy_model_changed_real (ETableSubset *etss, ETableModel *etm); -static void etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, int row); -static void etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, int col, int row); -static void etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, int row, int count); -static void etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, int row, int count); +static void etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, gint row); +static void etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, gint col, gint row); +static void etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count); +static void etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count); #define d(x) @@ -50,15 +50,15 @@ G_DEFINE_TYPE (ETableSubset, etss, E_TABLE_MODEL_TYPE) #define MAP_ROW(etss, row) (row == -1 ? -1 : etss->map_table[row]) static gint -etss_get_view_row (ETableSubset *etss, int row) +etss_get_view_row (ETableSubset *etss, gint row) { - const int n = etss->n_map; - const int * const map_table = etss->map_table; - int i; + const gint n = etss->n_map; + const gint * const map_table = etss->map_table; + gint i; - int end = MIN(etss->n_map, etss->last_access + 10); - int start = MAX(0, etss->last_access - 10); - int initial = MAX (MIN (etss->last_access, end), start); + gint end = MIN(etss->n_map, etss->last_access + 10); + gint start = MAX(0, etss->last_access - 10); + gint initial = MAX (MIN (etss->last_access, end), start); for (i = initial; i < end; i++) { if (map_table [i] == row){ @@ -147,8 +147,8 @@ etss_row_count (ETableModel *etm) return etss->n_map; } -static void * -etss_value_at (ETableModel *etm, int col, int row) +static gpointer +etss_value_at (ETableModel *etm, gint col, gint row) { ETableSubset *etss = (ETableSubset *)etm; @@ -160,7 +160,7 @@ etss_value_at (ETableModel *etm, int col, int row) } static void -etss_set_value_at (ETableModel *etm, int col, int row, const void *val) +etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { ETableSubset *etss = (ETableSubset *)etm; @@ -172,7 +172,7 @@ etss_set_value_at (ETableModel *etm, int col, int row, const void *val) } static gboolean -etss_is_cell_editable (ETableModel *etm, int col, int row) +etss_is_cell_editable (ETableModel *etm, gint col, gint row) { ETableSubset *etss = (ETableSubset *)etm; @@ -187,8 +187,8 @@ etss_has_save_id (ETableModel *etm) return TRUE; } -static char * -etss_get_save_id (ETableModel *etm, int row) +static gchar * +etss_get_save_id (ETableModel *etm, gint row) { ETableSubset *etss = (ETableSubset *)etm; @@ -201,14 +201,14 @@ etss_get_save_id (ETableModel *etm, int row) } static void -etss_append_row (ETableModel *etm, ETableModel *source, int row) +etss_append_row (ETableModel *etm, ETableModel *source, gint row) { ETableSubset *etss = (ETableSubset *)etm; e_table_model_append_row (etss->source, source, row); } -static void * -etss_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { ETableSubset *etss = (ETableSubset *)etm; @@ -216,15 +216,15 @@ etss_duplicate_value (ETableModel *etm, int col, const void *value) } static void -etss_free_value (ETableModel *etm, int col, void *value) +etss_free_value (ETableModel *etm, gint col, gpointer value) { ETableSubset *etss = (ETableSubset *)etm; e_table_model_free_value (etss->source, col, value); } -static void * -etss_initialize_value (ETableModel *etm, int col) +static gpointer +etss_initialize_value (ETableModel *etm, gint col) { ETableSubset *etss = (ETableSubset *)etm; @@ -232,15 +232,15 @@ etss_initialize_value (ETableModel *etm, int col) } static gboolean -etss_value_is_empty (ETableModel *etm, int col, const void *value) +etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ETableSubset *etss = (ETableSubset *)etm; return e_table_model_value_is_empty (etss->source, col, value); } -static char * -etss_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +etss_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ETableSubset *etss = (ETableSubset *)etm; @@ -307,9 +307,9 @@ etss_proxy_model_changed_real (ETableSubset *etss, ETableModel *etm) } static void -etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, int row) +etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, gint row) { - int view_row = etss_get_view_row (etss, row); + gint view_row = etss_get_view_row (etss, row); if (view_row != -1) e_table_model_row_changed (E_TABLE_MODEL (etss), view_row); else @@ -317,9 +317,9 @@ etss_proxy_model_row_changed_real (ETableSubset *etss, ETableModel *etm, int row } static void -etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, int col, int row) +etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, gint col, gint row) { - int view_row = etss_get_view_row (etss, row); + gint view_row = etss_get_view_row (etss, row); if (view_row != -1) e_table_model_cell_changed (E_TABLE_MODEL (etss), col, view_row); else @@ -327,13 +327,13 @@ etss_proxy_model_cell_changed_real (ETableSubset *etss, ETableModel *etm, int co } static void -etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, int row, int count) +etss_proxy_model_rows_inserted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count) { e_table_model_no_change (E_TABLE_MODEL (etss)); } static void -etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, int row, int count) +etss_proxy_model_rows_deleted_real (ETableSubset *etss, ETableModel *etm, gint row, gint count) { e_table_model_no_change (E_TABLE_MODEL (etss)); } @@ -360,46 +360,46 @@ etss_proxy_model_changed (ETableModel *etm, ETableSubset *etss) } static void -etss_proxy_model_row_changed (ETableModel *etm, int row, ETableSubset *etss) +etss_proxy_model_row_changed (ETableModel *etm, gint row, ETableSubset *etss) { if (ETSS_CLASS(etss)->proxy_model_row_changed) (ETSS_CLASS(etss)->proxy_model_row_changed) (etss, etm, row); } static void -etss_proxy_model_cell_changed (ETableModel *etm, int row, int col, ETableSubset *etss) +etss_proxy_model_cell_changed (ETableModel *etm, gint row, gint col, ETableSubset *etss) { if (ETSS_CLASS(etss)->proxy_model_cell_changed) (ETSS_CLASS(etss)->proxy_model_cell_changed) (etss, etm, col, row); } static void -etss_proxy_model_rows_inserted (ETableModel *etm, int row, int col, ETableSubset *etss) +etss_proxy_model_rows_inserted (ETableModel *etm, gint row, gint col, ETableSubset *etss) { if (ETSS_CLASS(etss)->proxy_model_rows_inserted) (ETSS_CLASS(etss)->proxy_model_rows_inserted) (etss, etm, row, col); } static void -etss_proxy_model_rows_deleted (ETableModel *etm, int row, int col, ETableSubset *etss) +etss_proxy_model_rows_deleted (ETableModel *etm, gint row, gint col, ETableSubset *etss) { if (ETSS_CLASS(etss)->proxy_model_rows_deleted) (ETSS_CLASS(etss)->proxy_model_rows_deleted) (etss, etm, row, col); } ETableModel * -e_table_subset_construct (ETableSubset *etss, ETableModel *source, int nvals) +e_table_subset_construct (ETableSubset *etss, ETableModel *source, gint nvals) { - unsigned int *buffer; - int i; + guint *buffer; + gint i; if (nvals) { - buffer = (unsigned int *) g_malloc (sizeof (unsigned int) * nvals); + buffer = (guint *) g_malloc (sizeof (unsigned int) * nvals); if (buffer == NULL) return NULL; } else buffer = NULL; - etss->map_table = (int *)buffer; + etss->map_table = (gint *)buffer; etss->n_map = nvals; etss->source = source; g_object_ref (source); @@ -427,7 +427,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, int nvals) } ETableModel * -e_table_subset_new (ETableModel *source, const int nvals) +e_table_subset_new (ETableModel *source, const gint nvals) { ETableSubset *etss = g_object_new (E_TABLE_SUBSET_TYPE, NULL); @@ -439,11 +439,11 @@ e_table_subset_new (ETableModel *source, const int nvals) return (ETableModel *) etss; } -int +gint e_table_subset_model_to_view_row (ETableSubset *ets, - int model_row) + gint model_row) { - int i; + gint i; for (i = 0; i < ets->n_map; i++) { if (ets->map_table[i] == model_row) return i; @@ -451,9 +451,9 @@ e_table_subset_model_to_view_row (ETableSubset *ets, return -1; } -int +gint e_table_subset_view_to_model_row (ETableSubset *ets, - int view_row) + gint view_row) { if (view_row >= 0 && view_row < ets->n_map) return ets->map_table[view_row]; @@ -476,7 +476,7 @@ e_table_subset_get_toplevel (ETableSubset *table) void e_table_subset_print_debugging (ETableSubset *table_model) { - int i; + gint i; for (i = 0; i < table_model->n_map; i++) { g_print("%8d\n", table_model->map_table[i]); } diff --git a/widgets/table/e-table-subset.h b/widgets/table/e-table-subset.h index 83c9af4d99..dd345732e2 100644 --- a/widgets/table/e-table-subset.h +++ b/widgets/table/e-table-subset.h @@ -41,18 +41,18 @@ typedef struct { ETableModel base; ETableModel *source; - int n_map; - int *map_table; - - int last_access; - - int table_model_pre_change_id; - int table_model_no_change_id; - int table_model_changed_id; - int table_model_row_changed_id; - int table_model_cell_changed_id; - int table_model_rows_inserted_id; - int table_model_rows_deleted_id; + gint n_map; + gint *map_table; + + gint last_access; + + gint table_model_pre_change_id; + gint table_model_no_change_id; + gint table_model_changed_id; + gint table_model_row_changed_id; + gint table_model_cell_changed_id; + gint table_model_rows_inserted_id; + gint table_model_rows_deleted_id; } ETableSubset; typedef struct { @@ -61,23 +61,23 @@ typedef struct { void (*proxy_model_pre_change) (ETableSubset *etss, ETableModel *etm); void (*proxy_model_no_change) (ETableSubset *etss, ETableModel *etm); void (*proxy_model_changed) (ETableSubset *etss, ETableModel *etm); - void (*proxy_model_row_changed) (ETableSubset *etss, ETableModel *etm, int row); - void (*proxy_model_cell_changed) (ETableSubset *etss, ETableModel *etm, int col, int row); - void (*proxy_model_rows_inserted) (ETableSubset *etss, ETableModel *etm, int row, int count); - void (*proxy_model_rows_deleted) (ETableSubset *etss, ETableModel *etm, int row, int count); + void (*proxy_model_row_changed) (ETableSubset *etss, ETableModel *etm, gint row); + void (*proxy_model_cell_changed) (ETableSubset *etss, ETableModel *etm, gint col, gint row); + void (*proxy_model_rows_inserted) (ETableSubset *etss, ETableModel *etm, gint row, gint count); + void (*proxy_model_rows_deleted) (ETableSubset *etss, ETableModel *etm, gint row, gint count); } ETableSubsetClass; GType e_table_subset_get_type (void); ETableModel *e_table_subset_new (ETableModel *etm, - int n_vals); + gint n_vals); ETableModel *e_table_subset_construct (ETableSubset *ets, ETableModel *source, - int nvals); + gint nvals); -int e_table_subset_model_to_view_row (ETableSubset *ets, - int model_row); -int e_table_subset_view_to_model_row (ETableSubset *ets, - int view_row); +gint e_table_subset_model_to_view_row (ETableSubset *ets, + gint model_row); +gint e_table_subset_view_to_model_row (ETableSubset *ets, + gint view_row); ETableModel *e_table_subset_get_toplevel (ETableSubset *table_model); diff --git a/widgets/table/e-table-tooltip.h b/widgets/table/e-table-tooltip.h index 5b2acbf584..27dcf26db2 100644 --- a/widgets/table/e-table-tooltip.h +++ b/widgets/table/e-table-tooltip.h @@ -29,10 +29,10 @@ G_BEGIN_DECLS typedef struct { gint timer; - int col, row; - int row_height; - int x, y; - int cx, cy; + gint col, row; + gint row_height; + gint x, y; + gint cx, cy; GdkColor *foreground; GdkColor *background; GnomeCanvasItem *eti; diff --git a/widgets/table/e-table-tree.h b/widgets/table/e-table-tree.h index 864359bf33..178c2a3ba2 100644 --- a/widgets/table/e-table-tree.h +++ b/widgets/table/e-table-tree.h @@ -29,7 +29,7 @@ G_BEGIN_DECLS typedef struct { - char *title; + gchar *title; union { ETableModel *table; @@ -40,8 +40,8 @@ typedef struct { guint is_leaf :1; } ETableGroup; -ETableGroup *e_table_group_new (const char *title, ETableModel *table); -ETableGroup *e_table_group_new_leaf (const char *title); +ETableGroup *e_table_group_new (const gchar *title, ETableModel *table); +ETableGroup *e_table_group_new_leaf (const gchar *title); G_END_DECLS diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c index 6e87a2a6ce..784f1f5b66 100644 --- a/widgets/table/e-table-utils.c +++ b/widgets/table/e-table-utils.c @@ -36,8 +36,8 @@ ETableHeader * e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableState *state) { ETableHeader *nh; - const int max_cols = e_table_header_count (full_header); - int column; + const gint max_cols = e_table_header_count (full_header); + gint column; GValue *val = g_new0 (GValue, 1); g_return_val_if_fail (widget, NULL); @@ -51,7 +51,7 @@ e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableSta g_free (val); for (column = 0; column < state->col_count; column++) { - int col; + gint col; double expansion; ETableCol *table_col; @@ -75,7 +75,7 @@ e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableSta static ETableCol * et_col_spec_to_col (ETableColumnSpecification *col_spec, ETableExtras *ete, - const char *domain) + const gchar *domain) { ETableCol *col = NULL; ECell *cell = NULL; @@ -90,7 +90,7 @@ et_col_spec_to_col (ETableColumnSpecification *col_spec, search = e_table_extras_get_search(ete, col_spec->search); if (cell && compare) { - char *title = dgettext (domain, col_spec->title); + gchar *title = dgettext (domain, col_spec->title); title = g_strdup (title); @@ -132,7 +132,7 @@ e_table_spec_to_full_header (ETableSpecification *spec, ETableExtras *ete) { ETableHeader *nh; - int column; + gint column; g_return_val_if_fail (spec, NULL); g_return_val_if_fail (ete, NULL); @@ -161,8 +161,8 @@ check_col (ETableCol *col, gpointer user_data) ETableCol * e_table_util_calculate_current_search_col (ETableHeader *header, ETableHeader *full_header, ETableSortInfo *sort_info, gboolean always_search) { - int i; - int count; + gint i; + gint count; ETableCol *col = NULL; count = e_table_sort_info_grouping_get_count (sort_info); for (i = 0; i < count; i++) { diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c index 7d9c5bfce7..6b856274a4 100644 --- a/widgets/table/e-table-without.c +++ b/widgets/table/e-table-without.c @@ -47,14 +47,14 @@ struct _ETableWithoutPrivate { ETableWithoutFreeKeyFunc free_gotten_key_func; ETableWithoutFreeKeyFunc free_duplicated_key_func; - void *closure; + gpointer closure; }; static gboolean -check (ETableWithout *etw, int model_row) +check (ETableWithout *etw, gint model_row) { gboolean ret_val; - void *key; + gpointer key; ETableSubset *etss = E_TABLE_SUBSET (etw); if (etw->priv->get_key_func) @@ -68,10 +68,10 @@ check (ETableWithout *etw, int model_row) } static gboolean -check_with_key (ETableWithout *etw, void *key, int model_row) +check_with_key (ETableWithout *etw, gpointer key, gint model_row) { gboolean ret_val; - void *key2; + gpointer key2; ETableSubset *etss = E_TABLE_SUBSET (etw); if (etw->priv->get_key_func) @@ -88,14 +88,14 @@ check_with_key (ETableWithout *etw, void *key, int model_row) } static gint -etw_view_to_model_row (ETableWithout *etw, int view_row) +etw_view_to_model_row (ETableWithout *etw, gint view_row) { ETableSubset *etss = E_TABLE_SUBSET (etw); return etss->map_table[view_row]; } static void -add_row (ETableWithout *etw, int model_row) +add_row (ETableWithout *etw, gint model_row) { ETableSubset *etss = E_TABLE_SUBSET (etw); @@ -109,7 +109,7 @@ add_row (ETableWithout *etw, int model_row) } static void -remove_row (ETableWithout *etw, int view_row) +remove_row (ETableWithout *etw, gint view_row) { ETableSubset *etss = E_TABLE_SUBSET (etw); @@ -149,9 +149,9 @@ etw_dispose (GObject *object) } static void -etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, int model_row, int count) +etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, gint model_row, gint count) { - int i; + gint i; ETableWithout *etw = E_TABLE_WITHOUT (etss); gboolean shift = FALSE; @@ -177,9 +177,9 @@ etw_proxy_model_rows_inserted (ETableSubset *etss, ETableModel *etm, int model_r } static void -etw_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *etm, int model_row, int count) +etw_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *etm, gint model_row, gint count) { - int i; /* View row */ + gint i; /* View row */ ETableWithout *etw = E_TABLE_WITHOUT (etss); gboolean shift = FALSE; @@ -201,9 +201,9 @@ etw_proxy_model_rows_deleted (ETableSubset *etss, ETableModel *etm, int model_ro static void etw_proxy_model_changed (ETableSubset *etss, ETableModel *etm) { - int i; /* Model row */ - int j; /* View row */ - int row_count; + gint i; /* Model row */ + gint j; /* View row */ + gint row_count; ETableWithout *etw = E_TABLE_WITHOUT (etss); g_free (etss->map_table); @@ -306,7 +306,7 @@ e_table_without_new (ETableModel *source, void e_table_without_hide (ETableWithout *etw, void *key) { - int i; /* View row */ + gint i; /* View row */ ETableSubset *etss = E_TABLE_SUBSET (etw); if (etw->priv->duplicate_key_func) @@ -325,7 +325,7 @@ void e_table_without_hide (ETableWithout *etw, void e_table_without_hide_adopt (ETableWithout *etw, void *key) { - int i; /* View row */ + gint i; /* View row */ ETableSubset *etss = E_TABLE_SUBSET (etw); g_hash_table_insert (etw->priv->hash, key, key); @@ -341,10 +341,10 @@ void e_table_without_show (ETableWithout *etw, void *key) { - int i; /* Model row */ + gint i; /* Model row */ ETableSubset *etss = E_TABLE_SUBSET (etw); - int count; - void *old_key; + gint count; + gpointer old_key; count = e_table_model_row_count (etss->source); @@ -365,8 +365,8 @@ e_table_without_show (ETableWithout *etw, void e_table_without_show_all (ETableWithout *etw) { - int i; /* Model row */ - int row_count; + gint i; /* Model row */ + gint row_count; ETableSubset *etss = E_TABLE_SUBSET (etw); e_table_model_pre_change (E_TABLE_MODEL (etw)); diff --git a/widgets/table/e-table-without.h b/widgets/table/e-table-without.h index c43bdab332..e4aabbd64d 100644 --- a/widgets/table/e-table-without.h +++ b/widgets/table/e-table-without.h @@ -38,10 +38,10 @@ extern "C" { #define E_IS_TABLE_WITHOUT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_WITHOUT_TYPE)) typedef struct _ETableWithoutPrivate ETableWithoutPrivate; -typedef void *(*ETableWithoutGetKeyFunc) (ETableModel *source, - int row, +typedef gpointer (*ETableWithoutGetKeyFunc) (ETableModel *source, + gint row, void *closure); -typedef void *(*ETableWithoutDuplicateKeyFunc) (const void *key, +typedef gpointer (*ETableWithoutDuplicateKeyFunc) (const void *key, void *closure); typedef void (*ETableWithoutFreeKeyFunc) (void *key, void *closure); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index b48fd454f1..1c86a4415c 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -253,7 +253,7 @@ expansion_changed (ETableHeader *header, ETable *et) } static void -dimension_changed (ETableHeader *header, int total_width, ETable *et) +dimension_changed (ETableHeader *header, gint total_width, ETable *et) { set_header_width (et); } @@ -405,9 +405,9 @@ et_unrealize (GtkWidget *widget) } static gboolean -check_row (ETable *et, int model_row, int col, ETableSearchFunc search, char *string) +check_row (ETable *et, gint model_row, gint col, ETableSearchFunc search, gchar *string) { - const void *value; + gconstpointer value; value = e_table_model_value_at (et->model, col, model_row); @@ -415,11 +415,11 @@ check_row (ETable *et, int model_row, int col, ETableSearchFunc search, char *st } static gboolean -et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, ETable *et) +et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags, ETable *et) { - int cursor; - int rows; - int i; + gint cursor; + gint rows; + gint i; ETableCol *col = current_search_col (et); if (col == NULL) @@ -437,7 +437,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E cursor = e_sorter_model_to_sorted (E_SORTER (et->sorter), cursor); for (i = cursor + 1; i < rows; i++) { - int model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i); + gint model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i); if (check_row (et, model_row, col->col_idx, col->search, string)) { e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->selection), model_row, col->col_idx, GDK_CONTROL_MASK); return TRUE; @@ -445,7 +445,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E } for (i = 0; i < cursor; i++) { - int model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i); + gint model_row = e_sorter_sorted_to_model (E_SORTER (et->sorter), i); if (check_row (et, model_row, col->col_idx, col->search, string)) { e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->selection), model_row, col->col_idx, GDK_CONTROL_MASK); return TRUE; @@ -461,7 +461,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E static void et_search_accept (ETableSearch *search, ETable *et) { - int cursor; + gint cursor; ETableCol *col = current_search_col (et); if (col == NULL) @@ -651,7 +651,7 @@ sort_info_changed (ETableSortInfo *info, ETable *et) static void e_table_setup_header (ETable *e_table) { - char *pointer; + gchar *pointer; e_table->header_canvas = GNOME_CANVAS (e_canvas_new ()); gtk_widget_show (GTK_WIDGET (e_table->header_canvas)); @@ -740,7 +740,7 @@ table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table) } static void -click_to_add_cursor_change (ETableClickToAdd *etcta, int row, int col, ETable *et) +click_to_add_cursor_change (ETableClickToAdd *etcta, gint row, gint col, ETable *et) { if (et->cursor_loc == E_TABLE_CURSOR_LOC_TABLE) { e_selection_model_clear(E_SELECTION_MODEL (et->selection)); @@ -749,7 +749,7 @@ click_to_add_cursor_change (ETableClickToAdd *etcta, int row, int col, ETable *e } static void -group_cursor_change (ETableGroup *etg, int row, ETable *et) +group_cursor_change (ETableGroup *etg, gint row, ETable *et) { ETableCursorLoc old_cursor_loc; @@ -763,39 +763,39 @@ group_cursor_change (ETableGroup *etg, int row, ETable *et) } static void -group_cursor_activated (ETableGroup *etg, int row, ETable *et) +group_cursor_activated (ETableGroup *etg, gint row, ETable *et) { g_signal_emit (G_OBJECT (et), et_signals [CURSOR_ACTIVATED], 0, row); } static void -group_double_click (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et) +group_double_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { g_signal_emit (G_OBJECT (et), et_signals [DOUBLE_CLICK], 0, row, col, event); } static gint -group_right_click (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et) +group_right_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - int return_val = 0; + gint return_val = 0; g_signal_emit (G_OBJECT (et), et_signals [RIGHT_CLICK], 0, row, col, event, &return_val); return return_val; } static gint -group_click (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et) +group_click (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - int return_val = 0; + gint return_val = 0; g_signal_emit (G_OBJECT (et), et_signals [CLICK], 0, row, col, event, &return_val); return return_val; } static gint -group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et) +group_key_press (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - int return_val = 0; + gint return_val = 0; GdkEventKey *key = (GdkEventKey *) event; - int y, row_local, col_local; + gint y, row_local, col_local; GtkAdjustment *vadj; switch (key->keyval) { @@ -849,9 +849,9 @@ group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et } static gint -group_start_drag (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et) +group_start_drag (ETableGroup *etg, gint row, gint col, GdkEvent *event, ETable *et) { - int return_val = 0; + gint return_val = 0; g_signal_emit (G_OBJECT (et), et_signals [START_DRAG], 0, row, col, event, &return_val); return return_val; @@ -869,7 +869,7 @@ et_table_model_changed (ETableModel *model, ETable *et) } static void -et_table_row_changed (ETableModel *table_model, int row, ETable *et) +et_table_row_changed (ETableModel *table_model, gint row, ETable *et) { if (!et->need_rebuild) { if (e_table_group_remove (et->group, row)) @@ -879,18 +879,18 @@ et_table_row_changed (ETableModel *table_model, int row, ETable *et) } static void -et_table_cell_changed (ETableModel *table_model, int view_col, int row, ETable *et) +et_table_cell_changed (ETableModel *table_model, gint view_col, gint row, ETable *et) { et_table_row_changed (table_model, row, et); } static void -et_table_rows_inserted (ETableModel *table_model, int row, int count, ETable *et) +et_table_rows_inserted (ETableModel *table_model, gint row, gint count, ETable *et) { /* This number has already been decremented. */ - int row_count = e_table_model_row_count(table_model); + gint row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { - int i; + gint i; if (row != row_count - count) e_table_group_increment(et->group, row, count); for (i = 0; i < count; i++) @@ -900,11 +900,11 @@ et_table_rows_inserted (ETableModel *table_model, int row, int count, ETable *et } static void -et_table_rows_deleted (ETableModel *table_model, int row, int count, ETable *et) +et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETable *et) { - int row_count = e_table_model_row_count(table_model); + gint row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { - int i; + gint i; for (i = 0; i < count; i++) e_table_group_remove (et->group, row + i); if (row != row_count) @@ -1024,7 +1024,7 @@ et_canvas_realize (GtkWidget *canvas, ETable *e_table) static gint white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETable *e_table) { - int return_val = 0; + gint return_val = 0; g_signal_emit (GTK_OBJECT (e_table), et_signals [WHITE_SPACE_EVENT], 0, event, &return_val); return return_val; @@ -1421,8 +1421,8 @@ ETableState * e_table_get_state_object (ETable *e_table) { ETableState *state; - int full_col_count; - int i, j; + gint full_col_count; + gint i, j; state = e_table_state_new(); if (state->sort_info) @@ -1498,7 +1498,7 @@ et_selection_model_selection_changed (ETableGroup *etg, ETable *et) } static void -et_selection_model_selection_row_changed (ETableGroup *etg, int row, ETable *et) +et_selection_model_selection_row_changed (ETableGroup *etg, gint row, ETable *et) { g_signal_emit (G_OBJECT (et), et_signals [SELECTION_CHANGE], 0); } @@ -1507,8 +1507,8 @@ static ETable * et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, ETableSpecification *specification, ETableState *state) { - int row = 0; - int col_count, i; + gint row = 0; + gint col_count, i; GValue *val = g_new0 (GValue, 1); g_value_init (val, G_TYPE_OBJECT); @@ -1633,7 +1633,7 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, **/ ETable * e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, - const char *spec_str, const char *state_str) + const gchar *spec_str, const gchar *state_str) { ETableSpecification *specification; ETableState *state; @@ -1693,7 +1693,7 @@ e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, **/ ETable * e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtras *ete, - const char *spec_fn, const char *state_fn) + const gchar *spec_fn, const gchar *state_fn) { ETableSpecification *specification; ETableState *state; @@ -1758,7 +1758,7 @@ e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtra * The newly created #ETable or %NULL if there's an error. **/ GtkWidget * -e_table_new (ETableModel *etm, ETableExtras *ete, const char *spec, const char *state) +e_table_new (ETableModel *etm, ETableExtras *ete, const gchar *spec, const gchar *state) { ETable *e_table; @@ -1795,7 +1795,7 @@ e_table_new (ETableModel *etm, ETableExtras *ete, const char *spec, const char * * The newly created #ETable or %NULL if there's an error. **/ GtkWidget * -e_table_new_from_spec_file (ETableModel *etm, ETableExtras *ete, const char *spec_fn, const char *state_fn) +e_table_new_from_spec_file (ETableModel *etm, ETableExtras *ete, const gchar *spec_fn, const gchar *state_fn) { ETable *e_table; @@ -1836,9 +1836,9 @@ et_build_grouping_spec (ETable *e_table) { xmlNode *node; xmlNode *grouping; - int i; - const int sort_count = e_table_sort_info_sorting_get_count (e_table->sort_info); - const int group_count = e_table_sort_info_grouping_get_count (e_table->sort_info); + gint i; + const gint sort_count = e_table_sort_info_sorting_get_count (e_table->sort_info); + const gint group_count = e_table_sort_info_grouping_get_count (e_table->sort_info); grouping = xmlNewNode (NULL, "grouping"); node = grouping; @@ -1899,18 +1899,18 @@ e_table_get_specification (ETable *e_table) return buffer; } -int -e_table_set_specification (ETable *e_table, const char *spec) +gint +e_table_set_specification (ETable *e_table, const gchar *spec) { xmlDoc *xmlSpec; - int ret; + gint ret; g_return_val_if_fail(e_table != NULL, -1); g_return_val_if_fail(E_IS_TABLE(e_table), -1); g_return_val_if_fail(spec != NULL, -1); /* doesn't work yet, sigh */ - xmlSpec = xmlParseMemory ((char *)spec, strlen(spec)); + xmlSpec = xmlParseMemory ((gchar *)spec, strlen(spec)); ret = et_real_set_specification(e_table, xmlSpec); xmlFreeDoc (xmlSpec); @@ -1918,7 +1918,7 @@ e_table_set_specification (ETable *e_table, const char *spec) } void -e_table_save_specification (ETable *e_table, const char *filename) +e_table_save_specification (ETable *e_table, const gchar *filename) { xmlDoc *doc = et_build_tree (e_table); @@ -1931,11 +1931,11 @@ e_table_save_specification (ETable *e_table, const char *filename) xmlFreeDoc (doc); } -int +gint e_table_load_specification (ETable *e_table, gchar *filename) { xmlDoc *xmlSpec; - int ret; + gint ret; g_return_val_if_fail(e_table != NULL, -1); g_return_val_if_fail(E_IS_TABLE(e_table), -1); @@ -1966,7 +1966,7 @@ e_table_load_specification (ETable *e_table, gchar *filename) * Sets the cursor row and the selection to the given row number. **/ void -e_table_set_cursor_row (ETable *e_table, int row) +e_table_set_cursor_row (ETable *e_table, gint row) { g_return_if_fail(e_table != NULL); g_return_if_fail(E_IS_TABLE(e_table)); @@ -1986,10 +1986,10 @@ e_table_set_cursor_row (ETable *e_table, int row) * Return value: * Cursor row **/ -int +gint e_table_get_cursor_row (ETable *e_table) { - int row; + gint row; g_return_val_if_fail(e_table != NULL, -1); g_return_val_if_fail(E_IS_TABLE(e_table), -1); @@ -2146,7 +2146,7 @@ et_get_property (GObject *object, } typedef struct { - char *arg; + gchar *arg; gboolean setting; } bool_closure; @@ -2260,7 +2260,7 @@ e_table_get_next_row (ETable *e_table, g_return_val_if_fail(E_IS_TABLE(e_table), -1); if (e_table->sorter) { - int i; + gint i; i = e_sorter_model_to_sorted(E_SORTER (e_table->sorter), model_row); i++; if (i < e_table_model_row_count(e_table->model)) { @@ -2294,7 +2294,7 @@ e_table_get_prev_row (ETable *e_table, g_return_val_if_fail(E_IS_TABLE(e_table), -1); if (e_table->sorter) { - int i; + gint i; i = e_sorter_model_to_sorted(E_SORTER (e_table->sorter), model_row); i--; if (i >= 0) @@ -2364,8 +2364,8 @@ e_table_view_to_model_row (ETable *e_table, **/ void e_table_get_cell_at (ETable *table, - int x, int y, - int *row_return, int *col_return) + gint x, gint y, + gint *row_return, gint *col_return) { g_return_if_fail (table != NULL); g_return_if_fail (E_IS_TABLE (table)); @@ -2395,9 +2395,9 @@ e_table_get_cell_at (ETable *table, **/ void e_table_get_cell_geometry (ETable *table, - int row, int col, - int *x_return, int *y_return, - int *width_return, int *height_return) + gint row, gint col, + gint *x_return, gint *y_return, + gint *width_return, gint *height_return) { g_return_if_fail (table != NULL); g_return_if_fail (E_IS_TABLE (table)); @@ -2419,7 +2419,7 @@ e_table_get_cell_geometry (ETable *table, * Similar to e_table_get_cell_at, only here we check based on the mouse motion information in the group. **/ void -e_table_get_mouse_over_cell (ETable *table, int *row, int *col) +e_table_get_mouse_over_cell (ETable *table, gint *row, gint *col) { g_return_if_fail (table != NULL); g_return_if_fail (E_IS_TABLE (table)); @@ -2532,8 +2532,8 @@ struct _GtkDragSourceInfo **/ void e_table_drag_get_data (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GdkAtom target, guint32 time) @@ -2558,14 +2558,14 @@ e_table_drag_get_data (ETable *table, **/ void e_table_drag_highlight (ETable *table, - int row, - int col) + gint row, + gint col) { g_return_if_fail(table != NULL); g_return_if_fail(E_IS_TABLE(table)); if (row != -1) { - int x, y, width, height; + gint x, y, width, height; if (col == -1) { e_table_get_cell_geometry (table, row, 0, &x, &y, &width, &height); x = 0; @@ -2665,7 +2665,7 @@ e_table_drag_dest_unset (GtkWidget *widget) /* Source side */ static gint -et_real_start_drag (ETable *table, int row, int col, GdkEvent *event) +et_real_start_drag (ETable *table, gint row, gint col, GdkEvent *event) { GtkDragSourceInfo *info; GdkDragContext *context; @@ -2795,8 +2795,8 @@ e_table_drag_source_unset (ETable *table) **/ GdkDragContext * e_table_drag_begin (ETable *table, - int row, - int col, + gint row, + gint col, GtkTargetList *targets, GdkDragAction actions, gint button, @@ -2863,7 +2863,7 @@ do_drag_motion(ETable *et, guint time) { gboolean ret_val; - int row = -1, col = -1; + gint row = -1, col = -1; e_table_get_cell_at (et, x, y, &row, &col); @@ -2883,7 +2883,7 @@ static gboolean scroll_timeout (gpointer data) { ETable *et = data; - int dx = 0, dy = 0; + gint dx = 0, dy = 0; GtkAdjustment *h, *v; double hvalue, vvalue; @@ -3027,7 +3027,7 @@ et_drag_drop(GtkWidget *widget, ETable *et) { gboolean ret_val; - int row, col; + gint row, col; e_table_get_cell_at (et, x, y, &row, &col); @@ -3059,7 +3059,7 @@ et_drag_data_received(GtkWidget *widget, guint time, ETable *et) { - int row, col; + gint row, col; e_table_get_cell_at (et, x, y, &row, &col); diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h index 4894085330..7d3d0ff8cb 100644 --- a/widgets/table/e-table.h +++ b/widgets/table/e-table.h @@ -80,21 +80,21 @@ typedef struct { guint search_search_id; guint search_accept_id; - int table_model_change_id; - int table_row_change_id; - int table_cell_change_id; - int table_rows_inserted_id; - int table_rows_deleted_id; + gint table_model_change_id; + gint table_row_change_id; + gint table_cell_change_id; + gint table_rows_inserted_id; + gint table_rows_deleted_id; - int group_info_change_id; - int sort_info_change_id; + gint group_info_change_id; + gint sort_info_change_id; - int structure_change_id; - int expansion_change_id; - int dimension_change_id; + gint structure_change_id; + gint expansion_change_id; + gint dimension_change_id; - int reflow_idle_id; - int scroll_idle_id; + gint reflow_idle_id; + gint scroll_idle_id; GnomeCanvas *header_canvas, *table_canvas; @@ -131,41 +131,41 @@ typedef struct { guint always_search : 1; guint search_col_set : 1; - char *click_to_add_message; + gchar *click_to_add_message; GnomeCanvasItem *click_to_add; gboolean use_click_to_add; gboolean use_click_to_add_end; ECursorMode cursor_mode; - int drop_row; - int drop_col; + gint drop_row; + gint drop_col; GnomeCanvasItem *drop_highlight; - int last_drop_x; - int last_drop_y; - int last_drop_time; + gint last_drop_x; + gint last_drop_y; + gint last_drop_time; GdkDragContext *last_drop_context; - int drag_row; - int drag_col; + gint drag_row; + gint drag_col; ETableDragSourceSite *site; - int header_width; + gint header_width; - char *domain; + gchar *domain; } ETable; typedef struct { GtkTableClass parent_class; - void (*cursor_change) (ETable *et, int row); - void (*cursor_activated) (ETable *et, int row); + void (*cursor_change) (ETable *et, gint row); + void (*cursor_activated) (ETable *et, gint row); void (*selection_change) (ETable *et); - void (*double_click) (ETable *et, int row, int col, GdkEvent *event); - gint (*right_click) (ETable *et, int row, int col, GdkEvent *event); - gint (*click) (ETable *et, int row, int col, GdkEvent *event); - gint (*key_press) (ETable *et, int row, int col, GdkEvent *event); - gint (*start_drag) (ETable *et, int row, int col, GdkEvent *event); + void (*double_click) (ETable *et, gint row, gint col, GdkEvent *event); + gint (*right_click) (ETable *et, gint row, gint col, GdkEvent *event); + gint (*click) (ETable *et, gint row, gint col, GdkEvent *event); + gint (*key_press) (ETable *et, gint row, gint col, GdkEvent *event); + gint (*start_drag) (ETable *et, gint row, gint col, GdkEvent *event); void (*state_change) (ETable *et); gint (*white_space_event) (ETable *et, GdkEvent *event); @@ -175,48 +175,48 @@ typedef struct { /* Source side drag signals */ void (* table_drag_begin) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context); void (* table_drag_end) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context); void (* table_drag_data_get) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time); void (* table_drag_data_delete) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context); /* Target side drag signals */ void (* table_drag_leave) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, guint time); gboolean (* table_drag_motion) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, gint x, gint y, guint time); gboolean (* table_drag_drop) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, gint x, gint y, guint time); void (* table_drag_data_received) (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, gint x, gint y, @@ -228,23 +228,23 @@ GType e_table_get_type (void); ETable *e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); GtkWidget *e_table_new (ETableModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); /* Create an ETable using files. */ ETable *e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); GtkWidget *e_table_new_from_spec_file (ETableModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); /* To save the state */ gchar *e_table_get_state (ETable *e_table); @@ -260,10 +260,10 @@ void e_table_set_state_object (ETable *e_tabl void e_table_load_state (ETable *e_table, const gchar *filename); void e_table_set_cursor_row (ETable *e_table, - int row); + gint row); /* -1 means we don't have the cursor. This is in model rows. */ -int e_table_get_cursor_row (ETable *e_table); +gint e_table_get_cursor_row (ETable *e_table); void e_table_selected_row_foreach (ETable *e_table, EForeachFunc callback, gpointer closure); @@ -278,18 +278,18 @@ gint e_table_model_to_view_row (ETable *e_tabl gint e_table_view_to_model_row (ETable *e_table, gint view_row); void e_table_get_cell_at (ETable *table, - int x, - int y, - int *row_return, - int *col_return); -void e_table_get_mouse_over_cell (ETable *table, int *row, int *col); + gint x, + gint y, + gint *row_return, + gint *col_return); +void e_table_get_mouse_over_cell (ETable *table, gint *row, gint *col); void e_table_get_cell_geometry (ETable *table, - int row, - int col, - int *x_return, - int *y_return, - int *width_return, - int *height_return); + gint row, + gint col, + gint *x_return, + gint *y_return, + gint *width_return, + gint *height_return); /* Useful accessor functions. */ ESelectionModel *e_table_get_selection_model (ETable *table); @@ -297,14 +297,14 @@ ESelectionModel *e_table_get_selection_model (ETable *table) /* Drag & drop stuff. */ /* Target */ void e_table_drag_get_data (ETable *table, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GdkAtom target, guint32 time); void e_table_drag_highlight (ETable *table, - int row, - int col); /* col == -1 to highlight entire row. */ + gint row, + gint col); /* col == -1 to highlight entire row. */ void e_table_drag_unhighlight (ETable *table); void e_table_drag_dest_set (ETable *table, GtkDestDefaults flags, @@ -333,8 +333,8 @@ void e_table_drag_source_unset (ETable *table) * as a GtkTargetList */ GdkDragContext *e_table_drag_begin (ETable *table, - int row, - int col, + gint row, + gint col, GtkTargetList *targets, GdkDragAction actions, gint button, diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c index 08d703b7ff..25175c9797 100644 --- a/widgets/table/e-tree-memory-callbacks.c +++ b/widgets/table/e-tree-memory-callbacks.c @@ -62,7 +62,7 @@ etmc_has_save_id (ETreeModel *etm) return FALSE; } -static char * +static gchar * etmc_get_save_id (ETreeModel *etm, ETreePath node) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -85,7 +85,7 @@ etmc_has_get_node_by_id (ETreeModel *etm) } static ETreePath -etmc_get_node_by_id (ETreeModel *etm, const char *save_id) +etmc_get_node_by_id (ETreeModel *etm, const gchar *save_id) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -95,8 +95,8 @@ etmc_get_node_by_id (ETreeModel *etm, const char *save_id) return NULL; } -static void * -etmc_sort_value_at (ETreeModel *etm, ETreePath node, int col) +static gpointer +etmc_sort_value_at (ETreeModel *etm, ETreePath node, gint col) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -106,8 +106,8 @@ etmc_sort_value_at (ETreeModel *etm, ETreePath node, int col) return etmc->value_at (etm, node, col, etmc->model_data); } -static void * -etmc_value_at (ETreeModel *etm, ETreePath node, int col) +static gpointer +etmc_value_at (ETreeModel *etm, ETreePath node, gint col) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -115,7 +115,7 @@ etmc_value_at (ETreeModel *etm, ETreePath node, int col) } static void -etmc_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val) +etmc_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -123,7 +123,7 @@ etmc_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val) } static gboolean -etmc_is_editable (ETreeModel *etm, ETreePath node, int col) +etmc_is_editable (ETreeModel *etm, ETreePath node, gint col) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -132,19 +132,19 @@ etmc_is_editable (ETreeModel *etm, ETreePath node, int col) /* The default for etmc_duplicate_value is to return the raw value. */ -static void * -etmc_duplicate_value (ETreeModel *etm, int col, const void *value) +static gpointer +etmc_duplicate_value (ETreeModel *etm, gint col, gconstpointer value) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); if (etmc->duplicate_value) return etmc->duplicate_value (etm, col, value, etmc->model_data); else - return (void *)value; + return (gpointer)value; } static void -etmc_free_value (ETreeModel *etm, int col, void *value) +etmc_free_value (ETreeModel *etm, gint col, gpointer value) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -152,8 +152,8 @@ etmc_free_value (ETreeModel *etm, int col, void *value) etmc->free_value (etm, col, value, etmc->model_data); } -static void * -etmc_initialize_value (ETreeModel *etm, int col) +static gpointer +etmc_initialize_value (ETreeModel *etm, gint col) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -164,7 +164,7 @@ etmc_initialize_value (ETreeModel *etm, int col) } static gboolean -etmc_value_is_empty (ETreeModel *etm, int col, const void *value) +etmc_value_is_empty (ETreeModel *etm, gint col, gconstpointer value) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); @@ -174,8 +174,8 @@ etmc_value_is_empty (ETreeModel *etm, int col, const void *value) return FALSE; } -static char * -etmc_value_to_string (ETreeModel *etm, int col, const void *value) +static gchar * +etmc_value_to_string (ETreeModel *etm, gint col, gconstpointer value) { ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm); diff --git a/widgets/table/e-tree-memory-callbacks.h b/widgets/table/e-tree-memory-callbacks.h index f74a472642..a7705795af 100644 --- a/widgets/table/e-tree-memory-callbacks.h +++ b/widgets/table/e-tree-memory-callbacks.h @@ -36,25 +36,25 @@ extern "C" { #define E_IS_TREE_MEMORY_CALLBACKS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TREE_MEMORY_CALLBACKS_TYPE)) -typedef GdkPixbuf* (*ETreeMemoryCallbacksIconAtFn) (ETreeModel *etree, ETreePath path, void *model_data); +typedef GdkPixbuf* (*ETreeMemoryCallbacksIconAtFn) (ETreeModel *etree, ETreePath path, gpointer model_data); -typedef gint (*ETreeMemoryCallbacksColumnCountFn) (ETreeModel *etree, void *model_data); +typedef gint (*ETreeMemoryCallbacksColumnCountFn) (ETreeModel *etree, gpointer model_data); -typedef gboolean (*ETreeMemoryCallbacksHasSaveIdFn) (ETreeModel *etree, void *model_data); -typedef gchar *(*ETreeMemoryCallbacksGetSaveIdFn) (ETreeModel *etree, ETreePath path, void *model_data); +typedef gboolean (*ETreeMemoryCallbacksHasSaveIdFn) (ETreeModel *etree, gpointer model_data); +typedef gchar *(*ETreeMemoryCallbacksGetSaveIdFn) (ETreeModel *etree, ETreePath path, gpointer model_data); -typedef gboolean (*ETreeMemoryCallbacksHasGetNodeByIdFn) (ETreeModel *etree, void *model_data); -typedef ETreePath (*ETreeMemoryCallbacksGetNodeByIdFn) (ETreeModel *etree, const char *save_id, void *model_data); +typedef gboolean (*ETreeMemoryCallbacksHasGetNodeByIdFn) (ETreeModel *etree, gpointer model_data); +typedef ETreePath (*ETreeMemoryCallbacksGetNodeByIdFn) (ETreeModel *etree, const gchar *save_id, gpointer model_data); -typedef void* (*ETreeMemoryCallbacksValueAtFn) (ETreeModel *etree, ETreePath path, int col, void *model_data); -typedef void (*ETreeMemoryCallbacksSetValueAtFn) (ETreeModel *etree, ETreePath path, int col, const void *val, void *model_data); -typedef gboolean (*ETreeMemoryCallbacksIsEditableFn) (ETreeModel *etree, ETreePath path, int col, void *model_data); +typedef gpointer (*ETreeMemoryCallbacksValueAtFn) (ETreeModel *etree, ETreePath path, gint col, gpointer model_data); +typedef void (*ETreeMemoryCallbacksSetValueAtFn) (ETreeModel *etree, ETreePath path, gint col, gconstpointer val, gpointer model_data); +typedef gboolean (*ETreeMemoryCallbacksIsEditableFn) (ETreeModel *etree, ETreePath path, gint col, gpointer model_data); -typedef void *(*ETreeMemoryCallbacksDuplicateValueFn) (ETreeModel *etm, int col, const void *val, void *data); -typedef void (*ETreeMemoryCallbacksFreeValueFn) (ETreeModel *etm, int col, void *val, void *data); -typedef void *(*ETreeMemoryCallbacksInitializeValueFn) (ETreeModel *etm, int col, void *data); -typedef gboolean (*ETreeMemoryCallbacksValueIsEmptyFn) (ETreeModel *etm, int col, const void *val, void *data); -typedef char *(*ETreeMemoryCallbacksValueToStringFn) (ETreeModel *etm, int col, const void *val, void *data); +typedef void *(*ETreeMemoryCallbacksDuplicateValueFn) (ETreeModel *etm, gint col, gconstpointer val, gpointer data); +typedef void (*ETreeMemoryCallbacksFreeValueFn) (ETreeModel *etm, gint col, gpointer val, gpointer data); +typedef void *(*ETreeMemoryCallbacksInitializeValueFn) (ETreeModel *etm, gint col, gpointer data); +typedef gboolean (*ETreeMemoryCallbacksValueIsEmptyFn) (ETreeModel *etm, gint col, gconstpointer val, gpointer data); +typedef gchar *(*ETreeMemoryCallbacksValueToStringFn) (ETreeModel *etm, gint col, gconstpointer val, gpointer data); typedef struct { ETreeMemory parent; diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c index 99c9ef9895..728392f7b0 100644 --- a/widgets/table/e-tree-memory.c +++ b/widgets/table/e-tree-memory.c @@ -87,7 +87,7 @@ check_children (ETreeMemory *memory, ETreePath node) static int e_tree_memory_path_depth (ETreeMemoryPath *path) { - int depth = 0; + gint depth = 0; g_return_val_if_fail(path != NULL, -1); @@ -97,7 +97,7 @@ e_tree_memory_path_depth (ETreeMemoryPath *path) } static void -e_tree_memory_path_insert (ETreeMemoryPath *parent, int position, ETreeMemoryPath *child) +e_tree_memory_path_insert (ETreeMemoryPath *parent, gint position, ETreeMemoryPath *child) { g_return_if_fail (position <= parent->num_children && position >= -1); @@ -299,7 +299,7 @@ etmm_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes) if (nodes) { ETreeMemoryPath *p; - int i = 0; + gint i = 0; (*nodes) = g_new (ETreePath, n_children); for (p = path->first_child; p; p = p->next_sibling) { @@ -486,7 +486,7 @@ e_tree_memory_node_set_data (ETreeMemory *etmm, ETreePath node, gpointer node_da ETreePath e_tree_memory_node_insert (ETreeMemory *tree_model, ETreePath parent_node, - int position, + gint position, gpointer node_data) { ETreeMemoryPriv *priv; @@ -522,7 +522,7 @@ e_tree_memory_node_insert (ETreeMemory *tree_model, return new_path; } -ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree, ETreePath parent, int position, gpointer node_data, char *id) +ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree, ETreePath parent, gint position, gpointer node_data, gchar *id) { return e_tree_memory_node_insert(etree, parent, position, node_data); } @@ -547,7 +547,7 @@ e_tree_memory_node_insert_before (ETreeMemory *etree, ETreeMemoryPath *child; ETreeMemoryPath *parent_path = parent; ETreeMemoryPath *sibling_path = sibling; - int position = 0; + gint position = 0; g_return_val_if_fail(etree != NULL, NULL); @@ -598,7 +598,7 @@ e_tree_memory_node_remove (ETreeMemory *etree, ETreePath node) ETreeMemoryPath *parent = path->parent; ETreeMemoryPath *sibling; gpointer ret = path->node_data; - int old_position = 0; + gint old_position = 0; g_return_val_if_fail(etree != NULL, NULL); @@ -637,7 +637,7 @@ typedef struct { } MemoryAndClosure; static int -sort_callback(const void *data1, const void *data2, gpointer user_data) +sort_callback(gconstpointer data1, gconstpointer data2, gpointer user_data) { ETreePath path1 = *(ETreePath *)data1; ETreePath path2 = *(ETreePath *)data2; @@ -653,8 +653,8 @@ e_tree_memory_sort_node (ETreeMemory *etmm, { ETreeMemoryPath **children; ETreeMemoryPath *child; - int count; - int i; + gint count; + gint i; ETreeMemoryPath *path = node; MemoryAndClosure mac; ETreeMemoryPath *last; diff --git a/widgets/table/e-tree-memory.h b/widgets/table/e-tree-memory.h index 2c82d1c8d1..0a56c8d37e 100644 --- a/widgets/table/e-tree-memory.h +++ b/widgets/table/e-tree-memory.h @@ -41,7 +41,7 @@ typedef struct ETreeMemory ETreeMemory; typedef struct ETreeMemoryPriv ETreeMemoryPriv; typedef struct ETreeMemoryClass ETreeMemoryClass; -typedef int (*ETreeMemorySortCallback) (ETreeMemory *etmm, ETreePath path1, ETreePath path2, gpointer closure); +typedef gint (*ETreeMemorySortCallback) (ETreeMemory *etmm, ETreePath path1, ETreePath path2, gpointer closure); struct ETreeMemory { ETreeModel base; @@ -63,13 +63,13 @@ ETreeMemory *e_tree_memory_new (void); /* node operations */ ETreePath e_tree_memory_node_insert (ETreeMemory *etree, ETreePath parent, - int position, + gint position, gpointer node_data); ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree, ETreePath parent, - int position, + gint position, gpointer node_data, - char *id); + gchar *id); ETreePath e_tree_memory_node_insert_before (ETreeMemory *etree, ETreePath parent, ETreePath sibling, diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c index bd35358874..9482fe9789 100644 --- a/widgets/table/e-tree-model.c +++ b/widgets/table/e-tree-model.c @@ -320,7 +320,7 @@ e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node) * Return value: **/ void -e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, int col) +e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, gint col) { g_return_if_fail (tree_model != NULL); g_return_if_fail (E_IS_TREE_MODEL (tree_model)); @@ -361,7 +361,7 @@ e_tree_model_node_inserted (ETreeModel *tree_model, * **/ void -e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETreePath removed_node, int old_position) +e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETreePath removed_node, gint old_position) { g_return_if_fail (tree_model != NULL); g_return_if_fail (E_IS_TREE_MODEL (tree_model)); @@ -754,7 +754,7 @@ e_tree_model_has_get_node_by_id (ETreeModel *etree) * return values: The path for this save id. */ ETreePath -e_tree_model_get_node_by_id (ETreeModel *etree, const char *save_id) +e_tree_model_get_node_by_id (ETreeModel *etree, const gchar *save_id) { g_return_val_if_fail (etree != NULL, NULL); g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL); @@ -805,8 +805,8 @@ e_tree_model_has_change_pending (ETreeModel *etree) * affects the data in that node for that column. node_inserted, * node_removed, and no_change don't affect any data in this way. **/ -void * -e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, int col) +gpointer +e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, gint col) { g_return_val_if_fail (etree != NULL, NULL); g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL); @@ -836,8 +836,8 @@ e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, int col) * affects the data in that node for that column. node_inserted, * node_removed, and no_change don't affect any data in this way. **/ -void * -e_tree_model_value_at (ETreeModel *etree, ETreePath node, int col) +gpointer +e_tree_model_value_at (ETreeModel *etree, ETreePath node, gint col) { g_return_val_if_fail (etree != NULL, NULL); g_return_val_if_fail (E_IS_TREE_MODEL (etree), NULL); @@ -849,7 +849,7 @@ e_tree_model_value_at (ETreeModel *etree, ETreePath node, int col) } void -e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, int col, const void *val) +e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, gint col, gconstpointer val) { g_return_if_fail (etree != NULL); g_return_if_fail (E_IS_TREE_MODEL (etree)); @@ -868,7 +868,7 @@ e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, int col, const voi * Return value: **/ gboolean -e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, int col) +e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, gint col) { g_return_val_if_fail(etree != NULL, FALSE); @@ -887,8 +887,8 @@ e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, int col) * * Return value: **/ -void * -e_tree_model_duplicate_value (ETreeModel *etree, int col, const void *value) +gpointer +e_tree_model_duplicate_value (ETreeModel *etree, gint col, gconstpointer value) { g_return_val_if_fail(etree != NULL, NULL); @@ -908,7 +908,7 @@ e_tree_model_duplicate_value (ETreeModel *etree, int col, const void *value) * Return value: **/ void -e_tree_model_free_value (ETreeModel *etree, int col, void *value) +e_tree_model_free_value (ETreeModel *etree, gint col, gpointer value) { g_return_if_fail(etree != NULL); @@ -925,8 +925,8 @@ e_tree_model_free_value (ETreeModel *etree, int col, void *value) * * Return value: **/ -void * -e_tree_model_initialize_value (ETreeModel *etree, int col) +gpointer +e_tree_model_initialize_value (ETreeModel *etree, gint col) { g_return_val_if_fail(etree != NULL, NULL); @@ -946,7 +946,7 @@ e_tree_model_initialize_value (ETreeModel *etree, int col) * Return value: **/ gboolean -e_tree_model_value_is_empty (ETreeModel *etree, int col, const void *value) +e_tree_model_value_is_empty (ETreeModel *etree, gint col, gconstpointer value) { g_return_val_if_fail(etree != NULL, TRUE); @@ -965,8 +965,8 @@ e_tree_model_value_is_empty (ETreeModel *etree, int col, const void *value) * * Return value: **/ -char * -e_tree_model_value_to_string (ETreeModel *etree, int col, const void *value) +gchar * +e_tree_model_value_to_string (ETreeModel *etree, gint col, gconstpointer value) { g_return_val_if_fail(etree != NULL, g_strdup("")); diff --git a/widgets/table/e-tree-model.h b/widgets/table/e-tree-model.h index ed34933cb1..fdd7f26a66 100644 --- a/widgets/table/e-tree-model.h +++ b/widgets/table/e-tree-model.h @@ -39,7 +39,7 @@ G_BEGIN_DECLS #define E_IS_TREE_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TREE_MODEL_TYPE)) #define E_TREE_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TREE_MODEL_TYPE, ETreeModelClass)) -typedef void * ETreePath; +typedef gpointer ETreePath; typedef struct ETreeModel ETreeModel; typedef struct ETreeModelClass ETreeModelClass; typedef gint (*ETreePathCompareFunc)(ETreeModel *model, ETreePath path1, ETreePath path2); @@ -77,23 +77,23 @@ struct ETreeModelClass { gchar *(*get_save_id) (ETreeModel *etm, ETreePath node); gboolean (*has_get_node_by_id) (ETreeModel *etm); - ETreePath (*get_node_by_id) (ETreeModel *etm, const char *save_id); + ETreePath (*get_node_by_id) (ETreeModel *etm, const gchar *save_id); gboolean (*has_change_pending) (ETreeModel *etm); /* * ETable analogs */ - void *(*sort_value_at) (ETreeModel *etm, ETreePath node, int col); - void *(*value_at) (ETreeModel *etm, ETreePath node, int col); - void (*set_value_at) (ETreeModel *etm, ETreePath node, int col, const void *val); - gboolean (*is_editable) (ETreeModel *etm, ETreePath node, int col); + void *(*sort_value_at) (ETreeModel *etm, ETreePath node, gint col); + void *(*value_at) (ETreeModel *etm, ETreePath node, gint col); + void (*set_value_at) (ETreeModel *etm, ETreePath node, gint col, gconstpointer val); + gboolean (*is_editable) (ETreeModel *etm, ETreePath node, gint col); - void *(*duplicate_value) (ETreeModel *etm, int col, const void *value); - void (*free_value) (ETreeModel *etm, int col, void *value); - void *(*initialize_value) (ETreeModel *etm, int col); - gboolean (*value_is_empty) (ETreeModel *etm, int col, const void *value); - char *(*value_to_string) (ETreeModel *etm, int col, const void *value); + void *(*duplicate_value) (ETreeModel *etm, gint col, gconstpointer value); + void (*free_value) (ETreeModel *etm, gint col, gpointer value); + void *(*initialize_value) (ETreeModel *etm, gint col); + gboolean (*value_is_empty) (ETreeModel *etm, gint col, gconstpointer value); + gchar *(*value_to_string) (ETreeModel *etm, gint col, gconstpointer value); /* * Signals @@ -108,9 +108,9 @@ struct ETreeModelClass { void (*no_change) (ETreeModel *etm); void (*node_changed) (ETreeModel *etm, ETreePath node); void (*node_data_changed) (ETreeModel *etm, ETreePath node); - void (*node_col_changed) (ETreeModel *etm, ETreePath node, int col); + void (*node_col_changed) (ETreeModel *etm, ETreePath node, gint col); void (*node_inserted) (ETreeModel *etm, ETreePath parent, ETreePath inserted_node); - void (*node_removed) (ETreeModel *etm, ETreePath parent, ETreePath removed_node, int old_position); + void (*node_removed) (ETreeModel *etm, ETreePath parent, ETreePath removed_node, gint old_position); void (*node_deleted) (ETreeModel *etm, ETreePath deleted_node); void (*rebuilt) (ETreeModel *etm); @@ -156,34 +156,34 @@ gchar *e_tree_model_get_save_id (ETreeModel *model, ETreePath node); gboolean e_tree_model_has_get_node_by_id (ETreeModel *model); ETreePath e_tree_model_get_node_by_id (ETreeModel *model, - const char *save_id); + const gchar *save_id); gboolean e_tree_model_has_change_pending (ETreeModel *model); void *e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, - int col); + gint col); void *e_tree_model_value_at (ETreeModel *etree, ETreePath node, - int col); + gint col); void e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, - int col, + gint col, const void *val); gboolean e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, - int col); + gint col); void *e_tree_model_duplicate_value (ETreeModel *etree, - int col, + gint col, const void *value); void e_tree_model_free_value (ETreeModel *etree, - int col, + gint col, void *value); void *e_tree_model_initialize_value (ETreeModel *etree, - int col); + gint col); gboolean e_tree_model_value_is_empty (ETreeModel *etree, - int col, + gint col, const void *value); -char *e_tree_model_value_to_string (ETreeModel *etree, - int col, +gchar *e_tree_model_value_to_string (ETreeModel *etree, + gint col, const void *value); /* depth first traversal of path's descendents, calling func on each one */ @@ -214,14 +214,14 @@ void e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node); void e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, - int col); + gint col); void e_tree_model_node_inserted (ETreeModel *tree_model, ETreePath parent_node, ETreePath inserted_node); void e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETreePath removed_node, - int old_position); + gint old_position); void e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node); void e_tree_model_node_request_collapse (ETreeModel *tree_model, diff --git a/widgets/table/e-tree-scrolled.c b/widgets/table/e-tree-scrolled.c index 18267a42c3..fc729ab411 100644 --- a/widgets/table/e-tree-scrolled.c +++ b/widgets/table/e-tree-scrolled.c @@ -73,8 +73,8 @@ gboolean e_tree_scrolled_construct (ETreeScrolled *ets, ETreeModel *etm, ETableExtras *ete, - const char *spec, - const char *state) + const gchar *spec, + const gchar *state) { g_return_val_if_fail(ets != NULL, FALSE); g_return_val_if_fail(E_IS_TREE_SCROLLED(ets), FALSE); @@ -93,8 +93,8 @@ e_tree_scrolled_construct (ETreeScrolled *ets, GtkWidget *e_tree_scrolled_new (ETreeModel *etm, ETableExtras *ete, - const char *spec, - const char *state) + const gchar *spec, + const gchar *state) { ETreeScrolled *ets; @@ -120,8 +120,8 @@ gboolean e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets, ETreeModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn) + const gchar *spec_fn, + const gchar *state_fn) { g_return_val_if_fail(ets != NULL, FALSE); g_return_val_if_fail(E_IS_TREE_SCROLLED(ets), FALSE); @@ -140,8 +140,8 @@ e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets, GtkWidget *e_tree_scrolled_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn) + const gchar *spec_fn, + const gchar *state_fn) { ETreeScrolled *ets; diff --git a/widgets/table/e-tree-scrolled.h b/widgets/table/e-tree-scrolled.h index 5d4b8de36f..197dd9a083 100644 --- a/widgets/table/e-tree-scrolled.h +++ b/widgets/table/e-tree-scrolled.h @@ -51,22 +51,22 @@ GType e_tree_scrolled_get_type (void); gboolean e_tree_scrolled_construct (ETreeScrolled *ets, ETreeModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); GtkWidget *e_tree_scrolled_new (ETreeModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); gboolean e_tree_scrolled_construct_from_spec_file (ETreeScrolled *ets, ETreeModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); GtkWidget *e_tree_scrolled_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); ETree *e_tree_scrolled_get_tree (ETreeScrolled *ets); diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 1d694f9b60..68316f72bb 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -179,7 +179,7 @@ etsm_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *et } static void -etsm_node_col_changed (ETreeModel *etm, ETreePath node, int col, ETreeSelectionModel *etsm) +etsm_node_col_changed (ETreeModel *etm, ETreePath node, gint col, ETreeSelectionModel *etsm) { free_id (etsm); } @@ -191,7 +191,7 @@ etsm_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETreeSel } static void -etsm_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int old_position, ETreeSelectionModel *etsm) +etsm_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint old_position, ETreeSelectionModel *etsm) { restore_cursor (etsm, etm); } @@ -392,7 +392,7 @@ etsm_row_foreach_cb (gpointer key, gpointer value, gpointer user_data) { ETreePath path = key; ModelAndCallback *mac = user_data; - int row = e_tree_table_adapter_row_of_node(mac->etsm->priv->etta, path); + gint row = e_tree_table_adapter_row_of_node(mac->etsm->priv->etta, path); if (row >= 0) mac->callback(row, mac->closure); } @@ -521,7 +521,7 @@ etsm_invert_selection (ESelectionModel *selection) } static void -etsm_change_one_row(ESelectionModel *selection, int row, gboolean grow) +etsm_change_one_row(ESelectionModel *selection, gint row, gboolean grow) { ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL(selection); ETreePath path; @@ -539,7 +539,7 @@ etsm_change_one_row(ESelectionModel *selection, int row, gboolean grow) } static void -etsm_change_cursor (ESelectionModel *selection, int row, int col) +etsm_change_cursor (ESelectionModel *selection, gint row, gint col) { ETreeSelectionModel *etsm; @@ -570,9 +570,9 @@ etsm_cursor_col (ESelectionModel *selection) } static void -etsm_get_rows(int row, void *d) +etsm_get_rows(gint row, gpointer d) { - int **rowp = d; + gint **rowp = d; **rowp = row; (*rowp)++; @@ -583,7 +583,7 @@ etsm_select_single_row (ESelectionModel *selection, gint row) { ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL(selection); ETreePath path = e_tree_table_adapter_node_at_row (etsm->priv->etta, row); - int rows[5], *rowp = NULL, size; + gint rows[5], *rowp = NULL, size; g_return_if_fail (path != NULL); @@ -601,7 +601,7 @@ etsm_select_single_row (ESelectionModel *selection, gint row) e_selection_model_selection_changed(E_SELECTION_MODEL(etsm)); } else { if (rowp) { - int *p = rows; + gint *p = rows; while (p<rowp) e_selection_model_selection_row_changed((ESelectionModel *)etsm, *p++); @@ -702,7 +702,7 @@ void e_tree_selection_model_select_paths (ETreeSelectionModel *etsm, GPtrArray *paths) { ETreePath path; - int i; + gint i; for (i=0;i<paths->len;i++) { path = paths->pdata[i]; @@ -723,7 +723,7 @@ e_tree_selection_model_add_to_selection (ETreeSelectionModel *etsm, ETreePath pa void e_tree_selection_model_change_cursor (ETreeSelectionModel *etsm, ETreePath path) { - int row; + gint row; etsm->priv->cursor_path = path; diff --git a/widgets/table/e-tree-simple.c b/widgets/table/e-tree-simple.c index 3252a3db18..2704b7ea24 100644 --- a/widgets/table/e-tree-simple.c +++ b/widgets/table/e-tree-simple.c @@ -39,19 +39,19 @@ simple_column_count (ETableModel *etm) } /* The default for simple_duplicate_value is to return the raw value. */ -static void * -simple_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +simple_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { ETreeSimple *simple = E_TREE_SIMPLE(etm); if (simple->duplicate_value) return simple->duplicate_value (etm, col, value, simple->model_data); else - return (void *)value; + return (gpointer)value; } static void -simple_free_value (ETableModel *etm, int col, void *value) +simple_free_value (ETableModel *etm, gint col, gpointer value) { ETreeSimple *simple = E_TREE_SIMPLE(etm); @@ -59,8 +59,8 @@ simple_free_value (ETableModel *etm, int col, void *value) simple->free_value (etm, col, value, simple->model_data); } -static void * -simple_initialize_value (ETableModel *etm, int col) +static gpointer +simple_initialize_value (ETableModel *etm, gint col) { ETreeSimple *simple = E_TREE_SIMPLE(etm); @@ -71,7 +71,7 @@ simple_initialize_value (ETableModel *etm, int col) } static gboolean -simple_value_is_empty (ETableModel *etm, int col, const void *value) +simple_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ETreeSimple *simple = E_TREE_SIMPLE(etm); @@ -81,8 +81,8 @@ simple_value_is_empty (ETableModel *etm, int col, const void *value) return FALSE; } -static char * -simple_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +simple_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ETreeSimple *simple = E_TREE_SIMPLE(etm); @@ -92,8 +92,8 @@ simple_value_to_string (ETableModel *etm, int col, const void *value) return g_strdup (""); } -static void * -simple_value_at (ETreeModel *etm, ETreePath *node, int col) +static gpointer +simple_value_at (ETreeModel *etm, ETreePath *node, gint col) { ETreeSimple *simple = E_TREE_SIMPLE(etm); @@ -109,7 +109,7 @@ simple_icon_at (ETreeModel *etm, ETreePath *node) } static void -simple_set_value_at (ETreeModel *etm, ETreePath *node, int col, const void *val) +simple_set_value_at (ETreeModel *etm, ETreePath *node, gint col, gconstpointer val) { ETreeSimple *simple = E_TREE_SIMPLE(etm); @@ -117,7 +117,7 @@ simple_set_value_at (ETreeModel *etm, ETreePath *node, int col, const void *val) } static gboolean -simple_is_editable (ETreeModel *etm, ETreePath *node, int col) +simple_is_editable (ETreeModel *etm, ETreePath *node, gint col) { ETreeSimple *simple = E_TREE_SIMPLE(etm); diff --git a/widgets/table/e-tree-simple.h b/widgets/table/e-tree-simple.h index bb64aa18a2..47a5e6bdf1 100644 --- a/widgets/table/e-tree-simple.h +++ b/widgets/table/e-tree-simple.h @@ -37,10 +37,10 @@ G_BEGIN_DECLS #define E_TREE_SIMPLE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), E_TREE_SIMPLE_TYPE, ETreeSimpleClass)) -typedef GdkPixbuf* (*ETreeSimpleIconAtFn) (ETreeModel *etree, ETreePath *path, void *model_data); -typedef void* (*ETreeSimpleValueAtFn) (ETreeModel *etree, ETreePath *path, int col, void *model_data); -typedef void (*ETreeSimpleSetValueAtFn) (ETreeModel *etree, ETreePath *path, int col, const void *val, void *model_data); -typedef gboolean (*ETreeSimpleIsEditableFn) (ETreeModel *etree, ETreePath *path, int col, void *model_data); +typedef GdkPixbuf* (*ETreeSimpleIconAtFn) (ETreeModel *etree, ETreePath *path, gpointer model_data); +typedef gpointer (*ETreeSimpleValueAtFn) (ETreeModel *etree, ETreePath *path, gint col, gpointer model_data); +typedef void (*ETreeSimpleSetValueAtFn) (ETreeModel *etree, ETreePath *path, gint col, gconstpointer val, gpointer model_data); +typedef gboolean (*ETreeSimpleIsEditableFn) (ETreeModel *etree, ETreePath *path, gint col, gpointer model_data); typedef struct { ETreeModel parent; diff --git a/widgets/table/e-tree-sorted-variable.c b/widgets/table/e-tree-sorted-variable.c index 432a7897e4..0bc82506e8 100644 --- a/widgets/table/e-tree-sorted-variable.c +++ b/widgets/table/e-tree-sorted-variable.c @@ -48,8 +48,8 @@ struct ETreeSortedVariablePrivate { static void etsv_proxy_model_changed (ETableModel *etm, ETreeSortedVariable *etsv); #if 0 -static void etsv_proxy_model_row_changed (ETableModel *etm, int row, ETreeSortedVariable *etsv); -static void etsv_proxy_model_cell_changed (ETableModel *etm, int col, int row, ETreeSortedVariable *etsv); +static void etsv_proxy_model_row_changed (ETableModel *etm, gint row, ETreeSortedVariable *etsv); +static void etsv_proxy_model_cell_changed (ETableModel *etm, gint col, gint row, ETreeSortedVariable *etsv); #endif static void etsv_sort_info_changed (ETableSortInfo *info, ETreeSortedVariable *etsv); static void etsv_sort (ETreeSortedVariable *etsv); @@ -186,7 +186,7 @@ etsv_proxy_model_changed (ETableModel *etm, ETreeSortedVariable *etsv) } #if 0 static void -etsv_proxy_model_row_changed (ETableModel *etm, int row, ETreeSortedVariable *etsv) +etsv_proxy_model_row_changed (ETableModel *etm, gint row, ETreeSortedVariable *etsv) { ETreeSortedVariable *etsv = E_TABLE_SUBSET_VARIABLE(etsv); @@ -195,7 +195,7 @@ etsv_proxy_model_row_changed (ETableModel *etm, int row, ETreeSortedVariable *et } static void -etsv_proxy_model_cell_changed (ETableModel *etm, int col, int row, ETreeSortedVariable *etsv) +etsv_proxy_model_cell_changed (ETableModel *etm, gint col, gint row, ETreeSortedVariable *etsv) { ETreeSortedVariable *etsv = E_TABLE_SUBSET_VARIABLE(etsv); @@ -214,10 +214,10 @@ etsv_sort_info_changed (ETableSortInfo *info, ETreeSortedVariable *etsv) static int etsv_compare(ETreeSortedVariable *etsv, const ETreePath *path1, const ETreePath *path2) { - int j; - int sort_count = e_table_sort_info_sorting_get_count(etsv->sort_info); - int comp_val = 0; - int ascending = 1; + gint j; + gint sort_count = e_table_sort_info_sorting_get_count(etsv->sort_info); + gint comp_val = 0; + gint ascending = 1; for (j = 0; j < sort_count; j++) { ETableSortColumn column = e_table_sort_info_sorting_get_nth(etsv->sort_info, j); @@ -244,18 +244,18 @@ etsv_compare(ETreeSortedVariable *etsv, const ETreePath *path1, const ETreePath static ETreeSortedVariable *etsv_closure; -int cols_closure; -int *ascending_closure; -int *col_idx_closure; +gint cols_closure; +gint *ascending_closure; +gint *col_idx_closure; GCompareFunc *compare_closure; static int etsv_compare_closure(const ETreePath *path1, const ETreePath *path2) { - int j; - int sort_count = e_table_sort_info_sorting_get_count(etsv_closure->sort_info); - int comp_val = 0; - int ascending = 1; + gint j; + gint sort_count = e_table_sort_info_sorting_get_count(etsv_closure->sort_info); + gint comp_val = 0; + gint ascending = 1; for (j = 0; j < sort_count; j++) { comp_val = (*(compare_closure[j]))(e_tree_model_value_at (etsv_closure->source, path1, col_idx_closure[j]), @@ -276,7 +276,7 @@ etsv_compare_closure(const ETreePath *path1, const ETreePath *path2) } static int -qsort_callback(const void *data1, const void *data2) +qsort_callback(gconstpointer data1, gconstpointer data2) { GNode *node1 = *(GNode **)data1; GNode *node2 = *(GNode **)data2; @@ -284,7 +284,7 @@ qsort_callback(const void *data1, const void *data2) } static int -qsort_callback_source(const void *data1, const void *data2) +qsort_callback_source(gconstpointer data1, gconstpointer data2) { return etsv_compare_closure(data1, data2); } @@ -292,8 +292,8 @@ qsort_callback_source(const void *data1, const void *data2) static void etsv_setup_closures(ETreeSortedVariable *etsv) { - int j; - int cols; + gint j; + gint cols; cols = e_table_sort_info_sorting_get_count(etsv->sort_info); cols_closure = cols; @@ -367,7 +367,7 @@ etsv_sort_tree(ETreeSortedVariable *etsv, GNode *root) static void etsv_sort(ETreeSortedVariable *etsv) { - static int reentering = 0; + static gint reentering = 0; if (reentering) return; reentering = 1; @@ -440,8 +440,8 @@ etsv_add_all_node (ETreeSortedVariable *etsv, ETreePath *path, GNode *node) { ETreeModel *source = etsv->source; ETreePath **children; - int n; - int i; + gint n; + gint i; n = e_tree_model_node_get_children(source, path, &children); qsort(children, n, sizeof(ETreePath *), qsort_callback_source); diff --git a/widgets/table/e-tree-sorted-variable.h b/widgets/table/e-tree-sorted-variable.h index 15f9d8e8af..2d5af111d9 100644 --- a/widgets/table/e-tree-sorted-variable.h +++ b/widgets/table/e-tree-sorted-variable.h @@ -46,11 +46,11 @@ typedef struct { ETableHeader *full_header; - int table_model_changed_id; - int table_model_row_changed_id; - int table_model_cell_changed_id; - int sort_info_changed_id; - int sort_idle_id; + gint table_model_changed_id; + gint table_model_row_changed_id; + gint table_model_cell_changed_id; + gint sort_info_changed_id; + gint sort_idle_id; int insert_idle_id; int insert_count; diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c index 092fa87b9b..3ec12c8360 100644 --- a/widgets/table/e-tree-sorted.c +++ b/widgets/table/e-tree-sorted.c @@ -66,8 +66,8 @@ struct ETreeSortedPath { ETreeSortedPath *parent; gint num_children; ETreeSortedPath **children; - int position; - int orig_position; + gint position; + gint orig_position; guint needs_resort : 1; guint child_needs_resort : 1; @@ -84,20 +84,20 @@ struct ETreeSortedPriv { ETreeSortedPath *last_access; - int tree_model_pre_change_id; - int tree_model_no_change_id; - int tree_model_node_changed_id; - int tree_model_node_data_changed_id; - int tree_model_node_col_changed_id; - int tree_model_node_inserted_id; - int tree_model_node_removed_id; - int tree_model_node_deleted_id; - int tree_model_node_request_collapse_id; - - int sort_info_changed_id; - int sort_idle_id; - int insert_idle_id; - int insert_count; + gint tree_model_pre_change_id; + gint tree_model_no_change_id; + gint tree_model_node_changed_id; + gint tree_model_node_data_changed_id; + gint tree_model_node_col_changed_id; + gint tree_model_node_inserted_id; + gint tree_model_node_removed_id; + gint tree_model_node_deleted_id; + gint tree_model_node_request_collapse_id; + + gint sort_info_changed_id; + gint sort_idle_id; + gint insert_idle_id; + gint insert_count; guint in_resort_idle : 1; guint nested_resort_idle : 1; @@ -184,11 +184,11 @@ check_last_access (ETreeSorted *ets, ETreePath corresponding) #ifdef CHECK_AROUND_LAST_ACCESS parent = ets->priv->last_access->parent; if (parent && parent->children) { - int position = ets->priv->last_access->position; - int end = MIN(parent->num_children, position + 10); - int start = MAX(0, position - 10); - int initial = MAX (MIN (position, end), start); - int i; + gint position = ets->priv->last_access->position; + gint end = MIN(parent->num_children, position + 10); + gint start = MAX(0, position - 10); + gint initial = MAX (MIN (position, end), start); + gint i; for (i = initial; i < end; i++) { if (parent->children[i] && parent->children[i]->corresponding == corresponding) { @@ -211,9 +211,9 @@ check_last_access (ETreeSorted *ets, ETreePath corresponding) static ETreeSortedPath * find_path(ETreeSorted *ets, ETreePath corresponding) { - int depth; + gint depth; ETreePath *sequence; - int i; + gint i; ETreeSortedPath *path; ETreeSortedPath *check_last; @@ -238,7 +238,7 @@ find_path(ETreeSorted *ets, ETreePath corresponding) path = ets->priv->root; for (i = depth - 1; i >= 0 && path != NULL; i --) { - int j; + gint j; if (path->num_children == -1) { path = NULL; @@ -268,7 +268,7 @@ find_path(ETreeSorted *ets, ETreePath corresponding) static ETreeSortedPath * find_child_path(ETreeSorted *ets, ETreeSortedPath *parent, ETreePath corresponding) { - int i; + gint i; if (corresponding == NULL) return NULL; @@ -287,9 +287,9 @@ find_child_path(ETreeSorted *ets, ETreeSortedPath *parent, ETreePath correspondi static ETreeSortedPath * find_or_create_path(ETreeSorted *ets, ETreePath corresponding) { - int depth; + gint depth; ETreePath *sequence; - int i; + gint i; ETreeSortedPath *path; ETreeSortedPath *check_last; @@ -314,7 +314,7 @@ find_or_create_path(ETreeSorted *ets, ETreePath corresponding) path = ets->priv->root; for (i = depth - 1; i >= 0 && path != NULL; i --) { - int j; + gint j; if (path->num_children == -1) { generate_children(ets, path); @@ -343,7 +343,7 @@ find_or_create_path(ETreeSorted *ets, ETreePath corresponding) static void free_children (ETreeSortedPath *path) { - int i; + gint i; if (path == NULL) return; @@ -388,8 +388,8 @@ new_path (ETreeSortedPath *parent, ETreePath corresponding) static gboolean reposition_path (ETreeSorted *ets, ETreeSortedPath *path) { - int new_index; - int old_index = path->position; + gint new_index; + gint old_index = path->position; ETreeSortedPath *parent = path->parent; gboolean changed = FALSE; if (parent) { @@ -412,7 +412,7 @@ reposition_path (ETreeSorted *ets, ETreeSortedPath *path) old_index); if (new_index > old_index) { - int i; + gint i; ets->priv->insert_count++; memmove(parent->children + old_index, parent->children + old_index + 1, sizeof (ETreePath) * (new_index - old_index)); parent->children[new_index] = path; @@ -422,7 +422,7 @@ reposition_path (ETreeSorted *ets, ETreeSortedPath *path) e_tree_model_node_changed(E_TREE_MODEL(ets), parent); e_tree_sorted_node_resorted(ets, parent); } else if (new_index < old_index) { - int i; + gint i; ets->priv->insert_count++; memmove(parent->children + new_index + 1, parent->children + new_index, sizeof (ETreePath) * (old_index - new_index)); parent->children[new_index] = path; @@ -443,7 +443,7 @@ static void regenerate_children(ETreeSorted *ets, ETreeSortedPath *path) { ETreeSortedPath **children; - int i; + gint i; children = g_new(ETreeSortedPath *, path->num_children); for (i = 0; i < path->num_children; i++) @@ -456,8 +456,8 @@ static void generate_children(ETreeSorted *ets, ETreeSortedPath *path) { ETreePath child; - int i; - int count; + gint i; + gint count; free_children(path); @@ -492,7 +492,7 @@ resort_node (ETreeSorted *ets, ETreeSortedPath *path, gboolean resort_all_childr if (needs_resort && send_signals) e_tree_model_pre_change(E_TREE_MODEL(ets)); if (needs_resort) { - int i; + gint i; d(g_print("Start sort of node %p\n", path)); if (needs_regen) regenerate_children(ets, path); @@ -511,7 +511,7 @@ resort_node (ETreeSorted *ets, ETreeSortedPath *path, gboolean resort_all_childr if (path->resort_all_children) resort_all_children = TRUE; if ((resort_all_children || path->child_needs_resort) && path->num_children >= 0) { - int i; + gint i; for (i = 0; i < path->num_children; i++) { resort_node(ets, path->children[i], resort_all_children, needs_regen, send_signals && !needs_resort); } @@ -779,7 +779,7 @@ ets_get_children (ETreeModel *etm, ETreePath node, ETreePath **nodes) n_children = path->num_children; if (nodes) { - int i; + gint i; (*nodes) = g_malloc (sizeof (ETreePath) * n_children); for (i = 0; i < n_children; i ++) { @@ -851,7 +851,7 @@ ets_has_get_node_by_id (ETreeModel *etm) } static ETreePath -ets_get_node_by_id (ETreeModel *etm, const char *save_id) +ets_get_node_by_id (ETreeModel *etm, const gchar *save_id) { ETreeSorted *ets = E_TREE_SORTED(etm); ETreePath node; @@ -870,8 +870,8 @@ ets_has_change_pending (ETreeModel *etm) } -static void * -ets_value_at (ETreeModel *etm, ETreePath node, int col) +static gpointer +ets_value_at (ETreeModel *etm, ETreePath node, gint col) { ETreeSorted *ets = E_TREE_SORTED(etm); ETreeSortedPath *path = node; @@ -880,7 +880,7 @@ ets_value_at (ETreeModel *etm, ETreePath node, int col) } static void -ets_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val) +ets_set_value_at (ETreeModel *etm, ETreePath node, gint col, gconstpointer val) { ETreeSorted *ets = E_TREE_SORTED(etm); ETreeSortedPath *path = node; @@ -889,7 +889,7 @@ ets_set_value_at (ETreeModel *etm, ETreePath node, int col, const void *val) } static gboolean -ets_is_editable (ETreeModel *etm, ETreePath node, int col) +ets_is_editable (ETreeModel *etm, ETreePath node, gint col) { ETreeSorted *ets = E_TREE_SORTED(etm); ETreeSortedPath *path = node; @@ -899,8 +899,8 @@ ets_is_editable (ETreeModel *etm, ETreePath node, int col) /* The default for ets_duplicate_value is to return the raw value. */ -static void * -ets_duplicate_value (ETreeModel *etm, int col, const void *value) +static gpointer +ets_duplicate_value (ETreeModel *etm, gint col, gconstpointer value) { ETreeSorted *ets = E_TREE_SORTED(etm); @@ -908,15 +908,15 @@ ets_duplicate_value (ETreeModel *etm, int col, const void *value) } static void -ets_free_value (ETreeModel *etm, int col, void *value) +ets_free_value (ETreeModel *etm, gint col, gpointer value) { ETreeSorted *ets = E_TREE_SORTED(etm); e_tree_model_free_value (ets->priv->source, col, value); } -static void * -ets_initialize_value (ETreeModel *etm, int col) +static gpointer +ets_initialize_value (ETreeModel *etm, gint col) { ETreeSorted *ets = E_TREE_SORTED(etm); @@ -924,15 +924,15 @@ ets_initialize_value (ETreeModel *etm, int col) } static gboolean -ets_value_is_empty (ETreeModel *etm, int col, const void *value) +ets_value_is_empty (ETreeModel *etm, gint col, gconstpointer value) { ETreeSorted *ets = E_TREE_SORTED(etm); return e_tree_model_value_is_empty (ets->priv->source, col, value); } -static char * -ets_value_to_string (ETreeModel *etm, int col, const void *value) +static gchar * +ets_value_to_string (ETreeModel *etm, gint col, gconstpointer value) { ETreeSorted *ets = E_TREE_SORTED(etm); @@ -999,7 +999,7 @@ ets_proxy_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSorted *ets) } static void -ets_proxy_node_col_changed (ETreeModel *etm, ETreePath node, int col, ETreeSorted *ets) +ets_proxy_node_col_changed (ETreeModel *etm, ETreePath node, gint col, ETreeSorted *ets) { ETreeSortedPath *path = find_path(ets, node); @@ -1021,10 +1021,10 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr ETreeSortedPath *parent_path = find_path(ets, parent); if (parent_path && parent_path->num_children != -1) { - int i; - int j; + gint i; + gint j; ETreeSortedPath *path; - int position = parent_path->num_children; + gint position = parent_path->num_children; ETreePath counter; for (counter = e_tree_model_node_get_next(etm, child); @@ -1084,7 +1084,7 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr } static void -ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int old_position, ETreeSorted *ets) +ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint old_position, ETreeSorted *ets) { ETreeSortedPath *parent_path = find_path(ets, parent); ETreeSortedPath *path; @@ -1098,7 +1098,7 @@ ets_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int ets->priv->last_access = NULL; if (path && parent_path && parent_path->num_children != -1) { - int i; + gint i; for (i = 0; i < parent_path->num_children; i++) { if (parent_path->children[i]->orig_position > old_position) parent_path->children[i]->orig_position --; @@ -1313,7 +1313,7 @@ e_tree_sorted_model_to_view_path (ETreeSorted *ets, return find_or_create_path(ets, model_path); } -int +gint e_tree_sorted_orig_position (ETreeSorted *ets, ETreePath path) { @@ -1321,7 +1321,7 @@ e_tree_sorted_orig_position (ETreeSorted *ets, return sorted_path->orig_position; } -int +gint e_tree_sorted_node_num_children (ETreeSorted *ets, ETreePath path) { diff --git a/widgets/table/e-tree-sorted.h b/widgets/table/e-tree-sorted.h index 1e286b7e75..45adbef1fb 100644 --- a/widgets/table/e-tree-sorted.h +++ b/widgets/table/e-tree-sorted.h @@ -69,9 +69,9 @@ ETreePath e_tree_sorted_view_to_model_path (ETreeSorted *ets, ETreePath view_path); ETreePath e_tree_sorted_model_to_view_path (ETreeSorted *ets, ETreePath model_path); -int e_tree_sorted_orig_position (ETreeSorted *ets, +gint e_tree_sorted_orig_position (ETreeSorted *ets, ETreePath path); -int e_tree_sorted_node_num_children (ETreeSorted *ets, +gint e_tree_sorted_node_num_children (ETreeSorted *ets, ETreePath path); void e_tree_sorted_node_resorted (ETreeSorted *tree_model, diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index 7cfeab33ed..2018ea59bb 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -60,8 +60,8 @@ struct ETreeTableAdapterPriv { ETableSortInfo *sort_info; ETableHeader *header; - int n_map; - int n_vals_allocated; + gint n_map; + gint n_vals_allocated; node_t **map_table; GHashTable *nodes; GNode *root; @@ -69,22 +69,22 @@ struct ETreeTableAdapterPriv { guint root_visible : 1; guint remap_needed : 1; - int last_access; + gint last_access; - int pre_change_id; - int no_change_id; + gint pre_change_id; + gint no_change_id; int rebuilt_id; - int node_changed_id; - int node_data_changed_id; - int node_col_changed_id; - int node_inserted_id; - int node_removed_id; - int node_request_collapse_id; - int sort_info_changed_id; + gint node_changed_id; + gint node_data_changed_id; + gint node_col_changed_id; + gint node_inserted_id; + gint node_removed_id; + gint node_request_collapse_id; + gint sort_info_changed_id; guint resort_idle_id; - int force_expanded_state; /* use this instead of model's default if not 0; <0 ... collapse, >0 ... expand */ + gint force_expanded_state; /* use this instead of model's default if not 0; <0 ... collapse, >0 ... expand */ }; static void etta_sort_info_changed (ETableSortInfo *sort_info, ETreeTableAdapter *etta); @@ -103,7 +103,7 @@ lookup_gnode(ETreeTableAdapter *etta, ETreePath path) } static void -resize_map(ETreeTableAdapter *etta, int size) +resize_map(ETreeTableAdapter *etta, gint size) { if (size > etta->priv->n_vals_allocated) { etta->priv->n_vals_allocated = MAX(etta->priv->n_vals_allocated + INCREMENT_AMOUNT, size); @@ -114,7 +114,7 @@ resize_map(ETreeTableAdapter *etta, int size) } static void -move_map_elements(ETreeTableAdapter *etta, int to, int from, int count) +move_map_elements(ETreeTableAdapter *etta, gint to, gint from, gint count) { if (count <= 0 || from >= etta->priv->n_map) return; @@ -140,7 +140,7 @@ fill_map(ETreeTableAdapter *etta, gint index, GNode *gnode) static void remap_indices(ETreeTableAdapter *etta) { - int i; + gint i; for (i = 0; i < etta->priv->n_map; i++) etta->priv->map_table[i]->index = i; etta->priv->remap_needed = FALSE; @@ -163,7 +163,7 @@ resort_node(ETreeTableAdapter *etta, GNode *gnode, gboolean recurse) node_t *node = (node_t *)gnode->data; ETreePath *paths, path; GNode *prev, *curr; - int i, count; + gint i, count; gboolean sort_needed; if (node->num_visible_children == 0) @@ -222,7 +222,7 @@ get_row(ETreeTableAdapter *etta, ETreePath path) } static ETreePath -get_path (ETreeTableAdapter *etta, int row) +get_path (ETreeTableAdapter *etta, gint row) { if (row == -1 && etta->priv->n_map > 0) row = etta->priv->n_map - 1; @@ -263,7 +263,7 @@ static int delete_children(ETreeTableAdapter *etta, GNode *gnode) { node_t *node = (node_t *)gnode->data; - int to_remove = node ? node->num_visible_children : 0; + gint to_remove = node ? node->num_visible_children : 0; if (to_remove == 0) return 0; @@ -280,9 +280,9 @@ delete_children(ETreeTableAdapter *etta, GNode *gnode) static void delete_node(ETreeTableAdapter *etta, ETreePath parent, ETreePath path) { - int to_remove = 1; - int parent_row = get_row(etta, parent); - int row = get_row(etta, path); + gint to_remove = 1; + gint parent_row = get_row(etta, parent); + gint row = get_row(etta, path); GNode *gnode = lookup_gnode(etta, path); GNode *parent_gnode = lookup_gnode(etta, parent); @@ -338,8 +338,8 @@ static gint insert_children(ETreeTableAdapter *etta, GNode *gnode) { ETreePath path, tmp; - int count = 0; - int pos = 0; + gint count = 0; + gint pos = 0; path = ((node_t *)gnode->data)->path; for (tmp = e_tree_model_node_get_first_child(etta->priv->source, path); @@ -361,7 +361,7 @@ generate_tree(ETreeTableAdapter *etta, ETreePath path) { GNode *gnode; node_t *node; - int size; + gint size; e_table_model_pre_change(E_TABLE_MODEL(etta)); @@ -391,7 +391,7 @@ insert_node(ETreeTableAdapter *etta, ETreePath parent, ETreePath path) GNode *gnode, *parent_gnode; node_t *node, *parent_node; gboolean expandable; - int size, row; + gint size, row; e_table_model_pre_change(E_TABLE_MODEL(etta)); @@ -583,7 +583,7 @@ etta_has_save_id (ETableModel *etm) } static gchar * -etta_get_save_id (ETableModel *etm, int row) +etta_get_save_id (ETableModel *etm, gint row) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -607,8 +607,8 @@ etta_row_count (ETableModel *etm) return etta->priv->n_map; } -static void * -etta_value_at (ETableModel *etm, int col, int row) +static gpointer +etta_value_at (ETableModel *etm, gint col, gint row) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -627,7 +627,7 @@ etta_value_at (ETableModel *etm, int col, int row) } static void -etta_set_value_at (ETableModel *etm, int col, int row, const void *val) +etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -635,7 +635,7 @@ etta_set_value_at (ETableModel *etm, int col, int row, const void *val) } static gboolean -etta_is_cell_editable (ETableModel *etm, int col, int row) +etta_is_cell_editable (ETableModel *etm, gint col, gint row) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -643,12 +643,12 @@ etta_is_cell_editable (ETableModel *etm, int col, int row) } static void -etta_append_row (ETableModel *etm, ETableModel *source, int row) +etta_append_row (ETableModel *etm, ETableModel *source, gint row) { } -static void * -etta_duplicate_value (ETableModel *etm, int col, const void *value) +static gpointer +etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -656,15 +656,15 @@ etta_duplicate_value (ETableModel *etm, int col, const void *value) } static void -etta_free_value (ETableModel *etm, int col, void *value) +etta_free_value (ETableModel *etm, gint col, gpointer value) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; e_tree_model_free_value (etta->priv->source, col, value); } -static void * -etta_initialize_value (ETableModel *etm, int col) +static gpointer +etta_initialize_value (ETableModel *etm, gint col) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -672,15 +672,15 @@ etta_initialize_value (ETableModel *etm, int col) } static gboolean -etta_value_is_empty (ETableModel *etm, int col, const void *value) +etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; return e_tree_model_value_is_empty (etta->priv->source, col, value); } -static char * -etta_value_to_string (ETableModel *etm, int col, const void *value) +static gchar * +etta_value_to_string (ETableModel *etm, gint col, gconstpointer value) { ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; @@ -793,7 +793,7 @@ etta_proxy_node_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *ett static void etta_proxy_node_data_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter *etta) { - int row = get_row(etta, path); + gint row = get_row(etta, path); if (row == -1) { e_table_model_no_change(E_TABLE_MODEL(etta)); @@ -804,9 +804,9 @@ etta_proxy_node_data_changed (ETreeModel *etm, ETreePath path, ETreeTableAdapter } static void -etta_proxy_node_col_changed (ETreeModel *etm, ETreePath path, int col, ETreeTableAdapter *etta) +etta_proxy_node_col_changed (ETreeModel *etm, ETreePath path, gint col, ETreeTableAdapter *etta) { - int row = get_row(etta, path); + gint row = get_row(etta, path); if (row == -1) { e_table_model_no_change(E_TABLE_MODEL(etta)); @@ -828,7 +828,7 @@ etta_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ET } static void -etta_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int old_position, ETreeTableAdapter *etta) +etta_proxy_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, gint old_position, ETreeTableAdapter *etta) { delete_node(etta, parent, child); e_table_model_changed(E_TABLE_MODEL(etta)); @@ -926,8 +926,8 @@ save_expanded_state_func (gpointer keyp, gpointer value, gpointer data) if (node->expanded != tar->expanded_default) { gchar *save_id = e_tree_model_get_save_id(tar->model, path); - xmlnode = xmlNewChild (tar->root, NULL, (const unsigned char *)"node", NULL); - e_xml_set_string_prop_by_name(xmlnode, (const unsigned char *)"id", save_id); + xmlnode = xmlNewChild (tar->root, NULL, (const guchar *)"node", NULL); + e_xml_set_string_prop_by_name(xmlnode, (const guchar *)"id", save_id); g_free(save_id); } } @@ -941,16 +941,16 @@ e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta) g_return_val_if_fail (etta != NULL, NULL); - doc = xmlNewDoc ((const unsigned char *)"1.0"); - root = xmlNewDocNode (doc, NULL, (const unsigned char *)"expanded_state", NULL); + doc = xmlNewDoc ((const guchar *)"1.0"); + root = xmlNewDocNode (doc, NULL, (const guchar *)"expanded_state", NULL); xmlDocSetRootElement (doc, root); tar.model = etta->priv->source; tar.root = root; tar.expanded_default = e_tree_model_get_expanded_default(etta->priv->source); - e_xml_set_integer_prop_by_name (root, (const unsigned char *)"vers", 2); - e_xml_set_bool_prop_by_name (root, (const unsigned char *)"default", tar.expanded_default); + e_xml_set_integer_prop_by_name (root, (const guchar *)"vers", 2); + e_xml_set_bool_prop_by_name (root, (const guchar *)"default", tar.expanded_default); g_hash_table_foreach (etta->priv->nodes, save_expanded_state_func, &tar); @@ -958,7 +958,7 @@ e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta) } void -e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *filename) +e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const gchar *filename) { xmlDoc *doc; @@ -972,11 +972,11 @@ e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *f } static xmlDoc * -open_file (ETreeTableAdapter *etta, const char *filename) +open_file (ETreeTableAdapter *etta, const gchar *filename) { xmlDoc *doc; xmlNode *root; - int vers; + gint vers; gboolean model_default, saved_default; if (!g_file_test (filename, G_FILE_TEST_EXISTS)) @@ -996,18 +996,18 @@ open_file (ETreeTableAdapter *etta, const char *filename) return NULL; root = xmlDocGetRootElement (doc); - if (root == NULL || strcmp ((char *)root->name, "expanded_state")) { + if (root == NULL || strcmp ((gchar *)root->name, "expanded_state")) { xmlFreeDoc (doc); return NULL; } - vers = e_xml_get_integer_prop_by_name_with_default (root, (const unsigned char *)"vers", 0); + vers = e_xml_get_integer_prop_by_name_with_default (root, (const guchar *)"vers", 0); if (vers > 2) { xmlFreeDoc (doc); return NULL; } model_default = e_tree_model_get_expanded_default (etta->priv->source); - saved_default = e_xml_get_bool_prop_by_name_with_default (root, (const unsigned char *)"default", !model_default); + saved_default = e_xml_get_bool_prop_by_name_with_default (root, (const guchar *)"default", !model_default); if (saved_default != model_default) { xmlFreeDoc (doc); return NULL; @@ -1018,7 +1018,7 @@ open_file (ETreeTableAdapter *etta, const char *filename) /* state: <0 ... collapse; 0 ... use default; >0 ... expand */ void -e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, int state) +e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, gint state) { g_return_if_fail (etta != NULL); @@ -1041,10 +1041,10 @@ e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *d model_default = e_tree_model_get_expanded_default(etta->priv->source); - if (!strcmp ((char *)root->name, "expanded_state")) { - char *state; + if (!strcmp ((gchar *)root->name, "expanded_state")) { + gchar *state; - state = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"default", ""); + state = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"default", ""); if (state[0] == 't') file_default = TRUE; @@ -1062,15 +1062,15 @@ e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *d } for (child = root->xmlChildrenNode; child; child = child->next) { - char *id; + gchar *id; ETreePath path; - if (strcmp ((char *)child->name, "node")) { + if (strcmp ((gchar *)child->name, "node")) { d(g_warning ("unknown node '%s' in %s", child->name, filename)); continue; } - id = e_xml_get_string_prop_by_name_with_default (child, (const unsigned char *)"id", ""); + id = e_xml_get_string_prop_by_name_with_default (child, (const guchar *)"id", ""); if (!strcmp(id, "")) { g_free(id); @@ -1088,7 +1088,7 @@ e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *d } void -e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *filename) +e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const gchar *filename) { xmlDoc *doc; @@ -1106,7 +1106,7 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f void e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean visible) { - int size; + gint size; g_return_if_fail (etta != NULL); @@ -1133,7 +1133,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path, { GNode *gnode = lookup_gnode(etta, path); node_t *node; - int row; + gint row; if (!expanded && (!gnode || (e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible))) return; @@ -1163,7 +1163,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path, if (expanded) { - int num_children = insert_children(etta, gnode); + gint num_children = insert_children(etta, gnode); update_child_counts(gnode, num_children); if (etta->priv->sort_info && e_table_sort_info_sorting_get_count(etta->priv->sort_info) > 0) resort_node(etta, gnode, TRUE); @@ -1175,7 +1175,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path, } else e_table_model_no_change(E_TABLE_MODEL(etta)); } else { - int num_children = delete_children(etta, gnode); + gint num_children = delete_children(etta, gnode); if (num_children == 0) { e_table_model_no_change(E_TABLE_MODEL(etta)); return; @@ -1202,12 +1202,12 @@ e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta, ETreePa } ETreePath -e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta, int row) +e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta, gint row) { return get_path(etta, row); } -int +gint e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta, ETreePath path) { return get_row(etta, path); diff --git a/widgets/table/e-tree-table-adapter.h b/widgets/table/e-tree-table-adapter.h index 13ab5787c0..6a0f67bca8 100644 --- a/widgets/table/e-tree-table-adapter.h +++ b/widgets/table/e-tree-table-adapter.h @@ -72,12 +72,12 @@ void e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter ETreePath path, gboolean expanded); void e_tree_table_adapter_force_expanded_state (ETreeTableAdapter *etta, - int state); + gint state); void e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean visible); ETreePath e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta, - int row); -int e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta, + gint row); +gint e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta, ETreePath path); gboolean e_tree_table_adapter_root_node_is_visible (ETreeTableAdapter *etta); @@ -85,9 +85,9 @@ void e_tree_table_adapter_show_node (ETreeTableAdapter ETreePath path); void e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, - const char *filename); + const gchar *filename); void e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, - const char *filename); + const gchar *filename); xmlDoc *e_tree_table_adapter_save_expanded_state_xml (ETreeTableAdapter *etta); void e_tree_table_adapter_load_expanded_state_xml (ETreeTableAdapter *etta, xmlDoc *doc); diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index e58ac1bdd9..725654b90e 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -130,14 +130,14 @@ struct ETreePriv { guint search_search_id; guint search_accept_id; - int reflow_idle_id; - int scroll_idle_id; - int hover_idle_id; + gint reflow_idle_id; + gint scroll_idle_id; + gint hover_idle_id; - int table_model_change_id; - int table_row_change_id; - int table_cell_change_id; - int table_rows_delete_id; + gint table_model_change_id; + gint table_row_change_id; + gint table_cell_change_id; + gint table_rows_delete_id; GnomeCanvasItem *info_text; guint info_text_resize_id; @@ -173,22 +173,22 @@ struct ETreePriv { ECursorMode cursor_mode; - int drop_row; + gint drop_row; ETreePath drop_path; - int drop_col; + gint drop_col; GnomeCanvasItem *drop_highlight; - int last_drop_x; - int last_drop_y; - int last_drop_time; + gint last_drop_x; + gint last_drop_y; + gint last_drop_time; GdkDragContext *last_drop_context; - int hover_x; - int hover_y; + gint hover_x; + gint hover_y; - int drag_row; + gint drag_row; ETreePath drag_path; - int drag_col; + gint drag_col; ETreeDragSourceSite *site; GList *expanded_list; @@ -243,7 +243,7 @@ static void et_drag_data_received(GtkWidget *widget, static void scroll_off (ETree *et); static void scroll_on (ETree *et, guint scroll_direction); static void hover_off (ETree *et); -static void hover_on (ETree *et, int x, int y); +static void hover_on (ETree *et, gint x, gint y); static void context_destroyed (gpointer data, GObject *ctx); static void @@ -451,14 +451,14 @@ et_unrealize (GtkWidget *widget) typedef struct { ETree *et; - char *string; + gchar *string; } SearchSearchStruct; static gboolean search_search_callback (ETreeModel *model, ETreePath path, gpointer data) { SearchSearchStruct *cb_data = data; - const void *value; + gconstpointer value; ETableCol *col = current_search_col (cb_data->et); value = e_tree_model_value_at (model, path, cb_data->et->priv->current_search_col->col_idx); @@ -467,7 +467,7 @@ search_search_callback (ETreeModel *model, ETreePath path, gpointer data) } static gboolean -et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, ETree *et) +et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags, ETree *et) { ETreePath cursor; ETreePath found; @@ -483,7 +483,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E cursor = e_tree_get_cursor (et); if (cursor && (flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST)) { - const void *value; + gconstpointer value; value = e_tree_model_value_at (et->priv->model, cursor, col->col_idx); @@ -497,7 +497,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E found = e_tree_model_node_find (et->priv->model, NULL, cursor, E_TREE_FIND_NEXT_FORWARD, search_search_callback, &cb_data); if (found && found != cursor) { - int model_row; + gint model_row; e_tree_table_adapter_show_node (et->priv->etta, found); model_row = e_tree_table_adapter_row_of_node (et->priv->etta, found); @@ -507,7 +507,7 @@ et_search_search (ETableSearch *search, char *string, ETableSearchFlags flags, E e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->priv->selection), model_row, col->col_idx, GDK_CONTROL_MASK); return TRUE; } else if (cursor && !(flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST)) { - const void *value; + gconstpointer value; value = e_tree_model_value_at (et->priv->model, cursor, col->col_idx); @@ -520,7 +520,7 @@ static void et_search_accept (ETableSearch *search, ETree *et) { ETableCol *col = current_search_col (et); - int cursor; + gint cursor; if (col == NULL) return; @@ -698,7 +698,7 @@ header_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *e_t static void e_tree_setup_header (ETree *e_tree) { - char *pointer; + gchar *pointer; e_tree->priv->header_canvas = GNOME_CANVAS (e_canvas_new ()); GTK_WIDGET_UNSET_FLAGS (e_tree->priv->header_canvas, GTK_CAN_FOCUS); @@ -785,8 +785,8 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, x = y = w = h = 0; if (path) { - int row = e_tree_row_of_node(e_tree, path); - int col = 0; + gint row = e_tree_row_of_node(e_tree, path); + gint col = 0; if (row >= 0) e_table_item_get_cell_geometry (E_TABLE_ITEM (e_tree->priv->item), @@ -805,7 +805,7 @@ tree_canvas_reflow (GnomeCanvas *canvas, ETree *e_tree) } static void -item_cursor_change (ETableItem *eti, int row, ETree *et) +item_cursor_change (ETableItem *eti, gint row, ETree *et) { ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row); g_signal_emit (et, @@ -814,7 +814,7 @@ item_cursor_change (ETableItem *eti, int row, ETree *et) } static void -item_cursor_activated (ETableItem *eti, int row, ETree *et) +item_cursor_activated (ETableItem *eti, gint row, ETree *et) { ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row); g_signal_emit (et, @@ -824,7 +824,7 @@ item_cursor_activated (ETableItem *eti, int row, ETree *et) } static void -item_double_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) +item_double_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et) { ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row); g_signal_emit (et, @@ -833,9 +833,9 @@ item_double_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et } static gint -item_right_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) +item_right_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et) { - int return_val = 0; + gint return_val = 0; ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row); g_signal_emit (et, et_signals [RIGHT_CLICK], 0, @@ -844,9 +844,9 @@ item_right_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) } static gint -item_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) +item_click (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et) { - int return_val = 0; + gint return_val = 0; ETreePath path = e_tree_table_adapter_node_at_row(et->priv->etta, row); g_signal_emit (et, et_signals [CLICK], 0, @@ -855,12 +855,12 @@ item_click (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) } static gint -item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) +item_key_press (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et) { - int return_val = 0; + gint return_val = 0; GdkEventKey *key = (GdkEventKey *) event; ETreePath path; - int y, row_local, col_local; + gint y, row_local, col_local; GtkAdjustment *vadj; switch (key->keyval) { @@ -945,7 +945,7 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) } static gint -item_start_drag (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) +item_start_drag (ETableItem *eti, gint row, gint col, GdkEvent *event, ETree *et) { ETreePath path; gint return_val = 0; @@ -967,7 +967,7 @@ et_selection_model_selection_changed (ETableSelectionModel *etsm, ETree *et) } static void -et_selection_model_selection_row_changed (ETableSelectionModel *etsm, int row, ETree *et) +et_selection_model_selection_row_changed (ETableSelectionModel *etsm, gint row, ETree *et) { g_signal_emit (et, et_signals [SELECTION_CHANGE], 0); @@ -1018,7 +1018,7 @@ et_canvas_style_set (GtkWidget *widget, GtkStyle *prev_style) static gint white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETree *e_tree) { - int return_val = 0; + gint return_val = 0; g_signal_emit (e_tree, et_signals [WHITE_SPACE_EVENT], 0, event, &return_val); @@ -1252,8 +1252,8 @@ ETableState * e_tree_get_state_object (ETree *e_tree) { ETableState *state; - int full_col_count; - int i, j; + gint full_col_count; + gint i, j; state = e_table_state_new(); state->sort_info = e_tree->priv->sort_info; @@ -1342,19 +1342,19 @@ et_table_model_changed (ETableModel *model, ETree *et) } static void -et_table_row_changed (ETableModel *table_model, int row, ETree *et) +et_table_row_changed (ETableModel *table_model, gint row, ETree *et) { et_table_model_changed (table_model, et); } static void -et_table_cell_changed (ETableModel *table_model, int view_col, int row, ETree *et) +et_table_cell_changed (ETableModel *table_model, gint view_col, gint row, ETree *et) { et_table_model_changed (table_model, et); } static void -et_table_rows_deleted (ETableModel *table_model, int row, int count, ETree *et) +et_table_rows_deleted (ETableModel *table_model, gint row, gint count, ETree *et) { ETreePath * node, * prev_node; @@ -1400,7 +1400,7 @@ static gboolean et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, ETableSpecification *specification, ETableState *state) { - int row = 0; + gint row = 0; if (ete) g_object_ref(ete); @@ -1494,7 +1494,7 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, **/ gboolean e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, - const char *spec_str, const char *state_str) + const gchar *spec_str, const gchar *state_str) { ETableSpecification *specification; ETableState *state; @@ -1553,7 +1553,7 @@ e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, **/ gboolean e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, - const char *spec_fn, const char *state_fn) + const gchar *spec_fn, const gchar *state_fn) { ETableSpecification *specification; ETableState *state; @@ -1622,7 +1622,7 @@ e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *e * The newly created #ETree or %NULL if there's an error. **/ GtkWidget * -e_tree_new (ETreeModel *etm, ETableExtras *ete, const char *spec, const char *state) +e_tree_new (ETreeModel *etm, ETableExtras *ete, const gchar *spec, const gchar *state) { ETree *e_tree; @@ -1662,7 +1662,7 @@ e_tree_new (ETreeModel *etm, ETableExtras *ete, const char *spec, const char *st * The newly created #ETree or %NULL if there's an error. **/ GtkWidget * -e_tree_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, const char *spec_fn, const char *state_fn) +e_tree_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, const gchar *spec_fn, const gchar *state_fn) { ETree *e_tree; @@ -1685,7 +1685,7 @@ void e_tree_set_cursor (ETree *e_tree, ETreePath path) { #ifndef E_TREE_USE_TREE_SELECTION - int row; + gint row; #endif g_return_if_fail(e_tree != NULL); g_return_if_fail(E_IS_TREE(e_tree)); @@ -1712,7 +1712,7 @@ e_tree_get_cursor (ETree *e_tree) #ifdef E_TREE_USE_TREE_SELECTION return e_tree_selection_model_get_cursor (E_TREE_SELECTION_MODEL(e_tree->priv->selection)); #else - int row; + gint row; ETreePath path; g_return_val_if_fail(e_tree != NULL, NULL); g_return_val_if_fail(E_IS_TREE(e_tree), NULL); @@ -1825,7 +1825,7 @@ et_get_property (GObject *object, } typedef struct { - char *arg; + gchar *arg; gboolean setting; } bool_closure; @@ -1926,7 +1926,7 @@ e_tree_get_next_row (ETree *e_tree, g_return_val_if_fail(E_IS_TREE(e_tree), -1); if (e_tree->priv->sorter) { - int i; + gint i; i = e_sorter_model_to_sorted(E_SORTER (e_tree->priv->sorter), model_row); i++; if (i < e_table_model_row_count(E_TABLE_MODEL(e_tree->priv->etta))) { @@ -1948,7 +1948,7 @@ e_tree_get_prev_row (ETree *e_tree, g_return_val_if_fail(E_IS_TREE(e_tree), -1); if (e_tree->priv->sorter) { - int i; + gint i; i = e_sorter_model_to_sorted(E_SORTER (e_tree->priv->sorter), model_row); i--; if (i >= 0) @@ -2022,7 +2022,7 @@ e_tree_root_node_set_visible (ETree *et, gboolean visible) } ETreePath -e_tree_node_at_row (ETree *et, int row) +e_tree_node_at_row (ETree *et, gint row) { ETreePath path; @@ -2031,7 +2031,7 @@ e_tree_node_at_row (ETree *et, int row) return path; } -int +gint e_tree_row_of_node (ETree *et, ETreePath path) { return e_tree_table_adapter_row_of_node (et->priv->etta, path); @@ -2053,7 +2053,7 @@ e_tree_show_node (ETree *et, ETreePath path) } void -e_tree_save_expanded_state (ETree *et, char *filename) +e_tree_save_expanded_state (ETree *et, gchar *filename) { g_return_if_fail (et != NULL); g_return_if_fail (E_IS_TREE(et)); @@ -2062,7 +2062,7 @@ e_tree_save_expanded_state (ETree *et, char *filename) } void -e_tree_load_expanded_state (ETree *et, char *filename) +e_tree_load_expanded_state (ETree *et, gchar *filename) { e_tree_table_adapter_load_expanded_state (et->priv->etta, filename); } @@ -2090,7 +2090,7 @@ e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc) when using this, be sure to reset to 0 once no forcing is required anymore, aka the build of the tree is done */ void -e_tree_force_expanded_state (ETree *et, int state) +e_tree_force_expanded_state (ETree *et, gint state) { e_tree_table_adapter_force_expanded_state (et->priv->etta, state); } @@ -2321,8 +2321,8 @@ struct _GtkDragSourceInfo void e_tree_drag_get_data (ETree *tree, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GdkAtom target, guint32 time) @@ -2348,14 +2348,14 @@ e_tree_drag_get_data (ETree *tree, */ void e_tree_drag_highlight (ETree *tree, - int row, - int col) + gint row, + gint col) { g_return_if_fail(tree != NULL); g_return_if_fail(E_IS_TREE(tree)); if (row != -1) { - int x, y, width, height; + gint x, y, width, height; if (col == -1) { e_tree_get_cell_geometry (tree, row, 0, &x, &y, &width, &height); x = 0; @@ -2447,7 +2447,7 @@ e_tree_drag_dest_unset (GtkWidget *widget) /* Source side */ static gint -et_real_start_drag (ETree *tree, int row, ETreePath path, int col, GdkEvent *event) +et_real_start_drag (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event) { GtkDragSourceInfo *info; GdkDragContext *context; @@ -2545,8 +2545,8 @@ e_tree_drag_source_unset (ETree *tree) GdkDragContext * e_tree_drag_begin (ETree *tree, - int row, - int col, + gint row, + gint col, GtkTargetList *targets, GdkDragAction actions, gint button, @@ -2582,8 +2582,8 @@ e_tree_drag_begin (ETree *tree, **/ void e_tree_get_cell_at (ETree *tree, - int x, int y, - int *row_return, int *col_return) + gint x, gint y, + gint *row_return, gint *col_return) { g_return_if_fail (tree != NULL); g_return_if_fail (E_IS_TREE (tree)); @@ -2617,9 +2617,9 @@ e_tree_get_cell_at (ETree *tree, **/ void e_tree_get_cell_geometry (ETree *tree, - int row, int col, - int *x_return, int *y_return, - int *width_return, int *height_return) + gint row, gint col, + gint *x_return, gint *y_return, + gint *width_return, gint *height_return) { g_return_if_fail (tree != NULL); g_return_if_fail (E_IS_TREE (tree)); @@ -2703,7 +2703,7 @@ do_drag_motion(ETree *et, guint time) { gboolean ret_val = FALSE; - int row, col; + gint row, col; ETreePath path; e_tree_get_cell_at (et, @@ -2744,7 +2744,7 @@ static gboolean scroll_timeout (gpointer data) { ETree *et = data; - int dx = 0, dy = 0; + gint dx = 0, dy = 0; GtkAdjustment *v, *h; double vvalue, hvalue; @@ -2803,9 +2803,9 @@ static gboolean hover_timeout (gpointer data) { ETree *et = data; - int x = et->priv->hover_x; - int y = et->priv->hover_y; - int row, col; + gint x = et->priv->hover_x; + gint y = et->priv->hover_y; + gint row, col; ETreePath path; e_tree_get_cell_at (et, @@ -2827,7 +2827,7 @@ hover_timeout (gpointer data) } static void -hover_on (ETree *et, int x, int y) +hover_on (ETree *et, gint x, gint y) { et->priv->hover_x = x; et->priv->hover_y = y; @@ -2856,7 +2856,7 @@ collapse_drag (ETree *et, ETreePath drop) } for (list = et->priv->expanded_list; list; list = list->next) { - char *save_id = list->data; + gchar *save_id = list->data; ETreePath path; path = e_tree_model_get_node_by_id (et->priv->model, save_id); @@ -2938,7 +2938,7 @@ et_drag_motion(GtkWidget *widget, guint time, ETree *et) { - int ret_val; + gint ret_val; guint direction = 0; et->priv->last_drop_x = x; @@ -2988,7 +2988,7 @@ et_drag_drop(GtkWidget *widget, ETree *et) { gboolean ret_val = FALSE; - int row, col; + gint row, col; ETreePath path; e_tree_get_cell_at(et, x, @@ -3051,7 +3051,7 @@ et_drag_data_received(GtkWidget *widget, guint time, ETree *et) { - int row, col; + gint row, col; ETreePath path; e_tree_get_cell_at(et, x, @@ -3420,7 +3420,7 @@ tree_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETree *tree) * Creates an info message in table area, or removes old. **/ void -e_tree_set_info_message (ETree *tree, const char *info_message) +e_tree_set_info_message (ETree *tree, const gchar *info_message) { g_return_if_fail (tree != NULL); g_return_if_fail (tree->priv != NULL); diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index 426cf9c44d..6bcc21706e 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -60,14 +60,14 @@ typedef struct { typedef struct { GtkTableClass parent_class; - void (*cursor_change) (ETree *et, int row, ETreePath path); - void (*cursor_activated) (ETree *et, int row, ETreePath path); + void (*cursor_change) (ETree *et, gint row, ETreePath path); + void (*cursor_activated) (ETree *et, gint row, ETreePath path); void (*selection_change) (ETree *et); - void (*double_click) (ETree *et, int row, ETreePath path, int col, GdkEvent *event); - gint (*right_click) (ETree *et, int row, ETreePath path, int col, GdkEvent *event); - gint (*click) (ETree *et, int row, ETreePath path, int col, GdkEvent *event); - gint (*key_press) (ETree *et, int row, ETreePath path, int col, GdkEvent *event); - gint (*start_drag) (ETree *et, int row, ETreePath path, int col, GdkEvent *event); + void (*double_click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); + gint (*right_click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); + gint (*click) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); + gint (*key_press) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); + gint (*start_drag) (ETree *et, gint row, ETreePath path, gint col, GdkEvent *event); gint (*state_change) (ETree *et); gint (*white_space_event) (ETree *et, GdkEvent *event); @@ -77,56 +77,56 @@ typedef struct { /* Source side drag signals */ void (* tree_drag_begin) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context); void (* tree_drag_end) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context); void (* tree_drag_data_get) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time); void (* tree_drag_data_delete) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context); /* Target side drag signals */ void (* tree_drag_leave) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context, guint time); gboolean (* tree_drag_motion) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context, gint x, gint y, guint time); gboolean (* tree_drag_drop) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context, gint x, gint y, guint time); void (* tree_drag_data_received) (ETree *tree, - int row, + gint row, ETreePath path, - int col, + gint col, GdkDragContext *context, gint x, gint y, @@ -139,23 +139,23 @@ GType e_tree_get_type (void); gboolean e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); GtkWidget *e_tree_new (ETreeModel *etm, ETableExtras *ete, - const char *spec, - const char *state); + const gchar *spec, + const gchar *state); /* Create an ETree using files. */ gboolean e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); GtkWidget *e_tree_new_from_spec_file (ETreeModel *etm, ETableExtras *ete, - const char *spec_fn, - const char *state_fn); + const gchar *spec_fn, + const gchar *state_fn); /* To save the state */ gchar *e_tree_get_state (ETree *e_tree); @@ -200,17 +200,17 @@ gint e_tree_model_to_view_row (ETree *e_tree, gint e_tree_view_to_model_row (ETree *e_tree, gint view_row); void e_tree_get_cell_at (ETree *tree, - int x, - int y, - int *row_return, - int *col_return); + gint x, + gint y, + gint *row_return, + gint *col_return); void e_tree_get_cell_geometry (ETree *tree, - int row, - int col, - int *x_return, - int *y_return, - int *width_return, - int *height_return); + gint row, + gint col, + gint *x_return, + gint *y_return, + gint *width_return, + gint *height_return); /* Useful accessors */ ETreeModel * e_tree_get_model (ETree *et); @@ -220,14 +220,14 @@ ETreeTableAdapter *e_tree_get_table_adapter (ETree *et); /* Drag & drop stuff. */ /* Target */ void e_tree_drag_get_data (ETree *tree, - int row, - int col, + gint row, + gint col, GdkDragContext *context, GdkAtom target, guint32 time); void e_tree_drag_highlight (ETree *tree, - int row, - int col); /* col == -1 to highlight entire row. */ + gint row, + gint col); /* col == -1 to highlight entire row. */ void e_tree_drag_unhighlight (ETree *tree); void e_tree_drag_dest_set (ETree *tree, GtkDestDefaults flags, @@ -256,8 +256,8 @@ void e_tree_drag_source_unset (ETree *tree); * as a GtkTargetList */ GdkDragContext *e_tree_drag_begin (ETree *tree, - int row, - int col, + gint row, + gint col, GtkTargetList *targets, GdkDragAction actions, gint button, @@ -275,23 +275,23 @@ void e_tree_node_set_expanded_recurse (ETree *et, void e_tree_root_node_set_visible (ETree *et, gboolean visible); ETreePath e_tree_node_at_row (ETree *et, - int row); -int e_tree_row_of_node (ETree *et, + gint row); +gint e_tree_row_of_node (ETree *et, ETreePath path); gboolean e_tree_root_node_is_visible (ETree *et); void e_tree_show_node (ETree *et, ETreePath path); void e_tree_save_expanded_state (ETree *et, - char *filename); + gchar *filename); void e_tree_load_expanded_state (ETree *et, - char *filename); + gchar *filename); xmlDoc *e_tree_save_expanded_state_xml (ETree *et); void e_tree_load_expanded_state_xml (ETree *et, xmlDoc *doc); -int e_tree_row_count (ETree *et); +gint e_tree_row_count (ETree *et); GtkWidget *e_tree_get_tooltip (ETree *et); -void e_tree_force_expanded_state (ETree *et, int state); +void e_tree_force_expanded_state (ETree *et, gint state); typedef enum { E_TREE_FIND_NEXT_BACKWARD = 0, @@ -311,7 +311,7 @@ ETableItem * e_tree_get_item(ETree * et); GnomeCanvasItem * e_tree_get_header_item(ETree * et); -void e_tree_set_info_message (ETree *tree, const char *info_message); +void e_tree_set_info_message (ETree *tree, const gchar *info_message); G_END_DECLS diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c index c7462e21a6..1bc2090caa 100644 --- a/widgets/text/e-text-model.c +++ b/widgets/text/e-text-model.c @@ -222,10 +222,10 @@ static void e_text_model_real_insert_length (ETextModel *model, gint position, const gchar *text, gint length) { EReposInsertShift repos; - int model_len = e_text_model_real_get_text_length (model); - char *offs; - const char *p; - int byte_length, l; + gint model_len = e_text_model_real_get_text_length (model); + gchar *offs; + const gchar *p; + gint byte_length, l; if (position > model_len) return; @@ -255,9 +255,9 @@ static void e_text_model_real_delete (ETextModel *model, gint position, gint length) { EReposDeleteShift repos; - int byte_position, byte_length; - char *offs, *p; - int l; + gint byte_position, byte_length; + gchar *offs, *p; + gint l; offs = g_utf8_offset_to_pointer (model->priv->text->str, position); byte_position = offs - model->priv->text->str; diff --git a/widgets/text/e-text-model.h b/widgets/text/e-text-model.h index 69c6f0c68e..f16c061610 100644 --- a/widgets/text/e-text-model.h +++ b/widgets/text/e-text-model.h @@ -60,7 +60,7 @@ struct _ETextModelClass { gint (* validate_pos) (ETextModel *model, gint pos); - const char *(* get_text) (ETextModel *model); + const gchar *(* get_text) (ETextModel *model); gint (* get_text_len) (ETextModel *model); void (* set_text) (ETextModel *model, const gchar *text); void (* insert) (ETextModel *model, gint position, const gchar *text); diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index c225636885..c4d3dbef34 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -122,11 +122,11 @@ static void calc_height (EText *text); static gboolean show_pango_rectangle (EText *text, PangoRectangle rect); -static void e_text_do_popup (EText *text, GdkEventButton *button, int position); +static void e_text_do_popup (EText *text, GdkEventButton *button, gint position); static void e_text_update_primary_selection (EText *text); static void e_text_paste (EText *text, GdkAtom selection); -static void e_text_insert(EText *text, const char *string); +static void e_text_insert(EText *text, const gchar *string); static void reset_layout_attrs (EText *text); @@ -139,7 +139,7 @@ static void e_text_editable_do_insert_text (GtkEditable *editable, static void e_text_editable_do_delete_text (GtkEditable *editable, gint start_pos, gint end_pos); -static gchar* e_text_editable_get_chars (GtkEditable *editable, +static gchar * e_text_editable_get_chars (GtkEditable *editable, gint start_pos, gint end_pos); static void e_text_editable_set_selection_bounds (GtkEditable *editable, @@ -341,7 +341,7 @@ static void reset_layout_attrs (EText *text) { PangoAttrList *attrs = NULL; - int object_count; + gint object_count; if (text->layout == NULL) return; @@ -349,13 +349,13 @@ reset_layout_attrs (EText *text) object_count = e_text_model_object_count (text->model); if (text->bold || text->strikeout || object_count > 0) { - int length = 0; - int i; + gint length = 0; + gint i; attrs = pango_attr_list_new (); for (i = 0; i < object_count; i++) { - int start_pos, end_pos; + gint start_pos, end_pos; PangoAttribute *attr = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE); e_text_model_get_nth_object_bounds (text->model, i, &start_pos, &end_pos); @@ -442,7 +442,7 @@ reset_layout (EText *text) if (!text->button_down) { PangoRectangle strong_pos, weak_pos; - char *offs = g_utf8_offset_to_pointer (text->text, text->selection_start); + gchar *offs = g_utf8_offset_to_pointer (text->text, text->selection_start); pango_layout_get_cursor_pos (text->layout, offs - text->text, &strong_pos, &weak_pos); @@ -597,10 +597,10 @@ static void calc_height (EText *text) { GnomeCanvasItem *item; - int old_height; - int old_width; - int width = 0; - int height = 0; + gint old_height; + gint old_width; + gint width = 0; + gint height = 0; item = GNOME_CANVAS_ITEM (text); @@ -623,7 +623,7 @@ static void calc_ellipsis (EText *text) { /* FIXME: a pango layout per calc_ellipsis sucks */ - int width; + gint width; PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas), text->ellipsis ? text->ellipsis : "..."); pango_layout_get_size (layout, &width, NULL); @@ -651,7 +651,7 @@ set_text_gc_foreground (EText *text) /* Sets the stipple pattern for the text */ static void -set_stipple (EText *text, GdkBitmap *stipple, int reconfigure) +set_stipple (EText *text, GdkBitmap *stipple, gint reconfigure) { if (text->stipple && !reconfigure) g_object_unref (text->stipple); @@ -1167,7 +1167,7 @@ e_text_get_property (GObject *object, /* Update handler for the text item */ static void -e_text_reflow (GnomeCanvasItem *item, int flags) +e_text_reflow (GnomeCanvasItem *item, gint flags) { EText *text; @@ -1196,7 +1196,7 @@ e_text_reflow (GnomeCanvasItem *item, int flags) /* Update handler for the text item */ static void -e_text_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) +e_text_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) { EText *text; double x1, y1, x2, y2; @@ -1293,10 +1293,10 @@ _get_tep(EText *text) } static void -draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, int x1, int y1, PangoRectangle rect) +draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, gint x1, gint y1, PangoRectangle rect) { - int width = rect.width / PANGO_SCALE; - int height = rect.height / PANGO_SCALE; + gint width = rect.width / PANGO_SCALE; + gint height = rect.height / PANGO_SCALE; if (width <= 0) width = 1; if (height <= 0) @@ -1308,16 +1308,16 @@ draw_pango_rectangle (GdkDrawable *drawable, GdkGC *gc, int x1, int y1, PangoRec static gboolean show_pango_rectangle (EText *text, PangoRectangle rect) { - int x1 = rect.x / PANGO_SCALE; - int x2 = (rect.x + rect.width) / PANGO_SCALE; + gint x1 = rect.x / PANGO_SCALE; + gint x2 = (rect.x + rect.width) / PANGO_SCALE; - int y1 = rect.y / PANGO_SCALE; - int y2 = (rect.y + rect.height) / PANGO_SCALE; + gint y1 = rect.y / PANGO_SCALE; + gint y2 = (rect.y + rect.height) / PANGO_SCALE; - int new_xofs_edit = text->xofs_edit; - int new_yofs_edit = text->yofs_edit; + gint new_xofs_edit = text->xofs_edit; + gint new_yofs_edit = text->yofs_edit; - int clip_width, clip_height; + gint clip_width, clip_height; clip_width = text->clip_width; if (clip_width >= 0 && text->draw_borders) { @@ -1372,11 +1372,11 @@ show_pango_rectangle (EText *text, PangoRectangle rect) /* Draw handler for the text item */ static void e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, int width, int height) + gint x, gint y, gint width, gint height) { EText *text; GdkRectangle rect, *clip_rect; - int xpos, ypos; + gint xpos, ypos; GdkGC *main_gc; GnomeCanvas *canvas; GtkWidget *widget; @@ -1422,8 +1422,8 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, } } if (text->draw_button) { - int xoff = item->x1 - x; - int yoff = item->y1 - y; + gint xoff = item->x1 - x; + gint yoff = item->y1 - y; widget = GTK_WIDGET (item->canvas); @@ -1442,8 +1442,8 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, if (widget) { GtkButton *button = GTK_BUTTON (widget); GtkShadowType shadow_type; - int thisx, thisy, thisheight, thiswidth; - int default_spacing; + gint thisx, thisy, thisheight, thiswidth; + gint default_spacing; GdkRectangle area; area.x = 0; area.y = 0; @@ -1562,7 +1562,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, GdkRegion *clip_region = gdk_region_new (); GdkGC *selection_gc; GdkGC *text_gc; - int start_index, end_index; + gint start_index, end_index; start_index = MIN (text->selection_start, text->selection_end); end_index = MAX (text->selection_start, text->selection_end); @@ -1587,8 +1587,8 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, PangoLayoutLine *line = pango_layout_iter_get_line (iter); gint n_ranges, i; gint *ranges; - int y0, y1; - int s, e; + gint y0, y1; + gint s, e; if (start_index < line->start_index + line->length && end_index > line->start_index) { @@ -1644,7 +1644,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, } else { if (text->show_cursor) { PangoRectangle strong_pos, weak_pos; - char *offs = g_utf8_offset_to_pointer (text->text, text->selection_start); + gchar *offs = g_utf8_offset_to_pointer (text->text, text->selection_start); pango_layout_get_cursor_pos (text->layout, offs - text->text + text->preedit_len, &strong_pos, &weak_pos); draw_pango_rectangle (drawable, main_gc, xpos, ypos, strong_pos); @@ -1666,7 +1666,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable, /* Point handler for the text item */ static double e_text_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, GnomeCanvasItem **actual_item) + gint cx, gint cy, GnomeCanvasItem **actual_item) { EText *text; double clip_width; @@ -1783,8 +1783,8 @@ e_text_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double static gint get_position_from_xy (EText *text, gint x, gint y) { - int index; - int trailing; + gint index; + gint trailing; if (text->draw_borders) { x -= BORDER_INDENT; @@ -1829,8 +1829,8 @@ _blink_scroll_timeout (gpointer data) scroll = TRUE; } if (scroll && text->button_down && text->clip) { - int old_xofs_edit = text->xofs_edit; - int old_yofs_edit = text->yofs_edit; + gint old_xofs_edit = text->xofs_edit; + gint old_yofs_edit = text->yofs_edit; if (text->clip_cwidth >= 0 && text->lastx - text->clip_cx > text->clip_cwidth && @@ -1946,13 +1946,13 @@ _do_tooltip (gpointer data) /* FIXME: need to sort out tooltip stuff. */ EText *text = E_TEXT (data); GtkWidget *canvas; - int i; - int max_width; + gint i; + gint max_width; gboolean cut_off; double i2c[6]; ArtPoint origin = {0, 0}; ArtPoint pixel_origin; - int canvas_x, canvas_y; + gint canvas_x, canvas_y; GnomeCanvasItem *tooltip_text; double tooltip_width; double tooltip_height; @@ -2525,7 +2525,7 @@ e_text_copy_clipboard (EText *text) void e_text_delete_selection(EText *text) { - int sel_start, sel_end; + gint sel_start, sel_end; sel_start = MIN(text->selection_start, text->selection_end); sel_end = MAX(text->selection_start, text->selection_end); @@ -2573,7 +2573,7 @@ primary_get_cb (GtkClipboard *clipboard, gpointer data) { EText *text = E_TEXT (data); - int sel_start, sel_end; + gint sel_start, sel_end; sel_start = MIN(text->selection_start, text->selection_end); sel_end = MAX(text->selection_start, text->selection_end); @@ -2655,7 +2655,7 @@ e_text_paste (EText *text, GdkAtom selection) typedef struct { EText *text; GdkEventButton *button; - int position; + gint position; } PopupClosure; static void @@ -2688,7 +2688,7 @@ popup_targets_received (GtkClipboard *clipboard, PopupClosure *closure = user_data; EText *text = closure->text; GdkEventButton *button = closure->button; - int position = closure->position; + gint position = closure->position; GtkWidget *popup_menu = gtk_menu_new (); GtkWidget *menuitem, *submenu; @@ -2767,7 +2767,7 @@ popup_targets_received (GtkClipboard *clipboard, } static void -e_text_do_popup (EText *text, GdkEventButton *button, int position) +e_text_do_popup (EText *text, GdkEventButton *button, gint position) { PopupClosure *closure = g_new (PopupClosure, 1); @@ -2799,10 +2799,10 @@ e_text_reset_im_context (EText *text) /* fixme: */ static int -next_word (EText *text, int start) +next_word (EText *text, gint start) { - char *p = g_utf8_offset_to_pointer (text->text, start); - int length; + gchar *p = g_utf8_offset_to_pointer (text->text, start); + gint length; length = g_utf8_strlen (text->text, -1); @@ -2828,15 +2828,15 @@ next_word (EText *text, int start) } static int -find_offset_into_line (EText *text, int offset_into_text, char **start_of_line) +find_offset_into_line (EText *text, gint offset_into_text, gchar **start_of_line) { - char *p; + gchar *p; p = g_utf8_offset_to_pointer (text->text, offset_into_text); if (p == text->text) { if (start_of_line) - *start_of_line = (char*)text->text; + *start_of_line = (gchar *)text->text; return 0; } else { @@ -2852,7 +2852,7 @@ find_offset_into_line (EText *text, int offset_into_text, char **start_of_line) } if (start_of_line) - *start_of_line = (char*)text->text; + *start_of_line = (gchar *)text->text; return offset_into_text; } } @@ -2866,7 +2866,7 @@ _get_updated_position (EText *text, gboolean direction) { PangoLogAttr *log_attrs = NULL; gint n_attrs; - char *p = NULL; + gchar *p = NULL; gint new_pos = 0; gint length = 0; @@ -2889,7 +2889,7 @@ _get_updated_position (EText *text, gboolean direction) /* get layout's PangoLogAttr to facilitate moving when moving across grapheme cluster as in indic langs */ pango_layout_get_log_attrs (text->layout, &log_attrs, &n_attrs); - /* Fetch the current char index in the line & keep moving + /* Fetch the current gchar index in the line & keep moving forward until we can display cursor */ p = g_utf8_offset_to_pointer (text->text, text->selection_end); @@ -2930,9 +2930,9 @@ _get_updated_position (EText *text, gboolean direction) static int _get_position(EText *text, ETextEventProcessorCommand *command) { - int length, obj_num; + gint length, obj_num; gunichar unival; - char *p = NULL; + gchar *p = NULL; gint new_pos = 0; switch (command->position) { @@ -3020,7 +3020,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command) case E_TEP_BACKWARD_WORD: new_pos = 0; if (text->selection_end >= 1) { - int pos = text->selection_end; + gint pos = text->selection_end; p = g_utf8_find_prev_char (text->text, g_utf8_offset_to_pointer (text->text, text->selection_end)); pos --; @@ -3046,7 +3046,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command) break; case E_TEP_FORWARD_LINE: { - int offset_into_line; + gint offset_into_line; offset_into_line = find_offset_into_line (text, text->selection_end, NULL); if (offset_into_line == -1) @@ -3077,7 +3077,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command) break; } case E_TEP_BACKWARD_LINE: { - int offset_into_line = find_offset_into_line (text, text->selection_end, &p); + gint offset_into_line = find_offset_into_line (text, text->selection_end, &p); if (offset_into_line == -1) return text->selection_end; @@ -3196,22 +3196,22 @@ _get_position(EText *text, ETextEventProcessorCommand *command) } static void -e_text_insert(EText *text, const char *string) +e_text_insert(EText *text, const gchar *string) { - int len = strlen (string); + gint len = strlen (string); if (len > 0) { - int utf8len = 0; + gint utf8len = 0; if (!text->allow_newlines) { - const char *i; - char *new_string = g_malloc (len + 1); - char *j = new_string; + const gchar *i; + gchar *new_string = g_malloc (len + 1); + gchar *j = new_string; for (i = string; *i; i = g_utf8_next_char(i)) { if (*i != '\n') { gunichar c; - int charlen; + gint charlen; c = g_utf8_get_char (i); charlen = g_unichar_to_utf8 (c, j); @@ -3231,16 +3231,16 @@ e_text_insert(EText *text, const char *string) } static void -capitalize (EText *text, int start, int end, ETextEventProcessorCaps type) +capitalize (EText *text, gint start, gint end, ETextEventProcessorCaps type) { gboolean first = TRUE; - const char *p = g_utf8_offset_to_pointer (text->text, start); - const char *text_end = g_utf8_offset_to_pointer (text->text, end); - int utf8len = text_end - p; + const gchar *p = g_utf8_offset_to_pointer (text->text, start); + const gchar *text_end = g_utf8_offset_to_pointer (text->text, end); + gint utf8len = text_end - p; if (utf8len > 0) { - char *new_text = g_new0 (char, utf8len * 6); - char *output = new_text; + gchar *new_text = g_new0 (char, utf8len * 6); + gchar *output = new_text; while (p && *p && p < text_end) { gunichar unival = g_utf8_get_char (p); @@ -3374,8 +3374,8 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp if (text->selection_start == text->selection_end) { capitalize (text, text->selection_start, next_word (text, text->selection_start), command->value); } else { - int selection_start = MIN (text->selection_start, text->selection_end); - int selection_end = MAX (text->selection_start, text->selection_end); + gint selection_start = MIN (text->selection_start, text->selection_end); + gint selection_end = MAX (text->selection_start, text->selection_end); capitalize (text, selection_start, selection_end, command->value); } break; @@ -3397,7 +3397,7 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp we don't we can scrap the loop and just use pango_layout_index_to_pos */ PangoLayoutLine *cur_line = NULL; - int selection_index; + gint selection_index; PangoLayoutIter *iter = pango_layout_get_iter (text->layout); /* check if we are using selection_start or selection_end for moving? */ @@ -3418,7 +3418,7 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp } while (pango_layout_iter_next_line (iter)); if (cur_line) { - int xpos, ypos; + gint xpos, ypos; double clip_width, clip_height; /* gboolean trailing = FALSE; */ PangoRectangle pango_pos; diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h index ebe5817285..f9b838aae3 100644 --- a/widgets/text/e-text.h +++ b/widgets/text/e-text.h @@ -85,7 +85,7 @@ G_BEGIN_DECLS * ellipsis string RW The characters to use as ellipsis. NULL = "...". * line_wrap boolean RW Line wrap when not editing. * break_characters string RW List of characters to optionally break on. - * max_lines int RW Number of lines possible when doing line wrap. + * max_lines gint RW Number of lines possible when doing line wrap. * draw_borders boolean RW Whether to draw borders. * draw_background boolean RW Whether to draw the background. * draw_button boolean RW This makes EText handle being the child of a button properly and highlighting as it should. @@ -112,7 +112,7 @@ struct _EText { gint preedit_len; /* preedit length to display */ gint preedit_pos; /* preedit cursor position */ PangoLayout *layout; - int num_lines; /* Number of lines of text */ + gint num_lines; /* Number of lines of text */ gchar *revert; /* Text to revert to */ @@ -128,26 +128,26 @@ struct _EText { GdkBitmap *stipple; /* Stipple for text */ GdkGC *gc; /* GC for drawing text */ - int cx, cy; /* Top-left canvas coordinates for text */ - int text_cx, text_cy; /* Top-left canvas coordinates for text */ - int clip_cx, clip_cy; /* Top-left canvas coordinates for clip rectangle */ - int clip_cwidth, clip_cheight; /* Size of clip rectangle in pixels */ - int max_width; /* Maximum width of text lines */ - int width; /* Rendered text width in pixels */ - int height; /* Rendered text height in pixels */ + gint cx, cy; /* Top-left canvas coordinates for text */ + gint text_cx, text_cy; /* Top-left canvas coordinates for text */ + gint clip_cx, clip_cy; /* Top-left canvas coordinates for clip rectangle */ + gint clip_cwidth, clip_cheight; /* Size of clip rectangle in pixels */ + gint max_width; /* Maximum width of text lines */ + gint width; /* Rendered text width in pixels */ + gint height; /* Rendered text height in pixels */ guint32 rgba; /* RGBA color for text */ double affine[6]; /* The item -> canvas affine */ - char *ellipsis; /* The ellipsis characters. NULL = "...". */ + gchar *ellipsis; /* The ellipsis characters. NULL = "...". */ double ellipsis_width; /* The width of the ellipsis. */ - int xofs_edit; /* Offset because of editing */ - int yofs_edit; /* Offset because of editing */ + gint xofs_edit; /* Offset because of editing */ + gint yofs_edit; /* Offset because of editing */ /* This needs to be reworked a bit once we get line wrapping. */ - int selection_start; /* Start of selection IN BYTES */ - int selection_end; /* End of selection IN BYTES */ + gint selection_start; /* Start of selection IN BYTES */ + gint selection_end; /* End of selection IN BYTES */ gboolean select_by_word; /* Current selection is by word */ /* This section is for drag scrolling and blinking cursor. */ |