[evolution/wip/webkit2] Fix the 'None' signature



commit b82bb9b941b66c768602105be2ecd23d9997342f
Author: Tomas Popela <tpopela redhat com>
Date:   Tue May 31 09:35:40 2016 +0200

    Fix the 'None' signature
    
    Don't try to pass the NULL to GVariant and don't try to create a signature when
    the signature's content is empty.

 .../e-webkit-content-editor.c                      |    2 +-
 .../e-composer-private-dom-functions.c             |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/modules/webkit-content-editor/e-webkit-content-editor.c 
b/modules/webkit-content-editor/e-webkit-content-editor.c
index 2160f14..e4dc946 100644
--- a/modules/webkit-content-editor/e-webkit-content-editor.c
+++ b/modules/webkit-content-editor/e-webkit-content-editor.c
@@ -1968,7 +1968,7 @@ webkit_content_editor_insert_signature (EContentEditor *editor,
                g_variant_new (
                        "(tsbsbbb)",
                        current_page_id (wk_editor),
-                       content,
+                       content ? content : "",
                        is_html,
                        signature_id,
                        set_signature_from_message,
diff --git a/modules/webkit-content-editor/web-extension/e-composer-private-dom-functions.c 
b/modules/webkit-content-editor/web-extension/e-composer-private-dom-functions.c
index 4b1bc78..91c17e7 100644
--- a/modules/webkit-content-editor/web-extension/e-composer-private-dom-functions.c
+++ b/modules/webkit-content-editor/web-extension/e-composer-private-dom-functions.c
@@ -392,7 +392,7 @@ dom_insert_signature (WebKitDOMDocument *document,
        insert_signature_in = signature_to_insert;
 
        /* The signature has no content usually it means it is set to None. */
-       if (!content)
+       if (!(content && *content))
                goto insert;
 
        if (!is_html) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]