aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
commit948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch)
tree4133b1adfd94d8f889ca7ad4ad851346518f4171 /addressbook/gui
parentcc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff)
downloadgsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/addressbook-config.c106
-rw-r--r--addressbook/gui/component/autocompletion-config.c2
-rw-r--r--addressbook/gui/component/e-book-shell-migrate.c126
-rw-r--r--addressbook/gui/component/eab-composer-util.c6
-rw-r--r--addressbook/gui/component/openldap-extract.h190
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c6
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c104
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h2
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c2
-rw-r--r--addressbook/gui/contact-editor/test-editor.c16
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c2
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c8
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c40
-rw-r--r--addressbook/gui/widgets/a11y/ea-addressbook-view.c8
-rw-r--r--addressbook/gui/widgets/a11y/ea-minicard-view.c18
-rw-r--r--addressbook/gui/widgets/a11y/ea-minicard.c18
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c8
-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.c4
-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.c56
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c64
-rw-r--r--addressbook/gui/widgets/eab-gui-util.h4
-rw-r--r--addressbook/gui/widgets/gal-view-factory-minicard.c6
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c2
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.h2
35 files changed, 498 insertions, 498 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index c786a40a13..e753351755 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -70,8 +70,8 @@
#define GLADE_FILE_NAME "ldap-config.glade"
-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"
@@ -147,7 +147,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;
@@ -191,7 +191,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? */
@@ -204,7 +204,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) {
@@ -266,8 +266,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;
@@ -305,7 +305,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);
@@ -323,7 +323,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;
@@ -354,10 +354,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)
@@ -414,7 +414,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,
@@ -445,7 +445,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);
@@ -469,7 +469,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;
@@ -489,7 +489,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 ) {
@@ -505,7 +505,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,
@@ -524,7 +524,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;
@@ -533,7 +533,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;
@@ -590,13 +590,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;
@@ -629,11 +629,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:");
@@ -696,7 +696,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;
@@ -720,15 +720,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;
@@ -778,7 +778,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) {
@@ -809,13 +809,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;
@@ -878,14 +878,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;
@@ -946,7 +946,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);
@@ -956,7 +956,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);
@@ -972,13 +972,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;
@@ -1040,18 +1040,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);
@@ -1074,7 +1074,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;
@@ -1093,11 +1093,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>"));
@@ -1109,7 +1109,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 */
@@ -1153,7 +1153,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);
@@ -1166,11 +1166,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/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c
index 548c0cbd7e..370c1a1e7e 100644
--- a/addressbook/gui/component/autocompletion-config.c
+++ b/addressbook/gui/component/autocompletion-config.c
@@ -82,7 +82,7 @@ initialize_selection (ESourceSelector *source_selector)
for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) {
ESource *source = E_SOURCE (sources->data);
- const char *completion;
+ const gchar *completion;
completion = e_source_get_property (source, "completion");
if (completion && !g_ascii_strcasecmp (completion, "true"))
diff --git a/addressbook/gui/component/e-book-shell-migrate.c b/addressbook/gui/component/e-book-shell-migrate.c
index 2c9aa6afb0..4ac70309e7 100644
--- a/addressbook/gui/component/e-book-shell-migrate.c
+++ b/addressbook/gui/component/e-book-shell-migrate.c
@@ -108,7 +108,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);
@@ -121,9 +121,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);
@@ -142,7 +142,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));
@@ -158,7 +158,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;
@@ -175,16 +175,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 ("");
@@ -229,8 +229,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);
@@ -343,7 +343,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 */
@@ -383,9 +383,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;
@@ -425,7 +425,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;
@@ -451,7 +451,7 @@ create_groups (MigrationContext *context,
{
GSList *groups;
ESourceGroup *group;
- char *base_uri, *base_uri_proto;
+ gchar *base_uri, *base_uri_proto;
*on_this_computer = NULL;
*on_ldap_servers = 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;
@@ -766,14 +766,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://...
@@ -788,8 +788,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,
@@ -799,7 +799,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);
@@ -838,14 +838,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;
@@ -869,8 +869,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);
@@ -913,14 +913,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;
@@ -937,7 +937,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;) {
@@ -1006,11 +1006,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)))
@@ -1022,9 +1022,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);
@@ -1181,7 +1181,7 @@ e_book_shell_backend_migrate (EShellBackend *shell_backend,
}
if (minor < 5 || (minor == 5 && micro <= 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/eab-composer-util.c b/addressbook/gui/component/eab-composer-util.c
index 46d28b0790..6d45f13a94 100644
--- a/addressbook/gui/component/eab-composer-util.c
+++ b/addressbook/gui/component/eab-composer-util.c
@@ -89,11 +89,11 @@ eab_send_as_to (GList *destinations)
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;
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 03272d4444..fd00b1e733 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -92,7 +92,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;
@@ -390,7 +390,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 */
@@ -419,13 +419,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;
@@ -500,11 +500,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;
@@ -526,10 +526,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"));
@@ -547,7 +547,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);
@@ -579,8 +579,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);
@@ -596,7 +596,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;
@@ -615,7 +615,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);
@@ -651,9 +651,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;
@@ -692,7 +692,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 = "";
@@ -2248,7 +2248,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;
}
@@ -2286,7 +2286,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);
@@ -2311,9 +2311,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);
@@ -2331,14 +2331,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);
@@ -2365,7 +2365,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);
@@ -2396,7 +2396,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!");
@@ -2650,11 +2650,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,
@@ -2670,8 +2670,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);
@@ -2728,9 +2728,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) {
@@ -2738,7 +2738,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;
@@ -2757,7 +2757,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");
@@ -2854,7 +2854,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);
@@ -2956,7 +2956,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;
@@ -2972,7 +2972,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);
@@ -3049,8 +3049,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)
@@ -3139,8 +3139,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;
@@ -3178,7 +3178,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)) {
@@ -3191,7 +3191,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"),
@@ -3383,7 +3383,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
EShell *shell;
GtkWidget *widget, *label;
GtkEntryCompletion *completion;
- char *gladefile;
+ gchar *gladefile;
e_contact_editor->name = e_contact_name_new();
@@ -3551,7 +3551,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));
@@ -3589,7 +3589,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 041fcde479..1000cdc544 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.h
+++ b/addressbook/gui/contact-editor/e-contact-editor.h
@@ -96,7 +96,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 8aa2825fc8..9bd97f2b84 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/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
index f5d133283f..751bab4203 100644
--- a/addressbook/gui/contact-editor/test-editor.c
+++ b/addressbook/gui/contact-editor/test-editor.c
@@ -42,12 +42,12 @@
"END:VCARD" \
""
-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");
@@ -69,7 +69,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);
@@ -78,9 +78,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 002cb08bbf..cc64cd5af3 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -1447,7 +1447,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 6a3132f5a5..bdf385f0ba 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 5a6ac2cdac..0bcee0be38 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/a11y/ea-addressbook-view.c b/addressbook/gui/widgets/a11y/ea-addressbook-view.c
index 4150e10ff4..b2d7ebb171 100644
--- a/addressbook/gui/widgets/a11y/ea-addressbook-view.c
+++ b/addressbook/gui/widgets/a11y/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 (EAddressbookViewClass *class);
@@ -85,7 +85,7 @@ ea_ab_view_class_init (EAddressbookViewClass *class)
atk_object_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);
@@ -95,7 +95,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/addressbook/gui/widgets/a11y/ea-minicard-view.c b/addressbook/gui/widgets/a11y/ea-minicard-view.c
index 052db4d1b1..09eef66ad2 100644
--- a/addressbook/gui/widgets/a11y/ea-minicard-view.c
+++ b/addressbook/gui/widgets/a11y/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);
@@ -396,13 +396,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/addressbook/gui/widgets/a11y/ea-minicard.c b/addressbook/gui/widgets/a11y/ea-minicard.c
index d77d591fcc..b1b1ebbe33 100644
--- a/addressbook/gui/widgets/a11y/ea-minicard.c
+++ b/addressbook/gui/widgets/a11y/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/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index b016d4f9db..79d11627aa 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -134,7 +134,7 @@ static void
update_folder_bar_message (EAddressbookModel *model)
{
guint count;
- char *message;
+ gchar *message;
count = model->priv->contacts->len;
@@ -260,7 +260,7 @@ modify_contact(EBookView *book_view,
static void
status_message (EBookView *book_view,
- char* status,
+ gchar * status,
EAddressbookModel *model)
{
g_signal_emit (model, signals[STATUS_MESSAGE], 0, status);
@@ -347,8 +347,8 @@ addressbook_model_idle_cb (EAddressbookModel *model)
if (model->priv->book && model->priv->query) {
ESource *source;
- const char *limit_str;
- int limit = -1;
+ const gchar *limit_str;
+ gint limit = -1;
source = e_book_get_source (model->priv->book);
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index a867042de0..fd1681c5b1 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -35,8 +35,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*)e_addressbook_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*)e_addressbook_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)
@@ -243,7 +243,7 @@ adapter_open_contact (EMinicard *card,
}
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;
@@ -270,7 +270,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;
@@ -296,7 +296,7 @@ remove_contacts (EAddressbookModel *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));
@@ -557,7 +557,7 @@ e_addressbook_reflow_adapter_new (EAddressbookModel *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 b5feda6c4b..fc08dcd43c 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.h
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.h
@@ -62,5 +62,5 @@ EReflowModel *e_addressbook_reflow_adapter_new (EAddressbookModel
/* 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 c970b6f32d..cb63c67809 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 {
EAddressbookModel *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 >= e_addressbook_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*)e_addressbook_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 (e_addressbook_model_get_book (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 (e_addressbook_model_get_book (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 (EAddressbookModel *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 e889d9b0c2..fe46882b2e 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -1178,7 +1178,7 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete)
ESelectionModel *selection_model = NULL;
GalViewInstance *view_instance;
GalView *gal_view;
- char *name = NULL;
+ gchar *name = NULL;
gint row = 0, select;
model = e_addressbook_view_get_model (view);
@@ -1226,7 +1226,7 @@ e_addressbook_view_delete_selection(EAddressbookView *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. */
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 ac1f35caa7..df4a4c894b 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -323,7 +323,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);
}
@@ -485,7 +485,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 82962218fa..8af99aa20a 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 e60d32cf10..c62a33463b 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -90,20 +90,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);
@@ -111,7 +111,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;
}
@@ -158,7 +158,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;
@@ -415,7 +415,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) {
@@ -425,7 +425,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);
@@ -454,7 +454,7 @@ typedef struct {
} ViewCbClosure;
static void
-do_remove (int i, gpointer user_data)
+do_remove (gint i, gpointer user_data)
{
EBook *book;
EContact *contact;
@@ -476,7 +476,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);
@@ -486,7 +486,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);
@@ -635,7 +635,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),
@@ -650,7 +650,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 3f89b8fdc6..fe907d583d 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -49,7 +49,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 );
@@ -570,7 +570,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 |
@@ -589,7 +589,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;
}
@@ -646,9 +646,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;
@@ -672,9 +672,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;
@@ -740,8 +740,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 );
@@ -789,7 +789,7 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
}
-static const char *
+static const gchar *
get_email_location (EVCardAttribute *attr)
{
gint i;
@@ -803,28 +803,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);
@@ -880,7 +880,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)
@@ -888,7 +888,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;
@@ -907,14 +907,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;
@@ -957,7 +957,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) {
@@ -972,14 +972,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);
@@ -1007,7 +1007,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) {
@@ -1052,7 +1052,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);
@@ -1065,10 +1065,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);
@@ -1076,7 +1076,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);
@@ -1100,7 +1100,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 520cc55cac..267e15128d 100644
--- a/addressbook/gui/widgets/e-minicard.h
+++ b/addressbook/gui/widgets/e-minicard.h
@@ -117,11 +117,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);
void 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 fe87f3c72a..292edd4e18 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -252,7 +252,7 @@ contact_display_on_url_requested (GtkHTML *html,
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);
@@ -305,9 +305,9 @@ contact_display_on_link_clicked (GtkHTML *html,
}
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);
@@ -327,9 +327,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);
@@ -339,15 +339,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)
@@ -392,9 +392,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);
@@ -415,9 +415,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);
@@ -427,11 +427,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) {
@@ -446,13 +446,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);
@@ -488,7 +488,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);
}
@@ -499,7 +499,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;
@@ -519,10 +519,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\">");
@@ -535,8 +535,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))
@@ -668,8 +668,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\" " : "");
@@ -723,8 +723,8 @@ eab_contact_display_render_compact (EABContactDisplay *display,
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;
@@ -758,7 +758,7 @@ eab_contact_display_render_compact (EABContactDisplay *display,
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;
@@ -773,7 +773,7 @@ eab_contact_display_render_compact (EABContactDisplay *display,
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);
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index d5ec322c3d..e8269100b7 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -48,7 +48,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"),
@@ -75,9 +75,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";
@@ -91,7 +91,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;
@@ -108,7 +108,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);
@@ -156,7 +156,7 @@ void
eab_search_result_dialog (GtkWidget *parent,
EBookViewStatus status)
{
- char *str = NULL;
+ gchar *str = NULL;
switch (status) {
case E_BOOK_VIEW_STATUS_OK:
@@ -196,11 +196,11 @@ eab_prompt_save_dialog (GtkWindow *parent)
}
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,
@@ -222,15 +222,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;
@@ -248,7 +248,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
@@ -279,7 +279,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);
@@ -295,10 +295,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. */
@@ -381,11 +381,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);
@@ -423,11 +423,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,
@@ -446,7 +446,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);
@@ -481,7 +481,7 @@ typedef struct ContactCopyProcess_ ContactCopyProcess;
typedef void (*ContactCopyDone) (ContactCopyProcess *process);
struct ContactCopyProcess_ {
- int count;
+ gint count;
gboolean book_status;
GList *contacts;
EBook *source;
@@ -494,7 +494,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);
@@ -528,7 +528,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;
@@ -583,9 +583,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;
@@ -638,7 +638,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 ();
@@ -686,12 +686,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 82fc172321..916aa7d555 100644
--- a/addressbook/gui/widgets/eab-gui-util.h
+++ b/addressbook/gui/widgets/eab-gui-util.h
@@ -43,11 +43,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);
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 0ebc928bad..c7b2a4a38f 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -137,7 +137,7 @@ view_minicard_get_title (GalView *view)
static void
view_minicard_set_title (GalView *view,
- const char *title)
+ const gchar *title)
{
GalViewMinicard *view_minicard;
diff --git a/addressbook/gui/widgets/gal-view-minicard.h b/addressbook/gui/widgets/gal-view-minicard.h
index c7a8c912d4..c506fb1a2b 100644
--- a/addressbook/gui/widgets/gal-view-minicard.h
+++ b/addressbook/gui/widgets/gal-view-minicard.h
@@ -56,7 +56,7 @@ typedef struct _GalViewMinicardClass GalViewMinicardClass;
struct _GalViewMinicard {
GalView parent;
- char *title;
+ gchar *title;
double column_width;
EMinicardViewWidget *emvw;