[evolution] No need to double-check camel_debug() for "webkit" and "webkit:something"



commit 9bdd34182e56ce9ef94a5a48617585d0490afd52
Author: Milan Crha <mcrha redhat com>
Date:   Mon Nov 28 19:42:05 2016 +0100

    No need to double-check camel_debug() for "webkit" and "webkit:something"
    
    It's done for free when the later is used.

 src/e-util/e-html-editor.c                         |    2 +-
 src/mail/e-mail-printer.c                          |    4 ++--
 .../web-extension/e-editor-dom-functions.c         |   12 ++++++------
 .../web-extension/e-editor-undo-redo-manager.c     |   12 ++++++------
 src/web-extensions/e-web-extension-main.c          |    2 +-
 src/web-extensions/e-web-extension.c               |    2 +-
 6 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/e-util/e-html-editor.c b/src/e-util/e-html-editor.c
index ff14693..31f83fc 100644
--- a/src/e-util/e-html-editor.c
+++ b/src/e-util/e-html-editor.c
@@ -346,7 +346,7 @@ html_editor_update_actions (EHTMLEditor *editor)
 
        cnt_editor = e_html_editor_get_content_editor (editor);
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:editor"))
+       if (camel_debug ("webkit:editor"))
                printf ("%s: flags:%d(%x)\n", G_STRFUNC, flags, flags);
 
        visible = (flags & E_CONTENT_EDITOR_NODE_IS_IMAGE);
