From 9d14474e02c1064bc58f29376565a2446c99f99c Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 22 Jan 2003 20:25:15 +0000 Subject: Install the shell executable as evolution-$(BASE_VERSION) using an * Makefile.am: Install the shell executable as evolution-$(BASE_VERSION) using an install-exec-local hack. Also put libeshell in $(privlibdir) instead of $(libdir). (eshellincludedir): Version using $(BASE_VERSION). (INCLUDES): Update for the new locations of things. (etspecdir): Likewise. * e-shell-view.c (e_shell_view_construct): Get evolution.xml from EVOLUTION_UIDIR. * importer/Makefile.am: Install libevolution-importer in $(privlibdir) instead of $(libdir). (INCLUDES): Updated for the new versioned paths. Define EVOLUTION_UIDIR. (libevolution_importerincludedir): Version using $(BASE_VERSION). (gladedir): Likewise. * glade/Makefile.am (gladedir): Version using $(BASE_VERSION). * e-setup.c (DEFAULT_USER_PATH): New #define. (check_evolution_directory): Use it. (copy_default_stuff): Likewise. Also, remove old shortcuts.xml removal cruft. svn path=/trunk/; revision=19565 --- shell/e-setup.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'shell/e-setup.c') diff --git a/shell/e-setup.c b/shell/e-setup.c index d7d19a9c37..ecd0ab5b0e 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -51,6 +51,8 @@ #include #include +#define DEFAULT_USER_PATH EVOLUTION_DATADIR "/evolution-" BASE_VERSION "/default_user" + static GList * check_dir_recur (const char *evolution_directory, @@ -116,12 +118,9 @@ check_evolution_directory (const char *evolution_directory) GtkWidget *label1, *label2; gboolean retval; GList *newfiles, *l; - char *defaultdir; int result; - defaultdir = g_strdup (EVOLUTION_DATADIR "/evolution/default_user"); - newfiles = g_list_concat (NULL, check_dir_recur (evolution_directory, - defaultdir)); + newfiles = g_list_concat (NULL, check_dir_recur (evolution_directory, DEFAULT_USER_PATH)); if (newfiles == NULL) { retval = TRUE; @@ -155,7 +154,7 @@ check_evolution_directory (const char *evolution_directory) char *command; char *shortpath; - shortpath = l->data + strlen (EVOLUTION_DATADIR "/evolution/default_user/"); + shortpath = l->data + strlen (DEFAULT_USER_PATH); command = g_strconcat ("cp -r ", l->data, " ", evolution_directory, "/", @@ -181,7 +180,6 @@ check_evolution_directory (const char *evolution_directory) g_free (l->data); g_list_free (newfiles); - g_free (defaultdir); return retval; } @@ -192,7 +190,6 @@ copy_default_stuff (const char *evolution_directory) { gboolean retval; char *command; - char *old_default_shortcuts_file; if (mkdir (evolution_directory, 0700)) { e_notice (NULL, GTK_MESSAGE_ERROR, @@ -202,11 +199,7 @@ copy_default_stuff (const char *evolution_directory) return FALSE; } - command = g_strconcat ("cp -r ", - EVOLUTION_DATADIR, - "/evolution/default_user/* ", - evolution_directory, - NULL); + command = g_strconcat ("cp -r " DEFAULT_USER_PATH " ", evolution_directory, NULL); if (system (command) != 0) { /* FIXME: Give more help. */ @@ -217,14 +210,6 @@ copy_default_stuff (const char *evolution_directory) retval = TRUE; } - /* Temporary block of code to keep it from using the older - shortcuts.xml that exists for current users in - $GNOME/share/evolution/default_user. Remove this by 1.0 */ - old_default_shortcuts_file = g_concat_dir_and_file (evolution_directory, - "shortcuts.xml"); - unlink (old_default_shortcuts_file); - g_free (old_default_shortcuts_file); - g_free (command); return retval; -- cgit v1.2.3