aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 23:13:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-29 00:13:23 +0800
commitfad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch)
treeae78be371695c3dc18847b87d3f014f985aa3a40 /addressbook/gui/widgets
parent6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff)
downloadgsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c28
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h18
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c34
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.h2
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c48
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c104
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.h2
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c4
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c4
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.h2
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c24
-rw-r--r--addressbook/gui/widgets/e-minicard.c66
-rw-r--r--addressbook/gui/widgets/e-minicard.h6
-rw-r--r--addressbook/gui/widgets/eab-config.c4
-rw-r--r--addressbook/gui/widgets/eab-config.h2
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c98
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c76
-rw-r--r--addressbook/gui/widgets/eab-gui-util.h8
-rw-r--r--addressbook/gui/widgets/eab-menu.c16
-rw-r--r--addressbook/gui/widgets/eab-menu.h4
-rw-r--r--addressbook/gui/widgets/eab-popup-control.c2
-rw-r--r--addressbook/gui/widgets/eab-popup.c18
-rw-r--r--addressbook/gui/widgets/eab-popup.h12
-rw-r--r--addressbook/gui/widgets/gal-view-factory-minicard.c6
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c18
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.h2
26 files changed, 304 insertions, 304 deletions
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\">&nbsp;</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;