aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 23:13:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-29 00:13:23 +0800
commitfad4af8a3d4c6f50f7bcceca8d545eb17d6fd056 (patch)
treeae78be371695c3dc18847b87d3f014f985aa3a40 /mail
parent6f5464f34ceec9e5701e3e3e651a40f9e6b3a072 (diff)
downloadgsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.gz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.bz2
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.lz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.xz
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.tar.zst
gsoc2013-evolution-fad4af8a3d4c6f50f7bcceca8d545eb17d6fd056.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-searching-tokenizer.c150
-rw-r--r--mail/e-searching-tokenizer.h10
-rw-r--r--mail/em-account-editor.c346
-rw-r--r--mail/em-account-editor.h8
-rw-r--r--mail/em-account-prefs.c26
-rw-r--r--mail/em-composer-prefs.c10
-rw-r--r--mail/em-composer-utils.c228
-rw-r--r--mail/em-composer-utils.h30
-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.c164
-rw-r--r--mail/em-folder-properties.c42
-rw-r--r--mail/em-folder-properties.h2
-rw-r--r--mail/em-folder-selection-button.c22
-rw-r--r--mail/em-folder-selection-button.h6
-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.c160
-rw-r--r--mail/em-folder-tree-model.h48
-rw-r--r--mail/em-folder-tree.c180
-rw-r--r--mail/em-folder-tree.h16
-rw-r--r--mail/em-folder-utils.c70
-rw-r--r--mail/em-folder-utils.h4
-rw-r--r--mail/em-folder-view.c356
-rw-r--r--mail/em-folder-view.h30
-rw-r--r--mail/em-format-hook.c10
-rw-r--r--mail/em-format-hook.h4
-rw-r--r--mail/em-format-html-display.c120
-rw-r--r--mail/em-format-html-display.h18
-rw-r--r--mail/em-format-html-print.c4
-rw-r--r--mail/em-format-html.c180
-rw-r--r--mail/em-format-html.h32
-rw-r--r--mail/em-format-quote.c52
-rw-r--r--mail/em-format-quote.h2
-rw-r--r--mail/em-format.c104
-rw-r--r--mail/em-format.h52
-rw-r--r--mail/em-html-stream.c8
-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.c126
-rw-r--r--mail/em-mailer-prefs.h6
-rw-r--r--mail/em-menu.c16
-rw-r--r--mail/em-menu.h6
-rw-r--r--mail/em-migrate.c398
-rw-r--r--mail/em-migrate.h2
-rw-r--r--mail/em-network-prefs.c30
-rw-r--r--mail/em-popup.c68
-rw-r--r--mail/em-popup.h18
-rw-r--r--mail/em-search-context.c4
-rw-r--r--mail/em-stripsig-filter.c26
-rw-r--r--mail/em-subscribe-editor.c60
-rw-r--r--mail/em-utils.c230
-rw-r--r--mail/em-utils.h40
-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-factory.c6
-rw-r--r--mail/mail-component.c144
-rw-r--r--mail/mail-component.h18
-rw-r--r--mail/mail-config-factory.c2
-rw-r--r--mail/mail-config-factory.h2
-rw-r--r--mail/mail-config.c114
-rw-r--r--mail/mail-config.h40
-rw-r--r--mail/mail-folder-cache.c108
-rw-r--r--mail/mail-folder-cache.h8
-rw-r--r--mail/mail-mt.c122
-rw-r--r--mail/mail-mt.h22
-rw-r--r--mail/mail-ops.c336
-rw-r--r--mail/mail-ops.h142
-rw-r--r--mail/mail-send-recv.c76
-rw-r--r--mail/mail-session.c112
-rw-r--r--mail/mail-session.h24
-rw-r--r--mail/mail-tools.c54
-rw-r--r--mail/mail-tools.h12
-rw-r--r--mail/mail-vfolder.c116
-rw-r--r--mail/mail-vfolder.h14
-rw-r--r--mail/message-list.c404
-rw-r--r--mail/message-list.h34
-rw-r--r--mail/message-tag-followup.c22
-rw-r--r--mail/message-tag-followup.h4
105 files changed, 3187 insertions, 3187 deletions
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
index 724cc3b74a..b0b1db1879 100644
--- a/mail/e-searching-tokenizer.c
+++ b/mail/e-searching-tokenizer.c
@@ -45,10 +45,10 @@ enum {
static guint signals[LAST_SIGNAL] = { 0, };
-static void e_searching_tokenizer_begin (HTMLTokenizer *, const char *);
+static void e_searching_tokenizer_begin (HTMLTokenizer *, const gchar *);
static void e_searching_tokenizer_end (HTMLTokenizer *);
-static char *e_searching_tokenizer_peek_token (HTMLTokenizer *);
-static char *e_searching_tokenizer_next_token (HTMLTokenizer *);
+static gchar *e_searching_tokenizer_peek_token (HTMLTokenizer *);
+static gchar *e_searching_tokenizer_next_token (HTMLTokenizer *);
static gboolean e_searching_tokenizer_has_more (HTMLTokenizer *);
static HTMLTokenizer *e_searching_tokenizer_clone (HTMLTokenizer *);
@@ -114,10 +114,10 @@ shared_state_unref (SharedState *shared)
/* This is faster and safer than glib2's utf8 abomination, but isn't exported from camel as yet */
static inline guint32
-camel_utf8_getc(const unsigned char **ptr)
+camel_utf8_getc(const guchar **ptr)
{
- register unsigned char *p = (unsigned char *)*ptr;
- register unsigned char c, r;
+ register guchar *p = (guchar *)*ptr;
+ register guchar c, r;
register guint32 v, m;
again:
@@ -158,11 +158,11 @@ static const gchar *ignored_tags[] = {
"B", "I", "FONT", "TT", "EM", /* and more? */};
static int
-ignore_tag (const char *tag)
+ignore_tag (const gchar *tag)
{
- char *t = alloca(strlen(tag)+1), c, *out;
- const char *in;
- int i;
+ gchar *t = alloca(strlen(tag)+1), c, *out;
+ const gchar *in;
+ gint i;
/* we could use a aho-corasick matcher here too ... but we wont */
@@ -206,7 +206,7 @@ struct _match {
/* tree state node */
struct _state {
struct _match *matches;
- unsigned int final; /* max no of chars we just matched */
+ guint final; /* max no of chars we just matched */
struct _state *fail; /* where to try next if we fail */
struct _state *next; /* next on this level? */
};
@@ -214,7 +214,7 @@ struct _state {
/* base tree structure */
struct _trie {
struct _state root;
- int max_depth;
+ gint max_depth;
EMemChunk *state_chunks;
EMemChunk *match_chunks;
@@ -223,9 +223,9 @@ struct _trie {
/* will be enabled only if debug is enabled */
#if d(1) -1 != -1
static void
-dump_trie(struct _state *s, int d)
+dump_trie(struct _state *s, gint d)
{
- char *p = alloca(d*2+1);
+ gchar *p = alloca(d*2+1);
struct _match *m;
memset(p, ' ', d*2);
@@ -259,15 +259,15 @@ g(struct _state *q, guint32 c)
}
static struct _trie *
-build_trie(int nocase, int len, unsigned char **words)
+build_trie(gint nocase, gint len, guchar **words)
{
struct _state *q, *qt, *r;
- const unsigned char *word;
+ const guchar *word;
struct _match *m, *n = NULL;
- int i, depth;
+ gint i, depth;
guint32 c;
struct _trie *trie;
- int state_depth_max, state_depth_size;
+ gint state_depth_max, state_depth_size;
struct _state **state_depth;
trie = g_malloc(sizeof(*trie));
@@ -385,14 +385,14 @@ free_trie(struct _trie *t)
struct _token {
struct _token *next;
struct _token *prev;
- unsigned int offset;
+ guint offset;
/* we need to copy the token for memory management, so why not copy it whole */
- char tok[1];
+ gchar tok[1];
};
/* stack of submatches currently being scanned, used for merging */
struct _submatch {
- unsigned int offstart, offend; /* in bytes */
+ guint offstart, offend; /* in bytes */
};
/* flags for new func */
@@ -402,17 +402,17 @@ struct _submatch {
struct _searcher {
struct _trie *t;
- char *(*next_token)(); /* callbacks for more tokens */
- void *next_data;
+ gchar *(*next_token)(); /* callbacks for more tokens */
+ gpointer next_data;
- int words; /* how many words */
- char *tags, *tage; /* the tag we used to highlight */
+ gint words; /* how many words */
+ gchar *tags, *tage; /* the tag we used to highlight */
- int flags; /* case sensitive or not */
+ gint flags; /* case sensitive or not */
struct _state *state; /* state is the current trie state */
- int matchcount;
+ gint matchcount;
EDList input; /* pending 'input' tokens, processed but might match */
EDList output; /* output tokens ready for source */
@@ -422,25 +422,25 @@ struct _searcher {
guint32 offset; /* current offset through searchable stream? */
guint32 offout; /* last output position */
- unsigned int lastp; /* current position in rotating last buffer */
+ guint lastp; /* current position in rotating last buffer */
guint32 *last; /* buffer that goes back last 'n' positions */
guint32 last_mask; /* bitmask for efficient rotation calculation */
- unsigned int submatchp; /* submatch stack */
+ guint submatchp; /* submatch stack */
struct _submatch *submatches;
};
static void
-searcher_set_tokenfunc(struct _searcher *s, char *(*next)(), void *data)
+searcher_set_tokenfunc(struct _searcher *s, gchar *(*next)(), gpointer data)
{
s->next_token = next;
s->next_data = data;
}
static struct _searcher *
-searcher_new (int flags, int argc, unsigned char **argv, const char *tags, const char *tage)
+searcher_new (gint flags, gint argc, guchar **argv, const gchar *tags, const gchar *tage)
{
- int i, m;
+ gint i, m;
struct _searcher *s;
s = g_malloc(sizeof(*s));
@@ -493,7 +493,7 @@ searcher_free(struct _searcher *s)
g_free(s);
}
static struct _token *
-append_token(EDList *list, const char *tok, int len)
+append_token(EDList *list, const gchar *tok, gint len)
{
struct _token *token;
@@ -513,8 +513,8 @@ append_token(EDList *list, const char *tok, int len)
static void
output_token(struct _searcher *s, struct _token *token)
{
- int offend;
- int left, pre;
+ gint offend;
+ gint left, pre;
if (token->tok[0] == TAG_ESCAPE) {
if (token->offset >= s->offout) {
@@ -542,7 +542,7 @@ output_token(struct _searcher *s, struct _token *token)
}
static struct _token *
-find_token(struct _searcher *s, int start)
+find_token(struct _searcher *s, gint start)
{
register struct _token *token;
@@ -558,11 +558,11 @@ find_token(struct _searcher *s, int start)
}
static void
-output_match(struct _searcher *s, unsigned int start, unsigned int end)
+output_match(struct _searcher *s, guint start, guint end)
{
register struct _token *token;
struct _token *starttoken, *endtoken;
- char b[8];
+ gchar b[8];
d(printf("output match: %d-%d at %d\n", start, end, s->offout));
@@ -630,7 +630,7 @@ output_match(struct _searcher *s, unsigned int start, unsigned int end)
static void
output_subpending(struct _searcher *s)
{
- int i;
+ gint i;
for (i=s->submatchp-1;i>=0;i--)
output_match(s, s->submatches[i].offstart, s->submatches[i].offend);
@@ -639,9 +639,9 @@ output_subpending(struct _searcher *s)
/* returns true if a merge took place */
static int
-merge_subpending(struct _searcher *s, int offstart, int offend)
+merge_subpending(struct _searcher *s, gint offstart, gint offend)
{
- int i;
+ gint i;
/* merges overlapping or abutting match strings */
if (s->submatchp &&
@@ -664,7 +664,7 @@ merge_subpending(struct _searcher *s, int offstart, int offend)
}
static void
-push_subpending(struct _searcher *s, int offstart, int offend)
+push_subpending(struct _searcher *s, gint offstart, gint offend)
{
/* This is really an assertion, we just ignore the last pending match instead of crashing though */
if (s->submatchp >= s->words) {
@@ -691,11 +691,11 @@ output_pending(struct _searcher *s)
static void
flush_extra(struct _searcher *s)
{
- unsigned int start;
- int i;
+ guint start;
+ gint i;
struct _token *starttoken, *token;
- /* find earliest char that can be in contention */
+ /* find earliest gchar that can be in contention */
start = s->offset - s->t->max_depth;
for (i=0;i<s->submatchp;i++)
if (s->submatches[i].offstart < start)
@@ -712,20 +712,20 @@ flush_extra(struct _searcher *s)
}
}
-static char *
+static gchar *
searcher_next_token(struct _searcher *s)
{
struct _token *token;
- const unsigned char *tok, *stok, *pre_tok;
+ const guchar *tok, *stok, *pre_tok;
struct _trie *t = s->t;
struct _state *q = s->state;
struct _match *m = NULL;
- int offstart, offend;
+ gint offstart, offend;
guint32 c;
while (e_dlist_empty(&s->output)) {
/* get next token */
- tok = (unsigned char *)s->next_token(s->next_data);
+ tok = (guchar *)s->next_token(s->next_data);
if (tok == NULL) {
output_subpending(s);
output_pending(s);
@@ -733,15 +733,15 @@ searcher_next_token(struct _searcher *s)
}
/* we dont always have to copy each token, e.g. if we dont match anything */
- token = append_token(&s->input, (char *)tok, -1);
+ token = append_token(&s->input, (gchar *)tok, -1);
token->offset = s->offset;
- tok = (unsigned char *)token->tok;
+ tok = (guchar *)token->tok;
d(printf("new token %d '%s'\n", token->offset, token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok));
/* tag test, reset state on unknown tags */
if (tok[0] == TAG_ESCAPE) {
- if (!ignore_tag ((char *)tok)) {
+ if (!ignore_tag ((gchar *)tok)) {
/* force reset */
output_subpending(s);
output_pending(s);
@@ -772,7 +772,7 @@ searcher_next_token(struct _searcher *s)
if (q->final) {
s->matchcount++;
- /* use the last buffer to find the real offset of this char */
+ /* use the last buffer to find the real offset of this gchar */
offstart = s->last[(s->lastp - q->final)&s->last_mask];
offend = s->offset + (tok - stok);
@@ -815,10 +815,10 @@ searcher_next_token(struct _searcher *s)
return token ? g_strdup (token->tok) : NULL;
}
-static char *
+static gchar *
searcher_peek_token(struct _searcher *s)
{
- char *tok;
+ gchar *tok;
/* we just get it and then put it back, it's fast enuf */
tok = searcher_next_token(s);
@@ -841,9 +841,9 @@ searcher_pending(struct _searcher *s)
struct _search_info {
GPtrArray *strv;
- char *colour;
- unsigned int size:8;
- unsigned int flags:8;
+ gchar *colour;
+ guint size:8;
+ guint flags:8;
};
/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
@@ -860,26 +860,26 @@ search_info_new(void)
}
static void
-search_info_set_flags(struct _search_info *si, unsigned int flags, unsigned int mask)
+search_info_set_flags(struct _search_info *si, guint flags, guint mask)
{
si->flags = (si->flags & ~mask) | (flags & mask);
}
static void
-search_info_set_colour(struct _search_info *si, const char *colour)
+search_info_set_colour(struct _search_info *si, const gchar *colour)
{
g_free(si->colour);
si->colour = g_strdup(colour);
}
static void
-search_info_add_string(struct _search_info *si, const char *s)
+search_info_add_string(struct _search_info *si, const gchar *s)
{
- const unsigned char *start;
+ const guchar *start;
guint32 c;
if (s && s[0]) {
- const unsigned char *us = (unsigned char *) s;
+ const guchar *us = (guchar *) s;
/* strip leading whitespace */
start = us;
while ((c = camel_utf8_getc (&us))) {
@@ -890,14 +890,14 @@ search_info_add_string(struct _search_info *si, const char *s)
}
/* should probably also strip trailing, but i'm lazy today */
if (start[0])
- g_ptr_array_add(si->strv, g_strdup ((char *)start));
+ g_ptr_array_add(si->strv, g_strdup ((gchar *)start));
}
}
static void
search_info_clear(struct _search_info *si)
{
- int i;
+ gint i;
for (i=0;i<si->strv->len;i++)
g_free(si->strv->pdata[i]);
@@ -908,7 +908,7 @@ search_info_clear(struct _search_info *si)
static void
search_info_free(struct _search_info *si)
{
- int i;
+ gint i;
for (i=0;i<si->strv->len;i++)
g_free(si->strv->pdata[i]);
@@ -922,7 +922,7 @@ static struct _search_info *
search_info_clone(struct _search_info *si)
{
struct _search_info *out;
- int i;
+ gint i;
out = search_info_new();
for (i=0;i<si->strv->len;i++)
@@ -937,7 +937,7 @@ search_info_clone(struct _search_info *si)
static struct _searcher *
search_info_to_searcher(struct _search_info *si)
{
- char *tags, *tage;
+ gchar *tags, *tage;
const gchar *col;
if (si->strv->len == 0)
@@ -953,7 +953,7 @@ search_info_to_searcher(struct _search_info *si)
tage = alloca(20);
sprintf(tage, "%c</font>", TAG_ESCAPE);
- return searcher_new (si->flags, si->strv->len, (unsigned char **)si->strv->pdata, tags, tage);
+ return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage);
}
/* ********************************************************************** */
@@ -1063,7 +1063,7 @@ e_searching_tokenizer_new (void)
/* blah blah the htmltokeniser doesn't like being asked
for a token if it doens't hvae any! */
-static char *get_token(HTMLTokenizer *t)
+static gchar *get_token(HTMLTokenizer *t)
{
HTMLTokenizerClass *klass = HTML_TOKENIZER_CLASS (parent_class);
@@ -1071,7 +1071,7 @@ static char *get_token(HTMLTokenizer *t)
}
static void
-e_searching_tokenizer_begin (HTMLTokenizer *t, const char *content_type)
+e_searching_tokenizer_begin (HTMLTokenizer *t, const gchar *content_type)
{
ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (t);
struct _ESearchingTokenizerPrivate *p = st->priv;
@@ -1113,7 +1113,7 @@ e_searching_tokenizer_end (HTMLTokenizer *t)
HTML_TOKENIZER_CLASS (parent_class)->end (t);
}
-static char *
+static gchar *
e_searching_tokenizer_peek_token (HTMLTokenizer *tok)
{
ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
@@ -1125,12 +1125,12 @@ e_searching_tokenizer_peek_token (HTMLTokenizer *tok)
return searcher_peek_token(st->priv->engine);
}
-static char *
+static gchar *
e_searching_tokenizer_next_token (HTMLTokenizer *tok)
{
ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
- int oldmatched;
- char *token;
+ gint oldmatched;
+ gchar *token;
/* If no search is active, just use the default method. */
if (st->priv->engine == NULL)
diff --git a/mail/e-searching-tokenizer.h b/mail/e-searching-tokenizer.h
index f96c37ed49..e9b1a94343 100644
--- a/mail/e-searching-tokenizer.h
+++ b/mail/e-searching-tokenizer.h
@@ -56,15 +56,15 @@ ESearchingTokenizer *e_searching_tokenizer_new (void);
/* For now, just a simple API */
-void e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *, const char *);
-void e_searching_tokenizer_add_primary_search_string (ESearchingTokenizer *, const char *);
+void e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *, const gchar *);
+void e_searching_tokenizer_add_primary_search_string (ESearchingTokenizer *, const gchar *);
void e_searching_tokenizer_set_primary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive);
-void e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *, const char *);
-void e_searching_tokenizer_add_secondary_search_string (ESearchingTokenizer *st, const char *search_str);
+void e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *, const gchar *);
+void e_searching_tokenizer_add_secondary_search_string (ESearchingTokenizer *st, const gchar *search_str);
void e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *, gboolean is_case_sensitive);
-int e_searching_tokenizer_match_count (ESearchingTokenizer *);
+gint e_searching_tokenizer_match_count (ESearchingTokenizer *);
#endif /* __E_SEARCHING_TOKENIZER_H__ */
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 2b13e7e015..570858cd68 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -117,13 +117,13 @@ typedef struct _EMAccountEditorService {
struct _GtkToggleButton *needs_auth;
struct _GtkWidget *check_dialog;
- int check_id;
+ gint check_id;
GList *authtypes; /* if "Check supported" */
CamelProvider *provider;
CamelProviderType type;
- int auth_changed_id;
+ gint auth_changed_id;
} EMAccountEditorService;
typedef struct _EMAccountEditorPrivate {
@@ -135,7 +135,7 @@ typedef struct _EMAccountEditorPrivate {
guint sig_added_id;
guint sig_removed_id;
guint sig_changed_id;
- const char *sig_uid;
+ const gchar *sig_uid;
/* incoming mail */
EMAccountEditorService source;
@@ -177,13 +177,13 @@ typedef struct _EMAccountEditorPrivate {
/* for e-config callbacks, each page sets up its widgets, then they are dealed out by the get_widget callback in order*/
GtkWidget *widgets[5];
- const char *widgets_name[5];
- int widgets_index;
+ const gchar *widgets_name[5];
+ gint widgets_index;
/* for druid page preparation */
- unsigned int identity_set:1;
- unsigned int receive_set:1;
- unsigned int management_set:1;
+ guint identity_set:1;
+ guint receive_set:1;
+ guint management_set:1;
} EMAccountEditorPrivate;
static void emae_refresh_authtype(EMAccountEditor *emae, EMAccountEditorService *service);
@@ -287,7 +287,7 @@ EMAccountEditor *em_account_editor_new(EAccount *account, em_account_editor_t ty
*
* Return value:
**/
-EMAccountEditor *em_account_editor_new_for_pages(EAccount *account, em_account_editor_t type, char *id, GtkWidget **pages)
+EMAccountEditor *em_account_editor_new_for_pages(EAccount *account, em_account_editor_t type, gchar *id, GtkWidget **pages)
{
EMAccountEditor *emae = g_object_new(em_account_editor_get_type(), NULL);
emae->pages = pages;
@@ -318,14 +318,14 @@ static struct {
#define num_ssl_options (sizeof (ssl_options) / sizeof (ssl_options[0]))
static gboolean
-is_email (const char *address)
+is_email (const gchar *address)
{
/* This is supposed to check if the address's domain could be
an FQDN but alas, it's not worth the pain and suffering. */
- const char *at;
+ const gchar *at;
at = strchr (address, '@');
- /* make sure we have an '@' and that it's not the first or last char */
+ /* make sure we have an '@' and that it's not the first or last gchar */
if (!at || at == address || *(at + 1) == '\0')
return FALSE;
@@ -333,10 +333,10 @@ is_email (const char *address)
}
static CamelURL *
-emae_account_url(EMAccountEditor *emae, int urlid)
+emae_account_url(EMAccountEditor *emae, gint urlid)
{
CamelURL *url = NULL;
- const char *uri;
+ const gchar *uri;
uri = e_account_get_string(emae->account, urlid);
@@ -360,13 +360,13 @@ emae_license_state(GtkToggleButton *button, GtkDialog *dialog)
}
static gboolean
-emae_load_text(GtkTextView *view, const char *filename)
+emae_load_text(GtkTextView *view, const gchar *filename)
{
FILE *fd;
- char filebuf[1024];
+ gchar filebuf[1024];
GtkTextIter iter;
GtkTextBuffer *buffer;
- int count;
+ gint count;
g_return_val_if_fail (filename != NULL , FALSE);
@@ -391,9 +391,9 @@ emae_display_license(EMAccountEditor *emae, CamelProvider *prov)
{
GladeXML *xml;
GtkWidget *w, *dialog;
- char *tmp;
+ gchar *tmp;
GtkResponseType response = GTK_RESPONSE_NONE;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-dialogs.glade",
@@ -443,7 +443,7 @@ emae_check_license(EMAccountEditor *emae, CamelProvider *prov)
providers_list = gconf_client_get_list (gconf, "/apps/evolution/mail/licenses", GCONF_VALUE_STRING, NULL);
for (l = providers_list, accepted = FALSE; l && !accepted; l = g_slist_next(l))
- accepted = (strcmp((char *)l->data, prov->protocol) == 0);
+ accepted = (strcmp((gchar *)l->data, prov->protocol) == 0);
if (!accepted
&& (accepted = emae_display_license(emae, prov)) == TRUE) {
@@ -465,7 +465,7 @@ static void
default_folders_clicked (GtkButton *button, gpointer user_data)
{
EMAccountEditor *emae = user_data;
- const char *uri;
+ const gchar *uri;
uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
em_folder_selection_button_set_selection((EMFolderSelectionButton *)emae->priv->drafts_folder_button, uri);
@@ -477,31 +477,31 @@ default_folders_clicked (GtkButton *button, gpointer user_data)
}
/* custom widget factories */
-GtkWidget *em_account_editor_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2);
+GtkWidget *em_account_editor_folder_selector_button_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2);
GtkWidget *
-em_account_editor_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_editor_folder_selector_button_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
return (GtkWidget *)em_folder_selection_button_new(string1 ? string1 : _("Select Folder"), NULL);
}
-GtkWidget *em_account_editor_dropdown_new(char *widget_name, char *string1, char *string2, int int1, int int2);
+GtkWidget *em_account_editor_dropdown_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2);
GtkWidget *
-em_account_editor_dropdown_new(char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_editor_dropdown_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
return (GtkWidget *)gtk_combo_box_new();
}
-GtkWidget *em_account_editor_ssl_selector_new(char *widget_name, char *string1, char *string2, int int1, int int2);
+GtkWidget *em_account_editor_ssl_selector_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2);
GtkWidget *
-em_account_editor_ssl_selector_new(char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_editor_ssl_selector_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
GtkComboBox *dropdown = (GtkComboBox *)gtk_combo_box_new();
GtkCellRenderer *cell = gtk_cell_renderer_text_new();
GtkListStore *store;
- int i;
+ gint i;
GtkTreeIter iter;
gtk_widget_show((GtkWidget *)dropdown);
@@ -539,8 +539,8 @@ emae_auto_detect(EMAccountEditor *emae)
GHashTable *auto_detected;
GSList *l;
CamelProviderConfEntry *entries;
- char *value;
- int i;
+ gchar *value;
+ gint i;
CamelURL *url;
if (service->provider == NULL
@@ -615,7 +615,7 @@ static int
emae_signature_get_iter(EMAccountEditor *emae, ESignature *sig, GtkTreeModel **modelp, GtkTreeIter *iter)
{
GtkTreeModel *model;
- int found = 0;
+ gint found = 0;
model = gtk_combo_box_get_model(emae->priv->signatures_dropdown);
*modelp = model;
@@ -623,7 +623,7 @@ emae_signature_get_iter(EMAccountEditor *emae, ESignature *sig, GtkTreeModel **m
return FALSE;
do {
- char *uid;
+ gchar *uid;
gtk_tree_model_get(model, iter, 1, &uid, -1);
if (uid && !strcmp(uid, sig->uid))
@@ -657,10 +657,10 @@ emae_signature_changed(ESignatureList *signatures, ESignature *sig, EMAccountEdi
static void
emae_signaturetype_changed(GtkComboBox *dropdown, EMAccountEditor *emae)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
- char *uid = NULL;
+ gchar *uid = NULL;
if (id != -1) {
model = gtk_combo_box_get_model(dropdown);
@@ -688,11 +688,11 @@ emae_setup_signatures(EMAccountEditor *emae, GladeXML *xml)
GtkComboBox *dropdown = (GtkComboBox *)glade_xml_get_widget(xml, "signature_dropdown");
GtkCellRenderer *cell = gtk_cell_renderer_text_new();
GtkListStore *store;
- int i, active=0;
+ gint i, active=0;
GtkTreeIter iter;
ESignatureList *signatures;
EIterator *it;
- const char *current = e_account_get_string(emae->account, E_ACCOUNT_ID_SIGNATURE);
+ const gchar *current = e_account_get_string(emae->account, E_ACCOUNT_ID_SIGNATURE);
GtkWidget *button;
emae->priv->signatures_dropdown = dropdown;
@@ -749,7 +749,7 @@ emae_setup_signatures(EMAccountEditor *emae, GladeXML *xml)
static void
emae_receipt_policy_changed(GtkComboBox *dropdown, EMAccountEditor *emae)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
EAccountReceiptPolicy policy;
@@ -769,7 +769,7 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml)
{
GtkComboBox *dropdown = (GtkComboBox *)glade_xml_get_widget(xml, "receipt_policy_dropdown");
GtkListStore *store;
- int i = 0, active = 0;
+ gint i = 0, active = 0;
GtkTreeIter iter;
EAccountReceiptPolicy current = emae->account->receipt_policy;
static struct {
@@ -807,16 +807,16 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml)
static void
emae_account_entry_changed(GtkEntry *entry, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)entry, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)entry, "account-item"));
e_account_set_string(emae->account, item, gtk_entry_get_text(entry));
}
static GtkEntry *
-emae_account_entry(EMAccountEditor *emae, const char *name, int item, GladeXML *xml)
+emae_account_entry(EMAccountEditor *emae, const gchar *name, gint item, GladeXML *xml)
{
GtkEntry *entry;
- const char *text;
+ const gchar *text;
entry = (GtkEntry *)glade_xml_get_widget(xml, name);
text = e_account_get_string(emae->account, item);
@@ -832,13 +832,13 @@ emae_account_entry(EMAccountEditor *emae, const char *name, int item, GladeXML *
static void
emae_account_toggle_changed(GtkToggleButton *toggle, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)toggle, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)toggle, "account-item"));
e_account_set_bool(emae->account, item, gtk_toggle_button_get_active(toggle));
}
static void
-emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, int item)
+emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, gint item)
{
gtk_toggle_button_set_active(toggle, e_account_get_bool(emae->account, item));
g_object_set_data((GObject *)toggle, "account-item", GINT_TO_POINTER(item));
@@ -847,7 +847,7 @@ emae_account_toggle_widget(EMAccountEditor *emae, GtkToggleButton *toggle, int i
}
static GtkToggleButton *
-emae_account_toggle(EMAccountEditor *emae, const char *name, int item, GladeXML *xml)
+emae_account_toggle(EMAccountEditor *emae, const gchar *name, gint item, GladeXML *xml)
{
GtkToggleButton *toggle;
@@ -860,13 +860,13 @@ emae_account_toggle(EMAccountEditor *emae, const char *name, int item, GladeXML
static void
emae_account_spinint_changed(GtkSpinButton *spin, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)spin, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)spin, "account-item"));
e_account_set_int(emae->account, item, gtk_spin_button_get_value(spin));
}
static void
-emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, int item)
+emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, gint item)
{
gtk_spin_button_set_value(spin, e_account_get_int(emae->account, item));
g_object_set_data((GObject *)spin, "account-item", GINT_TO_POINTER(item));
@@ -876,7 +876,7 @@ emae_account_spinint_widget(EMAccountEditor *emae, GtkSpinButton *spin, int item
#if 0
static GtkSpinButton *
-emae_account_spinint(EMAccountEditor *emae, const char *name, int item)
+emae_account_spinint(EMAccountEditor *emae, const gchar *name, gint item)
{
GtkSpinButton *spin;
@@ -890,21 +890,21 @@ emae_account_spinint(EMAccountEditor *emae, const char *name, int item)
static void
emae_account_folder_changed(EMFolderSelectionButton *folder, EMAccountEditor *emae)
{
- int item = GPOINTER_TO_INT(g_object_get_data((GObject *)folder, "account-item"));
+ gint item = GPOINTER_TO_INT(g_object_get_data((GObject *)folder, "account-item"));
e_account_set_string(emae->account, item, em_folder_selection_button_get_selection(folder));
}
static EMFolderSelectionButton *
-emae_account_folder(EMAccountEditor *emae, const char *name, int item, int deffolder, GladeXML *xml)
+emae_account_folder(EMAccountEditor *emae, const gchar *name, gint item, gint deffolder, GladeXML *xml)
{
EMFolderSelectionButton *folder;
- const char *uri;
+ const gchar *uri;
folder = (EMFolderSelectionButton *)glade_xml_get_widget(xml, name);
uri = e_account_get_string(emae->account, item);
if (uri) {
- char *tmp = em_uri_to_camel(uri);
+ gchar *tmp = em_uri_to_camel(uri);
em_folder_selection_button_set_selection(folder, tmp);
g_free(tmp);
@@ -927,8 +927,8 @@ static void
smime_changed(EMAccountEditor *emae)
{
EMAccountEditorPrivate *gui = emae->priv;
- int act;
- const char *tmp;
+ gint act;
+ const gchar *tmp;
tmp = gtk_entry_get_text(gui->smime_sign_key);
act = tmp && tmp[0];
@@ -949,7 +949,7 @@ smime_changed(EMAccountEditor *emae)
}
static void
-smime_sign_key_selected(GtkWidget *dialog, const char *key, EMAccountEditor *emae)
+smime_sign_key_selected(GtkWidget *dialog, const gchar *key, EMAccountEditor *emae)
{
EMAccountEditorPrivate *gui = emae->priv;
@@ -984,7 +984,7 @@ smime_sign_key_clear(GtkWidget *w, EMAccountEditor *emae)
}
static void
-smime_encrypt_key_selected(GtkWidget *dialog, const char *key, EMAccountEditor *emae)
+smime_encrypt_key_selected(GtkWidget *dialog, const gchar *key, EMAccountEditor *emae)
{
EMAccountEditorPrivate *gui = emae->priv;
@@ -1020,10 +1020,10 @@ smime_encrypt_key_clear(GtkWidget *w, EMAccountEditor *emae)
#endif
static void
-emae_url_set_hostport(CamelURL *url, const char *txt)
+emae_url_set_hostport(CamelURL *url, const gchar *txt)
{
- const char *port;
- char *host;
+ const gchar *port;
+ gchar *host;
/* FIXME: what if this was a raw IPv6 address? */
if (txt && (port = strchr(txt, ':'))) {
@@ -1049,7 +1049,7 @@ emae_url_set_hostport(CamelURL *url, const char *txt)
We need our own function for host:port decoding, as above */
struct _provider_host_info {
guint32 flag;
- void (*setval)(CamelURL *, const char *);
+ void (*setval)(CamelURL *, const gchar *);
glong widgets[3];
};
@@ -1126,7 +1126,7 @@ static struct _service_info {
static void
emae_uri_changed(EMAccountEditorService *service, CamelURL *url)
{
- char *uri;
+ gchar *uri;
uri = camel_url_to_string(url, 0);
@@ -1142,16 +1142,16 @@ emae_uri_changed(EMAccountEditorService *service, CamelURL *url)
}
static void
-emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const char *), GtkEntry *entry)
+emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const gchar *), GtkEntry *entry)
{
GtkComboBox *dropdown;
- int id;
+ gint id;
GtkTreeModel *model;
GtkTreeIter iter;
CamelServiceAuthType *authtype;
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
- const char *text = gtk_entry_get_text(entry);
+ const gchar *text = gtk_entry_get_text(entry);
setval(url, (text && text[0])?text:NULL);
@@ -1175,16 +1175,16 @@ emae_service_url_changed(EMAccountEditorService *service, void (*setval)(CamelUR
}
static void
-emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const char *), GtkWidget *widget)
+emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(CamelURL *, const gchar *), GtkWidget *widget)
{
GtkComboBox *dropdown;
- int id;
+ gint id;
GtkTreeModel *model;
GtkTreeIter iter;
CamelServiceAuthType *authtype;
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
- const char *text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ const gchar *text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
setval(url, (text && text[0])?text:NULL);
@@ -1228,10 +1228,10 @@ emae_path_changed(GtkWidget *widget, EMAccountEditorService *service)
static int
emae_ssl_update(EMAccountEditorService *service, CamelURL *url)
{
- int id = gtk_combo_box_get_active(service->use_ssl);
+ gint id = gtk_combo_box_get_active(service->use_ssl);
GtkTreeModel *model;
GtkTreeIter iter;
- char *ssl;
+ gchar *ssl;
if (id == -1)
return 0;
@@ -1261,12 +1261,12 @@ emae_ssl_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
static void
emae_service_provider_changed(EMAccountEditorService *service)
{
- int i, j;
+ gint i, j;
void (*show)(GtkWidget *);
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
if (service->provider) {
- int enable;
+ gint enable;
GtkWidget *dwidget = NULL;
camel_url_set_protocol(url, service->provider->protocol);
@@ -1288,7 +1288,7 @@ emae_service_provider_changed(EMAccountEditorService *service)
for (i=0;emae_service_info[service->type].host_info[i].flag;i++) {
GtkWidget *w;
- int hide;
+ gint hide;
struct _provider_host_info *info = &emae_service_info[service->type].host_info[i];
enable = CAMEL_PROVIDER_ALLOWS(service->provider, info->flag);
@@ -1369,7 +1369,7 @@ emae_service_provider_changed(EMAccountEditorService *service)
static void
emae_provider_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
@@ -1399,19 +1399,19 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service)
GList *l;
GtkCellRenderer *cell = gtk_cell_renderer_text_new();
GtkComboBox *dropdown;
- int active = 0, i;
+ gint active = 0, i;
struct _service_info *info = &emae_service_info[service->type];
- const char *uri = e_account_get_string(account, info->account_uri_key);
- const char *tmp;
- char *current = NULL;
+ const gchar *uri = e_account_get_string(account, info->account_uri_key);
+ const gchar *tmp;
+ gchar *current = NULL;
CamelURL *url;
dropdown = service->providers;
gtk_widget_show((GtkWidget *)dropdown);
if (uri) {
- const char *colon = strchr(uri, ':');
- int len;
+ const gchar *colon = strchr(uri, ':');
+ gint len;
if (colon) {
len = colon-uri;
@@ -1495,7 +1495,7 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service)
static void
emae_authtype_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
{
- int id = gtk_combo_box_get_active(dropdown);
+ gint id = gtk_combo_box_get_active(dropdown);
GtkTreeModel *model;
GtkTreeIter iter;
CamelServiceAuthType *authtype;
@@ -1525,7 +1525,7 @@ emae_authtype_changed(GtkComboBox *dropdown, EMAccountEditorService *service)
static void
emae_needs_auth(GtkToggleButton *toggle, EMAccountEditorService *service)
{
- int need = gtk_toggle_button_get_active(toggle);
+ gint need = gtk_toggle_button_get_active(toggle);
gtk_widget_set_sensitive(service->auth_frame, need);
@@ -1549,10 +1549,10 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service)
GtkListStore *store;
GtkTreeIter iter;
GtkComboBox *dropdown;
- int active = 0;
- int i;
+ gint active = 0;
+ gint i;
struct _service_info *info = &emae_service_info[service->type];
- const char *uri = e_account_get_string(account, info->account_uri_key);
+ const gchar *uri = e_account_get_string(account, info->account_uri_key);
GList *l, *ll;
CamelURL *url = NULL;
@@ -1567,7 +1567,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service)
if (service->provider) {
for (i=0, l=service->provider->authtypes; l; l=l->next, i++) {
CamelServiceAuthType *authtype = l->data;
- int avail;
+ gint avail;
/* if we have some already shown */
if (service->authtypes) {
@@ -1606,7 +1606,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service)
camel_url_free(url);
}
-static void emae_check_authtype_done(const char *uri, CamelProviderType type, GList *types, void *data)
+static void emae_check_authtype_done(const gchar *uri, CamelProviderType type, GList *types, gpointer data)
{
EMAccountEditorService *service = data;
@@ -1626,7 +1626,7 @@ static void emae_check_authtype_done(const char *uri, CamelProviderType type, GL
g_object_unref(service->emae);
}
-static void emae_check_authtype_response(GtkWidget *d, int button, EMAccountEditorService *service)
+static void emae_check_authtype_response(GtkWidget *d, gint button, EMAccountEditorService *service)
{
mail_msg_cancel(service->check_id);
gtk_widget_destroy(service->check_dialog);
@@ -1639,7 +1639,7 @@ static void emae_check_authtype_response(GtkWidget *d, int button, EMAccountEdit
static void emae_check_authtype(GtkWidget *w, EMAccountEditorService *service)
{
EMAccountEditor *emae = service->emae;
- const char *uri;
+ const gchar *uri;
/* TODO: do we need to remove the auth mechanism from the uri? */
uri = e_account_get_string(emae->account, emae_service_info[service->type].account_uri_key);
@@ -1659,9 +1659,9 @@ emae_setup_service(EMAccountEditor *emae, EMAccountEditorService *service, Glade
{
struct _service_info *info = &emae_service_info[service->type];
CamelURL *url = emae_account_url(emae, info->account_uri_key);
- const char *uri = e_account_get_string(emae->account, info->account_uri_key);
- const char *tmp;
- int i;
+ const gchar *uri = e_account_get_string(emae->account, info->account_uri_key);
+ const gchar *tmp;
+ gint i;
service->provider = uri?camel_provider_get(uri, NULL):NULL;
service->frame = glade_xml_get_widget(xml, info->frame);
@@ -1685,7 +1685,7 @@ emae_setup_service(EMAccountEditor *emae, EMAccountEditorService *service, Glade
/* configure ui for current settings */
if (url->host) {
if (url->port) {
- char *host = g_strdup_printf("%s:%d", url->host, url->port);
+ gchar *host = g_strdup_printf("%s:%d", url->host, url->port);
gtk_entry_set_text(service->hostname, host);
g_free(host);
@@ -1769,16 +1769,16 @@ static struct {
/* its a bit obtuse, but its simple */
static void
-emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const char *first, ...)
+emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const gchar *first, ...)
{
- int i = 0;
+ gint i = 0;
va_list ap;
va_start(ap, first);
while (first) {
emae->priv->widgets_name[i] = first;
emae->priv->widgets[i++] = glade_xml_get_widget(xml, first);
- first = va_arg(ap, const char *);
+ first = va_arg(ap, const gchar *);
}
va_end(ap);
@@ -1789,15 +1789,15 @@ emae_queue_widgets(EMAccountEditor *emae, GladeXML *xml, const char *first, ...)
}
static GtkWidget *
-emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
EAccount *account = emae->account;
- int i;
+ gint i;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -1862,13 +1862,13 @@ emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
}
static GtkWidget *
-emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -1915,9 +1915,9 @@ emae_receive_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
static void
emae_option_toggle_changed(GtkToggleButton *toggle, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)toggle, "option-name");
+ const gchar *name = g_object_get_data((GObject *)toggle, "option-name");
GSList *depl = g_object_get_data((GObject *)toggle, "dependent-list");
- int active = gtk_toggle_button_get_active(toggle);
+ gint active = gtk_toggle_button_get_active(toggle);
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
for (;depl;depl = g_slist_next(depl))
@@ -1929,13 +1929,13 @@ emae_option_toggle_changed(GtkToggleButton *toggle, EMAccountEditorService *serv
}
static GtkWidget *
-emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const char *text, const char *name, int def)
+emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const gchar *text, const gchar *name, gint def)
{
GtkWidget *w;
/* FIXME: how do we get the default value ever? */
w = gtk_check_button_new_with_mnemonic(text);
- g_object_set_data((GObject *)w, "option-name", (void *)name);
+ g_object_set_data((GObject *)w, "option-name", (gpointer)name);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), camel_url_get_param (url, name) != NULL);
g_signal_connect(w, "toggled", G_CALLBACK(emae_option_toggle_changed), service);
gtk_widget_show(w);
@@ -1946,8 +1946,8 @@ emae_option_toggle(EMAccountEditorService *service, CamelURL *url, const char *t
static void
emae_option_entry_changed(GtkEntry *entry, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)entry, "option-name");
- const char *text = gtk_entry_get_text(entry);
+ const gchar *name = g_object_get_data((GObject *)entry, "option-name");
+ const gchar *text = gtk_entry_get_text(entry);
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
camel_url_set_param(url, name, text && text[0]?text:NULL);
@@ -1956,10 +1956,10 @@ emae_option_entry_changed(GtkEntry *entry, EMAccountEditorService *service)
}
static GtkWidget *
-emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *name, const char *def, GtkWidget *l)
+emae_option_entry(EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *def, GtkWidget *l)
{
GtkWidget *w;
- const char *val = camel_url_get_param(url, name);
+ const gchar *val = camel_url_get_param(url, name);
if (val == NULL) {
if (def) {
@@ -1974,7 +1974,7 @@ emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *na
"text", val,
NULL);
gtk_label_set_mnemonic_widget ((GtkLabel*)l, w);
- g_object_set_data((GObject *)w, "option-name", (void *)name);
+ g_object_set_data((GObject *)w, "option-name", (gpointer)name);
g_signal_connect(w, "changed", G_CALLBACK(emae_option_entry_changed), service);
gtk_widget_show(w);
@@ -1984,8 +1984,8 @@ emae_option_entry(EMAccountEditorService *service, CamelURL *url, const char *na
static void
emae_option_checkspin_changed(GtkSpinButton *spin, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)spin, "option-name");
- char value[16];
+ const gchar *name = g_object_get_data((GObject *)spin, "option-name");
+ gchar value[16];
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
sprintf(value, "%d", gtk_spin_button_get_value_as_int(spin));
@@ -1997,7 +1997,7 @@ emae_option_checkspin_changed(GtkSpinButton *spin, EMAccountEditorService *servi
static void
emae_option_checkspin_check_changed(GtkToggleButton *toggle, EMAccountEditorService *service)
{
- const char *name = g_object_get_data((GObject *)toggle, "option-name");
+ const gchar *name = g_object_get_data((GObject *)toggle, "option-name");
GtkSpinButton *spin = g_object_get_data((GObject *)toggle, "option-target");
if (gtk_toggle_button_get_active(toggle)) {
@@ -2015,14 +2015,14 @@ emae_option_checkspin_check_changed(GtkToggleButton *toggle, EMAccountEditorServ
/* this is a fugly api */
static GtkWidget *
-emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char *name, const char *fmt, const char *info)
+emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *fmt, const gchar *info)
{
GtkWidget *hbox, *check, *spin, *label = NULL;
double min, def, max;
- char *pre, *post;
- const char *val;
- char on;
- int enable;
+ gchar *pre, *post;
+ const gchar *val;
+ gchar on;
+ gint enable;
pre = g_alloca(strlen(fmt)+1);
strcpy(pre, fmt);
@@ -2054,9 +2054,9 @@ emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char
if (label)
gtk_box_pack_start((GtkBox *)hbox, label, FALSE, TRUE, 4);
- g_object_set_data((GObject *)spin, "option-name", (void *)name);
- g_object_set_data((GObject *)check, "option-name", (void *)name);
- g_object_set_data((GObject *)check, "option-target", (void *)spin);
+ g_object_set_data((GObject *)spin, "option-name", (gpointer)name);
+ g_object_set_data((GObject *)check, "option-name", (gpointer)name);
+ g_object_set_data((GObject *)check, "option-target", (gpointer)spin);
g_signal_connect(spin, "value_changed", G_CALLBACK(emae_option_checkspin_changed), service);
g_signal_connect(check, "toggled", G_CALLBACK(emae_option_checkspin_check_changed), service);
@@ -2069,10 +2069,10 @@ emae_option_checkspin(EMAccountEditorService *service, CamelURL *url, const char
static void
emae_option_options_changed (GtkComboBox *options, EMAccountEditorService *service)
{
- const char *name = g_object_get_data (G_OBJECT (options), "option-name");
- char *value = NULL;
+ const gchar *name = g_object_get_data (G_OBJECT (options), "option-name");
+ gchar *value = NULL;
CamelURL *url = emae_account_url (service->emae, emae_service_info[service->type].account_uri_key);
- int id = gtk_combo_box_get_active (options);
+ gint id = gtk_combo_box_get_active (options);
if (id != -1) {
GtkTreeModel *model;
@@ -2092,16 +2092,16 @@ emae_option_options_changed (GtkComboBox *options, EMAccountEditorService *servi
/* 'values' is in format "value0:caption0:value2:caption2:...valueN:captionN" */
static GtkWidget *
-emae_option_options (EMAccountEditorService *service, CamelURL *url, const char *name, const char *values, GtkWidget *l)
+emae_option_options (EMAccountEditorService *service, CamelURL *url, const gchar *name, const gchar *values, GtkWidget *l)
{
GtkComboBox *w;
GtkListStore *store;
GtkTreeIter iter;
- const char *p, *value, *caption;
+ const gchar *p, *value, *caption;
GtkCellRenderer *cell;
- int active = 0; /* the first item entered is always a default item */
- int i;
- const char *val = camel_url_get_param (url, name);
+ gint active = 0; /* the first item entered is always a default item */
+ gint i;
+ const gchar *val = camel_url_get_param (url, name);
w = GTK_COMBO_BOX (gtk_combo_box_new ());
@@ -2110,7 +2110,7 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const char
p = values;
for (p = values, i = 0; p; i++) {
- char *vl, *cp;
+ gchar *vl, *cp;
value = p;
caption = strchr (p, ':');
@@ -2150,18 +2150,18 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const char
gtk_label_set_mnemonic_widget (GTK_LABEL (l), GTK_WIDGET (w));
- g_object_set_data (G_OBJECT (w), "option-name", (void *)name);
+ g_object_set_data (G_OBJECT (w), "option-name", (gpointer)name);
g_signal_connect (w, "changed", G_CALLBACK (emae_option_options_changed), service);
return GTK_WIDGET (w);
}
static GtkWidget *
-emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
GtkWidget *w, *box, *spin;
- int row;
+ gint row;
if (emae->priv->source.provider == NULL
|| emae->priv->source.provider->extra_conf == NULL)
@@ -2194,7 +2194,7 @@ emae_receive_options_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *par
}
static GtkWidget *
-emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
struct _receive_options_item *item = (struct _receive_options_item *)eitem;
@@ -2203,7 +2203,7 @@ emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidg
GtkWidget *depw;
GSList *depl = NULL, *n;
EMAccountEditorService *service = &emae->priv->source;
- int row, i;
+ gint row, i;
GHashTable *extra;
CamelURL *url;
@@ -2306,7 +2306,7 @@ section:
}
if (depw && depl) {
- int act = gtk_toggle_button_get_active((GtkToggleButton *)depw);
+ gint act = gtk_toggle_button_get_active((GtkToggleButton *)depw);
g_object_set_data_full((GObject *)depw, "dependent-list", depl, (GDestroyNotify)g_slist_free);
for (n=depl;n;n=g_slist_next(n))
@@ -2328,17 +2328,17 @@ section:
}
static GtkWidget *
-emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/* no transport options page at all for these types of providers */
if (gui->source.provider && CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(gui->source.provider)) {
- memset(&gui->transport.frame, 0, ((char *)&gui->transport.check_dialog)-((char *)&gui->transport.frame));
+ memset(&gui->transport.frame, 0, ((gchar *)&gui->transport.check_dialog)-((gchar *)&gui->transport.frame));
return NULL;
}
@@ -2383,13 +2383,13 @@ emae_send_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct
}
static GtkWidget *
-emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -2441,7 +2441,7 @@ emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
}
static GtkWidget *
-emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
#if defined (HAVE_NSS)
@@ -2449,7 +2449,7 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
#endif
GtkWidget *w;
GladeXML *xml;
- char *gladefile;
+ gchar *gladefile;
/*if (old)
return old;*/
@@ -2505,10 +2505,10 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
}
static GtkWidget *
-emae_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
- int i;
+ gint i;
for (i=0;emae->priv->widgets[i];i++)
if (!strcmp(emae->priv->widgets_name[i], item->label))
@@ -2556,7 +2556,7 @@ static EMConfigItem emae_editor_items[] = {
static gboolean emae_editor_items_translated = FALSE;
static GtkWidget *
-emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMAccountEditor *emae = data;
EMAccountEditorPrivate *gui = emae->priv;
@@ -2566,7 +2566,7 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
GladeXML *druidxml;
GtkWidget *page;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-config.glade",
@@ -2586,11 +2586,11 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
}
static GtkWidget *
-emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
GladeXML *druidxml;
GtkWidget *w;
- char *gladefile;
+ gchar *gladefile;
EMAccountEditor *emae = (EMAccountEditor *)data;
if (emae->type == EMAE_PAGES)
@@ -2647,13 +2647,13 @@ static EMConfigItem emae_druid_items[] = {
static gboolean emae_druid_items_translated = FALSE;
static void
-emae_free(EConfig *ec, GSList *items, void *data)
+emae_free(EConfig *ec, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-emae_free_auto(EConfig *ec, GSList *items, void *data)
+emae_free_auto(EConfig *ec, GSList *items, gpointer data)
{
GSList *l, *n;
@@ -2674,8 +2674,8 @@ static gboolean
emae_service_complete(EMAccountEditor *emae, EMAccountEditorService *service)
{
CamelURL *url;
- int ok = TRUE;
- const char *uri;
+ gint ok = TRUE;
+ const gchar *uri;
if (service->provider == NULL)
return TRUE;
@@ -2728,9 +2728,9 @@ struct _server_prefill {
};
static int
-check_servers (char *server)
+check_servers (gchar *server)
{
- int len = G_N_ELEMENTS(mail_servers), i;
+ gint len = G_N_ELEMENTS(mail_servers), i;
for (i=0; i<len; i++) {
if (strstr(server, mail_servers[i].key) != NULL)
@@ -2741,11 +2741,11 @@ check_servers (char *server)
}
static gboolean
-emae_check_complete(EConfig *ec, const char *pageid, void *data)
+emae_check_complete(EConfig *ec, const gchar *pageid, gpointer data)
{
EMAccountEditor *emae = data;
- int ok = TRUE;
- const char *tmp;
+ gint ok = TRUE;
+ const gchar *tmp;
EAccount *ea;
gboolean refresh = FALSE;
@@ -2755,7 +2755,7 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
&& ((EConfig *)emae->priv->config)->type == E_CONFIG_DRUID) {
if (!strcmp(pageid, "00.identity")) {
if (!emae->priv->identity_set) {
- char *uname;
+ gchar *uname;
emae->priv->identity_set = 1;
#ifndef G_OS_WIN32
@@ -2770,13 +2770,13 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
} else if (!strcmp(pageid, "10.receive")) {
if (!emae->priv->receive_set) {
- char *user, *at;
- int index;
- char *uri = (char *)e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL);
+ gchar *user, *at;
+ gint index;
+ gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_SOURCE_URL);
CamelURL *url;
emae->priv->receive_set = 1;
- tmp = (char *)e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
+ tmp = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
at = strchr(tmp, '@');
user = g_alloca(at-tmp+1);
memcpy(user, tmp, at-tmp);
@@ -2806,9 +2806,9 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
} else if (!strcmp(pageid, "30.send")) {
CamelURL *url;
- char *at, *user;
- int index;
- char *uri = (char *)e_account_get_string(emae->account, E_ACCOUNT_TRANSPORT_URL);
+ gchar *at, *user;
+ gint index;
+ gchar *uri = (gchar *)e_account_get_string(emae->account, E_ACCOUNT_TRANSPORT_URL);
tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
at = strchr(tmp, '@');
@@ -2841,8 +2841,8 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
} else if (!strcmp(pageid, "40.management")) {
if (!emae->priv->management_set) {
- char *template;
- unsigned int i = 0, len;
+ gchar *template;
+ guint i = 0, len;
emae->priv->management_set = 1;
tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS);
@@ -2913,14 +2913,14 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
void
-em_account_editor_check (EMAccountEditor *emae, const char *page)
+em_account_editor_check (EMAccountEditor *emae, const gchar *page)
{
emae_check_complete((EConfig *)emae->config, page, emae);
}
/* HACK: FIXME: the component should listen to the account object directly */
static void
-add_new_store (char *uri, CamelStore *store, void *user_data)
+add_new_store (gchar *uri, CamelStore *store, gpointer user_data)
{
MailComponent *component = mail_component_peek ();
EAccount *account = user_data;
@@ -2932,7 +2932,7 @@ add_new_store (char *uri, CamelStore *store, void *user_data)
}
static void
-emae_commit(EConfig *ec, GSList *items, void *data)
+emae_commit(EConfig *ec, GSList *items, gpointer data)
{
EMAccountEditor *emae = data;
EAccountList *accounts = mail_config_get_accounts();
@@ -2981,7 +2981,7 @@ static void
em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account_editor_t type, const gchar *id)
{
EMAccountEditorPrivate *gui = emae->priv;
- int i, index;
+ gint i, index;
GSList *l;
GList *prov;
EMConfig *ec;
@@ -2992,7 +2992,7 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account
emae->type = type;
emae->original = account;
if (emae->original) {
- char *xml;
+ gchar *xml;
g_object_ref(emae->original);
xml = e_account_to_xml(emae->original);
@@ -3050,8 +3050,8 @@ em_account_editor_construct(EMAccountEditor *emae, EAccount *account, em_account
for (i=0;entries && entries[i].type != CAMEL_PROVIDER_CONF_END;i++) {
struct _receive_options_item *item;
- char *name = entries[i].name;
- int myindex = index;
+ gchar *name = entries[i].name;
+ gint myindex = index;
if (entries[i].type != CAMEL_PROVIDER_CONF_SECTION_START
|| name == NULL
diff --git a/mail/em-account-editor.h b/mail/em-account-editor.h
index e17236e865..4567f36cbe 100644
--- a/mail/em-account-editor.h
+++ b/mail/em-account-editor.h
@@ -66,10 +66,10 @@ struct _EMAccountEditorClass {
GType em_account_editor_get_type(void);
-EMAccountEditor *em_account_editor_new(struct _EAccount *account, em_account_editor_t type, const char *id);
-EMAccountEditor *em_account_editor_new_for_pages(struct _EAccount *account, em_account_editor_t type, char *id, struct _GtkWidget **pages);
+EMAccountEditor *em_account_editor_new(struct _EAccount *account, em_account_editor_t type, const gchar *id);
+EMAccountEditor *em_account_editor_new_for_pages(struct _EAccount *account, em_account_editor_t type, gchar *id, struct _GtkWidget **pages);
void em_account_editor_commit (EMAccountEditor *emae);
-void em_account_editor_check (EMAccountEditor *emae, const char *page);
+void em_account_editor_check (EMAccountEditor *emae, const gchar *page);
gboolean em_account_editor_save (EMAccountEditor *gui);
void em_account_editor_destroy (EMAccountEditor *gui);
@@ -79,7 +79,7 @@ gboolean em_account_editor_source_complete (EMAccountEditor *gui, struct _GtkWid
gboolean em_account_editor_transport_complete (EMAccountEditor *gui, struct _GtkWidget **incomplete);
gboolean em_account_editor_management_complete (EMAccountEditor *gui, struct _GtkWidget **incomplete);
-void em_account_editor_build_extra_conf (EMAccountEditor *gui, const char *url);
+void em_account_editor_build_extra_conf (EMAccountEditor *gui, const gchar *url);
void em_account_editor_auto_detect_extra_conf (EMAccountEditor *gui);
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
index d2303aa73b..f5a86fe9b0 100644
--- a/mail/em-account-prefs.c
+++ b/mail/em-account-prefs.c
@@ -220,7 +220,7 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
EAccountList *accounts;
GtkTreeModel *model;
GtkTreeIter iter;
- int ans;
+ gint ans;
gboolean has_proxies = FALSE;
selection = gtk_tree_view_get_selection (prefs->table);
@@ -235,7 +235,7 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
ans = e_error_run(PREFS_WINDOW(prefs), has_proxies?"mail:ask-delete-account-with-proxies":"mail:ask-delete-account",NULL);
if (ans == GTK_RESPONSE_YES) {
- int len;
+ gint len;
/* remove it from the folder-tree in the shell */
if (account->enabled && account->source && account->source->url)
@@ -309,7 +309,7 @@ account_able_changed(EAccount *account)
}
static void
-account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user_data)
+account_able_toggled (GtkCellRendererToggle *renderer, gchar *arg1, gpointer user_data)
{
EMAccountPrefs *prefs = user_data;
GtkTreeSelection *selection;
@@ -326,7 +326,7 @@ account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user
gtk_tree_model_get (model, &iter, 3, &account, -1);
if (mail_config_has_proxies (account)) {
- int ans;
+ gint ans;
ans = e_error_run(PREFS_WINDOW(prefs), "mail:ask-delete-proxy-accounts",NULL);
@@ -363,8 +363,8 @@ account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs)
EAccount *account = NULL;
GtkTreeModel *model;
GtkTreeIter iter;
- const char *url = NULL;
- int state;
+ const gchar *url = NULL;
+ gint state;
EAccount *default_account;
default_account = mail_config_get_default_account ();
@@ -400,9 +400,9 @@ mail_accounts_load (EMAccountPrefs *prefs)
EAccountList *accounts;
GtkListStore *model;
GtkTreeIter iter;
- char *name, *val;
+ gchar *name, *val;
EIterator *node;
- int row = 0;
+ gint row = 0;
GtkTreeSelection *selection;
model = (GtkListStore *) gtk_tree_view_get_model (prefs->table);
@@ -435,7 +435,7 @@ mail_accounts_load (EMAccountPrefs *prefs)
gtk_list_store_set (model, &iter,
0, account->enabled,
1, val,
- 2, url && url->protocol ? url->protocol : (char *) _("None"),
+ 2, url && url->protocol ? url->protocol : (gchar *) _("None"),
3, account,
-1);
g_free (name);
@@ -457,11 +457,11 @@ mail_accounts_load (EMAccountPrefs *prefs)
-GtkWidget *em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2,
- int int1, int int2);
+GtkWidget *em_account_prefs_treeview_new (gchar *widget_name, gchar *string1, gchar *string2,
+ gint int1, gint int2);
GtkWidget *
-em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_prefs_treeview_new (gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
GtkWidget *table, *scrolled;
GtkTreeSelection *selection;
@@ -515,7 +515,7 @@ em_account_prefs_construct (EMAccountPrefs *prefs)
GtkWidget *toplevel, *widget;
GtkCellRenderer *renderer;
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-config.glade",
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c
index 8c704a2827..6c01dffa08 100644
--- a/mail/em-composer-prefs.c
+++ b/mail/em-composer-prefs.c
@@ -178,7 +178,7 @@ sig_load_preview (EMComposerPrefs *prefs,
gtk_html_load_from_string (html, str, strlen (str));
} else {
GtkHTMLStream *stream;
- int len;
+ gint len;
len = strlen (str);
stream = gtk_html_begin_content (html, "text/html; charset=utf-8");
@@ -376,12 +376,12 @@ sig_add_cb (GtkWidget *widget, EMComposerPrefs *prefs)
}
static void
-sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs)
+sig_add_script_response (GtkWidget *widget, gint button, EMComposerPrefs *prefs)
{
gchar *script, **argv = NULL;
GtkWidget *entry;
const gchar *name;
- int argc;
+ gint argc;
if (button == GTK_RESPONSE_ACCEPT) {
entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script");
@@ -821,12 +821,12 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
GConfBridge *bridge;
GConfClient *client;
const gchar *key;
- int style;
+ gint style;
gchar *buf;
EMConfig *ec;
EMConfigTargetPrefs *target;
GSList *l;
- int i;
+ gint i;
gchar *gladefile;
gboolean sensitive;
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 4ed3e70b8f..e8abdd30b3 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -73,14 +73,14 @@
static EAccount * guess_account (CamelMimeMessage *message, CamelFolder *folder);
struct emcs_t {
- unsigned int ref_count;
+ guint ref_count;
CamelFolder *drafts_folder;
- char *drafts_uid;
+ gchar *drafts_uid;
CamelFolder *folder;
guint32 flags, set;
- char *uid;
+ gchar *uid;
};
static struct emcs_t *
@@ -138,12 +138,12 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip
{
gboolean res;
GString *str;
- int i;
+ gint i;
str = g_string_new("");
for (i = 0; recipients[i] != NULL; ++i) {
if (!e_destination_get_html_mail_pref (recipients[i])) {
- const char *name;
+ const gchar *name;
name = e_destination_get_textrep (recipients[i], FALSE);
@@ -190,7 +190,7 @@ struct _send_data {
static void
composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info,
- int queued, const char *appended_uid, void *data)
+ gint queued, const gchar *appended_uid, gpointer data)
{
struct emcs_t *emcs;
struct _send_data *send = data;
@@ -257,12 +257,12 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
EDestination **recipients, **recipients_bcc;
gboolean html_mode, send_html, confirm_html;
CamelInternetAddress *cia;
- int hidden = 0, shown = 0;
- int num = 0, num_bcc = 0, num_post = 0;
- const char *subject;
+ gint hidden = 0, shown = 0;
+ gint num = 0, num_bcc = 0, num_post = 0;
+ const gchar *subject;
GConfClient *gconf;
EAccount *account;
- int i;
+ gint i;
GList *postlist;
EMEvent *eme;
EMEventTargetComposer *target;
@@ -283,7 +283,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
/* see which ones are visible/present, etc */
if (recipients) {
for (i = 0; recipients[i] != NULL; i++) {
- const char *addr = e_destination_get_address (recipients[i]);
+ const gchar *addr = e_destination_get_address (recipients[i]);
if (addr && addr[0]) {
camel_address_decode ((CamelAddress *) cia, addr);
@@ -304,7 +304,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
recipients_bcc = e_composer_header_table_get_destinations_bcc (table);
if (recipients_bcc) {
for (i = 0; recipients_bcc[i] != NULL; i++) {
- const char *addr = e_destination_get_address (recipients_bcc[i]);
+ const gchar *addr = e_destination_get_address (recipients_bcc[i]);
if (addr && addr[0]) {
camel_address_decode ((CamelAddress *) cia, addr);
@@ -400,9 +400,9 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Transport", account->transport->url);
camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", account->sent_folder_uri);
if (account->id->organization && *account->id->organization) {
- char *org;
+ gchar *org;
- org = camel_header_encode_string ((const unsigned char *)account->id->organization);
+ org = camel_header_encode_string ((const guchar *)account->id->organization);
camel_medium_set_header (CAMEL_MEDIUM (message), "Organization", org);
g_free (org);
}
@@ -484,8 +484,8 @@ composer_set_no_change (EMsgComposer *composer, gboolean drop_undo, gboolean edi
}
static void
-save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
- const char *appended_uid, void *user_data)
+save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok,
+ const gchar *appended_uid, gpointer user_data)
{
struct _save_draft_info *sdi = user_data;
struct emcs_t *emcs;
@@ -547,7 +547,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
}
static void
-save_draft_folder (char *uri, CamelFolder *folder, gpointer data)
+save_draft_folder (gchar *uri, CamelFolder *folder, gpointer data)
{
CamelFolder **save = data;
@@ -560,7 +560,7 @@ save_draft_folder (char *uri, CamelFolder *folder, gpointer data)
void
em_utils_composer_save_draft_cb (EMsgComposer *composer, gpointer user_data)
{
- const char *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
+ const gchar *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
CamelFolder *drafts_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
EComposerHeaderTable *table;
struct _save_draft_info *sdi;
@@ -586,7 +586,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, gpointer user_data)
if (account && account->drafts_folder_uri &&
strcmp (account->drafts_folder_uri, default_drafts_folder_uri) != 0) {
- int id;
+ gint id;
id = mail_get_folder (account->drafts_folder_uri, 0, save_draft_folder, &folder, mail_msg_unordered_push);
mail_msg_wait (id);
@@ -620,11 +620,11 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, gpointer user_data)
void
em_composer_utils_setup_callbacks (EMsgComposer *composer,
CamelFolder *folder,
- const char *uid,
+ const gchar *uid,
guint32 flags,
guint32 set,
CamelFolder *drafts,
- const char *drafts_uid)
+ const gchar *drafts_uid)
{
struct emcs_t *emcs;
@@ -653,7 +653,7 @@ em_composer_utils_setup_callbacks (EMsgComposer *composer,
/* Composing messages... */
static EMsgComposer *
-create_new_composer (const char *subject, const char *fromuri, gboolean use_default_callbacks, gboolean lite)
+create_new_composer (const gchar *subject, const gchar *fromuri, gboolean use_default_callbacks, gboolean lite)
{
EMsgComposer *composer;
EComposerHeaderTable *table;
@@ -691,7 +691,7 @@ create_new_composer (const char *subject, const char *fromuri, gboolean use_defa
* window.
**/
void
-em_utils_compose_new_message (const char *fromuri)
+em_utils_compose_new_message (const gchar *fromuri)
{
GtkWidget *composer;
@@ -711,7 +711,7 @@ em_utils_compose_new_message (const char *fromuri)
* window.
**/
struct _EMsgComposer *
-em_utils_compose_lite_new_message (const char *fromuri)
+em_utils_compose_lite_new_message (const gchar *fromuri)
{
GtkWidget *composer;
@@ -733,7 +733,7 @@ em_utils_compose_lite_new_message (const char *fromuri)
* according to the values in the mailto url.
**/
void
-em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri)
+em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri)
{
EMsgComposer *composer;
EComposerHeaderTable *table;
@@ -760,7 +760,7 @@ em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri)
/* Editing messages... */
static void
-edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
+edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
{
EMsgComposer *composer;
@@ -775,11 +775,11 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
CamelMultipart *body = camel_multipart_new ();
CamelStream *stream;
CamelMimePart *part;
- int count1 = 0, string_changed = 0;
- const char *cur;
- int i;
+ gint count1 = 0, string_changed = 0;
+ const gchar *cur;
+ gint i;
- char *str;
+ gchar *str;
gint count = 2;
content = camel_medium_get_content_object ((CamelMedium *) message);
@@ -806,17 +806,17 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
mem = camel_stream_mem_new ();
camel_data_wrapper_decode_to_stream (content, mem);
- str = g_strndup ((const gchar*)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
+ str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
camel_object_unref (mem);
cur = str;
for (i = 0; i < strlen(str); i++) {
if (!g_ascii_strncasecmp (cur, "$", 1)) {
- const char *end = cur, *check_env;
- char *out;
+ const gchar *end = cur, *check_env;
+ gchar *out;
GConfClient *gconf;
GSList *clue_list = NULL, *list;
- char **temp_str;
+ gchar **temp_str;
gconf = gconf_client_get_default ();
@@ -834,7 +834,7 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
g_object_unref (gconf);
for (list = clue_list; list; list = g_slist_next (list)) {
- char **temp = g_strsplit (list->data, "=", 2);
+ gchar **temp = g_strsplit (list->data, "=", 2);
if (!g_ascii_strcasecmp(temp[0], out+1)) {
str = g_strdup_printf("%s%s%s", temp_str[0], temp[1], temp_str[1]);
cur = str + i;
@@ -929,10 +929,10 @@ em_utils_edit_message (CamelMimeMessage *message, CamelFolder *folder)
}
static void
-edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user_data)
+edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer user_data)
{
gboolean replace = GPOINTER_TO_INT (user_data);
- int i;
+ gint i;
if (msgs == NULL)
return;
@@ -969,7 +969,7 @@ struct forward_attached_data
{
CamelFolder *folder;
GPtrArray *uids;
- char *fromuri;
+ gchar *fromuri;
};
static void
@@ -1021,7 +1021,7 @@ setup_forward_attached_callbacks (EMsgComposer *composer, CamelFolder *folder, G
}
static void
-forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, CamelMimePart *part, char *subject, const char *fromuri)
+forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, CamelMimePart *part, gchar *subject, const gchar *fromuri)
{
EMsgComposer *composer;
@@ -1041,7 +1041,7 @@ forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, Cam
}
static void
-forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *user_data)
+forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer user_data)
{
struct forward_attached_data *fad = (struct forward_attached_data *) user_data;
@@ -1065,7 +1065,7 @@ forward_attached_cb (CamelFolder *folder, GPtrArray *messages, CamelMimePart *pa
* forwarded as a simple message/rfc822 attachment.
**/
void
-em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
struct forward_attached_data *fad;
@@ -1080,12 +1080,12 @@ em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const char *fro
}
static void
-forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, int style, const char *fromuri)
+forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gint style, const gchar *fromuri)
{
CamelMimeMessage *message;
EMsgComposer *composer;
- char *subject, *text;
- int i;
+ gchar *subject, *text;
+ gint i;
guint32 flags;
if (messages->len == 0)
@@ -1127,9 +1127,9 @@ forward_non_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
}
static void
-forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data)
+forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer user_data)
{
- forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_INLINE, (char *)user_data);
+ forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_INLINE, (gchar *)user_data);
g_free(user_data);
}
@@ -1142,7 +1142,7 @@ forward_inline (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void
* Forwards each message in the 'inline' form, each in its own composer window.
**/
void
-em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
@@ -1151,9 +1151,9 @@ em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const char *fromu
}
static void
-forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *user_data)
+forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer user_data)
{
- forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_QUOTED, (char *)user_data);
+ forward_non_attached (folder, uids, messages, MAIL_CONFIG_FORWARD_QUOTED, (gchar *)user_data);
g_free(user_data);
}
@@ -1167,7 +1167,7 @@ forward_quoted (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void
* a "> "), each in its own composer window.
**/
void
-em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
@@ -1184,13 +1184,13 @@ em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const char *fromu
* Forwards a message in the user's configured default style.
**/
void
-em_utils_forward_message (CamelMimeMessage *message, const char *fromuri)
+em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri)
{
GPtrArray *messages;
CamelMimePart *part;
GConfClient *gconf;
- char *subject;
- int mode;
+ gchar *subject;
+ gint mode;
messages = g_ptr_array_new ();
g_ptr_array_add (messages, message);
@@ -1229,10 +1229,10 @@ em_utils_forward_message (CamelMimeMessage *message, const char *fromuri)
* style.
**/
void
-em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids, const char *fromuri)
+em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri)
{
GConfClient *gconf;
- int mode;
+ gint mode;
gconf = mail_config_get_gconf_client ();
mode = gconf_client_get_int (gconf, "/apps/evolution/mail/format/forward_style", NULL);
@@ -1296,7 +1296,7 @@ em_utils_redirect_message (CamelMimeMessage *message)
}
static void
-redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
+redirect_msg (CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data)
{
if (message == NULL)
return;
@@ -1313,7 +1313,7 @@ redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, v
* be editable). Adds Resent-From/Resent-To/etc headers.
**/
void
-em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid)
+em_utils_redirect_message_by_uid (CamelFolder *folder, const gchar *uid)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uid != NULL);
@@ -1322,7 +1322,7 @@ em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid)
}
static void
-emu_handle_receipt_message(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *ex)
+emu_handle_receipt_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *ex)
{
if (msg)
em_utils_handle_receipt(folder, uid, msg);
@@ -1333,10 +1333,10 @@ emu_handle_receipt_message(CamelFolder *folder, const char *uid, CamelMimeMessag
/* Message disposition notifications, rfc 2298 */
void
-em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage *msg)
+em_utils_handle_receipt (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg)
{
EAccount *account;
- const char *addr;
+ const gchar *addr;
CamelMessageInfo *info;
info = camel_folder_get_message_info(folder, uid);
@@ -1379,7 +1379,7 @@ em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage
static void
em_utils_receipt_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info,
- int queued, const char *appended_uid, void *data)
+ gint queued, const gchar *appended_uid, gpointer data)
{
camel_message_info_free (info);
mail_send ();
@@ -1400,14 +1400,14 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
CamelStream *stream;
CamelFolder *out_folder;
CamelMessageInfo *info;
- const char *message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-ID");
- const char *message_date = camel_medium_get_header (CAMEL_MEDIUM (message), "Date");
- const char *message_subject = camel_mime_message_get_subject (message);
- const char *receipt_address = camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To");
- char *fake_msgid;
- char *hostname;
- char *self_address, *receipt_subject;
- char *ua, *recipient;
+ const gchar *message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-ID");
+ const gchar *message_date = camel_medium_get_header (CAMEL_MEDIUM (message), "Date");
+ const gchar *message_subject = camel_mime_message_get_subject (message);
+ const gchar *receipt_address = camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To");
+ gchar *fake_msgid;
+ gchar *hostname;
+ gchar *self_address, *receipt_subject;
+ gchar *ua, *recipient;
if (!receipt_address)
return;
@@ -1521,7 +1521,7 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
static void
emu_forward_raw_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info,
- int queued, const char *appended_uid, void *data)
+ gint queued, const gchar *appended_uid, gpointer data)
{
camel_message_info_free (info);
/* do not call mail send, just pile them all in the outbox */
@@ -1537,7 +1537,7 @@ emu_forward_raw_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageIn
* Forwards message to the address, in very similar way as redirect does.
**/
void
-em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex)
+em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex)
{
EAccount *account;
CamelMimeMessage *forward;
@@ -1546,7 +1546,7 @@ em_utils_forward_message_raw (CamelFolder *folder, CamelMimeMessage *message, co
CamelFolder *out_folder;
CamelMessageInfo *info;
struct _camel_header_raw *xev;
- char *subject;
+ gchar *subject;
g_return_if_fail (folder != NULL);
g_return_if_fail (message != NULL);
@@ -1650,7 +1650,7 @@ generate_account_hash (void)
}
if (!acnt)
- g_hash_table_insert (account_hash, (char *) account->id->address, (void *) account);
+ g_hash_table_insert (account_hash, (gchar *) account->id->address, (gpointer) account);
}
e_iterator_next (iter);
@@ -1660,7 +1660,7 @@ generate_account_hash (void)
/* The default account has to be there if none of the enabled accounts are present */
if (g_hash_table_size (account_hash) == 0 && def && def->id->address)
- g_hash_table_insert (account_hash, (char *) def->id->address, (void *) def);
+ g_hash_table_insert (account_hash, (gchar *) def->id->address, (gpointer) def);
return account_hash;
}
@@ -1669,7 +1669,7 @@ EDestination **
em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
{
EDestination *dest, **destv;
- int n, i, j;
+ gint n, i, j;
if (iaddr == NULL)
return NULL;
@@ -1679,7 +1679,7 @@ em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
destv = g_malloc (sizeof (EDestination *) * (n + 1));
for (i = 0, j = 0; i < n; i++) {
- const char *name, *addr;
+ const gchar *name, *addr;
if (camel_internet_address_get (iaddr, i, &name, &addr)) {
dest = e_destination_new ();
@@ -1705,11 +1705,11 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
CamelInternetAddress *to, CamelInternetAddress *cc,
CamelFolder *folder, CamelNNTPAddress *postto)
{
- const char *message_id, *references;
+ const gchar *message_id, *references;
EDestination **tov, **ccv;
EMsgComposer *composer;
EComposerHeaderTable *table;
- char *subject;
+ gchar *subject;
g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
g_return_val_if_fail (to == NULL || CAMEL_IS_INTERNET_ADDRESS (to), NULL);
@@ -1722,7 +1722,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
ccv = em_utils_camel_address_to_destination (cc);
/* Set the subject of the new message. */
- if ((subject = (char *) camel_mime_message_get_subject (message))) {
+ if ((subject = (gchar *) camel_mime_message_get_subject (message))) {
if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0)
subject = g_strdup_printf ("Re: %s", subject);
else
@@ -1744,8 +1744,8 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
/* add post-to, if nessecary */
if (postto && camel_address_length((CamelAddress *)postto)) {
- char *store_url = NULL;
- char *post;
+ gchar *store_url = NULL;
+ gchar *post;
if (folder) {
store_url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
@@ -1764,7 +1764,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id");
references = camel_medium_get_header (CAMEL_MEDIUM (message), "References");
if (message_id) {
- char *reply_refs;
+ gchar *reply_refs;
e_msg_composer_add_header (composer, "In-Reply-To", message_id);
@@ -1786,7 +1786,7 @@ static EAccount *
guess_account_folder(CamelFolder *folder)
{
EAccount *account;
- char *tmp;
+ gchar *tmp;
tmp = camel_url_to_string(CAMEL_SERVICE(folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
account = mail_config_get_account_by_source_url(tmp);
@@ -1800,8 +1800,8 @@ guess_account (CamelMimeMessage *message, CamelFolder *folder)
{
GHashTable *account_hash = NULL;
EAccount *account = NULL;
- const char *tmp;
- int i, j;
+ const gchar *tmp;
+ gint i, j;
const gchar *types[2] = {
CAMEL_RECIPIENT_TYPE_TO,
CAMEL_RECIPIENT_TYPE_CC
@@ -1851,8 +1851,8 @@ static void
get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTPAddress *postto)
{
const CamelInternetAddress *reply_to;
- const char *name, *addr, *posthdr;
- int i;
+ const gchar *name, *addr, *posthdr;
+ gint i;
/* check whether there is a 'Newsgroups: ' header in there */
if (postto
@@ -1881,8 +1881,8 @@ em_utils_get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to,
static gboolean
get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to)
{
- const char *header, *p;
- char *addr;
+ const gchar *header, *p;
+ gchar *addr;
/* Examples:
*
@@ -1921,13 +1921,13 @@ get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to)
static void
concat_unique_addrs (CamelInternetAddress *dest, const CamelInternetAddress *src, GHashTable *rcpt_hash)
{
- const char *name, *addr;
- int i;
+ const gchar *name, *addr;
+ gint i;
for (i = 0; camel_internet_address_get (src, i, &name, &addr); i++) {
if (!g_hash_table_lookup (rcpt_hash, addr)) {
camel_internet_address_add (dest, name, addr);
- g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
+ g_hash_table_insert (rcpt_hash, (gchar *) addr, GINT_TO_POINTER (1));
}
}
}
@@ -1936,9 +1936,9 @@ static void
get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInternetAddress *cc, CamelNNTPAddress *postto)
{
const CamelInternetAddress *reply_to, *to_addrs, *cc_addrs;
- const char *name, *addr, *posthdr;
+ const gchar *name, *addr, *posthdr;
GHashTable *rcpt_hash;
- int i;
+ gint i;
/* check whether there is a 'Newsgroups: ' header in there */
if (postto) {
@@ -1966,7 +1966,7 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
is kinda silly. */
camel_internet_address_add (to, name, addr);
- g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
+ g_hash_table_insert (rcpt_hash, (gchar *) addr, GINT_TO_POINTER (1));
}
}
}
@@ -2015,13 +2015,13 @@ enum {
ATTRIB_TM_YDAY
};
-typedef void (* AttribFormatter) (GString *str, const char *attr, CamelMimeMessage *message);
+typedef void (* AttribFormatter) (GString *str, const gchar *attr, CamelMimeMessage *message);
static void
-format_sender (GString *str, const char *attr, CamelMimeMessage *message)
+format_sender (GString *str, const gchar *attr, CamelMimeMessage *message)
{
const CamelInternetAddress *sender;
- const char *name, *addr;
+ const gchar *name, *addr;
sender = camel_mime_message_get_from (message);
if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
@@ -2042,10 +2042,10 @@ format_sender (GString *str, const char *attr, CamelMimeMessage *message)
}
static struct {
- const char *name;
- int type;
+ const gchar *name;
+ gint type;
struct {
- const char *format; /* strftime or printf format */
+ const gchar *format; /* strftime or printf format */
AttribFormatter formatter; /* custom formatter */
} v;
} attribvars[] = {
@@ -2076,17 +2076,17 @@ static struct {
* variables, see em-composer-utils.c:1514 */
#define ATTRIBUTION _("On ${AbbrevWeekdayName}, ${Year}-${Month}-${Day} at ${24Hour}:${Minute} ${TimeZone}, ${Sender} wrote:")
-static char *
-attribution_format (const char *format, CamelMimeMessage *message)
+static gchar *
+attribution_format (const gchar *format, CamelMimeMessage *message)
{
- register const char *inptr;
- const char *start;
- int tzone, len, i;
- char buf[64], *s;
+ register const gchar *inptr;
+ const gchar *start;
+ gint tzone, len, i;
+ gchar buf[64], *s;
GString *str;
struct tm tm;
time_t date;
- int type;
+ gint type;
str = g_string_new ("");
@@ -2197,7 +2197,7 @@ attribution_format (const char *format, CamelMimeMessage *message)
static void
composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *source)
{
- char *text, *credits;
+ gchar *text, *credits;
CamelMimePart *part;
GConfClient *gconf;
ssize_t len = 0;
@@ -2252,13 +2252,13 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *
struct _reply_data {
EMFormat *source;
- int mode;
+ gint mode;
};
-char *
+gchar *
em_utils_construct_composer_text (CamelMimeMessage *message, EMFormat *source)
{
- char *text, *credits;
+ gchar *text, *credits;
ssize_t len = 0;
gboolean start_bottom = 0;
@@ -2271,7 +2271,7 @@ em_utils_construct_composer_text (CamelMimeMessage *message, EMFormat *source)
static void
-reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *user_data)
+reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gpointer user_data)
{
struct _reply_data *rd = user_data;
@@ -2301,7 +2301,7 @@ reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message
* been replied to.
**/
struct _EMsgComposer *
-em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage *message, int mode, EMFormat *source)
+em_utils_reply_to_message(CamelFolder *folder, const gchar *uid, CamelMimeMessage *message, gint mode, EMFormat *source)
{
CamelInternetAddress *to, *cc;
CamelNNTPAddress *postto = NULL;
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 60944cb840..2f78f2769f 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -41,36 +41,36 @@ struct _EMFormat;
struct _EAccount;
struct _EDestination;
-void em_composer_utils_setup_callbacks (struct _EMsgComposer *composer, struct _CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set, struct _CamelFolder *drafts, const char *drafts_uid);
+void em_composer_utils_setup_callbacks (struct _EMsgComposer *composer, struct _CamelFolder *folder, const gchar *uid,
+ guint32 flags, guint32 set, struct _CamelFolder *drafts, const gchar *drafts_uid);
#define em_composer_utils_setup_default_callbacks(composer) em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, NULL, NULL)
void em_utils_composer_send_cb(struct _EMsgComposer *composer, gpointer user_data);
void em_utils_composer_save_draft_cb(struct _EMsgComposer *composer, gpointer user_data);
-void em_utils_compose_new_message (const char *fromuri);
-struct _EMsgComposer * em_utils_compose_lite_new_message (const char *fromuri);
+void em_utils_compose_new_message (const gchar *fromuri);
+struct _EMsgComposer * em_utils_compose_lite_new_message (const gchar *fromuri);
/* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */
-void em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri);
+void em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri);
void em_utils_edit_message (struct _CamelMimeMessage *message, struct _CamelFolder *folder);
void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids, gboolean replace);
-void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
-void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
-void em_utils_forward_quoted (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
+void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
+void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
+void em_utils_forward_quoted (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
-void em_utils_forward_message (struct _CamelMimeMessage *msg, const char *fromuri);
-void em_utils_forward_messages (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
+void em_utils_forward_message (struct _CamelMimeMessage *msg, const gchar *fromuri);
+void em_utils_forward_messages (struct _CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);
void em_utils_redirect_message (struct _CamelMimeMessage *message);
-void em_utils_redirect_message_by_uid (struct _CamelFolder *folder, const char *uid);
+void em_utils_redirect_message_by_uid (struct _CamelFolder *folder, const gchar *uid);
-void em_utils_forward_message_raw (struct _CamelFolder *folder, struct _CamelMimeMessage *message, const char *address, struct _CamelException *ex);
+void em_utils_forward_message_raw (struct _CamelFolder *folder, struct _CamelMimeMessage *message, const gchar *address, struct _CamelException *ex);
-void em_utils_handle_receipt (struct _CamelFolder *folder, const char *uid, struct _CamelMimeMessage *msg);
+void em_utils_handle_receipt (struct _CamelFolder *folder, const gchar *uid, struct _CamelMimeMessage *msg);
void em_utils_send_receipt (struct _CamelFolder *folder, struct _CamelMimeMessage *message);
enum {
@@ -79,10 +79,10 @@ enum {
REPLY_MODE_LIST
};
-char *em_utils_construct_composer_text (struct _CamelMimeMessage *message, struct _EMFormat *source);
+gchar *em_utils_construct_composer_text (struct _CamelMimeMessage *message, struct _EMFormat *source);
void em_utils_get_reply_sender (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelNNTPAddress *postto);
void em_utils_get_reply_all (struct _CamelMimeMessage *message, struct _CamelInternetAddress *to, struct _CamelInternetAddress *cc, struct _CamelNNTPAddress *postto);
-struct _EMsgComposer * em_utils_reply_to_message (struct _CamelFolder *, const char *uid, struct _CamelMimeMessage *message, int mode, struct _EMFormat *source);
+struct _EMsgComposer * em_utils_reply_to_message (struct _CamelFolder *, const gchar *uid, struct _CamelMimeMessage *message, gint mode, struct _EMFormat *source);
struct _EDestination ** em_utils_camel_address_to_destination (struct _CamelInternetAddress *iaddr);
#ifdef __cplusplus
diff --git a/mail/em-config.c b/mail/em-config.c
index 160cec851e..985a02d56c 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -124,7 +124,7 @@ emp_target_free(EConfig *ep, EConfigTarget *t)
}
static void
-emp_account_changed(struct _EAccount *ea, int id, EMConfig *emc)
+emp_account_changed(struct _EAccount *ea, gint id, EMConfig *emc)
{
e_config_target_changed((EConfig *)emc, E_CONFIG_TARGET_CHANGED_STATE);
}
@@ -180,7 +180,7 @@ em_config_get_type(void)
return type;
}
-EMConfig *em_config_new(int type, const char *menuid)
+EMConfig *em_config_new(gint type, const gchar *menuid)
{
EMConfig *emp = g_object_new(em_config_get_type(), NULL);
@@ -190,7 +190,7 @@ EMConfig *em_config_new(int type, const char *menuid)
}
EMConfigTargetFolder *
-em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const char *uri)
+em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const gchar *uri)
{
EMConfigTargetFolder *t = e_config_target_new(&emp->config, EM_CONFIG_TARGET_FOLDER, sizeof(*t));
@@ -253,7 +253,7 @@ em_config_target_new_account(EMConfig *emp, struct _EAccount *account)
*/
-static void *emph_parent_class;
+static gpointer emph_parent_class;
#define emph ((EMConfigHook *)eph)
static const EConfigHookTargetMask emph_no_masks[] = {
@@ -278,7 +278,7 @@ emph_finalise(GObject *o)
static void
emph_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emph_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.config:1.0";
diff --git a/mail/em-config.h b/mail/em-config.h
index 5f895305b0..4ebfa05ad1 100644
--- a/mail/em-config.h
+++ b/mail/em-config.h
@@ -53,7 +53,7 @@ struct _EMConfigTargetFolder {
EConfigTarget target;
struct _CamelFolder *folder;
- char *uri;
+ gchar *uri;
};
struct _EMConfigTargetPrefs {
@@ -86,9 +86,9 @@ struct _EMConfigClass {
GType em_config_get_type(void);
-EMConfig *em_config_new(int type, const char *menuid);
+EMConfig *em_config_new(gint type, const gchar *menuid);
-EMConfigTargetFolder *em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const char *uri);
+EMConfigTargetFolder *em_config_target_new_folder(EMConfig *emp, struct _CamelFolder *folder, const gchar *uri);
EMConfigTargetPrefs *em_config_target_new_prefs(EMConfig *emp, struct _GConfClient *gconf);
EMConfigTargetAccount *em_config_target_new_account(EMConfig *emp, struct _EAccount *account);
diff --git a/mail/em-event.c b/mail/em-event.c
index b415d5f8a0..852e319e1b 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -135,7 +135,7 @@ EMEvent *em_event_peek(void)
}
EMEventTargetFolder *
-em_event_target_new_folder (EMEvent *eme, const char *uri, unsigned int new)
+em_event_target_new_folder (EMEvent *eme, const gchar *uri, guint new)
{
EMEventTargetFolder *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_FOLDER, sizeof(*t));
guint32 flags = new ? EM_EVENT_FOLDER_NEWMAIL : 0;
@@ -169,7 +169,7 @@ em_event_target_new_composer (EMEvent *eme, const EMsgComposer *composer, guint3
}
EMEventTargetMessage *
-em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const char *uid, guint32 flags)
+em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage *message, const gchar *uid, guint32 flags)
{
EMEventTargetMessage *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_MESSAGE, sizeof(*t));
@@ -186,7 +186,7 @@ em_event_target_new_message(EMEvent *eme, CamelFolder *folder, CamelMimeMessage
}
EMEventTargetSendReceive *
-em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, int row, guint32 flags)
+em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data, gint row, guint32 flags)
{
EMEventTargetSendReceive *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_SEND_RECEIVE, sizeof(*t));
@@ -199,7 +199,7 @@ em_event_target_new_send_receive(EMEvent *eme, GtkWidget *table, gpointer data,
}
EMEventTargetCustomIcon *
-em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const char *folder_name, guint32 flags)
+em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *folder_name, guint32 flags)
{
EMEventTargetCustomIcon *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_CUSTOM_ICON, sizeof(*t));
@@ -212,7 +212,7 @@ em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const c
/* ********************************************************************** */
-static void *emeh_parent_class;
+static gpointer emeh_parent_class;
#define emeh ((EMEventHook *)eph)
static const EEventHookTargetMask emeh_folder_masks[] = {
@@ -266,7 +266,7 @@ emeh_finalise(GObject *o)
static void
emeh_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emeh_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.events:1.0";
diff --git a/mail/em-event.h b/mail/em-event.h
index 7c2c4c639d..81173fe690 100644
--- a/mail/em-event.h
+++ b/mail/em-event.h
@@ -86,10 +86,10 @@ typedef struct _EMEventTargetFolder EMEventTargetFolder;
struct _EMEventTargetFolder {
EEventTarget target;
- char *uri;
+ gchar *uri;
guint new;
gboolean is_inbox;
- char *name;
+ gchar *name;
};
typedef struct _EMEventTargetMessage EMEventTargetMessage;
@@ -97,7 +97,7 @@ typedef struct _EMEventTargetMessage EMEventTargetMessage;
struct _EMEventTargetMessage {
EEventTarget target;
struct _CamelFolder *folder;
- char *uid;
+ gchar *uid;
struct _CamelMimeMessage *message;
};
@@ -125,7 +125,7 @@ struct _EMEventTargetSendReceive {
struct _GtkWidget *table;
gpointer data;
- int row;
+ gint row;
};
typedef struct _EMEventTargetCustomIcon EMEventTargetCustomIcon;
@@ -134,7 +134,7 @@ struct _EMEventTargetCustomIcon {
EEventTarget target;
GtkCellRenderer *renderer;
- const char *folder_name;
+ const gchar *folder_name;
};
typedef struct _EEventItem EMEventItem;
@@ -154,12 +154,12 @@ GType em_event_get_type(void);
EMEvent *em_event_peek(void);
-EMEventTargetFolder *em_event_target_new_folder(EMEvent *emp, const char *uri, guint32 flags);
+EMEventTargetFolder *em_event_target_new_folder(EMEvent *emp, const gchar *uri, guint32 flags);
EMEventTargetFolderBrowser *em_event_target_new_folder_browser (EMEvent *eme, EMFolderBrowser *emfb);
EMEventTargetComposer *em_event_target_new_composer(EMEvent *emp, const struct _EMsgComposer *composer, guint32 flags);
-EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, struct _CamelFolder *folder, struct _CamelMimeMessage *message, const char *uid, guint32 flags);
-EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, struct _GtkWidget *table, gpointer data, int row, guint32 flags);
-EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const char *uri, guint32 flags);
+EMEventTargetMessage *em_event_target_new_message(EMEvent *emp, struct _CamelFolder *folder, struct _CamelMimeMessage *message, const gchar *uid, guint32 flags);
+EMEventTargetSendReceive * em_event_target_new_send_receive(EMEvent *eme, struct _GtkWidget *table, gpointer data, gint row, guint32 flags);
+EMEventTargetCustomIcon * em_event_target_new_custom_icon(EMEvent *eme, GtkCellRenderer *renderer, const gchar *uri, guint32 flags);
/* ********************************************************************** */
diff --git a/mail/em-filter-context.c b/mail/em-filter-context.c
index a2a699a36f..5a82c6ea9d 100644
--- a/mail/em-filter-context.c
+++ b/mail/em-filter-context.c
@@ -42,9 +42,9 @@ static void em_filter_context_class_init(EMFilterContextClass *klass);
static void em_filter_context_init(EMFilterContext *fc);
static void em_filter_context_finalise(GObject *obj);
-static GList *filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp);
-static GList *filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp);
-static FilterElement *filter_new_element(RuleContext *rc, const char *name);
+static GList *filter_rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp);
+static GList *filter_delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp);
+static FilterElement *filter_new_element(RuleContext *rc, const gchar *name);
static RuleContextClass *parent_class = NULL;
@@ -133,14 +133,14 @@ em_filter_context_add_action(EMFilterContext *fc, FilterPart *action)
}
FilterPart *
-em_filter_context_find_action(EMFilterContext *fc, const char *name)
+em_filter_context_find_action(EMFilterContext *fc, const gchar *name)
{
d(printf("find action : "));
return filter_part_find_list(fc->actions, name);
}
FilterPart *
-em_filter_context_create_action(EMFilterContext *fc, const char *name)
+em_filter_context_create_action(EMFilterContext *fc, const gchar *name)
{
FilterPart *part;
@@ -158,13 +158,13 @@ em_filter_context_next_action(EMFilterContext *fc, FilterPart *last)
/* We search for any folders in our actions list that need updating, update them */
static GList *
-filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp)
+filter_rename_uri(RuleContext *rc, const gchar *olduri, const gchar *newuri, GCompareFunc cmp)
{
FilterRule *rule;
GList *l, *el;
FilterPart *action;
FilterElement *element;
- int count = 0;
+ gint count = 0;
GList *changed = NULL;
d(printf("uri '%s' renamed to '%s'\n", olduri, newuri));
@@ -173,7 +173,7 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
while ((rule = rule_context_next_rule(rc, rule, NULL))) {
- int rulecount = 0;
+ gint rulecount = 0;
d(printf("checking rule '%s'\n", rule->name));
@@ -218,7 +218,7 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp
}
static GList *
-filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
+filter_delete_uri(RuleContext *rc, const gchar *uri, GCompareFunc cmp)
{
/* We basically do similar to above, but when we find it,
Remove the action, and if thats the last action, this might create an empty rule? remove the rule? */
@@ -227,7 +227,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
GList *l, *el;
FilterPart *action;
FilterElement *element;
- int count = 0;
+ gint count = 0;
GList *deleted = NULL;
d(printf("uri '%s' deleted\n", uri));
@@ -236,7 +236,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
while ((rule = rule_context_next_rule(rc, rule, NULL))) {
- int recorded = 0;
+ gint recorded = 0;
d(printf("checking rule '%s'\n", rule->name));
@@ -282,7 +282,7 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
}
static FilterElement *
-filter_new_element(RuleContext *rc, const char *type)
+filter_new_element(RuleContext *rc, const gchar *type)
{
if (!strcmp(type, "folder")) {
return (FilterElement *) em_filter_folder_element_new();
diff --git a/mail/em-filter-context.h b/mail/em-filter-context.h
index 56f11a3d81..31431b4a34 100644
--- a/mail/em-filter-context.h
+++ b/mail/em-filter-context.h
@@ -52,8 +52,8 @@ EMFilterContext *em_filter_context_new (void);
/* methods */
void em_filter_context_add_action (EMFilterContext *fc, FilterPart *action);
-FilterPart *em_filter_context_find_action (EMFilterContext *fc, const char *name);
-FilterPart *em_filter_context_create_action (EMFilterContext *fc, const char *name);
+FilterPart *em_filter_context_find_action (EMFilterContext *fc, const gchar *name);
+FilterPart *em_filter_context_create_action (EMFilterContext *fc, const gchar *name);
FilterPart *em_filter_context_next_action (EMFilterContext *fc, FilterPart *last);
#endif /* ! _EM_FILTER_CONTEXT_H */
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index 4f68cf47df..378192a8da 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -107,7 +107,7 @@ em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names)
{
EMFilterEditor *fe = (EMFilterEditor *) g_object_new (em_filter_editor_get_type(), NULL);
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"filter.glade",
@@ -133,8 +133,8 @@ free_sources (gpointer data)
static void
select_source (GtkComboBox *combobox, EMFilterEditor *fe)
{
- char *source;
- int idx;
+ gchar *source;
+ gint idx;
GSList *sources;
g_return_if_fail (GTK_IS_COMBO_BOX (combobox));
@@ -144,7 +144,7 @@ select_source (GtkComboBox *combobox, EMFilterEditor *fe)
g_return_if_fail (idx >= 0 && idx < g_slist_length (sources));
- source = (char *)g_slist_nth (sources, idx);
+ source = (gchar *)g_slist_nth (sources, idx);
g_return_if_fail (source);
rule_editor_set_source ((RuleEditor *)fe, source);
@@ -154,7 +154,7 @@ void
em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *gui, const EMFilterSource *source_names)
{
GtkWidget *combobox;
- int i;
+ gint i;
GtkTreeViewColumn *column;
GSList *sources = NULL;
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index b975b81089..553fba0895 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -41,10 +41,10 @@
#define d(x)
static gboolean validate(FilterElement *fe);
-static int folder_eq(FilterElement *fe, FilterElement *cm);
+static gint folder_eq(FilterElement *fe, FilterElement *cm);
static void xml_create(FilterElement *fe, xmlNodePtr node);
static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
+static gint xml_decode(FilterElement *fe, xmlNodePtr node);
static GtkWidget *get_widget(FilterElement *fe);
static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
static void format_sexp(FilterElement *, GString *);
@@ -132,7 +132,7 @@ em_filter_folder_element_new(void)
}
void
-em_filter_folder_element_set_value(EMFilterFolderElement *ff, const char *uri)
+em_filter_folder_element_set_value(EMFilterFolderElement *ff, const gchar *uri)
{
g_free(ff->uri);
ff->uri = g_strdup(uri);
@@ -178,15 +178,15 @@ xml_encode(FilterElement *fe)
d(printf("Encoding folder as xml\n"));
- value = xmlNewNode(NULL, (unsigned const char *)"value");
- xmlSetProp(value, (unsigned const char *)"name", (unsigned char *)fe->name);
+ value = xmlNewNode(NULL, (const guchar *)"value");
+ xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name);
if (ff->store_camel_uri)
- xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder-curi");
+ xmlSetProp(value, (const guchar *)"type", (const guchar *)"folder-curi");
else
- xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder");
+ xmlSetProp(value, (const guchar *)"type", (const guchar *)"folder");
- work = xmlNewChild(value, NULL, (unsigned const char *)"folder", NULL);
- xmlSetProp(work, (unsigned const char *)"uri", (unsigned const char *)ff->uri);
+ work = xmlNewChild(value, NULL, (const guchar *)"folder", NULL);
+ xmlSetProp(work, (const guchar *)"uri", (const guchar *)ff->uri);
return value;
}
@@ -201,11 +201,11 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
d(printf("Decoding folder from xml %p\n", fe));
xmlFree(fe->name);
- fe->name = (char *)xmlGetProp(node, (unsigned const char *)"name");
+ fe->name = (gchar *)xmlGetProp(node, (const guchar *)"name");
- type = xmlGetProp (node, (unsigned const char *)"type");
+ type = xmlGetProp (node, (const guchar *)"type");
if (type) {
- ff->store_camel_uri = g_str_equal ((const char *)type, "folder-curi");
+ ff->store_camel_uri = g_str_equal ((const gchar *)type, "folder-curi");
xmlFree (type);
} else {
ff->store_camel_uri = FALSE;
@@ -213,10 +213,10 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
n = node->children;
while(n) {
- if (!strcmp((char *)n->name, "folder")) {
- char *uri;
+ if (!strcmp((gchar *)n->name, "folder")) {
+ gchar *uri;
- uri = (char *)xmlGetProp(n, (unsigned const char *)"uri");
+ uri = (gchar *)xmlGetProp(n, (const guchar *)"uri");
g_free(ff->uri);
ff->uri = g_strdup(uri);
xmlFree(uri);
@@ -231,7 +231,7 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
static void
folder_selected(EMFolderSelectionButton *button, EMFilterFolderElement *ff)
{
- const char *uri;
+ const gchar *uri;
uri = em_folder_selection_button_get_selection(button);
g_free(ff->uri);
@@ -249,7 +249,7 @@ get_widget(FilterElement *fe)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
GtkWidget *button;
- char *uri;
+ gchar *uri;
if (ff->store_camel_uri)
uri = ff->uri;
diff --git a/mail/em-filter-folder-element.h b/mail/em-filter-folder-element.h
index 0d7d3b50b2..149d0226e7 100644
--- a/mail/em-filter-folder-element.h
+++ b/mail/em-filter-folder-element.h
@@ -39,7 +39,7 @@ typedef struct _EMFilterFolderElementClass EMFilterFolderElementClass;
struct _EMFilterFolderElement {
FilterElement parent_object;
- char *uri;
+ gchar *uri;
gboolean store_camel_uri; /* true if uri should contain camel uri, otherwise contains evolution's uri with an Account ID */
};
@@ -51,6 +51,6 @@ GType em_filter_folder_element_get_type (void);
EMFilterFolderElement *em_filter_folder_element_new (void);
/* methods */
-void em_filter_folder_element_set_value (EMFilterFolderElement *ff, const char *uri);
+void em_filter_folder_element_set_value (EMFilterFolderElement *ff, const gchar *uri);
#endif /* ! _EM_FILTER_FOLDER_ELEMENT_H */
diff --git a/mail/em-filter-i18n.h b/mail/em-filter-i18n.h
index c0b2925cc2..ba16ee3ebf 100644
--- a/mail/em-filter-i18n.h
+++ b/mail/em-filter-i18n.h
@@ -1,75 +1,75 @@
/* Automatically generated. Do not edit. */
-char *s = N_("Adjust Score");
-char *s = N_("Assign Color");
-char *s = N_("Assign Score");
-char *s = N_("Attachments");
-char *s = N_("BCC");
-char *s = N_("Beep");
-char *s = N_("CC");
-char *s = N_("Completed On");
-char *s = N_("contains");
-char *s = N_("Copy to Folder");
-char *s = N_("Date received");
-char *s = N_("Date sent");
-char *s = N_("Delete");
-char *s = N_("Deleted");
-char *s = N_("does not contain");
-char *s = N_("does not end with");
-char *s = N_("does not exist");
-char *s = N_("does not return");
-char *s = N_("does not sound like");
-char *s = N_("does not start with");
-char *s = N_("Do Not Exist");
-char *s = N_("Draft");
-char *s = N_("ends with");
-char *s = N_("Exist");
-char *s = N_("exists");
-char *s = N_("Expression");
-char *s = N_("Follow Up");
-char *s = N_("Forward to");
-char *s = N_("Important");
-char *s = N_("is");
-char *s = N_("is after");
-char *s = N_("is before");
-char *s = N_("is Flagged");
-char *s = N_("is greater than");
-char *s = N_("is less than");
-char *s = N_("is not");
-char *s = N_("is not Flagged");
-char *s = N_("is not set");
-char *s = N_("is set");
-char *s = N_("Junk");
-char *s = N_("Junk Test");
-char *s = N_("Label");
-char *s = N_("Mailing list");
-char *s = N_("Match All");
-char *s = N_("Message Body");
-char *s = N_("Message Header");
-char *s = N_("Message is Junk");
-char *s = N_("Message is not Junk");
-char *s = N_("Message Location");
-char *s = N_("Move to Folder");
-char *s = N_("Pipe to Program");
-char *s = N_("Play Sound");
-char *s = N_("Read");
-char *s = N_("Recipients");
-char *s = N_("Regex Match");
-char *s = N_("Replied to");
-char *s = N_("returns");
-char *s = N_("returns greater than");
-char *s = N_("returns less than");
-char *s = N_("Run Program");
-char *s = N_("Score");
-char *s = N_("Sender");
-char *s = N_("Sender or Recipients");
-char *s = N_("Set Label");
-char *s = N_("Set Status");
-char *s = N_("Size (kB)");
-char *s = N_("sounds like");
-char *s = N_("Source Account");
-char *s = N_("Specific header");
-char *s = N_("starts with");
-char *s = N_("Status");
-char *s = N_("Stop Processing");
-char *s = N_("Subject");
-char *s = N_("Unset Status");
+gchar *s = N_("Adjust Score");
+gchar *s = N_("Assign Color");
+gchar *s = N_("Assign Score");
+gchar *s = N_("Attachments");
+gchar *s = N_("BCC");
+gchar *s = N_("Beep");
+gchar *s = N_("CC");
+gchar *s = N_("Completed On");
+gchar *s = N_("contains");
+gchar *s = N_("Copy to Folder");
+gchar *s = N_("Date received");
+gchar *s = N_("Date sent");
+gchar *s = N_("Delete");
+gchar *s = N_("Deleted");
+gchar *s = N_("does not contain");
+gchar *s = N_("does not end with");
+gchar *s = N_("does not exist");
+gchar *s = N_("does not return");
+gchar *s = N_("does not sound like");
+gchar *s = N_("does not start with");
+gchar *s = N_("Do Not Exist");
+gchar *s = N_("Draft");
+gchar *s = N_("ends with");
+gchar *s = N_("Exist");
+gchar *s = N_("exists");
+gchar *s = N_("Expression");
+gchar *s = N_("Follow Up");
+gchar *s = N_("Forward to");
+gchar *s = N_("Important");
+gchar *s = N_("is");
+gchar *s = N_("is after");
+gchar *s = N_("is before");
+gchar *s = N_("is Flagged");
+gchar *s = N_("is greater than");
+gchar *s = N_("is less than");
+gchar *s = N_("is not");
+gchar *s = N_("is not Flagged");
+gchar *s = N_("is not set");
+gchar *s = N_("is set");
+gchar *s = N_("Junk");
+gchar *s = N_("Junk Test");
+gchar *s = N_("Label");
+gchar *s = N_("Mailing list");
+gchar *s = N_("Match All");
+gchar *s = N_("Message Body");
+gchar *s = N_("Message Header");
+gchar *s = N_("Message is Junk");
+gchar *s = N_("Message is not Junk");
+gchar *s = N_("Message Location");
+gchar *s = N_("Move to Folder");
+gchar *s = N_("Pipe to Program");
+gchar *s = N_("Play Sound");
+gchar *s = N_("Read");
+gchar *s = N_("Recipients");
+gchar *s = N_("Regex Match");
+gchar *s = N_("Replied to");
+gchar *s = N_("returns");
+gchar *s = N_("returns greater than");
+gchar *s = N_("returns less than");
+gchar *s = N_("Run Program");
+gchar *s = N_("Score");
+gchar *s = N_("Sender");
+gchar *s = N_("Sender or Recipients");
+gchar *s = N_("Set Label");
+gchar *s = N_("Set Status");
+gchar *s = N_("Size (kB)");
+gchar *s = N_("sounds like");
+gchar *s = N_("Source Account");
+gchar *s = N_("Specific header");
+gchar *s = N_("starts with");
+gchar *s = N_("Status");
+gchar *s = N_("Stop Processing");
+gchar *s = N_("Subject");
+gchar *s = N_("Unset Status");
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index 583f82977c..03d0028b6e 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -35,10 +35,10 @@
#define d(x)
-static int validate(FilterRule *fr);
-static int filter_eq(FilterRule *fr, FilterRule *cm);
+static gint validate(FilterRule *fr);
+static gint filter_eq(FilterRule *fr, FilterRule *cm);
static xmlNodePtr xml_encode(FilterRule *fr);
-static int xml_decode(FilterRule *fr, xmlNodePtr, RuleContext *rc);
+static gint xml_decode(FilterRule *fr, xmlNodePtr, RuleContext *rc);
static void rule_copy(FilterRule *dest, FilterRule *src);
/*static void build_code(FilterRule *, GString *out);*/
static GtkWidget *get_widget(FilterRule *fr, RuleContext *rc);
@@ -176,7 +176,7 @@ validate(FilterRule *fr)
{
EMFilterRule *ff =(EMFilterRule *)fr;
GList *parts;
- int valid;
+ gint valid;
valid = FILTER_RULE_CLASS(parent_class)->validate(fr);
@@ -193,7 +193,7 @@ validate(FilterRule *fr)
static int
list_eq(GList *al, GList *bl)
{
- int truth = TRUE;
+ gint truth = TRUE;
while (truth && al && bl) {
FilterPart *a = al->data, *b = bl->data;
@@ -222,7 +222,7 @@ xml_encode(FilterRule *fr)
node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
g_return_val_if_fail (node != NULL, NULL);
- set = xmlNewNode(NULL, (const unsigned char *)"actionset");
+ set = xmlNewNode(NULL, (const guchar *)"actionset");
xmlAddChild(node, set);
l = ff->actions;
while (l) {
@@ -239,13 +239,13 @@ static void
load_set(xmlNodePtr node, EMFilterRule *ff, RuleContext *rc)
{
xmlNodePtr work;
- char *rulename;
+ gchar *rulename;
FilterPart *part;
work = node->children;
while (work) {
- if (!strcmp((char *)work->name, "part")) {
- rulename = (char *)xmlGetProp(work, (const unsigned char *)"name");
+ if (!strcmp((gchar *)work->name, "part")) {
+ rulename = (gchar *)xmlGetProp(work, (const guchar *)"name");
part = em_filter_context_find_action((EMFilterContext *)rc, rulename);
if (part) {
part = filter_part_clone(part);
@@ -267,7 +267,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc)
{
EMFilterRule *ff =(EMFilterRule *)fr;
xmlNodePtr work;
- int result;
+ gint result;
result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, rc);
if (result != 0)
@@ -275,7 +275,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc)
work = node->children;
while (work) {
- if (!strcmp((char *)work->name, "actionset")) {
+ if (!strcmp((gchar *)work->name, "actionset")) {
load_set(work, ff, rc);
}
work = work->next;
@@ -328,7 +328,7 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data)
{
FilterPart *part = NULL;
FilterPart *newpart;
- int index, i;
+ gint index, i;
index = gtk_combo_box_get_active (combobox);
for (i = 0, part = em_filter_context_next_action (data->f, part); part && i < index; i++, part = em_filter_context_next_action (data->f, part)) {
@@ -364,7 +364,7 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr)
GtkWidget *combobox;
GtkWidget *hbox;
GtkWidget *p;
- int index = 0, current = 0;
+ gint index = 0, current = 0;
struct _part_data *data;
data = g_malloc0(sizeof(*data));
@@ -431,7 +431,7 @@ less_parts(GtkWidget *button, struct _rule_data *data)
}
static void
-attach_rule(GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
+attach_rule(GtkWidget *rule, struct _rule_data *data, FilterPart *part, gint row)
{
GtkWidget *remove;
@@ -512,7 +512,7 @@ get_widget(FilterRule *fr, RuleContext *rc)
FilterPart *part;
struct _rule_data *data;
EMFilterRule *ff =(EMFilterRule *)fr;
- int rows, i = 0;
+ gint rows, i = 0;
gchar *msg;
widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index 23a1b762cd..126cbe2a50 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -39,29 +39,29 @@ static void em_filter_source_element_class_init(EMFilterSourceElementClass *klas
static void em_filter_source_element_init(EMFilterSourceElement *fs);
static void em_filter_source_element_finalize(GObject *obj);
-static int source_eq(FilterElement *fe, FilterElement *cm);
+static gint source_eq(FilterElement *fe, FilterElement *cm);
static void xml_create(FilterElement *fe, xmlNodePtr node);
static xmlNodePtr xml_encode(FilterElement *fe);
-static int xml_decode(FilterElement *fe, xmlNodePtr node);
+static gint xml_decode(FilterElement *fe, xmlNodePtr node);
static FilterElement *clone(FilterElement *fe);
static GtkWidget *get_widget(FilterElement *fe);
static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff);
static void format_sexp(FilterElement *, GString *);
-static void em_filter_source_element_add_source (EMFilterSourceElement *fs, const char *account_name, const char *name,
- const char *addr, const char *url);
+static void em_filter_source_element_add_source (EMFilterSourceElement *fs, const gchar *account_name, const gchar *name,
+ const gchar *addr, const gchar *url);
static void em_filter_source_element_get_sources(EMFilterSourceElement *fs);
typedef struct _SourceInfo {
- char *account_name;
- char *name;
- char *address;
- char *url;
+ gchar *account_name;
+ gchar *name;
+ gchar *address;
+ gchar *url;
} SourceInfo;
struct _EMFilterSourceElementPrivate {
GList *sources;
- char *current_url;
+ gchar *current_url;
};
@@ -176,12 +176,12 @@ xml_encode(FilterElement *fe)
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
- value = xmlNewNode(NULL, (const unsigned char *)"value");
- xmlSetProp(value, (const unsigned char *)"name", (unsigned char *)fe->name);
- xmlSetProp(value, (const unsigned char *)"type", (const unsigned char *)"uri");
+ value = xmlNewNode(NULL, (const guchar *)"value");
+ xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name);
+ xmlSetProp(value, (const guchar *)"type", (const guchar *)"uri");
if (fs->priv->current_url)
- xmlNewTextChild(value, NULL, (const unsigned char *)"uri", (unsigned char *)fs->priv->current_url);
+ xmlNewTextChild(value, NULL, (const guchar *)"uri", (guchar *)fs->priv->current_url);
return value;
}
@@ -191,12 +191,12 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
CamelURL *url;
- char *uri;
+ gchar *uri;
node = node->children;
while (node != NULL) {
- if (!strcmp((char *)node->name, "uri")) {
- uri = (char *)xmlNodeGetContent(node);
+ if (!strcmp((gchar *)node->name, "uri")) {
+ uri = (gchar *)xmlNodeGetContent(node);
url = camel_url_new(uri, NULL);
xmlFree(uri);
@@ -219,7 +219,7 @@ clone(FilterElement *fe)
EMFilterSourceElement *cpy = em_filter_source_element_new();
GList *i;
- ((FilterElement *)cpy)->name = (char *)xmlStrdup((unsigned char *)fe->name);
+ ((FilterElement *)cpy)->name = (gchar *)xmlStrdup((guchar *)fe->name);
cpy->priv->current_url = g_strdup(fs->priv->current_url);
@@ -235,7 +235,7 @@ static void
source_changed(GtkComboBox *combobox, EMFilterSourceElement *fs)
{
SourceInfo *info;
- int idx;
+ gint idx;
idx = gtk_combo_box_get_active (combobox);
g_return_if_fail (idx >= 0 && idx < g_list_length (fs->priv->sources));
@@ -254,7 +254,7 @@ get_widget(FilterElement *fe)
GtkWidget *combobox;
GList *i;
SourceInfo *first = NULL;
- int index, current_index;
+ gint index, current_index;
if (fs->priv->sources == NULL)
em_filter_source_element_get_sources(fs);
@@ -266,7 +266,7 @@ get_widget(FilterElement *fe)
for (i = fs->priv->sources; i != NULL; i = g_list_next(i)) {
SourceInfo *info = (SourceInfo *)i->data;
- char *label;
+ gchar *label;
if (info->url != NULL) {
if (first == NULL)
@@ -321,8 +321,8 @@ format_sexp(FilterElement *fe, GString *out)
static void
-em_filter_source_element_add_source(EMFilterSourceElement *fs, const char *account_name, const char *name,
- const char *addr, const char *url)
+em_filter_source_element_add_source(EMFilterSourceElement *fs, const gchar *account_name, const gchar *name,
+ const gchar *addr, const gchar *url)
{
SourceInfo *info;
@@ -344,7 +344,7 @@ em_filter_source_element_get_sources(EMFilterSourceElement *fs)
const EAccount *account;
GConfClient *gconf;
EIterator *it;
- char *uri;
+ gchar *uri;
CamelURL *url;
/* should this get the global object from mail? */
diff --git a/mail/em-filter-source-element.h b/mail/em-filter-source-element.h
index ac9a1ff911..d4d6a75890 100644
--- a/mail/em-filter-source-element.h
+++ b/mail/em-filter-source-element.h
@@ -47,6 +47,6 @@ struct _EMFilterSourceElementClass {
GType em_filter_source_element_get_type (void);
EMFilterSourceElement *em_filter_source_element_new (void);
-void em_filter_source_element_set_current (EMFilterSourceElement *src, const char *url);
+void em_filter_source_element_set_current (EMFilterSourceElement *src, const gchar *url);
#endif /* _EM_FILTER_SOURCE_ELEMENT_H */
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index c835a1b593..0fc37b46bd 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -121,7 +121,7 @@ struct _EMFolderBrowserPrivate {
guint vpane_resize_id;
guint list_built_id; /* hook onto list-built for delayed 'select first unread' stuff */
- char *select_uid;
+ gchar *select_uid;
guint folder_changed_id;
guint show_wide:1;
@@ -139,20 +139,20 @@ typedef struct EMFBSearchBarItem {
const gchar *image;
} EMFBSearchBarItem;
-static void emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state);
-static void emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri);
-static void emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri);
+static void emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint state);
+static void emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri);
+static void emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri);
/* FilterBar stuff ... */
-static void emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data);
-static void emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb);
+static void emfb_search_config_search(EFilterBar *efb, FilterRule *rule, gint id, const gchar *query, gpointer data);
+static void emfb_search_menu_activated(ESearchBar *esb, gint id, EMFolderBrowser *emfb);
static void emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb);
static void emfb_search_search_cleared(ESearchBar *esb);
-static int emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderBrowser *emfb);
-static void emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *emfb);
+static gint emfb_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderBrowser *emfb);
+static void emfb_list_message_selected (MessageList *ml, const gchar *uid, EMFolderBrowser *emfb);
-static void emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path);
+static void emfb_expand_all_threads(BonoboUIComponent *uid, gpointer data, const gchar *path);
static const EMFolderViewEnable emfb_enable_map[] = {
{ "EditInvertSelection", EM_POPUP_SELECT_FOLDER },
@@ -294,7 +294,7 @@ generate_viewoption_menu (GtkWidget *emfv)
for (i = 0; emfb_view_items[i].search.id != -1; ++i) {
if (emfb_view_items[i].search.text) {
- char *str;
+ gchar *str;
str = e_str_without_underscores (_(emfb_view_items[i].search.text));
menu_item = gtk_image_menu_item_new_with_label (str);
@@ -325,7 +325,7 @@ generate_viewoption_menu (GtkWidget *emfv)
for (l = mail_config_get_labels (), i = 0; l; l = l->next, i++) {
EUtilLabel *label = l->data;
if (label->name && *(label->name)) {
- char *str;
+ gchar *str;
GdkPixmap *pixmap;
GdkColor colour;
GdkGC *gc;
@@ -359,7 +359,7 @@ generate_viewoption_menu (GtkWidget *emfv)
for (i = 0; temp_view_items[i].search.id != -1; ++i) {
if (temp_view_items[i].search.text) {
- char *str;
+ gchar *str;
str = e_str_without_underscores (_(temp_view_items[i].search.text));
menu_item = gtk_image_menu_item_new_with_label (str);
if (temp_view_items[i].image) {
@@ -423,7 +423,7 @@ emfb_realize (GtkWidget *widget)
{
GtkWidget *menu;
EMFolderBrowser *emfb = (EMFolderBrowser *)widget;
- int id;
+ gint id;
menu = generate_viewoption_menu (widget);
id = e_search_bar_get_viewitem_id (E_SEARCH_BAR (emfb->search));
@@ -512,11 +512,11 @@ emfb_init(GObject *o)
"evolution-mail-message.xml",
NULL));
- emfb->view.enable_map = g_slist_prepend(emfb->view.enable_map, (void *)emfb_enable_map);
+ emfb->view.enable_map = g_slist_prepend(emfb->view.enable_map, (gpointer)emfb_enable_map);
if (search_context) {
- const char *systemrules = g_object_get_data (G_OBJECT (search_context), "system");
- const char *userrules = g_object_get_data (G_OBJECT (search_context), "user");
+ const gchar *systemrules = g_object_get_data (G_OBJECT (search_context), "system");
+ const gchar *userrules = g_object_get_data (G_OBJECT (search_context), "user");
EFilterBar *efb;
GConfClient *gconf;
@@ -736,7 +736,7 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
if (state) {
GConfClient *gconf = mail_config_get_gconf_client ();
- int paned_size /*, y*/;
+ gint paned_size /*, y*/;
paned_size = gconf_client_get_int(gconf, emfb->priv->show_wide ? "/apps/evolution/mail/display/hpaned_size":"/apps/evolution/mail/display/paned_size", NULL);
@@ -745,7 +745,7 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
gtk_widget_show (GTK_WIDGET (emfb->priv->preview));
if (emfb->view.list->cursor_uid) {
- char *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1);
+ gchar *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1);
emfb->priv->scope_restricted = FALSE;
strcpy(uid, emfb->view.list->cursor_uid);
@@ -779,7 +779,7 @@ gboolean em_folder_browser_get_wide (EMFolderBrowser *emfb)
void em_folder_browser_show_wide(EMFolderBrowser *emfb, gboolean state)
{
GtkWidget *w;
- int paned_size;
+ gint paned_size;
if ((emfb->priv->show_wide && state)
|| emfb->view.list == NULL) {
@@ -818,7 +818,7 @@ void em_folder_browser_show_wide(EMFolderBrowser *emfb, gboolean state)
/* FIXME: Ugh! */
static void
-emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
+emfb_search_menu_activated(ESearchBar *esb, gint id, EMFolderBrowser *emfb)
{
EFilterBar *efb = (EFilterBar *)esb;
@@ -829,7 +829,7 @@ emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
d(printf("Save vfolder\n"));
if (efb->current_query) {
FilterRule *rule;
- char *name, *text;
+ gchar *name, *text;
/* ensures vfolder is running */
vfolder_load_storage ();
@@ -850,14 +850,14 @@ emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
}
static void
-emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char *query, void *data)
+emfb_search_config_search(EFilterBar *efb, FilterRule *rule, gint id, const gchar *query, gpointer data)
{
EMFolderBrowser *emfb = data;
EMailSearchBar *search_bar;
ESearchingTokenizer *tokenizer;
GList *partl;
struct _camel_search_words *words;
- int i;
+ gint i;
GSList *strings = NULL;
/* we scan the parts of a rule, and set all the types we know about to the query string */
@@ -874,7 +874,7 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char
if (input)
filter_input_set_value(input, query);
- words = camel_search_words_split((unsigned char *)query);
+ words = camel_search_words_split((guchar *)query);
for (i=0;i<words->len;i++)
strings = g_slist_prepend(strings, g_strdup(words->words[i]->word));
camel_search_words_free (words);
@@ -914,12 +914,12 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char
}
static const gchar *
-get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
+get_view_query (ESearchBar *esb, CamelFolder *folder, const gchar *folder_uri)
{
const gchar *view_sexp = NULL;
gint id;
GtkWidget *menu_item;
- char *tag;
+ gchar *tag;
gboolean duplicate = TRUE;
/* Get the current selected view */
@@ -985,7 +985,7 @@ get_view_query (ESearchBar *esb, CamelFolder *folder, const char *folder_uri)
view_sexp = g_string_free (s, FALSE);
} break;
case VIEW_LABEL:
- tag = (char *)g_object_get_data (G_OBJECT (menu_item), "LabelTag");
+ tag = (gchar *)g_object_get_data (G_OBJECT (menu_item), "LabelTag");
view_sexp = g_strdup_printf ("(match-all (or (= (user-tag \"label\") \"%s\") (user-flag \"$Label%s\") (user-flag \"%s\")))", tag, tag, tag);
duplicate = FALSE;
break;
@@ -1013,7 +1013,7 @@ struct _setup_msg {
CamelFolder *folder;
CamelOperation *cancel;
- char *query;
+ gchar *query;
GList *sources_uri;
GList *sources_folder;
};
@@ -1039,12 +1039,12 @@ vfolder_setup_exec(struct _setup_msg *m)
l = m->sources_uri;
while (l) {
- d(printf(" Adding uri: %s\n", (char *)l->data));
+ d(printf(" Adding uri: %s\n", (gchar *)l->data));
folder = mail_tool_uri_to_folder (l->data, 0, &m->base.ex);
if (folder) {
list = g_list_append(list, folder);
} else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(&m->base.ex);
}
l = l->next;
@@ -1106,10 +1106,10 @@ static MailMsgInfo vfolder_setup_info = {
/* sources_uri should be camel uri's */
static int
-vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList *sources_folder, CamelOperation *cancel)
+vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder, CamelOperation *cancel)
{
struct _setup_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&vfolder_setup_info);
m->folder = folder;
@@ -1134,8 +1134,8 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
EMFolderView *emfv = (EMFolderView *) emfb;
EFilterBar *efb = (EFilterBar *)esb;
const gchar *view_sexp;
- char *search_state = NULL, *folder_uri=NULL;
- char *word = NULL, *storeuri = NULL, *search_word = NULL;
+ gchar *search_state = NULL, *folder_uri=NULL;
+ gchar *word = NULL, *storeuri = NULL, *search_word = NULL;
gint id, i;
CamelFolder *folder;
CamelStore *store;
@@ -1260,11 +1260,11 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
/* Add the local folders */
l = mail_vfolder_get_sources_local ();
while (l) {
- folder = mail_tool_uri_to_folder ((const char *)l->data, 0,ex);
+ folder = mail_tool_uri_to_folder ((const gchar *)l->data, 0,ex);
if (folder)
folder_list = g_list_append(folder_list, folder);
else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(ex);
}
l = l->next;
@@ -1273,11 +1273,11 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
/* Add the remote source folder */
l = mail_vfolder_get_sources_remote ();
while (l) {
- folder = mail_tool_uri_to_folder ((const char *)l->data, 0,ex);
+ folder = mail_tool_uri_to_folder ((const gchar *)l->data, 0,ex);
if (folder)
folder_list = g_list_append(folder_list, folder);
else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(ex);
}
l = l->next;
@@ -1337,7 +1337,7 @@ emfb_search_search_cleared(ESearchBar *esb)
/* ********************************************************************** */
static int
-emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderBrowser *emfb)
+emfb_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderBrowser *emfb)
{
gboolean state, folder_choose = TRUE;
if ((ev->key.state & GDK_CONTROL_MASK) != 0)
@@ -1391,7 +1391,7 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
}
static void
-emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *emfb)
+emfb_list_message_selected (MessageList *ml, const gchar *uid, EMFolderBrowser *emfb)
{
EMFolderView *emfv = (EMFolderView *) emfb;
@@ -1413,7 +1413,7 @@ emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *e
/* ********************************************************************** */
static void
-emfb_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
+emfb_edit_cut(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1428,7 +1428,7 @@ emfb_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
+emfb_edit_copy(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1441,7 +1441,7 @@ emfb_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
+emfb_edit_paste(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1452,7 +1452,7 @@ emfb_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_edit_invert_selection(BonoboUIComponent *uid, void *data, const char *path)
+emfb_edit_invert_selection(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1468,7 +1468,7 @@ emfb_select_all_daemon (MessageList *ml)
}
static void
-emfb_edit_select_all(BonoboUIComponent *uid, void *data, const char *path)
+emfb_edit_select_all(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1491,7 +1491,7 @@ emfb_edit_select_all(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_edit_select_thread(BonoboUIComponent *uid, void *data, const char *path)
+emfb_edit_select_thread(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1499,7 +1499,7 @@ emfb_edit_select_thread(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_edit_select_subthread(BonoboUIComponent *uid, void *data, const char *path)
+emfb_edit_select_subthread(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1507,7 +1507,7 @@ emfb_edit_select_subthread(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_folder_properties(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_properties(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1517,7 +1517,7 @@ emfb_folder_properties(BonoboUIComponent *uid, void *data, const char *path)
/* VIEWTHREADED*/
static void
-emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path)
+emfb_expand_all_threads(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1526,7 +1526,7 @@ emfb_expand_all_threads(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_collapse_all_threads(BonoboUIComponent *uid, void *data, const char *path)
+emfb_collapse_all_threads(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1534,7 +1534,7 @@ emfb_collapse_all_threads(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_folder_copy(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_copy(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
CamelFolderInfo *fi = NULL;
@@ -1557,7 +1557,7 @@ emfb_folder_copy(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_folder_move(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_move(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
CamelFolderInfo *fi = NULL;
@@ -1580,7 +1580,7 @@ emfb_folder_move(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_folder_delete(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_delete(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1590,7 +1590,7 @@ emfb_folder_delete(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_folder_refresh(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_refresh(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
EMFolderTree *tree = g_object_get_data (G_OBJECT (emfb), "foldertree");
@@ -1602,7 +1602,7 @@ emfb_folder_refresh(BonoboUIComponent *uid, void *data, const char *path)
static void
-emfb_folder_rename(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_rename(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1612,7 +1612,7 @@ emfb_folder_rename(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_folder_create(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_create(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
CamelFolderInfo *fi = NULL;
@@ -1633,7 +1633,7 @@ emfb_folder_create(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_folder_expunge(BonoboUIComponent *uid, void *data, const char *path)
+emfb_folder_expunge(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1642,12 +1642,12 @@ emfb_folder_expunge(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_mark_all_read(BonoboUIComponent *uid, void *data, const char *path)
+emfb_mark_all_read(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
/* FIXME: make a 'mark messages' function? */
EMFolderView *emfv = data;
GPtrArray *uids;
- int i;
+ gint i;
if (emfv->folder == NULL)
return;
@@ -1662,7 +1662,7 @@ emfb_mark_all_read(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path)
+emfb_view_hide_read(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1670,7 +1670,7 @@ emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_view_hide_selected(BonoboUIComponent *uid, void *data, const char *path)
+emfb_view_hide_selected(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -1688,7 +1688,7 @@ emfb_view_hide_selected(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_view_show_all(BonoboUIComponent *uid, void *data, const char *path)
+emfb_view_show_all(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1698,13 +1698,13 @@ emfb_view_show_all(BonoboUIComponent *uid, void *data, const char *path)
/* ********************************************************************** */
static void
-emfb_mail_stop(BonoboUIComponent *uid, void *data, const char *path)
+emfb_mail_stop(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
mail_cancel_all();
}
static void
-emfb_tools_filters(BonoboUIComponent *uid, void *data, const char *path)
+emfb_tools_filters(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1718,7 +1718,7 @@ emfb_subscribe_editor_destroy(GtkWidget *w, EMFolderBrowser *emfb)
}
static void
-emfb_tools_subscriptions(BonoboUIComponent *uid, void *data, const char *path)
+emfb_tools_subscriptions(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1733,7 +1733,7 @@ emfb_tools_subscriptions(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_focus_search(BonoboUIComponent *uid, void *data, const char *path)
+emfb_focus_search(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderBrowser *emfb = data;
@@ -1741,13 +1741,13 @@ emfb_focus_search(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfb_help_debug (BonoboUIComponent *uid, void *data, const char *path)
+emfb_help_debug (BonoboUIComponent *uid, gpointer data, const gchar *path)
{
mail_component_show_logger ((GtkWidget *) data);
}
static void
-emfb_tools_vfolders(BonoboUIComponent *uid, void *data, const char *path)
+emfb_tools_vfolders(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
/* FIXME: rename/refactor this */
vfolder_edit();
@@ -1805,7 +1805,7 @@ static EPixmap emfb_pixmaps[] = {
static void
-emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfb_hide_deleted(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
GConfClient *gconf;
EMFolderView *emfv = data;
@@ -1819,7 +1819,7 @@ emfb_hide_deleted(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_E
}
static void
-emfb_view_threaded(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfb_view_threaded(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
GConfClient *gconf;
EMFolderView *emfv = data;
@@ -1840,7 +1840,7 @@ emfb_view_threaded(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_
}
static void
-emfb_view_preview(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfb_view_preview(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
GConfClient *gconf;
EMFolderView *emfv = data;
@@ -1859,7 +1859,7 @@ emfb_view_preview(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_E
}
static void
-emfb_show_next(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfb_show_next(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
GConfClient *gconf;
EMFolderBrowser *emfb = data;
@@ -1874,7 +1874,7 @@ emfb_show_next(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_Even
}
static void
-emfb_show_below(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfb_show_below(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
GConfClient *gconf;
EMFolderBrowser *emfb = data;
@@ -1893,7 +1893,7 @@ emfb_list_scrolled (MessageList *ml, EMFolderBrowser *emfb)
{
EMFolderView *emfv = (EMFolderView *) emfb;
double position;
- char *state;
+ gchar *state;
position = message_list_get_scrollbar_position (ml);
state = g_strdup_printf ("%f", position);
@@ -1909,7 +1909,7 @@ scroll_idle_cb (EMFolderBrowser *emfb)
{
EMFolderView *emfv = (EMFolderView *) emfb;
double position;
- char *state;
+ gchar *state;
if ((state = camel_object_meta_get (emfv->folder, "evolution:list_scroll_position"))) {
position = strtod (state, NULL);
@@ -1928,7 +1928,7 @@ scroll_idle_cb (EMFolderBrowser *emfb)
}
static void
-emfb_gui_folder_changed(CamelFolder *folder, void *dummy, EMFolderBrowser *emfb)
+emfb_gui_folder_changed(CamelFolder *folder, gpointer dummy, EMFolderBrowser *emfb)
{
if (emfb->priv->select_uid) {
CamelMessageInfo *mi;
@@ -2008,7 +2008,7 @@ emfb_list_built (MessageList *ml, EMFolderBrowser *emfb)
}
static void
-emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
+emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri)
{
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
const gchar *state;
@@ -2045,7 +2045,7 @@ emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
static void
-emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
+emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri)
{
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
struct _EMFolderBrowserPrivate *p = emfb->priv;
@@ -2078,8 +2078,8 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
before the folder is open and need to override the
defaults */
if (folder) {
- char *sstate;
- int state;
+ gchar *sstate;
+ gint state;
gboolean safe;
GConfClient *gconf = mail_config_get_gconf_client();
@@ -2178,12 +2178,12 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
}
static void
-emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
+emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint act)
{
if (act) {
GConfClient *gconf;
gboolean state;
- char *sstate;
+ gchar *sstate;
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
gconf = mail_config_get_gconf_client ();
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index b0fbfc65d2..db8bff5315 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -46,20 +46,20 @@
#include "mail-config.h"
struct _prop_data {
- void *object;
+ gpointer object;
CamelArgV *argv;
GtkWidget **widgets;
GSList *properties;
- char *name;
- int total;
- int unread;
+ gchar *name;
+ gint total;
+ gint unread;
EMConfig *config;
CamelFolderQuotaInfo *quota;
};
static void
-emfp_dialog_response (GtkWidget *dialog, int response, struct _prop_data *prop_data)
+emfp_dialog_response (GtkWidget *dialog, gint response, struct _prop_data *prop_data)
{
if (response == GTK_RESPONSE_OK)
e_config_commit((EConfig *)prop_data->config);
@@ -70,11 +70,11 @@ emfp_dialog_response (GtkWidget *dialog, int response, struct _prop_data *prop_d
}
static void
-emfp_commit(EConfig *ec, GSList *items, void *data)
+emfp_commit(EConfig *ec, GSList *items, gpointer data)
{
struct _prop_data *prop_data = data;
CamelArgV *argv = prop_data->argv;
- int i;
+ gint i;
for (i = 0; i < argv->argc; i++) {
CamelArg *arg = &argv->argv[i];
@@ -85,7 +85,7 @@ emfp_commit(EConfig *ec, GSList *items, void *data)
break;
case CAMEL_ARG_STR:
g_free (arg->ca_str);
- arg->ca_str = (char *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]);
+ arg->ca_str = (gchar *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]);
break;
case CAMEL_ARG_INT:
arg->ca_int = gtk_spin_button_get_value_as_int ((GtkSpinButton *) prop_data->widgets[i]);
@@ -103,10 +103,10 @@ emfp_commit(EConfig *ec, GSList *items, void *data)
}
static void
-emfp_free(EConfig *ec, GSList *items, void *data)
+emfp_free(EConfig *ec, GSList *items, gpointer data)
{
struct _prop_data *prop_data = data;
- int i;
+ gint i;
g_slist_free(items);
@@ -127,9 +127,9 @@ emfp_free(EConfig *ec, GSList *items, void *data)
}
static int
-add_numbered_row (GtkTable *table, int row, const char *description, const char *format, int num)
+add_numbered_row (GtkTable *table, gint row, const gchar *description, const gchar *format, gint num)
{
- char *str;
+ gchar *str;
GtkWidget *label;
g_return_val_if_fail (table != NULL, row);
@@ -154,11 +154,11 @@ add_numbered_row (GtkTable *table, int row, const char *description, const char
}
static GtkWidget *
-emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
GtkWidget *w, *table, *label;
struct _prop_data *prop_data = data;
- int row = 0, i;
+ gint row = 0, i;
GSList *l;
if (old)
@@ -182,8 +182,8 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
CamelFolderQuotaInfo *quota = prop_data->quota;
for (info = quota; info; info = info->next) {
- char *descr;
- int procs;
+ gchar *descr;
+ gint procs;
/* should not happen, but anyway... */
if (!info->total)
@@ -287,7 +287,7 @@ static EMConfigItem emfp_items[] = {
static gboolean emfp_items_translated = FALSE;
static void
-emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data)
+emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data)
{
GtkWidget *dialog, *w;
struct _prop_data *prop_data;
@@ -300,7 +300,7 @@ emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota,
gboolean hide_deleted;
GConfClient *gconf;
CamelStore *store;
- char *uri = (char *)data;
+ gchar *uri = (gchar *)data;
if (folder == NULL) {
g_free (uri);
@@ -426,7 +426,7 @@ emfp_dialog_got_folder_quota (CamelFolder *folder, CamelFolderQuotaInfo *quota,
}
static void
-emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
+emfp_dialog_got_folder (gchar *uri, CamelFolder *folder, gpointer data)
{
/* this should be called in a thread too */
mail_get_folder_quota (folder, emfp_dialog_got_folder_quota, g_strdup (uri), mail_msg_unordered_push);
@@ -442,7 +442,7 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
* as NULL, then the folder @uri will be loaded first.
**/
void
-em_folder_properties_show(GtkWindow *parent, CamelFolder *folder, const char *uri)
+em_folder_properties_show(GtkWindow *parent, CamelFolder *folder, const gchar *uri)
{
/* HACK: its the old behaviour, not very 'neat' but it works */
if (!strncmp(uri, "vfolder:", 8)) {
@@ -464,5 +464,5 @@ em_folder_properties_show(GtkWindow *parent, CamelFolder *folder, const char *ur
if (folder == NULL)
mail_get_folder(uri, 0, emfp_dialog_got_folder, NULL, mail_msg_unordered_push);
else
- emfp_dialog_got_folder((char *)uri, folder, NULL);
+ emfp_dialog_got_folder((gchar *)uri, folder, NULL);
}
diff --git a/mail/em-folder-properties.h b/mail/em-folder-properties.h
index cd58a9eeb4..cdaec27e4d 100644
--- a/mail/em-folder-properties.h
+++ b/mail/em-folder-properties.h
@@ -32,7 +32,7 @@ extern "C" {
struct _CamelFolder;
struct _GtkWindow;
-void em_folder_properties_show(struct _GtkWindow *parent, struct _CamelFolder *folder, const char *uri);
+void em_folder_properties_show(struct _GtkWindow *parent, struct _CamelFolder *folder, const gchar *uri);
#ifdef __cplusplus
}
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index ce97dcb85d..a3a206fdcc 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -51,11 +51,11 @@ struct _EMFolderSelectionButtonPrivate {
GtkWidget *selector;
- char *uri; /* for single-select mode */
+ gchar *uri; /* for single-select mode */
GList *uris; /* for multi-select mode */
- char *title;
- char *caption;
+ gchar *title;
+ gchar *caption;
gboolean multiple_select;
};
@@ -124,13 +124,13 @@ static void
set_contents (EMFolderSelectionButton *button)
{
struct _EMFolderSelectionButtonPrivate *priv = button->priv;
- char *folder_name = em_utils_folder_name_from_uri (priv->uri);
+ gchar *folder_name = em_utils_folder_name_from_uri (priv->uri);
if (folder_name) {
EAccount *account = mail_config_get_account_by_source_url (priv->uri);
if (account) {
- char *tmp = folder_name;
+ gchar *tmp = folder_name;
folder_name = g_strdup_printf ("%s/%s", e_account_get_string (account, E_ACCOUNT_NAME), _(folder_name));
g_free (tmp);
gtk_label_set_text (GTK_LABEL (priv->label), folder_name);
@@ -203,7 +203,7 @@ em_folder_selection_button_finalize (GObject *obj)
}
static void
-emfsb_selector_response (EMFolderSelector *emfs, int response, EMFolderSelectionButton *button)
+emfsb_selector_response (EMFolderSelector *emfs, gint response, EMFolderSelectionButton *button)
{
if (response == GTK_RESPONSE_OK) {
if (button->priv->multiple_select) {
@@ -212,7 +212,7 @@ emfsb_selector_response (EMFolderSelector *emfs, int response, EMFolderSelection
em_folder_selection_button_set_selection_mult (button, uris);
g_signal_emit (button, signals[SELECTED], 0);
} else {
- const char *uri = em_folder_selector_get_selected_uri (emfs);
+ const gchar *uri = em_folder_selector_get_selected_uri (emfs);
em_folder_selection_button_set_selection (button, uri);
g_signal_emit (button, signals[SELECTED], 0);
@@ -255,7 +255,7 @@ em_folder_selection_button_clicked (GtkButton *button)
}
GtkWidget *
-em_folder_selection_button_new (const char *title, const char *caption)
+em_folder_selection_button_new (const gchar *title, const gchar *caption)
{
EMFolderSelectionButton *button = g_object_new (EM_TYPE_FOLDER_SELECTION_BUTTON, NULL);
@@ -266,7 +266,7 @@ em_folder_selection_button_new (const char *title, const char *caption)
}
void
-em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri)
+em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const gchar *uri)
{
struct _EMFolderSelectionButtonPrivate *priv = button->priv;
@@ -280,7 +280,7 @@ em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const
set_contents (button);
}
-const char *
+const gchar *
em_folder_selection_button_get_selection (EMFolderSelectionButton *button)
{
g_return_val_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button), NULL);
@@ -292,7 +292,7 @@ void
em_folder_selection_button_set_selection_mult (EMFolderSelectionButton *button, GList *uris)
{
struct _EMFolderSelectionButtonPrivate *priv = button->priv;
- char *caption, *tmp, *tmp2;
+ gchar *caption, *tmp, *tmp2;
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
diff --git a/mail/em-folder-selection-button.h b/mail/em-folder-selection-button.h
index c0ab32f88e..7b2a1b471d 100644
--- a/mail/em-folder-selection-button.h
+++ b/mail/em-folder-selection-button.h
@@ -57,10 +57,10 @@ struct _EMFolderSelectionButtonClass {
GType em_folder_selection_button_get_type (void);
-GtkWidget *em_folder_selection_button_new (const char *title, const char *caption);
+GtkWidget *em_folder_selection_button_new (const gchar *title, const gchar *caption);
-void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri);
-const char *em_folder_selection_button_get_selection (EMFolderSelectionButton *button);
+void em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const gchar *uri);
+const gchar *em_folder_selection_button_get_selection (EMFolderSelectionButton *button);
void em_folder_selection_button_set_selection_mult (EMFolderSelectionButton *button, GList *uris);
GList *em_folder_selection_button_get_selection_mult (EMFolderSelectionButton *button);
diff --git a/mail/em-folder-selection.c b/mail/em-folder-selection.c
index cfb244c2eb..8fe6292e32 100644
--- a/mail/em-folder-selection.c
+++ b/mail/em-folder-selection.c
@@ -37,15 +37,15 @@
/* TODO: rmeove this file, it could just go on em-folder-selection or em-utils */
struct _select_folder_data {
- void (*done) (const char *uri, void *data);
- void *data;
+ void (*done) (const gchar *uri, gpointer data);
+ gpointer data;
};
static void
-emfs_selector_response(EMFolderSelector *emfs, int response, struct _select_folder_data *d)
+emfs_selector_response(EMFolderSelector *emfs, gint response, struct _select_folder_data *d)
{
if (response == GTK_RESPONSE_OK) {
- const char *uri = em_folder_selector_get_selected_uri(emfs);
+ const gchar *uri = em_folder_selector_get_selected_uri(emfs);
d->done(uri, d->data);
}
@@ -54,9 +54,9 @@ emfs_selector_response(EMFolderSelector *emfs, int response, struct _select_fold
}
void
-em_select_folder (GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri,
+em_select_folder (GtkWindow *parent_window, const gchar *title, const gchar *oklabel, const gchar *default_uri,
EMFTExcludeFunc exclude,
- void (*done) (const char *uri, void *user_data), void *user_data)
+ void (*done) (const gchar *uri, gpointer user_data), gpointer user_data)
{
struct _select_folder_data *d;
EMFolderTreeModel *model;
diff --git a/mail/em-folder-selection.h b/mail/em-folder-selection.h
index 25c35d254b..098fa2b227 100644
--- a/mail/em-folder-selection.h
+++ b/mail/em-folder-selection.h
@@ -33,10 +33,10 @@ extern "C" {
struct _GtkWindow;
-void em_select_folder (struct _GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri,
+void em_select_folder (struct _GtkWindow *parent_window, const gchar *title, const gchar *oklabel, const gchar *default_uri,
EMFTExcludeFunc exclude,
- void (*done)(const char *uri, void *data),
- void *data);
+ void (*done)(const gchar *uri, gpointer data),
+ gpointer data);
#ifdef __cplusplus
}
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index ae6a8965a4..7a4f389482 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -126,7 +126,7 @@ em_folder_selector_finalize (GObject *obj)
}
static void
-emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
+emfs_response (GtkWidget *dialog, gint response, EMFolderSelector *emfs)
{
if (response != EM_FOLDER_SELECTOR_RESPONSE_NEW)
return;
@@ -140,8 +140,8 @@ emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
static void
emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
{
- char *path;
- const char *text = NULL;
+ gchar *path;
+ const gchar *text = NULL;
gboolean active;
if (emfs->name_entry->text_length > 0)
@@ -155,7 +155,7 @@ emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
}
static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderSelector *emfs)
+folder_selected_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, guint32 flags, EMFolderSelector *emfs)
{
if (emfs->name_entry)
emfs_create_name_changed (emfs->name_entry, emfs);
@@ -164,13 +164,13 @@ folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint
}
static void
-folder_activated_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderSelector *emfs)
+folder_activated_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, EMFolderSelector *emfs)
{
gtk_dialog_response ((GtkDialog *) emfs, GTK_RESPONSE_OK);
}
void
-em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
+em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel)
{
GtkWidget *label;
@@ -213,7 +213,7 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3
}
GtkWidget *
-em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
+em_folder_selector_new (EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel)
{
EMFolderSelector *emfs;
@@ -228,8 +228,8 @@ static void
emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
{
if (emfs->name_entry->text_length > 0) {
- char *path;
- const char *text;
+ gchar *path;
+ const gchar *text;
text = gtk_entry_get_text (emfs->name_entry);
path = em_folder_tree_get_selected_uri(emfs->emft);
@@ -241,7 +241,7 @@ emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
}
GtkWidget *
-em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text)
+em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text)
{
EMFolderSelector *emfs;
GtkWidget *hbox, *w;
@@ -273,7 +273,7 @@ em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *ti
void
-em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri)
+em_folder_selector_set_selected (EMFolderSelector *emfs, const gchar *uri)
{
em_folder_tree_set_selected (emfs->emft, uri, FALSE);
}
@@ -284,11 +284,11 @@ em_folder_selector_set_selected_list (EMFolderSelector *emfs, GList *list)
em_folder_tree_set_selected_list (emfs->emft, list, FALSE);
}
-const char *
+const gchar *
em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
{
- char *uri;
- const char *name;
+ gchar *uri;
+ const gchar *name;
if (!(uri = em_folder_tree_get_selected_uri (emfs->emft))) {
d(printf ("no selected folder?\n"));
@@ -298,7 +298,7 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
if (uri && emfs->name_entry) {
CamelProvider *provider;
CamelURL *url;
- char *newpath;
+ gchar *newpath;
provider = camel_provider_get(uri, NULL);
@@ -313,7 +313,7 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
camel_url_set_fragment (url, newpath);
} else {
- char *path;
+ gchar *path;
path = g_strdup_printf("%s/%s", (url->path == NULL || strcmp(url->path, "/") == 0) ? "":url->path, name);
camel_url_set_path(url, path);
@@ -349,10 +349,10 @@ em_folder_selector_get_selected_paths (EMFolderSelector *emfs)
return em_folder_tree_get_selected_paths (emfs->emft);
}
-const char *
+const gchar *
em_folder_selector_get_selected_path (EMFolderSelector *emfs)
{
- char *uri, *path;
+ gchar *uri, *path;
if (emfs->selected_path) {
/* already did the work in a previous call */
@@ -367,8 +367,8 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
path = em_folder_tree_get_selected_path(emfs->emft);
if (emfs->name_entry) {
- const char *name;
- char *newpath;
+ const gchar *name;
+ gchar *newpath;
name = gtk_entry_get_text (emfs->name_entry);
newpath = g_strdup_printf ("%s/%s", path?path:"", name);
diff --git a/mail/em-folder-selector.h b/mail/em-folder-selector.h
index 12662ae5f7..5ac7152d61 100644
--- a/mail/em-folder-selector.h
+++ b/mail/em-folder-selector.h
@@ -48,10 +48,10 @@ struct _EMFolderSelector {
struct _EMFolderTree *emft;
struct _GtkEntry *name_entry;
- char *selected_path;
- char *selected_uri;
+ gchar *selected_path;
+ gchar *selected_uri;
- char *created_uri;
+ gchar *created_uri;
guint created_id;
};
@@ -70,19 +70,19 @@ enum {
GType em_folder_selector_get_type (void);
-void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel);
+void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel);
/* for selecting folders */
-GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel);
+GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text, const gchar *oklabel);
/* for creating folders */
-GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
+GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const gchar *title, const gchar *text);
-void em_folder_selector_set_selected (EMFolderSelector *emfs, const char *uri);
+void em_folder_selector_set_selected (EMFolderSelector *emfs, const gchar *uri);
void em_folder_selector_set_selected_list (EMFolderSelector *emfs, GList *list);
-const char *em_folder_selector_get_selected_uri (EMFolderSelector *emfs);
-const char *em_folder_selector_get_selected_path (EMFolderSelector *emfs);
+const gchar *em_folder_selector_get_selected_uri (EMFolderSelector *emfs);
+const gchar *em_folder_selector_get_selected_path (EMFolderSelector *emfs);
GList *em_folder_selector_get_selected_uris (EMFolderSelector *emfs);
GList *em_folder_selector_get_selected_paths (EMFolderSelector *emfs);
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index d90bcbbacb..2fedce05b3 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -188,11 +188,11 @@ em_folder_tree_model_class_init (EMFolderTreeModelClass *klass)
static int
sort_cb (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
{
- char *aname, *bname;
+ gchar *aname, *bname;
CamelStore *store;
gboolean is_store;
guint32 aflags, bflags;
- int rv = -2;
+ gint rv = -2;
gtk_tree_model_get (model, a, COL_BOOL_IS_STORE, &is_store,
COL_POINTER_CAMEL_STORE, &store,
@@ -336,7 +336,7 @@ tree_sortable_iface_init (GtkTreeSortableIface *iface)
static void
-em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename)
+em_folder_tree_model_load_state (EMFolderTreeModel *model, const gchar *filename)
{
xmlNodePtr root, node;
@@ -345,7 +345,7 @@ em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename)
if ((model->state = e_xml_parse_file (filename)) != NULL) {
node = xmlDocGetRootElement (model->state);
- if (!node || strcmp ((char *)node->name, "tree-state") != 0) {
+ if (!node || strcmp ((gchar *)node->name, "tree-state") != 0) {
/* it is not expected XML file, thus free it and use the default */
xmlFreeDoc (model->state);
} else
@@ -353,25 +353,25 @@ em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename)
}
/* setup some defaults - expand "Local Folders" and "Search Folders" */
- model->state = xmlNewDoc ((const unsigned char *)"1.0");
- root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
+ model->state = xmlNewDoc ((const guchar *)"1.0");
+ root = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
- node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
- xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"local");
- xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
+ node = xmlNewChild (root, NULL, (const guchar *)"node", NULL);
+ xmlSetProp (node, (const guchar *)"name", (const guchar *)"local");
+ xmlSetProp (node, (const guchar *)"expand", (const guchar *)"true");
- node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
- xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"vfolder");
- xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
+ node = xmlNewChild (root, NULL, (const guchar *)"node", NULL);
+ xmlSetProp (node, (const guchar *)"name", (const guchar *)"vfolder");
+ xmlSetProp (node, (const guchar *)"expand", (const guchar *)"true");
}
EMFolderTreeModel *
-em_folder_tree_model_new (const char *evolution_dir)
+em_folder_tree_model_new (const gchar *evolution_dir)
{
EMFolderTreeModel *model;
- char *filename;
+ gchar *filename;
model = g_object_new (EM_TYPE_FOLDER_TREE_MODEL, NULL);
gtk_tree_store_set_column_types ((GtkTreeStore *) model, NUM_COLUMNS, col_types);
@@ -395,7 +395,7 @@ account_changed (EAccountList *accounts, EAccount *account, gpointer user_data)
CamelProvider *provider;
CamelStore *store;
CamelException ex;
- char *uri;
+ gchar *uri;
if (!(si = g_hash_table_lookup (model->account_hash, account)))
return;
@@ -440,17 +440,17 @@ account_removed (EAccountList *accounts, EAccount *account, gpointer user_data)
void
em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter,
struct _EMFolderTreeModelStoreInfo *si,
- CamelFolderInfo *fi, int fully_loaded)
+ CamelFolderInfo *fi, gint fully_loaded)
{
GtkTreeRowReference *uri_row, *path_row;
GtkTreeStore *tree_store;
- unsigned int unread;
+ guint unread;
GtkTreePath *path;
GtkTreeIter sub;
gboolean load = FALSE;
struct _CamelFolder *folder;
gboolean emitted = FALSE;
- const char *name;
+ const gchar *name;
const gchar *icon_name;
guint32 flags;
@@ -477,10 +477,10 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
unread = fi->unread;
if (mail_note_get_folder_from_uri(fi->uri, &folder) && folder) {
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) {
- int total;
+ gint total;
if ((total = camel_folder_get_message_count (folder)) > 0) {
- int deleted = camel_folder_get_deleted_message_count (folder);
+ gint deleted = camel_folder_get_deleted_message_count (folder);
if (deleted != -1)
total -= deleted;
@@ -489,10 +489,10 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
unread = total > 0 ? total : 0;
}
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) {
- int total;
+ gint total;
if ((total = camel_folder_get_message_count (folder)) > 0) {
- int deleted = camel_folder_get_deleted_message_count (folder);
+ gint deleted = camel_folder_get_deleted_message_count (folder);
if (deleted != -1)
total -= deleted;
@@ -599,7 +599,7 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo
GtkTreeIter parent, iter;
GtkTreePath *path;
gboolean load;
- char *dirname, *p;
+ gchar *dirname, *p;
if (!(si = g_hash_table_lookup (model->store_hash, store)))
goto done;
@@ -653,7 +653,7 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo
}
static void
-folder_subscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_subscribed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -691,7 +691,7 @@ folder_unsubscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *
}
static void
-folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_unsubscribed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -701,7 +701,7 @@ folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *
}
static void
-folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_created_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -715,7 +715,7 @@ folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model
}
static void
-folder_deleted_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_deleted_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
@@ -735,7 +735,7 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod
GtkTreeRowReference *row;
GtkTreeIter root, iter;
GtkTreePath *path;
- char *parent, *p;
+ gchar *parent, *p;
if (!(si = g_hash_table_lookup (model->store_hash, store)))
goto done;
@@ -793,7 +793,7 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod
}
static void
-folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
+folder_renamed_cb (CamelStore *store, gpointer event_data, EMFolderTreeModel *model)
{
CamelRenameInfo *rinfo, *info = event_data;
@@ -807,14 +807,14 @@ folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model
}
void
-em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name)
+em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const gchar *display_name)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
GtkTreeIter root, iter;
GtkTreePath *path;
EAccount *account;
- char *uri;
+ gchar *uri;
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (CAMEL_IS_STORE (store));
@@ -881,7 +881,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
}
static void
-em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const char *uri)
+em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const gchar *uri)
{
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (uri != NULL);
@@ -910,7 +910,7 @@ em_folder_tree_model_remove_store_info (EMFolderTreeModel *model, CamelStore *st
void
em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si, GtkTreeIter *toplevel)
{
- char *uri, *full_name;
+ gchar *uri, *full_name;
gboolean is_store, go;
GtkTreeIter iter;
@@ -967,15 +967,15 @@ em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store)
static xmlNodePtr
-find_xml_node (xmlNodePtr root, const char *name)
+find_xml_node (xmlNodePtr root, const gchar *name)
{
xmlNodePtr node;
- char *nname;
+ gchar *nname;
node = root->children;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "node")) {
- nname = (char *)xmlGetProp (node, (const unsigned char *)"name");
+ if (!strcmp ((gchar *)node->name, "node")) {
+ nname = (gchar *)xmlGetProp (node, (const guchar *)"name");
if (nname && !strcmp (nname, name)) {
xmlFree (nname);
return node;
@@ -991,18 +991,18 @@ find_xml_node (xmlNodePtr root, const char *name)
}
gboolean
-em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
+em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const gchar *key)
{
xmlNodePtr node;
- const char *name;
- char *buf, *p;
+ const gchar *name;
+ gchar *buf, *p;
/* This code needs to be rewritten.
First it doesn't belong on the model
Second, it shouldn't use an xml tree to store a bit table in memory! */
node = model->state ? model->state->children : NULL;
- if (!node || strcmp ((char *)node->name, "tree-state") != 0)
+ if (!node || strcmp ((gchar *)node->name, "tree-state") != 0)
return FALSE;
name = buf = g_alloca (strlen (key) + 1);
@@ -1018,8 +1018,8 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
if ((node = find_xml_node (node, name))) {
gboolean expanded;
- buf = (char *)xmlGetProp (node, (const unsigned char *)"expand");
- expanded = buf && !strcmp ((char *)buf, "true");
+ buf = (gchar *)xmlGetProp (node, (const guchar *)"expand");
+ expanded = buf && !strcmp ((gchar *)buf, "true");
xmlFree (buf);
if (!expanded || p == NULL)
@@ -1034,17 +1034,17 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
void
-em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded)
+em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const gchar *key, gboolean expanded)
{
xmlNodePtr node, parent;
- const char *name;
- char *buf, *p;
+ const gchar *name;
+ gchar *buf, *p;
if (model->state == NULL)
- model->state = xmlNewDoc ((const unsigned char *)"1.0");
+ model->state = xmlNewDoc ((const guchar *)"1.0");
if (!model->state->children) {
- node = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
+ node = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL);
xmlDocSetRootElement (model->state, node);
} else {
node = model->state->children;
@@ -1068,11 +1068,11 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb
}
/* node (or parent node) doesn't exist, need to add it */
- node = xmlNewChild (parent, NULL, (const unsigned char *)"node", NULL);
- xmlSetProp (node, (const unsigned char *)"name", (unsigned char *)name);
+ node = xmlNewChild (parent, NULL, (const guchar *)"node", NULL);
+ xmlSetProp (node, (const guchar *)"name", (guchar *)name);
}
- xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)(expanded || p ? "true" : "false"));
+ xmlSetProp (node, (const guchar *)"expand", (const guchar *)(expanded || p ? "true" : "false"));
name = p ? p + 1 : NULL;
} while (name);
@@ -1085,7 +1085,7 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb
* @return Key of the uri or NULL, if failed. Returned value should be clear by g_free.
**/
static gchar *
-emftm_uri_to_key (const char *uri)
+emftm_uri_to_key (const gchar *uri)
{
CamelException ex = { 0 };
CamelStore *store;
@@ -1103,7 +1103,7 @@ emftm_uri_to_key (const char *uri)
if (store == NULL || url == NULL) {
key = NULL;
} else {
- const char *path;
+ const gchar *path;
EAccount *account;
if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
@@ -1136,7 +1136,7 @@ emftm_uri_to_key (const char *uri)
* Same as @ref em_folder_tree_model_get_expanded, but here we use uri, not key for node.
**/
gboolean
-em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri)
+em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const gchar *uri)
{
gchar *key;
gboolean expanded;
@@ -1157,7 +1157,7 @@ em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri
* Same as @ref em_folder_tree_model_set_expanded, but here we use uri, not key for node.
**/
void
-em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri, gboolean expanded)
+em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const gchar *uri, gboolean expanded)
{
gchar *key;
@@ -1174,7 +1174,7 @@ em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri
void
em_folder_tree_model_save_state (EMFolderTreeModel *model)
{
- char *dirname;
+ gchar *dirname;
if (model->state == NULL)
return;
@@ -1192,17 +1192,17 @@ em_folder_tree_model_save_state (EMFolderTreeModel *model)
static void
-expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirname, EMFTModelExpandFunc func, void *user_data)
+expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const gchar *dirname, EMFTModelExpandFunc func, gpointer user_data)
{
xmlNodePtr node = parent->children;
- char *path, *name, *expand;
+ gchar *path, *name, *expand;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "node")) {
- name = (char *)xmlGetProp (node, (const unsigned char *)"name");
- expand = (char *)xmlGetProp (node, (const unsigned char *)"expand");
+ if (!strcmp ((gchar *)node->name, "node")) {
+ name = (gchar *)xmlGetProp (node, (const guchar *)"name");
+ expand = (gchar *)xmlGetProp (node, (const guchar *)"expand");
- if (expand && name && !strcmp ((char *)expand, "true")) {
+ if (expand && name && !strcmp ((gchar *)expand, "true")) {
if (dirname)
path = g_strdup_printf ("%s/%s", dirname, name);
else
@@ -1223,19 +1223,19 @@ expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirna
}
void
-em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data)
+em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, gpointer user_data)
{
xmlNodePtr root;
root = model->state ? model->state->children : NULL;
- if (!root || !root->children || strcmp ((char *)root->name, "tree-state") != 0)
+ if (!root || !root->children || strcmp ((gchar *)root->name, "tree-state") != 0)
return;
expand_foreach_r (model, root, NULL, func, user_data);
}
gboolean
-em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const char *full)
+em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const gchar *full)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
@@ -1275,14 +1275,14 @@ em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store,
return FALSE;
}
-char *
-em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const char *full)
+gchar *
+em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const gchar *full)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
GtkTreePath *tree_path;
GtkTreeIter iter;
- char *name = NULL;
+ gchar *name = NULL;
g_return_val_if_fail (EM_IS_FOLDER_TREE_MODEL (model), FALSE);
g_return_val_if_fail (CAMEL_IS_STORE (store), FALSE);
@@ -1312,7 +1312,7 @@ em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *stor
}
void
-em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const char *full, int unread)
+em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const gchar *full, gint unread)
{
struct _EMFolderTreeModelStoreInfo *si;
GtkTreeRowReference *row;
@@ -1353,19 +1353,19 @@ em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *sto
}
-char *
+gchar *
em_folder_tree_model_get_selected (EMFolderTreeModel *model)
{
xmlNodePtr node;
- char *buf, *uri;
+ gchar *buf, *uri;
node = model->state ? model->state->children : NULL;
- if (!node || strcmp ((char *)node->name, "tree-state") != 0)
+ if (!node || strcmp ((gchar *)node->name, "tree-state") != 0)
return NULL;
node = node->children;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "selected"))
+ if (!strcmp ((gchar *)node->name, "selected"))
break;
node = node->next;
}
@@ -1373,7 +1373,7 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
if (node == NULL)
return NULL;
- buf = (char *)xmlGetProp (node, (unsigned char *)"uri");
+ buf = (gchar *)xmlGetProp (node, (guchar *)"uri");
uri = g_strdup (buf);
xmlFree (buf);
@@ -1386,15 +1386,15 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
void
-em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri)
+em_folder_tree_model_set_selected (EMFolderTreeModel *model, const gchar *uri)
{
xmlNodePtr root, node;
if (model->state == NULL)
- model->state = xmlNewDoc ((unsigned char *)"1.0");
+ model->state = xmlNewDoc ((guchar *)"1.0");
if (!model->state->children) {
- root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
+ root = xmlNewDocNode (model->state, NULL, (const guchar *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
} else {
root = model->state->children;
@@ -1402,13 +1402,13 @@ em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri)
node = root->children;
while (node != NULL) {
- if (!strcmp ((char *)node->name, "selected"))
+ if (!strcmp ((gchar *)node->name, "selected"))
break;
node = node->next;
}
if (node == NULL)
- node = xmlNewChild (root, NULL, (const unsigned char *)"selected", NULL);
+ node = xmlNewChild (root, NULL, (const guchar *)"selected", NULL);
- xmlSetProp (node, (const unsigned char *)"uri", (unsigned char *)uri);
+ xmlSetProp (node, (const guchar *)"uri", (guchar *)uri);
}
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 706e3895b3..3748da79a0 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -71,19 +71,19 @@ struct _EMFolderTreeModelStoreInfo {
GHashTable *full_hash; /* maps CamelFolderInfo::full_name's to GtkTreeRowReferences */
EAccount *account;
- char *display_name;
+ gchar *display_name;
- unsigned int created_id;
- unsigned int deleted_id;
- unsigned int renamed_id;
- unsigned int subscribed_id;
- unsigned int unsubscribed_id;
+ guint created_id;
+ guint deleted_id;
+ guint renamed_id;
+ guint subscribed_id;
+ guint unsubscribed_id;
};
struct _EMFolderTreeModel {
GtkTreeStore parent_object;
- char *filename; /* state filename */
+ gchar *filename; /* state filename */
xmlDocPtr state; /* saved expanded state from previous session */
GHashTable *store_hash; /* maps CamelStore's to store-info's */
@@ -108,46 +108,46 @@ struct _EMFolderTreeModelClass {
GtkTreeIter *iter);
void (* folder_added) (EMFolderTreeModel *model,
- const char *path,
- const char *uri);
+ const gchar *path,
+ const gchar *uri);
void (* store_added) (EMFolderTreeModel *model,
- const char *uri);
+ const gchar *uri);
};
GType em_folder_tree_model_get_type (void);
-EMFolderTreeModel *em_folder_tree_model_new (const char *evolution_dir);
+EMFolderTreeModel *em_folder_tree_model_new (const gchar *evolution_dir);
void em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *iter,
struct _EMFolderTreeModelStoreInfo *si,
- CamelFolderInfo *fi, int fully_loaded);
+ CamelFolderInfo *fi, gint fully_loaded);
-void em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const char *display_name);
+void em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, const gchar *display_name);
void em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store);
void em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si,
GtkTreeIter *toplevel);
-char *em_folder_tree_model_get_selected (EMFolderTreeModel *model);
-void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri);
+gchar *em_folder_tree_model_get_selected (EMFolderTreeModel *model);
+void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const gchar *uri);
-gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key);
-void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded);
+gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const gchar *key);
+void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const gchar *key, gboolean expanded);
-gboolean em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const char *uri);
-void em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const char *uri, gboolean expanded);
+gboolean em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const gchar *uri);
+void em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const gchar *uri, gboolean expanded);
void em_folder_tree_model_save_state (EMFolderTreeModel *model);
-typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const char *path, void *user_data);
-void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data);
+typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const gchar *path, gpointer user_data);
+void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, gpointer user_data);
-void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const char *path, int unread);
-gboolean em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const char *full);
-char * em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const char *full);
+void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const gchar *path, gint unread);
+gboolean em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const gchar *full);
+gchar * em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const gchar *full);
#ifdef __cplusplus
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 77e62dfbcf..3d1a8564f2 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -76,10 +76,10 @@
#define d(x)
struct _selected_uri {
- char *key; /* store:path or account/path */
- char *uri;
+ gchar *key; /* store:path or account/path */
+ gchar *uri;
CamelStore *store;
- char *path;
+ gchar *path;
};
struct _EMFolderTreePrivate {
@@ -90,8 +90,8 @@ struct _EMFolderTreePrivate {
GHashTable *select_uris_table; /*Removed as they're encountered, so use this to find uri's not presnet but selected */
guint32 excluded;
- gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data);
- void *excluded_data;
+ gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, gpointer data);
+ gpointer excluded_data;
guint do_multiselect:1; /* multiple select mode */
guint cursor_set:1; /* set to TRUE means we or something
@@ -244,7 +244,7 @@ em_folder_tree_class_init (EMFolderTreeClass *klass)
static gboolean
subdirs_contain_unread (GtkTreeModel *model, GtkTreeIter *root)
{
- unsigned int unread;
+ guint unread;
GtkTreeIter iter;
if (!gtk_tree_model_iter_children (model, &iter, root))
@@ -268,9 +268,9 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
{
gboolean is_store, bold;
- unsigned int unread;
- char *display;
- char *name;
+ guint unread;
+ gchar *display;
+ gchar *name;
gtk_tree_model_get (model, iter, COL_STRING_DISPLAY_NAME, &name,
COL_BOOL_IS_STORE, &is_store,
@@ -335,7 +335,7 @@ emft_select_func(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *
}
static void
-emft_free_select_uri(void *v, void *data)
+emft_free_select_uri(gpointer v, gpointer data)
{
struct _selected_uri *u = v;
@@ -522,11 +522,11 @@ emft_select_uri(EMFolderTree *emft, GtkTreePath *path, struct _selected_uri *u)
gtk_tree_view_scroll_to_cell (priv->treeview, path, NULL, TRUE, 0.8f, 0.0f);
g_hash_table_remove(priv->select_uris_table, u->key);
priv->select_uris = g_slist_remove(priv->select_uris, u);
- emft_free_select_uri((void *)u, NULL);
+ emft_free_select_uri((gpointer)u, NULL);
}
static void
-emft_expand_node (EMFolderTreeModel *model, const char *key, EMFolderTree *emft)
+emft_expand_node (EMFolderTreeModel *model, const gchar *key, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
struct _EMFolderTreeModelStoreInfo *si;
@@ -534,8 +534,8 @@ emft_expand_node (EMFolderTreeModel *model, const char *key, EMFolderTree *emft)
GtkTreePath *path;
EAccount *account;
CamelStore *store;
- const char *p;
- char *uid;
+ const gchar *p;
+ gchar *uid;
size_t n;
struct _selected_uri *u;
@@ -602,8 +602,8 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree
gboolean is_store;
CamelStore *store;
EAccount *account;
- char *full_name;
- char *key;
+ gchar *full_name;
+ gchar *key;
struct _selected_uri *u;
gboolean is_expanded;
@@ -631,7 +631,7 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree
gtk_tree_view_expand_to_path (priv->treeview, tree_path);
gtk_tree_view_expand_row (priv->treeview, tree_path, FALSE);
} else {
- char *c = strrchr (key, '/');
+ gchar *c = strrchr (key, '/');
*c = '\0';
emft_expand_node (model, key, emft);
@@ -690,7 +690,7 @@ static void
tree_drag_data_delete(GtkWidget *widget, GdkDragContext *context, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
- char *full_name = NULL;
+ gchar *full_name = NULL;
GtkTreePath *src_path;
gboolean is_store;
CamelStore *store;
@@ -724,7 +724,7 @@ static void
tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
- char *full_name = NULL, *uri = NULL;
+ gchar *full_name = NULL, *uri = NULL;
GtkTreePath *src_path;
CamelFolder *folder;
CamelStore *store;
@@ -751,7 +751,7 @@ tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData
switch (info) {
case DND_DRAG_TYPE_FOLDER:
/* dragging to a new location in the folder tree */
- gtk_selection_data_set(selection, drag_atoms[info], 8, (unsigned char *)uri, strlen (uri) + 1);
+ gtk_selection_data_set(selection, drag_atoms[info], 8, (guchar *)uri, strlen (uri) + 1);
break;
case DND_DRAG_TYPE_TEXT_URI_LIST:
/* dragging to nautilus or something, probably */
@@ -787,13 +787,13 @@ struct _DragDataReceivedAsync {
GtkSelectionData *selection;
CamelStore *store;
- char *full_name;
+ gchar *full_name;
guint32 action;
guint info;
- unsigned int move:1;
- unsigned int moved:1;
- unsigned int aborted:1;
+ guint move:1;
+ guint moved:1;
+ guint aborted:1;
};
static void
@@ -803,7 +803,7 @@ emft_drop_folder(struct _DragDataReceivedAsync *m)
d(printf(" * Drop folder '%s' onto '%s'\n", m->selection->data, m->full_name));
- if (!(src = mail_tool_uri_to_folder((char *)m->selection->data, 0, &m->base.ex)))
+ if (!(src = mail_tool_uri_to_folder((gchar *)m->selection->data, 0, &m->base.ex)))
return;
em_folder_utils_copy_folders(src->parent_store, src->full_name, m->store, m->full_name?m->full_name:"", m->move);
@@ -814,10 +814,10 @@ static gchar *
emft_drop_async__desc (struct _DragDataReceivedAsync *m)
{
CamelURL *url;
- char *buf;
+ gchar *buf;
if (m->info == DND_DROP_TYPE_FOLDER) {
- url = camel_url_new ((char *)m->selection->data, NULL);
+ url = camel_url_new ((gchar *)m->selection->data, NULL);
if (m->move)
buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1);
@@ -896,7 +896,7 @@ tree_drag_data_action(struct _DragDataReceivedAsync *m)
}
static void
-emft_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
+emft_drop_popup_copy(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _DragDataReceivedAsync *m = data;
@@ -905,7 +905,7 @@ emft_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emft_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
+emft_drop_popup_move(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _DragDataReceivedAsync *m = data;
@@ -914,7 +914,7 @@ emft_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emft_drop_popup_cancel(EPopup *ep, EPopupItem *item, void *data)
+emft_drop_popup_cancel(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _DragDataReceivedAsync *m = data;
@@ -932,13 +932,13 @@ static EPopupItem emft_drop_popup_menu[] = {
};
static void
-emft_drop_popup_free(EPopup *ep, GSList *items, void *data)
+emft_drop_popup_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft)
+tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection, guint info, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeViewDropPosition pos;
@@ -947,8 +947,8 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y
gboolean is_store;
CamelStore *store;
GtkTreeIter iter;
- char *full_name;
- int i;
+ gchar *full_name;
+ gint i;
if (!gtk_tree_view_get_dest_row_at_pos (priv->treeview, x, y, &dest_path, &pos))
return;
@@ -992,7 +992,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y
if (context->action == GDK_ACTION_ASK) {
EMPopup *emp;
- int mask;
+ gint mask;
GSList *menus = NULL;
GtkMenu *menu;
@@ -1017,7 +1017,7 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y
}
static gboolean
-is_special_local_folder (const char *name)
+is_special_local_folder (const gchar *name)
{
return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates"));
}
@@ -1026,7 +1026,7 @@ static GdkAtom
emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
{
struct _EMFolderTreePrivate *p = emft->priv;
- char *full_name = NULL, *uri = NULL, *src_uri = NULL;
+ gchar *full_name = NULL, *uri = NULL, *src_uri = NULL;
CamelStore *local, *sstore, *dstore;
GdkAtom atom = GDK_NONE;
gboolean is_store;
@@ -1109,7 +1109,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
/* Check for special sources, and vfolder stuff */
if (src_uri) {
CamelURL *url;
- char *url_path;
+ gchar *url_path;
/* FIXME: this is a total hack, but i think all we can do at present */
/* Check for dragging from special folders which can't be moved/copied */
@@ -1196,7 +1196,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
targets = targets->next;
}
} else {
- int i;
+ gint i;
while (targets != NULL) {
for (i = 0; i < NUM_DROP_TYPES; i++) {
@@ -1219,11 +1219,11 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
}
static gboolean
-tree_drag_drop (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft)
+tree_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeViewColumn *column;
- int cell_x, cell_y;
+ gint cell_x, cell_y;
GtkTreePath *path;
GdkAtom target;
@@ -1295,7 +1295,7 @@ tree_autoscroll (EMFolderTree *emft)
GtkAdjustment *vadjustment;
GdkRectangle rect;
GdkWindow *window;
- int offset, y;
+ gint offset, y;
float value;
/* get the y pointer position relative to the treeview */
@@ -1337,7 +1337,7 @@ tree_autoexpand (EMFolderTree *emft)
}
static gboolean
-tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guint time, EMFolderTree *emft)
+tree_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeModel *model = (GtkTreeModel *) priv->model;
@@ -1346,7 +1346,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin
GtkTreePath *path;
GtkTreeIter iter;
GdkAtom target;
- int i;
+ gint i;
if (!gtk_tree_view_get_dest_row_at_pos(priv->treeview, x, y, &path, &pos))
return FALSE;
@@ -1415,8 +1415,8 @@ void
em_folder_tree_enable_drag_and_drop (EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv;
- static int setup = 0;
- int i;
+ static gint setup = 0;
+ gint i;
g_return_if_fail (EM_IS_FOLDER_TREE (emft));
@@ -1458,7 +1458,7 @@ void em_folder_tree_set_excluded(EMFolderTree *emft, guint32 flags)
emft->priv->excluded = flags;
}
-void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, void *data)
+void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, gpointer data)
{
emft->priv->excluded_func = exclude;
emft->priv->excluded_data = data;
@@ -1482,7 +1482,7 @@ em_folder_tree_get_selected_uris (EMFolderTree *emft)
GtkTreePath *path = l->data;
if (gtk_tree_model_get_iter(model, &iter, path)) {
- char *uri;
+ gchar *uri;
gtk_tree_model_get(model, &iter, COL_STRING_URI, &uri, -1);
list = g_list_prepend (list, uri);
@@ -1498,7 +1498,7 @@ static void
get_selected_uris_path_iterate (GtkTreeModel *model, GtkTreePath *treepath, GtkTreeIter *iter, gpointer data)
{
GList **list = (GList **) data;
- char *full_name;
+ gchar *full_name;
gtk_tree_model_get (model, iter, COL_STRING_FULL_NAME, &full_name, -1);
*list = g_list_append (*list, full_name);
@@ -1532,7 +1532,7 @@ void
em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expand_only)
{
struct _EMFolderTreePrivate *priv = emft->priv;
- int id = 0;
+ gint id = 0;
/* FIXME: need to remove any currently selected stuff? */
if (!expand_only)
@@ -1555,8 +1555,8 @@ em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expa
priv->select_uris = g_slist_append(priv->select_uris, u);
}
} else {
- const char *path;
- char *expand_key, *end;
+ const gchar *path;
+ gchar *expand_key, *end;
EAccount *account;
if (((CamelService *)u->store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
@@ -1600,9 +1600,9 @@ em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expa
#if 0
static void
-dump_fi (CamelFolderInfo *fi, int depth)
+dump_fi (CamelFolderInfo *fi, gint depth)
{
- int i;
+ gint i;
while (fi != NULL) {
for (i = 0; i < depth; i++)
@@ -1626,7 +1626,7 @@ struct _EMFolderTreeGetFolderInfo {
EMFolderTree *emft;
CamelStore *store;
guint32 flags;
- char *top;
+ gchar *top;
/* output data */
CamelFolderInfo *fi;
@@ -1635,7 +1635,7 @@ struct _EMFolderTreeGetFolderInfo {
static gchar *
emft_get_folder_info__desc (struct _EMFolderTreeGetFolderInfo *m)
{
- char *ret, *name;
+ gchar *ret, *name;
name = camel_service_get_name((CamelService *)m->store, TRUE);
ret = g_strdup_printf(_("Scanning folders in \"%s\""), name);
@@ -1728,7 +1728,7 @@ emft_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m)
return;
}
} else {
- int fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE;
+ gint fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE;
do {
em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi, fully_loaded);
@@ -1768,8 +1768,8 @@ emft_update_model_expanded_state (struct _EMFolderTreePrivate *priv, GtkTreeIter
gboolean is_store;
CamelStore *store;
EAccount *account;
- char *full_name;
- char *key;
+ gchar *full_name;
+ gchar *key;
gtk_tree_model_get ((GtkTreeModel *) priv->model, iter,
COL_STRING_FULL_NAME, &full_name,
@@ -1800,7 +1800,7 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t
struct _EMFolderTreeGetFolderInfo *m;
GtkTreeModel *model;
CamelStore *store;
- char *full_name;
+ gchar *full_name;
gboolean load;
model = gtk_tree_view_get_model (treeview);
@@ -1859,7 +1859,7 @@ emft_tree_row_activated (GtkTreeView *treeview, GtkTreePath *tree_path, GtkTreeV
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeModel *model = (GtkTreeModel *) priv->model;
- char *full_name, *uri;
+ gchar *full_name, *uri;
GtkTreeIter iter;
guint32 flags;
@@ -1895,7 +1895,7 @@ emft_popup_open_new (GtkWidget *item, EMFolderTree *emft)
#endif
static void
-emft_popup_copy(EPopup *ep, EPopupItem *item, void *data)
+emft_popup_copy(EPopup *ep, EPopupItem *item, gpointer data)
{
EMFolderTree *emft = data;
CamelFolderInfo *fi = NULL;
@@ -1906,7 +1906,7 @@ emft_popup_copy(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emft_popup_move(EPopup *ep, EPopupItem *item, void *data)
+emft_popup_move(EPopup *ep, EPopupItem *item, gpointer data)
{
EMFolderTree *emft = data;
CamelFolderInfo *fi = NULL;
@@ -1917,7 +1917,7 @@ emft_popup_move(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emft_popup_new_folder (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_new_folder (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderTree *emft = data;
CamelFolderInfo *fi;
@@ -1955,7 +1955,7 @@ emft_selection_get_selected (GtkTreeSelection *selection, GtkTreeModel **model,
}
static void
-emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderTree *emft = data;
CamelFolder *folder;
@@ -1966,7 +1966,7 @@ emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderTree *emft = data;
CamelFolder *folder;
@@ -1977,7 +1977,7 @@ emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emft_popup_refresh_folder (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_refresh_folder (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderTree *emft = data;
CamelFolder *folder;
@@ -1987,26 +1987,26 @@ emft_popup_refresh_folder (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emft_popup_flush_outbox (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_flush_outbox (EPopup *ep, EPopupItem *pitem, gpointer data)
{
mail_send ();
}
static void
-emft_popup_empty_trash (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_empty_trash (EPopup *ep, EPopupItem *pitem, gpointer data)
{
em_utils_empty_trash (data);
}
static void
-emft_popup_properties (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_properties (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderTree *emft = data;
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *uri;
+ gchar *uri;
selection = gtk_tree_view_get_selection (priv->treeview);
if (!emft_selection_get_selected (selection, &model, &iter))
@@ -2018,13 +2018,13 @@ emft_popup_properties (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emft_popup_uvfolder (EPopup *ep, EPopupItem *pitem, void *data)
+emft_popup_uvfolder (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderTree *emft = data;
CamelFolder *folder;
if ((folder = em_folder_tree_get_selected_folder (emft)) != NULL) {
- char *meta = camel_object_meta_get(folder, "vfolder:unread");
+ gchar *meta = camel_object_meta_get(folder, "vfolder:unread");
if (!meta || strcmp(meta, "false") == 0)
camel_object_meta_set(folder, "vfolder:unread", "true");
else
@@ -2063,7 +2063,7 @@ static EPopupItem emft_popup_items[] = {
static EPopupItem trash_popup_item = {E_POPUP_ITEM, (gchar *) "30.emc.05", (gchar *) N_("_Empty Trash"), emft_popup_empty_trash,NULL,NULL, 1, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT};
static void
-emft_popup_free(EPopup *ep, GSList *items, void *data)
+emft_popup_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
}
@@ -2082,11 +2082,11 @@ emft_popup (EMFolderTree *emft, GdkEvent *event)
guint32 flags = 0;
guint32 folder_type_flags = 0;
gboolean isstore;
- char *uri, *full_name;
+ gchar *uri, *full_name;
GtkMenu *menu;
EMPopup *emp;
CamelFolder *selfolder = NULL;
- int i;
+ gint i;
treeview = emft->priv->treeview;
@@ -2154,7 +2154,7 @@ emft_popup (EMFolderTree *emft, GdkEvent *event)
if (!isstore && strstr(uri, "vfolder")) {
/* This is a vfolder, so lets add hacked up menu item. */
static EPopupItem *item = NULL;
- char *meta = camel_object_meta_get (selfolder, "vfolder:unread");
+ gchar *meta = camel_object_meta_get (selfolder, "vfolder:unread");
if (!item)
item = g_malloc0(sizeof(*item));
@@ -2248,7 +2248,7 @@ emft_tree_user_event (GtkTreeView *treeview, GdkEvent *e, EMFolderTree *emft)
static void
emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
{
- char *full_name, *uri;
+ gchar *full_name, *uri;
GtkTreeModel *model;
GtkTreeIter iter;
guint32 flags;
@@ -2269,12 +2269,12 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
}
void
-em_folder_tree_set_selected (EMFolderTree *emft, const char *uri, gboolean expand_only)
+em_folder_tree_set_selected (EMFolderTree *emft, const gchar *uri, gboolean expand_only)
{
GList *l = NULL;
if (uri && uri[0])
- l = g_list_append(l, (void *)uri);
+ l = g_list_append(l, (gpointer)uri);
em_folder_tree_set_selected_list(emft, l, expand_only);
g_list_free(l);
@@ -2288,7 +2288,7 @@ em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders)
GtkTreeModel *model;
GtkTreeIter iter, parent, child;
GtkTreePath *current_path, *path = NULL;
- unsigned int unread = 0;
+ guint unread = 0;
struct _EMFolderTreePrivate *priv = emft->priv;
g_return_if_fail (EM_IS_FOLDER_TREE (emft));
@@ -2352,7 +2352,7 @@ get_last_child (GtkTreeModel *model, GtkTreeIter *iter)
return get_last_child (model, iter);
} else if (has_child) {
/* Pick the last one */
- int nchildren = gtk_tree_model_iter_n_children (model, iter);
+ gint nchildren = gtk_tree_model_iter_n_children (model, iter);
gtk_tree_model_iter_nth_child ( model, child, iter, nchildren-1);
return get_last_child (model, child);
}
@@ -2367,7 +2367,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
GtkTreeModel *model;
GtkTreeIter iter, child;
GtkTreePath *path = NULL, *current_path = NULL;
- unsigned int unread = 0;
+ guint unread = 0;
struct _EMFolderTreePrivate *priv = emft->priv;
g_return_if_fail (EM_IS_FOLDER_TREE (emft));
@@ -2391,7 +2391,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
} else {
gtk_tree_model_get_iter (model, &iter, path);
if (gtk_tree_model_iter_has_child (model, &iter)) {
- int nchildren = gtk_tree_model_iter_n_children (model, &iter);
+ gint nchildren = gtk_tree_model_iter_n_children (model, &iter);
gtk_tree_model_iter_nth_child ( model, &child, &iter, nchildren-1);
path = gtk_tree_model_get_path (model, &child);
}
@@ -2422,13 +2422,13 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
}
-char *
+gchar *
em_folder_tree_get_selected_uri (EMFolderTree *emft)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *uri = NULL;
+ gchar *uri = NULL;
g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
@@ -2439,13 +2439,13 @@ em_folder_tree_get_selected_uri (EMFolderTree *emft)
return uri;
}
-char *
+gchar *
em_folder_tree_get_selected_path (EMFolderTree *emft)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *name = NULL;
+ gchar *name = NULL;
g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
@@ -2462,7 +2462,7 @@ em_folder_tree_get_selected_folder (EMFolderTree *emft)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *full_name = NULL;
+ gchar *full_name = NULL;
CamelException ex;
CamelStore *store = NULL;
CamelFolder *folder = NULL;
@@ -2490,7 +2490,7 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *emft)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- char *full_name = NULL, *name = NULL, *uri = NULL;
+ gchar *full_name = NULL, *name = NULL, *uri = NULL;
CamelException ex;
CamelStore *store = NULL;
CamelFolderInfo *fi = NULL;
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index e76acf4df1..265616a00a 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -51,7 +51,7 @@ typedef struct _EMFolderTreeClass EMFolderTreeClass;
#define EMFT_EXCLUDE_SYSTEM CAMEL_FOLDER_SYSTEM
#define EMFT_EXCLUDE_VTRASH CAMEL_FOLDER_VTRASH
-typedef gboolean (*EMFTExcludeFunc)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data);
+typedef gboolean (*EMFTExcludeFunc)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, gpointer data);
struct _EMFolderTree {
GtkVBox parent_object;
@@ -63,8 +63,8 @@ struct _EMFolderTreeClass {
GtkVBoxClass parent_class;
/* signals */
- void (* folder_activated) (EMFolderTree *emft, const char *full_name, const char *uri);
- void (* folder_selected) (EMFolderTree *emft, const char *full_name, const char *uri, guint32 flags);
+ void (* folder_activated) (EMFolderTree *emft, const gchar *full_name, const gchar *uri);
+ void (* folder_selected) (EMFolderTree *emft, const gchar *full_name, const gchar *uri, guint32 flags);
};
GType em_folder_tree_get_type (void);
@@ -76,24 +76,24 @@ void em_folder_tree_enable_drag_and_drop (EMFolderTree *emft);
void em_folder_tree_set_multiselect (EMFolderTree *emft, gboolean mode);
void em_folder_tree_set_excluded(EMFolderTree *emft, guint32 flags);
-void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, void *data);
+void em_folder_tree_set_excluded_func(EMFolderTree *emft, EMFTExcludeFunc exclude, gpointer data);
void em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expand_only);
GList *em_folder_tree_get_selected_uris (EMFolderTree *emft);
GList *em_folder_tree_get_selected_paths (EMFolderTree *emft);
-void em_folder_tree_set_selected (EMFolderTree *emft, const char *uri, gboolean expand_only);
+void em_folder_tree_set_selected (EMFolderTree *emft, const gchar *uri, gboolean expand_only);
void em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders);
void em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders);
-char *em_folder_tree_get_selected_uri (EMFolderTree *emft);
-char *em_folder_tree_get_selected_path (EMFolderTree *emft);
+gchar *em_folder_tree_get_selected_uri (EMFolderTree *emft);
+gchar *em_folder_tree_get_selected_path (EMFolderTree *emft);
CamelFolder *em_folder_tree_get_selected_folder (EMFolderTree *emft);
CamelFolderInfo *em_folder_tree_get_selected_folder_info (EMFolderTree *emft);
EMFolderTreeModel *em_folder_tree_get_model (EMFolderTree *emft);
EMFolderTreeModelStoreInfo *em_folder_tree_get_model_storeinfo (EMFolderTree *emft, CamelStore *store);
-gboolean em_folder_tree_create_folder (EMFolderTree *emft, const char *full_name, const char *uri);
+gboolean em_folder_tree_create_folder (EMFolderTree *emft, const gchar *full_name, const gchar *uri);
GtkWidget * em_folder_tree_get_tree_view (EMFolderTree *emft);
void em_folder_tree_set_skip_double_click (EMFolderTree *emft, gboolean skip);
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index ad60516bb1..682ffc77c5 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -75,7 +75,7 @@
extern CamelSession *session;
static gboolean
-emfu_is_special_local_folder (const char *name)
+emfu_is_special_local_folder (const gchar *name)
{
return (!strcmp (name, "Drafts") || !strcmp (name, "Inbox") || !strcmp (name, "Outbox") || !strcmp (name, "Sent") || !strcmp (name, "Templates"));
}
@@ -87,10 +87,10 @@ struct _EMCopyFolders {
CamelStore *fromstore;
CamelStore *tostore;
- char *frombase;
- char *tobase;
+ gchar *frombase;
+ gchar *tobase;
- int delete;
+ gint delete;
};
static gchar *
@@ -106,8 +106,8 @@ emft_copy_folders__exec (struct _EMCopyFolders *m)
GList *pending = NULL, *deleting = NULL, *l;
GString *fromname, *toname;
CamelFolderInfo *fi;
- const char *tmp;
- int fromlen;
+ const gchar *tmp;
+ gint fromlen;
if (!(fi = camel_store_get_folder_info (m->fromstore, m->frombase, flags, &m->base.ex)))
return;
@@ -132,7 +132,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m)
while (info) {
CamelFolder *fromfolder, *tofolder;
GPtrArray *uids;
- int deleted = 0;
+ gint deleted = 0;
if (info->child)
pending = g_list_append (pending, info->child);
@@ -237,11 +237,11 @@ static MailMsgInfo copy_folders_info = {
(MailMsgFreeFunc) emft_copy_folders__free
};
-int
-em_folder_utils_copy_folders(CamelStore *fromstore, const char *frombase, CamelStore *tostore, const char *tobase, int delete)
+gint
+em_folder_utils_copy_folders(CamelStore *fromstore, const gchar *frombase, CamelStore *tostore, const gchar *tobase, gint delete)
{
struct _EMCopyFolders *m;
- int seq;
+ gint seq;
m = mail_msg_new (&copy_folders_info);
camel_object_ref (fromstore);
@@ -264,7 +264,7 @@ struct _copy_folder_data {
};
static void
-emfu_copy_folder_selected (const char *uri, void *data)
+emfu_copy_folder_selected (const gchar *uri, gpointer data)
{
struct _copy_folder_data *cfd = data;
CamelStore *fromstore = NULL, *tostore = NULL;
@@ -320,11 +320,11 @@ fail:
/* tree here is the 'destination' selector, not 'self' */
static gboolean
-emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, void *data)
+emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
{
struct _copy_folder_data *cfd = data;
- int fromvfolder, tovfolder;
- char *touri;
+ gint fromvfolder, tovfolder;
+ gchar *touri;
guint flags;
gboolean is_store;
@@ -351,7 +351,7 @@ emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *i
/* FIXME: this interface references the folderinfo without copying it */
/* FIXME: these functions must be documented */
void
-em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete)
+em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, gint delete)
{
struct _copy_folder_data *cfd;
@@ -365,7 +365,7 @@ em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete)
}
static void
-emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, void *data)
+emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data)
{
GtkWidget *dialog = data;
@@ -381,7 +381,7 @@ emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, voi
}
static void
-emfu_delete_response (GtkWidget *dialog, int response, gpointer data)
+emfu_delete_response (GtkWidget *dialog, gint response, gpointer data)
{
if (response == GTK_RESPONSE_OK) {
/* disable dialog until operation finishes */
@@ -399,7 +399,7 @@ em_folder_utils_delete_folder (CamelFolder *folder)
{
CamelStore *local;
GtkWidget *dialog;
- int flags = 0;
+ gint flags = 0;
local = mail_component_peek_local_store (NULL);
@@ -430,8 +430,8 @@ em_folder_utils_delete_folder (CamelFolder *folder)
void
em_folder_utils_rename_folder (CamelFolder *folder)
{
- char *prompt, *new_name;
- const char *p;
+ gchar *prompt, *new_name;
+ const gchar *p;
CamelStore *local;
gboolean done = FALSE;
size_t base_len;
@@ -463,7 +463,7 @@ em_folder_utils_rename_folder (CamelFolder *folder)
} else {
CamelFolderInfo *fi;
CamelException ex;
- char *path, *tmp;
+ gchar *path, *tmp;
if (base_len > 0) {
path = g_malloc (base_len + strlen (new_name) + 2);
@@ -481,7 +481,7 @@ em_folder_utils_rename_folder (CamelFolder *folder)
e_error_run(NULL,
"mail:no-rename-folder-exists", folder->name, new_name, NULL);
} else {
- const char *oldpath, *newpath;
+ const gchar *oldpath, *newpath;
oldpath = folder->full_name;
newpath = path;
@@ -511,16 +511,16 @@ struct _EMCreateFolder {
/* input data */
CamelStore *store;
- char *full_name;
- char *parent;
- char *name;
+ gchar *full_name;
+ gchar *parent;
+ gchar *name;
/* output data */
CamelFolderInfo *fi;
/* callback data */
- void (* done) (CamelFolderInfo *fi, void *user_data);
- void *user_data;
+ void (* done) (CamelFolderInfo *fi, gpointer user_data);
+ gpointer user_data;
};
/* Temporary Structure to hold data to pass across function */
@@ -528,7 +528,7 @@ struct _EMCreateFolderTempData
{
EMFolderTree * emft;
EMFolderSelector * emfs;
- char *uri;
+ gchar *uri;
};
static gchar *
@@ -575,12 +575,12 @@ static MailMsgInfo create_folder_info = {
static int
-emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done) (CamelFolderInfo *fi, void *user_data), void *user_data)
+emfu_create_folder_real (CamelStore *store, const gchar *full_name, void (* done) (CamelFolderInfo *fi, gpointer user_data), gpointer user_data)
{
- char *name, *namebuf = NULL;
+ gchar *name, *namebuf = NULL;
struct _EMCreateFolder *m;
- const char *parent;
- int id;
+ const gchar *parent;
+ gint id;
namebuf = g_strdup (full_name);
if (!(name = strrchr (namebuf, '/'))) {
@@ -609,7 +609,7 @@ emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done)
}
static void
-new_folder_created_cb (CamelFolderInfo *fi, void *user_data)
+new_folder_created_cb (CamelFolderInfo *fi, gpointer user_data)
{
struct _EMCreateFolderTempData *emcftd=user_data;
if (fi){
@@ -625,10 +625,10 @@ new_folder_created_cb (CamelFolderInfo *fi, void *user_data)
}
static void
-emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer data)
+emfu_popup_new_folder_response (EMFolderSelector *emfs, gint response, gpointer data)
{
EMFolderTreeModelStoreInfo *si;
- const char *uri, *path;
+ const gchar *uri, *path;
CamelException ex;
CamelStore *store;
struct _EMCreateFolderTempData *emcftd;
diff --git a/mail/em-folder-utils.h b/mail/em-folder-utils.h
index c139a9e74c..d0c5e986c6 100644
--- a/mail/em-folder-utils.h
+++ b/mail/em-folder-utils.h
@@ -35,13 +35,13 @@ gint em_folder_utils_copy_folders (CamelStore *fromstore,
const gchar *frombase,
CamelStore *tostore,
const gchar *tobase,
- int delete);
+ gint delete);
/* FIXME These API's are really busted. There is no consistency and
* most rely on the wrong data. */
void em_folder_utils_copy_folder (CamelFolderInfo *folderinfo,
- int delete);
+ gint delete);
void em_folder_utils_delete_folder (CamelFolder *folder);
void em_folder_utils_rename_folder (CamelFolder *folder);
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index d0f8289a15..5de430e34b 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -115,33 +115,33 @@
#include <X11/XF86keysym.h>
#endif
-static void emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv);
+static void emfv_list_message_selected(MessageList *ml, const gchar *uid, EMFolderView *emfv);
static void emfv_list_built(MessageList *ml, EMFolderView *emfv);
-static int emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
+static gint emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
static void emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
-static int emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv);
+static gint emfv_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderView *emfv);
static void emfv_list_selection_change(ETree *tree, EMFolderView *emfv);
-static void emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderView *);
-static int emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, CamelMimePart *part, EMFolderView *);
+static void emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const gchar *uri, EMFolderView *);
+static gint emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, CamelMimePart *part, EMFolderView *);
static void emfv_enable_menus(EMFolderView *emfv);
-static void emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri);
-static void emfv_set_folder_uri(EMFolderView *emfv, const char *uri);
-static void emfv_set_message(EMFolderView *emfv, const char *uid, int nomarkseen);
-static void emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state);
+static void emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri);
+static void emfv_set_folder_uri(EMFolderView *emfv, const gchar *uri);
+static void emfv_set_message(EMFolderView *emfv, const gchar *uid, gint nomarkseen);
+static void emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint state);
-static void emfv_message_reply(EMFolderView *emfv, int mode);
-static void vfolder_type_current (EMFolderView *emfv, int type);
-static void filter_type_current (EMFolderView *emfv, int type);
+static void emfv_message_reply(EMFolderView *emfv, gint mode);
+static void vfolder_type_current (EMFolderView *emfv, gint type);
+static void filter_type_current (EMFolderView *emfv, gint type);
static void emfv_setting_setup(EMFolderView *emfv);
-static void emfv_on_url_cb(GObject *emitter, const char *url, EMFolderView *emfv);
-static void emfv_on_url(EMFolderView *emfv, const char *uri, const char *nice_uri);
+static void emfv_on_url_cb(GObject *emitter, const gchar *url, EMFolderView *emfv);
+static void emfv_on_url(EMFolderView *emfv, const gchar *uri, const gchar *nice_uri);
-static void emfv_set_seen (EMFolderView *emfv, const char *uid);
+static void emfv_set_seen (EMFolderView *emfv, const gchar *uid);
static gboolean emfv_on_html_button_released_cb (GtkHTML *html, GdkEventButton *button, EMFolderView *emfv);
static gboolean emfv_popup_menu (GtkWidget *widget);
@@ -224,12 +224,12 @@ struct _EMFolderViewPrivate {
guint destroyed:1;
GtkWidget *invisible;
- char *selection_uri;
+ gchar *selection_uri;
GalViewInstance *view_instance;
GalViewMenus *view_menus;
- char *selected_uid;
+ gchar *selected_uid;
};
static GtkVBoxClass *emfv_parent;
@@ -276,7 +276,7 @@ emfv_init(GObject *o)
emfv->ui_app_name = "evolution-mail";
- emfv->enable_map = g_slist_prepend(NULL, (void *)emfv_enable_map);
+ emfv->enable_map = g_slist_prepend(NULL, (gpointer)emfv_enable_map);
emfv->list = (MessageList *)message_list_new();
g_signal_connect(emfv->list, "message_selected", G_CALLBACK(emfv_list_message_selected), emfv);
@@ -464,11 +464,11 @@ GtkWidget *em_folder_view_new(void)
/* flag all selected messages. Return number flagged */
/* FIXME: Should this be part of message-list instead? */
-int
+gint
em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set)
{
GPtrArray *uids;
- int i;
+ gint i;
if (emfv->folder == NULL)
return 0;
@@ -488,17 +488,17 @@ em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set)
}
/* should this be elsewhere/take a uid list? */
-int
+gint
em_folder_view_open_selected(EMFolderView *emfv)
{
GPtrArray *uids, *views;
- int i = 0;
+ gint i = 0;
uids = message_list_get_selected(emfv->list);
if (uids->len >= 10) {
- char *num = g_strdup_printf("%d", uids->len);
- int doit;
+ gchar *num = g_strdup_printf("%d", uids->len);
+ gint doit;
doit = em_utils_prompt_user((GtkWindow *)gtk_widget_get_toplevel((GtkWidget *)emfv),
"/apps/evolution/mail/prompts/open_many",
@@ -524,10 +524,10 @@ em_folder_view_open_selected(EMFolderView *emfv)
CamelVeeMessageInfo *vinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info(emfv->folder, uids->pdata[i]);
if (vinfo) {
- char *uid;
+ gchar *uid;
/* TODO: get_location shouldn't strdup the uid */
CamelFolder *f = camel_vee_folder_get_location((CamelVeeFolder *)emfv->folder, vinfo, &uid);
- char *uri = mail_tools_folder_to_url(f);
+ gchar *uri = mail_tools_folder_to_url(f);
if (em_utils_folder_is_drafts(f, uri) || em_utils_folder_is_outbox(f, uri)) {
GPtrArray *edits = g_ptr_array_new();
@@ -585,7 +585,7 @@ emfv_setup_view_instance(EMFolderView *emfv)
static GalViewCollection *collection = NULL;
struct _EMFolderViewPrivate *p = emfv->priv;
gboolean outgoing, show_wide=FALSE;
- char *id;
+ gchar *id;
g_return_if_fail (emfv->folder);
g_return_if_fail (emfv->folder_uri);
@@ -593,10 +593,10 @@ emfv_setup_view_instance(EMFolderView *emfv)
if (collection == NULL) {
ETableSpecification *spec;
GalViewFactory *factory;
- const char *evolution_dir;
- char *dir;
- char *galviewsmaildir;
- char *etspecfile;
+ const gchar *evolution_dir;
+ gchar *dir;
+ gchar *galviewsmaildir;
+ gchar *etspecfile;
collection = gal_view_collection_new ();
@@ -644,7 +644,7 @@ emfv_setup_view_instance(EMFolderView *emfv)
show_wide = emfv->list_active ? em_folder_browser_get_wide ((EMFolderBrowser *) emfv):FALSE;
if (show_wide) {
- char *safe_id, *filename;
+ gchar *safe_id, *filename;
/* Force to use the wide view */
g_free (p->view_instance->custom_filename);
@@ -678,14 +678,14 @@ emfv_setup_view_instance(EMFolderView *emfv)
if (!gal_view_instance_exists(p->view_instance)) {
struct stat st;
- char *path;
+ gchar *path;
path = mail_config_folder_to_cachename (emfv->folder, "et-header-");
if (path && g_stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
ETableSpecification *spec;
ETableState *state;
GalView *view;
- char *etspecfile;
+ gchar *etspecfile;
spec = e_table_specification_new ();
etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
@@ -725,9 +725,9 @@ void em_folder_view_setup_view_instance (EMFolderView *emfv)
/* ********************************************************************** */
static void
-emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
+emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const gchar *uri)
{
- int isout = (folder && uri
+ gint isout = (folder && uri
&& (em_utils_folder_is_drafts(folder, uri)
|| em_utils_folder_is_sent(folder, uri)
|| em_utils_folder_is_outbox(folder, uri)));
@@ -766,7 +766,7 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
}
static void
-emfv_got_folder(char *uri, CamelFolder *folder, void *data)
+emfv_got_folder(gchar *uri, CamelFolder *folder, gpointer data)
{
EMFolderView *emfv = data;
@@ -774,13 +774,13 @@ emfv_got_folder(char *uri, CamelFolder *folder, void *data)
}
static void
-emfv_set_folder_uri(EMFolderView *emfv, const char *uri)
+emfv_set_folder_uri(EMFolderView *emfv, const gchar *uri)
{
mail_get_folder(uri, 0, emfv_got_folder, emfv, mail_msg_fast_ordered_push);
}
static void
-emfv_set_message(EMFolderView *emfv, const char *uid, int nomarkseen)
+emfv_set_message(EMFolderView *emfv, const gchar *uid, gint nomarkseen)
{
e_profile_event_emit("goto.uid", uid?uid:"<none>", 0);
@@ -801,7 +801,7 @@ emfv_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint
if (p->selection_uri == NULL)
return;
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)p->selection_uri, strlen(p->selection_uri));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)p->selection_uri, strlen(p->selection_uri));
}
static void
@@ -821,14 +821,14 @@ emfv_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EMFolder
In many cases these are the functions called by the bonobo callbacks too */
static void
-emfv_popup_open(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_open(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
em_folder_view_open_selected(emfv);
}
static void
-emfv_popup_edit (EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_edit (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -841,7 +841,7 @@ emfv_popup_edit (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_saveas(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_saveas(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -851,7 +851,7 @@ emfv_popup_saveas(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_view_load_images(BonoboUIComponent *uic, void *data, const char *path)
+emfv_view_load_images(BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -860,21 +860,21 @@ emfv_view_load_images(BonoboUIComponent *uic, void *data, const char *path)
}
static void
-emfv_popup_print(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_print(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
em_folder_view_print(emfv, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
}
static void
-emfv_popup_copy_text(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_copy_text(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
gtk_html_copy (((EMFormatHTML *)emfv->preview)->html);
}
static void
-emfv_popup_source(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_source(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
EMMessageBrowser *emmb;
@@ -894,7 +894,7 @@ emfv_popup_source(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_mail_compose(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_compose(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -905,28 +905,28 @@ emfv_mail_compose(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_popup_reply_sender(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_reply_sender(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
emfv_message_reply(emfv, REPLY_MODE_SENDER);
}
static void
-emfv_popup_reply_list(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_reply_list(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
emfv_message_reply(emfv, REPLY_MODE_LIST);
}
static void
-emfv_popup_reply_all(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_reply_all(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
emfv_message_reply(emfv, REPLY_MODE_ALL);
}
static void
-emfv_popup_forward(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_forward(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -939,7 +939,7 @@ emfv_popup_forward(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids = message_list_get_selected(emfv->list);
@@ -948,7 +948,7 @@ emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -961,7 +961,7 @@ emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids = message_list_get_selected(emfv->list);
@@ -973,14 +973,14 @@ emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_mark_read(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_mark_read(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
}
static void
-emfv_popup_mark_unread(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_mark_unread(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, 0);
@@ -992,21 +992,21 @@ emfv_popup_mark_unread(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_mark_important(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_mark_important(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_FLAGGED);
}
static void
-emfv_popup_mark_unimportant(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_mark_unimportant(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_FLAGGED, 0);
}
static void
-emfv_select_next_message (EMFolderView *emfv, int count, gboolean always_can_previous)
+emfv_select_next_message (EMFolderView *emfv, gint count, gboolean always_can_previous)
{
if (emfv && count == 1) {
if (!message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0) && (emfv->hide_deleted || always_can_previous))
@@ -1015,10 +1015,10 @@ emfv_select_next_message (EMFolderView *emfv, int count, gboolean always_can_pre
}
static void
-emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
- int count;
+ gint count;
count = em_folder_view_mark_selected(emfv,
CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_NOTJUNK|CAMEL_MESSAGE_JUNK_LEARN,
@@ -1028,10 +1028,10 @@ emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
- int count;
+ gint count;
count = em_folder_view_mark_selected(emfv,
CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_NOTJUNK|CAMEL_MESSAGE_JUNK_LEARN,
@@ -1044,11 +1044,11 @@ emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, void *data)
#define DelInVFolderKey "/apps/evolution/mail/prompts/delete_in_vfolder"
static void
-emfv_delete_msg_response (GtkWidget *dialog, int response, gpointer data)
+emfv_delete_msg_response (GtkWidget *dialog, gint response, gpointer data)
{
if (response == GTK_RESPONSE_OK) {
EMFolderView *emfv = data;
- int count;
+ gint count;
GPtrArray *uids;
if (dialog) {
@@ -1113,7 +1113,7 @@ emfv_delete_msg_response (GtkWidget *dialog, int response, gpointer data)
}
static void
-emfv_popup_delete (EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_delete (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GConfClient *gconf = gconf_client_get_default ();
@@ -1142,7 +1142,7 @@ emfv_popup_delete (EPopup *ep, EPopupItem *pitem, void *data)
#undef DelInVFolderKey
static void
-emfv_popup_undelete(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_undelete(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_DELETED, 0);
@@ -1151,13 +1151,13 @@ emfv_popup_undelete(EPopup *ep, EPopupItem *pitem, void *data)
struct _move_data {
EMFolderView *emfv;
GPtrArray *uids;
- int delete;
+ gint delete;
};
-static char *default_xfer_messages_uri = NULL;
+static gchar *default_xfer_messages_uri = NULL;
static void
-emfv_popup_move_cb(const char *uri, void *data)
+emfv_popup_move_cb(const gchar *uri, gpointer data)
{
struct _move_data *d = data;
@@ -1173,7 +1173,7 @@ emfv_popup_move_cb(const char *uri, void *data)
}
static void
-emfv_popup_move(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_move(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
struct _move_data *d;
@@ -1188,7 +1188,7 @@ emfv_popup_move(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_copy(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_copy(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
struct _move_data *d;
@@ -1203,10 +1203,10 @@ emfv_popup_copy(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_set_label (EMFolderView *emfv, const char *label)
+emfv_set_label (EMFolderView *emfv, const gchar *label)
{
GPtrArray *uids = message_list_get_selected (emfv->list);
- int i;
+ gint i;
for (i = 0; i < uids->len; i++)
camel_folder_set_message_user_flag (emfv->folder, uids->pdata[i], label, TRUE);
@@ -1215,10 +1215,10 @@ emfv_set_label (EMFolderView *emfv, const char *label)
}
static void
-emfv_unset_label (EMFolderView *emfv, const char *label)
+emfv_unset_label (EMFolderView *emfv, const gchar *label)
{
GPtrArray *uids = message_list_get_selected (emfv->list);
- int i;
+ gint i;
for (i = 0; i < uids->len; i++) {
camel_folder_set_message_user_flag (emfv->folder, uids->pdata[i], label, FALSE);
@@ -1229,7 +1229,7 @@ emfv_unset_label (EMFolderView *emfv, const char *label)
}
static void
-emfv_popup_label_clear(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_label_clear(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GSList *l;
@@ -1242,7 +1242,7 @@ emfv_popup_label_clear(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_label_set(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_label_set(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
@@ -1253,10 +1253,10 @@ emfv_popup_label_set(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_label_new (EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_label_new (EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
- char *tag = e_util_labels_add_with_dlg (NULL, NULL);
+ gchar *tag = e_util_labels_add_with_dlg (NULL, NULL);
if (tag) {
emfv_set_label (emfv, tag);
@@ -1265,12 +1265,12 @@ emfv_popup_label_new (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_add_sender(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_add_sender(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids = message_list_get_selected(emfv->list);
CamelMessageInfo *info;
- const char *addr;
+ const gchar *addr;
if (uids->len == 1
&& (info = camel_folder_get_message_info(emfv->folder, uids->pdata[0])) != NULL
@@ -1282,7 +1282,7 @@ emfv_popup_add_sender(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_apply_filters(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_apply_filters(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids = message_list_get_selected(emfv->list);
@@ -1291,7 +1291,7 @@ emfv_popup_apply_filters(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-emfv_popup_filter_junk(EPopup *ep, EPopupItem *pitem, void *data)
+emfv_popup_filter_junk(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
GPtrArray *uids = message_list_get_selected(emfv->list);
@@ -1304,7 +1304,7 @@ emfv_popup_filter_junk(EPopup *ep, EPopupItem *pitem, void *data)
#define EMFV_POPUP_AUTO_TYPE(autotype, name, type) \
static void \
-name(EPopup *ep, EPopupItem *item, void *data) \
+name(EPopup *ep, EPopupItem *item, gpointer data) \
{ \
EMFolderView *emfv = data; \
autotype(emfv, type); \
@@ -1382,10 +1382,10 @@ static EPopupItem emfv_popup_items[] = {
};
static enum _e_popup_t
-emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const char *label_tag)
+emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const gchar *label_tag)
{
enum _e_popup_t state = 0;
- int i;
+ gint i;
gboolean exists = FALSE, not_exists = FALSE;
g_return_val_if_fail (emfv != 0, state);
@@ -1395,7 +1395,7 @@ emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const
if (camel_folder_get_message_user_flag (emfv->folder, uids->pdata[i], label_tag))
exists = TRUE;
else {
- const char *label = e_util_labels_get_new_tag (camel_folder_get_message_user_tag (emfv->folder, uids->pdata[i], "label"));
+ const gchar *label = e_util_labels_get_new_tag (camel_folder_get_message_user_tag (emfv->folder, uids->pdata[i], "label"));
/* backward compatibility... */
if (label && !strcmp (label, label_tag))
@@ -1414,7 +1414,7 @@ emfv_popup_labels_get_state_for_tag (EMFolderView *emfv, GPtrArray *uids, const
}
static void
-emfv_popup_labels_free(EPopup *ep, GSList *l, void *data)
+emfv_popup_labels_free(EPopup *ep, GSList *l, gpointer data)
{
while (l) {
GSList *n = l->next;
@@ -1429,19 +1429,19 @@ emfv_popup_labels_free(EPopup *ep, GSList *l, void *data)
}
static void
-emfv_popup_items_free(EPopup *ep, GSList *items, void *data)
+emfv_popup_items_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display)
+emfv_popup(EMFolderView *emfv, GdkEvent *event, gint on_display)
{
GSList *menus = NULL, *l, *label_list = NULL;
GtkMenu *menu;
EMPopup *emp;
EMPopupTargetSelect *target;
- int i;
+ gint i;
/** @HookPoint-EMPopup: Message List Context Menu
* @Id: org.gnome.evolution.mail.folderview.popup.select
@@ -1515,7 +1515,7 @@ emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display)
/* a lot of stuff maps directly to the popup menu equivalent */
#define EMFV_MAP_CALLBACK(from, to) \
static void \
-from(BonoboUIComponent *uid, void *data, const char *path) \
+from(BonoboUIComponent *uid, gpointer data, const gchar *path) \
{ \
to(NULL, NULL, data); \
}
@@ -1547,7 +1547,7 @@ EMFV_MAP_CALLBACK(emfv_print_message, emfv_popup_print)
EMFV_MAP_CALLBACK(emfv_message_source, emfv_popup_source)
static void
-emfv_empty_trash(BonoboUIComponent *uid, void *data, const char *path)
+emfv_empty_trash(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1555,7 +1555,7 @@ emfv_empty_trash(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-prepare_offline(void *key, void *value, void *data)
+prepare_offline(gpointer key, gpointer value, gpointer data)
{
CamelService *service = key;
@@ -1566,13 +1566,13 @@ prepare_offline(void *key, void *value, void *data)
}
static void
-emfv_prepare_offline(BonoboUIComponent *uid, void *data, const char *path)
+emfv_prepare_offline(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
mail_component_stores_foreach(mail_component_peek(), prepare_offline, NULL);
}
static void
-emfv_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
+emfv_edit_cut(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1583,7 +1583,7 @@ emfv_edit_cut(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
+emfv_edit_copy(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1594,7 +1594,7 @@ emfv_edit_copy(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
+emfv_edit_paste(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1602,7 +1602,7 @@ emfv_edit_paste(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_select_all_text(BonoboUIComponent *uid, void *data, const char *path)
+emfv_select_all_text(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
gboolean selected;
@@ -1614,7 +1614,7 @@ emfv_select_all_text(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_mail_next(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_next(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1624,7 +1624,7 @@ emfv_mail_next(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_mail_next_flagged(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_next_flagged(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1632,7 +1632,7 @@ emfv_mail_next_flagged(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_mail_next_unread(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_next_unread(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1641,7 +1641,7 @@ emfv_mail_next_unread(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_mail_next_thread(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_next_thread(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1649,7 +1649,7 @@ emfv_mail_next_thread(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_mail_previous(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_previous(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1657,7 +1657,7 @@ emfv_mail_previous(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_mail_previous_flagged(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_previous_flagged(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1665,7 +1665,7 @@ emfv_mail_previous_flagged(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_mail_previous_unread(BonoboUIComponent *uid, void *data, const char *path)
+emfv_mail_previous_unread(BonoboUIComponent *uid, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1674,7 +1674,7 @@ emfv_mail_previous_unread(BonoboUIComponent *uid, void *data, const char *path)
}
static void
-emfv_message_forward_attached (BonoboUIComponent *uic, void *data, const char *path)
+emfv_message_forward_attached (BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -1687,7 +1687,7 @@ emfv_message_forward_attached (BonoboUIComponent *uic, void *data, const char *p
}
static void
-emfv_message_forward_inline (BonoboUIComponent *uic, void *data, const char *path)
+emfv_message_forward_inline (BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -1700,7 +1700,7 @@ emfv_message_forward_inline (BonoboUIComponent *uic, void *data, const char *pat
}
static void
-emfv_message_forward_quoted (BonoboUIComponent *uic, void *data, const char *path)
+emfv_message_forward_quoted (BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
GPtrArray *uids;
@@ -1713,7 +1713,7 @@ emfv_message_forward_quoted (BonoboUIComponent *uic, void *data, const char *pat
}
static void
-emfv_message_redirect (BonoboUIComponent *uic, void *data, const char *path)
+emfv_message_redirect (BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1727,9 +1727,9 @@ emfv_message_redirect (BonoboUIComponent *uic, void *data, const char *path)
}
static gboolean
-html_contains_nonwhitespace (const char *html, gint len)
+html_contains_nonwhitespace (const gchar *html, gint len)
{
- const char *p;
+ const gchar *p;
gunichar c = 0;
if (!html || len<=0)
@@ -1765,9 +1765,9 @@ html_contains_nonwhitespace (const char *html, gint len)
}
static void
-emfv_message_reply(EMFolderView *emfv, int mode)
+emfv_message_reply(EMFolderView *emfv, gint mode)
{
- char *html = NULL;
+ gchar *html = NULL;
gint len;
if (emfv->list->cursor_uid == NULL)
@@ -1805,7 +1805,7 @@ emfv_message_reply(EMFolderView *emfv, int mode)
}
static void
-emfv_message_search(BonoboUIComponent *uic, void *data, const char *path)
+emfv_message_search(BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1813,7 +1813,7 @@ emfv_message_search(BonoboUIComponent *uic, void *data, const char *path)
}
static void
-emfv_print_preview_message(BonoboUIComponent *uic, void *data, const char *path)
+emfv_print_preview_message(BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1821,7 +1821,7 @@ emfv_print_preview_message(BonoboUIComponent *uic, void *data, const char *path)
}
static void
-emfv_text_zoom_in(BonoboUIComponent *uic, void *data, const char *path)
+emfv_text_zoom_in(BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1830,7 +1830,7 @@ emfv_text_zoom_in(BonoboUIComponent *uic, void *data, const char *path)
}
static void
-emfv_text_zoom_out(BonoboUIComponent *uic, void *data, const char *path)
+emfv_text_zoom_out(BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1839,7 +1839,7 @@ emfv_text_zoom_out(BonoboUIComponent *uic, void *data, const char *path)
}
static void
-emfv_text_zoom_reset(BonoboUIComponent *uic, void *data, const char *path)
+emfv_text_zoom_reset(BonoboUIComponent *uic, gpointer data, const gchar *path)
{
EMFolderView *emfv = data;
@@ -1850,9 +1850,9 @@ emfv_text_zoom_reset(BonoboUIComponent *uic, void *data, const char *path)
/* ********************************************************************** */
struct _filter_data {
- const char *source;
- char *uri;
- int type;
+ const gchar *source;
+ gchar *uri;
+ gint type;
};
static void
@@ -1863,7 +1863,7 @@ filter_data_free (struct _filter_data *fdata)
}
static void
-filter_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data)
+filter_type_got_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer user_data)
{
struct _filter_data *data = user_data;
@@ -1874,7 +1874,7 @@ filter_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage
}
static void
-filter_type_uid (CamelFolder *folder, const char *uid, const char *source, int type)
+filter_type_uid (CamelFolder *folder, const gchar *uid, const gchar *source, gint type)
{
struct _filter_data *data;
@@ -1886,9 +1886,9 @@ filter_type_uid (CamelFolder *folder, const char *uid, const char *source, int t
}
static void
-filter_type_current (EMFolderView *emfv, int type)
+filter_type_current (EMFolderView *emfv, gint type)
{
- const char *source;
+ const gchar *source;
GPtrArray *uids;
if (em_utils_folder_is_sent (emfv->folder, emfv->folder_uri)
@@ -1900,7 +1900,7 @@ filter_type_current (EMFolderView *emfv, int type)
uids = message_list_get_selected (emfv->list);
if (uids->len == 1)
- filter_type_uid (emfv->folder, (char *) uids->pdata[0], source, type);
+ filter_type_uid (emfv->folder, (gchar *) uids->pdata[0], source, type);
em_utils_uids_free (uids);
}
@@ -1911,7 +1911,7 @@ EMFV_MAP_CALLBACK(emfv_tools_filter_recipient, emfv_popup_filter_recipients)
EMFV_MAP_CALLBACK(emfv_tools_filter_mlist, emfv_popup_filter_mlist)
static void
-vfolder_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data)
+vfolder_type_got_message (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer user_data)
{
struct _filter_data *data = user_data;
@@ -1922,7 +1922,7 @@ vfolder_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage
}
static void
-emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data)
+emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
@@ -1951,7 +1951,7 @@ emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data)
static void
-emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, void *data)
+emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
@@ -1978,7 +1978,7 @@ emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, void *data)
}
static void
-vfolder_type_uid (CamelFolder *folder, const char *uid, const char *uri, int type)
+vfolder_type_uid (CamelFolder *folder, const gchar *uid, const gchar *uri, gint type)
{
struct _filter_data *data;
@@ -1990,7 +1990,7 @@ vfolder_type_uid (CamelFolder *folder, const char *uid, const char *uri, int typ
}
static void
-vfolder_type_current (EMFolderView *emfv, int type)
+vfolder_type_current (EMFolderView *emfv, gint type)
{
GPtrArray *uids;
@@ -2000,7 +2000,7 @@ vfolder_type_current (EMFolderView *emfv, int type)
/* ensures vfolder is running */
vfolder_load_storage ();
- vfolder_type_uid (emfv->folder, (char *) uids->pdata[0], emfv->folder_uri, type);
+ vfolder_type_uid (emfv->folder, (gchar *) uids->pdata[0], emfv->folder_uri, type);
}
em_utils_uids_free (uids);
@@ -2170,10 +2170,10 @@ emfv_enable_menus(EMFolderView *emfv)
name = g_string_new("");
for (l = emfv->enable_map; l; l = l->next) {
EMFolderViewEnable *map = l->data;
- int i;
+ gint i;
for (i=0;map[i].name;i++) {
- int state = (map[i].mask & disable_mask) == 0;
+ gint state = (map[i].mask & disable_mask) == 0;
g_string_printf(name, "/commands/%s", map[i].name);
bonobo_ui_component_set_prop(emfv->uic, name->str, "sensitive", state?"1":"0", NULL);
@@ -2184,10 +2184,10 @@ emfv_enable_menus(EMFolderView *emfv)
}
static void
-emfv_view_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfv_view_mode(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
EMFolderView *emfv = data;
- int i;
+ gint i;
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
@@ -2208,7 +2208,7 @@ emfv_view_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_Even
}
static void
-emfv_caret_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfv_caret_mode(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
EMFolderView *emfv = data;
@@ -2221,7 +2221,7 @@ emfv_caret_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_Eve
}
static void
-emfv_charset_changed(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+emfv_charset_changed(BonoboUIComponent *uic, const gchar *path, Bonobo_UIComponent_EventType type, const gchar *state, gpointer data)
{
EMFolderView *emfv = data;
@@ -2240,7 +2240,7 @@ emfv_charset_changed(BonoboUIComponent *uic, const char *path, Bonobo_UIComponen
}
static void
-emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
+emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, gint act)
{
struct _EMFolderViewPrivate *p = emfv->priv;
@@ -2252,7 +2252,7 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
emfv->uic = uic;
for (l = emfv->ui_files;l;l = l->next)
- bonobo_ui_util_set_ui(uic, PREFIX, (char *)l->data, emfv->ui_app_name, NULL);
+ bonobo_ui_util_set_ui(uic, PREFIX, (gchar *)l->data, emfv->ui_app_name, NULL);
bonobo_ui_component_add_verb_list_with_data(uic, emfv_message_verbs, emfv);
e_pixmaps_update(uic, emfv_message_pixmaps);
@@ -2311,7 +2311,7 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
}
}
-int
+gint
em_folder_view_print (EMFolderView *emfv, GtkPrintOperationAction action)
{
EMFormatHTMLPrint *efhp;
@@ -2343,7 +2343,7 @@ exit:
}
EMPopupTargetSelect *
-em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display)
+em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, gint on_display)
{
EMPopupTargetSelect *t;
@@ -2413,7 +2413,7 @@ em_folder_view_set_hide_deleted(EMFolderView *emfv, gboolean status)
struct mst_t {
EMFolderView *emfv;
- char *uid;
+ gchar *uid;
};
static void
@@ -2439,7 +2439,7 @@ do_mark_seen (gpointer user_data)
}
static void
-emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *ex)
+emfv_list_done_message_selected(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *ex)
{
EMFolderView *emfv = data;
EMEvent *eme;
@@ -2533,7 +2533,7 @@ emfv_spin(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
}
static gboolean
-emfv_message_selected_timeout(void *data)
+emfv_message_selected_timeout(gpointer data)
{
EMFolderView *emfv = data;
@@ -2576,7 +2576,7 @@ emfv_message_selected_timeout(void *data)
}
static void
-emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv)
+emfv_list_message_selected(MessageList *ml, const gchar *uid, EMFolderView *emfv)
{
e_profile_event_emit("goto.listuid", uid, 0);
@@ -2623,10 +2623,10 @@ emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent
}
static int
-emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv)
+emfv_list_key_press(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *ev, EMFolderView *emfv)
{
GPtrArray *uids;
- int i;
+ gint i;
guint32 flags;
if ((ev->key.state & GDK_CONTROL_MASK) != 0)
@@ -2698,7 +2698,7 @@ emfv_list_selection_change(ETree *tree, EMFolderView *emfv)
}
static void
-emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderView *emfv)
+emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const gchar *uri, EMFolderView *emfv)
{
if (!strncmp (uri, "##", 2))
return;
@@ -2718,7 +2718,7 @@ emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderVie
}
static void
-emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data)
+emp_uri_popup_link_copy(EPopup *ep, EPopupItem *pitem, gpointer data)
{
EMFolderView *emfv = data;
struct _EMFolderViewPrivate *p = emfv->priv;
@@ -2739,7 +2739,7 @@ static EPopupItem emfv_uri_popups[] = {
};
static void
-emfv_uri_popup_free(EPopup *ep, GSList *list, void *data)
+emfv_uri_popup_free(EPopup *ep, GSList *list, gpointer data)
{
while (list) {
GSList *n = list->next;
@@ -2776,7 +2776,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu
{
GtkWidget *separator;
GList *children, *p;
- char *name;
+ gchar *name;
if (!src_menu)
return des_menu;
@@ -2808,7 +2808,7 @@ emfv_append_menu (EMPopup *des_emp, GtkMenu *des_menu, EMPopup *src_emp, GtkMenu
}
static int
-emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, CamelMimePart *part, EMFolderView *emfv)
+emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, CamelMimePart *part, EMFolderView *emfv)
{
GtkMenu *menu = NULL;
EMPopup *main_emp = NULL;
@@ -2816,7 +2816,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (uri == NULL && part == NULL) {
/* So we don't try and popup with nothing selected - rather odd result! */
GPtrArray *uids = message_list_get_selected(emfv->list);
- int doit = uids->len > 0;
+ gint doit = uids->len > 0;
message_list_free_uids(emfv->list, uids);
if (doit)
@@ -2848,10 +2848,10 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (uri) {
gboolean have_more_uris = strchr (uri, '\n') != NULL;
- const char *act, *next;
+ const gchar *act, *next;
for (act = uri; act; act = next) {
- char *u;
+ gchar *u;
next = strchr (act, '\n');
if (next) {
u = g_strndup (act, next - act);
@@ -2861,7 +2861,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (u && *u) {
GSList *menus = NULL;
- int i;
+ gint i;
EMPopupTargetURI *t;
EMPopup *emp;
EPopupTarget *target;
@@ -2886,7 +2886,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
if (strlen (u) > 100) {
GString *str;
- char *c;
+ gchar *c;
/* the url should be in the form of http://a.b.c/... and we want to
see where the image comes from, so skip first 10 characters and
@@ -2941,7 +2941,7 @@ emfv_format_popup_event(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const
}
static void
-emfv_set_seen(EMFolderView *emfv, const char *uid)
+emfv_set_seen(EMFolderView *emfv, const gchar *uid)
{
guint32 old_flags = camel_folder_get_message_flags(emfv->folder, uid);
@@ -2974,7 +2974,7 @@ enum {
};
/* IF these get too long, update key field */
-static const char * const emfv_display_keys[] = {
+static const gchar * const emfv_display_keys[] = {
"animate_images",
"charset",
"citation_colour",
@@ -2999,7 +2999,7 @@ static void
emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFolderView *emfv)
{
GConfValue *value;
- char *tkey;
+ gchar *tkey;
g_return_if_fail (gconf_entry_get_key (entry) != NULL);
@@ -3017,7 +3017,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
em_format_set_default_charset((EMFormat *)emfv->preview, gconf_value_get_string (value));
break;
case EMFV_CITATION_COLOUR: {
- const char *s;
+ const gchar *s;
GdkColor colour;
guint32 rgb;
@@ -3037,7 +3037,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
break;
case EMFV_MESSAGE_STYLE:
if (EM_FOLDER_VIEW_GET_CLASS (emfv)->update_message_style) {
- int style = gconf_value_get_int (value);
+ gint style = gconf_value_get_int (value);
if (style < EM_FORMAT_NORMAL || style > EM_FORMAT_SOURCE)
style = EM_FORMAT_NORMAL;
@@ -3062,7 +3062,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
p = header_config_list;
while (p) {
EMMailerPrefsHeader *h;
- char *xml = (char *)p->data;
+ gchar *xml = (gchar *)p->data;
h = em_mailer_prefs_header_from_xml(xml);
if (h && h->enabled) {
@@ -3093,7 +3093,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
break; }
case EMFV_SHOW_PREVIEW: {
gboolean state_gconf, state_camel;
- char *ret;
+ gchar *ret;
/* If emfv->folder hasn't been initialized, do nothing */
if (!emfv->folder)
@@ -3128,7 +3128,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
break; }
case EMFV_THREAD_LIST: {
gboolean state_gconf, state_camel;
- char *ret;
+ gchar *ret;
/* If emfv->folder or emfv->list hasn't been initialized, do nothing */
if (!emfv->folder || !emfv->list)
@@ -3149,7 +3149,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
break; }
case EMFV_PANED_SIZE: {
EMFolderBrowser *emfb = (EMFolderBrowser *)emfv;
- int paned_size;
+ gint paned_size;
if (!emfv->list_active || !emfb->vpane || !emfv->preview_active)
return;
@@ -3169,13 +3169,13 @@ emfv_setting_setup(EMFolderView *emfv)
GConfClient *gconf = gconf_client_get_default();
GConfEntry *entry;
GError *err = NULL;
- int i;
- char key[64];
+ gint i;
+ gchar key[64];
if (emfv_setting_key == NULL) {
emfv_setting_key = g_hash_table_new(g_str_hash, g_str_equal);
for (i=1;i<EMFV_SETTINGS;i++)
- g_hash_table_insert(emfv_setting_key, (void *)emfv_display_keys[i-1], GINT_TO_POINTER(i));
+ g_hash_table_insert(emfv_setting_key, (gpointer)emfv_display_keys[i-1], GINT_TO_POINTER(i));
}
gconf_client_add_dir(gconf, "/apps/evolution/mail/display", GCONF_CLIENT_PRELOAD_NONE, NULL);
@@ -3201,7 +3201,7 @@ emfv_setting_setup(EMFolderView *emfv)
}
static void
-emfv_on_url (EMFolderView *emfv, const char *uri, const char *nice_uri)
+emfv_on_url (EMFolderView *emfv, const gchar *uri, const gchar *nice_uri)
{
if (emfv->statusbar_active) {
if (emfv->uic) {
@@ -3215,15 +3215,15 @@ emfv_on_url (EMFolderView *emfv, const char *uri, const char *nice_uri)
}
static void
-emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv)
+emfv_on_url_cb (GObject *emitter, const gchar *url, EMFolderView *emfv)
{
- char *nice_url = NULL;
+ gchar *nice_url = NULL;
if (url) {
if (strncmp (url, "mailto:", 7) == 0) {
CamelInternetAddress *cia = camel_internet_address_new();
CamelURL *curl;
- char *addr;
+ gchar *addr;
curl = camel_url_new(url, NULL);
camel_address_decode((CamelAddress *)cia, curl->path);
@@ -3235,7 +3235,7 @@ emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv)
} else if (strncmp (url, "callto:", 7) == 0 || strncmp (url, "h323:", 5) == 0 || strncmp (url, "sip:", 4) == 0) {
CamelInternetAddress *cia = camel_internet_address_new();
CamelURL *curl;
- char *addr;
+ gchar *addr;
curl = camel_url_new(url, NULL);
camel_address_decode((CamelAddress *)cia, curl->path);
diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h
index 3a7a153131..c9202dcfa3 100644
--- a/mail/em-folder-view.h
+++ b/mail/em-folder-view.h
@@ -71,7 +71,7 @@ enum {
};
struct _EMFolderViewEnable {
- const char *name; /* bonobo name, relative to /commands/ */
+ const gchar *name; /* bonobo name, relative to /commands/ */
guint32 mask; /* disable mask, see EM_FOLDER_VIEW_CAN* flags */
};
@@ -85,13 +85,13 @@ struct _EMFolderView {
struct _EMFormatHTMLDisplay *preview;
struct _CamelFolder *folder;
- char *folder_uri;
+ gchar *folder_uri;
- char *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */
+ gchar *displayed_uid; /* only used to stop re-loads, don't use it to represent any selection state */
/* used to load ui from base activate implementation */
- GSList *ui_files; /* const char * list, TODO: should this be on class? */
- const char *ui_app_name;
+ GSList *ui_files; /* const gchar * list, TODO: should this be on class? */
+ const gchar *ui_app_name;
/* used to manage some menus, particularly plugins */
struct _EMMenu *menu;
@@ -103,7 +103,7 @@ struct _EMFolderView {
GSList *enable_map; /* bonobo menu enable map, entries are 0-terminated EMFolderViewEnable arryas
TODO: should this be on class? */
- int mark_seen_timeout; /* local copy of gconf stuff */
+ gint mark_seen_timeout; /* local copy of gconf stuff */
guint mark_seen:1;
guint preview_active:1; /* is preview being used */
guint statusbar_active:1; /* should we manage the statusbar messages ourselves? */
@@ -118,16 +118,16 @@ struct _EMFolderViewClass {
guint update_message_style:1;
/* if used as a control, used to activate/deactivate custom menu's */
- void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, int state);
+ void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, gint state);
- void (*set_folder_uri)(EMFolderView *emfv, const char *uri);
- void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const char *uri);
- void (*set_message)(EMFolderView *emfv, const char *uid, int nomarkseen);
+ void (*set_folder_uri)(EMFolderView *emfv, const gchar *uri);
+ void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const gchar *uri);
+ void (*set_message)(EMFolderView *emfv, const gchar *uid, gint nomarkseen);
void (*show_search_bar)(EMFolderView *emfv);
/* Signals */
- void (*on_url)(EMFolderView *emfv, const char *uri, const char *nice_uri);
+ void (*on_url)(EMFolderView *emfv, const gchar *uri, const gchar *nice_uri);
void (*loaded)(EMFolderView *emfv);
void (*changed)(EMFolderView *emfv);
@@ -142,12 +142,12 @@ GtkWidget *em_folder_view_new(void);
#define em_folder_view_set_folder_uri(emfv, uri) EM_FOLDER_VIEW_GET_CLASS (emfv)->set_folder_uri((emfv), (uri))
#define em_folder_view_set_message(emfv, uid, nomarkseen) EM_FOLDER_VIEW_GET_CLASS (emfv)->set_message((emfv), (uid), (nomarkseen))
-EMPopupTargetSelect *em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display);
+EMPopupTargetSelect *em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, gint on_display);
-int em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set);
-int em_folder_view_open_selected(EMFolderView *emfv);
+gint em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set);
+gint em_folder_view_open_selected(EMFolderView *emfv);
-int em_folder_view_print(EMFolderView *emfv, GtkPrintOperationAction action);
+gint em_folder_view_print(EMFolderView *emfv, GtkPrintOperationAction action);
/* this could be on message-list */
guint32 em_folder_view_disable_mask(EMFolderView *emfv);
diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c
index 9fec654ae5..ad7cbd7144 100644
--- a/mail/em-format-hook.c
+++ b/mail/em-format-hook.c
@@ -52,7 +52,7 @@ static GHashTable *emfh_types;
*/
-static void *emfh_parent_class;
+static gpointer emfh_parent_class;
#define emfh ((EMFormatHook *)eph)
#define d(x)
@@ -141,7 +141,7 @@ emfh_construct_group(EPluginHook *eph, xmlNodePtr root)
node = root->children;
while (node) {
- if (0 == strcmp((char *)node->name, "item")) {
+ if (0 == strcmp((gchar *)node->name, "item")) {
struct _EMFormatHookItem *item;
item = emfh_construct_item(eph, group, node);
@@ -169,7 +169,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
node = root->children;
while (node) {
- if (strcmp((char *)node->name, "group") == 0) {
+ if (strcmp((gchar *)node->name, "group") == 0) {
struct _EMFormatHookGroup *group;
group = emfh_construct_group(eph, node);
@@ -203,7 +203,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
}
static void
-emfh_enable(EPluginHook *eph, int state)
+emfh_enable(EPluginHook *eph, gint state)
{
GSList *g, *l;
EMFormatClass *klass;
@@ -275,5 +275,5 @@ void em_format_hook_register_type(GType type)
d(printf("registering formatter type '%s'\n", g_type_name(type)));
klass = g_type_class_ref(type);
- g_hash_table_insert(emfh_types, (void *)g_type_name(type), klass);
+ g_hash_table_insert(emfh_types, (gpointer)g_type_name(type), klass);
}
diff --git a/mail/em-format-hook.h b/mail/em-format-hook.h
index 08d99dd63c..553eb7adab 100644
--- a/mail/em-format-hook.h
+++ b/mail/em-format-hook.h
@@ -55,12 +55,12 @@ struct _EMFormatHookItem {
EMFormatHandler handler;
struct _EMFormatHook *hook; /* parent pointer */
- char *format; /* format handler */
+ gchar *format; /* format handler */
};
struct _EMFormatHookGroup {
struct _EMFormatHook *hook; /* parent pointer */
- char *id; /* target formatter id */
+ gchar *id; /* target formatter id */
GSList *items; /* items to consider */
};
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 8d25923658..044ffe598a 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -98,9 +98,9 @@ struct _EMFormatHTMLDisplayPrivate {
GtkWidget *attachment_view; /* weak reference */
};
-static int efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efh);
-static void efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd);
-static void efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd);
+static gint efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efh);
+static void efhd_html_link_clicked (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd);
+static void efhd_html_on_url (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd);
static void efhd_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri);
static gboolean efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
@@ -111,14 +111,14 @@ struct _attach_puri {
const EMFormatHandler *handle;
- const char *snoop_mime_type;
+ const gchar *snoop_mime_type;
/* for the > and V buttons */
GtkWidget *forward, *down;
/* currently no way to correlate this data to the frame :( */
GtkHTML *frame;
CamelStream *output;
- unsigned int shown:1;
+ guint shown:1;
/* Embedded Frame */
GtkHTMLEmbedded *html;
@@ -127,8 +127,8 @@ struct _attach_puri {
EAttachment *attachment;
/* image stuff */
- int fit_width;
- int fit_height;
+ gint fit_width;
+ gint fit_height;
GtkImage *image;
GtkWidget *event_box;
@@ -142,16 +142,16 @@ struct _attach_puri {
static void efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh);
-/*static void efhd_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTMLDisplay *efh);
+/*static void efhd_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTMLDisplay *efh);
static gboolean efhd_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTMLDisplay *efh);*/
static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info);
-static const EMFormatHandler *efhd_find_handler(EMFormat *emf, const char *mime_type);
-static void efhd_format_clone(EMFormat *, CamelFolder *folder, const char *, CamelMimeMessage *msg, EMFormat *);
-static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
+static const EMFormatHandler *efhd_find_handler(EMFormat *emf, const gchar *mime_type);
+static void efhd_format_clone(EMFormat *, CamelFolder *folder, const gchar *, CamelMimeMessage *msg, EMFormat *);
+static void efhd_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt);
static void efhd_format_source(EMFormat *, CamelStream *, CamelMimePart *);
-static void efhd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
+static void efhd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const gchar *, const EMFormatHandler *);
static void efhd_format_optional(EMFormat *, CamelStream *, CamelMimePart *, CamelStream *);
static void efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
@@ -181,7 +181,7 @@ efhd_gtkhtml_realise(GtkHTML *html, EMFormatHTMLDisplay *efhd)
when we are printing. */
style = gtk_widget_get_style((GtkWidget *)html);
if (style) {
- int state = GTK_WIDGET_STATE(html);
+ gint state = GTK_WIDGET_STATE(html);
gushort r, g, b;
r = style->fg[state].red >> 8;
@@ -254,7 +254,7 @@ efhd_finalise(GObject *o)
}
static gboolean
-efhd_bool_accumulator(GSignalInvocationHint *ihint, GValue *out, const GValue *in, void *data)
+efhd_bool_accumulator(GSignalInvocationHint *ihint, GValue *out, const GValue *in, gpointer data)
{
gboolean val = g_value_get_boolean(in);
@@ -364,7 +364,7 @@ EMFormatHTMLDisplay *em_format_html_display_new(void)
return efhd;
}
-void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const char *name)
+void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const gchar *name)
{
printf("FIXME: go to anchor '%s'\n", name);
}
@@ -430,9 +430,9 @@ efhd_iframe_created(GtkHTML *html, GtkHTML *iframe, EMFormatHTMLDisplay *efh)
}
static void
-efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay *efhd, char **uri, EMFormatPURI **puri)
+efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay *efhd, gchar **uri, EMFormatPURI **puri)
{
- char *url, *img_url;
+ gchar *url, *img_url;
g_return_if_fail (html != NULL);
g_return_if_fail (GTK_IS_HTML (html));
@@ -448,7 +448,7 @@ efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay *
if (img_url) {
if (!(strstr (img_url, "://") || g_ascii_strncasecmp (img_url, "cid:", 4) == 0)) {
- char *u = g_filename_to_uri (img_url, NULL, NULL);
+ gchar *u = g_filename_to_uri (img_url, NULL, NULL);
g_free (img_url);
img_url = u;
}
@@ -484,7 +484,7 @@ efhd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatHTMLDisplay *
static int
efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatHTMLDisplay *efhd)
{
- char *uri = NULL;
+ gchar *uri = NULL;
EMFormatPURI *puri = NULL;
gboolean res = FALSE;
@@ -511,7 +511,7 @@ gboolean
em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd)
{
GtkHTML *html;
- char *uri = NULL;
+ gchar *uri = NULL;
EMFormatPURI *puri = NULL;
gboolean res = FALSE;
@@ -527,7 +527,7 @@ em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd)
}
static void
-efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd)
+efhd_html_link_clicked (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd)
{
d(printf("link clicked event '%s'\n", url));
if (url && !strncmp(url, "##", 2)) {
@@ -553,7 +553,7 @@ efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efh
}
static void
-efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd)
+efhd_html_on_url (GtkHTML *html, const gchar *url, EMFormatHTMLDisplay *efhd)
{
d(printf("on_url event '%s'\n", url));
@@ -565,7 +565,7 @@ efhd_html_on_url (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efhd)
/* TODO: move the dialogue elsehwere */
/* FIXME: also in em-format-html.c */
static const struct {
- const char *icon, *shortdesc, *description;
+ const gchar *icon, *shortdesc, *description;
} smime_sign_table[5] = {
{ "stock_signature-bad", N_("Unsigned"), N_("This message is not signed. There is no guarantee that this message is authentic.") },
{ "stock_signature-ok", N_("Valid signature"), N_("This message is signed and is valid meaning that it is very likely that this message is authentic.") },
@@ -576,7 +576,7 @@ static const struct {
};
static const struct {
- const char *icon, *shortdesc, *description;
+ const gchar *icon, *shortdesc, *description;
} smime_encrypt_table[4] = {
{ "stock_lock-broken", N_("Unencrypted"), N_("This message is not encrypted. Its content may be viewed in transit across the Internet.") },
{ "stock_lock-ok", N_("Encrypted, weak"), N_("This message is encrypted, but with a weak encryption algorithm. It would be difficult, but not impossible for an outsider to view the content of this message in a practical amount of time.") },
@@ -584,14 +584,14 @@ static const struct {
{ "stock_lock-ok", N_("Encrypted, strong"), N_("This message is encrypted, with a strong encryption algorithm. It would be very difficult for an outsider to view the content of this message in a practical amount of time.") },
};
-static const char *smime_sign_colour[5] = {
+static const gchar *smime_sign_colour[5] = {
"", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\"",""
};
struct _smime_pobject {
EMFormatHTMLPObject object;
- int signature;
+ gint signature;
CamelCipherValidity *valid;
GtkWidget *widget;
};
@@ -655,11 +655,11 @@ efhd_xpkcs7mime_add_cert_table(GtkWidget *vbox, CamelDList *certlist, struct _sm
{
CamelCipherCertInfo *info = (CamelCipherCertInfo *)certlist->head;
GtkTable *table = (GtkTable *)gtk_table_new(camel_dlist_length(certlist), 2, FALSE);
- int n = 0;
+ gint n = 0;
while (info->next) {
- char *la = NULL;
- const char *l = NULL;
+ gchar *la = NULL;
+ const gchar *l = NULL;
if (info->name) {
if (info->email && strcmp(info->name, info->email) != 0)
@@ -715,7 +715,7 @@ efhd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatHTMLPObject *pobject
struct _smime_pobject *po = (struct _smime_pobject *)pobject;
GladeXML *xml;
GtkWidget *vbox, *w;
- char *gladefile;
+ gchar *gladefile;
if (po->widget)
/* FIXME: window raise? */
@@ -804,7 +804,7 @@ efhd_xpkcs7mime_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
{
GtkWidget *icon, *button;
struct _smime_pobject *po = (struct _smime_pobject *)pobject;
- const char *icon_name;
+ const gchar *icon_name;
/* FIXME: need to have it based on encryption and signing too */
if (po->valid->sign.status != 0)
@@ -835,7 +835,7 @@ efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came
if (emf->valid == valid
&& (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
|| valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
- char *classid;
+ gchar *classid;
struct _smime_pobject *pobj;
camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
@@ -865,7 +865,7 @@ efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came
static void
efhd_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *handle)
{
- char *classid;
+ gchar *classid;
struct _attach_puri *info;
classid = g_strdup_printf("image%s", ((EMFormat *)efh)->part_id->str);
@@ -919,19 +919,19 @@ static EMFormatHandler type_builtin_table[] = {
static void
efhd_builtin_init(EMFormatHTMLDisplayClass *efhc)
{
- int i;
+ gint i;
for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
}
static const EMFormatHandler *
-efhd_find_handler(EMFormat *emf, const char *mime_type)
+efhd_find_handler(EMFormat *emf, const gchar *mime_type)
{
return ((EMFormatClass *) efhd_parent)->find_handler (emf, mime_type);
}
-static void efhd_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src)
+static void efhd_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *src)
{
if (emf != src)
((EMFormatHTML *) emf)->header_wrap_flags = 0;
@@ -952,11 +952,11 @@ efhd_write_image(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- const char *flag, *comp, *due;
+ const gchar *flag, *comp, *due;
time_t date;
- char due_date[128];
+ gchar due_date[128];
struct tm due_tm;
- char *iconpath;
+ gchar *iconpath;
if (emf->folder == NULL || emf->uid == NULL
|| (flag = camel_folder_get_message_user_tag(emf->folder, emf->uid, "follow-up")) == NULL
@@ -974,7 +974,7 @@ static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePar
iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath);
g_free (iconpath);
if (iconpart) {
- char *classid;
+ gchar *classid;
classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp");
camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid);
@@ -1010,7 +1010,7 @@ static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePar
}
/* TODO: if these aren't going to do anything should remove */
-static void efhd_format_error(EMFormat *emf, CamelStream *stream, const char *txt)
+static void efhd_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt)
{
((EMFormatClass *)efhd_parent)->format_error(emf, stream, txt);
}
@@ -1039,7 +1039,7 @@ efhd_can_process_attachment (GtkWidget *button)
/* if it hasn't been processed yet, format the attachment */
static void
-efhd_attachment_show(EPopup *ep, EPopupItem *item, void *data)
+efhd_attachment_show(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _attach_puri *info = data;
@@ -1061,7 +1061,7 @@ efhd_attachment_button_expanded (GtkWidget *widget,
}
static void
-efhd_image_fit(EPopup *ep, EPopupItem *item, void *data)
+efhd_image_fit(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _attach_puri *info = data;
@@ -1070,7 +1070,7 @@ efhd_image_fit(EPopup *ep, EPopupItem *item, void *data)
}
static void
-efhd_image_unfit(EPopup *ep, EPopupItem *item, void *data)
+efhd_image_unfit(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _attach_puri *info = data;
@@ -1087,13 +1087,13 @@ static EPopupItem efhd_menu_items[] = {
};
static void
-efhd_menu_items_free(EPopup *ep, GSList *items, void *data)
+efhd_menu_items_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-efhd_popup_place_widget(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer user_data)
+efhd_popup_place_widget(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
{
GtkWidget *w = user_data;
@@ -1178,7 +1178,7 @@ static void
efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, guint info, guint time, EMFormatHTMLPObject *pobject)
{
CamelMimePart *part = pobject->part;
- char *uri, *uri_crlf, *path;
+ gchar *uri, *uri_crlf, *path;
CamelStream *stream;
switch (info) {
@@ -1204,7 +1204,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g
/* Kludge around Nautilus requesting the same data many times */
uri = g_object_get_data((GObject *)w, "e-drag-uri");
if (uri) {
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri, strlen(uri));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)uri, strlen(uri));
return;
}
@@ -1216,7 +1216,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g
g_free(path);
uri_crlf = g_strconcat(uri, "\r\n", NULL);
g_free(uri);
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)uri_crlf, strlen(uri_crlf));
g_object_set_data_full((GObject *)w, "e-drag-uri", uri_crlf, g_free);
break;
default:
@@ -1227,7 +1227,7 @@ efhd_drag_data_get(GtkWidget *w, GdkDragContext *drag, GtkSelectionData *data, g
static void
efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *pobject)
{
- char *uri;
+ gchar *uri;
uri = g_object_get_data((GObject *)w, "e-drag-uri");
if (uri) {
@@ -1236,7 +1236,7 @@ efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *p
/* NB even more: doesn't the e-drag-uri have \r\n
* appended? (see efhd_drag_data_get())
*/
- char *filename = g_filename_from_uri (uri, NULL, NULL);
+ gchar *filename = g_filename_from_uri (uri, NULL, NULL);
g_unlink(filename);
g_free(filename);
g_object_set_data((GObject *)w, "e-drag-uri", NULL);
@@ -1244,7 +1244,7 @@ efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *p
}
static void
-efhd_write_icon_job(struct _EMFormatHTMLJob *job, int cancelled)
+efhd_write_icon_job(struct _EMFormatHTMLJob *job, gint cancelled)
{
EMFormatHTMLPObject *pobject;
CamelDataWrapper *dw;
@@ -1262,7 +1262,7 @@ static void
efhd_image_resized(GtkWidget *w, GtkAllocation *event, struct _attach_puri *info)
{
GdkPixbuf *pb;
- int width;
+ gint width;
if (info->fit_width == 0)
return;
@@ -1294,7 +1294,7 @@ efhd_change_cursor(GtkWidget *w, GdkEventCrossing *event, struct _attach_puri *i
static void
efhd_image_fit_width(GtkWidget *widget, GdkEventButton *event, struct _attach_puri *info)
{
- int width;
+ gint width;
width = ((GtkWidget *)((EMFormatHTML *)info->puri.format)->html)->allocation.width - 12;
@@ -1345,7 +1345,7 @@ efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObjec
{ NULL, 0, 0 },
{ (gchar *) "text/uri-list", 0, 1 },
};
- char *simple_type;
+ gchar *simple_type;
info = (struct _attach_puri *)em_format_find_puri((EMFormat *)efh, pobject->classid);
@@ -1509,7 +1509,7 @@ efhd_message_add_bar (EMFormat *emf,
CamelMimePart *part,
const EMFormatHandler *info)
{
- const char *classid = "attachment-bar";
+ const gchar *classid = "attachment-bar";
em_format_html_add_pobject (
(EMFormatHTML *) emf,
@@ -1521,9 +1521,9 @@ efhd_message_add_bar (EMFormat *emf,
}
static void
-efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
+efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type, const EMFormatHandler *handle)
{
- char *classid, *text, *html;
+ gchar *classid, *text, *html;
struct _attach_puri *info;
classid = g_strdup_printf ("attachment%s", emf->part_id->str);
@@ -1666,7 +1666,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE);
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW (view));
- gtk_text_buffer_set_text (buffer, (char *)info->mstream->buffer->data, info->mstream->buffer->len);
+ gtk_text_buffer_set_text (buffer, (gchar *)info->mstream->buffer->data, info->mstream->buffer->len);
camel_object_unref(info->mstream);
info->mstream = NULL;
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
@@ -1693,7 +1693,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
static void
efhd_format_optional(EMFormat *emf, CamelStream *fstream, CamelMimePart *part, CamelStream *mstream)
{
- char *classid, *html;
+ gchar *classid, *html;
struct _attach_puri *info;
CamelStream *stream;
diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h
index bd0ea0edd3..16bafc30fb 100644
--- a/mail/em-format-html-display.h
+++ b/mail/em-format-html-display.h
@@ -59,9 +59,9 @@ struct _EMFormatHTMLDisplay {
struct _ESearchingTokenizer *search_tok;
- unsigned int animate:1;
- unsigned int caret_mode:1;
- unsigned int nobar:1;
+ guint animate:1;
+ guint caret_mode:1;
+ guint nobar:1;
};
#define EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY (0)
@@ -72,11 +72,11 @@ struct _EMFormatHTMLDisplayClass {
EMFormatHTMLClass formathtml_class;
/* a link clicked normally */
- void (*link_clicked)(EMFormatHTMLDisplay *efhd, const char *uri);
+ void (*link_clicked)(EMFormatHTMLDisplay *efhd, const gchar *uri);
/* a part or a link button pressed event */
- int (*popup_event)(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, struct _CamelMimePart *part);
+ gint (*popup_event)(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const gchar *uri, struct _CamelMimePart *part);
/* the mouse is over a link */
- void (*on_url)(EMFormatHTMLDisplay *efhd, const char *uri);
+ void (*on_url)(EMFormatHTMLDisplay *efhd, const gchar *uri);
};
GType em_format_html_display_get_type (void);
@@ -85,7 +85,7 @@ EMFormatHTMLDisplay *
void em_format_html_display_goto_anchor
(EMFormatHTMLDisplay *efhd,
- const char *name);
+ const gchar *name);
void em_format_html_display_set_animate
(EMFormatHTMLDisplay *efhd,
@@ -96,12 +96,12 @@ void em_format_html_display_set_caret_mode
void em_format_html_display_set_search
(EMFormatHTMLDisplay *efhd,
- int type,
+ gint type,
GSList *strings);
void em_format_html_display_search (EMFormatHTMLDisplay *efhd);
void em_format_html_display_search_with
(EMFormatHTMLDisplay *efhd,
- char *word);
+ gchar *word);
void em_format_html_display_search_close
(EMFormatHTMLDisplay *efhd);
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index ef1bbb13c4..c5c99bcab1 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -200,7 +200,7 @@ emfhp_complete (EMFormatHTMLPrint *efhp)
}
static void
-emfhp_got_message (CamelFolder *folder, const char *uid,
+emfhp_got_message (CamelFolder *folder, const gchar *uid,
CamelMimeMessage *msg, gpointer data)
{
EMFormatHTMLPrint *efhp = data;
@@ -224,7 +224,7 @@ emfhp_got_message (CamelFolder *folder, const char *uid,
void
em_format_html_print_message (EMFormatHTMLPrint *efhp,
CamelFolder *folder,
- const char *uid)
+ const gchar *uid)
{
g_object_ref (efhp);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index aa82851bc9..c7d35a3423 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -90,12 +90,12 @@
struct _EMFormatHTMLCache {
CamelMultipart *textmp;
- char partid[1];
+ gchar partid[1];
};
struct _EMFormatHTMLPrivate {
struct _CamelMimeMessage *last_part; /* not reffed, DO NOT dereference */
- volatile int format_id; /* format thread id */
+ volatile gint format_id; /* format thread id */
guint format_timeout_id;
struct _format_msg *format_timeout_msg;
@@ -106,16 +106,16 @@ struct _EMFormatHTMLPrivate {
GMutex *lock;
};
-static void efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh);
+static void efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh);
static gboolean efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh);
static void efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh);
static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info);
-static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource);
-static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
+static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource);
+static void efh_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt);
static void efh_format_source(EMFormat *, CamelStream *, CamelMimePart *);
-static void efh_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
+static void efh_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const gchar *, const EMFormatHandler *);
static void efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
static gboolean efh_busy(EMFormat *);
@@ -196,7 +196,7 @@ efh_gtkhtml_destroy(GtkHTML *html, EMFormatHTML *efh)
}
static struct _EMFormatHTMLCache *
-efh_insert_cache(EMFormatHTML *efh, const char *partid)
+efh_insert_cache(EMFormatHTML *efh, const gchar *partid)
{
struct _EMFormatHTMLCache *efhc;
@@ -259,8 +259,8 @@ em_format_html_get_type(void)
sizeof(EMFormatHTML), 0,
(GInstanceInitFunc)efh_init
};
- const char *base_directory = e_get_user_data_dir ();
- char *path;
+ const gchar *base_directory = e_get_user_data_dir ();
+ gchar *path;
/* Trigger creation of mail component. */
mail_component_peek ();
@@ -303,7 +303,7 @@ void em_format_html_load_http(EMFormatHTML *emfh)
}
void
-em_format_html_set_load_http(EMFormatHTML *emfh, int style)
+em_format_html_set_load_http(EMFormatHTML *emfh, gint style)
{
if (emfh->load_http != style) {
emfh->load_http = style;
@@ -312,7 +312,7 @@ em_format_html_set_load_http(EMFormatHTML *emfh, int style)
}
void
-em_format_html_set_mark_citations(EMFormatHTML *emfh, int state, guint32 citation_colour)
+em_format_html_set_mark_citations(EMFormatHTML *emfh, gint state, guint32 citation_colour)
{
if (emfh->mark_citations ^ state || emfh->citation_colour != citation_colour) {
emfh->mark_citations = state;
@@ -328,12 +328,12 @@ em_format_html_set_mark_citations(EMFormatHTML *emfh, int state, guint32 citatio
}
CamelMimePart *
-em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *filename)
+em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar *filename)
{
CamelMimePart *part;
CamelStream *stream;
CamelDataWrapper *dw;
- char *basename;
+ gchar *basename;
stream = camel_stream_fs_new_with_name(filename, O_RDONLY, 0);
if (stream == NULL)
@@ -358,7 +358,7 @@ em_format_html_file_part(EMFormatHTML *efh, const char *mime_type, const char *f
/* all this api is a pain in the bum ... */
EMFormatHTMLPObject *
-em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
+em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const gchar *classid, CamelMimePart *part, EMFormatHTMLPObjectFunc func)
{
EMFormatHTMLPObject *pobj;
@@ -383,7 +383,7 @@ em_format_html_add_pobject(EMFormatHTML *efh, size_t size, const char *classid,
}
EMFormatHTMLPObject *
-em_format_html_find_pobject(EMFormatHTML *emf, const char *classid)
+em_format_html_find_pobject(EMFormatHTML *emf, const gchar *classid)
{
EMFormatHTMLPObject *pw;
@@ -431,7 +431,7 @@ em_format_html_clear_pobject(EMFormatHTML *emf)
}
struct _EMFormatHTMLJob *
-em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, int cancelled), void *data)
+em_format_html_job_new(EMFormatHTML *emfh, void (*callback)(struct _EMFormatHTMLJob *job, gint cancelled), gpointer data)
{
struct _EMFormatHTMLJob *job = g_malloc0(sizeof(*job));
@@ -455,22 +455,22 @@ em_format_html_job_queue(EMFormatHTML *emfh, struct _EMFormatHTMLJob *job)
/* ********************************************************************** */
-static void emfh_getpuri(struct _EMFormatHTMLJob *job, int cancelled)
+static void emfh_getpuri(struct _EMFormatHTMLJob *job, gint cancelled)
{
d(printf(" running getpuri task\n"));
if (!cancelled)
job->u.puri->func((EMFormat *)job->format, job->stream, job->u.puri);
}
-static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled)
+static void emfh_gethttp(struct _EMFormatHTMLJob *job, gint cancelled)
{
CamelStream *cistream = NULL, *costream = NULL, *instream = NULL;
CamelURL *url;
CamelContentType *content_type;
CamelHttpStream *tmp_stream;
ssize_t n, total = 0, pc_complete = 0, nread = 0;
- char buffer[1500];
- const char *length;
+ gchar buffer[1500];
+ const gchar *length;
if (cancelled
|| (url = camel_url_new(job->u.uri, NULL)) == NULL)
@@ -482,7 +482,7 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled)
instream = cistream = camel_data_cache_get(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
if (instream == NULL) {
- char *proxy;
+ gchar *proxy;
if (!(job->format->load_http_now
@@ -567,7 +567,7 @@ badurl:
/* ********************************************************************** */
static void
-efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMFormatHTML *efh)
+efh_url_requested(GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFormatHTML *efh)
{
EMFormatPURI *puri;
struct _EMFormatHTMLJob *job = NULL;
@@ -601,7 +601,7 @@ efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMForma
d(printf(" adding job, get %s\n", url));
job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url));
} else if (g_ascii_strncasecmp(url, "/", 1) == 0) {
- char *data = NULL;
+ gchar *data = NULL;
gsize length = 0;
gboolean status;
@@ -626,7 +626,7 @@ static gboolean
efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
{
EMFormatHTMLPObject *pobject;
- int res = FALSE;
+ gint res = FALSE;
if (eb->classid == NULL)
return FALSE;
@@ -650,7 +650,7 @@ efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh)
/* FIXME: This is duplicated in em-format-html-display, should be exported or in security module */
static const struct {
- const char *icon, *shortdesc;
+ const gchar *icon, *shortdesc;
} smime_sign_table[5] = {
{ "stock_signature-bad", N_("Unsigned") },
{ "stock_signature-ok", N_("Valid signature") },
@@ -660,7 +660,7 @@ static const struct {
};
static const struct {
- const char *icon, *shortdesc;
+ const gchar *icon, *shortdesc;
} smime_encrypt_table[4] = {
{ "stock_lock-broken", N_("Unencrypted") },
{ "stock_lock", N_("Encrypted, weak"),},
@@ -668,7 +668,7 @@ static const struct {
{ "stock_lock-ok", N_("Encrypted, strong") },
};
-static const char *smime_sign_colour[4] = {
+static const gchar *smime_sign_colour[4] = {
"", " bgcolor=\"#88bb88\"", " bgcolor=\"#bb8888\"", " bgcolor=\"#e8d122\""
};
@@ -686,8 +686,8 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
if (emf->valid == valid
&& (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
|| valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
- char *classid, *iconpath;
- const char *icon;
+ gchar *classid, *iconpath;
+ const gchar *icon;
CamelMimePart *iconpart;
camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
@@ -729,9 +729,9 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
CamelMultipart *mp;
CamelDataWrapper *dw;
CamelContentType *type;
- const char *format;
+ const gchar *format;
guint32 flags;
- int i, count, len;
+ gint i, count, len;
struct _EMFormatHTMLCache *efhc;
flags = efh->text_html_flags;
@@ -859,7 +859,7 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
{
#if d(!)0
CamelStream *out;
- int fd;
+ gint fd;
CamelDataWrapper *dw;
fd = dup(STDOUT_FILENO);
@@ -876,10 +876,10 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
static void
efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
- const char *location;
+ const gchar *location;
/* This is set but never used for anything */
EMFormatPURI *puri;
- char *cid = NULL;
+ gchar *cid = NULL;
camel_stream_printf (stream,
"<div style=\"border: solid #%06x 1px; background-color: #%06x; color: #%06x;\">\n"
@@ -923,8 +923,8 @@ static void
efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
CamelContentType *type;
- const char *access_type;
- char *url = NULL, *desc = NULL;
+ const gchar *access_type;
+ gchar *url = NULL, *desc = NULL;
if (!part) {
camel_stream_printf(stream, _("Unknown external-body part."));
@@ -941,9 +941,9 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
if (!g_ascii_strcasecmp(access_type, "ftp") ||
!g_ascii_strcasecmp(access_type, "anon-ftp")) {
- const char *name, *site, *dir, *mode;
- char *path;
- char ftype[16];
+ const gchar *name, *site, *dir, *mode;
+ gchar *path;
+ gchar ftype[16];
name = camel_content_type_param (type, "name");
site = camel_content_type_param (type, "site");
@@ -967,7 +967,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
g_free (path);
desc = g_strdup_printf (_("Pointer to FTP site (%s)"), url);
} else if (!g_ascii_strcasecmp (access_type, "local-file")) {
- const char *name, *site;
+ const gchar *name, *site;
name = camel_content_type_param (type, "name");
site = camel_content_type_param (type, "site");
@@ -980,8 +980,8 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
else
desc = g_strdup_printf(_("Pointer to local file (%s)"), name);
} else if (!g_ascii_strcasecmp (access_type, "URL")) {
- const char *urlparam;
- char *s, *d;
+ const gchar *urlparam;
+ gchar *s, *d;
/* RFC 2017 */
@@ -1046,11 +1046,11 @@ emfh_write_related(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
}
static void
-emfh_multipart_related_check(struct _EMFormatHTMLJob *job, int cancelled)
+emfh_multipart_related_check(struct _EMFormatHTMLJob *job, gint cancelled)
{
struct _EMFormatPURITree *ptree;
EMFormatPURI *puri, *purin;
- char *oldpartid;
+ gchar *oldpartid;
if (cancelled)
return;
@@ -1085,8 +1085,8 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
- const char *start;
- int i, nparts, partidlen, displayid = 0;
+ const gchar *start;
+ gint i, nparts, partidlen, displayid = 0;
/* puri is set but never used */
EMFormatPURI *puri;
struct _EMFormatHTMLJob *job;
@@ -1100,8 +1100,8 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
content_type = camel_mime_part_get_content_type(part);
start = camel_content_type_param (content_type, "start");
if (start && strlen(start)>2) {
- int len;
- const char *cid;
+ gint len;
+ const gchar *cid;
/* strip <>'s */
len = strlen (start) - 2;
@@ -1215,7 +1215,7 @@ static EMFormatHandler type_builtin_table[] = {
static void
efh_builtin_init(EMFormatHTMLClass *efhc)
{
- int i;
+ gint i;
for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
@@ -1231,7 +1231,7 @@ struct _format_msg {
EMFormat *format_source;
EMHTMLStream *estream;
CamelFolder *folder;
- char *uid;
+ gchar *uid;
CamelMimeMessage *message;
};
@@ -1246,7 +1246,7 @@ efh_format_exec (struct _format_msg *m)
{
struct _EMFormatHTMLJob *job;
struct _EMFormatPURITree *puri_level;
- int cancelled = FALSE;
+ gint cancelled = FALSE;
CamelURL *base;
if (m->format->html == NULL)
@@ -1440,7 +1440,7 @@ efh_format_timeout(struct _format_msg *m)
return FALSE;
}
-static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource)
+static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource)
{
EMFormatHTML *efh = (EMFormatHTML *)emf;
struct _format_msg *m;
@@ -1485,9 +1485,9 @@ static void efh_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid
}
}
-static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt)
+static void efh_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt)
{
- char *html;
+ gchar *html;
html = camel_text_to_html (txt, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL|CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
camel_stream_printf(stream, "<em><font color=\"red\">%s</font></em><br>", html);
@@ -1495,10 +1495,10 @@ static void efh_format_error(EMFormat *emf, CamelStream *stream, const char *txt
}
static void
-efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *label, const char *value, guint32 flags)
+efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const gchar *label, const gchar *value, guint32 flags)
{
- const char *fmt, *html;
- char *mhtml = NULL;
+ const gchar *fmt, *html;
+ gchar *mhtml = NULL;
gboolean is_rtl;
if (value == NULL)
@@ -1557,11 +1557,11 @@ static gchar *
efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_address *a, gchar *field)
{
guint32 flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES;
- char *name, *mailto, *addr;
- int i=0;
+ gchar *name, *mailto, *addr;
+ gint i=0;
gboolean wrap = FALSE;
- char *str = NULL;
- int limit = mail_config_get_address_count ();
+ gchar *str = NULL;
+ gint limit = mail_config_get_address_count ();
if (field ) {
if ((!strcmp (field, _("To")) && !(efh->header_wrap_flags & EM_FORMAT_HTML_HEADER_TO))
@@ -1579,11 +1579,11 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
switch (a->type) {
case CAMEL_HEADER_ADDRESS_NAME:
if (name && *name) {
- char *real, *mailaddr;
+ gchar *real, *mailaddr;
g_string_append_printf (out, "%s &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, "?=&()");
@@ -1664,9 +1664,9 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
}
static void
-canon_header_name (char *name)
+canon_header_name (gchar *name)
{
- char *inptr = name;
+ gchar *inptr = name;
/* canonicalise the header name... first letter is
* capitalised and any letter following a '-' also gets
@@ -1688,14 +1688,14 @@ canon_header_name (char *name)
}
static void
-efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const char *charset)
+efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const gchar *charset)
{
EMFormatHTML *efh = (EMFormatHTML *)emf;
- char *name, *buf, *value = NULL;
- const char *label, *txt;
+ gchar *name, *buf, *value = NULL;
+ const gchar *label, *txt;
gboolean addrspec = FALSE;
- char *str_field = NULL;
- int i;
+ gchar *str_field = NULL;
+ gint i;
name = alloca(strlen(header->name)+1);
strcpy(name, header->name);
@@ -1713,7 +1713,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
if (addrspec) {
struct _camel_header_address *addrs;
GString *html;
- char *img;
+ gchar *img;
buf = camel_header_unfold (header->value);
if (!(addrs = camel_header_address_decode (buf, emf->charset ? emf->charset : emf->default_charset))) {
@@ -1724,7 +1724,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
g_free (buf);
html = g_string_new("");
- img = efh_format_address(efh, html, addrs, (char *)label);
+ img = efh_format_address(efh, html, addrs, (gchar *)label);
if (img) {
str_field = g_strdup_printf ("%s%s:", img, label);
@@ -1750,7 +1750,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
txt = value = camel_header_format_ctext (header->value, charset);
flags |= EM_FORMAT_HEADER_BOLD;
} else if (!strcmp (name, "Date") || !strcmp (name, "Resent-Date")) {
- int msg_offset, local_tz;
+ gint msg_offset, local_tz;
time_t msg_date;
struct tm local;
@@ -1768,17 +1768,17 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
msg_offset -= local_tz / 60;
if (msg_offset) {
- char buf[256], *html;
+ gchar buf[256], *html;
msg_offset += (local.tm_hour * 60) + local.tm_min;
if (msg_offset >= (24 * 60) || msg_offset < 0) {
/* translators: strftime format for local time equivalent in Date header display, with day */
- char *msg = g_strdup_printf("<I>%s</I>", _(" (%a, %R %Z)"));
+ gchar *msg = g_strdup_printf("<I>%s</I>", _(" (%a, %R %Z)"));
e_utf8_strftime(buf, sizeof(buf), msg, &local);
g_free(msg);
} else {
/* translators: strftime format for local time equivalent in Date header display, without day */
- char *msg = g_strdup_printf("<I>%s</I>", _(" (%R %Z)"));
+ gchar *msg = g_strdup_printf("<I>%s</I>", _(" (%R %Z)"));
e_utf8_strftime(buf, sizeof(buf), msg, &local);
g_free(msg);
}
@@ -1838,18 +1838,18 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
{
EMFormat *emf = (EMFormat *) efh;
EMFormatHeader *h;
- const char *charset;
+ const gchar *charset;
CamelContentType *ct;
struct _camel_header_raw *header;
gboolean have_icon = FALSE;
- const char *photo_name = NULL;
+ const gchar *photo_name = NULL;
CamelInternetAddress *cia = NULL;
gboolean face_decoded = FALSE, contact_has_photo = FALSE;
guchar *face_header_value = NULL;
gsize face_header_len = 0;
- char *header_sender = NULL, *header_from = NULL, *name;
+ gchar *header_sender = NULL, *header_from = NULL, *name;
gboolean mail_from_delegate = FALSE;
- const char *hdr_charset;
+ const gchar *hdr_charset;
if (!part)
return;
@@ -1935,9 +1935,9 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
header = header->next;
}
} else {
- int mailer_shown = FALSE;
+ gint mailer_shown = FALSE;
while (h->next) {
- int mailer, face;
+ gint mailer, face;
header = ((CamelMimePart *)part)->headers;
mailer = !g_ascii_strcasecmp (h->name, "X-Evolution-Mailer");
@@ -1975,7 +1975,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (strstr(use_header->value, "Evolution"))
have_icon = TRUE;
} else if (!face_decoded && face && !g_ascii_strcasecmp (header->name, "Face")) {
- char *cp = header->value;
+ gchar *cp = header->value;
/* Skip over spaces */
while (*cp == ' ')
@@ -2000,11 +2000,11 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
camel_stream_printf(stream, "</table></td>");
if (photo_name) {
- char *classid;
+ gchar *classid;
CamelMimePart *photopart;
cia = camel_internet_address_new();
- camel_address_decode((CamelAddress *) cia, (const char *) photo_name);
+ camel_address_decode((CamelAddress *) cia, (const gchar *) photo_name);
photopart = em_utils_contact_photo (cia, emf->photo_local);
if (photopart) {
@@ -2024,11 +2024,11 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
}
if (!contact_has_photo && face_decoded) {
- char *classid;
+ gchar *classid;
CamelMimePart *part;
part = camel_mime_part_new ();
- camel_mime_part_set_content ((CamelMimePart *) part, (const char *) face_header_value, face_header_len, "image/png");
+ camel_mime_part_set_content ((CamelMimePart *) part, (const gchar *) face_header_value, face_header_len, "image/png");
classid = g_strdup_printf("icon:///em-format-html/face/photo/header");
camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=48 src=\"%s\"></td>", classid);
em_format_add_puri(emf, sizeof(EMFormatPURI), classid, part, efh_write_image);
@@ -2037,7 +2037,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (have_icon && efh->show_icon) {
GtkIconInfo *icon_info;
- char *classid;
+ gchar *classid;
CamelMimePart *iconpart = NULL;
classid = g_strdup_printf("icon:///em-format-html/%s/icon/header", emf->part_id->str);
@@ -2117,9 +2117,9 @@ static void efh_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart
}
static void
-efh_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
+efh_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type, const EMFormatHandler *handle)
{
- char *text, *html;
+ gchar *text, *html;
/* we display all inlined attachments only */
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
index eb8aec96e9..776a5fb9c9 100644
--- a/mail/em-format-html.h
+++ b/mail/em-format-html.h
@@ -114,13 +114,13 @@ struct _EMFormatHTMLJob {
struct _EMFormatPURITree *puri_level;
CamelURL *base;
- void (*callback)(EMFormatHTMLJob *job, int cancelled);
+ void (*callback)(EMFormatHTMLJob *job, gint cancelled);
union {
- char *uri;
+ gchar *uri;
CamelMedium *msg;
EMFormatPURI *puri;
struct _EMFormatPURITree *puri_level;
- void *data;
+ gpointer data;
} u;
};
@@ -154,7 +154,7 @@ struct _EMFormatHTMLPObject {
void (*free)(EMFormatHTMLPObject *);
EMFormatHTML *format;
- char *classid;
+ gchar *classid;
EMFormatHTMLPObjectFunc func;
CamelMimePart *part;
@@ -213,12 +213,12 @@ struct _EMFormatHTML {
guint32 frame_colour;
guint32 content_colour;
guint32 citation_colour;
- unsigned int load_http:2;
- unsigned int load_http_now:1;
- unsigned int mark_citations:1;
- unsigned int simple_headers:1; /* simple header format, no box/table */
- unsigned int hide_headers:1; /* no headers at all */
- unsigned int show_icon:1; /* show an icon when the sender used Evo */
+ guint load_http:2;
+ guint load_http_now:1;
+ guint mark_citations:1;
+ guint simple_headers:1; /* simple header format, no box/table */
+ guint hide_headers:1; /* no headers at all */
+ guint show_icon:1; /* show an icon when the sender used Evo */
guint32 header_wrap_flags;
EMFormatHTMLState state; /* actual state of the object */
@@ -233,10 +233,10 @@ EMFormatHTML * em_format_html_new (void);
void em_format_html_load_http (EMFormatHTML *efh);
void em_format_html_set_load_http (EMFormatHTML *efh,
- int style);
+ gint style);
void em_format_html_set_mark_citations
(EMFormatHTML *efh,
- int state,
+ gint state,
guint32 citation_colour);
/* retrieves a pseudo-part icon wrapper for a file */
@@ -248,12 +248,12 @@ CamelMimePart * em_format_html_file_part (EMFormatHTML *efh,
EMFormatHTMLPObject *
em_format_html_add_pobject (EMFormatHTML *efh,
size_t size,
- const char *classid,
+ const gchar *classid,
CamelMimePart *part,
EMFormatHTMLPObjectFunc func);
EMFormatHTMLPObject *
em_format_html_find_pobject (EMFormatHTML *efh,
- const char *classid);
+ const gchar *classid);
EMFormatHTMLPObject *
em_format_html_find_pobject_func(EMFormatHTML *efh,
CamelMimePart *part,
@@ -264,8 +264,8 @@ void em_format_html_clear_pobject (EMFormatHTML *efh);
EMFormatHTMLJob *
em_format_html_job_new (EMFormatHTML *efh,
- void (*callback)(EMFormatHTMLJob *job, int cancelled),
- void *data);
+ void (*callback)(EMFormatHTMLJob *job, gint cancelled),
+ gpointer data);
void em_format_html_job_queue (EMFormatHTML *efh,
EMFormatHTMLJob *job);
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index 85249a293c..a61c3f26f5 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -44,14 +44,14 @@
#include "mail-config.h"
struct _EMFormatQuotePrivate {
- int dummy;
+ gint dummy;
};
-static void emfq_format_clone(EMFormat *, CamelFolder *, const char *, CamelMimeMessage *, EMFormat *);
-static void emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
+static void emfq_format_clone(EMFormat *, CamelFolder *, const gchar *, CamelMimeMessage *, EMFormat *);
+static void emfq_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt);
static void emfq_format_message(EMFormat *, CamelStream *, CamelMimePart *, const EMFormatHandler *);
static void emfq_format_source(EMFormat *, CamelStream *, CamelMimePart *);
-static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
+static void emfq_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const gchar *, const EMFormatHandler *);
static void emfq_builtin_init(EMFormatQuoteClass *efhc);
@@ -122,7 +122,7 @@ em_format_quote_get_type(void)
}
EMFormatQuote *
-em_format_quote_new(const char *credits, CamelStream *stream, guint32 flags)
+em_format_quote_new(const gchar *credits, CamelStream *stream, guint32 flags)
{
EMFormatQuote *emfq;
@@ -143,7 +143,7 @@ emfq_format_empty_line(EMFormat *emf, CamelStream *stream, CamelMimePart *part,
}
static void
-emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *src)
+emfq_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *src)
{
EMFormatQuote *emfq = (EMFormatQuote *) emf;
const EMFormatHandler *handle;
@@ -166,16 +166,16 @@ emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMime
}
static void
-emfq_format_error(EMFormat *emf, CamelStream *stream, const char *txt)
+emfq_format_error(EMFormat *emf, CamelStream *stream, const gchar *txt)
{
/* FIXME: should we even bother writing error text for quoting? probably not... */
}
static void
-emfq_format_text_header (EMFormatQuote *emfq, CamelStream *stream, const char *label, const char *value, guint32 flags, int is_html)
+emfq_format_text_header (EMFormatQuote *emfq, CamelStream *stream, const gchar *label, const gchar *value, guint32 flags, gint is_html)
{
- const char *fmt, *html;
- char *mhtml = NULL;
+ const gchar *fmt, *html;
+ gchar *mhtml = NULL;
if (value == NULL)
return;
@@ -206,7 +206,7 @@ static const gchar *addrspec_hdrs[] = {
#if 0
/* FIXME: include Sender and Resent-* headers too? */
/* For Translators only: The following strings are used in the header table in the preview pane */
-static char *i18n_hdrs[] = {
+static gchar *i18n_hdrs[] = {
N_("From"), N_("Reply-To"), N_("To"), N_("Cc"), N_("Bcc")
};
#endif
@@ -215,7 +215,7 @@ static void
emfq_format_address (GString *out, struct _camel_header_address *a)
{
guint32 flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES;
- char *name, *mailto, *addr;
+ gchar *name, *mailto, *addr;
while (a) {
if (a->name)
@@ -226,11 +226,11 @@ emfq_format_address (GString *out, struct _camel_header_address *a)
switch (a->type) {
case CAMEL_HEADER_ADDRESS_NAME:
if (name && *name) {
- char *real, *mailaddr;
+ gchar *real, *mailaddr;
g_string_append_printf (out, "%s &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, "?=&()");
@@ -268,9 +268,9 @@ emfq_format_address (GString *out, struct _camel_header_address *a)
}
static void
-canon_header_name (char *name)
+canon_header_name (gchar *name)
{
- char *inptr = name;
+ gchar *inptr = name;
/* canonicalise the header name... first letter is
* capitalised and any letter following a '-' also gets
@@ -292,15 +292,15 @@ canon_header_name (char *name)
}
static void
-emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const char *namein, guint32 flags, const char *charset)
+emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const gchar *namein, guint32 flags, const gchar *charset)
{
CamelMimeMessage *msg = (CamelMimeMessage *) part;
EMFormatQuote *emfq = (EMFormatQuote *) emf;
- char *name, *buf, *value = NULL;
- const char *txt, *label;
+ gchar *name, *buf, *value = NULL;
+ const gchar *txt, *label;
gboolean addrspec = FALSE;
- int is_html = FALSE;
- int i;
+ gint is_html = FALSE;
+ gint i;
name = g_alloca (strlen (namein) + 1);
strcpy (name, namein);
@@ -374,7 +374,7 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part
{
EMFormat *emf = (EMFormat *) emfq;
CamelContentType *ct;
- const char *charset;
+ const gchar *charset;
EMFormatHeader *h;
if (!part)
@@ -442,10 +442,10 @@ emfq_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
}
static void
-emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
+emfq_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type, const EMFormatHandler *handle)
{
if (handle && em_format_is_inline(emf, emf->part_id->str, part, handle)) {
- char *text, *html;
+ gchar *text, *html;
camel_stream_write_string(stream,
"<table border=1 cellspacing=0 cellpadding=0><tr><td><font size=-1>\n");
@@ -475,7 +475,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
CamelMimeFilter *html_filter;
CamelMimeFilter *sig_strip;
CamelContentType *type;
- const char *format;
+ const gchar *format;
guint32 rgb = 0x737373, flags;
if (!part)
@@ -565,7 +565,7 @@ static EMFormatHandler type_builtin_table[] = {
static void
emfq_builtin_init(EMFormatQuoteClass *efhc)
{
- int i;
+ gint i;
for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
diff --git a/mail/em-format-quote.h b/mail/em-format-quote.h
index 86d277b26e..be88be5956 100644
--- a/mail/em-format-quote.h
+++ b/mail/em-format-quote.h
@@ -59,7 +59,7 @@ struct _EMFormatQuote {
EMFormatQuotePrivate *priv;
- char *credits;
+ gchar *credits;
CamelStream *stream;
guint32 flags;
diff --git a/mail/em-format.c b/mail/em-format.c
index 6b12fedae4..85459682ad 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -65,9 +65,9 @@ struct _EMFormatCache {
struct _CamelCipherValidity *valid; /* validity copy */
struct _CamelMimePart *secured; /* encrypted subpart */
- unsigned int state:2; /* inline state */
+ guint state:2; /* inline state */
- char partid[1];
+ gchar partid[1];
};
#define INLINE_UNSET (0)
@@ -76,8 +76,8 @@ struct _EMFormatCache {
static void emf_builtin_init(EMFormatClass *);
-static const EMFormatHandler *emf_find_handler(EMFormat *emf, const char *mime_type);
-static void emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource);
+static const EMFormatHandler *emf_find_handler(EMFormat *emf, const gchar *mime_type);
+static void emf_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource);
static void emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
static gboolean emf_busy(EMFormat *emf);
enum {
@@ -101,7 +101,7 @@ emf_free_cache(struct _EMFormatCache *efc)
}
static struct _EMFormatCache *
-emf_insert_cache(EMFormat *emf, const char *partid)
+emf_insert_cache(EMFormat *emf, const gchar *partid)
{
struct _EMFormatCache *new;
@@ -297,7 +297,7 @@ em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info)
* Return value: NULL if no handler is available.
**/
static const EMFormatHandler *
-emf_find_handler(EMFormat *emf, const char *mime_type)
+emf_find_handler(EMFormat *emf, const gchar *mime_type)
{
EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS(emf);
@@ -316,13 +316,13 @@ emf_find_handler(EMFormat *emf, const char *mime_type)
* Return value:
**/
const EMFormatHandler *
-em_format_fallback_handler(EMFormat *emf, const char *mime_type)
+em_format_fallback_handler(EMFormat *emf, const gchar *mime_type)
{
- char *mime, *s;
+ gchar *mime, *s;
s = strchr(mime_type, '/');
if (s == NULL)
- mime = (char *)mime_type;
+ mime = (gchar *)mime_type;
else {
size_t len = (s-mime_type)+1;
@@ -359,10 +359,10 @@ em_format_fallback_handler(EMFormat *emf, const char *mime_type)
* are resolved by forgetting the old PURI in the global index.
**/
EMFormatPURI *
-em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *part, EMFormatPURIFunc func)
+em_format_add_puri(EMFormat *emf, size_t size, const gchar *cid, CamelMimePart *part, EMFormatPURIFunc func)
{
EMFormatPURI *puri;
- const char *tmp;
+ const gchar *tmp;
d(printf("adding puri for part: %s\n", emf->part_id->str));
@@ -479,7 +479,7 @@ em_format_pull_level(EMFormat *emf)
* Return value:
**/
EMFormatPURI *
-em_format_find_visible_puri(EMFormat *emf, const char *uri)
+em_format_find_visible_puri(EMFormat *emf, const gchar *uri)
{
EMFormatPURI *pw;
struct _EMFormatPURITree *ptree;
@@ -513,7 +513,7 @@ em_format_find_visible_puri(EMFormat *emf, const char *uri)
**/
EMFormatPURI *
-em_format_find_puri(EMFormat *emf, const char *uri)
+em_format_find_puri(EMFormat *emf, const gchar *uri)
{
return g_hash_table_lookup(emf->pending_uri_table, uri);
}
@@ -582,12 +582,12 @@ em_format_clear_puri_tree(EMFormat *emf)
/* use mime_type == NULL to force showing as application/octet-stream */
void
-em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type)
+em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type)
{
const EMFormatHandler *handle = NULL;
- const char *snoop_save = emf->snoop_mime_type, *tmp;
+ const gchar *snoop_save = emf->snoop_mime_type, *tmp;
CamelURL *base_save = emf->base, *base = NULL;
- char *basestr = NULL;
+ gchar *basestr = NULL;
d(printf("format_part_as()\n"));
@@ -645,7 +645,7 @@ finish:
void
em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
{
- char *mime_type;
+ gchar *mime_type;
CamelDataWrapper *dw;
dw = camel_medium_get_content_object((CamelMedium *)part);
@@ -659,7 +659,7 @@ em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
}
static void
-emf_clone_inlines(void *key, void *val, void *data)
+emf_clone_inlines(gpointer key, gpointer val, gpointer data)
{
struct _EMFormatCache *emfc = val, *new;
@@ -672,7 +672,7 @@ emf_clone_inlines(void *key, void *val, void *data)
}
static void
-emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeMessage *msg, EMFormat *emfsource)
+emf_format_clone(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, EMFormat *emfsource)
{
em_format_clear_puri_tree(emf);
@@ -729,7 +729,7 @@ static void
emf_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid)
{
CamelCipherValidity *save = emf->valid_parent;
- int len;
+ gint len;
/* Note that this also requires support from higher up in the class chain
- validity needs to be cleared when you start output
@@ -861,7 +861,7 @@ em_format_set_mode(EMFormat *emf, em_format_mode_t type)
* required.
**/
void
-em_format_set_charset(EMFormat *emf, const char *charset)
+em_format_set_charset(EMFormat *emf, const gchar *charset)
{
if ((emf->charset && charset && g_ascii_strcasecmp(emf->charset, charset) == 0)
|| (emf->charset == NULL && charset == NULL)
@@ -885,7 +885,7 @@ em_format_set_charset(EMFormat *emf, const char *charset)
* when it isn't).
**/
void
-em_format_set_default_charset(EMFormat *emf, const char *charset)
+em_format_set_default_charset(EMFormat *emf, const gchar *charset)
{
if ((emf->default_charset && charset && g_ascii_strcasecmp(emf->default_charset, charset) == 0)
|| (emf->default_charset == NULL && charset == NULL)
@@ -917,7 +917,7 @@ em_format_clear_headers(EMFormat *emf)
/* note: also copied in em-mailer-prefs.c */
static const struct {
- const char *name;
+ const gchar *name;
guint32 flags;
} default_headers[] = {
{ N_("From"), EM_FORMAT_HEADER_BOLD },
@@ -942,7 +942,7 @@ static const struct {
void
em_format_default_headers(EMFormat *emf)
{
- int i;
+ gint i;
em_format_clear_headers(emf);
for (i=0; i<sizeof(default_headers)/sizeof(default_headers[0]); i++)
@@ -960,7 +960,7 @@ em_format_default_headers(EMFormat *emf)
* headers included in this list will be shown using special
* formatting routines.
**/
-void em_format_add_header(EMFormat *emf, const char *name, guint32 flags)
+void em_format_add_header(EMFormat *emf, const gchar *name, guint32 flags)
{
EMFormatHeader *h;
@@ -986,7 +986,7 @@ void em_format_add_header(EMFormat *emf, const char *name, guint32 flags)
*
* Return value: TRUE/FALSE
**/
-int em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
+gint em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
{
/*CamelContentType *ct = camel_mime_part_get_content_type(part);*/
CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
@@ -1021,10 +1021,10 @@ int em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
*
* Return value:
**/
-int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, const EMFormatHandler *handle)
+gint em_format_is_inline(EMFormat *emf, const gchar *partid, CamelMimePart *part, const EMFormatHandler *handle)
{
struct _EMFormatCache *emfc;
- const char *tmp;
+ const gchar *tmp;
if (handle == NULL)
return FALSE;
@@ -1055,7 +1055,7 @@ int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part,
* @state. This is used only to record the change for a redraw or
* cloned layout render and does not force a redraw.
**/
-void em_format_set_inline(EMFormat *emf, const char *partid, int state)
+void em_format_set_inline(EMFormat *emf, const gchar *partid, gint state)
{
struct _EMFormatCache *emfc;
@@ -1071,10 +1071,10 @@ void em_format_set_inline(EMFormat *emf, const char *partid, int state)
em_format_redraw(emf);
}
-void em_format_format_error(EMFormat *emf, CamelStream *stream, const char *fmt, ...)
+void em_format_format_error(EMFormat *emf, CamelStream *stream, const gchar *fmt, ...)
{
va_list ap;
- char *txt;
+ gchar *txt;
va_start(ap, fmt);
txt = g_strdup_vprintf(fmt, ap);
@@ -1118,7 +1118,7 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
{
CamelStreamFilter *filter_stream;
CamelMimeFilterCharset *filter;
- const char *charset = NULL;
+ const gchar *charset = NULL;
CamelMimeFilterWindows *windows = NULL;
CamelStream *mem_stream = NULL;
size_t size;
@@ -1187,12 +1187,12 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
*
* Return value:
**/
-char *
-em_format_describe_part(CamelMimePart *part, const char *mime_type)
+gchar *
+em_format_describe_part(CamelMimePart *part, const gchar *mime_type)
{
GString *stext;
- const char *filename, *description;
- char *content_type, *desc;
+ const gchar *filename, *description;
+ gchar *content_type, *desc;
stext = g_string_new("");
content_type = g_content_type_from_mime_type (mime_type);
@@ -1260,7 +1260,7 @@ emf_multipart_appledouble(EMFormat *emf, CamelStream *stream, CamelMimePart *par
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
CamelMimePart *mime_part;
- int len;
+ gint len;
if (!CAMEL_IS_MULTIPART(mp)) {
em_format_format_source(emf, stream, part);
@@ -1284,7 +1284,7 @@ static void
emf_multipart_mixed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
- int i, nparts, len;
+ gint i, nparts, len;
if (!CAMEL_IS_MULTIPART(mp)) {
em_format_format_source(emf, stream, part);
@@ -1306,7 +1306,7 @@ static void
emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
- int i, nparts, bestid = 0;
+ gint i, nparts, bestid = 0;
CamelMimePart *best = NULL;
if (!CAMEL_IS_MULTIPART(mp)) {
@@ -1318,7 +1318,7 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par
nparts = camel_multipart_get_number(mp);
for (i = 0; i < nparts; i++) {
CamelContentType *type;
- char *mime_type;
+ gchar *mime_type;
/* is it correct to use the passed in *part here? */
part = camel_multipart_get_part(mp, i);
@@ -1344,7 +1344,7 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par
}
if (best) {
- int len = emf->part_id->len;
+ gint len = emf->part_id->len;
g_string_append_printf(emf->part_id, ".alternative.%d", bestid);
em_format_part(emf, stream, best);
@@ -1358,7 +1358,7 @@ emf_multipart_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *part,
{
CamelCipherContext *context;
CamelException *ex;
- const char *protocol;
+ const gchar *protocol;
CamelMimePart *opart;
CamelCipherValidity *valid;
CamelMultipartEncrypted *mpe;
@@ -1425,9 +1425,9 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)part);
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
- const char *start;
- int i, nparts, partidlen, displayid = 0;
- char *oldpartid;
+ const gchar *start;
+ gint i, nparts, partidlen, displayid = 0;
+ gchar *oldpartid;
struct _EMFormatPURITree *ptree;
EMFormatPURI *puri, *purin;
@@ -1441,8 +1441,8 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
content_type = camel_mime_part_get_content_type(part);
start = camel_content_type_param (content_type, "start");
if (start && strlen(start)>2) {
- int len;
- const char *cid;
+ gint len;
+ const gchar *cid;
/* strip <>'s */
len = strlen (start) - 2;
@@ -1581,7 +1581,7 @@ emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, cons
{
CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
const EMFormatHandler *handle;
- int len;
+ gint len;
if (!CAMEL_IS_MIME_MESSAGE(dw)) {
em_format_format_source(emf, stream, part);
@@ -1616,7 +1616,7 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E
CamelMimePart *opart;
CamelStream *ostream;
CamelException *ex;
- char *type;
+ gchar *type;
if (!ipart) {
em_format_format_error(emf, stream, _("Unknown error verifying signature"));
@@ -1694,7 +1694,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart
CamelException *ex;
CamelMimePart *opart;
CamelDataWrapper *dw;
- char *mime_type;
+ gchar *mime_type;
cipher = camel_gpg_context_new(emf->session);
ex = camel_exception_new();
@@ -1718,7 +1718,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart
/* this ensures to show the 'opart' as inlined, if possible */
if (mime_type && g_ascii_strcasecmp (mime_type, "application/octet-stream") == 0) {
- const char *snoop = em_utils_snoop_type (opart);
+ const gchar *snoop = em_utils_snoop_type (opart);
if (snoop)
camel_data_wrapper_set_mime_type (dw, snoop);
@@ -1764,7 +1764,7 @@ static EMFormatHandler type_builtin_table[] = {
static void
emf_builtin_init(EMFormatClass *klass)
{
- int i;
+ gint i;
for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
g_hash_table_insert(klass->type_handlers, (gpointer) type_builtin_table[i].mime_type, &type_builtin_table[i]);
diff --git a/mail/em-format.h b/mail/em-format.h
index e2363c2b8e..3602e5b75e 100644
--- a/mail/em-format.h
+++ b/mail/em-format.h
@@ -140,14 +140,14 @@ struct _EMFormatPURI {
void (*free)(struct _EMFormatPURI *p); /* optional callback for freeing user-fields */
struct _EMFormat *format;
- char *uri; /* will be the location of the part, may be empty */
- char *cid; /* will always be set, a fake one created if needed */
- char *part_id; /* will always be set, emf->part_id->str for this part */
+ gchar *uri; /* will be the location of the part, may be empty */
+ gchar *cid; /* will always be set, a fake one created if needed */
+ gchar *part_id; /* will always be set, emf->part_id->str for this part */
EMFormatPURIFunc func;
CamelMimePart *part;
- unsigned int use_count; /* used by multipart/related to see if it was accessed */
+ guint use_count; /* used by multipart/related to see if it was accessed */
};
/**
@@ -176,7 +176,7 @@ struct _EMFormatHeader {
struct _EMFormatHeader *next, *prev;
guint32 flags; /* E_FORMAT_HEADER_* */
- char name[1];
+ gchar name[1];
};
#define EM_FORMAT_HEADER_BOLD (1<<0)
@@ -218,7 +218,7 @@ struct _EMFormat {
CamelMimeMessage *message; /* the current message */
CamelFolder *folder;
- char *uid;
+ gchar *uid;
GString *part_id; /* current part id prefix, for identifying parts directly */
@@ -227,7 +227,7 @@ struct _EMFormat {
CamelSession *session; /* session, used for authentication when required */
CamelURL *base; /* content-base header or absolute content-location, for any part */
- const char *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */
+ const gchar *snoop_mime_type; /* if we snooped an application/octet-stream type, what we snooped */
/* for validity enveloping */
CamelCipherValidity *valid;
@@ -245,8 +245,8 @@ struct _EMFormat {
struct _EMFormatPURITree *pending_uri_level;
em_format_mode_t mode; /* source/headers/etc */
- char *charset; /* charset override */
- char *default_charset; /* charset fallback */
+ gchar *charset; /* charset override */
+ gchar *default_charset; /* charset fallback */
gboolean composer; /* Formatting from composer ?*/
gboolean print;
gboolean show_photo; /* Want to show the photo of the sender ?*/
@@ -259,16 +259,16 @@ struct _EMFormatClass {
GHashTable *type_handlers;
/* lookup handler, default falls back to hashtable above */
- const EMFormatHandler *(*find_handler)(EMFormat *, const char *mime_type);
+ const EMFormatHandler *(*find_handler)(EMFormat *, const gchar *mime_type);
/* start formatting a message */
- void (*format_clone)(EMFormat *, CamelFolder *, const char *uid, CamelMimeMessage *, EMFormat *);
+ void (*format_clone)(EMFormat *, CamelFolder *, const gchar *uid, CamelMimeMessage *, EMFormat *);
/* some internel error/inconsistency */
- void (*format_error)(EMFormat *, CamelStream *, const char *msg);
+ void (*format_error)(EMFormat *, CamelStream *, const gchar *msg);
/* use for external structured parts */
- void (*format_attachment)(EMFormat *, CamelStream *, CamelMimePart *, const char *mime_type, const struct _EMFormatHandler *info);
+ void (*format_attachment)(EMFormat *, CamelStream *, CamelMimePart *, const gchar *mime_type, const struct _EMFormatHandler *info);
/* use for unparsable content */
void (*format_source)(EMFormat *, CamelStream *, CamelMimePart *);
@@ -290,22 +290,22 @@ struct _EMFormatClass {
void em_format_set_session(EMFormat *emf, CamelSession *s);
void em_format_set_mode(EMFormat *emf, em_format_mode_t type);
-void em_format_set_charset(EMFormat *emf, const char *charset);
-void em_format_set_default_charset(EMFormat *emf, const char *charset);
+void em_format_set_charset(EMFormat *emf, const gchar *charset);
+void em_format_set_default_charset(EMFormat *emf, const gchar *charset);
void em_format_clear_headers(EMFormat *emf); /* also indicates to show all headers */
void em_format_default_headers(EMFormat *emf);
-void em_format_add_header(EMFormat *emf, const char *name, guint32 flags);
+void em_format_add_header(EMFormat *emf, const gchar *name, guint32 flags);
/* FIXME: Need a 'clone' api to copy details about the current view (inlines etc)
Or maybe it should live with sub-classes? */
-int em_format_is_attachment(EMFormat *emf, CamelMimePart *part);
+gint em_format_is_attachment(EMFormat *emf, CamelMimePart *part);
-int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, const EMFormatHandler *handle);
-void em_format_set_inline(EMFormat *emf, const char *partid, int state);
+gint em_format_is_inline(EMFormat *emf, const gchar *partid, CamelMimePart *part, const EMFormatHandler *handle);
+void em_format_set_inline(EMFormat *emf, const gchar *partid, gint state);
-char *em_format_describe_part(CamelMimePart *part, const char *mimetype);
+gchar *em_format_describe_part(CamelMimePart *part, const gchar *mimetype);
/* for implementers */
GType em_format_get_type(void);
@@ -313,12 +313,12 @@ GType em_format_get_type(void);
void em_format_class_add_handler(EMFormatClass *emfc, EMFormatHandler *info);
void em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info);
#define em_format_find_handler(emf, type) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->find_handler((emf), (type))
-const EMFormatHandler *em_format_fallback_handler(EMFormat *emf, const char *mime_type);
+const EMFormatHandler *em_format_fallback_handler(EMFormat *emf, const gchar *mime_type);
/* puri is short for pending uri ... really */
-EMFormatPURI *em_format_add_puri(EMFormat *emf, size_t size, const char *uri, CamelMimePart *part, EMFormatPURIFunc func);
-EMFormatPURI *em_format_find_visible_puri(EMFormat *emf, const char *uri);
-EMFormatPURI *em_format_find_puri(EMFormat *emf, const char *uri);
+EMFormatPURI *em_format_add_puri(EMFormat *emf, size_t size, const gchar *uri, CamelMimePart *part, EMFormatPURIFunc func);
+EMFormatPURI *em_format_find_visible_puri(EMFormat *emf, const gchar *uri);
+EMFormatPURI *em_format_find_puri(EMFormat *emf, const gchar *uri);
void em_format_clear_puri_tree(EMFormat *emf);
void em_format_push_level(EMFormat *emf);
void em_format_pull_level(EMFormat *emf);
@@ -328,7 +328,7 @@ void em_format_format_clone (EMFormat *emf, CamelFolder *folder, const gchar *ui
/* formats a new message */
void em_format_format(EMFormat *emf, CamelFolder *folder, const gchar *uid, CamelMimeMessage *message);
void em_format_redraw(EMFormat *emf);
-void em_format_format_error(EMFormat *emf, CamelStream *stream, const char *fmt, ...);
+void em_format_format_error(EMFormat *emf, CamelStream *stream, const gchar *fmt, ...);
#define em_format_format_attachment(emf, stream, msg, type, info) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_attachment((emf), (stream), (msg), (type), (info))
#define em_format_format_source(emf, stream, msg) ((EMFormatClass *)G_OBJECT_GET_CLASS(emf))->format_source((emf), (stream), (msg))
void em_format_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
@@ -340,7 +340,7 @@ void em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart
/* raw content text parts - should this just be checked/done by above? */
void em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *part);
-void em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type);
+void em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const gchar *mime_type);
void em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part);
void em_format_merge_handler(EMFormat *new, EMFormat *old);
diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c
index a1615d2d6a..a3284ab33e 100644
--- a/mail/em-html-stream.c
+++ b/mail/em-html-stream.c
@@ -38,9 +38,9 @@ static void em_html_stream_class_init (EMHTMLStreamClass *klass);
static void em_html_stream_init (CamelObject *object);
static void em_html_stream_finalize (CamelObject *object);
-static ssize_t emhs_sync_write(CamelStream *stream, const char *buffer, size_t n);
-static int emhs_sync_close(CamelStream *stream);
-static int emhs_sync_flush(CamelStream *stream);
+static ssize_t emhs_sync_write(CamelStream *stream, const gchar *buffer, size_t n);
+static gint emhs_sync_close(CamelStream *stream);
+static gint emhs_sync_flush(CamelStream *stream);
static EMSyncStreamClass *parent_class = NULL;
@@ -104,7 +104,7 @@ em_html_stream_finalize (CamelObject *object)
}
static ssize_t
-emhs_sync_write(CamelStream *stream, const char *buffer, size_t n)
+emhs_sync_write(CamelStream *stream, const gchar *buffer, size_t n)
{
EMHTMLStream *emhs = EM_HTML_STREAM (stream);
diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c
index b06145acc0..91dc5e10ca 100644
--- a/mail/em-icon-stream.c
+++ b/mail/em-icon-stream.c
@@ -50,15 +50,15 @@ static void em_icon_stream_class_init (EMIconStreamClass *klass);
static void em_icon_stream_init (CamelObject *object);
static void em_icon_stream_finalize (CamelObject *object);
-static ssize_t emis_sync_write(CamelStream *stream, const char *buffer, size_t n);
-static int emis_sync_close(CamelStream *stream);
-static int emis_sync_flush(CamelStream *stream);
+static ssize_t emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n);
+static gint emis_sync_close(CamelStream *stream);
+static gint emis_sync_flush(CamelStream *stream);
static EMSyncStreamClass *parent_class = NULL;
static EMCache *emis_cache;
static void
-emis_cache_free(void *data)
+emis_cache_free(gpointer data)
{
struct _emis_cache_node *node = data;
@@ -133,14 +133,14 @@ em_icon_stream_finalize(CamelObject *object)
}
static ssize_t
-emis_sync_write(CamelStream *stream, const char *buffer, size_t n)
+emis_sync_write(CamelStream *stream, const gchar *buffer, size_t n)
{
EMIconStream *emis = EM_ICON_STREAM (stream);
if (emis->loader == NULL)
return -1;
- if (!gdk_pixbuf_loader_write(emis->loader, (const unsigned char *)buffer, n, NULL)) {
+ if (!gdk_pixbuf_loader_write(emis->loader, (const guchar *)buffer, n, NULL)) {
emis_cleanup(emis);
return -1;
}
@@ -155,10 +155,10 @@ emis_sync_flush(CamelStream *stream)
}
static GdkPixbuf *
-emis_fit(GdkPixbuf *pixbuf, int maxwidth, int maxheight, int *scale)
+emis_fit(GdkPixbuf *pixbuf, gint maxwidth, gint maxheight, gint *scale)
{
GdkPixbuf *mini = NULL;
- int width, height;
+ gint width, height;
width = gdk_pixbuf_get_width(pixbuf);
height = gdk_pixbuf_get_height(pixbuf);
@@ -196,8 +196,8 @@ emis_sync_close(CamelStream *stream)
EMIconStream *emis = (EMIconStream *)stream;
GdkPixbuf *pixbuf, *mini;
struct _emis_cache_node *node;
- char *scalekey;
- int scale;
+ gchar *scalekey;
+ gint scale;
if (emis->loader == NULL)
return -1;
@@ -244,7 +244,7 @@ emis_image_destroy(struct _GtkImage *image, EMIconStream *emis)
}
CamelStream *
-em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsigned int maxheight, int keep)
+em_icon_stream_new(GtkImage *image, const gchar *key, guint maxwidth, guint maxheight, gint keep)
{
EMIconStream *new;
@@ -261,11 +261,11 @@ em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsi
}
GdkPixbuf *
-em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int maxheight)
+em_icon_stream_get_image(const gchar *tkey, guint maxwidth, guint maxheight)
{
struct _emis_cache_node *node;
GdkPixbuf *pb = NULL;
- const char *key;
+ const gchar *key;
key = tkey ? tkey : "";
@@ -274,7 +274,7 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m
node = (struct _emis_cache_node *)em_cache_lookup(emis_cache, key);
if (node) {
- int width, height;
+ gint width, height;
pb = node->pixbuf;
g_object_ref(pb);
@@ -285,8 +285,8 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m
if ((maxwidth && width > maxwidth)
|| (maxheight && height > maxheight)) {
- unsigned int scale;
- char *realkey;
+ guint scale;
+ gchar *realkey;
if (maxheight == 0 || width >= height)
scale = width * EMIS_SCALE / maxwidth;
@@ -317,12 +317,12 @@ em_icon_stream_get_image(const char *tkey, unsigned int maxwidth, unsigned int m
return pb;
}
-int
-em_icon_stream_is_resized(const char *tkey, unsigned int maxwidth, unsigned int maxheight)
+gint
+em_icon_stream_is_resized(const gchar *tkey, guint maxwidth, guint maxheight)
{
- int res = FALSE;
+ gint res = FALSE;
struct _emis_cache_node *node;
- const char *key;
+ const gchar *key;
key = tkey ? tkey : "";
diff --git a/mail/em-icon-stream.h b/mail/em-icon-stream.h
index 321e0cacae..24f4acedc1 100644
--- a/mail/em-icon-stream.h
+++ b/mail/em-icon-stream.h
@@ -41,11 +41,11 @@ struct _GtkIconStream;
typedef struct _EMIconStream {
EMSyncStream sync;
- unsigned int width, height;
+ guint width, height;
guint destroy_id;
struct _GdkPixbufLoader *loader;
struct _GtkImage *image;
- char *key;
+ gchar *key;
guint keep:1;
} EMIconStream;
@@ -55,10 +55,10 @@ typedef struct {
} EMIconStreamClass;
CamelType em_icon_stream_get_type (void);
-CamelStream *em_icon_stream_new(GtkImage *image, const char *key, unsigned int maxwidth, unsigned int maxheight, int keep);
+CamelStream *em_icon_stream_new(GtkImage *image, const gchar *key, guint maxwidth, guint maxheight, gint keep);
-struct _GdkPixbuf *em_icon_stream_get_image(const char *key, unsigned int maxwidth, unsigned int maxheight);
-int em_icon_stream_is_resized(const char *key, unsigned int maxwidth, unsigned int maxheight);
+struct _GdkPixbuf *em_icon_stream_get_image(const gchar *key, guint maxwidth, guint maxheight);
+gint em_icon_stream_is_resized(const gchar *key, guint maxwidth, guint maxheight);
void em_icon_stream_clear_cache(void);
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index ffe9f676b3..7da549cd34 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -39,8 +39,8 @@ static void em_inline_filter_class_init (EMInlineFilterClass *klass);
static void em_inline_filter_init (CamelObject *object);
static void em_inline_filter_finalize (CamelObject *object);
-static void emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace);
-static void emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace);
+static void emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace);
+static void emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace);
static void emif_reset(CamelMimeFilter *f);
static CamelMimeFilterClass *parent_class = NULL;
@@ -106,8 +106,8 @@ enum {
};
static const struct {
- const char *type;
- const char *subtype;
+ const gchar *type;
+ const gchar *subtype;
CamelTransferEncoding encoding;
guint plain:1;
} emif_types[] = {
@@ -120,22 +120,22 @@ static const struct {
};
static void
-emif_add_part(EMInlineFilter *emif, const char *data, int len)
+emif_add_part(EMInlineFilter *emif, const gchar *data, gint len)
{
CamelTransferEncoding encoding;
CamelContentType *content_type;
CamelDataWrapper *dw;
- const char *mimetype;
+ const gchar *mimetype;
CamelMimePart *part;
CamelStream *mem;
- char *type;
+ gchar *type;
if (emif->state == EMIF_PLAIN || emif->state == EMIF_PGPSIGNED || emif->state == EMIF_PGPENCRYPTED)
encoding = emif->base_encoding;
else
encoding = emif_types[emif->state].encoding;
- g_byte_array_append(emif->data, (unsigned char *)data, len);
+ g_byte_array_append(emif->data, (guchar *)data, len);
/* check the part will actually have content */
if (emif->data->len <= 0) {
return;
@@ -191,12 +191,12 @@ emif_add_part(EMInlineFilter *emif, const char *data, int len)
}
static int
-emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
+emif_scan(CamelMimeFilter *f, gchar *in, size_t len, gint final)
{
EMInlineFilter *emif = (EMInlineFilter *)f;
- char *inptr = in, *inend = in+len;
- char *data_start = in;
- char *start = in;
+ gchar *inptr = in, *inend = in+len;
+ gchar *data_start = in;
+ gchar *start = in;
while (inptr < inend) {
start = inptr;
@@ -219,8 +219,8 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
/* This could use some funky plugin shit, but this'll do for now */
if (strncmp(start, "begin ", 6) == 0
&& start[6] >= '0' && start[6] <= '7') {
- int i = 7;
- char *name;
+ gint i = 7;
+ gchar *name;
while (start[i] >='0' && start[i] <='7')
i++;
@@ -267,7 +267,7 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
data_start = inptr;
emif->state = EMIF_PLAIN;
} else {
- int linelen;
+ gint linelen;
/* check the length byte matches the data, if not, output what we have and re-scan this line */
len = ((start[0] - ' ') & 077);
@@ -327,14 +327,14 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
if (final) {
emif_add_part(emif, data_start, inend-data_start);
} else {
- g_byte_array_append(emif->data, (unsigned char *)data_start, inend-data_start);
+ g_byte_array_append(emif->data, (guchar *)data_start, inend-data_start);
}
return 0;
}
static void
-emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
+emif_filter(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace)
{
emif_scan(f, in, len, FALSE);
@@ -344,7 +344,7 @@ emif_filter(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **ou
}
static void
-emif_complete(CamelMimeFilter *f, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
+emif_complete(CamelMimeFilter *f, gchar *in, size_t len, size_t prespace, gchar **out, size_t *outlen, size_t *outprespace)
{
emif_scan(f, in, len, TRUE);
diff --git a/mail/em-inline-filter.h b/mail/em-inline-filter.h
index b6bc38502f..ed5b688dfb 100644
--- a/mail/em-inline-filter.h
+++ b/mail/em-inline-filter.h
@@ -40,13 +40,13 @@ extern "C" {
typedef struct _EMInlineFilter {
CamelMimeFilter filter;
- int state;
+ gint state;
CamelTransferEncoding base_encoding;
CamelContentType *base_type;
GByteArray *data;
- char *filename;
+ gchar *filename;
GSList *parts;
} EMInlineFilter;
diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c
index f95685e351..42c15f754e 100644
--- a/mail/em-junk-hook.c
+++ b/mail/em-junk-hook.c
@@ -37,7 +37,7 @@
static GHashTable *emjh_types;
static GObjectClass *parent_class = NULL;
-static void *emjh_parent_class;
+static gpointer emjh_parent_class;
static GObjectClass *emj_parent;
#define emjh ((EMJunkHook *)eph)
@@ -63,7 +63,7 @@ static const EPluginHookTargetKey emjh_flag_map[] = {
*/
-static void manage_error (const char *msg, GError *error);
+static void manage_error (const gchar *msg, GError *error);
GQuark
em_junk_error_quark (void)
@@ -71,7 +71,7 @@ em_junk_error_quark (void)
return g_quark_from_static_string ("em-junk-error-quark");
}
-static const char *
+static const gchar *
em_junk_get_name (CamelJunkPlugin *csp);
static void
@@ -82,7 +82,7 @@ em_junk_init(CamelJunkPlugin *csp)
((EPluginClass *)G_OBJECT_GET_CLASS(item->hook->hook.plugin))->enable(item->hook->hook.plugin, 1);
}
-static const char *
+static const gchar *
em_junk_get_name (CamelJunkPlugin *csp)
{
struct _EMJunkHookItem *item = (EMJunkHookItem *)csp;
@@ -248,7 +248,7 @@ emjh_construct_group(EPluginHook *eph, xmlNodePtr root)
/* We'll processs only the first item from xml file*/
while (node) {
- if (0 == strcmp((char *)node->name, "item")) {
+ if (0 == strcmp((gchar *)node->name, "item")) {
struct _EMJunkHookItem *item;
item = emjh_construct_item(eph, group, node);
@@ -284,7 +284,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
node = root->children;
while (node) {
- if (strcmp((char *)node->name, "group") == 0) {
+ if (strcmp((gchar *)node->name, "group") == 0) {
struct _EMJunkHookGroup *group;
group = emjh_construct_group(eph, node);
@@ -302,7 +302,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
struct manage_error_idle_data
{
- const char *msg;
+ const gchar *msg;
GError *error;
};
@@ -334,7 +334,7 @@ manage_error_idle (gpointer data)
}
static void
-manage_error (const char *msg, GError *error)
+manage_error (const gchar *msg, GError *error)
{
struct manage_error_idle_data *mei;
@@ -350,7 +350,7 @@ manage_error (const char *msg, GError *error)
/*XXX: don't think we need here*/
static void
-emjh_enable(EPluginHook *eph, int state)
+emjh_enable(EPluginHook *eph, gint state)
{
GSList *g;
@@ -436,5 +436,5 @@ em_junk_hook_register_type(GType type)
d(printf("registering junk plugin type '%s'\n", g_type_name(type)));
klass = g_type_class_ref(type);
- g_hash_table_insert(emjh_types, (void *)g_type_name(type), klass);
+ g_hash_table_insert(emjh_types, (gpointer)g_type_name(type), klass);
}
diff --git a/mail/em-junk-hook.h b/mail/em-junk-hook.h
index 0e467a20bd..9e7c999b29 100644
--- a/mail/em-junk-hook.h
+++ b/mail/em-junk-hook.h
@@ -56,17 +56,17 @@ struct _EMJunkHookTarget {
struct _EMJunkHookItem {
CamelJunkPlugin csp;
struct _EMJunkHook *hook; /* parent pointer */
- char *check_junk;
- char *report_junk;
- char *report_non_junk;
- char *commit_reports;
- char *validate_binary;
- char *plugin_name;
+ gchar *check_junk;
+ gchar *report_junk;
+ gchar *report_non_junk;
+ gchar *commit_reports;
+ gchar *validate_binary;
+ gchar *plugin_name;
};
struct _EMJunkHookGroup {
struct _EMJunkHook *hook; /* parent pointer */
- char *id; /* target id */
+ gchar *id; /* target id */
GSList *items; /* items to consider */
};
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 27f27ca721..a03bcd6cf3 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -71,7 +71,7 @@ static GType col_types[] = {
};
/* temporarily copied from em-format.c */
-static const char *default_headers[] = {
+static const gchar *default_headers[] = {
N_("From"),
N_("Reply-To"),
N_("To"),
@@ -88,8 +88,8 @@ static const char *default_headers[] = {
/* for empty trash on exit frequency */
static const struct {
- const char *label;
- int days;
+ const gchar *label;
+ gint days;
} empty_trash_frequency[] = {
{ N_("Every time"), 0 },
{ N_("Once per day"), 1 },
@@ -309,7 +309,7 @@ jh_tree_refill (EMMailerPrefs *prefs)
for (l = cjh; l; l = l->next) {
GtkTreeIter iter;
- char **tokens = g_strsplit (l->data, "=", 2);
+ gchar **tokens = g_strsplit (l->data, "=", 2);
gtk_list_store_append (store, &iter);
gtk_list_store_set (
@@ -329,7 +329,7 @@ jh_add_cb (GtkWidget *widget, gpointer user_data)
{
EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
GtkWidget *dialog, *l1, *l2, *entry1, *entry2, *vbox, *hbox;
- int response;
+ gint response;
dialog = gtk_dialog_new_with_buttons (_("Add Custom Junk Header"), (GtkWindow *)gtk_widget_get_toplevel (widget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);
vbox = gtk_vbox_new (FALSE, 6);
@@ -351,9 +351,9 @@ jh_add_cb (GtkWidget *widget, gpointer user_data)
gtk_container_add ((GtkContainer *)((GtkDialog *)dialog)->vbox, vbox);
response = gtk_dialog_run ((GtkDialog *)dialog);
if (response == GTK_RESPONSE_ACCEPT) {
- const char *name = gtk_entry_get_text ((GtkEntry *)entry1);
- const char *value = gtk_entry_get_text ((GtkEntry *)entry2);
- char *tok;
+ const gchar *name = gtk_entry_get_text ((GtkEntry *)entry1);
+ const gchar *value = gtk_entry_get_text ((GtkEntry *)entry2);
+ gchar *tok;
GSList *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
/* FIXME: Validate the values */
@@ -381,13 +381,13 @@ jh_remove_cb (GtkWidget *widget, gpointer user_data)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (prefs->junk_header_tree));
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- char *name=NULL, *value=NULL;
+ gchar *name=NULL, *value=NULL;
GSList *prev = NULL, *node, *list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
gtk_tree_model_get (model, &iter, JH_LIST_COLUMN_NAME, &name, JH_LIST_COLUMN_VALUE, &value, -1);
node = list;
while (node) {
- char *test;
- int len = strlen (name);
+ gchar *test;
+ gint len = strlen (name);
test = strncmp (node->data, name, len) == 0 ? (gchar *) node->data+len:NULL;
if (test) {
@@ -488,7 +488,7 @@ init_label_tree (GtkWidget *label_tree, EMMailerPrefs *prefs, gboolean locked)
static void
label_add_cb (GtkWidget *widget, gpointer user_data)
{
- char *tag;
+ gchar *tag;
tag = e_util_labels_add_with_dlg (GTK_WINDOW (gtk_widget_get_toplevel (widget)), NULL);
@@ -535,7 +535,7 @@ label_edit_cb (GtkWidget *widget, gpointer user_data)
gtk_tree_model_get (model, &iter, LABEL_LIST_COLUMN_TAG, &tag, -1);
if (tag) {
- char *str = e_util_labels_add_with_dlg (GTK_WINDOW (gtk_widget_get_toplevel (widget)), tag);
+ gchar *str = e_util_labels_add_with_dlg (GTK_WINDOW (gtk_widget_get_toplevel (widget)), tag);
g_free (str);
}
@@ -569,7 +569,7 @@ emmp_header_remove_sensitivity (EMMailerPrefs *prefs)
}
static gboolean
-emmp_header_is_valid (const char *header)
+emmp_header_is_valid (const gchar *header)
{
gint len = g_utf8_strlen (header, -1);
@@ -584,7 +584,7 @@ emmp_header_is_valid (const char *header)
static void
emmp_header_add_sensitivity (EMMailerPrefs *prefs)
{
- const char *entry_contents;
+ const gchar *entry_contents;
GtkTreeIter iter;
gboolean valid;
@@ -601,7 +601,7 @@ emmp_header_add_sensitivity (EMMailerPrefs *prefs)
/* check if this is a duplicate */
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (prefs->header_list_store), &iter);
while (valid) {
- char *header_name;
+ gchar *header_name;
gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
HEADER_LIST_HEADER_COLUMN, &header_name,
@@ -630,7 +630,7 @@ emmp_save_headers (EMMailerPrefs *prefs)
while (valid) {
struct _EMMailerPrefsHeader h;
gboolean enabled;
- char *xml;
+ gchar *xml;
gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
HEADER_LIST_HEADER_COLUMN, &h.name,
@@ -650,12 +650,12 @@ emmp_save_headers (EMMailerPrefs *prefs)
}
static void
-emmp_header_list_enabled_toggled (GtkCellRendererToggle *cell, const char *path_string, EMMailerPrefs *prefs)
+emmp_header_list_enabled_toggled (GtkCellRendererToggle *cell, const gchar *path_string, EMMailerPrefs *prefs)
{
GtkTreeModel *model = GTK_TREE_MODEL (prefs->header_list_store);
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
GtkTreeIter iter;
- int enabled;
+ gint enabled;
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, HEADER_LIST_ENABLED_COLUMN, &enabled, -1);
@@ -728,7 +728,7 @@ emmp_header_entry_changed (GtkWidget *entry, gpointer user_data)
static void
mark_seen_timeout_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
{
- int timeout;
+ gint timeout;
timeout = (int) (gtk_spin_button_get_value (prefs->timeout) * 1000.0);
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/mark_seen_timeout", timeout, NULL);
@@ -737,7 +737,7 @@ mark_seen_timeout_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
static void
address_compress_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
{
- int count;
+ gint count;
count = (int) gtk_spin_button_get_value (prefs->address_count);
@@ -747,7 +747,7 @@ address_compress_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
static void
mlimit_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
{
- int count;
+ gint count;
count = (int) gtk_spin_button_get_value (prefs->mlimit_count);
@@ -755,12 +755,12 @@ mlimit_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
}
static void
-spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, float div, GCallback value_changed)
+spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const gchar *key, float div, GCallback value_changed)
{
GError *err = NULL;
double min, max;
- char *mkey, *p;
- int val;
+ gchar *mkey, *p;
+ gint val;
gtk_spin_button_get_range (spin, &min, &max);
@@ -791,7 +791,7 @@ spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, fl
gtk_spin_button_set_value (spin, (1.0 * val) / div);
if (value_changed) {
- g_object_set_data ((GObject *) spin, "key", (void *) key);
+ g_object_set_data ((GObject *) spin, "key", (gpointer) key);
g_signal_connect (spin, "value-changed", value_changed, prefs);
}
@@ -802,7 +802,7 @@ spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, fl
static void
toggle_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs)
{
- const char *key;
+ const gchar *key;
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
@@ -867,7 +867,7 @@ font_changed (GtkFontButton *font_button, EMMailerPrefs *prefs)
}
static void
-toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, const char *key, GCallback toggled)
+toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, gint not, const gchar *key, GCallback toggled)
{
gboolean bool;
@@ -875,7 +875,7 @@ toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, cons
gtk_toggle_button_set_active (toggle, not ? !bool : bool);
if (toggled) {
- g_object_set_data ((GObject *) toggle, "key", (void *) key);
+ g_object_set_data ((GObject *) toggle, "key", (gpointer) key);
g_signal_connect (toggle, "toggled", toggled, prefs);
}
@@ -887,7 +887,7 @@ static void
charset_activate (GtkWidget *item, EMMailerPrefs *prefs)
{
GtkWidget *menu;
- char *string;
+ gchar *string;
menu = gtk_option_menu_get_menu (prefs->charset);
if (!(string = e_charset_picker_get_charset (menu)))
@@ -902,7 +902,7 @@ charset_menu_init (EMMailerPrefs *prefs)
{
GtkWidget *menu, *item;
GList *items;
- char *buf;
+ gchar *buf;
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/charset", NULL);
menu = e_charset_picker_new (buf && *buf ? buf : camel_iconv_locale_charset ());
@@ -923,7 +923,7 @@ charset_menu_init (EMMailerPrefs *prefs)
static void
trash_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs)
{
- int idx;
+ gint idx;
idx = gtk_combo_box_get_active (combobox);
g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency));
@@ -934,7 +934,7 @@ trash_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs)
static void
emmp_empty_trash_init (EMMailerPrefs *prefs)
{
- int locked, days, hist = 0, i;
+ gint locked, days, hist = 0, i;
toggle_button_init (prefs, prefs->empty_trash, FALSE,
"/apps/evolution/mail/trash/empty_on_exit",
@@ -960,7 +960,7 @@ emmp_empty_trash_init (EMMailerPrefs *prefs)
static void
junk_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs)
{
- int idx;
+ gint idx;
idx = gtk_combo_box_get_active (combobox);
g_return_if_fail (idx >= 0 && idx < G_N_ELEMENTS (empty_trash_frequency));
@@ -971,7 +971,7 @@ junk_days_changed (GtkComboBox *combobox, EMMailerPrefs *prefs)
static void
emmp_empty_junk_init (EMMailerPrefs *prefs)
{
- int locked, days, hist = 0, i;
+ gint locked, days, hist = 0, i;
toggle_button_init (prefs, prefs->empty_junk, FALSE,
"/apps/evolution/mail/junk/empty_on_exit",
@@ -997,7 +997,7 @@ emmp_empty_junk_init (EMMailerPrefs *prefs)
static void
http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs)
{
- int when;
+ gint when;
if (gtk_toggle_button_get_active (prefs->images_always))
when = MAIL_CONFIG_HTTP_ALWAYS;
@@ -1011,7 +1011,7 @@ http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs)
static GtkWidget *
-emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMMailerPrefs *prefs = data;
@@ -1039,7 +1039,7 @@ static EMConfigItem emmp_items[] = {
};
static void
-emmp_free(EConfig *ec, GSList *items, void *data)
+emmp_free(EConfig *ec, GSList *items, gpointer data)
{
/* the prefs data is freed automagically */
@@ -1049,7 +1049,7 @@ emmp_free(EConfig *ec, GSList *items, void *data)
static void
junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
{
- char *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
+ gchar *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
const GList *plugins = mail_session_get_junk_plugins();
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL);
@@ -1062,7 +1062,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
session->junk_plugin = CAMEL_JUNK_PLUGIN (&(item->csp));
status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL;
if ((gboolean)status == TRUE) {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
text = g_strdup_printf (_("%s plugin is available and the binary is installed."), item->plugin_name);
html = g_strdup_printf ("<i>%s</i>", text);
@@ -1070,7 +1070,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
g_free (html);
g_free (text);
} else {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-warning", GTK_ICON_SIZE_MENU);
text = g_strdup_printf (_("%s plugin is not available. Please check whether the package is installed."), item->plugin_name);
html = g_strdup_printf ("<i>%s</i>", text);
@@ -1087,10 +1087,10 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
static void
junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
{
- int index = 0;
+ gint index = 0;
gboolean def_set = FALSE;
const GList *plugins = mail_session_get_junk_plugins();
- char *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
+ gchar *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
if (!plugins || !g_list_length ((GList *)plugins)) {
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("No Junk plugin available"));
@@ -1115,7 +1115,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index);
status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL;
if (status) {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
/* May be a better text */
text = g_strdup_printf (_("%s plugin is available and the binary is installed."), item->plugin_name);
@@ -1124,7 +1124,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
g_free (html);
g_free (text);
} else {
- char *text, *html;
+ gchar *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-warning", GTK_ICON_SIZE_MENU);
/* May be a better text */
text = g_strdup_printf (_("%s plugin is not available. Please check whether the package is installed."), item->plugin_name);
@@ -1156,14 +1156,14 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
GtkTreeIter iter;
- char *font, *buf;
+ gchar *font, *buf;
GladeXML *gui;
gboolean locked;
- int val, i;
+ gint val, i;
EMConfig *ec;
EMConfigTargetPrefs *target;
GSList *l;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-config.glade",
@@ -1399,7 +1399,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
h = g_malloc (sizeof (struct _EMMailerPrefsHeader));
h->is_default = TRUE;
h->name = g_strdup (default_headers[i]);
- h->enabled = strcmp ((char *)default_headers[i], "x-evolution-mailer") != 0;
+ h->enabled = strcmp ((gchar *)default_headers[i], "x-evolution-mailer") != 0;
g_hash_table_insert (default_header_hash, (gpointer) default_headers[i], h);
header_add_list = g_slist_append (header_add_list, h);
}
@@ -1409,7 +1409,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
p = header_config_list;
while (p) {
struct _EMMailerPrefsHeader *h, *def;
- char *xml = (char *) p->data;
+ gchar *xml = (gchar *) p->data;
h = em_mailer_prefs_header_from_xml (xml);
if (h) {
@@ -1433,7 +1433,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
p = header_add_list;
while (p) {
struct _EMMailerPrefsHeader *h = (struct _EMMailerPrefsHeader *) p->data;
- const char *name;
+ const gchar *name;
if (g_ascii_strcasecmp (h->name, EM_FORMAT_HEADER_XMAILER) == 0)
name = _("Mailer");
@@ -1525,10 +1525,10 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
return NULL;
root = doc->children;
- if (strcmp ((char *)root->name, "header") != 0)
+ if (strcmp ((gchar *)root->name, "header") != 0)
return NULL;
- name = xmlGetProp (root, (const unsigned char *)"name");
+ name = xmlGetProp (root, (const guchar *)"name");
if (name == NULL)
return NULL;
@@ -1536,7 +1536,7 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
h->name = g_strdup ((gchar *)name);
xmlFree (name);
- if (xmlHasProp (root, (const unsigned char *)"enabled"))
+ if (xmlHasProp (root, (const guchar *)"enabled"))
h->enabled = 1;
else
h->enabled = 0;
@@ -1554,12 +1554,12 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
* is an error.
**/
struct _EMMailerPrefsHeader *
-em_mailer_prefs_header_from_xml (const char *xml)
+em_mailer_prefs_header_from_xml (const gchar *xml)
{
struct _EMMailerPrefsHeader *header;
xmlDocPtr doc;
- if (!(doc = xmlParseDoc ((unsigned char *) xml)))
+ if (!(doc = xmlParseDoc ((guchar *) xml)))
return NULL;
header = emmp_header_from_xmldoc (doc);
@@ -1592,24 +1592,24 @@ em_mailer_prefs_header_free (struct _EMMailerPrefsHeader *header)
* Returns the passed header as a XML structure,
* or NULL on error
*/
-char *
+gchar *
em_mailer_prefs_header_to_xml (struct _EMMailerPrefsHeader *header)
{
xmlDocPtr doc;
xmlNodePtr root;
xmlChar *xml;
- char *out;
- int size;
+ gchar *out;
+ gint size;
g_return_val_if_fail (header != NULL, NULL);
g_return_val_if_fail (header->name != NULL, NULL);
- doc = xmlNewDoc ((const unsigned char *)"1.0");
+ doc = xmlNewDoc ((const guchar *)"1.0");
- root = xmlNewDocNode (doc, NULL, (const unsigned char *)"header", NULL);
- xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)header->name);
+ root = xmlNewDocNode (doc, NULL, (const guchar *)"header", NULL);
+ xmlSetProp (root, (const guchar *)"name", (guchar *)header->name);
if (header->enabled)
- xmlSetProp (root, (const unsigned char *)"enabled", NULL);
+ xmlSetProp (root, (const guchar *)"enabled", NULL);
xmlDocSetRootElement (doc, root);
xmlDocDumpMemory (doc, &xml, &size);
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index 10503a8461..917c00c932 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -56,7 +56,7 @@ typedef struct _EMMailerPrefsClass EMMailerPrefsClass;
typedef struct _EMMailerPrefsHeader EMMailerPrefsHeader;
struct _EMMailerPrefsHeader {
- char *name;
+ gchar *name;
guint enabled:1;
guint is_default:1;
};
@@ -150,8 +150,8 @@ GtkWidget * create_combo_text_widget (void);
struct _GtkWidget *em_mailer_prefs_new (void);
-EMMailerPrefsHeader *em_mailer_prefs_header_from_xml(const char *xml);
-char *em_mailer_prefs_header_to_xml(EMMailerPrefsHeader *header);
+EMMailerPrefsHeader *em_mailer_prefs_header_from_xml(const gchar *xml);
+gchar *em_mailer_prefs_header_to_xml(EMMailerPrefsHeader *header);
void em_mailer_prefs_header_free(EMMailerPrefsHeader *header);
/* needed by global config */
diff --git a/mail/em-menu.c b/mail/em-menu.c
index b504bd3304..f0da9c8820 100644
--- a/mail/em-menu.c
+++ b/mail/em-menu.c
@@ -50,7 +50,7 @@
#include <e-util/e-util.h>
-static void emp_standard_menu_factory(EMenu *emp, void *data);
+static void emp_standard_menu_factory(EMenu *emp, gpointer data);
static GObjectClass *emp_parent;
@@ -114,7 +114,7 @@ em_menu_get_type(void)
return type;
}
-EMMenu *em_menu_new(const char *menuid)
+EMMenu *em_menu_new(const gchar *menuid)
{
EMMenu *emp = g_object_new(em_menu_get_type(), NULL);
@@ -134,12 +134,12 @@ EMMenu *em_menu_new(const char *menuid)
* Return value:
**/
EMMenuTargetSelect *
-em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
+em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids)
{
EMMenuTargetSelect *t = e_menu_target_new(&emp->popup, EM_MENU_TARGET_SELECT, sizeof(*t));
guint32 mask = ~0;
- int i;
- const char *tmp;
+ gint i;
+ const gchar *tmp;
/* NB: This is identical to em-popup-target-new-select function */
@@ -243,7 +243,7 @@ em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w)
}
static void
-emp_standard_menu_factory(EMenu *emp, void *data)
+emp_standard_menu_factory(EMenu *emp, gpointer data)
{
/* noop */
}
@@ -276,7 +276,7 @@ emp_standard_menu_factory(EMenu *emp, void *data)
*/
-static void *emph_parent_class;
+static gpointer emph_parent_class;
#define emph ((EMMenuHook *)eph)
static const EMenuHookTargetMask emph_select_masks[] = {
@@ -323,7 +323,7 @@ emph_finalise(GObject *o)
static void
emph_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emph_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.bonobomenu:1.0";
diff --git a/mail/em-menu.h b/mail/em-menu.h
index cdcc12bcae..96f571407c 100644
--- a/mail/em-menu.h
+++ b/mail/em-menu.h
@@ -73,7 +73,7 @@ typedef struct _EMMenuTargetSelect EMMenuTargetSelect;
struct _EMMenuTargetSelect {
EMenuTarget target;
struct _CamelFolder *folder;
- char *uri;
+ gchar *uri;
GPtrArray *uids;
};
@@ -98,9 +98,9 @@ struct _EMMenuClass {
GType em_menu_get_type(void);
-EMMenu *em_menu_new(const char *menuid);
+EMMenu *em_menu_new(const gchar *menuid);
-EMMenuTargetSelect *em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids);
+EMMenuTargetSelect *em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids);
EMMenuTargetWidget *em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w);
/* ********************************************************************** */
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 3f5beb3f84..1745171ac0 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -84,11 +84,11 @@
/* upgrade helper functions */
static xmlDocPtr
-emm_load_xml (const char *dirname, const char *filename)
+emm_load_xml (const gchar *dirname, const gchar *filename)
{
xmlDocPtr doc;
struct stat st;
- char *path;
+ gchar *path;
path = g_strdup_printf ("%s/%s", dirname, filename);
if (stat (path, &st) == -1 || !(doc = xmlParseFile (path))) {
@@ -102,10 +102,10 @@ emm_load_xml (const char *dirname, const char *filename)
}
static int
-emm_save_xml (xmlDocPtr doc, const char *dirname, const char *filename)
+emm_save_xml (xmlDocPtr doc, const gchar *dirname, const gchar *filename)
{
- char *path;
- int retval;
+ gchar *path;
+ gint retval;
path = g_strdup_printf ("%s/%s", dirname, filename);
retval = e_xml_save_file (path, doc);
@@ -115,13 +115,13 @@ emm_save_xml (xmlDocPtr doc, const char *dirname, const char *filename)
}
static xmlNodePtr
-xml_find_node (xmlNodePtr parent, const char *name)
+xml_find_node (xmlNodePtr parent, const gchar *name)
{
xmlNodePtr node;
node = parent->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, name))
+ if (node->name && !strcmp ((gchar *)node->name, name))
return node;
node = node->next;
@@ -131,15 +131,15 @@ xml_find_node (xmlNodePtr parent, const char *name)
}
static void
-upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
+upgrade_xml_uris (xmlDocPtr doc, gchar * (* upgrade_uri) (const gchar *uri))
{
xmlNodePtr root, node;
- char *uri, *new;
+ gchar *uri, *new;
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
- if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
+ if (!root->name || strcmp ((gchar *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
@@ -151,27 +151,27 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, "rule")) {
+ if (node->name && !strcmp ((gchar *)node->name, "rule")) {
xmlNodePtr actionset, part, val, n;
if ((actionset = xml_find_node (node, "actionset"))) {
/* filters.xml */
part = actionset->children;
while (part != NULL) {
- if (part->name && !strcmp ((char *)part->name, "part")) {
+ if (part->name && !strcmp ((gchar *)part->name, "part")) {
val = part->children;
while (val != NULL) {
- if (val->name && !strcmp ((char *)val->name, "value")) {
- char *type;
+ if (val->name && !strcmp ((gchar *)val->name, "value")) {
+ gchar *type;
- type = (char *)xmlGetProp (val, (const unsigned char *)"type");
- if (type && !strcmp ((char *)type, "folder")) {
+ type = (gchar *)xmlGetProp (val, (const guchar *)"type");
+ if (type && !strcmp ((gchar *)type, "folder")) {
if ((n = xml_find_node (val, "folder"))) {
- uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
+ uri = (gchar *)xmlGetProp (n, (const guchar *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
- xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
+ xmlSetProp (n, (const guchar *)"uri", (guchar *)new);
g_free (new);
}
}
@@ -189,12 +189,12 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
/* vfolders.xml */
n = actionset->children;
while (n != NULL) {
- if (n->name && !strcmp ((char *)n->name, "folder")) {
- uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
+ if (n->name && !strcmp ((gchar *)n->name, "folder")) {
+ uri = (gchar *)xmlGetProp (n, (const guchar *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
- xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
+ xmlSetProp (n, (const guchar *)"uri", (guchar *)new);
g_free (new);
}
@@ -211,25 +211,25 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
/* as much info as we have on a given account */
struct _account_info_1_0 {
- char *name;
- char *uri;
- char *base_uri;
+ gchar *name;
+ gchar *uri;
+ gchar *base_uri;
union {
struct {
/* for imap */
- char *namespace;
- char *namespace_full;
+ gchar *namespace;
+ gchar *namespace_full;
guint32 capabilities;
GHashTable *folders;
- char dir_sep;
+ gchar dir_sep;
} imap;
} u;
};
struct _imap_folder_info_1_0 {
- char *folder;
+ gchar *folder;
/* encoded? decoded? canonicalised? */
- char dir_sep;
+ gchar dir_sep;
};
static GHashTable *accounts_1_0 = NULL;
@@ -254,10 +254,10 @@ account_info_1_0_free (struct _account_info_1_0 *ai)
g_free(ai);
}
-static char *
-get_base_uri(const char *val)
+static gchar *
+get_base_uri(const gchar *val)
{
- const char *tmp;
+ const gchar *tmp;
tmp = strchr(val, ':');
if (tmp) {
@@ -273,14 +273,14 @@ get_base_uri(const char *val)
return g_strdup(val);
}
-static char *
-upgrade_xml_uris_1_0 (const char *uri)
+static gchar *
+upgrade_xml_uris_1_0 (const gchar *uri)
{
- char *out = NULL;
+ gchar *out = NULL;
/* upgrades camel uri's */
if (strncmp (uri, "imap:", 5) == 0) {
- char *base_uri, dir_sep, *folder, *p;
+ gchar *base_uri, dir_sep, *folder, *p;
struct _account_info_1_0 *ai;
/* add namespace, canonicalise dir_sep to / */
@@ -318,7 +318,7 @@ upgrade_xml_uris_1_0 (const char *uri)
folder = g_strdup (uri + strlen (base_uri) + 1);
/* Add the namespace before the mailbox name, unless the mailbox is INBOX */
- if (ai->u.imap.namespace && strcmp ((char *)folder, "INBOX") != 0)
+ if (ai->u.imap.namespace && strcmp ((gchar *)folder, "INBOX") != 0)
out = g_strdup_printf ("%s/%s/%s", base_uri, ai->u.imap.namespace, folder);
else
out = g_strdup_printf ("%s/%s", base_uri, folder);
@@ -333,7 +333,7 @@ upgrade_xml_uris_1_0 (const char *uri)
g_free (folder);
g_free (base_uri);
} else if (strncmp (uri, "exchange:", 9) == 0) {
- char *base_uri, *folder, *p;
+ gchar *base_uri, *folder, *p;
/* exchange://user@host/exchange/ * -> exchange://user@host/personal/ * */
/* Any url encoding (%xx) in the folder name is also removed */
@@ -353,10 +353,10 @@ upgrade_xml_uris_1_0 (const char *uri)
return out;
}
-static char *
-parse_lsub (const char *lsub, char *dir_sep)
+static gchar *
+parse_lsub (const gchar *lsub, gchar *dir_sep)
{
- static int comp;
+ static gint comp;
static regex_t pat;
regmatch_t match[3];
const gchar *m = "^\\* LSUB \\([^)]*\\) \"?([^\" ]+)\"? \"?(.*)\"?$";
@@ -385,7 +385,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
{
FILE *storeinfo;
guint32 tmp;
- char *buf, *folder, dir_sep, *path, *name, *p;
+ gchar *buf, *folder, dir_sep, *path, *name, *p;
struct _imap_folder_info_1_0 *fi;
si->u.imap.folders = g_hash_table_new_full (
@@ -398,7 +398,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
if (name) {
name = strstr (si->uri, ";namespace=");
if (name) {
- char *end;
+ gchar *end;
name += strlen (";namespace=");
if (*name == '\"') {
@@ -480,9 +480,9 @@ static int
load_accounts_1_0 (xmlDocPtr doc)
{
xmlNodePtr source;
- char *val, *tmp;
- int count = 0, i;
- char key[32];
+ gchar *val, *tmp;
+ gint count = 0, i;
+ gchar key[32];
if (!(source = e_bconf_get_path (doc, "/Mail/Accounts")))
return 0;
@@ -495,7 +495,7 @@ load_accounts_1_0 (xmlDocPtr doc)
/* load account upgrade info for each account */
for (i = 0; i < count; i++) {
struct _account_info_1_0 *ai;
- char *rawuri;
+ gchar *rawuri;
sprintf (key, "source_url_%d", i);
if (!(rawuri = e_bconf_get_value (source, key)))
@@ -519,11 +519,11 @@ load_accounts_1_0 (xmlDocPtr doc)
- this will be picked up later in the conversion */
sprintf (key, "transport_url_%d", i);
node = e_bconf_get_entry (source, key);
- if (node && (val = (char *)xmlGetProp (node, (const unsigned char *)"value"))) {
+ if (node && (val = (gchar *)xmlGetProp (node, (const guchar *)"value"))) {
tmp = e_bconf_hex_decode (val);
xmlFree (val);
if (strncmp (tmp, "exchanget:", 10) == 0)
- xmlSetProp (node, (const unsigned char *)"value", (unsigned char *)rawuri);
+ xmlSetProp (node, (const guchar *)"value", (guchar *)rawuri);
g_free (tmp);
} else {
d(printf (" couldn't find transport uri?\n"));
@@ -540,7 +540,7 @@ load_accounts_1_0 (xmlDocPtr doc)
}
static int
-em_migrate_1_0 (const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex)
+em_migrate_1_0 (const gchar *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex)
{
accounts_1_0 = g_hash_table_new_full (
g_str_hash, g_str_equal,
@@ -560,13 +560,13 @@ em_migrate_1_0 (const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr fil
/* 1.2 upgrade functions */
static int
-is_xml1encoded (const char *txt)
+is_xml1encoded (const gchar *txt)
{
- const unsigned char *p;
- int isxml1 = FALSE;
- int is8bit = FALSE;
+ const guchar *p;
+ gint isxml1 = FALSE;
+ gint is8bit = FALSE;
- p = (const unsigned char *)txt;
+ p = (const guchar *)txt;
while (*p) {
if (p[0] == '\\' && p[1] == 'U' && p[2] == '+'
&& isxdigit (p[3]) && isxdigit (p[4]) && isxdigit (p[5]) && isxdigit (p[6])
@@ -585,24 +585,24 @@ is_xml1encoded (const char *txt)
return isxml1;
}
-static char *
-decode_xml1 (const char *txt)
+static gchar *
+decode_xml1 (const gchar *txt)
{
GString *out = g_string_new ("");
- const unsigned char *p;
- char *res;
+ const guchar *p;
+ gchar *res;
/* convert:
\U+XXXX\ -> utf8
8 bit characters -> utf8 (iso-8859-1) */
- p = (const unsigned char *) txt;
+ p = (const guchar *) txt;
while (*p) {
if (p[0] > 0x80
|| (p[0] == '\\' && p[1] == 'U' && p[2] == '+'
&& isxdigit (p[3]) && isxdigit (p[4]) && isxdigit (p[5]) && isxdigit (p[6])
&& p[7] == '\\')) {
- char utf8[8];
+ gchar utf8[8];
gunichar u;
if (p[0] == '\\') {
@@ -626,12 +626,12 @@ decode_xml1 (const char *txt)
return res;
}
-static char *
-utf8_reencode (const char *txt)
+static gchar *
+utf8_reencode (const gchar *txt)
{
GString *out = g_string_new ("");
gchar *p;
- char *res;
+ gchar *res;
/* convert:
libxml1 8 bit utf8 converted to xml entities byte-by-byte chars -> utf8 */
@@ -656,13 +656,13 @@ utf8_reencode (const char *txt)
static int
upgrade_xml_1_2_rec (xmlNodePtr node)
{
- const char *value_tags[] = { "string", "address", "regex", "file", "command", NULL };
- const char *rule_tags[] = { "title", NULL };
- const char *item_props[] = { "name", NULL };
+ const gchar *value_tags[] = { "string", "address", "regex", "file", "command", NULL };
+ const gchar *rule_tags[] = { "title", NULL };
+ const gchar *item_props[] = { "name", NULL };
struct {
- const char *name;
- const char **tags;
- const char **props;
+ const gchar *name;
+ const gchar **tags;
+ const gchar **props;
} tags[] = {
{ "value", value_tags, NULL },
{ "rule", rule_tags, NULL },
@@ -670,24 +670,24 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
{ 0 },
};
xmlNodePtr work;
- int i,j;
- char *txt, *tmp;
+ gint i,j;
+ gchar *txt, *tmp;
/* upgrades the content of a node, if the node has a specific parent/node name */
for (i = 0; tags[i].name; i++) {
- if (!strcmp ((char *)node->name, tags[i].name)) {
+ if (!strcmp ((gchar *)node->name, tags[i].name)) {
if (tags[i].tags != NULL) {
work = node->children;
while (work) {
for (j = 0; tags[i].tags[j]; j++) {
- if (!strcmp ((char *)work->name, tags[i].tags[j])) {
- txt = (char *)xmlNodeGetContent (work);
+ if (!strcmp ((gchar *)work->name, tags[i].tags[j])) {
+ txt = (gchar *)xmlNodeGetContent (work);
if (is_xml1encoded (txt)) {
tmp = decode_xml1 (txt);
d(printf ("upgrading xml node %s/%s '%s' -> '%s'\n",
tags[i].name, tags[i].tags[j], txt, tmp));
- xmlNodeSetContent (work, (unsigned char *)tmp);
+ xmlNodeSetContent (work, (guchar *)tmp);
g_free (tmp);
}
xmlFree (txt);
@@ -700,11 +700,11 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
if (tags[i].props != NULL) {
for (j = 0; tags[i].props[j]; j++) {
- txt = (char *)xmlGetProp (node, (unsigned char *)tags[i].props[j]);
+ txt = (gchar *)xmlGetProp (node, (guchar *)tags[i].props[j]);
tmp = utf8_reencode (txt);
d(printf ("upgrading xml property %s on node %s '%s' -> '%s'\n",
tags[i].props[j], tags[i].name, txt, tmp));
- xmlSetProp (node, (const unsigned char *)tags[i].props[j], (unsigned char *)tmp);
+ xmlSetProp (node, (const guchar *)tags[i].props[j], (guchar *)tmp);
g_free (tmp);
xmlFree (txt);
}
@@ -967,10 +967,10 @@ static int
bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb)
{
xmlNodePtr source;
- char labx[16], colx[16];
- char *val, *lab, *col;
+ gchar labx[16], colx[16];
+ gchar *val, *lab, *col;
GSList *list, *l;
- int i;
+ gint i;
e_bconf_import(gconf, config_xmldb, gconf_remap_list);
@@ -1018,7 +1018,7 @@ bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb)
}
static int
-em_migrate_1_2(const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex)
+em_migrate_1_2(const gchar *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex)
{
GConfClient *gconf;
@@ -1043,7 +1043,7 @@ typedef struct _EMMigrateSession {
CamelSession parent_object;
CamelStore *store; /* new folder tree store */
- char *srcdir; /* old folder tree path */
+ gchar *srcdir; /* old folder tree path */
} EMMigrateSession;
typedef struct _EMMigrateSessionClass {
@@ -1052,7 +1052,7 @@ typedef struct _EMMigrateSessionClass {
} EMMigrateSessionClass;
static CamelType em_migrate_session_get_type (void);
-static CamelSession *em_migrate_session_new (const char *path);
+static CamelSession *em_migrate_session_new (const gchar *path);
static void
class_init (EMMigrateSessionClass *klass)
@@ -1081,7 +1081,7 @@ em_migrate_session_get_type (void)
}
static CamelSession *
-em_migrate_session_new (const char *path)
+em_migrate_session_new (const gchar *path)
{
CamelSession *session;
@@ -1100,7 +1100,7 @@ static GtkLabel *label;
static GtkProgressBar *progress;
static void
-em_migrate_setup_progress_dialog (const char *title, const char *desc)
+em_migrate_setup_progress_dialog (const gchar *title, const gchar *desc)
{
GtkWidget *vbox, *hbox, *w;
gchar *markup;
@@ -1162,7 +1162,7 @@ em_migrate_close_progress_dialog (void)
}
static void
-em_migrate_set_folder_name (const char *folder_name)
+em_migrate_set_folder_name (const gchar *folder_name)
{
gchar *text;
@@ -1178,7 +1178,7 @@ em_migrate_set_folder_name (const char *folder_name)
static void
em_migrate_set_progress (double percent)
{
- char text[5];
+ gchar text[5];
snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
@@ -1192,11 +1192,11 @@ em_migrate_set_progress (double percent)
#ifndef G_OS_WIN32
static gboolean
-is_mail_folder (const char *metadata)
+is_mail_folder (const gchar *metadata)
{
xmlNodePtr node;
xmlDocPtr doc;
- char *type;
+ gchar *type;
if (!(doc = xmlParseFile (metadata))) {
g_warning ("Cannot parse `%s'", metadata);
@@ -1209,7 +1209,7 @@ is_mail_folder (const char *metadata)
return FALSE;
}
- if (!node->name || strcmp ((char *)node->name, "efolder") != 0) {
+ if (!node->name || strcmp ((gchar *)node->name, "efolder") != 0) {
g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
xmlFreeDoc (doc);
return FALSE;
@@ -1217,9 +1217,9 @@ is_mail_folder (const char *metadata)
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, "type")) {
- type = (char *)xmlNodeGetContent (node);
- if (!strcmp ((char *)type, "mail")) {
+ if (node->name && !strcmp ((gchar *)node->name, "type")) {
+ type = (gchar *)xmlNodeGetContent (node);
+ if (!strcmp ((gchar *)type, "mail")) {
xmlFreeDoc (doc);
xmlFree (type);
@@ -1240,13 +1240,13 @@ is_mail_folder (const char *metadata)
}
static int
-get_local_et_expanded (const char *dirname)
+get_local_et_expanded (const gchar *dirname)
{
xmlNodePtr node;
xmlDocPtr doc;
struct stat st;
- char *buf, *p;
- int thread_list;
+ gchar *buf, *p;
+ gint thread_list;
buf = g_strdup_printf ("%s/evolution/config/file:%s", g_get_home_dir (), dirname);
p = buf + strlen (g_get_home_dir ()) + strlen ("/evolution/config/file:");
@@ -1264,12 +1264,12 @@ get_local_et_expanded (const char *dirname)
g_free (buf);
- if (!(node = xmlDocGetRootElement (doc)) || strcmp ((char *)node->name, "expanded_state") != 0) {
+ if (!(node = xmlDocGetRootElement (doc)) || strcmp ((gchar *)node->name, "expanded_state") != 0) {
xmlFreeDoc (doc);
return -1;
}
- if (!(buf = (char *)xmlGetProp (node, (const unsigned char *)"default"))) {
+ if (!(buf = (gchar *)xmlGetProp (node, (const guchar *)"default"))) {
xmlFreeDoc (doc);
return -1;
}
@@ -1282,11 +1282,11 @@ get_local_et_expanded (const char *dirname)
return thread_list;
}
-static char *
-get_local_store_uri (const char *dirname, char **namep, int *indexp)
+static gchar *
+get_local_store_uri (const gchar *dirname, gchar **namep, gint *indexp)
{
gchar *name, *protocol, *metadata, *tmp;
- int index;
+ gint index;
struct stat st;
xmlNodePtr node;
xmlDocPtr doc;
@@ -1308,24 +1308,24 @@ get_local_store_uri (const char *dirname, char **namep, int *indexp)
goto nofile;
node = doc->children;
- if (strcmp((char *)node->name, "folderinfo"))
+ if (strcmp((gchar *)node->name, "folderinfo"))
goto dodefault;
for (node = node->children; node; node = node->next) {
- if (node->name && !strcmp ((char *)node->name, "folder")) {
- tmp = (char *)xmlGetProp (node, (const unsigned char *)"type");
+ if (node->name && !strcmp ((gchar *)node->name, "folder")) {
+ tmp = (gchar *)xmlGetProp (node, (const guchar *)"type");
if (tmp) {
protocol = alloca(strlen(tmp)+1);
strcpy(protocol, tmp);
xmlFree(tmp);
}
- tmp = (char *)xmlGetProp (node, (const unsigned char *)"name");
+ tmp = (gchar *)xmlGetProp (node, (const guchar *)"name");
if (tmp) {
name = alloca(strlen(tmp)+1);
strcpy(name, tmp);
xmlFree(tmp);
}
- tmp = (char *)xmlGetProp (node, (const unsigned char *)"index");
+ tmp = (gchar *)xmlGetProp (node, (const guchar *)"index");
if (tmp) {
index = atoi(tmp);
xmlFree(tmp);
@@ -1351,18 +1351,18 @@ enum {
CP_APPEND
};
-static int open_flags[3] = {
+static gint open_flags[3] = {
O_WRONLY | O_CREAT | O_TRUNC,
O_WRONLY | O_CREAT | O_TRUNC,
O_WRONLY | O_CREAT | O_APPEND,
};
static int
-cp (const char *src, const char *dest, gboolean show_progress, int mode)
+cp (const gchar *src, const gchar *dest, gboolean show_progress, gint mode)
{
- unsigned char readbuf[65536];
+ guchar readbuf[65536];
ssize_t nread, nwritten;
- int errnosav, readfd, writefd;
+ gint errnosav, readfd, writefd;
size_t total = 0;
struct stat st;
struct utimbuf ut;
@@ -1440,7 +1440,7 @@ cp (const char *src, const char *dest, gboolean show_progress, int mode)
#ifndef G_OS_WIN32
static int
-cp_r (const char *src, const char *dest, const char *pattern, int mode)
+cp_r (const gchar *src, const gchar *dest, const gchar *pattern, gint mode)
{
GString *srcpath, *destpath;
struct dirent *dent;
@@ -1491,10 +1491,10 @@ cp_r (const char *src, const char *dest, const char *pattern, int mode)
}
static void
-mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_name)
+mbox_build_filename (GString *path, const gchar *toplevel_dir, const gchar *full_name)
{
- const char *start, *inptr = full_name;
- int subdirs = 0;
+ const gchar *start, *inptr = full_name;
+ gint subdirs = 0;
while (*inptr != '\0') {
if (*inptr == '/')
@@ -1525,17 +1525,17 @@ mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_n
}
static int
-em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *full_name, CamelException *ex)
+em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar *full_name, CamelException *ex)
{
CamelFolder *old_folder = NULL, *new_folder = NULL;
CamelStore *local_store = NULL;
- char *name, *uri;
+ gchar *name, *uri;
GPtrArray *uids;
struct stat st;
- int thread_list;
- int index, i;
+ gint thread_list;
+ gint index, i;
GString *src, *dest;
- int res = -1;
+ gint res = -1;
src = g_string_new("");
@@ -1558,8 +1558,8 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
static const gchar *meta_ext[] = { ".summary", ".ibex.index", ".ibex.index.data" };
size_t slen, dlen;
FILE *fp;
- char *p;
- int mode;
+ gchar *p;
+ gint mode;
g_string_printf (src, "%s/%s", uri + 5, name);
mbox_build_filename (dest, ((CamelService *)session->store)->url->path, full_name);
@@ -1581,7 +1581,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
retry_copy:
if (cp (src->str, dest->str, TRUE, mode) == -1) {
if (errno == EEXIST) {
- int save = errno;
+ gint save = errno;
switch (e_error_run(NULL, "mail:ask-migrate-existing", src->str, dest->str, NULL)) {
case GTK_RESPONSE_ACCEPT:
@@ -1607,7 +1607,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
g_string_truncate (dest, dlen);
g_string_append (dest, ".cmeta");
if ((fp = fopen (dest->str, "w")) != NULL) {
- int fd = fileno (fp);
+ gint fd = fileno (fp);
/* write the magic string */
if (fwrite ("CLMD", 4, 1, fp) != 1)
@@ -1723,13 +1723,13 @@ fatal:
}
static int
-em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full_name, CamelException *ex)
+em_migrate_dir (EMMigrateSession *session, const gchar *dirname, const gchar *full_name, CamelException *ex)
{
- char *path;
+ gchar *path;
DIR *dir;
struct stat st;
struct dirent *dent;
- int res = 0;
+ gint res = 0;
if (em_migrate_folder(session, dirname, full_name, ex) == -1)
return -1;
@@ -1747,8 +1747,8 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
}
while (res == 0 && (dent = readdir (dir))) {
- char *full_path;
- char *name;
+ gchar *full_path;
+ gchar *name;
if (dent->d_name[0] == '.')
continue;
@@ -1778,7 +1778,7 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex)
struct dirent *dent;
struct stat st;
DIR *dir;
- int res = 0;
+ gint res = 0;
if (!(dir = opendir (session->srcdir))) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
@@ -1792,7 +1792,7 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex)
"patient while Evolution migrates your folders..."));
while (res == 0 && (dent = readdir (dir))) {
- char *full_path;
+ gchar *full_path;
if (dent->d_name[0] == '.')
continue;
@@ -1814,10 +1814,10 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex)
return res;
}
-static char *
-upgrade_xml_uris_1_4 (const char *uri)
+static gchar *
+upgrade_xml_uris_1_4 (const gchar *uri)
{
- char *path, *prefix, *p;
+ gchar *path, *prefix, *p;
CamelURL *url;
if (!strncmp (uri, "file:", 5)) {
@@ -1866,7 +1866,7 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
- if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
+ if (!root->name || strcmp ((gchar *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
@@ -1878,19 +1878,19 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp ((char *)node->name, "rule")) {
+ if (node->name && !strcmp ((gchar *)node->name, "rule")) {
xmlNodePtr sources;
- char *src;
+ gchar *src;
- if (!(src = (char *)xmlGetProp (node, (const unsigned char *)"source")))
- src = (char *)xmlStrdup ((const unsigned char *)"local"); /* default to all local folders? */
+ if (!(src = (gchar *)xmlGetProp (node, (const guchar *)"source")))
+ src = (gchar *)xmlStrdup ((const guchar *)"local"); /* default to all local folders? */
- xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming");
+ xmlSetProp (node, (const guchar *)"source", (const guchar *)"incoming");
if (!(sources = xml_find_node (node, "sources")))
- sources = xmlNewChild (node, NULL, (const unsigned char *)"sources", NULL);
+ sources = xmlNewChild (node, NULL, (const guchar *)"sources", NULL);
- xmlSetProp (sources, (const unsigned char *)"with", (unsigned char *)src);
+ xmlSetProp (sources, (const guchar *)"with", (guchar *)src);
xmlFree (src);
}
@@ -1898,14 +1898,14 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
}
}
-static char *
-get_nth_sig (int id)
+static gchar *
+get_nth_sig (gint id)
{
ESignatureList *list;
ESignature *sig;
EIterator *iter;
- char *uid = NULL;
- int i = 0;
+ gchar *uid = NULL;
+ gint i = 0;
list = mail_config_get_signatures ();
iter = e_list_get_iterator ((EList *) list);
@@ -1937,7 +1937,7 @@ em_upgrade_accounts_1_4 (void)
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
EAccount *account = (EAccount *) e_iterator_get (iter);
- char *url;
+ gchar *url;
if (account->drafts_folder_uri) {
url = upgrade_xml_uris_1_4 (account->drafts_folder_uri);
@@ -1952,7 +1952,7 @@ em_upgrade_accounts_1_4 (void)
}
if (account->id->sig_uid && !strncmp (account->id->sig_uid, "::", 2)) {
- int sig_id;
+ gint sig_id;
sig_id = strtol (account->id->sig_uid + 2, NULL, 10);
g_free (account->id->sig_uid);
@@ -1968,14 +1968,14 @@ em_upgrade_accounts_1_4 (void)
}
static int
-em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
+em_migrate_pop_uid_caches_1_4 (const gchar *evolution_dir, CamelException *ex)
{
GString *oldpath, *newpath;
struct dirent *dent;
size_t olen, nlen;
- char *cache_dir;
+ gchar *cache_dir;
DIR *dir;
- int res = 0;
+ gint res = 0;
/* Sigh, too many unique strings to translate, for cases which shouldn't ever happen */
@@ -2047,9 +2047,9 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
}
static int
-em_migrate_imap_caches_1_4 (const char *evolution_dir, CamelException *ex)
+em_migrate_imap_caches_1_4 (const gchar *evolution_dir, CamelException *ex)
{
- char *src, *dest;
+ gchar *src, *dest;
struct stat st;
src = g_build_filename (g_get_home_dir (), "evolution", "mail", "imap", NULL);
@@ -2070,11 +2070,11 @@ em_migrate_imap_caches_1_4 (const char *evolution_dir, CamelException *ex)
}
static int
-em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *ex)
+em_migrate_folder_expand_state_1_4 (const gchar *evolution_dir, CamelException *ex)
{
GString *srcpath, *destpath;
size_t slen, dlen, rlen;
- char *evo14_mbox_root;
+ gchar *evo14_mbox_root;
struct dirent *dent;
struct stat st;
DIR *dir;
@@ -2107,8 +2107,8 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e
evo14_mbox_root[rlen] = '\0';
while ((dent = readdir (dir))) {
- char *full_name, *inptr, *buf = NULL;
- const char *filename;
+ gchar *full_name, *inptr, *buf = NULL;
+ const gchar *filename;
GString *new;
if (strncmp (dent->d_name, "et-expanded-", 12) != 0)
@@ -2168,11 +2168,11 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e
}
static int
-em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *ex)
+em_migrate_folder_view_settings_1_4 (const gchar *evolution_dir, CamelException *ex)
{
GString *srcpath, *destpath;
size_t slen, dlen, rlen;
- char *evo14_mbox_root;
+ gchar *evo14_mbox_root;
struct dirent *dent;
struct stat st;
DIR *dir;
@@ -2205,8 +2205,8 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
evo14_mbox_root[rlen] = '\0';
while ((dent = readdir (dir))) {
- char *full_name, *inptr, *buf = NULL;
- const char *filename, *ext;
+ gchar *full_name, *inptr, *buf = NULL;
+ const gchar *filename, *ext;
size_t prelen = 0;
GString *new;
@@ -2216,7 +2216,7 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
if (!(ext = strrchr (dent->d_name, '.')))
continue;
- if (!strcmp (ext, ".galview") || !strcmp ((char *)dent->d_name, "galview.xml")) {
+ if (!strcmp (ext, ".galview") || !strcmp ((gchar *)dent->d_name, "galview.xml")) {
/* just copy the file */
filename = dent->d_name;
goto copy;
@@ -2224,9 +2224,9 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
continue;
}
- if (!strncmp ((const char *)dent->d_name, "current_view-", 13)) {
+ if (!strncmp ((const gchar *)dent->d_name, "current_view-", 13)) {
prelen = 13;
- } else if (!strncmp ((const char *)dent->d_name, "custom_view-", 12)) {
+ } else if (!strncmp ((const gchar *)dent->d_name, "custom_view-", 12)) {
prelen = 12;
} else {
/* huh? wtf is this file? */
@@ -2292,14 +2292,14 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
#define SUBFOLDER_DIR_NAME "subfolders"
#define SUBFOLDER_DIR_NAME_LEN 10
-static char *
-e_path_to_physical (const char *prefix, const char *vpath)
+static gchar *
+e_path_to_physical (const gchar *prefix, const gchar *vpath)
{
- const char *p, *newp;
- char *dp;
- char *ppath;
- int ppath_len;
- int prefix_len;
+ const gchar *p, *newp;
+ gchar *dp;
+ gchar *ppath;
+ gint ppath_len;
+ gint prefix_len;
while (*vpath == '/')
vpath++;
@@ -2368,7 +2368,7 @@ e_path_to_physical (const char *prefix, const char *vpath)
}
static int
-em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex)
+em_migrate_imap_cmeta_1_4(const gchar *evolution_dir, CamelException *ex)
{
GConfClient *gconf;
GSList *paths, *p;
@@ -2381,7 +2381,7 @@ em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex)
gconf = gconf_client_get_default();
paths = gconf_client_get_list(gconf, "/apps/evolution/shell/offline/folder_paths", GCONF_VALUE_STRING, NULL);
for (p = paths;p;p = g_slist_next(p)) {
- char *name, *path;
+ gchar *name, *path;
name = p->data;
if (*name)
@@ -2394,7 +2394,7 @@ em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex)
CamelURL *url = camel_url_new(account->source->url, NULL);
if (url) {
- char *dir, *base;
+ gchar *dir, *base;
base = g_strdup_printf("%s/mail/imap/%s@%s/folders",
evolution_dir,
@@ -2403,7 +2403,7 @@ em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex)
dir = e_path_to_physical(base, path);
if (g_mkdir_with_parents(dir, 0777) == 0) {
- char *cmeta;
+ gchar *cmeta;
FILE *fp;
cmeta = g_build_filename(dir, "cmeta", NULL);
@@ -2455,7 +2455,7 @@ remove_system_searches(xmlDocPtr searches)
* searchtypes.xml file instead */
node = xmlDocGetRootElement(searches);
- if (!node->name || strcmp((char *)node->name, "filteroptions"))
+ if (!node->name || strcmp((gchar *)node->name, "filteroptions"))
return;
if (!(node = xml_find_node(node, "ruleset")))
@@ -2465,11 +2465,11 @@ remove_system_searches(xmlDocPtr searches)
while (node != NULL) {
xmlNodePtr nnode = node->next;
- if (node->name && !strcmp ((char *)node->name, "rule")) {
- char *src;
+ if (node->name && !strcmp ((gchar *)node->name, "rule")) {
+ gchar *src;
- src = (char *)xmlGetProp(node, (unsigned char *)"source");
- if (src && !strcmp((char *)src, "demand")) {
+ src = (gchar *)xmlGetProp(node, (guchar *)"source");
+ if (src && !strcmp((gchar *)src, "demand")) {
xmlUnlinkNode(node);
xmlFreeNodeList(node);
}
@@ -2481,12 +2481,12 @@ remove_system_searches(xmlDocPtr searches)
}
static int
-em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex)
+em_migrate_1_4 (const gchar *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex)
{
EMMigrateSession *session;
CamelException lex;
struct stat st;
- char *path;
+ gchar *path;
xmlDocPtr searches;
path = g_build_filename (evolution_dir, "mail", NULL);
@@ -2581,7 +2581,7 @@ em_update_accounts_2_11 (void)
if (g_str_has_prefix (account->source->url, "spool://")) {
if (g_file_test (account->source->url + 8, G_FILE_TEST_IS_DIR)) {
- char *str = g_strdup_printf ("spooldir://%s", account->source->url + 8);
+ gchar *str = g_strdup_printf ("spooldir://%s", account->source->url + 8);
g_free (account->source->url);
account->source->url = str;
@@ -2601,11 +2601,11 @@ em_update_accounts_2_11 (void)
#endif /* !G_OS_WIN32 */
static int
-emm_setup_initial(const char *evolution_dir)
+emm_setup_initial(const gchar *evolution_dir)
{
GDir *dir;
- const char *d;
- char *local = NULL, *base;
+ const gchar *d;
+ gchar *local = NULL, *base;
const gchar * const *language_names;
/* special-case - this means brand new install of evolution */
@@ -2637,7 +2637,7 @@ emm_setup_initial(const char *evolution_dir)
dir = g_dir_open(local, 0, NULL);
if (dir) {
while ((d = g_dir_read_name(dir))) {
- char *src, *dest;
+ gchar *src, *dest;
src = g_build_filename(local, d, NULL);
dest = g_build_filename(base, d, NULL);
@@ -2750,7 +2750,7 @@ em_update_sa_junk_setting_2_23 (void)
key = gconf_client_get (client, "/apps/evolution/mail/junk/default_plugin", NULL);
if (key) {
- const char *str = gconf_value_get_string (key);
+ const gchar *str = gconf_value_get_string (key);
if (str && strcmp (str, "Spamassasin") == 0)
gconf_client_set_string (client, "/apps/evolution/mail/junk/default_plugin", "SpamAssassin", NULL);
@@ -2772,13 +2772,13 @@ update_progress_in_main_thread (double *progress)
}
static void
-migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const char *acc, CamelException *ex, gboolean *done, int *nth_folder, int total_folders)
+migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const gchar *acc, CamelException *ex, gboolean *done, gint *nth_folder, gint total_folders)
{
CamelFolder *folder;
while (fi) {
double progress;
- char *tmp;
+ gchar *tmp;
*nth_folder = *nth_folder + 1;
@@ -2808,7 +2808,7 @@ migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const
/* This could be in CamelStore.ch */
static void
-count_folders (CamelFolderInfo *fi, int *count)
+count_folders (CamelFolderInfo *fi, gint *count)
{
while (fi) {
*count = *count + 1;
@@ -2821,7 +2821,7 @@ static CamelStore *
setup_local_store (MailComponent *mc)
{
CamelURL *url;
- char *tmp;
+ gchar *tmp;
CamelStore *store;
url = camel_url_new("mbox:", NULL);
@@ -2837,7 +2837,7 @@ setup_local_store (MailComponent *mc)
}
struct migrate_folders_to_db_structure {
- char *account_name;
+ gchar *account_name;
CamelException ex;
CamelStore *store;
CamelFolderInfo *info;
@@ -2847,7 +2847,7 @@ struct migrate_folders_to_db_structure {
static void migrate_folders_to_db_thread (struct migrate_folders_to_db_structure *migrate_dbs)
{
- int num_of_folders = 0, nth_folder = 0;
+ gint num_of_folders = 0, nth_folder = 0;
count_folders (migrate_dbs->info, &num_of_folders);
migrate_folders (migrate_dbs->store, migrate_dbs->is_local_store, migrate_dbs->info,
migrate_dbs->account_name, &(migrate_dbs->ex), &(migrate_dbs->done),
@@ -2859,7 +2859,7 @@ migrate_to_db()
{
EAccountList *accounts;
EIterator *iter;
- int i=0, len;
+ gint i=0, len;
MailComponent *component = mail_component_peek ();
CamelStore *store = NULL;
CamelFolderInfo *info;
@@ -2901,7 +2901,7 @@ migrate_to_db()
while (e_iterator_is_valid (iter)) {
EAccount *account = (EAccount *) e_iterator_get (iter);
EAccountService *service;
- const char *name;
+ const gchar *name;
service = account->source;
name = account->name;
@@ -2943,11 +2943,11 @@ migrate_to_db()
}
-int
-em_migrate (const char *evolution_dir, int major, int minor, int revision, CamelException *ex)
+gint
+em_migrate (const gchar *evolution_dir, gint major, gint minor, gint revision, CamelException *ex)
{
struct stat st;
- char *path;
+ gchar *path;
/* make sure ~/.evolution/mail exists */
path = g_build_filename (evolution_dir, "mail", NULL);
diff --git a/mail/em-migrate.h b/mail/em-migrate.h
index 238f4fda1c..f6d43c159a 100644
--- a/mail/em-migrate.h
+++ b/mail/em-migrate.h
@@ -30,7 +30,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-int em_migrate (const char *evolution_dir, int major, int minor, int revision, CamelException *ex);
+gint em_migrate (const gchar *evolution_dir, gint major, gint minor, gint revision, CamelException *ex);
#ifdef __cplusplus
}
diff --git a/mail/em-network-prefs.c b/mail/em-network-prefs.c
index b0c51ed863..47df87a062 100644
--- a/mail/em-network-prefs.c
+++ b/mail/em-network-prefs.c
@@ -132,7 +132,7 @@ em_network_prefs_destroy (GtkObject *obj)
static void
toggle_button_toggled (GtkToggleButton *toggle, EMNetworkPrefs *prefs)
{
- const char *key;
+ const gchar *key;
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
@@ -146,14 +146,14 @@ toggle_button_toggled (GtkToggleButton *toggle, EMNetworkPrefs *prefs)
}
static void
-toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const char *key)
+toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const gchar *key)
{
gboolean bool;
bool = gconf_client_get_bool (prefs->gconf, key, NULL);
gtk_toggle_button_set_active (toggle, bool);
- g_object_set_data ((GObject *) toggle, "key", (void *) key);
+ g_object_set_data ((GObject *) toggle, "key", (gpointer) key);
g_signal_connect (toggle, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
@@ -161,7 +161,7 @@ toggle_button_init (EMNetworkPrefs *prefs, GtkToggleButton *toggle, const char *
}
static GtkWidget *
-emnp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
+emnp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, gpointer data)
{
EMNetworkPrefs *prefs = data;
@@ -210,7 +210,7 @@ emnp_set_sensitiveness (EMNetworkPrefs *prefs, NetworkConfigProxyType type, gboo
static void
notify_proxy_type_changed (GtkWidget *widget, EMNetworkPrefs *prefs)
{
- int type;
+ gint type;
if (gtk_toggle_button_get_active (prefs->sys_proxy))
type = NETWORK_PROXY_SYS_SETTINGS;
@@ -249,8 +249,8 @@ notify_proxy_type_changed (GtkWidget *widget, EMNetworkPrefs *prefs)
static void
widget_entry_changed_cb (GtkWidget *widget, gpointer data)
{
- const char *value;
- int port = -1;
+ const gchar *value;
+ gint port = -1;
GConfClient *gconf = mail_config_get_gconf_client ();
/*
@@ -259,12 +259,12 @@ widget_entry_changed_cb (GtkWidget *widget, gpointer data)
*/
if (GTK_IS_SPIN_BUTTON (widget)) {
port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
- gconf_client_set_int (gconf, (const char *)data, port, NULL);
- d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const char *)data, port));
+ gconf_client_set_int (gconf, (const gchar *)data, port, NULL);
+ d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, port));
} else if (GTK_IS_ENTRY (widget)) {
value = gtk_entry_get_text (GTK_ENTRY (widget));
- gconf_client_set_string (gconf, (const char *)data, value, NULL);
- d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const char *)data, value));
+ gconf_client_set_string (gconf, (const gchar *)data, value, NULL);
+ d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, value));
}
}
@@ -277,7 +277,7 @@ static EMConfigItem emnp_items[] = {
};
static void
-emnp_free(EConfig *ec, GSList *items, void *data)
+emnp_free(EConfig *ec, GSList *items, gpointer data)
{
/* the prefs data is freed automagically */
@@ -301,12 +301,12 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
GtkWidget *toplevel;
GladeXML *gui;
GSList* l;
- char *buf;
+ gchar *buf;
EMConfig *ec;
EMConfigTargetPrefs *target;
gboolean locked;
- int i, val, port;
- char *gladefile;
+ gint i, val, port;
+ gchar *gladefile;
prefs->gconf = mail_config_get_gconf_client ();
diff --git a/mail/em-popup.c b/mail/em-popup.c
index ad738fca57..5caabca171 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -55,7 +55,7 @@
#include <e-util/e-util.h>
#include "e-attachment.h"
-static void emp_standard_menu_factory(EPopup *emp, void *data);
+static void emp_standard_menu_factory(EPopup *emp, gpointer data);
static GObjectClass *emp_parent;
@@ -135,7 +135,7 @@ em_popup_get_type(void)
return type;
}
-EMPopup *em_popup_new(const char *menuid)
+EMPopup *em_popup_new(const gchar *menuid)
{
EMPopup *emp = g_object_new(em_popup_get_type(), NULL);
@@ -155,14 +155,14 @@ EMPopup *em_popup_new(const char *menuid)
* Return value:
**/
EMPopupTargetSelect *
-em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
+em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids)
{
EMPopupTargetSelect *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_SELECT, sizeof(*t));
CamelStore *store = CAMEL_STORE (folder->parent_store);
guint32 mask = ~0;
gboolean draft_or_outbox;
- int i;
- const char *tmp;
+ gint i;
+ const gchar *tmp;
t->uids = uids;
t->folder = folder;
@@ -251,7 +251,7 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
}
EMPopupTargetURI *
-em_popup_target_new_uri(EMPopup *emp, const char *uri)
+em_popup_target_new_uri(EMPopup *emp, const gchar *uri)
{
EMPopupTargetURI *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_URI, sizeof(*t));
guint32 mask = ~0;
@@ -273,7 +273,7 @@ em_popup_target_new_uri(EMPopup *emp, const char *uri)
}
EMPopupTargetPart *
-em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *mime_type)
+em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const gchar *mime_type)
{
EMPopupTargetPart *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_PART, sizeof(*t));
guint32 mask = ~0;
@@ -300,7 +300,7 @@ em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *
/* TODO: This should be based on the CamelFolderInfo, but ... em-folder-tree doesn't keep it? */
EMPopupTargetFolder *
-em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, guint32 popup_flags)
+em_popup_target_new_folder (EMPopup *emp, const gchar *uri, guint32 info_flags, guint32 popup_flags)
{
EMPopupTargetFolder *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_FOLDER, sizeof(*t));
guint32 mask = ~0;
@@ -318,7 +318,7 @@ em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, g
goto done;
if (!(popup_flags & EM_POPUP_FOLDER_STORE)) {
- const char *path;
+ const gchar *path;
if (popup_flags & EM_POPUP_FOLDER_DELETE)
mask &= ~EM_POPUP_FOLDER_DELETE;
@@ -354,7 +354,7 @@ done:
/* ********************************************************************** */
static void
-emp_part_popup_saveas(EPopup *ep, EPopupItem *item, void *data)
+emp_part_popup_saveas(EPopup *ep, EPopupItem *item, gpointer data)
{
EPopupTarget *t = ep->target;
CamelMimePart *part = NULL;
@@ -365,12 +365,12 @@ emp_part_popup_saveas(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
+emp_part_popup_set_background(EPopup *ep, EPopupItem *item, gpointer data)
{
EPopupTarget *t = ep->target;
GConfClient *gconf;
- char *str, *filename, *path, *extension;
- unsigned int i=1;
+ gchar *str, *filename, *path, *extension;
+ guint i=1;
CamelMimePart *part = NULL;
part = ((EMPopupTargetPart *) t)->part;
@@ -399,7 +399,7 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
/* if file exists, stick a (number) on the end */
while (g_file_test(path, G_FILE_TEST_EXISTS)) {
- char *name;
+ gchar *name;
name = g_strdup_printf(extension?"%s (%d).%s":"%s (%d)", filename, i++, extension);
g_free(path);
path = g_build_filename(g_get_home_dir(), ".gnome2", "wallpapers", name, NULL);
@@ -438,7 +438,7 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_part_popup_reply_sender(EPopup *ep, EPopupItem *item, void *data)
+emp_part_popup_reply_sender(EPopup *ep, EPopupItem *item, gpointer data)
{
EPopupTarget *t = ep->target;
CamelMimeMessage *message;
@@ -451,7 +451,7 @@ emp_part_popup_reply_sender(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_part_popup_reply_list (EPopup *ep, EPopupItem *item, void *data)
+emp_part_popup_reply_list (EPopup *ep, EPopupItem *item, gpointer data)
{
EPopupTarget *t = ep->target;
CamelMimeMessage *message;
@@ -464,7 +464,7 @@ emp_part_popup_reply_list (EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_part_popup_reply_all (EPopup *ep, EPopupItem *item, void *data)
+emp_part_popup_reply_all (EPopup *ep, EPopupItem *item, gpointer data)
{
EPopupTarget *t = ep->target;
CamelMimeMessage *message;
@@ -477,7 +477,7 @@ emp_part_popup_reply_all (EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_part_popup_forward (EPopup *ep, EPopupItem *item, void *data)
+emp_part_popup_forward (EPopup *ep, EPopupItem *item, gpointer data)
{
EPopupTarget *t = ep->target;
CamelMimeMessage *message;
@@ -506,7 +506,7 @@ static const EPopupItem emp_standard_part_apps_bar = { E_POPUP_BAR, (gchar *) "9
/* ********************************************************************** */
static void
-emp_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data)
+emp_uri_popup_link_open(EPopup *ep, EPopupItem *item, gpointer data)
{
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
@@ -515,7 +515,7 @@ emp_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data)
+emp_uri_popup_address_send(EPopup *ep, EPopupItem *item, gpointer data)
{
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
@@ -524,7 +524,7 @@ emp_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_uri_popup_address_add(EPopup *ep, EPopupItem *item, void *data)
+emp_uri_popup_address_add(EPopup *ep, EPopupItem *item, gpointer data)
{
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
CamelURL *url;
@@ -552,9 +552,9 @@ static EPopupItem emp_standard_uri_popups[] = {
#define LEN(x) (sizeof(x)/sizeof(x[0]))
static void
-emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data)
+emp_apps_open_in(EPopup *ep, EPopupItem *item, gpointer data)
{
- char *path;
+ gchar *path;
EPopupTarget *target = ep->target;
CamelMimePart *part;
@@ -573,7 +573,7 @@ emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data)
g_app_info_launch (app, uris, NULL, &error);
g_object_unref (file);
} else {
- char *uri;
+ gchar *uri;
uri = e_util_filename_to_uri (path);
uris = g_list_append (uris, uri);
@@ -593,7 +593,7 @@ emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_apps_popup_free(EPopup *ep, GSList *free_list, void *data)
+emp_apps_popup_free(EPopup *ep, GSList *free_list, gpointer data)
{
while (free_list) {
GSList *n = free_list->next;
@@ -612,13 +612,13 @@ emp_apps_popup_free(EPopup *ep, GSList *free_list, void *data)
}
static void
-emp_standard_items_free(EPopup *ep, GSList *items, void *data)
+emp_standard_items_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
}
static void
-emp_add_vcard (EPopup *ep, EPopupItem *item, void *data)
+emp_add_vcard (EPopup *ep, EPopupItem *item, gpointer data)
{
EPopupTarget *target = ep->target;
CamelMimePart *part;
@@ -649,14 +649,14 @@ emp_add_vcard (EPopup *ep, EPopupItem *item, void *data)
}
static void
-emp_standard_menu_factory(EPopup *emp, void *data)
+emp_standard_menu_factory(EPopup *emp, gpointer data)
{
- int i, len;
+ gint i, len;
EPopupItem *items;
GSList *menus = NULL;
GList *apps = NULL;
- char *mime_type = NULL;
- const char *filename = NULL;
+ gchar *mime_type = NULL;
+ const gchar *filename = NULL;
switch (emp->target->type) {
#if 0
@@ -714,7 +714,7 @@ emp_standard_menu_factory(EPopup *emp, void *data)
GSList *open_menus = NULL;
GList *l;
- menus = g_slist_prepend(menus, (void *)&emp_standard_part_apps_bar);
+ menus = g_slist_prepend(menus, (gpointer)&emp_standard_part_apps_bar);
for (l = apps, i = 0; l; l = l->next, i++) {
GAppInfo *app = l->data;
@@ -792,7 +792,7 @@ emp_standard_menu_factory(EPopup *emp, void *data)
*/
-static void *emph_parent_class;
+static gpointer emph_parent_class;
#define emph ((EMPopupHook *)eph)
static const EPopupHookTargetMask emph_select_masks[] = {
@@ -859,7 +859,7 @@ emph_finalise(GObject *o)
static void
emph_class_init(EPluginHookClass *klass)
{
- int i;
+ gint i;
((GObjectClass *)klass)->finalize = emph_finalise;
((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.popup:1.0";
diff --git a/mail/em-popup.h b/mail/em-popup.h
index cde903a4ec..dea4aee5d2 100644
--- a/mail/em-popup.h
+++ b/mail/em-popup.h
@@ -169,7 +169,7 @@ typedef struct _EMPopupTargetFolder EMPopupTargetFolder;
**/
struct _EMPopupTargetURI {
EPopupTarget target;
- char *uri;
+ gchar *uri;
};
/**
@@ -187,7 +187,7 @@ struct _EMPopupTargetURI {
struct _EMPopupTargetSelect {
EPopupTarget target;
struct _CamelFolder *folder;
- char *uri;
+ gchar *uri;
GPtrArray *uids;
};
@@ -204,7 +204,7 @@ struct _EMPopupTargetSelect {
**/
struct _EMPopupTargetPart {
EPopupTarget target;
- char *mime_type;
+ gchar *mime_type;
struct _CamelMimePart *part;
};
@@ -218,7 +218,7 @@ struct _EMPopupTargetPart {
**/
struct _EMPopupTargetFolder {
EPopupTarget target;
- char *uri;
+ gchar *uri;
};
typedef struct _EPopupItem EMPopupItem;
@@ -236,12 +236,12 @@ struct _EMPopupClass {
GType em_popup_get_type(void);
-EMPopup *em_popup_new(const char *menuid);
+EMPopup *em_popup_new(const gchar *menuid);
-EMPopupTargetURI *em_popup_target_new_uri(EMPopup *emp, const char *uri);
-EMPopupTargetSelect *em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids);
-EMPopupTargetPart *em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const char *mime_type);
-EMPopupTargetFolder *em_popup_target_new_folder(EMPopup *emp, const char *uri, guint32 info_flags, guint32 popup_flags);
+EMPopupTargetURI *em_popup_target_new_uri(EMPopup *emp, const gchar *uri);
+EMPopupTargetSelect *em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const gchar *folder_uri, GPtrArray *uids);
+EMPopupTargetPart *em_popup_target_new_part(EMPopup *emp, struct _CamelMimePart *part, const gchar *mime_type);
+EMPopupTargetFolder *em_popup_target_new_folder(EMPopup *emp, const gchar *uri, guint32 info_flags, guint32 popup_flags);
/* ********************************************************************** */
diff --git a/mail/em-search-context.c b/mail/em-search-context.c
index ac03d40a80..22369b4f60 100644
--- a/mail/em-search-context.c
+++ b/mail/em-search-context.c
@@ -33,7 +33,7 @@
#include "filter/filter-option.h"
#include "filter/filter-int.h"
-static FilterElement *em_search_new_element(RuleContext *rc, const char *type);
+static FilterElement *em_search_new_element(RuleContext *rc, const gchar *type);
static RuleContextClass *parent_class = NULL;
@@ -102,7 +102,7 @@ em_search_context_new (void)
}
static FilterElement *
-em_search_new_element(RuleContext *rc, const char *type)
+em_search_new_element(RuleContext *rc, const gchar *type)
{
if (!strcmp (type, "system-flag")) {
return (FilterElement *) filter_option_new ();
diff --git a/mail/em-stripsig-filter.c b/mail/em-stripsig-filter.c
index 1600eeaed0..1b977e975f 100644
--- a/mail/em-stripsig-filter.c
+++ b/mail/em-stripsig-filter.c
@@ -34,10 +34,10 @@
static void em_stripsig_filter_class_init (EMStripSigFilterClass *klass);
static void em_stripsig_filter_init (EMStripSigFilter *filter, EMStripSigFilterClass *klass);
-static void filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace);
-static void filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace);
+static void filter_filter (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace,
+ gchar **out, size_t *outlen, size_t *outprespace);
+static void filter_complete (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace,
+ gchar **out, size_t *outlen, size_t *outprespace);
static void filter_reset (CamelMimeFilter *filter);
@@ -83,13 +83,13 @@ em_stripsig_filter_init (EMStripSigFilter *filter, EMStripSigFilterClass *klass)
}
static void
-strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace, int flush)
+strip_signature (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace,
+ gchar **out, size_t *outlen, size_t *outprespace, gint flush)
{
EMStripSigFilter *stripsig = (EMStripSigFilter *) filter;
- register const char *inptr = in;
- const char *inend = in + len;
- const char *start = NULL;
+ register const gchar *inptr = in;
+ const gchar *inend = in + len;
+ const gchar *start = NULL;
if (stripsig->midline) {
while (inptr < inend && *inptr != '\n')
@@ -132,15 +132,15 @@ strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
}
static void
-filter_filter (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
+filter_filter (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace,
+ gchar **out, size_t *outlen, size_t *outprespace)
{
strip_signature (filter, in, len, prespace, out, outlen, outprespace, FALSE);
}
static void
-filter_complete (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
+filter_complete (CamelMimeFilter *filter, gchar *in, size_t len, size_t prespace,
+ gchar **out, size_t *outlen, size_t *outprespace)
{
strip_signature (filter, in, len, prespace, out, outlen, outprespace, TRUE);
}
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index 25c447d62e..df58c808db 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -52,7 +52,7 @@ typedef struct _EMSubscribeEditor EMSubscribeEditor;
struct _EMSubscribeEditor {
EDList stores;
- int busy;
+ gint busy;
guint busy_id;
struct _EMSubscribe *current; /* the current one, if any */
@@ -69,14 +69,14 @@ struct _EMSubscribe {
struct _EMSubscribe *next;
struct _EMSubscribe *prev;
- int ref_count;
- int cancel;
- int seq; /* upped every time we refresh */
+ gint ref_count;
+ gint cancel;
+ gint seq; /* upped every time we refresh */
struct _EMSubscribeEditor *editor; /* parent object*/
- char *store_uri;
- int store_id; /* looking up a store */
+ gchar *store_uri;
+ gint store_id; /* looking up a store */
CamelStore *store;
GHashTable *folders;
@@ -88,16 +88,16 @@ struct _EMSubscribe {
GSList *info_list;
/* pending LISTs, EMSubscribeNode's */
- int pending_id;
+ gint pending_id;
EDList pending;
/* queue of pending UN/SUBSCRIBEs, EMsg's */
- int subscribe_id;
+ gint subscribe_id;
EDList subscribe;
/* working variables at runtime */
- int selected_count;
- int selected_subscribed_count;
+ gint selected_count;
+ gint selected_subscribed_count;
guint subscribed_state:1; /* for setting the selection*/
};
@@ -116,8 +116,8 @@ struct _MailMsgListNode {
MailMsg *msg;
};
-static void sub_editor_busy(EMSubscribeEditor *se, int dir);
-static int sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node);
+static void sub_editor_busy(EMSubscribeEditor *se, gint dir);
+static gint sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node);
static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub);
static void
@@ -169,8 +169,8 @@ struct _zsubscribe_msg {
EMSubscribe *sub;
EMSubscribeNode *node;
- int subscribe;
- char *path;
+ gint subscribe;
+ gchar *path;
};
static void
@@ -246,11 +246,11 @@ static MailMsgInfo sub_subscribe_folder_info = {
/* spath is tree path in string form */
static int
-sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, int state, const char *spath)
+sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, gint state, const gchar *spath)
{
struct _zsubscribe_msg *m;
MailMsgListNode *msgListNode;
- int id;
+ gint id;
m = mail_msg_new (&sub_subscribe_folder_info);
m->sub = sub;
@@ -276,7 +276,7 @@ sub_subscribe_folder (EMSubscribe *sub, EMSubscribeNode *node, int state, const
/* ********************************************************************** */
static void
-sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, int pending)
+sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, gint pending)
{
CamelFolderInfo *fi;
GtkTreeStore *treestore;
@@ -343,7 +343,7 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
struct _emse_folderinfo_msg {
MailMsg base;
- int seq;
+ gint seq;
EMSubscribe *sub;
EMSubscribeNode *node;
@@ -353,7 +353,7 @@ struct _emse_folderinfo_msg {
static void
sub_folderinfo_exec (struct _emse_folderinfo_msg *m)
{
- char *pub_full_name=NULL;
+ gchar *pub_full_name=NULL;
if (m->seq == m->sub->seq) {
camel_operation_register(m->base.cancel);
@@ -424,7 +424,7 @@ static int
sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node)
{
struct _emse_folderinfo_msg *m;
- int id;
+ gint id;
d(printf("%s:%s: Starting get folderinfo of '%s'\n", G_STRLOC, G_STRFUNC,
node?node->info->full_name:"<root>"));
@@ -450,7 +450,7 @@ sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node)
/* (un) subscribes the current selection */
static void
-sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscribe *sub)
+sub_subscribe_toggled(GtkCellRendererToggle *render, const gchar *spath, EMSubscribe *sub)
{
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model(sub->tree);
@@ -468,7 +468,7 @@ sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscr
}
}
-static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *data)
+static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
EMSubscribe *sub = data;
EMSubscribeNode *node;
@@ -484,7 +484,7 @@ static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *
static void
sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub)
{
- int dosub = TRUE, dounsub = TRUE;
+ gint dosub = TRUE, dounsub = TRUE;
sub->selected_count = 0;
sub->selected_subscribed_count = 0;
@@ -516,7 +516,7 @@ sub_row_expanded(GtkTreeView *tree, GtkTreeIter *iter, GtkTreePath *path, EMSubs
EMSubscribeNode *node;
GtkTreeIter child;
GtkTreeModel *model = (GtkTreeModel *)gtk_tree_view_get_model(tree);
- char *row_name;
+ gchar *row_name;
gtk_tree_model_get(model, iter, 1, &row_name, -1);
d(printf("%s:%s: row-expanded '%s'\n", G_STRLOC, G_STRFUNC,
@@ -582,7 +582,7 @@ sub_destroy(GtkWidget *w, EMSubscribe *sub)
}
static EMSubscribe *
-subscribe_new(EMSubscribeEditor *se, const char *uri)
+subscribe_new(EMSubscribeEditor *se, const gchar *uri)
{
EMSubscribe *sub;
@@ -720,7 +720,7 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se)
}
static void
-sub_editor_got_store(char *uri, CamelStore *store, void *data)
+sub_editor_got_store(gchar *uri, CamelStore *store, gpointer data)
{
struct _EMSubscribe *sub = data;
@@ -732,7 +732,7 @@ sub_editor_got_store(char *uri, CamelStore *store, void *data)
static void
sub_editor_combobox_changed (GtkWidget *w, EMSubscribeEditor *se)
{
- int i, n;
+ gint i, n;
struct _EMSubscribe *sub;
d(printf("combobox changed\n"));
@@ -784,9 +784,9 @@ static gboolean sub_editor_timeout(EMSubscribeEditor *se)
return TRUE;
}
-static void sub_editor_busy(EMSubscribeEditor *se, int dir)
+static void sub_editor_busy(EMSubscribeEditor *se, gint dir)
{
- int was;
+ gint was;
was = se->busy != 0;
se->busy += dir;
@@ -831,7 +831,7 @@ GtkDialog *em_subscribe_editor_new(void)
GtkCellRenderer *cell;
GtkListStore *store;
GtkTreeIter gtiter;
- char *gladefile;
+ gchar *gladefile;
se = g_malloc0(sizeof(*se));
e_dlist_init(&se->stores);
diff --git a/mail/em-utils.c b/mail/em-utils.c
index ba180e5011..2f0fb39789 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -82,7 +82,7 @@
#include "e-attachment.h"
#include "e-activity-handler.h"
-static void emu_save_part_done (CamelMimePart *part, char *name, int done, void *data);
+static void emu_save_part_done (CamelMimePart *part, gchar *name, gint done, gpointer data);
extern struct _CamelSession *session;
@@ -103,11 +103,11 @@ extern struct _CamelSession *session;
* Returns %TRUE if the user clicks Yes or %FALSE otherwise.
**/
gboolean
-em_utils_prompt_user(GtkWindow *parent, const char *promptkey, const char *tag, const char *arg0, ...)
+em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...)
{
GtkWidget *mbox, *check = NULL;
va_list ap;
- int button;
+ gint button;
GConfClient *gconf = mail_config_get_gconf_client();
if (promptkey
@@ -148,7 +148,7 @@ GPtrArray *
em_utils_uids_copy (GPtrArray *uids)
{
GPtrArray *copy;
- int i;
+ gint i;
copy = g_ptr_array_new ();
g_ptr_array_set_size (copy, uids->len);
@@ -168,7 +168,7 @@ em_utils_uids_copy (GPtrArray *uids)
void
em_utils_uids_free (GPtrArray *uids)
{
- int i;
+ gint i;
for (i = 0; i < uids->len; i++)
g_free (uids->pdata[i]);
@@ -248,12 +248,12 @@ em_utils_check_user_can_send_mail (GtkWidget *parent)
static GtkWidget *filter_editor = NULL;
static void
-em_filter_editor_response (GtkWidget *dialog, int button, gpointer user_data)
+em_filter_editor_response (GtkWidget *dialog, gint button, gpointer user_data)
{
EMFilterContext *fc;
if (button == GTK_RESPONSE_OK) {
- char *user;
+ gchar *user;
fc = g_object_get_data ((GObject *) dialog, "context");
user = g_strdup_printf ("%s/filters.xml",
@@ -284,8 +284,8 @@ static EMFilterSource em_filter_source_element_names[] = {
void
em_utils_edit_filters (GtkWidget *parent)
{
- const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
- char *user, *system;
+ const gchar *base_directory = mail_component_peek_base_directory (mail_component_peek ());
+ gchar *user, *system;
EMFilterContext *fc;
if (filter_editor) {
@@ -331,9 +331,9 @@ em_filename_make_safe (gchar *string)
gchar *p, *ts;
gunichar c;
#ifdef G_OS_WIN32
- const char *unsafe_chars = "/\":*?<>|\\#";
+ const gchar *unsafe_chars = "/\":*?<>|\\#";
#else
- const char *unsafe_chars = "/#";
+ const gchar *unsafe_chars = "/#";
#endif
g_return_if_fail (string != NULL);
@@ -385,7 +385,7 @@ emu_save_get_filename_for_part (CamelMimePart *part)
* Saves a mime part to disk (prompting the user for filename).
**/
void
-em_utils_save_part (GtkWidget *parent, const char *prompt, CamelMimePart *part)
+em_utils_save_part (GtkWidget *parent, const gchar *prompt, CamelMimePart *part)
{
GtkWidget *file_chooser;
const gchar *utf8_filename;
@@ -462,7 +462,7 @@ get_unique_file_names (GSList *parts)
sorted_file_names = g_slist_sort (g_slist_copy (file_names), cmp_func);
last = sorted_file_names->data;
for (iter = sorted_file_names->next; iter; iter = iter->next) {
- char *name = iter->data;
+ gchar *name = iter->data;
if (name && last && cmp_func (name, last) == 0) {
gchar *new_name;
@@ -556,10 +556,10 @@ exit:
* Returns %TRUE if saving succeeded, %FALSE otherwise
**/
gboolean
-em_utils_save_part_to_file(GtkWidget *parent, const char *filename, CamelMimePart *part)
+em_utils_save_part_to_file(GtkWidget *parent, const gchar *filename, CamelMimePart *part)
{
- int done;
- char *dirname;
+ gint done;
+ gchar *dirname;
struct stat st;
if (filename[0] == 0)
@@ -599,9 +599,9 @@ struct _save_messages_data {
};
static void
-emu_save_messages_response(GtkWidget *filesel, int response, struct _save_messages_data *data)
+emu_save_messages_response(GtkWidget *filesel, gint response, struct _save_messages_data *data)
{
- char *uri;
+ gchar *uri;
if (response == GTK_RESPONSE_OK) {
uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel));
@@ -639,7 +639,7 @@ em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
{
struct _save_messages_data *data;
GtkWidget *filesel;
- char *filename = NULL;
+ gchar *filename = NULL;
CamelMessageInfo *info = NULL;
g_return_if_fail (CAMEL_IS_FOLDER (folder));
@@ -669,9 +669,9 @@ em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
/* ********************************************************************** */
static void
-emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *any, CORBA_Environment *ev, void *data)
+emu_add_address_cb(BonoboListener *listener, const gchar *name, const CORBA_any *any, CORBA_Environment *ev, gpointer data)
{
- char *type = bonobo_event_subtype(name);
+ gchar *type = bonobo_event_subtype(name);
if (!strcmp(type, "Destroy"))
gtk_widget_destroy((GtkWidget *)data);
@@ -681,12 +681,12 @@ emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *
/* one of email or vcard should be always NULL, never both of them */
static void
-emu_add_address_or_vcard (struct _GtkWidget *parent, const char *email, const char *vcard)
+emu_add_address_or_vcard (struct _GtkWidget *parent, const gchar *email, const gchar *vcard)
{
GtkWidget *win;
GtkWidget *control;
/*GtkWidget *socket;*/
- char *email_buf = NULL;
+ gchar *email_buf = NULL;
if (email) {
CamelInternetAddress *cia;
@@ -742,7 +742,7 @@ emu_add_address_or_vcard (struct _GtkWidget *parent, const char *email, const ch
* Add address @email to the addressbook.
**/
void
-em_utils_add_address (struct _GtkWidget *parent, const char *email)
+em_utils_add_address (struct _GtkWidget *parent, const gchar *email)
{
emu_add_address_or_vcard (parent, email, NULL);
}
@@ -752,7 +752,7 @@ em_utils_add_address (struct _GtkWidget *parent, const char *email)
* Adds whole vCard to the addressbook.
**/
void
-em_utils_add_vcard (struct _GtkWidget *parent, const char *vcard)
+em_utils_add_vcard (struct _GtkWidget *parent, const gchar *vcard)
{
emu_add_address_or_vcard (parent, NULL, vcard);
}
@@ -777,12 +777,12 @@ ted_free (struct ted_t *ted)
}
static void
-tag_editor_response (GtkWidget *dialog, int button, struct ted_t *ted)
+tag_editor_response (GtkWidget *dialog, gint button, struct ted_t *ted)
{
CamelFolder *folder;
CamelTag *tags, *t;
GPtrArray *uids;
- int i;
+ gint i;
if (button == GTK_RESPONSE_OK && (tags = message_tag_editor_get_tag_list (ted->editor))) {
folder = ted->folder;
@@ -824,7 +824,7 @@ em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *u
{
GtkWidget *editor;
struct ted_t *ted;
- int i;
+ gint i;
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
@@ -886,7 +886,7 @@ em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *u
void
em_utils_flag_for_followup_clear (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
{
- int i;
+ gint i;
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
@@ -920,8 +920,8 @@ em_utils_flag_for_followup_clear (GtkWidget *parent, CamelFolder *folder, GPtrAr
void
em_utils_flag_for_followup_completed (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
{
- char *now;
- int i;
+ gchar *now;
+ gint i;
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
@@ -930,7 +930,7 @@ em_utils_flag_for_followup_completed (GtkWidget *parent, CamelFolder *folder, GP
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
- const char *tag;
+ const gchar *tag;
CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
if (mi) {
@@ -958,7 +958,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
{
CamelStreamFilter *filtered_stream;
CamelMimeFilterFrom *from_filter;
- int i, res = 0;
+ gint i, res = 0;
from_filter = camel_mime_filter_from_new();
filtered_stream = camel_stream_filter_new_with_stream(stream);
@@ -967,7 +967,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
for (i=0; i<uids->len; i++) {
CamelMimeMessage *message;
- char *from;
+ gchar *from;
message = camel_folder_get_message(folder, uids->pdata[i], NULL);
if (message == NULL) {
@@ -1003,7 +1003,7 @@ em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream)
{
CamelException *ex = camel_exception_new();
CamelMimeParser *mp = camel_mime_parser_new();
- int res = -1;
+ gint res = -1;
camel_mime_parser_scan_from(mp, TRUE);
camel_mime_parser_init_with_stream(mp, stream);
@@ -1079,7 +1079,7 @@ em_utils_selection_get_mailbox(GtkSelectionData *data, CamelFolder *folder)
/* TODO: a stream mem with read-only access to existing data? */
/* NB: Although copying would let us run this async ... which it should */
- stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length);
+ stream = (CamelStream *)camel_stream_mem_new_with_buffer((gchar *)data->data, data->length);
em_utils_read_messages_from_stream(folder, stream);
camel_object_unref(stream);
}
@@ -1102,7 +1102,7 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder)
return;
ex = camel_exception_new();
- stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length);
+ stream = (CamelStream *)camel_stream_mem_new_with_buffer((gchar *)data->data, data->length);
msg = camel_mime_message_new();
if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) == 0)
camel_folder_append_message(folder, msg, NULL, NULL, ex);
@@ -1122,14 +1122,14 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder)
* FIXME: be nice if this could take a folder argument rather than uri
**/
void
-em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArray *uids)
+em_utils_selection_set_uidlist(GtkSelectionData *data, const gchar *uri, GPtrArray *uids)
{
GByteArray *array = g_byte_array_new();
- int i;
+ gint i;
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */
- g_byte_array_append(array, (unsigned char *)uri, strlen(uri)+1);
+ g_byte_array_append(array, (guchar *)uri, strlen(uri)+1);
for (i=0; i<uids->len; i++)
g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1);
@@ -1148,10 +1148,10 @@ em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArra
* Warning: Could take some time to run.
**/
void
-em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int move, CamelException *ex)
+em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, gint move, CamelException *ex)
{
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */
- char *inptr, *inend;
+ gchar *inptr, *inend;
GPtrArray *uids;
CamelFolder *folder;
@@ -1160,15 +1160,15 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
uids = g_ptr_array_new();
- inptr = (char *)data->data;
- inend = (char *)(data->data + data->length);
+ inptr = (gchar *)data->data;
+ inend = (gchar *)(data->data + data->length);
while (inptr < inend) {
- char *start = inptr;
+ gchar *start = inptr;
while (inptr < inend && *inptr)
inptr++;
- if (start > (char *)data->data)
+ if (start > (gchar *)data->data)
g_ptr_array_add(uids, g_strndup(start, inptr-start));
inptr++;
@@ -1179,7 +1179,7 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
return;
}
- folder = mail_tool_uri_to_folder((char *)data->data, 0, ex);
+ folder = mail_tool_uri_to_folder((gchar *)data->data, 0, ex);
if (folder) {
camel_folder_transfer_messages_to(folder, uids, dest, NULL, move, ex);
camel_object_unref(folder);
@@ -1201,10 +1201,10 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
void
em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
{
- char *tmpdir;
+ gchar *tmpdir;
CamelStream *fstream;
- char *uri, *file = NULL, *tmpfile;
- int fd;
+ gchar *uri, *file = NULL, *tmpfile;
+ gint fd;
CamelMessageInfo *info;
tmpdir = e_mkdtemp("drag-n-drop-XXXXXX");
@@ -1244,9 +1244,9 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
if (fstream) {
if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0) {
/* terminate with \r\n to be compliant with the spec */
- char *uri_crlf = g_strconcat(uri, "\r\n", NULL);
+ gchar *uri_crlf = g_strconcat(uri, "\r\n", NULL);
- gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)uri_crlf, strlen(uri_crlf));
g_free(uri_crlf);
}
@@ -1272,12 +1272,12 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder)
{
CamelStream *stream;
CamelURL *url;
- int fd, i, res = 0;
- char *tmp, **uris;
+ gint fd, i, res = 0;
+ gchar *tmp, **uris;
d(printf(" * drop uri list\n"));
- tmp = g_strndup((char *)data->data, data->length);
+ tmp = g_strndup((gchar *)data->data, data->length);
uris = g_strsplit(tmp, "\n", 0);
g_free(tmp);
for (i=0;res == 0 && uris[i];i++) {
@@ -1305,9 +1305,9 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder)
}
static void
-emu_save_part_done(CamelMimePart *part, char *name, int done, void *data)
+emu_save_part_done(CamelMimePart *part, gchar *name, gint done, gpointer data)
{
- ((int *)data)[0] = done;
+ ((gint *)data)[0] = done;
}
/**
@@ -1321,12 +1321,12 @@ emu_save_part_done(CamelMimePart *part, char *name, int done, void *data)
*
* Return value: NULL if anything failed.
**/
-char *
+gchar *
em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
{
- const char *filename;
- char *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL;
- int done;
+ const gchar *filename;
+ gchar *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL;
+ gint done;
GtkWidget *w;
tmpdir = e_mkdtemp("evolution-tmp-XXXXXX");
@@ -1343,9 +1343,9 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
} else {
utf8_mfilename = g_strdup (filename);
e_filename_make_safe (utf8_mfilename);
- mfilename = g_filename_from_utf8 ((const char *) utf8_mfilename, -1, NULL, NULL, NULL);
+ mfilename = g_filename_from_utf8 ((const gchar *) utf8_mfilename, -1, NULL, NULL, NULL);
g_free (utf8_mfilename);
- filename = (const char *) mfilename;
+ filename = (const gchar *) mfilename;
}
path = g_build_filename(tmpdir, filename, NULL);
@@ -1376,13 +1376,13 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
**/
gboolean
-em_utils_folder_is_templates (CamelFolder *folder, const char *uri)
+em_utils_folder_is_templates (CamelFolder *folder, const gchar *uri)
{
EAccountList *accounts;
EAccount *account;
EIterator *iter;
- int is = FALSE;
- char *templates_uri;
+ gint is = FALSE;
+ gchar *templates_uri;
if (folder == mail_component_get_folder (NULL, MAIL_COMPONENT_FOLDER_TEMPLATES))
return TRUE;
@@ -1423,13 +1423,13 @@ em_utils_folder_is_templates (CamelFolder *folder, const char *uri)
* Returns %TRUE if this is a Drafts folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
+em_utils_folder_is_drafts(CamelFolder *folder, const gchar *uri)
{
EAccountList *accounts;
EAccount *account;
EIterator *iter;
- int is = FALSE;
- char *drafts_uri;
+ gint is = FALSE;
+ gchar *drafts_uri;
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS))
return TRUE;
@@ -1470,13 +1470,13 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
* Returns %TRUE if this is a Sent folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
+em_utils_folder_is_sent(CamelFolder *folder, const gchar *uri)
{
EAccountList *accounts;
EAccount *account;
EIterator *iter;
- int is = FALSE;
- char *sent_uri;
+ gint is = FALSE;
+ gchar *sent_uri;
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT))
return TRUE;
@@ -1517,7 +1517,7 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
* Returns %TRUE if this is an Outbox folder or %FALSE otherwise.
**/
gboolean
-em_utils_folder_is_outbox(CamelFolder *folder, const char *uri)
+em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri)
{
/* <Highlander>There can be only one.</Highlander> */
return folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX);
@@ -1556,8 +1556,8 @@ em_utils_adjustment_page(GtkAdjustment *adj, gboolean down)
static EProxy *emu_proxy = NULL;
static GStaticMutex emu_proxy_lock = G_STATIC_MUTEX_INIT;
-static void *
-emu_proxy_setup (void *data)
+static gpointer
+emu_proxy_setup (gpointer data)
{
if (!emu_proxy) {
emu_proxy = e_proxy_new ();
@@ -1575,10 +1575,10 @@ emu_proxy_setup (void *data)
*
* Return value: Must be freed when finished with.
**/
-char *
-em_utils_get_proxy_uri (const char *pUri)
+gchar *
+em_utils_get_proxy_uri (const gchar *pUri)
{
- char *uri = NULL;
+ gchar *uri = NULL;
g_static_mutex_lock (&emu_proxy_lock);
@@ -1605,13 +1605,13 @@ em_utils_get_proxy_uri (const char *pUri)
*
* Return Value: The part in displayable html format.
**/
-char *
+gchar *
em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source)
{
EMFormatQuote *emfq;
CamelStreamMem *mem;
GByteArray *buf;
- char *text;
+ gchar *text;
buf = g_byte_array_new ();
mem = (CamelStreamMem *) camel_stream_mem_new ();
@@ -1633,7 +1633,7 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source)
camel_stream_write((CamelStream *) mem, "", 1);
camel_object_unref(mem);
- text = (char *)buf->data;
+ text = (gchar *)buf->data;
if (len)
*len = buf->len-1;
g_byte_array_free (buf, FALSE);
@@ -1655,13 +1655,13 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source)
*
* Return value: The html version.
**/
-char *
-em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags, ssize_t *len, EMFormat *source, const char *append)
+gchar *
+em_utils_message_to_html(CamelMimeMessage *message, const gchar *credits, guint32 flags, ssize_t *len, EMFormat *source, const gchar *append)
{
EMFormatQuote *emfq;
CamelStreamMem *mem;
GByteArray *buf;
- char *text;
+ gchar *text;
buf = g_byte_array_new ();
mem = (CamelStreamMem *) camel_stream_mem_new ();
@@ -1673,7 +1673,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
if (!source) {
GConfClient *gconf;
- char *charset;
+ gchar *charset;
/* FIXME: we should be getting this from the current view, not the global setting. */
gconf = gconf_client_get_default ();
@@ -1692,7 +1692,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
camel_stream_write((CamelStream *)mem, "", 1);
camel_object_unref(mem);
- text = (char *)buf->data;
+ text = (gchar *)buf->data;
if (len)
*len = buf->len-1;
g_byte_array_free(buf, FALSE);
@@ -1712,7 +1712,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
void
em_utils_expunge_folder (GtkWidget *parent, CamelFolder *folder)
{
- char *name;
+ gchar *name;
camel_object_get(folder, NULL, CAMEL_OBJECT_DESCRIPTION, &name, 0);
@@ -1772,11 +1772,11 @@ em_utils_empty_trash (GtkWidget *parent)
mail_empty_trash (NULL, NULL, NULL);
}
-char *
-em_utils_folder_name_from_uri (const char *uri)
+gchar *
+em_utils_folder_name_from_uri (const gchar *uri)
{
CamelURL *url;
- char *folder_name = NULL;
+ gchar *folder_name = NULL;
if (uri == NULL || (url = camel_url_new (uri, NULL)) == NULL)
return NULL;
@@ -1805,12 +1805,12 @@ em_utils_folder_name_from_uri (const char *uri)
* local local:/storage/path#folder -> email://local@local/folder
*/
-char *em_uri_from_camel(const char *curi)
+gchar *em_uri_from_camel(const gchar *curi)
{
CamelURL *curl;
EAccount *account;
- const char *uid, *path;
- char *euri, *tmp;
+ const gchar *uid, *path;
+ gchar *euri, *tmp;
CamelProvider *provider;
CamelException ex;
@@ -1856,14 +1856,14 @@ char *em_uri_from_camel(const char *curi)
return euri;
}
-char *em_uri_to_camel(const char *euri)
+gchar *em_uri_to_camel(const gchar *euri)
{
EAccountList *accounts;
const EAccount *account;
EAccountService *service;
CamelProvider *provider;
CamelURL *eurl, *curl;
- char *uid, *curi;
+ gchar *uid, *curi;
if (strncmp(euri, "email:", 6) != 0) {
d(printf("em uri to camel not euri '%s'\n", euri));
@@ -1880,7 +1880,7 @@ char *em_uri_to_camel(const char *euri)
/* Sigh, shoul'dve used mbox@local for mailboxes, not local@local */
if (strcmp(eurl->host, "local") == 0
&& (strcmp(eurl->user, "local") == 0 || strcmp(eurl->user, "vfolder") == 0)) {
- char *base;
+ gchar *base;
if (strcmp(eurl->user, "vfolder") == 0)
curl = camel_url_new("vfolder:", NULL);
@@ -1891,7 +1891,7 @@ char *em_uri_to_camel(const char *euri)
#ifdef G_OS_WIN32
/* Turn backslashes into slashes to avoid URI encoding */
{
- char *p = base;
+ gchar *p = base;
while ((p = strchr (p, '\\')))
*p++ = '/';
}
@@ -1946,9 +1946,9 @@ char *em_uri_to_camel(const char *euri)
#include <libebook/e-book.h>
struct _addr_node {
- char *addr;
+ gchar *addr;
time_t stamp;
- int found;
+ gint found;
};
#define EMU_ADDR_CACHE_TIME (60*30) /* in seconds */
@@ -1958,8 +1958,8 @@ static ESourceList *emu_addr_list;
static GHashTable *emu_addr_cache;
/* runs sync, in main thread */
-static void *
-emu_addr_setup(void *dummy)
+static gpointer
+emu_addr_setup(gpointer dummy)
{
GError *err = NULL;
@@ -1972,7 +1972,7 @@ emu_addr_setup(void *dummy)
}
static void
-emu_addr_cancel_book(void *data)
+emu_addr_cancel_book(gpointer data)
{
EBook *book = data;
GError *err = NULL;
@@ -2067,9 +2067,9 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
{
GError *err = NULL;
GSList *s, *g, *addr_sources = NULL;
- int stop = FALSE, found = FALSE;
+ gint stop = FALSE, found = FALSE;
EBookQuery *query;
- const char *addr;
+ const gchar *addr;
struct _addr_node *node;
time_t now;
@@ -2119,7 +2119,7 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
for (s = e_source_group_peek_sources((ESourceGroup *)g->data);s;s=g_slist_next(s)) {
ESource *src = s->data;
- const char *completion = e_source_get_property (src, "completion");
+ const gchar *completion = e_source_get_property (src, "completion");
if (completion && !g_ascii_strcasecmp (completion, "true")) {
addr_sources = g_slist_prepend(addr_sources, src);
@@ -2194,8 +2194,8 @@ em_utils_in_addressbook (CamelInternetAddress *iaddr, gboolean local_only)
struct _CamelMimePart *
em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
{
- const char *addr;
- int stop = FALSE, found = FALSE;
+ const gchar *addr;
+ gint stop = FALSE, found = FALSE;
GSList *s, *g, *addr_sources = NULL;
GError *err = NULL;
EBookQuery *query = NULL;
@@ -2224,7 +2224,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
for (s = e_source_group_peek_sources((ESourceGroup *)g->data); s; s=g_slist_next(s)) {
ESource *src = s->data;
- const char *completion = e_source_get_property (src, "completion");
+ const gchar *completion = e_source_get_property (src, "completion");
if (completion && !g_ascii_strcasecmp (completion, "true")) {
addr_sources = g_slist_prepend(addr_sources, src);
@@ -2289,7 +2289,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
/* Form a mime part out of the photo */
part = camel_mime_part_new();
camel_mime_part_set_content(part,
- (const char *) photo->data.inlined.data,
+ (const gchar *) photo->data.inlined.data,
photo->data.inlined.length, "image/jpeg");
e_contact_photo_free (photo);
@@ -2305,14 +2305,14 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
*
* Return value: NULL if unknown (more likely application/octet-stream).
**/
-const char *
+const gchar *
em_utils_snoop_type(CamelMimePart *part)
{
- /* cache is here only to be able still return const char * */
+ /* cache is here only to be able still return const gchar * */
static GHashTable *types_cache = NULL;
- const char *filename;
- char *name_type = NULL, *magic_type = NULL, *res, *tmp;
+ const gchar *filename;
+ gchar *name_type = NULL, *magic_type = NULL, *res, *tmp;
CamelDataWrapper *dw;
filename = camel_mime_part_get_filename (part);
@@ -2324,7 +2324,7 @@ em_utils_snoop_type(CamelMimePart *part)
CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new();
if (camel_data_wrapper_decode_to_stream(dw, (CamelStream *)mem) > 0) {
- char *ct = g_content_type_guess (filename, mem->buffer->data, mem->buffer->len, NULL);
+ gchar *ct = g_content_type_guess (filename, mem->buffer->data, mem->buffer->len, NULL);
if (ct)
magic_type = g_content_type_get_mime_type (ct);
@@ -2405,7 +2405,7 @@ em_utils_clear_get_password_canceled_accounts_flag (void)
}
-static void error_response(GtkObject *o, int button, void *data)
+static void error_response(GtkObject *o, gint button, gpointer data)
{
gtk_widget_destroy((GtkWidget *)o);
}
diff --git a/mail/em-utils.h b/mail/em-utils.h
index 1b60205168..76674bea11 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -44,7 +44,7 @@ struct _GtkAdjustment;
struct _CamelException;
struct _EMFormat;
-gboolean em_utils_prompt_user(struct _GtkWindow *parent, const char *promptkey, const char *tag, const char *arg0, ...);
+gboolean em_utils_prompt_user(struct _GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...);
GPtrArray *em_utils_uids_copy (GPtrArray *uids);
void em_utils_uids_free (GPtrArray *uids);
@@ -56,12 +56,12 @@ void em_utils_edit_filters (struct _GtkWidget *parent);
void em_filename_make_safe (gchar *string);
void em_utils_edit_vfolders (struct _GtkWidget *parent);
-void em_utils_save_part(struct _GtkWidget *parent, const char *prompt, struct _CamelMimePart *part);
-gboolean em_utils_save_part_to_file(struct _GtkWidget *parent, const char *filename, struct _CamelMimePart *part);
+void em_utils_save_part(struct _GtkWidget *parent, const gchar *prompt, struct _CamelMimePart *part);
+gboolean em_utils_save_part_to_file(struct _GtkWidget *parent, const gchar *filename, struct _CamelMimePart *part);
void em_utils_save_messages (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
-void em_utils_add_address(struct _GtkWidget *parent, const char *email);
-void em_utils_add_vcard(struct _GtkWidget *parent, const char *vcard);
+void em_utils_add_address(struct _GtkWidget *parent, const gchar *email);
+void em_utils_add_vcard(struct _GtkWidget *parent, const gchar *vcard);
void em_utils_flag_for_followup (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
void em_utils_flag_for_followup_clear (struct _GtkWidget *parent, struct _CamelFolder *folder, GPtrArray *uids);
@@ -73,36 +73,36 @@ void em_utils_selection_set_mailbox(struct _GtkSelectionData *data, struct _Came
void em_utils_selection_get_mailbox(struct _GtkSelectionData *data, struct _CamelFolder *folder);
void em_utils_selection_get_message(struct _GtkSelectionData *data, struct _CamelFolder *folder);
/* FIXME: be nice if these also worked on struct _CamelFolder's, no easy way to get uri from folder yet tho */
-void em_utils_selection_set_uidlist(struct _GtkSelectionData *data, const char *uri, GPtrArray *uids);
-void em_utils_selection_get_uidlist(struct _GtkSelectionData *data, struct _CamelFolder *dest, int move, struct _CamelException *ex);
+void em_utils_selection_set_uidlist(struct _GtkSelectionData *data, const gchar *uri, GPtrArray *uids);
+void em_utils_selection_get_uidlist(struct _GtkSelectionData *data, struct _CamelFolder *dest, gint move, struct _CamelException *ex);
void em_utils_selection_set_urilist(struct _GtkSelectionData *data, struct _CamelFolder *folder, GPtrArray *uids);
void em_utils_selection_get_urilist(struct _GtkSelectionData *data, struct _CamelFolder *folder);
-char *em_utils_temp_save_part(struct _GtkWidget *parent, struct _CamelMimePart *part, gboolean mode);
-void em_utils_save_parts (struct _GtkWidget *parent, const char *prompt, GSList * parts);
+gchar *em_utils_temp_save_part(struct _GtkWidget *parent, struct _CamelMimePart *part, gboolean mode);
+void em_utils_save_parts (struct _GtkWidget *parent, const gchar *prompt, GSList * parts);
-gboolean em_utils_folder_is_drafts(struct _CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_templates(struct _CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_sent(struct _CamelFolder *folder, const char *uri);
-gboolean em_utils_folder_is_outbox(struct _CamelFolder *folder, const char *uri);
+gboolean em_utils_folder_is_drafts(struct _CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_templates(struct _CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_sent(struct _CamelFolder *folder, const gchar *uri);
+gboolean em_utils_folder_is_outbox(struct _CamelFolder *folder, const gchar *uri);
void em_utils_adjustment_page(struct _GtkAdjustment *adj, gboolean down);
-char *em_utils_get_proxy_uri (const char *uri);
+gchar *em_utils_get_proxy_uri (const gchar *uri);
/* FIXME: should this have an override charset? */
-char *em_utils_part_to_html(struct _CamelMimePart *part, ssize_t *len, struct _EMFormat *source);
-char *em_utils_message_to_html(struct _CamelMimeMessage *msg, const char *credits, guint32 flags, ssize_t *len, struct _EMFormat *source, const char *append);
+gchar *em_utils_part_to_html(struct _CamelMimePart *part, ssize_t *len, struct _EMFormat *source);
+gchar *em_utils_message_to_html(struct _CamelMimeMessage *msg, const gchar *credits, guint32 flags, ssize_t *len, struct _EMFormat *source, const gchar *append);
void em_utils_expunge_folder (struct _GtkWidget *parent, struct _CamelFolder *folder);
void em_utils_empty_trash (struct _GtkWidget *parent);
/* returns the folder name portion of an URI */
-char *em_utils_folder_name_from_uri (const char *uri);
+gchar *em_utils_folder_name_from_uri (const gchar *uri);
/* internal/camel uri translation */
-char *em_uri_from_camel (const char *curi);
-char *em_uri_to_camel (const char *euri);
+gchar *em_uri_from_camel (const gchar *curi);
+gchar *em_uri_to_camel (const gchar *euri);
/* Run errors silently on the status bar */
void em_utils_show_error_silent (struct _GtkWidget *widget);
@@ -112,7 +112,7 @@ void em_utils_show_info_silent (struct _GtkWidget *widget);
gboolean em_utils_in_addressbook (struct _CamelInternetAddress *addr, gboolean local_only);
struct _CamelMimePart *em_utils_contact_photo (struct _CamelInternetAddress *addr, gboolean local);
-const char *em_utils_snoop_type(struct _CamelMimePart *part);
+const gchar *em_utils_snoop_type(struct _CamelMimePart *part);
/* clears flag 'get_password_canceled' at every known accounts, so if needed, get_password will show dialog */
void em_utils_clear_get_password_canceled_accounts_flag (void);
diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c
index e317b5cabf..b111376b20 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -35,7 +35,7 @@
#include "em-filter-folder-element.h"
-static FilterElement *vfolder_new_element(RuleContext *rc, const char *type);
+static FilterElement *vfolder_new_element(RuleContext *rc, const gchar *type);
static RuleContextClass *parent_class = NULL;
@@ -104,7 +104,7 @@ em_vfolder_context_new(void)
}
static FilterElement *
-vfolder_new_element(RuleContext *rc, const char *type)
+vfolder_new_element(RuleContext *rc, const gchar *type)
{
if (!strcmp(type, "system-flag")) {
return (FilterElement *) filter_option_new();
diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c
index dcc6f03e75..4182f7a3a3 100644
--- a/mail/em-vfolder-editor.c
+++ b/mail/em-vfolder-editor.c
@@ -104,7 +104,7 @@ em_vfolder_editor_new (EMVFolderContext *vc)
{
EMVFolderEditor *ve = (EMVFolderEditor *) g_object_new (em_vfolder_editor_get_type(), NULL);
GladeXML *gui;
- char *gladefile;
+ gchar *gladefile;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"filter.glade",
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 03f46afff8..d3090a672d 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -43,10 +43,10 @@
#define d(x)
-static int validate(FilterRule *);
-static int vfolder_eq(FilterRule *fr, FilterRule *cm);
+static gint validate(FilterRule *);
+static gint vfolder_eq(FilterRule *fr, FilterRule *cm);
static xmlNodePtr xml_encode(FilterRule *);
-static int xml_decode(FilterRule *, xmlNodePtr, RuleContext *f);
+static gint xml_decode(FilterRule *, xmlNodePtr, RuleContext *f);
static void rule_copy(FilterRule *dest, FilterRule *src);
/*static void build_code(FilterRule *, GString *out);*/
static GtkWidget *get_widget(FilterRule *fr, RuleContext *f);
@@ -56,7 +56,7 @@ static void em_vfolder_rule_init(EMVFolderRule *vr);
static void em_vfolder_rule_finalise(GObject *obj);
/* DO NOT internationalise these strings */
-static const char *with_names[] = {
+static const gchar *with_names[] = {
"specific",
"local_remote_active",
"remote_active",
@@ -141,7 +141,7 @@ em_vfolder_rule_new(void)
}
void
-em_vfolder_rule_add_source(EMVFolderRule *vr, const char *uri)
+em_vfolder_rule_add_source(EMVFolderRule *vr, const gchar *uri)
{
g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
g_return_if_fail (uri);
@@ -151,8 +151,8 @@ em_vfolder_rule_add_source(EMVFolderRule *vr, const char *uri)
filter_rule_emit_changed((FilterRule *)vr);
}
-const char *
-em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri)
+const gchar *
+em_vfolder_rule_find_source(EMVFolderRule *vr, const gchar *uri)
{
GList *l;
@@ -171,13 +171,13 @@ em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri)
}
void
-em_vfolder_rule_remove_source(EMVFolderRule *vr, const char *uri)
+em_vfolder_rule_remove_source(EMVFolderRule *vr, const gchar *uri)
{
- char *found;
+ gchar *found;
g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
- found =(char *)em_vfolder_rule_find_source(vr, uri);
+ found =(gchar *)em_vfolder_rule_find_source(vr, uri);
if (found) {
vr->sources = g_list_remove(vr->sources, found);
g_free(found);
@@ -185,15 +185,15 @@ em_vfolder_rule_remove_source(EMVFolderRule *vr, const char *uri)
}
}
-const char *
-em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last)
+const gchar *
+em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last)
{
GList *node;
if (last == NULL) {
node = vr->sources;
} else {
- node = g_list_find(vr->sources, (char *)last);
+ node = g_list_find(vr->sources, (gchar *)last);
if (node == NULL)
node = vr->sources;
else
@@ -201,7 +201,7 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last)
}
if (node)
- return (const char *)node->data;
+ return (const gchar *)node->data;
return NULL;
}
@@ -231,10 +231,10 @@ validate(FilterRule *fr)
static int
list_eq(GList *al, GList *bl)
{
- int truth = TRUE;
+ gint truth = TRUE;
while (truth && al && bl) {
- char *a = al->data, *b = bl->data;
+ gchar *a = al->data, *b = bl->data;
truth = strcmp(a, b)== 0;
al = al->next;
@@ -262,13 +262,13 @@ xml_encode(FilterRule *fr)
g_return_val_if_fail (node != NULL, NULL);
g_return_val_if_fail (vr->with < sizeof(with_names)/sizeof(with_names[0]), NULL);
- set = xmlNewNode(NULL, (const unsigned char *)"sources");
+ set = xmlNewNode(NULL, (const guchar *)"sources");
xmlAddChild(node, set);
- xmlSetProp(set, (const unsigned char *)"with", (unsigned char *)with_names[vr->with]);
+ xmlSetProp(set, (const guchar *)"with", (guchar *)with_names[vr->with]);
l = vr->sources;
while (l) {
- work = xmlNewNode(NULL, (const unsigned char *)"folder");
- xmlSetProp(work, (const unsigned char *)"uri", (unsigned char *)l->data);
+ work = xmlNewNode(NULL, (const guchar *)"folder");
+ xmlSetProp(work, (const guchar *)"uri", (guchar *)l->data);
xmlAddChild(set, work);
l = l->next;
}
@@ -277,9 +277,9 @@ xml_encode(FilterRule *fr)
}
static void
-set_with(EMVFolderRule *vr, const char *name)
+set_with(EMVFolderRule *vr, const gchar *name)
{
- int i;
+ gint i;
for(i=0;i<sizeof(with_names)/sizeof(with_names[0]);i++) {
if (!strcmp(name, with_names[i])) {
@@ -295,9 +295,9 @@ static int
xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
{
xmlNodePtr set, work;
- int result;
+ gint result;
EMVFolderRule *vr =(EMVFolderRule *)fr;
- char *tmp;
+ gchar *tmp;
result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, f);
if (result != 0)
@@ -312,16 +312,16 @@ xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
set = node->children;
while (set) {
- if (!strcmp((char *)set->name, "sources")) {
- tmp = (char *)xmlGetProp(set, (const unsigned char *)"with");
+ if (!strcmp((gchar *)set->name, "sources")) {
+ tmp = (gchar *)xmlGetProp(set, (const guchar *)"with");
if (tmp) {
set_with(vr, tmp);
xmlFree(tmp);
}
work = set->children;
while (work) {
- if (!strcmp((char *)work->name, "folder")) {
- tmp = (char *)xmlGetProp(work, (const unsigned char *)"uri");
+ if (!strcmp((gchar *)work->name, "folder")) {
+ tmp = (gchar *)xmlGetProp(work, (const guchar *)"uri");
if (tmp) {
vr->sources = g_list_append(vr->sources, g_strdup(tmp));
xmlFree(tmp);
@@ -352,7 +352,7 @@ rule_copy(FilterRule *dest, FilterRule *src)
node = vsrc->sources;
while (node) {
- char *uri = node->data;
+ gchar *uri = node->data;
vdest->sources = g_list_append(vdest->sources, g_strdup(uri));
node = node->next;
@@ -372,7 +372,7 @@ enum {
struct _source_data {
RuleContext *rc;
EMVFolderRule *vr;
- const char *current;
+ const gchar *current;
GtkListStore *model;
GtkTreeView *list;
GtkWidget *source_selector;
@@ -439,11 +439,11 @@ select_source_with_changed(GtkWidget *widget, struct _source_data *data)
}
/* attempt to make a 'nice' folder name out of the raw uri */
-static char *format_source(const char *euri)
+static gchar *format_source(const gchar *euri)
{
CamelURL *url;
GString *out;
- char *res, *uri;
+ gchar *res, *uri;
/* This should really probably base it on the account name? */
uri = em_uri_to_camel(euri);
@@ -476,10 +476,10 @@ static char *format_source(const char *euri)
static void
vfr_folder_response(GtkWidget *dialog, gint button, struct _source_data *data)
{
- const char *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog);
+ const gchar *uri = em_folder_selector_get_selected_uri((EMFolderSelector *)dialog);
if (button == GTK_RESPONSE_OK && uri != NULL) {
- char *urinice, *euri;
+ gchar *urinice, *euri;
GtkTreeSelection *selection;
GtkTreeIter iter;
@@ -521,11 +521,11 @@ static void
source_remove(GtkWidget *widget, struct _source_data *data)
{
GtkTreeSelection *selection;
- const char *source;
+ const gchar *source;
GtkTreePath *path;
GtkTreeIter iter;
- int index = 0;
- int n;
+ gint index = 0;
+ gint n;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data->list));
@@ -568,11 +568,11 @@ source_remove(GtkWidget *widget, struct _source_data *data)
}
-GtkWidget *em_vfolder_editor_sourcelist_new(char *widget_name, char *string1, char *string2,
- int int1, int int2);
+GtkWidget *em_vfolder_editor_sourcelist_new(gchar *widget_name, gchar *string1, gchar *string2,
+ gint int1, gint int2);
GtkWidget *
-em_vfolder_editor_sourcelist_new(char *widget_name, char *string1, char *string2, int int1, int int2)
+em_vfolder_editor_sourcelist_new(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
{
GtkWidget *table, *scrolled;
GtkTreeSelection *selection;
@@ -616,11 +616,11 @@ get_widget(FilterRule *fr, RuleContext *rc)
GtkWidget *widget, *frame, *list;
struct _source_data *data;
GtkRadioButton *rb;
- const char *source;
+ const gchar *source;
GtkTreeIter iter;
GladeXML *gui;
- int i;
- char *gladefile;
+ gint i;
+ gchar *gladefile;
widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
@@ -649,7 +649,7 @@ get_widget(FilterRule *fr, RuleContext *rc)
source = NULL;
while ((source = em_vfolder_rule_next_source(vr, source))) {
- char *nice = format_source(source);
+ gchar *nice = format_source(source);
gtk_list_store_append(data->model, &iter);
gtk_list_store_set(data->model, &iter, 0, nice, 1, source, -1);
diff --git a/mail/em-vfolder-rule.h b/mail/em-vfolder-rule.h
index 9274c94b5c..1c0b2a3113 100644
--- a/mail/em-vfolder-rule.h
+++ b/mail/em-vfolder-rule.h
@@ -60,9 +60,9 @@ GType em_vfolder_rule_get_type (void);
EMVFolderRule *em_vfolder_rule_new (void);
/* methods */
-void em_vfolder_rule_add_source (EMVFolderRule *vr, const char *uri);
-void em_vfolder_rule_remove_source (EMVFolderRule *vr, const char *uri);
-const char *em_vfolder_rule_find_source (EMVFolderRule *vr, const char *uri);
-const char *em_vfolder_rule_next_source (EMVFolderRule *vr, const char *last);
+void em_vfolder_rule_add_source (EMVFolderRule *vr, const gchar *uri);
+void em_vfolder_rule_remove_source (EMVFolderRule *vr, const gchar *uri);
+const gchar *em_vfolder_rule_find_source (EMVFolderRule *vr, const gchar *uri);
+const gchar *em_vfolder_rule_next_source (EMVFolderRule *vr, const gchar *last);
#endif /* ! _EM_VFOLDER_RULE_H */
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c
index 39bfd7bc3f..6e65418441 100644
--- a/mail/importers/elm-importer.c
+++ b/mail/importers/elm-importer.c
@@ -55,16 +55,16 @@ struct _elm_import_msg {
EImportTargetHome *target;
GMutex *status_lock;
- char *status_what;
- int status_pc;
- int status_timeout_id;
+ gchar *status_what;
+ gint status_pc;
+ gint status_timeout_id;
CamelOperation *status;
};
static GHashTable *
-parse_elm_rc(const char *elmrc)
+parse_elm_rc(const gchar *elmrc)
{
- char line[4096];
+ gchar line[4096];
FILE *handle;
GHashTable *prefs;
@@ -81,8 +81,8 @@ parse_elm_rc(const char *elmrc)
return prefs;
while (fgets (line, 4096, handle) != NULL) {
- char *linestart, *end;
- char *key, *value;
+ gchar *linestart, *end;
+ gchar *key, *value;
if (*line == '#' &&
(line[1] != '#' && line[2] != '#')) {
continue;
@@ -122,11 +122,11 @@ parse_elm_rc(const char *elmrc)
return prefs;
}
-static char *
-elm_get_rc(EImport *ei, const char *name)
+static gchar *
+elm_get_rc(EImport *ei, const gchar *name)
{
GHashTable *prefs;
- char *elmrc;
+ gchar *elmrc;
prefs = g_object_get_data((GObject *)ei, "elm-rc");
if (prefs == NULL) {
@@ -146,8 +146,8 @@ static gboolean
elm_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
{
EImportTargetHome *s;
- const char *maildir;
- char *elmdir;
+ const gchar *maildir;
+ gchar *elmdir;
gboolean mailexists, exists;
if (target->type != E_IMPORT_TARGET_HOME)
@@ -190,8 +190,8 @@ static MailImporterSpecial elm_special_folders[] = {
static void
elm_import_exec (struct _elm_import_msg *m)
{
- const char *maildir;
- char *elmdir;
+ const gchar *maildir;
+ gchar *elmdir;
maildir = elm_get_rc(m->import, "maildir");
if (maildir == NULL)
@@ -237,7 +237,7 @@ elm_import_free(struct _elm_import_msg *m)
}
static void
-elm_status(CamelOperation *op, const char *what, int pc, void *data)
+elm_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _elm_import_msg *importer = data;
@@ -254,11 +254,11 @@ elm_status(CamelOperation *op, const char *what, int pc, void *data)
}
static gboolean
-elm_status_timeout(void *data)
+elm_status_timeout(gpointer data)
{
struct _elm_import_msg *importer = data;
- int pc;
- char *what;
+ gint pc;
+ gchar *what;
if (importer->status_what) {
g_mutex_lock(importer->status_lock);
@@ -285,7 +285,7 @@ static int
mail_importer_elm_import(EImport *ei, EImportTarget *target)
{
struct _elm_import_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&elm_import_info);
g_datalist_set_data(&target->data, "elm-msg", m);
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index f42afec151..7cd2b34b22 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -54,12 +54,12 @@ typedef struct {
EImportTarget *target;
GMutex *status_lock;
- char *status_what;
- int status_pc;
- int status_timeout_id;
+ gchar *status_what;
+ gint status_pc;
+ gint status_timeout_id;
CamelOperation *cancel; /* cancel/status port */
- char *uri;
+ gchar *uri;
} MboxImporter;
static void
@@ -95,11 +95,11 @@ mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
static gboolean
mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
{
- char signature[6];
+ gchar signature[6];
gboolean ret = FALSE;
- int fd, n;
+ gint fd, n;
EImportTargetURI *s;
- char *filename;
+ gchar *filename;
if (target->type != E_IMPORT_TARGET_URI)
return FALSE;
@@ -124,7 +124,7 @@ mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
}
static void
-mbox_status(CamelOperation *op, const char *what, int pc, void *data)
+mbox_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
MboxImporter *importer = data;
@@ -141,11 +141,11 @@ mbox_status(CamelOperation *op, const char *what, int pc, void *data)
}
static gboolean
-mbox_status_timeout(void *data)
+mbox_status_timeout(gpointer data)
{
MboxImporter *importer = data;
- int pc;
- char *what;
+ gint pc;
+ gchar *what;
if (importer->status_what) {
g_mutex_lock(importer->status_lock);
@@ -161,7 +161,7 @@ mbox_status_timeout(void *data)
}
static void
-mbox_import_done(void *data, CamelException *ex)
+mbox_import_done(gpointer data, CamelException *ex)
{
MboxImporter *importer = data;
@@ -178,7 +178,7 @@ static void
mbox_import(EImport *ei, EImportTarget *target, EImportImporter *im)
{
MboxImporter *importer;
- char *filename;
+ gchar *filename;
/* TODO: do we validate target? */
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index 29a2dddd97..bfaf7896aa 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -62,8 +62,8 @@
* Return value: The physical uri of the folder, or NULL if the folder did
* not exist and could not be created.
**/
-char *
-mail_importer_make_local_folder(const char *folderpath)
+gchar *
+mail_importer_make_local_folder(const gchar *folderpath)
{
return g_strdup_printf("mbox:/home/notzed/.evolution/mail/local/%s", folderpath);
}
@@ -79,7 +79,7 @@ mail_importer_make_local_folder(const char *folderpath)
*/
void
mail_importer_add_line (MailImporter *importer,
- const char *str,
+ const gchar *str,
gboolean finished)
{
CamelMimeMessage *msg;
@@ -113,7 +113,7 @@ mail_importer_add_line (MailImporter *importer,
camel_message_info_free(info);
}
-struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data)
+struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const gchar *iid, gpointer data)
{
#if 0
if (strcmp(iid, ELM_INTELLIGENT_IMPORTER_IID) == 0)
@@ -133,12 +133,12 @@ struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *fac
struct _import_mbox_msg {
MailMsg base;
- char *path;
- char *uri;
+ gchar *path;
+ gchar *uri;
CamelOperation *cancel;
- void (*done)(void *data, CamelException *ex);
- void *done_data;
+ void (*done)(gpointer data, CamelException *ex);
+ gpointer done_data;
};
static gchar *
@@ -148,7 +148,7 @@ import_mbox_desc (struct _import_mbox_msg *m)
}
static struct {
- char tag;
+ gchar tag;
guint32 mozflag;
guint32 flag;
} status_flags[] = {
@@ -159,11 +159,11 @@ static struct {
};
static guint32
-decode_status(const char *status)
+decode_status(const gchar *status)
{
- const char *p;
+ const gchar *p;
guint32 flags = 0;
- int i;
+ gint i;
p = status;
while ((*p++)) {
@@ -176,11 +176,11 @@ decode_status(const char *status)
}
static guint32
-decode_mozilla_status(const char *tmp)
+decode_mozilla_status(const gchar *tmp)
{
unsigned long status = strtoul(tmp, NULL, 16);
guint32 flags = 0;
- int i;
+ gint i;
for (i=0;i<sizeof(status_flags)/sizeof(status_flags[0]);i++)
if (status_flags[i].mozflag & status)
@@ -194,7 +194,7 @@ import_mbox_exec (struct _import_mbox_msg *m)
CamelFolder *folder;
CamelMimeParser *mp = NULL;
struct stat st;
- int fd;
+ gint fd;
CamelMessageInfo *info;
if (g_stat(m->path, &st) == -1) {
@@ -232,8 +232,8 @@ import_mbox_exec (struct _import_mbox_msg *m)
camel_folder_freeze(folder);
while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
CamelMimeMessage *msg;
- const char *tmp;
- int pc = 0;
+ const gchar *tmp;
+ gint pc = 0;
guint32 flags = 0;
if (st.st_size > 0)
@@ -307,11 +307,11 @@ static MailMsgInfo import_mbox_info = {
(MailMsgFreeFunc) import_mbox_free
};
-int
-mail_importer_import_mbox(const char *path, const char *folderuri, CamelOperation *cancel, void (*done)(void *data, CamelException *), void *data)
+gint
+mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, CamelException *), gpointer data)
{
struct _import_mbox_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&import_mbox_info);
m->path = g_strdup(path);
@@ -330,7 +330,7 @@ mail_importer_import_mbox(const char *path, const char *folderuri, CamelOperatio
}
void
-mail_importer_import_mbox_sync(const char *path, const char *folderuri, CamelOperation *cancel)
+mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, CamelOperation *cancel)
{
struct _import_mbox_msg *m;
@@ -355,13 +355,13 @@ struct _import_folders_data {
};
static void
-import_folders_rec(struct _import_folders_data *m, const char *filepath, const char *folderparent)
+import_folders_rec(struct _import_folders_data *m, const gchar *filepath, const gchar *folderparent)
{
GDir *dir;
- const char *d;
+ const gchar *d;
struct stat st;
- char *filefull, *foldersub, *uri, *utf8_filename;
- const char *folder;
+ gchar *filefull, *foldersub, *uri, *utf8_filename;
+ const gchar *folder;
dir = g_dir_open(filepath, 0, NULL);
if (dir == NULL)
@@ -387,7 +387,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c
folder = d;
if (folderparent == NULL) {
- int i;
+ gint i;
for (i=0;m->special_folders[i].orig;i++)
if (strcmp(m->special_folders[i].orig, folder) == 0) {
@@ -406,7 +406,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c
/* This little gem re-uses the stat buffer and filefull to automagically scan mozilla-format folders */
if (!m->elmfmt) {
- char *tmp = g_strdup_printf("%s.sbd", filefull);
+ gchar *tmp = g_strdup_printf("%s.sbd", filefull);
g_free(filefull);
filefull = tmp;
@@ -445,7 +445,7 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c
* standard unix directories.
**/
void
-mail_importer_import_folders_sync(const char *filepath, MailImporterSpecial special_folders[], int flags, CamelOperation *cancel)
+mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel)
{
struct _import_folders_data m;
CamelOperation *oldcancel = NULL;
diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h
index f108967ebc..92f555cf75 100644
--- a/mail/importers/mail-importer.h
+++ b/mail/importers/mail-importer.h
@@ -38,14 +38,14 @@ void mail_importer_init (struct _MailComponent *mc);
void mail_importer_uninit (void);
void mail_importer_add_line (MailImporter *importer,
- const char *str,
+ const gchar *str,
gboolean finished);
-void mail_importer_create_folder (const char *parent_path,
- const char *name,
- const char *description);
+void mail_importer_create_folder (const gchar *parent_path,
+ const gchar *name,
+ const gchar *description);
/* creates a folder at folderpath on the local storage */
-char *mail_importer_make_local_folder(const char *folderpath);
+gchar *mail_importer_make_local_folder(const gchar *folderpath);
struct _BonoboObject;
struct _BonoboGenericFactory;
@@ -71,7 +71,7 @@ struct _BonoboObject *netscape_intelligent_importer_new(void);
struct _BonoboObject *mbox_importer_new(void);
struct _BonoboObject *outlook_importer_new(void);
-struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data);
+struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const gchar *iid, gpointer data);
/* Defines copied from nsMsgMessageFlags.h in Mozilla source. */
@@ -81,8 +81,8 @@ struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *fac
#define MSG_FLAG_MARKED 0x0004
#define MSG_FLAG_EXPUNGED 0x0008
-int mail_importer_import_mbox(const char *path, const char *folderuri, struct _CamelOperation *cancel, void (*done)(void *data, struct _CamelException *), void *data);
-void mail_importer_import_mbox_sync(const char *path, const char *folderuri, struct _CamelOperation *cancel);
+gint mail_importer_import_mbox(const gchar *path, const gchar *folderuri, struct _CamelOperation *cancel, void (*done)(gpointer data, struct _CamelException *), gpointer data);
+void mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, struct _CamelOperation *cancel);
struct _MailImporterSpecial {
const gchar *orig, *new;
@@ -93,6 +93,6 @@ typedef struct _MailImporterSpecial MailImporterSpecial;
#define MAIL_IMPORTER_MOZFMT (1<<0)
/* api in flux */
-void mail_importer_import_folders_sync(const char *filepath, MailImporterSpecial special_folders[], int flags, struct _CamelOperation *cancel);
+void mail_importer_import_folders_sync(const gchar *filepath, MailImporterSpecial special_folders[], gint flags, struct _CamelOperation *cancel);
#endif
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index 3a4e6d9cc1..e460d66d2e 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -58,9 +58,9 @@ struct _pine_import_msg {
EImportTarget *target;
GMutex *status_lock;
- char *status_what;
- int status_pc;
- int status_timeout_id;
+ gchar *status_what;
+ gint status_pc;
+ gint status_timeout_id;
CamelOperation *status;
};
@@ -68,7 +68,7 @@ static gboolean
pine_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
{
EImportTargetHome *s;
- char *maildir, *addrfile;
+ gchar *maildir, *addrfile;
gboolean md_exists, addr_exists;
if (target->type != E_IMPORT_TARGET_HOME)
@@ -102,10 +102,10 @@ FIXME: we dont handle aliases in lists.
*/
static void
-import_contact(EBook *book, char *line)
+import_contact(EBook *book, gchar *line)
{
- char **strings, *addr, **addrs;
- int i;
+ gchar **strings, *addr, **addrs;
+ gint i;
GList *list;
/*EContactName *name;*/
EContact *card;
@@ -165,7 +165,7 @@ import_contacts(void)
ESource *primary;
ESourceList *source_list;
EBook *book;
- char *name;
+ gchar *name;
GString *line;
FILE *fp;
size_t offset;
@@ -238,7 +238,7 @@ pine_import_exec(struct _pine_import_msg *m)
import_contacts();
if (GPOINTER_TO_INT(g_datalist_get_data(&m->target->data, "pine-do-mail"))) {
- char *path;
+ gchar *path;
path = g_build_filename(g_get_home_dir(), "mail", NULL);
mail_importer_import_folders_sync(path, pine_special_folders, 0, m->status);
@@ -280,7 +280,7 @@ pine_import_free(struct _pine_import_msg *m)
}
static void
-pine_status(CamelOperation *op, const char *what, int pc, void *data)
+pine_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _pine_import_msg *importer = data;
@@ -297,11 +297,11 @@ pine_status(CamelOperation *op, const char *what, int pc, void *data)
}
static gboolean
-pine_status_timeout(void *data)
+pine_status_timeout(gpointer data)
{
struct _pine_import_msg *importer = data;
- int pc;
- char *what;
+ gint pc;
+ gchar *what;
if (importer->status_what) {
g_mutex_lock(importer->status_lock);
@@ -328,7 +328,7 @@ static int
mail_importer_pine_import(EImport *ei, EImportTarget *target)
{
struct _pine_import_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&pine_import_info);
g_datalist_set_data(&target->data, "pine-msg", m);
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 53a0411f08..ef5e8787a6 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -56,9 +56,9 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr
{
FilterPart *part;
FilterElement *element;
- int i;
- const char *real, *addr;
- char *namestr;
+ gint i;
+ const gchar *real, *addr;
+ gchar *namestr;
/* address types etc should handle multiple values */
for (i = 0; camel_internet_address_get (iaddr, i, &real, &addr); i++) {
@@ -77,12 +77,12 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr
/* remove 're' part of a subject */
-static const char *
-strip_re (const char *subject)
+static const gchar *
+strip_re (const gchar *subject)
{
- const unsigned char *s, *p;
+ const guchar *s, *p;
- s = (unsigned char *) subject;
+ s = (guchar *) subject;
while (*s) {
while (isspace (*s))
@@ -102,16 +102,16 @@ strip_re (const char *subject)
break;
}
- return (char *) s;
+ return (gchar *) s;
}
#if 0
-int
-reg_match (char *str, char *regstr)
+gint
+reg_match (gchar *str, gchar *regstr)
{
regex_t reg;
- int error;
- int ret;
+ gint error;
+ gint ret;
error = regcomp(&reg, regstr, REG_EXTENDED|REG_ICASE|REG_NOSUB);
if (error != 0) {
@@ -124,7 +124,7 @@ reg_match (char *str, char *regstr)
#endif
static void
-rule_add_subject (RuleContext *context, FilterRule *rule, const char *text)
+rule_add_subject (RuleContext *context, FilterRule *rule, const gchar *text)
{
FilterPart *part;
FilterElement *element;
@@ -141,7 +141,7 @@ rule_add_subject (RuleContext *context, FilterRule *rule, const char *text)
}
static void
-rule_add_sender (RuleContext *context, FilterRule *rule, const char *text)
+rule_add_sender (RuleContext *context, FilterRule *rule, const gchar *text)
{
FilterPart *part;
FilterElement *element;
@@ -160,11 +160,11 @@ rule_add_sender (RuleContext *context, FilterRule *rule, const char *text)
/* do a bunch of things on the subject to try and detect mailing lists, remove
unneeded stuff, etc */
static void
-rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject)
+rule_match_subject (RuleContext *context, FilterRule *rule, const gchar *subject)
{
- const char *s;
- const char *s1, *s2;
- char *tmp;
+ const gchar *s;
+ const gchar *s1, *s2;
+ gchar *tmp;
s = strip_re (subject);
/* dont match on empty subject */
@@ -202,7 +202,7 @@ rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject)
}
static void
-rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist)
+rule_match_mlist(RuleContext *context, FilterRule *rule, const gchar *mlist)
{
FilterPart *part;
FilterElement *element;
@@ -221,13 +221,13 @@ rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist)
}
static void
-rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress* addr, int flags)
+rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress* addr, gint flags)
{
rule->grouping = FILTER_GROUP_ANY;
if (flags & AUTO_FROM) {
- const char *name, *address;
- char *namestr;
+ const gchar *name, *address;
+ gchar *namestr;
camel_internet_address_get (addr, 0, &name, &address);
rule_add_sender (context, rule, address);
@@ -244,15 +244,15 @@ rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress*
}
static void
-rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, int flags)
+rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, gint flags)
{
CamelInternetAddress *addr;
rule->grouping = FILTER_GROUP_ANY;
if (flags & AUTO_SUBJECT) {
- const char *subject = msg->subject ? msg->subject : "";
- char *namestr;
+ const gchar *subject = msg->subject ? msg->subject : "";
+ gchar *namestr;
rule_match_subject (context, rule, subject);
@@ -263,9 +263,9 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
/* should parse the from address into an internet address? */
if (flags & AUTO_FROM) {
const CamelInternetAddress *from;
- int i;
- const char *name, *address;
- char *namestr;
+ gint i;
+ const gchar *name, *address;
+ gchar *namestr;
from = camel_mime_message_get_from (msg);
for (i = 0; from && camel_internet_address_get (from, i, &name, &address); i++) {
@@ -286,7 +286,7 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
rule_match_recipients (context, rule, addr);
}
if (flags & AUTO_MLIST) {
- char *name, *mlist;
+ gchar *name, *mlist;
mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *)msg)->headers);
if (mlist) {
@@ -300,10 +300,10 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
}
FilterRule *
-em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, int flags, const char *source)
+em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg, gint flags, const gchar *source)
{
EMVFolderRule *rule;
- char *euri = em_uri_from_camel(source);
+ gchar *euri = em_uri_from_camel(source);
rule = em_vfolder_rule_new ();
em_vfolder_rule_add_source (rule, euri);
@@ -314,10 +314,10 @@ em_vfolder_rule_from_message (EMVFolderContext *context, CamelMimeMessage *msg,
}
FilterRule *
-em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, int flags, const char *source)
+em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *addr, gint flags, const gchar *source)
{
EMVFolderRule *rule;
- char *euri = em_uri_from_camel(source);
+ gchar *euri = em_uri_from_camel(source);
rule = em_vfolder_rule_new ();
em_vfolder_rule_add_source (rule, euri);
@@ -328,7 +328,7 @@ em_vfolder_rule_from_address (EMVFolderContext *context, CamelInternetAddress *a
}
FilterRule *
-filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, int flags)
+filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, gint flags)
{
EMFilterRule *rule;
FilterPart *part;
@@ -343,10 +343,10 @@ filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, int f
}
void
-filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flags)
+filter_gui_add_from_message (CamelMimeMessage *msg, const gchar *source, gint flags)
{
EMFilterContext *fc;
- char *user, *system;
+ gchar *user, *system;
FilterRule *rule;
g_return_if_fail (msg != NULL);
@@ -368,12 +368,12 @@ filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flag
}
void
-mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri)
+mail_filter_rename_uri(CamelStore *store, const gchar *olduri, const gchar *newuri)
{
EMFilterContext *fc;
- char *user, *system;
+ gchar *user, *system;
GList *changed;
- char *eolduri, *enewuri;
+ gchar *eolduri, *enewuri;
eolduri = em_uri_from_camel(olduri);
enewuri = em_uri_from_camel(newuri);
@@ -400,12 +400,12 @@ mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri
}
void
-mail_filter_delete_uri(CamelStore *store, const char *uri)
+mail_filter_delete_uri(CamelStore *store, const gchar *uri)
{
EMFilterContext *fc;
- char *user, *system;
+ gchar *user, *system;
GList *deleted;
- char *euri;
+ gchar *euri;
euri = em_uri_from_camel(uri);
@@ -424,7 +424,7 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
s = g_string_new("");
l = deleted;
while (l) {
- g_string_append_printf (s, " %s\n", (char *)l->data);
+ g_string_append_printf (s, " %s\n", (gchar *)l->data);
l = l->next;
}
diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h
index c12539a9d2..67ff5d6310 100644
--- a/mail/mail-autofilter.h
+++ b/mail/mail-autofilter.h
@@ -38,15 +38,15 @@ enum {
AUTO_MLIST = 8
};
-struct _FilterRule *em_vfolder_rule_from_message(struct _EMVFolderContext *context, struct _CamelMimeMessage *msg, int flags, const char *source);
-struct _FilterRule *filter_rule_from_message(struct _EMFilterContext *context, struct _CamelMimeMessage *msg, int flags);
-struct _FilterRule *em_vfolder_rule_from_address(struct _EMVFolderContext *context, struct _CamelInternetAddress *addr, int flags, const char *source);
+struct _FilterRule *em_vfolder_rule_from_message(struct _EMVFolderContext *context, struct _CamelMimeMessage *msg, gint flags, const gchar *source);
+struct _FilterRule *filter_rule_from_message(struct _EMFilterContext *context, struct _CamelMimeMessage *msg, gint flags);
+struct _FilterRule *em_vfolder_rule_from_address(struct _EMVFolderContext *context, struct _CamelInternetAddress *addr, gint flags, const gchar *source);
/* easiest place to put this */
-void filter_gui_add_from_message(struct _CamelMimeMessage *msg, const char *source, int flags);
+void filter_gui_add_from_message(struct _CamelMimeMessage *msg, const gchar *source, gint flags);
/* Also easiest place for these, we should really share a global rule context for this stuff ... */
-void mail_filter_rename_uri(struct _CamelStore *store, const char *olduri, const char *newuri);
-void mail_filter_delete_uri(struct _CamelStore *store, const char *uri);
+void mail_filter_rename_uri(struct _CamelStore *store, const gchar *olduri, const gchar *newuri);
+void mail_filter_delete_uri(struct _CamelStore *store, const gchar *uri);
#endif
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
index 268f0b5e3c..9a95823bd4 100644
--- a/mail/mail-component-factory.c
+++ b/mail/mail-component-factory.c
@@ -57,7 +57,7 @@
#define FOLDER_INFO_ID "OAFIID:GNOME_Evolution_FolderInfo:" BASE_VERSION
static BonoboObject *
-factory(BonoboGenericFactory *factory, const char *component_id, void *closure)
+factory(BonoboGenericFactory *factory, const gchar *component_id, gpointer closure)
{
BonoboObject *o;
@@ -81,9 +81,9 @@ factory(BonoboGenericFactory *factory, const char *component_id, void *closure)
}
static Bonobo_Unknown
-make_factory (PortableServer_POA poa, const char *iid, gpointer impl_ptr, CORBA_Environment *ev)
+make_factory (PortableServer_POA poa, const gchar *iid, gpointer impl_ptr, CORBA_Environment *ev)
{
- static int init = 0;
+ static gint init = 0;
if (!init) {
EImportClass *klass;
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 698cc940f8..339e2345e0 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -99,32 +99,32 @@
#define d(x)
-static void create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data);
+static void create_local_item_cb(EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data);
static void view_changed_timeout_remove (EComponentView *component_view);
#define MAIL_COMPONENT_DEFAULT(mc) if (mc == NULL) mc = mail_component_peek();
-extern int camel_application_is_exiting;
+extern gint camel_application_is_exiting;
#define PARENT_TYPE evolution_component_get_type ()
static BonoboObjectClass *parent_class = NULL;
-const char *x_mailer = "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT;
+const gchar *x_mailer = "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT;
#define OFFLINE 0
#define ONLINE 1
struct _store_info {
CamelStore *store;
- char *name;
+ gchar *name;
/* we keep a reference to these so they remain around for the session */
CamelFolder *vtrash;
CamelFolder *vjunk;
/* for setup only */
- void (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *done_data;
+ void (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data);
+ gpointer done_data;
- int ref_count:31;
+ gint ref_count:31;
guint removed:1;
};
@@ -133,10 +133,10 @@ struct _MailComponentPrivate {
/* states/data used during shutdown */
enum { MC_QUIT_START, MC_QUIT_SYNC, MC_QUIT_THREADS } quit_state;
- int quit_count;
- int quit_expunge; /* expunge on quit this time around? */
+ gint quit_count;
+ gint quit_expunge; /* expunge on quit this time around? */
- char *base_directory;
+ gchar *base_directory;
EMFolderTreeModel *model;
@@ -147,7 +147,7 @@ struct _MailComponentPrivate {
RuleContext *search_context;
- char *context_path; /* current path for right-click menu */
+ gchar *context_path; /* current path for right-click menu */
CamelStore *local_store;
ELogger *logger;
@@ -161,7 +161,7 @@ struct _MailComponentPrivate {
/* indexed by _mail_component_folder_t */
static struct {
const gchar *name;
- char *uri;
+ gchar *uri;
CamelFolder *folder;
} mc_default_folders[] = {
/* translators: standard local mailbox names */
@@ -174,7 +174,7 @@ static struct {
};
static struct _store_info *
-store_info_new(CamelStore *store, const char *name)
+store_info_new(CamelStore *store, const gchar *name)
{
struct _store_info *si;
@@ -220,7 +220,7 @@ store_info_unref(struct _store_info *si)
}
static gboolean
-mc_add_store_done(CamelStore *store, CamelFolderInfo *info, void *data)
+mc_add_store_done(CamelStore *store, CamelFolderInfo *info, gpointer data)
{
struct _store_info *si = data;
@@ -242,7 +242,7 @@ mc_add_store_done(CamelStore *store, CamelFolderInfo *info, void *data)
/* Utility functions. */
static void
-mc_add_store(MailComponent *component, CamelStore *store, const char *name, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data))
+mc_add_store(MailComponent *component, CamelStore *store, const gchar *name, void (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data))
{
struct _store_info *si;
@@ -257,10 +257,10 @@ mc_add_store(MailComponent *component, CamelStore *store, const char *name, void
}
static void
-mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, void *data)
+mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, gpointer data)
{
/*MailComponent *mc = data;*/
- int i;
+ gint i;
for (i=0;i<sizeof(mc_default_folders)/sizeof(mc_default_folders[0]);i++) {
if (mc_default_folders[i].folder)
@@ -269,7 +269,7 @@ mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, void *data)
}
static void
-mc_add_local_store(CamelStore *store, const char *name, MailComponent *mc)
+mc_add_local_store(CamelStore *store, const gchar *name, MailComponent *mc)
{
mc_add_store(mc, store, name, mc_add_local_store_done);
camel_object_unref(store);
@@ -281,9 +281,9 @@ mc_setup_local_store(MailComponent *mc)
{
MailComponentPrivate *p = mc->priv;
CamelURL *url;
- char *tmp;
+ gchar *tmp;
CamelException ex;
- int i;
+ gint i;
g_mutex_lock(p->lock);
if (p->local_store != NULL) {
@@ -343,7 +343,7 @@ load_accounts (MailComponent *component, EAccountList *accounts)
while (e_iterator_is_valid (iter)) {
EAccountService *service;
EAccount *account;
- const char *name;
+ const gchar *name;
account = (EAccount *) e_iterator_get (iter);
service = account->source;
@@ -369,8 +369,8 @@ setup_search_context (MailComponent *component)
MailComponentPrivate *priv = component->priv;
if (priv->search_context == NULL) {
- char *user = g_build_filename(component->priv->base_directory, "searches.xml", NULL);
- char *system = g_build_filename (EVOLUTION_PRIVDATADIR, "searchtypes.xml", NULL);
+ gchar *user = g_build_filename(component->priv->base_directory, "searches.xml", NULL);
+ gchar *system = g_build_filename (EVOLUTION_PRIVDATADIR, "searchtypes.xml", NULL);
priv->search_context = (RuleContext *)em_search_context_new ();
g_object_set_data_full (G_OBJECT (priv->search_context), "user", user, g_free);
@@ -382,7 +382,7 @@ setup_search_context (MailComponent *component)
static void
mc_startup(MailComponent *mc)
{
- static int started = 0;
+ static gint started = 0;
GConfClient *gconf;
if (started)
@@ -399,7 +399,7 @@ mc_startup(MailComponent *mc)
}
static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderView *view)
+folder_selected_cb (EMFolderTree *emft, const gchar *path, const gchar *uri, guint32 flags, EMFolderView *view)
{
EMFolderTreeModel *model;
@@ -415,7 +415,7 @@ folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint
}
static int
-check_autosave(void *data)
+check_autosave(gpointer data)
{
e_msg_composer_check_autosave(NULL);
@@ -426,7 +426,7 @@ static void
view_control_activate_cb (BonoboControl *control, gboolean activate, EMFolderView *view)
{
BonoboUIComponent *uic;
- static int recover = 0;
+ static gint recover = 0;
uic = bonobo_control_get_ui_component (control);
g_return_if_fail (uic != NULL);
@@ -515,7 +515,7 @@ impl_finalize (GObject *object)
}
static void
-view_on_url (GObject *emitter, const char *url, const char *nice_url, MailComponent *mail_component)
+view_on_url (GObject *emitter, const gchar *url, const gchar *nice_url, MailComponent *mail_component)
{
MailComponentPrivate *priv = mail_component->priv;
@@ -531,8 +531,8 @@ view_changed(EMFolderView *emfv, EComponentView *component_view)
CORBA_exception_init(&ev);
if (emfv->folder) {
- char *name, *title;
- const char *use_name; /* will contain localized name, if necessary */
+ gchar *name, *title;
+ const gchar *use_name; /* will contain localized name, if necessary */
guint32 visible, unread, deleted, junked, junked_not_deleted;
GPtrArray *selected;
GString *tmp = g_string_new("");
@@ -623,7 +623,7 @@ view_changed_timeout_remove (EComponentView *component_view)
}
static int
-view_changed_timeout(void *d)
+view_changed_timeout(gpointer d)
{
EComponentView *component_view = d;
EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label");
@@ -643,7 +643,7 @@ static void
view_changed_cb(EMFolderView *emfv, EComponentView *component_view)
{
MailComponent *mc = mail_component_peek ();
- void *v;
+ gpointer v;
EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label");
v = g_object_get_data((GObject *)component_view, "view-changed-timeout");
@@ -726,7 +726,7 @@ impl_createView (PortableServer_Servant servant,
GtkWidget *tree_widget, *vbox, *info;
GtkWidget *view_widget;
GtkWidget *statusbar_widget;
- char *uri;
+ gchar *uri;
mail_session_set_interactive(TRUE);
mc_startup(mail_component);
@@ -822,7 +822,7 @@ impl_requestQuit(PortableServer_Servant servant, CORBA_Environment *ev)
}
static void
-mc_quit_sync_done(CamelStore *store, void *data)
+mc_quit_sync_done(CamelStore *store, gpointer data)
{
MailComponent *mc = data;
@@ -843,7 +843,7 @@ mc_quit_delete (CamelStore *store, struct _store_info *si, MailComponent *mc)
if (folder) {
GPtrArray *uids;
- int i;
+ gint i;
uids = camel_folder_get_uids (folder);
camel_folder_freeze(folder);
@@ -865,7 +865,7 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev)
mail_config_prune_proxies ();
switch (mc->priv->quit_state) {
case MC_QUIT_START: {
- int now = time(NULL)/60/60/24, days;
+ gint now = time(NULL)/60/60/24, days;
gboolean empty_junk;
GConfClient *gconf = mail_config_get_gconf_client();
@@ -926,27 +926,27 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_Environment
CORBA_sequence_set_release (list, FALSE);
- list->_buffer[0].id = (char *) "message";
+ list->_buffer[0].id = (gchar *) "message";
list->_buffer[0].description = _("New Mail Message");
- list->_buffer[0].menuDescription = (char *) C_("New", "_Mail Message");
+ list->_buffer[0].menuDescription = (gchar *) C_("New", "_Mail Message");
list->_buffer[0].tooltip = _("Compose a new mail message");
list->_buffer[0].menuShortcut = 'm';
- list->_buffer[0].iconName = (char *) "mail-message-new";
+ list->_buffer[0].iconName = (gchar *) "mail-message-new";
list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
- list->_buffer[1].id = (char *) "folder";
+ list->_buffer[1].id = (gchar *) "folder";
list->_buffer[1].description = _("New Mail Folder");
- list->_buffer[1].menuDescription = (char *) C_("New", "Mail _Folder");
+ list->_buffer[1].menuDescription = (gchar *) C_("New", "Mail _Folder");
list->_buffer[1].tooltip = _("Create a new mail folder");
list->_buffer[1].menuShortcut = '\0';
- list->_buffer[1].iconName = (char *) "folder-new";
+ list->_buffer[1].iconName = (gchar *) "folder-new";
list->_buffer[1].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
}
static int
-create_item(const char *type, EMFolderTreeModel *model, const char *uri, gpointer tree)
+create_item(const gchar *type, EMFolderTreeModel *model, const gchar *uri, gpointer tree)
{
if (strcmp(type, "message") == 0) {
if (!em_utils_check_user_can_send_mail(NULL))
@@ -962,10 +962,10 @@ create_item(const char *type, EMFolderTreeModel *model, const char *uri, gpointe
}
static void
-create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data)
+create_local_item_cb(EUserCreatableItemsHandler *handler, const gchar *item_type_name, gpointer data)
{
EMFolderTree *tree = data;
- char *uri = em_folder_tree_get_selected_uri(tree);
+ gchar *uri = em_folder_tree_get_selected_uri(tree);
create_item(item_type_name, em_folder_tree_get_model(tree), uri, (gpointer) tree);
g_free(uri);
@@ -985,15 +985,15 @@ impl_requestCreateItem (PortableServer_Servant servant,
}
static void
-handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
+handleuri_got_folder(gchar *uri, CamelFolder *folder, gpointer data)
{
CamelURL *url = data;
EMMessageBrowser *emmb;
if (folder != NULL) {
- const char *reply = camel_url_get_param(url, "reply");
- const char *forward = camel_url_get_param(url, "forward");
- int mode;
+ const gchar *reply = camel_url_get_param(url, "reply");
+ const gchar *forward = camel_url_get_param(url, "forward");
+ gint mode;
if (reply) {
@@ -1007,7 +1007,7 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
em_utils_reply_to_message(folder, camel_url_get_param(url, "uid"), NULL, mode, NULL);
} else if (forward) {
GPtrArray *uids;
- const char* uid;
+ const gchar * uid;
uid = camel_url_get_param(url, "uid");
if (uid == NULL)
@@ -1042,7 +1042,7 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
}
static void
-impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environment *ev)
+impl_handleURI (PortableServer_Servant servant, const gchar *uri, CORBA_Environment *ev)
{
if (!strncmp (uri, "mailto:", 7)) {
if (!em_utils_check_user_can_send_mail(NULL))
@@ -1053,7 +1053,7 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
CamelURL *url = camel_url_new(uri, NULL);
if (camel_url_get_param(url, "uid") != NULL) {
- char *curi = em_uri_to_camel(uri);
+ gchar *curi = em_uri_to_camel(uri);
mail_get_folder(curi, 0, handleuri_got_folder, url, mail_msg_unordered_push);
g_free(curi);
@@ -1093,7 +1093,7 @@ impl_upgradeFromVersion (PortableServer_Servant servant, const short major, cons
}
static void
-mc_sync_store_done (CamelStore *store, void *data)
+mc_sync_store_done (CamelStore *store, gpointer data)
{
MailComponent *mc = (MailComponent *) data;
@@ -1130,11 +1130,11 @@ call_mail_sync (gpointer user_data)
struct _setline_data {
GNOME_Evolution_Listener listener;
CORBA_boolean status;
- int pending;
+ gint pending;
};
static void
-setline_done(CamelStore *store, void *data)
+setline_done(CamelStore *store, gpointer data)
{
struct _setline_data *sd = data;
@@ -1155,7 +1155,7 @@ setline_done(CamelStore *store, void *data)
}
static void
-setline_check(void *key, void *value, void *data)
+setline_check(gpointer key, gpointer value, gpointer data)
{
CamelService *service = key;
struct _setline_data *sd = data;
@@ -1167,10 +1167,10 @@ setline_check(void *key, void *value, void *data)
}
}
-int
+gint
status_check (GNOME_Evolution_ShellState shell_state)
{
- int status = 0;
+ gint status = 0;
switch (shell_state)
{
@@ -1197,7 +1197,7 @@ static void
impl_setLineStatus(PortableServer_Servant servant, GNOME_Evolution_ShellState shell_state, GNOME_Evolution_Listener listener, CORBA_Environment *ev)
{
struct _setline_data *sd;
- int status = status_check(shell_state);
+ gint status = status_check(shell_state);
/* This will dis/enable further auto-mail-check action. */
/* FIXME: If send/receive active, wait for it to finish? */
@@ -1289,7 +1289,7 @@ mail_component_init (MailComponent *component)
priv->base_directory = g_build_filename (e_get_user_data_dir (), "mail", NULL);
#ifdef G_OS_WIN32
{
- char *p = priv->base_directory;
+ gchar *p = priv->base_directory;
while ((p = strchr(p, '\\')))
*p++ = '/';
}
@@ -1333,7 +1333,7 @@ mail_component_peek (void)
return component;
}
-const char *
+const gchar *
mail_component_peek_base_directory (MailComponent *component)
{
MAIL_COMPONENT_DEFAULT(component);
@@ -1367,7 +1367,7 @@ struct _CamelSession *mail_component_peek_session(MailComponent *component)
}
void
-mail_component_add_store (MailComponent *component, CamelStore *store, const char *name)
+mail_component_add_store (MailComponent *component, CamelStore *store, const gchar *name)
{
mc_add_store(component, store, name, NULL);
}
@@ -1382,7 +1382,7 @@ mail_component_add_store (MailComponent *component, CamelStore *store, const cha
* to ref the object if it wants to store it.
**/
CamelStore *
-mail_component_load_store_by_uri (MailComponent *component, const char *uri, const char *name)
+mail_component_load_store_by_uri (MailComponent *component, const gchar *uri, const gchar *name)
{
CamelException ex;
CamelStore *store;
@@ -1425,7 +1425,7 @@ mail_component_load_store_by_uri (MailComponent *component, const char *uri, con
}
static void
-store_disconnect (CamelStore *store, void *event_data, void *user_data)
+store_disconnect (CamelStore *store, gpointer event_data, gpointer user_data)
{
camel_service_disconnect (CAMEL_SERVICE (store), TRUE, NULL);
camel_object_unref (store);
@@ -1462,7 +1462,7 @@ mail_component_remove_store (MailComponent *component, CamelStore *store)
}
void
-mail_component_remove_store_by_uri (MailComponent *component, const char *uri)
+mail_component_remove_store_by_uri (MailComponent *component, const gchar *uri)
{
CamelProvider *prov;
CamelStore *store;
@@ -1482,7 +1482,7 @@ mail_component_remove_store_by_uri (MailComponent *component, const char *uri)
}
}
-int
+gint
mail_component_get_store_count (MailComponent *component)
{
MAIL_COMPONENT_DEFAULT(component);
@@ -1493,17 +1493,17 @@ mail_component_get_store_count (MailComponent *component)
/* need to map from internal struct to external api */
struct _store_foreach_data {
GHFunc func;
- void *data;
+ gpointer data;
};
static void
mc_stores_foreach(CamelStore *store, struct _store_info *si, struct _store_foreach_data *data)
{
- data->func((void *)store, (void *)si->name, data->data);
+ data->func((gpointer)store, (gpointer)si->name, data->data);
}
void
-mail_component_stores_foreach (MailComponent *component, GHFunc func, void *user_data)
+mail_component_stores_foreach (MailComponent *component, GHFunc func, gpointer user_data)
{
struct _store_foreach_data data = { func, user_data };
@@ -1513,7 +1513,7 @@ mail_component_stores_foreach (MailComponent *component, GHFunc func, void *user
}
void
-mail_component_remove_folder (MailComponent *component, CamelStore *store, const char *path)
+mail_component_remove_folder (MailComponent *component, CamelStore *store, const gchar *path)
{
MAIL_COMPONENT_DEFAULT(component);
@@ -1566,7 +1566,7 @@ mail_component_get_folder(MailComponent *mc, enum _mail_component_folder_t id)
*
* Return value:
**/
-const char *
+const gchar *
mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id)
{
g_return_val_if_fail (id <= MAIL_COMPONENT_FOLDER_LOCAL_INBOX, NULL);
@@ -1585,7 +1585,7 @@ mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t i
void
mail_indicate_new_mail (gboolean have_new_mail)
{
- const char *icon = NULL;
+ const gchar *icon = NULL;
MailComponent *mc = mail_component_peek ();
g_return_if_fail (mc != NULL);
diff --git a/mail/mail-component.h b/mail/mail-component.h
index 9af5caa40f..ef781d119a 100644
--- a/mail/mail-component.h
+++ b/mail/mail-component.h
@@ -67,7 +67,7 @@ GType mail_component_get_type (void);
MailComponent *mail_component_peek (void);
/* NOTE: Using NULL as the component implies using the default component */
-const char *mail_component_peek_base_directory (MailComponent *component);
+const gchar *mail_component_peek_base_directory (MailComponent *component);
struct _RuleContext *mail_component_peek_search_context (MailComponent *component);
struct _EActivityHandler *mail_component_peek_activity_handler (MailComponent *component);
@@ -75,30 +75,30 @@ struct _CamelSession *mail_component_peek_session(MailComponent *);
void mail_component_add_store (MailComponent *component,
struct _CamelStore *store,
- const char *name);
+ const gchar *name);
struct _CamelStore *mail_component_load_store_by_uri (MailComponent *component,
- const char *uri,
- const char *name);
+ const gchar *uri,
+ const gchar *name);
void mail_component_remove_store (MailComponent *component,
struct _CamelStore *store);
void mail_component_remove_store_by_uri (MailComponent *component,
- const char *uri);
+ const gchar *uri);
-int mail_component_get_store_count (MailComponent *component);
+gint mail_component_get_store_count (MailComponent *component);
void mail_component_stores_foreach (MailComponent *component,
GHFunc func,
void *data);
-void mail_component_remove_folder (MailComponent *component, struct _CamelStore *store, const char *path);
+void mail_component_remove_folder (MailComponent *component, struct _CamelStore *store, const gchar *path);
struct _EMFolderTreeModel *mail_component_peek_tree_model (MailComponent *component);
struct _CamelStore *mail_component_peek_local_store (MailComponent *mc);
struct _CamelFolder *mail_component_get_folder(MailComponent *mc, enum _mail_component_folder_t id);
-const char *mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id);
+const gchar *mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id);
-int status_check (GNOME_Evolution_ShellState shell_state);
+gint status_check (GNOME_Evolution_ShellState shell_state);
void mail_indicate_new_mail (gboolean have_new_mail);
void mail_component_show_logger (gpointer);
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
index f89383580c..75442b27fb 100644
--- a/mail/mail-config-factory.c
+++ b/mail/mail-config-factory.c
@@ -37,7 +37,7 @@
#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ConfigControlFactory:" BASE_VERSION
BonoboObject *
-mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data)
+mail_config_control_factory_cb (BonoboGenericFactory *factory, const gchar *component_id, gpointer user_data)
{
GNOME_Evolution_Shell shell = (GNOME_Evolution_Shell) user_data;
EvolutionConfigControl *control;
diff --git a/mail/mail-config-factory.h b/mail/mail-config-factory.h
index 430058364e..428598a663 100644
--- a/mail/mail-config-factory.h
+++ b/mail/mail-config-factory.h
@@ -35,7 +35,7 @@ extern "C" {
gboolean mail_config_register_factory (GNOME_Evolution_Shell shell);
-BonoboObject *mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data);
+BonoboObject *mail_config_control_factory_cb (BonoboGenericFactory *factory, const gchar *component_id, gpointer user_data);
#ifdef __cplusplus
}
diff --git a/mail/mail-config.c b/mail/mail-config.c
index bcf8dd7854..d414f75f0c 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -81,7 +81,7 @@ typedef struct {
gboolean corrupt;
- char *gtkrc;
+ gchar *gtkrc;
EAccountList *accounts;
ESignatureList *signatures;
@@ -105,7 +105,7 @@ typedef struct {
gboolean scripts_disabled;
} MailConfig;
-extern int camel_header_param_encode_filenames_in_rfc_2047;
+extern gint camel_header_param_encode_filenames_in_rfc_2047;
static MailConfig *config = NULL;
static guint config_write_timeout = 0;
@@ -125,7 +125,7 @@ mail_config_save_signatures (void)
static void
config_clear_mime_types (void)
{
- int i;
+ gint i;
for (i = 0; i < config->mime_types->len; i++)
g_free (config->mime_types->pdata[i]);
@@ -278,13 +278,13 @@ gconf_jh_check_changed (GConfClient *client, guint cnxn_id,
name = g_ptr_array_new ();
value = g_ptr_array_new ();
while (node && node->data) {
- char **tok = g_strsplit (node->data, "=", 2);
+ gchar **tok = g_strsplit (node->data, "=", 2);
g_ptr_array_add (name, g_strdup(tok[0]));
g_ptr_array_add (value, g_strdup(tok[1]));
node = node->next;
g_strfreev (tok);
}
- mail_session_set_junk_headers ((const char **)name->pdata, (const char **)value->pdata, name->len);
+ mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len);
g_ptr_array_free (name, TRUE);
g_ptr_array_free (value, TRUE);
}
@@ -302,13 +302,13 @@ gconf_jh_headers_changed (GConfClient *client, guint cnxn_id,
name = g_ptr_array_new ();
value = g_ptr_array_new ();
while (node && node->data) {
- char **tok = g_strsplit (node->data, "=", 2);
+ gchar **tok = g_strsplit (node->data, "=", 2);
g_ptr_array_add (name, g_strdup(tok[0]));
g_ptr_array_add (value, g_strdup(tok[1]));
node = node->next;
g_strfreev (tok);
}
- mail_session_set_junk_headers ((const char **)name->pdata, (const char **)value->pdata, name->len);
+ mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len);
}
static void
@@ -594,7 +594,7 @@ mail_config_write_on_exit (void)
session cache */
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
- char *passwd;
+ gchar *passwd;
account = (EAccount *) e_iterator_get (iter);
@@ -667,7 +667,7 @@ mail_config_is_corrupt (void)
return config->corrupt;
}
-int
+gint
mail_config_get_address_count (void)
{
if (!config->address_compress)
@@ -694,7 +694,7 @@ mail_config_get_error_level (void)
return config->error_level;
}
-int
+gint
mail_config_get_message_limit (void)
{
if (!config->mlimit)
@@ -746,10 +746,10 @@ mail_config_get_labels (void)
return config->labels;
}
-const char **
+const gchar **
mail_config_get_allowable_mime_types (void)
{
- return (const char **) config->mime_types->pdata;
+ return (const gchar **) config->mime_types->pdata;
}
gboolean
@@ -788,19 +788,19 @@ mail_config_get_default_account (void)
}
EAccount *
-mail_config_get_account_by_name (const char *account_name)
+mail_config_get_account_by_name (const gchar *account_name)
{
return (EAccount *)e_account_list_find(config->accounts, E_ACCOUNT_FIND_NAME, account_name);
}
EAccount *
-mail_config_get_account_by_uid (const char *uid)
+mail_config_get_account_by_uid (const gchar *uid)
{
return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid);
}
static EAccount *
-mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount *account))
+mc_get_account_by (const gchar *given_url, const gchar * (get_url_string)(EAccount *account))
{
EAccount *account = NULL;
EIterator *iter;
@@ -819,7 +819,7 @@ mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount
iter = e_list_get_iterator ((EList *) config->accounts);
while (account == NULL && e_iterator_is_valid (iter)) {
CamelURL *account_url;
- const char *account_url_string;
+ const gchar *account_url_string;
account = (EAccount *) e_iterator_get (iter);
@@ -850,7 +850,7 @@ mc_get_account_by (const char *given_url, const char * (get_url_string)(EAccount
return account;
}
-static const char *
+static const gchar *
get_source_url_string (EAccount *account)
{
if (account && account->source && account->source->url && *account->source->url)
@@ -858,7 +858,7 @@ get_source_url_string (EAccount *account)
return NULL;
}
-static const char *
+static const gchar *
get_transport_url_string (EAccount *account)
{
if (account && account->transport && account->transport->url && *account->transport->url)
@@ -867,18 +867,18 @@ get_transport_url_string (EAccount *account)
}
EAccount *
-mail_config_get_account_by_source_url (const char *source_url)
+mail_config_get_account_by_source_url (const gchar *source_url)
{
return mc_get_account_by (source_url, get_source_url_string);
}
EAccount *
-mail_config_get_account_by_transport_url (const char *transport_url)
+mail_config_get_account_by_transport_url (const gchar *transport_url)
{
return mc_get_account_by (transport_url, get_transport_url_string);
}
-int
+gint
mail_config_has_proxies (EAccount *account)
{
return e_account_list_account_has_proxies (config->accounts, account);
@@ -966,12 +966,12 @@ mail_config_get_default_transport (void)
return NULL;
}
-static char *
-uri_to_evname (const char *uri, const char *prefix)
+static gchar *
+uri_to_evname (const gchar *uri, const gchar *prefix)
{
- const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
- char *safe;
- char *tmp;
+ const gchar *base_directory = mail_component_peek_base_directory (mail_component_peek ());
+ gchar *safe;
+ gchar *tmp;
safe = g_strdup (uri);
e_filename_make_safe (safe);
@@ -985,12 +985,12 @@ uri_to_evname (const char *uri, const char *prefix)
}
void
-mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new)
+mail_config_uri_renamed (GCompareFunc uri_cmp, const gchar *old, const gchar *new)
{
EAccount *account;
EIterator *iter;
- int i, work = 0;
- char *oldname, *newname;
+ gint i, work = 0;
+ gchar *oldname, *newname;
const gchar *cachenames[] = {
"config/hidestate-",
"config/et-expanded-",
@@ -1038,14 +1038,14 @@ mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new)
}
void
-mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri)
+mail_config_uri_deleted (GCompareFunc uri_cmp, const gchar *uri)
{
EAccount *account;
EIterator *iter;
- int work = 0;
+ gint work = 0;
/* assumes these can't be removed ... */
- const char *default_sent_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT);
- const char *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
+ const gchar *default_sent_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT);
+ const gchar *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
@@ -1077,10 +1077,10 @@ mail_config_service_set_save_passwd (EAccountService *service, gboolean save_pas
service->save_passwd = save_passwd;
}
-char *
+gchar *
mail_config_folder_to_safe_url (CamelFolder *folder)
{
- char *url;
+ gchar *url;
url = mail_tools_folder_to_url (folder);
e_filename_make_safe (url);
@@ -1088,11 +1088,11 @@ mail_config_folder_to_safe_url (CamelFolder *folder)
return url;
}
-char *
-mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix)
+gchar *
+mail_config_folder_to_cachename (CamelFolder *folder, const gchar *prefix)
{
- char *url, *basename, *filename;
- const char *evolution_dir;
+ gchar *url, *basename, *filename;
+ const gchar *evolution_dir;
evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
@@ -1111,13 +1111,13 @@ mail_config_get_signatures (void)
return config->signatures;
}
-static char *
+static gchar *
get_new_signature_filename (void)
{
- const char *base_directory;
- char *filename, *id;
+ const gchar *base_directory;
+ gchar *filename, *id;
struct stat st;
- int i;
+ gint i;
base_directory = e_get_user_data_dir ();
filename = g_build_filename (base_directory, "signatures", NULL);
@@ -1137,7 +1137,7 @@ get_new_signature_filename (void)
for (i = 0; i < (INT_MAX - 1); i++) {
sprintf (id, "%d", i);
if (g_lstat (filename, &st) == -1 && errno == ENOENT) {
- int fd;
+ gint fd;
fd = g_creat (filename, 0600);
if (fd >= 0) {
@@ -1154,7 +1154,7 @@ get_new_signature_filename (void)
ESignature *
-mail_config_signature_new (const char *filename, gboolean script, gboolean html)
+mail_config_signature_new (const gchar *filename, gboolean script, gboolean html)
{
ESignature *sig;
@@ -1172,13 +1172,13 @@ mail_config_signature_new (const char *filename, gboolean script, gboolean html)
}
ESignature *
-mail_config_get_signature_by_uid (const char *uid)
+mail_config_get_signature_by_uid (const gchar *uid)
{
return (ESignature *) e_signature_list_find (config->signatures, E_SIGNATURE_FIND_UID, uid);
}
ESignature *
-mail_config_get_signature_by_name (const char *name)
+mail_config_get_signature_by_name (const gchar *name)
{
return (ESignature *) e_signature_list_find (config->signatures, E_SIGNATURE_FIND_NAME, name);
}
@@ -1240,12 +1240,12 @@ mail_config_scripts_disabled (void)
return config->scripts_disabled;
}
-char *
-mail_config_signature_run_script (const char *script)
+gchar *
+mail_config_signature_run_script (const gchar *script)
{
#ifndef G_OS_WIN32
- int result, status;
- int in_fds[2];
+ gint result, status;
+ gint in_fds[2];
pid_t pid;
if (mail_config_scripts_disabled ())
@@ -1258,7 +1258,7 @@ mail_config_signature_run_script (const char *script)
if (!(pid = fork ())) {
/* child process */
- int maxfd, i;
+ gint maxfd, i;
close (in_fds [0]);
if (dup2 (in_fds[1], STDOUT_FILENO) < 0)
@@ -1287,8 +1287,8 @@ mail_config_signature_run_script (const char *script)
CamelMimeFilter *charenc;
CamelStream *stream;
GByteArray *buffer;
- char *charset;
- char *content;
+ gchar *charset;
+ gchar *content;
/* parent process */
close (in_fds[1]);
@@ -1306,7 +1306,7 @@ mail_config_signature_run_script (const char *script)
are known to not ever read the manual... we try to do our best if the
content isn't valid UTF-8 by assuming that the content is in the user's
preferred charset. */
- if (!g_utf8_validate ((char *)buffer->data, buffer->len, NULL)) {
+ if (!g_utf8_validate ((gchar *)buffer->data, buffer->len, NULL)) {
stream = (CamelStream *) memstream;
memstream = (CamelStreamMem *) camel_stream_mem_new ();
camel_stream_mem_set_byte_array (memstream, g_byte_array_new ());
@@ -1332,8 +1332,8 @@ mail_config_signature_run_script (const char *script)
camel_object_unref (memstream);
- g_byte_array_append (buffer, (const unsigned char *)"", 1);
- content = (char *)buffer->data;
+ g_byte_array_append (buffer, (const guchar *)"", 1);
+ content = (gchar *)buffer->data;
g_byte_array_free (buffer, FALSE);
/* wait for the script process to terminate */
diff --git a/mail/mail-config.h b/mail/mail-config.h
index aea5c5da94..d2fef97d8e 100644
--- a/mail/mail-config.h
+++ b/mail/mail-config.h
@@ -46,10 +46,10 @@ extern "C" {
#endif /* __cplusplus */
typedef struct _MailConfigSignature {
- int id;
- char *name;
- char *filename;
- char *script;
+ gint id;
+ gchar *name;
+ gchar *filename;
+ gchar *script;
gboolean html;
} MailConfigSignature;
@@ -101,29 +101,29 @@ gboolean mail_config_is_corrupt (void);
GSList *mail_config_get_labels (void);
-const char **mail_config_get_allowable_mime_types (void);
+const gchar **mail_config_get_allowable_mime_types (void);
void mail_config_service_set_save_passwd (struct _EAccountService *service, gboolean save_passwd);
/* accounts */
gboolean mail_config_find_account (struct _EAccount *account);
struct _EAccount *mail_config_get_default_account (void);
-struct _EAccount *mail_config_get_account_by_name (const char *account_name);
-struct _EAccount *mail_config_get_account_by_uid (const char *uid);
-struct _EAccount *mail_config_get_account_by_source_url (const char *url);
-struct _EAccount *mail_config_get_account_by_transport_url (const char *url);
+struct _EAccount *mail_config_get_account_by_name (const gchar *account_name);
+struct _EAccount *mail_config_get_account_by_uid (const gchar *uid);
+struct _EAccount *mail_config_get_account_by_source_url (const gchar *url);
+struct _EAccount *mail_config_get_account_by_transport_url (const gchar *url);
struct _EAccountList *mail_config_get_accounts (void);
void mail_config_add_account (struct _EAccount *account);
void mail_config_remove_account (struct _EAccount *account);
void mail_config_set_default_account (struct _EAccount *account);
-int mail_config_get_address_count (void);
-int mail_config_get_message_limit (void);
+gint mail_config_get_address_count (void);
+gint mail_config_get_message_limit (void);
gboolean mail_config_get_enable_magic_spacebar (void);
void mail_config_remove_account_proxies (struct _EAccount *account);
void mail_config_prune_proxies (void);
-int mail_config_has_proxies (struct _EAccount *account);
+gint mail_config_has_proxies (struct _EAccount *account);
struct _EAccountIdentity *mail_config_get_default_identity (void);
struct _EAccountService *mail_config_get_default_transport (void);
@@ -131,9 +131,9 @@ struct _EAccountService *mail_config_get_default_transport (void);
void mail_config_save_accounts (void);
/* signatures */
-struct _ESignature *mail_config_signature_new (const char *filename, gboolean script, gboolean html);
-struct _ESignature *mail_config_get_signature_by_uid (const char *uid);
-struct _ESignature *mail_config_get_signature_by_name (const char *name);
+struct _ESignature *mail_config_signature_new (const gchar *filename, gboolean script, gboolean html);
+struct _ESignature *mail_config_get_signature_by_uid (const gchar *uid);
+struct _ESignature *mail_config_get_signature_by_name (const gchar *name);
struct _ESignatureList *mail_config_get_signatures (void);
void mail_config_add_signature (struct _ESignature *signature);
@@ -141,16 +141,16 @@ void mail_config_remove_signature (struct _ESignature *signature);
void mail_config_save_signatures (void);
-char *mail_config_signature_run_script (const char *script);
+gchar *mail_config_signature_run_script (const gchar *script);
/* uri's got changed by the store, etc */
-void mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new);
-void mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri);
+void mail_config_uri_renamed (GCompareFunc uri_cmp, const gchar *old, const gchar *new);
+void mail_config_uri_deleted (GCompareFunc uri_cmp, const gchar *uri);
/* static utility functions */
-char *mail_config_folder_to_cachename (struct _CamelFolder *folder, const char *prefix);
-char *mail_config_folder_to_safe_url (struct _CamelFolder *folder);
+gchar *mail_config_folder_to_cachename (struct _CamelFolder *folder, const gchar *prefix);
+gchar *mail_config_folder_to_safe_url (struct _CamelFolder *folder);
guint mail_config_get_error_timeout (void);
guint mail_config_get_error_level (void);
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index a84dfcbf74..a6c4b800ad 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -81,8 +81,8 @@ static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER;
struct _folder_info {
struct _store_info *store_info; /* 'parent' link */
- char *full_name; /* full name of folder/folderinfo */
- char *uri; /* uri of folder */
+ gchar *full_name; /* full name of folder/folderinfo */
+ gchar *uri; /* uri of folder */
guint32 flags;
@@ -94,18 +94,18 @@ struct _folder_update {
struct _folder_update *next;
struct _folder_update *prev;
- unsigned int remove:1; /* removing from vfolders */
- unsigned int delete:1; /* deleting as well? */
- unsigned int add:1; /* add to vfolder */
- unsigned int unsub:1; /* unsubcribing? */
- unsigned int new; /* new mail arrived? */
+ guint remove:1; /* removing from vfolders */
+ guint delete:1; /* deleting as well? */
+ guint add:1; /* add to vfolder */
+ guint unsub:1; /* unsubcribing? */
+ guint new; /* new mail arrived? */
- char *full_name;
- char *uri;
- char *oldfull;
- char *olduri;
+ gchar *full_name;
+ gchar *uri;
+ gchar *oldfull;
+ gchar *olduri;
- int unread;
+ gint unread;
CamelStore *store;
};
@@ -131,11 +131,11 @@ static GHashTable *stores = NULL;
/* List of folder changes to be executed in gui thread */
static EDList updates = E_DLIST_INITIALISER(updates);
-static int update_id = -1;
+static gint update_id = -1;
/* hack for people who LIKE to have unsent count */
-static int count_sent = FALSE;
-static int count_trash = FALSE;
+static gint count_sent = FALSE;
+static gint count_trash = FALSE;
static void
free_update(struct _folder_update *up)
@@ -150,7 +150,7 @@ free_update(struct _folder_update *up)
}
static void
-real_flush_updates(void *o, void *event_data, void *data)
+real_flush_updates(gpointer o, gpointer event_data, gpointer data)
{
struct _MailComponent *component;
struct _EMFolderTreeModel *model;
@@ -224,7 +224,7 @@ flush_updates(void)
}
static void
-unset_folder_info(struct _folder_info *mfi, int delete, int unsub)
+unset_folder_info(struct _folder_info *mfi, gint delete, gint unsub)
{
struct _folder_update *up;
@@ -285,12 +285,12 @@ free_folder_info(struct _folder_info *mfi)
* it's correct. */
static void
-update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
+update_1folder(struct _folder_info *mfi, gint new, CamelFolderInfo *info)
{
struct _folder_update *up;
CamelFolder *folder;
- int unread = -1;
- int deleted;
+ gint unread = -1;
+ gint deleted;
folder = mfi->folder;
if (folder) {
@@ -399,8 +399,8 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
CamelMessageInfo *info;
struct _store_info *si;
struct _folder_info *mfi;
- int new = 0;
- int i;
+ gint new = 0;
+ gint i;
guint32 flags;
d(printf("folder '%s' changed\n", folder->full_name));
@@ -462,7 +462,7 @@ static void
folder_renamed(CamelObject *o, gpointer event_data, gpointer user_data)
{
CamelFolder *folder = (CamelFolder *)o;
- char *old = event_data;
+ gchar *old = event_data;
d(printf("Folder renamed from '%s' to '%s'\n", old, folder->full_name));
@@ -506,7 +506,7 @@ void mail_note_folder(CamelFolder *folder)
}
static void
-store_folder_subscribed(CamelObject *o, void *event_data, void *data)
+store_folder_subscribed(CamelObject *o, gpointer event_data, gpointer data)
{
struct _store_info *si;
CamelFolderInfo *fi = event_data;
@@ -521,7 +521,7 @@ store_folder_subscribed(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_created(CamelObject *o, void *event_data, void *data)
+store_folder_created(CamelObject *o, gpointer event_data, gpointer data)
{
/* we only want created events to do more work if we dont support subscriptions */
if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
@@ -529,7 +529,7 @@ store_folder_created(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_opened(CamelObject *o, void *event_data, void *data)
+store_folder_opened(CamelObject *o, gpointer event_data, gpointer data)
{
CamelFolder *folder = event_data;
@@ -537,7 +537,7 @@ store_folder_opened(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_unsubscribed(CamelObject *o, void *event_data, void *data)
+store_folder_unsubscribed(CamelObject *o, gpointer event_data, gpointer data)
{
struct _store_info *si;
CamelFolderInfo *fi = event_data;
@@ -561,24 +561,24 @@ store_folder_unsubscribed(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_deleted(CamelObject *o, void *event_data, void *data)
+store_folder_deleted(CamelObject *o, gpointer event_data, gpointer data)
{
/* we only want deleted events to do more work if we dont support subscriptions */
if (!camel_store_supports_subscriptions(CAMEL_STORE(o)))
store_folder_unsubscribed(o, event_data, data);
}
-static char *
-folder_to_url(CamelStore *store, const char *full_name)
+static gchar *
+folder_to_url(CamelStore *store, const gchar *full_name)
{
CamelURL *url;
- char *out;
+ gchar *out;
url = camel_url_copy(((CamelService *)store)->url);
if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
camel_url_set_fragment(url, full_name);
} else {
- char *name = g_alloca(strlen(full_name)+2);
+ gchar *name = g_alloca(strlen(full_name)+2);
sprintf(name, "/%s", full_name);
camel_url_set_path(url, name);
@@ -591,9 +591,9 @@ folder_to_url(CamelStore *store, const char *full_name)
}
static void
-rename_folders(struct _store_info *si, const char *oldbase, const char *newbase, CamelFolderInfo *fi)
+rename_folders(struct _store_info *si, const gchar *oldbase, const gchar *newbase, CamelFolderInfo *fi)
{
- char *old, *olduri, *oldfile, *newuri, *newfile;
+ gchar *old, *olduri, *oldfile, *newuri, *newfile;
struct _folder_info *mfi;
struct _folder_update *up;
@@ -685,7 +685,7 @@ get_folders(CamelFolderInfo *fi, GPtrArray *folders)
}
static int
-folder_cmp(const void *ap, const void *bp)
+folder_cmp(gconstpointer ap, gconstpointer bp)
{
const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0];
const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0];
@@ -694,7 +694,7 @@ folder_cmp(const void *ap, const void *bp)
}
static void
-store_folder_renamed(CamelObject *o, void *event_data, void *data)
+store_folder_renamed(CamelObject *o, gpointer event_data, gpointer data)
{
CamelStore *store = (CamelStore *)o;
CamelRenameInfo *info = event_data;
@@ -707,7 +707,7 @@ store_folder_renamed(CamelObject *o, void *event_data, void *data)
if (si) {
GPtrArray *folders = g_ptr_array_new();
CamelFolderInfo *top;
- int i;
+ gint i;
/* Ok, so for some reason the folderinfo we have comes in all messed up from
imap, should find out why ... this makes it workable */
@@ -729,21 +729,21 @@ struct _update_data {
struct _update_data *next;
struct _update_data *prev;
- int id; /* id for cancellation */
+ gint id; /* id for cancellation */
guint cancel:1; /* also tells us we're cancelled */
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *data;
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data);
+ gpointer data;
};
static void
-unset_folder_info_hash(char *path, struct _folder_info *mfi, void *data)
+unset_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data)
{
unset_folder_info(mfi, FALSE, FALSE);
}
static void
-free_folder_info_hash(char *path, struct _folder_info *mfi, void *data)
+free_folder_info_hash(gchar *path, struct _folder_info *mfi, gpointer data)
{
free_folder_info(mfi);
}
@@ -792,7 +792,7 @@ mail_note_store_remove(CamelStore *store)
}
static gboolean
-update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
+update_folders(CamelStore *store, CamelFolderInfo *fi, gpointer data)
{
struct _update_data *ud = data;
struct _store_info *si;
@@ -829,8 +829,8 @@ struct _ping_store_msg {
static gchar *
ping_store_desc (struct _ping_store_msg *m)
{
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
+ gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
+ gchar *msg;
msg = g_strdup_printf (_("Pinging %s"), service_name);
g_free (service_name);
@@ -898,7 +898,7 @@ ping_cb (gpointer user_data)
}
static void
-store_online_cb (CamelStore *store, void *data)
+store_online_cb (CamelStore *store, gpointer data)
{
struct _update_data *ud = data;
@@ -918,13 +918,13 @@ store_online_cb (CamelStore *store, void *data)
void
mail_note_store(CamelStore *store, CamelOperation *op,
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), gpointer data)
{
struct _store_info *si;
struct _update_data *ud;
- const char *buf;
+ const gchar *buf;
guint timeout;
- int hook = 0;
+ gint hook = 0;
g_return_if_fail (CAMEL_IS_STORE(store));
g_return_if_fail (mail_in_main_thread());
@@ -998,7 +998,7 @@ mail_note_store(CamelStore *store, CamelOperation *op,
}
struct _find_info {
- const char *uri;
+ const gchar *uri;
struct _folder_info *fi;
CamelURL *url;
};
@@ -1008,7 +1008,7 @@ static void storeinfo_find_folder_info(CamelStore *store, struct _store_info *si
{
if (fi->fi == NULL) {
if (((CamelService *)store)->provider->url_equal(fi->url, ((CamelService *)store)->url)) {
- char *path = fi->url->fragment?fi->url->fragment:fi->url->path;
+ gchar *path = fi->url->fragment?fi->url->fragment:fi->url->path;
if (path[0] == '/')
path++;
@@ -1019,7 +1019,7 @@ static void storeinfo_find_folder_info(CamelStore *store, struct _store_info *si
/* returns TRUE if the uri is available, folderp is set to a
reffed folder if the folder has also already been opened */
-int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp)
+gint mail_note_get_folder_from_uri(const gchar *uri, CamelFolder **folderp)
{
struct _find_info fi = { uri, NULL, NULL };
@@ -1046,9 +1046,9 @@ int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp)
}
gboolean
-mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags)
+mail_folder_cache_get_folder_info_flags (CamelFolder *folder, gint *flags)
{
- char *uri = mail_tools_folder_to_url (folder);
+ gchar *uri = mail_tools_folder_to_url (folder);
struct _find_info fi = { uri, NULL, NULL };
if (stores == NULL)
diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h
index 932f5c3f78..41f36ac0cf 100644
--- a/mail/mail-folder-cache.h
+++ b/mail/mail-folder-cache.h
@@ -34,8 +34,8 @@
The 'done' function returns if we can free folder info. */
void
mail_note_store (CamelStore *store, CamelOperation *op,
- gboolean (*done) (CamelStore *store, CamelFolderInfo *info, void *data),
- void *data);
+ gboolean (*done) (CamelStore *store, CamelFolderInfo *info, gpointer data),
+ gpointer data);
/* de-note a store */
void mail_note_store_remove (CamelStore *store);
@@ -48,7 +48,7 @@ void mail_note_folder (CamelFolder *folder);
/* Returns true if a folder is available (yet), and also sets *folderp (if supplied)
to a (referenced) copy of the folder if it has already been opened */
-int mail_note_get_folder_from_uri (const char *uri, CamelFolder **folderp);
-gboolean mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags);
+gint mail_note_get_folder_from_uri (const gchar *uri, CamelFolder **folderp);
+gboolean mail_folder_cache_get_folder_info_flags (CamelFolder *folder, gint *flags);
#endif
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index ed7e257fba..f820f78a76 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -50,8 +50,8 @@
#define LOG_LOCKS
#define d(x)
-static void set_stop(int sensitive);
-static void mail_operation_status(struct _CamelOperation *op, const char *what, int pc, void *data);
+static void set_stop(gint sensitive);
+static void mail_operation_status(struct _CamelOperation *op, const gchar *what, gint pc, gpointer data);
#ifdef LOG_LOCKS
#define MAIL_MT_LOCK(x) (log_locks?fprintf(log, "%" G_GINT64_MODIFIER "x: lock " # x "\n", e_util_pthread_id(pthread_self())):0, pthread_mutex_lock(&x))
@@ -63,9 +63,9 @@ static void mail_operation_status(struct _CamelOperation *op, const char *what,
/* background operation status stuff */
struct _MailMsgPrivate {
- int activity_state; /* sigh sigh sigh, we need to keep track of the state external to the
+ gint activity_state; /* sigh sigh sigh, we need to keep track of the state external to the
pointer itself for locking/race conditions */
- int activity_id;
+ gint activity_id;
GtkWidget *error;
gboolean cancelable;
};
@@ -73,10 +73,10 @@ struct _MailMsgPrivate {
/* mail_msg stuff */
#ifdef LOG_OPS
static FILE *log;
-static int log_ops, log_locks, log_init;
+static gint log_ops, log_locks, log_init;
#endif
-static unsigned int mail_msg_seq; /* sequence number of each message */
+static guint mail_msg_seq; /* sequence number of each message */
static GHashTable *mail_msg_active_table; /* table of active messages, must hold mail_msg_lock to access */
static pthread_mutex_t mail_msg_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t mail_msg_cond = PTHREAD_COND_INITIALIZER;
@@ -140,7 +140,7 @@ mail_msg_new (MailMsgInfo *info)
}
static void
-end_event_callback (CamelObject *o, void *event_data, void *error)
+end_event_callback (CamelObject *o, gpointer event_data, gpointer error)
{
MailComponent *component;
EActivityHandler *activity_handler;
@@ -161,10 +161,10 @@ end_event_callback (CamelObject *o, void *event_data, void *error)
#include <mcheck.h>
static void
-checkmem(void *p)
+checkmem(gpointer p)
{
if (p) {
- int status = mprobe(p);
+ gint status = mprobe(p);
switch (status) {
case MCHECK_HEAD:
@@ -277,12 +277,12 @@ mail_msg_unref (gpointer msg)
/* hash table of ops->dialogue of active errors */
static GHashTable *active_errors = NULL;
-static void error_destroy(GtkObject *o, void *data)
+static void error_destroy(GtkObject *o, gpointer data)
{
g_hash_table_remove(active_errors, data);
}
-static void error_response(GtkObject *o, int button, void *data)
+static void error_response(GtkObject *o, gint button, gpointer data)
{
gtk_widget_destroy((GtkWidget *)o);
}
@@ -291,7 +291,7 @@ void
mail_msg_check_error (gpointer msg)
{
MailMsg *m = msg;
- char *what;
+ gchar *what;
GtkDialog *gd;
#ifdef MALLOC_CHECK
@@ -336,7 +336,7 @@ mail_msg_check_error (gpointer msg)
gtk_widget_show((GtkWidget *)gd);
}
-void mail_msg_cancel(unsigned int msgid)
+void mail_msg_cancel(guint msgid)
{
MailMsg *m;
@@ -352,7 +352,7 @@ void mail_msg_cancel(unsigned int msgid)
/* waits for a message to be finished processing (freed)
the messageid is from MailMsg->seq */
-void mail_msg_wait(unsigned int msgid)
+void mail_msg_wait(guint msgid)
{
MailMsg *m;
@@ -377,9 +377,9 @@ void mail_msg_wait(unsigned int msgid)
}
}
-int mail_msg_active(unsigned int msgid)
+gint mail_msg_active(guint msgid)
{
- int active;
+ gint active;
MAIL_MT_LOCK(mail_msg_lock);
if (msgid == (unsigned int)-1)
@@ -665,12 +665,12 @@ struct _proxy_msg {
mail_async_event_t type;
pthread_t thread;
- int have_thread;
+ gint have_thread;
MailAsyncFunc func;
- void *o;
- void *event_data;
- void *data;
+ gpointer o;
+ gpointer event_data;
+ gpointer data;
};
static void
@@ -687,7 +687,7 @@ do_async_event(struct _proxy_msg *m)
}
static int
-idle_async_event(void *mm)
+idle_async_event(gpointer mm)
{
do_async_event(mm);
mail_msg_unref(mm);
@@ -713,10 +713,10 @@ MailAsyncEvent *mail_async_event_new(void)
return ea;
}
-int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *o, void *event_data, void *data)
+gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer o, gpointer event_data, gpointer data)
{
struct _proxy_msg *m;
- int id;
+ gint id;
/* we dont have a reply port for this, we dont care when/if it gets executed, just queue it */
m = mail_msg_new(&async_event_info);
@@ -746,9 +746,9 @@ int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsync
return id;
}
-int mail_async_event_destroy(MailAsyncEvent *ea)
+gint mail_async_event_destroy(MailAsyncEvent *ea)
{
- int id;
+ gint id;
pthread_t thread = pthread_self();
struct _proxy_msg *m;
@@ -781,7 +781,7 @@ struct _call_msg {
mail_call_t type;
MailMainFunc func;
- void *ret;
+ gpointer ret;
va_list ap;
EFlag *done;
};
@@ -789,50 +789,50 @@ struct _call_msg {
static void
do_call(struct _call_msg *m)
{
- void *p1, *p2, *p3, *p4, *p5;
- int i1;
+ gpointer p1, *p2, *p3, *p4, *p5;
+ gint i1;
va_list ap;
G_VA_COPY(ap, m->ap);
switch(m->type) {
case MAIL_CALL_p_p:
- p1 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
m->ret = m->func(p1);
break;
case MAIL_CALL_p_pp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2);
break;
case MAIL_CALL_p_ppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
+ p3 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, p3);
break;
case MAIL_CALL_p_pppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
+ p3 = va_arg(ap, gpointer );
+ p4 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, p3, p4);
break;
case MAIL_CALL_p_ppppp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
- p5 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
+ p3 = va_arg(ap, gpointer );
+ p4 = va_arg(ap, gpointer );
+ p5 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, p3, p4, p5);
break;
case MAIL_CALL_p_ppippp:
- p1 = va_arg(ap, void *);
- p2 = va_arg(ap, void *);
+ p1 = va_arg(ap, gpointer );
+ p2 = va_arg(ap, gpointer );
i1 = va_arg(ap, int);
- p3 = va_arg(ap, void *);
- p4 = va_arg(ap, void *);
- p5 = va_arg(ap, void *);
+ p3 = va_arg(ap, gpointer );
+ p4 = va_arg(ap, gpointer );
+ p5 = va_arg(ap, gpointer );
m->ret = m->func(p1, p2, i1, p3, p4, p5);
break;
}
@@ -849,11 +849,11 @@ static MailMsgInfo mail_call_info = {
(MailMsgFreeFunc) NULL
};
-void *
+gpointer
mail_call_main (mail_call_t type, MailMainFunc func, ...)
{
struct _call_msg *m;
- void *ret;
+ gpointer ret;
va_list ap;
va_start(ap, func);
@@ -883,7 +883,7 @@ mail_call_main (mail_call_t type, MailMainFunc func, ...)
/* ********************************************************************** */
/* locked via status_lock */
-static int busy_state;
+static gint busy_state;
static void
do_set_busy(MailMsg *mm)
@@ -931,9 +931,9 @@ struct _op_status_msg {
MailMsg base;
struct _CamelOperation *op;
- char *what;
- int pc;
- void *data;
+ gchar *what;
+ gint pc;
+ gpointer data;
};
static void
@@ -942,8 +942,8 @@ op_status_exec (struct _op_status_msg *m)
EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ());
MailMsg *msg;
MailMsgPrivate *data;
- char *out, *p, *o, c;
- int pc;
+ gchar *out, *p, *o, c;
+ gint pc;
g_return_if_fail (mail_in_main_thread ());
@@ -971,7 +971,7 @@ op_status_exec (struct _op_status_msg *m)
pc = m->pc;
if (data->activity_id == 0) {
- char *what;
+ gchar *what;
/* its being created/removed? well leave it be */
if (data->activity_state == 1 || data->activity_state == 3) {
@@ -995,7 +995,7 @@ op_status_exec (struct _op_status_msg *m)
g_free (what);
MAIL_MT_LOCK (mail_msg_lock);
if (data->activity_state == 3) {
- int activity_id = data->activity_id;
+ gint activity_id = data->activity_id;
MAIL_MT_UNLOCK (mail_msg_lock);
mail_msg_free (msg);
@@ -1032,7 +1032,7 @@ static MailMsgInfo op_status_info = {
};
static void
-mail_operation_status (struct _CamelOperation *op, const char *what, int pc, void *data)
+mail_operation_status (struct _CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _op_status_msg *m;
@@ -1057,9 +1057,9 @@ mail_operation_status (struct _CamelOperation *op, const char *what, int pc, voi
/* ******************** */
static void
-set_stop (int sensitive)
+set_stop (gint sensitive)
{
- static int last = FALSE;
+ static gint last = FALSE;
if (last == sensitive)
return;
diff --git a/mail/mail-mt.h b/mail/mail-mt.h
index ed23c3beeb..396eb77ad2 100644
--- a/mail/mail-mt.h
+++ b/mail/mail-mt.h
@@ -40,7 +40,7 @@ typedef void (*MailMsgDispatchFunc) (gpointer msg);
struct _MailMsg {
MailMsgInfo *info;
volatile gint ref_count;
- unsigned int seq; /* seq number for synchronisation */
+ guint seq; /* seq number for synchronisation */
gint priority; /* priority (default = 0) */
CamelOperation *cancel; /* a cancellation/status handle */
CamelException ex; /* an initialised camel exception, upto the caller to use this */
@@ -66,10 +66,10 @@ gpointer mail_msg_new (MailMsgInfo *info);
gpointer mail_msg_ref (gpointer msg);
void mail_msg_unref (gpointer msg);
void mail_msg_check_error (gpointer msg);
-void mail_msg_cancel(unsigned int msgid);
-void mail_msg_wait(unsigned int msgid);
+void mail_msg_cancel(guint msgid);
+void mail_msg_wait(guint msgid);
void mail_msg_wait_all(void);
-int mail_msg_active(unsigned int msgid);
+gint mail_msg_active(guint msgid);
/* dispatch a message */
void mail_msg_main_loop_push (gpointer msg);
@@ -84,13 +84,13 @@ void mail_cancel_all (void);
void mail_msg_set_cancelable (gpointer msg, gboolean status);
/* request a string/password */
-char *mail_get_password (CamelService *service, const char *prompt,
+gchar *mail_get_password (CamelService *service, const gchar *prompt,
gboolean secret, gboolean *cache);
/* present information and get an ok (or possibly cancel)
* "type" is as for gnome_message_box_new();
*/
-gboolean mail_user_message (const char *type, const char *prompt, gboolean allow_cancel);
+gboolean mail_user_message (const gchar *type, const gchar *prompt, gboolean allow_cancel);
/* asynchronous event proxies */
typedef struct _MailAsyncEvent {
@@ -103,14 +103,14 @@ typedef enum _mail_async_event_t {
MAIL_ASYNC_THREAD
} mail_async_event_t;
-typedef void (*MailAsyncFunc)(void *, void *, void *);
+typedef void (*MailAsyncFunc)(gpointer , gpointer , gpointer );
/* create a new async event handler */
MailAsyncEvent *mail_async_event_new(void);
/* forward a camel event (or other call) to the gui thread */
-int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, void *, void *, void *);
+gint mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsyncFunc func, gpointer , gpointer , gpointer );
/* wait for all outstanding async events to complete */
-int mail_async_event_destroy(MailAsyncEvent *ea);
+gint mail_async_event_destroy(MailAsyncEvent *ea);
/* Call a function in the gui thread, wait for it to return, type is the marshaller to use */
typedef enum {
@@ -122,9 +122,9 @@ typedef enum {
MAIL_CALL_p_ppippp
} mail_call_t;
-typedef void *(*MailMainFunc)();
+typedef gpointer (*MailMainFunc)();
-void *mail_call_main(mail_call_t type, MailMainFunc func, ...);
+gpointer mail_call_main(mail_call_t type, MailMainFunc func, ...);
/* use with caution. only works with active message's anyway */
void mail_enable_stop(void);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 4f310db812..06ea94a594 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -72,7 +72,7 @@
#define w(x)
#define d(x)
-extern const char *x_mailer;
+extern const gchar *x_mailer;
/* used for both just filtering a folder + uid's, and for filtering a whole folder */
/* used both for fetching mail, and for filtering mail */
@@ -84,7 +84,7 @@ struct _filter_mail_msg {
CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */
CamelOperation *cancel;
CamelFilterDriver *driver;
- int delete; /* delete messages after filtering them? */
+ gint delete; /* delete messages after filtering them? */
CamelFolder *destination; /* default destination for any messages, NULL for none */
};
@@ -93,12 +93,12 @@ struct _fetch_mail_msg {
struct _filter_mail_msg fmsg;
CamelOperation *cancel; /* we have our own cancellation struct, the other should be empty */
- int keep; /* keep on server? */
+ gint keep; /* keep on server? */
- char *source_uri;
+ gchar *source_uri;
- void (*done)(const char *source, void *data);
- void *data;
+ void (*done)(const gchar *source, gpointer data);
+ gpointer data;
};
static gchar *
@@ -197,7 +197,7 @@ static MailMsgInfo em_filter_folder_element_info = {
void
mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
- const char *type, gboolean notify,
+ const gchar *type, gboolean notify,
CamelOperation *cancel)
{
struct _filter_mail_msg *m;
@@ -240,12 +240,12 @@ mail_filter_junk (CamelFolder *folder, GPtrArray *uids)
/* ********************************************************************** */
/* Temporary workaround for various issues. Gone before 0.11 */
-static char *
+static gchar *
uid_cachename_hack (CamelStore *store)
{
CamelURL *url = CAMEL_SERVICE (store)->url;
- char *encoded_url, *filename;
- const char *evolution_dir;
+ gchar *encoded_url, *filename;
+ const gchar *evolution_dir;
encoded_url = g_strdup_printf ("%s%s%s@%s", url->user,
url->authmech ? ";auth=" : "",
@@ -270,7 +270,7 @@ static void
fetch_mail_exec (struct _fetch_mail_msg *m)
{
struct _filter_mail_msg *fm = (struct _filter_mail_msg *)m;
- int i;
+ gint i;
if (m->cancel)
camel_operation_register (m->cancel);
@@ -282,7 +282,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
/* FIXME: this should support keep_on_server too, which would then perform a spool
access thingy, right? problem is matching raw messages to uid's etc. */
if (!strncmp (m->source_uri, "mbox:", 5)) {
- char *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex);
+ gchar *path = mail_tool_do_movemail (m->source_uri, &fm->base.ex);
if (path && !camel_exception_is_set (&fm->base.ex)) {
camel_folder_freeze (fm->destination);
@@ -301,7 +301,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
/* this handles 'keep on server' stuff, if we have any new uid's to copy
across, we need to copy them to a new array 'cause of the way fetch_mail_free works */
CamelUIDCache *cache = NULL;
- char *cachename;
+ gchar *cachename;
cachename = uid_cachename_hack (folder->parent_store);
cache = camel_uid_cache_new (cachename);
@@ -334,7 +334,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m)
if (fm->delete && !camel_exception_is_set (&fm->base.ex)) {
/* not keep on server - just delete all the actual messages on the server */
for (i=0;i<folder_uids->len;i++) {
- d(printf("force delete uid '%s'\n", (char *)folder_uids->pdata[i]));
+ d(printf("force delete uid '%s'\n", (gchar *)folder_uids->pdata[i]));
camel_folder_delete_message(folder, folder_uids->pdata[i]);
}
}
@@ -397,10 +397,10 @@ static MailMsgInfo fetch_mail_info = {
/* ouch, a 'do everything' interface ... */
void
-mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *source, void *data), void *data)
+mail_fetch_mail (const gchar *source, gint keep, const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *source, gpointer data), gpointer data)
{
struct _fetch_mail_msg *m;
struct _filter_mail_msg *fm;
@@ -443,21 +443,21 @@ static const gchar *resent_recipients[] = {
/* send 1 message to a specific transport */
static void
-mail_send_message(CamelFolder *queue, const char *uid, const char *destination, CamelFilterDriver *driver, CamelException *ex)
+mail_send_message(CamelFolder *queue, const gchar *uid, const gchar *destination, CamelFilterDriver *driver, CamelException *ex)
{
EAccount *account = NULL;
const CamelInternetAddress *iaddr;
CamelAddress *from, *recipients;
CamelMessageInfo *info = NULL;
CamelTransport *xport = NULL;
- char *transport_url = NULL;
- char *sent_folder_uri = NULL;
- const char *resent_from, *tmp;
+ gchar *transport_url = NULL;
+ gchar *sent_folder_uri = NULL;
+ const gchar *resent_from, *tmp;
CamelFolder *folder = NULL;
GString *err = NULL;
struct _camel_header_raw *xev, *header;
CamelMimeMessage *message;
- int i;
+ gint i;
message = camel_folder_get_message(queue, uid, ex);
if (!message)
@@ -470,7 +470,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
tmp = camel_header_raw_find(&xev, "X-Evolution-Account", NULL);
if (tmp) {
- char *name;
+ gchar *name;
name = g_strstrip(g_strdup(tmp));
if ((account = mail_config_get_account_by_uid(name))
@@ -507,7 +507,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
recipients = (CamelAddress *) camel_internet_address_new ();
for (i = 0; i < 3; i++) {
- const char *type;
+ const gchar *type;
type = resent_from ? resent_recipients[i] : normal_recipients[i];
iaddr = camel_mime_message_get_recipients (message, type);
@@ -530,7 +530,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
camel_mime_message_set_date(message, CAMEL_MESSAGE_DATE_CURRENT, 0);
for (header = xev;header;header=header->next) {
- char *uri;
+ gchar *uri;
if (strcmp(header->name, "X-Evolution-PostTo") != 0)
continue;
@@ -595,9 +595,9 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT);
if (folder != sent_folder) {
- const char *name;
+ const gchar *name;
- camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (char **) &name, 0);
+ camel_object_get (folder, NULL, CAMEL_OBJECT_DESCRIPTION, (gchar **) &name, 0);
if (err->len)
g_string_append(err, "\n\n");
g_string_append_printf (err, _("Failed to append to %s: %s\n"
@@ -656,24 +656,24 @@ struct _send_queue_msg {
MailMsg base;
CamelFolder *queue;
- char *destination;
+ gchar *destination;
CamelFilterDriver *driver;
CamelOperation *cancel;
/* we use camelfilterstatusfunc, even though its not the filter doing it */
CamelFilterStatusFunc *status;
- void *status_data;
+ gpointer status_data;
- void (*done)(const char *destination, void *data);
- void *data;
+ void (*done)(const gchar *destination, gpointer data);
+ gpointer data;
};
static void
-report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, int pc, const char *desc, ...)
+report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, gint pc, const gchar *desc, ...)
{
va_list ap;
- char *str;
+ gchar *str;
if (m->status) {
va_start (ap, desc);
@@ -690,7 +690,7 @@ send_queue_exec (struct _send_queue_msg *m)
CamelFolder *sent_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT);
GPtrArray *uids, *send_uids = NULL;
CamelException ex;
- int i, j;
+ gint i, j;
d(printf("sending queue\n"));
@@ -731,7 +731,7 @@ send_queue_exec (struct _send_queue_msg *m)
used as a mechanism to accumualte warning messages and present them back to the user. */
for (i = 0, j = 0; i < send_uids->len; i++) {
- int pc = (100 * i) / send_uids->len;
+ gint pc = (100 * i) / send_uids->len;
report_status (m, CAMEL_FILTER_STATUS_START, pc, _("Sending message %d of %d"), i+1, send_uids->len);
if (!m->cancel)
@@ -828,11 +828,11 @@ static MailMsgInfo send_queue_info = {
/* same interface as fetch_mail, just 'cause i'm lazy today (and we need to run it from the same spot?) */
void
-mail_send_queue(CamelFolder *queue, const char *destination,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *destination, void *data), void *data)
+mail_send_queue(CamelFolder *queue, const gchar *destination,
+ const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *destination, gpointer data), gpointer data)
{
struct _send_queue_msg *m;
@@ -867,10 +867,10 @@ struct _append_msg {
CamelFolder *folder;
CamelMimeMessage *message;
CamelMessageInfo *info;
- char *appended_uid;
+ gchar *appended_uid;
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data);
- void *data;
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data);
+ gpointer data;
};
static gchar *
@@ -911,8 +911,8 @@ static MailMsgInfo append_mail_info = {
void
mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, const char *appended_uid, void *data),
- void *data)
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data),
+ gpointer data)
{
struct _append_msg *m;
@@ -943,11 +943,11 @@ struct _transfer_msg {
CamelFolder *source;
GPtrArray *uids;
gboolean delete;
- char *dest_uri;
+ gchar *dest_uri;
guint32 dest_flags;
- void (*done)(gboolean ok, void *data);
- void *data;
+ void (*done)(gboolean ok, gpointer data);
+ gpointer data;
};
static gchar *
@@ -981,7 +981,7 @@ transfer_messages_exec (struct _transfer_msg *m)
/* make sure all deleted messages are marked as seen */
if (m->delete) {
- int i;
+ gint i;
for (i = 0; i < m->uids->len; i++)
camel_folder_set_message_flags (m->source, m->uids->pdata[i],
@@ -1020,10 +1020,10 @@ static MailMsgInfo transfer_messages_info = {
void
mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
gboolean delete_from_source,
- const char *dest_uri,
+ const gchar *dest_uri,
guint32 dest_flags,
- void (*done) (gboolean ok, void *data),
- void *data)
+ void (*done) (gboolean ok, gpointer data),
+ gpointer data)
{
struct _transfer_msg *m;
@@ -1051,15 +1051,15 @@ struct _get_folderinfo_msg {
CamelStore *store;
CamelFolderInfo *info;
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
- void *data;
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data);
+ gpointer data;
gboolean can_clear; /* whether we can clear folder info */
};
static gchar *
get_folderinfo_desc (struct _get_folderinfo_msg *m)
{
- char *ret, *name;
+ gchar *ret, *name;
name = camel_service_get_name((CamelService *)m->store, TRUE);
ret = g_strdup_printf(_("Scanning folders in \"%s\""), name);
@@ -1079,7 +1079,7 @@ static void
get_folderinfo_done (struct _get_folderinfo_msg *m)
{
if (!m->info && camel_exception_is_set (&m->base.ex)) {
- char *url;
+ gchar *url;
url = camel_service_get_url (CAMEL_SERVICE (m->store));
w(g_warning ("Error getting folder info from store at %s: %s",
@@ -1109,11 +1109,11 @@ static MailMsgInfo get_folderinfo_info = {
(MailMsgFreeFunc) get_folderinfo_free
};
-int
-mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data), void *data)
+gint
+mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data), gpointer data)
{
struct _get_folderinfo_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&get_folderinfo_info);
if (op) {
@@ -1135,18 +1135,18 @@ mail_get_folderinfo (CamelStore *store, CamelOperation *op, gboolean (*done)(Cam
/* ** ATTACH MESSAGES ****************************************************** */
struct _build_data {
- void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, char *subject, void *data);
- void *data;
+ void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, gchar *subject, gpointer data);
+ gpointer data;
};
static void
-do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
+do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer data)
{
struct _build_data *d = data;
CamelMultipart *multipart;
CamelMimePart *part;
- char *subject;
- int i;
+ gchar *subject;
+ gint i;
if (messages->len == 0) {
d->done(folder, messages, NULL, NULL, d->data);
@@ -1183,7 +1183,7 @@ do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages,
void
mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, void *data), void *data)
+ void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer data), gpointer data)
{
struct _build_data *d;
@@ -1201,11 +1201,11 @@ mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
struct _get_folder_msg {
MailMsg base;
- char *uri;
+ gchar *uri;
guint32 flags;
CamelFolder *folder;
- void (*done) (char *uri, CamelFolder *folder, void *data);
- void *data;
+ void (*done) (gchar *uri, CamelFolder *folder, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1243,13 +1243,13 @@ static MailMsgInfo get_folder_info = {
(MailMsgFreeFunc) get_folder_free
};
-int
-mail_get_folder (const char *uri, guint32 flags,
- void (*done)(char *uri, CamelFolder *folder, void *data),
- void *data, MailMsgDispatchFunc dispatch)
+gint
+mail_get_folder (const gchar *uri, guint32 flags,
+ void (*done)(gchar *uri, CamelFolder *folder, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_folder_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&get_folder_info);
m->uri = g_strdup (uri);
@@ -1269,8 +1269,8 @@ struct _get_quota_msg {
CamelFolder *folder;
CamelFolderQuotaInfo *quota;
- void (*done) (CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data);
- void *data;
+ void (*done) (CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1309,13 +1309,13 @@ static MailMsgInfo get_quota_info = {
(MailMsgFreeFunc) get_quota_free
};
-int
+gint
mail_get_folder_quota (CamelFolder *folder,
- void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data),
- void *data, MailMsgDispatchFunc dispatch)
+ void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_quota_msg *m;
- int id;
+ gint id;
g_return_val_if_fail (folder != NULL, -1);
@@ -1336,10 +1336,10 @@ mail_get_folder_quota (CamelFolder *folder,
struct _get_store_msg {
MailMsg base;
- char *uri;
+ gchar *uri;
CamelStore *store;
- void (*done) (char *uri, CamelStore *store, void *data);
- void *data;
+ void (*done) (gchar *uri, CamelStore *store, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1381,11 +1381,11 @@ static MailMsgInfo get_store_info = {
(MailMsgFreeFunc) get_store_free
};
-int
-mail_get_store (const char *uri, CamelOperation *op, void (*done) (char *uri, CamelStore *store, void *data), void *data)
+gint
+mail_get_store (const gchar *uri, CamelOperation *op, void (*done) (gchar *uri, CamelStore *store, gpointer data), gpointer data)
{
struct _get_store_msg *m;
- int id;
+ gint id;
m = mail_msg_new (&get_store_info);
if (op) {
@@ -1409,8 +1409,8 @@ struct _remove_folder_msg {
CamelFolder *folder;
gboolean removed;
- void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data);
- void *data;
+ void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1438,7 +1438,7 @@ remove_folder_rec (CamelStore *store, CamelFolderInfo *fi, CamelException *ex)
if (!CAMEL_IS_VEE_FOLDER (folder)) {
GPtrArray *uids = camel_folder_get_uids (folder);
- int i;
+ gint i;
/* Delete every message in this folder, then expunge it */
camel_folder_freeze (folder);
@@ -1506,7 +1506,7 @@ static MailMsgInfo remove_folder_info = {
};
void
-mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data), void *data)
+mail_remove_folder (CamelFolder *folder, void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data), gpointer data)
{
struct _remove_folder_msg *m;
@@ -1527,8 +1527,8 @@ struct _sync_folder_msg {
MailMsg base;
CamelFolder *folder;
- void (*done) (CamelFolder *folder, void *data);
- void *data;
+ void (*done) (CamelFolder *folder, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1566,7 +1566,7 @@ static MailMsgInfo sync_folder_info = {
};
void
-mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
@@ -1585,15 +1585,15 @@ struct _sync_store_msg {
MailMsg base;
CamelStore *store;
- int expunge;
- void (*done) (CamelStore *store, void *data);
- void *data;
+ gint expunge;
+ void (*done) (CamelStore *store, gpointer data);
+ gpointer data;
};
static gchar *
sync_store_desc (struct _sync_store_msg *m)
{
- char *uri, *res;
+ gchar *uri, *res;
uri = camel_url_to_string(((CamelService *)m->store)->url, CAMEL_URL_HIDE_ALL);
res = g_strdup_printf(m->expunge
@@ -1633,7 +1633,7 @@ static MailMsgInfo sync_store_info = {
};
void
-mail_sync_store(CamelStore *store, int expunge, void (*done) (CamelStore *store, void *data), void *data)
+mail_sync_store(CamelStore *store, gint expunge, void (*done) (CamelStore *store, gpointer data), gpointer data)
{
struct _sync_store_msg *m;
@@ -1674,7 +1674,7 @@ static MailMsgInfo refresh_folder_info = {
};
void
-mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_refresh_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
@@ -1711,7 +1711,7 @@ static MailMsgInfo expunge_folder_info = {
};
void
-mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *data), void *data)
+mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, gpointer data), gpointer data)
{
struct _sync_folder_msg *m;
@@ -1730,8 +1730,8 @@ struct _empty_trash_msg {
MailMsg base;
EAccount *account;
- void (*done) (EAccount *account, void *data);
- void *data;
+ void (*done) (EAccount *account, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1749,9 +1749,9 @@ empty_trash_desc (struct _empty_trash_msg *m)
static void
empty_trash_exec (struct _empty_trash_msg *m)
{
- const char *evolution_dir;
+ const gchar *evolution_dir;
CamelFolder *trash;
- char *uri;
+ gchar *uri;
if (m->account) {
trash = mail_tool_get_trash (m->account->source->url, FALSE, &m->base.ex);
@@ -1791,7 +1791,7 @@ static MailMsgInfo empty_trash_info = {
};
void
-mail_empty_trash(EAccount *account, void (*done) (EAccount *account, void *data), void *data)
+mail_empty_trash(EAccount *account, void (*done) (EAccount *account, gpointer data), gpointer data)
{
struct _empty_trash_msg *m;
@@ -1811,9 +1811,9 @@ struct _get_message_msg {
MailMsg base;
CamelFolder *folder;
- char *uid;
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data);
- void *data;
+ gchar *uid;
+ void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data);
+ gpointer data;
CamelMimeMessage *message;
CamelOperation *cancel;
};
@@ -1857,9 +1857,9 @@ static MailMsgInfo get_message_info = {
};
void
-mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid,
- CamelMimeMessage *msg, void *data),
- void *data, MailMsgDispatchFunc dispatch)
+mail_get_message(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid,
+ CamelMimeMessage *msg, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_message_msg *m;
@@ -1868,13 +1868,13 @@ mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder
camel_object_ref(folder);
m->uid = g_strdup(uid);
m->data = data;
- m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
+ m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done;
m->cancel = camel_operation_new(NULL, NULL);
dispatch (m);
}
-typedef void (*get_done)(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *);
+typedef void (*get_done)(CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *);
static void
get_messagex_done (struct _get_message_msg *m)
@@ -1896,8 +1896,8 @@ static MailMsgInfo get_messagex_info = {
/* This is temporary, to avoid having to rewrite everything that uses
mail_get_message; it adds an exception argument to the callback */
CamelOperation *
-mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
- void *data, MailMsgDispatchFunc dispatch)
+mail_get_messagex(CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *),
+ gpointer data, MailMsgDispatchFunc dispatch)
{
struct _get_message_msg *m;
@@ -1906,7 +1906,7 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde
camel_object_ref(folder);
m->uid = g_strdup(uid);
m->data = data;
- m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
+ m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done;
m->cancel = camel_operation_new(NULL, NULL);
dispatch (m);
@@ -1923,8 +1923,8 @@ struct _get_messages_msg {
GPtrArray *uids;
GPtrArray *messages;
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data);
- void *data;
+ void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data);
+ gpointer data;
};
static gchar *
@@ -1938,11 +1938,11 @@ get_messages_desc (struct _get_messages_msg *m)
static void
get_messages_exec (struct _get_messages_msg *m)
{
- int i;
+ gint i;
CamelMimeMessage *message;
for (i=0; i<m->uids->len; i++) {
- int pc = ((i+1) * 100) / m->uids->len;
+ gint pc = ((i+1) * 100) / m->uids->len;
message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex);
camel_operation_progress(m->base.cancel, pc);
@@ -1963,7 +1963,7 @@ get_messages_done (struct _get_messages_msg *m)
static void
get_messages_free (struct _get_messages_msg *m)
{
- int i;
+ gint i;
em_utils_uids_free (m->uids);
for (i=0;i<m->messages->len;i++) {
@@ -1984,8 +1984,8 @@ static MailMsgInfo get_messages_info = {
void
mail_get_messages(CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
- void *data)
+ void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data),
+ gpointer data)
{
struct _get_messages_msg *m;
@@ -2007,9 +2007,9 @@ struct _save_messages_msg {
CamelFolder *folder;
GPtrArray *uids;
- char *path;
- void (*done)(CamelFolder *folder, GPtrArray *uids, char *path, void *data);
- void *data;
+ gchar *path;
+ void (*done)(CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data);
+ gpointer data;
};
static gchar *
@@ -2024,7 +2024,7 @@ static void
save_prepare_part (CamelMimePart *mime_part)
{
CamelDataWrapper *wrapper;
- int parts, i;
+ gint parts, i;
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
if (!wrapper)
@@ -2058,8 +2058,8 @@ save_messages_exec (struct _save_messages_msg *m)
CamelStreamFilter *filtered_stream;
CamelMimeFilterFrom *from_filter;
CamelStream *stream;
- int i;
- char *from, *path;
+ gint i;
+ gchar *from, *path;
if (strstr (m->path, "://"))
path = m->path;
@@ -2077,7 +2077,7 @@ save_messages_exec (struct _save_messages_msg *m)
for (i=0; i<m->uids->len; i++) {
CamelMimeMessage *message;
- int pc = ((i+1) * 100) / m->uids->len;
+ gint pc = ((i+1) * 100) / m->uids->len;
message = camel_folder_get_message(m->folder, m->uids->pdata[i], &m->base.ex);
camel_operation_progress(m->base.cancel, pc);
@@ -2129,12 +2129,12 @@ static MailMsgInfo save_messages_info = {
(MailMsgFreeFunc) save_messages_free
};
-int
-mail_save_messages(CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data), void *data)
+gint
+mail_save_messages(CamelFolder *folder, GPtrArray *uids, const gchar *path,
+ void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data), gpointer data)
{
struct _save_messages_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&save_messages_info);
m->folder = folder;
@@ -2156,9 +2156,9 @@ struct _save_part_msg {
MailMsg base;
CamelMimePart *part;
- char *path;
- void (*done)(CamelMimePart *part, char *path, int saved, void *data);
- void *data;
+ gchar *path;
+ void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data);
+ gpointer data;
gboolean readonly;
};
@@ -2173,7 +2173,7 @@ save_part_exec (struct _save_part_msg *m)
{
CamelDataWrapper *content;
CamelStream *stream;
- char *path;
+ gchar *path;
if (strstr (m->path, "://"))
path = m->path;
@@ -2234,12 +2234,12 @@ static MailMsgInfo save_part_info = {
(MailMsgFreeFunc) save_part_free
};
-int
-mail_save_part (CamelMimePart *part, const char *path,
- void (*done)(CamelMimePart *part, char *path, int saved, void *data), void *data, gboolean readonly)
+gint
+mail_save_part (CamelMimePart *part, const gchar *path,
+ void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data), gpointer data, gboolean readonly)
{
struct _save_part_msg *m;
- int id;
+ gint id;
m = mail_msg_new (&save_part_info);
m->part = part;
camel_object_ref (part);
@@ -2261,9 +2261,9 @@ struct _prep_offline_msg {
MailMsg base;
CamelOperation *cancel;
- char *uri;
- void (*done)(const char *uri, void *data);
- void *data;
+ gchar *uri;
+ void (*done)(const gchar *uri, gpointer data);
+ gpointer data;
};
static void
@@ -2317,10 +2317,10 @@ static MailMsgInfo prep_offline_info = {
};
void
-mail_prep_offline(const char *uri,
+mail_prep_offline(const gchar *uri,
CamelOperation *cancel,
- void (*done)(const char *, void *data),
- void *data)
+ void (*done)(const gchar *, gpointer data),
+ gpointer data)
{
struct _prep_offline_msg *m;
@@ -2342,15 +2342,15 @@ struct _set_offline_msg {
CamelStore *store;
gboolean offline;
- void (*done)(CamelStore *store, void *data);
- void *data;
+ void (*done)(CamelStore *store, gpointer data);
+ gpointer data;
};
static gchar *
set_offline_desc (struct _set_offline_msg *m)
{
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
+ gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
+ gchar *msg;
msg = g_strdup_printf(m->offline?_("Disconnecting from %s"):_("Reconnecting to %s"),
service_name);
@@ -2413,13 +2413,13 @@ static MailMsgInfo set_offline_info = {
(MailMsgFreeFunc) set_offline_free
};
-int
+gint
mail_store_set_offline (CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data)
+ void (*done)(CamelStore *, gpointer data),
+ gpointer data)
{
struct _set_offline_msg *m;
- int id;
+ gint id;
/* Cancel any pending connect first so the set_offline_op
* thread won't get queued behind a hung connect op.
@@ -2442,11 +2442,11 @@ mail_store_set_offline (CamelStore *store, gboolean offline,
/* ** Prepare OFFLINE ***************************************************** */
-static char *
+static gchar *
prepare_offline_desc (struct _set_offline_msg *m)
{
- char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
- char *msg;
+ gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
+ gchar *msg;
msg = g_strdup_printf (_("Preparing account '%s' for offline"), service_name);
g_free(service_name);
@@ -2487,11 +2487,11 @@ static MailMsgInfo prepare_offline_info = {
(MailMsgFreeFunc) prepare_offline_free
};
-int
+gint
mail_store_prepare_offline (CamelStore *store)
{
struct _set_offline_msg *m;
- int id;
+ gint id;
/* Cancel any pending connect first so the set_offline_op
* thread won't get queued behind a hung connect op.
@@ -2511,7 +2511,7 @@ mail_store_prepare_offline (CamelStore *store)
/* ** Execute Shell Command ***************************************************** */
void
-mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data)
+mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data)
{
if (argc <= 0)
return;
@@ -2523,12 +2523,12 @@ mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, vo
struct _check_msg {
MailMsg base;
- char *url;
+ gchar *url;
CamelProviderType type;
GList *authtypes;
- void (*done)(const char *url, CamelProviderType type, GList *types, void *data);
- void *data;
+ void (*done)(const gchar *url, CamelProviderType type, GList *types, gpointer data);
+ gpointer data;
};
static gchar *
@@ -2574,11 +2574,11 @@ static MailMsgInfo check_service_info = {
(MailMsgFreeFunc) check_service_free
};
-int
-mail_check_service(const char *url, CamelProviderType type, void (*done)(const char *url, CamelProviderType type, GList *authtypes, void *data), void *data)
+gint
+mail_check_service(const gchar *url, CamelProviderType type, void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data)
{
struct _check_msg *m;
- int id;
+ gint id;
m = mail_msg_new (&check_service_info);
m->url = g_strdup(url);
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index 39905fb06c..12e8632f88 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -40,113 +40,113 @@ extern "C" {
#include "libedataserver/e-account.h"
void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
- const char *appended_uid, void *data),
- void *data);
+ void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok,
+ const gchar *appended_uid, gpointer data),
+ gpointer data);
void mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
gboolean delete_from_source,
- const char *dest_uri,
+ const gchar *dest_uri,
guint32 dest_flags,
- void (*done) (gboolean ok, void *data),
- void *data);
+ void (*done) (gboolean ok, gpointer data),
+ gpointer data);
/* get a single message, asynchronously */
-void mail_get_message (CamelFolder *folder, const char *uid,
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data),
- void *data,
+void mail_get_message (CamelFolder *folder, const gchar *uid,
+ void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data),
+ gpointer data,
MailMsgDispatchFunc dispatch);
CamelOperation *
-mail_get_messagex(CamelFolder *folder, const char *uid,
- void (*done) (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data, CamelException *),
- void *data, MailMsgDispatchFunc dispatch);
+mail_get_messagex(CamelFolder *folder, const gchar *uid,
+ void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data, CamelException *),
+ gpointer data, MailMsgDispatchFunc dispatch);
/* get several messages */
void mail_get_messages (CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data),
+ gpointer data);
/* same for a folder */
-int mail_get_folder (const char *uri, guint32 flags,
- void (*done) (char *uri, CamelFolder *folder, void *data), void *data,
+gint mail_get_folder (const gchar *uri, guint32 flags,
+ void (*done) (gchar *uri, CamelFolder *folder, gpointer data), gpointer data,
MailMsgDispatchFunc dispatch);
/* get quota information for a folder */
-int mail_get_folder_quota (CamelFolder *folder,
- void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, void *data),
- void *data, MailMsgDispatchFunc dispatch);
+gint mail_get_folder_quota (CamelFolder *folder,
+ void (*done)(CamelFolder *folder, CamelFolderQuotaInfo *quota, gpointer data),
+ gpointer data, MailMsgDispatchFunc dispatch);
/* and for a store */
-int mail_get_store (const char *uri, CamelOperation *op,
- void (*done) (char *uri, CamelStore *store, void *data), void *data);
+gint mail_get_store (const gchar *uri, CamelOperation *op,
+ void (*done) (gchar *uri, CamelStore *store, gpointer data), gpointer data);
/* build an attachment */
void mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
void (*done)(CamelFolder *folder, GPtrArray *messages,
- CamelMimePart *part, char *subject, void *data),
- void *data);
+ CamelMimePart *part, gchar *subject, gpointer data),
+ gpointer data);
void mail_sync_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data), void *data);
+ void (*done) (CamelFolder *folder, gpointer data), gpointer data);
-void mail_sync_store(CamelStore *store, int expunge,
- void (*done) (CamelStore *store, void *data), void *data);
+void mail_sync_store(CamelStore *store, gint expunge,
+ void (*done) (CamelStore *store, gpointer data), gpointer data);
void mail_refresh_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, gpointer data),
+ gpointer data);
void mail_expunge_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, gpointer data),
+ gpointer data);
void mail_empty_trash (EAccount *account,
- void (*done) (EAccount *account, void *data),
- void *data);
+ void (*done) (EAccount *account, gpointer data),
+ gpointer data);
/* get folder info asynchronously */
-int mail_get_folderinfo (CamelStore *store, CamelOperation *op,
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, void *data),
- void *data);
+gint mail_get_folderinfo (CamelStore *store, CamelOperation *op,
+ gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data),
+ gpointer data);
/* remove an existing folder */
void mail_remove_folder (CamelFolder *folder,
- void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, void *data),
- void *data);
+ void (*done) (CamelFolder *folder, gboolean removed, CamelException *ex, gpointer data),
+ gpointer data);
/* transfer (copy/move) a folder */
-void mail_xfer_folder (const char *src_uri, const char *dest_uri, gboolean remove_source,
- void (*done) (char *src_uri, char *dest_uri, gboolean remove_source,
- CamelFolder *folder, void *data),
- void *data);
+void mail_xfer_folder (const gchar *src_uri, const gchar *dest_uri, gboolean remove_source,
+ void (*done) (gchar *src_uri, gchar *dest_uri, gboolean remove_source,
+ CamelFolder *folder, gpointer data),
+ gpointer data);
/* save messages */
-int mail_save_messages (CamelFolder *folder, GPtrArray *uids, const char *path,
- void (*done) (CamelFolder *folder, GPtrArray *uids, char *path, void *data),
- void *data);
+gint mail_save_messages (CamelFolder *folder, GPtrArray *uids, const gchar *path,
+ void (*done) (CamelFolder *folder, GPtrArray *uids, gchar *path, gpointer data),
+ gpointer data);
-int mail_save_part (CamelMimePart *part, const char *path,
- void (*done)(CamelMimePart *part, char *path, int saved, void *data),
- void *data, gboolean readonly);
+gint mail_save_part (CamelMimePart *part, const gchar *path,
+ void (*done)(CamelMimePart *part, gchar *path, gint saved, gpointer data),
+ gpointer data, gboolean readonly);
/* yeah so this is messy, but it does a lot, maybe i can consolidate all user_data's to be the one */
-void mail_send_queue (CamelFolder *queue, const char *destination,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *destination, void *data),
- void *data);
-
-void mail_fetch_mail (const char *source, int keep,
- const char *type, CamelOperation *cancel,
- CamelFilterGetFolderFunc get_folder, void *get_data,
- CamelFilterStatusFunc *status, void *status_data,
- void (*done)(const char *source, void *data),
- void *data);
+void mail_send_queue (CamelFolder *queue, const gchar *destination,
+ const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *destination, gpointer data),
+ gpointer data);
+
+void mail_fetch_mail (const gchar *source, gint keep,
+ const gchar *type, CamelOperation *cancel,
+ CamelFilterGetFolderFunc get_folder, gpointer get_data,
+ CamelFilterStatusFunc *status, gpointer status_data,
+ void (*done)(const gchar *source, gpointer data),
+ gpointer data);
void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
- const char *type, gboolean notify,
+ const gchar *type, gboolean notify,
CamelOperation *cancel);
/* convenience functions for above */
@@ -154,19 +154,19 @@ void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids);
void mail_filter_junk (CamelFolder *folder, GPtrArray *uids);
/* Work Offline */
-void mail_prep_offline(const char *uri, CamelOperation *cancel,
- void (*done)(const char *, void *data),
- void *data);
-int mail_store_set_offline(CamelStore *store, gboolean offline,
- void (*done)(CamelStore *, void *data),
- void *data);
-int mail_store_prepare_offline (CamelStore *store);
+void mail_prep_offline(const gchar *uri, CamelOperation *cancel,
+ void (*done)(const gchar *, gpointer data),
+ gpointer data);
+gint mail_store_set_offline(CamelStore *store, gboolean offline,
+ void (*done)(CamelStore *, gpointer data),
+ gpointer data);
+gint mail_store_prepare_offline (CamelStore *store);
/* filter driver execute shell command async callback */
-void mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, void *data);
+void mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, gpointer data);
-int mail_check_service(const char *url, CamelProviderType type,
- void (*done)(const char *url, CamelProviderType type, GList *authtypes, void *data), void *data);
+gint mail_check_service(const gchar *url, CamelProviderType type,
+ void (*done)(const gchar *url, CamelProviderType type, GList *authtypes, gpointer data), gpointer data);
#ifdef __cplusplus
}
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index be834bb0d3..c6f7df9c2d 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -67,17 +67,17 @@
/* this stuff is used to keep track of which folders filters have accessed, and
what not. the thaw/refreeze thing doesn't really seem to work though */
struct _folder_info {
- char *uri;
+ gchar *uri;
CamelFolder *folder;
time_t update;
- int count; /* how many times updated, to slow it down as we go, if we have lots */
+ gint count; /* how many times updated, to slow it down as we go, if we have lots */
};
struct _send_data {
GList *infos;
GtkDialog *gd;
- int cancelled;
+ gint cancelled;
CamelFolder *inbox; /* since we're never asked to update this one, do it ourselves */
time_t inbox_update;
@@ -104,24 +104,24 @@ typedef enum {
struct _send_info {
send_info_t type; /* 0 = fetch, 1 = send */
CamelOperation *cancel;
- char *uri;
+ gchar *uri;
gboolean keep_on_server;
send_state_t state;
GtkWidget *progress_bar;
GtkWidget *cancel_button;
GtkWidget *status_label;
- int again; /* need to run send again */
+ gint again; /* need to run send again */
- int timeout_id;
- char *what;
- int pc;
+ gint timeout_id;
+ gchar *what;
+ gint pc;
/*time_t update;*/
struct _send_data *data;
};
-static CamelFolder *receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex);
+static CamelFolder *receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex);
static struct _send_data *send_data = NULL;
static GtkWidget *send_recv_dialog = NULL;
@@ -207,13 +207,13 @@ free_send_data(void)
}
static void
-cancel_send_info(void *key, struct _send_info *info, void *data)
+cancel_send_info(gpointer key, struct _send_info *info, gpointer data)
{
receive_cancel (GTK_BUTTON (info->cancel_button), info);
}
static void
-hide_send_info(void *key, struct _send_info *info, void *data)
+hide_send_info(gpointer key, struct _send_info *info, gpointer data)
{
info->cancel_button = NULL;
info->progress_bar = NULL;
@@ -234,7 +234,7 @@ dialog_destroy_cb (struct _send_data *data, GObject *deadbeef)
}
static void
-dialog_response(GtkDialog *gd, int button, struct _send_data *data)
+dialog_response(GtkDialog *gd, gint button, struct _send_data *data)
{
switch(button) {
case GTK_RESPONSE_CANCEL:
@@ -255,7 +255,7 @@ dialog_response(GtkDialog *gd, int button, struct _send_data *data)
}
static int
-operation_status_timeout(void *data)
+operation_status_timeout(gpointer data)
{
struct _send_info *info = data;
@@ -274,7 +274,7 @@ operation_status_timeout(void *data)
}
static void
-set_send_status(struct _send_info *info, const char *desc, int pc)
+set_send_status(struct _send_info *info, const gchar *desc, gint pc)
{
/* FIXME: LOCK */
g_free(info->what);
@@ -284,7 +284,7 @@ set_send_status(struct _send_info *info, const char *desc, int pc)
/* for camel operation status */
static void
-operation_status(CamelOperation *op, const char *what, int pc, void *data)
+operation_status(CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
struct _send_info *info = data;
@@ -301,11 +301,11 @@ operation_status(CamelOperation *op, const char *what, int pc, void *data)
set_send_status(info, what, pc);
}
-static char *
-format_url(const char *internal_url, const char *account_name)
+static gchar *
+format_url(const gchar *internal_url, const gchar *account_name)
{
CamelURL *url;
- char *pretty_url;
+ gchar *pretty_url;
url = camel_url_new(internal_url, NULL);
if (account_name) {
@@ -330,7 +330,7 @@ format_url(const char *internal_url, const char *account_name)
}
static send_info_t
-get_receive_type(const char *url)
+get_receive_type(const gchar *url)
{
CamelProvider *provider;
CamelException ex;
@@ -360,11 +360,11 @@ get_receive_type(const char *url)
}
static struct _send_data *
-build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destination)
+build_dialog (EAccountList *accounts, CamelFolder *outbox, const gchar *destination)
{
GtkDialog *gd;
GtkWidget *table;
- int row, num_sources;
+ gint row, num_sources;
GList *list = NULL;
struct _send_data *data;
GtkWidget *send_icon;
@@ -375,7 +375,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
GtkWidget *progress_bar;
GtkWidget *cancel_button;
struct _send_info *info;
- char *pretty_url;
+ gchar *pretty_url;
EAccount *account;
EIterator *iter;
EMEventTargetSendReceive *target;
@@ -623,7 +623,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
}
static void
-update_folders(char *uri, struct _folder_info *info, void *data)
+update_folders(gchar *uri, struct _folder_info *info, gpointer data)
{
time_t now = *((time_t *)data);
@@ -641,7 +641,7 @@ update_folders(char *uri, struct _folder_info *info, void *data)
}
static void
-receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, void *data)
+receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, gint pc, const gchar *desc, gpointer data)
{
struct _send_info *info = data;
time_t now = time(NULL);
@@ -673,7 +673,7 @@ receive_status (CamelFilterDriver *driver, enum camel_filter_status_t status, in
/* when receive/send is complete */
static void
-receive_done (const gchar *uri, void *data)
+receive_done (const gchar *uri, gpointer data)
{
struct _send_info *info = data;
@@ -731,7 +731,7 @@ receive_done (const gchar *uri, void *data)
This can also be used to hook into which folders are being updated, and occasionally
let them refresh */
static CamelFolder *
-receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
+receive_get_folder(CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex)
{
struct _send_info *info = data;
CamelFolder *folder;
@@ -809,7 +809,7 @@ refresh_folders_desc (struct _refresh_folders_msg *m)
static void
refresh_folders_exec (struct _refresh_folders_msg *m)
{
- int i;
+ gint i;
CamelFolder *folder;
CamelException ex = CAMEL_EXCEPTION_INITIALISER;
@@ -842,7 +842,7 @@ refresh_folders_done (struct _refresh_folders_msg *m)
static void
refresh_folders_free (struct _refresh_folders_msg *m)
{
- int i;
+ gint i;
for (i=0;i<m->folders->len;i++)
g_free(m->folders->pdata[i]);
@@ -861,7 +861,7 @@ static MailMsgInfo refresh_folders_info = {
};
static gboolean
-receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *data)
+receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, gpointer data)
{
if (info) {
GPtrArray *folders = g_ptr_array_new();
@@ -887,7 +887,7 @@ receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *da
}
static void
-receive_update_got_store (char *uri, CamelStore *store, void *data)
+receive_update_got_store (gchar *uri, CamelStore *store, gpointer data)
{
struct _send_info *info = data;
@@ -962,14 +962,14 @@ mail_send_receive (void)
struct _auto_data {
EAccount *account;
- int period; /* in seconds */
- int timeout_id;
+ gint period; /* in seconds */
+ gint timeout_id;
};
static GHashTable *auto_active;
static gboolean
-auto_timeout(void *data)
+auto_timeout(gpointer data)
{
struct _auto_data *info = data;
@@ -988,7 +988,7 @@ auto_timeout(void *data)
}
static void
-auto_account_removed(EAccountList *eal, EAccount *ea, void *dummy)
+auto_account_removed(EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive");
@@ -1011,7 +1011,7 @@ auto_account_finalised(struct _auto_data *info)
static void
auto_account_commit(struct _auto_data *info)
{
- int period, check;
+ gint period, check;
check = info->account->enabled
&& e_account_get_bool(info->account, E_ACCOUNT_SOURCE_AUTO_CHECK)
@@ -1031,7 +1031,7 @@ auto_account_commit(struct _auto_data *info)
}
static void
-auto_account_added(EAccountList *eal, EAccount *ea, void *dummy)
+auto_account_added(EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info;
@@ -1042,7 +1042,7 @@ auto_account_added(EAccountList *eal, EAccount *ea, void *dummy)
}
static void
-auto_account_changed(EAccountList *eal, EAccount *ea, void *dummy)
+auto_account_changed(EAccountList *eal, EAccount *ea, gpointer dummy)
{
struct _auto_data *info = g_object_get_data((GObject *)ea, "mail-autoreceive");
@@ -1052,7 +1052,7 @@ auto_account_changed(EAccountList *eal, EAccount *ea, void *dummy)
}
static void
-auto_online(CamelObject *o, void *ed, void *d)
+auto_online(CamelObject *o, gpointer ed, gpointer d)
{
EIterator *iter;
EAccountList *accounts;
diff --git a/mail/mail-session.c b/mail/mail-session.c
index d9e34ccff4..96b4edf574 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -60,7 +60,7 @@
#define d(x)
CamelSession *session;
-static int session_check_junk_notify_id = -1;
+static gint session_check_junk_notify_id = -1;
#define MAIL_SESSION_TYPE (mail_session_get_type ())
#define MAIL_SESSION(obj) (CAMEL_CHECK_CAST((obj), MAIL_SESSION_TYPE, MailSession))
@@ -84,16 +84,16 @@ typedef struct _MailSessionClass {
static CamelSessionClass *ms_parent_class;
-static char *get_password(CamelSession *session, CamelService *service, const char *domain, const char *prompt, const char *item, guint32 flags, CamelException *ex);
-static void forget_password(CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex);
-static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel);
-static CamelFilterDriver *get_filter_driver(CamelSession *session, const char *type, CamelException *ex);
-static gboolean lookup_addressbook(CamelSession *session, const char *name);
+static gchar *get_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *prompt, const gchar *item, guint32 flags, CamelException *ex);
+static void forget_password(CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, CamelException *ex);
+static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel);
+static CamelFilterDriver *get_filter_driver(CamelSession *session, const gchar *type, CamelException *ex);
+static gboolean lookup_addressbook(CamelSession *session, const gchar *name);
-static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc);
-static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size);
+static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc);
+static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size);
static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m);
-static void ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex);
+static void ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex);
static void
init (MailSession *session)
@@ -150,10 +150,10 @@ mail_session_get_type (void)
}
-static char *
-make_key (CamelService *service, const char *item)
+static gchar *
+make_key (CamelService *service, const gchar *item)
{
- char *key;
+ gchar *key;
if (service)
key = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -165,12 +165,12 @@ make_key (CamelService *service, const char *item)
/* ********************************************************************** */
-static char *
-get_password (CamelSession *session, CamelService *service, const char *domain,
- const char *prompt, const char *item, guint32 flags, CamelException *ex)
+static gchar *
+get_password (CamelSession *session, CamelService *service, const gchar *domain,
+ const gchar *prompt, const gchar *item, guint32 flags, CamelException *ex)
{
- char *url;
- char *ret = NULL;
+ gchar *url;
+ gchar *ret = NULL;
EAccount *account = NULL;
url = service?camel_url_to_string(service->url, CAMEL_URL_HIDE_ALL):NULL;
@@ -183,7 +183,7 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
else
ret = g_strdup(url);
} else {
- char *key = make_key(service, item);
+ gchar *key = make_key(service, item);
EAccountService *config_service = NULL;
if (domain == NULL)
@@ -204,7 +204,7 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
if (!config_service || (config_service && !config_service->get_password_canceled)) {
guint32 eflags;
- char *title;
+ gchar *title;
if (flags & CAMEL_SESSION_PASSPHRASE) {
if (account)
@@ -263,9 +263,9 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
}
static void
-forget_password (CamelSession *session, CamelService *service, const char *domain, const char *item, CamelException *ex)
+forget_password (CamelSession *session, CamelService *service, const gchar *domain, const gchar *item, CamelException *ex)
{
- char *key = make_key (service, item);
+ gchar *key = make_key (service, item);
e_passwords_forget_password (domain?domain:"Mail", key);
g_free (key);
@@ -280,18 +280,18 @@ struct _user_message_msg {
MailMsg base;
CamelSessionAlertType type;
- char *prompt;
+ gchar *prompt;
EFlag *done;
- unsigned int allow_cancel:1;
- unsigned int result:1;
- unsigned int ismain:1;
+ guint allow_cancel:1;
+ guint result:1;
+ guint ismain:1;
};
static void user_message_exec (struct _user_message_msg *m);
static void
-user_message_response_free (GtkDialog *dialog, int button, struct _user_message_msg *m)
+user_message_response_free (GtkDialog *dialog, gint button, struct _user_message_msg *m)
{
gtk_widget_destroy ((GtkWidget *) dialog);
@@ -307,7 +307,7 @@ user_message_response_free (GtkDialog *dialog, int button, struct _user_message_
/* clicked, send back the reply */
static void
-user_message_response (GtkDialog *dialog, int button, struct _user_message_msg *m)
+user_message_response (GtkDialog *dialog, gint button, struct _user_message_msg *m)
{
/* if !allow_cancel, then we've already replied */
if (m->allow_cancel) {
@@ -398,7 +398,7 @@ static MailMsgInfo user_message_info = {
};
static gboolean
-lookup_addressbook(CamelSession *session, const char *name)
+lookup_addressbook(CamelSession *session, const gchar *name)
{
CamelInternetAddress *addr;
gboolean ret;
@@ -415,7 +415,7 @@ lookup_addressbook(CamelSession *session, const char *name)
}
static gboolean
-alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt, gboolean cancel)
+alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel)
{
MailSession *mail_session = MAIL_SESSION (session);
struct _user_message_msg *m;
@@ -452,13 +452,13 @@ alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt
}
static CamelFolder *
-get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
+get_folder (CamelFilterDriver *d, const gchar *uri, gpointer data, CamelException *ex)
{
return mail_tool_uri_to_folder(uri, 0, ex);
}
static void
-main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data)
+main_play_sound (CamelFilterDriver *driver, gchar *filename, gpointer user_data)
{
if (filename && *filename)
gnome_sound_play (filename);
@@ -470,7 +470,7 @@ main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data)
}
static void
-session_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data)
+session_play_sound (CamelFilterDriver *driver, const gchar *filename, gpointer user_data)
{
MailSession *ms = (MailSession *) session;
@@ -499,11 +499,11 @@ session_system_beep (CamelFilterDriver *driver, gpointer user_data)
}
static CamelFilterDriver *
-main_get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+main_get_filter_driver (CamelSession *session, const gchar *type, CamelException *ex)
{
CamelFilterDriver *driver;
FilterRule *rule = NULL;
- char *user, *system;
+ gchar *user, *system;
GConfClient *gconf;
RuleContext *fc;
@@ -523,7 +523,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
MailSession *ms = (MailSession *) session;
if (ms->filter_logfile == NULL) {
- char *filename;
+ gchar *filename;
filename = gconf_client_get_string (gconf, "/apps/evolution/mail/filters/logfile", NULL);
if (filename) {
@@ -579,7 +579,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
}
static CamelFilterDriver *
-get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+get_filter_driver (CamelSession *session, const gchar *type, CamelException *ex)
{
return (CamelFilterDriver *) mail_call_main (MAIL_CALL_p_ppp, (MailMainFunc) main_get_filter_driver,
session, type, ex);
@@ -590,7 +590,7 @@ get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
static MailMsgInfo ms_thread_info_dummy = { sizeof (MailMsg) };
-static void *ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, unsigned int size)
+static gpointer ms_thread_msg_new(CamelSession *session, CamelSessionThreadOps *ops, guint size)
{
CamelSessionThreadMsg *msg = ms_parent_class->thread_msg_new(session, ops, size);
@@ -614,14 +614,14 @@ static void ms_thread_msg_free(CamelSession *session, CamelSessionThreadMsg *m)
ms_parent_class->thread_msg_free(session, m);
}
-static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const char *text, int pc)
+static void ms_thread_status(CamelSession *session, CamelSessionThreadMsg *msg, const gchar *text, gint pc)
{
/* This should never be called since we bypass it in alloc! */
printf("Thread status '%s' %d%%\n", text, pc);
}
static void
-ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const char *address, CamelException *ex)
+ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *message, const gchar *address, CamelException *ex)
{
g_return_if_fail (session != NULL);
g_return_if_fail (message != NULL);
@@ -630,12 +630,12 @@ ms_forward_to (CamelSession *session, CamelFolder *folder, CamelMimeMessage *mes
em_utils_forward_message_raw (folder, message, address, ex);
}
-char *
-mail_session_get_password (const char *url_string)
+gchar *
+mail_session_get_password (const gchar *url_string)
{
CamelURL *url;
- char *simple_url;
- char *passwd;
+ gchar *simple_url;
+ gchar *passwd;
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -649,11 +649,11 @@ mail_session_get_password (const char *url_string)
}
void
-mail_session_add_password (const char *url_string,
- const char *passwd)
+mail_session_add_password (const gchar *url_string,
+ const gchar *passwd)
{
CamelURL *url;
- char *simple_url;
+ gchar *simple_url;
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -665,10 +665,10 @@ mail_session_add_password (const char *url_string,
}
void
-mail_session_remember_password (const char *url_string)
+mail_session_remember_password (const gchar *url_string)
{
CamelURL *url;
- char *simple_url;
+ gchar *simple_url;
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
@@ -680,7 +680,7 @@ mail_session_remember_password (const char *url_string)
}
void
-mail_session_forget_password (const char *key)
+mail_session_forget_password (const gchar *key)
{
e_passwords_forget_password ("Mail", key);
}
@@ -702,9 +702,9 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry,
}
void
-mail_session_init (const char *base_directory)
+mail_session_init (const gchar *base_directory)
{
- char *camel_dir;
+ gchar *camel_dir;
GConfClient *gconf;
if (camel_init (base_directory, TRUE) != 0)
@@ -773,8 +773,8 @@ mail_session_set_interactive (gboolean interactive)
}
void
-mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
- const char *path)
+mail_session_forget_passwords (BonoboUIComponent *uih, gpointer user_data,
+ const gchar *path)
{
e_passwords_forget_passwords ();
}
@@ -789,11 +789,11 @@ mail_session_flush_filter_log (void)
}
void
-mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plugin)
+mail_session_add_junk_plugin (const gchar *plugin_name, CamelJunkPlugin *junk_plugin)
{
MailSession *ms = (MailSession *) session;
GConfClient *gconf;
- char *def_plugin;
+ gchar *def_plugin;
gconf = mail_config_get_gconf_client ();
def_plugin = gconf_client_get_string (gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
@@ -818,7 +818,7 @@ mail_session_get_junk_plugins (void)
}
void
-mail_session_set_junk_headers (const char **name, const char **value, int len)
+mail_session_set_junk_headers (const gchar **name, const gchar **value, gint len)
{
if (!session)
return;
diff --git a/mail/mail-session.h b/mail/mail-session.h
index 60d6b9ab2a..d0595ba548 100644
--- a/mail/mail-session.h
+++ b/mail/mail-session.h
@@ -32,28 +32,28 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-void mail_session_init (const char *base_directory);
+void mail_session_init (const gchar *base_directory);
void mail_session_shutdown (void);
gboolean mail_session_get_interactive (void);
void mail_session_set_interactive (gboolean interactive);
-char *mail_session_request_dialog (const char *prompt, gboolean secret,
- const char *key, gboolean async);
-gboolean mail_session_accept_dialog (const char *prompt, const char *key,
+gchar *mail_session_request_dialog (const gchar *prompt, gboolean secret,
+ const gchar *key, gboolean async);
+gboolean mail_session_accept_dialog (const gchar *prompt, const gchar *key,
gboolean async);
-char *mail_session_get_password (const char *url);
-void mail_session_add_password (const char *url, const char *passwd);
-void mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
- const char *path);
-void mail_session_remember_password (const char *url);
+gchar *mail_session_get_password (const gchar *url);
+void mail_session_add_password (const gchar *url, const gchar *passwd);
+void mail_session_forget_passwords (BonoboUIComponent *uih, gpointer user_data,
+ const gchar *path);
+void mail_session_remember_password (const gchar *url);
-void mail_session_forget_password (const char *key);
+void mail_session_forget_password (const gchar *key);
void mail_session_flush_filter_log (void);
-void mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plugin);
+void mail_session_add_junk_plugin (const gchar *plugin_name, CamelJunkPlugin *junk_plugin);
const GList * mail_session_get_junk_plugins (void);
-void mail_session_set_junk_headers (const char **name, const char **value, int len);
+void mail_session_set_junk_headers (const gchar **name, const gchar **value, gint len);
extern CamelSession *session;
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index a256e7e107..33c47462f9 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -78,7 +78,7 @@ mail_tool_get_inbox (const gchar *url, CamelException *ex)
}
CamelFolder *
-mail_tool_get_trash (const gchar *url, int connect, CamelException *ex)
+mail_tool_get_trash (const gchar *url, gint connect, CamelException *ex)
{
CamelStore *store;
CamelFolder *trash;
@@ -103,14 +103,14 @@ mail_tool_get_trash (const gchar *url, int connect, CamelException *ex)
#ifndef G_OS_WIN32
-static char *
-mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
+static gchar *
+mail_tool_get_local_movemail_path (const guchar *uri, CamelException *ex)
{
- unsigned char *safe_uri, *c;
- char *path, *full;
+ guchar *safe_uri, *c;
+ gchar *path, *full;
struct stat st;
- safe_uri = (unsigned char *)g_strdup ((const gchar *)uri);
+ safe_uri = (guchar *)g_strdup ((const gchar *)uri);
for (c = safe_uri; *c; c++)
if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((int) *c))
*c = '_';
@@ -132,11 +132,11 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
#endif
-char *
-mail_tool_do_movemail (const char *source_url, CamelException *ex)
+gchar *
+mail_tool_do_movemail (const gchar *source_url, CamelException *ex)
{
#ifndef G_OS_WIN32
- char *dest_path;
+ gchar *dest_path;
struct stat sb;
CamelURL *uri;
@@ -154,7 +154,7 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex)
}
/* Set up our destination. */
- dest_path = mail_tool_get_local_movemail_path ((unsigned char *)source_url, ex);
+ dest_path = mail_tool_get_local_movemail_path ((guchar *)source_url, ex);
if (dest_path == NULL)
return NULL;
@@ -183,12 +183,12 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex)
#endif
}
-char *
+gchar *
mail_tool_generate_forward_subject (CamelMimeMessage *msg)
{
- const char *subject;
- char *fwd_subj;
- const int max_subject_length = 1024;
+ const gchar *subject;
+ gchar *fwd_subj;
+ const gint max_subject_length = 1024;
subject = camel_mime_message_get_subject(msg);
@@ -207,7 +207,7 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
}
} else {
const CamelInternetAddress *from;
- char *fromstr;
+ gchar *fromstr;
from = camel_mime_message_get_from (msg);
if (from) {
@@ -247,9 +247,9 @@ CamelMimePart *
mail_tool_make_message_attachment (CamelMimeMessage *message)
{
CamelMimePart *part;
- const char *subject;
+ const gchar *subject;
struct _camel_header_raw *xev;
- char *desc;
+ gchar *desc;
subject = camel_mime_message_get_subject (message);
if (subject)
@@ -276,13 +276,13 @@ mail_tool_make_message_attachment (CamelMimeMessage *message)
}
CamelFolder *
-mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
+mail_tool_uri_to_folder (const gchar *uri, guint32 flags, CamelException *ex)
{
CamelURL *url;
CamelStore *store = NULL;
CamelFolder *folder = NULL;
- int offset = 0;
- char *curi = NULL;
+ gint offset = 0;
+ gchar *curi = NULL;
g_return_val_if_fail (uri != NULL, NULL);
@@ -309,7 +309,7 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
store = (CamelStore *)camel_session_get_service(session, uri+offset, CAMEL_PROVIDER_STORE, ex);
if (store) {
- const char *name;
+ const gchar *name;
/* if we have a fragment, then the path is actually used by the store,
so the fragment is the path to the folder instead */
@@ -351,10 +351,10 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
* UIDs specified by the selection.
**/
CamelFolder *
-mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids)
+mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids)
{
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */
- char *inptr, *inend;
+ gchar *inptr, *inend;
CamelFolder *folder;
if (in == NULL)
@@ -370,7 +370,7 @@ mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **
inptr = in + strlen (in) + 1;
*uids = g_ptr_array_new ();
while (inptr < inend) {
- char *start = inptr;
+ gchar *start = inptr;
while (inptr < inend && *inptr)
inptr++;
@@ -383,11 +383,11 @@ mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **
}
/* FIXME: This should be a property on CamelFolder */
-char *
+gchar *
mail_tools_folder_to_url (CamelFolder *folder)
{
CamelURL *url;
- char *out;
+ gchar *out;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
@@ -395,7 +395,7 @@ mail_tools_folder_to_url (CamelFolder *folder)
if (((CamelService *)folder->parent_store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
camel_url_set_fragment(url, folder->full_name);
} else {
- char *name = g_alloca(strlen(folder->full_name)+2);
+ gchar *name = g_alloca(strlen(folder->full_name)+2);
sprintf(name, "/%s", folder->full_name);
camel_url_set_path(url, name);
diff --git a/mail/mail-tools.h b/mail/mail-tools.h
index 1590636e5c..11e7c87dcd 100644
--- a/mail/mail-tools.h
+++ b/mail/mail-tools.h
@@ -32,14 +32,14 @@ struct _CamelMimePart;
struct _camel_header_raw;
/* Get the "inbox" for a url (uses global session) */
-struct _CamelFolder *mail_tool_get_inbox (const char *url, struct _CamelException *ex);
+struct _CamelFolder *mail_tool_get_inbox (const gchar *url, struct _CamelException *ex);
/* Get the "trash" for a url (uses global session) */
-struct _CamelFolder *mail_tool_get_trash (const char *url, int connect, struct _CamelException *ex);
+struct _CamelFolder *mail_tool_get_trash (const gchar *url, gint connect, struct _CamelException *ex);
/* Does a camel_movemail into the local movemail folder
* and returns the path to the new movemail folder that was created. which shoudl be freed later */
-char *mail_tool_do_movemail (const char *source_url, struct _CamelException *ex);
+gchar *mail_tool_do_movemail (const gchar *source_url, struct _CamelException *ex);
struct _camel_header_raw *mail_tool_remove_xevolution_headers (struct _CamelMimeMessage *message);
void mail_tool_restore_xevolution_headers (struct _CamelMimeMessage *message, struct _camel_header_raw *);
@@ -51,12 +51,12 @@ gchar *mail_tool_generate_forward_subject (struct _CamelMimeMessage *msg);
struct _CamelMimePart *mail_tool_make_message_attachment (struct _CamelMimeMessage *message);
/* Parse the ui into a real struct _CamelFolder any way we know how. */
-struct _CamelFolder *mail_tool_uri_to_folder (const char *uri, guint32 flags, struct _CamelException *ex);
+struct _CamelFolder *mail_tool_uri_to_folder (const gchar *uri, guint32 flags, struct _CamelException *ex);
GHashTable *mail_lookup_url_table (struct _CamelMimeMessage *mime_message);
-struct _CamelFolder *mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **uids);
+struct _CamelFolder *mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids);
-char *mail_tools_folder_to_url (struct _CamelFolder *folder);
+gchar *mail_tools_folder_to_url (struct _CamelFolder *folder);
#endif
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index aab8625807..5014594a00 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -63,7 +63,7 @@ static GList *source_folders_local; /* list of source folder uri's - local ones
static GHashTable *vfolder_hash;
/* This is a slightly hacky solution to shutting down, we poll this variable in various
loops, and just quit processing if it is set. */
-static volatile int shutdown; /* are we shutting down? */
+static volatile gint shutdown; /* are we shutting down? */
/* more globals ... */
extern CamelSession *session;
@@ -78,7 +78,7 @@ struct _setup_msg {
MailMsg base;
CamelFolder *folder;
- char *query;
+ gchar *query;
GList *sources_uri;
GList *sources_folder;
};
@@ -101,13 +101,13 @@ vfolder_setup_exec (struct _setup_msg *m)
l = m->sources_uri;
while (l && !shutdown) {
- d(printf(" Adding uri: %s\n", (char *)l->data));
+ d(printf(" Adding uri: %s\n", (gchar *)l->data));
folder = mail_tool_uri_to_folder (l->data, 0, &m->base.ex);
if (folder) {
list = g_list_append(list, folder);
} else {
- g_warning("Could not open vfolder source: %s", (char *)l->data);
+ g_warning("Could not open vfolder source: %s", (gchar *)l->data);
camel_exception_clear(&m->base.ex);
}
l = l->next;
@@ -170,10 +170,10 @@ static MailMsgInfo vfolder_setup_info = {
/* sources_uri should be camel uri's */
static int
-vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList *sources_folder)
+vfolder_setup(CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder)
{
struct _setup_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&vfolder_setup_info);
m->folder = folder;
@@ -193,15 +193,15 @@ vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList
struct _adduri_msg {
MailMsg base;
- char *uri;
+ gchar *uri;
GList *folders;
- int remove;
+ gint remove;
};
static gchar *
vfolder_adduri_desc (struct _adduri_msg *m)
{
- char *euri, *desc = NULL;
+ gchar *euri, *desc = NULL;
/* Yuck yuck. Lookup the account name and use that to describe the path */
/* We really need to normalise this across all of camel and evolution :-/ */
@@ -210,13 +210,13 @@ vfolder_adduri_desc (struct _adduri_msg *m)
CamelURL *url = camel_url_new(euri, NULL);
if (url) {
- const char *loc = NULL;
+ const gchar *loc = NULL;
if (url->host && !strcmp(url->host, "local")
&& url->user && !strcmp(url->user, "local")) {
loc = _("On This Computer");
} else {
- char *uid;
+ gchar *uid;
const EAccount *account;
if (url->user == NULL)
@@ -301,10 +301,10 @@ static MailMsgInfo vfolder_adduri_info = {
/* uri should be a camel uri */
static int
-vfolder_adduri(const char *uri, GList *folders, int remove)
+vfolder_adduri(const gchar *uri, GList *folders, gint remove)
{
struct _adduri_msg *m;
- int id;
+ gint id;
m = mail_msg_new(&vfolder_adduri_info);
m->folders = folders;
@@ -320,7 +320,7 @@ vfolder_adduri(const char *uri, GList *folders, int remove)
/* ********************************************************************** */
static GList *
-mv_find_folder(GList *l, CamelStore *store, const char *uri)
+mv_find_folder(GList *l, CamelStore *store, const gchar *uri)
{
while (l) {
if (camel_store_folder_uri_equal(store, l->data, uri))
@@ -332,12 +332,12 @@ mv_find_folder(GList *l, CamelStore *store, const char *uri)
/* uri is a camel uri */
static int
-uri_is_ignore(CamelStore *store, const char *uri)
+uri_is_ignore(CamelStore *store, const gchar *uri)
{
EAccountList *accounts;
EAccount *account;
EIterator *iter;
- int found = FALSE;
+ gint found = FALSE;
d(printf("checking '%s' against:\n %s\n %s\n %s\n", uri,
mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_OUTBOX),
@@ -354,7 +354,7 @@ uri_is_ignore(CamelStore *store, const char *uri)
accounts = mail_config_get_accounts ();
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
- char *curi;
+ gchar *curi;
account = (EAccount *) e_iterator_get (iter);
@@ -385,10 +385,10 @@ uri_is_ignore(CamelStore *store, const char *uri)
/* so special we never use it */
static int
-uri_is_spethal(CamelStore *store, const char *uri)
+uri_is_spethal(CamelStore *store, const gchar *uri)
{
CamelURL *url;
- int res;
+ gint res;
/* This is a bit of a hack, but really the only way it can be done at the moment. */
@@ -420,15 +420,15 @@ uri_is_spethal(CamelStore *store, const char *uri)
/* called when a new uri becomes (un)available */
void
-mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
+mail_vfolder_add_uri(CamelStore *store, const gchar *curi, gint remove)
{
FilterRule *rule;
- const char *source;
+ const gchar *source;
CamelVeeFolder *vf;
GList *folders = NULL, *link;
- int remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0;
- int is_ignore;
- char *uri;
+ gint remote = (((CamelService *)store)->provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0;
+ gint is_ignore;
+ gchar *uri;
uri = em_uri_from_camel(curi);
if (uri_is_spethal (store, curi)) {
@@ -475,7 +475,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
rule = NULL;
while ((rule = rule_context_next_rule((RuleContext *)context, rule, NULL))) {
- int found = FALSE;
+ gint found = FALSE;
if (!rule->name) {
d(printf("invalid rule (%p): rule->name is set to NULL\n", rule));
@@ -491,7 +491,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
source = NULL;
while (!found && (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source))) {
- char *csource;
+ gchar *csource;
csource = em_uri_to_camel(source);
found = camel_store_folder_uri_equal(store, curi, csource);
d(printf(found?" '%s' == '%s'?\n":" '%s' != '%s'\n", curi, csource));
@@ -520,13 +520,13 @@ done:
/* called when a uri is deleted from a store */
void
-mail_vfolder_delete_uri(CamelStore *store, const char *curi)
+mail_vfolder_delete_uri(CamelStore *store, const gchar *curi)
{
FilterRule *rule;
- const char *source;
+ const gchar *source;
CamelVeeFolder *vf;
GString *changed;
- char *uri;
+ gchar *uri;
GList *link;
if (uri_is_spethal (store, curi))
@@ -556,7 +556,7 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi)
source = NULL;
while ((source = em_vfolder_rule_next_source ((EMVFolderRule *) rule, source))) {
- char *csource = em_uri_to_camel(source);
+ gchar *csource = em_uri_to_camel(source);
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
@@ -592,7 +592,7 @@ done:
if (changed->str[0]) {
GtkWidget *dialog;
- char *user;
+ gchar *user;
dialog = e_error_new(NULL, "mail:vfolder-updated", changed->str, uri, NULL);
em_utils_show_info_silent (dialog);
@@ -610,13 +610,13 @@ done:
/* called when a uri is renamed in a store */
void
-mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
+mail_vfolder_rename_uri(CamelStore *store, const gchar *cfrom, const gchar *cto)
{
FilterRule *rule;
- const char *source;
+ const gchar *source;
CamelVeeFolder *vf;
- int changed = 0;
- char *from, *to;
+ gint changed = 0;
+ gchar *from, *to;
d(printf("vfolder rename uri: %s to %s\n", cfrom, cto));
@@ -635,7 +635,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
source = NULL;
while ( (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source)) ) {
- char *csource = em_uri_to_camel(source);
+ gchar *csource = em_uri_to_camel(source);
/* Remove all sources that match, ignore changed events though
because the adduri call above does the work async */
@@ -661,7 +661,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
UNLOCK();
if (changed) {
- char *user;
+ gchar *user;
d(printf("Vfolders updated from renamed folder\n"));
user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
@@ -697,7 +697,7 @@ rule_add_sources(GList *l, GList **sources_folderp, GList **sources_urip)
CamelFolder *newfolder;
while (l) {
- char *curi = em_uri_to_camel(l->data);
+ gchar *curi = em_uri_to_camel(l->data);
if (mail_note_get_folder_from_uri(curi, &newfolder)) {
if (newfolder)
@@ -721,7 +721,7 @@ rule_changed(FilterRule *rule, CamelFolder *folder)
/* if the folder has changed name, then add it, then remove the old manually */
if (strcmp(folder->full_name, rule->name) != 0) {
- char *oldname;
+ gchar *oldname;
gpointer key;
gpointer oldfolder;
@@ -785,7 +785,7 @@ static void context_rule_added(RuleContext *ctx, FilterRule *rule)
static void context_rule_removed(RuleContext *ctx, FilterRule *rule)
{
- char *path;
+ gchar *path;
gpointer key, folder = NULL;
@@ -814,7 +814,7 @@ static void context_rule_removed(RuleContext *ctx, FilterRule *rule)
}
static void
-store_folder_created(CamelObject *o, void *event_data, void *data)
+store_folder_created(CamelObject *o, gpointer event_data, gpointer data)
{
CamelStore *store = (CamelStore *)o;
CamelFolderInfo *info = event_data;
@@ -824,12 +824,12 @@ store_folder_created(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_deleted(CamelObject *o, void *event_data, void *data)
+store_folder_deleted(CamelObject *o, gpointer event_data, gpointer data)
{
CamelStore *store = (CamelStore *)o;
CamelFolderInfo *info = event_data;
FilterRule *rule;
- char *user;
+ gchar *user;
d(printf("Folder deleted: %s\n", info->name));
store = store;
@@ -859,11 +859,11 @@ store_folder_deleted(CamelObject *o, void *event_data, void *data)
}
static void
-store_folder_renamed(CamelObject *o, void *event_data, void *data)
+store_folder_renamed(CamelObject *o, gpointer event_data, gpointer data)
{
CamelRenameInfo *info = event_data;
FilterRule *rule;
- char *user;
+ gchar *user;
gpointer key, folder;
@@ -908,9 +908,9 @@ vfolder_load_storage(void)
/* lock for loading storage, it is safe to call it more than once */
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
- char *user, *storeuri;
+ gchar *user, *storeuri;
FilterRule *rule;
- char *xmlfile;
+ gchar *xmlfile;
GConfClient *gconf;
pthread_mutex_lock (&lock);
@@ -982,7 +982,7 @@ vfolder_load_storage(void)
void
vfolder_revert(void)
{
- char *user;
+ gchar *user;
d(printf("vfolder_revert\n"));
user = g_strdup_printf("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
@@ -993,9 +993,9 @@ vfolder_revert(void)
static GtkWidget *vfolder_editor = NULL;
static void
-em_vfolder_editor_response (GtkWidget *dialog, int button, void *data)
+em_vfolder_editor_response (GtkWidget *dialog, gint button, gpointer data)
{
- char *user;
+ gchar *user;
user = g_strdup_printf ("%s/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
@@ -1033,10 +1033,10 @@ vfolder_edit (void)
}
static void
-edit_rule_response(GtkWidget *w, int button, void *data)
+edit_rule_response(GtkWidget *w, gint button, gpointer data)
{
if (button == GTK_RESPONSE_OK) {
- char *user;
+ gchar *user;
FilterRule *rule = g_object_get_data (G_OBJECT (w), "rule");
FilterRule *orig = g_object_get_data (G_OBJECT (w), "orig");
@@ -1050,7 +1050,7 @@ edit_rule_response(GtkWidget *w, int button, void *data)
}
void
-vfolder_edit_rule(const char *uri)
+vfolder_edit_rule(const gchar *uri)
{
GtkWidget *w;
GtkDialog *gd;
@@ -1095,10 +1095,10 @@ vfolder_edit_rule(const char *uri)
}
static void
-new_rule_clicked(GtkWidget *w, int button, void *data)
+new_rule_clicked(GtkWidget *w, gint button, gpointer data)
{
if (button == GTK_RESPONSE_OK) {
- char *user;
+ gchar *user;
FilterRule *rule = g_object_get_data((GObject *)w, "rule");
if (!filter_rule_validate(rule)) {
@@ -1123,7 +1123,7 @@ new_rule_clicked(GtkWidget *w, int button, void *data)
}
FilterPart *
-vfolder_create_part(const char *name)
+vfolder_create_part(const gchar *name)
{
return rule_context_create_part((RuleContext *)context, name);
}
@@ -1175,7 +1175,7 @@ vfolder_gui_add_rule(EMVFolderRule *rule)
}
void
-vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *source)
+vfolder_gui_add_from_message(CamelMimeMessage *msg, gint flags, const gchar *source)
{
EMVFolderRule *rule;
@@ -1189,7 +1189,7 @@ vfolder_gui_add_from_message(CamelMimeMessage *msg, int flags, const char *sourc
}
void
-vfolder_gui_add_from_address(CamelInternetAddress *addr, int flags, const char *source)
+vfolder_gui_add_from_address(CamelInternetAddress *addr, gint flags, const gchar *source)
{
EMVFolderRule *rule;
diff --git a/mail/mail-vfolder.h b/mail/mail-vfolder.h
index 002541371f..9eb1f85ac2 100644
--- a/mail/mail-vfolder.h
+++ b/mail/mail-vfolder.h
@@ -33,24 +33,24 @@ void vfolder_load_storage(void);
void vfolder_revert(void);
void vfolder_edit (void);
-void vfolder_edit_rule(const char *name);
-struct _FilterPart *vfolder_create_part (const char *name);
+void vfolder_edit_rule(const gchar *name);
+struct _FilterPart *vfolder_create_part (const gchar *name);
struct _FilterRule *vfolder_clone_rule (struct _FilterRule *in);
void vfolder_gui_add_rule (struct _EMVFolderRule *rule);
-void vfolder_gui_add_from_message (struct _CamelMimeMessage *msg, int flags, const char *source);
-void vfolder_gui_add_from_address (struct _CamelInternetAddress *addr, int flags, const char *source);
+void vfolder_gui_add_from_message (struct _CamelMimeMessage *msg, gint flags, const gchar *source);
+void vfolder_gui_add_from_address (struct _CamelInternetAddress *addr, gint flags, const gchar *source);
GList * mail_vfolder_get_sources_local (void);
GList * mail_vfolder_get_sources_remote (void);
/* add a uri that is now (un)available to vfolders in a transient manner */
-void mail_vfolder_add_uri(struct _CamelStore *store, const char *uri, int remove);
+void mail_vfolder_add_uri(struct _CamelStore *store, const gchar *uri, gint remove);
/* note that a folder has changed name (uri) */
-void mail_vfolder_rename_uri(struct _CamelStore *store, const char *from, const char *to);
+void mail_vfolder_rename_uri(struct _CamelStore *store, const gchar *from, const gchar *to);
/* remove a uri that should be removed from vfolders permanently */
-void mail_vfolder_delete_uri(struct _CamelStore *store, const char *uri);
+void mail_vfolder_delete_uri(struct _CamelStore *store, const gchar *uri);
/* close up, clean up */
void mail_vfolder_shutdown (void);
diff --git a/mail/message-list.c b/mail/message-list.c
index 09f080cae0..a5a344f4e5 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -100,7 +100,7 @@
struct _MLSelection {
GPtrArray *uids;
CamelFolder *folder;
- char *folder_uri;
+ gchar *folder_uri;
};
struct _MessageListPrivate {
@@ -178,7 +178,7 @@ enum {
#ifdef SMART_ADDRESS_COMPARE
struct _EMailAddress {
ENameWestern *wname;
- char *address;
+ gchar *address;
};
typedef struct _EMailAddress EMailAddress;
@@ -186,11 +186,11 @@ typedef struct _EMailAddress EMailAddress;
G_DEFINE_TYPE (MessageList, message_list, E_TREE_SCROLLED_TYPE)
-static void on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data);
+static void on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data);
static void on_selection_changed_cmd(ETree *tree, MessageList *ml);
static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list);
-static char *filter_date (time_t date);
-static char *filter_size (int size);
+static gchar *filter_date (time_t date);
+static gchar *filter_size (gint size);
static void folder_changed (CamelObject *o, gpointer event_data, gpointer user_data);
@@ -198,11 +198,11 @@ static void save_hide_state(MessageList *ml);
static void load_hide_state(MessageList *ml);
/* note: @changes is owned/freed by the caller */
-/*static void mail_do_regenerate_messagelist (MessageList *list, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);*/
-static void mail_regen_list(MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes);
+/*static void mail_do_regenerate_messagelist (MessageList *list, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);*/
+static void mail_regen_list(MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes);
static void mail_regen_cancel(MessageList *ml);
-static void clear_info(char *key, ETreePath *node, MessageList *ml);
+static void clear_info(gchar *key, ETreePath *node, MessageList *ml);
enum {
MESSAGE_SELECTED,
@@ -243,11 +243,11 @@ static gboolean junk_folder = TRUE;
#ifdef SMART_ADDRESS_COMPARE
static EMailAddress *
-e_mail_address_new (const char *address)
+e_mail_address_new (const gchar *address)
{
CamelInternetAddress *cia;
EMailAddress *new;
- const char *name = NULL, *addr = NULL;
+ const gchar *name = NULL, *addr = NULL;
cia = camel_internet_address_new ();
if (camel_address_unformat (CAMEL_ADDRESS (cia), address) == -1) {
@@ -288,7 +288,7 @@ e_mail_address_compare (gconstpointer address1, gconstpointer address2)
{
const EMailAddress *addr1 = address1;
const EMailAddress *addr2 = address2;
- int retval;
+ gint retval;
g_return_val_if_fail (addr1 != NULL, 1);
g_return_val_if_fail (addr2 != NULL, -1);
@@ -351,7 +351,7 @@ address_compare (gconstpointer address1, gconstpointer address2)
#ifdef SMART_ADDRESS_COMPARE
EMailAddress *addr1, *addr2;
#endif /* SMART_ADDRESS_COMPARE */
- int retval;
+ gint retval;
g_return_val_if_fail (address1 != NULL, 1);
g_return_val_if_fail (address2 != NULL, -1);
@@ -363,13 +363,13 @@ address_compare (gconstpointer address1, gconstpointer address2)
e_mail_address_free (addr1);
e_mail_address_free (addr2);
#else
- retval = strcmp ((char *) address1, (char *) address2);
+ retval = strcmp ((gchar *) address1, (gchar *) address2);
#endif /* SMART_ADDRESS_COMPARE */
return retval;
}
-static char *
+static gchar *
filter_size (gint size)
{
gfloat fsize;
@@ -388,7 +388,7 @@ filter_size (gint size)
}
/* Gets the uid of the message displayed at a given view row */
-static const char *
+static const gchar *
get_message_uid (MessageList *message_list, ETreePath node)
{
CamelMessageInfo *info;
@@ -416,13 +416,13 @@ get_message_info (MessageList *message_list, ETreePath node)
return info;
}
-static const char *
-get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int col)
+static const gchar *
+get_normalised_string (MessageList *message_list, CamelMessageInfo *info, gint col)
{
- const char *string, *str;
- char *normalised;
+ const gchar *string, *str;
+ gchar *normalised;
EPoolv *poolv;
- int index;
+ gint index;
switch (col) {
case COL_SUBJECT_NORM:
@@ -450,7 +450,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
poolv = g_hash_table_lookup (message_list->normalised_hash, camel_message_info_uid (info));
if (poolv == NULL) {
poolv = e_poolv_new (NORMALISED_LAST);
- g_hash_table_insert (message_list->normalised_hash, (char *) camel_message_info_uid (info), poolv);
+ g_hash_table_insert (message_list->normalised_hash, (gchar *) camel_message_info_uid (info), poolv);
} else {
str = e_poolv_get (poolv, index);
if (*str)
@@ -458,10 +458,10 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
}
if (col == COL_SUBJECT_NORM) {
- const unsigned char *subject;
+ const guchar *subject;
- subject = (const unsigned char *) string;
- while (!g_ascii_strncasecmp ((char *)subject, "Re:", 3)) {
+ subject = (const guchar *) string;
+ while (!g_ascii_strncasecmp ((gchar *)subject, "Re:", 3)) {
subject += 3;
/* jump over any spaces */
@@ -473,7 +473,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
while (*subject && isspace ((int) *subject))
subject++;
- string = (const char *) subject;
+ string = (const gchar *) subject;
normalised = g_utf8_collate_key (string, -1);
} else {
/* because addresses require strings, not collate keys */
@@ -501,10 +501,10 @@ clear_selection(MessageList *ml, struct _MLSelection *selection)
}
static ETreePath
-ml_search_forward(MessageList *ml, int start, int end, guint32 flags, guint32 mask)
+ml_search_forward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
{
ETreePath path;
- int row;
+ gint row;
CamelMessageInfo *info;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
@@ -520,10 +520,10 @@ ml_search_forward(MessageList *ml, int start, int end, guint32 flags, guint32 ma
}
static ETreePath
-ml_search_backward(MessageList *ml, int start, int end, guint32 flags, guint32 mask)
+ml_search_backward(MessageList *ml, gint start, gint end, guint32 flags, guint32 mask)
{
ETreePath path;
- int row;
+ gint row;
CamelMessageInfo *info;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
@@ -542,7 +542,7 @@ static ETreePath
ml_search_path(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
{
ETreePath node;
- int row, count;
+ gint row, count;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
if (ml->cursor_uid == NULL
@@ -639,7 +639,7 @@ message_list_can_select(MessageList *ml, MessageListSelectDirection direction, g
* Selects the message with the given UID.
**/
void
-message_list_select_uid (MessageList *message_list, const char *uid)
+message_list_select_uid (MessageList *message_list, const gchar *uid)
{
ETreePath node;
@@ -667,7 +667,7 @@ message_list_select_next_thread (MessageList *ml)
{
ETreePath node;
ETreeTableAdapter *etta = e_tree_get_table_adapter(ml->tree);
- int i, count, row;
+ gint i, count, row;
if (!ml->cursor_uid
|| (node = g_hash_table_lookup(ml->uid_nodemap, ml->cursor_uid)) == NULL)
@@ -818,7 +818,7 @@ message_list_copy(MessageList *ml, gboolean cut)
if (uids->len > 0) {
if (cut) {
- int i;
+ gint i;
camel_folder_freeze(ml->folder);
for (i=0;i<uids->len;i++)
@@ -852,7 +852,7 @@ message_list_paste(MessageList *ml)
* SimpleTableModel::col_count
*/
static int
-ml_column_count (ETreeModel *etm, void *data)
+ml_column_count (ETreeModel *etm, gpointer data)
{
return COL_LAST;
}
@@ -861,7 +861,7 @@ ml_column_count (ETreeModel *etm, void *data)
* SimpleTableModel::has_save_id
*/
static gboolean
-ml_has_save_id (ETreeModel *etm, void *data)
+ml_has_save_id (ETreeModel *etm, gpointer data)
{
return TRUE;
}
@@ -869,8 +869,8 @@ ml_has_save_id (ETreeModel *etm, void *data)
/*
* SimpleTableModel::get_save_id
*/
-static char *
-ml_get_save_id (ETreeModel *etm, ETreePath path, void *data)
+static gchar *
+ml_get_save_id (ETreeModel *etm, ETreePath path, gpointer data)
{
CamelMessageInfo *info;
@@ -890,7 +890,7 @@ ml_get_save_id (ETreeModel *etm, ETreePath path, void *data)
* SimpleTableModel::has_save_id
*/
static gboolean
-ml_has_get_node_by_id (ETreeModel *etm, void *data)
+ml_has_get_node_by_id (ETreeModel *etm, gpointer data)
{
return TRUE;
}
@@ -899,7 +899,7 @@ ml_has_get_node_by_id (ETreeModel *etm, void *data)
* SimpleTableModel::get_save_id
*/
static ETreePath
-ml_get_node_by_id (ETreeModel *etm, const char *save_id, void *data)
+ml_get_node_by_id (ETreeModel *etm, const gchar *save_id, gpointer data)
{
MessageList *ml;
@@ -911,8 +911,8 @@ ml_get_node_by_id (ETreeModel *etm, const char *save_id, void *data)
return g_hash_table_lookup(ml->uid_nodemap, save_id);
}
-static void *
-ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
+static gpointer
+ml_duplicate_value (ETreeModel *etm, gint col, gconstpointer value, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -926,7 +926,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
case COL_SIZE:
case COL_FOLLOWUP_FLAG_STATUS:
case COL_FOLLOWUP_DUE_BY:
- return (void *) value;
+ return (gpointer) value;
case COL_FROM:
case COL_SUBJECT:
@@ -946,7 +946,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
}
static void
-ml_free_value (ETreeModel *etm, int col, void *value, void *data)
+ml_free_value (ETreeModel *etm, gint col, gpointer value, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -979,8 +979,8 @@ ml_free_value (ETreeModel *etm, int col, void *value, void *data)
}
}
-static void *
-ml_initialize_value (ETreeModel *etm, int col, void *data)
+static gpointer
+ml_initialize_value (ETreeModel *etm, gint col, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -1015,7 +1015,7 @@ ml_initialize_value (ETreeModel *etm, int col, void *data)
}
static gboolean
-ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
+ml_value_is_empty (ETreeModel *etm, gint col, gconstpointer value, gpointer data)
{
switch (col){
case COL_MESSAGE_STATUS:
@@ -1041,14 +1041,14 @@ ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
case COL_MIXED_SENDER:
case COL_MIXED_RECIPIENTS:
case COL_LABELS:
- return !(value && *(char *)value);
+ return !(value && *(gchar *)value);
default:
g_warning ("This shouldn't be reached\n");
return FALSE;
}
}
-static const char *status_map[] = {
+static const gchar *status_map[] = {
N_("Unseen"),
N_("Seen"),
N_("Answered"),
@@ -1057,7 +1057,7 @@ static const char *status_map[] = {
N_("Multiple Messages"),
};
-static const char *score_map[] = {
+static const gchar *score_map[] = {
N_("Lowest"),
N_("Lower"),
N_("Low"),
@@ -1068,10 +1068,10 @@ static const char *score_map[] = {
};
-static char *
-ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
+static gchar *
+ml_value_to_string (ETreeModel *etm, gint col, gconstpointer value, gpointer data)
{
- unsigned int i;
+ guint i;
switch (col){
case COL_MESSAGE_STATUS:
@@ -1119,7 +1119,7 @@ ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
}
static GdkPixbuf *
-ml_tree_icon_at (ETreeModel *etm, ETreePath path, void *model_data)
+ml_tree_icon_at (ETreeModel *etm, ETreePath path, gpointer model_data)
{
/* we dont really need an icon ... */
return NULL;
@@ -1148,7 +1148,7 @@ subtree_unread(MessageList *ml, ETreePath node)
}
static time_t
-subtree_latest(MessageList *ml, ETreePath node, int sent)
+subtree_latest(MessageList *ml, ETreePath node, gint sent)
{
CamelMessageInfo *info;
time_t latest = 0, date;
@@ -1185,8 +1185,8 @@ sanitize_recipients (const gchar *string)
gboolean quoted = FALSE;
const gchar *p;
GString *recipients = g_string_new ("");
- char *single_add;
- char **name;
+ gchar *single_add;
+ gchar **name;
if (!string || !*string)
return (gchar *) "";
@@ -1222,11 +1222,11 @@ sanitize_recipients (const gchar *string)
}
static int
-get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags)
+get_all_labels (CamelMessageInfo *msg_info, gchar **label_str, gboolean get_tags)
{
GString *str;
- const char *old_label;
- int count = 0;
+ const gchar *old_label;
+ gint count = 0;
const CamelFlag *flag;
GSList *labels;
@@ -1234,7 +1234,7 @@ get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags)
str = g_string_new ("");
for (flag = camel_message_info_user_flags (msg_info); flag; flag = flag->next) {
- const char *name = e_util_labels_get_name (labels, flag->name);
+ const gchar *name = e_util_labels_get_name (labels, flag->name);
if (name) {
if (str->len)
@@ -1251,7 +1251,7 @@ get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags)
old_label = e_util_labels_get_new_tag (camel_message_info_user_tag (msg_info, "label"));
if (old_label != NULL) {
- const char *name = NULL;
+ const gchar *name = NULL;
if (str->len)
g_string_append (str, ", ");
@@ -1268,12 +1268,12 @@ get_all_labels (CamelMessageInfo *msg_info, char **label_str, gboolean get_tags)
return count;
}
-static const char *
+static const gchar *
get_trimmed_subject (CamelMessageInfo *info)
{
- const char *subject;
- const char *mlist;
- int mlist_len = 0;
+ const gchar *subject;
+ const gchar *mlist;
+ gint mlist_len = 0;
gboolean found_mlist;
subject = camel_message_info_subject (info);
@@ -1283,7 +1283,7 @@ get_trimmed_subject (CamelMessageInfo *info)
mlist = camel_message_info_mlist (info);
if (mlist && *mlist) {
- const char *mlist_end;
+ const gchar *mlist_end;
mlist_end = strchr (mlist, '@');
if (mlist_end)
@@ -1295,7 +1295,7 @@ get_trimmed_subject (CamelMessageInfo *info)
do {
found_mlist = FALSE;
- while (!g_ascii_strncasecmp ((char *) subject, "Re:", 3)) {
+ while (!g_ascii_strncasecmp ((gchar *) subject, "Re:", 3)) {
subject += 3;
/* jump over any spaces */
@@ -1305,7 +1305,7 @@ get_trimmed_subject (CamelMessageInfo *info)
if (mlist_len &&
*subject == '[' &&
- !g_ascii_strncasecmp ((char *) subject + 1, mlist, mlist_len) &&
+ !g_ascii_strncasecmp ((gchar *) subject + 1, mlist, mlist_len) &&
subject [1 + mlist_len] == ']') {
subject += 1 + mlist_len + 1; /* jump over "[mailing-list]" */
found_mlist = TRUE;
@@ -1323,14 +1323,14 @@ get_trimmed_subject (CamelMessageInfo *info)
return subject;
}
-static void *
-ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
+static gpointer
+ml_tree_value_at (ETreeModel *etm, ETreePath path, gint col, gpointer model_data)
{
MessageList *message_list = model_data;
CamelMessageInfo *msg_info;
CamelException ex;
- const char *str;
+ const gchar *str;
guint32 flags;
camel_exception_init (&ex);
@@ -1356,8 +1356,8 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
case COL_FLAGGED:
return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_FLAGGED) != 0);
case COL_SCORE: {
- const char *tag;
- int score = 0;
+ const gchar *tag;
+ gint score = 0;
tag = camel_message_info_user_tag(msg_info, "score");
if (tag)
@@ -1366,7 +1366,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER (score);
}
case COL_FOLLOWUP_FLAG_STATUS: {
- const char *tag, *cmp;
+ const gchar *tag, *cmp;
/* FIXME: this all should be methods off of message-tag-followup class,
FIXME: the tag names should be namespaced :( */
@@ -1381,7 +1381,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER(0);
}
case COL_FOLLOWUP_DUE_BY: {
- const char *tag;
+ const gchar *tag;
time_t due_by;
tag = camel_message_info_user_tag(msg_info, "due-by");
@@ -1394,24 +1394,24 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
case COL_FOLLOWUP_FLAG:
str = camel_message_info_user_tag(msg_info, "follow-up");
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_ATTACHMENT:
if (camel_message_info_user_flag (msg_info, "$has_cal"))
return GINT_TO_POINTER (2);
return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_ATTACHMENTS) != 0);
case COL_FROM:
str = camel_message_info_from (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_FROM_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
+ return (gpointer) get_normalised_string (message_list, msg_info, col);
case COL_SUBJECT:
str = camel_message_info_subject (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_SUBJECT_TRIMMED:
str = get_trimmed_subject (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_SUBJECT_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
+ return (gpointer) get_normalised_string (message_list, msg_info, col);
case COL_SENT: {
ETreePath child;
@@ -1433,9 +1433,9 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
case COL_TO:
str = camel_message_info_to (msg_info);
- return (void *)(str ? str : "");
+ return (gpointer)(str ? str : "");
case COL_TO_NORM:
- return (void *) get_normalised_string (message_list, msg_info, col);
+ return (gpointer) get_normalised_string (message_list, msg_info, col);
case COL_SIZE:
return GINT_TO_POINTER (camel_message_info_size(msg_info));
case COL_DELETED:
@@ -1453,9 +1453,9 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER (!(flags & CAMEL_MESSAGE_SEEN));
}
case COL_COLOUR: {
- const char *colour, *due_by, *completed, *followup;
- char *labels_string = NULL;
- int n;
+ const gchar *colour, *due_by, *completed, *followup;
+ gchar *labels_string = NULL;
+ gint n;
/* Priority: colour tag; label tag; important flag; due-by tag */
@@ -1485,15 +1485,15 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
g_free (labels_string);
- return (void *) colour;
+ return (gpointer) colour;
}
case COL_LOCATION: {
/* Fixme : freeing memory stuff (mem leaks) */
CamelFolder *folder;
CamelURL *curl;
EAccount *account;
- char *location = NULL;
- char *euri, *url;
+ gchar *location = NULL;
+ gchar *euri, *url;
if (CAMEL_IS_VEE_FOLDER(message_list->folder)) {
folder = camel_vee_folder_get_location((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL);
@@ -1532,34 +1532,34 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
case COL_MIXED_SENDER:
case COL_SENDER:{
- char **sender_name = NULL;
+ gchar **sender_name = NULL;
str = camel_message_info_from (msg_info);
if(str && str[0] != '\0'){
- char *res;
+ gchar *res;
sender_name = g_strsplit (str,"<",2);
res = g_strdup (*sender_name);
g_strfreev (sender_name);
- return (void *)(res);
+ return (gpointer)(res);
}
else
- return (void *)("");
+ return (gpointer)("");
}
case COL_LABELS:{
- char *str = NULL;
+ gchar *str = NULL;
GString *cleansed_str;
cleansed_str = g_string_new ("");
if (get_all_labels (msg_info, &str, FALSE)) {
- int i;
+ gint i;
for (i = 0; str[i] != '\0'; ++i) {
if (str[i] != '_') {
g_string_append_c (cleansed_str, str[i]);
}
}
- return (void *) (g_string_free (cleansed_str, FALSE));
+ return (gpointer) (g_string_free (cleansed_str, FALSE));
} else
- return (void *) ("");
+ return (gpointer) ("");
}
default:
g_warning ("This shouldn't be reached\n");
@@ -1567,8 +1567,8 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
}
-static void *
-ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
+static gpointer
+ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, gint col, gpointer model_data)
{
MessageList *message_list = model_data;
CamelMessageInfo *msg_info;
@@ -1612,14 +1612,14 @@ ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, int col, void *model_dat
}
static void
-ml_tree_set_value_at (ETreeModel *etm, ETreePath path, int col,
- const void *val, void *model_data)
+ml_tree_set_value_at (ETreeModel *etm, ETreePath path, gint col,
+ gconstpointer val, gpointer model_data)
{
g_warning ("This shouldn't be reached\n");
}
static gboolean
-ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, int col, void *model_data)
+ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, gint col, gpointer model_data)
{
return FALSE;
}
@@ -1627,7 +1627,7 @@ ml_tree_is_cell_editable (ETreeModel *etm, ETreePath path, int col, void *model_
static void
message_list_init_images (void)
{
- int i;
+ gint i;
/*
* Only load once, and share
@@ -1639,17 +1639,17 @@ message_list_init_images (void)
if (states_pixmaps[i].icon_name)
states_pixmaps[i].pixbuf = e_icon_factory_get_icon (states_pixmaps[i].icon_name, GTK_ICON_SIZE_MENU);
else
- states_pixmaps[i].pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) empty_xpm);
+ states_pixmaps[i].pixbuf = gdk_pixbuf_new_from_xpm_data ((const gchar **) empty_xpm);
}
}
-static char *
+static gchar *
filter_date (time_t date)
{
time_t nowdate = time(NULL);
time_t yesdate;
struct tm then, now, yesterday;
- char buf[26];
+ gchar buf[26];
gboolean done = FALSE;
if (date == 0)
@@ -1674,7 +1674,7 @@ filter_date (time_t date)
}
}
if (!done) {
- int i;
+ gint i;
for (i = 2; i < 7; i++) {
yesdate = nowdate - 60 * 60 * 24 * i;
localtime_r (&yesdate, &yesterday);
@@ -1705,15 +1705,15 @@ filter_date (time_t date)
return g_strdup (buf);
}
-static ECell * create_composite_cell (int col)
+static ECell * create_composite_cell (gint col)
{
ECell *cell_vbox, *cell_hbox, *cell_sub, *cell_date, *cell_from, *cell_tree, *cell_attach;
GdkPixbuf *images [7];
GConfClient *gconf;
- char *fixed_name = NULL;
+ gchar *fixed_name = NULL;
gboolean show_email;
- int i;
- int alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS;
+ gint i;
+ gint alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS;
gboolean same_font = FALSE;
gconf = mail_config_get_gconf_client ();
@@ -1765,7 +1765,7 @@ static ECell * create_composite_cell (int col)
}
static void
-composite_cell_set_strike_col (ECell *cell, int col)
+composite_cell_set_strike_col (ECell *cell, gint col)
{
g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_date")), "strikeout_column", col, NULL);
g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_from")), "strikeout_column", col, NULL);
@@ -1774,7 +1774,7 @@ composite_cell_set_strike_col (ECell *cell, int col)
static ETableExtras *
message_list_create_extras (void)
{
- int i;
+ gint i;
GdkPixbuf *images [7];
ETableExtras *extras;
ECell *cell;
@@ -1852,7 +1852,7 @@ message_list_create_extras (void)
static void
save_tree_state(MessageList *ml)
{
- char *filename;
+ gchar *filename;
if (ml->folder == NULL || ml->tree == NULL)
return;
@@ -1873,7 +1873,7 @@ load_tree_state (MessageList *ml, xmlDoc *expand_state)
if (expand_state) {
e_tree_load_expanded_state_xml (ml->tree, expand_state);
} else {
- char *filename;
+ gchar *filename;
filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-");
e_tree_load_expanded_state (ml->tree, filename);
@@ -1896,9 +1896,9 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing)
/* build the spec based on the folder, and possibly from a saved file */
/* otherwise, leave default */
if (message_list->folder) {
- char *path;
- char *name;
- int data = 1;
+ gchar *path;
+ gchar *name;
+ gint data = 1;
struct stat st;
ETableItem *item = e_tree_get_item (message_list->tree);
@@ -1965,7 +1965,7 @@ ml_selection_received(GtkWidget *widget, GtkSelectionData *data, guint time, Mes
}
static void
-ml_tree_drag_data_get (ETree *tree, int row, ETreePath path, int col,
+ml_tree_drag_data_get (ETree *tree, gint row, ETreePath path, gint col,
GdkDragContext *context, GtkSelectionData *data,
guint info, guint time, MessageList *ml)
{
@@ -2002,9 +2002,9 @@ struct _drop_msg {
guint32 action;
guint info;
- unsigned int move:1;
- unsigned int moved:1;
- unsigned int aborted:1;
+ guint move:1;
+ guint moved:1;
+ guint aborted:1;
};
static gchar *
@@ -2075,7 +2075,7 @@ ml_drop_action(struct _drop_msg *m)
}
static void
-ml_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
+ml_drop_popup_copy(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _drop_msg *m = data;
@@ -2084,7 +2084,7 @@ ml_drop_popup_copy(EPopup *ep, EPopupItem *item, void *data)
}
static void
-ml_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
+ml_drop_popup_move(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _drop_msg *m = data;
@@ -2093,7 +2093,7 @@ ml_drop_popup_move(EPopup *ep, EPopupItem *item, void *data)
}
static void
-ml_drop_popup_cancel(EPopup *ep, EPopupItem *item, void *data)
+ml_drop_popup_cancel(EPopup *ep, EPopupItem *item, gpointer data)
{
struct _drop_msg *m = data;
@@ -2109,7 +2109,7 @@ static EPopupItem ml_drop_popup_menu[] = {
};
static void
-ml_drop_popup_free(EPopup *ep, GSList *items, void *data)
+ml_drop_popup_free(EPopup *ep, GSList *items, gpointer data)
{
g_slist_free(items);
@@ -2117,7 +2117,7 @@ ml_drop_popup_free(EPopup *ep, GSList *items, void *data)
}
static void
-ml_tree_drag_data_received (ETree *tree, int row, ETreePath path, int col,
+ml_tree_drag_data_received (ETree *tree, gint row, ETreePath path, gint col,
GdkDragContext *context, gint x, gint y,
GtkSelectionData *data, guint info,
guint time, MessageList *ml)
@@ -2146,7 +2146,7 @@ ml_tree_drag_data_received (ETree *tree, int row, ETreePath path, int col,
EMPopup *emp;
GSList *menus = NULL;
GtkMenu *menu;
- int i;
+ gint i;
emp = em_popup_new("org.gnome.mail.messagelist.popup.drop");
for (i=0;i<sizeof(ml_drop_popup_menu)/sizeof(ml_drop_popup_menu[0]);i++)
@@ -2205,11 +2205,11 @@ ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint
}
for (targets = context->targets; targets; targets = targets->next) {
- int i;
+ gint i;
d(printf("atom drop '%s'\n", gdk_atom_name(targets->data)));
for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++)
- if (targets->data == (void *)ml_drag_info[i].atom)
+ if (targets->data == (gpointer)ml_drag_info[i].atom)
actions |= ml_drag_info[i].actions;
}
d(printf("\n"));
@@ -2233,7 +2233,7 @@ ml_scrolled (GtkAdjustment *adj, MessageList *ml)
}
static void
-on_model_row_changed (ETableModel *model, int row, MessageList *ml)
+on_model_row_changed (ETableModel *model, gint row, MessageList *ml)
{
ml->priv->any_row_changed = TRUE;
}
@@ -2401,7 +2401,7 @@ message_list_class_init (MessageListClass *message_list_class)
{
GObjectClass *object_class = (GObjectClass *) message_list_class;
GtkObjectClass *gtkobject_class = (GtkObjectClass *) message_list_class;
- int i;
+ gint i;
for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++)
ml_drag_info[i].atom = gdk_atom_intern(ml_drag_info[i].target, FALSE);
@@ -2443,7 +2443,7 @@ message_list_class_init (MessageListClass *message_list_class)
}
static gboolean
-read_boolean_with_default (GConfClient *gconf, const char *key, gboolean def_value)
+read_boolean_with_default (GConfClient *gconf, const gchar *key, gboolean def_value)
{
GConfValue *value;
gboolean res;
@@ -2466,7 +2466,7 @@ message_list_construct (MessageList *message_list)
{
AtkObject *a11y;
gboolean construct_failed;
- char *etspecfile;
+ gchar *etspecfile;
GConfClient *gconf = mail_config_get_gconf_client ();
message_list->model =
@@ -2574,7 +2574,7 @@ message_list_new (void)
}
static void
-clear_info(char *key, ETreePath *node, MessageList *ml)
+clear_info(gchar *key, ETreePath *node, MessageList *ml)
{
CamelMessageInfo *info;
@@ -2671,13 +2671,13 @@ is_node_selectable (MessageList *ml, CamelMessageInfo *info)
/* We try and find something that is selectable in our tree. There is
* actually no assurance that we'll find something that will still be
* there next time, but its probably going to work most of the time. */
-static char *
+static gchar *
find_next_selectable (MessageList *ml)
{
ETreePath node;
- int last;
- int vrow_orig;
- int vrow;
+ gint last;
+ gint vrow_orig;
+ gint vrow;
ETree *et = ml->tree;
CamelMessageInfo *info;
@@ -2725,19 +2725,19 @@ find_next_selectable (MessageList *ml)
#define BROKEN_ETREE /* avoid some broken code in etree(?) by not using the incremental update */
-static void build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row);
+static void build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint *row);
-static void build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row);
+static void build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row);
static void
build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *changes)
{
- int row = 0;
+ gint row = 0;
ETreeModel *etm = ml->model;
#ifndef BROKEN_ETREE
ETreePath *top;
#endif
- char *saveuid = NULL;
+ gchar *saveuid = NULL;
#ifdef BROKEN_ETREE
GPtrArray *selected;
#endif
@@ -2779,7 +2779,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
message_list_free_uids(ml, selected);
#else
} else {
- static int tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp);
+ static gint tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp);
build_subtree_diff(ml, ml->tree_root, top, thread->tree, &row);
top = e_tree_model_node_get_first_child(etm, ml->tree_root);
@@ -2815,7 +2815,7 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
is faster than inserting to the right row :( */
/* Otherwise, this code would probably go as it does the same thing essentially */
static void
-build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int *row)
+build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, gint *row)
{
ETreeModel *tree = ml->model;
ETreePath node;
@@ -2828,8 +2828,8 @@ build_subtree (MessageList *ml, ETreePath parent, CamelFolderThreadNode *c, int
continue;
}
- node = e_tree_memory_node_insert(E_TREE_MEMORY(tree), parent, -1, (void *)c->message);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node);
+ node = e_tree_memory_node_insert(E_TREE_MEMORY(tree), parent, -1, (gpointer)c->message);
+ g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(c->message), node);
camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message);
if (c->child) {
@@ -2897,7 +2897,7 @@ tree_equal(ETreeModel *etm, ETreePath ap, CamelFolderThreadNode *bp)
/* adds a single node, retains save state, and handles adding children if required */
static void
-add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row, int myrow)
+add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row, gint myrow)
{
ETreeModel *etm = ml->model;
ETreePath node;
@@ -2906,8 +2906,8 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre
/* we just update the hashtable key, umm, does this leak the info on the message node? */
g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(c->message));
- node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (void *)c->message);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(c->message), node);
+ node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (gpointer)c->message);
+ g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(c->message), node);
camel_folder_ref_message_info(ml->folder, (CamelMessageInfo *)c->message);
(*row)++;
@@ -2918,13 +2918,13 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre
/* removes node, children recursively and all associated data */
static void
-remove_node_diff(MessageList *ml, ETreePath node, int depth)
+remove_node_diff(MessageList *ml, ETreePath node, gint depth)
{
ETreeModel *etm = ml->model;
ETreePath cp, cn;
CamelMessageInfo *info;
- t(printf("Removing node: %s\n", (char *)e_tree_memory_node_get_data(etm, node)));
+ t(printf("Removing node: %s\n", (gchar *)e_tree_memory_node_get_data(etm, node)));
/* we depth-first remove all node data's ... */
cp = e_tree_model_node_get_first_child(etm, node);
@@ -2949,12 +2949,12 @@ remove_node_diff(MessageList *ml, ETreePath node, int depth)
/* applies a new tree structure to an existing tree, but only by changing things
that have changed */
static void
-build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, int *row)
+build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThreadNode *c, gint *row)
{
ETreeModel *etm = ml->model;
ETreePath ap, *ai, *at, *tmp;
CamelFolderThreadNode *bp, *bi, *bt;
- int i, j, myrow = 0;
+ gint i, j, myrow = 0;
ap = path;
bp = c;
@@ -2982,7 +2982,7 @@ build_subtree_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolde
/* if this is a message row, check/update the row id map */
if (g_hash_table_lookup_extended(ml->uid_rowmap, camel_message_info_uid(bp->message), &olduid, &oldrow)) {
if ((int)oldrow != (*row)) {
- g_hash_table_insert(ml->uid_rowmap, olduid, (void *)(*row));
+ g_hash_table_insert(ml->uid_rowmap, olduid, (gpointer)(*row));
}
} else {
g_warning("Cannot find uid %s in table?", camel_message_info_uid(bp->message));
@@ -3065,8 +3065,8 @@ static void
build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
{
ETreeModel *etm = ml->model;
- char *saveuid = NULL;
- int i;
+ gchar *saveuid = NULL;
+ gint i;
#ifdef BROKEN_ETREE
GPtrArray *selected;
#endif
@@ -3095,7 +3095,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
CamelMessageInfo *info = summary->pdata[i];
node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), ml->tree_root, -1, info);
- g_hash_table_insert(ml->uid_nodemap, (void *)camel_message_info_uid(info), node);
+ g_hash_table_insert(ml->uid_nodemap, (gpointer)camel_message_info_uid(info), node);
camel_folder_ref_message_info(ml->folder, info);
}
e_tree_memory_thaw(E_TREE_MEMORY(etm));
@@ -3148,7 +3148,7 @@ message_list_change_first_visible_parent (MessageList *ml, ETreePath node)
static void
build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
{
- int i;
+ gint i;
ETreePath node;
CamelMessageInfo *info;
@@ -3178,9 +3178,9 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
for (i=0;i<changes->uid_added->len;i++) {
info = camel_folder_get_message_info (ml->folder, changes->uid_added->pdata[i]);
if (info) {
- d(printf(" %s\n", (char *)changes->uid_added->pdata[i]));
+ d(printf(" %s\n", (gchar *)changes->uid_added->pdata[i]));
node = e_tree_memory_node_insert (E_TREE_MEMORY (ml->model), ml->tree_root, -1, info);
- g_hash_table_insert (ml->uid_nodemap, (void *)camel_message_info_uid (info), node);
+ g_hash_table_insert (ml->uid_nodemap, (gpointer)camel_message_info_uid (info), node);
}
}
@@ -3208,11 +3208,11 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
static void
-mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, int flag)
+mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChangeInfo **changes, gint flag)
{
CamelFolderChangeInfo *newchanges, *oldchanges = *changes;
CamelMessageInfo *info;
- int i;
+ gint i;
newchanges = camel_folder_change_info_new ();
@@ -3252,7 +3252,7 @@ main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
MessageList *ml = MESSAGE_LIST (user_data);
CamelFolderChangeInfo *changes = (CamelFolderChangeInfo *)event_data;
CamelFolder *folder = (CamelFolder *)o;
- int i;
+ gint i;
/* may be NULL if we're in the process of being destroyed */
if (ml->async_event == NULL)
@@ -3324,7 +3324,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
* the "Outgoing folder" column view.
**/
void
-message_list_set_folder (MessageList *message_list, CamelFolder *folder, const char *uri, gboolean outgoing)
+message_list_set_folder (MessageList *message_list, CamelFolder *folder, const gchar *uri, gboolean outgoing)
{
ETreeModel *etm = message_list->model;
gboolean hide_deleted;
@@ -3382,7 +3382,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
}
if (folder) {
- int strikeout_col = -1;
+ gint strikeout_col = -1;
ECell *cell;
camel_object_ref (folder);
@@ -3429,7 +3429,7 @@ on_cursor_activated_idle (gpointer data)
{
MessageList *message_list = data;
ESelectionModel *esm = e_tree_get_selection_model (message_list->tree);
- int selected = e_selection_model_selected_count (esm);
+ gint selected = e_selection_model_selected_count (esm);
if (selected == 1 && message_list->cursor_uid) {
d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid));
@@ -3443,10 +3443,10 @@ on_cursor_activated_idle (gpointer data)
}
static void
-on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data)
+on_cursor_activated_cmd (ETree *tree, gint row, ETreePath path, gpointer user_data)
{
MessageList *message_list = MESSAGE_LIST (user_data);
- const char *new_uid;
+ const gchar *new_uid;
if (path == NULL)
new_uid = NULL;
@@ -3476,7 +3476,7 @@ static void
on_selection_changed_cmd(ETree *tree, MessageList *ml)
{
GPtrArray *uids;
- char *newuid;
+ gchar *newuid;
ETreePath cursor;
/* not sure if we could just ignore this for the cursor, i think sometimes you
@@ -3485,7 +3485,7 @@ on_selection_changed_cmd(ETree *tree, MessageList *ml)
if (uids->len == 1)
newuid = uids->pdata[0];
else if ((cursor = e_tree_get_cursor(tree)))
- newuid = (char *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor));
+ newuid = (gchar *)camel_message_info_uid(e_tree_memory_node_get_data((ETreeMemory *)tree, cursor));
else
newuid = NULL;
@@ -3511,7 +3511,7 @@ static gint
on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list)
{
CamelMessageInfo *info;
- int flag;
+ gint flag;
guint32 flags;
if (col == COL_MESSAGE_STATUS)
@@ -3553,10 +3553,10 @@ struct _ml_selected_data {
};
static void
-ml_getselected_cb(ETreePath path, void *user_data)
+ml_getselected_cb(ETreePath path, gpointer user_data)
{
struct _ml_selected_data *data = user_data;
- const char *uid;
+ const gchar *uid;
if (e_tree_model_node_is_root (data->ml->model, path))
return;
@@ -3601,7 +3601,7 @@ message_list_get_selected(MessageList *ml)
void
message_list_set_selected(MessageList *ml, GPtrArray *uids)
{
- int i;
+ gint i;
ETreeSelectionModel *etsm;
ETreePath node;
GPtrArray *paths = g_ptr_array_new();
@@ -3638,7 +3638,7 @@ message_list_thaw(MessageList *ml)
void message_list_free_uids(MessageList *ml, GPtrArray *uids)
{
- int i;
+ gint i;
for (i=0;i<uids->len;i++)
g_free(uids->pdata[i]);
@@ -3691,7 +3691,7 @@ message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted)
}
void
-message_list_set_search (MessageList *ml, const char *search)
+message_list_set_search (MessageList *ml, const gchar *search)
{
if (search == NULL || search[0] == '\0')
if (ml->search == NULL || ml->search[0] == '\0')
@@ -3715,7 +3715,7 @@ message_list_set_search (MessageList *ml, const char *search)
/* will ensure that the message with UID uid will be in the message list after the next rebuild */
void
-message_list_ensure_message (MessageList *ml, const char *uid)
+message_list_ensure_message (MessageList *ml, const gchar *uid)
{
g_return_if_fail (ml != NULL);
@@ -3731,12 +3731,12 @@ message_list_length (MessageList *ml)
}
struct _glibsuxcrap {
- unsigned int count;
+ guint count;
CamelFolder *folder;
};
static void
-glib_crapback(void *key, void *data, void *x)
+glib_crapback(gpointer key, gpointer data, gpointer x)
{
struct _glibsuxcrap *y = x;
CamelMessageInfo *mi;
@@ -3755,7 +3755,7 @@ glib_crapback(void *key, void *data, void *x)
unsigned int
message_list_hidden(MessageList *ml)
{
- unsigned int hidden = 0;
+ guint hidden = 0;
MESSAGE_LIST_LOCK (ml, hide_lock);
if (ml->hidden && ml->folder) {
@@ -3783,7 +3783,7 @@ message_list_hidden(MessageList *ml)
100 messages.
*/
void
-message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper)
+message_list_hide_add (MessageList *ml, const gchar *expr, guint lower, guint upper)
{
MESSAGE_LIST_LOCK (ml, hide_lock);
@@ -3801,8 +3801,8 @@ message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, un
void
message_list_hide_uids (MessageList *ml, GPtrArray *uids)
{
- int i;
- char *uid;
+ gint i;
+ gchar *uid;
/* first see if we need to do any work, if so, then do it all at once */
for (i = 0; i < uids->len; i++) {
@@ -3869,7 +3869,7 @@ message_list_hide_clear (MessageList *ml)
static void
load_hide_state (MessageList *ml)
{
- char *filename;
+ gchar *filename;
FILE *in;
gint32 version, lower, upper;
@@ -3895,7 +3895,7 @@ load_hide_state (MessageList *ml)
camel_file_util_decode_fixed_int32 (in, &upper);
ml->hide_after = upper;
while (!feof(in)) {
- char *olduid, *uid;
+ gchar *olduid, *uid;
if (camel_file_util_decode_string (in, &olduid) != -1) {
uid = e_mempool_strdup(ml->hidden_pool, olduid);
@@ -3912,7 +3912,7 @@ load_hide_state (MessageList *ml)
}
static void
-hide_save_1 (char *uid, char *keydata, FILE *out)
+hide_save_1 (gchar *uid, gchar *keydata, FILE *out)
{
camel_file_util_encode_string (out, uid);
}
@@ -3922,7 +3922,7 @@ hide_save_1 (char *uid, char *keydata, FILE *out)
static void
save_hide_state (MessageList *ml)
{
- char *filename;
+ gchar *filename;
FILE *out;
if (ml->folder == NULL)
@@ -3950,11 +3950,11 @@ save_hide_state (MessageList *ml)
struct _regen_list_msg {
MailMsg base;
- int complete;
+ gint complete;
MessageList *ml;
- char *search;
- char *hideexpr;
+ gchar *search;
+ gchar *hideexpr;
CamelFolderChangeInfo *changes;
gboolean dotree; /* we are building a tree */
gboolean hidedel; /* we want to/dont want to show deleted messages */
@@ -3965,7 +3965,7 @@ struct _regen_list_msg {
CamelFolder *folder;
GPtrArray *summary;
- int last_row; /* last selected (cursor) row */
+ gint last_row; /* last selected (cursor) row */
xmlDoc *expand_state; /* stored expanded state of the previous view */
};
@@ -3992,7 +3992,7 @@ regen_list_exec (struct _regen_list_msg *m)
GPtrArray *uids, *uidnew, *showuids, *searchuids = NULL;
CamelMessageInfo *info;
ETreePath cursor;
- int i;
+ gint i;
gchar *expr = NULL;
if (m->folder != m->ml->folder)
@@ -4042,7 +4042,7 @@ regen_list_exec (struct _regen_list_msg *m)
thus we will keep the selected message to be sure it doesn't disappear because
it no longer belong to our search filter. */
if (uids && ((m->changes && m->ml->cursor_uid) || m->ml->ensure_uid)) {
- const char *looking_for = m->ml->cursor_uid;
+ const gchar *looking_for = m->ml->cursor_uid;
/* ensure_uid has precedence of cursor_uid */
if (m->ml->ensure_uid)
looking_for = m->ml->ensure_uid;
@@ -4094,7 +4094,7 @@ regen_list_exec (struct _regen_list_msg *m)
for (i = 0; i < uidnew->len; i++) {
if (g_hash_table_lookup (m->ml->hidden, uidnew->pdata[i]) == NULL) {
- char *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]);
+ gchar *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]);
g_hash_table_insert (m->ml->hidden, uid, uid);
}
}
@@ -4114,12 +4114,12 @@ regen_list_exec (struct _regen_list_msg *m)
/* perform uid hiding */
if (m->ml->hidden || m->ml->hide_before != ML_HIDE_NONE_START || m->ml->hide_after != ML_HIDE_NONE_END) {
- int start, end;
+ gint start, end;
uidnew = g_ptr_array_new ();
/* first, hide matches */
if (m->ml->hidden) {
- int subtr = 0;
+ gint subtr = 0;
for (i = 0; i < uids->len; i++) {
if (g_hash_table_lookup (m->ml->hidden, uids->pdata[i]) == NULL)
@@ -4127,7 +4127,7 @@ regen_list_exec (struct _regen_list_msg *m)
else if (m->last_row >= 0) {
/* if we are going to hide message above last selected row, then we should
decrease our last row number, to put cursor on a proper place. */
- ETreePath node = g_hash_table_lookup (m->ml->uid_nodemap, (const char *) uids->pdata[i]);
+ ETreePath node = g_hash_table_lookup (m->ml->uid_nodemap, (const gchar *) uids->pdata[i]);
if (node && m->last_row > e_tree_table_adapter_row_of_node (e_tree_get_table_adapter (m->ml->tree), node))
subtr ++;
@@ -4272,7 +4272,7 @@ regen_list_done (struct _regen_list_msg *m)
g_mutex_unlock (m->ml->regen_lock);
if (m->ml->regen == NULL && m->ml->pending_select_uid) {
- char *uid = m->ml->pending_select_uid;
+ gchar *uid = m->ml->pending_select_uid;
m->ml->pending_select_uid = NULL;
message_list_select_uid(m->ml, uid);
@@ -4310,7 +4310,7 @@ regen_list_done (struct _regen_list_msg *m)
static void
regen_list_free (struct _regen_list_msg *m)
{
- int i;
+ gint i;
e_profile_event_emit("list.regenerated", m->folder->full_name, 0);
@@ -4398,7 +4398,7 @@ mail_regen_cancel(MessageList *ml)
}
static void
-mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, CamelFolderChangeInfo *changes)
+mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, CamelFolderChangeInfo *changes)
{
struct _regen_list_msg *m;
GConfClient *gconf;
@@ -4457,7 +4457,7 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came
if (message_list_length (ml) <= 0) {
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (ml))) {
/* there is some info why the message list is empty, let it be something useful */
- char *txt = g_strconcat (_("Generating message list"), "..." , NULL);
+ gchar *txt = g_strconcat (_("Generating message list"), "..." , NULL);
e_tree_set_info_message (m->ml->tree, txt);
diff --git a/mail/message-list.h b/mail/message-list.h
index 4d0866fe20..eb908a7c9b 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -99,7 +99,7 @@ struct _MessageList {
/* The folder & matching uri */
CamelFolder *folder;
- char *folder_uri;
+ gchar *folder_uri;
GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */
@@ -109,15 +109,15 @@ struct _MessageList {
/* IMPORTANT: You MUST have obtained the hide lock, to operate on this data */
GHashTable *hidden;
struct _EMemPool *hidden_pool;
- int hide_unhidden; /* total length, before hiding */
- int hide_before, hide_after; /* hide ranges of messages */
+ gint hide_unhidden; /* total length, before hiding */
+ gint hide_before, hide_after; /* hide ranges of messages */
/* Current search string, or %NULL */
- char *search;
+ gchar *search;
/* which message uid should be left in the list even not in a search after rebuild;
rebuild will clear the value to NULL */
- char *ensure_uid;
+ gchar *ensure_uid;
/* are we regenerating the message_list because set_folder was just called? */
guint just_set_folder : 1;
@@ -138,7 +138,7 @@ struct _MessageList {
guint frozen:16;
/* Where the ETree cursor is. */
- char *cursor_uid;
+ gchar *cursor_uid;
/* whether the last selection was on a single row or none/multi */
gboolean last_sel_single;
@@ -152,11 +152,11 @@ struct _MessageList {
/* list of outstanding regeneration requests */
GList *regen;
GMutex *regen_lock; /* when writing to the regen, guard with this lock too */
- char *pending_select_uid; /* set if we were busy regnerating while we had a select come in */
+ gchar *pending_select_uid; /* set if we were busy regnerating while we had a select come in */
guint regen_timeout_id;
- void *regen_timeout_msg;
+ gpointer regen_timeout_msg;
- char *frozen_search; /* to save search took place while we were frozen */
+ gchar *frozen_search; /* to save search took place while we were frozen */
/* the current camel folder thread tree, if any */
struct _CamelFolderThread *thread_tree;
@@ -169,7 +169,7 @@ typedef struct {
ETreeScrolledClass parent_class;
/* signals - select a message */
- void (*message_selected) (MessageList *ml, const char *uid);
+ void (*message_selected) (MessageList *ml, const gchar *uid);
void (*message_list_built) (MessageList *ml);
void (*message_list_scrolled) (MessageList *ml);
} MessageListClass;
@@ -183,7 +183,7 @@ typedef enum {
GType message_list_get_type (void);
GtkWidget *message_list_new (void);
-void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const char *uri, gboolean outgoing);
+void message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, const gchar *uri, gboolean outgoing);
void message_list_freeze(MessageList *ml);
void message_list_thaw(MessageList *ml);
@@ -201,7 +201,7 @@ gboolean message_list_select (MessageList *message_list,
gboolean message_list_can_select(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask);
void message_list_select_uid (MessageList *message_list,
- const char *uid);
+ const gchar *uid);
void message_list_select_next_thread (MessageList *ml);
@@ -216,11 +216,11 @@ void message_list_copy(MessageList *ml, gboolean cut);
void message_list_paste (MessageList *ml);
/* info */
-unsigned int message_list_length (MessageList *ml);
-unsigned int message_list_hidden (MessageList *ml);
+guint message_list_length (MessageList *ml);
+guint message_list_hidden (MessageList *ml);
/* hide specific messages */
-void message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper);
+void message_list_hide_add (MessageList *ml, const gchar *expr, guint lower, guint upper);
void message_list_hide_uids (MessageList *ml, GPtrArray *uids);
void message_list_hide_clear (MessageList *ml);
@@ -229,8 +229,8 @@ void message_list_set_threaded_expand_all (MessageList *ml);
void message_list_set_threaded_collapse_all (MessageList *ml);
void message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted);
-void message_list_set_search (MessageList *ml, const char *search);
-void message_list_ensure_message (MessageList *ml, const char *uid);
+void message_list_set_search (MessageList *ml, const gchar *search);
+void message_list_ensure_message (MessageList *ml, const gchar *uid);
void message_list_save_state (MessageList *ml);
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index 827fc6813a..b59154c47e 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -65,7 +65,7 @@ static const gchar *available_flags[] = {
N_("Review"),
};
-static int num_available_flags = sizeof (available_flags) / sizeof (available_flags[0]);
+static gint num_available_flags = sizeof (available_flags) / sizeof (available_flags[0]);
static MessageTagEditorClass *parent_class = NULL;
@@ -137,7 +137,7 @@ get_tag_list (MessageTagEditor *editor)
MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
CamelTag *tags = NULL;
time_t date;
- char *text;
+ gchar *text;
camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (followup->combo_entry)))));
@@ -165,7 +165,7 @@ static void
set_tag_list (MessageTagEditor *editor, CamelTag *tags)
{
MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
- const char *text;
+ const gchar *text;
time_t date;
text = camel_tag_get (&tags, "follow-up");
@@ -224,22 +224,22 @@ get_week_start_day (void)
static gboolean
locale_supports_12_hour_format (void)
{
- char s[16];
+ gchar s[16];
time_t t = 0;
strftime(s, sizeof s, "%p", gmtime (&t));
return s[0] != '\0';
}
-GtkWidget *target_date_new (const char *s1, const char *s2, int i1, int i2);
+GtkWidget *target_date_new (const gchar *s1, const gchar *s2, gint i1, gint i2);
GtkWidget *
-target_date_new (const char *s1, const char *s2, int i1, int i2)
+target_date_new (const gchar *s1, const gchar *s2, gint i1, gint i2)
{
gboolean time_24hour = TRUE;
GConfClient *gconf;
GtkWidget *widget;
- int start;
+ gint start;
widget = e_date_edit_new ();
e_date_edit_set_show_date (E_DATE_EDIT (widget), TRUE);
@@ -269,8 +269,8 @@ construct (MessageTagEditor *editor)
GtkListStore *model;
GtkWidget *widget;
GladeXML *gui;
- int i;
- char *gladefile;
+ gint i;
+ gchar *gladefile;
gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up"));
@@ -308,7 +308,7 @@ construct (MessageTagEditor *editor)
followup->combo_entry = GTK_COMBO_BOX (glade_xml_get_widget (gui, "combo"));
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (followup->combo_entry)));
for (i = 0; i < num_available_flags; i++)
- gtk_combo_box_append_text (followup->combo_entry, (char *) _(available_flags[i]));
+ gtk_combo_box_append_text (followup->combo_entry, (gchar *) _(available_flags[i]));
gtk_combo_box_set_active (followup->combo_entry, DEFAULT_FLAG);
followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date"));
@@ -337,7 +337,7 @@ message_tag_followup_new (void)
}
void
-message_tag_followup_append_message (MessageTagFollowUp *editor, const char *from, const char *subject)
+message_tag_followup_append_message (MessageTagFollowUp *editor, const gchar *from, const gchar *subject)
{
GtkTreeIter iter;
GtkListStore *model;
diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h
index 5c229fe36e..7e362df300 100644
--- a/mail/message-tag-followup.h
+++ b/mail/message-tag-followup.h
@@ -69,8 +69,8 @@ GType message_tag_followup_get_type (void);
MessageTagEditor *message_tag_followup_new (void);
void message_tag_followup_append_message (MessageTagFollowUp *editor,
- const char *from,
- const char *subject);
+ const gchar *from,
+ const gchar *subject);
#ifdef __cplusplus
}