diff options
Diffstat (limited to 'frontends/gtk/resources.c')
-rw-r--r-- | frontends/gtk/resources.c | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/frontends/gtk/resources.c b/frontends/gtk/resources.c index 4f9afb034..c07548b01 100644 --- a/frontends/gtk/resources.c +++ b/frontends/gtk/resources.c @@ -198,7 +198,8 @@ init_resource(char **respath, struct nsgtk_resource_s *resource) /* found an entry in the resources */ resource->path = resname; resource->type = NSGTK_RESOURCE_GLIB; - LOG("Found gresource path %s", resource->path); + NSLOG(netsurf, INFO, "Found gresource path %s", + resource->path); return NSERROR_OK; } /*LOG("gresource \"%s\" not found", resname);*/ @@ -221,7 +222,8 @@ init_resource(char **respath, struct nsgtk_resource_s *resource) /* found an entry in the resources */ resource->path = resname; resource->type = NSGTK_RESOURCE_GLIB; - LOG("Found gresource path %s", resource->path); + NSLOG(netsurf, INFO, "Found gresource path %s", + resource->path); return NSERROR_OK; } /*LOG("gresource \"%s\" not found", resname);*/ @@ -231,8 +233,9 @@ init_resource(char **respath, struct nsgtk_resource_s *resource) resname = filepath_find(respath, resource->name); if (resname == NULL) { - LOG("Unable to find resource %s on resource path", - resource->name); + NSLOG(netsurf, INFO, + "Unable to find resource %s on resource path", + resource->name); return NSERROR_NOT_FOUND; } @@ -240,7 +243,7 @@ init_resource(char **respath, struct nsgtk_resource_s *resource) resource->path = resname; resource->type = NSGTK_RESOURCE_FILE; - LOG("Found file resource path %s", resource->path); + NSLOG(netsurf, INFO, "Found file resource path %s", resource->path); return NSERROR_OK; } @@ -295,21 +298,21 @@ init_pixbuf_resource(char **respath, struct nsgtk_resource_s *resource) if (strncmp(resource->name, "menu_cursor.png", resource->len) == 0) { resource->path = (char *)&menu_cursor_pixdata[0]; resource->type = NSGTK_RESOURCE_INLINE; - LOG("Found builtin for %s", resource->name); + NSLOG(netsurf, INFO, "Found builtin for %s", resource->name); return NSERROR_OK; } if (strncmp(resource->name, "netsurf.xpm", resource->len) == 0) { resource->path = (char *)&netsurf_pixdata[0]; resource->type = NSGTK_RESOURCE_INLINE; - LOG("Found builtin for %s", resource->name); + NSLOG(netsurf, INFO, "Found builtin for %s", resource->name); return NSERROR_OK; } if (strncmp(resource->name, "favicon.png", resource->len) == 0) { resource->path = (char *)&favicon_pixdata[0]; resource->type = NSGTK_RESOURCE_INLINE; - LOG("Found builtin for %s", resource->name); + NSLOG(netsurf, INFO, "Found builtin for %s", resource->name); return NSERROR_OK; } #endif @@ -389,13 +392,13 @@ static void list_gresource(void) G_RESOURCE_LOOKUP_FLAGS_NONE, &gerror); if (gerror) { - LOG("gerror %s", gerror->message); + NSLOG(netsurf, INFO, "gerror %s", gerror->message); g_error_free(gerror); } else { cur = reslist; while (cur != NULL && *cur != NULL) { - LOG("gres %s", *cur); + NSLOG(netsurf, INFO, "gres %s", *cur); cur++; } g_strfreev(reslist); @@ -488,12 +491,17 @@ nsgdk_pixbuf_new_from_resname(const char *resname, GdkPixbuf **pixbuf_out) if (new_pixbuf == NULL) { if (error != NULL) { - LOG("Unable to create pixbuf from file for %s with path %s \"%s\"", - resource->name, resource->path, error->message); + NSLOG(netsurf, INFO, + "Unable to create pixbuf from file for %s with path %s \"%s\"", + resource->name, + resource->path, + error->message); g_error_free(error); } else { - LOG("Unable to create pixbuf from file for %s with path %s", - resource->name, resource->path); + NSLOG(netsurf, INFO, + "Unable to create pixbuf from file for %s with path %s", + resource->name, + resource->path); } return NSERROR_INIT_FAILED; } @@ -521,8 +529,11 @@ nsgtk_builder_new_from_resname(const char *resname, GtkBuilder **builder_out) if (!gtk_builder_add_from_file(new_builder, ui_res->path, &error)) { - LOG("Unable to add UI builder from file for %s with path %s \"%s\"", - ui_res->name, ui_res->path, error->message); + NSLOG(netsurf, INFO, + "Unable to add UI builder from file for %s with path %s \"%s\"", + ui_res->name, + ui_res->path, + error->message); g_error_free(error); g_object_unref(G_OBJECT(new_builder)); return NSERROR_INIT_FAILED; @@ -531,8 +542,11 @@ nsgtk_builder_new_from_resname(const char *resname, GtkBuilder **builder_out) if (!nsgtk_builder_add_from_resource(new_builder, ui_res->path, &error)) { - LOG("Unable to add UI builder from resource for %s with path %s \"%s\"", - ui_res->name, ui_res->path, error->message); + NSLOG(netsurf, INFO, + "Unable to add UI builder from resource for %s with path %s \"%s\"", + ui_res->name, + ui_res->path, + error->message); g_error_free(error); g_object_unref(G_OBJECT(new_builder)); return NSERROR_INIT_FAILED; |