From c025ffbb296501d2da8cba78aa6a14008055cf87 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 16 May 2013 13:10:26 -0400 Subject: Add e_mail_part_get_id(). --- mail/e-mail-display.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'mail/e-mail-display.c') diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c index 00c5d2df4f..b899ca46fd 100644 --- a/mail/e-mail-display.c +++ b/mail/e-mail-display.c @@ -1201,21 +1201,19 @@ mail_parts_bind_dom (GObject *object, for (link = head; link != NULL; link = g_list_next (link)) { EMailPart *part = E_MAIL_PART (link->data); + WebKitDOMElement *element; + const gchar *part_id; /* Iterate only the parts rendered in * the frame and all it's subparts. */ if (!g_str_has_prefix (part->id, frame_name)) break; - if (part->bind_func != NULL) { - WebKitDOMElement *element; + part_id = e_mail_part_get_id (part); + element = find_element_by_id (document, part_id); - element = find_element_by_id (document, part->id); - if (element != NULL) { - d (printf ("/*bind_func*/ for %s\n", part->id)); - part->bind_func (part, element); - } - } + if (element != NULL && part->bind_func != NULL) + part->bind_func (part, element); } while (!g_queue_is_empty (&queue)) -- cgit v1.2.3