[evolution] EHTMLEditorSelection - Disable the selection-changed callback when restoring the caret position
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorSelection - Disable the selection-changed callback when restoring the caret position
- Date: Fri, 5 Sep 2014 11:54:37 +0000 (UTC)
commit dbb776e1c50db403ea246323aed8310307faf6ce
Author: Tomas Popela <tpopela redhat com>
Date: Fri Sep 5 13:35:53 2014 +0200
EHTMLEditorSelection - Disable the selection-changed callback when restoring the caret position
e-util/e-html-editor-selection.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index d2b4121..017eb32 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -4911,6 +4911,8 @@ e_html_editor_selection_restore_caret_position (EHTMLEditorSelection *selection)
document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (view));
g_object_unref (view);
+ e_html_editor_selection_block_selection_changed (selection);
+
element = webkit_dom_document_get_element_by_id (
document, "-x-evo-caret-position");
fix_after_quoting = element_has_class (element, "-x-evo-caret-quoting");
@@ -4936,6 +4938,7 @@ e_html_editor_selection_restore_caret_position (EHTMLEditorSelection *selection)
WEBKIT_DOM_NODE (element));
if (!WEBKIT_DOM_IS_ELEMENT (next_sibling)) {
e_html_editor_selection_clear_caret_position_marker (selection);
+ e_html_editor_selection_unblock_selection_changed (selection);
return;
}
@@ -4982,6 +4985,8 @@ e_html_editor_selection_restore_caret_position (EHTMLEditorSelection *selection)
window_selection, "move", "forward", "character");
}
}
+
+ e_html_editor_selection_unblock_selection_changed (selection);
}
static gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]