aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-mail.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-09-19 08:11:58 +0800
committerIain Holmes <iain@src.gnome.org>2001-09-19 08:11:58 +0800
commitb8fc17e8f9af33733e57aeeb5436bbd8c2c6076d (patch)
treee3701b9fd937f621f4aecd2194016de78dc14a6a /my-evolution/e-summary-mail.c
parent49dc2eda6d496eff3de0d3c2eddaa5fc74c625c0 (diff)
downloadgsoc2013-evolution-b8fc17e8f9af33733e57aeeb5436bbd8c2c6076d.tar
gsoc2013-evolution-b8fc17e8f9af33733e57aeeb5436bbd8c2c6076d.tar.gz
gsoc2013-evolution-b8fc17e8f9af33733e57aeeb5436bbd8c2c6076d.tar.bz2
gsoc2013-evolution-b8fc17e8f9af33733e57aeeb5436bbd8c2c6076d.tar.lz
gsoc2013-evolution-b8fc17e8f9af33733e57aeeb5436bbd8c2c6076d.tar.xz
gsoc2013-evolution-b8fc17e8f9af33733e57aeeb5436bbd8c2c6076d.tar.zst
gsoc2013-evolution-b8fc17e8f9af33733e57aeeb5436bbd8c2c6076d.zip
Keep the mail folders in the correct order
svn path=/trunk/; revision=12963
Diffstat (limited to 'my-evolution/e-summary-mail.c')
-rw-r--r--my-evolution/e-summary-mail.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
index 2d3c2ef0e2..33945e3771 100644
--- a/my-evolution/e-summary-mail.c
+++ b/my-evolution/e-summary-mail.c
@@ -116,6 +116,8 @@ e_summary_mail_generate_html (ESummary *summary)
g_string_append (string, "</a></b></dt><dd><table numcols=\"2\" width=\"100%\">");
for (p = mail->shown; p; p = p->next) {
+ ESummaryMailFolder *f = p->data;
+
folder_gen_html (summary, p->data, string);
}
@@ -183,7 +185,7 @@ new_folder_cb (EvolutionStorageListener *listener,
uri = g_strconcat ("file://", p->data, NULL);
if (strcmp (uri, mail_folder->path) == 0) {
- mail->shown = g_list_prepend (mail->shown, mail_folder);
+ mail->shown = g_list_append (mail->shown, mail_folder);
}
g_free (uri);
@@ -426,7 +428,7 @@ void
e_summary_mail_reconfigure (ESummary *summary)
{
ESummaryMail *mail;
- GList *old;
+ GList *old, *p;
g_return_if_fail (summary != NULL);
g_return_if_fail (IS_E_SUMMARY (summary));
@@ -434,12 +436,28 @@ e_summary_mail_reconfigure (ESummary *summary)
mail = summary->mail;
old = mail->shown;
mail->shown = NULL;
+#if 0
g_hash_table_foreach (mail->folders, maybe_add_to_shown, summary);
e_summary_mail_generate_html (summary);
+#endif
+
+ for (p = summary->preferences->display_folders; p; p = p->next) {
+ ESummaryMailFolder *folder;
+ char *uri;
+
+ uri = g_strconcat ("file://", p->data, NULL);
+ folder = g_hash_table_lookup (mail->folders, uri);
+ if (folder != NULL) {
+ mail->shown = g_list_append (mail->shown, folder);
+ }
+
+ g_free (uri);
+ }
/* Free the old list */
g_list_free (old);
+ e_summary_mail_generate_html (summary);
e_summary_draw (summary);
}