2 * --enable-standalone optional Gnome init for static builds of captive
3 * Copyright (C) 2005 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
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 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "standalone-gnome.h" /* self */
24 #include "standalone.h"
25 #include <fontconfig/fontconfig.h>
28 void captive_standalone_gnome_init(void)
30 static gboolean done=FALSE;
35 captive_standalone_init();
39 #ifdef ENABLE_STANDALONE
41 /* Prevent loading of custom theme needing icons which may
42 * be problematic to be loaded by our static binary.
43 * However user still may have specified his/her theme in $HOME.
45 setenv("GTK2_RC_FILES","",
48 /* Prevent: Cannot open Input Method ...
50 setenv("GTK_IM_MODULE_FILE","/dev/null",
53 #endif /* ENABLE_STANDALONE */
55 #ifdef STANDALONE_FONTSDIR
57 /* Prevent handling (even writing!): ~/.fonts.cache-1 */
58 FcConfigEnableHome(FcFalse);
60 /* Prevent fontconfig loading: /etc/fonts/fonts.conf */
61 /* 'fonts_conf_dir' is created by: bundle_files_write() */
62 setenv("FONTCONFIG_PATH",STANDALONE_FONTSDIR,
65 #endif /* STANDALONE_FONTSDIR */
67 #endif /* HAVE_GNOMEUI */