[evolution/wip/webkit2] Mute some debugging prints; use CAMEL_DEBUG=wex to enable them
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Mute some debugging prints; use CAMEL_DEBUG=wex to enable them
- Date: Wed, 9 Mar 2016 10:22:17 +0000 (UTC)
commit fb6a2a926a3c85aed94d0bd911b68cbb51deaed5
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 9 11:21:30 2016 +0100
Mute some debugging prints; use CAMEL_DEBUG=wex to enable them
e-util/e-html-editor-selection.c | 23 +++++++++++++-------
e-util/e-html-editor-view.c | 8 +++++-
e-util/e-html-editor.c | 4 +-
e-util/e-web-view.c | 1 -
mail/e-mail-printer.c | 8 +++++-
.../composer/e-html-editor-web-extension-main.c | 4 +++
.../composer/e-html-editor-web-extension.c | 12 +++++++---
web-extensions/e-web-extension-main.c | 8 ++++++-
web-extensions/e-web-extension.c | 4 ++-
9 files changed, 51 insertions(+), 21 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 31d76c3..5e2d04c 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -26,6 +26,7 @@
#include "e-html-editor-view.h"
#include "e-html-editor.h"
+#include <camel/camel.h>
#include <web-extensions/composer/e-html-editor-web-extension-names.h>
#include <e-util/e-util.h>
@@ -109,7 +110,8 @@ web_extension_properties_changed_cb (GDBusProxy *proxy,
GStrv invalidated_properties,
EHTMLEditorSelection *selection)
{
- printf ("%s\n", __FUNCTION__);
+ if (camel_debug ("wex"))
+ printf ("%s\n", G_STRFUNC);
g_object_freeze_notify (G_OBJECT (selection));
if (g_variant_n_children (changed_properties) > 0) {
@@ -117,7 +119,8 @@ web_extension_properties_changed_cb (GDBusProxy *proxy,
const gchar *key;
GVariant *value;
- g_print (" *** Properties Changed:\n");
+ if (camel_debug ("wex"))
+ g_print (" *** Properties Changed:\n");
g_variant_get (changed_properties,
"a{sv}",
&iter);
@@ -163,14 +166,15 @@ web_extension_properties_changed_cb (GDBusProxy *proxy,
g_object_notify (G_OBJECT (selection), "monospaced");
} else if (g_strcmp0 (key, "HTMLMode") != 0 &&
g_strcmp0 (key, "Changed") != 0)
- g_warning ("UNKNOWN PROPERTY %s IN %s", key, __FUNCTION__);
- g_print (" %s -> %s\n", key, value_str);
+ g_warning ("UNKNOWN PROPERTY %s IN %s", key, G_STRFUNC);
+ if (camel_debug ("wex"))
+ g_print (" %s -> %s\n", key, value_str);
g_free (value_str);
}
g_variant_iter_free (iter);
}
- if (g_strv_length ((GStrv) invalidated_properties) > 0) {
+ if (camel_debug ("wex") && g_strv_length ((GStrv) invalidated_properties) > 0) {
guint n;
g_print (" *** Properties Invalidated:\n");
for (n = 0; invalidated_properties[n] != NULL; n++)
@@ -928,7 +932,8 @@ e_html_editor_selection_replace (EHTMLEditorSelection *selection,
EHTMLEditorView *view;
GDBusProxy *web_extension;
- printf ("%s\n", __FUNCTION__);
+ if (camel_debug ("wex"))
+ printf ("%s\n", G_STRFUNC);
g_return_if_fail (E_IS_HTML_EDITOR_SELECTION (selection));
view = e_html_editor_selection_ref_html_editor_view (selection);
@@ -986,7 +991,8 @@ html_editor_selection_set_format_string (EHTMLEditorSelection *selection,
EHTMLEditorView *view;
GDBusProxy *web_extension;
- printf ("%s - %s - %s\n", __FUNCTION__, format_dom_function, format_value);
+ if (camel_debug ("wex"))
+ printf ("%s - %s - %s\n", G_STRFUNC, format_dom_function, format_value);
g_return_if_fail (E_IS_HTML_EDITOR_SELECTION (selection));
view = e_html_editor_selection_ref_html_editor_view (selection);
@@ -1282,7 +1288,8 @@ e_html_editor_selection_get_font_color (EHTMLEditorSelection *selection,
g_return_if_fail (view != NULL);
if (!e_html_editor_view_get_html_mode (view)) {
- printf ("%s\n", __FUNCTION__);
+ if (camel_debug ("wex"))
+ printf ("%s\n", G_STRFUNC);
*rgba = black;
g_object_unref (view);
return;
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 84aa20e..66521c7 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -27,6 +27,8 @@
#include "e-emoticon-chooser.h"
#include "e-misc-utils.h"
+#include <camel/camel.h>
+
#include <web-extensions/composer/e-html-editor-web-extension-names.h>
#include <e-util/e-util.h>
@@ -1912,7 +1914,8 @@ e_html_editor_view_insert_smiley (EHTMLEditorView *view,
g_return_if_fail (E_IS_HTML_EDITOR_VIEW (view));
g_return_if_fail (emoticon != NULL);
- printf ("%s\n", __FUNCTION__);
+ if (camel_debug ("wex"))
+ printf ("%s\n", G_STRFUNC);
web_extension = e_html_editor_view_get_web_extension_proxy (view);
if (!web_extension)
return;
@@ -1962,7 +1965,8 @@ e_html_editor_view_set_magic_smileys (EHTMLEditorView *view,
{
g_return_if_fail (E_IS_HTML_EDITOR_VIEW (view));
- printf ("%s - %d\n", __FUNCTION__, magic_smileys);
+ if (camel_debug ("wex"))
+ printf ("%s - %d\n", G_STRFUNC, magic_smileys);
if (view->priv->magic_smileys == magic_smileys)
return;
diff --git a/e-util/e-html-editor.c b/e-util/e-html-editor.c
index 7bdadb2..e19ba24 100644
--- a/e-util/e-html-editor.c
+++ b/e-util/e-html-editor.c
@@ -357,8 +357,8 @@ html_editor_update_actions (EHTMLEditor *editor)
}
}
- printf ("%s\n", __FUNCTION__);
- printf ("%d\n", flags);
+ if (camel_debug ("wex"))
+ printf ("%s: flags:%d(%x)\n", G_STRFUNC, flags, flags);
spell_checker = e_html_editor_view_get_spell_checker (view);
manager = e_html_editor_get_ui_manager (editor);
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index 93f278c..6630805 100644
--- a/e-util/e-web-view.c
+++ b/e-util/e-web-view.c
@@ -503,7 +503,6 @@ web_view_context_menu_cb (WebKitWebView *webkit_web_view,
web_view = E_WEB_VIEW (webkit_web_view);
- printf ("%s\n", __FUNCTION__);
g_free (web_view->priv->cursor_image_src);
web_view->priv->cursor_image_src = NULL;
diff --git a/mail/e-mail-printer.c b/mail/e-mail-printer.c
index 575810d..f465ac4 100644
--- a/mail/e-mail-printer.c
+++ b/mail/e-mail-printer.c
@@ -23,6 +23,8 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <camel/camel.h>
+
#include "e-util/e-util.h"
#include "em-format/e-mail-formatter-print.h"
@@ -172,7 +174,8 @@ static void
mail_printer_print_finished_cb (WebKitPrintOperation *print_operation,
GSimpleAsyncResult *simple)
{
- printf ("%s\n", __FUNCTION__);
+ if (camel_debug ("wex"))
+ printf ("%s\n", G_STRFUNC);
}
static void
@@ -182,7 +185,8 @@ mail_printer_print_failed_cb (WebKitPrintOperation *print_operation,
{
AsyncContext *async_context;
- printf ("%s\n", __FUNCTION__);
+ if (camel_debug ("wex"))
+ printf ("%s\n", G_STRFUNC);
async_context = g_simple_async_result_get_op_res_gpointer (simple);
if (error != NULL)
diff --git a/web-extensions/composer/e-html-editor-web-extension-main.c
b/web-extensions/composer/e-html-editor-web-extension-main.c
index 22b5c06..8c15421 100644
--- a/web-extensions/composer/e-html-editor-web-extension-main.c
+++ b/web-extensions/composer/e-html-editor-web-extension-main.c
@@ -20,6 +20,8 @@
#include <config.h>
#endif
+#include <camel/camel.h>
+
#include "e-html-editor-web-extension.h"
static void
@@ -38,6 +40,8 @@ webkit_web_extension_initialize (WebKitWebExtension *wk_extension)
{
EHTMLEditorWebExtension *extension;
+ camel_debug_init ();
+
extension = e_html_editor_web_extension_get ();
e_html_editor_web_extension_initialize (extension, wk_extension);
diff --git a/web-extensions/composer/e-html-editor-web-extension.c
b/web-extensions/composer/e-html-editor-web-extension.c
index 2045506..cbaa2a6 100644
--- a/web-extensions/composer/e-html-editor-web-extension.c
+++ b/web-extensions/composer/e-html-editor-web-extension.c
@@ -689,7 +689,8 @@ handle_method_call (GDBusConnection *connection,
if (g_strcmp0 (interface_name, E_HTML_EDITOR_WEB_EXTENSION_INTERFACE) != 0)
return;
- printf ("%s - %s\n", __FUNCTION__, method_name);
+ if (camel_debug ("wex"))
+ printf ("%s - %s\n", G_STRFUNC, method_name);
if (g_strcmp0 (method_name, "ElementHasAttribute") == 0) {
gboolean value = FALSE;
const gchar *element_id, *attribute;
@@ -2478,7 +2479,8 @@ handle_get_property (GDBusConnection *connection,
EHTMLEditorWebExtension *extension = E_HTML_EDITOR_WEB_EXTENSION (user_data);
GVariant *variant;
- printf ("%s - %s - %s\n", __FUNCTION__, sender, property_name);
+ if (camel_debug ("wex"))
+ printf ("%s - %s - %s\n", G_STRFUNC, sender, property_name);
if (g_strcmp0 (property_name, "ForceImageLoad") == 0)
variant = g_variant_new_boolean (extension->priv->force_image_load);
else if (g_strcmp0 (property_name, "InlineSpelling") == 0)
@@ -2555,7 +2557,8 @@ handle_set_property (GDBusConnection *connection,
GError *local_error = NULL;
GVariantBuilder *builder;
- printf ("%s - %s - %s\n", __FUNCTION__, sender, property_name);
+ if (camel_debug ("wex"))
+ printf ("%s - %s - %s\n", G_STRFUNC, sender, property_name);
builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
if (g_strcmp0 (property_name, "ForceImageLoad") == 0) {
@@ -2914,7 +2917,8 @@ handle_set_property (GDBusConnection *connection,
g_assert_no_error (local_error);
exit:
- printf ("\tExitting\n");
+ if (camel_debug ("wex"))
+ printf ("\tExitting\n");
g_variant_builder_unref (builder);
return TRUE;
diff --git a/web-extensions/e-web-extension-main.c b/web-extensions/e-web-extension-main.c
index fa68aae..5276734 100644
--- a/web-extensions/e-web-extension-main.c
+++ b/web-extensions/e-web-extension-main.c
@@ -20,6 +20,8 @@
#include <config.h>
#endif
+#include <camel/camel.h>
+
#include "e-web-extension.h"
#include "e-web-extension-names.h"
@@ -39,7 +41,11 @@ webkit_web_extension_initialize (WebKitWebExtension *wk_extension)
{
EWebExtension *extension;
- printf ("%s\n", __FUNCTION__);
+ camel_debug_init ();
+
+ if (camel_debug ("wex"))
+ printf ("%s\n", G_STRFUNC);
+
extension = e_web_extension_get ();
e_web_extension_initialize (extension, wk_extension);
diff --git a/web-extensions/e-web-extension.c b/web-extensions/e-web-extension.c
index d7db7c5..cce5ea6 100644
--- a/web-extensions/e-web-extension.c
+++ b/web-extensions/e-web-extension.c
@@ -26,6 +26,7 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
+#include <camel/camel.h>
#include <libedataserver/libedataserver.h>
#include "e-web-extension.h"
@@ -180,7 +181,8 @@ handle_method_call (GDBusConnection *connection,
if (g_strcmp0 (interface_name, E_WEB_EXTENSION_INTERFACE) != 0)
return;
- printf ("EWebExtension - %s - %s\n", __FUNCTION__, method_name);
+ if (camel_debug ("wex"))
+ printf ("EWebExtension - %s - %s\n", G_STRFUNC, method_name);
if (g_strcmp0 (method_name, "ReplaceLocalImageLinks") == 0) {
g_variant_get (parameters, "(t)", &page_id);
web_page = get_webkit_web_page_or_return_dbus_error (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]