[evolution] Replace the webkit_dom_node_get_node_type function with equivalent macros
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Replace the webkit_dom_node_get_node_type function with equivalent macros
- Date: Fri, 12 Sep 2014 08:24:44 +0000 (UTC)
commit fd226bf07d20e124a3e498f1b0776a5341aa93ce
Author: Tomas Popela <tpopela redhat com>
Date: Fri Sep 12 09:55:52 2014 +0200
Replace the webkit_dom_node_get_node_type function with equivalent macros
e-util/e-html-editor-selection.c | 6 +++---
e-util/e-html-editor.c | 2 +-
plugins/external-editor/external-editor.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 08bcd62..de3e431 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -894,16 +894,16 @@ e_html_editor_selection_has_text (EHTMLEditorSelection *selection)
range = html_editor_selection_get_current_range (selection);
node = webkit_dom_range_get_start_container (range, NULL);
- if (webkit_dom_node_get_node_type (node) == 3)
+ if (WEBKIT_DOM_IS_TEXT (node))
return TRUE;
node = webkit_dom_range_get_end_container (range, NULL);
- if (webkit_dom_node_get_node_type (node) == 3)
+ if (WEBKIT_DOM_IS_TEXT (node))
return TRUE;
node = WEBKIT_DOM_NODE (webkit_dom_range_clone_contents (range, NULL));
while (node) {
- if (webkit_dom_node_get_node_type (node) == 3)
+ if (WEBKIT_DOM_IS_TEXT (node))
return TRUE;
if (webkit_dom_node_has_child_nodes (node)) {
diff --git a/e-util/e-html-editor.c b/e-util/e-html-editor.c
index aef38bc..74b4a9b 100644
--- a/e-util/e-html-editor.c
+++ b/e-util/e-html-editor.c
@@ -352,7 +352,7 @@ html_editor_update_actions (EHTMLEditor *editor,
visible = (WEBKIT_DOM_IS_HTMLHR_ELEMENT (node));
gtk_action_set_visible (ACTION (CONTEXT_PROPERTIES_RULE), visible);
- visible = (webkit_dom_node_get_node_type (node) == 3);
+ visible = (WEBKIT_DOM_IS_TEXT (node));
gtk_action_set_visible (ACTION (CONTEXT_PROPERTIES_TEXT), visible);
visible =
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 9ada39f..5efff46 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -287,7 +287,7 @@ get_caret_position (EHTMLEditorView *view)
node, webkit_dom_dom_selection_get_anchor_node (selection))) {
break;
- } else if (webkit_dom_node_get_node_type (node) == 3) {
+ } else if (WEBKIT_DOM_IS_TEXT (node)) {
gchar *text = webkit_dom_node_get_text_content (node);
range_count += strlen (text);
g_free (text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]