[evolution/wip/webkit-composer: 463/966] When removing the signature remove the leftover BR from previous signature aswell



commit a63dc9ec4a561724a15eaba0e1dd76dfda722184
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Oct 11 14:36:57 2013 +0200

    When removing the signature remove the leftover BR from previous
    signature aswell

 composer/e-composer-private.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 149ef5b..89945ab 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1080,10 +1080,24 @@ insert:
                }
 
                if (id && (strlen (id) == 1) && (*id == '1')) {
+                       /* We have to remove the div containing the span with signature */
+                       WebKitDOMNode *next_sibling;
+                       WebKitDOMNode *parent;
+
+                       parent = webkit_dom_node_get_parent_node (node);
+                       next_sibling = webkit_dom_node_get_next_sibling (parent);
+
+                       if (WEBKIT_DOM_IS_HTMLBR_ELEMENT (next_sibling))
+                               webkit_dom_node_remove_child (
+                                       webkit_dom_node_get_parent_node (next_sibling),
+                                       next_sibling,
+                                       NULL);
+
                        webkit_dom_node_remove_child (
-                               webkit_dom_node_get_parent_node (webkit_dom_node_get_parent_node (node)),
-                               webkit_dom_node_get_parent_node (node),
+                               webkit_dom_node_get_parent_node (parent),
+                               parent,
                                NULL);
+
                        g_free (id);
                        break;
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]