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



commit 4f470d64c54eca8d4a5ea01451ae2d1171f49ee0
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 82c3519..340c0d4 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -1082,10 +1082,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]