aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--em-format/e-mail-part-list.c31
-rw-r--r--em-format/e-mail-part-list.h4
-rw-r--r--mail/e-mail-reader-utils.c3
3 files changed, 1 insertions, 37 deletions
diff --git a/em-format/e-mail-part-list.c b/em-format/e-mail-part-list.c
index 58ad7aa09d..38beeea6e2 100644
--- a/em-format/e-mail-part-list.c
+++ b/em-format/e-mail-part-list.c
@@ -150,34 +150,3 @@ e_mail_part_list_get_registry (void)
return registry;
}
-
-static void
-part_list_weak_ref_notify (gchar *mail_uri,
- EMailPartList *part_list)
-{
- CamelObjectBag *reg = e_mail_part_list_get_registry ();
-
- camel_object_bag_remove (reg, part_list);
-}
-
-/**
- * e_mail_part_list_registry_add:
- *
- * This method should be used to add a new @part_list to the
- * #CamelObjectBag registry. It will automatically handle removing
- * the @part_list from the bag when it's destroyed.
- *
- * The @registry don't take any reference to the @part_list.
- */
-void
-e_mail_part_list_registry_add (CamelObjectBag *registry,
- const gchar *mail_uri,
- EMailPartList *part_list)
-{
- camel_object_bag_add (registry, mail_uri, part_list);
-
- g_object_weak_ref (
- G_OBJECT (part_list),
- (GWeakNotify) part_list_weak_ref_notify,
- g_strdup (mail_uri));
-}
diff --git a/em-format/e-mail-part-list.h b/em-format/e-mail-part-list.h
index d0c2055b31..c6f952eab3 100644
--- a/em-format/e-mail-part-list.h
+++ b/em-format/e-mail-part-list.h
@@ -74,10 +74,6 @@ GSList * e_mail_part_list_get_iter (GSList *list,
CamelObjectBag *
e_mail_part_list_get_registry (void);
-void e_mail_part_list_registry_add (CamelObjectBag *registry,
- const gchar *mail_uri,
- EMailPartList *part_list);
-
G_END_DECLS
#endif /* E_MAIL_PART_LIST_H_ */
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index 5bd4bd2ab2..3710795466 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -1580,9 +1580,8 @@ mail_reader_parse_message_run (GSimpleAsyncResult *simple,
if (!part_list) {
camel_object_bag_abort (registry, mail_uri);
} else {
- e_mail_part_list_registry_add (
+ camel_object_bag_add (
registry, mail_uri, part_list);
- g_object_ref (part_list);
}
}