diff --git a/src/mail/e-mail-printer.c b/src/mail/e-mail-printer.c
index 346407a..69a628c 100644
--- a/src/mail/e-mail-printer.c
+++ b/src/mail/e-mail-printer.c
@@ -165,7 +165,7 @@ mail_printer_print_finished_cb (WebKitPrintOperation *print_operation,
 {
        AsyncContext *async_context;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:preview"))
+       if (camel_debug ("webkit:preview"))
                printf ("%s\n", G_STRFUNC);
 
        async_context = g_task_get_task_data (task);
@@ -183,7 +183,7 @@ mail_printer_print_failed_cb (WebKitPrintOperation *print_operation,
 {
        AsyncContext *async_context;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:preview"))
+       if (camel_debug ("webkit:preview"))
                printf ("%s\n", G_STRFUNC);
 
        async_context = g_task_get_task_data (task);
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 488ea22..e90791f 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -5044,7 +5044,7 @@ remove_new_lines_around_citations (const gchar *input)
 
        g_string_append (str, p);
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:editor")) {
+       if (camel_debug ("webkit:editor")) {
                printf ("EWebKitContentEditor - %s\n", G_STRFUNC);
                printf ("\toutput: '%s'\n", str->str);
        }
@@ -5138,7 +5138,7 @@ parse_html_into_blocks (EEditorPage *editor_page,
        else
                regex_nbsp = g_regex_new ("^\\s{1}|\\s{2,}|\x9|\\s$", 0, 0, NULL);
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:editor")) {
+       if (camel_debug ("webkit:editor")) {
                printf ("EWebKitContentEditor - %s\n", G_STRFUNC);
                printf ("\tinput: '%s'\n", input);
        }
@@ -5174,7 +5174,7 @@ parse_html_into_blocks (EEditorPage *editor_page,
                        processing_last = TRUE;
                }
 
-               if (camel_debug ("webkit") || camel_debug ("webkit:editor"))
+               if (camel_debug ("webkit:editor"))
                        printf ("\tto_process: '%s'\n", to_process);
 
                if (!*to_process && processing_last) {
@@ -5230,7 +5230,7 @@ parse_html_into_blocks (EEditorPage *editor_page,
                        gchar *truncated = g_strdup (to_insert);
                        gchar *rest_to_insert;
 
-                       if (camel_debug ("webkit") || camel_debug ("webkit:editor"))
+                       if (camel_debug ("webkit:editor"))
                                printf ("\tto_insert: '%s'\n", to_insert);
 
                        empty = !*truncated && strlen (to_insert) > 0;
@@ -5358,12 +5358,12 @@ parse_html_into_blocks (EEditorPage *editor_page,
                parsed = replace_citation_marks_to_citations (inner_html);
                webkit_dom_element_set_inner_html (parent, parsed->str, NULL);
 
-               if (camel_debug ("webkit") || camel_debug ("webkit:editor"))
+               if (camel_debug ("webkit:editor"))
                        printf ("\tparsed content: '%s'\n", inner_html);
 
                g_free (inner_html);
                g_string_free (parsed, TRUE);
-       } else if (camel_debug ("webkit") || camel_debug ("webkit:editor")) {
+       } else if (camel_debug ("webkit:editor")) {
                gchar *inner_html;
 
                inner_html = webkit_dom_element_get_inner_html (parent);
diff --git a/src/modules/webkit-editor/web-extension/e-editor-undo-redo-manager.c 
b/src/modules/webkit-editor/web-extension/e-editor-undo-redo-manager.c
index b31a1bc..b774f49 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-undo-redo-manager.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-undo-redo-manager.c
@@ -2324,7 +2324,7 @@ e_editor_undo_redo_manager_insert_history_event (EEditorUndoRedoManager *manager
        if (manager->priv->operation_in_progress)
                return;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:undo")) {
+       if (camel_debug ("webkit:undo")) {
                printf ("\nINSERTING EVENT:\n");
                print_history_event (event);
        }
@@ -2346,7 +2346,7 @@ e_editor_undo_redo_manager_insert_history_event (EEditorUndoRedoManager *manager
        manager->priv->history = g_list_prepend (manager->priv->history, event);
        manager->priv->history_size++;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:undo"))
+       if (camel_debug ("webkit:undo"))
                print_history (manager);
 
        g_object_notify (G_OBJECT (manager), "can-undo");
@@ -2479,7 +2479,7 @@ e_editor_undo_redo_manager_undo (EEditorUndoRedoManager *manager)
        history = manager->priv->history;
        event = history->data;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:undo")) {
+       if (camel_debug ("webkit:undo")) {
                printf ("\nUNDOING EVENT:\n");
                print_history_event (event);
        }
@@ -2576,7 +2576,7 @@ e_editor_undo_redo_manager_undo (EEditorUndoRedoManager *manager)
                manager->priv->history = manager->priv->history->next;
        }
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:undo"))
+       if (camel_debug ("webkit:undo"))
                print_undo_events (manager);
 
        manager->priv->operation_in_progress = FALSE;
@@ -2613,7 +2613,7 @@ e_editor_undo_redo_manager_redo (EEditorUndoRedoManager *manager)
        history = manager->priv->history;
        event = history->prev->data;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:undo")) {
+       if (camel_debug ("webkit:undo")) {
                printf ("\nREDOING EVENT:\n");
                print_history_event (event);
        }
@@ -2726,7 +2726,7 @@ e_editor_undo_redo_manager_redo (EEditorUndoRedoManager *manager)
 
        manager->priv->history = manager->priv->history->prev;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:undo"))
+       if (camel_debug ("webkit:undo"))
                print_redo_events (manager);
 
        manager->priv->operation_in_progress = FALSE;
diff --git a/src/web-extensions/e-web-extension-main.c b/src/web-extensions/e-web-extension-main.c
index 24bb6a9..28a25d4 100644
--- a/src/web-extensions/e-web-extension-main.c
+++ b/src/web-extensions/e-web-extension-main.c
@@ -41,7 +41,7 @@ webkit_web_extension_initialize (WebKitWebExtension *wk_extension)
 
        camel_debug_init ();
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:preview"))
+       if (camel_debug ("webkit:preview"))
                printf ("%s\n", G_STRFUNC);
 
        extension = e_web_extension_get ();
diff --git a/src/web-extensions/e-web-extension.c b/src/web-extensions/e-web-extension.c
index d025bff..3f11e10 100644
--- a/src/web-extensions/e-web-extension.c
+++ b/src/web-extensions/e-web-extension.c
@@ -344,7 +344,7 @@ handle_method_call (GDBusConnection *connection,
        if (g_strcmp0 (interface_name, E_WEB_EXTENSION_INTERFACE) != 0)
                return;
 
-       if (camel_debug ("webkit") || camel_debug ("webkit:preview"))
+       if (camel_debug ("webkit:preview"))
                printf ("EWebExtension - %s - %s\n", G_STRFUNC, method_name);
 
        if (g_strcmp0 (method_name, "RegisterElementClicked") == 0) {


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