From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- plugins/bbdb/bbdb.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'plugins/bbdb/bbdb.c') diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index 72098cab56..2ec008dbfb 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; @@ -267,9 +267,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; @@ -371,10 +371,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; @@ -435,7 +435,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; @@ -493,7 +493,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)); @@ -558,12 +558,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; -- cgit v1.2.3