diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-setup.c | 10 | ||||
-rw-r--r-- | shell/main.c | 5 |
4 files changed, 23 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2000-04-06 Matt Loper <matt@helixcode.com> + + * shell/main.c (evolution_boot): Make sure our data directory is + available with e_setup_base_dir (). + 2000-04-06 Christopher James Lahey <clahey@helixcode.com> * addressbook/demo/demo.c, addressbook/demo/addressbook-widget.c: diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 58bc5fb82b..400bef8888 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2000-04-06 Matt Loper <matt@helixcode.com> + + * e-setup.c (e_setup_base_dir): Get/set Evolution's base directory + via gnome-config. + 2000-03-22 NotZed <NotZed@HelixCode.com> * e-util/e-sexp.h: Formatting cleanup. diff --git a/e-util/e-setup.c b/e-util/e-setup.c index 63d376d310..ba9d483ac2 100644 --- a/e-util/e-setup.c +++ b/e-util/e-setup.c @@ -21,9 +21,12 @@ gboolean e_setup_base_dir (void) { struct stat s; + + evolution_dir = gnome_config_get_string("/Evolution/directories/home"); - evolution_dir = g_concat_dir_and_file (g_get_home_dir (), "evolution"); - + if (!evolution_dir) evolution_dir = + g_concat_dir_and_file (g_get_home_dir (), "evolution"); + if (stat (evolution_dir, &s) == -1){ if (mkdir (evolution_dir, S_IRWXU) == -1){ return FALSE; @@ -46,6 +49,9 @@ e_setup_base_dir (void) evolution_folders_dir = g_concat_dir_and_file (evolution_dir, "folders"); mkdir (evolution_folders_dir, S_IRWXU); + gnome_config_set_string ("/Evolution/directories/home", + evolution_dir); + gnome_config_sync(); return TRUE; } diff --git a/shell/main.c b/shell/main.c index 1c93579d85..71060acf38 100644 --- a/shell/main.c +++ b/shell/main.c @@ -11,6 +11,7 @@ #include <bonobo.h> #include <e-util/e-gui-utils.h> #include <e-util/e-cursors.h> +#include <e-util/e-setup.h> /* for e_setup_base_dir */ #include <glade/glade.h> #include <glade/glade-xml.h> #include "e-shell.h" @@ -68,6 +69,10 @@ evolution_boot (void) { EShellView *e_shell_view; + /* FIXME: this is rude */ + if (!e_setup_base_dir ()) + exit (0); + eshell = e_shell_new (); e_shell_view = E_SHELL_VIEW ( e_shell_view_new (eshell, |