[evolution-patches] Moving autosave files into the .evolution directory
- From: David Malcolm <dmalcolm redhat com>
- To: Evolution Patches <evolution-patches ximian com>
- Cc:
- Subject: [evolution-patches] Moving autosave files into the .evolution directory
- Date: Mon, 06 Jun 2005 19:44:59 -0400
Attached is a patch to move the composer's autosave files into
~/.evolution, rather than cluttering up the home directory.
? addressbook/addressbook.error
? calendar/calendar.error
? calendar/gui/apps_evolution_calendar-2.4.schemas
? calendar/gui/dialogs/meeting-page.loT
? composer/mail-composer.error
? e-util/e-system.error
? filter/filter.error
? help/C/evolution-2.4-C.omf
? help/C/evolution-2.4.xml
? mail/evolution-mail-2.4.schemas
? mail/mail.error
? mail/default/zh_CN/Makefile
? mail/default/zh_CN/Makefile.in
? plugins/addressbook-file/Makefile
? plugins/addressbook-file/Makefile.in
? plugins/addressbook-file/org-gnome-addressbook-file.eplug
? plugins/addressbook-groupwise/Makefile
? plugins/addressbook-groupwise/Makefile.in
? plugins/addressbook-groupwise/org-gnome-addressbook-groupwise.eplug
? plugins/default-source/Makefile
? plugins/default-source/Makefile.in
? plugins/default-source/org-gnome-default-source.eplug
? plugins/exchange-account-setup/Makefile
? plugins/exchange-account-setup/Makefile.in
? plugins/exchange-account-setup/org-gnome-exchange-account-setup.eplug
? plugins/groupwise-account-setup/Makefile
? plugins/groupwise-account-setup/Makefile.in
? plugins/groupwise-account-setup/org-gnome-gw-account-setup.eplug
? plugins/groupwise-send-options/Makefile
? plugins/groupwise-send-options/Makefile.in
? plugins/groupwise-send-options/org-gnome-compose-send-options.eplug
? plugins/groupwise-status-tracking/Makefile
? plugins/groupwise-status-tracking/Makefile.in
? plugins/groupwise-status-tracking/org-gnome-status-track.eplug
? plugins/itip-formatter/org-gnome-itip-formatter.error
? plugins/mail-remote/Makefile
? plugins/mail-remote/Makefile.in
? plugins/mailing-list-actions/org-gnome-mailing-list-actions.error
? plugins/mark-all-read/Makefile
? plugins/mark-all-read/Makefile.in
? plugins/mark-all-read/org-gnome-mark-all-read.eplug
? plugins/new-mail-notify/Makefile
? plugins/new-mail-notify/Makefile.in
? plugins/new-mail-notify/org-gnome-new-mail-notify.eplug
? plugins/print-message/Makefile
? plugins/print-message/Makefile.in
? plugins/print-message/org-gnome-print-message.eplug
? plugins/profiler/Makefile
? plugins/profiler/Makefile.in
? plugins/send-options/Makefile
? plugins/send-options/Makefile.in
? plugins/send-options/org-gnome-send-options.eplug
? plugins/shared-folder/Makefile
? plugins/shared-folder/Makefile.in
? plugins/shared-folder/org-gnome-shared-folder.eplug
? plugins/shared-folder/org-gnome-shared-folder.error
? shell/shell.error
Index: composer/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.700
diff -u -p -r1.700 ChangeLog
--- composer/ChangeLog 3 Jun 2005 09:52:02 -0000 1.700
+++ composer/ChangeLog 6 Jun 2005 23:39:33 -0000
@@ -1,3 +1,9 @@
+2005-06-06 David Malcolm <dmalcolm redhat com>
+
+ * e-msg-composer.c (autosave_manager_query_load_orphans,
+ autosave_init_file): Move the autosave files into the .evolution
+ directory, based on work by Ivan Gyurdiev.
+
2005-06-03 Srinivasa Ragavan <sragavan novell com>
* e-msg-composer.c (e_msg_composer_attach): Fixed to show the
Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.510
diff -u -p -r1.510 e-msg-composer.c
--- composer/e-msg-composer.c 3 Jun 2005 09:52:02 -0000 1.510
+++ composer/e-msg-composer.c 6 Jun 2005 23:39:33 -0000
@@ -1381,10 +1381,14 @@ autosave_manager_query_load_orphans (Aut
struct dirent *d;
GSList *match = NULL;
gint len = strlen (AUTOSAVE_SEED);
- gint load = FALSE;
-
- dir = opendir (g_get_home_dir());
+ gint load = FALSE;
+ char* dirname;
+
+ dirname = g_strdup_printf ("%s/.evolution", g_get_home_dir());
+ dir = opendir (dirname);
+
if (!dir) {
+ g_free (dirname);
return;
}
@@ -1392,7 +1396,7 @@ autosave_manager_query_load_orphans (Aut
if ((!strncmp (d->d_name, AUTOSAVE_SEED, len - 6))
&& (strlen (d->d_name) == len)
&& (!autosave_is_owned (am, d->d_name))) {
- char *filename = g_strdup_printf ("%s/%s", g_get_home_dir(), d->d_name);
+ char *filename = g_strdup_printf ("%s/%s", dirname, d->d_name);
struct stat st;
/*
@@ -1409,6 +1413,7 @@ autosave_manager_query_load_orphans (Aut
}
closedir (dir);
+ g_free (dirname);
if (match != NULL)
load = e_error_run(parent, "mail-composer:recover-autosave", NULL) == GTK_RESPONSE_YES;
@@ -1456,7 +1461,7 @@ static gboolean
autosave_init_file (EMsgComposer *composer)
{
if (composer->autosave_file == NULL) {
- composer->autosave_file = g_strdup_printf ("%s/%s", g_get_home_dir(), AUTOSAVE_SEED);
+ composer->autosave_file = g_strdup_printf ("%s/.evolution/%s", g_get_home_dir(), AUTOSAVE_SEED);
composer->autosave_fd = mkstemp (composer->autosave_file);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]