2
* Copyright (C) 2003 Jack O'Quin
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* $Id: resource.c,v 1.1 2004/01/10 05:19:18 joq Exp $
19
#include <sys/types.h>
27
static const char *resource_file; /* GTK resource file, -r option */
29
/* Name associated with -r option, NULL if none */
30
void resource_file_name(const char *name)
35
resource_file = JAMIN_EXAMPLES_DIR JAMIN_UI;
38
void resource_file_parse(void)
42
/* use resource file specified with -r option */
43
printf("Using GTK resource file %s\n", resource_file);
44
gtk_rc_parse(resource_file);
46
} else if (jamin_dir) {
48
char rcfile[PATH_MAX];
51
/* look for a user-defined GTK rc file, and parse it */
52
snprintf(rcfile, PATH_MAX, "%s%s", jamin_dir, JAMIN_UI);
53
if ((fd = open(rcfile, O_RDONLY)) >= 0) {