Merge lp:~cyphermox/evolution/3.1.3 into lp:~ubuntu-desktop/evolution/ubuntu

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 214
Merged at revision: 215
Proposed branch: lp:~cyphermox/evolution/3.1.3
Merge into: lp:~ubuntu-desktop/evolution/ubuntu
Diff against target: 2335 lines (+2259/-8)
9 files modified
debian/changelog (+23/-0)
debian/control (+8/-8)
debian/patches/99git_avoid_camel_stream_printf_005a26d.patch (+1343/-0)
debian/patches/99git_camelsession_e-passwords_99d492b.patch (+313/-0)
debian/patches/99git_drop_camel_stream_reset_17127fb.patch (+162/-0)
debian/patches/99git_ealertbar_underalloc_985ad2d.patch (+180/-0)
debian/patches/99git_emformatquote_cleanups_a51ea9b.patch (+224/-0)
debian/patches/series (+5/-0)
debian/rules (+1/-0)
To merge this branch: bzr merge lp:~cyphermox/evolution/3.1.3
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Review via email: mp+67595@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

merging..

review: Approve
lp:~cyphermox/evolution/3.1.3 updated
215. By Mathieu Trudel-Lapierre

releasing version 3.1.3-0ubuntu1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-06-28 15:54:12 +0000
3+++ debian/changelog 2011-07-11 20:53:51 +0000
4@@ -1,3 +1,26 @@
5+evolution (3.1.3-0ubuntu1) oneiric; urgency=low
6+
7+ * New upstream release.
8+ - bgo 652958 - Evolution Account Assistant jumps steps (LP: #799469)
9+ - bgo 653154 - Crash when constructing calendar view (LP: #802405)
10+ - bgo 649757 - 'Local delivery' accounts stopped working (LP: #781391)
11+ * debian/control: bump E-D-S build-depends.
12+ * debian/rules: configure with --disable-goa.
13+ * debian/patches/99git_camelsession_e-passwords_99d492b.patch: cherry-pick
14+ upstream patch to adapt to CamelSession and e-passwords changes.
15+ * debian/patches/99git_emformatquote_cleanups_a51ea9b.patch: cherry-pick some
16+ cleanup work.
17+ * debian/patches/99git_drop_camel_stream_reset_17127fb.patch: cherry-pick
18+ upstream patch to replace camel_stream_reset() with g_seekable_seek(),
19+ should fix FTBFS.
20+ * debian/patches/99git_avoid_camel_stream_printf_005a26d.patch: cherry-pick
21+ upstream changes to drop camel_stream_printf() uses.
22+ * debian/patches/99git_ealertbar_underalloc_985ad2d.patch: cherry-pick
23+ fixes to underallocation of EAlertBar to reduce runtime EShellContent
24+ warnings.
25+
26+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Mon, 11 Jul 2011 16:47:14 -0400
27+
28 evolution (3.1.2-0ubuntu2) oneiric; urgency=low
29
30 * debian/rules
31
32=== modified file 'debian/control'
33--- debian/control 2011-06-24 04:28:56 +0000
34+++ debian/control 2011-07-11 20:53:51 +0000
35@@ -23,13 +23,13 @@
36 libglib2.0-dev (>= 2.28),
37 libgtk-3-dev (>= 3.0.2),
38 libgail-3-dev (>= 3.0.2),
39- libebook1.2-dev (>= 3.1.2),
40- libecal1.2-dev (>= 3.1.2),
41- libedataserver1.2-dev (>= 3.1.2),
42- libedataserverui-3.0-dev (>= 3.1.2),
43- libebackend1.2-dev (>= 3.1.2),
44- libcamel1.2-dev (>= 3.1.2),
45- evolution-data-server-dev (>= 3.1.2),
46+ libebook1.2-dev (>= 3.1.3),
47+ libecal1.2-dev (>= 3.1.3),
48+ libedataserver1.2-dev (>= 3.1.3),
49+ libedataserverui-3.0-dev (>= 3.1.3),
50+ libebackend1.2-dev (>= 3.1.3),
51+ libcamel1.2-dev (>= 3.1.3),
52+ evolution-data-server-dev (>= 3.1.3),
53 evolution-data-server-dev (<< 3.2),
54 libgtkhtml-4.0-dev (>= 4.1.2),
55 libgtkhtml-editor-4.0-dev,
56@@ -74,7 +74,7 @@
57 Depends: ${shlibs:Depends},
58 ${misc:Depends},
59 evolution-common (= ${source:Version}),
60- evolution-data-server (>= 3.1),
61+ evolution-data-server (>= 3.1.3),
62 evolution-data-server (<< 3.2),
63 gnome-icon-theme (>= 2.30.2.1),
64 dbus,
65
66=== added file 'debian/patches/99git_avoid_camel_stream_printf_005a26d.patch'
67--- debian/patches/99git_avoid_camel_stream_printf_005a26d.patch 1970-01-01 00:00:00 +0000
68+++ debian/patches/99git_avoid_camel_stream_printf_005a26d.patch 2011-07-11 20:53:51 +0000
69@@ -0,0 +1,1343 @@
70+From 005a26de4534cfaf534e8e4828366b619a3b21d1 Mon Sep 17 00:00:00 2001
71+From: Matthew Barnes <mbarnes@redhat.com>
72+Date: Tue, 05 Jul 2011 18:02:01 +0000
73+Subject: Avoid camel_stream_printf().
74+
75+camel_stream_printf() is next on the chopping block.
76+
77+Use g_strdup_printf() or a GString to construct a formatted string in
78+memory, pass it to camel_stream_write() in one go, and then check for
79+errors (unless it's a memory stream).
80+---
81+diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
82+index a5a8d0d..c11476a 100644
83+--- a/em-format/em-format-quote.c
84++++ b/em-format/em-format-quote.c
85+@@ -101,7 +101,8 @@ emfq_format_clone (EMFormat *emf,
86+ gconf = gconf_client_get_default ();
87+ if (gconf_client_get_bool (
88+ gconf, "/apps/evolution/mail/composer/top_signature", NULL))
89+- camel_stream_printf (emfq->priv->stream, "<br>\n");
90++ camel_stream_write_string (
91++ emfq->priv->stream, "<br>\n", cancellable, NULL);
92+ g_object_unref (gconf);
93+ handle = em_format_find_handler(emf, "x-evolution/message/prefix");
94+ if (handle)
95+@@ -274,7 +275,7 @@ em_format_quote_new (const gchar *credits,
96+
97+ static void
98+ emfq_format_text_header (EMFormatQuote *emfq,
99+- CamelStream *stream,
100++ GString *buffer,
101+ const gchar *label,
102+ const gchar *value,
103+ guint32 flags,
104+@@ -295,9 +296,11 @@ emfq_format_text_header (EMFormatQuote *emfq,
105+ html = value;
106+
107+ if (flags & EM_FORMAT_HEADER_BOLD)
108+- camel_stream_printf (stream, "<b>%s</b>: %s<br>", label, html);
109++ g_string_append_printf (
110++ buffer, "<b>%s</b>: %s<br>", label, html);
111+ else
112+- camel_stream_printf (stream, "%s: %s<br>", label, html);
113++ g_string_append_printf (
114++ buffer, "%s: %s<br>", label, html);
115+
116+ g_free (mhtml);
117+ }
118+@@ -399,7 +402,7 @@ canon_header_name (gchar *name)
119+
120+ static void
121+ emfq_format_header (EMFormat *emf,
122+- CamelStream *stream,
123++ GString *buffer,
124+ CamelMedium *part,
125+ const gchar *namein,
126+ guint32 flags,
127+@@ -482,14 +485,14 @@ emfq_format_header (EMFormat *emf,
128+ g_free (buf);
129+ }
130+
131+- emfq_format_text_header (emfq, stream, label, txt, flags, is_html);
132++ emfq_format_text_header (emfq, buffer, label, txt, flags, is_html);
133+
134+ g_free (value);
135+ }
136+
137+ static void
138+ emfq_format_headers (EMFormatQuote *emfq,
139+- CamelStream *stream,
140++ GString *buffer,
141+ CamelMedium *part)
142+ {
143+ EMFormat *emf = (EMFormat *) emfq;
144+@@ -509,11 +512,11 @@ emfq_format_headers (EMFormatQuote *emfq,
145+ while (link != NULL) {
146+ EMFormatHeader *h = link->data;
147+ emfq_format_header (
148+- emf, stream, part, h->name, h->flags, charset);
149++ emf, buffer, part, h->name, h->flags, charset);
150+ link = g_list_next (link);
151+ }
152+
153+- camel_stream_printf(stream, "<br>\n");
154++ g_string_append (buffer, "<br>\n");
155+ }
156+
157+ static void
158+@@ -526,9 +529,12 @@ emfq_format_message_prefix (EMFormat *emf,
159+ {
160+ EMFormatQuote *emfq = (EMFormatQuote *) emf;
161+
162+- if (emfq->priv->credits != NULL)
163+- camel_stream_printf (
164+- stream, "%s<br>\n", emfq->priv->credits);
165++ if (emfq->priv->credits != NULL) {
166++ camel_stream_write_string (
167++ stream, emfq->priv->credits, NULL, NULL);
168++ camel_stream_write_string (
169++ stream, "<br>\n", NULL, NULL);
170++ }
171+ }
172+
173+ static void
174+@@ -540,20 +546,28 @@ emfq_format_message (EMFormat *emf,
175+ gboolean is_fallback)
176+ {
177+ EMFormatQuote *emfq = (EMFormatQuote *) emf;
178++ GString *buffer;
179++
180++ buffer = g_string_sized_new (1024);
181+
182+ if (emfq->priv->flags & EM_FORMAT_QUOTE_CITE)
183+- camel_stream_printf (
184+- stream, "<!--+GtkHTML:<DATA class=\"ClueFlow\" "
185++ g_string_append (
186++ buffer,
187++ "<!--+GtkHTML:<DATA class=\"ClueFlow\" "
188+ "key=\"orig\" value=\"1\">-->\n"
189+ "<blockquote type=cite>\n");
190+
191+ if (((CamelMimePart *) emf->message) != part) {
192+- camel_stream_printf (
193+- stream, "%s</br>\n",
194++ g_string_append_printf (
195++ buffer,
196++ "%s</br>\n",
197+ _("-------- Forwarded Message --------"));
198+- emfq_format_headers (emfq, stream, (CamelMedium *) part);
199++ emfq_format_headers (emfq, buffer, (CamelMedium *) part);
200+ } else if (emfq->priv->flags & EM_FORMAT_QUOTE_HEADERS)
201+- emfq_format_headers (emfq, stream, (CamelMedium *) part);
202++ emfq_format_headers (emfq, buffer, (CamelMedium *) part);
203++
204++ camel_stream_write (
205++ stream, buffer->str, buffer->len, cancellable, NULL);
206+
207+ em_format_part (emf, stream, part, cancellable);
208+
209+diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
210+index c3b5465..1a964e7 100644
211+--- a/mail/em-composer-utils.c
212++++ b/mail/em-composer-utils.c
213+@@ -1926,6 +1926,7 @@ em_utils_send_receipt (EMailSession *session,
214+ gchar *self_address, *receipt_subject;
215+ gchar *ua, *recipient;
216+ gchar *transport_uid;
217++ gchar *content;
218+
219+ message_id = camel_medium_get_header (
220+ CAMEL_MEDIUM (message), "Message-ID");
221+@@ -1968,15 +1969,17 @@ em_utils_send_receipt (EMailSession *session,
222+ camel_content_type_set_param (type, "charset", "UTF-8");
223+ camel_data_wrapper_set_mime_type_field (receipt_text, type);
224+ camel_content_type_unref (type);
225+- stream = camel_stream_mem_new ();
226+- camel_stream_printf (stream,
227+- /* Translators: First %s is an email address, second %s
228+- * is the subject of the email, third %s is the date. */
229++ content = g_strdup_printf (
230++ /* Translators: First %s is an email address, second %s
231++ * is the subject of the email, third %s is the date. */
232+ _("Your message to %s about \"%s\" on %s has been read."),
233+ self_address, message_subject, message_date);
234++ stream = camel_stream_mem_new ();
235++ camel_stream_write_string (stream, content, NULL, NULL);
236+ camel_data_wrapper_construct_from_stream_sync (
237+ receipt_text, stream, NULL, NULL);
238+ g_object_unref (stream);
239++ g_free (content);
240+
241+ part = camel_mime_part_new ();
242+ camel_medium_set_content (CAMEL_MEDIUM (part), receipt_text);
243+@@ -1999,16 +2002,18 @@ em_utils_send_receipt (EMailSession *session,
244+ camel_data_wrapper_set_mime_type_field (receipt_data, type);
245+ camel_content_type_unref (type);
246+
247++ content = g_strdup_printf (
248++ "Reporting-UA: %s\n"
249++ "Final-Recipient: %s\n"
250++ "Original-Message-ID: %s\n"
251++ "Disposition: manual-action/MDN-sent-manually; displayed\n",
252++ ua, recipient, message_id);
253+ stream = camel_stream_mem_new ();
254+- camel_stream_printf (stream,
255+- "Reporting-UA: %s\n"
256+- "Final-Recipient: %s\n"
257+- "Original-Message-ID: %s\n"
258+- "Disposition: manual-action/MDN-sent-manually; displayed\n",
259+- ua, recipient, message_id);
260++ camel_stream_write_string (stream, content, NULL, NULL);
261+ camel_data_wrapper_construct_from_stream_sync (
262+ receipt_data, stream, NULL, NULL);
263+ g_object_unref (stream);
264++ g_free (content);
265+
266+ g_free (ua);
267+ g_free (recipient);
268+diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
269+index 75cb530..90b60ac 100644
270+--- a/mail/em-format-html-display.c
271++++ b/mail/em-format-html-display.c
272+@@ -435,6 +435,7 @@ efhd_format_attachment (EMFormat *emf,
273+ const EMFormatHandler *handle,
274+ GCancellable *cancellable)
275+ {
276++ GString *buffer;
277+ gchar *classid, *text, *html;
278+ struct _attach_puri *info;
279+
280+@@ -458,20 +459,22 @@ efhd_format_attachment (EMFormat *emf,
281+ info->encrypt = emf->valid->encrypt.status;
282+ }
283+
284+- camel_stream_write_string (
285+- stream, EM_FORMAT_HTML_VPAD
286+- "<table cellspacing=0 cellpadding=0><tr><td>"
287+- "<table width=10 cellspacing=0 cellpadding=0>"
288+- "<tr><td></td></tr></table></td>",
289+- cancellable, NULL);
290+-
291+- camel_stream_printf (
292+- stream, "<td><object classid=\"%s\"></object></td>", classid);
293++ buffer = g_string_sized_new (1024);
294+
295+- camel_stream_write_string (
296+- stream, "<td><table width=3 cellspacing=0 cellpadding=0>"
297+- "<tr><td></td></tr></table></td><td><font size=-1>",
298+- cancellable, NULL);
299++ g_string_append_printf (
300++ buffer, EM_FORMAT_HTML_VPAD
301++ "<table cellspacing=0 cellpadding=0>"
302++ "<tr><td>"
303++ "<table width=10 cellspacing=0 cellpadding=0>"
304++ "<tr><td></td><tr>"
305++ "</table>"
306++ "</td>"
307++ "<td><object classid=\"%s\"></object></td>"
308++ "<td><table width=3 cellspacing=0 cellpadding=0>"
309++ "<tr><td></td></tr>"
310++ "</table></td>"
311++ "<td><font size=-1>",
312++ classid);
313+
314+ /* output some info about it */
315+ /* FIXME: should we look up mime_type from object again? */
316+@@ -479,13 +482,20 @@ efhd_format_attachment (EMFormat *emf,
317+ html = camel_text_to_html (
318+ text, EM_FORMAT_HTML (emf)->text_html_flags &
319+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
320+- camel_stream_write_string (stream, html, cancellable, NULL);
321++ g_string_append (buffer, html);
322+ g_free (html);
323+ g_free (text);
324+
325+- camel_stream_write_string (
326+- stream, "</font></td></tr><tr></table>\n"
327+- EM_FORMAT_HTML_VPAD, cancellable, NULL);
328++ g_string_append (
329++ buffer,
330++ "</font></td>"
331++ "</tr><tr></table>\n"
332++ EM_FORMAT_HTML_VPAD);
333++
334++ camel_stream_write (
335++ stream, buffer->str, buffer->len, cancellable, NULL);
336++
337++ g_string_free (buffer, TRUE);
338+
339+ if (handle && info->shown)
340+ handle->handler (
341+@@ -504,6 +514,7 @@ efhd_format_optional (EMFormat *emf,
342+ gchar *classid, *html;
343+ struct _attach_puri *info;
344+ CamelStream *stream = NULL;
345++ GString *buffer;
346+
347+ if (CAMEL_IS_STREAM_FILTER (fstream))
348+ stream = camel_stream_filter_get_source (
349+@@ -530,10 +541,12 @@ efhd_format_optional (EMFormat *emf,
350+ info->encrypt = emf->valid->encrypt.status;
351+ }
352+
353+- camel_stream_write_string (
354+- stream, EM_FORMAT_HTML_VPAD
355++ buffer = g_string_sized_new (1024);
356++
357++ g_string_append (
358++ buffer, EM_FORMAT_HTML_VPAD
359+ "<table cellspacing=0 cellpadding=0><tr><td>"
360+- "<h3><font size=-1 color=red>", cancellable, NULL);
361++ "<h3><font size=-1 color=red>");
362+
363+ html = camel_text_to_html (
364+ _("Evolution cannot render this email as it is too "
365+@@ -541,21 +554,21 @@ efhd_format_optional (EMFormat *emf,
366+ "with an external text editor."),
367+ EM_FORMAT_HTML (emf)->text_html_flags &
368+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
369+- camel_stream_write_string (stream, html, cancellable, NULL);
370+- camel_stream_write_string (
371+- stream, "</font></h3></td></tr></table>\n",
372+- cancellable, NULL);
373+- camel_stream_write_string (
374+- stream, "<table cellspacing=0 cellpadding=0><tr>",
375+- cancellable, NULL);
376+- camel_stream_printf (
377+- stream, "<td><object classid=\"%s\"></object>"
378+- "</td></tr></table>", classid);
379+-
380++ g_string_append (buffer, html);
381+ g_free (html);
382+
383+- camel_stream_write_string (
384+- stream, EM_FORMAT_HTML_VPAD, cancellable, NULL);
385++ g_string_append_printf (
386++ buffer,
387++ "</font></h3></td></tr></table>\n"
388++ "<table cellspacing=0 cellpadding=0><tr>"
389++ "<td><object classid=\"%s\"></object>"
390++ "</td></tr></table>" EM_FORMAT_HTML_VPAD,
391++ classid);
392++
393++ camel_stream_write (
394++ stream, buffer->str, buffer->len, cancellable, NULL);
395++
396++ g_string_free (buffer, TRUE);
397+
398+ g_free (classid);
399+ }
400+@@ -575,11 +588,15 @@ efhd_format_secure (EMFormat *emf,
401+ if (emf->valid == valid
402+ && (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE
403+ || valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
404++ GString *buffer;
405+ gchar *classid;
406+ struct _smime_pobject *pobj;
407+
408+- camel_stream_printf (
409+- stream, "<table border=0 width=\"100%%\" "
410++ buffer = g_string_sized_new (1024);
411++
412++ g_string_append_printf (
413++ buffer,
414++ "<table border=0 width=\"100%%\" "
415+ "cellpadding=3 cellspacing=0%s><tr>",
416+ smime_sign_colour[valid->sign.status]);
417+
418+@@ -591,8 +608,9 @@ efhd_format_secure (EMFormat *emf,
419+ classid, part, efhd_xpkcs7mime_button);
420+ pobj->valid = camel_cipher_validity_clone (valid);
421+ pobj->object.free = efhd_xpkcs7mime_free;
422+- camel_stream_printf (
423+- stream, "<td valign=center><object classid=\"%s\">"
424++ g_string_append_printf (
425++ buffer,
426++ "<td valign=center><object classid=\"%s\">"
427+ "</object></td><td width=100%% valign=center>",
428+ classid);
429+ g_free (classid);
430+@@ -605,11 +623,13 @@ efhd_format_secure (EMFormat *emf,
431+ status = valid->sign.status;
432+ desc = smime_sign_table[status].shortdesc;
433+
434+- camel_stream_printf (stream, "%s", gettext (desc));
435++ g_string_append (buffer, gettext (desc));
436+
437+- signers = em_format_html_format_cert_infos ((CamelCipherCertInfo *) valid->sign.signers.head);
438++ signers = em_format_html_format_cert_infos (
439++ (CamelCipherCertInfo *) valid->sign.signers.head);
440+ if (signers && *signers) {
441+- camel_stream_printf (stream, " (%s)", signers);
442++ g_string_append_printf (
443++ buffer, " (%s)", signers);
444+ }
445+ g_free (signers);
446+ }
447+@@ -618,16 +638,20 @@ efhd_format_secure (EMFormat *emf,
448+ const gchar *desc;
449+ gint status;
450+
451+- if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) {
452+- camel_stream_printf (stream, "<br>");
453+- }
454++ if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)
455++ g_string_append (buffer, "<br>");
456+
457+ status = valid->encrypt.status;
458+ desc = smime_encrypt_table[status].shortdesc;
459+- camel_stream_printf (stream, "%s", gettext (desc));
460++ g_string_append (buffer, gettext (desc));
461+ }
462+
463+- camel_stream_printf(stream, "</td></tr></table>");
464++ g_string_append (buffer, "</td></tr></table>");
465++
466++ camel_stream_write (
467++ stream, buffer->str, buffer->len, cancellable, NULL);
468++
469++ g_string_free (buffer, TRUE);
470+ }
471+ }
472+
473+@@ -769,14 +793,20 @@ efhd_message_prefix (EMFormat *emf,
474+ const gchar *flag, *comp, *due;
475+ time_t date;
476+ gchar *iconpath, *due_date_str;
477++ GString *buffer;
478+
479+ if (emf->folder == NULL || emf->uid == NULL
480+ || (flag = camel_folder_get_message_user_tag(emf->folder, emf->uid, "follow-up")) == NULL
481+ || flag[0] == 0)
482+ return;
483+
484++ buffer = g_string_sized_new (1024);
485++
486+ /* header displayed for message-flags in mail display */
487+- camel_stream_printf(stream, "<table border=1 width=\"100%%\" cellspacing=2 cellpadding=2><tr>");
488++ g_string_append (
489++ buffer,
490++ "<table border=1 width=\"100%%\" "
491++ "cellspacing=2 cellpadding=2><tr>");
492+
493+ comp = camel_folder_get_message_user_tag(emf->folder, emf->uid, "completed-on");
494+ iconpath = e_icon_factory_get_icon_filename (comp && comp[0] ? "stock_mail-flag-for-followup-done" : "stock_mail-flag-for-followup", GTK_ICON_SIZE_MENU);
495+@@ -790,20 +820,33 @@ efhd_message_prefix (EMFormat *emf,
496+ if (iconpart) {
497+ gchar *classid;
498+
499+- classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp");
500+- camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid);
501+- (void) em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efhd_write_image);
502++ classid = g_strdup_printf (
503++ "icon:///em-format-html-display/%s/%s",
504++ emf->part_id->str,
505++ comp && comp[0] ? "comp" : "uncomp");
506++ g_string_append_printf (
507++ buffer,
508++ "<td align=\"left\">"
509++ "<img src=\"%s\"></td>",
510++ classid);
511++ (void) em_format_add_puri (
512++ emf, sizeof (EMFormatPURI),
513++ classid, iconpart, efhd_write_image);
514+ g_free (classid);
515+ g_object_unref (iconpart);
516+ }
517+ }
518+
519+- camel_stream_printf(stream, "<td align=\"left\" width=\"100%%\">");
520++ g_string_append (buffer, "<td align=\"left\" width=\"100%%\">");
521+
522+ if (comp && comp[0]) {
523+ date = camel_header_decode_date (comp, NULL);
524+- due_date_str = e_datetime_format_format ("mail", "header", DTFormatKindDateTime, date);
525+- camel_stream_printf (stream, "%s, %s %s", flag, _("Completed on"), due_date_str ? due_date_str : "???");
526++ due_date_str = e_datetime_format_format (
527++ "mail", "header", DTFormatKindDateTime, date);
528++ g_string_append_printf (
529++ buffer, "%s, %s %s",
530++ flag, _("Completed on"),
531++ due_date_str ? due_date_str : "???");
532+ g_free (due_date_str);
533+ } else if ((due = camel_folder_get_message_user_tag(emf->folder, emf->uid, "due-by")) != NULL && due[0]) {
534+ time_t now;
535+@@ -811,16 +854,30 @@ efhd_message_prefix (EMFormat *emf,
536+ date = camel_header_decode_date (due, NULL);
537+ now = time (NULL);
538+ if (now > date)
539+- camel_stream_printf(stream, "<b>%s</b>&nbsp;", _("Overdue:"));
540+-
541+- due_date_str = e_datetime_format_format ("mail", "header", DTFormatKindDateTime, date);
542+- /* To Translators: the "by" is part of the string, like "Follow-up by Tuesday, January 13, 2009" */
543+- camel_stream_printf (stream, "%s %s %s", flag, _("by"), due_date_str ? due_date_str : "???");
544++ g_string_append_printf (
545++ buffer,
546++ "<b>%s</b>&nbsp;",
547++ _("Overdue:"));
548++
549++ due_date_str = e_datetime_format_format (
550++ "mail", "header", DTFormatKindDateTime, date);
551++ /* Translators: the "by" is part of the string,
552++ * like "Follow-up by Tuesday, January 13, 2009" */
553++ g_string_append_printf (
554++ buffer, "%s %s %s",
555++ flag, _("by"),
556++ due_date_str ? due_date_str : "???");
557++ g_free (due_date_str);
558+ } else {
559+- camel_stream_printf(stream, "%s", flag);
560++ g_string_append (buffer, flag);
561+ }
562+
563+- camel_stream_printf(stream, "</td></tr></table>");
564++ g_string_append (buffer, "</td></tr></table>");
565++
566++ camel_stream_write (
567++ stream, buffer->str, buffer->len, cancellable, NULL);
568++
569++ g_string_free (buffer, TRUE);
570+ }
571+
572+ /* ********************************************************************** */
573+@@ -1053,8 +1110,10 @@ efhd_message_add_bar (EMFormat *emf,
574+ const EMFormatHandler *info)
575+ {
576+ gchar *classid;
577++ gchar *content;
578+
579+- classid = g_strdup_printf ("attachment-bar:%s", emf->current_message_part_id);
580++ classid = g_strdup_printf (
581++ "attachment-bar:%s", emf->current_message_part_id);
582+
583+ /* XXX Apparently this installs the callback for -all-
584+ * EMFormatHTML subclasses, not just this subclass.
585+@@ -1065,8 +1124,10 @@ efhd_message_add_bar (EMFormat *emf,
586+ sizeof (EMFormatHTMLPObject),
587+ classid, part, efhd_add_bar);
588+
589+- camel_stream_printf (
590+- stream, "<td><object classid=\"%s\"></object></td>", classid);
591++ content = g_strdup_printf (
592++ "<td><object classid=\"%s\"></object></td>", classid);
593++ camel_stream_write_string (stream, content, NULL, NULL);
594++ g_free (content);
595+
596+ g_free (classid);
597+ }
598+diff --git a/mail/em-format-html.c b/mail/em-format-html.c
599+index b7b6e4d..4a34aa0 100644
600+--- a/mail/em-format-html.c
601++++ b/mail/em-format-html.c
602+@@ -171,17 +171,19 @@ efh_format_exec (struct _format_msg *m,
603+ GError **error)
604+ {
605+ EMFormat *format;
606++ CamelStream *stream;
607+ struct _EMFormatHTMLJob *job;
608+ GNode *puri_level;
609+ CamelURL *base;
610++ gchar *content;
611+
612+ if (m->format->priv->web_view == NULL)
613+ return;
614+
615+ format = EM_FORMAT (m->format);
616++ stream = CAMEL_STREAM (m->estream);
617+
618+- camel_stream_printf (
619+- (CamelStream *) m->estream,
620++ content = g_strdup_printf (
621+ "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n"
622+ "<head>\n<meta name=\"generator\" content=\"Evolution Mail Component\">\n</head>\n"
623+ "<body bgcolor =\"#%06x\" text=\"#%06x\" marginwidth=6 marginheight=6>\n",
624+@@ -191,12 +193,14 @@ efh_format_exec (struct _format_msg *m,
625+ e_color_to_value (
626+ &m->format->priv->colors[
627+ EM_FORMAT_HTML_COLOR_HEADER]));
628++ camel_stream_write_string (stream, content, cancellable, NULL);
629++ g_free (content);
630+
631+ /* <insert top-header stuff here> */
632+
633+ if (format->mode == EM_FORMAT_MODE_SOURCE) {
634+ em_format_format_source (
635+- format, (CamelStream *) m->estream,
636++ format, stream,
637+ (CamelMimePart *) m->message, cancellable);
638+ } else {
639+ const EMFormatHandler *handle;
640+@@ -207,7 +211,7 @@ efh_format_exec (struct _format_msg *m,
641+
642+ if (handle != NULL)
643+ handle->handler (
644+- format, CAMEL_STREAM (m->estream),
645++ format, stream,
646+ CAMEL_MIME_PART (m->message), handle,
647+ cancellable, FALSE);
648+
649+@@ -216,12 +220,12 @@ efh_format_exec (struct _format_msg *m,
650+
651+ if (handle != NULL)
652+ handle->handler (
653+- format, CAMEL_STREAM (m->estream),
654++ format, stream,
655+ CAMEL_MIME_PART (m->message), handle,
656+ cancellable, FALSE);
657+ }
658+
659+- camel_stream_flush ((CamelStream *) m->estream, cancellable, NULL);
660++ camel_stream_flush (stream, cancellable, NULL);
661+
662+ puri_level = format->pending_uri_level;
663+ base = format->base;
664+@@ -704,14 +708,22 @@ efh_format_error (EMFormat *emf,
665+ CamelStream *stream,
666+ const gchar *txt)
667+ {
668++ GString *buffer;
669+ gchar *html;
670+
671++ buffer = g_string_new ("<em><font color=\"red\">");
672++
673+ html = camel_text_to_html (
674+ txt, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL |
675+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
676+- camel_stream_printf (
677+- stream, "<em><font color=\"red\">%s</font></em><br>", html);
678++ g_string_append (buffer, html);
679+ g_free (html);
680++
681++ g_string_append (buffer, "</font></em><br>");
682++
683++ camel_stream_write (stream, buffer->str, buffer->len, NULL, NULL);
684++
685++ g_string_free (buffer, TRUE);
686+ }
687+
688+ static void
689+@@ -734,11 +746,13 @@ efh_format_source (EMFormat *emf,
690+ CAMEL_STREAM_FILTER (filtered_stream), filter);
691+ g_object_unref (filter);
692+
693+- camel_stream_write_string (stream, "<table><tr><td><tt>", cancellable, NULL);
694+- em_format_format_text (emf, (CamelStream *) filtered_stream, dw, cancellable);
695+- g_object_unref (filtered_stream);
696++ camel_stream_write_string (
697++ stream, "<table><tr><td><tt>", cancellable, NULL);
698++ em_format_format_text (emf, filtered_stream, dw, cancellable);
699++ camel_stream_write_string (
700++ stream, "</tt></td></tr></table>", cancellable, NULL);
701+
702+- camel_stream_write_string(stream, "</tt></td></tr></table>", cancellable, NULL);
703++ g_object_unref (filtered_stream);
704+ }
705+
706+ static void
707+@@ -1725,12 +1739,23 @@ efh_format_secure (EMFormat *emf,
708+ gchar *classid, *iconpath;
709+ const gchar *icon;
710+ CamelMimePart *iconpart;
711++ GString *buffer;
712++
713++ buffer = g_string_sized_new (1024);
714+
715+- camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
716+- smime_sign_colour[valid->sign.status]);
717++ g_string_append_printf (
718++ buffer,
719++ "<table border=0 width=\"100%%\" "
720++ "cellpadding=3 cellspacing=0%s><tr>",
721++ smime_sign_colour[valid->sign.status]);
722+
723+- classid = g_strdup_printf("smime:///em-format-html/%s/icon/signed", emf->part_id->str);
724+- camel_stream_printf(stream, "<td valign=\"top\"><img src=\"%s\"></td><td valign=\"top\" width=\"100%%\">", classid);
725++ classid = g_strdup_printf (
726++ "smime:///em-format-html/%s/icon/signed",
727++ emf->part_id->str);
728++ g_string_append_printf (
729++ buffer,
730++ "<td valign=\"top\"><img src=\"%s\"></td>"
731++ "<td valign=\"top\" width=\"100%%\">", classid);
732+
733+ if (valid->sign.status != 0)
734+ icon = smime_sign_table[valid->sign.status].icon;
735+@@ -1748,24 +1773,33 @@ efh_format_secure (EMFormat *emf,
736+ if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) {
737+ gchar *signers;
738+
739+- camel_stream_printf (stream, "%s", _(smime_sign_table[valid->sign.status].shortdesc));
740++ g_string_append (
741++ buffer, _(smime_sign_table[valid->sign.status].shortdesc));
742+
743+- signers = em_format_html_format_cert_infos ((CamelCipherCertInfo *) valid->sign.signers.head);
744++ signers = em_format_html_format_cert_infos (
745++ (CamelCipherCertInfo *) valid->sign.signers.head);
746+ if (signers && *signers) {
747+- camel_stream_printf (stream, " (%s)", signers);
748++ g_string_append_printf (
749++ buffer, " (%s)", signers);
750+ }
751+ g_free (signers);
752+ }
753+
754+ if (valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE) {
755+- if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) {
756+- camel_stream_printf (stream, "<br>");
757+- }
758++ if (valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)
759++ g_string_append (buffer, "<br>");
760+
761+- camel_stream_printf (stream, "%s", _(smime_encrypt_table[valid->encrypt.status].shortdesc));
762++ g_string_append (
763++ buffer, _(smime_encrypt_table[valid->encrypt.status].shortdesc));
764+ }
765+
766+- camel_stream_printf(stream, "</td></tr></table>");
767++ g_string_append (buffer, "</td></tr></table>");
768++
769++ camel_stream_write (
770++ stream, buffer->str,
771++ buffer->len, cancellable, NULL);
772++
773++ g_string_free (buffer, TRUE);
774+ }
775+ }
776+
777+@@ -1878,8 +1912,12 @@ efh_text_plain (EMFormat *emf,
778+
779+ type = camel_mime_part_get_content_type (newpart);
780+ if (camel_content_type_is (type, "text", "*") && (is_fallback || !camel_content_type_is (type, "text", "calendar"))) {
781+- camel_stream_printf (
782+- stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n",
783++ gchar *content;
784++
785++ content = g_strdup_printf (
786++ "<div style=\"border: solid #%06x 1px; "
787++ "background-color: #%06x; padding: 10px; "
788++ "color: #%06x;\">\n<tt>\n" EFH_MESSAGE_START,
789+ e_color_to_value (
790+ &efh->priv->colors[
791+ EM_FORMAT_HTML_COLOR_FRAME]),
792+@@ -1890,7 +1928,9 @@ efh_text_plain (EMFormat *emf,
793+ &efh->priv->colors[
794+ EM_FORMAT_HTML_COLOR_TEXT]));
795+ camel_stream_write_string (
796+- stream, "<tt>\n" EFH_MESSAGE_START, cancellable, NULL);
797++ stream, content, cancellable, NULL);
798++ g_free (content);
799++
800+ em_format_format_text (
801+ emf, filtered_stream,
802+ (CamelDataWrapper *) newpart,
803+@@ -1921,6 +1961,7 @@ efh_text_enriched (EMFormat *emf,
804+ CamelStream *filtered_stream;
805+ CamelMimeFilter *enriched;
806+ guint32 flags = 0;
807++ gchar *content;
808+
809+ if (!strcmp(info->mime_type, "text/richtext")) {
810+ flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT;
811+@@ -1939,8 +1980,10 @@ efh_text_enriched (EMFormat *emf,
812+ CAMEL_STREAM_FILTER (filtered_stream), enriched);
813+ g_object_unref (enriched);
814+
815+- camel_stream_printf (
816+- stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n" EFH_MESSAGE_START,
817++ content = g_strdup_printf (
818++ "<div style=\"border: solid #%06x 1px; "
819++ "background-color: #%06x; padding: 10px; "
820++ "color: #%06x;\">\n" EFH_MESSAGE_START,
821+ e_color_to_value (
822+ &efh->priv->colors[
823+ EM_FORMAT_HTML_COLOR_FRAME]),
824+@@ -1950,6 +1993,8 @@ efh_text_enriched (EMFormat *emf,
825+ e_color_to_value (
826+ &efh->priv->colors[
827+ EM_FORMAT_HTML_COLOR_TEXT]));
828++ camel_stream_write_string (stream, content, cancellable, NULL);
829++ g_free (content);
830+
831+ em_format_format_text (
832+ emf, (CamelStream *) filtered_stream,
833+@@ -1993,9 +2038,11 @@ efh_text_html (EMFormat *emf,
834+ EMFormatHTML *efh = EM_FORMAT_HTML (emf);
835+ const gchar *location;
836+ gchar *cid = NULL;
837++ gchar *content;
838+
839+- camel_stream_printf (
840+- stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; color: #%06x;\">\n"
841++ content = g_strdup_printf (
842++ "<div style=\"border: solid #%06x 1px; "
843++ "background-color: #%06x; color: #%06x;\">\n"
844+ "<!-- text/html -->\n" EFH_MESSAGE_START,
845+ e_color_to_value (
846+ &efh->priv->colors[
847+@@ -2006,6 +2053,8 @@ efh_text_html (EMFormat *emf,
848+ e_color_to_value (
849+ &efh->priv->colors[
850+ EM_FORMAT_HTML_COLOR_TEXT]));
851++ camel_stream_write_string (stream, content, cancellable, NULL);
852++ g_free (content);
853+
854+ /* TODO: perhaps we don't need to calculate this anymore now base is handled better */
855+ /* calculate our own location string so add_puri doesn't do it
856+@@ -2034,10 +2083,11 @@ efh_text_html (EMFormat *emf,
857+ emf, sizeof (EMFormatPURI), cid,
858+ part, efh_write_text_html);
859+ d(printf("adding iframe, location %s\n", cid));
860+- camel_stream_printf (stream,
861+- "<iframe src=\"%s\" frameborder=0 scrolling=no>could not get %s</iframe>\n"
862+- "</div>\n",
863+- cid, cid);
864++ content = g_strdup_printf (
865++ "<iframe src=\"%s\" frameborder=0 scrolling=no>"
866++ "could not get %s</iframe>\n</div>\n", cid, cid);
867++ camel_stream_write_string (stream, content, cancellable, NULL);
868++ g_free (content);
869+ g_free (cid);
870+ }
871+
872+@@ -2053,9 +2103,12 @@ efh_message_external (EMFormat *emf,
873+ CamelContentType *type;
874+ const gchar *access_type;
875+ gchar *url = NULL, *desc = NULL;
876++ gchar *content;
877+
878+ if (!part) {
879+- camel_stream_printf(stream, _("Unknown external-body part."));
880++ camel_stream_write_string (
881++ stream, _("Unknown external-body part."),
882++ cancellable, NULL);
883+ return;
884+ }
885+
886+@@ -2063,7 +2116,9 @@ efh_message_external (EMFormat *emf,
887+ type = camel_mime_part_get_content_type (part);
888+ access_type = camel_content_type_param (type, "access-type");
889+ if (!access_type) {
890+- camel_stream_printf(stream, _("Malformed external-body part."));
891++ camel_stream_write_string (
892++ stream, _("Malformed external-body part."),
893++ cancellable, NULL);
894+ return;
895+ }
896+
897+@@ -2131,14 +2186,21 @@ efh_message_external (EMFormat *emf,
898+ } else
899+ goto fail;
900+
901+- camel_stream_printf(stream, "<a href=\"%s\">%s</a>", url, desc);
902++ content = g_strdup_printf ("<a href=\"%s\">%s</a>", url, desc);
903++ camel_stream_write_string (stream, content, cancellable, NULL);
904++ g_free (content);
905++
906+ g_free (url);
907+ g_free (desc);
908+
909+ return;
910+
911+ fail:
912+- camel_stream_printf(stream, _("Pointer to unknown external data (\"%s\" type)"), access_type);
913++ content = g_strdup_printf (
914++ _("Pointer to unknown external data (\"%s\" type)"),
915++ access_type);
916++ camel_stream_write_string (stream, content, cancellable, NULL);
917++ g_free (content);
918+ }
919+
920+ static void
921+@@ -2153,10 +2215,13 @@ efh_message_deliverystatus (EMFormat *emf,
922+ CamelStream *filtered_stream;
923+ CamelMimeFilter *html_filter;
924+ guint32 rgb = 0x737373;
925++ gchar *content;
926+
927+ /* Yuck, this is copied from efh_text_plain */
928+- camel_stream_printf (
929+- stream, "<div style=\"border: solid #%06x 1px; background-color: #%06x; padding: 10px; color: #%06x;\">\n",
930++ content = g_strdup_printf (
931++ "<div style=\"border: solid #%06x 1px; "
932++ "background-color: #%06x; padding: 10px; "
933++ "color: #%06x;\">\n",
934+ e_color_to_value (
935+ &efh->priv->colors[
936+ EM_FORMAT_HTML_COLOR_FRAME]),
937+@@ -2166,6 +2231,8 @@ efh_message_deliverystatus (EMFormat *emf,
938+ e_color_to_value (
939+ &efh->priv->colors[
940+ EM_FORMAT_HTML_COLOR_TEXT]));
941++ camel_stream_write_string (stream, content, cancellable, NULL);
942++ g_free (content);
943+
944+ filtered_stream = camel_stream_filter_new (stream);
945+ html_filter = camel_mime_filter_tohtml_new (efh->text_html_flags, rgb);
946+@@ -2346,11 +2413,15 @@ efh_image (EMFormat *emf,
947+ gboolean is_fallback)
948+ {
949+ EMFormatPURI *puri;
950++ gchar *content;
951+
952+ puri = em_format_add_puri (
953+ emf, sizeof (EMFormatPURI), NULL, part, efh_write_image);
954+- camel_stream_printf (
955+- stream, "<img hspace=10 vspace=10 src=\"%s\">", puri->cid);
956++
957++ content = g_strdup_printf (
958++ "<img hspace=10 vspace=10 src=\"%s\">", puri->cid);
959++ camel_stream_write_string (stream, content, cancellable, NULL);
960++ g_free (content);
961+ }
962+
963+ /* Notes:
964+@@ -2415,7 +2486,11 @@ efh_builtin_init (EMFormatHTMLClass *efhc)
965+ /* ********************************************************************** */
966+
967+ static void
968+-efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const gchar *label, const gchar *value, guint32 flags)
969++efh_format_text_header (EMFormatHTML *emfh,
970++ GString *buffer,
971++ const gchar *label,
972++ const gchar *value,
973++ guint32 flags)
974+ {
975+ const gchar *fmt, *html;
976+ gchar *mhtml = NULL;
977+@@ -2463,7 +2538,8 @@ efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const gchar *la
978+ }
979+ }
980+
981+- camel_stream_printf (stream, fmt, label, html);
982++ g_string_append_printf (buffer, fmt, label, html);
983++
984+ g_free (mhtml);
985+ }
986+
987+@@ -2615,7 +2691,12 @@ canon_header_name (gchar *name)
988+ }
989+
990+ static void
991+-efh_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const gchar *charset)
992++efh_format_header (EMFormat *emf,
993++ GString *buffer,
994++ CamelMedium *part,
995++ struct _camel_header_raw *header,
996++ guint32 flags,
997++ const gchar *charset)
998+ {
999+ EMFormatHTML *efh = (EMFormatHTML *) emf;
1000+ gchar *name, *buf, *value = NULL;
1001+@@ -2758,7 +2839,7 @@ efh_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
1002+ g_free (buf);
1003+ }
1004+
1005+- efh_format_text_header (efh, stream, label, txt, flags);
1006++ efh_format_text_header (efh, buffer, label, txt, flags);
1007+
1008+ g_free (value);
1009+ g_free (str_field);
1010+@@ -2766,7 +2847,7 @@ efh_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
1011+
1012+ static void
1013+ efh_format_headers (EMFormatHTML *efh,
1014+- CamelStream *stream,
1015++ GString *buffer,
1016+ CamelMedium *part,
1017+ GCancellable *cancellable)
1018+ {
1019+@@ -2793,8 +2874,8 @@ efh_format_headers (EMFormatHTML *efh,
1020+ charset = camel_iconv_charset_name (charset);
1021+
1022+ if (!efh->simple_headers)
1023+- camel_stream_printf (
1024+- stream, "<font color=\"#%06x\">\n"
1025++ g_string_append_printf (
1026++ buffer, "<font color=\"#%06x\">\n"
1027+ "<table cellpadding=\"0\" width=\"100%%\">",
1028+ e_color_to_value (
1029+ &efh->priv->colors[
1030+@@ -2833,15 +2914,27 @@ efh_format_headers (EMFormatHTML *efh,
1031+ header = header->next;
1032+ }
1033+
1034+- camel_stream_printf (stream, "<tr><td width=\"20\" valign=\"top\"><a href=\"##HEADERS##\"><img src=\"%s/plus.png\"></a></td><td><strong>%s</strong> %s%s%s</td></tr>",
1035+- evolution_imagesdir, subject ? subject : _("(no subject)"), from->len ? "(" : "", from->str, from->len ? ")" : "");
1036++ g_string_append_printf (
1037++ buffer,
1038++ "<tr>"
1039++ "<td width=\"20\" valign=\"top\">"
1040++ "<a href=\"##HEADERS##\">"
1041++ "<img src=\"%s/plus.png\">"
1042++ "</a></td>"
1043++ "<td><strong>%s</strong> %s%s%s</td>"
1044++ "</tr>",
1045++ evolution_imagesdir,
1046++ subject ? subject : _("(no subject)"),
1047++ from->len ? "(" : "",
1048++ from->str,
1049++ from->len ? ")" : "");
1050+
1051+ g_free (subject);
1052+ if (addrs)
1053+ camel_header_address_list_clear (&addrs);
1054+ g_string_free (from, TRUE);
1055+
1056+- camel_stream_printf (stream, "</table>");
1057++ g_string_append (buffer, "</table>");
1058+
1059+ g_free (evolution_imagesdir);
1060+
1061+@@ -2889,17 +2982,27 @@ efh_format_headers (EMFormatHTML *efh,
1062+
1063+ if (header_sender && header_from && mail_from_delegate) {
1064+ gchar *bold_sender, *bold_from;
1065+- camel_stream_printf(stream, "<tr><td><table border=1 width=\"100%%\" cellspacing=2 cellpadding=2><tr>");
1066++
1067++ g_string_append (
1068++ buffer,
1069++ "<tr><td><table border=1 width=\"100%%\" "
1070++ "cellspacing=2 cellpadding=2><tr>");
1071+ if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL)
1072+- camel_stream_printf (stream, "<td align=\"right\" width=\"100%%\">");
1073++ g_string_append (
1074++ buffer, "<td align=\"right\" width=\"100%%\">");
1075+ else
1076+- camel_stream_printf (stream, "<td align=\"left\" width=\"100%%\">");
1077++ g_string_append (
1078++ buffer, "<td align=\"left\" width=\"100%%\">");
1079+ bold_sender = g_strconcat ("<b>", header_sender, "</b>", NULL);
1080+ bold_from = g_strconcat ("<b>", header_from, "</b>", NULL);
1081+- /* To translators: This message suggests to the receipients that the sender of the mail is
1082+- different from the one listed in From field. */
1083+- camel_stream_printf(stream, _("This message was sent by %s on behalf of %s"), bold_sender, bold_from);
1084+- camel_stream_printf(stream, "</td></tr></table></td></tr>");
1085++ /* Translators: This message suggests to the receipients
1086++ * that the sender of the mail is different from the one
1087++ * listed in From field. */
1088++ g_string_append_printf (
1089++ buffer,
1090++ _("This message was sent by %s on behalf of %s"),
1091++ bold_sender, bold_from);
1092++ g_string_append (buffer, "</td></tr></table></td></tr>");
1093+ g_free (bold_sender);
1094+ g_free (bold_from);
1095+ }
1096+@@ -2909,17 +3012,39 @@ efh_format_headers (EMFormatHTML *efh,
1097+
1098+ if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) {
1099+ if (efh->priv->headers_collapsable)
1100+- camel_stream_printf (stream, "<tr><td valign=\"top\" width=\"20\"><a href=\"##HEADERS##\"><img src=\"%s/minus.png\"></a></td><td><table width=\"100%%\" border=0 cellpadding=\"0\">\n",
1101++ g_string_append_printf (
1102++ buffer,
1103++ "<tr>"
1104++ "<td valign=\"top\" width=\"20\">"
1105++ "<a href=\"##HEADERS##\">"
1106++ "<img src=\"%s/minus.png\">"
1107++ "</a></td>"
1108++ "<td><table width=\"100%%\" border=0 "
1109++ "cellpadding=\"0\">\n",
1110+ evolution_imagesdir);
1111+ else
1112+- camel_stream_printf (stream, "<tr><td><table width=\"100%%\" border=0 cellpadding=\"0\">\n");
1113++ g_string_append (
1114++ buffer,
1115++ "<tr><td>"
1116++ "<table width=\"100%%\" border=0 "
1117++ "cellpadding=\"0\">\n");
1118+
1119+ } else {
1120+ if (efh->priv->headers_collapsable)
1121+- camel_stream_printf (stream, "<tr><td valign=\"top\" width=\"20\"><a href=\"##HEADERS##\"><img src=\"%s/minus.png\"></a></td><td><table border=0 cellpadding=\"0\">\n",
1122++ g_string_append_printf (
1123++ buffer,
1124++ "<tr>"
1125++ "<td valign=\"top\" width=\"20\">"
1126++ "<a href=\"##HEADERS##\">"
1127++ "<img src=\"%s/minus.png\">"
1128++ "</a></td>"
1129++ "<td><table border=0 cellpadding=\"0\">\n",
1130+ evolution_imagesdir);
1131+ else
1132+- camel_stream_printf (stream, "<tr><td><table border=0 cellpadding=\"0\">\n");
1133++ g_string_append (
1134++ buffer,
1135++ "<tr><td>"
1136++ "<table border=0 cellpadding=\"0\">\n");
1137+ }
1138+
1139+ g_free (evolution_imagesdir);
1140+@@ -2928,7 +3053,9 @@ efh_format_headers (EMFormatHTML *efh,
1141+ if (emf->mode == EM_FORMAT_MODE_ALLHEADERS) {
1142+ header = ((CamelMimePart *) part)->headers;
1143+ while (header) {
1144+- efh_format_header (emf, stream, part, header, EM_FORMAT_HTML_HEADER_NOCOLUMNS, charset);
1145++ efh_format_header (
1146++ emf, buffer, part, header,
1147++ EM_FORMAT_HTML_HEADER_NOCOLUMNS, charset);
1148+ header = header->next;
1149+ }
1150+ } else {
1151+@@ -2974,7 +3101,9 @@ efh_format_headers (EMFormatHTML *efh,
1152+ xmailer.value = use_header->value;
1153+ mailer_shown = TRUE;
1154+
1155+- efh_format_header (emf, stream, part, &xmailer, h->flags, charset);
1156++ efh_format_header (
1157++ emf, buffer, part,
1158++ &xmailer, h->flags, charset);
1159+ if (strstr(use_header->value, "Evolution"))
1160+ have_icon = TRUE;
1161+ } else if (!face_decoded && face && !g_ascii_strcasecmp (header->name, "Face")) {
1162+@@ -2990,7 +3119,9 @@ efh_format_headers (EMFormatHTML *efh,
1163+ face_decoded = TRUE;
1164+ /* Showing an encoded "Face" header makes little sense */
1165+ } else if (!g_ascii_strcasecmp (header->name, h->name) && !face) {
1166+- efh_format_header (emf, stream, part, header, h->flags, charset);
1167++ efh_format_header (
1168++ emf, buffer, part,
1169++ header, h->flags, charset);
1170+ }
1171+
1172+ header = header->next;
1173+@@ -3001,7 +3132,7 @@ efh_format_headers (EMFormatHTML *efh,
1174+ }
1175+
1176+ if (!efh->simple_headers) {
1177+- camel_stream_printf(stream, "</table></td>");
1178++ g_string_append (buffer, "</table></td>");
1179+
1180+ if (photo_name) {
1181+ gchar *classid;
1182+@@ -3015,10 +3146,13 @@ efh_format_headers (EMFormatHTML *efh,
1183+
1184+ if (photopart) {
1185+ contact_has_photo = TRUE;
1186+- classid = g_strdup_printf("icon:///em-format-html/%s/photo/header",
1187+- emf->part_id->str);
1188+- camel_stream_printf (stream,
1189+- "<td align=\"right\" valign=\"top\"><img width=64 src=\"%s\"></td>",
1190++ classid = g_strdup_printf (
1191++ "icon:///em-format-html/%s/photo/header",
1192++ emf->part_id->str);
1193++ g_string_append_printf (
1194++ buffer,
1195++ "<td align=\"right\" valign=\"top\">"
1196++ "<img width=64 src=\"%s\"></td>",
1197+ classid);
1198+ em_format_add_puri (emf, sizeof (EMFormatPURI), classid,
1199+ photopart, efh_write_image);
1200+@@ -3034,9 +3168,17 @@ efh_format_headers (EMFormatHTML *efh,
1201+ CamelMimePart *part;
1202+
1203+ part = camel_mime_part_new ();
1204+- camel_mime_part_set_content ((CamelMimePart *) part, (const gchar *) face_header_value, face_header_len, "image/png");
1205+- classid = g_strdup_printf("icon:///em-format-html/face/photo/header");
1206+- camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=48 src=\"%s\"></td>", classid);
1207++ camel_mime_part_set_content (
1208++ (CamelMimePart *) part,
1209++ (const gchar *) face_header_value,
1210++ face_header_len, "image/png");
1211++ classid = g_strdup_printf (
1212++ "icon:///em-format-html/face/photo/header");
1213++ g_string_append_printf (
1214++ buffer,
1215++ "<td align=\"right\" valign=\"top\">"
1216++ "<img width=48 src=\"%s\"></td>",
1217++ classid);
1218+ em_format_add_puri (
1219+ emf, sizeof (EMFormatPURI),
1220+ classid, part, efh_write_image);
1221+@@ -3048,8 +3190,14 @@ efh_format_headers (EMFormatHTML *efh,
1222+ gchar *classid;
1223+ CamelMimePart *iconpart = NULL;
1224+
1225+- classid = g_strdup_printf("icon:///em-format-html/%s/icon/header", emf->part_id->str);
1226+- camel_stream_printf(stream, "<td align=\"right\" valign=\"top\"><img width=16 height=16 src=\"%s\"></td>", classid);
1227++ classid = g_strdup_printf (
1228++ "icon:///em-format-html/%s/icon/header",
1229++ emf->part_id->str);
1230++ g_string_append_printf (
1231++ buffer,
1232++ "<td align=\"right\" valign=\"top\">"
1233++ "<img width=16 height=16 src=\"%s\"></td>",
1234++ classid);
1235+
1236+ icon_info = gtk_icon_theme_lookup_icon (
1237+ gtk_icon_theme_get_default (),
1238+@@ -3070,7 +3218,8 @@ efh_format_headers (EMFormatHTML *efh,
1239+ }
1240+ g_free (classid);
1241+ }
1242+- camel_stream_printf (stream, "</tr></table>\n</font>\n");
1243++
1244++ g_string_append (buffer, "</tr></table>\n</font>\n");
1245+ }
1246+ }
1247+
1248+@@ -3083,6 +3232,7 @@ efh_format_message (EMFormat *emf,
1249+ gboolean is_fallback)
1250+ {
1251+ const EMFormatHandler *handle;
1252++ GString *buffer;
1253+
1254+ /* TODO: make this validity stuff a method */
1255+ EMFormatHTML *efh = (EMFormatHTML *) emf;
1256+@@ -3091,23 +3241,32 @@ efh_format_message (EMFormat *emf,
1257+ emf->valid = NULL;
1258+ emf->valid_parent = NULL;
1259+
1260++ buffer = g_string_sized_new (1024);
1261++
1262+ if (emf->message != (CamelMimeMessage *) part)
1263+- camel_stream_printf(stream, "<blockquote>\n");
1264++ g_string_append (buffer, "<blockquote>\n");
1265+
1266+ if (!efh->hide_headers)
1267+ efh_format_headers (
1268+- efh, stream, CAMEL_MEDIUM (part), cancellable);
1269++ efh, buffer, CAMEL_MEDIUM (part), cancellable);
1270++
1271++ camel_stream_write (
1272++ stream, buffer->str, buffer->len, cancellable, NULL);
1273++
1274++ g_string_free (buffer, TRUE);
1275+
1276+ handle = em_format_find_handler(emf, "x-evolution/message/post-header");
1277+ if (handle)
1278+ handle->handler (
1279+ emf, stream, part, handle, cancellable, FALSE);
1280+
1281+- camel_stream_printf (stream, EM_FORMAT_HTML_VPAD);
1282++ camel_stream_write_string (
1283++ stream, EM_FORMAT_HTML_VPAD, cancellable, NULL);
1284+ em_format_part (emf, stream, part, cancellable);
1285+
1286+ if (emf->message != (CamelMimeMessage *) part)
1287+- camel_stream_printf(stream, "</blockquote>\n");
1288++ camel_stream_write_string (
1289++ stream, "</blockquote>\n", cancellable, NULL);
1290+
1291+ camel_cipher_validity_free (emf->valid);
1292+
1293+diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
1294+index 507bc95..07b1bd6 100644
1295+--- a/plugins/audio-inline/audio-inline.c
1296++++ b/plugins/audio-inline/audio-inline.c
1297+@@ -294,16 +294,22 @@ void
1298+ org_gnome_audio_inline_format (gpointer ep, EMFormatHookTarget *t)
1299+ {
1300+ struct _org_gnome_audio_inline_pobject *pobj;
1301+- gchar *classid = g_strdup_printf ("org-gnome-audio-inline-button-panel-%d", org_gnome_audio_class_id_counter);
1302++ gchar *classid;
1303++ gchar *content;
1304++
1305++ classid = g_strdup_printf (
1306++ "org-gnome-audio-inline-button-panel-%d",
1307++ org_gnome_audio_class_id_counter);
1308+
1309+ org_gnome_audio_class_id_counter++;
1310+
1311+ d(printf ("audio inline formatter: format classid %s\n", classid));
1312+
1313+- pobj = (struct _org_gnome_audio_inline_pobject *) em_format_html_add_pobject ((EMFormatHTML *) t->format, sizeof (*pobj), classid,
1314+- t->part, org_gnome_audio_inline_button_panel);
1315+- g_object_ref (t->part);
1316+- pobj->part = t->part;
1317++ pobj = (struct _org_gnome_audio_inline_pobject *)
1318++ em_format_html_add_pobject (
1319++ (EMFormatHTML *) t->format, sizeof (*pobj), classid,
1320++ t->part, org_gnome_audio_inline_button_panel);
1321++ pobj->part = g_object_ref (t->part);
1322+ pobj->filename = NULL;
1323+ pobj->playbin = NULL;
1324+ pobj->play_button = NULL;
1325+@@ -313,5 +319,7 @@ org_gnome_audio_inline_format (gpointer ep, EMFormatHookTarget *t)
1326+ pobj->object.free = org_gnome_audio_inline_pobject_free;
1327+ pobj->target_state = GST_STATE_NULL;
1328+
1329+- camel_stream_printf (t->stream, "<object classid=%s></object>\n", classid);
1330++ content = g_strdup_printf ("<object classid=%s></object>\n", classid);
1331++ camel_stream_write_string (t->stream, content, NULL, NULL);
1332++ g_free (content);
1333+ }
1334+diff --git a/plugins/image-inline/image-inline.c b/plugins/image-inline/image-inline.c
1335+index edb527c..73a630a 100644
1336+--- a/plugins/image-inline/image-inline.c
1337++++ b/plugins/image-inline/image-inline.c
1338+@@ -448,6 +448,7 @@ org_gnome_image_inline_format (gpointer ep, EMFormatHookTarget *target)
1339+ {
1340+ ImageInlinePObject *image_object;
1341+ gchar *classid;
1342++ gchar *content;
1343+
1344+ classid = g_strdup_printf (
1345+ "org-gnome-image-inline-display-%d",
1346+@@ -466,8 +467,9 @@ org_gnome_image_inline_format (gpointer ep, EMFormatHookTarget *target)
1347+ image_object->object.free = org_gnome_image_inline_pobject_free;
1348+ org_gnome_image_inline_decode (image_object);
1349+
1350+- camel_stream_printf (
1351+- target->stream, "<object classid=%s></object>", classid);
1352++ content = g_strdup_printf ("<object classid=%s></object>", classid);
1353++ camel_stream_write_string (target->stream, content, NULL, NULL);
1354++ g_free (content);
1355+
1356+ g_free (classid);
1357+ }
1358+diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
1359+index 0770ea2..f5b2bcd 100644
1360+--- a/plugins/itip-formatter/itip-formatter.c
1361++++ b/plugins/itip-formatter/itip-formatter.c
1362+@@ -2819,6 +2819,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
1363+ CamelDataWrapper *content;
1364+ CamelStream *stream;
1365+ GByteArray *byte_array;
1366++ gchar *string;
1367+
1368+ classid = g_strdup_printf("itip:///%s", ((EMFormat *) target->format)->part_id->str);
1369+
1370+@@ -2859,9 +2860,13 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
1371+
1372+ g_object_unref (stream);
1373+
1374+- camel_stream_printf (target->stream, "<table border=0 width=\"100%%\" cellpadding=3><tr>");
1375+- camel_stream_printf (target->stream, "<td valign=top><object classid=\"%s\"></object></td><td width=100%% valign=top>", classid);
1376+- camel_stream_printf (target->stream, "</td></tr></table>");
1377++ string = g_strdup_printf (
1378++ "<table border=0 width=\"100%%\" cellpadding=3><tr>"
1379++ "<td valign=top><object classid=\"%s\"></object></td>"
1380++ "<td width=100%% valign=top></td></tr></table>",
1381++ classid);
1382++ camel_stream_write_string (target->stream, string, NULL, NULL);
1383++ g_free (string);
1384+
1385+ g_free (classid);
1386+ }
1387+diff --git a/plugins/vcard-inline/vcard-inline.c b/plugins/vcard-inline/vcard-inline.c
1388+index 7e56da4..78818f3 100644
1389+--- a/plugins/vcard-inline/vcard-inline.c
1390++++ b/plugins/vcard-inline/vcard-inline.c
1391+@@ -313,6 +313,7 @@ org_gnome_vcard_inline_format (gpointer ep, EMFormatHookTarget *target)
1392+ {
1393+ VCardInlinePObject *vcard_object;
1394+ gchar *classid;
1395++ gchar *content;
1396+
1397+ classid = g_strdup_printf (
1398+ "org-gnome-vcard-inline-display-%d",
1399+@@ -332,8 +333,9 @@ org_gnome_vcard_inline_format (gpointer ep, EMFormatHookTarget *target)
1400+
1401+ e_book_client_get_sources (&vcard_object->source_list, NULL);
1402+
1403+- camel_stream_printf (
1404+- target->stream, "<object classid=%s></object>", classid);
1405++ content = g_strdup_printf ("<object classid=%s></object>", classid);
1406++ camel_stream_write_string (target->stream, content, NULL, NULL);
1407++ g_free (content);
1408+
1409+ g_free (classid);
1410+ }
1411+--
1412+cgit v0.9
1413
1414=== added file 'debian/patches/99git_camelsession_e-passwords_99d492b.patch'
1415--- debian/patches/99git_camelsession_e-passwords_99d492b.patch 1970-01-01 00:00:00 +0000
1416+++ debian/patches/99git_camelsession_e-passwords_99d492b.patch 2011-07-11 20:53:51 +0000
1417@@ -0,0 +1,313 @@
1418+From 99d492b8284fa467f2b8ad3e6b637e10258d1cc2 Mon Sep 17 00:00:00 2001
1419+From: Matthew Barnes <mbarnes@redhat.com>
1420+Date: Mon, 04 Jul 2011 13:55:30 +0000
1421+Subject: Adapt to CamelSession and e-passwords changes.
1422+
1423+---
1424+diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
1425+index 28b10ff..0de79ef 100644
1426+--- a/calendar/gui/alarm-notify/alarm-notify.c
1427++++ b/calendar/gui/alarm-notify/alarm-notify.c
1428+@@ -383,12 +383,8 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalClientSourceType source_type, E
1429+ session skip this source loading. we do not really want to prompt for auth from alarm dameon*/
1430+
1431+ if (e_source_get_property (source, "auth")) {
1432+- const gchar *name = e_source_get_property (source, "auth-domain");
1433+
1434+- if (!name)
1435+- name = "Calendar";
1436+-
1437+- if (!e_passwords_get_password (name, pass_key)) {
1438++ if (!e_passwords_get_password (NULL, pass_key)) {
1439+ g_mutex_unlock (an->priv->mutex);
1440+ g_free (str_uri);
1441+ g_free (pass_key);
1442+diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
1443+index ca4df0b..5395803 100644
1444+--- a/calendar/gui/e-meeting-store.c
1445++++ b/calendar/gui/e-meeting-store.c
1446+@@ -1809,7 +1809,7 @@ soup_authenticate (SoupSession *session,
1447+ } else {
1448+ gchar *password;
1449+
1450+- password = e_passwords_get_password ("Calendar", orig_uri);
1451++ password = e_passwords_get_password (NULL, orig_uri);
1452+ if (password) {
1453+ soup_auth_authenticate (auth, suri->user, password);
1454+ tried = TRUE;
1455+@@ -1846,7 +1846,7 @@ soup_authenticate (SoupSession *session,
1456+ }
1457+
1458+ password = e_passwords_ask_password (
1459+- _("Enter password"), "Calendar", orig_uri,
1460++ _("Enter password"), NULL, orig_uri,
1461+ description->str, E_PASSWORDS_REMEMBER_FOREVER |
1462+ E_PASSWORDS_SECRET | E_PASSWORDS_ONLINE |
1463+ (retrying ? E_PASSWORDS_REPROMPT : 0),
1464+diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
1465+index 6328dbc..0290cd7 100644
1466+--- a/capplet/settings/mail-account-view.c
1467++++ b/capplet/settings/mail-account-view.c
1468+@@ -278,7 +278,7 @@ setup_yahoo_account (MailAccountView *mav)
1469+
1470+ abs_uri = g_strdup_printf ("caldav://%s@caldav.calendar.yahoo.com/dav/%s/Calendar/%s/", sanitize_uname, email, gtk_entry_get_text((GtkEntry *)mav->priv->yahoo_cal_entry));
1471+ e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *) mav->password));
1472+- e_passwords_remember_password ("Calendar", abs_uri);
1473++ e_passwords_remember_password (NULL, abs_uri);
1474+
1475+ rel_uri = g_strdup_printf (YAHOO_CALENDAR_LOCATION, sanitize_uname, email, gtk_entry_get_text ((GtkEntry *) mav->priv->yahoo_cal_entry));
1476+ e_source_set_relative_uri (calendar, rel_uri);
1477+@@ -328,7 +328,7 @@ setup_yahoo_account (MailAccountView *mav)
1478+
1479+ rel_uri = g_strdup_printf("google://%s/", mav->priv->username);
1480+ e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *) mav->password));
1481+- e_passwords_remember_password ("Addressbook", rel_uri);
1482++ e_passwords_remember_password (NULL, rel_uri);
1483+ e_source_group_add_source (sgrp, abook, -1);
1484+ e_source_list_sync (slist, NULL);
1485+
1486+@@ -379,7 +379,7 @@ setup_google_accounts (MailAccountView *mav)
1487+ e_source_set_absolute_uri (calendar, abs_uri);
1488+
1489+ e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *) mav->password));
1490+- e_passwords_remember_password ("Calendar", abs_uri);
1491++ e_passwords_remember_password (NULL, abs_uri);
1492+ rel_uri = g_strconcat ("https", GMAIL_CALENDAR_LOCATION, sanitize_uname, CALENDAR_DEFAULT_PATH, NULL);
1493+ e_source_set_relative_uri (calendar, rel_uri);
1494+
1495+@@ -447,7 +447,7 @@ setup_google_accounts (MailAccountView *mav)
1496+
1497+ rel_uri = g_strdup_printf ("google://%s/", mav->priv->username);
1498+ e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *) mav->password));
1499+- e_passwords_remember_password ("Addressbook", rel_uri);
1500++ e_passwords_remember_password (NULL, rel_uri);
1501+ e_source_list_sync (slist, NULL);
1502+
1503+ g_free (rel_uri);
1504+@@ -688,7 +688,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav)
1505+ aurl = camel_url_new (account->source->url, NULL);
1506+ surl = camel_url_to_string (aurl, CAMEL_URL_HIDE_ALL);
1507+ e_passwords_add_password (surl, gtk_entry_get_text ((GtkEntry *) mav->password));
1508+- e_passwords_remember_password ("Mail", surl);
1509++ e_passwords_remember_password (NULL, surl);
1510+ camel_url_free (aurl);
1511+ g_free (surl);
1512+ }
1513+diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
1514+index 1a3b9e8..44bbd8d 100644
1515+--- a/mail/e-mail-session.c
1516++++ b/mail/e-mail-session.c
1517+@@ -609,7 +609,6 @@ mail_session_finalize (GObject *object)
1518+ static gchar *
1519+ mail_session_get_password (CamelSession *session,
1520+ CamelService *service,
1521+- const gchar *domain,
1522+ const gchar *prompt,
1523+ const gchar *item,
1524+ guint32 flags,
1525+@@ -631,10 +630,7 @@ mail_session_get_password (CamelSession *session,
1526+ gchar *key = mail_session_make_key (service, item);
1527+ EAccountService *config_service = NULL;
1528+
1529+- if (domain == NULL)
1530+- domain = "Mail";
1531+-
1532+- ret = e_passwords_get_password (domain, key);
1533++ ret = e_passwords_get_password (NULL, key);
1534+ if (ret == NULL || (flags & CAMEL_SESSION_PASSWORD_REPROMPT)) {
1535+ gboolean remember;
1536+
1537+@@ -696,11 +692,11 @@ mail_session_get_password (CamelSession *session,
1538+ eflags |= E_PASSWORDS_DISABLE_REMEMBER;
1539+
1540+ ret = e_passwords_ask_password (
1541+- title, domain, key, prompt,
1542++ title, NULL, key, prompt,
1543+ eflags, &remember, NULL);
1544+
1545+ if (!ret)
1546+- e_passwords_forget_password (domain, key);
1547++ e_passwords_forget_password (NULL, key);
1548+
1549+ g_free (title);
1550+
1551+@@ -729,16 +725,14 @@ mail_session_get_password (CamelSession *session,
1552+ static gboolean
1553+ mail_session_forget_password (CamelSession *session,
1554+ CamelService *service,
1555+- const gchar *domain,
1556+ const gchar *item,
1557+ GError **error)
1558+ {
1559+ gchar *key;
1560+
1561+- domain = (domain != NULL) ? domain : "Mail";
1562+ key = mail_session_make_key (service, item);
1563+
1564+- e_passwords_forget_password (domain, key);
1565++ e_passwords_forget_password (NULL, key);
1566+
1567+ g_free (key);
1568+
1569+diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
1570+index c6bef76..867a837 100644
1571+--- a/mail/em-account-editor.c
1572++++ b/mail/em-account-editor.c
1573+@@ -3838,19 +3838,14 @@ forget_password_if_needed (EAccount *original_account, EAccount *modified_accoun
1574+ (orig_url && !modif_url)) {
1575+ CamelURL *url;
1576+ gchar *url_str;
1577+- const gchar *auth_domain;
1578+
1579+ url = camel_url_new (orig_url, NULL);
1580+ if (!url)
1581+ return;
1582+
1583+- auth_domain = camel_url_get_param (url, "auth-domain");
1584+- if (!auth_domain)
1585+- auth_domain = "Mail";
1586+-
1587+ url_str = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
1588+ if (url_str)
1589+- e_passwords_forget_password (auth_domain, url_str);
1590++ e_passwords_forget_password (NULL, url_str);
1591+
1592+ g_free (url_str);
1593+ camel_url_free (url);
1594+diff --git a/plugins/caldav/caldav-browse-server.c b/plugins/caldav/caldav-browse-server.c
1595+index d169dda..72985f4 100644
1596+--- a/plugins/caldav/caldav-browse-server.c
1597++++ b/plugins/caldav/caldav-browse-server.c
1598+@@ -891,7 +891,7 @@ soup_authenticate (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gbool
1599+ return;
1600+
1601+ if (!retrying && !password)
1602+- password = e_passwords_get_password ("Calendar", g_object_get_data (dialog, "caldav-auth-key"));
1603++ password = e_passwords_get_password (NULL, g_object_get_data (dialog, "caldav-auth-key"));
1604+
1605+ if (!password || !*password || retrying) {
1606+ gchar *pass, *prompt, *add = NULL;
1607+@@ -918,7 +918,7 @@ soup_authenticate (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gbool
1608+ }
1609+
1610+ pass = e_passwords_ask_password (_("Enter password"),
1611+- "Calendar", g_object_get_data (dialog, "caldav-auth-key"), prompt,
1612++ NULL, g_object_get_data (dialog, "caldav-auth-key"), prompt,
1613+ E_PASSWORDS_REMEMBER_NEVER | E_PASSWORDS_DISABLE_REMEMBER | E_PASSWORDS_SECRET,
1614+ NULL, GTK_WINDOW (dialog));
1615+
1616+diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
1617+index 1e54362..5643c4f 100644
1618+--- a/plugins/google-account-setup/google-source.c
1619++++ b/plugins/google-account-setup/google-source.c
1620+@@ -441,7 +441,7 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
1621+
1622+ user = decode_at_back (username);
1623+ tmp = g_strdup_printf (_("Enter password for user %s to access list of subscribed calendars."), user);
1624+- password = e_passwords_ask_password (_("Enter password"), "Calendar", "", tmp,
1625++ password = e_passwords_ask_password (_("Enter password"), NULL, "", tmp,
1626+ E_PASSWORDS_REMEMBER_NEVER | E_PASSWORDS_REPROMPT | E_PASSWORDS_SECRET | E_PASSWORDS_DISABLE_REMEMBER,
1627+ NULL, parent);
1628+ g_free (tmp);
1629+diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
1630+index 3ea3747..8fad76f 100644
1631+--- a/plugins/publish-calendar/publish-calendar.c
1632++++ b/plugins/publish-calendar/publish-calendar.c
1633+@@ -322,14 +322,14 @@ ask_password (GMountOperation *op, const gchar *message, const gchar *default_us
1634+
1635+ euri = e_uri_new (ms->uri->location);
1636+ username = euri->user;
1637+- password = e_passwords_get_password ("Calendar", ms->uri->location);
1638++ password = e_passwords_get_password (NULL, ms->uri->location);
1639+ req_pass = ((username && *username) && !(ms->uri->service_type == TYPE_ANON_FTP &&
1640+ !strcmp (username, "anonymous"))) ? TRUE:FALSE;
1641+
1642+ if (!password && req_pass) {
1643+ gboolean remember = FALSE;
1644+
1645+- password = e_passwords_ask_password (_("Enter password"), "", ms->uri->location, message,
1646++ password = e_passwords_ask_password (_("Enter password"), NULL, ms->uri->location, message,
1647+ E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET|E_PASSWORDS_ONLINE,
1648+ &remember,
1649+ NULL);
1650+diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c
1651+index af539dd..9089561 100644
1652+--- a/plugins/publish-calendar/publish-location.c
1653++++ b/plugins/publish-calendar/publish-location.c
1654+@@ -88,11 +88,11 @@ migrateURI (const gchar *xml, xmlDocPtr doc)
1655+ uri->publish_frequency = atoi ((gchar *) frequency);
1656+ uri->publish_format = URI_PUBLISH_AS_FB;
1657+
1658+- password = e_passwords_get_password ("Calendar", (gchar *)location);
1659++ password = e_passwords_get_password (NULL, (gchar *)location);
1660+ if (password) {
1661+- e_passwords_forget_password ("Calendar", (gchar *)location);
1662++ e_passwords_forget_password (NULL, (gchar *)location);
1663+ e_passwords_add_password (uri->location, password);
1664+- e_passwords_remember_password ("Calendar", uri->location);
1665++ e_passwords_remember_password (NULL, uri->location);
1666+ }
1667+
1668+ for (p = root->children; p != NULL; p = p->next) {
1669+diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c
1670+index 26d0a98..c2e68b9 100644
1671+--- a/plugins/publish-calendar/url-editor-dialog.c
1672++++ b/plugins/publish-calendar/url-editor-dialog.c
1673+@@ -437,7 +437,7 @@ url_editor_dialog_construct (UrlEditorDialog *dialog)
1674+ gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->publish_frequency), uri->publish_frequency);
1675+ gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->type_selector), uri->publish_format);
1676+
1677+- uri->password = e_passwords_get_password ("Calendar", uri->location);
1678++ uri->password = e_passwords_get_password (NULL, uri->location);
1679+ if (uri->password) {
1680+ if (strlen (uri->password) != 0) {
1681+ gtk_entry_set_text (GTK_ENTRY (dialog->password_entry), uri->password);
1682+@@ -572,9 +572,9 @@ url_editor_dialog_run (UrlEditorDialog *dialog)
1683+
1684+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->remember_pw))) {
1685+ e_passwords_add_password (dialog->uri->location, dialog->uri->password);
1686+- e_passwords_remember_password ("Calendar", dialog->uri->location);
1687++ e_passwords_remember_password (NULL, dialog->uri->location);
1688+ } else {
1689+- e_passwords_forget_password ("Calendar", dialog->uri->location);
1690++ e_passwords_forget_password (NULL, dialog->uri->location);
1691+ }
1692+
1693+ l = e_source_selector_get_selection (E_SOURCE_SELECTOR (dialog->events_selector));
1694+diff --git a/smime/gui/component.c b/smime/gui/component.c
1695+index 0b7a679..fbd6d75 100644
1696+--- a/smime/gui/component.c
1697++++ b/smime/gui/component.c
1698+@@ -46,7 +46,7 @@ smime_pk11_passwd (ECertDB *db, PK11SlotInfo* slot, gboolean retry, gchar **pass
1699+ prompt = g_strdup_printf (_("Enter the password for '%s'"), slot_name);
1700+ g_free (slot_name);
1701+
1702+- *passwd = e_passwords_ask_password (_("Enter password"), "SMIME-PKCS11", "",
1703++ *passwd = e_passwords_ask_password (_("Enter password"), NULL, "",
1704+ prompt,
1705+ E_PASSWORDS_REMEMBER_NEVER|E_PASSWORDS_SECRET, NULL,
1706+ NULL);
1707+@@ -68,7 +68,7 @@ smime_pk11_change_passwd (ECertDB *db, gchar **old_passwd, gchar **passwd, gpoin
1708+ /* we're setting the password initially */
1709+ prompt = _("Enter new password for certificate database");
1710+
1711+- *passwd = e_passwords_ask_password (_("Enter new password"), "SMIME-PKCS11", "",
1712++ *passwd = e_passwords_ask_password (_("Enter new password"), NULL, "",
1713+ prompt,
1714+ E_PASSWORDS_REMEMBER_NEVER|E_PASSWORDS_SECRET, NULL,
1715+ NULL);
1716+diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c
1717+index ed7e6a6..f4fa995 100644
1718+--- a/smime/lib/e-pkcs12.c
1719++++ b/smime/lib/e-pkcs12.c
1720+@@ -201,7 +201,7 @@ prompt_for_password (gchar *title, gchar *prompt, SECItem *pwd)
1721+ {
1722+ gchar *passwd;
1723+
1724+- passwd = e_passwords_ask_password (title, "SMIME-PKCS12", "", prompt,
1725++ passwd = e_passwords_ask_password (title, NULL, "", prompt,
1726+ E_PASSWORDS_REMEMBER_NEVER|E_PASSWORDS_SECRET, NULL,
1727+ NULL);
1728+
1729+--
1730+cgit v0.9
1731
1732=== added file 'debian/patches/99git_drop_camel_stream_reset_17127fb.patch'
1733--- debian/patches/99git_drop_camel_stream_reset_17127fb.patch 1970-01-01 00:00:00 +0000
1734+++ debian/patches/99git_drop_camel_stream_reset_17127fb.patch 2011-07-11 20:53:51 +0000
1735@@ -0,0 +1,162 @@
1736+From 17127fbee9fd1b0baecb4e305c005d6abbf8d880 Mon Sep 17 00:00:00 2001
1737+From: Matthew Barnes <mbarnes@redhat.com>
1738+Date: Tue, 05 Jul 2011 12:16:13 +0000
1739+Subject: Prefer g_seekable_seek() over camel_stream_reset().
1740+
1741+When a stream is obviously a file or memory stream (both of which
1742+implement the GSeekable interface), use g_seekable_seek() instead of
1743+camel_stream_reset().
1744+
1745+This is helping me discover if it's safe to remove camel_stream_reset().
1746+We want to eventually move to GIO streams, which have no reset method.
1747+---
1748+diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
1749+index a8f1bf3..a5a8d0d 100644
1750+--- a/em-format/em-format-quote.c
1751++++ b/em-format/em-format-quote.c
1752+@@ -94,8 +94,11 @@ emfq_format_clone (EMFormat *emf,
1753+ EM_FORMAT_CLASS (parent_class)->format_clone (
1754+ emf, folder, uid, msg, src, cancellable);
1755+
1756++ g_seekable_seek (
1757++ G_SEEKABLE (emfq->priv->stream),
1758++ 0, G_SEEK_SET, NULL, NULL);
1759++
1760+ gconf = gconf_client_get_default ();
1761+- camel_stream_reset (emfq->priv->stream, NULL);
1762+ if (gconf_client_get_bool (
1763+ gconf, "/apps/evolution/mail/composer/top_signature", NULL))
1764+ camel_stream_printf (emfq->priv->stream, "<br>\n");
1765+@@ -257,6 +260,9 @@ em_format_quote_new (const gchar *credits,
1766+
1767+ g_return_val_if_fail (CAMEL_IS_STREAM (stream), NULL);
1768+
1769++ /* Steam must also be seekable so we can reset its position. */
1770++ g_return_val_if_fail (G_IS_SEEKABLE (stream), NULL);
1771++
1772+ emfq = g_object_new (EM_TYPE_FORMAT_QUOTE, NULL);
1773+
1774+ emfq->priv->credits = g_strdup (credits);
1775+diff --git a/em-format/em-format.c b/em-format/em-format.c
1776+index 1f9634d..1c2624f 100644
1777+--- a/em-format/em-format.c
1778++++ b/em-format/em-format.c
1779+@@ -1422,7 +1422,8 @@ em_format_format_text (EMFormat *emf,
1780+ (CamelStream *) filter_stream, cancellable, NULL);
1781+ camel_stream_flush ((CamelStream *) filter_stream, cancellable, NULL);
1782+ g_object_unref (filter_stream);
1783+- camel_stream_reset (mem_stream, NULL);
1784++
1785++ g_seekable_seek (G_SEEKABLE (mem_stream), 0, G_SEEK_SET, NULL, NULL);
1786+
1787+ if (max == -1 || size == -1 || size < (max * 1024) || emf->composer) {
1788+ camel_stream_write_to_stream (
1789+diff --git a/em-format/em-inline-filter.c b/em-format/em-inline-filter.c
1790+index c7a8014..1f96395 100644
1791+--- a/em-format/em-inline-filter.c
1792++++ b/em-format/em-inline-filter.c
1793+@@ -121,7 +121,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len)
1794+ }
1795+
1796+ emif->data = g_byte_array_new ();
1797+- camel_stream_reset (mem, NULL);
1798++ g_seekable_seek (G_SEEKABLE (mem), 0, G_SEEK_SET, NULL, NULL);
1799+
1800+ dw = camel_data_wrapper_new ();
1801+ if (encoding == emif->base_encoding && (encoding == CAMEL_TRANSFER_ENCODING_BASE64 || encoding == CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE)) {
1802+diff --git a/mail/e-mail-folder-utils.c b/mail/e-mail-folder-utils.c
1803+index f255c73..64bdbdb 100644
1804+--- a/mail/e-mail-folder-utils.c
1805++++ b/mail/e-mail-folder-utils.c
1806+@@ -1159,9 +1159,7 @@ e_mail_folder_save_messages_sync (CamelFolder *folder,
1807+ {
1808+ GFileOutputStream *file_output_stream;
1809+ GByteArray *byte_array;
1810+- CamelMimeFilter *filter;
1811+ CamelStream *base_stream;
1812+- CamelStream *stream;
1813+ gboolean success = TRUE;
1814+ guint ii;
1815+
1816+@@ -1192,15 +1190,12 @@ e_mail_folder_save_messages_sync (CamelFolder *folder,
1817+
1818+ /* CamelStreamMem takes ownership of the GByteArray. */
1819+ byte_array = g_byte_array_new ();
1820+- filter = camel_mime_filter_from_new ();
1821+ base_stream = camel_stream_mem_new_with_byte_array (byte_array);
1822+- stream = camel_stream_filter_new (base_stream);
1823+- camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), filter);
1824+- g_object_unref (base_stream);
1825+- g_object_unref (filter);
1826+
1827+ for (ii = 0; ii < message_uids->len; ii++) {
1828+ CamelMimeMessage *message;
1829++ CamelMimeFilter *filter;
1830++ CamelStream *stream;
1831+ const gchar *uid;
1832+ gchar *from_line;
1833+ gint percent;
1834+@@ -1232,10 +1227,17 @@ e_mail_folder_save_messages_sync (CamelFolder *folder,
1835+ goto exit;
1836+ }
1837+
1838++ filter = camel_mime_filter_from_new ();
1839++ stream = camel_stream_filter_new (base_stream);
1840++ camel_stream_filter_add (CAMEL_STREAM_FILTER (stream), filter);
1841++
1842+ retval = camel_data_wrapper_write_to_stream_sync (
1843+ CAMEL_DATA_WRAPPER (message),
1844+ stream, cancellable, error);
1845+
1846++ g_object_unref (filter);
1847++ g_object_unref (stream);
1848++
1849+ if (retval == -1) {
1850+ g_object_unref (message);
1851+ goto exit;
1852+@@ -1258,14 +1260,16 @@ e_mail_folder_save_messages_sync (CamelFolder *folder,
1853+
1854+ /* Flush the buffer for the next message.
1855+ * For memory streams this never fails. */
1856+- camel_stream_reset (stream, NULL);
1857++ g_seekable_seek (
1858++ G_SEEKABLE (base_stream),
1859++ 0, G_SEEK_SET, NULL, NULL);
1860+
1861+ g_object_unref (message);
1862+ }
1863+
1864+ exit:
1865+ g_object_unref (file_output_stream);
1866+- g_object_unref (stream);
1867++ g_object_unref (base_stream);
1868+
1869+ camel_operation_pop_message (cancellable);
1870+
1871+diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
1872+index 2dcc687..c3b5465 100644
1873+--- a/mail/em-composer-utils.c
1874++++ b/mail/em-composer-utils.c
1875+@@ -1153,7 +1153,6 @@ traverse_parts (GSList *clues, CamelMimeMessage *message, CamelDataWrapper *cont
1876+
1877+ if (replace_variables (clues, message, &str)) {
1878+ stream = camel_stream_mem_new_with_buffer (str, strlen (str));
1879+- camel_stream_reset (stream, NULL);
1880+ camel_data_wrapper_construct_from_stream_sync (
1881+ content, stream, NULL, NULL);
1882+ g_object_unref (stream);
1883+diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c
1884+index e65e687..e6493f2 100644
1885+--- a/modules/mail/e-mail-attachment-handler.c
1886++++ b/modules/mail/e-mail-attachment-handler.c
1887+@@ -221,7 +221,7 @@ mail_attachment_handler_message_rfc822 (EAttachmentView *view,
1888+
1889+ stream = camel_stream_mem_new ();
1890+ camel_stream_write (stream, data, length, NULL, NULL);
1891+- camel_stream_reset (stream, NULL);
1892++ g_seekable_seek (G_SEEKABLE (stream), 0, G_SEEK_SET, NULL, NULL);
1893+
1894+ message = camel_mime_message_new ();
1895+ wrapper = CAMEL_DATA_WRAPPER (message);
1896+--
1897+cgit v0.9
1898
1899=== added file 'debian/patches/99git_ealertbar_underalloc_985ad2d.patch'
1900--- debian/patches/99git_ealertbar_underalloc_985ad2d.patch 1970-01-01 00:00:00 +0000
1901+++ debian/patches/99git_ealertbar_underalloc_985ad2d.patch 2011-07-11 20:53:51 +0000
1902@@ -0,0 +1,180 @@
1903+From 985ad2d4a4f10954329f8b8ab645e3c7d2ceea0a Mon Sep 17 00:00:00 2001
1904+From: Matthew Barnes <mbarnes@redhat.com>
1905+Date: Wed, 06 Jul 2011 23:46:14 +0000
1906+Subject: EShellContent: Fix underallocation of EAlertBar.
1907+
1908+Keeps GTK+ from going crazy with runtime warnings.
1909+---
1910+diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
1911+index 51ca37e..8868163 100644
1912+--- a/shell/e-shell-content.c
1913++++ b/shell/e-shell-content.c
1914+@@ -48,6 +48,10 @@
1915+ #include "e-shell-view.h"
1916+ #include "e-shell-window-actions.h"
1917+
1918++#define E_SHELL_CONTENT_GET_PRIVATE(obj) \
1919++ (G_TYPE_INSTANCE_GET_PRIVATE \
1920++ ((obj), E_TYPE_SHELL_CONTENT, EShellContentPrivate))
1921++
1922+ struct _EShellContentPrivate {
1923+
1924+ gpointer shell_view; /* weak pointer */
1925+@@ -150,7 +154,7 @@ shell_content_dispose (GObject *object)
1926+ {
1927+ EShellContentPrivate *priv;
1928+
1929+- priv = E_SHELL_CONTENT (object)->priv;
1930++ priv = E_SHELL_CONTENT_GET_PRIVATE (object);
1931+
1932+ if (priv->shell_view != NULL) {
1933+ g_object_remove_weak_pointer (
1934+@@ -172,7 +176,7 @@ shell_content_finalize (GObject *object)
1935+ {
1936+ EShellContentPrivate *priv;
1937+
1938+- priv = E_SHELL_CONTENT (object)->priv;
1939++ priv = E_SHELL_CONTENT_GET_PRIVATE (object);
1940+
1941+ g_free (priv->user_filename);
1942+
1943+@@ -218,27 +222,36 @@ shell_content_get_preferred_width (GtkWidget *widget,
1944+ gint *natural)
1945+ {
1946+ EShellContentPrivate *priv;
1947+- gint min, nat;
1948+- gint child_min, child_nat;
1949+ GtkWidget *child;
1950+
1951+- priv = E_SHELL_CONTENT (widget)->priv;
1952++ priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
1953+
1954+ *minimum = *natural = 0;
1955+
1956+ child = gtk_bin_get_child (GTK_BIN (widget));
1957+- gtk_widget_get_preferred_width (child, &child_min, &child_nat);
1958+- gtk_widget_get_preferred_width (priv->alert_bar, &min, &nat);
1959++ gtk_widget_get_preferred_width (child, minimum, natural);
1960+
1961+- *minimum = MAX (min, child_min);
1962+- *natural = MAX (nat, child_nat);
1963++ if (gtk_widget_get_visible (priv->alert_bar)) {
1964++ gint child_minimum;
1965++ gint child_natural;
1966+
1967+- if (priv->searchbar == NULL)
1968+- return;
1969++ gtk_widget_get_preferred_width (
1970++ priv->alert_bar, &child_minimum, &child_natural);
1971++
1972++ *minimum = MAX (*minimum, child_minimum);
1973++ *natural = MAX (*natural, child_natural);
1974++ }
1975+
1976+- gtk_widget_get_preferred_width (priv->searchbar, &min, &nat);
1977+- *minimum = MAX (*minimum, min);
1978+- *natural = MAX (*natural, nat);
1979++ if (priv->searchbar != NULL) {
1980++ gint child_minimum;
1981++ gint child_natural;
1982++
1983++ gtk_widget_get_preferred_width (
1984++ priv->searchbar, &child_minimum, &child_natural);
1985++
1986++ *minimum = MAX (*minimum, child_minimum);
1987++ *natural = MAX (*natural, child_natural);
1988++ }
1989+ }
1990+
1991+ static void
1992+@@ -247,20 +260,34 @@ shell_content_get_preferred_height (GtkWidget *widget,
1993+ gint *natural)
1994+ {
1995+ EShellContentPrivate *priv;
1996+- gint min, nat;
1997+ GtkWidget *child;
1998+
1999+- priv = E_SHELL_CONTENT (widget)->priv;
2000++ priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
2001+
2002+ child = gtk_bin_get_child (GTK_BIN (widget));
2003+ gtk_widget_get_preferred_height (child, minimum, natural);
2004+
2005+- if (priv->searchbar == NULL)
2006+- return;
2007++ if (gtk_widget_get_visible (priv->alert_bar)) {
2008++ gint child_minimum;
2009++ gint child_natural;
2010+
2011+- gtk_widget_get_preferred_height (priv->searchbar, &min, &nat);
2012+- *minimum += min;
2013+- *natural += nat;
2014++ gtk_widget_get_preferred_height (
2015++ priv->alert_bar, &child_minimum, &child_natural);
2016++
2017++ *minimum += child_minimum;
2018++ *natural += child_natural;
2019++ }
2020++
2021++ if (priv->searchbar != NULL) {
2022++ gint child_minimum;
2023++ gint child_natural;
2024++
2025++ gtk_widget_get_preferred_height (
2026++ priv->searchbar, &child_minimum, &child_natural);
2027++
2028++ *minimum += child_minimum;
2029++ *natural += child_natural;
2030++ }
2031+ }
2032+
2033+ static void
2034+@@ -273,7 +300,7 @@ shell_content_size_allocate (GtkWidget *widget,
2035+ GtkWidget *child;
2036+ gint remaining_height;
2037+
2038+- priv = E_SHELL_CONTENT (widget)->priv;
2039++ priv = E_SHELL_CONTENT_GET_PRIVATE (widget);
2040+
2041+ remaining_height = allocation->height;
2042+ gtk_widget_set_allocation (widget, allocation);
2043+@@ -297,7 +324,8 @@ shell_content_size_allocate (GtkWidget *widget,
2044+ remaining_height -= child_requisition.height;
2045+ child_allocation.height = child_requisition.height;
2046+
2047+- gtk_widget_size_allocate (child, &child_allocation);
2048++ if (child_allocation.height > 0)
2049++ gtk_widget_size_allocate (child, &child_allocation);
2050+
2051+ /* Search bar gets to be as tall as it wants (if we have one). */
2052+
2053+@@ -332,7 +360,7 @@ shell_content_remove (GtkContainer *container,
2054+ GtkContainerClass *container_class;
2055+ EShellContentPrivate *priv;
2056+
2057+- priv = E_SHELL_CONTENT (container)->priv;
2058++ priv = E_SHELL_CONTENT_GET_PRIVATE (container);
2059+
2060+ if (widget == priv->alert_bar) {
2061+ gtk_widget_unparent (priv->alert_bar);
2062+@@ -359,7 +387,7 @@ shell_content_forall (GtkContainer *container,
2063+ {
2064+ EShellContentPrivate *priv;
2065+
2066+- priv = E_SHELL_CONTENT (container)->priv;
2067++ priv = E_SHELL_CONTENT_GET_PRIVATE (container);
2068+
2069+ if (priv->alert_bar != NULL)
2070+ callback (priv->alert_bar, callback_data);
2071+@@ -470,8 +498,7 @@ e_shell_content_alert_sink_init (EAlertSinkInterface *interface)
2072+ static void
2073+ e_shell_content_init (EShellContent *shell_content)
2074+ {
2075+- shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (
2076+- shell_content, E_TYPE_SHELL_CONTENT, EShellContentPrivate);
2077++ shell_content->priv = E_SHELL_CONTENT_GET_PRIVATE (shell_content);
2078+
2079+ gtk_widget_set_has_window (GTK_WIDGET (shell_content), FALSE);
2080+ }
2081+--
2082+cgit v0.9
2083
2084=== added file 'debian/patches/99git_emformatquote_cleanups_a51ea9b.patch'
2085--- debian/patches/99git_emformatquote_cleanups_a51ea9b.patch 1970-01-01 00:00:00 +0000
2086+++ debian/patches/99git_emformatquote_cleanups_a51ea9b.patch 2011-07-11 20:53:51 +0000
2087@@ -0,0 +1,224 @@
2088+From a51ea9b9770660531d1d48da4c230e0af118f297 Mon Sep 17 00:00:00 2001
2089+From: Matthew Barnes <mbarnes@redhat.com>
2090+Date: Tue, 05 Jul 2011 13:12:41 +0000
2091+Subject: EMFormatQuote cleanups.
2092+
2093+Move public members to the private struct.
2094+---
2095+diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
2096+index f0a005f..a8f1bf3 100644
2097+--- a/em-format/em-format-quote.c
2098++++ b/em-format/em-format-quote.c
2099+@@ -34,8 +34,15 @@
2100+ #include "em-stripsig-filter.h"
2101+ #include "em-format-quote.h"
2102+
2103++#define EM_FORMAT_QUOTE_GET_PRIVATE(obj) \
2104++ (G_TYPE_INSTANCE_GET_PRIVATE \
2105++ ((obj), EM_TYPE_FORMAT_QUOTE, EMFormatQuotePrivate))
2106++
2107+ struct _EMFormatQuotePrivate {
2108+- gint dummy;
2109++ gchar *credits;
2110++ CamelStream *stream;
2111++ EMFormatQuoteFlags flags;
2112++ guint32 text_html_flags;
2113+ };
2114+
2115+ static void emfq_builtin_init (EMFormatQuoteClass *efhc);
2116+@@ -43,13 +50,29 @@ static void emfq_builtin_init (EMFormatQuoteClass *efhc);
2117+ static gpointer parent_class;
2118+
2119+ static void
2120++emfq_dispose (GObject *object)
2121++{
2122++ EMFormatQuotePrivate *priv;
2123++
2124++ priv = EM_FORMAT_QUOTE_GET_PRIVATE (object);
2125++
2126++ if (priv->stream != NULL) {
2127++ g_object_unref (priv->stream);
2128++ priv->stream = NULL;
2129++ }
2130++
2131++ /* Chain up to parent's dispose() method. */
2132++ G_OBJECT_CLASS (parent_class)->dispose (object);
2133++}
2134++
2135++static void
2136+ emfq_finalize (GObject *object)
2137+ {
2138+- EMFormatQuote *emfq =(EMFormatQuote *) object;
2139++ EMFormatQuotePrivate *priv;
2140+
2141+- if (emfq->stream)
2142+- g_object_unref (emfq->stream);
2143+- g_free (emfq->credits);
2144++ priv = EM_FORMAT_QUOTE_GET_PRIVATE (object);
2145++
2146++ g_free (priv->credits);
2147+
2148+ /* Chain up to parent's finalize() method. */
2149+ G_OBJECT_CLASS (parent_class)->finalize (object);
2150+@@ -72,25 +95,25 @@ emfq_format_clone (EMFormat *emf,
2151+ emf, folder, uid, msg, src, cancellable);
2152+
2153+ gconf = gconf_client_get_default ();
2154+- camel_stream_reset (emfq->stream, NULL);
2155++ camel_stream_reset (emfq->priv->stream, NULL);
2156+ if (gconf_client_get_bool (
2157+ gconf, "/apps/evolution/mail/composer/top_signature", NULL))
2158+- camel_stream_printf (emfq->stream, "<br>\n");
2159++ camel_stream_printf (emfq->priv->stream, "<br>\n");
2160+ g_object_unref (gconf);
2161+ handle = em_format_find_handler(emf, "x-evolution/message/prefix");
2162+ if (handle)
2163+ handle->handler (
2164+- emf, emfq->stream,
2165++ emf, emfq->priv->stream,
2166+ CAMEL_MIME_PART (msg),
2167+ handle, cancellable, FALSE);
2168+ handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
2169+ if (handle)
2170+ handle->handler (
2171+- emf, emfq->stream,
2172++ emf, emfq->priv->stream,
2173+ CAMEL_MIME_PART (msg),
2174+ handle, cancellable, FALSE);
2175+
2176+- camel_stream_flush (emfq->stream, cancellable, NULL);
2177++ camel_stream_flush (emfq->priv->stream, cancellable, NULL);
2178+
2179+ g_signal_emit_by_name(emf, "complete");
2180+ }
2181+@@ -149,7 +172,7 @@ emfq_format_attachment (EMFormat *emf,
2182+ /* output some info about it */
2183+ text = em_format_describe_part (part, mime_type);
2184+ html = camel_text_to_html (
2185+- text, emfq->text_html_flags &
2186++ text, emfq->priv->text_html_flags &
2187+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
2188+ camel_stream_write_string (stream, html, cancellable, NULL);
2189+ g_free (html);
2190+@@ -177,6 +200,7 @@ emfq_class_init (EMFormatQuoteClass *class)
2191+ g_type_class_add_private (class, sizeof (EMFormatQuotePrivate));
2192+
2193+ object_class = G_OBJECT_CLASS (class);
2194++ object_class->dispose = emfq_dispose;
2195+ object_class->finalize = emfq_finalize;
2196+
2197+ format_class = EM_FORMAT_CLASS (class);
2198+@@ -189,8 +213,10 @@ emfq_class_init (EMFormatQuoteClass *class)
2199+ static void
2200+ emfq_init (EMFormatQuote *emfq)
2201+ {
2202++ emfq->priv = EM_FORMAT_QUOTE_GET_PRIVATE (emfq);
2203++
2204+ /* we want to convert url's etc */
2205+- emfq->text_html_flags =
2206++ emfq->priv->text_html_flags =
2207+ CAMEL_MIME_FILTER_TOHTML_PRE |
2208+ CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS |
2209+ CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES;
2210+@@ -233,9 +259,9 @@ em_format_quote_new (const gchar *credits,
2211+
2212+ emfq = g_object_new (EM_TYPE_FORMAT_QUOTE, NULL);
2213+
2214+- emfq->credits = g_strdup (credits);
2215+- emfq->stream = g_object_ref (stream);
2216+- emfq->flags = flags;
2217++ emfq->priv->credits = g_strdup (credits);
2218++ emfq->priv->stream = g_object_ref (stream);
2219++ emfq->priv->flags = flags;
2220+
2221+ return emfq;
2222+ }
2223+@@ -494,8 +520,9 @@ emfq_format_message_prefix (EMFormat *emf,
2224+ {
2225+ EMFormatQuote *emfq = (EMFormatQuote *) emf;
2226+
2227+- if (emfq->credits)
2228+- camel_stream_printf(stream, "%s<br>\n", emfq->credits);
2229++ if (emfq->priv->credits != NULL)
2230++ camel_stream_printf (
2231++ stream, "%s<br>\n", emfq->priv->credits);
2232+ }
2233+
2234+ static void
2235+@@ -508,7 +535,7 @@ emfq_format_message (EMFormat *emf,
2236+ {
2237+ EMFormatQuote *emfq = (EMFormatQuote *) emf;
2238+
2239+- if (emfq->flags & EM_FORMAT_QUOTE_CITE)
2240++ if (emfq->priv->flags & EM_FORMAT_QUOTE_CITE)
2241+ camel_stream_printf (
2242+ stream, "<!--+GtkHTML:<DATA class=\"ClueFlow\" "
2243+ "key=\"orig\" value=\"1\">-->\n"
2244+@@ -519,12 +546,12 @@ emfq_format_message (EMFormat *emf,
2245+ stream, "%s</br>\n",
2246+ _("-------- Forwarded Message --------"));
2247+ emfq_format_headers (emfq, stream, (CamelMedium *) part);
2248+- } else if (emfq->flags & EM_FORMAT_QUOTE_HEADERS)
2249++ } else if (emfq->priv->flags & EM_FORMAT_QUOTE_HEADERS)
2250+ emfq_format_headers (emfq, stream, (CamelMedium *) part);
2251+
2252+ em_format_part (emf, stream, part, cancellable);
2253+
2254+- if (emfq->flags & EM_FORMAT_QUOTE_CITE)
2255++ if (emfq->priv->flags & EM_FORMAT_QUOTE_CITE)
2256+ camel_stream_write_string (
2257+ stream, "</blockquote><!--+GtkHTML:"
2258+ "<DATA class=\"ClueFlow\" clear=\"orig\">-->",
2259+@@ -612,7 +639,7 @@ emfq_text_plain (EMFormat *emf,
2260+ g_object_unref (mp);
2261+ }
2262+
2263+- flags = emfq->text_html_flags;
2264++ flags = emfq->priv->text_html_flags;
2265+
2266+ /* Check for RFC 2646 flowed text. */
2267+ type = camel_mime_part_get_content_type (part);
2268+@@ -623,7 +650,7 @@ emfq_text_plain (EMFormat *emf,
2269+
2270+ filtered_stream = camel_stream_filter_new (stream);
2271+
2272+- if ((emfq->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) {
2273++ if ((emfq->priv->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) {
2274+ sig_strip = em_stripsig_filter_new (TRUE);
2275+ camel_stream_filter_add (
2276+ CAMEL_STREAM_FILTER (filtered_stream), sig_strip);
2277+@@ -687,10 +714,14 @@ emfq_text_html (EMFormat *emf,
2278+ GCancellable *cancellable,
2279+ gboolean is_fallback)
2280+ {
2281++ EMFormatQuotePrivate *priv;
2282++
2283++ priv = EM_FORMAT_QUOTE_GET_PRIVATE (emf);
2284++
2285+ camel_stream_write_string (
2286+ stream, "\n<!-- text/html -->\n", cancellable, NULL);
2287+
2288+- if ((EM_FORMAT_QUOTE (emf)->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) {
2289++ if ((priv->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) {
2290+ CamelMimeFilter *sig_strip;
2291+ CamelStream *filtered_stream;
2292+
2293+diff --git a/em-format/em-format-quote.h b/em-format/em-format-quote.h
2294+index c956153..5c1882e 100644
2295+--- a/em-format/em-format-quote.h
2296++++ b/em-format/em-format-quote.h
2297+@@ -59,12 +59,6 @@ typedef enum {
2298+ struct _EMFormatQuote {
2299+ EMFormat format;
2300+ EMFormatQuotePrivate *priv;
2301+-
2302+- gchar *credits;
2303+- CamelStream *stream;
2304+- EMFormatQuoteFlags flags;
2305+-
2306+- guint32 text_html_flags;
2307+ };
2308+
2309+ struct _EMFormatQuoteClass {
2310+--
2311+cgit v0.9
2312
2313=== modified file 'debian/patches/series'
2314--- debian/patches/series 2011-05-19 16:14:33 +0000
2315+++ debian/patches/series 2011-07-11 20:53:51 +0000
2316@@ -11,3 +11,8 @@
2317 91_add_u1_email_translations.patch
2318 93_no_tray_icon_by_default.patch
2319 99-remove-gettext-macros.patch
2320+99git_camelsession_e-passwords_99d492b.patch
2321+99git_emformatquote_cleanups_a51ea9b.patch
2322+99git_drop_camel_stream_reset_17127fb.patch
2323+99git_avoid_camel_stream_printf_005a26d.patch
2324+99git_ealertbar_underalloc_985ad2d.patch
2325
2326=== modified file 'debian/rules'
2327--- debian/rules 2011-06-28 15:54:12 +0000
2328+++ debian/rules 2011-07-11 20:53:51 +0000
2329@@ -37,6 +37,7 @@
2330 --disable-contacts-map \
2331 --disable-image-inline \
2332 --disable-scrollkeeper \
2333+ --disable-goa \
2334 --enable-python \
2335 --with-sub-version=-$(DEB_REVISION)
2336

Subscribers

People subscribed via source and target branches