[evolution/webkit-composer] When removing the signature remove the leftover BR from previous signature aswell
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer] When removing the signature remove the leftover BR from previous signature aswell
- Date: Fri, 11 Oct 2013 12:55:54 +0000 (UTC)
commit 9d321bc23bbcac1ed1b5eabf6890f2070d295db2
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 6d0e004..86c6d1a 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]