* src/modest-tny-account-store.c:
[modest] / src / maemo / modest-msg-edit-window.c
index aab42cb..efbc641 100644 (file)
@@ -1008,6 +1008,7 @@ replace_with_images (ModestMsgEditWindow *self, TnyList *attachments)
                }
                g_object_unref (part);
        }
+       g_object_unref (iter);
 }
 
 static void
@@ -1085,6 +1086,7 @@ update_last_cid (ModestMsgEditWindow *self, TnyList *attachments)
                }
                g_object_unref (part);
        }
+       g_object_unref (iter);
 }
 
 static void
@@ -1484,6 +1486,7 @@ modest_msg_edit_window_new (TnyMsg *msg, const gchar *account_name, gboolean pre
        g_object_unref (toolbar_rules_group);
        g_object_unref (clipboard_rules_group);
        gtk_widget_show_all (GTK_WIDGET (obj));
+       modest_msg_edit_window_clipboard_owner_change (NULL, NULL, MODEST_MSG_EDIT_WINDOW (obj));
 
        set_msg (MODEST_MSG_EDIT_WINDOW (obj), msg, preserve_is_rich);
 
@@ -1628,6 +1631,7 @@ modest_msg_edit_window_get_msg_data (ModestMsgEditWindow *edit_window)
                g_object_unref (part);
                tny_iterator_next (att_iter);
        }
+       g_object_unref (att_iter);
        
        data->priority_flags = priv->priority_flags;
 
@@ -2196,14 +2200,16 @@ modest_msg_edit_window_attach_file_one (
                ModestMsgEditWindow *window,
                const gchar *uri)
 {
+       GnomeVFSHandle *handle = NULL;
+       ModestMsgEditWindowPrivate *priv;
+       GnomeVFSResult result;
+
        g_return_if_fail (window);
        g_return_if_fail (uri);
                
-       ModestMsgEditWindowPrivate *priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window);
-       
+       priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window);
        
-       GnomeVFSHandle *handle = NULL;
-       GnomeVFSResult result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ);
+       result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ);
        if (result == GNOME_VFS_OK) {
                TnyMimePart *mime_part;
                TnyStream *stream;
@@ -2336,6 +2342,7 @@ modest_msg_edit_window_remove_attachments (ModestMsgEditWindow *window,
                        gtk_text_buffer_set_modified (priv->text_buffer, TRUE);
                        g_object_unref (mime_part);
                }
+               g_object_unref (iter);
        }
 
        g_object_unref (att_list);