/devel/xparam/

>
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
-rw-r--r--shell/ChangeLog14
-rw-r--r--shell/e-setup.c145
-rw-r--r--shell/e-shell-view-menu.c1
-rw-r--r--shell/e-shell-view.c4
-rw-r--r--shell/e-shell.c1
5 files changed, 162 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index f5d6979cac..65f61b4097 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,17 @@
+2000-10-11 Iain Holmes <iain@helixcode.com>
+
+ * e-setup.c (check_evolution_directory): Check if there are any
+ files in default_user that are not in ~/evolution and if so
+ copy them over.
+ (check_dir_recur): Recursive function to check the directory.
+
+ * e-shell-view-menu.c: Look Maw! I'm an Evolution hacker too.
+
+ * e-shell-view.c: Don't quit on when a view is destroyed.
+
+ * e-shell.c: Save the settings for the remaining views whenever
+ a view is destroyed.
+
2000-10-15 Ettore Perazzoli <ettore@helixcode.com>
* e-shell-view.c (setup_storage_set_subwindow): Use an
diff --git a/shell/e-setup.c b/shell/e-setup.c
index 3393247f35..bdbb227abe 100644
--- a/shell/e-setup.c
+++ b/shell/e-setup.c
@@ -27,12 +27,153 @@
#include <errno.h>
#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
#include "e-util/e-gui-utils.h"
#include "e-setup.h"
+static GList *
+check_dir_recur (const char *evolution_directory,
+ const char *current_directory)
+{
+ DIR *def;
+ GList *newfiles = NULL;
+ struct dirent *current;
+
+ def = opendir (current_directory);
+ if (def == NULL)
+ return NULL;
+
+ current = readdir (def);
+ while (current != NULL) {
+ struct stat buf;
+ char *fullname, *fulldefaultname;
+
+ fullname = g_concat_dir_and_file (evolution_directory,
+ current->d_name);
+ fulldefaultname = g_concat_dir_and_file (current_directory,
+ current->d_name);
+
+ if (current->d_name[0] == '.' &&
+ (current->d_name[1] == '\0' ||
+ (current->d_name[1] == '.' && current->d_name[2] == '\0'))) {
+ current = readdir (def);
+ continue;
+ }
+
+ if (stat (fullname, &buf) == -1) {
+ char *name;
+
+ name = g_strdup (fulldefaultname);
+ newfiles = g_list_append (newfiles, name);
+ } else {
+ if (S_ISDIR (buf.st_mode)) {
+ newfiles = g_list_concat (newfiles,
+ check_dir_recur (fullname,
+ fulldefaultname));
+ }
+ }
+
+ g_free (fulldefaultname);
+ g_free (fullname);
+ current = readdir (def);
+ }
+
+ closedir (def);
+ return newfiles;
+}
+
+static gboolean
+check_evolution_directory (const char *evolution_dir