aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/Makefile.am2
-rw-r--r--e-util/e-setup.c102
-rw-r--r--e-util/e-setup.h11
4 files changed, 5 insertions, 115 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 27c2fa210c..ce4de0c31a 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,5 +1,10 @@
2000-08-10 Dan Winship <danw@helixcode.com>
+ * e-setup.[ch]: Remove. The shell tells the components where
+ the evolution homedir is now.
+
+ * Makefile.am (libeutil_la_SOURCES): Remove e-setup.c
+
* e-html-utils.c (e_text_to_html): If converting both spaces and
newlines, then convert tabs too. The joys of pseudo-<PRE>.
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 9f2c0f3990..dfb7724ae1 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -33,8 +33,6 @@ libeutil_la_SOURCES = \
e-popup-menu.h \
e-printable.c \
e-printable.h \
- e-setup.c \
- e-setup.h \
e-sexp.c \
e-sexp.h \
e-util.c \
diff --git a/e-util/e-setup.c b/e-util/e-setup.c
deleted file mode 100644
index f88ef97526..0000000000
--- a/e-util/e-setup.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Sets up the ~/evolution directory
- *
- * Author:
- * Miguel de Icaza (miguel@kernel.org)
- *
- * (C) 2000 Helix Code, Inc. http://www.helixcode.com
- */
-#include <config.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <unistd.h>
-#include <gnome.h>
-#include "e-setup.h"
-
-char *evolution_dir = NULL;
-char *evolution_folders_dir = NULL;
-char *evolution_shortcuts_dir = NULL;
-char *evolution_private = NULL;
-char *evolution_public = NULL;
-
-/* Try to ensure the existence of a directory, by checking for it and
- * creating it if necessary. It returns FALSE if it doesn't exist and
- * can't be created */
-static gboolean
-mkdir_if_necessary (char *dirname)
-{
- struct stat s;
-
- g_assert (dirname);
-
- /* If we can't stat the dirname... */
- if (stat (dirname, &s) == -1) {
-
- /* ...it may be because there's no such directory */
- if (errno == ENOENT) {
- g_print ("Directory %s doesn't exist; creating...",
- dirname);
- if (mkdir (dirname, S_IRWXU) == -1) {
- g_print ("failed! %s\n", g_strerror (errno));
- return FALSE;
- }
- else /* directory created! */
- g_print ("success!\n");
- }
- /* ..or maybe there's some other problem with the directory */
- else {
-
- g_print ("There's a problem with accessing "
- "\"%s\": %s\n",
- dirname, g_strerror(errno));
- return FALSE;
- }
- }
- /* There's a file or directory there. */
- else {
- /* if it's a file, complain; otherwise, we're all set */
- if (!S_ISDIR (s.st_mode)) {
- g_print ("Evolution is trying to create a directory,\n"
- "\"%s\". But there appears to be a file in\n"
- "the way. Move it away.\n",
- dirname);
- return FALSE;
- }
- }
- return TRUE;
-}
-
-
-gboolean
-e_setup_base_dir (void)
-{
- gboolean success = FALSE;
-
- /* try to get the evolution home directory from gnome-config;
- if we can't, we'll make a new one at ~/evolution */
- evolution_dir = gnome_config_get_string("/Evolution/directories/home");
-
- if (!evolution_dir) evolution_dir =
- g_concat_dir_and_file (g_get_home_dir (), "evolution");
-
- if (!evolution_folders_dir)
- evolution_folders_dir =
- g_concat_dir_and_file (evolution_dir, "folders");
-
- if (!evolution_shortcuts_dir)
- evolution_shortcuts_dir =
- g_concat_dir_and_file (evolution_dir, "shortcuts");
-
- if (mkdir_if_necessary (evolution_dir) &&
- mkdir_if_necessary (evolution_folders_dir) &&
- mkdir_if_necessary (evolution_shortcuts_dir)) {
-
- success = TRUE;
- gnome_config_set_string ("/Evolution/directories/home",
- evolution_dir);
- gnome_config_sync();
- }
-
- return success;
-}
-
diff --git a/e-util/e-setup.h b/e-util/e-setup.h
deleted file mode 100644
index 1c787473d9..0000000000
--- a/e-util/e-setup.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef EVOLUTION_UTIL_SETUP_H
-#define EVOLUTION_UTIL_SETUP_H
-
-#include <glib.h>
-
-gboolean e_setup_base_dir (void);
-
-extern char *evolution_folders_dir;
-extern char *evolution_dir;
-
-#endif /* EVOLUTION_UTIL_SETUP_H */