Index: plugins/mark-all-read/ChangeLog
===================================================================
--- plugins/mark-all-read/ChangeLog	(revision 35281)
+++ plugins/mark-all-read/ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2008-03-28  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #514383
+
+	* mark-all-read.c: (dlg_button_response), (ask_action),
+	(mar_got_folder): Do not use e_error_run to ask a question,
+	use its own dialog instead.
+
 2007-12-20  Matthew Barnes  <mbarnes@redhat.com>
 
 	** Fixes part of bug #362638
Index: plugins/mark-all-read/mark-all-read.c
===================================================================
--- plugins/mark-all-read/mark-all-read.c	(revision 35281)
+++ plugins/mark-all-read/mark-all-read.c	(working copy)
@@ -61,6 +61,99 @@ mark_all_as_read (CamelFolder *folder)
 	camel_folder_free_uids (folder, uids);
 }
 
+struct _button_response
+{
+	GtkWidget *dlg;
+	int response;
+};
+
+static void
+dlg_button_response (GtkButton *butt, gpointer data)
+{
+	struct _button_response *br = data;
+
+	g_return_if_fail (br != NULL);
+	g_return_if_fail (br->dlg != NULL);
+
+	gtk_dialog_response (GTK_DIALOG (br->dlg), br->response);
+}
+
+static int
+ask_action (void)
+{
+	GtkWidget *dlg, *vbox, *hbox, *w;
+	char *msg;
+	int response;
+	struct _button_response buttons[3];
+
+	dlg = gtk_dialog_new ();
+	gtk_window_set_title (GTK_WINDOW (dlg), _("Mark all messages as read"));
+	gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_CANCEL);
+
+	/* hide things we do not like */
+	gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
+	gtk_widget_hide (GTK_DIALOG (dlg)->action_area);
+
+	vbox = gtk_vbox_new (FALSE, 0);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
+	gtk_widget_show (vbox);
+	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), vbox);
+
+	hbox = gtk_hbox_new (FALSE, 0);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
+
+	w = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_DIALOG);
+	gtk_widget_show (w);
+	gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+	gtk_misc_set_alignment (GTK_MISC (w), 0.5, 0);
+	gtk_misc_set_padding (GTK_MISC (w), 12, 0);
+
+	/* empty lines at the end to make a space between text and the buttons; ugly ugly */
+	msg = g_strdup_printf ("<b>%s</b>\n\n%s\n\n", _("Mark all messages in this folder and subfolders as read?"), _("Do you want the operation to be performed also in the subfolders?"));
+	w = gtk_label_new (msg);
+	g_free (msg);
+	gtk_widget_show (w);
+	gtk_label_set_use_markup (GTK_LABEL (w), TRUE);
+	gtk_label_set_line_wrap (GTK_LABEL (w), TRUE);
+	gtk_misc_set_alignment (GTK_MISC (w), 0, 0.5);
+	gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+
+	hbox = gtk_hbox_new (FALSE, 6);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+
+	/* cancel button */
+	buttons[0].dlg = dlg;
+	buttons[0].response = GTK_RESPONSE_CANCEL;
+	w = gtk_button_new_from_stock ("gtk-cancel");
+	gtk_widget_show (w);
+	gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+	g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (dlg_button_response), &buttons[0]);
+
+	/* no button */
+	buttons[1].dlg = dlg;
+	buttons[1].response = GTK_RESPONSE_NO;
+	w = gtk_button_new_with_mnemonic (_("Only on Current _Folder"));
+	gtk_widget_show (w);
+	gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+	g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (dlg_button_response), &buttons[1]);
+
+	/* yes button */
+	buttons[2].dlg = dlg;
+	buttons[2].response = GTK_RESPONSE_YES;
+	w = gtk_button_new_with_mnemonic (_("On Current Folder and _Subfolders"));
+	gtk_widget_show (w);
+	gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+	g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (dlg_button_response), &buttons[2]);
+
+	response = gtk_dialog_run (GTK_DIALOG (dlg));
+
+	gtk_widget_destroy (dlg);
+
+	return response;
+}
+
 static void
 mar_got_folder (char *uri, CamelFolder *folder, void *data)
 {
@@ -85,7 +178,7 @@ mar_got_folder (char *uri, CamelFolder *
 	}
 
 	if (info && (info->child || info->next)) {
-		response = e_error_run (NULL, "mail:ask-mark-read", NULL);
+		response = ask_action ();
 	} else {
 		mark_all_as_read (folder);
 		return;
Index: mail/ChangeLog
===================================================================
--- mail/ChangeLog	(revision 35281)
+++ mail/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2008-03-28  Milan Crha  <mcrha@redhat.com>
+
+	** Part of fix for bug #514383
+
+	* mail.error.xml: Removed obsolete message "ask-mark-read".
+
 2008-03-27  Matthew Barnes  <mbarnes@redhat.com>
 
 	** Fixes bug #523271
Index: mail/mail.error.xml
===================================================================
--- mail/mail.error.xml	(revision 35281)
+++ mail/mail.error.xml	(working copy)
@@ -368,14 +368,6 @@ You can choose to ignore this folder, ov
     <button stock="gtk-yes" _label="Send Receipt" response="GTK_RESPONSE_YES"/>
   </error>
 
-  <error id="ask-mark-read" type="question" default="GTK_RESPONSE_NO">
-    <_title>Mark all messages as read</_title>
-    <_primary>Mark all messages in this folder and subfolders as read?</_primary>
-    <_secondary xml:space="preserve">Do you want the operation to be performed also in the subfolders?</_secondary>
-    <button stock="gtk-no" _label="Only on _Current Folder" response="GTK_RESPONSE_NO"/>
-    <button stock="gtk-yes" _label="on Current Folder and _Subfolders" response="GTK_RESPONSE_YES"/>
-  </error>
-
   <error id="ask-quick-offline" type="question" default="GTK_RESPONSE_NO">
     <_primary>Synchronize folders locally for offline usage?</_primary>
     <_secondary xml:space="preserve">Do you want to locally synchronize the folders that are marked for offline usage?</_secondary>
Index: e-util/e-error.c
===================================================================
--- e-util/e-error.c	(revision 35281)
+++ e-util/e-error.c	(working copy)
@@ -506,7 +506,7 @@ e_error_newv(GtkWindow *parent, const ch
 
 	w = gtk_image_new_from_stock(type_map[e->type].icon, GTK_ICON_SIZE_DIALOG);
 	gtk_misc_set_alignment((GtkMisc *)w, 0.0, 0.0);
-	gtk_box_pack_start((GtkBox *)hbox, w, TRUE, TRUE, 12);
+	gtk_box_pack_start((GtkBox *)hbox, w, FALSE, FALSE, 12);
 
 	args = g_ptr_array_new();
 	tmp = (char *)arg0;
@@ -560,7 +560,7 @@ e_error_newv(GtkWindow *parent, const ch
 		gtk_box_pack_start((GtkBox *)hbox, scroll, FALSE, FALSE, 0);
 		gtk_window_set_default_size ((GtkWindow *)dialog, 360, 180);
 	} else
-		gtk_box_pack_start((GtkBox *)hbox, w, FALSE, FALSE, 0);
+		gtk_box_pack_start((GtkBox *)hbox, w, TRUE, TRUE, 0);
 
 	gtk_widget_show_all(hbox);
 
Index: e-util/ChangeLog
===================================================================
--- e-util/ChangeLog	(revision 35281)
+++ e-util/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2008-03-28  Milan Crha  <mcrha@redhat.com>
+
+	** Part of fix for bug #514383
+
+	* e-error.c: (e_error_newv): Let text occupy all area.
+
 2008-03-20  Sankar P  <psankar@novell.com>
 
 	* e-plugin.c: (ep_load):
