[evolution/wip/webkit2] Composer - Partially revert previous commit as EHTMLEditorHistoryEvent is not GObject
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Composer - Partially revert previous commit as EHTMLEditorHistoryEvent is not GObject
- Date: Thu, 3 Mar 2016 12:00:01 +0000 (UTC)
commit 81e47edfb1071ddf4914271edaf7c0e6dbef7eb5
Author: Tomas Popela <tpopela redhat com>
Date: Thu Mar 3 12:38:48 2016 +0100
Composer - Partially revert previous commit as EHTMLEditorHistoryEvent is not GObject
.../composer/e-composer-private-dom-functions.c | 6 +++---
.../composer/e-html-editor-undo-redo-manager.c | 14 +++++++-------
.../composer/e-html-editor-view-dom-functions.c | 10 +++++-----
3 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/web-extensions/composer/e-composer-private-dom-functions.c
b/web-extensions/composer/e-composer-private-dom-functions.c
index 0a61a2e..c449cda 100644
--- a/web-extensions/composer/e-composer-private-dom-functions.c
+++ b/web-extensions/composer/e-composer-private-dom-functions.c
@@ -360,7 +360,7 @@ insert_nbsp_history_event (WebKitDOMDocument *document,
event->type = HISTORY_DELETE;
if (delete)
- g_object_set_data (G_OBJECT (event), "history-delete-key", GINT_TO_POINTER (1));
+ g_object_set_data (G_OBJECT (fragment), "history-delete-key", GINT_TO_POINTER (1));
event->data.fragment = fragment;
@@ -505,12 +505,12 @@ dom_save_drag_and_drop_history (WebKitDOMDocument *document,
webkit_dom_node_clone_node (tmp_block, FALSE),
NULL);
g_object_set_data (
- G_OBJECT (event),
+ G_OBJECT (fragment),
"history-drag-and-drop",
GINT_TO_POINTER (1));
/* It should act as a Delete key press. */
g_object_set_data (
- G_OBJECT (event),
+ G_OBJECT (fragment),
"history-delete-key",
GINT_TO_POINTER (1));
}
diff --git a/web-extensions/composer/e-html-editor-undo-redo-manager.c
b/web-extensions/composer/e-html-editor-undo-redo-manager.c
index 0e68b9c..db2ec0b 100644
--- a/web-extensions/composer/e-html-editor-undo-redo-manager.c
+++ b/web-extensions/composer/e-html-editor-undo-redo-manager.c
@@ -418,7 +418,7 @@ undo_delete (WebKitDOMDocument *document,
/* Delete or BackSpace pressed in the beginning of a block or on its end. */
if (event->type == HISTORY_DELETE && !single_block &&
- g_object_get_data (G_OBJECT (event), "history-concatenating-blocks")) {
+ g_object_get_data (G_OBJECT (event->data.fragment), "history-concatenating-blocks")) {
WebKitDOMNode *node, *block;
range = get_range_for_point (document, event->after.start);
@@ -491,7 +491,7 @@ undo_delete (WebKitDOMDocument *document,
/* Redoing Return key press */
if (event->type == HISTORY_INPUT && (empty ||
- g_object_get_data (G_OBJECT (event), "history-return-key"))) {
+ g_object_get_data (G_OBJECT (event->data.fragment), "history-return-key"))) {
if (key_press_event_process_return_key (document, extension)) {
body_key_up_event_process_return_key (document, extension);
} else {
@@ -734,7 +734,7 @@ undo_delete (WebKitDOMDocument *document,
/* If undoing drag and drop where the whole line was moved we need
* to correct the selection. */
- if (g_object_get_data (G_OBJECT (event), "history-drag-and-drop") &&
+ if (g_object_get_data (G_OBJECT (event->data.fragment), "history-drag-and-drop") &&
(element = webkit_dom_document_get_element_by_id (document,
"-x-evo-selection-end-marker"))) {
WebKitDOMNode *prev_block;
@@ -811,7 +811,7 @@ undo_delete (WebKitDOMDocument *document,
webkit_dom_node_get_next_sibling (parent),
NULL);
} else {
- if (g_object_get_data (G_OBJECT (event), "history-removing-from-anchor") ||
+ if (g_object_get_data (G_OBJECT (event->data.fragment),
"history-removing-from-anchor") ||
!event_selection_was_collapsed (event)) {
webkit_dom_node_insert_before (
webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (element)),
@@ -898,8 +898,8 @@ redo_delete (WebKitDOMDocument *document,
manager = e_html_editor_web_extension_get_undo_redo_manager (extension);
restore_selection_to_history_event_state (document, event->before);
- delete_key = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event), "history-delete-key"));
- control_key = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event), "history-control-key"));
+ delete_key = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event->data.fragment),
"history-delete-key"));
+ control_key = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event->data.fragment),
"history-control-key"));
if (!delete_key && key_press_event_process_backspace_key (document, extension))
goto out;
@@ -923,7 +923,7 @@ redo_delete (WebKitDOMDocument *document,
* by WebKit to the separate block. To avoid it let's remove
* all quoting and wrapping from the next paragraph. */
if (delete_key &&
- GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event), "history-concatenating-blocks"))) {
+ GPOINTER_TO_INT (g_object_get_data (G_OBJECT (event->data.fragment),
"history-concatenating-blocks"))) {
WebKitDOMNode *current_block, *next_block, *node;
WebKitDOMRange *range;
diff --git a/web-extensions/composer/e-html-editor-view-dom-functions.c
b/web-extensions/composer/e-html-editor-view-dom-functions.c
index 20bda86..9d5d45c 100644
--- a/web-extensions/composer/e-html-editor-view-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-view-dom-functions.c
@@ -2219,7 +2219,7 @@ save_history_for_input (WebKitDOMDocument *document,
remove_node (WEBKIT_DOM_NODE (element_end));
g_object_set_data (
- G_OBJECT (ev), "history-return-key", GINT_TO_POINTER (1));
+ G_OBJECT (fragment), "history-return-key", GINT_TO_POINTER (1));
webkit_dom_dom_selection_modify (dom_selection, "move", "right", "character");
@@ -7926,7 +7926,7 @@ save_history_for_delete_or_backspace (WebKitDOMDocument *document,
NULL);
}
g_object_set_data (
- G_OBJECT (ev),
+ G_OBJECT (fragment),
"history-concatenating-blocks",
GINT_TO_POINTER (1));
}
@@ -7956,7 +7956,7 @@ save_history_for_delete_or_backspace (WebKitDOMDocument *document,
fragment = webkit_dom_range_clone_contents (range_clone, NULL);
if (removing_from_anchor)
g_object_set_data (
- G_OBJECT (ev),
+ G_OBJECT (fragment),
"history-removing-from-anchor",
GINT_TO_POINTER (1));
node = webkit_dom_node_get_first_child (WEBKIT_DOM_NODE (fragment));
@@ -8200,8 +8200,8 @@ save_history_for_delete_or_backspace (WebKitDOMDocument *document,
g_object_unref (range);
g_object_unref (dom_selection);
- g_object_set_data (G_OBJECT (ev), "history-delete-key", GINT_TO_POINTER (delete_key));
- g_object_set_data (G_OBJECT (ev), "history-control-key", GINT_TO_POINTER (control_key));
+ g_object_set_data (G_OBJECT (fragment), "history-delete-key", GINT_TO_POINTER (delete_key));
+ g_object_set_data (G_OBJECT (fragment), "history-control-key", GINT_TO_POINTER (control_key));
ev->data.fragment = fragment;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]