summaryrefslogtreecommitdiff
path: root/frontends/gtk/resources.c
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/gtk/resources.c')
-rw-r--r--frontends/gtk/resources.c55
1 files changed, 35 insertions, 20 deletions
diff --git a/frontends/gtk/resources.c b/frontends/gtk/resources.c
index 4f9afb034..ef92fefc8 100644
--- a/frontends/gtk/resources.c
+++ b/frontends/gtk/resources.c
@@ -198,10 +198,12 @@ 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);*/
+ NSLOG(netsurf, DEEPDEBUG,
+ "gresource \"%s\" not found", resname);
free(resname);
langc++;
@@ -221,18 +223,20 @@ 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);*/
+ NSLOG(netsurf, DEEPDEBUG, "gresource \"%s\" not found", resname);
free(resname);
#endif
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 +244,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 +299,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 +393,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 +492,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 +530,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 +543,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;