rem: filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_DATADIR, "totem/vanity.glade", TRUE, NULL); if (filename == NULL)
add: filename = g_build_filename (DATADIR, "totem", "vanity.glade", NULL);  if (g_file_test (filename, G_FILE_TEST_EXISTS) == FALSE)
context: main (int argc, char **argv){	Vanity *vanity;	char *filename;	GConfClient *gc;	GError *err = NULL;	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");	textdomain (GETTEXT_PACKAGE);	g_set_application_name (_("Vanity Webcam Utility"));	if (XInitThreads () == 0)	{		gtk_init (&argc, &argv);		vanity_action_error_and_exit (_("Could not initialise the "					"thread-safe libraries.\n"					"Verify your system installation. "					"Vanity will now exit."), NULL);	}	g_thread_init (NULL);	gdk_threads_init ();	gnome_program_init ("vanity", VERSION,			LIBGNOMEUI_MODULE,			argc, argv,			GNOME_PARAM_APP_DATADIR, DATADIR,			GNOME_PARAM_POPT_TABLE, options,			GNOME_PARAM_NONE);	glade_init ();	gnome_vfs_init ();	if ((gc = gconf_client_get_default ()) == NULL)	{		char *str;		str = g_strdup_printf (_("Vanity couln't initialise the \n"					"configuration engine:\n%s"),				err->message);		vanity_action_error_and_exit (str, NULL);		g_error_free (err);		g_free (str);	}	gnome_authentication_manager_init ();	filename = gnome_program_locate_file (NULL,			GNOME_FILE_DOMAIN_APP_DATADIR,			"totem/vanity.glade", TRUE, NULL);	if (filename == NULL)	{		vanity_action_error_and_exit (_("Couldn't load the main "					"interface (vanity.glade).\n"					"Make sure that Vanity"					" is properly installed."), NULL);	}	vanity = g_new0 (Vanity, 1);	process_command_line (vanity, argc, argv);	/* Main window */	vanity->xml = glade_xml_new (filename, NULL, NULL);	if (vanity->xml == NULL)	{		g_free (filename);		vanity_action_error_and_exit (_("Couldn't load the main "					"interface (vanity.glade).\n"					"Make sure that Vanity"					" is properly installed."), NULL);	}	g_free (filename);	vanity->win = glade_xml_get_widget (vanity->xml, "app1");	filename = g_build_filename (DATADIR, "totem", "vanity.png", NULL);	gtk_window_set_default_icon_from_file (filename, NULL);	g_free (filename);	/* The rest of the widgets */	vanity->prefs = glade_xml_get_widget (vanity->xml, "dialog1");	vanity_callback_connect (vanity);	/* Show ! gtk_main_iteration trickery to show all the widgets	 * we have so far */	gtk_widget_show_all (vanity->win);	long_action ();	/* Show ! (again) the video widget this time. */	video_widget_create (vanity);	/* The prefs after the video widget is connected *///	vanity_setup_preferences (vanity);	gtk_main ();	return 0;}