summaryrefslogtreecommitdiffstats
path: root/gtk/src/plist.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-09 23:14:28 +0000
committerjstebbins <[email protected]>2008-09-09 23:14:28 +0000
commite57d4d0bf36c3b5d4691134d0fdb8171cb25f843 (patch)
treead4dddfe057558ad5cd8fd5c02eb1d156079c709 /gtk/src/plist.c
parentebf4b4d663b9eeeed5d9632b5a2076355cff7145 (diff)
LinGui: consolidate all resources into one stringified plist file that gets
compiled in. icons and everyting all rolled up into one ball-o-wax. hehe, plists are cool git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1685 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/plist.c')
-rw-r--r--gtk/src/plist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/src/plist.c b/gtk/src/plist.c
index d3dcf2af0..83e9326ab 100644
--- a/gtk/src/plist.c
+++ b/gtk/src/plist.c
@@ -3,6 +3,7 @@
#include <fcntl.h>
#include <string.h>
#include <glib.h>
+#include <glib/gstdio.h>
#include <glib-object.h>
#include "plist.h"
@@ -348,7 +349,7 @@ parse_error(GMarkupParseContext *ctx, GError *error, gpointer ud)
static void
destroy_notify(gpointer data)
{ // Do nothing
- g_debug("destroy parser");
+ //g_debug("destroy parser");
}
GValue*
@@ -382,12 +383,14 @@ ghb_plist_parse(const gchar *buf, gssize len)
}
GValue*
-ghb_plist_parse_file(FILE *fd)
+ghb_plist_parse_file(const gchar *filename)
{
gchar *buffer;
size_t size;
GValue *gval;
+ FILE *fd;
+ fd = g_fopen(filename, "r");
if (fd == NULL)
return NULL;
fseek(fd, 0, SEEK_END);
@@ -398,6 +401,7 @@ ghb_plist_parse_file(FILE *fd)
buffer[size] = 0;
gval = ghb_plist_parse(buffer, (gssize)size);
g_free(buffer);
+ fclose(fd);
return gval;
}