diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-09-20 05:48:50 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-09-20 05:48:50 +0800 |
commit | 00e47f55dd7abd2f5e6723e78d71211abebe2cd2 (patch) | |
tree | 8982132aa0aff49b1e42f0a5ab52a99d5ff0c703 | |
parent | 61f61e3ecd154d3aefc0f1ee227ec6ae0ed6e39e (diff) | |
download | gsoc2013-evolution-00e47f55dd7abd2f5e6723e78d71211abebe2cd2.tar gsoc2013-evolution-00e47f55dd7abd2f5e6723e78d71211abebe2cd2.tar.gz gsoc2013-evolution-00e47f55dd7abd2f5e6723e78d71211abebe2cd2.tar.bz2 gsoc2013-evolution-00e47f55dd7abd2f5e6723e78d71211abebe2cd2.tar.lz gsoc2013-evolution-00e47f55dd7abd2f5e6723e78d71211abebe2cd2.tar.xz gsoc2013-evolution-00e47f55dd7abd2f5e6723e78d71211abebe2cd2.tar.zst gsoc2013-evolution-00e47f55dd7abd2f5e6723e78d71211abebe2cd2.zip |
Spewage removal Only open folders when they are needed.
Spewage removal
Only open folders when they are needed.
svn path=/trunk/; revision=12990
-rw-r--r-- | my-evolution/ChangeLog | 8 | ||||
-rw-r--r-- | my-evolution/component-factory.c | 2 | ||||
-rw-r--r-- | my-evolution/e-summary-mail.c | 47 |
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); } |