Gentoo Archives: gentoo-commits

From: "Peter Alfredsen (loki_val)" <loki_val@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-misc/beagle/files: beagle-0.3.8-fix_gvfs.patch beagle-0.3.8-fix_gmime-2.4.patch
Date: Sat, 22 Nov 2008 22:50:36
Message-Id: E1L41JA-0001Bf-Fq@stork.gentoo.org
1 loki_val 08/11/22 22:50:32
2
3 Added: beagle-0.3.8-fix_gvfs.patch
4 beagle-0.3.8-fix_gmime-2.4.patch
5 Log:
6 Fix beagle for gmime-2.4, patch from frugalware and adjust deps for gtk-sharp-2.12*
7 (Portage version: 2.2_rc14/cvs/Linux 2.6.28-rc4 x86_64)
8
9 Revision Changes Path
10 1.1 app-misc/beagle/files/beagle-0.3.8-fix_gvfs.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/beagle/files/beagle-0.3.8-fix_gvfs.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/beagle/files/beagle-0.3.8-fix_gvfs.patch?rev=1.1&content-type=text/plain
14
15 Index: beagle-0.3.8-fix_gvfs.patch
16 ===================================================================
17 --- beagle-0.3.8old/search/Beagle.Search.Tiles/Tile.cs 2008-06-12 07:41:19.000000000 +0200
18 +++ beagle-0.3.8/search/Beagle.Search.Tiles/Tile.cs 2008-10-18 20:25:23.000000000 +0200
19 @@ -348,7 +348,7 @@
20 #else
21 MimeApplication app;
22 app = Mime.GetDefaultApplication (mimetype);
23 - bool expect_uris = app.SupportUris ();
24 + bool expect_uris = app.SupportsUris ();
25 path = hit.Path;
26
27 if (app == null) {
28
29
30
31 1.1 app-misc/beagle/files/beagle-0.3.8-fix_gmime-2.4.patch
32
33 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/beagle/files/beagle-0.3.8-fix_gmime-2.4.patch?rev=1.1&view=markup
34 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/beagle/files/beagle-0.3.8-fix_gmime-2.4.patch?rev=1.1&content-type=text/plain
35
36 Index: beagle-0.3.8-fix_gmime-2.4.patch
37 ===================================================================
38 Index: beagle/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs
39 ===================================================================
40 --- beagle/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs (revision 4874)
41 +++ beagle/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs (working copy)
42 @@ -333,28 +333,46 @@
43 indexable.AddProperty (Property.NewUnsearched ("fixme:folder", this.folder_name));
44
45 GMime.InternetAddressList addrs;
46 -
47 - addrs = message.GetRecipients (GMime.Message.RecipientType.To);
48 - foreach (GMime.InternetAddress ia in addrs) {
49 - if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group)
50 - indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr));
51 +
52 + if (this.folder_name == "Sent") {
53 + addrs = message.GetRecipients (GMime.RecipientType.To);
54 + foreach (GMime.InternetAddress ia in addrs) {
55 + if (ia is GMime.InternetAddressMailbox) {
56 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
57 +
58 + indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address));
59 + }
60 + }
61 +
62 + addrs.Dispose ();
63 }
64 - addrs.Dispose ();
65 -
66 - addrs = message.GetRecipients (GMime.Message.RecipientType.Cc);
67 - foreach (GMime.InternetAddress ia in addrs) {
68 - if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group)
69 - indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr));
70 +
71 + if (this.folder_name == "Sent") {
72 + addrs = message.GetRecipients (GMime.RecipientType.Cc);
73 + foreach (GMime.InternetAddress ia in addrs) {
74 + if (ia is GMime.InternetAddressMailbox) {
75 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
76 +
77 + indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address));
78 + }
79 + }
80 +
81 + addrs.Dispose ();
82 }
83 - addrs.Dispose ();
84 -
85 - addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender));
86 - foreach (GMime.InternetAddress ia in addrs) {
87 - if (this.folder_name != "Sent" && ia.AddressType != GMime.InternetAddressType.Group)
88 - indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", ia.Addr));
89 +
90 + if (this.folder_name != "Sent") {
91 + addrs = GMime.InternetAddressList.Parse (message.Sender);
92 + foreach (GMime.InternetAddress ia in addrs) {
93 + if (ia is GMime.InternetAddressMailbox) {
94 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
95 +
96 + indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", mailbox.Address));
97 + }
98 + }
99 +
100 + addrs.Dispose ();
101 }
102 - addrs.Dispose ();
103 -
104 +
105 if (this.folder_name == "Sent")
106 indexable.AddProperty (Property.NewFlag ("fixme:isSent"));
107
108 @@ -750,48 +768,54 @@
109 }
110
111 GMime.InternetAddressList addrs;
112 - addrs = GMime.InternetAddressList.ParseString (messageInfo.to);
113 + addrs = GMime.InternetAddressList.Parse (messageInfo.to);
114 foreach (GMime.InternetAddress ia in addrs) {
115 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
116 +
117 if (!have_content) {
118 indexable.AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false)));
119 - if (ia.AddressType != GMime.InternetAddressType.Group)
120 - indexable.AddProperty (Property.New ("fixme:to_address", ia.Addr));
121 -
122 + if (ia is GMime.InternetAddressMailbox)
123 + indexable.AddProperty (Property.New ("fixme:to_address", mailbox.Address));
124 +
125 indexable.AddProperty (Property.New ("fixme:to_name", ia.Name));
126 }
127 -
128 - if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group)
129 - indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr));
130 +
131 + if (this.folder_name == "Sent" && ia is GMime.InternetAddressMailbox)
132 + indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address));
133 }
134 addrs.Dispose ();
135
136 - addrs = GMime.InternetAddressList.ParseString (messageInfo.cc);
137 + addrs = GMime.InternetAddressList.Parse (messageInfo.cc);
138 foreach (GMime.InternetAddress ia in addrs) {
139 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
140 +
141 if (!have_content) {
142 indexable.AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false)));
143 - if (ia.AddressType != GMime.InternetAddressType.Group)
144 - indexable.AddProperty (Property.New ("fixme:cc_address", ia.Addr));
145 -
146 + if (ia is GMime.InternetAddressMailbox)
147 + indexable.AddProperty (Property.New ("fixme:cc_address", mailbox.Address));
148 +
149 indexable.AddProperty (Property.New ("fixme:cc_name", ia.Name));
150 }
151 -
152 - if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group)
153 - indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr));
154 +
155 + if (this.folder_name == "Sent" && ia is GMime.InternetAddressMailbox)
156 + indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address));
157 }
158 addrs.Dispose ();
159
160 - addrs = GMime.InternetAddressList.ParseString (messageInfo.from);
161 + addrs = GMime.InternetAddressList.Parse (messageInfo.from);
162 foreach (GMime.InternetAddress ia in addrs) {
163 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
164 +
165 if (!have_content) {
166 indexable.AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false)));
167 - if (ia.AddressType != GMime.InternetAddressType.Group)
168 - indexable.AddProperty (Property.New ("fixme:from_address", ia.Addr));
169 -
170 + if (ia is GMime.InternetAddressMailbox)
171 + indexable.AddProperty (Property.New ("fixme:from_address", mailbox.Address));
172 +
173 indexable.AddProperty (Property.New ("fixme:from_name", ia.Name));
174 }
175
176 - if (this.folder_name != "Sent" && ia.AddressType != GMime.InternetAddressType.Group)
177 - indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", ia.Addr));
178 + if (this.folder_name != "Sent" && ia is GMime.InternetAddressMailbox)
179 + indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", mailbox.Address));
180 }
181 addrs.Dispose ();
182
183 Index: beagle/beagled/KMailQueryable/KMailIndexer.cs
184 ===================================================================
185 --- beagle/beagled/KMailQueryable/KMailIndexer.cs (revision 4874)
186 +++ beagle/beagled/KMailQueryable/KMailIndexer.cs (working copy)
187 @@ -407,28 +407,46 @@
188 indexable.AddProperty (Property.NewUnsearched ("fixme:folder", folder_name));
189
190 GMime.InternetAddressList addrs;
191 -
192 - addrs = message.GetRecipients (GMime.Message.RecipientType.To);
193 - foreach (GMime.InternetAddress ia in addrs) {
194 - if (folder_name == Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group)
195 - indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", ia.Addr));
196 +
197 + if (folder_name == Queryable.SentMailFolderName) {
198 + addrs = message.GetRecipients (GMime.RecipientType.To);
199 + foreach (GMime.InternetAddress ia in addrs) {
200 + if (ia is GMime.InternetAddressMailbox) {
201 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
202 +
203 + indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", mailbox.Address));
204 + }
205 + }
206 +
207 + addrs.Dispose ();
208 }
209 - addrs.Dispose ();
210 -
211 - addrs = message.GetRecipients (GMime.Message.RecipientType.Cc);
212 - foreach (GMime.InternetAddress ia in addrs) {
213 - if (folder_name == Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group)
214 - indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", ia.Addr));
215 +
216 + if (folder_name == Queryable.SentMailFolderName) {
217 + addrs = message.GetRecipients (GMime.RecipientType.Cc);
218 + foreach (GMime.InternetAddress ia in addrs) {
219 + if (ia is GMime.InternetAddressMailbox) {
220 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
221 +
222 + indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", mailbox.Address));
223 + }
224 + }
225 +
226 + addrs.Dispose ();
227 }
228 - addrs.Dispose ();
229 -
230 - addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender));
231 - foreach (GMime.InternetAddress ia in addrs) {
232 - if (folder_name != Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group)
233 - indexable.AddProperty (Property.NewKeyword ("fixme:gotFrom", ia.Addr));
234 +
235 + if (folder_name != Queryable.SentMailFolderName) {
236 + addrs = GMime.InternetAddressList.Parse (message.Sender);
237 + foreach (GMime.InternetAddress ia in addrs) {
238 + if (ia is GMime.InternetAddressMailbox) {
239 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
240 +
241 + indexable.AddProperty (Property.NewKeyword ("fixme:gotFrom", mailbox.Address));
242 + }
243 + }
244 +
245 + addrs.Dispose ();
246 }
247 - addrs.Dispose ();
248 -
249 +
250 if (folder_name == Queryable.SentMailFolderName)
251 indexable.AddProperty (Property.NewFlag ("fixme:isSent"));
252 else {
253 Index: beagle/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs
254 ===================================================================
255 --- beagle/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs (revision 4874)
256 +++ beagle/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs (working copy)
257 @@ -363,9 +363,14 @@
258 message.Subject = Mime.HeaderDecodeText (GetText (document, "Subject"));
259 message.Sender = Mime.HeaderDecodePhrase (GetText (document, "Author"));
260 message.MessageId = GetText (document, "MessageId");
261 - message.SetDate (DateTimeUtil.UnixToDateTimeUtc (Convert.ToInt64 (GetText (document, "Date"))), 0);
262 - message.AddRecipientsFromString ("To", Mime.HeaderDecodePhrase (GetText (document, "Recipients")));
263 -
264 + message.Date = DateTimeUtil.UnixToDateTimeUtc (Convert.ToInt64 (GetText (document, "Date")));
265 +
266 + string str = GetText (document, "Recipients");
267 + GMime.InternetAddressList recipients = GMime.InternetAddressList.Parse (str);
268 + foreach (GMime.InternetAddress ia in recipients)
269 + message.To.Add (ia);
270 + recipients.Dispose ();
271 +
272 return message;
273 }
274
275 @@ -430,7 +435,7 @@
276
277 // We _know_ that the stream comes from a StreamReader, which uses UTF8 by
278 // default. So we use that here when parsing our string.
279 - return (str != null ? Encoding.UTF8.GetString (str, 0, pos) : string.Empty);
280 + return (str != null ? System.Text.Encoding.UTF8.GetString (str, 0, pos) : string.Empty);
281 }
282
283 // This spell "charset="
284 @@ -458,7 +463,7 @@
285 // instead of UTF-8 in some cases and that will really mess things up.
286 byte[] buffer = null;
287 int c, header_length = 0, newlines = 0, charset_pos = 0;
288 - Encoding enc = Encoding.UTF8;
289 + System.Text.Encoding enc = System.Text.Encoding.UTF8;
290 try {
291 do {
292 c = stream.BaseStream.ReadByte ();
293 @@ -487,7 +492,7 @@
294 stream.BaseStream.Read (buffer, 0, buffer.Length);
295
296 // We need to use correct encoding
297 - enc = Encoding.GetEncoding (encoding_str);
298 + enc = System.Text.Encoding.GetEncoding (encoding_str);
299 } catch {
300 } finally {
301 stream.Close ();
302 Index: beagle/beagled/GoogleBackends/GMailSearchDriver.cs
303 ===================================================================
304 --- beagle/beagled/GoogleBackends/GMailSearchDriver.cs (revision 4874)
305 +++ beagle/beagled/GoogleBackends/GMailSearchDriver.cs (working copy)
306 @@ -322,38 +322,47 @@
307 hit.AddProperty (Property.NewDate ("fixme:date", message.Date.ToUniversalTime ()));
308
309 GMime.InternetAddressList addrs;
310 - addrs = message.GetRecipients (GMime.Message.RecipientType.To);
311 + addrs = message.GetRecipients (GMime.RecipientType.To);
312 foreach (GMime.InternetAddress ia in addrs) {
313 hit.AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false)));
314 - if (ia.AddressType != GMime.InternetAddressType.Group)
315 - hit.AddProperty (Property.New ("fixme:to_address", ia.Addr));
316 -
317 + if (ia is GMime.InternetAddressMailbox) {
318 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
319 +
320 + hit.AddProperty (Property.New ("fixme:to_address", mailbox.Address));
321 + }
322 +
323 hit.AddProperty (Property.New ("fixme:to_name", ia.Name));
324 }
325 addrs.Dispose ();
326
327 - addrs = message.GetRecipients (GMime.Message.RecipientType.Cc);
328 + addrs = message.GetRecipients (GMime.RecipientType.Cc);
329 foreach (GMime.InternetAddress ia in addrs) {
330 hit.AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false)));
331 - if (ia.AddressType != GMime.InternetAddressType.Group)
332 - hit.AddProperty (Property.New ("fixme:cc_address", ia.Addr));
333 -
334 + if (ia is GMime.InternetAddressMailbox) {
335 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
336 +
337 + hit.AddProperty (Property.New ("fixme:cc_address", mailbox.Address));
338 + }
339 +
340 hit.AddProperty (Property.New ("fixme:cc_name", ia.Name));
341 }
342 addrs.Dispose ();
343
344 - addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender));
345 + addrs = GMime.InternetAddressList.Parse (message.Sender);
346 foreach (GMime.InternetAddress ia in addrs) {
347 hit.AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false)));
348 - if (ia.AddressType != GMime.InternetAddressType.Group)
349 - hit.AddProperty (Property.New ("fixme:from_address", ia.Addr));
350 -
351 + if (ia is GMime.InternetAddressMailbox) {
352 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
353 +
354 + hit.AddProperty (Property.New ("fixme:from_address", mailbox.Address));
355 + }
356 +
357 hit.AddProperty (Property.New ("fixme:from_name", ia.Name));
358 }
359 addrs.Dispose ();
360
361 foreach (GMime.References refs in message.References)
362 - hit.AddProperty (Property.NewUnsearched ("fixme:reference", refs.Msgid));
363 + hit.AddProperty (Property.NewUnsearched ("fixme:reference", refs.MessageId));
364
365 string list_id = message.GetHeader ("List-Id");
366 if (list_id != null)
367 Index: beagle/configure.in
368 ===================================================================
369 --- beagle/configure.in (revision 4874)
370 +++ beagle/configure.in (working copy)
371 @@ -17,7 +17,7 @@
372 NDESK_DBUS_REQUIRED=0.5.2
373 NDESK_DBUS_GLIB_REQUIRED=0.3.0
374 GTK_SHARP_REQUIRED=2.10.0
375 -GMIME_SHARP_REQUIRED=2.2.0
376 +GMIME_SHARP_REQUIRED=2.3.5
377 EVOLUTION_SHARP_REQUIRED=0.13.3
378 GSF_SHARP_REQUIRED=0.6
379 GTK_REQUIRED=2.10.0
380 @@ -223,7 +223,7 @@
381 glade-sharp-2.0 >= $GTK_SHARP_REQUIRED
382 gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED
383 gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED
384 - gmime-sharp >= $GMIME_SHARP_REQUIRED
385 + gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED
386 ])
387 AC_SUBST(BEAGLE_UI_LIBS)
388
389 @@ -270,7 +270,7 @@
390 evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \
391 gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \
392 glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
393 - gmime-sharp >= $GMIME_SHARP_REQUIRED,
394 + gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED,
395 have_evo_dependencies=yes, have_evo_dependencies=no)
396 AC_SUBST(EVO_LIBS)
397
398 @@ -377,14 +377,14 @@
399 PKG_CHECK_MODULES(BEAGLED,
400 [
401 shared-mime-info
402 - gmime-sharp >= $GMIME_SHARP_REQUIRED
403 + gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED
404 glib-sharp-2.0 >= $GTK_SHARP_REQUIRED
405 ])
406 BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_LIBS"
407 AC_SUBST(BEAGLED_LIBS)
408
409 GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp`
410 -GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp`
411 +GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp-2.4`
412
413 dnl ----------------------------------------------
414 dnl Epiphany Extension
415 Index: beagle/Filters/FilterMail.cs
416 ===================================================================
417 --- beagle/Filters/FilterMail.cs (revision 4874)
418 +++ beagle/Filters/FilterMail.cs (working copy)
419 @@ -126,7 +126,7 @@
420
421 // Messages that are multipart/alternative shouldn't be considered as having
422 // attachments. Unless of course they do.
423 - if (mime_part is GMime.Multipart && mime_part.ContentType.Subtype.ToLower () != "alternative")
424 + if (mime_part is GMime.Multipart && mime_part.ContentType.MediaSubtype.ToLower () != "alternative")
425 return true;
426
427 return false;
428 @@ -140,34 +140,43 @@
429 AddProperty (Property.NewDate ("fixme:date", message.Date.ToUniversalTime ()));
430
431 GMime.InternetAddressList addrs;
432 - addrs = this.message.GetRecipients (GMime.Message.RecipientType.To);
433 + addrs = this.message.GetRecipients (GMime.RecipientType.To);
434 foreach (GMime.InternetAddress ia in addrs) {
435 AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false)));
436 - if (ia.AddressType != GMime.InternetAddressType.Group)
437 - AddProperty (Property.New ("fixme:to_address", ia.Addr));
438 -
439 + if (ia is GMime.InternetAddressMailbox) {
440 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
441 +
442 + AddProperty (Property.New ("fixme:to_address", mailbox.Address));
443 + }
444 +
445 AddProperty (Property.New ("fixme:to_name", ia.Name));
446 AddEmailLink (ia);
447 }
448 addrs.Dispose ();
449
450 - addrs = this.message.GetRecipients (GMime.Message.RecipientType.Cc);
451 + addrs = this.message.GetRecipients (GMime.RecipientType.Cc);
452 foreach (GMime.InternetAddress ia in addrs) {
453 AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false)));
454 - if (ia.AddressType != GMime.InternetAddressType.Group)
455 - AddProperty (Property.New ("fixme:cc_address", ia.Addr));
456 -
457 + if (ia is GMime.InternetAddressMailbox) {
458 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
459 +
460 + AddProperty (Property.New ("fixme:cc_address", mailbox.Address));
461 + }
462 +
463 AddProperty (Property.New ("fixme:cc_name", ia.Name));
464 AddEmailLink (ia);
465 }
466 addrs.Dispose ();
467
468 - addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (this.message.Sender));
469 + addrs = GMime.InternetAddressList.Parse (this.message.Sender);
470 foreach (GMime.InternetAddress ia in addrs) {
471 AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false)));
472 - if (ia.AddressType != GMime.InternetAddressType.Group)
473 - AddProperty (Property.New ("fixme:from_address", ia.Addr));
474 -
475 + if (ia is GMime.InternetAddressMailbox) {
476 + GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox;
477 +
478 + AddProperty (Property.New ("fixme:from_address", mailbox.Address));
479 + }
480 +
481 AddProperty (Property.New ("fixme:from_name", ia.Name));
482 AddEmailLink (ia);
483 }
484 @@ -184,7 +193,7 @@
485 AddProperty (Property.NewUnsearched ("fixme:msgid", GMime.Utils.DecodeMessageId (msgid)));
486
487 foreach (GMime.References refs in this.message.References)
488 - AddProperty (Property.NewUnsearched ("fixme:reference", refs.Msgid));
489 + AddProperty (Property.NewUnsearched ("fixme:reference", refs.MessageId));
490
491 string list_id = this.message.GetHeader ("List-Id");
492 if (list_id != null)
493 @@ -345,16 +354,15 @@
494 }
495 } else if (mime_part is GMime.Multipart) {
496 GMime.Multipart multipart = (GMime.Multipart) mime_part;
497 + int num_parts = multipart.Count;
498
499 - int num_parts = multipart.Number;
500 -
501 // If the mimetype is multipart/alternative, we only want to index
502 // one part -- the richest one we can filter.
503 - if (mime_part.ContentType.Subtype.ToLower () == "alternative") {
504 + if (mime_part.ContentType.MediaSubtype.ToLower () == "alternative") {
505 // The richest formats are at the end, so work from there
506 // backward.
507 for (int i = num_parts - 1; i >= 0; i--) {
508 - GMime.Object subpart = multipart.GetPart (i);
509 + GMime.Object subpart = multipart[i];
510
511 if (IsMimeTypeHandled (subpart.ContentType.ToString ())) {
512 part = subpart;
513 @@ -370,7 +378,7 @@
514 // the parts, treat them like a bunch of attachments.
515 if (part == null) {
516 for (int i = 0; i < num_parts; i++) {
517 - using (GMime.Object subpart = multipart.GetPart (i))
518 + using (GMime.Object subpart = multipart[i])
519 this.OnEachPart (subpart);
520 }
521 }
522 @@ -400,7 +408,7 @@
523 } else if (mime_type == "text/html") {
524 no_child_needed = true;
525 html_part = true;
526 - string enc = part.GetContentTypeParameter ("charset");
527 + string enc = part.ContentType.GetParameter ("charset");
528 // DataWrapper.Stream is a very limited stream
529 // and does not allow Seek or Tell
530 // HtmlFilter requires Stream.Position=0.
531 @@ -473,7 +481,7 @@
532 if (length != -1)
533 child.AddProperty (Property.NewUnsearched ("fixme:filesize", length));
534
535 - if (part.ContentType.Type.ToLower () == "text")
536 + if (part.ContentType.MediaType.ToLower () == "text")
537 child.SetTextReader (new StreamReader (stream));
538 else
539 child.SetBinaryStream (stream);