commit 2d14ba845734a5ab425c1b50439018361ce06b7a
parent e05b7087fcded411cc2f73ca5343a0a38f5d6779
Author: Colin Leroy <colin@colino.net>
Date: Wed, 20 Mar 2013 11:28:22 +0100
Fix format string error in win32 logging, and
uncomment logging in fancy
Diffstat:
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git 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
@@ -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,