summaryrefslogtreecommitdiff
blob: 6fe9ef9cdc01f5942ce041f7a7119a8a8443ffbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
 http://bugs.gentoo.org/show_bug.cgi?id=133504

 2007-08-13  Milan Crha  <mcrha@redhat.com>

 ** Fix for bug http://bugzilla.gnome.org/show_bug.cgi?id=352346

 * camel-provider.h: Added new constants CAMEL_URL_PART_PATH_DIR and
 CAMEL_URL_NEED_PATH_DIR; when CAMEL_URL_NEED_PATH_DIR is set, then
 in editor dialog is choosing file, without it directory.

diff -Naur evolution-data-server-1.10.2.orig/camel/camel-provider.h evolution-data-server-1.10.2/camel/camel-provider.h
--- evolution-data-server-1.10.2.orig/camel/camel-provider.h	2007-04-09 16:42:48.000000000 +0400
+++ evolution-data-server-1.10.2/camel/camel-provider.h	2007-08-13 13:00:24.000000000 +0400
@@ -85,6 +85,7 @@
 #define CAMEL_URL_PART_HOST	 (1 << 3)
 #define CAMEL_URL_PART_PORT	 (1 << 4)
 #define CAMEL_URL_PART_PATH	 (1 << 5)
+#define CAMEL_URL_PART_PATH_DIR  (1 << 6)
 
 #define CAMEL_URL_PART_NEED	       8
 #define CAMEL_URL_PART_HIDDEN	(CAMEL_URL_PART_NEED + 8)
@@ -108,6 +109,7 @@
 #define CAMEL_URL_NEED_HOST	 (CAMEL_URL_PART_HOST << CAMEL_URL_PART_NEED)
 #define CAMEL_URL_NEED_PORT	 (CAMEL_URL_PART_PORT << CAMEL_URL_PART_NEED)
 #define CAMEL_URL_NEED_PATH	 (CAMEL_URL_PART_PATH << CAMEL_URL_PART_NEED)
+#define CAMEL_URL_NEED_PATH_DIR  (CAMEL_URL_PART_PATH_DIR << CAMEL_URL_PART_NEED)
 
 #define CAMEL_URL_HIDDEN_USER	 (CAMEL_URL_PART_USER << CAMEL_URL_PART_HIDDEN)
 #define CAMEL_URL_HIDDEN_AUTH	 (CAMEL_URL_PART_AUTH << CAMEL_URL_PART_HIDDEN)
diff -Naur evolution-data-server-1.10.2.orig/camel/providers/local/camel-local-provider.c evolution-data-server-1.10.2/camel/providers/local/camel-local-provider.c
--- evolution-data-server-1.10.2.orig/camel/providers/local/camel-local-provider.c	2007-04-09 16:42:41.000000000 +0400
+++ evolution-data-server-1.10.2/camel/providers/local/camel-local-provider.c	2007-08-13 13:01:06.000000000 +0400
@@ -55,7 +55,7 @@
 	N_("For storing local mail in MH-like mail directories."),
 	"mail",
 	CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_IS_LOCAL,
-	CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
+	CAMEL_URL_NEED_PATH | CAMEL_URL_NEED_PATH_DIR | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
 	mh_conf_entries,
 	/* ... */
 };
@@ -73,7 +73,7 @@
 	N_("For retrieving (moving) local mail from standard mbox-formatted spools into folders managed by Evolution."),
 	"mail",
 	CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_IS_LOCAL,
-	CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
+	CAMEL_URL_NEED_PATH | CAMEL_URL_NEED_PATH_DIR |CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
 	mbox_conf_entries,
 	/* ... */
 };
@@ -95,7 +95,7 @@
 	N_("For storing local mail in maildir directories."),
 	"mail",
 	CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_IS_LOCAL,
-	CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
+	CAMEL_URL_NEED_PATH | CAMEL_URL_NEED_PATH_DIR | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
 	maildir_conf_entries,
 	/* ... */
 };
@@ -109,9 +109,9 @@
 	{ CAMEL_PROVIDER_CONF_END }
 };
 
-static CamelProvider spool_provider = {
+static CamelProvider spool_file_provider = {
 	"spool",
-	N_("Standard Unix mbox spool or directory"),
+	N_("Standard Unix mbox spool file"),
 	N_("For reading and storing local mail in external standard mbox spool files.\nMay also be used to read a tree of Elm, Pine, or Mutt style folders."),
 	"mail",
 	CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
@@ -120,6 +120,17 @@
 	/* ... */
 };
 
+static CamelProvider spool_directory_provider = {
+	"spooldir",
+	N_("Standard Unix mbox spool directory"),
+	N_("For reading and storing local mail in external standard mbox spool files.\nMay also be used to read a tree of Elm, Pine, or Mutt style folders."),
+	"mail",
+	CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
+	CAMEL_URL_NEED_PATH | CAMEL_URL_NEED_PATH_DIR | CAMEL_URL_PATH_IS_ABSOLUTE | CAMEL_URL_FRAGMENT_IS_PATH,
+	spool_conf_entries,
+	/* ... */
+};
+
 #endif
 
 /* build a canonical 'path' */
@@ -233,13 +244,19 @@
 	camel_provider_register(&mbox_provider);
 
 #ifndef G_OS_WIN32
-	spool_conf_entries[0].value = path;  /* default path - same as mbox */
-	spool_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type ();
-	spool_provider.url_hash = local_url_hash;
-	spool_provider.url_equal = local_url_equal;
-	spool_provider.translation_domain = GETTEXT_PACKAGE;
-	camel_provider_register(&spool_provider);
-	
+	spool_conf_entries[0].value = path;  /* default path - same as mbox; it's for both file and directory */
+	spool_file_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type ();
+	spool_file_provider.url_hash = local_url_hash;
+	spool_file_provider.url_equal = local_url_equal;
+	spool_file_provider.translation_domain = GETTEXT_PACKAGE;
+	camel_provider_register(&spool_file_provider);
+
+	spool_directory_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type ();
+	spool_directory_provider.url_hash = local_url_hash;
+	spool_directory_provider.url_equal = local_url_equal;
+	spool_directory_provider.translation_domain = GETTEXT_PACKAGE;
+	camel_provider_register(&spool_directory_provider);
+
 	path = getenv("MAILDIR");
 	maildir_conf_entries[0].value = path ? path : "";  /* default path */
 	maildir_provider.object_types[CAMEL_PROVIDER_STORE] = camel_maildir_store_get_type ();