Damn, forgot to svn add.
[nautilus.git] / src / nautilus-first-time-druid.c
blob42d6114dcd447917fe095b80fdc1ae536fe1543a
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 /*
4 * Nautilus
6 * Copyright (C) 2000 Eazel, Inc.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
23 * Author: Andy Hertzfeld <andy@eazel.com>
26 #include <config.h>
27 #include "nautilus-first-time-druid.h"
29 #include <glib/gi18n.h>
30 #include <libnautilus-private/nautilus-file-utilities.h>
31 #include <stdio.h>
32 #include <string.h>
34 void
35 nautilus_set_first_time_file_flag (void)
37 FILE *stream;
38 char *user_directory, *druid_flag_file_name;
39 const char * const blurb =
40 _("Existence of this file indicates that the Nautilus configuration druid\n"
41 "has been presented.\n\n"
42 "You can manually erase this file to present the druid again.\n");
44 user_directory = nautilus_get_user_directory ();
45 druid_flag_file_name = g_build_filename (user_directory, "first-time-flag", NULL);
46 g_free (user_directory);
48 stream = fopen (druid_flag_file_name, "w");
49 if (stream != NULL) {
50 fwrite (blurb, sizeof (char), strlen (blurb), stream);
51 fclose (stream);
53 g_free (druid_flag_file_name);