[evolution/gnome-3-18] EHTMLEditorView - Only change a smiley to plain text when the node is smiley
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-18] EHTMLEditorView - Only change a smiley to plain text when the node is smiley
- Date: Fri, 15 Jan 2016 13:56:05 +0000 (UTC)
commit bd56b16bee5a35ad91973dd834fe738c7c0f1241
Author: Tomas Popela <tpopela redhat com>
Date: Fri Jan 15 14:31:55 2016 +0100
EHTMLEditorView - Only change a smiley to plain text when the node is smiley
Before this, pressing the Backspace key in an empty item on the end of list
could remove the whole list.
e-util/e-html-editor-view.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 9423b1d..4ece012 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -5588,12 +5588,15 @@ change_smiley_to_plain_text (EHTMLEditorView *view)
WEBKIT_DOM_CHARACTER_DATA (prev_sibling));
if (g_strcmp0 (text, UNICODE_ZERO_WIDTH_SPACE) == 0) {
- remove_node (prev_sibling);
- in_smiley = TRUE;
- prev_sibling = webkit_dom_node_get_previous_sibling (WEBKIT_DOM_NODE
(element));
- if (WEBKIT_DOM_IS_ELEMENT (prev_sibling) &&
- element_has_class (WEBKIT_DOM_ELEMENT (prev_sibling),
"-x-evo-smiley-wrapper"))
+ WebKitDOMNode *prev_prev_sibling;
+
+ prev_prev_sibling = webkit_dom_node_get_previous_sibling
(prev_sibling);
+ if (WEBKIT_DOM_IS_ELEMENT (prev_prev_sibling) &&
+ element_has_class (WEBKIT_DOM_ELEMENT (prev_prev_sibling),
"-x-evo-smiley-wrapper")) {
+ remove_node (prev_sibling);
+ in_smiley = TRUE;
parent = webkit_dom_node_get_last_child (prev_sibling);
+ }
}
g_free (text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]