- else
- c = g_io_channel_new_file(f, "r", NULL);
- if (c) {
- while(g_io_channel_read_line(c, &line, NULL, NULL, &e) == G_IO_STATUS_NORMAL) {
- g_string_append(code, line);
- g_free(line);
+ if (c) {
+ while(g_io_channel_read_line(c, &line, NULL, NULL, &e) == G_IO_STATUS_NORMAL) {
+ g_string_append(code, line);
+ g_free(line);
+ }
+ webkit_web_view_load_html_string(view, code->str, NULL);
+ g_io_channel_shutdown(c, FALSE, NULL);