aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-vfolder.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r--mail/mail-vfolder.c116
1 files changed, 58 insertions, 58 deletions
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;