aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog8
-rw-r--r--my-evolution/component-factory.c2
-rw-r--r--my-evolution/e-summary-mail.c47
3 files changed, 20 insertions, 37 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index c253403435..782dcf78ef 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,11 @@
+2001-09-19 Iain Holmes <iain@ximian.com>
+
+ * component-factory.c (create_view): Remove spew.
+
+ * e-summary-mail.c (e_summary_mail_reconfigure): Get mail info if we
+ don't already have it.
+ (new_folder_cb): Only get mail info if the folder is being displayed.
+
2001-09-19 Larry Ewing <lewing@ximian.com>
* e-summary-tasks.c (generate_html): be sure to unref the
diff --git a/my-evolution/component-factory.c b/my-evolution/component-factory.c
index 1287ff0ea0..659d2681d5 100644
--- a/my-evolution/component-factory.c
+++ b/my-evolution/component-factory.c
@@ -47,8 +47,6 @@ create_view (EvolutionShellComponent *shell,
GNOME_Evolution_Shell corba_shell;
BonoboControl *control;
-
- g_print ("folder_type: %s\n", folder_type);
if (g_strcasecmp (folder_type, "Summary") != 0) {
return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
}
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
index 33945e3771..0ed54ad407 100644
--- a/my-evolution/e-summary-mail.c
+++ b/my-evolution/e-summary-mail.c
@@ -48,6 +48,8 @@ typedef struct _ESummaryMailFolder {
int count;
int unread;
+
+ gboolean init;
} ESummaryMailFolder;
const char *
@@ -116,8 +118,6 @@ 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);
}
@@ -176,22 +176,21 @@ new_folder_cb (EvolutionStorageListener *listener,
mail_folder->name = g_strdup (path);
mail_folder->count = -1;
mail_folder->unread = -1;
+ mail_folder->init = FALSE;
g_hash_table_insert (mail->folders, mail_folder->path, mail_folder);
-
- /* Are we supposed to display this folder? */
+
for (p = summary->preferences->display_folders; p; p = p->next) {
char *uri;
uri = g_strconcat ("file://", p->data, NULL);
- if (strcmp (uri, mail_folder->path) == 0) {
+ if (strcmp (uri, folder->physicalUri) == 0) {
mail->shown = g_list_append (mail->shown, mail_folder);
+ e_summary_mail_get_info (mail, mail_folder->path,
+ mail->listener);
}
-
g_free (uri);
}
-
- e_summary_mail_get_info (mail, mail_folder->path, mail->listener);
}
static void
@@ -269,6 +268,7 @@ mail_change_notify (BonoboListener *listener,
folder->count = count->count;
folder->unread = count->unread;
+ folder->init = TRUE;
/* Are we displaying this folder? */
for (p = summary->preferences->display_folders; p; p = p->next) {
@@ -401,29 +401,6 @@ e_summary_mail_init (ESummary *summary,
return;
}
-static void
-maybe_add_to_shown (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- ESummary *summary = user_data;
- ESummaryMailFolder *folder = value;
- ESummaryMail *mail = summary->mail;
- GList *p;
-
- /* Are we supposed to display this folder? */
- for (p = summary->preferences->display_folders; p; p = p->next) {
- char *uri;
-
- uri = g_strconcat ("file://", p->data, NULL);
- if (strcmp (uri, folder->path) == 0) {
- mail->shown = g_list_append (mail->shown, folder);
- }
-
- g_free (uri);
- }
-}
-
void
e_summary_mail_reconfigure (ESummary *summary)
{
@@ -436,10 +413,6 @@ 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;
@@ -448,6 +421,10 @@ e_summary_mail_reconfigure (ESummary *summary)
uri = g_strconcat ("file://", p->data, NULL);
folder = g_hash_table_lookup (mail->folders, uri);
if (folder != NULL) {
+ if (folder->init == FALSE) {
+ e_summary_mail_get_info (mail, folder->path,
+ mail->listener);
+ }
mail->shown = g_list_append (mail->shown, folder);
}