* fix to comply with tinymail changes (I made patch for tinymail,
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 9 Aug 2006 13:21:35 +0000 (13:21 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 9 Aug 2006 13:21:35 +0000 (13:21 +0000)
  which has not been applied yet). This is 'downward compatible'
  with the new old tinymail though

pmo-trunk-r470

src/modest-tny-msg-actions.c
src/modest-tny-msg-actions.h

index 60b3efc..54049ac 100644 (file)
@@ -154,8 +154,9 @@ modest_tny_msg_actions_find_nth_part (TnyMsgIface *msg, gint index)
        iter  = tny_list_iface_create_iterator ((TnyListIface*)parts);
        if (!tny_iterator_iface_has_first(iter))
                return NULL;
-
-       part = TNY_MIME_PART_IFACE(tny_iterator_iface_nth (iter, index));
+       
+       tny_iterator_iface_nth (iter, index);
+       part = TNY_MIME_PART_IFACE(tny_iterator_iface_current (iter));
 
        g_object_unref (G_OBJECT(iter));
        g_object_unref (G_OBJECT(parts));
index 65c6d88..09c478d 100644 (file)
@@ -68,7 +68,7 @@ TnyMimePartIface *modest_tny_msg_actions_find_body_part (TnyMsgIface * self, gbo
  * 
  * search for the nth (mime) part in the message
  * 
- * Returns: the TnyMsgMimePartIface for the found part, or NULL if no matching part is found
+ * Returns: the TnyMsgMimePartIface for the found part, or NULL if no matching part is foundi; must be unref'd
  */
 TnyMimePartIface * modest_tny_msg_actions_find_nth_part (TnyMsgIface *msg, gint index);