aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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 /mail
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 'mail')
-rw-r--r--mail/e-mail-shell-migrate.c382
-rw-r--r--mail/e-searching-tokenizer.c138
-rw-r--r--mail/em-account-editor.c344
-rw-r--r--mail/em-account-editor.h8
-rw-r--r--mail/em-composer-prefs.c2
-rw-r--r--mail/em-composer-utils.c222
-rw-r--r--mail/em-composer-utils.h26
-rw-r--r--mail/em-config.c10
-rw-r--r--mail/em-config.h6
-rw-r--r--mail/em-event.c12
-rw-r--r--mail/em-event.h18
-rw-r--r--mail/em-filter-context.c24
-rw-r--r--mail/em-filter-context.h4
-rw-r--r--mail/em-filter-editor.c10
-rw-r--r--mail/em-filter-folder-element.c34
-rw-r--r--mail/em-filter-folder-element.h4
-rw-r--r--mail/em-filter-i18n.h148
-rw-r--r--mail/em-filter-rule.c30
-rw-r--r--mail/em-filter-source-element.c46
-rw-r--r--mail/em-filter-source-element.h2
-rw-r--r--mail/em-folder-browser.c74
-rw-r--r--mail/em-folder-properties.c38
-rw-r--r--mail/em-folder-selection-button.c2
-rw-r--r--mail/em-folder-selection.c12
-rw-r--r--mail/em-folder-selection.h6
-rw-r--r--mail/em-folder-selector.c40
-rw-r--r--mail/em-folder-selector.h18
-rw-r--r--mail/em-folder-tree-model.c154
-rw-r--r--mail/em-folder-tree-model.h46
-rw-r--r--mail/em-folder-tree.c144
-rw-r--r--mail/em-folder-tree.h12
-rw-r--r--mail/em-folder-utils.c70
-rw-r--r--mail/em-folder-utils.h4
-rw-r--r--mail/em-folder-view.c58
-rw-r--r--mail/em-folder-view.h34
-rw-r--r--mail/em-format-hook.c10
-rw-r--r--mail/em-format-hook.h4
-rw-r--r--mail/em-format-html-display.c76
-rw-r--r--mail/em-format-html-print.c4
-rw-r--r--mail/em-format-html.c156
-rw-r--r--mail/em-format-html.h22
-rw-r--r--mail/em-html-stream.c2
-rw-r--r--mail/em-icon-stream.c40
-rw-r--r--mail/em-icon-stream.h10
-rw-r--r--mail/em-inline-filter.c36
-rw-r--r--mail/em-inline-filter.h4
-rw-r--r--mail/em-junk-hook.c20
-rw-r--r--mail/em-junk-hook.h14
-rw-r--r--mail/em-mailer-prefs.c106
-rw-r--r--mail/em-mailer-prefs.h2
-rw-r--r--mail/em-menu.c16
-rw-r--r--mail/em-menu.h6
-rw-r--r--mail/em-network-prefs.c30
-rw-r--r--mail/em-popup.c20
-rw-r--r--mail/em-popup.h18
-rw-r--r--mail/em-subscribe-editor.c60
-rw-r--r--mail/em-utils.c212
-rw-r--r--mail/em-utils.h36
-rw-r--r--mail/em-vfolder-context.c4
-rw-r--r--mail/em-vfolder-editor.c2
-rw-r--r--mail/em-vfolder-rule.c88
-rw-r--r--mail/em-vfolder-rule.h8
-rw-r--r--mail/importers/elm-importer.c38
-rw-r--r--mail/importers/evolution-mbox-importer.c26
-rw-r--r--mail/importers/mail-importer.c56
-rw-r--r--mail/importers/mail-importer.h18
-rw-r--r--mail/importers/pine-importer.c28
-rw-r--r--mail/mail-autofilter.c86
-rw-r--r--mail/mail-autofilter.h12
-rw-r--r--mail/mail-component.c20
-rw-r--r--mail/mail-component.h18
-rw-r--r--mail/mail-config.c64
-rw-r--r--mail/mail-config.h18
-rw-r--r--mail/mail-folder-cache.c106
-rw-r--r--mail/mail-folder-cache.h8
-rw-r--r--mail/mail-mt.c118
-rw-r--r--mail/mail-mt.h22
-rw-r--r--mail/mail-ops.c332
-rw-r--r--mail/mail-ops.h142
-rw-r--r--mail/mail-send-recv.c72
-rw-r--r--mail/mail-session.c104
-rw-r--r--mail/mail-session.h18
-rw-r--r--mail/mail-tools.c54
-rw-r--r--mail/mail-tools.h12
-rw-r--r--mail/mail-vfolder.c110
-rw-r--r--mail/mail-vfolder.h14
-rw-r--r--mail/message-list.c396
-rw-r--r--mail/message-list.h34
-rw-r--r--mail/message-tag-followup.c22
-rw-r--r--mail/message-tag-followup.h4
90 files changed, 2570 insertions, 2570 deletions
diff --git a/mail/e-mail-shell-migrate.c b/mail/e-mail-shell-migrate.c
index 6202224b0c..862f807504 100644
--- a/mail/e-mail-shell-migrate.c
+++ b/mail/e-mail-shell-migrate.c
@@ -80,11 +80,11 @@
/* upgrade helper functions */
static xmlDocPtr
-emm_load_xml (const char *dirname, const char *filename)
+emm_load_xml (const gchar *dirname, const gchar *filename)
{
xmlDocPtr doc;
struct stat st;
- char *path;
+ gchar *path;
path = g_strdup_printf ("%s/%s", dirname, filename);
if (stat (path, &st) == -1 || !(doc = xmlParseFile (path))) {
@@ -98,10 +98,10 @@ emm_load_xml (const char *dirname, const char *filename)
}
static int
-emm_save_xml (xmlDocPtr doc, const char *dirname, const char *filename)
+emm_save_xml (xmlDocPtr doc, const gchar *dirname, const gchar *filename)
{
- char *path;
- int retval;
+ gchar *path;
+ gint retval;
path = g_strdup_printf ("%s/%s", dirname, filename);
retval = e_xml_save_file (path, doc);
@@ -111,13 +111,13 @@ emm_save_xml (xmlDocPtr doc, const char *dirname, const char *filename)
}
static xmlNodePtr
-xml_find_node (xmlNodePtr parent, const char *name)
+xml_find_node (xmlNodePtr parent, const gchar *name)
{
xmlNodePtr node;
node = parent->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, name))
+ if (node->name && !strcmp ((gchar *)node->name, name))
return node;
node = node->next;
@@ -127,15 +127,15 @@ xml_find_node (xmlNodePtr parent, const char *name)
}
static void
-upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
+upgrade_xml_uris (xmlDocPtr doc, gchar * (* upgrade_uri) (const gchar *uri))
{
xmlNodePtr root, node;
- char *uri, *new;
+ gchar *uri, *new;
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
- if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
+ if (!root->name || strcmp ((gchar *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
@@ -147,27 +147,27 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, "rule")) {
+ if (node->name && !strcmp ((gchar *)node->name, "rule")) {
xmlNodePtr actionset, part, val, n;
if ((actionset = xml_find_node (node, "actionset"))) {
/* filters.xml */
part = actionset->children;
while (part != NULL) {
- if (part->name && !strcmp ((char *)part->name, "part")) {
+ if (part->name && !strcmp ((gchar *)part->name, "part")) {
val = part->children;
while (val != NULL) {
- if (val->name && !strcmp ((char *)val->name, "value")) {
- char *type;
+ if (val->name && !strcmp ((gchar *)val->name, "value")) {
+ gchar *type;
- type = (char *)xmlGetProp (val, (const unsigned char *)"type");
- if (type && !strcmp ((char *)type, "folder")) {
+ type = (gchar *)xmlGetProp (val, (const guchar *)"type");
+ if (type && !strcmp ((gchar *)type, "folder")) {
if ((n = xml_find_node (val, "folder"))) {
- uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
+ uri = (gchar *)xmlGetProp (n, (const guchar *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
- xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
+ xmlSetProp (n, (const guchar *)"uri", (guchar *)new);
g_free (new);
}
}
@@ -185,12 +185,12 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
/* vfolders.xml */
n = actionset->children;
while (n != NULL) {
- if (n->name && !strcmp ((char *)n->name, "folder")) {
- uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
+ if (n->name && !strcmp ((gchar *)n->name, "folder")) {
+ uri = (gchar *)xmlGetProp (n, (const guchar *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
- xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
+ xmlSetProp (n, (const guchar *)"uri", (guchar *)new);
g_free (new);
}
@@ -207,25 +207,25 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
/* as much info as we have on a given account */
struct _account_info_1_0 {
- char *name;
- char *uri;
- char *base_uri;
+ gchar *name;
+ gchar *uri;
+ gchar *base_uri;
union {
struct {
/* for imap */
- char *namespace;
- char *namespace_full;
+ gchar *namespace;
+ gchar *namespace_full;
guint32 capabilities;
GHashTable *folders;
- char dir_sep;
+ gchar dir_sep;
} imap;
} u;
};
struct _imap_folder_info_1_0 {
- char *folder;
+ gchar *folder;
/* encoded? decoded? canonicalised? */
- char dir_sep;
+ gchar dir_sep;
};
static GHashTable *accounts_1_0 = NULL;
@@ -250,10 +250,10 @@ account_info_1_0_free (struct _account_info_1_0 *ai)
g_free(ai);
}
-static char *
-get_base_uri(const char *val)
+static gchar *
+get_base_uri(const gchar *val)
{
- const char *tmp;
+ const gchar *tmp;
tmp = strchr(val, ':');
if (tmp) {
@@ -269,14 +269,14 @@ get_base_uri(const char *val)
return g_strdup(val);
}
-static char *
-upgrade_xml_uris_1_0 (const char *uri)
+static gchar *
+upgrade_xml_uris_1_0 (const gchar *uri)
{
- char *out = NULL;
+ gchar *out = NULL;
/* upgrades camel uri's */
if (strncmp (uri, "imap:", 5) == 0) {
- char *base_uri, dir_sep, *folder, *p;
+ gchar *base_uri, dir_sep, *folder, *p;
struct _account_info_1_0 *ai;
/* add namespace, canonicalise dir_sep to / */
@@ -314,7 +314,7 @@ upgrade_xml_uris_1_0 (const char *uri)
folder = g_strdup (uri + strlen (base_uri) + 1);
/* Add the namespace before the mailbox name, unless the mailbox is INBOX */
- if (ai->u.imap.namespace && strcmp ((char *)folder, "INBOX") != 0)
+ if (ai->u.imap.namespace && strcmp ((gchar *)folder, "INBOX") != 0)
out = g_strdup_printf ("%s/%s/%s", base_uri, ai->u.imap.namespace, folder);
else
out = g_strdup_printf ("%s/%s", base_uri, folder);
@@ -329,7 +329,7 @@ upgrade_xml_uris_1_0 (const char *uri)
g_free (folder);
g_free (base_uri);
} else if (strncmp (uri, "exchange:", 9) == 0) {
- char *base_uri, *folder, *p;
+ gchar *base_uri, *folder, *p;
/* exchange://user@host/exchange/ * -> exchange://user@host/personal/ * */
/* Any url encoding (%xx) in the folder name is also removed */
@@ -349,10 +349,10 @@ upgrade_xml_uris_1_0 (const char *uri)
return out;
}
-static char *
-parse_lsub (const char *lsub, char *dir_sep)
+static gchar *
+parse_lsub (const gchar *lsub, gchar *dir_sep)
{
- static int comp;
+ static gint comp;
static regex_t pat;
regmatch_t match[3];
const gchar *m = "^\\* LSUB \\([^)]*\\) \"?([^\" ]+)\"? \"?(.*)\"?$";
@@ -381,7 +381,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
{
FILE *storeinfo;
guint32 tmp;
- char *buf, *folder, dir_sep, *path, *name, *p;
+ gchar *buf, *folder, dir_sep, *path, *name, *p;
struct _imap_folder_info_1_0 *fi;
si->u.imap.folders = g_hash_table_new_full (
@@ -394,7 +394,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
if (name) {
name = strstr (si->uri, ";namespace=");
if (name) {
- char *end;
+ gchar *end;
name += strlen (";namespace=");
if (*name == '\"') {
@@ -476,9 +476,9 @@ static gboolean
load_accounts_1_0 (xmlDocPtr doc)
{
xmlNodePtr source;
- char *val, *tmp;
- int count = 0, i;
- char key[32];
+ gchar *val, *tmp;
+ gint count = 0, i;
+ gchar key[32];
if (!(source = e_bconf_get_path (doc, "/Mail/Accounts")))
return TRUE;
@@ -491,7 +491,7 @@ load_accounts_1_0 (xmlDocPtr doc)
/* load account upgrade info for each account */
for (i = 0; i < count; i++) {
struct _account_info_1_0 *ai;
- char *rawuri;
+ gchar *rawuri;
sprintf (key, "source_url_%d", i);
if (!(rawuri = e_bconf_get_value (source, key)))
@@ -515,11 +515,11 @@ load_accounts_1_0 (xmlDocPtr doc)
- this will be picked up later in the conversion */
sprintf (key, "transport_url_%d", i);
node = e_bconf_get_entry (source, key);
- if (node && (val = (char *)xmlGetProp (node, (const unsigned char *)"value"))) {
+ if (node && (val = (gchar *)xmlGetProp (node, (const guchar *)"value"))) {
tmp = e_bconf_hex_decode (val);
xmlFree (val);
if (strncmp (tmp, "exchanget:", 10) == 0)
- xmlSetProp (node, (const unsigned char *)"value", (unsigned char *)rawuri);
+ xmlSetProp (node, (const guchar *)"value", (guchar *)rawuri);
g_free (tmp);
} else {
d(printf (" couldn't find transport uri?\n"));
@@ -536,7 +536,7 @@ load_accounts_1_0 (xmlDocPtr doc)
}
static gboolean
-em_migrate_1_0 (const char *data_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, GError **error)
+em_migrate_1_0 (const gchar *data_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, GError **error)
{
accounts_1_0 = g_hash_table_new_full (
g_str_hash, g_str_equal,
@@ -556,13 +556,13 @@ em_migrate_1_0 (const char *data_dir, xmlDocPtr config_xmldb, xmlDocPtr filters,
/* 1.2 upgrade functions */
static gboolean
-is_xml1encoded (const char *txt)
+is_xml1encoded (const gchar *txt)
{
- const unsigned char *p;
- int isxml1 = FALSE;
- int is8bit = FALSE;
+ const guchar *p;
+ gint isxml1 = FALSE;
+ gint is8bit = FALSE;
- p = (const unsigned char *)txt;
+ p = (const guchar *)txt;
while (*p) {
if (p[0] == '\\' && p[1] == 'U' && p[2] == '+'
&& isxdigit (p[3]) && isxdigit (p[4]) && isxdigit (p[5]) && isxdigit (p[6])
@@ -581,24 +581,24 @@ is_xml1encoded (const char *txt)
return isxml1;
}
-static char *
-decode_xml1 (const char *txt)
+static gchar *
+decode_xml1 (const gchar *txt)
{
GString *out = g_string_new ("");
- const unsigned char *p;
- char *res;
+ const guchar *p;
+ gchar *res;
/* convert:
\U+XXXX\ -> utf8
8 bit characters -> utf8 (iso-8859-1) */
- p = (const unsigned char *) txt;
+ p = (const guchar *) txt;
while (*p) {
if (p[0] > 0x80
|| (p[0] == '\\' && p[1] == 'U' && p[2] == '+'
&& isxdigit (p[3]) && isxdigit (p[4]) && isxdigit (p[5]) && isxdigit (p[6])
&& p[7] == '\\')) {
- char utf8[8];
+ gchar utf8[8];
gunichar u;
if (p[0] == '\\') {
@@ -622,12 +622,12 @@ decode_xml1 (const char *txt)
return res;
}
-static char *
-utf8_reencode (const char *txt)
+static gchar *
+utf8_reencode (const gchar *txt)
{
GString *out = g_string_new ("");
gchar *p;
- char *res;
+ gchar *res;
/* convert:
libxml1 8 bit utf8 converted to xml entities byte-by-byte chars -> utf8 */
@@ -652,13 +652,13 @@ utf8_reencode (const char *txt)
static gboolean
upgrade_xml_1_2_rec (xmlNodePtr node)
{
- const char *value_tags[] = { "string", "address", "regex", "file", "command", NULL };
- const char *rule_tags[] = { "title", NULL };
- const char *item_props[] = { "name", NULL };
+ const gchar *value_tags[] = { "string", "address", "regex", "file", "command", NULL };
+ const gchar *rule_tags[] = { "title", NULL };
+ const gchar *item_props[] = { "name", NULL };
struct {
- const char *name;
- const char **tags;
- const char **props;
+ const gchar *name;
+ const gchar **tags;
+ const gchar **props;
} tags[] = {
{ "value", value_tags, NULL },
{ "rule", rule_tags, NULL },
@@ -666,24 +666,24 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
{ 0 },
};
xmlNodePtr work;
- int i,j;
- char *txt, *tmp;
+ gint i,j;
+ gchar *txt, *tmp;
/* upgrades the content of a node, if the node has a specific parent/node name */
for (i = 0; tags[i].name; i++) {
- if (!strcmp ((char *)node->name, tags[i].name)) {
+ if (!strcmp ((gchar *)node->name, tags[i].name)) {
if (tags[i].tags != NULL) {
work = node->children;
while (work) {
for (j = 0; tags[i].tags[j]; j++) {
- if (!strcmp ((char *)work->name, tags[i].tags[j])) {
- txt = (char *)xmlNodeGetContent (work);
+ if (!strcmp ((gchar *)work->name, tags[i].tags[j])) {
+ txt = (gchar *)xmlNodeGetContent (work);
if (is_xml1encoded (txt)) {
tmp = decode_xml1 (txt);
d(printf ("upgrading xml node %s/%s '%s' -> '%s'\n",
tags[i].name, tags[i].tags[j], txt, tmp));
- xmlNodeSetContent (work, (unsigned char *)tmp);
+ xmlNodeSetContent (work, (guchar *)tmp);
g_free (tmp);
}
xmlFree (txt);
@@ -696,11 +696,11 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
if (tags[i].props != NULL) {
for (j = 0; tags[i].props[j]; j++) {
- txt = (char *)xmlGetProp (node, (unsigned char *)tags[i].props[j]);
+ txt = (gchar *)xmlGetProp (node, (guchar *)tags[i].props[j]);
tmp = utf8_reencode (txt);
d(printf ("upgrading xml property %s on node %s '%s' -> '%s'\n",
tags[i].props[j], tags[i].name, txt, tmp));
- xmlSetProp (node, (const unsigned char *)tags[i].props[j], (unsigned char *)tmp);
+ xmlSetProp (node, (const guchar *)tags[i].props[j], (guchar *)tmp);
g_free (tmp);
xmlFree (txt);
}
@@ -963,10 +963,10 @@ static gboolean
bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb)
{
xmlNodePtr source;
- char labx[16], colx[16];
- char *val, *lab, *col;
+ gchar labx[16], colx[16];
+ gchar *val, *lab, *col;
GSList *list, *l;
- int i;
+ gint i;
e_bconf_import(gconf, config_xmldb, gconf_remap_list);
@@ -1014,7 +1014,7 @@ bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb)
}
static gboolean
-em_migrate_1_2(const char *data_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, GError **error)
+em_migrate_1_2(const gchar *data_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, GError **error)
{
GConfClient *gconf;
@@ -1039,7 +1039,7 @@ typedef struct _EMMigrateSession {
CamelSession parent_object;
CamelStore *store; /* new folder tree store */
- char *srcdir; /* old folder tree path */
+ gchar *srcdir; /* old folder tree path */
} EMMigrateSession;
typedef struct _EMMigrateSessionClass {
@@ -1048,7 +1048,7 @@ typedef struct _EMMigrateSessionClass {
} EMMigrateSessionClass;
static CamelType em_migrate_session_get_type (void);
-static CamelSession *em_migrate_session_new (const char *path);
+static CamelSession *em_migrate_session_new (const gchar *path);
static void
class_init (EMMigrateSessionClass *klass)
@@ -1077,7 +1077,7 @@ em_migrate_session_get_type (void)
}
static CamelSession *
-em_migrate_session_new (const char *path)
+em_migrate_session_new (const gchar *path)
{
CamelSession *session;
@@ -1096,7 +1096,7 @@ static GtkLabel *label;
static GtkProgressBar *progress;
static void
-em_migrate_setup_progress_dialog (const char *title, const char *desc)
+em_migrate_setup_progress_dialog (const gchar *title, const gchar *desc)
{
GtkWidget *vbox, *hbox, *w;
gchar *markup;
@@ -1171,9 +1171,9 @@ em_migrate_close_progress_dialog (void)
}
static void
-em_migrate_set_folder_name (const char *folder_name)
+em_migrate_set_folder_name (const gchar *folder_name)
{
- char *text;
+ gchar *text;
text = g_strdup_printf (_("Migrating '%s':"), folder_name);
gtk_label_set_text (label, text);
@@ -1187,7 +1187,7 @@ em_migrate_set_folder_name (const char *folder_name)
static void
em_migrate_set_progress (double percent)
{
- char text[5];
+ gchar text[5];
snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
@@ -1201,11 +1201,11 @@ em_migrate_set_progress (double percent)
#ifndef G_OS_WIN32
static gboolean
-is_mail_folder (const char *metadata)
+is_mail_folder (const gchar *metadata)
{
xmlNodePtr node;
xmlDocPtr doc;
- char *type;
+ gchar *type;
if (!(doc = xmlParseFile (metadata))) {
g_warning ("Cannot parse `%s'", metadata);
@@ -1218,7 +1218,7 @@ is_mail_folder (const char *metadata)
return FALSE;
}
- if (!node->name || strcmp ((char *)node->name, "efolder") != 0) {
+ if (!node->name || strcmp ((gchar *)node->name, "efolder") != 0) {
g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
xmlFreeDoc (doc);
return FALSE;
@@ -1226,9 +1226,9 @@ is_mail_folder (const char *metadata)
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, "type")) {
- type = (char *)xmlNodeGetContent (node);
- if (!strcmp ((char *)type, "mail")) {
+ if (node->name && !strcmp ((gchar *)node->name, "type")) {
+ type = (gchar *)xmlNodeGetContent (node);
+ if (!strcmp ((gchar *)type, "mail")) {
xmlFreeDoc (doc);
xmlFree (type);
@@ -1249,13 +1249,13 @@ is_mail_folder (const char *metadata)
}
static gboolean
-get_local_et_expanded (const char *dirname)
+get_local_et_expanded (const gchar *dirname)
{
xmlNodePtr node;
xmlDocPtr doc;
struct stat st;
- char *buf, *p;
- int thread_list;
+ gchar *buf, *p;
+ gint thread_list;
buf = g_strdup_printf ("%s/evolution/config/file:%s", g_get_home_dir (), dirname);
p = buf + strlen (g_get_home_dir ()) + strlen ("/evolution/config/file:");
@@ -1273,12 +1273,12 @@ get_local_et_expanded (const char *dirname)
g_free (buf);
- if (!(node = xmlDocGetRootElement (doc)) || strcmp ((char *)node->name, "expanded_state") != 0) {
+ if (!(node = xmlDocGetRootElement (doc)) || strcmp ((gchar *)node->name, "expanded_state") != 0) {
xmlFreeDoc (doc);
return FALSE;
}
- if (!(buf = (char *)xmlGetProp (node, (const unsigned char *)"default"))) {
+ if (!(buf = (gchar *)xmlGetProp (node, (const guchar *)"default"))) {
xmlFreeDoc (doc);
return FALSE;
}
@@ -1291,11 +1291,11 @@ get_local_et_expanded (const char *dirname)
return thread_list;
}
-static char *
-get_local_store_uri (const char *dirname, char **namep, int *indexp)
+static gchar *
+get_local_store_uri (const gchar *dirname, gchar **namep, gint *indexp)
{
gchar *name, *protocol, *metadata, *tmp;
- int index;
+ gint index;
struct stat st;
xmlNodePtr node;
xmlDocPtr doc;
@@ -1317,24 +1317,24 @@ get_local_store_uri (const char *dirname, char **namep, int *indexp)
goto nofile;
node = doc->children;
- if (strcmp((char *)node->name, "folderinfo"))
+ if (strcmp((gchar *)node->name, "folderinfo"))
goto dodefault;
for (node = node->children; node; node = node->next) {
- if (node->name && !strcmp ((char *)node->name, "folder")) {
- tmp = (char *)xmlGetProp (node, (const unsigned char *)"type");
+ if (node->name && !strcmp ((gchar *)node->name, "folder")) {
+ tmp = (gchar *)xmlGetProp (node, (const guchar *)"type");
if (tmp) {
protocol = alloca(strlen(tmp)+1);
strcpy(protocol, tmp);
xmlFree(tmp);
}
- tmp = (char *)xmlGetProp (node, (const unsigned char *)"name");
+ tmp = (gchar *)xmlGetProp (node, (const guchar *)"name");
if (tmp) {
name = alloca(strlen(tmp)+1);
strcpy(name, tmp);
xmlFree(tmp);
}
- tmp = (char *)xmlGetProp (node, (const unsigned char *)"index");
+ tmp = (gchar *)xmlGetProp (node, (const guchar *)"index");
if (tmp) {
index = atoi(tmp);
xmlFree(tmp);
@@ -1360,18 +1360,18 @@ enum {
CP_APPEND
};
-static int open_flags[3] = {
+static gint open_flags[3] = {
O_WRONLY | O_CREAT | O_TRUNC,
O_WRONLY | O_CREAT | O_TRUNC,
O_WRONLY | O_CREAT | O_APPEND,
};
static gboolean
-cp (const char *src, const char *dest, gboolean show_progress, int mode)
+cp (const gchar *src, const gchar *dest, gboolean show_progress, gint mode)
{
- unsigned char readbuf[65536];
+ guchar readbuf[65536];
ssize_t nread, nwritten;
- int errnosav, readfd, writefd;
+ gint errnosav, readfd, writefd;
size_t total = 0;
struct stat st;
struct utimbuf ut;
@@ -1449,7 +1449,7 @@ cp (const char *src, const char *dest, gboolean show_progress, int mode)
#ifndef G_OS_WIN32
static gboolean
-cp_r (const char *src, const char *dest, const char *pattern, int mode)
+cp_r (const gchar *src, const gchar *dest, const gchar *pattern, gint mode)
{
GString *srcpath, *destpath;
struct dirent *dent;
@@ -1500,10 +1500,10 @@ cp_r (const char *src, const char *dest, const char *pattern, int mode)
}
static void
-mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_name)
+mbox_build_filename (GString *path, const gchar *toplevel_dir, const gchar *full_name)
{
- const char *start, *inptr = full_name;
- int subdirs = 0;
+ const gchar *start, *inptr = full_name;
+ gint subdirs = 0;
while (*inptr != '\0') {
if (*inptr == '/')
@@ -1534,16 +1534,16 @@ mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_n
}
static gboolean
-em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *full_name, GError **error)
+em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar *full_name, GError **error)
{
CamelFolder *old_folder = NULL, *new_folder = NULL;
CamelStore *local_store = NULL;
CamelException ex;
- char *name, *uri;
+ gchar *name, *uri;
GPtrArray *uids;
struct stat st;
gboolean thread_list;
- int index, i;
+ gint index, i;
GString *src, *dest;
gboolean success = FALSE;
@@ -1570,8 +1570,8 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
static const gchar *meta_ext[] = { ".summary", ".ibex.index", ".ibex.index.data" };
size_t slen, dlen;
FILE *fp;
- char *p;
- int mode;
+ gchar *p;
+ gint mode;
g_string_printf (src, "%s/%s", uri + 5, name);
mbox_build_filename (dest, ((CamelService *)session->store)->url->path, full_name);
@@ -1595,7 +1595,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
retry_copy:
if (!cp (src->str, dest->str, TRUE, mode)) {
if (errno == EEXIST) {
- int save = errno;
+ gint save = errno;
switch (e_error_run(NULL, "mail:ask-migrate-existing", src->str, dest->str, NULL)) {
case GTK_RESPONSE_ACCEPT:
@@ -1623,7 +1623,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
g_string_truncate (dest, dlen);
g_string_append (dest, ".cmeta");
if ((fp = fopen (dest->str, "w")) != NULL) {
- int fd = fileno (fp);
+ gint fd = fileno (fp);
/* write the magic string */
if (fwrite ("CLMD", 4, 1, fp) != 1)
@@ -1747,9 +1747,9 @@ fatal:
}
static gboolean
-em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full_name, GError **error)
+em_migrate_dir (EMMigrateSession *session, const gchar *dirname, const gchar *full_name, GError **error)
{
- char *path;
+ gchar *path;
DIR *dir;
struct stat st;
struct dirent *dent;
@@ -1771,8 +1771,8 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
}
while (success && (dent = readdir (dir))) {
- char *full_path;
- char *name;
+ gchar *full_path;
+ gchar *name;
if (dent->d_name[0] == '.')
continue;
@@ -1820,7 +1820,7 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, GError **error)
"patient while Evolution migrates your folders..."));
while (success && (dent = readdir (dir))) {
- char *full_path;
+ gchar *full_path;
if (dent->d_name[0] == '.')
continue;
@@ -1842,10 +1842,10 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, GError **error)
return success;
}
-static char *
-upgrade_xml_uris_1_4 (const char *uri)
+static gchar *
+upgrade_xml_uris_1_4 (const gchar *uri)
{
- char *path, *prefix, *p;
+ gchar *path, *prefix, *p;
CamelURL *url;
if (!strncmp (uri, "file:", 5)) {
@@ -1894,7 +1894,7 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
- if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
+ if (!root->name || strcmp ((gchar *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
@@ -1906,19 +1906,19 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, "rule")) {
+ if (node->name && !strcmp ((gchar *)node->name, "rule")) {
xmlNodePtr sources;
- char *src;
+ gchar *src;
- if (!(src = (char *)xmlGetProp (node, (const unsigned char *)"source")))
- src = (char *)xmlStrdup ((const unsigned char *)"local"); /* default to all local folders? */
+ if (!(src = (gchar *)xmlGetProp (node, (const guchar *)"source")))
+ src = (gchar *)xmlStrdup ((const guchar *)"local"); /* default to all local folders? */
- xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming");
+ xmlSetProp (node, (const guchar *)"source", (const guchar *)"incoming");
if (!(sources = xml_find_node (node, "sources")))
- sources = xmlNewChild (node, NULL, (const unsigned char *)"sources", NULL);
+ sources = xmlNewChild (node, NULL, (const guchar *)"sources", NULL);
- xmlSetProp (sources, (const unsigned char *)"with", (unsigned char *)src);
+ xmlSetProp (sources, (const guchar *)"with", (guchar *)src);
xmlFree (src);
}
@@ -1926,14 +1926,14 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
}
}
-static char *
-get_nth_sig (int id)
+static gchar *
+get_nth_sig (gint id)
{
ESignatureList *list;
ESignature *sig;
EIterator *iter;
- char *uid = NULL;
- int i = 0;
+ gchar *uid = NULL;
+ gint i = 0;
list = e_get_signature_list ();
iter = e_list_get_iterator ((EList *) list);
@@ -1965,7 +1965,7 @@ em_upgrade_accounts_1_4 (void)
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
EAccount *account = (EAccount *) e_iterator_get (iter);
- char *url;
+ gchar *url;
if (account->drafts_folder_uri) {
url = upgrade_xml_uris_1_4 (account->drafts_folder_uri);
@@ -1980,7 +1980,7 @@ em_upgrade_accounts_1_4 (void)
}
if (account->id->sig_uid && !strncmp (account->id->sig_uid, "::", 2)) {
- int sig_id;
+ gint sig_id;
sig_id = strtol (account->id->sig_uid + 2, NULL, 10);
g_free (account->id->sig_uid);
@@ -1996,12 +1996,12 @@ em_upgrade_accounts_1_4 (void)
}
static gboolean
-em_migrate_pop_uid_caches_1_4 (const char *data_dir, GError **error)
+em_migrate_pop_uid_caches_1_4 (const gchar *data_dir, GError **error)
{
GString *oldpath, *newpath;
struct dirent *dent;
size_t olen, nlen;
- char *cache_dir;
+ gchar *cache_dir;
DIR *dir;
gboolean success = TRUE;
@@ -2083,9 +2083,9 @@ em_migrate_pop_uid_caches_1_4 (const char *data_dir, GError **error)
}
static gboolean
-em_migrate_imap_caches_1_4 (const char *data_dir, GError **error)
+em_migrate_imap_caches_1_4 (const gchar *data_dir, GError **error)
{
- char *src, *dest;
+ gchar *src, *dest;
struct stat st;
src = g_build_filename (g_get_home_dir (), "evolution", "mail", "imap", NULL);
@@ -2106,11 +2106,11 @@ em_migrate_imap_caches_1_4 (const char *data_dir, GError **error)
}
static gboolean
-em_migrate_folder_expand_state_1_4 (const char *data_dir, GError **error)
+em_migrate_folder_expand_state_1_4 (const gchar *data_dir, GError **error)
{
GString *srcpath, *destpath;
size_t slen, dlen, rlen;
- char *evo14_mbox_root;
+ gchar *evo14_mbox_root;
struct dirent *dent;
struct stat st;
DIR *dir;
@@ -2143,8 +2143,8 @@ em_migrate_folder_expand_state_1_4 (const char *data_dir, GError **error)
evo14_mbox_root[rlen] = '\0';
while ((dent = readdir (dir))) {
- char *full_name, *inptr, *buf = NULL;
- const char *filename;
+ gchar *full_name, *inptr, *buf = NULL;
+ const gchar *filename;
GString *new;
if (strncmp (dent->d_name, "et-expanded-", 12) != 0)
@@ -2204,11 +2204,11 @@ em_migrate_folder_expand_state_1_4 (const char *data_dir, GError **error)
}
static gboolean
-em_migrate_folder_view_settings_1_4 (const char *data_dir, GError **error)
+em_migrate_folder_view_settings_1_4 (const gchar *data_dir, GError **error)
{
GString *srcpath, *destpath;
size_t slen, dlen, rlen;
- char *evo14_mbox_root;
+ gchar *evo14_mbox_root;
struct dirent *dent;
struct stat st;
DIR *dir;
@@ -2241,8 +2241,8 @@ em_migrate_folder_view_settings_1_4 (const char *data_dir, GError **error)
evo14_mbox_root[rlen] = '\0';
while ((dent = readdir (dir))) {
- char *full_name, *inptr, *buf = NULL;
- const char *filename, *ext;
+ gchar *full_name, *inptr, *buf = NULL;
+ const gchar *filename, *ext;
size_t prelen = 0;
GString *new;
@@ -2252,7 +2252,7 @@ em_migrate_folder_view_settings_1_4 (const char *data_dir, GError **error)
if (!(ext = strrchr (dent->d_name, '.')))
continue;
- if (!strcmp (ext, ".galview") || !strcmp ((char *)dent->d_name, "galview.xml")) {
+ if (!strcmp (ext, ".galview") || !strcmp ((gchar *)dent->d_name, "galview.xml")) {
/* just copy the file */
filename = dent->d_name;
goto copy;
@@ -2260,9 +2260,9 @@ em_migrate_folder_view_settings_1_4 (const char *data_dir, GError **error)
continue;
}
- if (!strncmp ((const char *)dent->d_name, "current_view-", 13)) {
+ if (!strncmp ((const gchar *)dent->d_name, "current_view-", 13)) {
prelen = 13;
- } else if (!strncmp ((const char *)dent->d_name, "custom_view-", 12)) {
+ } else if (!strncmp ((const gchar *)dent->d_name, "custom_view-", 12)) {
prelen = 12;
} else {
/* huh? wtf is this file? */
@@ -2328,14 +2328,14 @@ em_migrate_folder_view_settings_1_4 (const char *data_dir, GError **error)
#define SUBFOLDER_DIR_NAME "subfolders"
#define SUBFOLDER_DIR_NAME_LEN 10
-static char *
-e_path_to_physical (const char *prefix, const char *vpath)
+static gchar *
+e_path_to_physical (const gchar *prefix, const gchar *vpath)
{
- const char *p, *newp;
- char *dp;
- char *ppath;
- int ppath_len;
- int prefix_len;
+ const gchar *p, *newp;
+ gchar *dp;
+ gchar *ppath;
+ gint ppath_len;
+ gint prefix_len;
while (*vpath == '/')
vpath++;
@@ -2404,7 +2404,7 @@ e_path_to_physical (const char *prefix, const char *vpath)
}
static gboolean
-em_migrate_imap_cmeta_1_4(const char *data_dir, GError **error)
+em_migrate_imap_cmeta_1_4(const gchar *data_dir, GError **error)
{
GConfClient *gconf;
GSList *paths, *p;
@@ -2417,7 +2417,7 @@ em_migrate_imap_cmeta_1_4(const char *data_dir, GError **error)
gconf = gconf_client_get_default();
paths = gconf_client_get_list(gconf, "/apps/evolution/shell/offline/folder_paths", GCONF_VALUE_STRING, NULL);
for (p = paths;p;p = g_slist_next(p)) {
- char *name, *path;
+ gchar *name, *path;
name = p->data;
if (*name)
@@ -2430,7 +2430,7 @@ em_migrate_imap_cmeta_1_4(const char *data_dir, GError **error)
CamelURL *url = camel_url_new(account->source->url, NULL);
if (url) {
- char *dir, *base;
+ gchar *dir, *base;
base = g_strdup_printf("%s/imap/%s@%s/folders",
data_dir,
@@ -2439,7 +2439,7 @@ em_migrate_imap_cmeta_1_4(const char *data_dir, GError **error)
dir = e_path_to_physical(base, path);
if (g_mkdir_with_parents(dir, 0777) == 0) {
- char *cmeta;
+ gchar *cmeta;
FILE *fp;
cmeta = g_build_filename(dir, "cmeta", NULL);
@@ -2491,7 +2491,7 @@ remove_system_searches(xmlDocPtr searches)
* searchtypes.xml file instead */
node = xmlDocGetRootElement(searches);
- if (!node->name || strcmp((char *)node->name, "filteroptions"))
+ if (!node->name || strcmp((gchar *)node->name, "filteroptions"))
return;
if (!(node = xml_find_node(node, "ruleset")))
@@ -2501,11 +2501,11 @@ remove_system_searches(xmlDocPtr searches)
while (node != NULL) {
xmlNodePtr nnode = node->next;
- if (node->name && !strcmp ((char *)node->name, "rule")) {
- char *src;
+ if (node->name && !strcmp ((gchar *)node->name, "rule")) {
+ gchar *src;
- src = (char *)xmlGetProp(node, (unsigned char *)"source");
- if (src && !strcmp((char *)src, "demand")) {
+ src = (gchar *)xmlGetProp(node, (guchar *)"source");
+ if (src && !strcmp((gchar *)src, "demand")) {
xmlUnlinkNode(node);
xmlFreeNodeList(node);
}
@@ -2517,7 +2517,7 @@ remove_system_searches(xmlDocPtr searches)
}
static gboolean
-em_migrate_1_4 (const char *data_dir, xmlDocPtr filters, xmlDocPtr vfolders, GError **error)
+em_migrate_1_4 (const gchar *data_dir, xmlDocPtr filters, xmlDocPtr vfolders, GError **error)
{
EMMigrateSession *session;
CamelException lex;
@@ -2616,7 +2616,7 @@ em_update_accounts_2_11 (void)
if (g_str_has_prefix (account->source->url, "spool://")) {
if (g_file_test (account->source->url + 8, G_FILE_TEST_IS_DIR)) {
- char *str = g_strdup_printf ("spooldir://%s", account->source->url + 8);
+ gchar *str = g_strdup_printf ("spooldir://%s", account->source->url + 8);
g_free (account->source->url);
account->source->url = str;
@@ -2639,8 +2639,8 @@ static gboolean
emm_setup_initial(const gchar *data_dir)
{
GDir *dir;
- const char *d;
- char *local = NULL, *base;
+ const gchar *d;
+ gchar *local = NULL, *base;
const gchar * const *language_names;
/* special-case - this means brand new install of evolution */
@@ -2672,7 +2672,7 @@ emm_setup_initial(const gchar *data_dir)
dir = g_dir_open(local, 0, NULL);
if (dir) {
while ((d = g_dir_read_name(dir))) {
- char *src, *dest;
+ gchar *src, *dest;
src = g_build_filename(local, d, NULL);
dest = g_build_filename(base, d, NULL);
@@ -2785,7 +2785,7 @@ em_update_sa_junk_setting_2_23 (void)
key = gconf_client_get (client, "/apps/evolution/mail/junk/default_plugin", NULL);
if (key) {
- const char *str = gconf_value_get_string (key);
+ const gchar *str = gconf_value_get_string (key);
if (str && strcmp (str, "Spamassasin") == 0)
gconf_client_set_string (client, "/apps/evolution/mail/junk/default_plugin", "SpamAssassin", NULL);
@@ -2807,13 +2807,13 @@ update_progress_in_main_thread (double *progress)
}
static void
-migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const char *acc, CamelException *ex, gboolean *done, int *nth_folder, int total_folders)
+migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const gchar *acc, CamelException *ex, gboolean *done, gint *nth_folder, gint total_folders)
{
CamelFolder *folder;
while (fi) {
double progress;
- char *tmp;
+ gchar *tmp;
*nth_folder = *nth_folder + 1;
@@ -2841,7 +2841,7 @@ migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const
/* This could be in CamelStore.ch */
static void
-count_folders (CamelFolderInfo *fi, int *count)
+count_folders (CamelFolderInfo *fi, gint *count)
{
while (fi) {
*count = *count + 1;
@@ -2856,7 +2856,7 @@ setup_local_store (EShellBackend *shell_backend,
{
CamelURL *url;
const gchar *data_dir;
- char *tmp;
+ gchar *tmp;
CamelStore *store;
url = camel_url_new("mbox:", NULL);
@@ -2872,7 +2872,7 @@ setup_local_store (EShellBackend *shell_backend,
}
struct migrate_folders_to_db_structure {
- char *account_name;
+ gchar *account_name;
CamelException ex;
CamelStore *store;
CamelFolderInfo *info;
@@ -2883,7 +2883,7 @@ struct migrate_folders_to_db_structure {
static void
migrate_folders_to_db_thread (struct migrate_folders_to_db_structure *migrate_dbs)
{
- int num_of_folders = 0, nth_folder = 0;
+ gint num_of_folders = 0, nth_folder = 0;
count_folders (migrate_dbs->info, &num_of_folders);
migrate_folders (migrate_dbs->store, migrate_dbs->is_local_store, migrate_dbs->info,
migrate_dbs->account_name, &(migrate_dbs->ex), &(migrate_dbs->done),
@@ -2896,7 +2896,7 @@ migrate_to_db (EShellBackend *shell_backend)
EMMigrateSession *session;
EAccountList *accounts;
EIterator *iter;
- int i=0, len;
+ gint i=0, len;
CamelStore *store = NULL;
CamelFolderInfo *info;
const gchar *data_dir;
@@ -2925,7 +2925,7 @@ migrate_to_db (EShellBackend *shell_backend)
if (g_str_has_suffix (((CamelService *)store)->url->path, ".evolution/mail/local"))
migrate_dbs.is_local_store = TRUE;
- else
+ else
migrate_dbs.is_local_store = FALSE;
camel_exception_init (&migrate_dbs.ex);
migrate_dbs.account_name = _("On This Computer");
@@ -2944,7 +2944,7 @@ migrate_to_db (EShellBackend *shell_backend)
while (e_iterator_is_valid (iter)) {
EAccount *account = (EAccount *) e_iterator_get (iter);
EAccountService *service;
- const char *name;
+ const gchar *name;
service = account->source;
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
index 726ae41ed4..277e80ca19 100644
--- a/mail/e-searching-tokenizer.c
+++ b/mail/e-searching-tokenizer.c
@@ -54,10 +54,10 @@ static guint signals[LAST_SIGNAL];
/* This is faster and safer than glib2's utf8 abomination, but isn't exported from camel as yet */
static inline guint32
-camel_utf8_getc(const unsigned char **ptr)
+camel_utf8_getc(const guchar **ptr)
{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned char c, r;
+ register guchar *p = (guchar *)*ptr;
+ register guchar c, r;
register guint32 v, m;
again:
@@ -98,11 +98,11 @@ static const gchar *ignored_tags[] = {
"B", "I", "FONT", "TT", "EM", /* and more? */};
static int
-ignore_tag (const char *tag)
+ignore_tag (const gchar *tag)
{
- char *t = alloca(strlen(tag)+1), c, *out;
- const char *in;
- int i;
+ gchar *t = alloca(strlen(tag)+1), c, *out;
+ const gchar *in;
+ gint i;
/* we could use a aho-corasick matcher here too ... but we wont */
@@ -146,7 +146,7 @@ struct _match {
/* tree state node */
struct _state {
struct _match *matches;
- unsigned int final; /* max no of chars we just matched */
+ guint final; /* max no of chars we just matched */
struct _state *fail; /* where to try next if we fail */
struct _state *next; /* next on this level? */
};
@@ -154,7 +154,7 @@ struct _state {
/* base tree structure */
struct _trie {
struct _state root;
- int max_depth;
+ gint max_depth;
EMemChunk *state_chunks;
EMemChunk *match_chunks;
@@ -163,9 +163,9 @@ struct _trie {
/* will be enabled only if debug is enabled */
#if d(1) -1 != -1
static void
-dump_trie (struct _state *s, int d)
+dump_trie (struct _state *s, gint d)
{
- char *p = alloca(d*2+1);
+ gchar *p = alloca(d*2+1);
struct _match *m;
memset(p, ' ', d*2);
@@ -199,15 +199,15 @@ g (struct _state *q, guint32 c)
}
static struct _trie *
-build_trie (int nocase, int len, unsigned char **words)
+build_trie (gint nocase, gint len, guchar **words)
{
struct _state *q, *qt, *r;
- const unsigned char *word;
+ const guchar *word;
struct _match *m, *n = NULL;
- int i, depth;
+ gint i, depth;
guint32 c;
struct _trie *trie;
- int state_depth_max, state_depth_size;
+ gint state_depth_max, state_depth_size;
struct _state **state_depth;
trie = g_malloc(sizeof(*trie));
@@ -325,14 +325,14 @@ free_trie (struct _trie *t)
struct _token {
struct _token *next;
struct _token *prev;
- unsigned int offset;
+ guint offset;
/* we need to copy the token for memory management, so why not copy it whole */
- char tok[1];
+ gchar tok[1];
};
/* stack of submatches currently being scanned, used for merging */
struct _submatch {
- unsigned int offstart, offend; /* in bytes */
+ guint offstart, offend; /* in bytes */
};
/* flags for new func */
@@ -342,17 +342,17 @@ struct _submatch {
struct _searcher {
struct _trie *t;
- char *(*next_token)(); /* callbacks for more tokens */
- void *next_data;
+ gchar *(*next_token)(); /* callbacks for more tokens */
+ gpointer next_data;
- int words; /* how many words */
- char *tags, *tage; /* the tag we used to highlight */
+ gint words; /* how many words */
+ gchar *tags, *tage; /* the tag we used to highlight */
- int flags; /* case sensitive or not */
+ gint flags; /* case sensitive or not */
struct _state *state; /* state is the current trie state */
- int matchcount;
+ gint matchcount;
EDList input; /* pending 'input' tokens, processed but might match */
EDList output; /* output tokens ready for source */
@@ -362,25 +362,25 @@ struct _searcher {
guint32 offset; /* current offset through searchable stream? */
guint32 offout; /* last output position */
- unsigned int lastp; /* current position in rotating last buffer */
+ guint lastp; /* current position in rotating last buffer */
guint32 *last; /* buffer that goes back last 'n' positions */
guint32 last_mask; /* bitmask for efficient rotation calculation */
- unsigned int submatchp; /* submatch stack */
+ guint submatchp; /* submatch stack */
struct _submatch *submatches;
};
static void
-searcher_set_tokenfunc(struct _searcher *s, char *(*next)(), void *data)
+searcher_set_tokenfunc(struct _searcher *s, gchar *(*next)(), gpointer data)
{
s->next_token = next;
s->next_data = data;
}
static struct _searcher *
-searcher_new (int flags, int argc, unsigned char **argv, const char *tags, const char *tage)
+searcher_new (gint flags, gint argc, guchar **argv, const gchar *tags, const gchar *tage)
{
- int i, m;
+ gint i, m;
struct _searcher *s;
s = g_malloc(sizeof(*s));
@@ -433,7 +433,7 @@ searcher_free (struct _searcher *s)
g_free (s);
}
static struct _token *
-append_token(EDList *list, const char *tok, int len)
+append_token(EDList *list, const gchar *tok, gint len)
{
struct _token *token;
@@ -453,8 +453,8 @@ append_token(EDList *list, const char *tok, int len)
static void
output_token(struct _searcher *s, struct _token *token)
{
- int offend;
- int left, pre;
+ gint offend;
+ gint left, pre;
if (token->tok[0] == TAG_ESCAPE) {
if (token->offset >= s->offout) {
@@ -482,7 +482,7 @@ output_token(struct _searcher *s, struct _token *token)
}
static struct _token *
-find_token(struct _searcher *s, int start)
+find_token(struct _searcher *s, gint start)
{
register struct _token *token;
@@ -498,11 +498,11 @@ find_token(struct _searcher *s, int start)
}
static void
-output_match(struct _searcher *s, unsigned int start, unsigned int end)
+output_match(struct _searcher *s, guint start, guint end)
{
register struct _token *token;
struct _token *starttoken, *endtoken;
- char b[8];
+ gchar b[8];
d (printf("output match: %d-%d at %d\n", start, end, s->offout));
@@ -570,7 +570,7 @@ output_match(struct _searcher *s, unsigned int start, unsigned int end)
static void
output_subpending (struct _searcher *s)
{
- int i;
+ gint i;
for (i=s->submatchp-1;i>=0;i--)
output_match(s, s->submatches[i].offstart, s->submatches[i].offend);
@@ -579,9 +579,9 @@ output_subpending (struct _searcher *s)
/* returns true if a merge took place */
static int
-merge_subpending (struct _searcher *s, int offstart, int offend)
+merge_subpending (struct _searcher *s, gint offstart, gint offend)
{
- int i;
+ gint i;
/* merges overlapping or abutting match strings */
if (s->submatchp &&
@@ -604,7 +604,7 @@ merge_subpending (struct _searcher *s, int offstart, int offend)
}
static void
-push_subpending (struct _searcher *s, int offstart, int offend)
+push_subpending (struct _searcher *s, gint offstart, gint offend)
{
/* This is really an assertion, we just ignore the last pending match instead of crashing though */
if (s->submatchp >= s->words) {
@@ -631,11 +631,11 @@ output_pending (struct _searcher *s)
static void
flush_extra(struct _searcher *s)
{
- unsigned int start;
- int i;
+ guint start;
+ gint i;
struct _token *starttoken, *token;
- /* find earliest char that can be in contention */
+ /* find earliest gchar that can be in contention */
start = s->offset - s->t->max_depth;
for (i=0;i<s->submatchp;i++)
if (s->submatches[i].offstart < start)
@@ -652,20 +652,20 @@ flush_extra(struct _searcher *s)
}
}
-static char *
+static gchar *
searcher_next_token(struct _searcher *s)
{
struct _token *token;
- const unsigned char *tok, *stok, *pre_tok;
+ const guchar *tok, *stok, *pre_tok;
struct _trie *t = s->t;
struct _state *q = s->state;
struct _match *m = NULL;
- int offstart, offend;
+ gint offstart, offend;
guint32 c;
while (e_dlist_empty(&s->output)) {
/* get next token */
- tok = (unsigned char *)s->next_token(s->next_data);
+ tok = (guchar *)s->next_token(s->next_data);
if (tok == NULL) {
output_subpending (s);
output_pending (s);
@@ -673,15 +673,15 @@ searcher_next_token(struct _searcher *s)
}
/* we dont always have to copy each token, e.g. if we dont match anything */
- token = append_token(&s->input, (char *)tok, -1);
+ token = append_token(&s->input, (gchar *)tok, -1);
token->offset = s->offset;
- tok = (unsigned char *)token->tok;
+ tok = (guchar *)token->tok;
d (printf("new token %d '%s'\n", token->offset, token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
/* tag test, reset state on unknown tags */
if (tok[0] == TAG_ESCAPE) {
- if (!ignore_tag ((char *)tok)) {
+ if (!ignore_tag ((gchar *)tok)) {
/* force reset */
output_subpending (s);
output_pending (s);
@@ -712,7 +712,7 @@ searcher_next_token(struct _searcher *s)
if (q->final) {
s->matchcount++;
- /* use the last buffer to find the real offset of this char */
+ /* use the last buffer to find the real offset of this gchar */
offstart = s->last[(s->lastp - q->final)&s->last_mask];
offend = s->offset + (tok - stok);
@@ -755,10 +755,10 @@ searcher_next_token(struct _searcher *s)
return token ? g_strdup (token->tok) : NULL;
}
-static char *
+static gchar *
searcher_peek_token(struct _searcher *s)
{
- char *tok;
+ gchar *tok;
/* we just get it and then put it back, it's fast enuf */
tok = searcher_next_token(s);
@@ -781,9 +781,9 @@ searcher_pending (struct _searcher *s)
struct _search_info {
GPtrArray *strv;
- char *color;
- unsigned int size:8;
- unsigned int flags:8;
+ gchar *color;
+ guint size:8;
+ guint flags:8;
};
/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
@@ -800,26 +800,26 @@ search_info_new (void)
}
static void
-search_info_set_flags(struct _search_info *si, unsigned int flags, unsigned int mask)
+search_info_set_flags(struct _search_info *si, guint flags, guint mask)
{
si->flags = (si->flags & ~mask) | (flags & mask);
}
static void
-search_info_set_color (struct _search_info *si, const char *color)
+search_info_set_color (struct _search_info *si, const gchar *color)
{
g_free (si->color);
si->color = g_strdup (color);
}
static void
-search_info_add_string (struct _search_info *si, const char *s)
+search_info_add_string (struct _search_info *si, const gchar *s)
{
- const unsigned char *start;
+ const guchar *start;
guint32 c;
if (s && s[0]) {
- const unsigned char *us = (unsigned char *) s;
+ const guchar *us = (guchar *) s;
/* strip leading whitespace */
start = us;
while ((c = camel_utf8_getc (&us))) {
@@ -830,14 +830,14 @@ search_info_add_string (struct _search_info *si, const char *s)
}
/* should probably also strip trailing, but i'm lazy today */
if (start[0])
- g_ptr_array_add (si->strv, g_strdup ((char *)start));
+ g_ptr_array_add (si->strv, g_strdup ((gchar *)start));
}
}
static void
search_info_clear (struct _search_info *si)
{
- int i;
+ gint i;
for (i=0;i<si->strv->len;i++)
g_free (si->strv->pdata[i]);
@@ -848,7 +848,7 @@ search_info_clear (struct _search_info *si)
static void
search_info_free (struct _search_info *si)
{
- int i;
+ gint i;
for (i=0;i<si->strv->len;i++)
g_free (si->strv->pdata[i]);
@@ -862,7 +862,7 @@ static struct _search_info *
search_info_clone (struct _search_info *si)
{
struct _search_info *out;
- int i;
+ gint i;
out = search_info_new ();
for (i=0;i<si->strv->len;i++)
@@ -877,7 +877,7 @@ search_info_clone (struct _search_info *si)
static struct _searcher *
search_info_to_searcher (struct _search_info *si)
{
- char *tags, *tage;
+ gchar *tags, *tage;
const gchar *col;
if (si->strv->len == 0)
@@ -893,7 +893,7 @@ search_info_to_searcher (struct _search_info *si)
tage = alloca(20);
sprintf(tage, "%c</font>", TAG_ESCAPE);
- return searcher_new (si->flags, si->strv->len, (unsigned char **)si->strv->pdata, tags, tage);
+ return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage);
}
/* ********************************************************************** */
@@ -909,7 +909,7 @@ struct _ESearchingTokenizerPrivate {
/* blah blah the htmltokeniser doesn't like being asked
for a token if it doens't hvae any! */
-static char *
+static gchar *
get_token (HTMLTokenizer *tokenizer)
{
HTMLTokenizerClass *class = HTML_TOKENIZER_CLASS (parent_class);
@@ -989,8 +989,8 @@ static gchar *
searching_tokenizer_next_token (HTMLTokenizer *tokenizer)
{
ESearchingTokenizerPrivate *priv;
- int oldmatched;
- char *token;
+ gint oldmatched;
+ gchar *token;
priv = E_SEARCHING_TOKENIZER_GET_PRIVATE (tokenizer);
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index e5f0f98001..27c04c83fb 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -119,13 +119,13 @@ typedef struct _EMAccountEditorService {
struct _GtkToggleButton *needs_auth;
struct _GtkWidget *check_dialog;
- int check_id;
+ gint check_id;
GList *authtypes; /* if "Check supported" */
CamelProvider *provider;
CamelProviderType type;
- int auth_changed_id;
+ gint auth_changed_id;
} EMAccountEditorService;
typedef struct _EMAccountEditorPrivate {
@@ -137,7 +137,7 @@ typedef struct _EMAccountEditorPrivate {
guint sig_added_id;
guint sig_removed_id;
guint sig_changed_id;
- const char *sig_uid;
+ const gchar *sig_uid;
/* incoming mail */
EMAccountEditorService source;
@@ -179,13 +179,13 @@ typedef struct _EMAccountEditorPrivate {
/* for e-config callbacks, each page sets up its widgets, then they are dealed out by the get_widget callback in order*/
GtkWidget *widgets[5];
- const char *widgets_name[5];
- int widgets_index;
+ const gchar *widgets_name[5];
+ gint widgets_index;
/* for druid page preparation */
- unsigned int identity_set:1;
- unsigned int receive_set:1;
- unsigned int management_set:1;
+ guint identity_set:1;
+ guint receive_set:1;
+ guint management_set:1;
} EMAccountEditorPrivate;
static void emae_refresh_authtype(EMAccountEditor *emae, EMAccountEditorService *service);
@@ -289,7 +289,7 @@ EMAccountEditor *em_account_editor_new(EAccount *account, em_account_editor_t ty
*
* Return value:
**/
-EMAccountEditor *em_account_editor_new_for_pages(EAccount *account, em_account_editor_t type, char *id, GtkWidget **pages)
+EMAccountEditor *em_account_editor_new_for_pages(EAccount *account, em_account_editor_t type, gchar *id, GtkWidget **pages)
{
EMAccountEditor *emae = g_object_new(em_account_editor_get_type(), NULL);
emae->pages = pages;
@@ -320,14 +320,14 @@ static struct {
#define num_ssl_options (sizeof (ssl_options) / sizeof (ssl_options[0]))
static gboolean
-is_email (const char *address)
+is_email (const gchar *address)
{
/* This is supposed to check if the address's domain could be
an FQDN but alas, it's not worth the pain and suffering. */
- const char *at;
+ const gchar *at;
at = strchr (address, '@');
- /* make sure we have an '@' and that it's not the first or last char */
+ /* make sure we have an '@' and that it's not the first or last gchar */
if (!at || at == address || *(at + 1) == '\0')
return FALSE;
@@ -335,10 +335,10 @@ is_email (const char *address)
}
static CamelURL *
-emae_account_url(EMAccountEditor *emae, int urlid)
+emae_account_url(EMAccountEditor *emae, gint urlid)
{
CamelURL *url = NULL;
- const char *uri;
+ const gchar *uri;
uri = e_account_get_string(emae->account, urlid);
@@ -362,13 +362,13 @@ emae_license_state(GtkToggleButton *button, GtkDialog *dialog)
}
static gboolean
-emae_load_text(GtkTextView *view, const char *filename)
+emae_load_text(GtkTextView *view, const gchar *filename)
{
FILE *fd;
- char filebuf[1024];
+ gchar filebuf[1024];
GtkTextIter iter;
GtkTextBuffer *buffer;
- int count;
+ gint count;
g_return_val_if_fail (filename != NULL , FALSE);
@@ -393,9 +393,9 @@ emae_display_license(EMAccountEditor *emae, CamelProvider *prov)
{
GladeXML *xml;
GtkWidget *w, *dialog;
- char *tmp;
+ gchar *tmp;
GtkResponseType response = GTK_RESPONSE_NONE;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-dialogs.glade",
@@ -445,7 +445,7 @@ emae_check_license(EMAccountEditor *emae, CamelProvider *prov)
providers_list = gconf_client_get_list (gconf, "/apps/evolution/mail/licenses", GCONF_VALUE_STRING, NULL);
for (l = providers_list, accepted = FALSE; l && !accepted; l = g_slist_next(l))
- accepted = (strcmp((char *)l->data, prov->protocol) == 0);
+ accepted = (strcmp((gchar *)l->data, prov->protocol) == 0);
if (!accepted
&& (accepted = emae_display_license(emae, prov)) == TRUE) {
@@ -467,7 +467,7 @@ static void
default_folders_clicked (GtkButton *button, gpointer user_data)
{
EMAccountEditor *emae = user_data;
- const char *uri;
+ const gchar *uri;
uri = e_mail_shell_backend_get_folder_uri (
global_mail_shell_backend, E_MAIL_FOLDER_DRAFTS);
@@ -481,10 +481,10 @@ default_folders_clicked (GtkButton *button, gpointer user_data)
}
/* custom widget factories */
-GtkWidget *em_account_editor_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2);
+GtkWidget *em_account_editor_folder_selector_button_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2);
GtkWidget *
-em_account_editor_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_editor_folder_selector_button_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
EMFolderTreeModel *model;
@@ -492,23 +492,23 @@ em_account_editor_folder_selector_button_new (char *widget_name, char *string1,
return (GtkWidget *)em_folder_selection_button_new(model, string1 ? string1 : _("Select Folder"), NULL);
}
-GtkWidget *em_account_editor_dropdown_new(char *widget_name, char *string1, char *string2, int int1, int int2);
+GtkWidget *em_account_editor_dropdown_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2);
GtkWidget *
-em_account_editor_dropdown_new(char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_editor_dropdown_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
return (GtkWidget *)gtk_combo_box_new();
}
-GtkWidget *em_account_editor_ssl_selector_new(char *widget_name, char *string1, char *string2, int int1, int int2);
+GtkWidget *em_account_editor_ssl_selector_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2);
GtkWidget *
-em_account_editor_ssl_selector_new(char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_editor_ssl_selector_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
GtkComboBox *dropdown = (GtkComboBox *)gtk_combo_box_new();
GtkCellRenderer *cell = gtk_cell_renderer_text_new();
GtkListStore *store;
- int i;
+ gint i;
GtkTreeIter iter;
gtk_widget_show((GtkWidget *)dropdown);
@@ -546,8 +546,8 @@ emae_auto_detect(EMAccountEditor *emae)
GHashTable *auto_detected;
GSList *l;
CamelProviderConfEntry *entries;
- char *value;
- int i;
+ gchar *value;
+ gint i;
CamelURL *url;
if (service->provider == NULL
@@ -622,7 +622,7 @@ static int
emae_signature_get_iter(EMAccountEditor *emae, ESignature *sig, GtkTreeModel **modelp, GtkTreeIter *iter)
{
GtkTreeModel *model;
- int found = 0;
+ gint found = 0;
model = gtk_combo_box_get_model(emae->priv->signatures_dropdown);
*modelp = model;
@@ -630,7 +630,7 @@ emae_signature_get_iter(EMAccountEditor *emae, ESignature *sig, GtkTreeModel **m
return FALSE;
do {
- char *uid;
+ gchar *uid;
gtk_tree_model_get(model, iter, 1, &uid, -1);
if (uid && !strcmp(uid, sig->uid))
@@ -664,10 +664,10 @@ emae_signature_changed(ESignatureList *signatures, ESignature *sig, EMAccountEdi
static void
emae_signaturetype_changed(GtkComboBox *dropdown, EMAccountEditor *emae)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
- char *uid = NULL;
+ gchar *uid = NULL;
if (id != -1) {
model = gtk_combo_box_get_model(dropdown);
@@ -704,11 +704,11 @@ emae_setup_signatures(EMAccountEditor *emae, GladeXML *xml)
GtkComboBox *dropdown = (GtkComboBox *)glade_xml_get_widget(xml, "signature_dropdown");
GtkCellRenderer *cell = gtk_cell_renderer_text_new();
GtkListStore *store;
- int i, active=0;
+ gint i, active=0;
GtkTreeIter iter;
ESignatureList *signatures;
EIterator *it;
- const char *current = e_account_get_string(emae->account, E_ACCOUNT_ID_SIGNATURE);
+ const gchar *current = e_account_get_string(emae->account, E_ACCOUNT_ID_SIGNATURE);
GtkWidget *button;
emae->priv->signatures_dropdown = dropdown;
@@ -765,7 +765,7 @@ emae_setup_signatures(EMAccountEditor *emae, GladeXML *xml)
static void
emae_receipt_policy_changed(GtkComboBox *dropdown, EMAccountEditor *emae)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
EAccountReceiptPolicy policy;
@@ -785,7 +785,7 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml)
{
GtkComboBox *dropdown = (GtkComboBox *)glade_xml_get_widget(xml, "receipt_policy_dropdown");
GtkListStore *store;
- int i = 0, active = 0;
+ gint i = 0, active = 0;
GtkTreeIter iter;
EAccountReceiptPolicy current = emae->account->receipt_policy;
static struct {
@@ -823,16 +823,16 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml)
static void
emae_account_entry_changed(GtkEntry *entry, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)entry, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)entry, "account-item"));
e_account_set_string(emae->account, item, gtk_entry_get_text(entry));
}
static GtkEntry *
-emae_account_entry(EMAccountEditor *emae, const char *name, int item, GladeXML *xml)
+emae_account_entry(EMAccountEditor *emae, const gchar *name, gint item, GladeXML *xml)
{
GtkEntry *entry;
- const char *text;
+ const gchar *text;
entry = (GtkEntry *)glade_xml_get_widget(xml, name);
text = e_account_get_string(emae->account, item);
@@ -848,13 +848,13 @@ emae_account_entry(EMAccountEditor *emae, const char *name, int item, GladeXML *
static void
emae_account_toggle_changed(GtkToggleButton *toggle, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)toggle, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)toggle, "account-item"));
e_account_set_bool(emae->account, item, gtk_toggle_button_get_active(toggle));
}
static void
-emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, int item)
+emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, gint item)
{
gtk_toggle_button_set_active(toggle, e_account_get_bool(emae->account, item));
g_object_set_data((GObject *)toggle, "account-item", GINT_TO_POINTER(item));
@@ -863,7 +863,7 @@ emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, int i
}
static GtkToggleButton *
-emae_account_toggle(EMAccountEditor *emae, const char *name, int item, GladeXML *xml)
+emae_account_toggle(EMAccountEditor *emae, const gchar *name, gint item, GladeXML *xml)
{
GtkToggleButton *toggle;
@@ -876,13 +876,13 @@ emae_account_toggle(EMAccountEditor *emae, const char *name, int item, GladeXML
static void
emae_account_spinint_changed(GtkSpinButton *spin, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)spin, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)spin, "account-item"));
e_account_set_int(emae->account, item, gtk_spin_button_get_value(spin));
}
static void
-emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, int item)
+emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, gint item)
{
gtk_spin_button_set_value(spin, e_account_get_int(emae->account, item));
g_object_set_data((GObject *)spin, "account-item", GINT_TO_POINTER(item));
@@ -892,7 +892,7 @@ emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, int item
#if 0
static GtkSpinButton *
-emae_account_spinint(EMAccountEditor *emae, const char *name, int item)
+emae_account_spinint(EMAccountEditor *emae, const gchar *name, gint item)
{
GtkSpinButton *spin;
@@ -906,21 +906,21 @@ emae_account_spinint(EMAccountEditor *emae, const char *name, int item)
static void
emae_account_folder_changed(EMFolderSelectionButton *folder, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)folder, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)folder, "account-item"));
e_account_set_string(emae->account, item, em_folder_selection_button_get_selection(folder));
}
static EMFolderSelectionButton *
-emae_account_folder(EMAccountEditor *emae, const char *name, int item, int deffolder, GladeXML *xml)
+emae_account_folder(EMAccountEditor *emae, const gchar *name, gint item, gint deffolder, GladeXML *xml)
{
EMFolderSelectionButton *folder;
- const char *uri;
+ const gchar *uri;
folder = (EMFolderSelectionButton *)glade_xml_get_widget(xml, name);
uri = e_account_get_string(emae->account, item);
if (uri) {
- char *tmp = em_uri_to_camel(uri);
+ gchar *tmp = em_uri_to_camel(uri);
em_folder_selection_button_set_selection(folder, tmp);
g_free(tmp);
@@ -947,8 +947,8 @@ static void
smime_changed(EMAccountEditor *emae)
{
EMAccountEditorPrivate *gui = emae->priv;
- int act;
- const char *tmp;
+ gint act;
+ const gchar *tmp;
tmp = gtk_entry_get_text(gui->smime_sign_key);
act = tmp && tmp[0];
@@ -969,7 +969,7 @@ smime_changed(EMAccountEditor *emae)
}
static void
-smime_sign_key_selected(GtkWidget *dialog, const char *key, EMAccountEditor *emae)
+smime_sign_key_selected(GtkWidget *dialog, const gchar *key, EMAccountEditor *emae)
{
EMAccountEditorPrivate *gui = emae->priv;
@@ -1004,7 +1004,7 @@ smime_sign_key_clear(GtkWidget *w, EMAccountEditor *emae)
}
static void
-smime_encrypt_key_selected(GtkWidget *dialog, const char *key, EMAccountEditor *emae)
+smime_encrypt_key_selected(GtkWidget *dialog, const gchar *key, EMAccountEditor *emae)
{
EMAccountEditorPrivate *gui = emae->priv;
@@ -1040,10 +1040,10 @@ smime_encrypt_key_clear(GtkWidget *w, EMAccountEditor *emae)
#endif
static void
-emae_url_set_hostport(CamelURL *url, const char *txt)
+emae_url_set_hostport(CamelURL *url, const gchar *txt)
{
- const char *port;
- char *host;
+ const gchar *port;
+ gchar *host;
/* FIXME: what if this was a raw IPv6 address? */
if (txt && (port = strchr(txt, ':'))) {
@@ -1069,7 +1069,7 @@ emae_url_set_hostport(CamelURL *url, const char *txt)
We need our own function for host:port decoding, as above */
struct _provider_host_info {
guint32 flag;
- void (*setval)(CamelURL *, const char *);
+ void (*setval)(CamelURL *, const gchar *);
glong widgets[3];
};
@@ -1146,7 +1146,7 @@ static struct _service_info {
static void
emae_uri_changed(EMAccountEditorService *service, CamelURL *url)
{
- char *uri;
+ gchar *uri;
uri = camel_url_to_string(url, 0);
@@ -1162,16 +1162,16 @@ emae_uri_changed(EMAccountEditorService *service, CamelURL *url)
}
static void
-emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const char *), GtkEntry *entry)
+emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const gchar *), GtkEntry *entry)
{
GtkComboBox *dropdown;
- int id;
+ gint id;
GtkTreeModel *model;
GtkTreeIter iter;
CamelServiceAuthType *authtype;
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
- const char *text = gtk_entry_get_text(entry);
+ const gchar *text = gtk_entry_get_text(entry);
setval(url, (text && text[0])?text:NULL);
@@ -1195,16 +1195,16 @@ emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelUR
}
static void
-emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const char *), GtkWidget *widget)
+emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const gchar *), GtkWidget *widget)
{
GtkComboBox *dropdown;
- int id;
+ gint id;
GtkTreeModel *model;
GtkTreeIter iter;
CamelServiceAuthType *authtype;
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
- const char *text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ const gchar *text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
setval(url, (text && text[0])?text:NULL);
@@ -1248,10 +1248,10 @@ emae_path_changed(GtkWidget *widget, EMAccountEditorService *service)
static int
emae_ssl_update(EMAccountEditorService *service, CamelURL *url)
{
- int id = gtk_combo_box_get_active(service->use_ssl);
+ gint id = gtk_combo_box_get_active(service->use_ssl);
GtkTreeModel *model;
GtkTreeIter iter;
- char *ssl;
+ gchar *ssl;
if (id == -1)
return 0;
@@ -1281,12 +1281,12 @@ emae_ssl_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
static void
emae_service_provider_changed(EMAccountEditorService *service)
{
- int i, j;
+ gint i, j;
void (*show)(GtkWidget *);
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
if (service->provider) {
- int enable;
+ gint enable;
GtkWidget *dwidget = NULL;
camel_url_set_protocol(url, service->provider->protocol);
@@ -1308,7 +1308,7 @@ emae_service_provider_changed(EMAccountEditorService *service)
for (i=0;emae_service_info[service->type].host_info[i].flag;i++) {
GtkWidget *w;
- int hide;
+ gint hide;
struct _provider_host_info *info = &emae_service_info[service->type].host_info[i];
enable = CAMEL_PROVIDER_ALLOWS(service->provider, info->flag);
@@ -1389,7 +1389,7 @@ emae_service_provider_changed(EMAccountEditorService *service)
static void
emae_provider_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
@@ -1419,10 +1419,10 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service)
GList *l;
GtkCellRenderer *cell = gtk_cell_renderer_text_new();
GtkComboBox *dropdown;
- int active = 0, i;
+ gint active = 0, i;
struct _service_info *info = &emae_service_info[service->type];
- const char *uri = e_account_get_string(account, info->account_uri_key);
- char *current = NULL;
+ const gchar *uri = e_account_get_string(account, info->account_uri_key);
+ gchar *current = NULL;
const gchar *tmp;
CamelURL *url;
@@ -1430,8 +1430,8 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service)
gtk_widget_show((GtkWidget *)dropdown);
if (uri) {
- const char *colon = strchr(uri, ':');
- int len;
+ const gchar *colon = strchr(uri, ':');
+ gint len;
if (colon) {
len = colon-uri;
@@ -1515,7 +1515,7 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service)
static void
emae_authtype_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
CamelServiceAuthType *authtype;
@@ -1545,7 +1545,7 @@ emae_authtype_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
static void
emae_needs_auth(GtkToggleButton *toggle, EMAccountEditorService *service)
{
- int need = gtk_toggle_button_get_active(toggle);
+ gint need = gtk_toggle_button_get_active(toggle);
gtk_widget_set_sensitive(service->auth_frame, need);
@@ -1569,10 +1569,10 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service)
GtkListStore *store;
GtkTreeIter iter;
GtkComboBox *dropdown;
- int active = 0;
- int i;
+ gint active = 0;
+ gint i;
struct _service_info *info = &emae_service_info[service->type];
- const char *uri = e_account_get_string(account, info->account_uri_key);
+ const gchar *uri = e_account_get_string(account, info->account_uri_key);
GList *l, *ll;
CamelURL *url = NULL;
@@ -1587,7 +1587,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service)
if (service->provider) {
for (i=0, l=service->provider->authtypes; l; l=l->next, i++) {
CamelServiceAuthType *authtype = l->data;
- int avail;
+ gint avail;
/* if we have some already shown */
if (service->authtypes) {
@@ -1626,7 +1626,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service)
camel_url_free(url);
}
-static void emae_check_authtype_done(const char *uri, CamelProviderType type, GList *types, void *data)
+static void emae_check_authtype_done(const gchar *uri, CamelProviderType type, GList *types, gpointer data)
{
EMAccountEditorService *service = data;
@@ -1646,7 +1646,7 @@ static void emae_check_authtype_done(const char *uri, CamelProviderType type, GL
g_object_unref(service->emae);
}
-static void emae_check_authtype_response(GtkWidget *d, int button, EMAccountEditorService *service)
+static void emae_check_authtype_response(GtkWidget *d, gint button, EMAccountEditorService *service)
{
mail_msg_cancel(service->check_id);
gtk_widget_destroy(service->check_dialog);
@@ -1659,7 +1659,7 @@ static void emae_check_authtype_response(GtkWidget *d, int button, EMAccountEdit
static void emae_check_authtype(GtkWidget *w, EMAccountEditorService *service)
{
EMAccountEditor *emae = service->emae;
- const char *uri;
+ const gchar *uri;
/* TODO: do we need to remove the auth mechanism from the uri? */
uri = e_account_get_string(emae->account, emae_service_info[service->type].account_uri_key);
@@ -1679,9 +1679,9 @@ emae_setup_service(EMAccountEditor *emae, EMAccountEditorService *service, Glade
{
struct _service_info *info = &emae_service_info[service->type];
CamelURL *url = emae_account_url(emae, info->account_uri_key);
- const char *uri = e_account_get_string(emae->account, info->account_uri_key);
- const char *tmp;
- int i;
+ const gchar *uri = e_account_get_string(emae->account, info->account_uri_key);
+ const gchar *tmp;
+ gint i;
service->provider = uri?camel_provider_get(uri, NULL):NULL;
service->frame = glade_xml_get_widget(xml, info->frame);
@@ -1705,7 +1705,7 @@ emae_setup_service(EMAccountEditor *emae, EMAccountEditorService *service, Glade
/* configure ui for current settings */
if (url->host) {
if (url->port) {
- char *host = g_strdup_printf("%s:%d", url->host, url->port);
+ gchar *host = g_strdup_printf("%s:%d", url->host, url->port);
gtk_entry_set_text(service->hostname, host);
g_free(host);
@@ -1789,16 +1789,16 @@ static struct {
/* its a bit obtuse, but its simple */
static void
-emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const char *first, ...)
+emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const gchar *first, ...)
{
- int i = 0;
+ gint i = 0;
va_list ap;
va_start(ap, first);
while (first) {
emae->priv->widgets_name[i] = first;
emae->priv->widgets[i++] = glade_xml_get_widget(xml, first);
- first = va_arg(ap, const char *);
+ first = va_arg(ap, const gchar *);
}
va_end(ap);
@@ -1809,15 +1809,15 @@ emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const char *first, ...)
}
static GtkWidget *
-emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
EAccount *account = emae->account;
- int i;
+ gint i;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -1882,13 +1882,13 @@ emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
}
static GtkWidget *
-emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -1935,9 +1935,9 @@ emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
static void
emae_option_toggle_changed(GtkToggleButton *toggle, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)toggle, "option-name");
+ const gchar *name = g_object_get_data((GObject *)toggle, "option-name");
GSList *depl = g_object_get_data((GObject *)toggle, "dependent-list");
- int active = gtk_toggle_button_get_active(toggle);
+ gint active = gtk_toggle_button_get_active(toggle);
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
for (;depl;depl = g_slist_next(depl))
@@ -1949,13 +1949,13 @@ emae_option_toggle_changed(GtkToggleButton *toggle, EMAccountEditorService *serv
}
static GtkWidget *
-emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const char *text, const char *name, int def)
+emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const gchar *text, const gchar *name, gint def)
{
GtkWidget *w;
/* FIXME: how do we get the default value ever? */
w = gtk_check_button_new_with_mnemonic(text);
- g_object_set_data((GObject *)w, "option-name", (void *)name);
+ g_object_set_data((GObject *)w, "option-name", (gpointer)name);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), camel_url_get_param (url, name) != NULL);
g_signal_connect(w, "toggled", G_CALLBACK(emae_option_toggle_changed), service);
gtk_widget_show(w);
@@ -1966,8 +1966,8 @@ emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const char *t
static void
emae_option_entry_changed(GtkEntry *entry, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)entry, "option-name");
- const char *text = gtk_entry_get_text(entry);
+ const gchar *name = g_object_get_data((GObject *)entry, "option-name");
+ const gchar *text = gtk_entry_get_text(entry);
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
camel_url_set_param(url, name, text && text[0]?text:NULL);
@@ -1976,10 +1976,10 @@ emae_option_entry_changed(GtkEntry *entry, EMAccountEditorService *service)
}
static GtkWidget *
-emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *name, const char *def, GtkWidget *l)
+emae_option_entry(EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *def, GtkWidget *l)
{
GtkWidget *w;
- const char *val = camel_url_get_param(url, name);
+ const gchar *val = camel_url_get_param(url, name);
if (val == NULL) {
if (def) {
@@ -1994,7 +1994,7 @@ emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *na
"text", val,
NULL);
gtk_label_set_mnemonic_widget ((GtkLabel*)l, w);
- g_object_set_data((GObject *)w, "option-name", (void *)name);
+ g_object_set_data((GObject *)w, "option-name", (gpointer)name);
g_signal_connect(w, "changed", G_CALLBACK(emae_option_entry_changed), service);
gtk_widget_show(w);
@@ -2004,8 +2004,8 @@ emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *na
static void
emae_option_checkspin_changed(GtkSpinButton *spin, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)spin, "option-name");
- char value[16];
+ const gchar *name = g_object_get_data((GObject *)spin, "option-name");
+ gchar value[16];
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
sprintf(value, "%d", gtk_spin_button_get_value_as_int(spin));
@@ -2017,7 +2017,7 @@ emae_option_checkspin_changed(GtkSpinButton *spin, EMAccountEditorService *servi
static void
emae_option_checkspin_check_changed(GtkToggleButton *toggle, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)toggle, "option-name");
+ const gchar *name = g_object_get_data((GObject *)toggle, "option-name");
GtkSpinButton *spin = g_object_get_data((GObject *)toggle, "option-target");
if (gtk_toggle_button_get_active(toggle)) {
@@ -2035,14 +2035,14 @@ emae_option_checkspin_check_changed(GtkToggleButton *toggle, EMAccountEditorServ
/* this is a fugly api */
static GtkWidget *
-emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char *name, const char *fmt, const char *info)
+emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *fmt, const gchar *info)
{
GtkWidget *hbox, *check, *spin, *label = NULL;
double min, def, max;
- char *pre, *post;
- const char *val;
- char on;
- int enable;
+ gchar *pre, *post;
+ const gchar *val;
+ gchar on;
+ gint enable;
pre = g_alloca(strlen(fmt)+1);
strcpy(pre, fmt);
@@ -2074,9 +2074,9 @@ emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char
if (label)
gtk_box_pack_start((GtkBox *)hbox, label, FALSE, TRUE, 4);
- g_object_set_data((GObject *)spin, "option-name", (void *)name);
- g_object_set_data((GObject *)check, "option-name", (void *)name);
- g_object_set_data((GObject *)check, "option-target", (void *)spin);
+ g_object_set_data((GObject *)spin, "option-name", (gpointer)name);
+ g_object_set_data((GObject *)check, "option-name", (gpointer)name);
+ g_object_set_data((GObject *)check, "option-target", (gpointer)spin);
g_signal_connect(spin, "value_changed", G_CALLBACK(emae_option_checkspin_changed), service);
g_signal_connect(check, "toggled", G_CALLBACK(emae_option_checkspin_check_changed), service);
@@ -2089,10 +2089,10 @@ emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char
static void
emae_option_options_changed (GtkComboBox *options, EMAccountEditorService *service)
{
- const char *name = g_object_get_data (G_OBJECT (options), "option-name");
- char *value = NULL;
+ const gchar *name = g_object_get_data (G_OBJECT (options), "option-name");
+ gchar *value = NULL;
CamelURL *url = emae_account_url (service->emae, emae_service_info[service->type].account_uri_key);
- int id = gtk_combo_box_get_active (options);
+ gint id = gtk_combo_box_get_active (options);
if (id != -1) {
GtkTreeModel *model;
@@ -2112,16 +2112,16 @@ emae_option_options_changed (GtkComboBox *options, EMAccountEditorService *servi
/* 'values' is in format "value0:caption0:value2:caption2:...valueN:captionN" */
static GtkWidget *
-emae_option_options (EMAccountEditorService *service, CamelURL *url, const char *name, const char *values, GtkWidget *l)
+emae_option_options (EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *values, GtkWidget *l)
{
GtkComboBox *w;
GtkListStore *store;
GtkTreeIter iter;
- const char *p, *value, *caption;
+ const gchar *p, *value, *caption;
GtkCellRenderer *cell;
- int active = 0; /* the first item entered is always a default item */
- int i;
- const char *val = camel_url_get_param (url, name);
+ gint active = 0; /* the first item entered is always a default item */
+ gint i;
+ const gchar *val = camel_url_get_param (url, name);
w = GTK_COMBO_BOX (gtk_combo_box_new ());
@@ -2130,7 +2130,7 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const char
p = values;
for (p = values, i = 0; p; i++) {
- char *vl, *cp;
+ gchar *vl, *cp;
value = p;
caption = strchr (p, ':');
@@ -2170,18 +2170,18 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const char
gtk_label_set_mnemonic_widget (GTK_LABEL (l), GTK_WIDGET (w));
- g_object_set_data (G_OBJECT (w), "option-name", (void *)name);
+ g_object_set_data (G_OBJECT (w), "option-name", (gpointer)name);
g_signal_connect (w, "changed", G_CALLBACK (emae_option_options_changed), service);
return GTK_WIDGET (w);
}
static GtkWidget *
-emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
GtkWidget *w, *box, *spin;
- int row;
+ gint row;
if (emae->priv->source.provider == NULL
|| emae->priv->source.provider->extra_conf == NULL)
@@ -2214,7 +2214,7 @@ emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *par
}
static GtkWidget *
-emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
struct _receive_options_item *item = (struct _receive_options_item *)eitem;
@@ -2223,7 +2223,7 @@ emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidg
GtkWidget *depw;
GSList *depl = NULL, *n;
EMAccountEditorService *service = &emae->priv->source;
- int row, i;
+ gint row, i;
GHashTable *extra;
CamelURL *url;
@@ -2326,7 +2326,7 @@ section:
}
if (depw && depl) {
- int act = gtk_toggle_button_get_active((GtkToggleButton *)depw);
+ gint act = gtk_toggle_button_get_active((GtkToggleButton *)depw);
g_object_set_data_full((GObject *)depw, "dependent-list", depl, (GDestroyNotify)g_slist_free);
for (n=depl;n;n=g_slist_next(n))
@@ -2348,17 +2348,17 @@ section:
}
static GtkWidget *
-emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/* no transport options page at all for these types of providers */
if (gui->source.provider && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(gui->source.provider)) {
- memset(&gui->transport.frame, 0, ((char *)&gui->transport.check_dialog)-((char *)&gui->transport.frame));
+ memset(&gui->transport.frame, 0, ((gchar *)&gui->transport.check_dialog)-((gchar *)&gui->transport.frame));
return NULL;
}
@@ -2403,13 +2403,13 @@ emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct
}
static GtkWidget *
-emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -2461,7 +2461,7 @@ emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
}
static GtkWidget *
-emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
#if defined (HAVE_NSS)
@@ -2469,7 +2469,7 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
#endif
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -2525,10 +2525,10 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
}
static GtkWidget *
-emae_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
- int i;
+ gint i;
for (i=0;emae->priv->widgets[i];i++)
if (!strcmp(emae->priv->widgets_name[i], item->label))
@@ -2576,7 +2576,7 @@ static EMConfigItem emae_editor_items[] = {
static gboolean emae_editor_items_translated = FALSE;
static GtkWidget *
-emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
@@ -2586,7 +2586,7 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
GladeXML *druidxml;
GtkWidget *page;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-config.glade",
@@ -2606,11 +2606,11 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
}
static GtkWidget *
-emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
GladeXML *druidxml;
GtkWidget *w;
- char *gladefile;
+ gchar *gladefile;
EMAccountEditor *emae = (EMAccountEditor *)data;
if (emae->type == EMAE_PAGES)
@@ -2667,13 +2667,13 @@ static EMConfigItem emae_druid_items[] = {
static gboolean emae_druid_items_translated = FALSE;
static void
-emae_free(EConfig *ec, GSList *items, void *data)
+emae_free(EConfig *ec, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-emae_free_auto(EConfig *ec, GSList *items, void *data)
+emae_free_auto(EConfig *ec, GSList *items, gpointer data)
{
GSList *l, *n;
@@ -2694,8 +2694,8 @@ static gboolean
emae_service_complete(EMAccountEditor *emae, EMAccountEditorService *service)
{
CamelURL *url;
- int ok = TRUE;
- const char *uri;
+ gint ok = TRUE;
+ const gchar *uri;
if (service->provider == NULL)
return TRUE;
@@ -2748,9 +2748,9 @@ struct _server_prefill {
};
static int
-check_servers (char *server)
+check_servers (gchar *server)
{
- int len = G_N_ELEMENTS(mail_servers), i;
+ gint len = G_N_ELEMENTS(mail_servers), i;
for (i=0; i<len; i++) {
if (strstr(server, mail_servers[i].key) != NULL)
@@ -2761,11 +2761,11 @@ check_servers (char *server)
}
static gboolean
-emae_check_complete(EConfig *ec, const char *pageid, void *data)
+emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
{
EMAccountEditor *emae = data;
- int ok = TRUE;
- const char *tmp;
+ gint ok = TRUE;
+ const gchar *tmp;
EAccount *ea;
gboolean refresh = FALSE;
@@ -2775,7 +2775,7 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
&& ((EConfig *)emae->priv->config)->type == E_CONFIG_DRUID) {
if (!strcmp(pageid, "00.identity")) {
if (!emae->priv->identity_set) {
- char *uname;
+ gchar *uname;
emae->priv->identity_set = 1;
#ifndef G_OS_WIN32
@@ -2790,13 +2790,13 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
} else if (!strcmp(pageid, "10.receive")) {
if (!emae->priv->receive_set) {
- char *user, *at;
- int index;
- char *uri = (char *)e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL);
+ gchar *user, *at;
+ gint index;
+ gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL);
CamelURL *url;
emae->priv->receive_set = 1;
- tmp = (char *)e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
+ tmp = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
at = strchr(tmp, '@');
user = g_alloca(at-tmp+1);
memcpy(user, tmp, at-tmp);
@@ -2826,9 +2826,9 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
} else if (!strcmp(pageid, "30.send")) {
CamelURL *url;
- char *at, *user;
- int index;
- char *uri = (char *)e_account_get_string(emae->account, E_ACCOUNT_TRANSPORT_URL);
+ gchar *at, *user;
+ gint index;
+ gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_TRANSPORT_URL);
tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
at = strchr(tmp, '@');
@@ -2860,8 +2860,8 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
} else if (!strcmp(pageid, "40.management")) {
if (!emae->priv->management_set) {
- char *template;
- unsigned int i = 0, len;
+ gchar *template;
+ guint i = 0, len;
emae->priv->management_set = 1;
tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
@@ -2932,14 +2932,14 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
void
-em_account_editor_check (EMAccountEditor *emae, const char *page)
+em_account_editor_check (EMAccountEditor *emae, const gchar *page)
{
emae_check_complete((EConfig *)emae->config, page, emae);
}
/* HACK: FIXME: the component should listen to the account object directly */
static void
-add_new_store (char *uri, CamelStore *store, void *user_data)
+add_new_store (gchar *uri, CamelStore *store, gpointer user_data)
{
#if 0 /* KILL-BONOBO: Try to actually fix this? */
MailComponent *component = mail_component_peek ();
@@ -2953,7 +2953,7 @@ add_new_store (char *uri, CamelStore *store, void *user_data)
}
static void
-emae_commit(EConfig *ec, GSList *items, void *data)
+emae_commit(EConfig *ec, GSList *items, gpointer data)
{
EMAccountEditor *emae = data;
EAccountList *accounts = e_get_account_list ();
@@ -3002,7 +3002,7 @@ static void
em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account_editor_t type, const gchar *id)
{
EMAccountEditorPrivate *gui = emae->priv;
- int i, index;
+ gint i, index;
GSList *l;
GList *prov;
EMConfig *ec;
@@ -3013,7 +3013,7 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account
emae->type = type;
emae->original = account;
if (emae->original) {
- char *xml;
+ gchar *xml;
g_object_ref(emae->original);
xml = e_account_to_xml(emae->original);
@@ -3079,8 +3079,8 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account
for (i=0;entries && entries[i].type != CAMEL_PROVIDER_CONF_END;i++) {
struct _receive_options_item *item;
- char *name = entries[i].name;
- int myindex = index;
+ gchar *name = entries[i].name;
+ gint myindex = index;
if (entries[i].type != CAMEL_PROVIDER_CONF_SECTION_START
|| name == NULL
diff --git a/mail/em-account-editor.h b/mail/em-account-editor.h
index e17236e865..4567f36cbe 100644
--- a/mail/em-account-editor.h
+++ b/mail/em-account-editor.h
@@ -66,10 +66,10 @@ struct _EMAccountEditorClass {
GType em_account_editor_get_type(void);
-EMAccountEditor *em_account_editor_new(struct _EAccount *account, em_account_editor_t type, const char *id);
-EMAccountEditor *em_account_editor_new_for_pages(struct _EAccount *account, em_account_editor_t type, char *id, struct _GtkWidget **pages);
+EMAccountEditor *em_account_editor_new(struct _EAccount *account, em_account_editor_t type, const gchar *id);
+EMAccountEditor *em_account_editor_new_for_pages(struct _EAccount *account, em_account_editor_t type, gchar *id, struct _GtkWidget **pages);
void em_account_editor_commit (EMAccountEditor *emae);
-void em_account_editor_check (EMAccountEditor *emae, const char *page);
+void em_account_editor_check (EMAccountEditor *emae, const gchar *page);
gboolean em_account_editor_save (EMAccountEditor *gui);
void em_account_editor_destroy (EMAccountEditor *gui);
@@ -79,7 +79,7 @@ gboolean em_account_editor_source_complete (EMAccountEditor *gui, struct _GtkWid
gboolean em_account_editor_transport_complete (EMAccountEditor *gui, struct _GtkWidget **incomplete);
gboolean em_account_editor_management_complete (EMAccountEditor *gui, struct _GtkWidget **incomplete);
-void em_account_editor_build_extra_conf (EMAccountEditor *gui, const char *url);
+void em_account_editor_build_extra_conf (EMAccountEditor *gui, const gchar *url);
void em_account_editor_auto_detect_extra_conf (EMAccountEditor *gui);
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c
index 68c1392410..d87bb37ffb 100644
--- a/mail/em-composer-prefs.c
+++ b/mail/em-composer-prefs.c
@@ -421,7 +421,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
EMConfig *ec;
EMConfigTargetPrefs *target;
GSList *l;
- int i;
+ gint i;
gchar *gladefile;
bridge = gconf_bridge_get ();
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index fdff69861b..c433558295 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -80,14 +80,14 @@ static void em_utils_composer_send_cb (EMsgComposer *composer);
static void em_utils_composer_save_draft_cb (EMsgComposer *composer);
struct emcs_t {
- unsigned int ref_count;
+ guint ref_count;
CamelFolder *drafts_folder;
- char *drafts_uid;
+ gchar *drafts_uid;
CamelFolder *folder;
guint32 flags, set;
- char *uid;
+ gchar *uid;
};
static struct emcs_t *
@@ -178,12 +178,12 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip
{
gboolean res;
GString *str;
- int i;
+ gint i;
str = g_string_new("");
for (i = 0; recipients[i] != NULL; ++i) {
if (!e_destination_get_html_mail_pref (recipients[i])) {
- const char *name;
+ const gchar *name;
name = e_destination_get_textrep (recipients[i], FALSE);
@@ -230,7 +230,7 @@ struct _send_data {
static void
composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info,
- int queued, const char *appended_uid, void *data)
+ gint queued, const gchar *appended_uid, gpointer data)
{
struct emcs_t *emcs;
struct _send_data *send = data;
@@ -286,12 +286,12 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
EDestination **recipients, **recipients_bcc;
gboolean html_mode, send_html, confirm_html;
CamelInternetAddress *cia;
- int hidden = 0, shown = 0;
- int num = 0, num_bcc = 0, num_post = 0;
- const char *subject;
+ gint hidden = 0, shown = 0;
+ gint num = 0, num_bcc = 0, num_post = 0;
+ const gchar *subject;
GConfClient *gconf;
EAccount *account;
- int i;
+ gint i;
GList *postlist;
EMEvent *eme;
EMEventTargetComposer *target;
@@ -312,7 +312,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
/* see which ones are visible/present, etc */
if (recipients) {
for (i = 0; recipients[i] != NULL; i++) {
- const char *addr = e_destination_get_address (recipients[i]);
+ const gchar *addr = e_destination_get_address (recipients[i]);
if (addr && addr[0]) {
camel_address_decode ((CamelAddress *) cia, addr);
@@ -333,7 +333,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
recipients_bcc = e_composer_header_table_get_destinations_bcc (table);
if (recipients_bcc) {
for (i = 0; recipients_bcc[i] != NULL; i++) {
- const char *addr = e_destination_get_address (recipients_bcc[i]);
+ const gchar *addr = e_destination_get_address (recipients_bcc[i]);
if (addr && addr[0]) {
camel_address_decode ((CamelAddress *) cia, addr);
@@ -429,9 +429,9 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Transport", account->transport->url);
camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", account->sent_folder_uri);
if (account->id->organization && *account->id->organization) {
- char *org;
+ gchar *org;
- org = camel_header_encode_string ((const unsigned char *)account->id->organization);
+ org = camel_header_encode_string ((const guchar *)account->id->organization);
camel_medium_set_header (CAMEL_MEDIUM (message), "Organization", org);
g_free (org);
}
@@ -517,8 +517,8 @@ composer_set_no_change (EMsgComposer *composer, gboolean drop_undo, gboolean edi
}
static void
-save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
- const char *appended_uid, void *user_data)
+save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok,
+ const gchar *appended_uid, gpointer user_data)
{
struct _save_draft_info *sdi = user_data;
struct emcs_t *emcs;
@@ -572,7 +572,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
}
static void
-save_draft_folder (char *uri, CamelFolder *folder, gpointer data)
+save_draft_folder (gchar *uri, CamelFolder *folder, gpointer data)
{
CamelFolder **save = data;
@@ -617,7 +617,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer)
if (account && account->drafts_folder_uri &&
strcmp (account->drafts_folder_uri, local_drafts_folder_uri) != 0) {
- int id;
+ gint id;
id = mail_get_folder (account->drafts_folder_uri, 0, save_draft_folder, &folder, mail_msg_unordered_push);
mail_msg_wait (id);
@@ -665,7 +665,7 @@ em_utils_composer_print_cb (EMsgComposer *composer,
/* Composing messages... */
static EMsgComposer *
-create_new_composer (const char *subject, const char *fromuri, gboolean lite)
+create_new_composer (const gchar *subject, const gchar *fromuri, gboolean lite)
{
EMsgComposer *composer;
EComposerHeaderTable *table;
@@ -700,7 +700,7 @@ create_new_composer (const char *subject, const char *fromuri, gboolean lite)
* window.
**/
void
-em_utils_compose_new_message (const char *fromuri)
+em_utils_compose_new_message (const gchar *fromuri)
{
GtkWidget *composer;
@@ -720,7 +720,7 @@ em_utils_compose_new_message (const char *fromuri)
* window.
**/
struct _EMsgComposer *
-em_utils_compose_lite_new_message (const char *fromuri)
+em_utils_compose_lite_new_message (const gchar *fromuri)
{
GtkWidget *composer;
@@ -742,7 +742,7 @@ em_utils_compose_lite_new_message (const char *fromuri)
* according to the values in the mailto url.
**/
void
-em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri)
+em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri)
{
EMsgComposer *composer;
EComposerHeaderTable *table;
@@ -768,7 +768,7 @@ em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri)
/* Editing messages... */
static void
-edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
+edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
{
EMsgComposer *composer;
@@ -783,11 +783,11 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
CamelMultipart *body = camel_multipart_new ();
CamelStream *stream;
CamelMimePart *part;
- int count1 = 0, string_changed = 0;
- const char *cur;
- int i;
+ gint count1 = 0, string_changed = 0;
+ const gchar *cur;
+ gint i;
- char *str;
+ gchar *str;
gint count = 2;
content = camel_medium_get_content_object ((CamelMedium *) message);
@@ -814,17 +814,17 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
mem = camel_stream_mem_new ();
camel_data_wrapper_decode_to_stream (content, mem);
- str = g_strndup ((const gchar*)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
+ str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
camel_object_unref (mem);
cur = str;
for (i = 0; i < strlen(str); i++) {
if (!g_ascii_strncasecmp (cur, "$", 1)) {
- const char *end = cur, *check_env;
- char *out;
+ const gchar *end = cur, *check_env;
+ gchar *out;
GConfClient *gconf;
GSList *clue_list = NULL, *list;
- char **temp_str;
+ gchar **temp_str;
gconf = gconf_client_get_default ();
@@ -842,7 +842,7 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
g_object_unref (gconf);
for (list = clue_list; list; list = g_slist_next (list)) {
- char **temp = g_strsplit (list->data, "=", 2);
+ gchar **temp = g_strsplit (list->data, "=", 2);
if (!g_ascii_strcasecmp(temp[0], out+1)) {
str = g_strdup_printf("%s%s%s", temp_str[0], temp[1], temp_str[1]);
cur = str + i;
@@ -939,10 +939,10 @@ em_utils_edit_message (CamelMimeMessage *message, CamelFolder *folder)
}
static void
-edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user_data)
+edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer user_data)
{
gboolean replace = GPOINTER_TO_INT (user_data);
- int i;
+ gint i;
if (msgs == NULL)
return;
@@ -979,7 +979,7 @@ struct forward_attached_data
{
CamelFolder *folder;
GPtrArray *uids;
- char *fromuri;
+ gchar *fromuri;
};
static void
@@ -1031,7 +1031,7 @@ setup_forward_attached_callbacks (EMsgComposer *composer, CamelFolder *folder, G
}
static void
-forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, CamelMimePart *part, char *subject, const char *fromuri)
+forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, CamelMimePart *part, gchar *subject, const gchar *fromuri)
{
EMsgComposer *composer;
@@ -1051,7 +1051,7 @@ forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, Cam
}
static void
-forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *user_data)
+forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer user_data)
{
struct forward_attached_data *fad = (struct forward_attached_data *) user_data;
@@ -1075,7 +1075,7 @@ forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *pa
* forwarded as a simple message/rfc822 attachment.
**/
void
-em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
struct forward_attached_data *fad;
@@ -1090,12 +1090,12 @@ em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const char *fro
}
static void
-forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, int style, const char *fromuri)
+forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gint style, const gchar *fromuri)
{
CamelMimeMessage *message;
EMsgComposer *composer;
- char *subject, *text;
- int i;
+ gchar *subject, *text;
+ gint i;
guint32 flags;
if (messages->len == 0)
@@ -1141,9 +1141,9 @@ forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
}
static void
-forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data)
+forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer user_data)
{
- forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_INLINE, (char *)user_data);
+ forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_INLINE, (gchar *)user_data);
g_free(user_data);
}
@@ -1156,7 +1156,7 @@ forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void
* Forwards each message in the 'inline' form, each in its own composer window.
**/
void
-em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
@@ -1165,9 +1165,9 @@ em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const char *fromu
}
static void
-forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data)
+forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer user_data)
{
- forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_QUOTED, (char *)user_data);
+ forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_QUOTED, (gchar *)user_data);
g_free(user_data);
}
@@ -1181,7 +1181,7 @@ forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void
* a "> "), each in its own composer window.
**/
void
-em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
@@ -1198,13 +1198,13 @@ em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const char *fromu
* Forwards a message in the user's configured default style.
**/
void
-em_utils_forward_message (CamelMimeMessage *message, const char *fromuri)
+em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri)
{
GPtrArray *messages;
CamelMimePart *part;
GConfClient *gconf;
- char *subject;
- int mode;
+ gchar *subject;
+ gint mode;
messages = g_ptr_array_new ();
g_ptr_array_add (messages, message);
@@ -1243,10 +1243,10 @@ em_utils_forward_message (CamelMimeMessage *message, const char *fromuri)
* style.
**/
void
-em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
GConfClient *gconf;
- int mode;
+ gint mode;
gconf = mail_config_get_gconf_client ();
mode = gconf_client_get_int (gconf, "/apps/evolution/mail/format/forward_style", NULL);
@@ -1308,7 +1308,7 @@ em_utils_redirect_message (CamelMimeMessage *message)
}
static void
-redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
+redirect_msg (CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data)
{
if (message == NULL)
return;
@@ -1325,7 +1325,7 @@ redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, v
* be editable). Adds Resent-From/Resent-To/etc headers.
**/
void
-em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid)
+em_utils_redirect_message_by_uid (CamelFolder *folder, const gchar *uid)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uid != NULL);
@@ -1334,7 +1334,7 @@ em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid)
}
static void
-emu_handle_receipt_message(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *ex)
+emu_handle_receipt_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *ex)
{
if (msg)
em_utils_handle_receipt(folder, uid, msg);
@@ -1345,10 +1345,10 @@ emu_handle_receipt_message(CamelFolder *folder, const char *uid, CamelMimeMessag
/* Message disposition notifications, rfc 2298 */
void
-em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage *msg)
+em_utils_handle_receipt (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg)
{
EAccount *account;
- const char *addr;
+ const gchar *addr;
CamelMessageInfo *info;
info = camel_folder_get_message_info(folder, uid);
@@ -1391,7 +1391,7 @@ em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage
static void
em_utils_receipt_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info,
- int queued, const char *appended_uid, void *data)
+ gint queued, const gchar *appended_uid, gpointer data)
{
camel_message_info_free (info);
mail_send ();
@@ -1412,14 +1412,14 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
CamelStream *stream;
CamelFolder *out_folder;
CamelMessageInfo *info;
- const char *message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-ID");
- const char *message_date = camel_medium_get_header (CAMEL_MEDIUM (message), "Date");
- const char *message_subject = camel_mime_message_get_subject (message);
- const char *receipt_address = camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To");
- char *fake_msgid;
- char *hostname;
- char *self_address, *receipt_subject;
- char *ua, *recipient;
+ const gchar *message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-ID");
+ const gchar *message_date = camel_medium_get_header (CAMEL_MEDIUM (message), "Date");
+ const gchar *message_subject = camel_mime_message_get_subject (message);
+ const gchar *receipt_address = camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To");
+ gchar *fake_msgid;
+ gchar *hostname;
+ gchar *self_address, *receipt_subject;
+ gchar *ua, *recipient;
if (!receipt_address)
return;
@@ -1534,7 +1534,7 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
static void
emu_forward_raw_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info,
- int queued, const char *appended_uid, void *data)
+ gint queued, const gchar *appended_uid, gpointer data)
{
camel_message_info_free (info);
/* do not call mail send, just pile them all in the outbox */
@@ -1550,7 +1550,7 @@ emu_forward_raw_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageIn
* Forwards message to the address, in very similar way as redirect does.
**/
void
-em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex)
+em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex)
{
EAccount *account;
CamelMimeMessage *forward;
@@ -1559,7 +1559,7 @@ em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, co
CamelFolder *out_folder;
CamelMessageInfo *info;
struct _camel_header_raw *xev;
- char *subject;
+ gchar *subject;
g_return_if_fail (folder != NULL);
g_return_if_fail (message != NULL);
@@ -1664,7 +1664,7 @@ generate_account_hash (void)
}
if (!acnt)
- g_hash_table_insert (account_hash, (char *) account->id->address, (void *) account);
+ g_hash_table_insert (account_hash, (gchar *) account->id->address, (gpointer) account);
}
e_iterator_next (iter);
@@ -1674,7 +1674,7 @@ generate_account_hash (void)
/* The default account has to be there if none of the enabled accounts are present */
if (g_hash_table_size (account_hash) == 0 && def && def->id->address)
- g_hash_table_insert (account_hash, (char *) def->id->address, (void *) def);
+ g_hash_table_insert (account_hash, (gchar *) def->id->address, (gpointer) def);
return account_hash;
}
@@ -1683,7 +1683,7 @@ EDestination **
em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
{
EDestination *dest, **destv;
- int n, i, j;
+ gint n, i, j;
if (iaddr == NULL)
return NULL;
@@ -1693,7 +1693,7 @@ em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
destv = g_malloc (sizeof (EDestination *) * (n + 1));
for (i = 0, j = 0; i < n; i++) {
- const char *name, *addr;
+ const gchar *name, *addr;
if (camel_internet_address_get (iaddr, i, &name, &addr)) {
dest = e_destination_new ();
@@ -1719,11 +1719,11 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
CamelInternetAddress *to, CamelInternetAddress *cc,
CamelFolder *folder, CamelNNTPAddress *postto)
{
- const char *message_id, *references;
+ const gchar *message_id, *references;
EDestination **tov, **ccv;
EMsgComposer *composer;
EComposerHeaderTable *table;
- char *subject;
+ gchar *subject;
g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
g_return_val_if_fail (to == NULL || CAMEL_IS_INTERNET_ADDRESS (to), NULL);
@@ -1736,7 +1736,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
ccv = em_utils_camel_address_to_destination (cc);
/* Set the subject of the new message. */
- if ((subject = (char *) camel_mime_message_get_subject (message))) {
+ if ((subject = (gchar *) camel_mime_message_get_subject (message))) {
if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0)
subject = g_strdup_printf ("Re: %s", subject);
else
@@ -1758,8 +1758,8 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
/* add post-to, if nessecary */
if (postto && camel_address_length((CamelAddress *)postto)) {
- char *store_url = NULL;
- char *post;
+ gchar *store_url = NULL;
+ gchar *post;
if (folder) {
store_url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
@@ -1778,7 +1778,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id");
references = camel_medium_get_header (CAMEL_MEDIUM (message), "References");
if (message_id) {
- char *reply_refs;
+ gchar *reply_refs;
e_msg_composer_add_header (composer, "In-Reply-To", message_id);
@@ -1800,7 +1800,7 @@ static EAccount *
guess_account_folder(CamelFolder *folder)
{
EAccount *account;
- char *tmp;
+ gchar *tmp;
tmp = camel_url_to_string(CAMEL_SERVICE(folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
account = mail_config_get_account_by_source_url(tmp);
@@ -1814,8 +1814,8 @@ guess_account (CamelMimeMessage *message, CamelFolder *folder)
{
GHashTable *account_hash = NULL;
EAccount *account = NULL;
- const char *tmp;
- int i, j;
+ const gchar *tmp;
+ gint i, j;
const gchar *types[2] = {
CAMEL_RECIPIENT_TYPE_TO,
CAMEL_RECIPIENT_TYPE_CC
@@ -1865,8 +1865,8 @@ static void
get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTPAddress *postto)
{
const CamelInternetAddress *reply_to;
- const char *name, *addr, *posthdr;
- int i;
+ const gchar *name, *addr, *posthdr;
+ gint i;
/* check whether there is a 'Newsgroups: ' header in there */
if (postto
@@ -1895,8 +1895,8 @@ em_utils_get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to,
static gboolean
get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to)
{
- const char *header, *p;
- char *addr;
+ const gchar *header, *p;
+ gchar *addr;
/* Examples:
*
@@ -1935,13 +1935,13 @@ get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to)
static void
concat_unique_addrs (CamelInternetAddress *dest, const CamelInternetAddress *src, GHashTable *rcpt_hash)
{
- const char *name, *addr;
- int i;
+ const gchar *name, *addr;
+ gint i;
for (i = 0; camel_internet_address_get (src, i, &name, &addr); i++) {
if (!g_hash_table_lookup (rcpt_hash, addr)) {
camel_internet_address_add (dest, name, addr);
- g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
+ g_hash_table_insert (rcpt_hash, (gchar *) addr, GINT_TO_POINTER (1));
}
}
}
@@ -1950,9 +1950,9 @@ static void
get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInternetAddress *cc, CamelNNTPAddress *postto)
{
const CamelInternetAddress *reply_to, *to_addrs, *cc_addrs;
- const char *name, *addr, *posthdr;
+ const gchar *name, *addr, *posthdr;
GHashTable *rcpt_hash;
- int i;
+ gint i;
/* check whether there is a 'Newsgroups: ' header in there */
if (postto) {
@@ -1980,7 +1980,7 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
is kinda silly. */
camel_internet_address_add (to, name, addr);
- g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
+ g_hash_table_insert (rcpt_hash, (gchar *) addr, GINT_TO_POINTER (1));
}
}
}
@@ -2029,13 +2029,13 @@ enum {
ATTRIB_TM_YDAY
};
-typedef void (* AttribFormatter) (GString *str, const char *attr, CamelMimeMessage *message);
+typedef void (* AttribFormatter) (GString *str, const gchar *attr, CamelMimeMessage *message);
static void
-format_sender (GString *str, const char *attr, CamelMimeMessage *message)
+format_sender (GString *str, const gchar *attr, CamelMimeMessage *message)
{
const CamelInternetAddress *sender;
- const char *name, *addr;
+ const gchar *name, *addr;
sender = camel_mime_message_get_from (message);
if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
@@ -2056,10 +2056,10 @@ format_sender (GString *str, const char *attr, CamelMimeMessage *message)
}
static struct {
- const char *name;
- int type;
+ const gchar *name;
+ gint type;
struct {
- const char *format; /* strftime or printf format */
+ const gchar *format; /* strftime or printf format */
AttribFormatter formatter; /* custom formatter */
} v;
} attribvars[] = {
@@ -2090,17 +2090,17 @@ static struct {
* variables, see em-composer-utils.c:1514 */
#define ATTRIBUTION _("On ${AbbrevWeekdayName}, ${Year}-${Month}-${Day} at ${24Hour}:${Minute} ${TimeZone}, ${Sender} wrote:")
-static char *
-attribution_format (const char *format, CamelMimeMessage *message)
+static gchar *
+attribution_format (const gchar *format, CamelMimeMessage *message)
{
- register const char *inptr;
- const char *start;
- int tzone, len, i;
- char buf[64], *s;
+ register const gchar *inptr;
+ const gchar *start;
+ gint tzone, len, i;
+ gchar buf[64], *s;
GString *str;
struct tm tm;
time_t date;
- int type;
+ gint type;
str = g_string_new ("");
@@ -2211,7 +2211,7 @@ attribution_format (const char *format, CamelMimeMessage *message)
static void
composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *source)
{
- char *text, *credits;
+ gchar *text, *credits;
CamelMimePart *part;
GConfClient *gconf;
ssize_t len = 0;
@@ -2266,13 +2266,13 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *
struct _reply_data {
EMFormat *source;
- int mode;
+ gint mode;
};
-char *
+gchar *
em_utils_construct_composer_text (CamelMimeMessage *message, EMFormat *source)
{
- char *text, *credits;
+ gchar *text, *credits;
ssize_t len = 0;
gboolean start_bottom = 0;
@@ -2285,7 +2285,7 @@ em_utils_construct_composer_text (CamelMimeMessage *message, EMFormat *source)
static void
-reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
+reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data)
{
struct _reply_data *rd = user_data;
@@ -2315,7 +2315,7 @@ reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message
* been replied to.
**/
struct _EMsgComposer *
-em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message, int mode, EMFormat *source)
+em_utils_reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gint mode, EMFormat *source)
{
CamelInternetAddress *to, *cc;
CamelNNTPAddress *postto = NULL;
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 8ee05a50b5..176bdb4fc0 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -41,28 +41,28 @@ struct _EMFormat;
struct _EAccount;
struct _EDestination;
-void em_utils_compose_new_message (const char *fromuri);
-struct _EMsgComposer * em_utils_compose_lite_new_message (const char *fromuri);
+void em_utils_compose_new_message (const gchar *fromuri);
+struct _EMsgComposer * em_utils_compose_lite_new_message (const gchar *fromuri);
/* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */
-void em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri);
+void em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri);
void em_utils_edit_message (struct _CamelMimeMessage *message, struct _CamelFolder *folder);
void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids, gboolean replace);
-void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
-void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
-void em_utils_forward_quoted (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
+void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
+void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
+void em_utils_forward_quoted (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
-void em_utils_forward_message (struct _CamelMimeMessage *msg, const char *fromuri);
-void em_utils_forward_messages (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
+void em_utils_forward_message (struct _CamelMimeMessage *msg, const gchar *fromuri);
+void em_utils_forward_messages (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
void em_utils_redirect_message (struct _CamelMimeMessage *message);
-void em_utils_redirect_message_by_uid (struct _CamelFolder *folder, const char *uid);
+void em_utils_redirect_message_by_uid (struct _CamelFolder *folder, const gchar *uid);
-void em_utils_forward_message_raw (struct _CamelFolder *folder, struct _CamelMimeMessage *message, const char *address, struct _CamelException *ex);
+void em_utils_forward_message_raw (struct _CamelFolder *folder, struct _CamelMimeMessage *message, const gchar *address, struct _CamelException *ex);
-void em_utils_handle_receipt (struct _CamelFolder *folder, const char *uid, struct _CamelMimeMessage *msg);
+void em_utils_handle_receipt (struct _CamelFolder *folder, const gchar *uid, struct _CamelMimeMessage *msg);
void em_utils_send_receipt (struct _CamelFolder *folder, struct _CamelMimeMessage *message);
enum {
@@ -71,10 +71,10 @@ enum {
REPLY_MODE_LIST
};
-char *em_utils_construct_composer_text (struct _CamelMimeMessage *message, struct _EMFormat *source);
+gchar *em_utils_construct_composer_text (struct _CamelMimeMessage *message, struct _EMFormat *source);
void em_utils_get_reply_sender (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelNNTPAddress *postto);
void em_utils_get_reply_all (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelInternetAddress *cc, struct _CamelNNTPAddress *postto);
-struct _EMsgComposer * em_utils_reply_to_message (struct _CamelFolder *, const char *uid, struct _CamelMimeMessage *message, int mode, struct _EMFormat *source);
+struct _EMsgComposer * em_utils_reply_to_message (struct _CamelFolder *, const gchar *uid, struct _CamelMimeMessage *message, gint mode, struct _EMFormat *source);
struct _EDestination ** em_utils_camel_address_to_destination (struct _CamelInternetAddress *iaddr);
void em_configure_new_composer (struct _EMsgComposer *composer);
diff --git a/mail/em-config.c b/mail/em-config.c
index 160cec851e..985a02d56c 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -124,7 +124,7 @@ emp_target_free(EConfig *ep, EConfigTarget *t)
}
static void
-emp_account_changed(struct _EAccount *ea, int id, EMConfig *emc)
+emp_account_changed(struct _EAccount *ea, gint id, EMConfig *emc)
{
e_config_target_changed((EConfig *)emc, E_CONFIG_TARGET_CHANGED_STATE);
}
@@ -180,7 +180,7 @@ em_config_get_type(void)
return type;
}
-EMConfig *em_config_new(int type, const char *menuid)
+EMConfig *em_config_new(gint type, const gchar *menuid)
{
EMConfig *emp = g_object_new(em_config_get_type(), NULL);
@@ -190,7 +190,7 @@ EMConfig *em_config_new(int type, const char *menuid)
}
EMConfigTargetFolder *
-em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const char *uri)
+em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const gchar *uri)
{
EMConfigTargetFolder *t = e_config_target_new(&emp->config, EM_CONFIG_TARGET_FOLDER, sizeof(*t));
@@ -253,7 +253,7 @@ em_config_target_new_account(EMConfig *emp, struct _EAccount *account)
*/
-static void *emph_parent_class;
+static gpointer emph_parent_class;
#define emph ((EMConfigHook *)eph)
static const EConfigHookTargetMask emph_no_masks[] = {
@@ -278,7 +278,7 @@ emph_finalise(GObject *o)
static void
emph_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emph_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.config:1.0";
diff --git a/mail/em-config.h b/mail/em-config.h
index 5f895305b0..4ebfa05ad1 100644
--- a/mail/em-config.h
+++ b/mail/em-config.h
@@ -53,7 +53,7 @@ struct _EMConfigTargetFolder {
EConfigTarget target;
struct _CamelFolder *folder;
- char *uri;
+ gchar *uri;
};
struct _EMConfigTargetPrefs {
@@ -86,9 +86,9 @@ struct _EMConfigClass {
GType em_config_get_type(void);
-EMConfig *em_config_new(int type, const char *menuid);
+EMConfig *em_config_new(gint type, const gchar *menuid);
-EMConfigTargetFolder *em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const char *uri);
+EMConfigTargetFolder *em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const gchar *uri);
EMConfigTargetPrefs *em_config_target_new_prefs(EMConfig *emp, struct _GConfClient *gconf);
EMConfigTargetAccount *em_config_target_new_account(EMConfig *emp, struct _EAccount *account);
diff --git a/mail/em-event.c b/mail/em-event.c
index b415d5f8a0..852e319e1b 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -135,7 +135,7 @@ EMEvent *em_event_peek(void)
}
EMEventTargetFolder *
-em_event_target_new_folder (EMEvent *eme, const char *uri, unsigned int new)
+em_event_target_new_folder (EMEvent *eme, const gchar *uri, guint new)
{
EMEventTargetFolder *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_FOLDER, sizeof(*t));
guint32 flags = new ? EM_EVENT_FOLDER_NEWMAIL : 0;
@@ -169,7 +169,7 @@ em_event_target_new_composer (EMEvent *eme, const EMsgComposer *composer, guint3
}
EMEventTargetMessage *
-em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const char *uid, guint32 flags)
+em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags)
{
EMEventTargetMessage *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_MESSAGE, sizeof(*t));
@@ -186,7 +186,7 @@ em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage
}
EMEventTargetSendReceive *
-em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, int row, guint32 flags)
+em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags)
{
EMEventTargetSendReceive *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_SEND_RECEIVE, sizeof(*t));
@@ -199,7 +199,7 @@ em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data,
}
EMEventTargetCustomIcon *
-em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const char *folder_name, guint32 flags)
+em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *folder_name, guint32 flags)
{
EMEventTargetCustomIcon *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_CUSTOM_ICON, sizeof(*t));
@@ -212,7 +212,7 @@ em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const c
/* ********************************************************************** */
-static void *emeh_parent_class;
+static gpointer emeh_parent_class;
#define emeh ((EMEventHook *)eph)
static const EEventHookTargetMask emeh_folder_masks[] = {
@@ -266,7 +266,7 @@ emeh_finalise(GObject *o)
static void
emeh_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emeh_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.events:1.0";
diff --git a/mail/em-event.h b/mail/em-event.h
index 7c2c4c639d..81173fe690 100644
--- a/mail/em-event.h
+++ b/mail/em-event.h
@@ -86,10 +86,10 @@ typedef struct _EMEventTargetFolder EMEventTargetFolder;
struct _EMEventTargetFolder {
EEventTarget target;
- char *uri;
+ gchar *uri;
guint new;
gboolean is_inbox;
- char *name;
+ gchar *name;
};
typedef struct _EMEventTargetMessage EMEventTargetMessage;
@@ -97,7 +97,7 @@ typedef struct _EMEventTargetMessage EMEventTargetMessage;
struct _EMEventTargetMessage {
EEventTarget target;
struct _CamelFolder *folder;
- char *uid;
+ gchar *uid;
struct _CamelMimeMessage *message;
};
@@ -125,7 +125,7 @@ struct _EMEventTargetSendReceive {
struct _GtkWidget *table;
gpointer data;
- int row;
+ gint row;
};
typedef struct _EMEventTargetCustomIcon EMEventTargetCustomIcon;
@@ -134,7 +134,7 @@ struct _EMEventTargetCustomIcon {
EEventTarget target;
GtkCellRenderer *renderer;
- const char *folder_name;
+ const gchar *folder_name;
};
typedef struct _EEventItem EMEventItem;
@@ -154,12 +154,12 @@ GType em_event_get_type(void);
EMEvent *em_event_peek(void);
-EMEventTargetFolder *em_event_target_new_folder(EMEvent *emp, const char *uri, guint32 flags);
+EMEventTargetFolder *em_event_target_new_folder(EMEvent *emp, const gchar *uri, guint32 flags);
EMEventTargetFolderBrowser *em_event_target_new_folder_browser (EMEvent *eme, EMFolderBrowser *emfb);
EMEventTargetComposer *em_event_target_new_composer(EMEvent *emp, const struct _EMsgComposer *composer, guint32 flags);
-EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, struct _CamelFolder *folder, struct _CamelMimeMessage *message, const char *uid, guint32 flags);
-EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, struct _GtkWidget *table, gpointer data, int row, guint32 flags);
-EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const char *uri, guint32 flags);
+EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, struct _CamelFolder *folder, struct _CamelMimeMessage *message, const gchar *uid, guint32 flags);
+EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, struct _GtkWidget *table, gpointer data, gint row, guint32 flags);
+EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *uri, guint32 flags);
/* ********************************************************************** */
diff --git a/mail/em-filter-context.c b/mail/em-filter-context.c
index a2a699a36f..5a82c6ea9d 100644
--- a/mail/em-filter-context.c
+++ b/mail/em-filter-context.c
@@ -42,9 +42,9 @@ static void em_filter_context_class_init(EMFilterContextClass *klass);
static void em_filter_context_init(EMFilterContext *fc);
static void em_filter_context_finalise(GObject *obj);
-static GList *filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp);
-static GList *filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp);
-static FilterElement *filter_new_element(RuleContext *rc, const char *name);
+static GList *filter_rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp);
+static GList *filter_delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp);
+static FilterElement *filter_new_element(RuleContext *rc, const gchar *name);
static RuleContextClass *parent_class = NULL;
@@ -133,14 +133,14 @@ em_filter_context_add_action(EMFilterContext *fc, FilterPart *action)
}
FilterPart *
-em_filter_context_find_action(EMFilterContext *fc, const char *name)
+em_filter_context_find_action(EMFilterContext *fc, const gchar *name)
{
d(printf("find action : "));
return filter_part_find_list(fc->actions, name);
}
FilterPart *
-em_filter_context_create_action(EMFilterContext *fc, const char *name)
+em_filter_context_create_action(EMFilterContext *fc, const gchar *name)
{
FilterPart *part;
@@ -158,13 +158,13 @@ em_filter_context_next_action(EMFilterContext *fc, FilterPart *last)
/* We search for any folders in our actions list that need updating, update them */
static GList *
-filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp)
+filter_rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp)
{
FilterRule *rule;
GList *l, *el;
FilterPart *action;
FilterElement *element;
- int count = 0;
+ gint count = 0;
GList *changed = NULL;
d(printf("uri '%s' renamed to '%s'\n", olduri, newuri));
@@ -173,7 +173,7 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
while ((rule = rule_context_next_rule(rc, rule, NULL))) {
- int rulecount = 0;
+ gint rulecount = 0;
d(printf("checking rule '%s'\n", rule->name));
@@ -218,7 +218,7 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp
}
static GList *
-filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
+filter_delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp)
{
/* We basically do similar to above, but when we find it,
Remove the action, and if thats the last action, this might create an empty rule? remove the rule? */
@@ -227,7 +227,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
GList *l, *el;
FilterPart *action;
FilterElement *element;
- int count = 0;
+ gint count = 0;
GList *deleted = NULL;
d(printf("uri '%s' deleted\n", uri));
@@ -236,7 +236,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
while ((rule = rule_context_next_rule(rc, rule, NULL))) {
- int recorded = 0;
+ gint recorded = 0;
d(printf("checking rule '%s'\n", rule->name));
@@ -282,7 +282,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
}
static FilterElement *
-filter_new_element(RuleContext *rc, const char *type)
+filter_new_element(RuleContext *rc, const gchar *type)
{
if (!strcmp(type, "folder")) {
return (FilterElement *) em_filter_folder_element_new();
diff --git a/mail/em-filter-context.h b/mail/em-filter-context.h
index 56f11a3d81..31431b4a34 100644
--- a/mail/em-filter-context.h
+++ b/mail/em-filter-context.h
@@ -52,8 +52,8 @@ EMFilterContext *em_filter_context_new (void);
/* methods */
void em_filter_context_add_action (EMFilterContext *fc, FilterPart *action);
-FilterPart *em_filter_context_find_action (EMFilterContext *fc, const char *name);
-FilterPart *em_filter_context_create_action (EMFilterContext *fc, const char *name);
+FilterPart *em_filter_context_find_action (EMFilterContext *fc, const gchar *name);
+FilterPart *em_filter_context_create_action (EMFilterContext *fc, const gchar *name);
FilterPart *em_filter_context_next_action (EMFilterContext *fc, FilterPart *last);
#endif /* ! _EM_FILTER_CONTEXT_H */
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index 4f68cf47df..378192a8da 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -107,7 +107,7 @@ em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names)
{
EMFilterEditor *fe = (EMFilterEditor *) g_object_new (em_filter_editor_get_type(), NULL);
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"filter.glade",
@@ -133,8 +133,8 @@ free_sources (gpointer data)
static void
select_source (GtkComboBox *combobox, EMFilterEditor *fe)
{
- char *source;
- int idx;
+ gchar *source;
+ gint idx;
GSList *sources;
g_return_if_fail (GTK_IS_COMBO_BOX (combobox));
@@ -144,7 +144,7 @@ select_source (GtkComboBox *combobox, EMFilterEditor *fe)
g_return_if_fail (idx >= 0 && idx < g_slist_length (sources));
- source = (char *)g_slist_nth (sources, idx);
+ source = (gchar *)g_slist_nth (sources, idx);
g_return_if_fail (source);
rule_editor_set_source ((RuleEditor *)fe, source);
@@ -154,7 +154,7 @@ void
em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names)
{
GtkWidget *combobox;
- int i;
+ gint i;
GtkTreeViewColumn *column;
GSList *sources = NULL;
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index 7b49df8a15..1e1f1495f9 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -42,10 +42,10 @@
#define d(x)
static gboolean validate(FilterElement *fe);
-static int folder_eq(FilterElement *fe, FilterElement *cm);
+static gint folder_eq(FilterElement *fe, FilterElement *cm);
static void xml_create(FilterElement *fe, xmlNodePtr node);
static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
+static gint xml_decode(FilterElement *fe, xmlNodePtr node);
static GtkWidget *get_widget(FilterElement *fe);
static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
static void format_sexp(FilterElement *, GString *);
@@ -133,7 +133,7 @@ em_filter_folder_element_new(void)
}
void
-em_filter_folder_element_set_value(EMFilterFolderElement *ff, const char *uri)
+em_filter_folder_element_set_value(EMFilterFolderElement *ff, const gchar *uri)
{
g_free(ff->uri);
ff->uri = g_strdup(uri);
@@ -179,15 +179,15 @@ xml_encode(FilterElement *fe)
d(printf("Encoding folder as xml\n"));
- value = xmlNewNode(NULL, (unsigned const char *)"value");
- xmlSetProp(value, (unsigned const char *)"name", (unsigned char *)fe->name);
+ value = xmlNewNode(NULL, (const guchar *)"value");
+ xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name);
if (ff->store_camel_uri)
- xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder-curi");
+ xmlSetProp(value, (const guchar *)"type", (const guchar *)"folder-curi");
else
- xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder");
+ xmlSetProp(value, (const guchar *)"type", (const guchar *)"folder");
- work = xmlNewChild(value, NULL, (unsigned const char *)"folder", NULL);
- xmlSetProp(work, (unsigned const char *)"uri", (unsigned const char *)ff->uri);
+ work = xmlNewChild(value, NULL, (const guchar *)"folder", NULL);
+ xmlSetProp(work, (const guchar *)"uri", (const guchar *)ff->uri);
return value;
}
@@ -202,11 +202,11 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
d(printf("Decoding folder from xml %p\n", fe));
xmlFree(fe->name);
- fe->name = (char *)xmlGetProp(node, (unsigned const char *)"name");
+ fe->name = (gchar *)xmlGetProp(node, (const guchar *)"name");
- type = xmlGetProp (node, (unsigned const char *)"type");
+ type = xmlGetProp (node, (const guchar *)"type");
if (type) {
- ff->store_camel_uri = g_str_equal ((const char *)type, "folder-curi");
+ ff->store_camel_uri = g_str_equal ((const gchar *)type, "folder-curi");
xmlFree (type);
} else {
ff->store_camel_uri = FALSE;
@@ -214,10 +214,10 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
n = node->children;
while(n) {
- if (!strcmp((char *)n->name, "folder")) {
- char *uri;
+ if (!strcmp((gchar *)n->name, "folder")) {
+ gchar *uri;
- uri = (char *)xmlGetProp(n, (unsigned const char *)"uri");
+ uri = (gchar *)xmlGetProp(n, (const guchar *)"uri");
g_free(ff->uri);
ff->uri = g_strdup(uri);
xmlFree(uri);
@@ -232,7 +232,7 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
static void
folder_selected(EMFolderSelectionButton *button, EMFilterFolderElement *ff)
{
- const char *uri;
+ const gchar *uri;
uri = em_folder_selection_button_get_selection(button);
g_free(ff->uri);
@@ -251,7 +251,7 @@ get_widget(FilterElement *fe)
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
EMFolderTreeModel *model;
GtkWidget *button;
- char *uri;
+ gchar *uri;
if (ff->store_camel_uri)
uri = ff->uri;
diff --git a/mail/em-filter-folder-element.h b/mail/em-filter-folder-element.h
index 0d7d3b50b2..149d0226e7 100644
--- a/mail/em-filter-folder-element.h
+++ b/mail/em-filter-folder-element.h
@@ -39,7 +39,7 @@ typedef struct _EMFilterFolderElementClass EMFilterFolderElementClass;
struct _EMFilterFolderElement {
FilterElement parent_object;
- char *uri;
+ gchar *uri;
gboolean store_camel_uri; /* true if uri should contain camel uri, otherwise contains evolution's uri with an Account ID */
};
@@ -51,6 +51,6 @@ GType em_filter_folder_element_get_type (void);
EMFilterFolderElement *em_filter_folder_element_new (void);
/* methods */
-void em_filter_folder_element_set_value (EMFilterFolderElement *ff, const char *uri);
+void em_filter_folder_element_set_value (EMFilterFolderElement *ff, const gchar *uri);
#endif /* ! _EM_FILTER_FOLDER_ELEMENT_H */
diff --git a/mail/em-filter-i18n.h b/mail/em-filter-i18n.h
index c0b2925cc2..ba16ee3ebf 100644
--- a/mail/em-filter-i18n.h
+++ b/mail/em-filter-i18n.h
@@ -1,75 +1,75 @@
/* Automatically generated. Do not edit. */
-char *s = N_("Adjust Score");
-char *s = N_("Assign Color");
-char *s = N_("Assign Score");
-char *s = N_("Attachments");
-char *s = N_("BCC");
-char *s = N_("Beep");
-char *s = N_("CC");
-char *s = N_("Completed On");
-char *s = N_("contains");
-char *s = N_("Copy to Folder");
-char *s = N_("Date received");
-char *s = N_("Date sent");
-char *s = N_("Delete");
-char *s = N_("Deleted");
-char *s = N_("does not contain");
-char *s = N_("does not end with");
-char *s = N_("does not exist");
-char *s = N_("does not return");
-char *s = N_("does not sound like");
-char *s = N_("does not start with");
-char *s = N_("Do Not Exist");
-char *s = N_("Draft");
-char *s = N_("ends with");
-char *s = N_("Exist");
-char *s = N_("exists");
-char *s = N_("Expression");
-char *s = N_("Follow Up");
-char *s = N_("Forward to");
-char *s = N_("Important");
-char *s = N_("is");
-char *s = N_("is after");
-char *s = N_("is before");
-char *s = N_("is Flagged");
-char *s = N_("is greater than");
-char *s = N_("is less than");
-char *s = N_("is not");
-char *s = N_("is not Flagged");
-char *s = N_("is not set");
-char *s = N_("is set");
-char *s = N_("Junk");
-char *s = N_("Junk Test");
-char *s = N_("Label");
-char *s = N_("Mailing list");
-char *s = N_("Match All");
-char *s = N_("Message Body");
-char *s = N_("Message Header");
-char *s = N_("Message is Junk");
-char *s = N_("Message is not Junk");
-char *s = N_("Message Location");
-char *s = N_("Move to Folder");
-char *s = N_("Pipe to Program");
-char *s = N_("Play Sound");
-char *s = N_("Read");
-char *s = N_("Recipients");
-char *s = N_("Regex Match");
-char *s = N_("Replied to");
-char *s = N_("returns");
-char *s = N_("returns greater than");
-char *s = N_("returns less than");
-char *s = N_("Run Program");
-char *s = N_("Score");
-char *s = N_("Sender");
-char *s = N_("Sender or Recipients");
-char *s = N_("Set Label");
-char *s = N_("Set Status");
-char *s = N_("Size (kB)");
-char *s = N_("sounds like");
-char *s = N_("Source Account");
-char *s = N_("Specific header");
-char *s = N_("starts with");
-char *s = N_("Status");
-char *s = N_("Stop Processing");
-char *s = N_("Subject");
-char *s = N_("Unset Status");
+gchar *s = N_("Adjust Score");
+gchar *s = N_("Assign Color");
+gchar *s = N_("Assign Score");
+gchar *s = N_("Attachments");
+gchar *s = N_("BCC");
+gchar *s = N_("Beep");
+gchar *s = N_("CC");
+gchar *s = N_("Completed On");
+gchar *s = N_("contains");
+gchar *s = N_("Copy to Folder");
+gchar *s = N_("Date received");
+gchar *s = N_("Date sent");
+gchar *s = N_("Delete");
+gchar *s = N_("Deleted");
+gchar *s = N_("does not contain");
+gchar *s = N_("does not end with");
+gchar *s = N_("does not exist");
+gchar *s = N_("does not return");
+gchar *s = N_("does not sound like");
+gchar *s = N_("does not start with");
+gchar *s = N_("Do Not Exist");
+gchar *s = N_("Draft");
+gchar *s = N_("ends with");
+gchar *s = N_("Exist");
+gchar *s = N_("exists");
+gchar *s = N_("Expression");
+gchar *s = N_("Follow Up");
+gchar *s = N_("Forward to");
+gchar *s = N_("Important");
+gchar *s = N_("is");
+gchar *s = N_("is after");
+gchar *s = N_("is before");
+gchar *s = N_("is Flagged");
+gchar *s = N_("is greater than");
+gchar *s = N_("is less than");
+gchar *s = N_("is not");
+gchar *s = N_("is not Flagged");
+gchar *s = N_("is not set");
+gchar *s = N_("is set");
+gchar *s = N_("Junk");
+gchar *s = N_("Junk Test");
+gchar *s = N_("Label");
+gchar *s = N_("Mailing list");
+gchar *s = N_("Match All");
+gchar *s = N_("Message Body");
+gchar *s = N_("Message Header");
+gchar *s = N_("Message is Junk");
+gchar *s = N_("Message is not Junk");
+gchar *s = N_("Message Location");
+gchar *s = N_("Move to Folder");
+gchar *s = N_("Pipe to Program");
+gchar *s = N_("Play Sound");
+gchar *s = N_("Read");
+gchar *s = N_("Recipients");
+gchar *s = N_("Regex Match");
+gchar *s = N_("Replied to");
+gchar *s = N_("returns");
+gchar *s = N_("returns greater than");
+gchar *s = N_("returns less than");
+gchar *s = N_("Run Program");
+gchar *s = N_("Score");
+gchar *s = N_("Sender");
+gchar *s = N_("Sender or Recipients");
+gchar *s = N_("Set Label");
+gchar *s = N_("Set Status");
+gchar *s = N_("Size (kB)");
+gchar *s = N_("sounds like");
+gchar *s = N_("Source Account");
+gchar *s = N_("Specific header");
+gchar *s = N_("starts with");
+gchar *s = N_("Status");
+gchar *s = N_("Stop Processing");
+gchar *s = N_("Subject");
+gchar *s = N_("Unset Status");
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index 583f82977c..03d0028b6e 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -35,10 +35,10 @@
#define d(x)
-static int validate(FilterRule *fr);
-static int filter_eq(FilterRule *fr, FilterRule *cm);
+static gint validate(FilterRule *fr);
+static gint filter_eq(FilterRule *fr, FilterRule *cm);
static xmlNodePtr xml_encode(FilterRule *fr);
-static int xml_decode(FilterRule *fr, xmlNodePtr, RuleContext *rc);
+static gint xml_decode(FilterRule *fr, xmlNodePtr, RuleContext *rc);
static void rule_copy(FilterRule *dest, FilterRule *src);
/*static void build_code(FilterRule *, GString *out);*/
static GtkWidget *get_widget(FilterRule *fr, RuleContext *rc);
@@ -176,7 +176,7 @@ validate(FilterRule *fr)
{
EMFilterRule *ff =(EMFilterRule *)fr;
GList *parts;
- int valid;
+ gint valid;
valid = FILTER_RULE_CLASS(parent_class)->validate(fr);
@@ -193,7 +193,7 @@ validate(FilterRule *fr)
static int
list_eq(GList *al, GList *bl)
{
- int truth = TRUE;
+ gint truth = TRUE;
while (truth && al && bl) {
FilterPart *a = al->data, *b = bl->data;
@@ -222,7 +222,7 @@ xml_encode(FilterRule *fr)
node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
g_return_val_if_fail (node != NULL, NULL);
- set = xmlNewNode(NULL, (const unsigned char *)"actionset");
+ set = xmlNewNode(NULL, (const guchar *)"actionset");
xmlAddChild(node, set);
l = ff->actions;
while (l) {
@@ -239,13 +239,13 @@ static void
load_set(xmlNodePtr node, EMFilterRule *ff, RuleContext *rc)
{
xmlNodePtr work;
- char *rulename;
+ gchar *rulename;
FilterPart *part;
work = node->children;
while (work) {
- if (!strcmp((char *)work->name, "part")) {
- rulename = (char *)xmlGetProp(work, (const unsigned char *)"name");
+ if (!strcmp((gchar *)work->name, "part")) {
+ rulename = (gchar *)xmlGetProp(work, (const guchar *)"name");
part = em_filter_context_find_action((EMFilterContext *)rc, rulename);
if (part) {
part = filter_part_clone(part);
@@ -267,7 +267,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc)
{
EMFilterRule *ff =(EMFilterRule *)fr;
xmlNodePtr work;
- int result;
+ gint result;
result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, rc);
if (result != 0)
@@ -275,7 +275,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc)
work = node->children;
while (work) {
- if (!strcmp((char *)work->name, "actionset")) {
+ if (!strcmp((gchar *)work->name, "actionset")) {
load_set(work, ff, rc);
}
work = work->next;
@@ -328,7 +328,7 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data)
{
FilterPart *part = NULL;
FilterPart *newpart;
- int index, i;
+ gint index, i;
index = gtk_combo_box_get_active (combobox);
for (i = 0, part = em_filter_context_next_action (data->f, part); part && i < index; i++, part = em_filter_context_next_action (data->f, part)) {
@@ -364,7 +364,7 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr)
GtkWidget *combobox;
GtkWidget *hbox;
GtkWidget *p;
- int index = 0, current = 0;
+ gint index = 0, current = 0;
struct _part_data *data;
data = g_malloc0(sizeof(*data));
@@ -431,7 +431,7 @@ less_parts(GtkWidget *button, struct _rule_data *data)
}
static void
-attach_rule(GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
+attach_rule(GtkWidget *rule, struct _rule_data *data, FilterPart *part, gint row)
{
GtkWidget *remove;
@@ -512,7 +512,7 @@ get_widget(FilterRule *fr, RuleContext *rc)
FilterPart *part;
struct _rule_data *data;
EMFilterRule *ff =(EMFilterRule *)fr;
- int rows, i = 0;
+ gint rows, i = 0;
gchar *msg;
widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index 23a1b762cd..126cbe2a50 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -39,29 +39,29 @@ static void em_filter_source_element_class_init(EMFilterSourceElementClass *klas
static void em_filter_source_element_init(EMFilterSourceElement *fs);
static void em_filter_source_element_finalize(GObject *obj);
-static int source_eq(FilterElement *fe, FilterElement *cm);
+static gint source_eq(FilterElement *fe, FilterElement *cm);
static void xml_create(FilterElement *fe, xmlNodePtr node);
static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
+static gint xml_decode(FilterElement *fe, xmlNodePtr node);
static FilterElement *clone(FilterElement *fe);
static GtkWidget *get_widget(FilterElement *fe);
static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
static void format_sexp(FilterElement *, GString *);
-static void em_filter_source_element_add_source (EMFilterSourceElement *fs, const char *account_name, const char *name,
- const char *addr, const char *url);
+static void em_filter_source_element_add_source (EMFilterSourceElement *fs, const gchar *account_name, const gchar *name,
+ const gchar *addr, const gchar *url);
static void em_filter_source_element_get_sources(EMFilterSourceElement *fs);
typedef struct _SourceInfo {
- char *account_name;
- char *name;
- char *address;
- char *url;
+ gchar *account_name;
+ gchar *name;
+ gchar *address;
+ gchar *url;
} SourceInfo;
struct _EMFilterSourceElementPrivate {
GList *sources;
- char *current_url;
+ gchar *current_url;
};
@@ -176,12 +176,12 @@ xml_encode(FilterElement *fe)
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
- value = xmlNewNode(NULL, (const unsigned char *)"value");
- xmlSetProp(value, (const unsigned char *)"name", (unsigned char *)fe->name);
- xmlSetProp(value, (const unsigned char *)"type", (const unsigned char *)"uri");
+ value = xmlNewNode(NULL, (const guchar *)"value");
+ xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name);
+ xmlSetProp(value, (const guchar *)"type", (const guchar *)"uri");
if (fs->priv->current_url)
- xmlNewTextChild(value, NULL, (const unsigned char *)"uri", (unsigned char *)fs->priv->current_url);
+ xmlNewTextChild(value, NULL, (const guchar *)"uri", (guchar *)fs->priv->current_url);
return value;
}
@@ -191,12 +191,12 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
CamelURL *url;
- char *uri;
+ gchar *uri;
node = node->children;
while (node != NULL) {
- if (!strcmp((char *)node->name, "uri")) {
- uri = (char *)xmlNodeGetContent(node);
+ if (!strcmp((gchar *)node->name, "uri")) {
+ uri = (gchar *)xmlNodeGetContent(node);
url = camel_url_new(uri, NULL);
xmlFree(uri);
@@ -219,7 +219,7 @@ clone(FilterElement *fe)
EMFilterSourceElement *cpy = em_filter_source_element_new();
GList *i;
- ((FilterElement *)cpy)->name = (char *)xmlStrdup((unsigned char *)fe->name);
+ ((FilterElement *)cpy)->name = (gchar *)xmlStrdup((guchar *)fe->name);
cpy->priv->current_url = g_strdup(fs->priv->current_url);
@@ -235,7 +235,7 @@ static void
source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs)
{
SourceInfo *info;
- int idx;
+ gint idx;
idx = gtk_combo_box_get_active (combobox);
g_return_if_fail (idx >= 0 && idx < g_list_length (fs->priv->sources));
@@ -254,7 +254,7 @@ get_widget(FilterElement *fe)
GtkWidget *combobox;
GList *i;
SourceInfo *first = NULL;
- int index, current_index;
+ gint index, current_index;
if (fs->priv->sources == NULL)
em_filter_source_element_get_sources(fs);
@@ -266,7 +266,7 @@ get_widget(FilterElement *fe)
for (i = fs->priv->sources; i != NULL; i = g_list_next(i)) {
SourceInfo *info = (SourceInfo *)i->data;
- char *label;
+ gchar *label;
if (info->url != NULL) {
if (first == NULL)
@@ -321,8 +321,8 @@ format_sexp(FilterElement *fe, GString *out)
static void
-em_filter_source_element_add_source(EMFilterSourceElement *fs, const char *account_name, const char *name,
- const char *addr, const char *url)
+em_filter_source_element_add_source(EMFilterSourceElement *fs, const gchar *account_name, const gchar *name,
+ const gchar *addr, const gchar *url)
{
SourceInfo *info;
@@ -344,7 +344,7 @@ em_filter_source_element_get_sources(EMFilterSourceElement *fs)
const EAccount *account;
GConfClient *gconf;
EIterator *it;
- char *uri;
+ gchar *uri;
CamelURL *url;
/* should this get the global object from mail? */
diff --git a/mail/em-filter-source-element.h b/mail/em-filter-source-element.h
index ac9a1ff911..d4d6a75890 100644
--- a/mail/em-filter-source-element.h
+++ b/mail/em-filter-source-element.h
@@ -47,6 +47,6 @@ struct _EMFilterSourceElementClass {
GType em_filter_source_element_get_type (void);
EMFilterSourceElement *em_filter_source_element_new (void);
-void em_filter_source_element_set_current (EMFilterSourceElement *src, const char *url);
+void em_filter_source_element_set_current (EMFilterSourceElement *src, const gchar *url);
#endif /* _EM_FILTER_SOURCE_ELEMENT_H */
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 6a8a67b454..b72ce28722 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -114,7 +114,7 @@ struct _EMFolderBrowserPrivate {
guint vpane_resize_id;
guint list_built_id; /* hook onto list-built for delayed 'select first unread' stuff */
- char *select_uid;
+ gchar *select_uid;
guint folder_changed_id;
guint show_wide:1;
@@ -132,19 +132,19 @@ typedef struct EMFBSearchBarItem {
const gchar *image;
} EMFBSearchBarItem;
-static void emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state);
-static void emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri);
-static void emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri);
+static void emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint state);
+static void emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri);
+static void emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri);
/* FilterBar stuff ... */
-static void emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data);
-static void emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb);
+static void emfb_search_config_search(EFilterBar *efb, FilterRule *rule, gint id, const gchar *query, gpointer data);
+static void emfb_search_menu_activated(ESearchBar *esb, gint id, EMFolderBrowser *emfb);
static void emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb);
static void emfb_search_search_cleared(ESearchBar *esb);
-static void emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *emfb);
+static void emfb_list_message_selected (MessageList *ml, const gchar *uid, EMFolderBrowser *emfb);
-static void emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path);
+static void emfb_expand_all_threads(BonoboUIComponent *uid, gpointer data, const gchar *path);
static const EMFolderViewEnable emfb_enable_map[] = {
{ "EditInvertSelection", EM_POPUP_SELECT_FOLDER },
@@ -269,11 +269,11 @@ emfb_init(GObject *o)
// "evolution-mail-message.xml",
// NULL));
- emfb->view.enable_map = g_slist_prepend(emfb->view.enable_map, (void *)emfb_enable_map);
+ emfb->view.enable_map = g_slist_prepend(emfb->view.enable_map, (gpointer)emfb_enable_map);
// if (search_context) {
-// const char *systemrules = g_object_get_data (G_OBJECT (search_context), "system");
-// const char *userrules = g_object_get_data (G_OBJECT (search_context), "user");
+// const gchar *systemrules = g_object_get_data (G_OBJECT (search_context), "system");
+// const gchar *userrules = g_object_get_data (G_OBJECT (search_context), "user");
// EFilterBar *efb;
// GConfClient *gconf;
//
@@ -401,7 +401,7 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
if (state) {
GConfClient *gconf = mail_config_get_gconf_client ();
- int paned_size /*, y*/;
+ gint paned_size /*, y*/;
paned_size = gconf_client_get_int(gconf, emfb->priv->show_wide ? "/apps/evolution/mail/display/hpaned_size":"/apps/evolution/mail/display/paned_size", NULL);
@@ -410,7 +410,7 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
gtk_widget_show (GTK_WIDGET (emfb->priv->preview));
if (emfb->view.list->cursor_uid) {
- char *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1);
+ gchar *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1);
emfb->priv->scope_restricted = FALSE;
strcpy(uid, emfb->view.list->cursor_uid);
@@ -447,7 +447,7 @@ gboolean em_folder_browser_get_wide (EMFolderBrowser *emfb)
/* FIXME: Ugh! */
static void
-emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
+emfb_search_menu_activated(ESearchBar *esb, gint id, EMFolderBrowser *emfb)
{
EFilterBar *efb = (EFilterBar *)esb;
@@ -458,7 +458,7 @@ emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
d(printf("Save vfolder\n"));
if (efb->current_query) {
FilterRule *rule;
- char *name, *text;
+ gchar *name, *text;
/* ensures vfolder is running */
vfolder_load_storage ();
@@ -483,7 +483,7 @@ struct _setup_msg {
CamelFolder *folder;
CamelOperation *cancel;
- char *query;
+ gchar *query;
GList *sources_uri;
GList *sources_folder;
};
@@ -509,12 +509,12 @@ vfolder_setup_exec(struct _setup_msg *m)
l = m->sources_uri;
while (l) {
- d(printf(" Adding uri: %s\n", (char *)l->data));
+ d(printf(" Adding uri: %s\n", (gchar *)l->data));
folder = mail_tool_uri_to_folder (l->data, 0, &m->base.ex);
if (folder) {
list = g_list_append(list, folder);
} else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(&m->base.ex);
}
l = l->next;
@@ -576,10 +576,10 @@ static MailMsgInfo vfolder_setup_info = {
/* sources_uri should be camel uri's */
static int
-vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList *sources_folder, CamelOperation *cancel)
+vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder, CamelOperation *cancel)
{
struct _setup_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&vfolder_setup_info);
m->folder = folder;
@@ -604,8 +604,8 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
EMFolderView *emfv = (EMFolderView *) emfb;
EFilterBar *efb = (EFilterBar *)esb;
const gchar *view_sexp;
- char *search_state = NULL, *folder_uri=NULL;
- char *word = NULL, *storeuri = NULL, *search_word = NULL;
+ gchar *search_state = NULL, *folder_uri=NULL;
+ gchar *word = NULL, *storeuri = NULL, *search_word = NULL;
gint id, i;
CamelFolder *folder;
CamelStore *store;
@@ -730,11 +730,11 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
/* Add the local folders */
l = mail_vfolder_get_sources_local ();
while (l) {
- folder = mail_tool_uri_to_folder ((const char *)l->data, 0,ex);
+ folder = mail_tool_uri_to_folder ((const gchar *)l->data, 0,ex);
if (folder)
folder_list = g_list_append(folder_list, folder);
else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(ex);
}
l = l->next;
@@ -743,11 +743,11 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
/* Add the remote source folder */
l = mail_vfolder_get_sources_remote ();
while (l) {
- folder = mail_tool_uri_to_folder ((const char *)l->data, 0,ex);
+ folder = mail_tool_uri_to_folder ((const gchar *)l->data, 0,ex);
if (folder)
folder_list = g_list_append(folder_list, folder);
else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(ex);
}
l = l->next;
@@ -807,7 +807,7 @@ emfb_search_search_cleared(ESearchBar *esb)
/* ********************************************************************** */
static void
-emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *emfb)
+emfb_list_message_selected (MessageList *ml, const gchar *uid, EMFolderBrowser *emfb)
{
EMFolderView *emfv = (EMFolderView *) emfb;
@@ -829,7 +829,7 @@ emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *e
/* ********************************************************************** */
static void
-emfb_focus_search(BonoboUIComponent *uid, void *data, const char *path)
+emfb_focus_search(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -837,7 +837,7 @@ emfb_focus_search(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_help_debug (BonoboUIComponent *uid, void *data, const char *path)
+emfb_help_debug (BonoboUIComponent *uid, gpointer data, const gchar *path)
{
mail_component_show_logger ((GtkWidget *) data);
}
@@ -861,7 +861,7 @@ emfb_select_all_daemon (MessageList *ml)
}
static void
-emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfb_hide_deleted(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
GConfClient *gconf;
EMFolderView *emfv = data;
@@ -875,10 +875,10 @@ emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_E
}
static void
-emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
+emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri)
{
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
- char *state;
+ gchar *state;
message_list_freeze(emfv->list);
@@ -912,7 +912,7 @@ emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
static void
-emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
+emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri)
{
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
struct _EMFolderBrowserPrivate *p = emfb->priv;
@@ -945,8 +945,8 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
before the folder is open and need to override the
defaults */
if (folder) {
- char *sstate;
- int state;
+ gchar *sstate;
+ gint state;
gboolean safe;
GConfClient *gconf = mail_config_get_gconf_client();
@@ -1045,12 +1045,12 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
}
static void
-emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
+emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint act)
{
if (act) {
GConfClient *gconf;
gboolean state;
- char *sstate;
+ gchar *sstate;
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
/* Stop button */
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index c22987b37c..b4e239e36b 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -47,20 +47,20 @@
#include "e-mail-shell-backend.h"
struct _prop_data {
- void *object;
+ gpointer object;
CamelArgV *argv;
GtkWidget **widgets;
GSList *properties;
- char *name;
- int total;
- int unread;
+ gchar *name;
+ gint total;
+ gint unread;
EMConfig *config;
CamelFolderQuotaInfo *quota;
};
static void
-emfp_dialog_response (GtkWidget *dialog, int response, struct _prop_data *prop_data)
+emfp_dialog_response (GtkWidget *dialog, gint response, struct _prop_data *prop_data)
{
if (response == GTK_RESPONSE_OK)
e_config_commit((EConfig *)prop_data->config);
@@ -71,11 +71,11 @@ emfp_dialog_response (GtkWidget *dialog, int response, struct _prop_data *prop_d
}
static void
-emfp_commit(EConfig *ec, GSList *items, void *data)
+emfp_commit(EConfig *ec, GSList *items, gpointer data)
{
struct _prop_data *prop_data = data;
CamelArgV *argv = prop_data->argv;
- int i;
+ gint i;
for (i = 0; i < argv->argc; i++) {
CamelArg *arg = &argv->argv[i];
@@ -86,7 +86,7 @@ emfp_commit(EConfig *ec, GSList *items, void *data)
break;
case CAMEL_ARG_STR:
g_free (arg->ca_str);
- arg->ca_str = (char *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]);
+ arg->ca_str = (gchar *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]);
break;
case CAMEL_ARG_INT:
arg->ca_int = gtk_spin_button_get_value_as_int ((GtkSpinButton *) prop_data->widgets[i]);
@@ -104,10 +104,10 @@ emfp_commit(EConfig *ec, GSList *items, void *data)
}
static void
-emfp_free(EConfig *ec, GSList *items, void *data)
+emfp_free(EConfig *ec, GSList *items, gpointer data)
{
struct _prop_data *prop_data = data;
- int i;
+ gint i;
g_slist_free(items);
@@ -128,9 +128,9 @@ emfp_free(EConfig *ec, GSList *items, void *data)
}
static int
-add_numbered_row (GtkTable *table, int row, const char *description, const char *format, int num)
+add_numbered_row (GtkTable *table, gint row, const gchar *description, const gchar *format, gint num)
{
- char *str;
+ gchar *str;
GtkWidget *label;
g_return_val_if_fail (table != NULL, row);
@@ -155,11 +155,11 @@ add_numbered_row (GtkTable *table, int row, const char *description, const char
}
static GtkWidget *
-emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
GtkWidget *w, *table, *label;
struct _prop_data *prop_data = data;
- int row = 0, i;
+ gint row = 0, i;
GSList *l;
if (old)
@@ -183,8 +183,8 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
CamelFolderQuotaInfo *quota = prop_data->quota;
for (info = quota; info; info = info->next) {
- char *descr;
- int procs;
+ gchar *descr;
+ gint procs;
/* should not happen, but anyway... */
if (!info->total)
@@ -291,7 +291,7 @@ static void
emfp_dialog_got_folder_quota (CamelFolder *folder,
const gchar *folder_uri,
CamelFolderQuotaInfo *quota,
- void *data)
+ gpointer data)
{
GtkWidget *dialog, *w;
struct _prop_data *prop_data;
@@ -436,7 +436,7 @@ emfp_dialog_got_folder_quota (CamelFolder *folder,
}
static void
-emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
+emfp_dialog_got_folder (gchar *uri, CamelFolder *folder, gpointer data)
{
EShellView *shell_view = data;
@@ -483,5 +483,5 @@ em_folder_properties_show (EShellView *shell_view,
if (folder == NULL)
mail_get_folder(uri, 0, emfp_dialog_got_folder, shell_view, mail_msg_unordered_push);
else
- emfp_dialog_got_folder((char *)uri, folder, shell_view);
+ emfp_dialog_got_folder((gchar *)uri, folder, shell_view);
}
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index 27b1f1b08b..933393ae80 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -522,7 +522,7 @@ void
em_folder_selection_button_set_selection_mult (EMFolderSelectionButton *button,
GList *uris)
{
- char *caption, *tmp, *tmp2;
+ gchar *caption, *tmp, *tmp2;
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
diff --git a/mail/em-folder-selection.c b/mail/em-folder-selection.c
index 07c0bfdcff..a0528554d6 100644
--- a/mail/em-folder-selection.c
+++ b/mail/em-folder-selection.c
@@ -38,15 +38,15 @@
/* TODO: rmeove this file, it could just go on em-folder-selection or em-utils */
struct _select_folder_data {
- void (*done) (const char *uri, void *data);
- void *data;
+ void (*done) (const gchar *uri, gpointer data);
+ gpointer data;
};
static void
-emfs_selector_response(EMFolderSelector *emfs, int response, struct _select_folder_data *d)
+emfs_selector_response(EMFolderSelector *emfs, gint response, struct _select_folder_data *d)
{
if (response == GTK_RESPONSE_OK) {
- const char *uri = em_folder_selector_get_selected_uri(emfs);
+ const gchar *uri = em_folder_selector_get_selected_uri(emfs);
d->done(uri, d->data);
}
@@ -55,9 +55,9 @@ emfs_selector_response(EMFolderSelector *emfs, int response, struct _select_fold
}
void
-em_select_folder (GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri,
+em_select_folder (GtkWindow *parent_window, const gchar *title, const gchar *oklabel, const gchar *default_uri,
EMFTExcludeFunc exclude,
- void (*done) (const char *uri, void *user_data), void *user_data)
+ void (*done) (const gchar *uri, gpointer user_data), gpointer user_data)
{
struct _select_folder_data *d;
EMFolderTreeModel *model;
diff --git a/mail/em-folder-selection.h b/mail/em-folder-selection.h
index 25c35d254b..098fa2b227 100644
--- a/mail/em-folder-selection.h
+++ b/mail/em-folder-selection.h
@@ -33,10 +33,10 @@ extern "C" {
struct _GtkWindow;
-void em_select_folder (struct _GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri,
+void em_select_folder (struct _GtkWindow *parent_window, const gchar *title, const gchar *oklabel, const gchar *default_uri,
EMFTExcludeFunc exclude,
- void (*done)(const char *uri, void *data),
- void *data);
+ void (*done)(const gchar *uri, gpointer data),
+ gpointer data);
#ifdef __cplusplus
}
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index e04460b7ac..c9c001f0cd 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -117,7 +117,7 @@ em_folder_selector_get_type (void)
}
static void
-emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
+emfs_response (GtkWidget *dialog, gint response, EMFolderSelector *emfs)
{
if (response != EM_FOLDER_SELECTOR_RESPONSE_NEW)
return;
@@ -133,8 +133,8 @@ emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
static void
emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
{
- char *path;
- const char *text = NULL;
+ gchar *path;
+ const gchar *text = NULL;
gboolean active;
if (emfs->name_entry->text_length > 0)
@@ -148,7 +148,7 @@ emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
}
static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderSelector *emfs)
+folder_selected_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, guint32 flags, EMFolderSelector *emfs)
{
if (emfs->name_entry)
emfs_create_name_changed (emfs->name_entry, emfs);
@@ -157,13 +157,13 @@ folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint
}
static void
-folder_activated_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderSelector *emfs)
+folder_activated_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, EMFolderSelector *emfs)
{
gtk_dialog_response ((GtkDialog *) emfs, GTK_RESPONSE_OK);
}
void
-em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
+em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel)
{
GtkWidget *widget;
@@ -216,7 +216,7 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3
}
GtkWidget *
-em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
+em_folder_selector_new (EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel)
{
EMFolderSelector *emfs;
@@ -231,8 +231,8 @@ static void
emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
{
if (emfs->name_entry->text_length > 0) {
- char *path;
- const char *text;
+ gchar *path;
+ const gchar *text;
text = gtk_entry_get_text (emfs->name_entry);
path = em_folder_tree_get_selected_uri(emfs->emft);
@@ -244,7 +244,7 @@ emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
}
GtkWidget *
-em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text)
+em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text)
{
EMFolderSelector *emfs;
GtkWidget *hbox, *w;
@@ -276,7 +276,7 @@ em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *ti
void
-em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri)
+em_folder_selector_set_selected (EMFolderSelector *emfs, const gchar *uri)
{
em_folder_tree_set_selected (emfs->emft, uri, FALSE);
}
@@ -287,11 +287,11 @@ em_folder_selector_set_selected_list (EMFolderSelector *emfs, GList *list)
em_folder_tree_set_selected_list (emfs->emft, list, FALSE);
}
-const char *
+const gchar *
em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
{
- char *uri;
- const char *name;
+ gchar *uri;
+ const gchar *name;
if (!(uri = em_folder_tree_get_selected_uri (emfs->emft))) {
d(printf ("no selected folder?\n"));
@@ -301,7 +301,7 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
if (uri && emfs->name_entry) {
CamelProvider *provider;
CamelURL *url;
- char *newpath;
+ gchar *newpath;
provider = camel_provider_get(uri, NULL);
@@ -316,7 +316,7 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
camel_url_set_fragment (url, newpath);
} else {
- char *path;
+ gchar *path;
path = g_strdup_printf("%s/%s", (url->path == NULL || strcmp(url->path, "/") == 0) ? "":url->path, name);
camel_url_set_path(url, path);
@@ -352,10 +352,10 @@ em_folder_selector_get_selected_paths (EMFolderSelector *emfs)
return em_folder_tree_get_selected_paths (emfs->emft);
}
-const char *
+const gchar *
em_folder_selector_get_selected_path (EMFolderSelector *emfs)
{
- char *uri, *path;
+ gchar *uri, *path;
if (emfs->selected_path) {
/* already did the work in a previous call */
@@ -370,8 +370,8 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
path = em_folder_tree_get_selected_path(emfs->emft);
if (emfs->name_entry) {
- const char *name;
- char *newpath;
+ const gchar *name;
+ gchar *newpath;
name = gtk_entry_get_text (emfs->name_entry);
newpath = g_strdup_printf ("%s/%s", path?path:"", name);
diff --git a/mail/em-folder-selector.h b/mail/em-folder-selector.h
index 5d13f10cb9..c700ce0344 100644
--- a/mail/em-folder-selector.h
+++ b/mail/em-folder-selector.h
@@ -58,10 +58,10 @@ struct _EMFolderSelector {
struct _EMFolderTree *emft;
struct _GtkEntry *name_entry;
- char *selected_path;
- char *selected_uri;
+ gchar *selected_path;
+ gchar *selected_uri;
- char *created_uri;
+ gchar *created_uri;
guint created_id;
};
@@ -80,19 +80,19 @@ enum {
GType em_folder_selector_get_type (void);
-void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel);
+void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel);
/* for selecting folders */
-GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel);
+GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel);
/* for creating folders */
-GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
+GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text);
-void em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri);
+void em_folder_selector_set_selected (EMFolderSelector *emfs, const gchar *uri);
void em_folder_selector_set_selected_list (EMFolderSelector *emfs, GList *list);
-const char *em_folder_selector_get_selected_uri (EMFolderSelector *emfs);
-const char *em_folder_selector_get_selected_path (EMFolderSelector *emfs);
+const gchar *em_folder_selector_get_selected_uri (EMFolderSelector *emfs);
+const gchar *em_folder_selector_get_selected_path (EMFolderSelector *emfs);
GList *em_folder_selector_get_selected_uris (EMFolderSelector *emfs);
GList *em_folder_selector_get_selected_paths (EMFolderSelector *emfs);
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index c0e3f2bb68..659eaa7bff 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -130,7 +130,7 @@ folder_tree_model_load_state (EMFolderTreeModel *model,
if ((model->state = e_xml_parse_file (filename)) != NULL) {
node = xmlDocGetRootElement (model->state);
- if (!node || strcmp ((char *)node->name, "tree-state") != 0) {
+ if (!node || strcmp ((gchar *)node->name, "tree-state") != 0) {
/* it is not expected XML file, thus free it and use the default */
xmlFreeDoc (model->state);
} else
@@ -138,17 +138,17 @@ folder_tree_model_load_state (EMFolderTreeModel *model,
}
/* setup some defaults - expand "Local Folders" and "Search Folders" */
- model->state = xmlNewDoc ((const unsigned char *)"1.0");
- root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
+ model->state = xmlNewDoc ((const guchar *)"1.0");
+ root = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
- node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
- xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"local");
- xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
+ node = xmlNewChild (root, NULL, (const guchar *)"node", NULL);
+ xmlSetProp (node, (const guchar *)"name", (const guchar *)"local");
+ xmlSetProp (node, (const guchar *)"expand", (const guchar *)"true");
- node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
- xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"vfolder");
- xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
+ node = xmlNewChild (root, NULL, (const guchar *)"node", NULL);
+ xmlSetProp (node, (const guchar *)"name", (const guchar *)"vfolder");
+ xmlSetProp (node, (const guchar *)"expand", (const guchar *)"true");
}
static int
@@ -157,11 +157,11 @@ folder_tree_model_sort (GtkTreeModel *model,
GtkTreeIter *b,
gpointer user_data)
{
- char *aname, *bname;
+ gchar *aname, *bname;
CamelStore *store;
gboolean is_store;
guint32 aflags, bflags;
- int rv = -2;
+ gint rv = -2;
gtk_tree_model_get (
model, a,
@@ -513,7 +513,7 @@ account_changed (EAccountList *accounts, EAccount *account, gpointer user_data)
CamelProvider *provider;
CamelStore *store;
CamelException ex;
- char *uri;
+ gchar *uri;
if (!(si = g_hash_table_lookup (model->account_hash, account)))
return;
@@ -558,19 +558,19 @@ account_removed (EAccountList *accounts, EAccount *account, gpointer user_data)
void
em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter,
struct _EMFolderTreeModelStoreInfo *si,
- CamelFolderInfo *fi, int fully_loaded)
+ CamelFolderInfo *fi, gint fully_loaded)
{
EShellBackend *shell_backend;
EMailShellBackend *mail_shell_backend;
GtkTreeRowReference *uri_row, *path_row;
GtkTreeStore *tree_store;
- unsigned int unread;
+ guint unread;
GtkTreePath *path;
GtkTreeIter sub;
gboolean load = FALSE;
CamelFolder *folder;
gboolean emitted = FALSE;
- const char *name;
+ const gchar *name;
const gchar *icon_name;
guint32 flags;
@@ -607,10 +607,10 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
mail_shell_backend, E_MAIL_FOLDER_OUTBOX);
if (folder == local_outbox) {
- int total;
+ gint total;
if ((total = camel_folder_get_message_count (folder)) > 0) {
- int deleted = camel_folder_get_deleted_message_count (folder);
+ gint deleted = camel_folder_get_deleted_message_count (folder);
if (deleted != -1)
total -= deleted;
@@ -619,10 +619,10 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
unread = total > 0 ? total : 0;
}
if (folder == local_drafts) {
- int total;
+ gint total;
if ((total = camel_folder_get_message_count (folder)) > 0) {
- int deleted = camel_folder_get_deleted_message_count (folder);
+ gint deleted = camel_folder_get_deleted_message_count (folder);
if (deleted != -1)
total -= deleted;
@@ -729,7 +729,7 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo
GtkTreeIter parent, iter;
GtkTreePath *path;
gboolean load;
- char *dirname, *p;
+ gchar *dirname, *p;
if (!(si = g_hash_table_lookup (model->store_hash, store)))
goto done;
@@ -783,7 +783,7 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo
}
static void
-folder_subscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_subscribed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -821,7 +821,7 @@ folder_unsubscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *
}
static void
-folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_unsubscribed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -831,7 +831,7 @@ folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *
}
static void
-folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_created_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -845,7 +845,7 @@ folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model
}
static void
-folder_deleted_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_deleted_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -865,7 +865,7 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod
GtkTreeRowReference *row;
GtkTreeIter root, iter;
GtkTreePath *path;
- char *parent, *p;
+ gchar *parent, *p;
if (!(si = g_hash_table_lookup (model->store_hash, store)))
goto done;
@@ -923,7 +923,7 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod
}
static void
-folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_renamed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelRenameInfo *rinfo, *info = event_data;
@@ -937,14 +937,14 @@ folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model
}
void
-em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name)
+em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const gchar *display_name)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
GtkTreeIter root, iter;
GtkTreePath *path;
EAccount *account;
- char *uri;
+ gchar *uri;
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (CAMEL_IS_STORE (store));
@@ -1011,7 +1011,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
}
static void
-em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const char *uri)
+em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const gchar *uri)
{
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (uri != NULL);
@@ -1040,7 +1040,7 @@ em_folder_tree_model_remove_store_info (EMFolderTreeModel *model, CamelStore *st
void
em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si, GtkTreeIter *toplevel)
{
- char *uri, *full_name;
+ gchar *uri, *full_name;
gboolean is_store, go;
GtkTreeIter iter;
@@ -1097,15 +1097,15 @@ em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store)
static xmlNodePtr
-find_xml_node (xmlNodePtr root, const char *name)
+find_xml_node (xmlNodePtr root, const gchar *name)
{
xmlNodePtr node;
- char *nname;
+ gchar *nname;
node = root->children;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "node")) {
- nname = (char *)xmlGetProp (node, (const unsigned char *)"name");
+ if (!strcmp ((gchar *)node->name, "node")) {
+ nname = (gchar *)xmlGetProp (node, (const guchar *)"name");
if (nname && !strcmp (nname, name)) {
xmlFree (nname);
return node;
@@ -1121,18 +1121,18 @@ find_xml_node (xmlNodePtr root, const char *name)
}
gboolean
-em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
+em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const gchar *key)
{
xmlNodePtr node;
- const char *name;
- char *buf, *p;
+ const gchar *name;
+ gchar *buf, *p;
/* This code needs to be rewritten.
First it doesn't belong on the model
Second, it shouldn't use an xml tree to store a bit table in memory! */
node = model->state ? model->state->children : NULL;
- if (!node || strcmp ((char *)node->name, "tree-state") != 0)
+ if (!node || strcmp ((gchar *)node->name, "tree-state") != 0)
return FALSE;
name = buf = g_alloca (strlen (key) + 1);
@@ -1148,8 +1148,8 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
if ((node = find_xml_node (node, name))) {
gboolean expanded;
- buf = (char *)xmlGetProp (node, (const unsigned char *)"expand");
- expanded = buf && !strcmp ((char *)buf, "true");
+ buf = (gchar *)xmlGetProp (node, (const guchar *)"expand");
+ expanded = buf && !strcmp ((gchar *)buf, "true");
xmlFree (buf);
if (!expanded || p == NULL)
@@ -1164,17 +1164,17 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
void
-em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded)
+em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const gchar *key, gboolean expanded)
{
xmlNodePtr node, parent;
- const char *name;
- char *buf, *p;
+ const gchar *name;
+ gchar *buf, *p;
if (model->state == NULL)
- model->state = xmlNewDoc ((const unsigned char *)"1.0");
+ model->state = xmlNewDoc ((const guchar *)"1.0");
if (!model->state->children) {
- node = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
+ node = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL);
xmlDocSetRootElement (model->state, node);
} else {
node = model->state->children;
@@ -1198,11 +1198,11 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb
}
/* node (or parent node) doesn't exist, need to add it */
- node = xmlNewChild (parent, NULL, (const unsigned char *)"node", NULL);
- xmlSetProp (node, (const unsigned char *)"name", (unsigned char *)name);
+ node = xmlNewChild (parent, NULL, (const guchar *)"node", NULL);
+ xmlSetProp (node, (const guchar *)"name", (guchar *)name);
}
- xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)(expanded || p ? "true" : "false"));
+ xmlSetProp (node, (const guchar *)"expand", (const guchar *)(expanded || p ? "true" : "false"));
name = p ? p + 1 : NULL;
} while (name);
@@ -1215,7 +1215,7 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb
* @return Key of the uri or NULL, if failed. Returned value should be clear by g_free.
**/
static gchar *
-emftm_uri_to_key (const char *uri)
+emftm_uri_to_key (const gchar *uri)
{
CamelException ex = { 0 };
CamelStore *store;
@@ -1233,7 +1233,7 @@ emftm_uri_to_key (const char *uri)
if (store == NULL || url == NULL) {
key = NULL;
} else {
- const char *path;
+ const gchar *path;
EAccount *account;
if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
@@ -1266,7 +1266,7 @@ emftm_uri_to_key (const char *uri)
* Same as @ref em_folder_tree_model_get_expanded, but here we use uri, not key for node.
**/
gboolean
-em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri)
+em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const gchar *uri)
{
gchar *key;
gboolean expanded;
@@ -1287,7 +1287,7 @@ em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri
* Same as @ref em_folder_tree_model_set_expanded, but here we use uri, not key for node.
**/
void
-em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri, gboolean expanded)
+em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const gchar *uri, gboolean expanded)
{
gchar *key;
@@ -1304,7 +1304,7 @@ em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri
void
em_folder_tree_model_save_state (EMFolderTreeModel *model)
{
- char *dirname;
+ gchar *dirname;
if (model->state == NULL)
return;
@@ -1322,17 +1322,17 @@ em_folder_tree_model_save_state (EMFolderTreeModel *model)
static void
-expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirname, EMFTModelExpandFunc func, void *user_data)
+expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const gchar *dirname, EMFTModelExpandFunc func, gpointer user_data)
{
xmlNodePtr node = parent->children;
- char *path, *name, *expand;
+ gchar *path, *name, *expand;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "node")) {
- name = (char *)xmlGetProp (node, (const unsigned char *)"name");
- expand = (char *)xmlGetProp (node, (const unsigned char *)"expand");
+ if (!strcmp ((gchar *)node->name, "node")) {
+ name = (gchar *)xmlGetProp (node, (const guchar *)"name");
+ expand = (gchar *)xmlGetProp (node, (const guchar *)"expand");
- if (expand && name && !strcmp ((char *)expand, "true")) {
+ if (expand && name && !strcmp ((gchar *)expand, "true")) {
if (dirname)
path = g_strdup_printf ("%s/%s", dirname, name);
else
@@ -1353,19 +1353,19 @@ expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirna
}
void
-em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data)
+em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, gpointer user_data)
{
xmlNodePtr root;
root = model->state ? model->state->children : NULL;
- if (!root || !root->children || strcmp ((char *)root->name, "tree-state") != 0)
+ if (!root || !root->children || strcmp ((gchar *)root->name, "tree-state") != 0)
return;
expand_foreach_r (model, root, NULL, func, user_data);
}
gboolean
-em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const char *full)
+em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const gchar *full)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
@@ -1405,14 +1405,14 @@ em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store,
return FALSE;
}
-char *
-em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const char *full)
+gchar *
+em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const gchar *full)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
GtkTreePath *tree_path;
GtkTreeIter iter;
- char *name = NULL;
+ gchar *name = NULL;
g_return_val_if_fail (EM_IS_FOLDER_TREE_MODEL (model), FALSE);
g_return_val_if_fail (CAMEL_IS_STORE (store), FALSE);
@@ -1442,7 +1442,7 @@ em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *stor
}
void
-em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const char *full, int unread)
+em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const gchar *full, gint unread)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
@@ -1483,19 +1483,19 @@ em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *sto
}
-char *
+gchar *
em_folder_tree_model_get_selected (EMFolderTreeModel *model)
{
xmlNodePtr node;
- char *buf, *uri;
+ gchar *buf, *uri;
node = model->state ? model->state->children : NULL;
- if (!node || strcmp ((char *)node->name, "tree-state") != 0)
+ if (!node || strcmp ((gchar *)node->name, "tree-state") != 0)
return NULL;
node = node->children;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "selected"))
+ if (!strcmp ((gchar *)node->name, "selected"))
break;
node = node->next;
}
@@ -1503,7 +1503,7 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
if (node == NULL)
return NULL;
- buf = (char *)xmlGetProp (node, (unsigned char *)"uri");
+ buf = (gchar *)xmlGetProp (node, (guchar *)"uri");
uri = g_strdup (buf);
xmlFree (buf);
@@ -1516,15 +1516,15 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
void
-em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri)
+em_folder_tree_model_set_selected (EMFolderTreeModel *model, const gchar *uri)
{
xmlNodePtr root, node;
if (model->state == NULL)
- model->state = xmlNewDoc ((unsigned char *)"1.0");
+ model->state = xmlNewDoc ((guchar *)"1.0");
if (!model->state->children) {
- root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
+ root = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
} else {
root = model->state->children;
@@ -1532,13 +1532,13 @@ em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri)
node = root->children;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "selected"))
+ if (!strcmp ((gchar *)node->name, "selected"))
break;
node = node->next;
}
if (node == NULL)
- node = xmlNewChild (root, NULL, (const unsigned char *)"selected", NULL);
+ node = xmlNewChild (root, NULL, (const guchar *)"selected", NULL);
- xmlSetProp (node, (const unsigned char *)"uri", (unsigned char *)uri);
+ xmlSetProp (node, (const guchar *)"uri", (guchar *)uri);
}
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 8758b8dc9e..20bc30a6a2 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -79,20 +79,20 @@ struct _EMFolderTreeModelStoreInfo {
GHashTable *full_hash; /* maps CamelFolderInfo::full_name's to GtkTreeRowReferences */
EAccount *account;
- char *display_name;
+ gchar *display_name;
- unsigned int created_id;
- unsigned int deleted_id;
- unsigned int renamed_id;
- unsigned int subscribed_id;
- unsigned int unsubscribed_id;
+ guint created_id;
+ guint deleted_id;
+ guint renamed_id;
+ guint subscribed_id;
+ guint unsubscribed_id;
};
struct _EMFolderTreeModel {
GtkTreeStore parent;
EMFolderTreeModelPrivate *priv;
- char *filename; /* state filename */
+ gchar *filename; /* state filename */
xmlDocPtr state; /* saved expanded state from previous session */
GHashTable *store_hash; /* maps CamelStore's to store-info's */
@@ -117,11 +117,11 @@ struct _EMFolderTreeModelClass {
GtkTreeIter *iter);
void (* folder_added) (EMFolderTreeModel *model,
- const char *path,
- const char *uri);
+ const gchar *path,
+ const gchar *uri);
void (* store_added) (EMFolderTreeModel *model,
- const char *uri);
+ const gchar *uri);
};
@@ -134,30 +134,30 @@ EMailShellBackend *
void em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter,
struct _EMFolderTreeModelStoreInfo *si,
- CamelFolderInfo *fi, int fully_loaded);
+ CamelFolderInfo *fi, gint fully_loaded);
-void em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name);
+void em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const gchar *display_name);
void em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store);
void em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si,
GtkTreeIter *toplevel);
-char *em_folder_tree_model_get_selected (EMFolderTreeModel *model);
-void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri);
+gchar *em_folder_tree_model_get_selected (EMFolderTreeModel *model);
+void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const gchar *uri);
-gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key);
-void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded);
+gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const gchar *key);
+void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const gchar *key, gboolean expanded);
-gboolean em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri);
-void em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri, gboolean expanded);
+gboolean em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const gchar *uri);
+void em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const gchar *uri, gboolean expanded);
void em_folder_tree_model_save_state (EMFolderTreeModel *model);
-typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const char *path, void *user_data);
-void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data);
+typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const gchar *path, gpointer user_data);
+void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, gpointer user_data);
-void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const char *path, int unread);
-gboolean em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const char *full);
-char * em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const char *full);
+void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const gchar *path, gint unread);
+gboolean em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const gchar *full);
+gchar * em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const gchar *full);
G_END_DECLS
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index f4980dc8e7..de0431937c 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -82,10 +82,10 @@
((obj), EM_TYPE_FOLDER_TREE, EMFolderTreePrivate))
struct _selected_uri {
- char *key; /* store:path or account/path */
- char *uri;
+ gchar *key; /* store:path or account/path */
+ gchar *uri;
CamelStore *store;
- char *path;
+ gchar *path;
};
struct _EMFolderTreePrivate {
@@ -95,8 +95,8 @@ struct _EMFolderTreePrivate {
GHashTable *select_uris_table; /*Removed as they're encountered, so use this to find uri's not presnet but selected */
guint32 excluded;
- gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data);
- void *excluded_data;
+ gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, gpointer data);
+ gpointer excluded_data;
guint do_multiselect:1; /* multiple select mode */
guint cursor_set:1; /* set to TRUE means we or something
@@ -347,7 +347,7 @@ em_folder_tree_get_type (void)
static gboolean
subdirs_contain_unread (GtkTreeModel *model, GtkTreeIter *root)
{
- unsigned int unread;
+ guint unread;
GtkTreeIter iter;
if (!gtk_tree_model_iter_children (model, &iter, root))
@@ -371,9 +371,9 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
{
gboolean is_store, bold;
- unsigned int unread;
- char *display;
- char *name;
+ guint unread;
+ gchar *display;
+ gchar *name;
gtk_tree_model_get (model, iter, COL_STRING_DISPLAY_NAME, &name,
COL_BOOL_IS_STORE, &is_store,
@@ -541,7 +541,7 @@ emft_select_uri(EMFolderTree *emft, GtkTreePath *path, struct _selected_uri *u)
}
static void
-emft_expand_node (EMFolderTreeModel *model, const char *key, EMFolderTree *emft)
+emft_expand_node (EMFolderTreeModel *model, const gchar *key, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
struct _EMFolderTreeModelStoreInfo *si;
@@ -551,8 +551,8 @@ emft_expand_node (EMFolderTreeModel *model, const char *key, EMFolderTree *emft)
GtkTreePath *path;
EAccount *account;
CamelStore *store;
- const char *p;
- char *uid;
+ const gchar *p;
+ gchar *uid;
size_t n;
struct _selected_uri *u;
@@ -623,8 +623,8 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree
gboolean is_store;
CamelStore *store;
EAccount *account;
- char *full_name;
- char *key;
+ gchar *full_name;
+ gchar *key;
struct _selected_uri *u;
gboolean is_expanded;
@@ -654,7 +654,7 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree
gtk_tree_view_expand_to_path (tree_view, tree_path);
gtk_tree_view_expand_row (tree_view, tree_path, FALSE);
} else {
- char *c = strrchr (key, '/');
+ gchar *c = strrchr (key, '/');
*c = '\0';
emft_expand_node (model, key, emft);
@@ -713,7 +713,7 @@ static void
tree_drag_data_delete(GtkWidget *widget, GdkDragContext *context, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
- char *full_name = NULL;
+ gchar *full_name = NULL;
GtkTreePath *src_path;
gboolean is_store;
CamelStore *store;
@@ -747,7 +747,7 @@ static void
tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
- char *full_name = NULL, *uri = NULL;
+ gchar *full_name = NULL, *uri = NULL;
GtkTreePath *src_path;
CamelFolder *folder;
CamelStore *store;
@@ -774,7 +774,7 @@ tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData
switch (info) {
case DND_DRAG_TYPE_FOLDER:
/* dragging to a new location in the folder tree */
- gtk_selection_data_set(selection, drag_atoms[info], 8, (unsigned char *)uri, strlen (uri) + 1);
+ gtk_selection_data_set(selection, drag_atoms[info], 8, (guchar *)uri, strlen (uri) + 1);
break;
case DND_DRAG_TYPE_TEXT_URI_LIST:
/* dragging to nautilus or something, probably */
@@ -810,13 +810,13 @@ struct _DragDataReceivedAsync {
GtkSelectionData *selection;
CamelStore *store;
- char *full_name;
+ gchar *full_name;
guint32 action;
guint info;
- unsigned int move:1;
- unsigned int moved:1;
- unsigned int aborted:1;
+ guint move:1;
+ guint moved:1;
+ guint aborted:1;
};
static void
@@ -826,7 +826,7 @@ emft_drop_folder(struct _DragDataReceivedAsync *m)
d(printf(" * Drop folder '%s' onto '%s'\n", m->selection->data, m->full_name));
- if (!(src = mail_tool_uri_to_folder((char *)m->selection->data, 0, &m->base.ex)))
+ if (!(src = mail_tool_uri_to_folder((gchar *)m->selection->data, 0, &m->base.ex)))
return;
em_folder_utils_copy_folders(src->parent_store, src->full_name, m->store, m->full_name?m->full_name:"", m->move);
@@ -837,10 +837,10 @@ static gchar *
emft_drop_async__desc (struct _DragDataReceivedAsync *m)
{
CamelURL *url;
- char *buf;
+ gchar *buf;
if (m->info == DND_DROP_TYPE_FOLDER) {
- url = camel_url_new ((char *)m->selection->data, NULL);
+ url = camel_url_new ((gchar *)m->selection->data, NULL);
if (m->move)
buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1);
@@ -919,7 +919,7 @@ tree_drag_data_action(struct _DragDataReceivedAsync *m)
}
static void
-emft_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
+emft_drop_popup_copy(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _DragDataReceivedAsync *m = data;
@@ -928,7 +928,7 @@ emft_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emft_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
+emft_drop_popup_move(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _DragDataReceivedAsync *m = data;
@@ -937,7 +937,7 @@ emft_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emft_drop_popup_cancel(EPopup *ep, EPopupItem *item, void *data)
+emft_drop_popup_cancel(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _DragDataReceivedAsync *m = data;
@@ -955,13 +955,13 @@ static EPopupItem emft_drop_popup_menu[] = {
};
static void
-emft_drop_popup_free(EPopup *ep, GSList *items, void *data)
+emft_drop_popup_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft)
+tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeViewDropPosition pos;
@@ -971,8 +971,8 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y
gboolean is_store;
CamelStore *store;
GtkTreeIter iter;
- char *full_name;
- int i;
+ gchar *full_name;
+ gint i;
tree_view = GTK_TREE_VIEW (emft);
@@ -1018,7 +1018,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y
if (context->action == GDK_ACTION_ASK) {
EMPopup *emp;
- int mask;
+ gint mask;
GSList *menus = NULL;
GtkMenu *menu;
@@ -1043,7 +1043,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y
}
static gboolean
-is_special_local_folder (const char *name)
+is_special_local_folder (const gchar *name)
{
return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates"));
}
@@ -1052,7 +1052,7 @@ static GdkAtom
emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
{
struct _EMFolderTreePrivate *p = emft->priv;
- char *full_name = NULL, *uri = NULL, *src_uri = NULL;
+ gchar *full_name = NULL, *uri = NULL, *src_uri = NULL;
CamelStore *local, *sstore, *dstore;
EMailShellBackend *mail_shell_backend;
GdkAtom atom = GDK_NONE;
@@ -1137,7 +1137,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
/* Check for special sources, and vfolder stuff */
if (src_uri) {
CamelURL *url;
- char *url_path;
+ gchar *url_path;
/* FIXME: this is a total hack, but i think all we can do at present */
/* Check for dragging from special folders which can't be moved/copied */
@@ -1224,7 +1224,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
targets = targets->next;
}
} else {
- int i;
+ gint i;
while (targets != NULL) {
for (i = 0; i < NUM_DROP_TYPES; i++) {
@@ -1247,12 +1247,12 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
}
static gboolean
-tree_drag_drop (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft)
+tree_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeViewColumn *column;
GtkTreeView *tree_view;
- int cell_x, cell_y;
+ gint cell_x, cell_y;
GtkTreePath *path;
GdkAtom target;
@@ -1329,7 +1329,7 @@ tree_autoscroll (EMFolderTree *emft)
GtkTreeView *tree_view;
GdkRectangle rect;
GdkWindow *window;
- int offset, y;
+ gint offset, y;
float value;
/* get the y pointer position relative to the treeview */
@@ -1374,7 +1374,7 @@ tree_autoexpand (EMFolderTree *emft)
}
static gboolean
-tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft)
+tree_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeModel *model = (GtkTreeModel *) priv->model;
@@ -1384,7 +1384,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin
GtkTreePath *path;
GtkTreeIter iter;
GdkAtom target;
- int i;
+ gint i;
tree_view = GTK_TREE_VIEW (emft);
@@ -1456,8 +1456,8 @@ em_folder_tree_enable_drag_and_drop (EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv;
GtkTreeView *tree_view;
- static int setup = 0;
- int i;
+ static gint setup = 0;
+ gint i;
g_return_if_fail (EM_IS_FOLDER_TREE (emft));
@@ -1505,7 +1505,7 @@ void em_folder_tree_set_excluded(EMFolderTree *emft, guint32 flags)
emft->priv->excluded = flags;
}
-void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, void *data)
+void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, gpointer data)
{
emft->priv->excluded_func = exclude;
emft->priv->excluded_data = data;
@@ -1533,7 +1533,7 @@ em_folder_tree_get_selected_uris (EMFolderTree *emft)
GtkTreePath *path = l->data;
if (gtk_tree_model_get_iter(model, &iter, path)) {
- char *uri;
+ gchar *uri;
gtk_tree_model_get(model, &iter, COL_STRING_URI, &uri, -1);
list = g_list_prepend (list, uri);
@@ -1549,7 +1549,7 @@ static void
get_selected_uris_path_iterate (GtkTreeModel *model, GtkTreePath *treepath, GtkTreeIter *iter, gpointer data)
{
GList **list = (GList **) data;
- char *full_name;
+ gchar *full_name;
gtk_tree_model_get (model, iter, COL_STRING_FULL_NAME, &full_name, -1);
*list = g_list_append (*list, full_name);
@@ -1587,7 +1587,7 @@ void
em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expand_only)
{
struct _EMFolderTreePrivate *priv = emft->priv;
- int id = 0;
+ gint id = 0;
/* FIXME: need to remove any currently selected stuff? */
if (!expand_only)
@@ -1610,8 +1610,8 @@ em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expa
priv->select_uris = g_slist_append(priv->select_uris, u);
}
} else {
- const char *path;
- char *expand_key, *end;
+ const gchar *path;
+ gchar *expand_key, *end;
EAccount *account;
if (((CamelService *)u->store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
@@ -1655,9 +1655,9 @@ em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expa
#if 0
static void
-dump_fi (CamelFolderInfo *fi, int depth)
+dump_fi (CamelFolderInfo *fi, gint depth)
{
- int i;
+ gint i;
while (fi != NULL) {
for (i = 0; i < depth; i++)
@@ -1681,7 +1681,7 @@ struct _EMFolderTreeGetFolderInfo {
EMFolderTree *emft;
CamelStore *store;
guint32 flags;
- char *top;
+ gchar *top;
/* output data */
CamelFolderInfo *fi;
@@ -1690,7 +1690,7 @@ struct _EMFolderTreeGetFolderInfo {
static gchar *
emft_get_folder_info__desc (struct _EMFolderTreeGetFolderInfo *m)
{
- char *ret, *name;
+ gchar *ret, *name;
name = camel_service_get_name((CamelService *)m->store, TRUE);
ret = g_strdup_printf(_("Scanning folders in \"%s\""), name);
@@ -1784,7 +1784,7 @@ emft_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
return;
}
} else {
- int fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE;
+ gint fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE;
do {
em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi, fully_loaded);
@@ -1824,8 +1824,8 @@ emft_update_model_expanded_state (struct _EMFolderTreePrivate *priv, GtkTreeIter
gboolean is_store;
CamelStore *store;
EAccount *account;
- char *full_name;
- char *key;
+ gchar *full_name;
+ gchar *key;
gtk_tree_model_get ((GtkTreeModel *) priv->model, iter,
COL_STRING_FULL_NAME, &full_name,
@@ -1856,7 +1856,7 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t
struct _EMFolderTreeGetFolderInfo *m;
GtkTreeModel *model;
CamelStore *store;
- char *full_name;
+ gchar *full_name;
gboolean load;
model = gtk_tree_view_get_model (treeview);
@@ -1915,7 +1915,7 @@ emft_tree_row_activated (GtkTreeView *treeview, GtkTreePath *tree_path, GtkTreeV
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeModel *model = (GtkTreeModel *) priv->model;
- char *full_name, *uri;
+ gchar *full_name, *uri;
GtkTreeIter iter;
guint32 flags;
@@ -2027,7 +2027,7 @@ emft_tree_user_event (GtkTreeView *treeview, GdkEvent *e, EMFolderTree *emft)
static void
emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
{
- char *full_name, *uri;
+ gchar *full_name, *uri;
GtkTreeModel *model;
GtkTreeIter iter;
guint32 flags;
@@ -2048,12 +2048,12 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
}
void
-em_folder_tree_set_selected (EMFolderTree *emft, const char *uri, gboolean expand_only)
+em_folder_tree_set_selected (EMFolderTree *emft, const gchar *uri, gboolean expand_only)
{
GList *l = NULL;
if (uri && uri[0])
- l = g_list_append(l, (void *)uri);
+ l = g_list_append(l, (gpointer)uri);
em_folder_tree_set_selected_list(emft, l, expand_only);
g_list_free(l);
@@ -2068,7 +2068,7 @@ em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders)
GtkTreeModel *model;
GtkTreeIter iter, parent, child;
GtkTreePath *current_path, *path = NULL;
- unsigned int unread = 0;
+ guint unread = 0;
struct _EMFolderTreePrivate *priv = emft->priv;
g_return_if_fail (EM_IS_FOLDER_TREE (emft));
@@ -2133,7 +2133,7 @@ get_last_child (GtkTreeModel *model, GtkTreeIter *iter)
return get_last_child (model, iter);
} else if (has_child) {
/* Pick the last one */
- int nchildren = gtk_tree_model_iter_n_children (model, iter);
+ gint nchildren = gtk_tree_model_iter_n_children (model, iter);
gtk_tree_model_iter_nth_child ( model, child, iter, nchildren-1);
return get_last_child (model, child);
}
@@ -2149,7 +2149,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
GtkTreeModel *model;
GtkTreeIter iter, child;
GtkTreePath *path = NULL, *current_path = NULL;
- unsigned int unread = 0;
+ guint unread = 0;
struct _EMFolderTreePrivate *priv = emft->priv;
g_return_if_fail (EM_IS_FOLDER_TREE (emft));
@@ -2174,7 +2174,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
} else {
gtk_tree_model_get_iter (model, &iter, path);
if (gtk_tree_model_iter_has_child (model, &iter)) {
- int nchildren = gtk_tree_model_iter_n_children (model, &iter);
+ gint nchildren = gtk_tree_model_iter_n_children (model, &iter);
gtk_tree_model_iter_nth_child ( model, &child, &iter, nchildren-1);
path = gtk_tree_model_get_path (model, &child);
}
@@ -2205,14 +2205,14 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
}
-char *
+gchar *
em_folder_tree_get_selected_uri (EMFolderTree *emft)
{
GtkTreeView *tree_view;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *uri = NULL;
+ gchar *uri = NULL;
g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
@@ -2225,14 +2225,14 @@ em_folder_tree_get_selected_uri (EMFolderTree *emft)
return uri;
}
-char *
+gchar *
em_folder_tree_get_selected_path (EMFolderTree *emft)
{
GtkTreeView *tree_view;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *name = NULL;
+ gchar *name = NULL;
g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
@@ -2252,7 +2252,7 @@ em_folder_tree_get_selected_folder (EMFolderTree *emft)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *full_name = NULL;
+ gchar *full_name = NULL;
CamelException ex;
CamelStore *store = NULL;
CamelFolder *folder = NULL;
@@ -2283,7 +2283,7 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *emft)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *full_name = NULL, *name = NULL, *uri = NULL;
+ gchar *full_name = NULL, *name = NULL, *uri = NULL;
CamelException ex;
CamelStore *store = NULL;
CamelFolderInfo *fi = NULL;
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index 7b148d424b..bcbac54b8d 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -61,7 +61,7 @@ typedef struct _EMFolderTreePrivate EMFolderTreePrivate;
#define EMFT_EXCLUDE_SYSTEM CAMEL_FOLDER_SYSTEM
#define EMFT_EXCLUDE_VTRASH CAMEL_FOLDER_VTRASH
-typedef gboolean (*EMFTExcludeFunc)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data);
+typedef gboolean (*EMFTExcludeFunc)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, gpointer data);
struct _EMFolderTree {
GtkTreeView parent_object;
@@ -91,24 +91,24 @@ void em_folder_tree_enable_drag_and_drop (EMFolderTree *emft);
void em_folder_tree_set_multiselect (EMFolderTree *emft, gboolean mode);
void em_folder_tree_set_excluded(EMFolderTree *emft, guint32 flags);
-void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, void *data);
+void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, gpointer data);
void em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expand_only);
GList *em_folder_tree_get_selected_uris (EMFolderTree *emft);
GList *em_folder_tree_get_selected_paths (EMFolderTree *emft);
-void em_folder_tree_set_selected (EMFolderTree *emft, const char *uri, gboolean expand_only);
+void em_folder_tree_set_selected (EMFolderTree *emft, const gchar *uri, gboolean expand_only);
void em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders);
void em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders);
-char *em_folder_tree_get_selected_uri (EMFolderTree *emft);
-char *em_folder_tree_get_selected_path (EMFolderTree *emft);
+gchar *em_folder_tree_get_selected_uri (EMFolderTree *emft);
+gchar *em_folder_tree_get_selected_path (EMFolderTree *emft);
CamelFolder *em_folder_tree_get_selected_folder (EMFolderTree *emft);
CamelFolderInfo *em_folder_tree_get_selected_folder_info (EMFolderTree *emft);
EMFolderTreeModel *em_folder_tree_get_model (EMFolderTree *emft);
EMFolderTreeModelStoreInfo *em_folder_tree_get_model_storeinfo (EMFolderTree *emft, CamelStore *store);
-gboolean em_folder_tree_create_folder (EMFolderTree *emft, const char *full_name, const char *uri);
+gboolean em_folder_tree_create_folder (EMFolderTree *emft, const gchar *full_name, const gchar *uri);
void em_folder_tree_set_skip_double_click (EMFolderTree *emft, gboolean skip);
G_END_DECLS
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 2b319ff360..1c7755fa69 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -76,7 +76,7 @@
extern CamelSession *session;
static gboolean
-emfu_is_special_local_folder (const char *name)
+emfu_is_special_local_folder (const gchar *name)
{
return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates"));
}
@@ -88,10 +88,10 @@ struct _EMCopyFolders {
CamelStore *fromstore;
CamelStore *tostore;
- char *frombase;
- char *tobase;
+ gchar *frombase;
+ gchar *tobase;
- int delete;
+ gint delete;
};
static gchar *
@@ -107,8 +107,8 @@ emft_copy_folders__exec (struct _EMCopyFolders *m)
GList *pending = NULL, *deleting = NULL, *l;
GString *fromname, *toname;
CamelFolderInfo *fi;
- const char *tmp;
- int fromlen;
+ const gchar *tmp;
+ gint fromlen;
if (!(fi = camel_store_get_folder_info (m->fromstore, m->frombase, flags, &m->base.ex)))
return;
@@ -133,7 +133,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m)
while (info) {
CamelFolder *fromfolder, *tofolder;
GPtrArray *uids;
- int deleted = 0;
+ gint deleted = 0;
if (info->child)
pending = g_list_append (pending, info->child);
@@ -238,11 +238,11 @@ static MailMsgInfo copy_folders_info = {
(MailMsgFreeFunc) emft_copy_folders__free
};
-int
-em_folder_utils_copy_folders(CamelStore *fromstore, const char *frombase, CamelStore *tostore, const char *tobase, int delete)
+gint
+em_folder_utils_copy_folders(CamelStore *fromstore, const gchar *frombase, CamelStore *tostore, const gchar *tobase, gint delete)
{
struct _EMCopyFolders *m;
- int seq;
+ gint seq;
m = mail_msg_new (&copy_folders_info);
camel_object_ref (fromstore);
@@ -265,7 +265,7 @@ struct _copy_folder_data {
};
static void
-emfu_copy_folder_selected (const char *uri, void *data)
+emfu_copy_folder_selected (const gchar *uri, gpointer data)
{
struct _copy_folder_data *cfd = data;
CamelStore *fromstore = NULL, *tostore = NULL;
@@ -324,11 +324,11 @@ fail:
/* tree here is the 'destination' selector, not 'self' */
static gboolean
-emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, void *data)
+emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
struct _copy_folder_data *cfd = data;
- int fromvfolder, tovfolder;
- char *touri;
+ gint fromvfolder, tovfolder;
+ gchar *touri;
guint flags;
gboolean is_store;
@@ -355,7 +355,7 @@ emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *i
/* FIXME: this interface references the folderinfo without copying it */
/* FIXME: these functions must be documented */
void
-em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete)
+em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, gint delete)
{
struct _copy_folder_data *cfd;
@@ -369,7 +369,7 @@ em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete)
}
static void
-emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, void *data)
+emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data)
{
GtkWidget *dialog = data;
@@ -385,7 +385,7 @@ emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, voi
}
static void
-emfu_delete_response (GtkWidget *dialog, int response, gpointer data)
+emfu_delete_response (GtkWidget *dialog, gint response, gpointer data)
{
if (response == GTK_RESPONSE_OK) {
/* disable dialog until operation finishes */
@@ -403,7 +403,7 @@ em_folder_utils_delete_folder (CamelFolder *folder)
{
CamelStore *local_store;
GtkWidget *dialog;
- int flags = 0;
+ gint flags = 0;
local_store = e_mail_shell_backend_get_local_store (global_mail_shell_backend);
@@ -434,8 +434,8 @@ em_folder_utils_delete_folder (CamelFolder *folder)
void
em_folder_utils_rename_folder (CamelFolder *folder)
{
- char *prompt, *new_name;
- const char *p;
+ gchar *prompt, *new_name;
+ const gchar *p;
CamelStore *local_store;
gboolean done = FALSE;
size_t base_len;
@@ -467,7 +467,7 @@ em_folder_utils_rename_folder (CamelFolder *folder)
} else {
CamelFolderInfo *fi;
CamelException ex;
- char *path, *tmp;
+ gchar *path, *tmp;
if (base_len > 0) {
path = g_malloc (base_len + strlen (new_name) + 2);
@@ -485,7 +485,7 @@ em_folder_utils_rename_folder (CamelFolder *folder)
e_error_run(NULL,
"mail:no-rename-folder-exists", folder->name, new_name, NULL);
} else {
- const char *oldpath, *newpath;
+ const gchar *oldpath, *newpath;
oldpath = folder->full_name;
newpath = path;
@@ -515,16 +515,16 @@ struct _EMCreateFolder {
/* input data */
CamelStore *store;
- char *full_name;
- char *parent;
- char *name;
+ gchar *full_name;
+ gchar *parent;
+ gchar *name;
/* output data */
CamelFolderInfo *fi;
/* callback data */
- void (* done) (CamelFolderInfo *fi, void *user_data);
- void *user_data;
+ void (* done) (CamelFolderInfo *fi, gpointer user_data);
+ gpointer user_data;
};
/* Temporary Structure to hold data to pass across function */
@@ -532,7 +532,7 @@ struct _EMCreateFolderTempData
{
EMFolderTree * emft;
EMFolderSelector * emfs;
- char *uri;
+ gchar *uri;
};
static gchar *
@@ -579,12 +579,12 @@ static MailMsgInfo create_folder_info = {
static int
-emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done) (CamelFolderInfo *fi, void *user_data), void *user_data)
+emfu_create_folder_real (CamelStore *store, const gchar *full_name, void (* done) (CamelFolderInfo *fi, gpointer user_data), gpointer user_data)
{
- char *name, *namebuf = NULL;
+ gchar *name, *namebuf = NULL;
struct _EMCreateFolder *m;
- const char *parent;
- int id;
+ const gchar *parent;
+ gint id;
namebuf = g_strdup (full_name);
if (!(name = strrchr (namebuf, '/'))) {
@@ -613,7 +613,7 @@ emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done)
}
static void
-new_folder_created_cb (CamelFolderInfo *fi, void *user_data)
+new_folder_created_cb (CamelFolderInfo *fi, gpointer user_data)
{
struct _EMCreateFolderTempData *emcftd=user_data;
if (fi){
@@ -629,10 +629,10 @@ new_folder_created_cb (CamelFolderInfo *fi, void *user_data)
}
static void
-emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer data)
+emfu_popup_new_folder_response (EMFolderSelector *emfs, gint response, gpointer data)
{
EMFolderTreeModelStoreInfo *si;
- const char *uri, *path;
+ const gchar *uri, *path;
CamelException ex;
CamelStore *store;
struct _EMCreateFolderTempData *emcftd;
diff --git a/mail/em-folder-utils.h b/mail/em-folder-utils.h
index f78dbbcd66..db7ddb82fd 100644
--- a/mail/em-folder-utils.h
+++ b/mail/em-folder-utils.h
@@ -35,13 +35,13 @@ gint em_folder_utils_copy_folders (CamelStore *fromstore,
const gchar *frombase,
CamelStore *tostore,
const gchar *tobase,
- int delete);
+ gint delete);
/* FIXME These API's are really busted. There is no consistency and
* most rely on the wrong data. */
void em_folder_utils_copy_folder (CamelFolderInfo *folderinfo,
- int delete);
+ gint delete);
void em_folder_utils_delete_folder (CamelFolder *folder);
void em_folder_utils_rename_folder (CamelFolder *folder);
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index b72e187365..9c56d84f4f 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -183,9 +183,9 @@ struct _EMFolderViewPrivate {
guint destroyed:1;
GtkWidget *invisible;
- char *selection_uri;
+ gchar *selection_uri;
- char *selected_uid;
+ gchar *selected_uid;
};
static GtkVBoxClass *emfv_parent;
@@ -221,7 +221,7 @@ emfv_init(GObject *o)
//
// emfv->ui_app_name = "evolution-mail";
- emfv->enable_map = g_slist_prepend(NULL, (void *)emfv_enable_map);
+ emfv->enable_map = g_slist_prepend(NULL, (gpointer)emfv_enable_map);
// emfv->list = (MessageList *)message_list_new();
// g_signal_connect(emfv->list, "message_selected", G_CALLBACK(emfv_list_message_selected), emfv);
@@ -306,7 +306,7 @@ emfv_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint
if (p->selection_uri == NULL)
return;
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)p->selection_uri, strlen(p->selection_uri));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)p->selection_uri, strlen(p->selection_uri));
}
static void
@@ -332,13 +332,13 @@ emfv_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EMFolder
/* a lot of stuff maps directly to the popup menu equivalent */
#define EMFV_MAP_CALLBACK(from, to) \
static void \
-from(BonoboUIComponent *uid, void *data, const char *path) \
+from(BonoboUIComponent *uid, gpointer data, const gchar *path) \
{ \
to(NULL, NULL, data); \
}
static void
-emfv_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
+emfv_edit_cut(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -349,7 +349,7 @@ emfv_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
+emfv_edit_copy(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -360,7 +360,7 @@ emfv_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
+emfv_edit_paste(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -368,7 +368,7 @@ emfv_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data)
+emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
@@ -397,7 +397,7 @@ emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data)
static void
-emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, void *data)
+emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
@@ -443,7 +443,7 @@ static BonoboUIVerb emfv_message_verbs[] = {
};
static void
-emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
+emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint act)
{
if (act) {
@@ -454,7 +454,7 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
emfv->uic = uic;
for (l = emfv->ui_files;l;l = l->next)
- bonobo_ui_util_set_ui(uic, PREFIX, (char *)l->data, emfv->ui_app_name, NULL);
+ bonobo_ui_util_set_ui(uic, PREFIX, (gchar *)l->data, emfv->ui_app_name, NULL);
bonobo_ui_component_add_verb_list_with_data(uic, emfv_message_verbs, emfv);
/* must do plugin menu's after main ones because of bonobo bustedness */
@@ -502,7 +502,7 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
}
EMPopupTargetSelect *
-em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display)
+em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, gint on_display)
{
EMPopupTargetSelect *t;
@@ -560,7 +560,7 @@ em_folder_view_set_hide_deleted(EMFolderView *emfv, gboolean status)
struct mst_t {
EMFolderView *emfv;
- char *uid;
+ gchar *uid;
};
static void
@@ -586,7 +586,7 @@ do_mark_seen (gpointer user_data)
}
static void
-emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *ex)
+emfv_list_done_message_selected(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *ex)
{
EMFolderView *emfv = data;
EMEvent *eme;
@@ -682,7 +682,7 @@ emfv_spin(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
}
static gboolean
-emfv_message_selected_timeout(void *data)
+emfv_message_selected_timeout(gpointer data)
{
EMFolderView *emfv = data;
@@ -745,7 +745,7 @@ emfv_popup_menu (GtkWidget *widget)
}
static void
-emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data)
+emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
struct _EMFolderViewPrivate *p = emfv->priv;
@@ -766,7 +766,7 @@ static EPopupItem emfv_uri_popups[] = {
};
static void
-emfv_uri_popup_free(EPopup *ep, GSList *list, void *data)
+emfv_uri_popup_free(EPopup *ep, GSList *list, gpointer data)
{
while (list) {
GSList *n = list->next;
@@ -803,7 +803,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu
{
GtkWidget *separator;
GList *children, *p;
- char *name;
+ gchar *name;
if (!src_menu)
return des_menu;
@@ -835,7 +835,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu
}
static int
-emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, CamelMimePart *part, EMFolderView *emfv)
+emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, CamelMimePart *part, EMFolderView *emfv)
{
GtkMenu *menu = NULL;
EMPopup *main_emp = NULL;
@@ -843,7 +843,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (uri == NULL && part == NULL) {
/* So we don't try and popup with nothing selected - rather odd result! */
GPtrArray *uids = message_list_get_selected(emfv->list);
- int doit = uids->len > 0;
+ gint doit = uids->len > 0;
message_list_free_uids(emfv->list, uids);
if (doit)
@@ -875,10 +875,10 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (uri) {
gboolean have_more_uris = strchr (uri, '\n') != NULL;
- const char *act, *next;
+ const gchar *act, *next;
for (act = uri; act; act = next) {
- char *u;
+ gchar *u;
next = strchr (act, '\n');
if (next) {
u = g_strndup (act, next - act);
@@ -888,7 +888,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (u && *u) {
GSList *menus = NULL;
- int i;
+ gint i;
EMPopupTargetURI *t;
EMPopup *emp;
EPopupTarget *target;
@@ -913,7 +913,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (strlen (u) > 100) {
GString *str;
- char *c;
+ gchar *c;
/* the url should be in the form of http://a.b.c/... and we want to
see where the image comes from, so skip first 10 characters and
@@ -968,7 +968,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
}
static void
-emfv_set_seen(EMFolderView *emfv, const char *uid)
+emfv_set_seen(EMFolderView *emfv, const gchar *uid)
{
guint32 old_flags = camel_folder_get_message_flags(emfv->folder, uid);
@@ -988,7 +988,7 @@ enum {
};
/* IF these get too long, update key field */
-static const char * const emfv_display_keys[] = {
+static const gchar * const emfv_display_keys[] = {
"charset",
"headers",
"show_deleted",
@@ -1000,7 +1000,7 @@ static void
emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFolderView *emfv)
{
GConfValue *value;
- char *tkey;
+ gchar *tkey;
g_return_if_fail (gconf_entry_get_key (entry) != NULL);
@@ -1023,7 +1023,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
p = header_config_list;
while (p) {
EMMailerPrefsHeader *h;
- char *xml = (char *)p->data;
+ gchar *xml = (gchar *)p->data;
h = em_mailer_prefs_header_from_xml(xml);
if (h && h->enabled) {
diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h
index f55fda2c81..4a5de110f8 100644
--- a/mail/em-folder-view.h
+++ b/mail/em-folder-view.h
@@ -71,7 +71,7 @@ enum {
};
struct _EMFolderViewEnable {
- const char *name; /* bonobo name, relative to /commands/ */
+ const gchar *name; /* bonobo name, relative to /commands/ */
guint32 mask; /* disable mask, see EM_FOLDER_VIEW_CAN* flags */
};
@@ -85,13 +85,13 @@ struct _EMFolderView {
struct _EMFormatHTMLDisplay *preview;
struct _CamelFolder *folder;
- char *folder_uri;
+ gchar *folder_uri;
- char *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */
+ gchar *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */
/* used to load ui from base activate implementation */
- GSList *ui_files; /* const char * list, TODO: should this be on class? */
- const char *ui_app_name;
+ GSList *ui_files; /* const gchar * list, TODO: should this be on class? */
+ const gchar *ui_app_name;
/* used to manage some menus, particularly plugins */
struct _EMMenu *menu;
@@ -103,7 +103,7 @@ struct _EMFolderView {
GSList *enable_map; /* bonobo menu enable map, entries are 0-terminated EMFolderViewEnable arryas
TODO: should this be on class? */
- int mark_seen_timeout; /* local copy of gconf stuff */
+ gint mark_seen_timeout; /* local copy of gconf stuff */
guint mark_seen:1;
guint preview_active:1; /* is preview being used */
guint statusbar_active:1; /* should we manage the statusbar messages ourselves? */
@@ -118,16 +118,16 @@ struct _EMFolderViewClass {
guint update_message_style:1;
/* if used as a control, used to activate/deactivate custom menu's */
- void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, int state);
+ void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, gint state);
- void (*set_folder_uri)(EMFolderView *emfv, const char *uri);
- void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const char *uri);
- void (*set_message)(EMFolderView *emfv, const char *uid, int nomarkseen);
+ void (*set_folder_uri)(EMFolderView *emfv, const gchar *uri);
+ void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const gchar *uri);
+ void (*set_message)(EMFolderView *emfv, const gchar *uid, gint nomarkseen);
void (*show_search_bar)(EMFolderView *emfv);
/* Signals */
- void (*on_url)(EMFolderView *emfv, const char *uri, const char *nice_uri);
+ void (*on_url)(EMFolderView *emfv, const gchar *uri, const gchar *nice_uri);
void (*loaded)(EMFolderView *emfv);
void (*changed)(EMFolderView *emfv);
@@ -142,15 +142,15 @@ GtkWidget *em_folder_view_new(void);
#define em_folder_view_set_folder_uri(emfv, uri) EM_FOLDER_VIEW_GET_CLASS (emfv)->set_folder_uri((emfv), (uri))
#define em_folder_view_set_message(emfv, uid, nomarkseen) EM_FOLDER_VIEW_GET_CLASS (emfv)->set_message((emfv), (uid), (nomarkseen))
-void em_folder_view_select_next_message(EMFolderView *emfv, int count, gboolean always_can_previous);
-void em_folder_view_message_reply(EMFolderView *emfv, int mode);
+void em_folder_view_select_next_message(EMFolderView *emfv, gint count, gboolean always_can_previous);
+void em_folder_view_message_reply(EMFolderView *emfv, gint mode);
-EMPopupTargetSelect *em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display);
+EMPopupTargetSelect *em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, gint on_display);
-int em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set);
-int em_folder_view_open_selected(EMFolderView *emfv);
+gint em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set);
+gint em_folder_view_open_selected(EMFolderView *emfv);
-int em_folder_view_print(EMFolderView *emfv, GtkPrintOperationAction action);
+gint em_folder_view_print(EMFolderView *emfv, GtkPrintOperationAction action);
/* this could be on message-list */
guint32 em_folder_view_disable_mask(EMFolderView *emfv);
diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c
index 9fec654ae5..ad7cbd7144 100644
--- a/mail/em-format-hook.c
+++ b/mail/em-format-hook.c
@@ -52,7 +52,7 @@ static GHashTable *emfh_types;
*/
-static void *emfh_parent_class;
+static gpointer emfh_parent_class;
#define emfh ((EMFormatHook *)eph)
#define d(x)
@@ -141,7 +141,7 @@ emfh_construct_group(EPluginHook *eph, xmlNodePtr root)
node = root->children;
while (node) {
- if (0 == strcmp((char *)node->name, "item")) {
+ if (0 == strcmp((gchar *)node->name, "item")) {
struct _EMFormatHookItem *item;
item = emfh_construct_item(eph, group, node);
@@ -169,7 +169,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
node = root->children;
while (node) {
- if (strcmp((char *)node->name, "group") == 0) {
+ if (strcmp((gchar *)node->name, "group") == 0) {
struct _EMFormatHookGroup *group;
group = emfh_construct_group(eph, node);
@@ -203,7 +203,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
}
static void
-emfh_enable(EPluginHook *eph, int state)
+emfh_enable(EPluginHook *eph, gint state)
{
GSList *g, *l;
EMFormatClass *klass;
@@ -275,5 +275,5 @@ void em_format_hook_register_type(GType type)
d(printf("registering formatter type '%s'\n", g_type_name(type)));
klass = g_type_class_ref(type);
- g_hash_table_insert(emfh_types, (void *)g_type_name(type), klass);
+ g_hash_table_insert(emfh_types, (gpointer)g_type_name(type), klass);
}
diff --git a/mail/em-format-hook.h b/mail/em-format-hook.h
index 6fed1b1088..f2b5b8f387 100644
--- a/mail/em-format-hook.h
+++ b/mail/em-format-hook.h
@@ -55,12 +55,12 @@ struct _EMFormatHookItem {
EMFormatHandler handler;
struct _EMFormatHook *hook; /* parent pointer */
- char *format; /* format handler */
+ gchar *format; /* format handler */
};
struct _EMFormatHookGroup {
struct _EMFormatHook *hook; /* parent pointer */
- char *id; /* target formatter id */
+ gchar *id; /* target formatter id */
GSList *items; /* items to consider */
};
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 1cfe836e76..dbd3ddbbc3 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -105,7 +105,7 @@ struct _EMFormatHTMLDisplayPrivate {
struct _smime_pobject {
EMFormatHTMLPObject object;
- int signature;
+ gint signature;
CamelCipherValidity *valid;
GtkWidget *widget;
};
@@ -113,7 +113,7 @@ struct _smime_pobject {
/* TODO: move the dialogue elsehwere */
/* FIXME: also in em-format-html.c */
static const struct {
- const char *icon, *shortdesc, *description;
+ const gchar *icon, *shortdesc, *description;
} smime_sign_table[5] = {
{ "stock_signature-bad", N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") },
{ "stock_signature-ok", N_("Valid signature"), N_("This message is signed and is valid meaning that it is very likely that this message is authentic.") },
@@ -124,7 +124,7 @@ static const struct {
};
static const struct {
- const char *icon, *shortdesc, *description;
+ const gchar *icon, *shortdesc, *description;
} smime_encrypt_table[4] = {
{ "stock_lock-broken", N_("Unencrypted"), N_("This message is not encrypted. Its content may be viewed in transit across the Internet.") },
{ "stock_lock-ok", N_("Encrypted, weak"), N_("This message is encrypted, but with a weak encryption algorithm. It would be difficult, but not impossible for an outsider to view the content of this message in a practical amount of time.") },
@@ -132,7 +132,7 @@ static const struct {
{ "stock_lock-ok", N_("Encrypted, strong"), N_("This message is encrypted, with a strong encryption algorithm. It would be very difficult for an outsider to view the content of this message in a practical amount of time.") },
};
-static const char *smime_sign_colour[5] = {
+static const gchar *smime_sign_colour[5] = {
"", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\"",""
};
@@ -147,13 +147,13 @@ struct _attach_puri {
const EMFormatHandler *handle;
- const char *snoop_mime_type;
+ const gchar *snoop_mime_type;
/* for the > and V buttons */
GtkWidget *forward, *down;
/* currently no way to correlate this data to the frame :( */
GtkHTML *frame;
- unsigned int shown:1;
+ guint shown:1;
/* Embedded Frame */
GtkHTMLEmbedded *html;
@@ -162,8 +162,8 @@ struct _attach_puri {
EAttachment *attachment;
/* image stuff */
- int fit_width;
- int fit_height;
+ gint fit_width;
+ gint fit_height;
GtkImage *image;
GtkWidget *event_box;
@@ -240,11 +240,11 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox,
{
CamelCipherCertInfo *info = (CamelCipherCertInfo *)certlist->head;
GtkTable *table = (GtkTable *)gtk_table_new(camel_dlist_length(certlist), 2, FALSE);
- int n = 0;
+ gint n = 0;
while (info->next) {
- char *la = NULL;
- const char *l = NULL;
+ gchar *la = NULL;
+ const gchar *l = NULL;
if (info->name) {
if (info->email && strcmp(info->name, info->email) != 0)
@@ -301,7 +301,7 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button,
struct _smime_pobject *po = (struct _smime_pobject *)pobject;
GladeXML *xml;
GtkWidget *vbox, *w;
- char *gladefile;
+ gchar *gladefile;
if (po->widget)
/* FIXME: window raise? */
@@ -392,7 +392,7 @@ efhd_xpkcs7mime_button (EMFormatHTML *efh,
GtkWidget *container;
GtkWidget *widget;
struct _smime_pobject *po = (struct _smime_pobject *)pobject;
- const char *icon_name;
+ const gchar *icon_name;
/* FIXME: need to have it based on encryption and signing too */
if (po->valid->sign.status != 0)
@@ -441,7 +441,7 @@ efhd_format_attachment (EMFormat *emf,
const gchar *mime_type,
const EMFormatHandler *handle)
{
- char *classid, *text, *html;
+ gchar *classid, *text, *html;
struct _attach_puri *info;
classid = g_strdup_printf ("attachment%s", emf->part_id->str);
@@ -501,7 +501,7 @@ efhd_format_optional (EMFormat *emf,
CamelMimePart *part,
CamelStream *mstream)
{
- char *classid, *html;
+ gchar *classid, *html;
struct _attach_puri *info;
CamelStream *stream;
@@ -569,7 +569,7 @@ efhd_format_secure (EMFormat *emf,
if (emf->valid == valid
&& (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
|| valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
- char *classid;
+ gchar *classid;
struct _smime_pobject *pobj;
camel_stream_printf (
@@ -694,7 +694,7 @@ em_format_html_display_new (void)
static void
efhd_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *handle)
{
- char *classid;
+ gchar *classid;
struct _attach_puri *info;
classid = g_strdup_printf("image%s", ((EMFormat *)efh)->part_id->str);
@@ -748,7 +748,7 @@ static EMFormatHandler type_builtin_table[] = {
static void
efhd_builtin_init(EMFormatHTMLDisplayClass *efhc)
{
- int i;
+ gint i;
for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
@@ -768,11 +768,11 @@ efhd_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
static void
efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- const char *flag, *comp, *due;
+ const gchar *flag, *comp, *due;
time_t date;
- char due_date[128];
+ gchar due_date[128];
struct tm due_tm;
- char *iconpath;
+ gchar *iconpath;
if (emf->folder == NULL || emf->uid == NULL
|| (flag = camel_folder_get_message_user_tag(emf->folder, emf->uid, "follow-up")) == NULL
@@ -790,7 +790,7 @@ efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMF
iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath);
g_free (iconpath);
if (iconpart) {
- char *classid;
+ gchar *classid;
classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp");
camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid);
@@ -844,7 +844,7 @@ efhd_can_process_attachment (GtkWidget *button)
/* if it hasn't been processed yet, format the attachment */
static void
-efhd_attachment_show(EPopup *ep, EPopupItem *item, void *data)
+efhd_attachment_show(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _attach_puri *info = data;
@@ -866,7 +866,7 @@ efhd_attachment_button_expanded (GtkWidget *widget,
}
static void
-efhd_image_fit(EPopup *ep, EPopupItem *item, void *data)
+efhd_image_fit(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _attach_puri *info = data;
@@ -875,7 +875,7 @@ efhd_image_fit(EPopup *ep, EPopupItem *item, void *data)
}
static void
-efhd_image_unfit(EPopup *ep, EPopupItem *item, void *data)
+efhd_image_unfit(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _attach_puri *info = data;
@@ -892,13 +892,13 @@ static EPopupItem efhd_menu_items[] = {
};
static void
-efhd_menu_items_free(EPopup *ep, GSList *items, void *data)
+efhd_menu_items_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-efhd_popup_place_widget(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer user_data)
+efhd_popup_place_widget(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
{
GtkWidget *w = user_data;
@@ -983,7 +983,7 @@ static void
efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, guint info, guint time, EMFormatHTMLPObject *pobject)
{
CamelMimePart *part = pobject->part;
- char *uri, *uri_crlf, *path;
+ gchar *uri, *uri_crlf, *path;
CamelStream *stream;
switch (info) {
@@ -1009,7 +1009,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g
/* Kludge around Nautilus requesting the same data many times */
uri = g_object_get_data((GObject *)w, "e-drag-uri");
if (uri) {
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri, strlen(uri));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)uri, strlen(uri));
return;
}
@@ -1021,7 +1021,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g
g_free(path);
uri_crlf = g_strconcat(uri, "\r\n", NULL);
g_free(uri);
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)uri_crlf, strlen(uri_crlf));
g_object_set_data_full((GObject *)w, "e-drag-uri", uri_crlf, g_free);
break;
default:
@@ -1032,7 +1032,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g
static void
efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *pobject)
{
- char *uri;
+ gchar *uri;
uri = g_object_get_data((GObject *)w, "e-drag-uri");
if (uri) {
@@ -1041,7 +1041,7 @@ efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *p
/* NB even more: doesn't the e-drag-uri have \r\n
* appended? (see efhd_drag_data_get())
*/
- char *filename = g_filename_from_uri (uri, NULL, NULL);
+ gchar *filename = g_filename_from_uri (uri, NULL, NULL);
g_unlink(filename);
g_free(filename);
g_object_set_data((GObject *)w, "e-drag-uri", NULL);
@@ -1049,7 +1049,7 @@ efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *p
}
static void
-efhd_write_icon_job(struct _EMFormatHTMLJob *job, int cancelled)
+efhd_write_icon_job(struct _EMFormatHTMLJob *job, gint cancelled)
{
EMFormatHTMLPObject *pobject;
CamelDataWrapper *dw;
@@ -1067,7 +1067,7 @@ static void
efhd_image_resized(GtkWidget *w, GtkAllocation *event, struct _attach_puri *info)
{
GdkPixbuf *pb;
- int width;
+ gint width;
if (info->fit_width == 0)
return;
@@ -1099,7 +1099,7 @@ efhd_change_cursor(GtkWidget *w, GdkEventCrossing *event, struct _attach_puri *i
static void
efhd_image_fit_width(GtkWidget *widget, GdkEventButton *event, struct _attach_puri *info)
{
- int width;
+ gint width;
width = ((GtkWidget *)((EMFormatHTML *)info->puri.format)->html)->allocation.width - 12;
@@ -1150,7 +1150,7 @@ efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObjec
{ NULL, 0, 0 },
{ (gchar *) "text/uri-list", 0, 1 },
};
- char *simple_type;
+ gchar *simple_type;
info = (struct _attach_puri *)em_format_find_puri((EMFormat *)efh, pobject->classid);
@@ -1313,7 +1313,7 @@ efhd_message_add_bar (EMFormat *emf,
CamelMimePart *part,
const EMFormatHandler *info)
{
- const char *classid = "attachment-bar";
+ const gchar *classid = "attachment-bar";
em_format_html_add_pobject (
EM_FORMAT_HTML (emf),
@@ -1413,7 +1413,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE);
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW (view));
- gtk_text_buffer_set_text (buffer, (char *)info->mstream->buffer->data, info->mstream->buffer->len);
+ gtk_text_buffer_set_text (buffer, (gchar *)info->mstream->buffer->data, info->mstream->buffer->len);
camel_object_unref(info->mstream);
info->mstream = NULL;
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index 88bcb10dac..773bc04b0d 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -206,7 +206,7 @@ emfhp_complete (EMFormatHTMLPrint *efhp)
}
static void
-emfhp_got_message (CamelFolder *folder, const char *uid,
+emfhp_got_message (CamelFolder *folder, const gchar *uid,
CamelMimeMessage *msg, gpointer data)
{
EMFormatHTMLPrint *efhp = data;
@@ -228,7 +228,7 @@ emfhp_got_message (CamelFolder *folder, const char *uid,
void
em_format_html_print_message (EMFormatHTMLPrint *efhp,
CamelFolder *folder,
- const char *uid)
+ const gchar *uid)
{
g_object_ref (efhp);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 6bc4a79794..1991c0d67f 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -92,12 +92,12 @@
struct _EMFormatHTMLCache {
CamelMultipart *textmp;
- char partid[1];
+ gchar partid[1];
};
struct _EMFormatHTMLPrivate {
struct _CamelMimeMessage *last_part; /* not reffed, DO NOT dereference */
- volatile int format_id; /* format thread id */
+ volatile gint format_id; /* format thread id */
guint format_timeout_id;
struct _format_msg *format_timeout_msg;
@@ -129,7 +129,7 @@ enum {
PROP_TEXT_COLOR
};
-static void efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh);
+static void efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh);
static gboolean efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh);
static void efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh);
@@ -154,7 +154,7 @@ struct _format_msg {
EMFormat *format_source;
EMHTMLStream *estream;
CamelFolder *folder;
- char *uid;
+ gchar *uid;
CamelMimeMessage *message;
};
@@ -169,7 +169,7 @@ efh_format_exec (struct _format_msg *m)
{
struct _EMFormatHTMLJob *job;
struct _EMFormatPURITree *puri_level;
- int cancelled = FALSE;
+ gint cancelled = FALSE;
CamelURL *base;
if (m->format->html == NULL)
@@ -395,7 +395,7 @@ efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh)
}
static struct _EMFormatHTMLCache *
-efh_insert_cache(EMFormatHTML *efh, const char *partid)
+efh_insert_cache(EMFormatHTML *efh, const gchar *partid)
{
struct _EMFormatHTMLCache *efhc;
@@ -685,7 +685,7 @@ efh_format_attachment (EMFormat *emf,
const gchar *mime_type,
const EMFormatHandler *handle)
{
- char *text, *html;
+ gchar *text, *html;
/* we display all inlined attachments only */
@@ -1123,12 +1123,12 @@ em_format_html_set_show_sender_photo (EMFormatHTML *efh,
}
CamelMimePart *
-em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *filename)
+em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar *filename)
{
CamelMimePart *part;
CamelStream *stream;
CamelDataWrapper *dw;
- char *basename;
+ gchar *basename;
stream = camel_stream_fs_new_with_name(filename, O_RDONLY, 0);
if (stream == NULL)
@@ -1153,7 +1153,7 @@ em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *f
/* all this api is a pain in the bum ... */
EMFormatHTMLPObject *
-em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
+em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
{
EMFormatHTMLPObject *pobj;
@@ -1178,7 +1178,7 @@ em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid,
}
EMFormatHTMLPObject *
-em_format_html_find_pobject(EMFormatHTML *emf, const char *classid)
+em_format_html_find_pobject(EMFormatHTML *emf, const gchar *classid)
{
EMFormatHTMLPObject *pw;
@@ -1226,7 +1226,7 @@ em_format_html_clear_pobject(EMFormatHTML *emf)
}
struct _EMFormatHTMLJob *
-em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, int cancelled), void *data)
+em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, gint cancelled), gpointer data)
{
struct _EMFormatHTMLJob *job = g_malloc0(sizeof(*job));
@@ -1250,22 +1250,22 @@ em_format_html_job_queue(EMFormatHTML *emfh, struct _EMFormatHTMLJob *job)
/* ********************************************************************** */
-static void emfh_getpuri(struct _EMFormatHTMLJob *job, int cancelled)
+static void emfh_getpuri(struct _EMFormatHTMLJob *job, gint cancelled)
{
d(printf(" running getpuri task\n"));
if (!cancelled)
job->u.puri->func((EMFormat *)job->format, job->stream, job->u.puri);
}
-static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled)
+static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
{
CamelStream *cistream = NULL, *costream = NULL, *instream = NULL;
CamelURL *url;
CamelContentType *content_type;
CamelHttpStream *tmp_stream;
ssize_t n, total = 0, pc_complete = 0, nread = 0;
- char buffer[1500];
- const char *length;
+ gchar buffer[1500];
+ const gchar *length;
if (cancelled
|| (url = camel_url_new(job->u.uri, NULL)) == NULL)
@@ -1278,7 +1278,7 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled)
if (instream == NULL) {
MailConfigHTTPMode policy;
- char *proxy;
+ gchar *proxy;
policy = em_format_html_get_image_loading_policy (job->format);
@@ -1364,7 +1364,7 @@ badurl:
/* ********************************************************************** */
static void
-efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh)
+efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh)
{
EMFormatPURI *puri;
struct _EMFormatHTMLJob *job = NULL;
@@ -1398,7 +1398,7 @@ efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMForma
d(printf(" adding job, get %s\n", url));
job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url));
} else if (g_ascii_strncasecmp(url, "/", 1) == 0) {
- char *data = NULL;
+ gchar *data = NULL;
gsize length = 0;
gboolean status;
@@ -1423,7 +1423,7 @@ static gboolean
efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
{
EMFormatHTMLPObject *pobject;
- int res = FALSE;
+ gint res = FALSE;
if (eb->classid == NULL)
return FALSE;
@@ -1447,7 +1447,7 @@ efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
/* FIXME: This is duplicated in em-format-html-display, should be exported or in security module */
static const struct {
- const char *icon, *shortdesc;
+ const gchar *icon, *shortdesc;
} smime_sign_table[5] = {
{ "stock_signature-bad", N_("Unsigned") },
{ "stock_signature-ok", N_("Valid signature") },
@@ -1457,7 +1457,7 @@ static const struct {
};
static const struct {
- const char *icon, *shortdesc;
+ const gchar *icon, *shortdesc;
} smime_encrypt_table[4] = {
{ "stock_lock-broken", N_("Unencrypted") },
{ "stock_lock", N_("Encrypted, weak"),},
@@ -1465,7 +1465,7 @@ static const struct {
{ "stock_lock-ok", N_("Encrypted, strong") },
};
-static const char *smime_sign_colour[4] = {
+static const gchar *smime_sign_colour[4] = {
"", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\""
};
@@ -1487,8 +1487,8 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
if (emf->valid == valid
&& (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
|| valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
- char *classid, *iconpath;
- const char *icon;
+ gchar *classid, *iconpath;
+ const gchar *icon;
CamelMimePart *iconpart;
camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
@@ -1530,10 +1530,10 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
CamelMultipart *mp;
CamelDataWrapper *dw;
CamelContentType *type;
- const char *format;
+ const gchar *format;
guint32 flags;
guint32 rgb;
- int i, count, len;
+ gint i, count, len;
struct _EMFormatHTMLCache *efhc;
flags = efh->text_html_flags;
@@ -1679,7 +1679,7 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
#if d(!)0
CamelStream *out;
- int fd;
+ gint fd;
CamelDataWrapper *dw;
fd = dup(STDOUT_FILENO);
@@ -1696,10 +1696,10 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
static void
efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- const char *location;
+ const gchar *location;
/* This is set but never used for anything */
EMFormatPURI *puri;
- char *cid = NULL;
+ gchar *cid = NULL;
camel_stream_printf (
stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; color: #%06x;\">\n"
@@ -1751,8 +1751,8 @@ static void
efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
CamelContentType *type;
- const char *access_type;
- char *url = NULL, *desc = NULL;
+ const gchar *access_type;
+ gchar *url = NULL, *desc = NULL;
if (!part) {
camel_stream_printf(stream, _("Unknown external-body part."));
@@ -1769,9 +1769,9 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
if (!g_ascii_strcasecmp(access_type, "ftp") ||
!g_ascii_strcasecmp(access_type, "anon-ftp")) {
- const char *name, *site, *dir, *mode;
- char *path;
- char ftype[16];
+ const gchar *name, *site, *dir, *mode;
+ gchar *path;
+ gchar ftype[16];
name = camel_content_type_param (type, "name");
site = camel_content_type_param (type, "site");
@@ -1795,7 +1795,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
g_free (path);
desc = g_strdup_printf (_("Pointer to FTP site (%s)"), url);
} else if (!g_ascii_strcasecmp (access_type, "local-file")) {
- const char *name, *site;
+ const gchar *name, *site;
name = camel_content_type_param (type, "name");
site = camel_content_type_param (type, "site");
@@ -1808,8 +1808,8 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
else
desc = g_strdup_printf(_("Pointer to local file (%s)"), name);
} else if (!g_ascii_strcasecmp (access_type, "URL")) {
- const char *urlparam;
- char *s, *d;
+ const gchar *urlparam;
+ gchar *s, *d;
/* RFC 2017 */
@@ -1882,11 +1882,11 @@ emfh_write_related(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
}
static void
-emfh_multipart_related_check(struct _EMFormatHTMLJob *job, int cancelled)
+emfh_multipart_related_check(struct _EMFormatHTMLJob *job, gint cancelled)
{
struct _EMFormatPURITree *ptree;
EMFormatPURI *puri, *purin;
- char *oldpartid;
+ gchar *oldpartid;
if (cancelled)
return;
@@ -1921,8 +1921,8 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
- const char *start;
- int i, nparts, partidlen, displayid = 0;
+ const gchar *start;
+ gint i, nparts, partidlen, displayid = 0;
/* puri is set but never used */
EMFormatPURI *puri;
struct _EMFormatHTMLJob *job;
@@ -1936,8 +1936,8 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
content_type = camel_mime_part_get_content_type(part);
start = camel_content_type_param (content_type, "start");
if (start && strlen(start)>2) {
- int len;
- const char *cid;
+ gint len;
+ const gchar *cid;
/* strip <>'s */
len = strlen (start) - 2;
@@ -2064,10 +2064,10 @@ efh_builtin_init(EMFormatHTMLClass *efhc)
/* ********************************************************************** */
static void
-efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *label, const char *value, guint32 flags)
+efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const gchar *label, const gchar *value, guint32 flags)
{
- const char *fmt, *html;
- char *mhtml = NULL;
+ const gchar *fmt, *html;
+ gchar *mhtml = NULL;
gboolean is_rtl;
if (value == NULL)
@@ -2126,11 +2126,11 @@ static gchar *
efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_address *a, gchar *field)
{
guint32 flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES;
- char *name, *mailto, *addr;
- int i=0;
+ gchar *name, *mailto, *addr;
+ gint i=0;
gboolean wrap = FALSE;
- char *str = NULL;
- int limit = mail_config_get_address_count ();
+ gchar *str = NULL;
+ gint limit = mail_config_get_address_count ();
if (field ) {
if ((!strcmp (field, _("To")) && !(efh->header_wrap_flags & EM_FORMAT_HTML_HEADER_TO))
@@ -2148,11 +2148,11 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
switch (a->type) {
case CAMEL_HEADER_ADDRESS_NAME:
if (name && *name) {
- char *real, *mailaddr;
+ gchar *real, *mailaddr;
g_string_append_printf (out, "%s &lt;", name);
/* rfc2368 for mailto syntax and url encoding extras */
- if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) {
+ if ((real = camel_header_encode_phrase ((guchar *)a->name))) {
mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr);
g_free (real);
mailto = camel_url_encode (mailaddr, "?=&()");
@@ -2233,9 +2233,9 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
}
static void
-canon_header_name (char *name)
+canon_header_name (gchar *name)
{
- char *inptr = name;
+ gchar *inptr = name;
/* canonicalise the header name... first letter is
* capitalised and any letter following a '-' also gets
@@ -2257,14 +2257,14 @@ canon_header_name (char *name)
}
static void
-efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const char *charset)
+efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const gchar *charset)
{
EMFormatHTML *efh = (EMFormatHTML *)emf;
- char *name, *buf, *value = NULL;
- const char *label, *txt;
+ gchar *name, *buf, *value = NULL;
+ const gchar *label, *txt;
gboolean addrspec = FALSE;
- char *str_field = NULL;
- int i;
+ gchar *str_field = NULL;
+ gint i;
name = alloca(strlen(header->name)+1);
strcpy(name, header->name);
@@ -2282,7 +2282,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
if (addrspec) {
struct _camel_header_address *addrs;
GString *html;
- char *img;
+ gchar *img;
buf = camel_header_unfold (header->value);
if (!(addrs = camel_header_address_decode (buf, emf->charset ? emf->charset : emf->default_charset))) {
@@ -2293,7 +2293,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
g_free (buf);
html = g_string_new("");
- img = efh_format_address(efh, html, addrs, (char *)label);
+ img = efh_format_address(efh, html, addrs, (gchar *)label);
if (img) {
str_field = g_strdup_printf ("%s%s:", img, label);
@@ -2319,7 +2319,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
txt = value = camel_header_format_ctext (header->value, charset);
flags |= EM_FORMAT_HEADER_BOLD;
} else if (!strcmp (name, "Date") || !strcmp (name, "Resent-Date")) {
- int msg_offset, local_tz;
+ gint msg_offset, local_tz;
time_t msg_date;
struct tm local;
@@ -2337,17 +2337,17 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
msg_offset -= local_tz / 60;
if (msg_offset) {
- char buf[256], *html;
+ gchar buf[256], *html;
msg_offset += (local.tm_hour * 60) + local.tm_min;
if (msg_offset >= (24 * 60) || msg_offset < 0) {
/* translators: strftime format for local time equivalent in Date header display, with day */
- char *msg = g_strdup_printf("<I>%s</I>", _(" (%a, %R %Z)"));
+ gchar *msg = g_strdup_printf("<I>%s</I>", _(" (%a, %R %Z)"));
e_utf8_strftime(buf, sizeof(buf), msg, &local);
g_free(msg);
} else {
/* translators: strftime format for local time equivalent in Date header display, without day */
- char *msg = g_strdup_printf("<I>%s</I>", _(" (%R %Z)"));
+ gchar *msg = g_strdup_printf("<I>%s</I>", _(" (%R %Z)"));
e_utf8_strftime(buf, sizeof(buf), msg, &local);
g_free(msg);
}
@@ -2407,18 +2407,18 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
{
EMFormat *emf = (EMFormat *) efh;
EMFormatHeader *h;
- const char *charset;
+ const gchar *charset;
CamelContentType *ct;
struct _camel_header_raw *header;
gboolean have_icon = FALSE;
- const char *photo_name = NULL;
+ const gchar *photo_name = NULL;
CamelInternetAddress *cia = NULL;
gboolean face_decoded = FALSE, contact_has_photo = FALSE;
guchar *face_header_value = NULL;
gsize face_header_len = 0;
- char *header_sender = NULL, *header_from = NULL, *name;
+ gchar *header_sender = NULL, *header_from = NULL, *name;
gboolean mail_from_delegate = FALSE;
- const char *hdr_charset;
+ const gchar *hdr_charset;
if (!part)
return;
@@ -2506,9 +2506,9 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
header = header->next;
}
} else {
- int mailer_shown = FALSE;
+ gint mailer_shown = FALSE;
while (h->next) {
- int mailer, face;
+ gint mailer, face;
header = ((CamelMimePart *)part)->headers;
mailer = !g_ascii_strcasecmp (h->name, "X-Evolution-Mailer");
@@ -2547,7 +2547,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (strstr(use_header->value, "Evolution"))
have_icon = TRUE;
} else if (!face_decoded && face && !g_ascii_strcasecmp (header->name, "Face")) {
- char *cp = header->value;
+ gchar *cp = header->value;
/* Skip over spaces */
while (*cp == ' ')
@@ -2572,12 +2572,12 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
camel_stream_printf(stream, "</table></td>");
if (photo_name) {
- char *classid;
+ gchar *classid;
CamelMimePart *photopart;
gboolean only_local_photo;
cia = camel_internet_address_new();
- camel_address_decode((CamelAddress *) cia, (const char *) photo_name);
+ camel_address_decode((CamelAddress *) cia, (const gchar *) photo_name);
only_local_photo = em_format_html_get_only_local_photos (efh);
photopart = em_utils_contact_photo (cia, only_local_photo);
@@ -2598,11 +2598,11 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
}
if (!contact_has_photo && face_decoded) {
- char *classid;
+ gchar *classid;
CamelMimePart *part;
part = camel_mime_part_new ();
- camel_mime_part_set_content ((CamelMimePart *) part, (const char *) face_header_value, face_header_len, "image/png");
+ camel_mime_part_set_content ((CamelMimePart *) part, (const gchar *) face_header_value, face_header_len, "image/png");
classid = g_strdup_printf("icon:///em-format-html/face/photo/header");
camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=48 src=\"%s\"></td>", classid);
em_format_add_puri(emf, sizeof(EMFormatPURI), classid, part, efh_write_image);
@@ -2611,7 +2611,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (have_icon && efh->show_icon) {
GtkIconInfo *icon_info;
- char *classid;
+ gchar *classid;
CamelMimePart *iconpart = NULL;
classid = g_strdup_printf("icon:///em-format-html/%s/icon/header", emf->part_id->str);
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
index 3293318104..bcc9a917a9 100644
--- a/mail/em-format-html.h
+++ b/mail/em-format-html.h
@@ -124,13 +124,13 @@ struct _EMFormatHTMLJob {
struct _EMFormatPURITree *puri_level;
CamelURL *base;
- void (*callback)(EMFormatHTMLJob *job, int cancelled);
+ void (*callback)(EMFormatHTMLJob *job, gint cancelled);
union {
- char *uri;
+ gchar *uri;
CamelMedium *msg;
EMFormatPURI *puri;
struct _EMFormatPURITree *puri_level;
- void *data;
+ gpointer data;
} u;
};
@@ -164,7 +164,7 @@ struct _EMFormatHTMLPObject {
void (*free)(EMFormatHTMLPObject *);
EMFormatHTML *format;
- char *classid;
+ gchar *classid;
EMFormatHTMLPObjectFunc func;
CamelMimePart *part;
@@ -216,9 +216,9 @@ struct _EMFormatHTML {
GSList *headers;
guint32 text_html_flags; /* default flags for text to html conversion */
- unsigned int simple_headers:1; /* simple header format, no box/table */
- unsigned int hide_headers:1; /* no headers at all */
- unsigned int show_icon:1; /* show an icon when the sender used Evo */
+ guint simple_headers:1; /* simple header format, no box/table */
+ guint hide_headers:1; /* no headers at all */
+ guint show_icon:1; /* show an icon when the sender used Evo */
guint32 header_wrap_flags;
EMFormatHTMLState state; /* actual state of the object */
@@ -269,12 +269,12 @@ CamelMimePart * em_format_html_file_part (EMFormatHTML *efh,
EMFormatHTMLPObject *
em_format_html_add_pobject (EMFormatHTML *efh,
size_t size,
- const char *classid,
+ const gchar *classid,
CamelMimePart *part,
EMFormatHTMLPObjectFunc func);
EMFormatHTMLPObject *
em_format_html_find_pobject (EMFormatHTML *efh,
- const char *classid);
+ const gchar *classid);
EMFormatHTMLPObject *
em_format_html_find_pobject_func(EMFormatHTML *efh,
CamelMimePart *part,
@@ -284,8 +284,8 @@ void em_format_html_remove_pobject (EMFormatHTML *efh,
void em_format_html_clear_pobject (EMFormatHTML *efh);
EMFormatHTMLJob *
em_format_html_job_new (EMFormatHTML *efh,
- void (*callback)(EMFormatHTMLJob *job, int cancelled),
- void *data);
+ void (*callback)(EMFormatHTMLJob *job, gint cancelled),
+ gpointer data);
void em_format_html_job_queue (EMFormatHTML *efh,
EMFormatHTMLJob *job);
diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c
index c39e705b91..820e4a83af 100644
--- a/mail/em-html-stream.c
+++ b/mail/em-html-stream.c
@@ -58,7 +58,7 @@ emhs_gtkhtml_destroy (GtkHTML *html,
static ssize_t
emhs_sync_write (CamelStream *stream,
- const char *buffer,
+ const gchar *buffer,
size_t n)
{
EMHTMLStream *emhs = EM_HTML_STREAM (stream);
diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c
index b06145acc0..91dc5e10ca 100644
--- a/mail/em-icon-stream.c
+++ b/mail/em-icon-stream.c
@@ -50,15 +50,15 @@ static void em_icon_stream_class_init (EMIconStreamClass *klass);
static void em_icon_stream_init (CamelObject *object);
static void em_icon_stream_finalize (CamelObject *object);
-static ssize_t emis_sync_write(CamelStream *stream, const char *buffer, size_t n);
-static int emis_sync_close(CamelStream *stream);
-static int emis_sync_flush(CamelStream *stream);
+static ssize_t emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n);
+static gint emis_sync_close(CamelStream *stream);
+static gint emis_sync_flush(CamelStream *stream);
static EMSyncStreamClass *parent_class = NULL;
static EMCache *emis_cache;
static void
-emis_cache_free(void *data)
+emis_cache_free(gpointer data)
{
struct _emis_cache_node *node = data;
@@ -133,14 +133,14 @@ em_icon_stream_finalize(CamelObject *object)
}
static ssize_t
-emis_sync_write(CamelStream *stream, const char *buffer, size_t n)
+emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n)
{
EMIconStream *emis = EM_ICON_STREAM (stream);
if (emis->loader == NULL)
return -1;
- if (!gdk_pixbuf_loader_write(emis->loader, (const unsigned char *)buffer, n, NULL)) {
+ if (!gdk_pixbuf_loader_write(emis->loader, (const guchar *)buffer, n, NULL)) {
emis_cleanup(emis);
return -1;
}
@@ -155,10 +155,10 @@ emis_sync_flush(CamelStream *stream)
}
static GdkPixbuf *
-emis_fit(GdkPixbuf *pixbuf, int maxwidth, int maxheight, int *scale)
+emis_fit(GdkPixbuf *pixbuf, gint maxwidth, gint maxheight, gint *scale)
{
GdkPixbuf *mini = NULL;
- int width, height;
+ gint width, height;
width = gdk_pixbuf_get_width(pixbuf);
height = gdk_pixbuf_get_height(pixbuf);
@@ -196,8 +196,8 @@ emis_sync_close(CamelStream *stream)
EMIconStream *emis = (EMIconStream *)stream;
GdkPixbuf *pixbuf, *mini;
struct _emis_cache_node *node;
- char *scalekey;
- int scale;
+ gchar *scalekey;
+ gint scale;
if (emis->loader == NULL)
return -1;
@@ -244,7 +244,7 @@ emis_image_destroy(struct _GtkImage *image, EMIconStream *emis)
}
CamelStream *
-em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsigned int maxheight, int keep)
+em_icon_stream_new(GtkImage *image, const gchar *key, guint maxwidth, guint maxheight, gint keep)
{
EMIconStream *new;
@@ -261,11 +261,11 @@ em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsi
}
GdkPixbuf *
-em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int maxheight)
+em_icon_stream_get_image(const gchar *tkey, guint maxwidth, guint maxheight)
{
struct _emis_cache_node *node;
GdkPixbuf *pb = NULL;
- const char *key;
+ const gchar *key;
key = tkey ? tkey : "";
@@ -274,7 +274,7 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m
node = (struct _emis_cache_node *)em_cache_lookup(emis_cache, key);
if (node) {
- int width, height;
+ gint width, height;
pb = node->pixbuf;
g_object_ref(pb);
@@ -285,8 +285,8 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m
if ((maxwidth && width > maxwidth)
|| (maxheight && height > maxheight)) {
- unsigned int scale;
- char *realkey;
+ guint scale;
+ gchar *realkey;
if (maxheight == 0 || width >= height)
scale = width * EMIS_SCALE / maxwidth;
@@ -317,12 +317,12 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m
return pb;
}
-int
-em_icon_stream_is_resized(const char *tkey, unsigned int maxwidth, unsigned int maxheight)
+gint
+em_icon_stream_is_resized(const gchar *tkey, guint maxwidth, guint maxheight)
{
- int res = FALSE;
+ gint res = FALSE;
struct _emis_cache_node *node;
- const char *key;
+ const gchar *key;
key = tkey ? tkey : "";
diff --git a/mail/em-icon-stream.h b/mail/em-icon-stream.h
index 321e0cacae..24f4acedc1 100644
--- a/mail/em-icon-stream.h
+++ b/mail/em-icon-stream.h
@@ -41,11 +41,11 @@ struct _GtkIconStream;
typedef struct _EMIconStream {
EMSyncStream sync;
- unsigned int width, height;
+ guint width, height;
guint destroy_id;
struct _GdkPixbufLoader *loader;
struct _GtkImage *image;
- char *key;
+ gchar *key;
guint keep:1;
} EMIconStream;
@@ -55,10 +55,10 @@ typedef struct {
} EMIconStreamClass;
CamelType em_icon_stream_get_type (void);
-CamelStream *em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsigned int maxheight, int keep);
+CamelStream *em_icon_stream_new(GtkImage *image, const gchar *key, guint maxwidth, guint maxheight, gint keep);
-struct _GdkPixbuf *em_icon_stream_get_image(const char *key, unsigned int maxwidth, unsigned int maxheight);
-int em_icon_stream_is_resized(const char *key, unsigned int maxwidth, unsigned int maxheight);
+struct _GdkPixbuf *em_icon_stream_get_image(const gchar *key, guint maxwidth, guint maxheight);
+gint em_icon_stream_is_resized(const gchar *key, guint maxwidth, guint maxheight);
void em_icon_stream_clear_cache(void);
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index 26ae580dc8..e8dab897a0 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -40,8 +40,8 @@ static void em_inline_filter_class_init (EMInlineFilterClass *klass);
static void em_inline_filter_init (CamelObject *object);
static void em_inline_filter_finalize (CamelObject *object);
-static void emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace);
-static void emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace);
+static void emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace);
+static void emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace);
static void emif_reset(CamelMimeFilter *f);
static CamelMimeFilterClass *parent_class = NULL;
@@ -107,8 +107,8 @@ enum {
};
static const struct {
- const char *type;
- const char *subtype;
+ const gchar *type;
+ const gchar *subtype;
CamelTransferEncoding encoding;
guint plain:1;
} emif_types[] = {
@@ -121,22 +121,22 @@ static const struct {
};
static void
-emif_add_part(EMInlineFilter *emif, const char *data, int len)
+emif_add_part(EMInlineFilter *emif, const gchar *data, gint len)
{
CamelTransferEncoding encoding;
CamelContentType *content_type;
CamelDataWrapper *dw;
- const char *mimetype;
+ const gchar *mimetype;
CamelMimePart *part;
CamelStream *mem;
- char *type;
+ gchar *type;
if (emif->state == EMIF_PLAIN || emif->state == EMIF_PGPSIGNED || emif->state == EMIF_PGPENCRYPTED)
encoding = emif->base_encoding;
else
encoding = emif_types[emif->state].encoding;
- g_byte_array_append(emif->data, (unsigned char *)data, len);
+ g_byte_array_append(emif->data, (guchar *)data, len);
/* check the part will actually have content */
if (emif->data->len <= 0) {
return;
@@ -192,12 +192,12 @@ emif_add_part(EMInlineFilter *emif, const char *data, int len)
}
static int
-emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
+emif_scan(CamelMimeFilter *f, gchar *in, size_t len, gint final)
{
EMInlineFilter *emif = (EMInlineFilter *)f;
- char *inptr = in, *inend = in+len;
- char *data_start = in;
- char *start = in;
+ gchar *inptr = in, *inend = in+len;
+ gchar *data_start = in;
+ gchar *start = in;
while (inptr < inend) {
start = inptr;
@@ -220,8 +220,8 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
/* This could use some funky plugin shit, but this'll do for now */
if (strncmp(start, "begin ", 6) == 0
&& start[6] >= '0' && start[6] <= '7') {
- int i = 7;
- char *name;
+ gint i = 7;
+ gchar *name;
while (start[i] >='0' && start[i] <='7')
i++;
@@ -268,7 +268,7 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
data_start = inptr;
emif->state = EMIF_PLAIN;
} else {
- int linelen;
+ gint linelen;
/* check the length byte matches the data, if not, output what we have and re-scan this line */
len = ((start[0] - ' ') & 077);
@@ -328,14 +328,14 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
if (final) {
emif_add_part(emif, data_start, inend-data_start);
} else {
- g_byte_array_append(emif->data, (unsigned char *)data_start, inend-data_start);
+ g_byte_array_append(emif->data, (guchar *)data_start, inend-data_start);
}
return 0;
}
static void
-emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
+emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace)
{
emif_scan(f, in, len, FALSE);
@@ -345,7 +345,7 @@ emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **ou
}
static void
-emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
+emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace)
{
emif_scan(f, in, len, TRUE);
diff --git a/mail/em-inline-filter.h b/mail/em-inline-filter.h
index b6bc38502f..ed5b688dfb 100644
--- a/mail/em-inline-filter.h
+++ b/mail/em-inline-filter.h
@@ -40,13 +40,13 @@ extern "C" {
typedef struct _EMInlineFilter {
CamelMimeFilter filter;
- int state;
+ gint state;
CamelTransferEncoding base_encoding;
CamelContentType *base_type;
GByteArray *data;
- char *filename;
+ gchar *filename;
GSList *parts;
} EMInlineFilter;
diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c
index f95685e351..42c15f754e 100644
--- a/mail/em-junk-hook.c
+++ b/mail/em-junk-hook.c
@@ -37,7 +37,7 @@
static GHashTable *emjh_types;
static GObjectClass *parent_class = NULL;
-static void *emjh_parent_class;
+static gpointer emjh_parent_class;
static GObjectClass *emj_parent;
#define emjh ((EMJunkHook *)eph)
@@ -63,7 +63,7 @@ static const EPluginHookTargetKey emjh_flag_map[] = {
*/
-static void manage_error (const char *msg, GError *error);
+static void manage_error (const gchar *msg, GError *error);
GQuark
em_junk_error_quark (void)
@@ -71,7 +71,7 @@ em_junk_error_quark (void)
return g_quark_from_static_string ("em-junk-error-quark");
}
-static const char *
+static const gchar *
em_junk_get_name (CamelJunkPlugin *csp);
static void
@@ -82,7 +82,7 @@ em_junk_init(CamelJunkPlugin *csp)
((EPluginClass *)G_OBJECT_GET_CLASS(item->hook->hook.plugin))->enable(item->hook->hook.plugin, 1);
}
-static const char *
+static const gchar *
em_junk_get_name (CamelJunkPlugin *csp)
{
struct _EMJunkHookItem *item = (EMJunkHookItem *)csp;
@@ -248,7 +248,7 @@ emjh_construct_group(EPluginHook *eph, xmlNodePtr root)
/* We'll processs only the first item from xml file*/
while (node) {
- if (0 == strcmp((char *)node->name, "item")) {
+ if (0 == strcmp((gchar *)node->name, "item")) {
struct _EMJunkHookItem *item;
item = emjh_construct_item(eph, group, node);
@@ -284,7 +284,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
node = root->children;
while (node) {
- if (strcmp((char *)node->name, "group") == 0) {
+ if (strcmp((gchar *)node->name, "group") == 0) {
struct _EMJunkHookGroup *group;
group = emjh_construct_group(eph, node);
@@ -302,7 +302,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
struct manage_error_idle_data
{
- const char *msg;
+ const gchar *msg;
GError *error;
};
@@ -334,7 +334,7 @@ manage_error_idle (gpointer data)
}
static void
-manage_error (const char *msg, GError *error)
+manage_error (const gchar *msg, GError *error)
{
struct manage_error_idle_data *mei;
@@ -350,7 +350,7 @@ manage_error (const char *msg, GError *error)
/*XXX: don't think we need here*/
static void
-emjh_enable(EPluginHook *eph, int state)
+emjh_enable(EPluginHook *eph, gint state)
{
GSList *g;
@@ -436,5 +436,5 @@ em_junk_hook_register_type(GType type)
d(printf("registering junk plugin type '%s'\n", g_type_name(type)));
klass = g_type_class_ref(type);
- g_hash_table_insert(emjh_types, (void *)g_type_name(type), klass);
+ g_hash_table_insert(emjh_types, (gpointer)g_type_name(type), klass);
}
diff --git a/mail/em-junk-hook.h b/mail/em-junk-hook.h
index 0e467a20bd..9e7c999b29 100644
--- a/mail/em-junk-hook.h
+++ b/mail/em-junk-hook.h
@@ -56,17 +56,17 @@ struct _EMJunkHookTarget {
struct _EMJunkHookItem {
CamelJunkPlugin csp;
struct _EMJunkHook *hook; /* parent pointer */
- char *check_junk;
- char *report_junk;
- char *report_non_junk;
- char *commit_reports;
- char *validate_binary;
- char *plugin_name;
+ gchar *check_junk;
+ gchar *report_junk;
+ gchar *report_non_junk;
+ gchar *commit_reports;
+ gchar *validate_binary;
+ gchar *plugin_name;
};
struct _EMJunkHookGroup {
struct _EMJunkHook *hook; /* parent pointer */
- char *id; /* target id */
+ gchar *id; /* target id */
GSList *items; /* items to consider */
};
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 5123d3d49a..156e7824e0 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -72,7 +72,7 @@ static GType col_types[] = {
};
/* temporarily copied from em-format.c */
-static const char *default_headers[] = {
+static const gchar *default_headers[] = {
N_("From"),
N_("Reply-To"),
N_("To"),
@@ -89,8 +89,8 @@ static const char *default_headers[] = {
/* for empty trash on exit frequency */
static const struct {
- const char *label;
- int days;
+ const gchar *label;
+ gint days;
} empty_trash_frequency[] = {
{ N_("Every time"), 0 },
{ N_("Once per day"), 1 },
@@ -196,7 +196,7 @@ jh_tree_refill (EMMailerPrefs *prefs)
for (l = cjh; l; l = l->next) {
GtkTreeIter iter;
- char **tokens = g_strsplit (l->data, "=", 2);
+ gchar **tokens = g_strsplit (l->data, "=", 2);
gtk_list_store_append (store, &iter);
gtk_list_store_set (
@@ -216,7 +216,7 @@ jh_add_cb (GtkWidget *widget, gpointer user_data)
{
EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
GtkWidget *dialog, *l1, *l2, *entry1, *entry2, *vbox, *hbox;
- int response;
+ gint response;
dialog = gtk_dialog_new_with_buttons (_("Add Custom Junk Header"), (GtkWindow *)gtk_widget_get_toplevel (widget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);
vbox = gtk_vbox_new (FALSE, 6);
@@ -238,9 +238,9 @@ jh_add_cb (GtkWidget *widget, gpointer user_data)
gtk_container_add ((GtkContainer *)((GtkDialog *)dialog)->vbox, vbox);
response = gtk_dialog_run ((GtkDialog *)dialog);
if (response == GTK_RESPONSE_ACCEPT) {
- const char *name = gtk_entry_get_text ((GtkEntry *)entry1);
- const char *value = gtk_entry_get_text ((GtkEntry *)entry2);
- char *tok;
+ const gchar *name = gtk_entry_get_text ((GtkEntry *)entry1);
+ const gchar *value = gtk_entry_get_text ((GtkEntry *)entry2);
+ gchar *tok;
GSList *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
/* FIXME: Validate the values */
@@ -268,13 +268,13 @@ jh_remove_cb (GtkWidget *widget, gpointer user_data)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (prefs->junk_header_tree));
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- char *name=NULL, *value=NULL;
+ gchar *name=NULL, *value=NULL;
GSList *prev = NULL, *node, *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
gtk_tree_model_get (model, &iter, JH_LIST_COLUMN_NAME, &name, JH_LIST_COLUMN_VALUE, &value, -1);
node = list;
while (node) {
- char *test;
- int len = strlen (name);
+ gchar *test;
+ gint len = strlen (name);
test = strncmp (node->data, name, len) == 0 ? (gchar *) node->data+len:NULL;
if (test) {
@@ -358,7 +358,7 @@ emmp_header_remove_sensitivity (EMMailerPrefs *prefs)
}
static gboolean
-emmp_header_is_valid (const char *header)
+emmp_header_is_valid (const gchar *header)
{
gint len = g_utf8_strlen (header, -1);
@@ -373,7 +373,7 @@ emmp_header_is_valid (const char *header)
static void
emmp_header_add_sensitivity (EMMailerPrefs *prefs)
{
- const char *entry_contents;
+ const gchar *entry_contents;
GtkTreeIter iter;
gboolean valid;
@@ -390,7 +390,7 @@ emmp_header_add_sensitivity (EMMailerPrefs *prefs)
/* check if this is a duplicate */
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (prefs->header_list_store), &iter);
while (valid) {
- char *header_name;
+ gchar *header_name;
gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
HEADER_LIST_HEADER_COLUMN, &header_name,
@@ -419,7 +419,7 @@ emmp_save_headers (EMMailerPrefs *prefs)
while (valid) {
struct _EMMailerPrefsHeader h;
gboolean enabled;
- char *xml;
+ gchar *xml;
gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
HEADER_LIST_HEADER_COLUMN, &h.name,
@@ -439,12 +439,12 @@ emmp_save_headers (EMMailerPrefs *prefs)
}
static void
-emmp_header_list_enabled_toggled (GtkCellRendererToggle *cell, const char *path_string, EMMailerPrefs *prefs)
+emmp_header_list_enabled_toggled (GtkCellRendererToggle *cell, const gchar *path_string, EMMailerPrefs *prefs)
{
GtkTreeModel *model = GTK_TREE_MODEL (prefs->header_list_store);
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
GtkTreeIter iter;
- int enabled;
+ gint enabled;
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, HEADER_LIST_ENABLED_COLUMN, &enabled, -1);
@@ -517,7 +517,7 @@ emmp_header_entry_changed (GtkWidget *entry, gpointer user_data)
static void
toggle_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs)
{
- const char *key;
+ const gchar *key;
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
@@ -548,7 +548,7 @@ custom_junk_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs)
}
static void
-toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, const char *key, GCallback toggled)
+toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, gint not, const gchar *key, GCallback toggled)
{
gboolean bool;
@@ -556,7 +556,7 @@ toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, cons
gtk_toggle_button_set_active (toggle, not ? !bool : bool);
if (toggled) {
- g_object_set_data ((GObject *) toggle, "key", (void *) key);
+ g_object_set_data ((GObject *) toggle, "key", (gpointer) key);
g_signal_connect (toggle, "toggled", toggled, prefs);
}
@@ -568,7 +568,7 @@ static void
charset_activate (GtkWidget *item, EMMailerPrefs *prefs)
{
GtkWidget *menu;
- char *string;
+ gchar *string;
menu = gtk_option_menu_get_menu (prefs->charset);
if (!(string = e_charset_picker_get_charset (menu)))
@@ -583,7 +583,7 @@ charset_menu_init (EMMailerPrefs *prefs)
{
GtkWidget *menu, *item;
GList *items;
- char *buf;
+ gchar *buf;
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/charset", NULL);
menu = e_charset_picker_new (buf && *buf ? buf : camel_iconv_locale_charset ());
@@ -604,7 +604,7 @@ charset_menu_init (EMMailerPrefs *prefs)
static void
trash_days_activate (GtkWidget *item, EMMailerPrefs *prefs)
{
- int days;
+ gint days;
days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days"));
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", days, NULL);
@@ -613,7 +613,7 @@ trash_days_activate (GtkWidget *item, EMMailerPrefs *prefs)
static void
emmp_empty_trash_init (EMMailerPrefs *prefs)
{
- int locked, days, hist = 0, i;
+ gint locked, days, hist = 0, i;
GtkWidget *menu, *item;
days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL);
@@ -641,7 +641,7 @@ emmp_empty_trash_init (EMMailerPrefs *prefs)
static void
junk_days_activate (GtkWidget *item, EMMailerPrefs *prefs)
{
- int days;
+ gint days;
days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days"));
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", days, NULL);
@@ -650,7 +650,7 @@ junk_days_activate (GtkWidget *item, EMMailerPrefs *prefs)
static void
emmp_empty_junk_init (EMMailerPrefs *prefs)
{
- int locked, days, hist = 0, i;
+ gint locked, days, hist = 0, i;
GtkWidget *menu, *item;
toggle_button_init (prefs, prefs->empty_junk, FALSE,
@@ -682,7 +682,7 @@ emmp_empty_junk_init (EMMailerPrefs *prefs)
static void
http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs)
{
- int when;
+ gint when;
if (gtk_toggle_button_get_active (prefs->images_always))
when = MAIL_CONFIG_HTTP_ALWAYS;
@@ -696,7 +696,7 @@ http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs)
static GtkWidget *
-emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMMailerPrefs *prefs = data;
@@ -724,7 +724,7 @@ static EMConfigItem emmp_items[] = {
};
static void
-emmp_free(EConfig *ec, GSList *items, void *data)
+emmp_free(EConfig *ec, GSList *items, gpointer data)
{
/* the prefs data is freed automagically */
@@ -734,7 +734,7 @@ emmp_free(EConfig *ec, GSList *items, void *data)
static void
junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
{
- char *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
+ gchar *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
const GList *plugins = mail_session_get_junk_plugins();
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL);
@@ -747,7 +747,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
session->junk_plugin = CAMEL_JUNK_PLUGIN (&(item->csp));
status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL;
if ((gboolean)status == TRUE) {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
text = g_strdup_printf (_("%s plugin is available and the binary is installed."), item->plugin_name);
html = g_strdup_printf ("<i>%s</i>", text);
@@ -755,7 +755,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
g_free (html);
g_free (text);
} else {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-warning", GTK_ICON_SIZE_MENU);
text = g_strdup_printf (_("%s plugin is not available. Please check whether the package is installed."), item->plugin_name);
html = g_strdup_printf ("<i>%s</i>", text);
@@ -772,10 +772,10 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
static void
junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
{
- int index = 0;
+ gint index = 0;
gboolean def_set = FALSE;
const GList *plugins = mail_session_get_junk_plugins();
- char *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
+ gchar *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
if (!plugins || !g_list_length ((GList *)plugins)) {
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("No Junk plugin available"));
@@ -800,7 +800,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index);
status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL;
if (status) {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
/* May be a better text */
text = g_strdup_printf (_("%s plugin is available and the binary is installed."), item->plugin_name);
@@ -809,7 +809,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
g_free (html);
g_free (text);
} else {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-warning", GTK_ICON_SIZE_MENU);
/* May be a better text */
text = g_strdup_printf (_("%s plugin is not available. Please check whether the package is installed."), item->plugin_name);
@@ -847,11 +847,11 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
GtkTreeIter iter;
GladeXML *gui;
gboolean locked;
- int val, i;
+ gint val, i;
EMConfig *ec;
EMConfigTargetPrefs *target;
GSList *l;
- char *gladefile;
+ gchar *gladefile;
shell_settings = e_shell_get_shell_settings (shell);
@@ -1103,7 +1103,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
h = g_malloc (sizeof (struct _EMMailerPrefsHeader));
h->is_default = TRUE;
h->name = g_strdup (default_headers[i]);
- h->enabled = strcmp ((char *)default_headers[i], "x-evolution-mailer") != 0;
+ h->enabled = strcmp ((gchar *)default_headers[i], "x-evolution-mailer") != 0;
g_hash_table_insert (default_header_hash, (gpointer) default_headers[i], h);
header_add_list = g_slist_append (header_add_list, h);
}
@@ -1113,7 +1113,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
p = header_config_list;
while (p) {
struct _EMMailerPrefsHeader *h, *def;
- char *xml = (char *) p->data;
+ gchar *xml = (gchar *) p->data;
h = em_mailer_prefs_header_from_xml (xml);
if (h) {
@@ -1137,7 +1137,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
p = header_add_list;
while (p) {
struct _EMMailerPrefsHeader *h = (struct _EMMailerPrefsHeader *) p->data;
- const char *name;
+ const gchar *name;
if (g_ascii_strcasecmp (h->name, EM_FORMAT_HEADER_XMAILER) == 0)
name = _("Mailer");
@@ -1233,10 +1233,10 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
return NULL;
root = doc->children;
- if (strcmp ((char *)root->name, "header") != 0)
+ if (strcmp ((gchar *)root->name, "header") != 0)
return NULL;
- name = xmlGetProp (root, (const unsigned char *)"name");
+ name = xmlGetProp (root, (const guchar *)"name");
if (name == NULL)
return NULL;
@@ -1244,7 +1244,7 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
h->name = g_strdup ((gchar *)name);
xmlFree (name);
- if (xmlHasProp (root, (const unsigned char *)"enabled"))
+ if (xmlHasProp (root, (const guchar *)"enabled"))
h->enabled = 1;
else
h->enabled = 0;
@@ -1262,12 +1262,12 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
* is an error.
**/
struct _EMMailerPrefsHeader *
-em_mailer_prefs_header_from_xml (const char *xml)
+em_mailer_prefs_header_from_xml (const gchar *xml)
{
struct _EMMailerPrefsHeader *header;
xmlDocPtr doc;
- if (!(doc = xmlParseDoc ((unsigned char *) xml)))
+ if (!(doc = xmlParseDoc ((guchar *) xml)))
return NULL;
header = emmp_header_from_xmldoc (doc);
@@ -1300,24 +1300,24 @@ em_mailer_prefs_header_free (struct _EMMailerPrefsHeader *header)
* Returns the passed header as a XML structure,
* or NULL on error
*/
-char *
+gchar *
em_mailer_prefs_header_to_xml (struct _EMMailerPrefsHeader *header)
{
xmlDocPtr doc;
xmlNodePtr root;
xmlChar *xml;
- char *out;
- int size;
+ gchar *out;
+ gint size;
g_return_val_if_fail (header != NULL, NULL);
g_return_val_if_fail (header->name != NULL, NULL);
- doc = xmlNewDoc ((const unsigned char *)"1.0");
+ doc = xmlNewDoc ((const guchar *)"1.0");
- root = xmlNewDocNode (doc, NULL, (const unsigned char *)"header", NULL);
- xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)header->name);
+ root = xmlNewDocNode (doc, NULL, (const guchar *)"header", NULL);
+ xmlSetProp (root, (const guchar *)"name", (guchar *)header->name);
if (header->enabled)
- xmlSetProp (root, (const unsigned char *)"enabled", NULL);
+ xmlSetProp (root, (const guchar *)"enabled", NULL);
xmlDocSetRootElement (doc, root);
xmlDocDumpMemory (doc, &xml, &size);
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index fddc7cd4e1..abef616c69 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -54,7 +54,7 @@ typedef struct _EMMailerPrefsClass EMMailerPrefsClass;
typedef struct _EMMailerPrefsHeader EMMailerPrefsHeader;
struct _EMMailerPrefsHeader {
- char *name;
+ gchar *name;
guint enabled:1;
guint is_default:1;
};
diff --git a/mail/em-menu.c b/mail/em-menu.c
index b504bd3304..f0da9c8820 100644
--- a/mail/em-menu.c
+++ b/mail/em-menu.c
@@ -50,7 +50,7 @@
#include <e-util/e-util.h>
-static void emp_standard_menu_factory(EMenu *emp, void *data);
+static void emp_standard_menu_factory(EMenu *emp, gpointer data);
static GObjectClass *emp_parent;
@@ -114,7 +114,7 @@ em_menu_get_type(void)
return type;
}
-EMMenu *em_menu_new(const char *menuid)
+EMMenu *em_menu_new(const gchar *menuid)
{
EMMenu *emp = g_object_new(em_menu_get_type(), NULL);
@@ -134,12 +134,12 @@ EMMenu *em_menu_new(const char *menuid)
* Return value:
**/
EMMenuTargetSelect *
-em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
+em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids)
{
EMMenuTargetSelect *t = e_menu_target_new(&emp->popup, EM_MENU_TARGET_SELECT, sizeof(*t));
guint32 mask = ~0;
- int i;
- const char *tmp;
+ gint i;
+ const gchar *tmp;
/* NB: This is identical to em-popup-target-new-select function */
@@ -243,7 +243,7 @@ em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w)
}
static void
-emp_standard_menu_factory(EMenu *emp, void *data)
+emp_standard_menu_factory(EMenu *emp, gpointer data)
{
/* noop */
}
@@ -276,7 +276,7 @@ emp_standard_menu_factory(EMenu *emp, void *data)
*/
-static void *emph_parent_class;
+static gpointer emph_parent_class;
#define emph ((EMMenuHook *)eph)
static const EMenuHookTargetMask emph_select_masks[] = {
@@ -323,7 +323,7 @@ emph_finalise(GObject *o)
static void
emph_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emph_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.bonobomenu:1.0";
diff --git a/mail/em-menu.h b/mail/em-menu.h
index cdcc12bcae..96f571407c 100644
--- a/mail/em-menu.h
+++ b/mail/em-menu.h
@@ -73,7 +73,7 @@ typedef struct _EMMenuTargetSelect EMMenuTargetSelect;
struct _EMMenuTargetSelect {
EMenuTarget target;
struct _CamelFolder *folder;
- char *uri;
+ gchar *uri;
GPtrArray *uids;
};
@@ -98,9 +98,9 @@ struct _EMMenuClass {
GType em_menu_get_type(void);
-EMMenu *em_menu_new(const char *menuid);
+EMMenu *em_menu_new(const gchar *menuid);
-EMMenuTargetSelect *em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids);
+EMMenuTargetSelect *em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids);
EMMenuTargetWidget *em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w);
/* ********************************************************************** */
diff --git a/mail/em-network-prefs.c b/mail/em-network-prefs.c
index f892849fae..c9a597c6ed 100644
--- a/mail/em-network-prefs.c
+++ b/mail/em-network-prefs.c
@@ -130,7 +130,7 @@ em_network_prefs_destroy (GtkObject *obj)
static void
toggle_button_toggled (GtkToggleButton *toggle, EMNetworkPrefs *prefs)
{
- const char *key;
+ const gchar *key;
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
@@ -144,14 +144,14 @@ toggle_button_toggled (GtkToggleButton *toggle, EMNetworkPrefs *prefs)
}
static void
-toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const char *key)
+toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const gchar *key)
{
gboolean bool;
bool = gconf_client_get_bool (prefs->gconf, key, NULL);
gtk_toggle_button_set_active (toggle, bool);
- g_object_set_data ((GObject *) toggle, "key", (void *) key);
+ g_object_set_data ((GObject *) toggle, "key", (gpointer) key);
g_signal_connect (toggle, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
@@ -159,7 +159,7 @@ toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const char *
}
static GtkWidget *
-emnp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emnp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMNetworkPrefs *prefs = data;
@@ -208,7 +208,7 @@ emnp_set_sensitiveness (EMNetworkPrefs *prefs, NetworkConfigProxyType type, gboo
static void
notify_proxy_type_changed (GtkWidget *widget, EMNetworkPrefs *prefs)
{
- int type;
+ gint type;
if (gtk_toggle_button_get_active (prefs->sys_proxy))
type = NETWORK_PROXY_SYS_SETTINGS;
@@ -247,8 +247,8 @@ notify_proxy_type_changed (GtkWidget *widget, EMNetworkPrefs *prefs)
static void
widget_entry_changed_cb (GtkWidget *widget, gpointer data)
{
- const char *value;
- int port = -1;
+ const gchar *value;
+ gint port = -1;
GConfClient *gconf = mail_config_get_gconf_client ();
/*
@@ -257,12 +257,12 @@ widget_entry_changed_cb (GtkWidget *widget, gpointer data)
*/
if (GTK_IS_SPIN_BUTTON (widget)) {
port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
- gconf_client_set_int (gconf, (const char *)data, port, NULL);
- d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const char *)data, port));
+ gconf_client_set_int (gconf, (const gchar *)data, port, NULL);
+ d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, port));
} else if (GTK_IS_ENTRY (widget)) {
value = gtk_entry_get_text (GTK_ENTRY (widget));
- gconf_client_set_string (gconf, (const char *)data, value, NULL);
- d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const char *)data, value));
+ gconf_client_set_string (gconf, (const gchar *)data, value, NULL);
+ d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, value));
}
}
@@ -275,7 +275,7 @@ static EMConfigItem emnp_items[] = {
};
static void
-emnp_free(EConfig *ec, GSList *items, void *data)
+emnp_free(EConfig *ec, GSList *items, gpointer data)
{
/* the prefs data is freed automagically */
@@ -299,12 +299,12 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
GtkWidget *toplevel;
GladeXML *gui;
GSList* l;
- char *buf;
+ gchar *buf;
EMConfig *ec;
EMConfigTargetPrefs *target;
gboolean locked;
- int i, val, port;
- char *gladefile;
+ gint i, val, port;
+ gchar *gladefile;
prefs->gconf = mail_config_get_gconf_client ();
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 38c0f7e40b..8b26a59f08 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -131,7 +131,7 @@ em_popup_get_type(void)
return type;
}
-EMPopup *em_popup_new(const char *menuid)
+EMPopup *em_popup_new(const gchar *menuid)
{
EMPopup *emp = g_object_new(em_popup_get_type(), NULL);
@@ -151,14 +151,14 @@ EMPopup *em_popup_new(const char *menuid)
* Return value:
**/
EMPopupTargetSelect *
-em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
+em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids)
{
EMPopupTargetSelect *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_SELECT, sizeof(*t));
CamelStore *store = CAMEL_STORE (folder->parent_store);
guint32 mask = ~0;
gboolean draft_or_outbox;
- int i;
- const char *tmp;
+ gint i;
+ const gchar *tmp;
t->uids = uids;
t->folder = folder;
@@ -247,7 +247,7 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
}
EMPopupTargetURI *
-em_popup_target_new_uri(EMPopup *emp, const char *uri)
+em_popup_target_new_uri(EMPopup *emp, const gchar *uri)
{
EMPopupTargetURI *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_URI, sizeof(*t));
guint32 mask = ~0;
@@ -269,7 +269,7 @@ em_popup_target_new_uri(EMPopup *emp, const char *uri)
}
EMPopupTargetPart *
-em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *mime_type)
+em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const gchar *mime_type)
{
EMPopupTargetPart *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_PART, sizeof(*t));
guint32 mask = ~0;
@@ -296,7 +296,7 @@ em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *
/* TODO: This should be based on the CamelFolderInfo, but ... em-folder-tree doesn't keep it? */
EMPopupTargetFolder *
-em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, guint32 popup_flags)
+em_popup_target_new_folder (EMPopup *emp, const gchar *uri, guint32 info_flags, guint32 popup_flags)
{
EMPopupTargetFolder *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_FOLDER, sizeof(*t));
guint32 mask = ~0;
@@ -314,7 +314,7 @@ em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, g
goto done;
if (!(popup_flags & EM_POPUP_FOLDER_STORE)) {
- const char *path;
+ const gchar *path;
if (popup_flags & EM_POPUP_FOLDER_DELETE)
mask &= ~EM_POPUP_FOLDER_DELETE;
@@ -375,7 +375,7 @@ done:
*/
-static void *emph_parent_class;
+static gpointer emph_parent_class;
#define emph ((EMPopupHook *)eph)
static const EPopupHookTargetMask emph_select_masks[] = {
@@ -442,7 +442,7 @@ emph_finalise(GObject *o)
static void
emph_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emph_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.popup:1.0";
diff --git a/mail/em-popup.h b/mail/em-popup.h
index cde903a4ec..dea4aee5d2 100644
--- a/mail/em-popup.h
+++ b/mail/em-popup.h
@@ -169,7 +169,7 @@ typedef struct _EMPopupTargetFolder EMPopupTargetFolder;
**/
struct _EMPopupTargetURI {
EPopupTarget target;
- char *uri;
+ gchar *uri;
};
/**
@@ -187,7 +187,7 @@ struct _EMPopupTargetURI {
struct _EMPopupTargetSelect {
EPopupTarget target;
struct _CamelFolder *folder;
- char *uri;
+ gchar *uri;
GPtrArray *uids;
};
@@ -204,7 +204,7 @@ struct _EMPopupTargetSelect {
**/
struct _EMPopupTargetPart {
EPopupTarget target;
- char *mime_type;
+ gchar *mime_type;
struct _CamelMimePart *part;
};
@@ -218,7 +218,7 @@ struct _EMPopupTargetPart {
**/
struct _EMPopupTargetFolder {
EPopupTarget target;
- char *uri;
+ gchar *uri;
};
typedef struct _EPopupItem EMPopupItem;
@@ -236,12 +236,12 @@ struct _EMPopupClass {
GType em_popup_get_type(void);
-EMPopup *em_popup_new(const char *menuid);
+EMPopup *em_popup_new(const gchar *menuid);
-EMPopupTargetURI *em_popup_target_new_uri(EMPopup *emp, const char *uri);
-EMPopupTargetSelect *em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids);
-EMPopupTargetPart *em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *mime_type);
-EMPopupTargetFolder *em_popup_target_new_folder(EMPopup *emp, const char *uri, guint32 info_flags, guint32 popup_flags);
+EMPopupTargetURI *em_popup_target_new_uri(EMPopup *emp, const gchar *uri);
+EMPopupTargetSelect *em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids);
+EMPopupTargetPart *em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const gchar *mime_type);
+EMPopupTargetFolder *em_popup_target_new_folder(EMPopup *emp, const gchar *uri, guint32 info_flags, guint32 popup_flags);
/* ********************************************************************** */
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index 338ec4ccfd..d2db79fdc4 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -53,7 +53,7 @@ typedef struct _EMSubscribeEditor EMSubscribeEditor;
struct _EMSubscribeEditor {
EDList stores;
- int busy;
+ gint busy;
guint busy_id;
struct _EMSubscribe *current; /* the current one, if any */
@@ -70,14 +70,14 @@ struct _EMSubscribe {
struct _EMSubscribe *next;
struct _EMSubscribe *prev;
- int ref_count;
- int cancel;
- int seq; /* upped every time we refresh */
+ gint ref_count;
+ gint cancel;
+ gint seq; /* upped every time we refresh */
struct _EMSubscribeEditor *editor; /* parent object*/
- char *store_uri;
- int store_id; /* looking up a store */
+ gchar *store_uri;
+ gint store_id; /* looking up a store */
CamelStore *store;
GHashTable *folders;
@@ -89,16 +89,16 @@ struct _EMSubscribe {
GSList *info_list;
/* pending LISTs, EMSubscribeNode's */
- int pending_id;
+ gint pending_id;
EDList pending;
/* queue of pending UN/SUBSCRIBEs, EMsg's */
- int subscribe_id;
+ gint subscribe_id;
EDList subscribe;
/* working variables at runtime */
- int selected_count;
- int selected_subscribed_count;
+ gint selected_count;
+ gint selected_subscribed_count;
guint subscribed_state:1; /* for setting the selection*/
};
@@ -117,8 +117,8 @@ struct _MailMsgListNode {
MailMsg *msg;
};
-static void sub_editor_busy(EMSubscribeEditor *se, int dir);
-static int sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node);
+static void sub_editor_busy(EMSubscribeEditor *se, gint dir);
+static gint sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node);
static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub);
static void
@@ -170,8 +170,8 @@ struct _zsubscribe_msg {
EMSubscribe *sub;
EMSubscribeNode *node;
- int subscribe;
- char *path;
+ gint subscribe;
+ gchar *path;
};
static void
@@ -247,11 +247,11 @@ static MailMsgInfo sub_subscribe_folder_info = {
/* spath is tree path in string form */
static int
-sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, int state, const char *spath)
+sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, gint state, const gchar *spath)
{
struct _zsubscribe_msg *m;
MailMsgListNode *msgListNode;
- int id;
+ gint id;
m = mail_msg_new (&sub_subscribe_folder_info);
m->sub = sub;
@@ -277,7 +277,7 @@ sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, int state, const
/* ********************************************************************** */
static void
-sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, int pending)
+sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, gint pending)
{
CamelFolderInfo *fi;
GtkTreeStore *treestore;
@@ -344,7 +344,7 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
struct _emse_folderinfo_msg {
MailMsg base;
- int seq;
+ gint seq;
EMSubscribe *sub;
EMSubscribeNode *node;
@@ -354,7 +354,7 @@ struct _emse_folderinfo_msg {
static void
sub_folderinfo_exec (struct _emse_folderinfo_msg *m)
{
- char *pub_full_name=NULL;
+ gchar *pub_full_name=NULL;
if (m->seq == m->sub->seq) {
camel_operation_register(m->base.cancel);
@@ -425,7 +425,7 @@ static int
sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node)
{
struct _emse_folderinfo_msg *m;
- int id;
+ gint id;
d(printf("%s:%s: Starting get folderinfo of '%s'\n", G_STRLOC, G_STRFUNC,
node?node->info->full_name:"<root>"));
@@ -451,7 +451,7 @@ sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node)
/* (un) subscribes the current selection */
static void
-sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscribe *sub)
+sub_subscribe_toggled(GtkCellRendererToggle *render, const gchar *spath, EMSubscribe *sub)
{
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model(sub->tree);
@@ -469,7 +469,7 @@ sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscr
}
}
-static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *data)
+static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
EMSubscribe *sub = data;
EMSubscribeNode *node;
@@ -485,7 +485,7 @@ static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *
static void
sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub)
{
- int dosub = TRUE, dounsub = TRUE;
+ gint dosub = TRUE, dounsub = TRUE;
sub->selected_count = 0;
sub->selected_subscribed_count = 0;
@@ -517,7 +517,7 @@ sub_row_expanded(GtkTreeView *tree, GtkTreeIter *iter, GtkTreePath *path, EMSubs
EMSubscribeNode *node;
GtkTreeIter child;
GtkTreeModel *model = (GtkTreeModel *)gtk_tree_view_get_model(tree);
- char *row_name;
+ gchar *row_name;
gtk_tree_model_get(model, iter, 1, &row_name, -1);
d(printf("%s:%s: row-expanded '%s'\n", G_STRLOC, G_STRFUNC,
@@ -583,7 +583,7 @@ sub_destroy(GtkWidget *w, EMSubscribe *sub)
}
static EMSubscribe *
-subscribe_new(EMSubscribeEditor *se, const char *uri)
+subscribe_new(EMSubscribeEditor *se, const gchar *uri)
{
EMSubscribe *sub;
@@ -721,7 +721,7 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se)
}
static void
-sub_editor_got_store(char *uri, CamelStore *store, void *data)
+sub_editor_got_store(gchar *uri, CamelStore *store, gpointer data)
{
struct _EMSubscribe *sub = data;
@@ -733,7 +733,7 @@ sub_editor_got_store(char *uri, CamelStore *store, void *data)
static void
sub_editor_combobox_changed (GtkWidget *w, EMSubscribeEditor *se)
{
- int i, n;
+ gint i, n;
struct _EMSubscribe *sub;
d(printf("combobox changed\n"));
@@ -785,9 +785,9 @@ static gboolean sub_editor_timeout(EMSubscribeEditor *se)
return TRUE;
}
-static void sub_editor_busy(EMSubscribeEditor *se, int dir)
+static void sub_editor_busy(EMSubscribeEditor *se, gint dir)
{
- int was;
+ gint was;
was = se->busy != 0;
se->busy += dir;
@@ -833,7 +833,7 @@ em_subscribe_editor_new(void)
GtkCellRenderer *cell;
GtkListStore *store;
GtkTreeIter gtiter;
- char *gladefile;
+ gchar *gladefile;
se = g_malloc0(sizeof(*se));
e_dlist_init(&se->stores);
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 9b2786904a..25943d62df 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -82,7 +82,7 @@
#include "e-mail-shell-backend.h"
-static void emu_save_part_done (CamelMimePart *part, char *name, int done, void *data);
+static void emu_save_part_done (CamelMimePart *part, gchar *name, gint done, gpointer data);
#define d(x)
@@ -101,11 +101,11 @@ static void emu_save_part_done (CamelMimePart *part, char *name, int done, void
* Returns %TRUE if the user clicks Yes or %FALSE otherwise.
**/
gboolean
-em_utils_prompt_user(GtkWindow *parent, const char *promptkey, const char *tag, const char *arg0, ...)
+em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...)
{
GtkWidget *mbox, *check = NULL;
va_list ap;
- int button;
+ gint button;
GConfClient *gconf = mail_config_get_gconf_client();
if (promptkey
@@ -146,7 +146,7 @@ GPtrArray *
em_utils_uids_copy (GPtrArray *uids)
{
GPtrArray *copy;
- int i;
+ gint i;
copy = g_ptr_array_new ();
g_ptr_array_set_size (copy, uids->len);
@@ -166,7 +166,7 @@ em_utils_uids_copy (GPtrArray *uids)
void
em_utils_uids_free (GPtrArray *uids)
{
- int i;
+ gint i;
for (i = 0; i < uids->len; i++)
g_free (uids->pdata[i]);
@@ -253,7 +253,7 @@ em_utils_check_user_can_send_mail (GtkWindow *parent)
static GtkWidget *filter_editor = NULL;
static void
-em_filter_editor_response (GtkWidget *dialog, int button, gpointer user_data)
+em_filter_editor_response (GtkWidget *dialog, gint button, gpointer user_data)
{
EShellBackend *shell_backend;
EMFilterContext *fc;
@@ -262,7 +262,7 @@ em_filter_editor_response (GtkWidget *dialog, int button, gpointer user_data)
if (button == GTK_RESPONSE_OK) {
const gchar *data_dir;
- char *user;
+ gchar *user;
data_dir = e_shell_backend_get_data_dir (shell_backend);
fc = g_object_get_data ((GObject *) dialog, "context");
@@ -295,7 +295,7 @@ em_utils_edit_filters (GtkWidget *parent)
{
EShellBackend *shell_backend;
const gchar *data_dir;
- char *user, *system;
+ gchar *user, *system;
EMFilterContext *fc;
if (filter_editor) {
@@ -344,9 +344,9 @@ em_filename_make_safe (gchar *string)
gchar *p, *ts;
gunichar c;
#ifdef G_OS_WIN32
- const char *unsafe_chars = "/\":*?<>|\\#";
+ const gchar *unsafe_chars = "/\":*?<>|\\#";
#else
- const char *unsafe_chars = "/#";
+ const gchar *unsafe_chars = "/#";
#endif
g_return_if_fail (string != NULL);
@@ -398,7 +398,7 @@ emu_save_get_filename_for_part (CamelMimePart *part)
* Saves a mime part to disk (prompting the user for filename).
**/
void
-em_utils_save_part (GtkWindow *parent, const char *prompt, CamelMimePart *part)
+em_utils_save_part (GtkWindow *parent, const gchar *prompt, CamelMimePart *part)
{
GtkWidget *file_chooser;
const gchar *utf8_filename;
@@ -477,7 +477,7 @@ get_unique_file_names (GSList *parts)
sorted_file_names = g_slist_sort (g_slist_copy (file_names), cmp_func);
last = sorted_file_names->data;
for (iter = sorted_file_names->next; iter; iter = iter->next) {
- char *name = iter->data;
+ gchar *name = iter->data;
if (name && last && cmp_func (name, last) == 0) {
gchar *new_name;
@@ -573,10 +573,10 @@ exit:
* Returns %TRUE if saving succeeded, %FALSE otherwise
**/
gboolean
-em_utils_save_part_to_file(GtkWindow *parent, const char *filename, CamelMimePart *part)
+em_utils_save_part_to_file(GtkWindow *parent, const gchar *filename, CamelMimePart *part)
{
- int done;
- char *dirname;
+ gint done;
+ gchar *dirname;
struct stat st;
if (filename[0] == 0)
@@ -616,9 +616,9 @@ struct _save_messages_data {
};
static void
-emu_save_messages_response(GtkWidget *filesel, int response, struct _save_messages_data *data)
+emu_save_messages_response(GtkWidget *filesel, gint response, struct _save_messages_data *data)
{
- char *uri;
+ gchar *uri;
if (response == GTK_RESPONSE_OK) {
uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel));
@@ -656,7 +656,7 @@ em_utils_save_messages (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids)
{
struct _save_messages_data *data;
GtkWidget *filesel;
- char *filename = NULL;
+ gchar *filename = NULL;
CamelMessageInfo *info = NULL;
g_return_if_fail (GTK_IS_WINDOW (parent));
@@ -687,9 +687,9 @@ em_utils_save_messages (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids)
/* ********************************************************************** */
static void
-emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *any, CORBA_Environment *ev, void *data)
+emu_add_address_cb(BonoboListener *listener, const gchar *name, const CORBA_any *any, CORBA_Environment *ev, gpointer data)
{
- char *type = bonobo_event_subtype(name);
+ gchar *type = bonobo_event_subtype(name);
if (!strcmp(type, "Destroy"))
gtk_widget_destroy((GtkWidget *)data);
@@ -699,12 +699,12 @@ emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *
/* one of email or vcard should be always NULL, never both of them */
static void
-emu_add_address_or_vcard (GtkWindow *parent, const char *email, const char *vcard)
+emu_add_address_or_vcard (GtkWindow *parent, const gchar *email, const gchar *vcard)
{
GtkWidget *win;
GtkWidget *control;
/*GtkWidget *socket;*/
- char *email_buf = NULL;
+ gchar *email_buf = NULL;
if (email) {
CamelInternetAddress *cia;
@@ -753,7 +753,7 @@ emu_add_address_or_vcard (GtkWindow *parent, const char *email, const char *vcar
* Add address @email to the addressbook.
**/
void
-em_utils_add_address (GtkWindow *parent, const char *email)
+em_utils_add_address (GtkWindow *parent, const gchar *email)
{
g_return_if_fail (GTK_IS_WINDOW (parent));
@@ -765,7 +765,7 @@ em_utils_add_address (GtkWindow *parent, const char *email)
* Adds whole vCard to the addressbook.
**/
void
-em_utils_add_vcard (GtkWindow *parent, const char *vcard)
+em_utils_add_vcard (GtkWindow *parent, const gchar *vcard)
{
g_return_if_fail (GTK_IS_WINDOW (parent));
@@ -792,12 +792,12 @@ ted_free (struct ted_t *ted)
}
static void
-tag_editor_response (GtkWidget *dialog, int button, struct ted_t *ted)
+tag_editor_response (GtkWidget *dialog, gint button, struct ted_t *ted)
{
CamelFolder *folder;
CamelTag *tags, *t;
GPtrArray *uids;
- int i;
+ gint i;
if (button == GTK_RESPONSE_OK && (tags = message_tag_editor_get_tag_list (ted->editor))) {
folder = ted->folder;
@@ -839,7 +839,7 @@ em_utils_flag_for_followup (GtkWindow *parent, CamelFolder *folder, GPtrArray *u
{
GtkWidget *editor;
struct ted_t *ted;
- int i;
+ gint i;
g_return_if_fail (GTK_IS_WINDOW (parent));
g_return_if_fail (CAMEL_IS_FOLDER (folder));
@@ -900,7 +900,7 @@ em_utils_flag_for_followup (GtkWindow *parent, CamelFolder *folder, GPtrArray *u
void
em_utils_flag_for_followup_clear (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids)
{
- int i;
+ gint i;
g_return_if_fail (GTK_IS_WINDOW (parent));
g_return_if_fail (CAMEL_IS_FOLDER (folder));
@@ -935,8 +935,8 @@ em_utils_flag_for_followup_clear (GtkWindow *parent, CamelFolder *folder, GPtrAr
void
em_utils_flag_for_followup_completed (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids)
{
- char *now;
- int i;
+ gchar *now;
+ gint i;
g_return_if_fail (GTK_IS_WINDOW (parent));
g_return_if_fail (CAMEL_IS_FOLDER (folder));
@@ -946,7 +946,7 @@ em_utils_flag_for_followup_completed (GtkWindow *parent, CamelFolder *folder, GP
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
- const char *tag;
+ const gchar *tag;
CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
if (mi) {
@@ -974,7 +974,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
{
CamelStreamFilter *filtered_stream;
CamelMimeFilterFrom *from_filter;
- int i, res = 0;
+ gint i, res = 0;
from_filter = camel_mime_filter_from_new();
filtered_stream = camel_stream_filter_new_with_stream(stream);
@@ -983,7 +983,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
for (i=0; i<uids->len; i++) {
CamelMimeMessage *message;
- char *from;
+ gchar *from;
message = camel_folder_get_message(folder, uids->pdata[i], NULL);
if (message == NULL) {
@@ -1019,7 +1019,7 @@ em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream)
{
CamelException *ex = camel_exception_new();
CamelMimeParser *mp = camel_mime_parser_new();
- int res = -1;
+ gint res = -1;
camel_mime_parser_scan_from(mp, TRUE);
camel_mime_parser_init_with_stream(mp, stream);
@@ -1095,7 +1095,7 @@ em_utils_selection_get_mailbox(GtkSelectionData *data, CamelFolder *folder)
/* TODO: a stream mem with read-only access to existing data? */
/* NB: Although copying would let us run this async ... which it should */
- stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length);
+ stream = (CamelStream *)camel_stream_mem_new_with_buffer((gchar *)data->data, data->length);
em_utils_read_messages_from_stream(folder, stream);
camel_object_unref(stream);
}
@@ -1118,7 +1118,7 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder)
return;
ex = camel_exception_new();
- stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length);
+ stream = (CamelStream *)camel_stream_mem_new_with_buffer((gchar *)data->data, data->length);
msg = camel_mime_message_new();
if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) == 0)
camel_folder_append_message(folder, msg, NULL, NULL, ex);
@@ -1138,14 +1138,14 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder)
* FIXME: be nice if this could take a folder argument rather than uri
**/
void
-em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArray *uids)
+em_utils_selection_set_uidlist(GtkSelectionData *data, const gchar *uri, GPtrArray *uids)
{
GByteArray *array = g_byte_array_new();
- int i;
+ gint i;
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */
- g_byte_array_append(array, (unsigned char *)uri, strlen(uri)+1);
+ g_byte_array_append(array, (guchar *)uri, strlen(uri)+1);
for (i=0; i<uids->len; i++)
g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1);
@@ -1164,10 +1164,10 @@ em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArra
* Warning: Could take some time to run.
**/
void
-em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int move, CamelException *ex)
+em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, gint move, CamelException *ex)
{
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */
- char *inptr, *inend;
+ gchar *inptr, *inend;
GPtrArray *uids;
CamelFolder *folder;
@@ -1176,15 +1176,15 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
uids = g_ptr_array_new();
- inptr = (char *)data->data;
- inend = (char *)(data->data + data->length);
+ inptr = (gchar *)data->data;
+ inend = (gchar *)(data->data + data->length);
while (inptr < inend) {
- char *start = inptr;
+ gchar *start = inptr;
while (inptr < inend && *inptr)
inptr++;
- if (start > (char *)data->data)
+ if (start > (gchar *)data->data)
g_ptr_array_add(uids, g_strndup(start, inptr-start));
inptr++;
@@ -1195,7 +1195,7 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
return;
}
- folder = mail_tool_uri_to_folder((char *)data->data, 0, ex);
+ folder = mail_tool_uri_to_folder((gchar *)data->data, 0, ex);
if (folder) {
camel_folder_transfer_messages_to(folder, uids, dest, NULL, move, ex);
camel_object_unref(folder);
@@ -1217,10 +1217,10 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
void
em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
{
- char *tmpdir;
+ gchar *tmpdir;
CamelStream *fstream;
- char *uri, *file = NULL, *tmpfile;
- int fd;
+ gchar *uri, *file = NULL, *tmpfile;
+ gint fd;
CamelMessageInfo *info;
tmpdir = e_mkdtemp("drag-n-drop-XXXXXX");
@@ -1260,9 +1260,9 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
if (fstream) {
if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0) {
/* terminate with \r\n to be compliant with the spec */
- char *uri_crlf = g_strconcat(uri, "\r\n", NULL);
+ gchar *uri_crlf = g_strconcat(uri, "\r\n", NULL);
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)uri_crlf, strlen(uri_crlf));
g_free(uri_crlf);
}
@@ -1288,12 +1288,12 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder)
{
CamelStream *stream;
CamelURL *url;
- int fd, i, res = 0;
- char *tmp, **uris;
+ gint fd, i, res = 0;
+ gchar *tmp, **uris;
d(printf(" * drop uri list\n"));
- tmp = g_strndup((char *)data->data, data->length);
+ tmp = g_strndup((gchar *)data->data, data->length);
uris = g_strsplit(tmp, "\n", 0);
g_free(tmp);
for (i=0;res == 0 && uris[i];i++) {
@@ -1321,9 +1321,9 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder)
}
static void
-emu_save_part_done(CamelMimePart *part, char *name, int done, void *data)
+emu_save_part_done(CamelMimePart *part, gchar *name, gint done, gpointer data)
{
- ((int *)data)[0] = done;
+ ((gint *)data)[0] = done;
}
/**
@@ -1337,12 +1337,12 @@ emu_save_part_done(CamelMimePart *part, char *name, int done, void *data)
*
* Return value: NULL if anything failed.
**/
-char *
+gchar *
em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
{
- const char *filename;
- char *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL;
- int done;
+ const gchar *filename;
+ gchar *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL;
+ gint done;
GtkWidget *w;
tmpdir = e_mkdtemp("evolution-tmp-XXXXXX");
@@ -1359,9 +1359,9 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
} else {
utf8_mfilename = g_strdup (filename);
e_filename_make_safe (utf8_mfilename);
- mfilename = g_filename_from_utf8 ((const char *) utf8_mfilename, -1, NULL, NULL, NULL);
+ mfilename = g_filename_from_utf8 ((const gchar *) utf8_mfilename, -1, NULL, NULL, NULL);
g_free (utf8_mfilename);
- filename = (const char *) mfilename;
+ filename = (const gchar *) mfilename;
}
path = g_build_filename(tmpdir, filename, NULL);
@@ -1392,14 +1392,14 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
**/
gboolean
-em_utils_folder_is_templates (CamelFolder *folder, const char *uri)
+em_utils_folder_is_templates (CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_templates_folder;
EAccountList *accounts;
EAccount *account;
EIterator *iter;
- int is = FALSE;
- char *templates_uri;
+ gint is = FALSE;
+ gchar *templates_uri;
local_templates_folder = e_mail_shell_backend_get_folder (
global_mail_shell_backend, E_MAIL_FOLDER_TEMPLATES);
@@ -1443,14 +1443,14 @@ em_utils_folder_is_templates (CamelFolder *folder, const char *uri)
* Returns %TRUE if this is a Drafts folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
+em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_drafts_folder;
EAccountList *accounts;
EAccount *account;
EIterator *iter;
- int is = FALSE;
- char *drafts_uri;
+ gint is = FALSE;
+ gchar *drafts_uri;
local_drafts_folder = e_mail_shell_backend_get_folder (
global_mail_shell_backend, E_MAIL_FOLDER_DRAFTS);
@@ -1494,14 +1494,14 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
* Returns %TRUE if this is a Sent folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
+em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_sent_folder;
EAccountList *accounts;
EAccount *account;
EIterator *iter;
- int is = FALSE;
- char *sent_uri;
+ gint is = FALSE;
+ gchar *sent_uri;
local_sent_folder = e_mail_shell_backend_get_folder (
global_mail_shell_backend, E_MAIL_FOLDER_SENT);
@@ -1545,7 +1545,7 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
* Returns %TRUE if this is an Outbox folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_outbox(CamelFolder *folder, const char *uri)
+em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_outbox_folder;
@@ -1589,8 +1589,8 @@ em_utils_adjustment_page(GtkAdjustment *adj, gboolean down)
static EProxy *emu_proxy = NULL;
static GStaticMutex emu_proxy_lock = G_STATIC_MUTEX_INIT;
-static void *
-emu_proxy_setup (void *data)
+static gpointer
+emu_proxy_setup (gpointer data)
{
if (!emu_proxy) {
emu_proxy = e_proxy_new ();
@@ -1608,10 +1608,10 @@ emu_proxy_setup (void *data)
*
* Return value: Must be freed when finished with.
**/
-char *
-em_utils_get_proxy_uri (const char *pUri)
+gchar *
+em_utils_get_proxy_uri (const gchar *pUri)
{
- char *uri = NULL;
+ gchar *uri = NULL;
g_static_mutex_lock (&emu_proxy_lock);
@@ -1641,13 +1641,13 @@ em_utils_get_proxy_uri (const char *pUri)
*
* Return value: The html version.
**/
-char *
-em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags, ssize_t *len, EMFormat *source, const char *append)
+gchar *
+em_utils_message_to_html(CamelMimeMessage *message, const gchar *credits, guint32 flags, ssize_t *len, EMFormat *source, const gchar *append)
{
EMFormatQuote *emfq;
CamelStreamMem *mem;
GByteArray *buf;
- char *text;
+ gchar *text;
buf = g_byte_array_new ();
mem = (CamelStreamMem *) camel_stream_mem_new ();
@@ -1658,7 +1658,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
if (!source) {
GConfClient *gconf;
- char *charset;
+ gchar *charset;
/* FIXME: we should be getting this from the current view, not the global setting. */
gconf = gconf_client_get_default ();
@@ -1677,7 +1677,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
camel_stream_write((CamelStream *)mem, "", 1);
camel_object_unref(mem);
- text = (char *)buf->data;
+ text = (gchar *)buf->data;
if (len)
*len = buf->len-1;
g_byte_array_free(buf, FALSE);
@@ -1697,7 +1697,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
void
em_utils_expunge_folder (GtkWidget *parent, CamelFolder *folder)
{
- char *name;
+ gchar *name;
camel_object_get(folder, NULL, CAMEL_OBJECT_DESCRIPTION, &name, 0);
@@ -1757,11 +1757,11 @@ em_utils_empty_trash (GtkWidget *parent)
mail_empty_trash (NULL, NULL, NULL);
}
-char *
-em_utils_folder_name_from_uri (const char *uri)
+gchar *
+em_utils_folder_name_from_uri (const gchar *uri)
{
CamelURL *url;
- char *folder_name = NULL;
+ gchar *folder_name = NULL;
if (uri == NULL || (url = camel_url_new (uri, NULL)) == NULL)
return NULL;
@@ -1790,12 +1790,12 @@ em_utils_folder_name_from_uri (const char *uri)
* local local:/storage/path#folder -> email://local@local/folder
*/
-char *em_uri_from_camel(const char *curi)
+gchar *em_uri_from_camel(const gchar *curi)
{
CamelURL *curl;
EAccount *account;
- const char *uid, *path;
- char *euri, *tmp;
+ const gchar *uid, *path;
+ gchar *euri, *tmp;
CamelProvider *provider;
CamelException ex;
@@ -1841,14 +1841,14 @@ char *em_uri_from_camel(const char *curi)
return euri;
}
-char *em_uri_to_camel(const char *euri)
+gchar *em_uri_to_camel(const gchar *euri)
{
EAccountList *accounts;
const EAccount *account;
EAccountService *service;
CamelProvider *provider;
CamelURL *eurl, *curl;
- char *uid, *curi;
+ gchar *uid, *curi;
if (strncmp(euri, "email:", 6) != 0) {
d(printf("em uri to camel not euri '%s'\n", euri));
@@ -1865,7 +1865,7 @@ char *em_uri_to_camel(const char *euri)
/* Sigh, shoul'dve used mbox@local for mailboxes, not local@local */
if (strcmp(eurl->host, "local") == 0
&& (strcmp(eurl->user, "local") == 0 || strcmp(eurl->user, "vfolder") == 0)) {
- char *base;
+ gchar *base;
if (strcmp(eurl->user, "vfolder") == 0)
curl = camel_url_new("vfolder:", NULL);
@@ -1876,7 +1876,7 @@ char *em_uri_to_camel(const char *euri)
#ifdef G_OS_WIN32
/* Turn backslashes into slashes to avoid URI encoding */
{
- char *p = base;
+ gchar *p = base;
while ((p = strchr (p, '\\')))
*p++ = '/';
}
@@ -1931,9 +1931,9 @@ char *em_uri_to_camel(const char *euri)
#include <libebook/e-book.h>
struct _addr_node {
- char *addr;
+ gchar *addr;
time_t stamp;
- int found;
+ gint found;
};
#define EMU_ADDR_CACHE_TIME (60*30) /* in seconds */
@@ -1943,8 +1943,8 @@ static ESourceList *emu_addr_list;
static GHashTable *emu_addr_cache;
/* runs sync, in main thread */
-static void *
-emu_addr_setup(void *dummy)
+static gpointer
+emu_addr_setup(gpointer dummy)
{
GError *err = NULL;
@@ -1957,7 +1957,7 @@ emu_addr_setup(void *dummy)
}
static void
-emu_addr_cancel_book(void *data)
+emu_addr_cancel_book(gpointer data)
{
EBook *book = data;
GError *err = NULL;
@@ -2052,9 +2052,9 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
{
GError *err = NULL;
GSList *s, *g, *addr_sources = NULL;
- int stop = FALSE, found = FALSE;
+ gint stop = FALSE, found = FALSE;
EBookQuery *query;
- const char *addr;
+ const gchar *addr;
struct _addr_node *node;
time_t now;
@@ -2104,7 +2104,7 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
for (s = e_source_group_peek_sources((ESourceGroup *)g->data);s;s=g_slist_next(s)) {
ESource *src = s->data;
- const char *completion = e_source_get_property (src, "completion");
+ const gchar *completion = e_source_get_property (src, "completion");
if (completion && !g_ascii_strcasecmp (completion, "true")) {
addr_sources = g_slist_prepend(addr_sources, src);
@@ -2179,8 +2179,8 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
struct _CamelMimePart *
em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
{
- const char *addr;
- int stop = FALSE, found = FALSE;
+ const gchar *addr;
+ gint stop = FALSE, found = FALSE;
GSList *s, *g, *addr_sources = NULL;
GError *err = NULL;
EBookQuery *query = NULL;
@@ -2209,7 +2209,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
for (s = e_source_group_peek_sources((ESourceGroup *)g->data); s; s=g_slist_next(s)) {
ESource *src = s->data;
- const char *completion = e_source_get_property (src, "completion");
+ const gchar *completion = e_source_get_property (src, "completion");
if (completion && !g_ascii_strcasecmp (completion, "true")) {
addr_sources = g_slist_prepend(addr_sources, src);
@@ -2274,7 +2274,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
/* Form a mime part out of the photo */
part = camel_mime_part_new();
camel_mime_part_set_content(part,
- (const char *) photo->data.inlined.data,
+ (const gchar *) photo->data.inlined.data,
photo->data.inlined.length, "image/jpeg");
e_contact_photo_free (photo);
@@ -2348,7 +2348,7 @@ gchar *
em_utils_url_unescape_amp (const gchar *url)
{
gchar *buff;
- int i, j, amps;
+ gint i, j, amps;
if (!url)
return NULL;
diff --git a/mail/em-utils.h b/mail/em-utils.h
index dd04f40ec3..0b413edfce 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
struct _EMFormat;
-gboolean em_utils_prompt_user(GtkWindow *parent, const char *promptkey, const char *tag, const char *arg0, ...);
+gboolean em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...);
GPtrArray *em_utils_uids_copy (GPtrArray *uids);
void em_utils_uids_free (GPtrArray *uids);
@@ -48,12 +48,12 @@ void em_utils_edit_filters (GtkWidget *parent);
void em_filename_make_safe (gchar *string);
void em_utils_edit_vfolders (GtkWidget *parent);
-void em_utils_save_part(GtkWindow *parent, const char *prompt, CamelMimePart *part);
-gboolean em_utils_save_part_to_file(GtkWindow *parent, const char *filename, CamelMimePart *part);
+void em_utils_save_part(GtkWindow *parent, const gchar *prompt, CamelMimePart *part);
+gboolean em_utils_save_part_to_file(GtkWindow *parent, const gchar *filename, CamelMimePart *part);
void em_utils_save_messages (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids);
-void em_utils_add_address(GtkWindow *parent, const char *email);
-void em_utils_add_vcard(GtkWindow *parent, const char *vcard);
+void em_utils_add_address(GtkWindow *parent, const gchar *email);
+void em_utils_add_vcard(GtkWindow *parent, const gchar *vcard);
void em_utils_flag_for_followup (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids);
void em_utils_flag_for_followup_clear (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids);
@@ -65,35 +65,35 @@ void em_utils_selection_set_mailbox(GtkSelectionData *data, CamelFolder *folder,
void em_utils_selection_get_mailbox(GtkSelectionData *data, CamelFolder *folder);
void em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder);
/* FIXME: be nice if these also worked on CamelFolder's, no easy way to get uri from folder yet tho */
-void em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArray *uids);
-void em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int move, CamelException *ex);
+void em_utils_selection_set_uidlist(GtkSelectionData *data, const gchar *uri, GPtrArray *uids);
+void em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, gint move, CamelException *ex);
void em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids);
void em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder);
-char *em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode);
-void em_utils_save_parts (GtkWindow *parent, const char *prompt, GSList * parts);
+gchar *em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode);
+void em_utils_save_parts (GtkWindow *parent, const gchar *prompt, GSList * parts);
-gboolean em_utils_folder_is_drafts(CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_templates(CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_sent(CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_outbox(CamelFolder *folder, const char *uri);
+gboolean em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_templates(CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri);
void em_utils_adjustment_page(GtkAdjustment *adj, gboolean down);
-char *em_utils_get_proxy_uri (const char *uri);
+gchar *em_utils_get_proxy_uri (const gchar *uri);
/* FIXME: should this have an override charset? */
-char *em_utils_message_to_html(CamelMimeMessage *msg, const char *credits, guint32 flags, ssize_t *len, struct _EMFormat *source, const char *append);
+gchar *em_utils_message_to_html(CamelMimeMessage *msg, const gchar *credits, guint32 flags, ssize_t *len, struct _EMFormat *source, const gchar *append);
void em_utils_expunge_folder (GtkWidget *parent, CamelFolder *folder);
void em_utils_empty_trash (GtkWidget *parent);
/* returns the folder name portion of an URI */
-char *em_utils_folder_name_from_uri (const char *uri);
+gchar *em_utils_folder_name_from_uri (const gchar *uri);
/* internal/camel uri translation */
-char *em_uri_from_camel (const char *curi);
-char *em_uri_to_camel (const char *euri);
+gchar *em_uri_from_camel (const gchar *curi);
+gchar *em_uri_to_camel (const gchar *euri);
/* Run errors silently on the status bar */
void em_utils_show_error_silent (GtkWidget *widget);
diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c
index e317b5cabf..b111376b20 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -35,7 +35,7 @@
#include "em-filter-folder-element.h"
-static FilterElement *vfolder_new_element(RuleContext *rc, const char *type);
+static FilterElement *vfolder_new_element(RuleContext *rc, const gchar *type);
static RuleContextClass *parent_class = NULL;
@@ -104,7 +104,7 @@ em_vfolder_context_new(void)
}
static FilterElement *
-vfolder_new_element(RuleContext *rc, const char *type)
+vfolder_new_element(RuleContext *rc, const gchar *type)
{
if (!strcmp(type, "system-flag")) {
return (FilterElement *) filter_option_new();
diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c
index 9a18c69a3a..1aab32d503 100644
--- a/mail/em-vfolder-editor.c
+++ b/mail/em-vfolder-editor.c
@@ -104,7 +104,7 @@ em_vfolder_editor_new (EMVFolderContext *vc)
{
EMVFolderEditor *ve = (EMVFolderEditor *) g_object_new (em_vfolder_editor_get_type(), NULL);
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"filter.glade",
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index b8ef41fda8..c75ef7d7c9 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -44,10 +44,10 @@
#define d(x)
-static int validate(FilterRule *);
-static int vfolder_eq(FilterRule *fr, FilterRule *cm);
+static gint validate(FilterRule *);
+static gint vfolder_eq(FilterRule *fr, FilterRule *cm);
static xmlNodePtr xml_encode(FilterRule *);
-static int xml_decode(FilterRule *, xmlNodePtr, RuleContext *f);
+static gint xml_decode(FilterRule *, xmlNodePtr, RuleContext *f);
static void rule_copy(FilterRule *dest, FilterRule *src);
/*static void build_code(FilterRule *, GString *out);*/
static GtkWidget *get_widget(FilterRule *fr, RuleContext *f);
@@ -57,7 +57,7 @@ static void em_vfolder_rule_init(EMVFolderRule *vr);
static void em_vfolder_rule_finalise(GObject *obj);
/* DO NOT internationalise these strings */
-static const char *with_names[] = {
+static const gchar *with_names[] = {
"specific",
"local_remote_active",
"remote_active",
@@ -142,7 +142,7 @@ em_vfolder_rule_new(void)
}
void
-em_vfolder_rule_add_source(EMVFolderRule *vr, const char *uri)
+em_vfolder_rule_add_source(EMVFolderRule *vr, const gchar *uri)
{
g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
g_return_if_fail (uri);
@@ -152,8 +152,8 @@ em_vfolder_rule_add_source(EMVFolderRule *vr, const char *uri)
filter_rule_emit_changed((FilterRule *)vr);
}
-const char *
-em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri)
+const gchar *
+em_vfolder_rule_find_source(EMVFolderRule *vr, const gchar *uri)
{
GList *l;
@@ -172,13 +172,13 @@ em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri)
}
void
-em_vfolder_rule_remove_source(EMVFolderRule *vr, const char *uri)
+em_vfolder_rule_remove_source(EMVFolderRule *vr, const gchar *uri)
{
- char *found;
+ gchar *found;
g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
- found =(char *)em_vfolder_rule_find_source(vr, uri);
+ found =(gchar *)em_vfolder_rule_find_source(vr, uri);
if (found) {
vr->sources = g_list_remove(vr->sources, found);
g_free(found);
@@ -186,15 +186,15 @@ em_vfolder_rule_remove_source(EMVFolderRule *vr, const char *uri)
}
}
-const char *
-em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last)
+const gchar *
+em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last)
{
GList *node;
if (last == NULL) {
node = vr->sources;
} else {
- node = g_list_find(vr->sources, (char *)last);
+ node = g_list_find(vr->sources, (gchar *)last);
if (node == NULL)
node = vr->sources;
else
@@ -202,7 +202,7 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last)
}
if (node)
- return (const char *)node->data;
+ return (const gchar *)node->data;
return NULL;
}
@@ -232,10 +232,10 @@ validate(FilterRule *fr)
static int
list_eq(GList *al, GList *bl)
{
- int truth = TRUE;
+ gint truth = TRUE;
while (truth && al && bl) {
- char *a = al->data, *b = bl->data;
+ gchar *a = al->data, *b = bl->data;
truth = strcmp(a, b)== 0;
al = al->next;
@@ -263,13 +263,13 @@ xml_encode(FilterRule *fr)
g_return_val_if_fail (node != NULL, NULL);
g_return_val_if_fail (vr->with < sizeof(with_names)/sizeof(with_names[0]), NULL);
- set = xmlNewNode(NULL, (const unsigned char *)"sources");
+ set = xmlNewNode(NULL, (const guchar *)"sources");
xmlAddChild(node, set);
- xmlSetProp(set, (const unsigned char *)"with", (unsigned char *)with_names[vr->with]);
+ xmlSetProp(set, (const guchar *)"with", (guchar *)with_names[vr->with]);
l = vr->sources;
while (l) {
- work = xmlNewNode(NULL, (const unsigned char *)"folder");
- xmlSetProp(work, (const unsigned char *)"uri", (unsigned char *)l->data);
+ work = xmlNewNode(NULL, (const guchar *)"folder");
+ xmlSetProp(work, (const guchar *)"uri", (guchar *)l->data);
xmlAddChild(set, work);
l = l->next;
}
@@ -278,9 +278,9 @@ xml_encode(FilterRule *fr)
}
static void
-set_with(EMVFolderRule *vr, const char *name)
+set_with(EMVFolderRule *vr, const gchar *name)
{
- int i;
+ gint i;
for(i=0;i<sizeof(with_names)/sizeof(with_names[0]);i++) {
if (!strcmp(name, with_names[i])) {
@@ -296,9 +296,9 @@ static int
xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
{
xmlNodePtr set, work;
- int result;
+ gint result;
EMVFolderRule *vr =(EMVFolderRule *)fr;
- char *tmp;
+ gchar *tmp;
result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, f);
if (result != 0)
@@ -313,16 +313,16 @@ xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
set = node->children;
while (set) {
- if (!strcmp((char *)set->name, "sources")) {
- tmp = (char *)xmlGetProp(set, (const unsigned char *)"with");
+ if (!strcmp((gchar *)set->name, "sources")) {
+ tmp = (gchar *)xmlGetProp(set, (const guchar *)"with");
if (tmp) {
set_with(vr, tmp);
xmlFree(tmp);
}
work = set->children;
while (work) {
- if (!strcmp((char *)work->name, "folder")) {
- tmp = (char *)xmlGetProp(work, (const unsigned char *)"uri");
+ if (!strcmp((gchar *)work->name, "folder")) {
+ tmp = (gchar *)xmlGetProp(work, (const guchar *)"uri");
if (tmp) {
vr->sources = g_list_append(vr->sources, g_strdup(tmp));
xmlFree(tmp);
@@ -353,7 +353,7 @@ rule_copy(FilterRule *dest, FilterRule *src)
node = vsrc->sources;
while (node) {
- char *uri = node->data;
+ gchar *uri = node->data;
vdest->sources = g_list_append(vdest->sources, g_strdup(uri));
node = node->next;
@@ -373,7 +373,7 @@ enum {
struct _source_data {
RuleContext *rc;
EMVFolderRule *vr;
- const char *current;
+ const gchar *current;
GtkListStore *model;
GtkTreeView *list;
GtkWidget *source_selector;
@@ -440,11 +440,11 @@ select_source_with_changed(GtkWidget *widget, struct _source_data *data)
}
/* attempt to make a 'nice' folder name out of the raw uri */
-static char *format_source(const char *euri)
+static gchar *format_source(const gchar *euri)
{
CamelURL *url;
GString *out;
- char *res, *uri;
+ gchar *res, *uri;
/* This should really probably base it on the account name? */
uri = em_uri_to_camel(euri);
@@ -477,10 +477,10 @@ static char *format_source(const char *euri)
static void
vfr_folder_response(GtkWidget *dialog, gint button, struct _source_data *data)
{
- const char *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog);
+ const gchar *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog);
if (button == GTK_RESPONSE_OK && uri != NULL) {
- char *urinice, *euri;
+ gchar *urinice, *euri;
GtkTreeSelection *selection;
GtkTreeIter iter;
@@ -524,11 +524,11 @@ static void
source_remove(GtkWidget *widget, struct _source_data *data)
{
GtkTreeSelection *selection;
- const char *source;
+ const gchar *source;
GtkTreePath *path;
GtkTreeIter iter;
- int index = 0;
- int n;
+ gint index = 0;
+ gint n;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data->list));
@@ -571,11 +571,11 @@ source_remove(GtkWidget *widget, struct _source_data *data)
}
-GtkWidget *em_vfolder_editor_sourcelist_new(char *widget_name, char *string1, char *string2,
- int int1, int int2);
+GtkWidget *em_vfolder_editor_sourcelist_new(gchar *widget_name, gchar *string1, gchar *string2,
+ gint int1, gint int2);
GtkWidget *
-em_vfolder_editor_sourcelist_new(char *widget_name, char *string1, char *string2, int int1, int int2)
+em_vfolder_editor_sourcelist_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
GtkWidget *table, *scrolled;
GtkTreeSelection *selection;
@@ -619,11 +619,11 @@ get_widget(FilterRule *fr, RuleContext *rc)
GtkWidget *widget, *frame, *list;
struct _source_data *data;
GtkRadioButton *rb;
- const char *source;
+ const gchar *source;
GtkTreeIter iter;
GladeXML *gui;
- int i;
- char *gladefile;
+ gint i;
+ gchar *gladefile;
widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
@@ -652,7 +652,7 @@ get_widget(FilterRule *fr, RuleContext *rc)
source = NULL;
while ((source = em_vfolder_rule_next_source(vr, source))) {
- char *nice = format_source(source);
+ gchar *nice = format_source(source);
gtk_list_store_append(data->model, &iter);
gtk_list_store_set(data->model, &iter, 0, nice, 1, source, -1);
diff --git a/mail/em-vfolder-rule.h b/mail/em-vfolder-rule.h
index 9274c94b5c..1c0b2a3113 100644
--- a/mail/em-vfolder-rule.h
+++ b/mail/em-vfolder-rule.h
@@ -60,9 +60,9 @@ GType em_vfolder_rule_get_type (void);
EMVFolderRule *em_vfolder_rule_new (void);
/* methods */
-void em_vfolder_rule_add_source (EMVFolderRule *vr, const char *uri);
-void em_vfolder_rule_remove_source (EMVFolderRule *vr, const char *uri);
-const char *em_vfolder_rule_find_source (EMVFolderRule *vr, const char *uri);
-const char *em_vfolder_rule_next_source (EMVFolderRule *vr, const char *last);
+void em_vfolder_rule_add_source (EMVFolderRule *vr, const gchar *uri);
+void em_vfolder_rule_remove_source (EMVFolderRule *vr, const gchar *uri);
+const gchar *em_vfolder_rule_find_source (EMVFolderRule *vr, const gchar *uri);
+const gchar *em_vfolder_rule_next_source (EMVFolderRule *vr, const gchar *last);
#endif /* ! _EM_VFOLDER_RULE_H */
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c
index 39bfd7bc3f..6e65418441 100644
--- a/mail/importers/elm-importer.c
+++ b/mail/importers/elm-importer.c
@@ -55,16 +55,16 @@ struct _elm_import_msg {
EImportTargetHome *target;
GMutex *status_lock;
- char *status_what;
- int status_pc;
- int status_timeout_id;
+ gchar *status_what;
+ gint status_pc;
+ gint status_timeout_id;
CamelOperation *status;
};
static GHashTable *
-parse_elm_rc(const char *elmrc)
+parse_elm_rc(const gchar *elmrc)
{
- char line[4096];
+ gchar line[4096];
FILE *handle;
GHashTable *prefs;
@@ -81,8 +81,8 @@ parse_elm_rc(const char *elmrc)
return prefs;
while (fgets (line, 4096, handle) != NULL) {
- char *linestart, *end;
- char *key, *value;
+ gchar *linestart, *end;
+ gchar *key, *value;
if (*line == '#' &&
(line[1] != '#' && line[2] != '#')) {
continue;
@@ -122,11 +122,11 @@ parse_elm_rc(const char *elmrc)
return prefs;
}
-static char *
-elm_get_rc(EImport *ei, const char *name)
+static gchar *
+elm_get_rc(EImport *ei, const gchar *name)
{
GHashTable *prefs;
- char *elmrc;
+ gchar *elmrc;
prefs = g_object_get_data((GObject *)ei, "elm-rc");
if (prefs == NULL) {
@@ -146,8 +146,8 @@ static gboolean
elm_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
{
EImportTargetHome *s;
- const char *maildir;
- char *elmdir;
+ const gchar *maildir;
+ gchar *elmdir;
gboolean mailexists, exists;
if (target->type != E_IMPORT_TARGET_HOME)
@@ -190,8 +190,8 @@ static MailImporterSpecial elm_special_folders[] = {
static void
elm_import_exec (struct _elm_import_msg *m)
{
- const char *maildir;
- char *elmdir;
+ const gchar *maildir;
+ gchar *elmdir;
maildir = elm_get_rc(m->import, "maildir");
if (maildir == NULL)
@@ -237,7 +237,7 @@ elm_import_free(struct _elm_import_msg *m)
}
static void
-elm_status(CamelOperation *op, const char *what, int pc, void *data)
+elm_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _elm_import_msg *importer = data;
@@ -254,11 +254,11 @@ elm_status(CamelOperation *op, const char *what, int pc, void *data)
}
static gboolean
-elm_status_timeout(void *data)
+elm_status_timeout(gpointer data)
{
struct _elm_import_msg *importer = data;
- int pc;
- char *what;
+ gint pc;
+ gchar *what;
if (importer->status_what) {
g_mutex_lock(importer->status_lock);
@@ -285,7 +285,7 @@ static int
mail_importer_elm_import(EImport *ei, EImportTarget *target)
{
struct _elm_import_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&elm_import_info);
g_datalist_set_data(&target->data, "elm-msg", m);
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index ff6c7dd13b..882ce64b25 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -53,12 +53,12 @@ typedef struct {
EImportTarget *target;
GMutex *status_lock;
- char *status_what;
- int status_pc;
- int status_timeout_id;
+ gchar *status_what;
+ gint status_pc;
+ gint status_timeout_id;
CamelOperation *cancel; /* cancel/status port */
- char *uri;
+ gchar *uri;
} MboxImporter;
static void
@@ -100,11 +100,11 @@ mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
static gboolean
mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
{
- char signature[6];
+ gchar signature[6];
gboolean ret = FALSE;
- int fd, n;
+ gint fd, n;
EImportTargetURI *s;
- char *filename;
+ gchar *filename;
if (target->type != E_IMPORT_TARGET_URI)
return FALSE;
@@ -129,7 +129,7 @@ mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-mbox_status(CamelOperation *op, const char *what, int pc, void *data)
+mbox_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
MboxImporter *importer = data;
@@ -146,11 +146,11 @@ mbox_status(CamelOperation *op, const char *what, int pc, void *data)
}
static gboolean
-mbox_status_timeout(void *data)
+mbox_status_timeout(gpointer data)
{
MboxImporter *importer = data;
- int pc;
- char *what;
+ gint pc;
+ gchar *what;
if (importer->status_what) {
g_mutex_lock(importer->status_lock);
@@ -166,7 +166,7 @@ mbox_status_timeout(void *data)
}
static void
-mbox_import_done(void *data, CamelException *ex)
+mbox_import_done(gpointer data, CamelException *ex)
{
MboxImporter *importer = data;
@@ -183,7 +183,7 @@ static void
mbox_import(EImport *ei, EImportTarget *target, EImportImporter *im)
{
MboxImporter *importer;
- char *filename;
+ gchar *filename;
/* TODO: do we validate target? */
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index e56ca01dcd..5540a08abf 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -61,8 +61,8 @@
* Return value: The physical uri of the folder, or NULL if the folder did
* not exist and could not be created.
**/
-char *
-mail_importer_make_local_folder(const char *folderpath)
+gchar *
+mail_importer_make_local_folder(const gchar *folderpath)
{
return g_strdup_printf("mbox:/home/notzed/.evolution/mail/local/%s", folderpath);
}
@@ -78,7 +78,7 @@ mail_importer_make_local_folder(const char *folderpath)
*/
void
mail_importer_add_line (MailImporter *importer,
- const char *str,
+ const gchar *str,
gboolean finished)
{
CamelMimeMessage *msg;
@@ -112,7 +112,7 @@ mail_importer_add_line (MailImporter *importer,
camel_message_info_free(info);
}
-struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data)
+struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const gchar *iid, gpointer data)
{
#if 0
if (strcmp(iid, ELM_INTELLIGENT_IMPORTER_IID) == 0)
@@ -132,12 +132,12 @@ struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *fac
struct _import_mbox_msg {
MailMsg base;
- char *path;
- char *uri;
+ gchar *path;
+ gchar *uri;
CamelOperation *cancel;
- void (*done)(void *data, CamelException *ex);
- void *done_data;
+ void (*done)(gpointer data, CamelException *ex);
+ gpointer done_data;
};
static gchar *
@@ -147,7 +147,7 @@ import_mbox_desc (struct _import_mbox_msg *m)
}
static struct {
- char tag;
+ gchar tag;
guint32 mozflag;
guint32 flag;
} status_flags[] = {
@@ -158,11 +158,11 @@ static struct {
};
static guint32
-decode_status(const char *status)
+decode_status(const gchar *status)
{
- const char *p;
+ const gchar *p;
guint32 flags = 0;
- int i;
+ gint i;
p = status;
while ((*p++)) {
@@ -175,11 +175,11 @@ decode_status(const char *status)
}
static guint32
-decode_mozilla_status(const char *tmp)
+decode_mozilla_status(const gchar *tmp)
{
unsigned long status = strtoul(tmp, NULL, 16);
guint32 flags = 0;
- int i;
+ gint i;
for (i=0;i<sizeof(status_flags)/sizeof(status_flags[0]);i++)
if (status_flags[i].mozflag & status)
@@ -193,7 +193,7 @@ import_mbox_exec (struct _import_mbox_msg *m)
CamelFolder *folder;
CamelMimeParser *mp = NULL;
struct stat st;
- int fd;
+ gint fd;
CamelMessageInfo *info;
if (g_stat(m->path, &st) == -1) {
@@ -232,8 +232,8 @@ import_mbox_exec (struct _import_mbox_msg *m)
camel_folder_freeze(folder);
while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
CamelMimeMessage *msg;
- const char *tmp;
- int pc = 0;
+ const gchar *tmp;
+ gint pc = 0;
guint32 flags = 0;
if (st.st_size > 0)
@@ -307,11 +307,11 @@ static MailMsgInfo import_mbox_info = {
(MailMsgFreeFunc) import_mbox_free
};
-int
-mail_importer_import_mbox(const char *path, const char *folderuri, CamelOperation *cancel, void (*done)(void *data, CamelException *), void *data)
+gint
+mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, CamelException *), gpointer data)
{
struct _import_mbox_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&import_mbox_info);
m->path = g_strdup(path);
@@ -330,7 +330,7 @@ mail_importer_import_mbox(const char *path, const char *folderuri, CamelOperatio
}
void
-mail_importer_import_mbox_sync(const char *path, const char *folderuri, CamelOperation *cancel)
+mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, CamelOperation *cancel)
{
struct _import_mbox_msg *m;
@@ -355,15 +355,15 @@ struct _import_folders_data {
};
static void
-import_folders_rec(struct _import_folders_data *m, const char *filepath, const char *folderparent)
+import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const gchar *folderparent)
{
EShellBackend *shell_backend;
GDir *dir;
- const char *d;
+ const gchar *d;
struct stat st;
const gchar *data_dir;
- char *filefull, *foldersub, *uri, *utf8_filename;
- const char *folder;
+ gchar *filefull, *foldersub, *uri, *utf8_filename;
+ const gchar *folder;
dir = g_dir_open(filepath, 0, NULL);
if (dir == NULL)
@@ -392,7 +392,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c
folder = d;
if (folderparent == NULL) {
- int i;
+ gint i;
for (i=0;m->special_folders[i].orig;i++)
if (strcmp(m->special_folders[i].orig, folder) == 0) {
@@ -411,7 +411,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c
/* This little gem re-uses the stat buffer and filefull to automagically scan mozilla-format folders */
if (!m->elmfmt) {
- char *tmp = g_strdup_printf("%s.sbd", filefull);
+ gchar *tmp = g_strdup_printf("%s.sbd", filefull);
g_free(filefull);
filefull = tmp;
@@ -450,7 +450,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c
* standard unix directories.
**/
void
-mail_importer_import_folders_sync(const char *filepath, MailImporterSpecial special_folders[], int flags, CamelOperation *cancel)
+mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel)
{
struct _import_folders_data m;
CamelOperation *oldcancel = NULL;
diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h
index f108967ebc..92f555cf75 100644
--- a/mail/importers/mail-importer.h
+++ b/mail/importers/mail-importer.h
@@ -38,14 +38,14 @@ void mail_importer_init (struct _MailComponent *mc);
void mail_importer_uninit (void);
void mail_importer_add_line (MailImporter *importer,
- const char *str,
+ const gchar *str,
gboolean finished);
-void mail_importer_create_folder (const char *parent_path,
- const char *name,
- const char *description);
+void mail_importer_create_folder (const gchar *parent_path,
+ const gchar *name,
+ const gchar *description);
/* creates a folder at folderpath on the local storage */
-char *mail_importer_make_local_folder(const char *folderpath);
+gchar *mail_importer_make_local_folder(const gchar *folderpath);
struct _BonoboObject;
struct _BonoboGenericFactory;
@@ -71,7 +71,7 @@ struct _BonoboObject *netscape_intelligent_importer_new(void);
struct _BonoboObject *mbox_importer_new(void);
struct _BonoboObject *outlook_importer_new(void);
-struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data);
+struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const gchar *iid, gpointer data);
/* Defines copied from nsMsgMessageFlags.h in Mozilla source. */
@@ -81,8 +81,8 @@ struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *fac
#define MSG_FLAG_MARKED 0x0004
#define MSG_FLAG_EXPUNGED 0x0008
-int mail_importer_import_mbox(const char *path, const char *folderuri, struct _CamelOperation *cancel, void (*done)(void *data, struct _CamelException *), void *data);
-void mail_importer_import_mbox_sync(const char *path, const char *folderuri, struct _CamelOperation *cancel);
+gint mail_importer_import_mbox(const gchar *path, const gchar *folderuri, struct _CamelOperation *cancel, void (*done)(gpointer data, struct _CamelException *), gpointer data);
+void mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, struct _CamelOperation *cancel);
struct _MailImporterSpecial {
const gchar *orig, *new;
@@ -93,6 +93,6 @@ typedef struct _MailImporterSpecial MailImporterSpecial;
#define MAIL_IMPORTER_MOZFMT (1<<0)
/* api in flux */
-void mail_importer_import_folders_sync(const char *filepath, MailImporterSpecial special_folders[], int flags, struct _CamelOperation *cancel);
+void mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, struct _CamelOperation *cancel);
#endif
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index 3a4e6d9cc1..e460d66d2e 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -58,9 +58,9 @@ struct _pine_import_msg {
EImportTarget *target;
GMutex *status_lock;
- char *status_what;
- int status_pc;
- int status_timeout_id;
+ gchar *status_what;
+ gint status_pc;
+ gint status_timeout_id;
CamelOperation *status;
};
@@ -68,7 +68,7 @@ static gboolean
pine_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
{
EImportTargetHome *s;
- char *maildir, *addrfile;
+ gchar *maildir, *addrfile;
gboolean md_exists, addr_exists;
if (target->type != E_IMPORT_TARGET_HOME)
@@ -102,10 +102,10 @@ FIXME: we dont handle aliases in lists.
*/
static void
-import_contact(EBook *book, char *line)
+import_contact(EBook *book, gchar *line)
{
- char **strings, *addr, **addrs;
- int i;
+ gchar **strings, *addr, **addrs;
+ gint i;
GList *list;
/*EContactName *name;*/
EContact *card;
@@ -165,7 +165,7 @@ import_contacts(void)
ESource *primary;
ESourceList *source_list;
EBook *book;
- char *name;
+ gchar *name;
GString *line;
FILE *fp;
size_t offset;
@@ -238,7 +238,7 @@ pine_import_exec(struct _pine_import_msg *m)
import_contacts();
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-mail"))) {
- char *path;
+ gchar *path;
path = g_build_filename(g_get_home_dir(), "mail", NULL);
mail_importer_import_folders_sync(path, pine_special_folders, 0, m->status);
@@ -280,7 +280,7 @@ pine_import_free(struct _pine_import_msg *m)
}
static void
-pine_status(CamelOperation *op, const char *what, int pc, void *data)
+pine_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _pine_import_msg *importer = data;
@@ -297,11 +297,11 @@ pine_status(CamelOperation *op, const char *what, int pc, void *data)
}
static gboolean
-pine_status_timeout(void *data)
+pine_status_timeout(gpointer data)
{
struct _pine_import_msg *importer = data;
- int pc;
- char *what;
+ gint pc;
+ gchar *what;
if (importer->status_what) {
g_mutex_lock(importer->status_lock);
@@ -328,7 +328,7 @@ static int
mail_importer_pine_import(EImport *ei, EImportTarget *target)
{
struct _pine_import_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&pine_import_info);
g_datalist_set_data(&target->data, "pine-msg", m);
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index f195ebf5d1..a9f757e6fa 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -57,9 +57,9 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr
{
FilterPart *part;
FilterElement *element;
- int i;
- const char *real, *addr;
- char *namestr;
+ gint i;
+ const gchar *real, *addr;
+ gchar *namestr;
/* address types etc should handle multiple values */
for (i = 0; camel_internet_address_get (iaddr, i, &real, &addr); i++) {
@@ -78,12 +78,12 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr
/* remove 're' part of a subject */
-static const char *
-strip_re (const char *subject)
+static const gchar *
+strip_re (const gchar *subject)
{
- const unsigned char *s, *p;
+ const guchar *s, *p;
- s = (unsigned char *) subject;
+ s = (guchar *) subject;
while (*s) {
while (isspace (*s))
@@ -103,16 +103,16 @@ strip_re (const char *subject)
break;
}
- return (char *) s;
+ return (gchar *) s;
}
#if 0
-int
-reg_match (char *str, char *regstr)
+gint
+reg_match (gchar *str, gchar *regstr)
{
regex_t reg;
- int error;
- int ret;
+ gint error;
+ gint ret;
error = regcomp(&reg, regstr, REG_EXTENDED|REG_ICASE|REG_NOSUB);
if (error != 0) {
@@ -125,7 +125,7 @@ reg_match (char *str, char *regstr)
#endif
static void
-rule_add_subject (RuleContext *context, FilterRule *rule, const char *text)
+rule_add_subject (RuleContext *context, FilterRule *rule, const gchar *text)
{
FilterPart *part;
FilterElement *element;
@@ -142,7 +142,7 @@ rule_add_subject (RuleContext *context, FilterRule *rule, const char *text)
}
static void
-rule_add_sender (RuleContext *context, FilterRule *rule, const char *text)
+rule_add_sender (RuleContext *context, FilterRule *rule, const gchar *text)
{
FilterPart *part;
FilterElement *element;
@@ -161,11 +161,11 @@ rule_add_sender (RuleContext *context, FilterRule *rule, const char *text)
/* do a bunch of things on the subject to try and detect mailing lists, remove
unneeded stuff, etc */
static void
-rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject)
+rule_match_subject (RuleContext *context, FilterRule *rule, const gchar *subject)
{
- const char *s;
- const char *s1, *s2;
- char *tmp;
+ const gchar *s;
+ const gchar *s1, *s2;
+ gchar *tmp;
s = strip_re (subject);
/* dont match on empty subject */
@@ -203,7 +203,7 @@ rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject)
}
static void
-rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist)
+rule_match_mlist(RuleContext *context, FilterRule *rule, const gchar *mlist)
{
FilterPart *part;
FilterElement *element;
@@ -222,13 +222,13 @@ rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist)
}
static void
-rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress* addr, int flags)
+rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress* addr, gint flags)
{
rule->grouping = FILTER_GROUP_ANY;
if (flags & AUTO_FROM) {
- const char *name, *address;
- char *namestr;
+ const gchar *name, *address;
+ gchar *namestr;
camel_internet_address_get (addr, 0, &name, &address);
rule_add_sender (context, rule, address);
@@ -245,15 +245,15 @@ rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress*
}
static void
-rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, int flags)
+rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, gint flags)
{
CamelInternetAddress *addr;
rule->grouping = FILTER_GROUP_ANY;
if (flags & AUTO_SUBJECT) {
- const char *subject = msg->subject ? msg->subject : "";
- char *namestr;
+ const gchar *subject = msg->subject ? msg->subject : "";
+ gchar *namestr;
rule_match_subject (context, rule, subject);
@@ -264,9 +264,9 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
/* should parse the from address into an internet address? */
if (flags & AUTO_FROM) {
const CamelInternetAddress *from;
- int i;
- const char *name, *address;
- char *namestr;
+ gint i;
+ const gchar *name, *address;
+ gchar *namestr;
from = camel_mime_message_get_from (msg);
for (i = 0; from && camel_internet_address_get (from, i, &name, &address); i++) {
@@ -287,7 +287,7 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
rule_match_recipients (context, rule, addr);
}
if (flags & AUTO_MLIST) {
- char *name, *mlist;
+ gchar *name, *mlist;
mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *)msg)->headers);
if (mlist) {
@@ -301,10 +301,10 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
}
FilterRule *
-em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, int flags, const char *source)
+em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, gint flags, const gchar *source)
{
EMVFolderRule *rule;
- char *euri = em_uri_from_camel(source);
+ gchar *euri = em_uri_from_camel(source);
rule = em_vfolder_rule_new ();
em_vfolder_rule_add_source (rule, euri);
@@ -315,10 +315,10 @@ em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg,
}
FilterRule *
-em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, int flags, const char *source)
+em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, gint flags, const gchar *source)
{
EMVFolderRule *rule;
- char *euri = em_uri_from_camel(source);
+ gchar *euri = em_uri_from_camel(source);
rule = em_vfolder_rule_new ();
em_vfolder_rule_add_source (rule, euri);
@@ -329,7 +329,7 @@ em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *a
}
FilterRule *
-filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, int flags)
+filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, gint flags)
{
EMFilterRule *rule;
FilterPart *part;
@@ -344,12 +344,12 @@ filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, int f
}
void
-filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flags)
+filter_gui_add_from_message (CamelMimeMessage *msg, const gchar *source, gint flags)
{
EShellBackend *shell_backend;
EMFilterContext *fc;
const gchar *data_dir;
- char *user, *system;
+ gchar *user, *system;
FilterRule *rule;
g_return_if_fail (msg != NULL);
@@ -373,14 +373,14 @@ filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flag
}
void
-mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri)
+mail_filter_rename_uri(CamelStore *store, const gchar *olduri, const gchar *newuri)
{
EShellBackend *shell_backend;
EMFilterContext *fc;
const gchar *data_dir;
- char *user, *system;
+ gchar *user, *system;
GList *changed;
- char *eolduri, *enewuri;
+ gchar *eolduri, *enewuri;
eolduri = em_uri_from_camel(olduri);
enewuri = em_uri_from_camel(newuri);
@@ -410,14 +410,14 @@ mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri
}
void
-mail_filter_delete_uri(CamelStore *store, const char *uri)
+mail_filter_delete_uri(CamelStore *store, const gchar *uri)
{
EShellBackend *shell_backend;
EMFilterContext *fc;
const gchar *data_dir;
- char *user, *system;
+ gchar *user, *system;
GList *deleted;
- char *euri;
+ gchar *euri;
euri = em_uri_from_camel(uri);
@@ -439,7 +439,7 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
s = g_string_new("");
l = deleted;
while (l) {
- g_string_append_printf (s, " %s\n", (char *)l->data);
+ g_string_append_printf (s, " %s\n", (gchar *)l->data);
l = l->next;
}
diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h
index c12539a9d2..67ff5d6310 100644
--- a/mail/mail-autofilter.h
+++ b/mail/mail-autofilter.h
@@ -38,15 +38,15 @@ enum {
AUTO_MLIST = 8
};
-struct _FilterRule *em_vfolder_rule_from_message(struct _EMVFolderContext *context, struct _CamelMimeMessage *msg, int flags, const char *source);
-struct _FilterRule *filter_rule_from_message(struct _EMFilterContext *context, struct _CamelMimeMessage *msg, int flags);
-struct _FilterRule *em_vfolder_rule_from_address(struct _EMVFolderContext *context, struct _CamelInternetAddress *addr, int flags, const char *source);
+struct _FilterRule *em_vfolder_rule_from_message(struct _EMVFolderContext *context, struct _CamelMimeMessage *msg, gint flags, const gchar *source);
+struct _FilterRule *filter_rule_from_message(struct _EMFilterContext *context, struct _CamelMimeMessage *msg, gint flags);
+struct _FilterRule *em_vfolder_rule_from_address(struct _EMVFolderContext *context, struct _CamelInternetAddress *addr, gint flags, const gchar *source);
/* easiest place to put this */
-void filter_gui_add_from_message(struct _CamelMimeMessage *msg, const char *source, int flags);
+void filter_gui_add_from_message(struct _CamelMimeMessage *msg, const gchar *source, gint flags);
/* Also easiest place for these, we should really share a global rule context for this stuff ... */
-void mail_filter_rename_uri(struct _CamelStore *store, const char *olduri, const char *newuri);
-void mail_filter_delete_uri(struct _CamelStore *store, const char *uri);
+void mail_filter_rename_uri(struct _CamelStore *store, const gchar *olduri, const gchar *newuri);
+void mail_filter_delete_uri(struct _CamelStore *store, const gchar *uri);
#endif
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 7cf42f63a6..e236682052 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -104,10 +104,10 @@ struct _MailComponentPrivate {
/* states/data used during shutdown */
enum { MC_QUIT_START, MC_QUIT_SYNC, MC_QUIT_THREADS } quit_state;
- int quit_count;
- int quit_expunge; /* expunge on quit this time around? */
+ gint quit_count;
+ gint quit_expunge; /* expunge on quit this time around? */
- char *base_directory;
+ gchar *base_directory;
EMFolderTreeModel *model;
@@ -118,7 +118,7 @@ struct _MailComponentPrivate {
RuleContext *search_context;
- char *context_path; /* current path for right-click menu */
+ gchar *context_path; /* current path for right-click menu */
CamelStore *local_store;
ELogger *logger;
@@ -185,7 +185,7 @@ impl_finalize (GObject *object)
}
static void
-view_on_url (GObject *emitter, const char *url, const char *nice_url, MailComponent *mail_component)
+view_on_url (GObject *emitter, const gchar *url, const gchar *nice_url, MailComponent *mail_component)
{
MailComponentPrivate *priv = mail_component->priv;
@@ -245,7 +245,7 @@ impl_createView (PortableServer_Servant servant,
GtkWidget *tree_widget, *vbox, *info;
GtkWidget *view_widget;
GtkWidget *statusbar_widget;
- char *uri;
+ gchar *uri;
mail_session_set_interactive(TRUE);
mc_startup(mail_component);
@@ -341,7 +341,7 @@ impl_requestQuit(PortableServer_Servant servant, CORBA_Environment *ev)
}
static void
-mc_quit_sync_done(CamelStore *store, void *data)
+mc_quit_sync_done(CamelStore *store, gpointer data)
{
MailComponent *mc = data;
@@ -362,7 +362,7 @@ mc_quit_delete (CamelStore *store, struct _store_info *si, MailComponent *mc)
if (folder) {
GPtrArray *uids;
- int i;
+ gint i;
uids = camel_folder_get_uids (folder);
camel_folder_freeze(folder);
@@ -387,7 +387,7 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev)
switch (mc->priv->quit_state) {
case MC_QUIT_START: {
- int now = time(NULL)/60/60/24, days;
+ gint now = time(NULL)/60/60/24, days;
gboolean empty_junk;
GConfClient *gconf = mail_config_get_gconf_client();
@@ -491,7 +491,7 @@ mail_component_init (MailComponent *component)
// priv->base_directory = g_build_filename (e_get_user_data_dir (), "mail", NULL);
//#ifdef G_OS_WIN32
// {
-// char *p = priv->base_directory;
+// gchar *p = priv->base_directory;
// while ((p = strchr(p, '\\')))
// *p++ = '/';
// }
diff --git a/mail/mail-component.h b/mail/mail-component.h
index 09b19f4c4f..a7885fd50a 100644
--- a/mail/mail-component.h
+++ b/mail/mail-component.h
@@ -67,36 +67,36 @@ GType mail_component_get_type (void);
MailComponent *mail_component_peek (void);
/* NOTE: Using NULL as the component implies using the default component */
-const char *mail_component_peek_base_directory (MailComponent *component);
+const gchar *mail_component_peek_base_directory (MailComponent *component);
struct _RuleContext *mail_component_peek_search_context (MailComponent *component);
struct _EActivityHandler *mail_component_peek_activity_handler (MailComponent *component);
void mail_component_add_store (MailComponent *component,
struct _CamelStore *store,
- const char *name);
+ const gchar *name);
struct _CamelStore *mail_component_load_store_by_uri (MailComponent *component,
- const char *uri,
- const char *name);
+ const gchar *uri,
+ const gchar *name);
void mail_component_remove_store (MailComponent *component,
struct _CamelStore *store);
void mail_component_remove_store_by_uri (MailComponent *component,
- const char *uri);
+ const gchar *uri);
-int mail_component_get_store_count (MailComponent *component);
+gint mail_component_get_store_count (MailComponent *component);
void mail_component_stores_foreach (MailComponent *component,
GHFunc func,
void *data);
-void mail_component_remove_folder (MailComponent *component, struct _CamelStore *store, const char *path);
+void mail_component_remove_folder (MailComponent *component, struct _CamelStore *store, const gchar *path);
struct _EMFolderTreeModel *mail_component_peek_tree_model (MailComponent *component);
struct _CamelStore *mail_component_peek_local_store (MailComponent *mc);
struct _CamelFolder *mail_component_get_folder(MailComponent *mc, enum _mail_component_folder_t id);
-const char *mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id);
+const gchar *mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id);
-int status_check (GNOME_Evolution_ShellState shell_state);
+gint status_check (GNOME_Evolution_ShellState shell_state);
void mail_indicate_new_mail (gboolean have_new_mail);
void mail_component_show_logger (gpointer);
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 59bab65785..916db9c59f 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -69,7 +69,7 @@
typedef struct {
GConfClient *gconf;
- char *gtkrc;
+ gchar *gtkrc;
GSList *labels;
@@ -90,7 +90,7 @@ typedef struct {
gboolean scripts_disabled;
} MailConfig;
-extern int camel_header_param_encode_filenames_in_rfc_2047;
+extern gint camel_header_param_encode_filenames_in_rfc_2047;
static MailConfig *config = NULL;
static guint config_write_timeout = 0;
@@ -98,7 +98,7 @@ static guint config_write_timeout = 0;
static void
config_clear_mime_types (void)
{
- int i;
+ gint i;
for (i = 0; i < config->mime_types->len; i++)
g_free (config->mime_types->pdata[i]);
@@ -224,13 +224,13 @@ gconf_jh_check_changed (GConfClient *client, guint cnxn_id,
name = g_ptr_array_new ();
value = g_ptr_array_new ();
while (node && node->data) {
- char **tok = g_strsplit (node->data, "=", 2);
+ gchar **tok = g_strsplit (node->data, "=", 2);
g_ptr_array_add (name, g_strdup(tok[0]));
g_ptr_array_add (value, g_strdup(tok[1]));
node = node->next;
g_strfreev (tok);
}
- mail_session_set_junk_headers ((const char **)name->pdata, (const char **)value->pdata, name->len);
+ mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len);
g_ptr_array_free (name, TRUE);
g_ptr_array_free (value, TRUE);
}
@@ -248,13 +248,13 @@ gconf_jh_headers_changed (GConfClient *client, guint cnxn_id,
name = g_ptr_array_new ();
value = g_ptr_array_new ();
while (node && node->data) {
- char **tok = g_strsplit (node->data, "=", 2);
+ gchar **tok = g_strsplit (node->data, "=", 2);
g_ptr_array_add (name, g_strdup(tok[0]));
g_ptr_array_add (value, g_strdup(tok[1]));
node = node->next;
g_strfreev (tok);
}
- mail_session_set_junk_headers ((const char **)name->pdata, (const char **)value->pdata, name->len);
+ mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len);
}
static void
@@ -522,7 +522,7 @@ mail_config_write_on_exit (void)
account_list = e_get_account_list ();
iter = e_list_get_iterator ((EList *) account_list);
while (e_iterator_is_valid (iter)) {
- char *passwd;
+ gchar *passwd;
account = (EAccount *) e_iterator_get (iter);
@@ -583,7 +583,7 @@ mail_config_get_gconf_client (void)
return config->gconf;
}
-int
+gint
mail_config_get_address_count (void)
{
if (!config->address_compress)
@@ -610,7 +610,7 @@ mail_config_get_error_level (void)
return config->error_level;
}
-int
+gint
mail_config_get_message_limit (void)
{
if (!config->mlimit)
@@ -650,14 +650,14 @@ mail_config_get_enable_magic_spacebar ()
return config->magic_spacebar;
}
-const char **
+const gchar **
mail_config_get_allowable_mime_types (void)
{
- return (const char **) config->mime_types->pdata;
+ return (const gchar **) config->mime_types->pdata;
}
static EAccount *
-mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount *account))
+mc_get_account_by (const gchar *given_url, const gchar * (get_url_string)(EAccount *account))
{
EAccountList *account_list;
EAccount *account = NULL;
@@ -678,7 +678,7 @@ mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount
iter = e_list_get_iterator ((EList *) account_list);
while (account == NULL && e_iterator_is_valid (iter)) {
CamelURL *account_url;
- const char *account_url_string;
+ const gchar *account_url_string;
account = (EAccount *) e_iterator_get (iter);
@@ -709,7 +709,7 @@ mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount
return account;
}
-static const char *
+static const gchar *
get_source_url_string (EAccount *account)
{
if (account && account->source && account->source->url && *account->source->url)
@@ -717,7 +717,7 @@ get_source_url_string (EAccount *account)
return NULL;
}
-static const char *
+static const gchar *
get_transport_url_string (EAccount *account)
{
if (account && account->transport && account->transport->url && *account->transport->url)
@@ -726,13 +726,13 @@ get_transport_url_string (EAccount *account)
}
EAccount *
-mail_config_get_account_by_source_url (const char *source_url)
+mail_config_get_account_by_source_url (const gchar *source_url)
{
return mc_get_account_by (source_url, get_source_url_string);
}
EAccount *
-mail_config_get_account_by_transport_url (const char *transport_url)
+mail_config_get_account_by_transport_url (const gchar *transport_url)
{
return mc_get_account_by (transport_url, get_transport_url_string);
}
@@ -769,13 +769,13 @@ mail_config_get_default_transport (void)
return NULL;
}
-static char *
-uri_to_evname (const char *uri, const char *prefix)
+static gchar *
+uri_to_evname (const gchar *uri, const gchar *prefix)
{
EShellBackend *shell_backend;
const gchar *data_dir;
- char *safe;
- char *tmp;
+ gchar *safe;
+ gchar *tmp;
shell_backend = E_SHELL_BACKEND (global_mail_shell_backend);
data_dir = e_shell_backend_get_data_dir (shell_backend);
@@ -792,13 +792,13 @@ uri_to_evname (const char *uri, const char *prefix)
}
void
-mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new)
+mail_config_uri_renamed (GCompareFunc uri_cmp, const gchar *old, const gchar *new)
{
EAccountList *account_list;
EAccount *account;
EIterator *iter;
- int i, work = 0;
- char *oldname, *newname;
+ gint i, work = 0;
+ gchar *oldname, *newname;
const gchar *cachenames[] = {
"config/hidestate-",
"config/et-expanded-",
@@ -847,12 +847,12 @@ mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new)
}
void
-mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri)
+mail_config_uri_deleted (GCompareFunc uri_cmp, const gchar *uri)
{
EAccountList *account_list;
EAccount *account;
EIterator *iter;
- int work = 0;
+ gint work = 0;
const gchar *local_drafts_folder_uri;
const gchar *local_sent_folder_uri;
@@ -893,10 +893,10 @@ mail_config_service_set_save_passwd (EAccountService *service, gboolean save_pas
service->save_passwd = save_passwd;
}
-char *
+gchar *
mail_config_folder_to_safe_url (CamelFolder *folder)
{
- char *url;
+ gchar *url;
url = mail_tools_folder_to_url (folder);
e_filename_make_safe (url);
@@ -904,11 +904,11 @@ mail_config_folder_to_safe_url (CamelFolder *folder)
return url;
}
-char *
-mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix)
+gchar *
+mail_config_folder_to_cachename (CamelFolder *folder, const gchar *prefix)
{
EShellBackend *shell_backend;
- char *url, *basename, *filename;
+ gchar *url, *basename, *filename;
const gchar *config_dir;
shell_backend = E_SHELL_BACKEND (global_mail_shell_backend);
diff --git a/mail/mail-config.h b/mail/mail-config.h
index 87628dcfcb..1026927b8c 100644
--- a/mail/mail-config.h
+++ b/mail/mail-config.h
@@ -81,27 +81,27 @@ void mail_config_write_on_exit (void);
struct _GConfClient *mail_config_get_gconf_client (void);
/* General Accessor functions */
-const char **mail_config_get_allowable_mime_types (void);
+const gchar **mail_config_get_allowable_mime_types (void);
void mail_config_service_set_save_passwd (struct _EAccountService *service, gboolean save_passwd);
/* accounts */
-struct _EAccount *mail_config_get_account_by_source_url (const char *url);
-struct _EAccount *mail_config_get_account_by_transport_url (const char *url);
+struct _EAccount *mail_config_get_account_by_source_url (const gchar *url);
+struct _EAccount *mail_config_get_account_by_transport_url (const gchar *url);
-int mail_config_get_address_count (void);
-int mail_config_get_message_limit (void);
+gint mail_config_get_address_count (void);
+gint mail_config_get_message_limit (void);
gboolean mail_config_get_enable_magic_spacebar (void);
struct _EAccountService *mail_config_get_default_transport (void);
/* uri's got changed by the store, etc */
-void mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new);
-void mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri);
+void mail_config_uri_renamed (GCompareFunc uri_cmp, const gchar *old, const gchar *new);
+void mail_config_uri_deleted (GCompareFunc uri_cmp, const gchar *uri);
/* static utility functions */
-char *mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix);
-char *mail_config_folder_to_safe_url (CamelFolder *folder);
+gchar *mail_config_folder_to_cachename (CamelFolder *folder, const gchar *prefix);
+gchar *mail_config_folder_to_safe_url (CamelFolder *folder);
guint mail_config_get_error_timeout (void);
guint mail_config_get_error_level (void);
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 23b85acc7f..0d8a3e6336 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -80,8 +80,8 @@ static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER;
struct _folder_info {
struct _store_info *store_info; /* 'parent' link */
- char *full_name; /* full name of folder/folderinfo */
- char *uri; /* uri of folder */
+ gchar *full_name; /* full name of folder/folderinfo */
+ gchar *uri; /* uri of folder */
guint32 flags;
@@ -93,18 +93,18 @@ struct _folder_update {
struct _folder_update *next;
struct _folder_update *prev;
- unsigned int remove:1; /* removing from vfolders */
- unsigned int delete:1; /* deleting as well? */
- unsigned int add:1; /* add to vfolder */
- unsigned int unsub:1; /* unsubcribing? */
- unsigned int new; /* new mail arrived? */
+ guint remove:1; /* removing from vfolders */
+ guint delete:1; /* deleting as well? */
+ guint add:1; /* add to vfolder */
+ guint unsub:1; /* unsubcribing? */
+ guint new; /* new mail arrived? */
- char *full_name;
- char *uri;
- char *oldfull;
- char *olduri;
+ gchar *full_name;
+ gchar *uri;
+ gchar *oldfull;
+ gchar *olduri;
- int unread;
+ gint unread;
CamelStore *store;
};
@@ -132,11 +132,11 @@ static GHashTable *stores = NULL;
/* List of folder changes to be executed in gui thread */
static EDList updates = E_DLIST_INITIALISER(updates);
-static int update_id = -1;
+static gint update_id = -1;
/* hack for people who LIKE to have unsent count */
-static int count_sent = FALSE;
-static int count_trash = FALSE;
+static gint count_sent = FALSE;
+static gint count_trash = FALSE;
static void
free_update(struct _folder_update *up)
@@ -243,7 +243,7 @@ flush_updates (EMailShellBackend *shell_backend)
}
static void
-unset_folder_info(struct _folder_info *mfi, int delete, int unsub)
+unset_folder_info(struct _folder_info *mfi, gint delete, gint unsub)
{
struct _folder_update *up;
@@ -304,7 +304,7 @@ free_folder_info(struct _folder_info *mfi)
* it's correct. */
static void
-update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
+update_1folder(struct _folder_info *mfi, gint new, CamelFolderInfo *info)
{
struct _folder_update *up;
EMailShellBackend *mail_shell_backend;
@@ -312,8 +312,8 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
CamelFolder *local_drafts;
CamelFolder *local_outbox;
CamelFolder *local_sent;
- int unread = -1;
- int deleted;
+ gint unread = -1;
+ gint deleted;
mail_shell_backend = mfi->store_info->mail_shell_backend;
local_drafts = e_mail_shell_backend_get_folder (
@@ -433,8 +433,8 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
CamelMessageInfo *info;
struct _store_info *si;
struct _folder_info *mfi;
- int new = 0;
- int i;
+ gint new = 0;
+ gint i;
guint32 flags;
d(printf("folder '%s' changed\n", folder->full_name));
@@ -503,7 +503,7 @@ static void
folder_renamed(CamelObject *o, gpointer event_data, gpointer user_data)
{
CamelFolder *folder = (CamelFolder *)o;
- char *old = event_data;
+ gchar *old = event_data;
d(printf("Folder renamed from '%s' to '%s'\n", old, folder->full_name));
@@ -547,7 +547,7 @@ void mail_note_folder(CamelFolder *folder)
}
static void
-store_folder_subscribed(CamelObject *o, void *event_data, void *data)
+store_folder_subscribed(CamelObject *o, gpointer event_data, gpointer data)
{
struct _store_info *si;
CamelFolderInfo *fi = event_data;
@@ -562,7 +562,7 @@ store_folder_subscribed(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_created(CamelObject *o, void *event_data, void *data)
+store_folder_created(CamelObject *o, gpointer event_data, gpointer data)
{
/* we only want created events to do more work if we dont support subscriptions */
if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
@@ -570,7 +570,7 @@ store_folder_created(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_opened(CamelObject *o, void *event_data, void *data)
+store_folder_opened(CamelObject *o, gpointer event_data, gpointer data)
{
CamelFolder *folder = event_data;
@@ -578,7 +578,7 @@ store_folder_opened(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_unsubscribed(CamelObject *o, void *event_data, void *data)
+store_folder_unsubscribed(CamelObject *o, gpointer event_data, gpointer data)
{
struct _store_info *si;
CamelFolderInfo *fi = event_data;
@@ -602,24 +602,24 @@ store_folder_unsubscribed(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_deleted(CamelObject *o, void *event_data, void *data)
+store_folder_deleted(CamelObject *o, gpointer event_data, gpointer data)
{
/* we only want deleted events to do more work if we dont support subscriptions */
if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
store_folder_unsubscribed(o, event_data, data);
}
-static char *
-folder_to_url(CamelStore *store, const char *full_name)
+static gchar *
+folder_to_url(CamelStore *store, const gchar *full_name)
{
CamelURL *url;
- char *out;
+ gchar *out;
url = camel_url_copy(((CamelService *)store)->url);
if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
camel_url_set_fragment(url, full_name);
} else {
- char *name = g_alloca(strlen(full_name)+2);
+ gchar *name = g_alloca(strlen(full_name)+2);
sprintf(name, "/%s", full_name);
camel_url_set_path(url, name);
@@ -632,10 +632,10 @@ folder_to_url(CamelStore *store, const char *full_name)
}
static void
-rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, CamelFolderInfo *fi)
+rename_folders(struct _store_info *si, const gchar *oldbase, const gchar *newbase, CamelFolderInfo *fi)
{
EShellBackend *shell_backend;
- char *old, *olduri, *oldfile, *newuri, *newfile;
+ gchar *old, *olduri, *oldfile, *newuri, *newfile;
struct _folder_info *mfi;
struct _folder_update *up;
const gchar *config_dir;
@@ -730,7 +730,7 @@ get_folders(CamelFolderInfo *fi, GPtrArray *folders)
}
static int
-folder_cmp(const void *ap, const void *bp)
+folder_cmp(gconstpointer ap, gconstpointer bp)
{
const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0];
const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0];
@@ -739,7 +739,7 @@ folder_cmp(const void *ap, const void *bp)
}
static void
-store_folder_renamed(CamelObject *o, void *event_data, void *data)
+store_folder_renamed(CamelObject *o, gpointer event_data, gpointer data)
{
CamelStore *store = (CamelStore *)o;
CamelRenameInfo *info = event_data;
@@ -752,7 +752,7 @@ store_folder_renamed(CamelObject *o, void *event_data, void *data)
if (si) {
GPtrArray *folders = g_ptr_array_new();
CamelFolderInfo *top;
- int i;
+ gint i;
/* Ok, so for some reason the folderinfo we have comes in all messed up from
imap, should find out why ... this makes it workable */
@@ -774,21 +774,21 @@ struct _update_data {
struct _update_data *next;
struct _update_data *prev;
- int id; /* id for cancellation */
+ gint id; /* id for cancellation */
guint cancel:1; /* also tells us we're cancelled */
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *data;
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data);
+ gpointer data;
};
static void
-unset_folder_info_hash(char *path, struct _folder_info *mfi, void *data)
+unset_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data)
{
unset_folder_info(mfi, FALSE, FALSE);
}
static void
-free_folder_info_hash(char *path, struct _folder_info *mfi, void *data)
+free_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data)
{
free_folder_info(mfi);
}
@@ -839,7 +839,7 @@ mail_note_store_remove(CamelStore *store)
}
static gboolean
-update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
+update_folders(CamelStore *store, CamelFolderInfo *fi, gpointer data)
{
struct _update_data *ud = data;
struct _store_info *si;
@@ -876,8 +876,8 @@ struct _ping_store_msg {
static gchar *
ping_store_desc (struct _ping_store_msg *m)
{
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
+ gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
+ gchar *msg;
msg = g_strdup_printf (_("Pinging %s"), service_name);
g_free (service_name);
@@ -945,7 +945,7 @@ ping_cb (gpointer user_data)
}
static void
-store_online_cb (CamelStore *store, void *data)
+store_online_cb (CamelStore *store, gpointer data)
{
struct _update_data *ud = data;
@@ -965,13 +965,13 @@ store_online_cb (CamelStore *store, void *data)
void
mail_note_store(EMailShellBackend *mail_shell_backend, CamelStore *store, CamelOperation *op,
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), gpointer data)
{
struct _store_info *si;
struct _update_data *ud;
- const char *buf;
+ const gchar *buf;
guint timeout;
- int hook = 0;
+ gint hook = 0;
g_return_if_fail (E_IS_MAIL_SHELL_BACKEND (mail_shell_backend));
g_return_if_fail (CAMEL_IS_STORE(store));
@@ -1047,7 +1047,7 @@ mail_note_store(EMailShellBackend *mail_shell_backend, CamelStore *store, CamelO
}
struct _find_info {
- const char *uri;
+ const gchar *uri;
struct _folder_info *fi;
CamelURL *url;
};
@@ -1057,7 +1057,7 @@ static void storeinfo_find_folder_info(CamelStore *store, struct _store_info *si
{
if (fi->fi == NULL) {
if (((CamelService *)store)->provider->url_equal(fi->url, ((CamelService *)store)->url)) {
- char *path = fi->url->fragment?fi->url->fragment:fi->url->path;
+ gchar *path = fi->url->fragment?fi->url->fragment:fi->url->path;
if (path[0] == '/')
path++;
@@ -1068,7 +1068,7 @@ static void storeinfo_find_folder_info(CamelStore *store, struct _store_info *si
/* returns TRUE if the uri is available, folderp is set to a
reffed folder if the folder has also already been opened */
-int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp)
+gint mail_note_get_folder_from_uri(const gchar *uri, CamelFolder **folderp)
{
struct _find_info fi = { uri, NULL, NULL };
@@ -1095,9 +1095,9 @@ int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp)
}
gboolean
-mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags)
+mail_folder_cache_get_folder_info_flags (CamelFolder *folder, gint *flags)
{
- char *uri = mail_tools_folder_to_url (folder);
+ gchar *uri = mail_tools_folder_to_url (folder);
struct _find_info fi = { uri, NULL, NULL };
if (stores == NULL)
diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h
index d7bd82dbaf..32d5016f53 100644
--- a/mail/mail-folder-cache.h
+++ b/mail/mail-folder-cache.h
@@ -36,8 +36,8 @@
The 'done' function returns if we can free folder info. */
void
mail_note_store (EMailShellBackend *mail_shell_backend, CamelStore *store, CamelOperation *op,
- gboolean (*done) (CamelStore *store, CamelFolderInfo *info, void *data),
- void *data);
+ gboolean (*done) (CamelStore *store, CamelFolderInfo *info, gpointer data),
+ gpointer data);
/* de-note a store */
void mail_note_store_remove (CamelStore *store);
@@ -50,7 +50,7 @@ void mail_note_folder (CamelFolder *folder);
/* Returns true if a folder is available (yet), and also sets *folderp (if supplied)
to a (referenced) copy of the folder if it has already been opened */
-int mail_note_get_folder_from_uri (const char *uri, CamelFolder **folderp);
-gboolean mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags);
+gint mail_note_get_folder_from_uri (const gchar *uri, CamelFolder **folderp);
+gboolean mail_folder_cache_get_folder_info_flags (CamelFolder *folder, gint *flags);
#endif
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 90119cc55a..b4572281f4 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -50,8 +50,8 @@
#define LOG_LOCKS
#define d(x)
-static void set_stop(int sensitive);
-static void mail_operation_status(struct _CamelOperation *op, const char *what, int pc, void *data);
+static void set_stop(gint sensitive);
+static void mail_operation_status(struct _CamelOperation *op, const gchar *what, gint pc, gpointer data);
#ifdef LOG_LOCKS
#define MAIL_MT_LOCK(x) (log_locks?fprintf(log, "%" G_GINT64_MODIFIER "x: lock " # x "\n", e_util_pthread_id(pthread_self())):0, pthread_mutex_lock(&x))
@@ -63,7 +63,7 @@ static void mail_operation_status(struct _CamelOperation *op, const char *what,
/* background operation status stuff */
struct _MailMsgPrivate {
- int activity_state; /* sigh sigh sigh, we need to keep track of the state external to the
+ gint activity_state; /* sigh sigh sigh, we need to keep track of the state external to the
pointer itself for locking/race conditions */
EActivity *activity;
GtkWidget *error;
@@ -73,10 +73,10 @@ struct _MailMsgPrivate {
/* mail_msg stuff */
#ifdef LOG_OPS
static FILE *log;
-static int log_ops, log_locks, log_init;
+static gint log_ops, log_locks, log_init;
#endif
-static unsigned int mail_msg_seq; /* sequence number of each message */
+static guint mail_msg_seq; /* sequence number of each message */
static GHashTable *mail_msg_active_table; /* table of active messages, must hold mail_msg_lock to access */
static pthread_mutex_t mail_msg_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t mail_msg_cond = PTHREAD_COND_INITIALIZER;
@@ -140,7 +140,7 @@ mail_msg_new (MailMsgInfo *info)
}
static void
-end_event_callback (CamelObject *o, EActivity *activity, void *error)
+end_event_callback (CamelObject *o, EActivity *activity, gpointer error)
{
EShellBackend *shell_backend;
@@ -163,10 +163,10 @@ end_event_callback (CamelObject *o, EActivity *activity, void *error)
#include <mcheck.h>
static void
-checkmem(void *p)
+checkmem(gpointer p)
{
if (p) {
- int status = mprobe(p);
+ gint status = mprobe(p);
switch (status) {
case MCHECK_HEAD:
@@ -279,12 +279,12 @@ mail_msg_unref (gpointer msg)
/* hash table of ops->dialogue of active errors */
static GHashTable *active_errors = NULL;
-static void error_destroy(GtkObject *o, void *data)
+static void error_destroy(GtkObject *o, gpointer data)
{
g_hash_table_remove(active_errors, data);
}
-static void error_response(GtkObject *o, int button, void *data)
+static void error_response(GtkObject *o, gint button, gpointer data)
{
gtk_widget_destroy((GtkWidget *)o);
}
@@ -293,7 +293,7 @@ void
mail_msg_check_error (gpointer msg)
{
MailMsg *m = msg;
- char *what;
+ gchar *what;
GtkDialog *gd;
#ifdef MALLOC_CHECK
@@ -338,7 +338,7 @@ mail_msg_check_error (gpointer msg)
gtk_widget_show((GtkWidget *)gd);
}
-void mail_msg_cancel(unsigned int msgid)
+void mail_msg_cancel(guint msgid)
{
MailMsg *m;
@@ -354,7 +354,7 @@ void mail_msg_cancel(unsigned int msgid)
/* waits for a message to be finished processing (freed)
the messageid is from MailMsg->seq */
-void mail_msg_wait(unsigned int msgid)
+void mail_msg_wait(guint msgid)
{
MailMsg *m;
@@ -379,9 +379,9 @@ void mail_msg_wait(unsigned int msgid)
}
}
-int mail_msg_active(unsigned int msgid)
+gint mail_msg_active(guint msgid)
{
- int active;
+ gint active;
MAIL_MT_LOCK(mail_msg_lock);
if (msgid == (unsigned int)-1)
@@ -667,12 +667,12 @@ struct _proxy_msg {
mail_async_event_t type;
pthread_t thread;
- int have_thread;
+ gint have_thread;
MailAsyncFunc func;
- void *o;
- void *event_data;
- void *data;
+ gpointer o;
+ gpointer event_data;
+ gpointer data;
};
static void
@@ -689,7 +689,7 @@ do_async_event(struct _proxy_msg *m)
}
static int
-idle_async_event(void *mm)
+idle_async_event(gpointer mm)
{
do_async_event(mm);
mail_msg_unref(mm);
@@ -715,10 +715,10 @@ MailAsyncEvent *mail_async_event_new(void)
return ea;
}
-int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *o, void *event_data, void *data)
+gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer o, gpointer event_data, gpointer data)
{
struct _proxy_msg *m;
- int id;
+ gint id;
/* we dont have a reply port for this, we dont care when/if it gets executed, just queue it */
m = mail_msg_new(&async_event_info);
@@ -748,9 +748,9 @@ int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsync
return id;
}
-int mail_async_event_destroy(MailAsyncEvent *ea)
+gint mail_async_event_destroy(MailAsyncEvent *ea)
{
- int id;
+ gint id;
pthread_t thread = pthread_self();
struct _proxy_msg *m;
@@ -783,7 +783,7 @@ struct _call_msg {
mail_call_t type;
MailMainFunc func;
- void *ret;
+ gpointer ret;
va_list ap;
EFlag *done;
};
@@ -791,50 +791,50 @@ struct _call_msg {
static void
do_call(struct _call_msg *m)
{
- void *p1, *p2, *p3, *p4, *p5;
- int i1;
+ gpointer p1, *p2, *p3, *p4, *p5;
+ gint i1;
va_list ap;
G_VA_COPY(ap, m->ap);
switch(m->type) {
case MAIL_CALL_p_p:
- p1 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
m->ret = m->func(p1);
break;
case MAIL_CALL_p_pp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2);
break;
case MAIL_CALL_p_ppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
+ p3 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, p3);
break;
case MAIL_CALL_p_pppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
+ p3 = va_arg(ap, gpointer );
+ p4 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, p3, p4);
break;
case MAIL_CALL_p_ppppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
- p5 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
+ p3 = va_arg(ap, gpointer );
+ p4 = va_arg(ap, gpointer );
+ p5 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, p3, p4, p5);
break;
case MAIL_CALL_p_ppippp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
i1 = va_arg(ap, int);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
- p5 = va_arg(ap, void *);
+ p3 = va_arg(ap, gpointer );
+ p4 = va_arg(ap, gpointer );
+ p5 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, i1, p3, p4, p5);
break;
}
@@ -851,11 +851,11 @@ static MailMsgInfo mail_call_info = {
(MailMsgFreeFunc) NULL
};
-void *
+gpointer
mail_call_main (mail_call_t type, MailMainFunc func, ...)
{
struct _call_msg *m;
- void *ret;
+ gpointer ret;
va_list ap;
va_start(ap, func);
@@ -885,7 +885,7 @@ mail_call_main (mail_call_t type, MailMainFunc func, ...)
/* ********************************************************************** */
/* locked via status_lock */
-static int busy_state;
+static gint busy_state;
static void
do_set_busy(MailMsg *mm)
@@ -933,9 +933,9 @@ struct _op_status_msg {
MailMsg base;
struct _CamelOperation *op;
- char *what;
- int pc;
- void *data;
+ gchar *what;
+ gint pc;
+ gpointer data;
};
static void
@@ -944,8 +944,8 @@ op_status_exec (struct _op_status_msg *m)
EShellBackend *shell_backend;
MailMsg *msg;
MailMsgPrivate *data;
- char *out, *p, *o, c;
- int pc;
+ gchar *out, *p, *o, c;
+ gint pc;
g_return_if_fail (mail_in_main_thread ());
@@ -975,7 +975,7 @@ op_status_exec (struct _op_status_msg *m)
pc = m->pc;
if (data->activity == NULL) {
- char *what;
+ gchar *what;
/* its being created/removed? well leave it be */
if (data->activity_state == 1 || data->activity_state == 3) {
@@ -1047,7 +1047,7 @@ static MailMsgInfo op_status_info = {
};
static void
-mail_operation_status (struct _CamelOperation *op, const char *what, int pc, void *data)
+mail_operation_status (struct _CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _op_status_msg *m;
@@ -1072,9 +1072,9 @@ mail_operation_status (struct _CamelOperation *op, const char *what, int pc, voi
/* ******************** */
static void
-set_stop (int sensitive)
+set_stop (gint sensitive)
{
- static int last = FALSE;
+ static gint last = FALSE;
if (last == sensitive)
return;
diff --git a/mail/mail-mt.h b/mail/mail-mt.h
index ed23c3beeb..396eb77ad2 100644
--- a/mail/mail-mt.h
+++ b/mail/mail-mt.h
@@ -40,7 +40,7 @@ typedef void (*MailMsgDispatchFunc) (gpointer msg);
struct _MailMsg {
MailMsgInfo *info;
volatile gint ref_count;
- unsigned int seq; /* seq number for synchronisation */
+ guint seq; /* seq number for synchronisation */
gint priority; /* priority (default = 0) */
CamelOperation *cancel; /* a cancellation/status handle */
CamelException ex; /* an initialised camel exception, upto the caller to use this */
@@ -66,10 +66,10 @@ gpointer mail_msg_new (MailMsgInfo *info);
gpointer mail_msg_ref (gpointer msg);
void mail_msg_unref (gpointer msg);
void mail_msg_check_error (gpointer msg);
-void mail_msg_cancel(unsigned int msgid);
-void mail_msg_wait(unsigned int msgid);
+void mail_msg_cancel(guint msgid);
+void mail_msg_wait(guint msgid);
void mail_msg_wait_all(void);
-int mail_msg_active(unsigned int msgid);
+gint mail_msg_active(guint msgid);
/* dispatch a message */
void mail_msg_main_loop_push (gpointer msg);
@@ -84,13 +84,13 @@ void mail_cancel_all (void);
void mail_msg_set_cancelable (gpointer msg, gboolean status);
/* request a string/password */
-char *mail_get_password (CamelService *service, const char *prompt,
+gchar *mail_get_password (CamelService *service, const gchar *prompt,
gboolean secret, gboolean *cache);
/* present information and get an ok (or possibly cancel)
* "type" is as for gnome_message_box_new();
*/
-gboolean mail_user_message (const char *type, const char *prompt, gboolean allow_cancel);
+gboolean mail_user_message (const gchar *type, const gchar *prompt, gboolean allow_cancel);
/* asynchronous event proxies */
typedef struct _MailAsyncEvent {
@@ -103,14 +103,14 @@ typedef enum _mail_async_event_t {
MAIL_ASYNC_THREAD
} mail_async_event_t;
-typedef void (*MailAsyncFunc)(void *, void *, void *);
+typedef void (*MailAsyncFunc)(gpointer , gpointer , gpointer );
/* create a new async event handler */
MailAsyncEvent *mail_async_event_new(void);
/* forward a camel event (or other call) to the gui thread */
-int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *, void *, void *);
+gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer );
/* wait for all outstanding async events to complete */
-int mail_async_event_destroy(MailAsyncEvent *ea);
+gint mail_async_event_destroy(MailAsyncEvent *ea);
/* Call a function in the gui thread, wait for it to return, type is the marshaller to use */
typedef enum {
@@ -122,9 +122,9 @@ typedef enum {
MAIL_CALL_p_ppippp
} mail_call_t;
-typedef void *(*MailMainFunc)();
+typedef gpointer (*MailMainFunc)();
-void *mail_call_main(mail_call_t type, MailMainFunc func, ...);
+gpointer mail_call_main(mail_call_t type, MailMainFunc func, ...);
/* use with caution. only works with active message's anyway */
void mail_enable_stop(void);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index d1116395b6..a10766bf32 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -74,7 +74,7 @@
#define w(x)
#define d(x)
-extern const char *x_mailer;
+extern const gchar *x_mailer;
/* used for both just filtering a folder + uid's, and for filtering a whole folder */
/* used both for fetching mail, and for filtering mail */
@@ -86,7 +86,7 @@ struct _filter_mail_msg {
CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */
CamelOperation *cancel;
CamelFilterDriver *driver;
- int delete; /* delete messages after filtering them? */
+ gint delete; /* delete messages after filtering them? */
CamelFolder *destination; /* default destination for any messages, NULL for none */
};
@@ -95,12 +95,12 @@ struct _fetch_mail_msg {
struct _filter_mail_msg fmsg;
CamelOperation *cancel; /* we have our own cancellation struct, the other should be empty */
- int keep; /* keep on server? */
+ gint keep; /* keep on server? */
- char *source_uri;
+ gchar *source_uri;
- void (*done)(const char *source, void *data);
- void *data;
+ void (*done)(const gchar *source, gpointer data);
+ gpointer data;
};
static gchar *
@@ -199,7 +199,7 @@ static MailMsgInfo em_filter_folder_element_info = {
void
mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
- const char *type, gboolean notify,
+ const gchar *type, gboolean notify,
CamelOperation *cancel)
{
struct _filter_mail_msg *m;
@@ -242,12 +242,12 @@ mail_filter_junk (CamelFolder *folder, GPtrArray *uids)
/* ********************************************************************** */
/* Temporary workaround for various issues. Gone before 0.11 */
-static char *
+static gchar *
uid_cachename_hack (CamelStore *store)
{
CamelURL *url = CAMEL_SERVICE (store)->url;
EShellBackend *shell_backend;
- char *encoded_url, *filename;
+ gchar *encoded_url, *filename;
const gchar *data_dir;
shell_backend = E_SHELL_BACKEND (global_mail_shell_backend);
@@ -275,7 +275,7 @@ static void
fetch_mail_exec (struct _fetch_mail_msg *m)
{
struct _filter_mail_msg *fm = (struct _filter_mail_msg *)m;
- int i;
+ gint i;
if (m->cancel)
camel_operation_register (m->cancel);
@@ -289,7 +289,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
/* FIXME: this should support keep_on_server too, which would then perform a spool
access thingy, right? problem is matching raw messages to uid's etc. */
if (!strncmp (m->source_uri, "mbox:", 5)) {
- char *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex);
+ gchar *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex);
if (path && !camel_exception_is_set (&fm->base.ex)) {
camel_folder_freeze (fm->destination);
@@ -308,7 +308,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
/* this handles 'keep on server' stuff, if we have any new uid's to copy
across, we need to copy them to a new array 'cause of the way fetch_mail_free works */
CamelUIDCache *cache = NULL;
- char *cachename;
+ gchar *cachename;
cachename = uid_cachename_hack (folder->parent_store);
cache = camel_uid_cache_new (cachename);
@@ -341,7 +341,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
if (fm->delete && !camel_exception_is_set (&fm->base.ex)) {
/* not keep on server - just delete all the actual messages on the server */
for (i=0;i<folder_uids->len;i++) {
- d(printf("force delete uid '%s'\n", (char *)folder_uids->pdata[i]));
+ d(printf("force delete uid '%s'\n", (gchar *)folder_uids->pdata[i]));
camel_folder_delete_message(folder, folder_uids->pdata[i]);
}
}
@@ -404,10 +404,10 @@ static MailMsgInfo fetch_mail_info = {
/* ouch, a 'do everything' interface ... */
void
-mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *source, void *data), void *data)
+mail_fetch_mail (const gchar *source, gint keep, const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *source, gpointer data), gpointer data)
{
struct _fetch_mail_msg *m;
struct _filter_mail_msg *fm;
@@ -450,21 +450,21 @@ static const gchar *resent_recipients[] = {
/* send 1 message to a specific transport */
static void
-mail_send_message(CamelFolder *queue, const char *uid, const char *destination, CamelFilterDriver *driver, CamelException *ex)
+mail_send_message(CamelFolder *queue, const gchar *uid, const gchar *destination, CamelFilterDriver *driver, CamelException *ex)
{
EAccount *account = NULL;
const CamelInternetAddress *iaddr;
CamelAddress *from, *recipients;
CamelMessageInfo *info = NULL;
CamelTransport *xport = NULL;
- char *transport_url = NULL;
- char *sent_folder_uri = NULL;
- const char *resent_from, *tmp;
+ gchar *transport_url = NULL;
+ gchar *sent_folder_uri = NULL;
+ const gchar *resent_from, *tmp;
CamelFolder *folder = NULL;
GString *err = NULL;
struct _camel_header_raw *xev, *header;
CamelMimeMessage *message;
- int i;
+ gint i;
message = camel_folder_get_message(queue, uid, ex);
if (!message)
@@ -477,7 +477,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
tmp = camel_header_raw_find(&xev, "X-Evolution-Account", NULL);
if (tmp) {
- char *name;
+ gchar *name;
name = g_strstrip(g_strdup(tmp));
if ((account = e_get_account_by_uid (name))
@@ -514,7 +514,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
recipients = (CamelAddress *) camel_internet_address_new ();
for (i = 0; i < 3; i++) {
- const char *type;
+ const gchar *type;
type = resent_from ? resent_recipients[i] : normal_recipients[i];
iaddr = camel_mime_message_get_recipients (message, type);
@@ -537,7 +537,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
camel_mime_message_set_date(message, CAMEL_MESSAGE_DATE_CURRENT, 0);
for (header = xev;header;header=header->next) {
- char *uri;
+ gchar *uri;
if (strcmp(header->name, "X-Evolution-PostTo") != 0)
continue;
@@ -604,9 +604,9 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
global_mail_shell_backend, E_MAIL_FOLDER_SENT);
if (folder != sent_folder) {
- const char *name;
+ const gchar *name;
- camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (char **) &name, 0);
+ camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (gchar **) &name, 0);
if (err->len)
g_string_append(err, "\n\n");
g_string_append_printf (err, _("Failed to append to %s: %s\n"
@@ -665,24 +665,24 @@ struct _send_queue_msg {
MailMsg base;
CamelFolder *queue;
- char *destination;
+ gchar *destination;
CamelFilterDriver *driver;
CamelOperation *cancel;
/* we use camelfilterstatusfunc, even though its not the filter doing it */
CamelFilterStatusFunc *status;
- void *status_data;
+ gpointer status_data;
- void (*done)(const char *destination, void *data);
- void *data;
+ void (*done)(const gchar *destination, gpointer data);
+ gpointer data;
};
static void
-report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, int pc, const char *desc, ...)
+report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, gint pc, const gchar *desc, ...)
{
va_list ap;
- char *str;
+ gchar *str;
if (m->status) {
va_start (ap, desc);
@@ -699,7 +699,7 @@ send_queue_exec (struct _send_queue_msg *m)
CamelFolder *sent_folder;
GPtrArray *uids, *send_uids = NULL;
CamelException ex;
- int i, j;
+ gint i, j;
d(printf("sending queue\n"));
@@ -743,7 +743,7 @@ send_queue_exec (struct _send_queue_msg *m)
used as a mechanism to accumualte warning messages and present them back to the user. */
for (i = 0, j = 0; i < send_uids->len; i++) {
- int pc = (100 * i) / send_uids->len;
+ gint pc = (100 * i) / send_uids->len;
report_status (m, CAMEL_FILTER_STATUS_START, pc, _("Sending message %d of %d"), i+1, send_uids->len);
if (!m->cancel)
@@ -840,11 +840,11 @@ static MailMsgInfo send_queue_info = {
/* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */
void
-mail_send_queue(CamelFolder *queue, const char *destination,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *destination, void *data), void *data)
+mail_send_queue(CamelFolder *queue, const gchar *destination,
+ const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *destination, gpointer data), gpointer data)
{
struct _send_queue_msg *m;
@@ -879,10 +879,10 @@ struct _append_msg {
CamelFolder *folder;
CamelMimeMessage *message;
CamelMessageInfo *info;
- char *appended_uid;
+ gchar *appended_uid;
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data);
- void *data;
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data);
+ gpointer data;
};
static gchar *
@@ -923,8 +923,8 @@ static MailMsgInfo append_mail_info = {
void
mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data),
- void *data)
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data),
+ gpointer data)
{
struct _append_msg *m;
@@ -955,11 +955,11 @@ struct _transfer_msg {
CamelFolder *source;
GPtrArray *uids;
gboolean delete;
- char *dest_uri;
+ gchar *dest_uri;
guint32 dest_flags;
- void (*done)(gboolean ok, void *data);
- void *data;
+ void (*done)(gboolean ok, gpointer data);
+ gpointer data;
};
static gchar *
@@ -993,7 +993,7 @@ transfer_messages_exec (struct _transfer_msg *m)
/* make sure all deleted messages are marked as seen */
if (m->delete) {
- int i;
+ gint i;
for (i = 0; i < m->uids->len; i++)
camel_folder_set_message_flags (m->source, m->uids->pdata[i],
@@ -1032,10 +1032,10 @@ static MailMsgInfo transfer_messages_info = {
void
mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
gboolean delete_from_source,
- const char *dest_uri,
+ const gchar *dest_uri,
guint32 dest_flags,
- void (*done) (gboolean ok, void *data),
- void *data)
+ void (*done) (gboolean ok, gpointer data),
+ gpointer data)
{
struct _transfer_msg *m;
@@ -1063,15 +1063,15 @@ struct _get_folderinfo_msg {
CamelStore *store;
CamelFolderInfo *info;
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *data;
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data);
+ gpointer data;
gboolean can_clear; /* whether we can clear folder info */
};
static gchar *
get_folderinfo_desc (struct _get_folderinfo_msg *m)
{
- char *ret, *name;
+ gchar *ret, *name;
name = camel_service_get_name((CamelService *)m->store, TRUE);
ret = g_strdup_printf(_("Scanning folders in \"%s\""), name);
@@ -1091,7 +1091,7 @@ static void
get_folderinfo_done (struct _get_folderinfo_msg *m)
{
if (!m->info && camel_exception_is_set (&m->base.ex)) {
- char *url;
+ gchar *url;
url = camel_service_get_url (CAMEL_SERVICE (m->store));
w(g_warning ("Error getting folder info from store at %s: %s",
@@ -1121,11 +1121,11 @@ static MailMsgInfo get_folderinfo_info = {
(MailMsgFreeFunc) get_folderinfo_free
};
-int
-mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
+gint
+mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), gpointer data)
{
struct _get_folderinfo_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&get_folderinfo_info);
if (op) {
@@ -1147,18 +1147,18 @@ mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(Cam
/* ** ATTACH MESSAGES ****************************************************** */
struct _build_data {
- void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, char *subject, void *data);
- void *data;
+ void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, gchar *subject, gpointer data);
+ gpointer data;
};
static void
-do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
+do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer data)
{
struct _build_data *d = data;
CamelMultipart *multipart;
CamelMimePart *part;
- char *subject;
- int i;
+ gchar *subject;
+ gint i;
if (messages->len == 0) {
d->done(folder, messages, NULL, NULL, d->data);
@@ -1195,7 +1195,7 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
void
mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data), void *data)
+ void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer data), gpointer data)
{
struct _build_data *d;
@@ -1213,11 +1213,11 @@ mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
struct _get_folder_msg {
MailMsg base;
- char *uri;
+ gchar *uri;
guint32 flags;
CamelFolder *folder;
- void (*done) (char *uri, CamelFolder *folder, void *data);
- void *data;
+ void (*done) (gchar *uri, CamelFolder *folder, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1255,13 +1255,13 @@ static MailMsgInfo get_folder_info = {
(MailMsgFreeFunc) get_folder_free
};
-int
-mail_get_folder (const char *uri, guint32 flags,
- void (*done)(char *uri, CamelFolder *folder, void *data),
- void *data, MailMsgDispatchFunc dispatch)
+gint
+mail_get_folder (const gchar *uri, guint32 flags,
+ void (*done)(gchar *uri, CamelFolder *folder, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_folder_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&get_folder_info);
m->uri = g_strdup (uri);
@@ -1281,9 +1281,9 @@ struct _get_quota_msg {
CamelFolder *folder;
CamelFolderQuotaInfo *quota;
- void (*done) (CamelFolder *folder, const gchar *folder_uri, CamelFolderQuotaInfo *quota, void *data);
+ void (*done) (CamelFolder *folder, const gchar *folder_uri, CamelFolderQuotaInfo *quota, gpointer data);
gchar *folder_uri;
- void *data;
+ gpointer data;
};
static gchar *
@@ -1323,14 +1323,14 @@ static MailMsgInfo get_quota_info = {
(MailMsgFreeFunc) get_quota_free
};
-int
+gint
mail_get_folder_quota (CamelFolder *folder,
const gchar *folder_uri,
- void (*done)(CamelFolder *folder, const gchar *uri, CamelFolderQuotaInfo *quota, void *data),
- void *data, MailMsgDispatchFunc dispatch)
+ void (*done)(CamelFolder *folder, const gchar *uri, CamelFolderQuotaInfo *quota, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_quota_msg *m;
- int id;
+ gint id;
g_return_val_if_fail (folder != NULL, -1);
@@ -1352,10 +1352,10 @@ mail_get_folder_quota (CamelFolder *folder,
struct _get_store_msg {
MailMsg base;
- char *uri;
+ gchar *uri;
CamelStore *store;
- void (*done) (char *uri, CamelStore *store, void *data);
- void *data;
+ void (*done) (gchar *uri, CamelStore *store, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1397,11 +1397,11 @@ static MailMsgInfo get_store_info = {
(MailMsgFreeFunc) get_store_free
};
-int
-mail_get_store (const char *uri, CamelOperation *op, void (*done) (char *uri, CamelStore *store, void *data), void *data)
+gint
+mail_get_store (const gchar *uri, CamelOperation *op, void (*done) (gchar *uri, CamelStore *store, gpointer data), gpointer data)
{
struct _get_store_msg *m;
- int id;
+ gint id;
m = mail_msg_new (&get_store_info);
if (op) {
@@ -1425,8 +1425,8 @@ struct _remove_folder_msg {
CamelFolder *folder;
gboolean removed;
- void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data);
- void *data;
+ void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1454,7 +1454,7 @@ remove_folder_rec (CamelStore *store, CamelFolderInfo *fi, CamelException *ex)
if (!CAMEL_IS_VEE_FOLDER (folder)) {
GPtrArray *uids = camel_folder_get_uids (folder);
- int i;
+ gint i;
/* Delete every message in this folder, then expunge it */
camel_folder_freeze (folder);
@@ -1522,7 +1522,7 @@ static MailMsgInfo remove_folder_info = {
};
void
-mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data), void *data)
+mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data), gpointer data)
{
struct _remove_folder_msg *m;
@@ -1543,8 +1543,8 @@ struct _sync_folder_msg {
MailMsg base;
CamelFolder *folder;
- void (*done) (CamelFolder *folder, void *data);
- void *data;
+ void (*done) (CamelFolder *folder, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1582,7 +1582,7 @@ static MailMsgInfo sync_folder_info = {
};
void
-mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
@@ -1601,15 +1601,15 @@ struct _sync_store_msg {
MailMsg base;
CamelStore *store;
- int expunge;
- void (*done) (CamelStore *store, void *data);
- void *data;
+ gint expunge;
+ void (*done) (CamelStore *store, gpointer data);
+ gpointer data;
};
static gchar *
sync_store_desc (struct _sync_store_msg *m)
{
- char *uri, *res;
+ gchar *uri, *res;
uri = camel_url_to_string(((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL);
res = g_strdup_printf(m->expunge
@@ -1649,7 +1649,7 @@ static MailMsgInfo sync_store_info = {
};
void
-mail_sync_store(CamelStore *store, int expunge, void (*done) (CamelStore *store, void *data), void *data)
+mail_sync_store(CamelStore *store, gint expunge, void (*done) (CamelStore *store, gpointer data), gpointer data)
{
struct _sync_store_msg *m;
@@ -1690,7 +1690,7 @@ static MailMsgInfo refresh_folder_info = {
};
void
-mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
@@ -1727,7 +1727,7 @@ static MailMsgInfo expunge_folder_info = {
};
void
-mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
@@ -1746,8 +1746,8 @@ struct _empty_trash_msg {
MailMsg base;
EAccount *account;
- void (*done) (EAccount *account, void *data);
- void *data;
+ void (*done) (EAccount *account, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1768,7 +1768,7 @@ empty_trash_exec (struct _empty_trash_msg *m)
EShellBackend *shell_backend;
const gchar *data_dir;
CamelFolder *trash;
- char *uri;
+ gchar *uri;
shell_backend = E_SHELL_BACKEND (global_mail_shell_backend);
@@ -1810,7 +1810,7 @@ static MailMsgInfo empty_trash_info = {
};
void
-mail_empty_trash(EAccount *account, void (*done) (EAccount *account, void *data), void *data)
+mail_empty_trash(EAccount *account, void (*done) (EAccount *account, gpointer data), gpointer data)
{
struct _empty_trash_msg *m;
@@ -1830,9 +1830,9 @@ struct _get_message_msg {
MailMsg base;
CamelFolder *folder;
- char *uid;
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data);
- void *data;
+ gchar *uid;
+ void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data);
+ gpointer data;
CamelMimeMessage *message;
CamelOperation *cancel;
};
@@ -1876,9 +1876,9 @@ static MailMsgInfo get_message_info = {
};
void
-mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid,
- CamelMimeMessage *msg, void *data),
- void *data, MailMsgDispatchFunc dispatch)
+mail_get_message(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid,
+ CamelMimeMessage *msg, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_message_msg *m;
@@ -1887,13 +1887,13 @@ mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder
camel_object_ref(folder);
m->uid = g_strdup(uid);
m->data = data;
- m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
+ m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done;
m->cancel = camel_operation_new(NULL, NULL);
dispatch (m);
}
-typedef void (*get_done)(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *);
+typedef void (*get_done)(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *);
static void
get_messagex_done (struct _get_message_msg *m)
@@ -1915,8 +1915,8 @@ static MailMsgInfo get_messagex_info = {
/* This is temporary, to avoid having to rewrite everything that uses
mail_get_message; it adds an exception argument to the callback */
CamelOperation *
-mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
- void *data, MailMsgDispatchFunc dispatch)
+mail_get_messagex(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_message_msg *m;
@@ -1925,7 +1925,7 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde
camel_object_ref(folder);
m->uid = g_strdup(uid);
m->data = data;
- m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
+ m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done;
m->cancel = camel_operation_new(NULL, NULL);
dispatch (m);
@@ -1942,8 +1942,8 @@ struct _get_messages_msg {
GPtrArray *uids;
GPtrArray *messages;
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data);
- void *data;
+ void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1957,11 +1957,11 @@ get_messages_desc (struct _get_messages_msg *m)
static void
get_messages_exec (struct _get_messages_msg *m)
{
- int i;
+ gint i;
CamelMimeMessage *message;
for (i=0; i<m->uids->len; i++) {
- int pc = ((i+1) * 100) / m->uids->len;
+ gint pc = ((i+1) * 100) / m->uids->len;
message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex);
camel_operation_progress(m->base.cancel, pc);
@@ -1982,7 +1982,7 @@ get_messages_done (struct _get_messages_msg *m)
static void
get_messages_free (struct _get_messages_msg *m)
{
- int i;
+ gint i;
em_utils_uids_free (m->uids);
for (i=0;i<m->messages->len;i++) {
@@ -2003,8 +2003,8 @@ static MailMsgInfo get_messages_info = {
void
mail_get_messages(CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
- void *data)
+ void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data),
+ gpointer data)
{
struct _get_messages_msg *m;
@@ -2026,9 +2026,9 @@ struct _save_messages_msg {
CamelFolder *folder;
GPtrArray *uids;
- char *path;
- void (*done)(CamelFolder *folder, GPtrArray *uids, char *path, void *data);
- void *data;
+ gchar *path;
+ void (*done)(CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data);
+ gpointer data;
};
static gchar *
@@ -2043,7 +2043,7 @@ static void
save_prepare_part (CamelMimePart *mime_part)
{
CamelDataWrapper *wrapper;
- int parts, i;
+ gint parts, i;
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
if (!wrapper)
@@ -2077,8 +2077,8 @@ save_messages_exec (struct _save_messages_msg *m)
CamelStreamFilter *filtered_stream;
CamelMimeFilterFrom *from_filter;
CamelStream *stream;
- int i;
- char *from, *path;
+ gint i;
+ gchar *from, *path;
if (strstr (m->path, "://"))
path = m->path;
@@ -2096,7 +2096,7 @@ save_messages_exec (struct _save_messages_msg *m)
for (i=0; i<m->uids->len; i++) {
CamelMimeMessage *message;
- int pc = ((i+1) * 100) / m->uids->len;
+ gint pc = ((i+1) * 100) / m->uids->len;
message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex);
camel_operation_progress(m->base.cancel, pc);
@@ -2148,12 +2148,12 @@ static MailMsgInfo save_messages_info = {
(MailMsgFreeFunc) save_messages_free
};
-int
-mail_save_messages(CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data), void *data)
+gint
+mail_save_messages(CamelFolder *folder, GPtrArray *uids, const gchar *path,
+ void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data), gpointer data)
{
struct _save_messages_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&save_messages_info);
m->folder = folder;
@@ -2175,9 +2175,9 @@ struct _save_part_msg {
MailMsg base;
CamelMimePart *part;
- char *path;
- void (*done)(CamelMimePart *part, char *path, int saved, void *data);
- void *data;
+ gchar *path;
+ void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data);
+ gpointer data;
gboolean readonly;
};
@@ -2192,7 +2192,7 @@ save_part_exec (struct _save_part_msg *m)
{
CamelDataWrapper *content;
CamelStream *stream;
- char *path;
+ gchar *path;
if (strstr (m->path, "://"))
path = m->path;
@@ -2253,12 +2253,12 @@ static MailMsgInfo save_part_info = {
(MailMsgFreeFunc) save_part_free
};
-int
-mail_save_part (CamelMimePart *part, const char *path,
- void (*done)(CamelMimePart *part, char *path, int saved, void *data), void *data, gboolean readonly)
+gint
+mail_save_part (CamelMimePart *part, const gchar *path,
+ void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data), gpointer data, gboolean readonly)
{
struct _save_part_msg *m;
- int id;
+ gint id;
m = mail_msg_new (&save_part_info);
m->part = part;
camel_object_ref (part);
@@ -2280,9 +2280,9 @@ struct _prep_offline_msg {
MailMsg base;
CamelOperation *cancel;
- char *uri;
- void (*done)(const char *uri, void *data);
- void *data;
+ gchar *uri;
+ void (*done)(const gchar *uri, gpointer data);
+ gpointer data;
};
static void
@@ -2336,10 +2336,10 @@ static MailMsgInfo prep_offline_info = {
};
void
-mail_prep_offline(const char *uri,
+mail_prep_offline(const gchar *uri,
CamelOperation *cancel,
- void (*done)(const char *, void *data),
- void *data)
+ void (*done)(const gchar *, gpointer data),
+ gpointer data)
{
struct _prep_offline_msg *m;
@@ -2361,15 +2361,15 @@ struct _set_offline_msg {
CamelStore *store;
gboolean offline;
- void (*done)(CamelStore *store, void *data);
- void *data;
+ void (*done)(CamelStore *store, gpointer data);
+ gpointer data;
};
static gchar *
set_offline_desc (struct _set_offline_msg *m)
{
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
+ gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
+ gchar *msg;
msg = g_strdup_printf(m->offline?_("Disconnecting from %s"):_("Reconnecting to %s"),
service_name);
@@ -2432,13 +2432,13 @@ static MailMsgInfo set_offline_info = {
(MailMsgFreeFunc) set_offline_free
};
-int
+gint
mail_store_set_offline (CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data)
+ void (*done)(CamelStore *, gpointer data),
+ gpointer data)
{
struct _set_offline_msg *m;
- int id;
+ gint id;
/* Cancel any pending connect first so the set_offline_op
* thread won't get queued behind a hung connect op.
@@ -2461,11 +2461,11 @@ mail_store_set_offline (CamelStore *store, gboolean offline,
/* ** Prepare OFFLINE ***************************************************** */
-static char *
+static gchar *
prepare_offline_desc (struct _set_offline_msg *m)
{
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
+ gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
+ gchar *msg;
msg = g_strdup_printf (_("Preparing account '%s' for offline"), service_name);
g_free(service_name);
@@ -2506,11 +2506,11 @@ static MailMsgInfo prepare_offline_info = {
(MailMsgFreeFunc) prepare_offline_free
};
-int
+gint
mail_store_prepare_offline (CamelStore *store)
{
struct _set_offline_msg *m;
- int id;
+ gint id;
/* Cancel any pending connect first so the set_offline_op
* thread won't get queued behind a hung connect op.
@@ -2530,7 +2530,7 @@ mail_store_prepare_offline (CamelStore *store)
/* ** Execute Shell Command ***************************************************** */
void
-mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data)
+mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data)
{
if (argc <= 0)
return;
@@ -2542,12 +2542,12 @@ mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, vo
struct _check_msg {
MailMsg base;
- char *url;
+ gchar *url;
CamelProviderType type;
GList *authtypes;
- void (*done)(const char *url, CamelProviderType type, GList *types, void *data);
- void *data;
+ void (*done)(const gchar *url, CamelProviderType type, GList *types, gpointer data);
+ gpointer data;
};
static gchar *
@@ -2593,11 +2593,11 @@ static MailMsgInfo check_service_info = {
(MailMsgFreeFunc) check_service_free
};
-int
-mail_check_service(const char *url, CamelProviderType type, void (*done)(const char *url, CamelProviderType type, GList *authtypes, void *data), void *data)
+gint
+mail_check_service(const gchar *url, CamelProviderType type, void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data)
{
struct _check_msg *m;
- int id;
+ gint id;
m = mail_msg_new (&check_service_info);
m->url = g_strdup(url);
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index 55816ca24b..2fc570ca93 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -40,114 +40,114 @@ extern "C" {
#include "libedataserver/e-account.h"
void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
- const char *appended_uid, void *data),
- void *data);
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok,
+ const gchar *appended_uid, gpointer data),
+ gpointer data);
void mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
gboolean delete_from_source,
- const char *dest_uri,
+ const gchar *dest_uri,
guint32 dest_flags,
- void (*done) (gboolean ok, void *data),
- void *data);
+ void (*done) (gboolean ok, gpointer data),
+ gpointer data);
/* get a single message, asynchronously */
-void mail_get_message (CamelFolder *folder, const char *uid,
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data),
- void *data,
+void mail_get_message (CamelFolder *folder, const gchar *uid,
+ void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data),
+ gpointer data,
MailMsgDispatchFunc dispatch);
CamelOperation *
-mail_get_messagex(CamelFolder *folder, const char *uid,
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
- void *data, MailMsgDispatchFunc dispatch);
+mail_get_messagex(CamelFolder *folder, const gchar *uid,
+ void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *),
+ gpointer data, MailMsgDispatchFunc dispatch);
/* get several messages */
void mail_get_messages (CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data),
+ gpointer data);
/* same for a folder */
-int mail_get_folder (const char *uri, guint32 flags,
- void (*done) (char *uri, CamelFolder *folder, void *data), void *data,
+gint mail_get_folder (const gchar *uri, guint32 flags,
+ void (*done) (gchar *uri, CamelFolder *folder, gpointer data), gpointer data,
MailMsgDispatchFunc dispatch);
/* get quota information for a folder */
-int mail_get_folder_quota (CamelFolder *folder,
+gint mail_get_folder_quota (CamelFolder *folder,
const gchar *folder_uri,
- void (*done)(CamelFolder *folder, const gchar *folder_uri, CamelFolderQuotaInfo *quota, void *data),
- void *data, MailMsgDispatchFunc dispatch);
+ void (*done)(CamelFolder *folder, const gchar *folder_uri, CamelFolderQuotaInfo *quota, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch);
/* and for a store */
-int mail_get_store (const char *uri, CamelOperation *op,
- void (*done) (char *uri, CamelStore *store, void *data), void *data);
+gint mail_get_store (const gchar *uri, CamelOperation *op,
+ void (*done) (gchar *uri, CamelStore *store, gpointer data), gpointer data);
/* build an attachment */
void mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
void (*done)(CamelFolder *folder, GPtrArray *messages,
- CamelMimePart *part, char *subject, void *data),
- void *data);
+ CamelMimePart *part, gchar *subject, gpointer data),
+ gpointer data);
void mail_sync_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data), void *data);
+ void (*done) (CamelFolder *folder, gpointer data), gpointer data);
-void mail_sync_store(CamelStore *store, int expunge,
- void (*done) (CamelStore *store, void *data), void *data);
+void mail_sync_store(CamelStore *store, gint expunge,
+ void (*done) (CamelStore *store, gpointer data), gpointer data);
void mail_refresh_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, gpointer data),
+ gpointer data);
void mail_expunge_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, gpointer data),
+ gpointer data);
void mail_empty_trash (EAccount *account,
- void (*done) (EAccount *account, void *data),
- void *data);
+ void (*done) (EAccount *account, gpointer data),
+ gpointer data);
/* get folder info asynchronously */
-int mail_get_folderinfo (CamelStore *store, CamelOperation *op,
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data),
- void *data);
+gint mail_get_folderinfo (CamelStore *store, CamelOperation *op,
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data),
+ gpointer data);
/* remove an existing folder */
void mail_remove_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data),
+ gpointer data);
/* transfer (copy/move) a folder */
-void mail_xfer_folder (const char *src_uri, const char *dest_uri, gboolean remove_source,
- void (*done) (char *src_uri, char *dest_uri, gboolean remove_source,
- CamelFolder *folder, void *data),
- void *data);
+void mail_xfer_folder (const gchar *src_uri, const gchar *dest_uri, gboolean remove_source,
+ void (*done) (gchar *src_uri, gchar *dest_uri, gboolean remove_source,
+ CamelFolder *folder, gpointer data),
+ gpointer data);
/* save messages */
-int mail_save_messages (CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data),
- void *data);
+gint mail_save_messages (CamelFolder *folder, GPtrArray *uids, const gchar *path,
+ void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data),
+ gpointer data);
-int mail_save_part (CamelMimePart *part, const char *path,
- void (*done)(CamelMimePart *part, char *path, int saved, void *data),
- void *data, gboolean readonly);
+gint mail_save_part (CamelMimePart *part, const gchar *path,
+ void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data),
+ gpointer data, gboolean readonly);
/* yeah so this is messy, but it does a lot, maybe i can consolidate all user_data's to be the one */
-void mail_send_queue (CamelFolder *queue, const char *destination,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *destination, void *data),
- void *data);
-
-void mail_fetch_mail (const char *source, int keep,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *source, void *data),
- void *data);
+void mail_send_queue (CamelFolder *queue, const gchar *destination,
+ const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *destination, gpointer data),
+ gpointer data);
+
+void mail_fetch_mail (const gchar *source, gint keep,
+ const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *source, gpointer data),
+ gpointer data);
void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
- const char *type, gboolean notify,
+ const gchar *type, gboolean notify,
CamelOperation *cancel);
/* convenience functions for above */
@@ -155,19 +155,19 @@ void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids);
void mail_filter_junk (CamelFolder *folder, GPtrArray *uids);
/* Work Offline */
-void mail_prep_offline(const char *uri, CamelOperation *cancel,
- void (*done)(const char *, void *data),
- void *data);
-int mail_store_set_offline(CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data);
-int mail_store_prepare_offline (CamelStore *store);
+void mail_prep_offline(const gchar *uri, CamelOperation *cancel,
+ void (*done)(const gchar *, gpointer data),
+ gpointer data);
+gint mail_store_set_offline(CamelStore *store, gboolean offline,
+ void (*done)(CamelStore *, gpointer data),
+ gpointer data);
+gint mail_store_prepare_offline (CamelStore *store);
/* filter driver execute shell command async callback */
-void mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data);
+void mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data);
-int mail_check_service(const char *url, CamelProviderType type,
- void (*done)(const char *url, CamelProviderType type, GList *authtypes, void *data), void *data);
+gint mail_check_service(const gchar *url, CamelProviderType type,
+ void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data);
#ifdef __cplusplus
}
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index a463bb835b..95f3ca53e2 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -71,17 +71,17 @@
/* this stuff is used to keep track of which folders filters have accessed, and
what not. the thaw/refreeze thing doesn't really seem to work though */
struct _folder_info {
- char *uri;
+ gchar *uri;
CamelFolder *folder;
time_t update;
- int count; /* how many times updated, to slow it down as we go, if we have lots */
+ gint count; /* how many times updated, to slow it down as we go, if we have lots */
};
struct _send_data {
GList *infos;
GtkDialog *gd;
- int cancelled;
+ gint cancelled;
CamelFolder *inbox; /* since we're never asked to update this one, do it ourselves */
time_t inbox_update;
@@ -108,24 +108,24 @@ typedef enum {
struct _send_info {
send_info_t type; /* 0 = fetch, 1 = send */
CamelOperation *cancel;
- char *uri;
+ gchar *uri;
gboolean keep_on_server;
send_state_t state;
GtkWidget *progress_bar;
GtkWidget *cancel_button;
GtkWidget *status_label;
- int again; /* need to run send again */
+ gint again; /* need to run send again */
- int timeout_id;
- char *what;
- int pc;
+ gint timeout_id;
+ gchar *what;
+ gint pc;
/*time_t update;*/
struct _send_data *data;
};
-static CamelFolder *receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex);
+static CamelFolder *receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex);
static struct _send_data *send_data = NULL;
static GtkWidget *send_recv_dialog = NULL;
@@ -212,13 +212,13 @@ free_send_data(void)
}
static void
-cancel_send_info(void *key, struct _send_info *info, void *data)
+cancel_send_info(gpointer key, struct _send_info *info, gpointer data)
{
receive_cancel (GTK_BUTTON (info->cancel_button), info);
}
static void
-hide_send_info(void *key, struct _send_info *info, void *data)
+hide_send_info(gpointer key, struct _send_info *info, gpointer data)
{
info->cancel_button = NULL;
info->progress_bar = NULL;
@@ -239,7 +239,7 @@ dialog_destroy_cb (struct _send_data *data, GObject *deadbeef)
}
static void
-dialog_response(GtkDialog *gd, int button, struct _send_data *data)
+dialog_response(GtkDialog *gd, gint button, struct _send_data *data)
{
switch(button) {
case GTK_RESPONSE_CANCEL:
@@ -260,7 +260,7 @@ dialog_response(GtkDialog *gd, int button, struct _send_data *data)
}
static int
-operation_status_timeout(void *data)
+operation_status_timeout(gpointer data)
{
struct _send_info *info = data;
@@ -279,7 +279,7 @@ operation_status_timeout(void *data)
}
static void
-set_send_status(struct _send_info *info, const char *desc, int pc)
+set_send_status(struct _send_info *info, const gchar *desc, gint pc)
{
/* FIXME: LOCK */
g_free(info->what);
@@ -289,7 +289,7 @@ set_send_status(struct _send_info *info, const char *desc, int pc)
/* for camel operation status */
static void
-operation_status(CamelOperation *op, const char *what, int pc, void *data)
+operation_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _send_info *info = data;
@@ -306,11 +306,11 @@ operation_status(CamelOperation *op, const char *what, int pc, void *data)
set_send_status(info, what, pc);
}
-static char *
-format_url(const char *internal_url, const char *account_name)
+static gchar *
+format_url(const gchar *internal_url, const gchar *account_name)
{
CamelURL *url;
- char *pretty_url;
+ gchar *pretty_url;
url = camel_url_new(internal_url, NULL);
if (account_name) {
@@ -335,7 +335,7 @@ format_url(const char *internal_url, const char *account_name)
}
static send_info_t
-get_receive_type(const char *url)
+get_receive_type(const gchar *url)
{
CamelProvider *provider;
CamelException ex;
@@ -372,7 +372,7 @@ build_dialog (GtkWindow *parent,
{
GtkDialog *gd;
GtkWidget *table;
- int row, num_sources;
+ gint row, num_sources;
GList *list = NULL;
struct _send_data *data;
GtkWidget *send_icon;
@@ -383,7 +383,7 @@ build_dialog (GtkWindow *parent,
GtkWidget *progress_bar;
GtkWidget *cancel_button;
struct _send_info *info;
- char *pretty_url;
+ gchar *pretty_url;
EAccount *account;
EIterator *iter;
EMEventTargetSendReceive *target;
@@ -634,7 +634,7 @@ build_dialog (GtkWindow *parent,
}
static void
-update_folders(char *uri, struct _folder_info *info, void *data)
+update_folders(gchar *uri, struct _folder_info *info, gpointer data)
{
time_t now = *((time_t *)data);
@@ -652,7 +652,7 @@ update_folders(char *uri, struct _folder_info *info, void *data)
}
static void
-receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, void *data)
+receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, gint pc, const gchar *desc, gpointer data)
{
struct _send_info *info = data;
time_t now = time(NULL);
@@ -684,7 +684,7 @@ receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, in
/* when receive/send is complete */
static void
-receive_done (const gchar *uri, void *data)
+receive_done (const gchar *uri, gpointer data)
{
struct _send_info *info = data;
@@ -747,7 +747,7 @@ receive_done (const gchar *uri, void *data)
This can also be used to hook into which folders are being updated, and occasionally
let them refresh */
static CamelFolder *
-receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
+receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex)
{
struct _send_info *info = data;
CamelFolder *folder;
@@ -825,7 +825,7 @@ refresh_folders_desc (struct _refresh_folders_msg *m)
static void
refresh_folders_exec (struct _refresh_folders_msg *m)
{
- int i;
+ gint i;
CamelFolder *folder;
CamelException ex = CAMEL_EXCEPTION_INITIALISER;
@@ -858,7 +858,7 @@ refresh_folders_done (struct _refresh_folders_msg *m)
static void
refresh_folders_free (struct _refresh_folders_msg *m)
{
- int i;
+ gint i;
for (i=0;i<m->folders->len;i++)
g_free(m->folders->pdata[i]);
@@ -877,7 +877,7 @@ static MailMsgInfo refresh_folders_info = {
};
static gboolean
-receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *data)
+receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, gpointer data)
{
if (info) {
GPtrArray *folders = g_ptr_array_new();
@@ -903,7 +903,7 @@ receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *da
}
static void
-receive_update_got_store (char *uri, CamelStore *store, void *data)
+receive_update_got_store (gchar *uri, CamelStore *store, gpointer data)
{
struct _send_info *info = data;
@@ -980,14 +980,14 @@ mail_send_receive (GtkWindow *parent)
struct _auto_data {
EAccount *account;
- int period; /* in seconds */
- int timeout_id;
+ gint period; /* in seconds */
+ gint timeout_id;
};
static GHashTable *auto_active;
static gboolean
-auto_timeout(void *data)
+auto_timeout(gpointer data)
{
struct _auto_data *info = data;
@@ -1006,7 +1006,7 @@ auto_timeout(void *data)
}
static void
-auto_account_removed(EAccountList *eal, EAccount *ea, void *dummy)
+auto_account_removed(EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive");
@@ -1029,7 +1029,7 @@ auto_account_finalised(struct _auto_data *info)
static void
auto_account_commit(struct _auto_data *info)
{
- int period, check;
+ gint period, check;
check = info->account->enabled
&& e_account_get_bool(info->account, E_ACCOUNT_SOURCE_AUTO_CHECK)
@@ -1049,7 +1049,7 @@ auto_account_commit(struct _auto_data *info)
}
static void
-auto_account_added(EAccountList *eal, EAccount *ea, void *dummy)
+auto_account_added(EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info;
@@ -1060,7 +1060,7 @@ auto_account_added(EAccountList *eal, EAccount *ea, void *dummy)
}
static void
-auto_account_changed(EAccountList *eal, EAccount *ea, void *dummy)
+auto_account_changed(EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive");
diff --git a/mail/mail-session.c b/mail/mail-session.c
index bab6a67729..862b611d15 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -61,7 +61,7 @@
#define d(x)
CamelSession *session;
-static int session_check_junk_notify_id = -1;
+static gint session_check_junk_notify_id = -1;
#define MAIL_SESSION_TYPE (mail_session_get_type ())
#define MAIL_SESSION(obj) (CAMEL_CHECK_CAST((obj), MAIL_SESSION_TYPE, MailSession))
@@ -86,16 +86,16 @@ typedef struct _MailSessionClass {
static EMailShellBackend *session_mail_shell_backend;
static CamelSessionClass *ms_parent_class;
-static char *get_password(CamelSession *session, CamelService *service, const char *domain, const char *prompt, const char *item, guint32 flags, CamelException *ex);
-static void forget_password(CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex);
-static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel);
-static CamelFilterDriver *get_filter_driver(CamelSession *session, const char *type, CamelException *ex);
-static gboolean lookup_addressbook(CamelSession *session, const char *name);
+static gchar *get_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *prompt, const gchar *item, guint32 flags, CamelException *ex);
+static void forget_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, CamelException *ex);
+static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel);
+static CamelFilterDriver *get_filter_driver(CamelSession *session, const gchar *type, CamelException *ex);
+static gboolean lookup_addressbook(CamelSession *session, const gchar *name);
-static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc);
-static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size);
+static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc);
+static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size);
static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m);
-static void ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex);
+static void ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex);
static void
init (MailSession *session)
@@ -152,10 +152,10 @@ mail_session_get_type (void)
}
-static char *
-make_key (CamelService *service, const char *item)
+static gchar *
+make_key (CamelService *service, const gchar *item)
{
- char *key;
+ gchar *key;
if (service)
key = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -167,12 +167,12 @@ make_key (CamelService *service, const char *item)
/* ********************************************************************** */
-static char *
-get_password (CamelSession *session, CamelService *service, const char *domain,
- const char *prompt, const char *item, guint32 flags, CamelException *ex)
+static gchar *
+get_password (CamelSession *session, CamelService *service, const gchar *domain,
+ const gchar *prompt, const gchar *item, guint32 flags, CamelException *ex)
{
- char *url;
- char *ret = NULL;
+ gchar *url;
+ gchar *ret = NULL;
EAccount *account = NULL;
url = service?camel_url_to_string(service->url, CAMEL_URL_HIDE_ALL):NULL;
@@ -185,7 +185,7 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
else
ret = g_strdup(url);
} else {
- char *key = make_key(service, item);
+ gchar *key = make_key(service, item);
EAccountService *config_service = NULL;
if (domain == NULL)
@@ -206,7 +206,7 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
if (!config_service || (config_service && !config_service->get_password_canceled)) {
guint32 eflags;
- char *title;
+ gchar *title;
if (flags & CAMEL_SESSION_PASSPHRASE) {
if (account)
@@ -265,9 +265,9 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
}
static void
-forget_password (CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex)
+forget_password (CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, CamelException *ex)
{
- char *key = make_key (service, item);
+ gchar *key = make_key (service, item);
e_passwords_forget_password (domain?domain:"Mail", key);
g_free (key);
@@ -282,18 +282,18 @@ struct _user_message_msg {
MailMsg base;
CamelSessionAlertType type;
- char *prompt;
+ gchar *prompt;
EFlag *done;
- unsigned int allow_cancel:1;
- unsigned int result:1;
- unsigned int ismain:1;
+ guint allow_cancel:1;
+ guint result:1;
+ guint ismain:1;
};
static void user_message_exec (struct _user_message_msg *m);
static void
-user_message_response_free (GtkDialog *dialog, int button, struct _user_message_msg *m)
+user_message_response_free (GtkDialog *dialog, gint button, struct _user_message_msg *m)
{
gtk_widget_destroy ((GtkWidget *) dialog);
@@ -309,7 +309,7 @@ user_message_response_free (GtkDialog *dialog, int button, struct _user_message_
/* clicked, send back the reply */
static void
-user_message_response (GtkDialog *dialog, int button, struct _user_message_msg *m)
+user_message_response (GtkDialog *dialog, gint button, struct _user_message_msg *m)
{
/* if !allow_cancel, then we've already replied */
if (m->allow_cancel) {
@@ -400,7 +400,7 @@ static MailMsgInfo user_message_info = {
};
static gboolean
-lookup_addressbook(CamelSession *session, const char *name)
+lookup_addressbook(CamelSession *session, const gchar *name)
{
CamelInternetAddress *addr;
gboolean ret;
@@ -417,7 +417,7 @@ lookup_addressbook(CamelSession *session, const char *name)
}
static gboolean
-alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel)
+alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel)
{
MailSession *mail_session = MAIL_SESSION (session);
struct _user_message_msg *m;
@@ -454,13 +454,13 @@ alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt
}
static CamelFolder *
-get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
+get_folder (CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex)
{
return mail_tool_uri_to_folder(uri, 0, ex);
}
static void
-main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data)
+main_play_sound (CamelFilterDriver *driver, gchar *filename, gpointer user_data)
{
if (filename && *filename)
gnome_sound_play (filename);
@@ -472,7 +472,7 @@ main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data)
}
static void
-session_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data)
+session_play_sound (CamelFilterDriver *driver, const gchar *filename, gpointer user_data)
{
MailSession *ms = (MailSession *) session;
@@ -501,13 +501,13 @@ session_system_beep (CamelFilterDriver *driver, gpointer user_data)
}
static CamelFilterDriver *
-main_get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+main_get_filter_driver (CamelSession *session, const gchar *type, CamelException *ex)
{
EShellBackend *shell_backend;
CamelFilterDriver *driver;
FilterRule *rule = NULL;
const gchar *data_dir;
- char *user, *system;
+ gchar *user, *system;
GConfClient *gconf;
RuleContext *fc;
@@ -529,7 +529,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
MailSession *ms = (MailSession *) session;
if (ms->filter_logfile == NULL) {
- char *filename;
+ gchar *filename;
filename = gconf_client_get_string (gconf, "/apps/evolution/mail/filters/logfile", NULL);
if (filename) {
@@ -585,7 +585,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
}
static CamelFilterDriver *
-get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+get_filter_driver (CamelSession *session, const gchar *type, CamelException *ex)
{
return (CamelFilterDriver *) mail_call_main (MAIL_CALL_p_ppp, (MailMainFunc) main_get_filter_driver,
session, type, ex);
@@ -596,7 +596,7 @@ get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
static MailMsgInfo ms_thread_info_dummy = { sizeof (MailMsg) };
-static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size)
+static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size)
{
CamelSessionThreadMsg *msg = ms_parent_class->thread_msg_new(session, ops, size);
@@ -620,14 +620,14 @@ static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m)
ms_parent_class->thread_msg_free(session, m);
}
-static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc)
+static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc)
{
/* This should never be called since we bypass it in alloc! */
printf("Thread status '%s' %d%%\n", text, pc);
}
static void
-ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex)
+ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex)
{
g_return_if_fail (session != NULL);
g_return_if_fail (message != NULL);
@@ -636,12 +636,12 @@ ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *mes
em_utils_forward_message_raw (folder, message, address, ex);
}
-char *
-mail_session_get_password (const char *url_string)
+gchar *
+mail_session_get_password (const gchar *url_string)
{
CamelURL *url;
- char *simple_url;
- char *passwd;
+ gchar *simple_url;
+ gchar *passwd;
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -655,11 +655,11 @@ mail_session_get_password (const char *url_string)
}
void
-mail_session_add_password (const char *url_string,
- const char *passwd)
+mail_session_add_password (const gchar *url_string,
+ const gchar *passwd)
{
CamelURL *url;
- char *simple_url;
+ gchar *simple_url;
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -671,10 +671,10 @@ mail_session_add_password (const char *url_string,
}
void
-mail_session_remember_password (const char *url_string)
+mail_session_remember_password (const gchar *url_string)
{
CamelURL *url;
- char *simple_url;
+ gchar *simple_url;
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -686,7 +686,7 @@ mail_session_remember_password (const char *url_string)
}
void
-mail_session_forget_password (const char *key)
+mail_session_forget_password (const gchar *key)
{
e_passwords_forget_password ("Mail", key);
}
@@ -796,11 +796,11 @@ mail_session_flush_filter_log (void)
}
void
-mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plugin)
+mail_session_add_junk_plugin (const gchar *plugin_name, CamelJunkPlugin *junk_plugin)
{
MailSession *ms = (MailSession *) session;
GConfClient *gconf;
- char *def_plugin;
+ gchar *def_plugin;
gconf = mail_config_get_gconf_client ();
def_plugin = gconf_client_get_string (gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
@@ -825,7 +825,7 @@ mail_session_get_junk_plugins (void)
}
void
-mail_session_set_junk_headers (const char **name, const char **value, int len)
+mail_session_set_junk_headers (const gchar **name, const gchar **value, gint len)
{
if (!session)
return;
diff --git a/mail/mail-session.h b/mail/mail-session.h
index 764ee0f710..450404efcd 100644
--- a/mail/mail-session.h
+++ b/mail/mail-session.h
@@ -33,22 +33,22 @@ void mail_session_init (EMailShellBackend *mail_shell_backend);
void mail_session_shutdown (void);
gboolean mail_session_get_interactive (void);
void mail_session_set_interactive (gboolean interactive);
-char *mail_session_request_dialog (const char *prompt, gboolean secret,
- const char *key, gboolean async);
-gboolean mail_session_accept_dialog (const char *prompt, const char *key,
+gchar *mail_session_request_dialog (const gchar *prompt, gboolean secret,
+ const gchar *key, gboolean async);
+gboolean mail_session_accept_dialog (const gchar *prompt, const gchar *key,
gboolean async);
-char *mail_session_get_password (const char *url);
-void mail_session_add_password (const char *url, const char *passwd);
-void mail_session_remember_password (const char *url);
+gchar *mail_session_get_password (const gchar *url);
+void mail_session_add_password (const gchar *url, const gchar *passwd);
+void mail_session_remember_password (const gchar *url);
-void mail_session_forget_password (const char *key);
+void mail_session_forget_password (const gchar *key);
void mail_session_flush_filter_log (void);
-void mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plugin);
+void mail_session_add_junk_plugin (const gchar *plugin_name, CamelJunkPlugin *junk_plugin);
const GList * mail_session_get_junk_plugins (void);
-void mail_session_set_junk_headers (const char **name, const char **value, int len);
+void mail_session_set_junk_headers (const gchar **name, const gchar **value, gint len);
extern CamelSession *session;
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 1dc96f702e..bc8a3fd3ec 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -79,7 +79,7 @@ mail_tool_get_inbox (const gchar *url, CamelException *ex)
}
CamelFolder *
-mail_tool_get_trash (const gchar *url, int connect, CamelException *ex)
+mail_tool_get_trash (const gchar *url, gint connect, CamelException *ex)
{
CamelStore *store;
CamelFolder *trash;
@@ -104,16 +104,16 @@ mail_tool_get_trash (const gchar *url, int connect, CamelException *ex)
#ifndef G_OS_WIN32
-static char *
-mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
+static gchar *
+mail_tool_get_local_movemail_path (const guchar *uri, CamelException *ex)
{
EShellBackend *shell_backend;
- unsigned char *safe_uri, *c;
+ guchar *safe_uri, *c;
const gchar *data_dir;
- char *path, *full;
+ gchar *path, *full;
struct stat st;
- safe_uri = (unsigned char *)g_strdup ((const gchar *)uri);
+ safe_uri = (guchar *)g_strdup ((const gchar *)uri);
for (c = safe_uri; *c; c++)
if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((int) *c))
*c = '_';
@@ -138,11 +138,11 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
#endif
-char *
-mail_tool_do_movemail (const char *source_url, CamelException *ex)
+gchar *
+mail_tool_do_movemail (const gchar *source_url, CamelException *ex)
{
#ifndef G_OS_WIN32
- char *dest_path;
+ gchar *dest_path;
struct stat sb;
CamelURL *uri;
@@ -160,7 +160,7 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex)
}
/* Set up our destination. */
- dest_path = mail_tool_get_local_movemail_path ((unsigned char *)source_url, ex);
+ dest_path = mail_tool_get_local_movemail_path ((guchar *)source_url, ex);
if (dest_path == NULL)
return NULL;
@@ -189,12 +189,12 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex)
#endif
}
-char *
+gchar *
mail_tool_generate_forward_subject (CamelMimeMessage *msg)
{
- const char *subject;
- char *fwd_subj;
- const int max_subject_length = 1024;
+ const gchar *subject;
+ gchar *fwd_subj;
+ const gint max_subject_length = 1024;
subject = camel_mime_message_get_subject(msg);
@@ -213,7 +213,7 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
}
} else {
const CamelInternetAddress *from;
- char *fromstr;
+ gchar *fromstr;
from = camel_mime_message_get_from (msg);
if (from) {
@@ -253,9 +253,9 @@ CamelMimePart *
mail_tool_make_message_attachment (CamelMimeMessage *message)
{
CamelMimePart *part;
- const char *subject;
+ const gchar *subject;
struct _camel_header_raw *xev;
- char *desc;
+ gchar *desc;
subject = camel_mime_message_get_subject (message);
if (subject)
@@ -282,13 +282,13 @@ mail_tool_make_message_attachment (CamelMimeMessage *message)
}
CamelFolder *
-mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
+mail_tool_uri_to_folder (const gchar *uri, guint32 flags, CamelException *ex)
{
CamelURL *url;
CamelStore *store = NULL;
CamelFolder *folder = NULL;
- int offset = 0;
- char *curi = NULL;
+ gint offset = 0;
+ gchar *curi = NULL;
g_return_val_if_fail (uri != NULL, NULL);
@@ -315,7 +315,7 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
store = (CamelStore *)camel_session_get_service(session, uri+offset, CAMEL_PROVIDER_STORE, ex);
if (store) {
- const char *name;
+ const gchar *name;
/* if we have a fragment, then the path is actually used by the store,
so the fragment is the path to the folder instead */
@@ -357,10 +357,10 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
* UIDs specified by the selection.
**/
CamelFolder *
-mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids)
+mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids)
{
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */
- char *inptr, *inend;
+ gchar *inptr, *inend;
CamelFolder *folder;
if (in == NULL)
@@ -376,7 +376,7 @@ mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **
inptr = in + strlen (in) + 1;
*uids = g_ptr_array_new ();
while (inptr < inend) {
- char *start = inptr;
+ gchar *start = inptr;
while (inptr < inend && *inptr)
inptr++;
@@ -389,11 +389,11 @@ mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **
}
/* FIXME: This should be a property on CamelFolder */
-char *
+gchar *
mail_tools_folder_to_url (CamelFolder *folder)
{
CamelURL *url;
- char *out;
+ gchar *out;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
@@ -401,7 +401,7 @@ mail_tools_folder_to_url (CamelFolder *folder)
if (((CamelService *)folder->parent_store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
camel_url_set_fragment(url, folder->full_name);
} else {
- char *name = g_alloca(strlen(folder->full_name)+2);
+ gchar *name = g_alloca(strlen(folder->full_name)+2);
sprintf(name, "/%s", folder->full_name);
camel_url_set_path(url, name);
diff --git a/mail/mail-tools.h b/mail/mail-tools.h
index 1590636e5c..11e7c87dcd 100644
--- a/mail/mail-tools.h
+++ b/mail/mail-tools.h
@@ -32,14 +32,14 @@ struct _CamelMimePart;
struct _camel_header_raw;
/* Get the "inbox" for a url (uses global session) */
-struct _CamelFolder *mail_tool_get_inbox (const char *url, struct _CamelException *ex);
+struct _CamelFolder *mail_tool_get_inbox (const gchar *url, struct _CamelException *ex);
/* Get the "trash" for a url (uses global session) */
-struct _CamelFolder *mail_tool_get_trash (const char *url, int connect, struct _CamelException *ex);
+struct _CamelFolder *mail_tool_get_trash (const gchar *url, gint connect, struct _CamelException *ex);
/* Does a camel_movemail into the local movemail folder
* and returns the path to the new movemail folder that was created. which shoudl be freed later */
-char *mail_tool_do_movemail (const char *source_url, struct _CamelException *ex);
+gchar *mail_tool_do_movemail (const gchar *source_url, struct _CamelException *ex);
struct _camel_header_raw *mail_tool_remove_xevolution_headers (struct _CamelMimeMessage *message);
void mail_tool_restore_xevolution_headers (struct _CamelMimeMessage *message, struct _camel_header_raw *);
@@ -51,12 +51,12 @@ gchar *mail_tool_generate_forward_subject (struct _CamelMimeMessage *msg);
struct _CamelMimePart *mail_tool_make_message_attachment (struct _CamelMimeMessage *message);
/* Parse the ui into a real struct _CamelFolder any way we know how. */
-struct _CamelFolder *mail_tool_uri_to_folder (const char *uri, guint32 flags, struct _CamelException *ex);
+struct _CamelFolder *mail_tool_uri_to_folder (const gchar *uri, guint32 flags, struct _CamelException *ex);
GHashTable *mail_lookup_url_table (struct _CamelMimeMessage *mime_message);
-struct _CamelFolder *mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids);
+struct _CamelFolder *mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids);
-char *mail_tools_folder_to_url (struct _CamelFolder *folder);
+gchar *mail_tools_folder_to_url (struct _CamelFolder *folder);
#endif
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 6be803b70b..285f0b54ab 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -65,7 +65,7 @@ static GList *source_folders_local; /* list of source folder uri's - local ones
static GHashTable *vfolder_hash;
/* This is a slightly hacky solution to shutting down, we poll this variable in various
loops, and just quit processing if it is set. */
-static volatile int shutdown; /* are we shutting down? */
+static volatile gint shutdown; /* are we shutting down? */
/* more globals ... */
extern CamelSession *session;
@@ -80,7 +80,7 @@ struct _setup_msg {
MailMsg base;
CamelFolder *folder;
- char *query;
+ gchar *query;
GList *sources_uri;
GList *sources_folder;
};
@@ -103,13 +103,13 @@ vfolder_setup_exec (struct _setup_msg *m)
l = m->sources_uri;
while (l && !shutdown) {
- d(printf(" Adding uri: %s\n", (char *)l->data));
+ d(printf(" Adding uri: %s\n", (gchar *)l->data));
folder = mail_tool_uri_to_folder (l->data, 0, &m->base.ex);
if (folder) {
list = g_list_append(list, folder);
} else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(&m->base.ex);
}
l = l->next;
@@ -172,10 +172,10 @@ static MailMsgInfo vfolder_setup_info = {
/* sources_uri should be camel uri's */
static int
-vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList *sources_folder)
+vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder)
{
struct _setup_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&vfolder_setup_info);
m->folder = folder;
@@ -195,15 +195,15 @@ vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList
struct _adduri_msg {
MailMsg base;
- char *uri;
+ gchar *uri;
GList *folders;
- int remove;
+ gint remove;
};
static gchar *
vfolder_adduri_desc (struct _adduri_msg *m)
{
- char *euri, *desc = NULL;
+ gchar *euri, *desc = NULL;
/* Yuck yuck. Lookup the account name and use that to describe the path */
/* We really need to normalise this across all of camel and evolution :-/ */
@@ -212,13 +212,13 @@ vfolder_adduri_desc (struct _adduri_msg *m)
CamelURL *url = camel_url_new(euri, NULL);
if (url) {
- const char *loc = NULL;
+ const gchar *loc = NULL;
if (url->host && !strcmp(url->host, "local")
&& url->user && !strcmp(url->user, "local")) {
loc = _("On This Computer");
} else {
- char *uid;
+ gchar *uid;
const EAccount *account;
if (url->user == NULL)
@@ -303,10 +303,10 @@ static MailMsgInfo vfolder_adduri_info = {
/* uri should be a camel uri */
static int
-vfolder_adduri(const char *uri, GList *folders, int remove)
+vfolder_adduri(const gchar *uri, GList *folders, gint remove)
{
struct _adduri_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&vfolder_adduri_info);
m->folders = folders;
@@ -322,7 +322,7 @@ vfolder_adduri(const char *uri, GList *folders, int remove)
/* ********************************************************************** */
static GList *
-mv_find_folder(GList *l, CamelStore *store, const char *uri)
+mv_find_folder(GList *l, CamelStore *store, const gchar *uri)
{
while (l) {
if (camel_store_folder_uri_equal(store, l->data, uri))
@@ -334,7 +334,7 @@ mv_find_folder(GList *l, CamelStore *store, const char *uri)
/* uri is a camel uri */
static int
-uri_is_ignore(CamelStore *store, const char *uri)
+uri_is_ignore(CamelStore *store, const gchar *uri)
{
EAccountList *accounts;
EAccount *account;
@@ -342,7 +342,7 @@ uri_is_ignore(CamelStore *store, const char *uri)
const gchar *local_drafts_folder_uri;
const gchar *local_outbox_folder_uri;
const gchar *local_sent_folder_uri;
- int found = FALSE;
+ gint found = FALSE;
local_drafts_folder_uri = e_mail_shell_backend_get_folder_uri (
global_mail_shell_backend, E_MAIL_FOLDER_DRAFTS);
@@ -366,7 +366,7 @@ uri_is_ignore(CamelStore *store, const char *uri)
accounts = e_get_account_list ();
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
- char *curi;
+ gchar *curi;
account = (EAccount *) e_iterator_get (iter);
@@ -397,10 +397,10 @@ uri_is_ignore(CamelStore *store, const char *uri)
/* so special we never use it */
static int
-uri_is_spethal(CamelStore *store, const char *uri)
+uri_is_spethal(CamelStore *store, const gchar *uri)
{
CamelURL *url;
- int res;
+ gint res;
/* This is a bit of a hack, but really the only way it can be done at the moment. */
@@ -432,15 +432,15 @@ uri_is_spethal(CamelStore *store, const char *uri)
/* called when a new uri becomes (un)available */
void
-mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
+mail_vfolder_add_uri(CamelStore *store, const gchar *curi, gint remove)
{
FilterRule *rule;
- const char *source;
+ const gchar *source;
CamelVeeFolder *vf;
GList *folders = NULL, *link;
- int remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0;
- int is_ignore;
- char *uri;
+ gint remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0;
+ gint is_ignore;
+ gchar *uri;
uri = em_uri_from_camel(curi);
if (uri_is_spethal (store, curi)) {
@@ -487,7 +487,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
rule = NULL;
while ((rule = rule_context_next_rule((RuleContext *)context, rule, NULL))) {
- int found = FALSE;
+ gint found = FALSE;
if (!rule->name) {
d(printf("invalid rule (%p): rule->name is set to NULL\n", rule));
@@ -503,7 +503,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
source = NULL;
while (!found && (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source))) {
- char *csource;
+ gchar *csource;
csource = em_uri_to_camel(source);
found = camel_store_folder_uri_equal(store, curi, csource);
d(printf(found?" '%s' == '%s'?\n":" '%s' != '%s'\n", curi, csource));
@@ -532,14 +532,14 @@ done:
/* called when a uri is deleted from a store */
void
-mail_vfolder_delete_uri(CamelStore *store, const char *curi)
+mail_vfolder_delete_uri(CamelStore *store, const gchar *curi)
{
EShellBackend *shell_backend;
FilterRule *rule;
- const char *source;
+ const gchar *source;
CamelVeeFolder *vf;
GString *changed;
- char *uri;
+ gchar *uri;
GList *link;
if (uri_is_spethal (store, curi))
@@ -571,7 +571,7 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi)
source = NULL;
while ((source = em_vfolder_rule_next_source ((EMVFolderRule *) rule, source))) {
- char *csource = em_uri_to_camel(source);
+ gchar *csource = em_uri_to_camel(source);
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
@@ -608,7 +608,7 @@ done:
if (changed->str[0]) {
GtkWidget *dialog;
const gchar *data_dir;
- char *user;
+ gchar *user;
dialog = e_error_new(NULL, "mail:vfolder-updated", changed->str, uri, NULL);
em_utils_show_info_silent (dialog);
@@ -626,14 +626,14 @@ done:
/* called when a uri is renamed in a store */
void
-mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
+mail_vfolder_rename_uri(CamelStore *store, const gchar *cfrom, const gchar *cto)
{
EShellBackend *shell_backend;
FilterRule *rule;
- const char *source;
+ const gchar *source;
CamelVeeFolder *vf;
- int changed = 0;
- char *from, *to;
+ gint changed = 0;
+ gchar *from, *to;
d(printf("vfolder rename uri: %s to %s\n", cfrom, cto));
@@ -654,7 +654,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
source = NULL;
while ( (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source)) ) {
- char *csource = em_uri_to_camel(source);
+ gchar *csource = em_uri_to_camel(source);
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
@@ -681,7 +681,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
if (changed) {
const gchar *data_dir;
- char *user;
+ gchar *user;
d(printf("Vfolders updated from renamed folder\n"));
data_dir = e_shell_backend_get_data_dir (shell_backend);
@@ -718,7 +718,7 @@ rule_add_sources(GList *l, GList **sources_folderp, GList **sources_urip)
CamelFolder *newfolder;
while (l) {
- char *curi = em_uri_to_camel(l->data);
+ gchar *curi = em_uri_to_camel(l->data);
if (mail_note_get_folder_from_uri(curi, &newfolder)) {
if (newfolder)
@@ -742,7 +742,7 @@ rule_changed(FilterRule *rule, CamelFolder *folder)
/* if the folder has changed name, then add it, then remove the old manually */
if (strcmp(folder->full_name, rule->name) != 0) {
- char *oldname;
+ gchar *oldname;
gpointer key;
gpointer oldfolder;
@@ -826,7 +826,7 @@ static void context_rule_removed(RuleContext *ctx, FilterRule *rule)
}
static void
-store_folder_created(CamelObject *o, void *event_data, void *data)
+store_folder_created(CamelObject *o, gpointer event_data, gpointer data)
{
CamelStore *store = (CamelStore *)o;
CamelFolderInfo *info = event_data;
@@ -836,13 +836,13 @@ store_folder_created(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_deleted(CamelObject *o, void *event_data, void *data)
+store_folder_deleted(CamelObject *o, gpointer event_data, gpointer data)
{
EShellBackend *shell_backend;
CamelStore *store = (CamelStore *)o;
CamelFolderInfo *info = event_data;
FilterRule *rule;
- char *user;
+ gchar *user;
d(printf("Folder deleted: %s\n", info->name));
store = store;
@@ -877,12 +877,12 @@ store_folder_deleted(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_renamed(CamelObject *o, void *event_data, void *data)
+store_folder_renamed(CamelObject *o, gpointer event_data, gpointer data)
{
EShellBackend *shell_backend;
CamelRenameInfo *info = event_data;
FilterRule *rule;
- char *user;
+ gchar *user;
gpointer key, folder;
@@ -934,9 +934,9 @@ vfolder_load_storage(void)
EShellBackend *shell_backend;
const gchar *data_dir;
- char *user, *storeuri;
+ gchar *user, *storeuri;
FilterRule *rule;
- char *xmlfile;
+ gchar *xmlfile;
GConfClient *gconf;
shell_backend = E_SHELL_BACKEND (global_mail_shell_backend);
@@ -1014,7 +1014,7 @@ vfolder_revert(void)
{
EShellBackend *shell_backend;
const gchar *data_dir;
- char *user;
+ gchar *user;
shell_backend = E_SHELL_BACKEND (global_mail_shell_backend);
@@ -1064,7 +1064,7 @@ vfolder_edit (EShellView *shell_view)
}
static void
-edit_rule_response(GtkWidget *w, int button, void *data)
+edit_rule_response(GtkWidget *w, gint button, gpointer data)
{
EShellBackend *shell_backend;
@@ -1072,7 +1072,7 @@ edit_rule_response(GtkWidget *w, int button, void *data)
if (button == GTK_RESPONSE_OK) {
const gchar *data_dir;
- char *user;
+ gchar *user;
FilterRule *rule = g_object_get_data (G_OBJECT (w), "rule");
FilterRule *orig = g_object_get_data (G_OBJECT (w), "orig");
@@ -1087,7 +1087,7 @@ edit_rule_response(GtkWidget *w, int button, void *data)
}
void
-vfolder_edit_rule(const char *uri)
+vfolder_edit_rule(const gchar *uri)
{
GtkWidget *w;
GtkDialog *gd;
@@ -1132,7 +1132,7 @@ vfolder_edit_rule(const char *uri)
}
static void
-new_rule_clicked(GtkWidget *w, int button, void *data)
+new_rule_clicked(GtkWidget *w, gint button, gpointer data)
{
EShellBackend *shell_backend;
@@ -1140,7 +1140,7 @@ new_rule_clicked(GtkWidget *w, int button, void *data)
if (button == GTK_RESPONSE_OK) {
const gchar *data_dir;
- char *user;
+ gchar *user;
FilterRule *rule = g_object_get_data((GObject *)w, "rule");
if (!filter_rule_validate(rule)) {
@@ -1166,7 +1166,7 @@ new_rule_clicked(GtkWidget *w, int button, void *data)
}
FilterPart *
-vfolder_create_part(const char *name)
+vfolder_create_part(const gchar *name)
{
return rule_context_create_part((RuleContext *)context, name);
}
@@ -1218,7 +1218,7 @@ vfolder_gui_add_rule(EMVFolderRule *rule)
}
void
-vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *source)
+vfolder_gui_add_from_message(CamelMimeMessage *msg, gint flags, const gchar *source)
{
EMVFolderRule *rule;
@@ -1232,7 +1232,7 @@ vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *sourc
}
void
-vfolder_gui_add_from_address(CamelInternetAddress *addr, int flags, const char *source)
+vfolder_gui_add_from_address(CamelInternetAddress *addr, gint flags, const gchar *source)
{
EMVFolderRule *rule;
diff --git a/mail/mail-vfolder.h b/mail/mail-vfolder.h
index 1c7ad0d150..6635127814 100644
--- a/mail/mail-vfolder.h
+++ b/mail/mail-vfolder.h
@@ -35,24 +35,24 @@ void vfolder_load_storage(void);
void vfolder_revert(void);
void vfolder_edit (EShellView *shell_view);
-void vfolder_edit_rule(const char *name);
-struct _FilterPart *vfolder_create_part (const char *name);
+void vfolder_edit_rule(const gchar *name);
+struct _FilterPart *vfolder_create_part (const gchar *name);
struct _FilterRule *vfolder_clone_rule (struct _FilterRule *in);
void vfolder_gui_add_rule (struct _EMVFolderRule *rule);
-void vfolder_gui_add_from_message (struct _CamelMimeMessage *msg, int flags, const char *source);
-void vfolder_gui_add_from_address (struct _CamelInternetAddress *addr, int flags, const char *source);
+void vfolder_gui_add_from_message (struct _CamelMimeMessage *msg, gint flags, const gchar *source);
+void vfolder_gui_add_from_address (struct _CamelInternetAddress *addr, gint flags, const gchar *source);
GList * mail_vfolder_get_sources_local (void);
GList * mail_vfolder_get_sources_remote (void);
/* add a uri that is now (un)available to vfolders in a transient manner */
-void mail_vfolder_add_uri(struct _CamelStore *store, const char *uri, int remove);
+void mail_vfolder_add_uri(struct _CamelStore *store, const gchar *uri, gint remove);
/* note that a folder has changed name (uri) */
-void mail_vfolder_rename_uri(struct _CamelStore *store, const char *from, const char *to);
+void mail_vfolder_rename_uri(struct _CamelStore *store, const gchar *from, const gchar *to);
/* remove a uri that should be removed from vfolders permanently */
-void mail_vfolder_delete_uri(struct _CamelStore *store, const char *uri);
+void mail_vfolder_delete_uri(struct _CamelStore *store, const gchar *uri);
/* close up, clean up */
void mail_vfolder_shutdown (void);
diff --git a/mail/message-list.c b/mail/message-list.c
index 8d84e4ae8c..8050dba5ca 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -107,7 +107,7 @@
struct _MLSelection {
GPtrArray *uids;
CamelFolder *folder;
- char *folder_uri;
+ gchar *folder_uri;
};
struct _MessageListPrivate {
@@ -192,7 +192,7 @@ enum {
#ifdef SMART_ADDRESS_COMPARE
struct _EMailAddress {
ENameWestern *wname;
- char *address;
+ gchar *address;
};
typedef struct _EMailAddress EMailAddress;
@@ -200,11 +200,11 @@ typedef struct _EMailAddress EMailAddress;
G_DEFINE_TYPE (MessageList, message_list, E_TREE_SCROLLED_TYPE)
-static void on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data);
+static void on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data);
static void on_selection_changed_cmd(ETree *tree, MessageList *ml);
static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list);
-static char *filter_date (time_t date);
-static char *filter_size (int size);
+static gchar *filter_date (time_t date);
+static gchar *filter_size (gint size);
static void folder_changed (CamelObject *o, gpointer event_data, gpointer user_data);
@@ -212,11 +212,11 @@ static void save_hide_state(MessageList *ml);
static void load_hide_state(MessageList *ml);
/* note: @changes is owned/freed by the caller */
-/*static void mail_do_regenerate_messagelist (MessageList *list, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);*/
-static void mail_regen_list(MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);
+/*static void mail_do_regenerate_messagelist (MessageList *list, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);*/
+static void mail_regen_list(MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);
static void mail_regen_cancel(MessageList *ml);
-static void clear_info(char *key, ETreePath *node, MessageList *ml);
+static void clear_info(gchar *key, ETreePath *node, MessageList *ml);
enum {
MESSAGE_SELECTED,
@@ -257,11 +257,11 @@ static gboolean junk_folder = TRUE;
#ifdef SMART_ADDRESS_COMPARE
static EMailAddress *
-e_mail_address_new (const char *address)
+e_mail_address_new (const gchar *address)
{
CamelInternetAddress *cia;
EMailAddress *new;
- const char *name = NULL, *addr = NULL;
+ const gchar *name = NULL, *addr = NULL;
cia = camel_internet_address_new ();
if (camel_address_unformat (CAMEL_ADDRESS (cia), address) == -1) {
@@ -302,7 +302,7 @@ e_mail_address_compare (gconstpointer address1, gconstpointer address2)
{
const EMailAddress *addr1 = address1;
const EMailAddress *addr2 = address2;
- int retval;
+ gint retval;
g_return_val_if_fail (addr1 != NULL, 1);
g_return_val_if_fail (addr2 != NULL, -1);
@@ -365,7 +365,7 @@ address_compare (gconstpointer address1, gconstpointer address2)
#ifdef SMART_ADDRESS_COMPARE
EMailAddress *addr1, *addr2;
#endif /* SMART_ADDRESS_COMPARE */
- int retval;
+ gint retval;
g_return_val_if_fail (address1 != NULL, 1);
g_return_val_if_fail (address2 != NULL, -1);
@@ -377,13 +377,13 @@ address_compare (gconstpointer address1, gconstpointer address2)
e_mail_address_free (addr1);
e_mail_address_free (addr2);
#else
- retval = strcmp ((char *) address1, (char *) address2);
+ retval = strcmp ((gchar *) address1, (gchar *) address2);
#endif /* SMART_ADDRESS_COMPARE */
return retval;
}
-static char *
+static gchar *
filter_size (gint size)
{
gfloat fsize;
@@ -402,7 +402,7 @@ filter_size (gint size)
}
/* Gets the uid of the message displayed at a given view row */
-static const char *
+static const gchar *
get_message_uid (MessageList *message_list, ETreePath node)
{
CamelMessageInfo *info;
@@ -430,13 +430,13 @@ get_message_info (MessageList *message_list, ETreePath node)
return info;
}
-static const char *
-get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int col)
+static const gchar *
+get_normalised_string (MessageList *message_list, CamelMessageInfo *info, gint col)
{
- const char *string, *str;
- char *normalised;
+ const gchar *string, *str;
+ gchar *normalised;
EPoolv *poolv;
- int index;
+ gint index;
switch (col) {
case COL_SUBJECT_NORM:
@@ -464,7 +464,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
poolv = g_hash_table_lookup (message_list->normalised_hash, camel_message_info_uid (info));
if (poolv == NULL) {
poolv = e_poolv_new (NORMALISED_LAST);
- g_hash_table_insert (message_list->normalised_hash, (char *) camel_message_info_uid (info), poolv);
+ g_hash_table_insert (message_list->normalised_hash, (gchar *) camel_message_info_uid (info), poolv);
} else {
str = e_poolv_get (poolv, index);
if (*str)
@@ -472,10 +472,10 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
}
if (col == COL_SUBJECT_NORM) {
- const unsigned char *subject;
+ const guchar *subject;
- subject = (const unsigned char *) string;
- while (!g_ascii_strncasecmp ((char *)subject, "Re:", 3)) {
+ subject = (const guchar *) string;
+ while (!g_ascii_strncasecmp ((gchar *)subject, "Re:", 3)) {
subject += 3;
/* jump over any spaces */
@@ -487,7 +487,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
while (*subject && isspace ((int) *subject))
subject++;
- string = (const char *) subject;
+ string = (const gchar *) subject;
normalised = g_utf8_collate_key (string, -1);
} else {
/* because addresses require strings, not collate keys */
@@ -515,10 +515,10 @@ clear_selection(MessageList *ml, struct _MLSelection *selection)
}
static ETreePath
-ml_search_forward(MessageList *ml, int start, int end, guint32 flags, guint32 mask)
+ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
{
ETreePath path;
- int row;
+ gint row;
CamelMessageInfo *info;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
@@ -534,10 +534,10 @@ ml_search_forward(MessageList *ml, int start, int end, guint32 flags, guint32 ma
}
static ETreePath
-ml_search_backward(MessageList *ml, int start, int end, guint32 flags, guint32 mask)
+ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
{
ETreePath path;
- int row;
+ gint row;
CamelMessageInfo *info;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
@@ -556,7 +556,7 @@ static ETreePath
ml_search_path(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
{
ETreePath node;
- int row, count;
+ gint row, count;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
if (ml->cursor_uid == NULL
@@ -653,7 +653,7 @@ message_list_can_select(MessageList *ml, MessageListSelectDirection direction, g
* Selects the message with the given UID.
**/
void
-message_list_select_uid (MessageList *message_list, const char *uid)
+message_list_select_uid (MessageList *message_list, const gchar *uid)
{
ETreePath node;
@@ -681,7 +681,7 @@ message_list_select_next_thread (MessageList *ml)
{
ETreePath node;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
- int i, count, row;
+ gint i, count, row;
if (!ml->cursor_uid
|| (node = g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) == NULL)
@@ -832,7 +832,7 @@ message_list_copy(MessageList *ml, gboolean cut)
if (uids->len > 0) {
if (cut) {
- int i;
+ gint i;
camel_folder_freeze(ml->folder);
for (i=0;i<uids->len;i++)
@@ -866,7 +866,7 @@ message_list_paste(MessageList *ml)
* SimpleTableModel::col_count
*/
static int
-ml_column_count (ETreeModel *etm, void *data)
+ml_column_count (ETreeModel *etm, gpointer data)
{
return COL_LAST;
}
@@ -875,7 +875,7 @@ ml_column_count (ETreeModel *etm, void *data)
* SimpleTableModel::has_save_id
*/
static gboolean
-ml_has_save_id (ETreeModel *etm, void *data)
+ml_has_save_id (ETreeModel *etm, gpointer data)
{
return TRUE;
}
@@ -883,8 +883,8 @@ ml_has_save_id (ETreeModel *etm, void *data)
/*
* SimpleTableModel::get_save_id
*/
-static char *
-ml_get_save_id (ETreeModel *etm, ETreePath path, void *data)
+static gchar *
+ml_get_save_id (ETreeModel *etm, ETreePath path, gpointer data)
{
CamelMessageInfo *info;
@@ -904,7 +904,7 @@ ml_get_save_id (ETreeModel *etm, ETreePath path, void *data)
* SimpleTableModel::has_save_id
*/
static gboolean
-ml_has_get_node_by_id (ETreeModel *etm, void *data)
+ml_has_get_node_by_id (ETreeModel *etm, gpointer data)
{
return TRUE;
}
@@ -913,7 +913,7 @@ ml_has_get_node_by_id (ETreeModel *etm, void *data)
* SimpleTableModel::get_save_id
*/
static ETreePath
-ml_get_node_by_id (ETreeModel *etm, const char *save_id, void *data)
+ml_get_node_by_id (ETreeModel *etm, const gchar *save_id, gpointer data)
{
MessageList *ml;
@@ -925,8 +925,8 @@ ml_get_node_by_id (ETreeModel *etm, const char *save_id, void *data)
return g_hash_table_lookup(ml->uid_nodemap, save_id);
}
-static void *
-ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
+static gpointer
+ml_duplicate_value (ETreeModel *etm, gint col, gconstpointer value, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -940,7 +940,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
case COL_SIZE:
case COL_FOLLOWUP_FLAG_STATUS:
case COL_FOLLOWUP_DUE_BY:
- return (void *) value;
+ return (gpointer) value;
case COL_FROM:
case COL_SUBJECT:
@@ -960,7 +960,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
}
static void
-ml_free_value (ETreeModel *etm, int col, void *value, void *data)
+ml_free_value (ETreeModel *etm, gint col, gpointer value, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -993,8 +993,8 @@ ml_free_value (ETreeModel *etm, int col, void *value, void *data)
}
}
-static void *
-ml_initialize_value (ETreeModel *etm, int col, void *data)
+static gpointer
+ml_initialize_value (ETreeModel *etm, gint col, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -1029,7 +1029,7 @@ ml_initialize_value (ETreeModel *etm, int col, void *data)
}
static gboolean
-ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
+ml_value_is_empty (ETreeModel *etm, gint col, gconstpointer value, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -1055,14 +1055,14 @@ ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
case COL_MIXED_SENDER:
case COL_MIXED_RECIPIENTS:
case COL_LABELS:
- return !(value && *(char *)value);
+ return !(value && *(gchar *)value);
default:
g_warning ("This shouldn't be reached\n");
return FALSE;
}
}
-static const char *status_map[] = {
+static const gchar *status_map[] = {
N_("Unseen"),
N_("Seen"),
N_("Answered"),
@@ -1071,7 +1071,7 @@ static const char *status_map[] = {
N_("Multiple Messages"),
};
-static const char *score_map[] = {
+static const gchar *score_map[] = {
N_("Lowest"),
N_("Lower"),
N_("Low"),
@@ -1082,10 +1082,10 @@ static const char *score_map[] = {
};
-static char *
-ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
+static gchar *
+ml_value_to_string (ETreeModel *etm, gint col, gconstpointer value, gpointer data)
{
- unsigned int i;
+ guint i;
switch (col){
case COL_MESSAGE_STATUS:
@@ -1133,7 +1133,7 @@ ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
}
static GdkPixbuf *
-ml_tree_icon_at (ETreeModel *etm, ETreePath path, void *model_data)
+ml_tree_icon_at (ETreeModel *etm, ETreePath path, gpointer model_data)
{
/* we dont really need an icon ... */
return NULL;
@@ -1162,7 +1162,7 @@ subtree_unread(MessageList *ml, ETreePath node)
}
static time_t
-subtree_latest(MessageList *ml, ETreePath node, int sent)
+subtree_latest(MessageList *ml, ETreePath node, gint sent)
{
CamelMessageInfo *info;
time_t latest = 0, date;
@@ -1199,8 +1199,8 @@ sanitize_recipients (const gchar *string)
gboolean quoted = FALSE;
const gchar *p;
GString *recipients = g_string_new ("");
- char *single_add;
- char **name;
+ gchar *single_add;
+ gchar **name;
if (!string || !*string)
return (gchar *) "";
@@ -1250,7 +1250,7 @@ get_all_labels (MessageList *message_list,
const gchar *property_name;
const gchar *old_label;
gchar *new_label;
- int count = 0;
+ gint count = 0;
const CamelFlag *flag;
shell_backend = message_list_get_shell_backend (message_list);
@@ -1353,12 +1353,12 @@ exit:
return interned;
}
-static const char *
+static const gchar *
get_trimmed_subject (CamelMessageInfo *info)
{
- const char *subject;
- const char *mlist;
- int mlist_len = 0;
+ const gchar *subject;
+ const gchar *mlist;
+ gint mlist_len = 0;
gboolean found_mlist;
subject = camel_message_info_subject (info);
@@ -1368,7 +1368,7 @@ get_trimmed_subject (CamelMessageInfo *info)
mlist = camel_message_info_mlist (info);
if (mlist && *mlist) {
- const char *mlist_end;
+ const gchar *mlist_end;
mlist_end = strchr (mlist, '@');
if (mlist_end)
@@ -1380,7 +1380,7 @@ get_trimmed_subject (CamelMessageInfo *info)
do {
found_mlist = FALSE;
- while (!g_ascii_strncasecmp ((char *) subject, "Re:", 3)) {
+ while (!g_ascii_strncasecmp ((gchar *) subject, "Re:", 3)) {
subject += 3;
/* jump over any spaces */
@@ -1390,7 +1390,7 @@ get_trimmed_subject (CamelMessageInfo *info)
if (mlist_len &&
*subject == '[' &&
- !g_ascii_strncasecmp ((char *) subject + 1, mlist, mlist_len) &&
+ !g_ascii_strncasecmp ((gchar *) subject + 1, mlist, mlist_len) &&
subject [1 + mlist_len] == ']') {
subject += 1 + mlist_len + 1; /* jump over "[mailing-list]" */
found_mlist = TRUE;
@@ -1408,14 +1408,14 @@ get_trimmed_subject (CamelMessageInfo *info)
return subject;
}
-static void *
-ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
+static gpointer
+ml_tree_value_at (ETreeModel *etm, ETreePath path, gint col, gpointer model_data)
{
MessageList *message_list = model_data;
CamelMessageInfo *msg_info;
CamelException ex;
- const char *str;
+ const gchar *str;
guint32 flags;
camel_exception_init (&ex);
@@ -1441,8 +1441,8 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
case COL_FLAGGED:
return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_FLAGGED) != 0);
case COL_SCORE: {
- const char *tag;
- int score = 0;
+ const gchar *tag;
+ gint score = 0;
tag = camel_message_info_user_tag(msg_info, "score");
if (tag)
@@ -1451,7 +1451,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER (score);
}
case COL_FOLLOWUP_FLAG_STATUS: {
- const char *tag, *cmp;
+ const gchar *tag, *cmp;
/* FIXME: this all should be methods off of message-tag-followup class,
FIXME: the tag names should be namespaced :( */
@@ -1466,7 +1466,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER(0);
}
case COL_FOLLOWUP_DUE_BY: {
- const char *tag;
+ const gchar *tag;
time_t due_by;
tag = camel_message_info_user_tag(msg_info, "due-by");
@@ -1479,24 +1479,24 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
case COL_FOLLOWUP_FLAG:
str = camel_message_info_user_tag(msg_info, "follow-up");
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_ATTACHMENT:
if (camel_message_info_user_flag (msg_info, "$has_cal"))
return GINT_TO_POINTER (2);
return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_ATTACHMENTS) != 0);
case COL_FROM:
str = camel_message_info_from (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_FROM_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
+ return (gpointer) get_normalised_string (message_list, msg_info, col);
case COL_SUBJECT:
str = camel_message_info_subject (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_SUBJECT_TRIMMED:
str = get_trimmed_subject (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_SUBJECT_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
+ return (gpointer) get_normalised_string (message_list, msg_info, col);
case COL_SENT: {
ETreePath child;
@@ -1518,9 +1518,9 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
case COL_TO:
str = camel_message_info_to (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_TO_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
+ return (gpointer) get_normalised_string (message_list, msg_info, col);
case COL_SIZE:
return GINT_TO_POINTER (camel_message_info_size(msg_info));
case COL_DELETED:
@@ -1538,9 +1538,9 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER (!(flags & CAMEL_MESSAGE_SEEN));
}
case COL_COLOUR: {
- const char *colour, *due_by, *completed, *followup;
- char *labels_string = NULL;
- int n;
+ const gchar *colour, *due_by, *completed, *followup;
+ gchar *labels_string = NULL;
+ gint n;
/* Priority: colour tag; label tag; important flag; due-by tag */
@@ -1569,15 +1569,15 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
g_free (labels_string);
- return (void *) colour;
+ return (gpointer) colour;
}
case COL_LOCATION: {
/* Fixme : freeing memory stuff (mem leaks) */
CamelFolder *folder;
CamelURL *curl;
EAccount *account;
- char *location = NULL;
- char *euri, *url;
+ gchar *location = NULL;
+ gchar *euri, *url;
if (CAMEL_IS_VEE_FOLDER(message_list->folder)) {
folder = camel_vee_folder_get_location((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL);
@@ -1616,34 +1616,34 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
case COL_MIXED_SENDER:
case COL_SENDER:{
- char **sender_name = NULL;
+ gchar **sender_name = NULL;
str = camel_message_info_from (msg_info);
if(str && str[0] != '\0'){
- char *res;
+ gchar *res;
sender_name = g_strsplit (str,"<",2);
res = g_strdup (*sender_name);
g_strfreev (sender_name);
- return (void *)(res);
+ return (gpointer)(res);
}
else
- return (void *)("");
+ return (gpointer)("");
}
case COL_LABELS:{
- char *str = NULL;
+ gchar *str = NULL;
GString *cleansed_str;
cleansed_str = g_string_new ("");
if (get_all_labels (message_list, msg_info, &str, FALSE)) {
- int i;
+ gint i;
for (i = 0; str[i] != '\0'; ++i) {
if (str[i] != '_') {
g_string_append_c (cleansed_str, str[i]);
}
}
- return (void *) (g_string_free (cleansed_str, FALSE));
+ return (gpointer) (g_string_free (cleansed_str, FALSE));
} else
- return (void *) ("");
+ return (gpointer) ("");
}
default:
g_warning ("This shouldn't be reached\n");
@@ -1651,8 +1651,8 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
}
-static void *
-ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
+static gpointer
+ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, gint col, gpointer model_data)
{
MessageList *message_list = model_data;
CamelMessageInfo *msg_info;
@@ -1696,14 +1696,14 @@ ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, int col, void *model_dat
}
static void
-ml_tree_set_value_at (ETreeModel *etm, ETreePath path, int col,
- const void *val, void *model_data)
+ml_tree_set_value_at (ETreeModel *etm, ETreePath path, gint col,
+ gconstpointer val, gpointer model_data)
{
g_warning ("This shouldn't be reached\n");
}
static gboolean
-ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, int col, void *model_data)
+ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, gint col, gpointer model_data)
{
return FALSE;
}
@@ -1711,7 +1711,7 @@ ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, int col, void *model_
static void
message_list_init_images (void)
{
- int i;
+ gint i;
/*
* Only load once, and share
@@ -1723,17 +1723,17 @@ message_list_init_images (void)
if (states_pixmaps[i].icon_name)
states_pixmaps[i].pixbuf = e_icon_factory_get_icon (states_pixmaps[i].icon_name, GTK_ICON_SIZE_MENU);
else
- states_pixmaps[i].pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) empty_xpm);
+ states_pixmaps[i].pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **) empty_xpm);
}
}
-static char *
+static gchar *
filter_date (time_t date)
{
time_t nowdate = time(NULL);
time_t yesdate;
struct tm then, now, yesterday;
- char buf[26];
+ gchar buf[26];
gboolean done = FALSE;
if (date == 0)
@@ -1758,7 +1758,7 @@ filter_date (time_t date)
}
}
if (!done) {
- int i;
+ gint i;
for (i = 2; i < 7; i++) {
yesdate = nowdate - 60 * 60 * 24 * i;
localtime_r (&yesdate, &yesterday);
@@ -1789,15 +1789,15 @@ filter_date (time_t date)
return g_strdup (buf);
}
-static ECell * create_composite_cell (int col)
+static ECell * create_composite_cell (gint col)
{
ECell *cell_vbox, *cell_hbox, *cell_sub, *cell_date, *cell_from, *cell_tree, *cell_attach;
GdkPixbuf *images [7];
GConfClient *gconf;
- char *fixed_name = NULL;
+ gchar *fixed_name = NULL;
gboolean show_email;
- int i;
- int alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS;
+ gint i;
+ gint alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS;
gboolean same_font = FALSE;
gconf = mail_config_get_gconf_client ();
@@ -1849,7 +1849,7 @@ static ECell * create_composite_cell (int col)
}
static void
-composite_cell_set_strike_col (ECell *cell, int col)
+composite_cell_set_strike_col (ECell *cell, gint col)
{
g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_date")), "strikeout_column", col, NULL);
g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_from")), "strikeout_column", col, NULL);
@@ -1858,7 +1858,7 @@ composite_cell_set_strike_col (ECell *cell, int col)
static ETableExtras *
message_list_create_extras (void)
{
- int i;
+ gint i;
GdkPixbuf *images [7];
ETableExtras *extras;
ECell *cell;
@@ -1936,7 +1936,7 @@ message_list_create_extras (void)
static void
save_tree_state(MessageList *ml)
{
- char *filename;
+ gchar *filename;
if (ml->folder == NULL || ml->tree == NULL)
return;
@@ -1957,7 +1957,7 @@ load_tree_state (MessageList *ml, xmlDoc *expand_state)
if (expand_state) {
e_tree_load_expanded_state_xml (ml->tree, expand_state);
} else {
- char *filename;
+ gchar *filename;
filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-");
e_tree_load_expanded_state (ml->tree, filename);
@@ -1980,9 +1980,9 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing)
/* build the spec based on the folder, and possibly from a saved file */
/* otherwise, leave default */
if (message_list->folder) {
- char *path;
- char *name;
- int data = 1;
+ gchar *path;
+ gchar *name;
+ gint data = 1;
struct stat st;
ETableItem *item = e_tree_get_item (message_list->tree);
@@ -2049,7 +2049,7 @@ ml_selection_received(GtkWidget *widget, GtkSelectionData *data, guint time, Mes
}
static void
-ml_tree_drag_data_get (ETree *tree, int row, ETreePath path, int col,
+ml_tree_drag_data_get (ETree *tree, gint row, ETreePath path, gint col,
GdkDragContext *context, GtkSelectionData *data,
guint info, guint time, MessageList *ml)
{
@@ -2086,9 +2086,9 @@ struct _drop_msg {
guint32 action;
guint info;
- unsigned int move:1;
- unsigned int moved:1;
- unsigned int aborted:1;
+ guint move:1;
+ guint moved:1;
+ guint aborted:1;
};
static gchar *
@@ -2159,7 +2159,7 @@ ml_drop_action(struct _drop_msg *m)
}
static void
-ml_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
+ml_drop_popup_copy(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _drop_msg *m = data;
@@ -2168,7 +2168,7 @@ ml_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
}
static void
-ml_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
+ml_drop_popup_move(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _drop_msg *m = data;
@@ -2177,7 +2177,7 @@ ml_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
}
static void
-ml_drop_popup_cancel(EPopup *ep, EPopupItem *item, void *data)
+ml_drop_popup_cancel(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _drop_msg *m = data;
@@ -2193,7 +2193,7 @@ static EPopupItem ml_drop_popup_menu[] = {
};
static void
-ml_drop_popup_free(EPopup *ep, GSList *items, void *data)
+ml_drop_popup_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
@@ -2201,7 +2201,7 @@ ml_drop_popup_free(EPopup *ep, GSList *items, void *data)
}
static void
-ml_tree_drag_data_received (ETree *tree, int row, ETreePath path, int col,
+ml_tree_drag_data_received (ETree *tree, gint row, ETreePath path, gint col,
GdkDragContext *context, gint x, gint y,
GtkSelectionData *data, guint info,
guint time, MessageList *ml)
@@ -2230,7 +2230,7 @@ ml_tree_drag_data_received (ETree *tree, int row, ETreePath path, int col,
EMPopup *emp;
GSList *menus = NULL;
GtkMenu *menu;
- int i;
+ gint i;
emp = em_popup_new("org.gnome.mail.messagelist.popup.drop");
for (i=0;i<sizeof(ml_drop_popup_menu)/sizeof(ml_drop_popup_menu[0]);i++)
@@ -2289,11 +2289,11 @@ ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint
}
for (targets = context->targets; targets; targets = targets->next) {
- int i;
+ gint i;
d(printf("atom drop '%s'\n", gdk_atom_name(targets->data)));
for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++)
- if (targets->data == (void *)ml_drag_info[i].atom)
+ if (targets->data == (gpointer)ml_drag_info[i].atom)
actions |= ml_drag_info[i].actions;
}
d(printf("\n"));
@@ -2317,7 +2317,7 @@ ml_scrolled (GtkAdjustment *adj, MessageList *ml)
}
static void
-on_model_row_changed (ETableModel *model, int row, MessageList *ml)
+on_model_row_changed (ETableModel *model, gint row, MessageList *ml)
{
ml->priv->any_row_changed = TRUE;
}
@@ -2547,7 +2547,7 @@ message_list_class_init (MessageListClass *class)
{
GObjectClass *object_class;
GtkObjectClass *gtk_object_class;
- int i;
+ gint i;
for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++)
ml_drag_info[i].atom = gdk_atom_intern(ml_drag_info[i].target, FALSE);
@@ -2608,7 +2608,7 @@ message_list_class_init (MessageListClass *class)
}
static gboolean
-read_boolean_with_default (GConfClient *gconf, const char *key, gboolean def_value)
+read_boolean_with_default (GConfClient *gconf, const gchar *key, gboolean def_value)
{
GConfValue *value;
gboolean res;
@@ -2631,7 +2631,7 @@ message_list_construct (MessageList *message_list)
{
AtkObject *a11y;
gboolean construct_failed;
- char *etspecfile;
+ gchar *etspecfile;
GConfClient *gconf = mail_config_get_gconf_client ();
message_list->model =
@@ -2750,7 +2750,7 @@ message_list_get_shell_backend (MessageList *message_list)
}
static void
-clear_info(char *key, ETreePath *node, MessageList *ml)
+clear_info(gchar *key, ETreePath *node, MessageList *ml)
{
CamelMessageInfo *info;
@@ -2847,13 +2847,13 @@ is_node_selectable (MessageList *ml, CamelMessageInfo *info)
/* We try and find something that is selectable in our tree. There is
* actually no assurance that we'll find something that will still be
* there next time, but its probably going to work most of the time. */
-static char *
+static gchar *
find_next_selectable (MessageList *ml)
{
ETreePath node;
- int last;
- int vrow_orig;
- int vrow;
+ gint last;
+ gint vrow_orig;
+ gint vrow;
ETree *et = ml->tree;
CamelMessageInfo *info;
@@ -2901,19 +2901,19 @@ find_next_selectable (MessageList *ml)
#define BROKEN_ETREE /* avoid some broken code in etree(?) by not using the incremental update */
-static void build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row);
+static void build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint *row);
-static void build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row);
+static void build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row);
static void
build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *changes)
{
- int row = 0;
+ gint row = 0;
ETreeModel *etm = ml->model;
#ifndef BROKEN_ETREE
ETreePath *top;
#endif
- char *saveuid = NULL;
+ gchar *saveuid = NULL;
#ifdef BROKEN_ETREE
GPtrArray *selected;
#endif
@@ -2955,7 +2955,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
message_list_free_uids(ml, selected);
#else
} else {
- static int tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp);
+ static gint tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp);
build_subtree_diff(ml, ml->tree_root, top, thread->tree, &row);
top = e_tree_model_node_get_first_child(etm, ml->tree_root);
@@ -2991,7 +2991,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
is faster than inserting to the right row :( */
/* Otherwise, this code would probably go as it does the same thing essentially */
static void
-build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row)
+build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint *row)
{
ETreeModel *tree = ml->model;
ETreePath node;
@@ -3004,8 +3004,8 @@ build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int
continue;
}
- node = e_tree_memory_node_insert(E_TREE_MEMORY(tree), parent, -1, (void *)c->message);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node);
+ node = e_tree_memory_node_insert(E_TREE_MEMORY(tree), parent, -1, (gpointer)c->message);
+ g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(c->message), node);
camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message);
if (c->child) {
@@ -3073,7 +3073,7 @@ tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
/* adds a single node, retains save state, and handles adding children if required */
static void
-add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row, int myrow)
+add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row, gint myrow)
{
ETreeModel *etm = ml->model;
ETreePath node;
@@ -3082,8 +3082,8 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre
/* we just update the hashtable key, umm, does this leak the info on the message node? */
g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(c->message));
- node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (void *)c->message);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node);
+ node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (gpointer)c->message);
+ g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(c->message), node);
camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message);
(*row)++;
@@ -3094,13 +3094,13 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre
/* removes node, children recursively and all associated data */
static void
-remove_node_diff(MessageList *ml, ETreePath node, int depth)
+remove_node_diff(MessageList *ml, ETreePath node, gint depth)
{
ETreeModel *etm = ml->model;
ETreePath cp, cn;
CamelMessageInfo *info;
- t(printf("Removing node: %s\n", (char *)e_tree_memory_node_get_data(etm, node)));
+ t(printf("Removing node: %s\n", (gchar *)e_tree_memory_node_get_data(etm, node)));
/* we depth-first remove all node data's ... */
cp = e_tree_model_node_get_first_child(etm, node);
@@ -3125,12 +3125,12 @@ remove_node_diff(MessageList *ml, ETreePath node, int depth)
/* applies a new tree structure to an existing tree, but only by changing things
that have changed */
static void
-build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row)
+build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row)
{
ETreeModel *etm = ml->model;
ETreePath ap, *ai, *at, *tmp;
CamelFolderThreadNode *bp, *bi, *bt;
- int i, j, myrow = 0;
+ gint i, j, myrow = 0;
ap = path;
bp = c;
@@ -3158,7 +3158,7 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
/* if this is a message row, check/update the row id map */
if (g_hash_table_lookup_extended(ml->uid_rowmap, camel_message_info_uid(bp->message), &olduid, &oldrow)) {
if ((int)oldrow != (*row)) {
- g_hash_table_insert(ml->uid_rowmap, olduid, (void *)(*row));
+ g_hash_table_insert(ml->uid_rowmap, olduid, (gpointer)(*row));
}
} else {
g_warning("Cannot find uid %s in table?", camel_message_info_uid(bp->message));
@@ -3241,8 +3241,8 @@ static void
build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
{
ETreeModel *etm = ml->model;
- char *saveuid = NULL;
- int i;
+ gchar *saveuid = NULL;
+ gint i;
#ifdef BROKEN_ETREE
GPtrArray *selected;
#endif
@@ -3271,7 +3271,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
CamelMessageInfo *info = summary->pdata[i];
node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), ml->tree_root, -1, info);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(info), node);
+ g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(info), node);
camel_folder_ref_message_info(ml->folder, info);
}
e_tree_memory_thaw(E_TREE_MEMORY(etm));
@@ -3324,7 +3324,7 @@ message_list_change_first_visible_parent (MessageList *ml, ETreePath node)
static void
build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
{
- int i;
+ gint i;
ETreePath node;
CamelMessageInfo *info;
@@ -3354,9 +3354,9 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
for (i=0;i<changes->uid_added->len;i++) {
info = camel_folder_get_message_info (ml->folder, changes->uid_added->pdata[i]);
if (info) {
- d(printf(" %s\n", (char *)changes->uid_added->pdata[i]));
+ d(printf(" %s\n", (gchar *)changes->uid_added->pdata[i]));
node = e_tree_memory_node_insert (E_TREE_MEMORY (ml->model), ml->tree_root, -1, info);
- g_hash_table_insert (ml->uid_nodemap, (void *)camel_message_info_uid (info), node);
+ g_hash_table_insert (ml->uid_nodemap, (gpointer)camel_message_info_uid (info), node);
}
}
@@ -3384,11 +3384,11 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
static void
-mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, int flag)
+mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, gint flag)
{
CamelFolderChangeInfo *newchanges, *oldchanges = *changes;
CamelMessageInfo *info;
- int i;
+ gint i;
newchanges = camel_folder_change_info_new ();
@@ -3428,7 +3428,7 @@ main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
MessageList *ml = MESSAGE_LIST (user_data);
CamelFolderChangeInfo *changes = (CamelFolderChangeInfo *)event_data;
CamelFolder *folder = (CamelFolder *)o;
- int i;
+ gint i;
/* may be NULL if we're in the process of being destroyed */
if (ml->async_event == NULL)
@@ -3500,7 +3500,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
* the "Outgoing folder" column view.
**/
void
-message_list_set_folder (MessageList *message_list, CamelFolder *folder, const char *uri, gboolean outgoing)
+message_list_set_folder (MessageList *message_list, CamelFolder *folder, const gchar *uri, gboolean outgoing)
{
ETreeModel *etm = message_list->model;
gboolean hide_deleted;
@@ -3558,7 +3558,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
}
if (folder) {
- int strikeout_col = -1;
+ gint strikeout_col = -1;
ECell *cell;
camel_object_ref (folder);
@@ -3605,7 +3605,7 @@ on_cursor_activated_idle (gpointer data)
{
MessageList *message_list = data;
ESelectionModel *esm = e_tree_get_selection_model (message_list->tree);
- int selected = e_selection_model_selected_count (esm);
+ gint selected = e_selection_model_selected_count (esm);
if (selected == 1 && message_list->cursor_uid) {
d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid));
@@ -3619,10 +3619,10 @@ on_cursor_activated_idle (gpointer data)
}
static void
-on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data)
+on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data)
{
MessageList *message_list = MESSAGE_LIST (user_data);
- const char *new_uid;
+ const gchar *new_uid;
if (path == NULL)
new_uid = NULL;
@@ -3652,7 +3652,7 @@ static void
on_selection_changed_cmd(ETree *tree, MessageList *ml)
{
GPtrArray *uids;
- char *newuid;
+ gchar *newuid;
ETreePath cursor;
/* not sure if we could just ignore this for the cursor, i think sometimes you
@@ -3661,7 +3661,7 @@ on_selection_changed_cmd(ETree *tree, MessageList *ml)
if (uids->len == 1)
newuid = uids->pdata[0];
else if ((cursor = e_tree_get_cursor(tree)))
- newuid = (char *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor));
+ newuid = (gchar *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor));
else
newuid = NULL;
@@ -3687,7 +3687,7 @@ static gint
on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list)
{
CamelMessageInfo *info;
- int flag;
+ gint flag;
guint32 flags;
if (col == COL_MESSAGE_STATUS)
@@ -3729,10 +3729,10 @@ struct _ml_selected_data {
};
static void
-ml_getselected_cb(ETreePath path, void *user_data)
+ml_getselected_cb(ETreePath path, gpointer user_data)
{
struct _ml_selected_data *data = user_data;
- const char *uid;
+ const gchar *uid;
if (e_tree_model_node_is_root (data->ml->model, path))
return;
@@ -3777,7 +3777,7 @@ message_list_get_selected(MessageList *ml)
void
message_list_set_selected(MessageList *ml, GPtrArray *uids)
{
- int i;
+ gint i;
ETreeSelectionModel *etsm;
ETreePath node;
GPtrArray *paths = g_ptr_array_new();
@@ -3814,7 +3814,7 @@ message_list_thaw(MessageList *ml)
void message_list_free_uids(MessageList *ml, GPtrArray *uids)
{
- int i;
+ gint i;
for (i=0;i<uids->len;i++)
g_free(uids->pdata[i]);
@@ -3867,7 +3867,7 @@ message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted)
}
void
-message_list_set_search (MessageList *ml, const char *search)
+message_list_set_search (MessageList *ml, const gchar *search)
{
if (search == NULL || search[0] == '\0')
if (ml->search == NULL || ml->search[0] == '\0')
@@ -3891,7 +3891,7 @@ message_list_set_search (MessageList *ml, const char *search)
/* will ensure that the message with UID uid will be in the message list after the next rebuild */
void
-message_list_ensure_message (MessageList *ml, const char *uid)
+message_list_ensure_message (MessageList *ml, const gchar *uid)
{
g_return_if_fail (ml != NULL);
@@ -3907,12 +3907,12 @@ message_list_length (MessageList *ml)
}
struct _glibsuxcrap {
- unsigned int count;
+ guint count;
CamelFolder *folder;
};
static void
-glib_crapback(void *key, void *data, void *x)
+glib_crapback(gpointer key, gpointer data, gpointer x)
{
struct _glibsuxcrap *y = x;
CamelMessageInfo *mi;
@@ -3931,7 +3931,7 @@ glib_crapback(void *key, void *data, void *x)
unsigned int
message_list_hidden(MessageList *ml)
{
- unsigned int hidden = 0;
+ guint hidden = 0;
MESSAGE_LIST_LOCK (ml, hide_lock);
if (ml->hidden && ml->folder) {
@@ -3959,7 +3959,7 @@ message_list_hidden(MessageList *ml)
100 messages.
*/
void
-message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper)
+message_list_hide_add (MessageList *ml, const gchar *expr, guint lower, guint upper)
{
MESSAGE_LIST_LOCK (ml, hide_lock);
@@ -3977,8 +3977,8 @@ message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, un
void
message_list_hide_uids (MessageList *ml, GPtrArray *uids)
{
- int i;
- char *uid;
+ gint i;
+ gchar *uid;
/* first see if we need to do any work, if so, then do it all at once */
for (i = 0; i < uids->len; i++) {
@@ -4045,7 +4045,7 @@ message_list_hide_clear (MessageList *ml)
static void
load_hide_state (MessageList *ml)
{
- char *filename;
+ gchar *filename;
FILE *in;
gint32 version, lower, upper;
@@ -4071,7 +4071,7 @@ load_hide_state (MessageList *ml)
camel_file_util_decode_fixed_int32 (in, &upper);
ml->hide_after = upper;
while (!feof(in)) {
- char *olduid, *uid;
+ gchar *olduid, *uid;
if (camel_file_util_decode_string (in, &olduid) != -1) {
uid = e_mempool_strdup(ml->hidden_pool, olduid);
@@ -4088,7 +4088,7 @@ load_hide_state (MessageList *ml)
}
static void
-hide_save_1 (char *uid, char *keydata, FILE *out)
+hide_save_1 (gchar *uid, gchar *keydata, FILE *out)
{
camel_file_util_encode_string (out, uid);
}
@@ -4098,7 +4098,7 @@ hide_save_1 (char *uid, char *keydata, FILE *out)
static void
save_hide_state (MessageList *ml)
{
- char *filename;
+ gchar *filename;
FILE *out;
if (ml->folder == NULL)
@@ -4126,11 +4126,11 @@ save_hide_state (MessageList *ml)
struct _regen_list_msg {
MailMsg base;
- int complete;
+ gint complete;
MessageList *ml;
- char *search;
- char *hideexpr;
+ gchar *search;
+ gchar *hideexpr;
CamelFolderChangeInfo *changes;
gboolean dotree; /* we are building a tree */
gboolean hidedel; /* we want to/dont want to show deleted messages */
@@ -4141,7 +4141,7 @@ struct _regen_list_msg {
CamelFolder *folder;
GPtrArray *summary;
- int last_row; /* last selected (cursor) row */
+ gint last_row; /* last selected (cursor) row */
xmlDoc *expand_state; /* stored expanded state of the previous view */
};
@@ -4168,7 +4168,7 @@ regen_list_exec (struct _regen_list_msg *m)
GPtrArray *uids, *uidnew, *showuids, *searchuids = NULL;
CamelMessageInfo *info;
ETreePath cursor;
- int i;
+ gint i;
gchar *expr = NULL;
if (m->folder != m->ml->folder)
@@ -4218,7 +4218,7 @@ regen_list_exec (struct _regen_list_msg *m)
thus we will keep the selected message to be sure it doesn't disappear because
it no longer belong to our search filter. */
if (uids && ((m->changes && m->ml->cursor_uid) || m->ml->ensure_uid)) {
- const char *looking_for = m->ml->cursor_uid;
+ const gchar *looking_for = m->ml->cursor_uid;
/* ensure_uid has precedence of cursor_uid */
if (m->ml->ensure_uid)
looking_for = m->ml->ensure_uid;
@@ -4269,7 +4269,7 @@ regen_list_exec (struct _regen_list_msg *m)
for (i = 0; i < uidnew->len; i++) {
if (g_hash_table_lookup (m->ml->hidden, uidnew->pdata[i]) == NULL) {
- char *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]);
+ gchar *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]);
g_hash_table_insert (m->ml->hidden, uid, uid);
}
}
@@ -4289,12 +4289,12 @@ regen_list_exec (struct _regen_list_msg *m)
/* perform uid hiding */
if (m->ml->hidden || m->ml->hide_before != ML_HIDE_NONE_START || m->ml->hide_after != ML_HIDE_NONE_END) {
- int start, end;
+ gint start, end;
uidnew = g_ptr_array_new ();
/* first, hide matches */
if (m->ml->hidden) {
- int subtr = 0;
+ gint subtr = 0;
for (i = 0; i < uids->len; i++) {
if (g_hash_table_lookup (m->ml->hidden, uids->pdata[i]) == NULL)
@@ -4302,7 +4302,7 @@ regen_list_exec (struct _regen_list_msg *m)
else if (m->last_row >= 0) {
/* if we are going to hide message above last selected row, then we should
decrease our last row number, to put cursor on a proper place. */
- ETreePath node = g_hash_table_lookup (m->ml->uid_nodemap, (const char *) uids->pdata[i]);
+ ETreePath node = g_hash_table_lookup (m->ml->uid_nodemap, (const gchar *) uids->pdata[i]);
if (node && m->last_row > e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (m->ml->tree), node))
subtr ++;
@@ -4447,7 +4447,7 @@ regen_list_done (struct _regen_list_msg *m)
g_mutex_unlock (m->ml->regen_lock);
if (m->ml->regen == NULL && m->ml->pending_select_uid) {
- char *uid = m->ml->pending_select_uid;
+ gchar *uid = m->ml->pending_select_uid;
m->ml->pending_select_uid = NULL;
message_list_select_uid(m->ml, uid);
@@ -4485,7 +4485,7 @@ regen_list_done (struct _regen_list_msg *m)
static void
regen_list_free (struct _regen_list_msg *m)
{
- int i;
+ gint i;
e_profile_event_emit("list.regenerated", m->folder->full_name, 0);
@@ -4573,7 +4573,7 @@ mail_regen_cancel(MessageList *ml)
}
static void
-mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes)
+mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes)
{
struct _regen_list_msg *m;
GConfClient *gconf;
@@ -4632,7 +4632,7 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came
if (message_list_length (ml) <= 0) {
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (ml))) {
/* there is some info why the message list is empty, let it be something useful */
- char *txt = g_strconcat (_("Generating message list"), "..." , NULL);
+ gchar *txt = g_strconcat (_("Generating message list"), "..." , NULL);
e_tree_set_info_message (m->ml->tree, txt);
diff --git a/mail/message-list.h b/mail/message-list.h
index 4288568d4f..e902e9640b 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -104,7 +104,7 @@ struct _MessageList {
/* The folder & matching uri */
CamelFolder *folder;
- char *folder_uri;
+ gchar *folder_uri;
GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */
@@ -114,15 +114,15 @@ struct _MessageList {
/* IMPORTANT: You MUST have obtained the hide lock, to operate on this data */
GHashTable *hidden;
struct _EMemPool *hidden_pool;
- int hide_unhidden; /* total length, before hiding */
- int hide_before, hide_after; /* hide ranges of messages */
+ gint hide_unhidden; /* total length, before hiding */
+ gint hide_before, hide_after; /* hide ranges of messages */
/* Current search string, or %NULL */
- char *search;
+ gchar *search;
/* which message uid should be left in the list even not in a search after rebuild;
rebuild will clear the value to NULL */
- char *ensure_uid;
+ gchar *ensure_uid;
/* are we regenerating the message_list because set_folder was just called? */
guint just_set_folder : 1;
@@ -143,7 +143,7 @@ struct _MessageList {
guint frozen:16;
/* Where the ETree cursor is. */
- char *cursor_uid;
+ gchar *cursor_uid;
/* whether the last selection was on a single row or none/multi */
gboolean last_sel_single;
@@ -157,11 +157,11 @@ struct _MessageList {
/* list of outstanding regeneration requests */
GList *regen;
GMutex *regen_lock; /* when writing to the regen, guard with this lock too */
- char *pending_select_uid; /* set if we were busy regnerating while we had a select come in */
+ gchar *pending_select_uid; /* set if we were busy regnerating while we had a select come in */
guint regen_timeout_id;
- void *regen_timeout_msg;
+ gpointer regen_timeout_msg;
- char *frozen_search; /* to save search took place while we were frozen */
+ gchar *frozen_search; /* to save search took place while we were frozen */
/* the current camel folder thread tree, if any */
struct _CamelFolderThread *thread_tree;
@@ -174,7 +174,7 @@ struct _MessageListClass {
ETreeScrolledClass parent_class;
/* signals - select a message */
- void (*message_selected) (MessageList *ml, const char *uid);
+ void (*message_selected) (MessageList *ml, const gchar *uid);
void (*message_list_built) (MessageList *ml);
void (*message_list_scrolled) (MessageList *ml);
};
@@ -189,7 +189,7 @@ typedef enum {
GType message_list_get_type (void);
GtkWidget *message_list_new (EShellBackend *shell_backend);
EShellBackend *message_list_get_shell_backend (MessageList *message_list);
-void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing);
+void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const gchar *uri, gboolean outgoing);
void message_list_freeze(MessageList *ml);
void message_list_thaw(MessageList *ml);
@@ -207,7 +207,7 @@ gboolean message_list_select (MessageList *message_list,
gboolean message_list_can_select(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask);
void message_list_select_uid (MessageList *message_list,
- const char *uid);
+ const gchar *uid);
void message_list_select_next_thread (MessageList *ml);
@@ -222,11 +222,11 @@ void message_list_copy(MessageList *ml, gboolean cut);
void message_list_paste (MessageList *ml);
/* info */
-unsigned int message_list_length (MessageList *ml);
-unsigned int message_list_hidden (MessageList *ml);
+guint message_list_length (MessageList *ml);
+guint message_list_hidden (MessageList *ml);
/* hide specific messages */
-void message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper);
+void message_list_hide_add (MessageList *ml, const gchar *expr, guint lower, guint upper);
void message_list_hide_uids (MessageList *ml, GPtrArray *uids);
void message_list_hide_clear (MessageList *ml);
@@ -235,8 +235,8 @@ void message_list_set_threaded_expand_all (MessageList *ml);
void message_list_set_threaded_collapse_all (MessageList *ml);
void message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted);
-void message_list_set_search (MessageList *ml, const char *search);
-void message_list_ensure_message (MessageList *ml, const char *uid);
+void message_list_set_search (MessageList *ml, const gchar *search);
+void message_list_ensure_message (MessageList *ml, const gchar *uid);
void message_list_save_state (MessageList *ml);
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index ddbb6492f9..994bbe3214 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -65,7 +65,7 @@ static const gchar *available_flags[] = {
N_("Review"),
};
-static int num_available_flags = sizeof (available_flags) / sizeof (available_flags[0]);
+static gint num_available_flags = sizeof (available_flags) / sizeof (available_flags[0]);
static MessageTagEditorClass *parent_class = NULL;
@@ -137,7 +137,7 @@ get_tag_list (MessageTagEditor *editor)
MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
CamelTag *tags = NULL;
time_t date;
- char *text;
+ gchar *text;
camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (followup->combo_entry)))));
@@ -165,7 +165,7 @@ static void
set_tag_list (MessageTagEditor *editor, CamelTag *tags)
{
MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
- const char *text;
+ const gchar *text;
time_t date;
text = camel_tag_get (&tags, "follow-up");
@@ -224,22 +224,22 @@ get_week_start_day (void)
static gboolean
locale_supports_12_hour_format (void)
{
- char s[16];
+ gchar s[16];
time_t t = 0;
strftime(s, sizeof s, "%p", gmtime (&t));
return s[0] != '\0';
}
-GtkWidget *target_date_new (const char *s1, const char *s2, int i1, int i2);
+GtkWidget *target_date_new (const gchar *s1, const gchar *s2, gint i1, gint i2);
GtkWidget *
-target_date_new (const char *s1, const char *s2, int i1, int i2)
+target_date_new (const gchar *s1, const gchar *s2, gint i1, gint i2)
{
gboolean time_24hour = TRUE;
GConfClient *gconf;
GtkWidget *widget;
- int start;
+ gint start;
widget = e_date_edit_new ();
e_date_edit_set_show_date (E_DATE_EDIT (widget), TRUE);
@@ -269,8 +269,8 @@ construct (MessageTagEditor *editor)
GtkListStore *model;
GtkWidget *widget;
GladeXML *gui;
- int i;
- char *gladefile;
+ gint i;
+ gchar *gladefile;
gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up"));
@@ -313,7 +313,7 @@ construct (MessageTagEditor *editor)
followup->combo_entry = GTK_COMBO_BOX (glade_xml_get_widget (gui, "combo"));
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (followup->combo_entry)));
for (i = 0; i < num_available_flags; i++)
- gtk_combo_box_append_text (followup->combo_entry, (char *) _(available_flags[i]));
+ gtk_combo_box_append_text (followup->combo_entry, (gchar *) _(available_flags[i]));
gtk_combo_box_set_active (followup->combo_entry, DEFAULT_FLAG);
followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date"));
@@ -342,7 +342,7 @@ message_tag_followup_new (void)
}
void
-message_tag_followup_append_message (MessageTagFollowUp *editor, const char *from, const char *subject)
+message_tag_followup_append_message (MessageTagFollowUp *editor, const gchar *from, const gchar *subject)
{
GtkTreeIter iter;
GtkListStore *model;
diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h
index 5c229fe36e..7e362df300 100644
--- a/mail/message-tag-followup.h
+++ b/mail/message-tag-followup.h
@@ -69,8 +69,8 @@ GType message_tag_followup_get_type (void);
MessageTagEditor *message_tag_followup_new (void);
void message_tag_followup_append_message (MessageTagFollowUp *editor,
- const char *from,
- const char *subject);
+ const gchar *from,
+ const gchar *subject);
#ifdef __cplusplus
}