From: Colin Leroy Date: Wed, 20 Mar 2013 10:28:22 +0000 (+0100) Subject: Fix format string error in win32 logging, and X-Git-Tag: 3.9.1~60 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=2d14ba845734a5ab425c1b50439018361ce06b7a Fix format string error in win32 logging, and uncomment logging in fancy --- diff --git a/src/main.c b/src/main.c index e2e82dfd3..bfccaa04d 100644 --- a/src/main.c +++ b/src/main.c @@ -773,7 +773,7 @@ static guint win32_log_handler_gtk_id; static void win32_print_stdout(const gchar *string) { if (win32_debug_fp) { - fprintf(win32_debug_fp, string); + fprintf(win32_debug_fp, "%s", string); fflush(win32_debug_fp); } } @@ -781,7 +781,7 @@ static void win32_print_stdout(const gchar *string) static void win32_print_stderr(const gchar *string) { if (win32_debug_fp) { - fprintf(win32_debug_fp, string); + fprintf(win32_debug_fp, "%s", string); fflush(win32_debug_fp); } } diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c index 2bd9d0bf4..642aa8e1b 100644 --- a/src/plugins/fancy/fancy_viewer.c +++ b/src/plugins/fancy/fancy_viewer.c @@ -377,9 +377,9 @@ navigation_requested_cb(WebKitWebView *view, WebKitWebFrame *frame, WebKitNetworkRequest *netreq, FancyViewer *viewer) { const gchar *uri = webkit_network_request_get_uri(netreq); -#ifndef G_OS_WIN32 + debug_print("navigation requested to %s\n", uri); -#endif + if (!strncmp(uri, "mailto:", 7)) { compose_new(NULL, uri + 7, NULL); return WEBKIT_NAVIGATION_RESPONSE_IGNORE; @@ -432,16 +432,12 @@ static void resource_request_starting_cb(WebKitWebView *view, /* refresh URI that may have changed */ uri = webkit_network_request_get_uri(request); if (!viewer->override_prefs_remote_content - && strncmp(uri, "file://", 7)) { -#ifndef G_OS_WIN32 + && strncmp(uri, "file://", 7) && strncmp(uri, "data:", 5)) { debug_print("Preventing load of %s\n", uri); -#endif webkit_network_request_set_uri(request, "about:blank"); } -#ifndef G_OS_WIN32 else - debug_print("Starting request of %s\n", uri); -#endif + debug_print("Starting request of %d %s\n", strlen(uri), uri); } static gboolean fancy_text_search(MimeViewer *_viewer, gboolean backward,