aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/em-composer-utils.c6
-rw-r--r--mail/em-folder-tree.c24
-rw-r--r--mail/em-folder-utils.c3
-rw-r--r--mail/em-format.c2
-rw-r--r--mail/em-mailer-prefs.c6
6 files changed, 32 insertions, 22 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3ed9f52111..f2e16cbb9d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,16 @@
+2007-09-07 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #473903
+
+ * em-folder-utils.c: (new_folder_created_cb),
+ (emfu_popup_new_folder_response):
+ * em-folder-tree.c: (get_last_child),
+ (em_folder_tree_select_prev_path):
+ * em-composer-utils.c: (composer_get_message):
+ * em-format.c: (em_format_add_puri):
+ * em-mailer-prefs.c: (junk_plugin_changed), (junk_plugin_setup):
+ Fixes serious compiler warnings.
+
2007-09-06 Andre Klapper <a9016009@gmx.de>
* mail-config.c: (config_cache_labels):
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index b238d05b22..0d4c056450 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -257,7 +257,7 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
int i;
GList *postlist;
EMEvent *eme;
- EMEventTargetMessage *target;
+ EMEventTargetComposer *target;
gconf = mail_config_get_gconf_client ();
@@ -367,11 +367,11 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
*/
eme = em_event_peek();
target = em_event_target_new_composer (eme, composer, 0);
- g_object_set_data (composer, "presend_check_status", GINT_TO_POINTER(0));
+ g_object_set_data (G_OBJECT (composer), "presend_check_status", GINT_TO_POINTER(0));
e_event_emit((EEvent *)eme, "composer.presendchecks", (EEventTarget *)target);
- if (GPOINTER_TO_INT (g_object_get_data (composer, "presend_check_status")))
+ if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (composer), "presend_check_status")))
goto finished;
/* actually get the message now, this will sign/encrypt etc */
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index a3d6199790..fa0955a832 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2378,21 +2378,15 @@ get_last_child (GtkTreeModel *model, GtkTreeIter *iter)
gboolean has_child = gtk_tree_model_iter_has_child (model, iter);
if (gtk_tree_model_iter_next (model, iter)) {
- get_last_child (model, iter);
- } else {
-
- if (has_child) {
- /* Pick the last one */
- int nchildren = gtk_tree_model_iter_n_children (model, iter);
- gtk_tree_model_iter_nth_child ( model, child, iter, nchildren-1);
- get_last_child (model, child);
- }
- else {
- return *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);
+ gtk_tree_model_iter_nth_child ( model, child, iter, nchildren-1);
+ return get_last_child (model, child);
}
-//TODO : The function should return the value here !!
+
+ return *iter;
}
void
@@ -2401,7 +2395,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter, child;
- GtkTreePath *path, *current_path = NULL;
+ GtkTreePath *path = NULL, *current_path = NULL;
unsigned int unread = 0;
struct _EMFolderTreePrivate *priv = emft->priv;
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 66935aedd8..3fe2587195 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -678,6 +678,7 @@ new_folder_created_cb (CamelFolderInfo *fi, void *user_data)
em_folder_tree_set_selected ((EMFolderTree *) emcftd->emft, emcftd->uri, GPOINTER_TO_INT(g_object_get_data ((GObject *)emcftd->emft, "select")) ? FALSE : TRUE);
}
g_object_unref (emcftd->emfs);
+ g_free (emcftd->uri);
g_free (emcftd);
}
@@ -725,7 +726,7 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer d
/* Temp data to pass to create_folder_real function */
emcftd = (struct _EMCreateFolderTempData *) g_malloc(sizeof(struct _EMCreateFolderTempData));
emcftd->emfs = emfs;
- emcftd->uri = uri;
+ emcftd->uri = g_strdup (uri);
emcftd->emft = (EMFolderTree *) data;
g_object_ref (emfs);
diff --git a/mail/em-format.c b/mail/em-format.c
index 994e077bd3..f22cc1a577 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -334,7 +334,7 @@ em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *p
d(printf("adding puri for part: %s\n", emf->part_id->str));
if (size < sizeof(*puri)) {
- g_warning ("size (%d) less than size of puri\n", size);
+ g_warning ("size (%ld) less than size of puri\n", size);
size = sizeof (*puri);
}
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 1951b79ea2..a8f64a5728 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -779,8 +779,10 @@ 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));
- void *status = e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
+ status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL;
if ((gboolean)status == TRUE) {
char *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
@@ -833,7 +835,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
def_set = TRUE;
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index);
- status = (gboolean)e_plugin_invoke(item->hook->hook.plugin, item->validate_binary, NULL);
+ status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL;
if (status) {
char *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);