[evolution/wip/webkit2] Removethe unused DOMRemoveSignatures function
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Removethe unused DOMRemoveSignatures function
- Date: Fri, 15 Jul 2016 12:28:42 +0000 (UTC)
commit 5246444f3499c85c9d03bb232f0f37dcde985d93
Author: Tomas Popela <tpopela redhat com>
Date: Fri Jul 15 14:10:16 2016 +0200
Removethe unused DOMRemoveSignatures function
.../web-extension/e-composer-dom-functions.c | 58 --------------------
.../web-extension/e-composer-dom-functions.h | 3 -
.../web-extension/e-editor-web-extension.c | 23 --------
3 files changed, 0 insertions(+), 84 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-composer-dom-functions.c
b/modules/webkit-editor/web-extension/e-composer-dom-functions.c
index ef01aa2..810905e 100644
--- a/modules/webkit-editor/web-extension/e-composer-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-composer-dom-functions.c
@@ -38,64 +38,6 @@
#include "e-composer-dom-functions.h"
-gchar *
-e_composer_dom_remove_signatures (EEditorPage *editor_page,
- gboolean top_signature)
-{
- WebKitDOMDocument *document;
- WebKitDOMHTMLCollection *signatures;
- gchar *ret_val = NULL;
- gulong length, ii;
-
- g_return_val_if_fail (E_IS_EDITOR_PAGE (editor_page), NULL);
-
- document = e_editor_page_get_document (editor_page);
-
- signatures = webkit_dom_document_get_elements_by_class_name_as_html_collection (
- document, "-x-evo-signature-wrapper");
- length = webkit_dom_html_collection_get_length (signatures);
- for (ii = 0; ii < length; ii++) {
- WebKitDOMNode *wrapper, *signature;
- gchar *id;
-
- wrapper = webkit_dom_html_collection_item (signatures, ii);
- signature = webkit_dom_node_get_first_child (wrapper);
- id = webkit_dom_element_get_id (WEBKIT_DOM_ELEMENT (signature));
-
- /* When we are editing a message with signature we need to set active
- * signature id in signature combo box otherwise no signature will be
- * added but we have to do it just once when the composer opens */
- if (ret_val)
- g_free (ret_val);
- ret_val = webkit_dom_element_get_attribute (WEBKIT_DOM_ELEMENT (signature), "name");
-
- if (id && (strlen (id) == 1) && (*id == '1')) {
- /* If the top signature was set we have to remove the NL
- * that was inserted after it */
- if (top_signature) {
- WebKitDOMElement *spacer;
-
- spacer = webkit_dom_document_query_selector (
- document, ".-x-evo-top-signature-spacer", NULL);
- if (spacer)
- remove_node_if_empty (WEBKIT_DOM_NODE (spacer));
- }
- /* We have to remove the div containing the span with signature */
- remove_node (wrapper);
- g_object_unref (wrapper);
-
- g_free (id);
- break;
- }
-
- g_object_unref (wrapper);
- g_free (id);
- }
- g_object_unref (signatures);
-
- return ret_val;
-}
-
static WebKitDOMElement *
prepare_top_signature_spacer (EEditorPage *editor_page)
{
diff --git a/modules/webkit-editor/web-extension/e-composer-dom-functions.h
b/modules/webkit-editor/web-extension/e-composer-dom-functions.h
index 1e0298f..8e0f934 100644
--- a/modules/webkit-editor/web-extension/e-composer-dom-functions.h
+++ b/modules/webkit-editor/web-extension/e-composer-dom-functions.h
@@ -25,9 +25,6 @@
G_BEGIN_DECLS
-gchar * e_composer_dom_remove_signatures
- (EEditorPage *editor_page,
- gboolean top_signature);
gchar * e_composer_dom_insert_signature (EEditorPage *editor_page,
const gchar *content,
gboolean is_html,
diff --git a/modules/webkit-editor/web-extension/e-editor-web-extension.c
b/modules/webkit-editor/web-extension/e-editor-web-extension.c
index ed87a5d..84e8398 100644
--- a/modules/webkit-editor/web-extension/e-editor-web-extension.c
+++ b/modules/webkit-editor/web-extension/e-editor-web-extension.c
@@ -555,11 +555,6 @@ static const gchar *introspection_xml =
"<!-- ********************************************************* -->"
"<!-- Functions that are used in EComposerPrivate -->"
"<!-- ********************************************************* -->"
-" <method name='DOMRemoveSignatures'>"
-" <arg type='t' name='page_id' direction='in'/>"
-" <arg type='b' name='top_signature' direction='in'/>"
-" <arg type='s' name='active_signature' direction='out'/>"
-" </method>"
" <method name='DOMInsertSignature'>"
" <arg type='t' name='page_id' direction='in'/>"
" <arg type='s' name='content' direction='in'/>"
@@ -2112,24 +2107,6 @@ handle_method_call (GDBusConnection *connection,
"(@s)",
g_variant_new_take_string (
word ? word : g_strdup (""))));
- } else if (g_strcmp0 (method_name, "DOMRemoveSignatures") == 0) {
- gboolean top_signature;
- gchar *active_signature;
-
- g_variant_get (parameters, "(tb)", &page_id, &top_signature);
-
- editor_page = get_editor_page_or_return_dbus_error (invocation, extension, page_id);
- if (!editor_page)
- goto error;
-
- active_signature = e_composer_dom_remove_signatures (editor_page, top_signature);
-
- g_dbus_method_invocation_return_value (
- invocation,
- g_variant_new (
- "(@s)",
- g_variant_new_take_string (
- active_signature ? active_signature : g_strdup (""))));
} else if (g_strcmp0 (method_name, "DOMInsertSignature") == 0) {
gboolean is_html, set_signature_from_message;
gboolean check_if_signature_is_changed, ignore_next_signature_change;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]