aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 10:54:32 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 10:54:32 +0800
commit13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c (patch)
tree4b07162d272ac9568afaa2d00b0d618aa44edbe3 /mail
parentbdb60ce109c1a2958c89bb07b599407d26a2cf4f (diff)
downloadgsoc2013-evolution-13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c.tar
gsoc2013-evolution-13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c.tar.gz
gsoc2013-evolution-13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c.tar.bz2
gsoc2013-evolution-13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c.tar.lz
gsoc2013-evolution-13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c.tar.xz
gsoc2013-evolution-13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c.tar.zst
gsoc2013-evolution-13d4452306f71fb8f5f2e2bafbfc6b6693e0b37c.zip
Fix compilation warnings in mail folder (#437935).
svn path=/trunk/; revision=33628
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog69
-rw-r--r--mail/em-composer-utils.c2
-rw-r--r--mail/em-event.c2
-rw-r--r--mail/em-filter-folder-element.c16
-rw-r--r--mail/em-filter-rule.c8
-rw-r--r--mail/em-filter-source-element.c14
-rw-r--r--mail/em-folder-browser.c4
-rw-r--r--mail/em-folder-tree-model.c64
-rw-r--r--mail/em-folder-tree.c6
-rw-r--r--mail/em-folder-view.c8
-rw-r--r--mail/em-format-hook.c4
-rw-r--r--mail/em-format-html-display.c47
-rw-r--r--mail/em-format-html.c14
-rw-r--r--mail/em-format-quote.c12
-rw-r--r--mail/em-format.c8
-rw-r--r--mail/em-icon-stream.c2
-rw-r--r--mail/em-inline-filter.c4
-rw-r--r--mail/em-junk-hook.c4
-rw-r--r--mail/em-mailer-prefs.c55
-rw-r--r--mail/em-mailer-prefs.h1
-rw-r--r--mail/em-migrate.c113
-rw-r--r--mail/em-utils.c20
-rw-r--r--mail/em-utils.h1
-rw-r--r--mail/em-vfolder-rule.c18
-rw-r--r--mail/importers/mail-importer.c2
-rw-r--r--mail/mail-component.c4
-rw-r--r--mail/mail-config.c6
-rw-r--r--mail/mail-session.c2
-rw-r--r--mail/mail-signature-editor.c4
-rw-r--r--mail/mail-tools.c4
-rw-r--r--mail/message-list.c9
-rw-r--r--mail/message-list.h1
32 files changed, 302 insertions, 226 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ddfa166bab..3289c63cd8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,72 @@
+2007-05-12 Gilles Dartiguelongue <dartigug@esiee.fr>
+
+ ** Compilation warnings cleanup
+
+ * em-composer-utils.c: (composer_get_message):
+ * em-event.c: (em_event_target_new_composer):
+ * em-filter-folder-element.c: (xml_encode), (xml_decode):
+ * em-filter-rule.c: (xml_encode), (load_set), (xml_decode):
+ * em-filter-source-element.c: (xml_encode), (xml_decode), (clone):
+ * em-folder-browser.c: (emfb_search_config_search),
+ (emfb_folder_refresh):
+ * em-folder-tree-model.c: (em_folder_tree_model_load_state),
+ (find_xml_node), (em_folder_tree_model_get_expanded),
+ (em_folder_tree_model_set_expanded), (expand_foreach_r),
+ (em_folder_tree_model_expand_foreach),
+ (em_folder_tree_model_is_type_inbox),
+ (em_folder_tree_model_get_selected),
+ (em_folder_tree_model_set_selected):
+ * em-folder-tree.c: (tree_drag_data_get), (emft_drop_folder),
+ (emft_drop_async_desc):
+ * em-folder-view.c: (emfv_selection_get), (emfv_popup_delete),
+ (emfv_message_reply), (emfv_on_url_cb):
+ * em-format-hook.c: (emfh_construct_group), (emfh_construct):
+ * em-format-html-display.c: (em_format_html_get_search_dialog),
+ (efhd_html_link_clicked), (efhd_drag_data_get),
+ (efhd_bonobo_object), (efhd_optional_button_show),
+ (efhd_attachment_optional), (efhd_format_optional):
+ * em-format-html.c: (efh_url_requested), (efh_text_plain),
+ (efh_text_enriched), (efh_write_text_html),
+ (efh_message_deliverystatus), (efh_format_address),
+ (efh_format_header):
+ * em-format-quote.c: (emfq_format_address), (emfq_format_source),
+ (emfq_text_plain), (emfq_text_enriched), (emfq_text_html):
+ * em-format.c: (em_format_format_content), (em_format_format_text),
+ (emf_multipart_alternative), (emf_message_deliverystatus):
+ * em-icon-stream.c: (emis_sync_write):
+ * em-inline-filter.c: (emif_add_part), (emif_scan):
+ * em-junk-hook.c: (emjh_construct_group), (emjh_construct):
+ * em-mailer-prefs.c: (labels_changed), (emmp_header_add_header),
+ (junk_plugin_changed), (junk_plugin_setup),
+ (em_mailer_prefs_construct), (emmp_header_from_xmldoc),
+ (em_mailer_prefs_header_from_xml), (em_mailer_prefs_header_to_xml):
+ * em-mailer-prefs.h:
+ * em-migrate.c: (xml_find_node), (upgrade_xml_uris),
+ (upgrade_xml_uris_1_0), (load_accounts_1_0), (utf8_reencode),
+ (upgrade_xml_1_2_rec), (upgrade_passwords_1_2), (is_mail_folder),
+ (get_local_et_expanded), (get_local_store_uri),
+ (upgrade_vfolder_sources_1_4),
+ (em_migrate_folder_view_settings_1_4), (remove_system_searches),
+ (emm_setup_initial):
+ * em-utils.c: (em_utils_selection_get_mailbox),
+ (em_utils_selection_get_message), (em_utils_selection_set_uidlist),
+ (em_utils_selection_get_uidlist), (em_utils_selection_set_urilist),
+ (em_utils_selection_get_urilist), (em_utils_part_to_html),
+ (em_utils_message_to_html):
+ * em-utils.h:
+ * em-vfolder-rule.c: (xml_encode), (xml_decode),
+ (select_source_with_changed):
+ * importers/mail-importer.c: (import_mbox_import):
+ * mail-component.c: (impl_createView), (status_check):
+ * mail-config.c: (mail_config_signature_run_script):
+ * mail-session.c: (mail_session_add_junk_plugin):
+ * mail-signature-editor.c: (get_text), (menu_file_save_cb):
+ * mail-tools.c: (mail_tool_get_local_movemail_path),
+ (mail_tool_do_movemail):
+ * message-list.c: (address_compare), (get_normalised_string),
+ (message_list_setup_etree), (load_hide_state):
+ * message-list.h:
+
2007-06-02 Ross Burton <ross@openedhand.com>
* mail-send-recv.c:
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 529b828908..942ac1e897 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -371,7 +371,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
if (account->id->organization && *account->id->organization) {
char *org;
- org = camel_header_encode_string (account->id->organization);
+ org = camel_header_encode_string ((const unsigned char *)account->id->organization);
camel_medium_set_header (CAMEL_MEDIUM (message), "Organization", org);
g_free (org);
}
diff --git a/mail/em-event.c b/mail/em-event.c
index 2e7673a62c..b139302a3d 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -153,7 +153,7 @@ em_event_target_new_composer (EMEvent *eme, const EMsgComposer *composer, guint3
{
EMEventTargetComposer *t = e_event_target_new(&eme->popup, EM_EVENT_TARGET_COMPOSER, sizeof(*t));
- t->composer = g_object_ref(composer);
+ t->composer = g_object_ref(G_OBJECT(composer));
t->target.mask = ~flags;
return t;
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index 3b82969b93..781c952b68 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -176,12 +176,12 @@ xml_encode(FilterElement *fe)
d(printf("Encoding folder as xml\n"));
- value = xmlNewNode(NULL, "value");
- xmlSetProp(value, "name", fe->name);
- xmlSetProp(value, "type", "folder");
+ value = xmlNewNode(NULL, (unsigned const char *)"value");
+ xmlSetProp(value, (unsigned const char *)"name", (unsigned char *)fe->name);
+ xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder");
- work = xmlNewChild(value, NULL, "folder", NULL);
- xmlSetProp(work, "uri", ff->uri);
+ work = xmlNewChild(value, NULL, (unsigned const char *)"folder", NULL);
+ xmlSetProp(work, (unsigned const char *)"uri", (unsigned const char *)ff->uri);
return value;
}
@@ -195,14 +195,14 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
d(printf("Decoding folder from xml %p\n", fe));
xmlFree(fe->name);
- fe->name = xmlGetProp(node, "name");
+ fe->name = (char *)xmlGetProp(node, (unsigned const char *)"name");
n = node->children;
while(n) {
- if (!strcmp(n->name, "folder")) {
+ if (!strcmp((char *)n->name, "folder")) {
char *uri;
- uri = xmlGetProp(n, "uri");
+ uri = (char *)xmlGetProp(n, (unsigned const char *)"uri");
g_free(ff->uri);
ff->uri = g_strdup(uri);
xmlFree(uri);
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index a5a9782f07..3f1016d5d4 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -221,7 +221,7 @@ xml_encode(FilterRule *fr)
node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
g_assert(node != NULL);
- set = xmlNewNode(NULL, "actionset");
+ set = xmlNewNode(NULL, (const unsigned char *)"actionset");
xmlAddChild(node, set);
l = ff->actions;
while (l) {
@@ -243,8 +243,8 @@ load_set(xmlNodePtr node, EMFilterRule *ff, RuleContext *rc)
work = node->children;
while (work) {
- if (!strcmp(work->name, "part")) {
- rulename = xmlGetProp(work, "name");
+ if (!strcmp((char *)work->name, "part")) {
+ rulename = (char *)xmlGetProp(work, (const unsigned char *)"name");
part = em_filter_context_find_action((EMFilterContext *)rc, rulename);
if (part) {
part = filter_part_clone(part);
@@ -274,7 +274,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc)
work = node->children;
while (work) {
- if (!strcmp(work->name, "actionset")) {
+ if (!strcmp((char *)work->name, "actionset")) {
load_set(work, ff, rc);
}
work = work->next;
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index c35862a101..8c01220254 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -177,12 +177,12 @@ xml_encode(FilterElement *fe)
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
- value = xmlNewNode(NULL, "value");
- xmlSetProp(value, "name", fe->name);
- xmlSetProp(value, "type", "uri");
+ 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");
if (fs->priv->current_url)
- xmlNewTextChild(value, NULL, "uri", fs->priv->current_url);
+ xmlNewTextChild(value, NULL, (const unsigned char *)"uri", (unsigned char *)fs->priv->current_url);
return value;
}
@@ -196,8 +196,8 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
node = node->children;
while (node != NULL) {
- if (!strcmp(node->name, "uri")) {
- uri = xmlNodeGetContent(node);
+ if (!strcmp((char *)node->name, "uri")) {
+ uri = (char *)xmlNodeGetContent(node);
url = camel_url_new(uri, NULL);
xmlFree(uri);
@@ -220,7 +220,7 @@ clone(FilterElement *fe)
EMFilterSourceElement *cpy = em_filter_source_element_new();
GList *i;
- ((FilterElement *)cpy)->name = xmlStrdup(fe->name);
+ ((FilterElement *)cpy)->name = (char *)xmlStrdup((unsigned char *)fe->name);
cpy->priv->current_url = g_strdup(fs->priv->current_url);
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index a05734f44c..ab50741f8e 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -751,7 +751,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(query);
+ words = camel_search_words_split((unsigned char *)query);
for (i=0;i<words->len;i++)
strings = g_slist_prepend(strings, g_strdup(words->words[i]->word));
camel_search_words_free (words);
@@ -1360,7 +1360,7 @@ static void
emfb_folder_refresh(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderBrowser *emfb = data;
- EMFolderTree *tree = g_object_get_data (emfb, "foldertree");
+ EMFolderTree *tree = g_object_get_data (G_OBJECT (emfb), "foldertree");
CamelFolder *folder;
if ((folder = em_folder_tree_get_selected_folder (tree)) != NULL)
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 45dd17a7e1..5e4a5b2b02 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -333,17 +333,17 @@ em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename)
return;
/* setup some defaults - expand "Local Folders" and "Search Folders" */
- model->state = xmlNewDoc ("1.0");
- root = xmlNewDocNode (model->state, NULL, "tree-state", NULL);
+ model->state = xmlNewDoc ((const unsigned char *)"1.0");
+ root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
- node = xmlNewChild (root, NULL, "node", NULL);
- xmlSetProp (node, "name", "local");
- xmlSetProp (node, "expand", "true");
+ 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, "node", NULL);
- xmlSetProp (node, "name", "vfolder");
- xmlSetProp (node, "expand", "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");
}
@@ -941,8 +941,8 @@ find_xml_node (xmlNodePtr root, const char *name)
node = root->children;
while (node != NULL) {
- if (!strcmp (node->name, "node")) {
- nname = xmlGetProp (node, "name");
+ if (!strcmp ((char *)node->name, "node")) {
+ nname = (char *)xmlGetProp (node, (const unsigned char *)"name");
if (nname && !strcmp (nname, name)) {
xmlFree (nname);
return node;
@@ -969,7 +969,7 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
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 (node->name, "tree-state") != 0)
+ if (!node || strcmp ((char *)node->name, "tree-state") != 0)
return FALSE;
name = buf = g_alloca (strlen (key) + 1);
@@ -985,8 +985,8 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
if ((node = find_xml_node (node, name))) {
gboolean expanded;
- buf = xmlGetProp (node, "expand");
- expanded = buf && !strcmp (buf, "true");
+ buf = (char *)xmlGetProp (node, (const unsigned char *)"expand");
+ expanded = buf && !strcmp ((char *)buf, "true");
xmlFree (buf);
if (!expanded || p == NULL)
@@ -1008,10 +1008,10 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb
char *buf, *p;
if (model->state == NULL)
- model->state = xmlNewDoc ("1.0");
+ model->state = xmlNewDoc ((const unsigned char *)"1.0");
if (!model->state->children) {
- node = xmlNewDocNode (model->state, NULL, "tree-state", NULL);
+ node = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
xmlDocSetRootElement (model->state, node);
} else {
node = model->state->children;
@@ -1035,11 +1035,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, "node", NULL);
- xmlSetProp (node, "name", name);
+ node = xmlNewChild (parent, NULL, (const unsigned char *)"node", NULL);
+ xmlSetProp (node, (const unsigned char *)"name", (unsigned char *)name);
}
- xmlSetProp (node, "expand", expanded || p ? "true" : "false");
+ xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)(expanded || p ? "true" : "false"));
name = p ? p + 1 : NULL;
} while (name);
@@ -1072,11 +1072,11 @@ expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirna
char *path, *name, *expand;
while (node != NULL) {
- if (!strcmp (node->name, "node")) {
- name = xmlGetProp (node, "name");
- expand = xmlGetProp (node, "expand");
+ if (!strcmp ((char *)node->name, "node")) {
+ name = (char *)xmlGetProp (node, (const unsigned char *)"name");
+ expand = (char *)xmlGetProp (node, (const unsigned char *)"expand");
- if (expand && name && !strcmp (expand, "true")) {
+ if (expand && name && !strcmp ((char *)expand, "true")) {
if (dirname)
path = g_strdup_printf ("%s/%s", dirname, name);
else
@@ -1102,7 +1102,7 @@ em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFu
xmlNodePtr root;
root = model->state ? model->state->children : NULL;
- if (!root || !root->children || strcmp (root->name, "tree-state") != 0)
+ if (!root || !root->children || strcmp ((char *)root->name, "tree-state") != 0)
return;
expand_foreach_r (model, root, NULL, func, user_data);
@@ -1141,7 +1141,7 @@ em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store,
gtk_tree_path_free (tree_path);
- gtk_tree_model_get (model, &iter, COL_UINT_FLAGS, &flags, -1);
+ gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, COL_UINT_FLAGS, &flags, -1);
if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX)
return TRUE;
@@ -1195,12 +1195,12 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
char *buf, *uri;
node = model->state ? model->state->children : NULL;
- if (!node || strcmp (node->name, "tree-state") != 0)
+ if (!node || strcmp ((char *)node->name, "tree-state") != 0)
return NULL;
node = node->children;
while (node != NULL) {
- if (!strcmp (node->name, "selected"))
+ if (!strcmp ((char *)node->name, "selected"))
break;
node = node->next;
}
@@ -1208,7 +1208,7 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
if (node == NULL)
return NULL;
- buf = xmlGetProp (node, "uri");
+ buf = (char *)xmlGetProp (node, (unsigned char *)"uri");
uri = g_strdup (buf);
xmlFree (buf);
@@ -1222,10 +1222,10 @@ em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri)
xmlNodePtr root, node;
if (model->state == NULL)
- model->state = xmlNewDoc ("1.0");
+ model->state = xmlNewDoc ((unsigned char *)"1.0");
if (!model->state->children) {
- root = xmlNewDocNode (model->state, NULL, "tree-state", NULL);
+ root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
} else {
root = model->state->children;
@@ -1233,13 +1233,13 @@ em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri)
node = root->children;
while (node != NULL) {
- if (!strcmp (node->name, "selected"))
+ if (!strcmp ((char *)node->name, "selected"))
break;
node = node->next;
}
if (node == NULL)
- node = xmlNewChild (root, NULL, "selected", NULL);
+ node = xmlNewChild (root, NULL, (const unsigned char *)"selected", NULL);
- xmlSetProp (node, "uri", uri);
+ xmlSetProp (node, (const unsigned char *)"uri", (unsigned char *)uri);
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 626bea2392..1ce73f4208 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -807,7 +807,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, uri, strlen (uri) + 1);
+ gtk_selection_data_set(selection, drag_atoms[info], 8, (unsigned char *)uri, strlen (uri) + 1);
break;
case DND_DRAG_TYPE_TEXT_URI_LIST:
/* dragging to nautilus or something, probably */
@@ -859,7 +859,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(m->selection->data, 0, &m->msg.ex)))
+ if (!(src = mail_tool_uri_to_folder((char *)m->selection->data, 0, &m->msg.ex)))
return;
em_folder_utils_copy_folders(src->parent_store, src->full_name, m->store, m->full_name?m->full_name:"", m->move);
@@ -874,7 +874,7 @@ emft_drop_async_desc (struct _mail_msg *mm, int done)
char *buf;
if (m->info == DND_DROP_TYPE_FOLDER) {
- url = camel_url_new (m->selection->data, NULL);
+ url = camel_url_new ((char *)m->selection->data, NULL);
if (m->move)
buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1);
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index fa162af44d..21233bd623 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -720,7 +720,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, p->selection_uri, strlen(p->selection_uri));
+ gtk_selection_data_set(data, data->target, 8, (unsigned char *)p->selection_uri, strlen(p->selection_uri));
}
static void
@@ -961,7 +961,7 @@ emfv_popup_delete(EPopup *ep, EPopupItem *pitem, void *data)
for (count=0; count < uids->len; count++) {
if (camel_folder_get_message_flags (emfv->folder, uids->pdata[count]) & CAMEL_MESSAGE_USER_NOT_DELETABLE) {
- if ((EMFormatHTML *)emfv->preview_active) {
+ if (emfv->preview_active) {
GtkHTMLStream *hstream = gtk_html_begin(((EMFormatHTML *)emfv->preview)->html);
gtk_html_stream_printf(hstream, "<h2>%s</h2><p>%s</p>",
@@ -1514,7 +1514,7 @@ static void
emfv_message_reply(EMFolderView *emfv, int mode)
{
char *html;
- guint len;
+ gint len;
if (emfv->list->cursor_uid == NULL)
return;
@@ -2929,7 +2929,7 @@ emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv)
camel_url_free(curl);
camel_object_unref(cia);
} else if (!strncmp (url, "##", 2)) {
- nice_url = g_strdup_printf (_("Click to hide/unhide addresses"), url);
+ nice_url = _("Click to hide/unhide addresses");
} else
nice_url = g_strdup_printf (_("Click to open %s"), url);
}
diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c
index b40c70b158..8aad0e7076 100644
--- a/mail/em-format-hook.c
+++ b/mail/em-format-hook.c
@@ -143,7 +143,7 @@ emfh_construct_group(EPluginHook *eph, xmlNodePtr root)
node = root->children;
while (node) {
- if (0 == strcmp(node->name, "item")) {
+ if (0 == strcmp((char *)node->name, "item")) {
struct _EMFormatHookItem *item;
item = emfh_construct_item(eph, group, node);
@@ -171,7 +171,7 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
node = root->children;
while (node) {
- if (strcmp(node->name, "group") == 0) {
+ if (strcmp((char *)node->name, "group") == 0) {
struct _EMFormatHookGroup *group;
group = emfh_construct_group(eph, node);
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 502f9a5090..26540ee607 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -679,22 +679,22 @@ em_format_html_get_search_dialog (EMFormatHTMLDisplay *efhd)
// gtk_box_pack_start ((GtkBox *)(hbox2), p->search_entry_box, TRUE, TRUE, 5);
button3 = gtk_button_new_with_mnemonic (_("_Previous"));
- gtk_button_set_image (button3, gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON));
+ gtk_button_set_image (GTK_BUTTON (button3), GTK_WIDGET(gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON)));
gtk_widget_show (button3);
- gtk_box_pack_start ((GtkBox *)(hbox2), button3, FALSE, FALSE, 5);
+ gtk_box_pack_start (GTK_BOX (hbox2), button3, FALSE, FALSE, 5);
button2 = gtk_button_new_with_mnemonic (_("_Next"));
gtk_button_set_image (GTK_BUTTON (button2), gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON));
gtk_widget_show (button2);
- gtk_box_pack_start ((GtkBox *)(hbox2), button2, FALSE, FALSE, 5);
+ gtk_box_pack_start (GTK_BOX (hbox2), button2, FALSE, FALSE, 5);
p->search_case_check = gtk_check_button_new_with_mnemonic (_("M_atch case"));
gtk_widget_show (p->search_case_check);
- gtk_box_pack_start ((GtkBox *)(hbox2), p->search_case_check, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox2), p->search_case_check, FALSE, FALSE, 0);
p->search_matches_label = gtk_label_new ("");
gtk_widget_show (p->search_matches_label);
- gtk_box_pack_start ((GtkBox *)(hbox2), p->search_matches_label, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox2), p->search_matches_label, TRUE, TRUE, 0);
p->search_dialog = GTK_HBOX (hbox2);
p->search_wrap = FALSE;
@@ -895,12 +895,13 @@ efhd_html_link_clicked (GtkHTML *html, const char *url, EMFormatHTMLDisplay *efh
((EMFormatHTML *) efhd)->header_wrap_flags |= EM_FORMAT_HTML_HEADER_CC;
else
((EMFormatHTML *) efhd)->header_wrap_flags &= ~EM_FORMAT_HTML_HEADER_CC;
- else if (!strcmp (url, "##BCC##"))
+ else if (!strcmp (url, "##BCC##")) {
if (!(((EMFormatHTML *) efhd)->header_wrap_flags & EM_FORMAT_HTML_HEADER_BCC))
((EMFormatHTML *) efhd)->header_wrap_flags |= EM_FORMAT_HTML_HEADER_BCC;
else
((EMFormatHTML *) efhd)->header_wrap_flags &= ~EM_FORMAT_HTML_HEADER_BCC;
- em_format_redraw((EMFormat *)efhd);
+ }
+ em_format_redraw((EMFormat *)efhd);
} else
g_signal_emit((GObject *)efhd, efhd_signals[EFHD_LINK_CLICKED], 0, url);
}
@@ -1573,7 +1574,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, uri, strlen(uri));
+ gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri, strlen(uri));
return;
}
@@ -1585,7 +1586,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, uri_crlf, strlen(uri_crlf));
+ gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
g_object_set_data_full((GObject *)w, "e-drag-uri", uri_crlf, g_free);
break;
default:
@@ -1999,7 +2000,7 @@ efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *
}
/* ...convert the CamelStreamMem to a BonoboStreamMem... */
- bstream = bonobo_stream_mem_create(cstream->buffer->data, cstream->buffer->len, TRUE, FALSE);
+ bstream = bonobo_stream_mem_create((char *)cstream->buffer->data, cstream->buffer->len, TRUE, FALSE);
camel_object_unref(cstream);
/* ...and hydrate the PersistStream from the BonoboStream. */
@@ -2440,13 +2441,13 @@ efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part,
static void
efhd_optional_button_show (GtkWidget *widget, GtkWidget *w)
{
- GtkWidget *label = g_object_get_data (widget, "text-label");
+ GtkWidget *label = g_object_get_data (G_OBJECT (widget), "text-label");
if (GTK_WIDGET_VISIBLE (w)) {
gtk_widget_hide (w);
- gtk_label_set_text_with_mnemonic (label, _("View _Unformatted"));
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("View _Unformatted"));
} else {
- gtk_label_set_text_with_mnemonic (label, _("Hide _Unformatted"));
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("Hide _Unformatted"));
gtk_widget_show (w);
}
}
@@ -2481,11 +2482,11 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
hbox = gtk_hbox_new (FALSE, 0);
img = e_icon_factory_get_image ("stock_show-all", E_ICON_SIZE_BUTTON);
label = gtk_label_new_with_mnemonic(_("View _Unformatted"));
- g_object_set_data (button, "text-label", (gpointer)label);
+ g_object_set_data (G_OBJECT (button), "text-label", (gpointer)label);
gtk_box_pack_start ((GtkBox *)hbox, img, TRUE, TRUE, 2);
gtk_box_pack_start ((GtkBox *)hbox, label, TRUE, TRUE, 2);
gtk_widget_show_all (hbox);
- gtk_container_add (button, hbox);
+ gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (hbox));
if (info->handle)
g_signal_connect(button, "clicked", G_CALLBACK(efhd_optional_button_show), scroll);
else {
@@ -2504,7 +2505,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_box_pack_start ((GtkBox *)hbox, label, TRUE, TRUE, 2);
gtk_box_pack_start ((GtkBox *)hbox, gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE), TRUE, TRUE, 2);
gtk_widget_show_all (hbox);
- gtk_container_add (button, hbox);
+ gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (hbox));
a11y = gtk_widget_get_accessible (button);
atk_object_set_name (a11y, _("Attachment"));
@@ -2518,18 +2519,20 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_box_pack_start((GtkBox *)vbox, mainbox, FALSE, FALSE, 6);
- view = gtk_text_view_new ();
+ view = (GtkTextView *)gtk_text_view_new ();
gtk_text_view_set_editable (view, FALSE);
gtk_text_view_set_cursor_visible (view, FALSE);
buffer = gtk_text_view_get_buffer(view);
- gtk_text_buffer_set_text (buffer, info->mstream->buffer->data, info->mstream->buffer->len);
+ gtk_text_buffer_set_text (buffer, (char *)info->mstream->buffer->data, info->mstream->buffer->len);
camel_object_unref(info->mstream);
info->mstream = NULL;
- gtk_scrolled_window_set_policy (scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
- gtk_container_add (scroll, view);
+ gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (view));
gtk_box_pack_start((GtkBox *)vbox, scroll, TRUE, TRUE, 6);
- gtk_widget_show (view);
+ gtk_widget_show (GTK_WIDGET(view));
+
gtk_widget_set_size_request (scroll, ((GtkWidget *)efh->html)->allocation.width-48, 250);
g_signal_connect (scroll, "size_allocate", G_CALLBACK(efhd_resize), efh);
gtk_widget_show (scroll);
@@ -2558,7 +2561,7 @@ efhd_format_optional(EMFormat *emf, CamelStream *fstream, CamelMimePart *part, C
info->shown = FALSE;
info->snoop_mime_type = g_strdup("text/plain");
info->attachment = e_attachment_new_from_mime_part (info->puri.part);
- info->mstream = mstream;
+ info->mstream = (CamelStreamMem *)mstream;
if (emf->valid) {
info->sign = emf->valid->sign.status;
info->encrypt = emf->valid->encrypt.status;
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 3ce658cfe1..4a4b51a10c 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -565,7 +565,7 @@ efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMForma
job = em_format_html_job_new(efh, emfh_gethttp, g_strdup(url));
} else if (g_ascii_strncasecmp(url, "/", 1) == 0) {
char *data = NULL;
- int length = 0;
+ guint length = 0;
gboolean status;
status = g_file_get_contents (url, &data, &length, NULL);
@@ -767,7 +767,7 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
"<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px;\">\n",
efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff);
camel_stream_write_string(stream, "<tt>\n");
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, newpart);
+ em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)newpart);
camel_stream_flush((CamelStream *)filtered_stream);
camel_stream_write_string(stream, "</tt>\n");
camel_stream_write_string(stream, "</div>\n");
@@ -807,7 +807,7 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
"<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px;\">\n",
efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff);
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, part);
+ em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_object_unref(filtered_stream);
camel_stream_write_string(stream, "</div>");
@@ -829,7 +829,7 @@ efh_write_text_html(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
camel_data_wrapper_write_to_stream(dw, out);
camel_object_unref(out);
#endif
- em_format_format_text(emf, stream, puri->part);
+ em_format_format_text(emf, stream, (CamelDataWrapper *)puri->part);
}
static void
@@ -985,7 +985,7 @@ efh_message_deliverystatus(EMFormatHTML *efh, CamelStream *stream, CamelMimePart
camel_object_unref(html_filter);
camel_stream_write_string(stream, "<tt>\n");
- em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, part);
+ em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_stream_flush((CamelStream *)filtered_stream);
camel_stream_write_string(stream, "</tt>\n");
@@ -1519,7 +1519,7 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
g_string_append_printf (out, "%s &lt;", name);
/* rfc2368 for mailto syntax and url encoding extras */
- if ((real = camel_header_encode_phrase (a->name))) {
+ if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) {
mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr);
g_free (real);
mailto = camel_url_encode (mailaddr, "?=&()");
@@ -1641,7 +1641,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
label = _(name);
html = g_string_new("");
- img = efh_format_address(efh, html, addrs, label);
+ img = efh_format_address(efh, html, addrs, (char *)label);
if (img) {
// str_field = g_strdup_printf ("<table><tr><td valign=top>%s</td><td valign=top><b>%s:</b></td></tr></table>", img, label);
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index 87fccaba55..dc23976089 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -56,7 +56,7 @@ static EMFormatClass *emfq_parent;
static void
emfq_init(GObject *o)
-{
+{
EMFormatQuote *emfq =(EMFormatQuote *) o;
emfq->priv = g_malloc0(sizeof(*emfq->priv));
@@ -220,7 +220,7 @@ emfq_format_address (GString *out, struct _camel_header_address *a)
g_string_append_printf (out, "%s &lt;", name);
/* rfc2368 for mailto syntax and url encoding extras */
- if ((real = camel_header_encode_phrase (a->name))) {
+ if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) {
mailaddr = g_strdup_printf ("%s <%s>", real, a->v.addr);
g_free (real);
mailto = camel_url_encode (mailaddr, "?=&()");
@@ -410,7 +410,7 @@ emfq_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
camel_stream_filter_add(filtered_stream, html_filter);
camel_object_unref(html_filter);
- em_format_format_text(emf, (CamelStream *)filtered_stream, part);
+ em_format_format_text(emf, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_object_unref(filtered_stream);
}
@@ -472,7 +472,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
camel_stream_filter_add(filtered_stream, html_filter);
camel_object_unref(html_filter);
- em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, part);
+ em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_stream_flush((CamelStream *)filtered_stream);
camel_object_unref(filtered_stream);
}
@@ -500,7 +500,7 @@ emfq_text_enriched(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part
camel_object_unref(enriched);
camel_stream_write_string(stream, "<br><hr><br>");
- em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, part);
+ em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_object_unref(filtered_stream);
}
@@ -508,7 +508,7 @@ static void
emfq_text_html(EMFormat *emf, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
camel_stream_write_string(stream, "\n<!-- text/html -->\n");
- em_format_format_text(emf, stream, part);
+ em_format_format_text(emf, stream, (CamelDataWrapper *)part);
}
static void
diff --git a/mail/em-format.c b/mail/em-format.c
index cb3f418e38..2260cf4e74 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -1021,7 +1021,7 @@ em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart *part
CamelDataWrapper *dw = camel_medium_get_content_object((CamelMedium *)part);
if (camel_content_type_is (dw->mime_type, "text", "*"))
- em_format_format_text(emf, stream, part);
+ em_format_format_text(emf, stream, (CamelDataWrapper *)part);
else
camel_data_wrapper_decode_to_stream(dw, stream);
}
@@ -1073,7 +1073,7 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
charset = emf->default_charset;
}
- mem_stream = (CamelStreamMem *)camel_stream_mem_new ();
+ mem_stream = (CamelStream *)camel_stream_mem_new ();
filter_stream = camel_stream_filter_new_with_stream(mem_stream);
if ((filter = camel_mime_filter_charset_new_convert(charset, "UTF-8"))) {
@@ -1226,7 +1226,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;
+ int i, nparts, bestid = 0;
CamelMimePart *best = NULL;
if (!CAMEL_IS_MULTIPART(mp)) {
@@ -1516,7 +1516,7 @@ emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, cons
static void
emf_message_deliverystatus(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info)
{
- em_format_format_text(emf, stream, part);
+ em_format_format_text(emf, stream, (CamelDataWrapper *)part);
}
static void
diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c
index 7fc69dbaa6..538133be06 100644
--- a/mail/em-icon-stream.c
+++ b/mail/em-icon-stream.c
@@ -143,7 +143,7 @@ emis_sync_write(CamelStream *stream, const char *buffer, size_t n)
if (emis->loader == NULL)
return -1;
- if (!gdk_pixbuf_loader_write(emis->loader, buffer, n, NULL)) {
+ if (!gdk_pixbuf_loader_write(emis->loader, (const unsigned char *)buffer, n, NULL)) {
emis_cleanup(emis);
return -1;
}
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index 9549b6b1bd..b8a40d05e6 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -135,7 +135,7 @@ emif_add_part(EMInlineFilter *emif, const char *data, int len)
else
encoding = emif_types[emif->state].encoding;
- g_byte_array_append(emif->data, data, len);
+ g_byte_array_append(emif->data, (unsigned char *)data, len);
/* check the part will actually have content */
if (emif->data->len <= 0) {
return;
@@ -327,7 +327,7 @@ 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, data_start, inend-data_start);
+ g_byte_array_append(emif->data, (unsigned char *)data_start, inend-data_start);
}
return 0;
diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c
index 52fa280588..bdac680584 100644
--- a/mail/em-junk-hook.c
+++ b/mail/em-junk-hook.c
@@ -222,7 +222,7 @@ emjh_construct_group(EPluginHook *eph, xmlNodePtr root)
/* We'll processs only the first item from xml file*/
while (node) {
- if (0 == strcmp(node->name, "item")) {
+ if (0 == strcmp((char *)node->name, "item")) {
struct _EMJunkHookItem *item;
item = emjh_construct_item(eph, group, node);
@@ -258,7 +258,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
node = root->children;
while (node) {
- if (strcmp(node->name, "group") == 0) {
+ if (strcmp((char *)node->name, "group") == 0) {
struct _EMJunkHookGroup *group;
group = emjh_construct_group(eph, node);
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 9c61eddfec..714ba82fbc 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -65,8 +65,6 @@ static void em_mailer_prefs_class_init (EMMailerPrefsClass *class);
static void em_mailer_prefs_init (EMMailerPrefs *dialog);
static void em_mailer_prefs_finalise (GObject *obj);
-GtkWidget * create_combo_text_widget ();
-
static GtkVBoxClass *parent_class = NULL;
enum {
@@ -190,7 +188,6 @@ labels_changed (EMMailerPrefs *prefs)
GSList *l, *n, *list = NULL;
const char *cstring;
char *string;
- guint32 rgb;
int i;
for (i = 4; i >= 0; i--) {
@@ -373,7 +370,7 @@ emmp_header_add_header (GtkWidget *widget, EMMailerPrefs *prefs)
GtkTreeIter iter;
const gchar *text = gtk_entry_get_text (prefs->entry_header);
- g_strstrip (text);
+ g_strstrip ((gchar *)text);
if (text && (strlen (text)>0)) {
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
@@ -507,6 +504,8 @@ toggle_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs)
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
}
+#if 0
+// not used at the moment, commenting out
static void
toggle_button_toggled_not (GtkToggleButton *toggle, EMMailerPrefs *prefs)
{
@@ -515,6 +514,7 @@ toggle_button_toggled_not (GtkToggleButton *toggle, EMMailerPrefs *prefs)
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, !gtk_toggle_button_get_active (toggle), NULL);
}
+#endif
static void
custom_font_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs)
@@ -761,7 +761,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(combo);
+ char *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);
@@ -769,10 +769,9 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
struct _EMJunkHookItem *item = plugins->data;;
if (item->plugin_name && def_plugin && !strcmp (item->plugin_name, def_plugin)) {
- gboolean status;
session->junk_plugin = CAMEL_JUNK_PLUGIN (&(item->csp));
- status = e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
- if (status) {
+ void *status = e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
+ if ((gboolean)status == TRUE) {
char *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);
@@ -803,12 +802,12 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
const GList *plugins = mail_session_get_junk_plugins();
char *pdefault = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
- if (!plugins || !g_list_length (plugins)) {
- gtk_combo_box_append_text (combo, _("No Junk plugin available"));
- gtk_combo_box_set_active (combo, 0);
- gtk_widget_set_sensitive ((GtkWidget *) combo, FALSE);
- gtk_widget_hide (prefs->plugin_image);
- gtk_widget_hide (prefs->plugin_status);
+ if (!plugins || !g_list_length ((GList *)plugins)) {
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("No Junk plugin available"));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
+ gtk_widget_set_sensitive (GTK_WIDGET (combo), FALSE);
+ gtk_widget_hide (GTK_WIDGET (prefs->plugin_image));
+ gtk_widget_hide (GTK_WIDGET (prefs->plugin_status));
gtk_image_set_from_stock (prefs->plugin_image, NULL, 0);
g_free (pdefault);
@@ -818,13 +817,13 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
while (plugins) {
struct _EMJunkHookItem *item = plugins->data;;
- gtk_combo_box_append_text (combo, item->plugin_name);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (combo), item->plugin_name);
if (!def_set && pdefault && item->plugin_name && !strcmp(pdefault, item->plugin_name)) {
gboolean status;
def_set = TRUE;
- gtk_combo_box_set_active (combo, index);
- status = e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index);
+ status = (gboolean)e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
if (status) {
char *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
@@ -1143,7 +1142,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 (default_headers[i], "x-evolution-mailer") != 0;
+ h->enabled = strcmp ((char *)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);
}
@@ -1211,7 +1210,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
prefs->default_junk_plugin = GTK_COMBO_BOX (glade_xml_get_widget (gui, "default_junk_plugin"));
prefs->plugin_status = GTK_LABEL (glade_xml_get_widget (gui, "plugin_status"));
prefs->plugin_image = GTK_IMAGE (glade_xml_get_widget (gui, "plugin_image"));
- junk_plugin_setup (prefs->default_junk_plugin, prefs);
+ junk_plugin_setup (GTK_WIDGET (prefs->default_junk_plugin), prefs);
/* get our toplevel widget */
target = em_config_target_new_prefs(ec, prefs->gconf);
@@ -1243,18 +1242,18 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
return NULL;
root = doc->children;
- if (strcmp (root->name, "header") != 0)
+ if (strcmp ((char *)root->name, "header") != 0)
return NULL;
- name = xmlGetProp (root, "name");
+ name = xmlGetProp (root, (const unsigned char *)"name");
if (name == NULL)
return NULL;
h = g_malloc0 (sizeof (struct _EMMailerPrefsHeader));
- h->name = g_strdup (name);
+ h->name = g_strdup ((gchar *)name);
xmlFree (name);
- if (xmlHasProp (root, "enabled"))
+ if (xmlHasProp (root, (const unsigned char *)"enabled"))
h->enabled = 1;
else
h->enabled = 0;
@@ -1277,7 +1276,7 @@ em_mailer_prefs_header_from_xml (const char *xml)
struct _EMMailerPrefsHeader *header;
xmlDocPtr doc;
- if (!(doc = xmlParseDoc ((char *) xml)))
+ if (!(doc = xmlParseDoc ((unsigned char *) xml)))
return NULL;
header = emmp_header_from_xmldoc (doc);
@@ -1322,12 +1321,12 @@ em_mailer_prefs_header_to_xml (struct _EMMailerPrefsHeader *header)
g_return_val_if_fail (header != NULL, NULL);
g_return_val_if_fail (header->name != NULL, NULL);
- doc = xmlNewDoc ("1.0");
+ doc = xmlNewDoc ((const unsigned char *)"1.0");
- root = xmlNewDocNode (doc, NULL, "header", NULL);
- xmlSetProp (root, "name", header->name);
+ root = xmlNewDocNode (doc, NULL, (const unsigned char *)"header", NULL);
+ xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)header->name);
if (header->enabled)
- xmlSetProp (root, "enabled", NULL);
+ xmlSetProp (root, (const unsigned char *)"enabled", NULL);
xmlDocSetRootElement (doc, root);
xmlDocDumpMemory (doc, &xml, &size);
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index 6426e3fd41..09dc7811cb 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -142,6 +142,7 @@ struct _EMMailerPrefsClass {
};
GtkType em_mailer_prefs_get_type (void);
+GtkWidget * create_combo_text_widget ();
struct _GtkWidget *em_mailer_prefs_new (void);
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index b6d4d7d1b8..09aa497b61 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -118,7 +118,7 @@ xml_find_node (xmlNodePtr parent, const char *name)
node = parent->children;
while (node != NULL) {
- if (node->name && !strcmp (node->name, name))
+ if (node->name && !strcmp ((char *)node->name, name))
return node;
node = node->next;
@@ -136,7 +136,7 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
- if (!root->name || strcmp (root->name, "filteroptions") != 0) {
+ if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
@@ -148,27 +148,27 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp (node->name, "rule")) {
+ if (node->name && !strcmp ((char *)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 (part->name, "part")) {
+ if (part->name && !strcmp ((char *)part->name, "part")) {
val = part->children;
while (val != NULL) {
- if (val->name && !strcmp (val->name, "value")) {
+ if (val->name && !strcmp ((char *)val->name, "value")) {
char *type;
- type = xmlGetProp (val, "type");
- if (type && !strcmp (type, "folder")) {
+ type = (char *)xmlGetProp (val, (const unsigned char *)"type");
+ if (type && !strcmp ((char *)type, "folder")) {
if ((n = xml_find_node (val, "folder"))) {
- uri = xmlGetProp (n, "uri");
+ uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
- xmlSetProp (n, "uri", new);
+ xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
g_free (new);
}
}
@@ -186,12 +186,12 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
/* vfolders.xml */
n = actionset->children;
while (n != NULL) {
- if (n->name && !strcmp (n->name, "folder")) {
- uri = xmlGetProp (n, "uri");
+ if (n->name && !strcmp ((char *)n->name, "folder")) {
+ uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
- xmlSetProp (n, "uri", new);
+ xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
g_free (new);
}
@@ -324,7 +324,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 (folder, "INBOX") != 0)
+ if (ai->u.imap.namespace && strcmp ((char *)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);
@@ -522,11 +522,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 = xmlGetProp (node, "value"))) {
+ if (node && (val = (char *)xmlGetProp (node, (const unsigned char *)"value"))) {
tmp = e_bconf_hex_decode (val);
xmlFree (val);
if (strncmp (tmp, "exchanget:", 10) == 0)
- xmlSetProp (node, "value", rawuri);
+ xmlSetProp (node, (const unsigned char *)"value", (unsigned char *)rawuri);
g_free (tmp);
} else {
d(printf (" couldn't find transport uri?\n"));
@@ -631,17 +631,17 @@ static char *
utf8_reencode (const char *txt)
{
GString *out = g_string_new ("");
- const unsigned char *p;
+ gchar *p;
char *res;
/* convert:
libxml1 8 bit utf8 converted to xml entities byte-by-byte chars -> utf8 */
- p = (const unsigned char *) txt;
+ p = (gchar *)txt;
while (*p) {
- g_string_append_c (out,(char) g_utf8_get_char (p));
- p = g_utf8_next_char (p);
+ g_string_append_c (out, (gchar)g_utf8_get_char ((const gchar *)p));
+ p = (gchar *)g_utf8_next_char (p);
}
res = out->str;
@@ -677,18 +677,18 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
/* upgrades the content of a node, if the node has a specific parent/node name */
for (i = 0; tags[i].name; i++) {
- if (!strcmp (node->name, tags[i].name)) {
+ if (!strcmp ((char *)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 (work->name, tags[i].tags[j])) {
- txt = xmlNodeGetContent (work);
+ if (!strcmp ((char *)work->name, tags[i].tags[j])) {
+ txt = (char *)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, tmp);
+ xmlNodeSetContent (work, (unsigned char *)tmp);
g_free (tmp);
}
xmlFree (txt);
@@ -701,11 +701,11 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
if (tags[i].props != NULL) {
for (j = 0; tags[i].props[j]; j++) {
- txt = xmlGetProp (node, tags[i].props[j]);
+ txt = (char *)xmlGetProp (node, (unsigned char *)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, tags[i].props[j], tmp);
+ xmlSetProp (node, (const unsigned char *)tags[i].props[j], (unsigned char *)tmp);
g_free (tmp);
xmlFree (txt);
}
@@ -752,15 +752,15 @@ upgrade_passwords_1_2(void)
return 0;
root = priv_doc->children;
- if (strcmp(root->name, "bonobo-config") != 0) {
+ if (strcmp((char *)root->name, "bonobo-config") != 0) {
xmlFreeDoc(priv_doc);
return 0;
}
root = root->children;
while (root) {
- if (!strcmp(root->name, "section")) {
- char *path = xmlGetProp(root, "path");
+ if (!strcmp((char *)root->name, "section")) {
+ char *path = (char *)xmlGetProp(root, (const unsigned char *)"path");
/* All sections of form
<section path="/Passwords/COMPONENT">
@@ -772,8 +772,9 @@ upgrade_passwords_1_2(void)
if (path && !strncmp(path, "/Passwords/", 11)) {
entry = root->children;
while (entry) {
- if (!strcmp(entry->name, "entry")) {
- char *namep = xmlGetProp(entry, "name"), *valuep = xmlGetProp(entry, "value");
+ if (!strcmp((char *)entry->name, "entry")) {
+ char *namep = (char *)xmlGetProp(entry, (const unsigned char *)"name"),
+ *valuep = (char *)xmlGetProp(entry, (const unsigned char *)"value");
if (namep && valuep) {
char *value = e_bconf_hex_decode(valuep);
@@ -1282,7 +1283,7 @@ is_mail_folder (const char *metadata)
return FALSE;
}
- if (!node->name || strcmp (node->name, "efolder") != 0) {
+ if (!node->name || strcmp ((char *)node->name, "efolder") != 0) {
g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
xmlFreeDoc (doc);
return FALSE;
@@ -1290,9 +1291,9 @@ is_mail_folder (const char *metadata)
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp (node->name, "type")) {
- type = xmlNodeGetContent (node);
- if (!strcmp (type, "mail")) {
+ if (node->name && !strcmp ((char *)node->name, "type")) {
+ type = (char *)xmlNodeGetContent (node);
+ if (!strcmp ((char *)type, "mail")) {
xmlFreeDoc (doc);
xmlFree (type);
@@ -1337,12 +1338,12 @@ get_local_et_expanded (const char *dirname)
g_free (buf);
- if (!(node = xmlDocGetRootElement (doc)) || strcmp (node->name, "expanded_state") != 0) {
+ if (!(node = xmlDocGetRootElement (doc)) || strcmp ((char *)node->name, "expanded_state") != 0) {
xmlFreeDoc (doc);
return -1;
}
- if (!(buf = xmlGetProp (node, "default"))) {
+ if (!(buf = (char *)xmlGetProp (node, (const unsigned char *)"default"))) {
xmlFreeDoc (doc);
return -1;
}
@@ -1381,24 +1382,24 @@ get_local_store_uri (const char *dirname, char **namep, int *indexp)
goto nofile;
node = doc->children;
- if (strcmp(node->name, "folderinfo"))
+ if (strcmp((char *)node->name, "folderinfo"))
goto dodefault;
for (node = node->children; node; node = node->next) {
- if (node->name && !strcmp (node->name, "folder")) {
- tmp = xmlGetProp (node, "type");
+ if (node->name && !strcmp ((char *)node->name, "folder")) {
+ tmp = (char *)xmlGetProp (node, (const unsigned char *)"type");
if (tmp) {
protocol = alloca(strlen(tmp)+1);
strcpy(protocol, tmp);
xmlFree(tmp);
}
- tmp = xmlGetProp (node, "name");
+ tmp = (char *)xmlGetProp (node, (const unsigned char *)"name");
if (tmp) {
name = alloca(strlen(tmp)+1);
strcpy(name, tmp);
xmlFree(tmp);
}
- tmp = xmlGetProp (node, "index");
+ tmp = (char *)xmlGetProp (node, (const unsigned char *)"index");
if (tmp) {
index = atoi(tmp);
xmlFree(tmp);
@@ -1939,7 +1940,7 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
- if (!root->name || strcmp (root->name, "filteroptions") != 0) {
+ if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
@@ -1951,19 +1952,19 @@ upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
node = node->children;
while (node != NULL) {
- if (node->name && !strcmp (node->name, "rule")) {
+ if (node->name && !strcmp ((char *)node->name, "rule")) {
xmlNodePtr sources;
char *src;
- if (!(src = xmlGetProp (node, "source")))
- src = xmlStrdup ("local"); /* default to all local folders? */
+ if (!(src = (char *)xmlGetProp (node, (const unsigned char *)"source")))
+ src = (char *)xmlStrdup ((const unsigned char *)"local"); /* default to all local folders? */
- xmlSetProp (node, "source", "incoming");
+ xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming");
if (!(sources = xml_find_node (node, "sources")))
- sources = xmlNewChild (node, NULL, "sources", NULL);
+ sources = xmlNewChild (node, NULL, (const unsigned char *)"sources", NULL);
- xmlSetProp (sources, "with", src);
+ xmlSetProp (sources, (const unsigned char *)"with", (unsigned char *)src);
xmlFree (src);
}
@@ -2289,7 +2290,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 (dent->d_name, "galview.xml")) {
+ if (!strcmp (ext, ".galview") || !strcmp ((char *)dent->d_name, "galview.xml")) {
/* just copy the file */
filename = dent->d_name;
goto copy;
@@ -2297,9 +2298,9 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
continue;
}
- if (!strncmp (dent->d_name, "current_view-", 13)) {
+ if (!strncmp ((const char *)dent->d_name, "current_view-", 13)) {
prelen = 13;
- } else if (!strncmp (dent->d_name, "custom_view-", 12)) {
+ } else if (!strncmp ((const char *)dent->d_name, "custom_view-", 12)) {
prelen = 12;
} else {
/* huh? wtf is this file? */
@@ -2528,7 +2529,7 @@ remove_system_searches(xmlDocPtr searches)
* searchtypes.xml file instead */
node = xmlDocGetRootElement(searches);
- if (!node->name || strcmp(node->name, "filteroptions"))
+ if (!node->name || strcmp((char *)node->name, "filteroptions"))
return;
if (!(node = xml_find_node(node, "ruleset")))
@@ -2538,11 +2539,11 @@ remove_system_searches(xmlDocPtr searches)
while (node != NULL) {
xmlNodePtr nnode = node->next;
- if (node->name && !strcmp (node->name, "rule")) {
+ if (node->name && !strcmp ((char *)node->name, "rule")) {
char *src;
- src = xmlGetProp(node, "source");
- if (src && !strcmp(src, "demand")) {
+ src = (char *)xmlGetProp(node, (unsigned char *)"source");
+ if (src && !strcmp((char *)src, "demand")) {
xmlUnlinkNode(node);
xmlFreeNodeList(node);
}
@@ -2645,7 +2646,7 @@ emm_setup_initial(const char *evolution_dir)
{
GDir *dir;
const char *d;
- char *local, *base;
+ char *local = NULL, *base;
const gchar * const *language_names;
/* special-case - this means brand new install of evolution */
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 522eab0f83..ff99c6d2ff 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -943,7 +943,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 = camel_stream_mem_new_with_buffer(data->data, data->length);
+ stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)data->data, data->length);
em_utils_read_messages_from_stream(folder, stream);
camel_object_unref(stream);
}
@@ -966,7 +966,7 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder)
return;
ex = camel_exception_new();
- stream = camel_stream_mem_new_with_buffer(data->data, data->length);
+ stream = (CamelStream *)camel_stream_mem_new_with_buffer((char *)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);
@@ -993,7 +993,7 @@ em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArra
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */
- g_byte_array_append(array, uri, strlen(uri)+1);
+ g_byte_array_append(array, (unsigned char *)uri, strlen(uri)+1);
for (i=0; i<uids->len; i++)
g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1);
@@ -1024,8 +1024,8 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
uids = g_ptr_array_new();
- inptr = data->data;
- inend = data->data + data->length;
+ inptr = (char *)data->data;
+ inend = (char *)(data->data + data->length);
while (inptr < inend) {
char *start = inptr;
@@ -1043,7 +1043,7 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
return;
}
- folder = mail_tool_uri_to_folder(data->data, 0, ex);
+ folder = mail_tool_uri_to_folder((char *)data->data, 0, ex);
if (folder) {
camel_folder_transfer_messages_to(folder, uids, dest, NULL, move, ex);
camel_object_unref(folder);
@@ -1110,7 +1110,7 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
/* terminate with \r\n to be compliant with the spec */
char *uri_crlf = g_strconcat(uri, "\r\n", NULL);
- gtk_selection_data_set(data, data->target, 8, uri_crlf, strlen(uri_crlf));
+ gtk_selection_data_set(data, data->target, 8, (unsigned char *)uri_crlf, strlen(uri_crlf));
g_free(uri_crlf);
}
@@ -1141,7 +1141,7 @@ em_utils_selection_get_urilist(GtkSelectionData *data, CamelFolder *folder)
d(printf(" * drop uri list\n"));
- tmp = g_strndup(data->data, data->length);
+ tmp = g_strndup((char *)data->data, data->length);
uris = g_strsplit(tmp, "\n", 0);
g_free(tmp);
for (i=0;res == 0 && uris[i];i++) {
@@ -1494,7 +1494,7 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source)
camel_stream_write((CamelStream *) mem, "", 1);
camel_object_unref(mem);
- text = buf->data;
+ text = (char *)buf->data;
if (len)
*len = buf->len-1;
g_byte_array_free (buf, FALSE);
@@ -1549,7 +1549,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
camel_stream_write((CamelStream *)mem, "", 1);
camel_object_unref(mem);
- text = buf->data;
+ text = (char *)buf->data;
if (len)
*len = buf->len-1;
g_byte_array_free(buf, FALSE);
diff --git a/mail/em-utils.h b/mail/em-utils.h
index 3f3da78650..565011a4d0 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -53,6 +53,7 @@ gboolean em_utils_configure_account (struct _GtkWidget *parent);
gboolean em_utils_check_user_can_send_mail (struct _GtkWidget *parent);
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);
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index d7fa9c9806..f8dbf8e593 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -259,13 +259,13 @@ xml_encode(FilterRule *fr)
node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
g_assert(node != NULL);
g_assert(vr->with >= 0 && vr->with < sizeof(with_names)/sizeof(with_names[0]));
- set = xmlNewNode(NULL, "sources");
+ set = xmlNewNode(NULL, (const unsigned char *)"sources");
xmlAddChild(node, set);
- xmlSetProp(set, "with", with_names[vr->with]);
+ xmlSetProp(set, (const unsigned char *)"with", (unsigned char *)with_names[vr->with]);
l = vr->sources;
while (l) {
- work = xmlNewNode(NULL, "folder");
- xmlSetProp(work, "uri", l->data);
+ work = xmlNewNode(NULL, (const unsigned char *)"folder");
+ xmlSetProp(work, (const unsigned char *)"uri", (unsigned char *)l->data);
xmlAddChild(set, work);
l = l->next;
}
@@ -309,16 +309,16 @@ xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
set = node->children;
while (set) {
- if (!strcmp(set->name, "sources")) {
- tmp = xmlGetProp(set, "with");
+ if (!strcmp((char *)set->name, "sources")) {
+ tmp = (char *)xmlGetProp(set, (const unsigned char *)"with");
if (tmp) {
set_with(vr, tmp);
xmlFree(tmp);
}
work = set->children;
while (work) {
- if (!strcmp(work->name, "folder")) {
- tmp = xmlGetProp(work, "uri");
+ if (!strcmp((char *)work->name, "folder")) {
+ tmp = (char *)xmlGetProp(work, (const unsigned char *)"uri");
if (tmp) {
vr->sources = g_list_append(vr->sources, g_strdup(tmp));
xmlFree(tmp);
@@ -413,7 +413,7 @@ select_source(GtkWidget *list, struct _source_data *data)
static void
select_source_with_changed(GtkWidget *widget, struct _source_data *data)
{
- em_vfolder_rule_with_t with;
+ em_vfolder_rule_with_t with = 0;
GSList *group = NULL;
gint i = 0;
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index 8ad5ddef01..62d3b9feae 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -235,7 +235,7 @@ import_mbox_import(struct _mail_msg *mm)
while (camel_mime_parser_step(mp, 0, 0) == CAMEL_MIME_PARSER_STATE_FROM) {
CamelMimeMessage *msg;
const char *tmp;
- int pc;
+ int pc = 0;
guint32 flags = 0;
if (st.st_size > 0)
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 804788912f..55aed76606 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -717,7 +717,7 @@ impl_createView (PortableServer_Servant servant,
if ((uri = em_folder_tree_model_get_selected (priv->model))) {
em_folder_tree_set_selected ((EMFolderTree *) tree_widget, uri);
- em_folder_view_set_folder_uri (view_widget, uri);
+ em_folder_view_set_folder_uri ((EMFolderView *) view_widget, uri);
g_free (uri);
}
@@ -1093,7 +1093,7 @@ setline_check(void *key, void *value, void *data)
int
status_check (GNOME_Evolution_ShellState shell_state)
{
- int status;
+ int status = 0;
switch (shell_state)
{
diff --git a/mail/mail-config.c b/mail/mail-config.c
index d304a5d7f6..e85661bf53 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1130,7 +1130,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 (buffer->data, buffer->len, NULL)) {
+ if (!g_utf8_validate ((char *)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 ());
@@ -1156,8 +1156,8 @@ mail_config_signature_run_script (const char *script)
camel_object_unref (memstream);
- g_byte_array_append (buffer, "", 1);
- content = buffer->data;
+ g_byte_array_append (buffer, (const unsigned char *)"", 1);
+ content = (char *)buffer->data;
g_byte_array_free (buffer, FALSE);
/* wait for the script process to terminate */
diff --git a/mail/mail-session.c b/mail/mail-session.c
index f59d6dabdd..0a7b0d7f06 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -729,7 +729,7 @@ mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plu
ms->junk_plugins = g_list_append(ms->junk_plugins, junk_plugin);
if (def_plugin && plugin_name) {
if (!strcmp(def_plugin, plugin_name)) {
- printf("Loading %s as the default junk plugin\n");
+ printf("Loading %s as the default junk plugin\n", def_plugin);
session->junk_plugin = junk_plugin;
}
}
diff --git a/mail/mail-signature-editor.c b/mail/mail-signature-editor.c
index eba4bf0bef..011f9f7a05 100644
--- a/mail/mail-signature-editor.c
+++ b/mail/mail-signature-editor.c
@@ -108,7 +108,7 @@ get_text (Bonobo_PersistStream persist, const char *format, CORBA_Environment *e
stream_mem = BONOBO_STREAM_MEM (stream);
text = g_byte_array_new ();
- g_byte_array_append (text, stream_mem->buffer, stream_mem->pos);
+ g_byte_array_append (text, (unsigned char *)stream_mem->buffer, stream_mem->pos);
bonobo_object_unref (BONOBO_OBJECT (stream));
return text;
@@ -172,7 +172,7 @@ menu_file_save_cb (BonoboUIComponent *uic, void *user_data, const char *path)
goto exception;
}
- if (write_all (fd, text->data, text->len) == -1) {
+ if (write_all (fd, (char *)text->data, text->len) == -1) {
g_byte_array_free (text, TRUE);
close (fd);
goto exception;
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 195a02fe18..69617b14f9 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -110,7 +110,7 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
char *path, *full;
struct stat st;
- safe_uri = g_strdup (uri);
+ safe_uri = (unsigned char *)g_strdup ((const gchar *)uri);
for (c = safe_uri; *c; c++)
if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((int) *c))
*c = '_';
@@ -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 (source_url, ex);
+ dest_path = mail_tool_get_local_movemail_path ((unsigned char *)source_url, ex);
if (dest_path == NULL)
return NULL;
diff --git a/mail/message-list.c b/mail/message-list.c
index dee6147f88..7147961c1b 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -361,7 +361,7 @@ address_compare (gconstpointer address1, gconstpointer address2)
e_mail_address_free (addr1);
e_mail_address_free (addr2);
#else
- retval = strcmp ((const char *) address1, (const char *) address2);
+ retval = strcmp ((char *) address1, (char *) address2);
#endif /* SMART_ADDRESS_COMPARE */
return retval;
@@ -459,7 +459,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
const unsigned char *subject;
subject = (const unsigned char *) string;
- while (!g_ascii_strncasecmp (subject, "Re:", 3)) {
+ while (!g_ascii_strncasecmp ((char *)subject, "Re:", 3)) {
subject += 3;
/* jump over any spaces */
@@ -1749,6 +1749,7 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing)
if (message_list->folder) {
char *path;
char *name;
+ int data = 1;
struct stat st;
ETableItem *item = e_tree_get_item (message_list->tree);
@@ -1760,7 +1761,7 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing)
d(printf ("folder name is '%s'\n", name));
path = mail_config_folder_to_cachename (message_list->folder, "et-expanded-");
- g_object_set_data (G_OBJECT (((GnomeCanvasItem *) item)->canvas), "freeze-cursor", 1);
+ g_object_set_data (G_OBJECT (((GnomeCanvasItem *) item)->canvas), "freeze-cursor", &data);
if (path && g_stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) {
/* build based on saved file */
@@ -3640,7 +3641,7 @@ load_hide_state (MessageList *ml)
{
char *filename;
FILE *in;
- guint32 version, lower, upper;
+ gint32 version, lower, upper;
MESSAGE_LIST_LOCK(ml, hide_lock);
if (ml->hidden) {
diff --git a/mail/message-list.h b/mail/message-list.h
index 96283afc66..21e4e168f6 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -218,6 +218,7 @@ void message_list_set_threaded (MessageList *ml, gboolean threaded);
void message_list_set_threaded_expand_all (MessageList *ml);
void message_list_set_threaded_collapse_all (MessageList *ml);
+void message_list_set_expand_all (MessageList *ml, gboolean threaded);
void message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted);
void message_list_set_search (MessageList *ml, const char *search);