diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-12-12 07:07:22 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-12-12 07:07:22 +0800 |
commit | d91cf0898122e1bac8742665b439fd98ceaa015f (patch) | |
tree | 69ecba04eb25889d89e0c2f5ef85824a288bc4f9 /mail/folder-browser.c | |
parent | 3e70bbe666c1ea68383315c0659aee3757f18cd3 (diff) | |
download | gsoc2013-evolution-d91cf0898122e1bac8742665b439fd98ceaa015f.tar.gz gsoc2013-evolution-d91cf0898122e1bac8742665b439fd98ceaa015f.tar.zst gsoc2013-evolution-d91cf0898122e1bac8742665b439fd98ceaa015f.zip |
Fixed for mail_content_loaded's new signature.
2001-12-11 Jon Trowbridge <trow@ximian.com>
* mail-identify.c (mail_identify_mime_part): Fixed for
mail_content_loaded's new signature.
* mail-format.c (attachment_header): Don't convert URLs, etc. if
we are printing.
(write_address): Don't convert addresses to mailto: links if we
are printing.
(write_one_text_plain_chunk): Add a printing flag, that we pass
along to mail_text_write.
(handle_text_plain): Pass our printing flag to
write_one_text_plain_chunk.
(mail_get_message_rfc822): Don't unneccesarily convert URLs.
(mail_content_loaded): Add a GtkHTML parameter.
* mail-display.c (mail_display_initialize_gtkhtml): Added. Breaks
all of the signal hookups out of mail_display_new.
(mail_display_new): Call mail_display_initialize_gtkhtml.
(mail_text_write): Don't convert URLs, etc., if we are printing.
Lots of other changes to pass around GtkHTML/GtkHTMLStream objects.
* mail-callbacks.c (do_mail_print): Call
mail_display_initialize_gtkhtml on our GtkHTML object.
* folder-browser.c (update_status_bar): Make the status bar more
useful when you have a large number of hidden messages.
svn path=/trunk/; revision=14997
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r-- | mail/folder-browser.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 158ce0cc0e..8375582553 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -718,7 +718,7 @@ static void update_status_bar(FolderBrowser *fb) { CORBA_Environment ev; - int tmp; + int tmp, total; GString *work; extern CamelFolder *outbox_folder, *sent_folder; @@ -727,44 +727,49 @@ update_status_bar(FolderBrowser *fb) || fb->shell_view == CORBA_OBJECT_NIL) return; - work = g_string_new(""); - g_string_sprintfa(work, _("%d new"), camel_folder_get_unread_message_count(fb->folder)); - tmp = message_list_hidden(fb->message_list); - if (tmp) { - g_string_append(work, _(", ")); - g_string_sprintfa(work, _("%d hidden"), tmp); - } - tmp = e_selection_model_selected_count(e_tree_get_selection_model(fb->message_list->tree)); - if (tmp) { - g_string_append(work, _(", ")); - g_string_sprintfa(work, _("%d selected"), tmp); - } if (!fb->message_list->hidedeleted || !camel_folder_has_summary_capability(fb->folder)) { - tmp = camel_folder_get_message_count(fb->folder); + total = camel_folder_get_message_count(fb->folder); } else { GPtrArray *sum = camel_folder_get_summary(fb->folder); int i; if (sum) { - tmp = 0; + total = 0; for (i=0;i<sum->len;i++) { CamelMessageInfo *info = sum->pdata[i]; if ((info->flags & CAMEL_MESSAGE_DELETED) == 0) - tmp++; + total++; } camel_folder_free_summary(fb->folder, sum); } else { - tmp = camel_folder_get_message_count(fb->folder); + total = camel_folder_get_message_count(fb->folder); } } + + work = g_string_new(""); + g_string_sprintfa(work, _("%d new"), camel_folder_get_unread_message_count(fb->folder)); + tmp = message_list_hidden(fb->message_list); + if (0 < tmp && tmp < total) { + g_string_append(work, _(", ")); + if (tmp < total / 2) + g_string_sprintfa(work, _("%d hidden"), tmp); + else + g_string_sprintfa(work, _("%d visible"), total - tmp); + } + tmp = e_selection_model_selected_count(e_tree_get_selection_model(fb->message_list->tree)); + if (tmp) { + g_string_append(work, _(", ")); + g_string_sprintfa(work, _("%d selected"), tmp); + } g_string_append(work, _(", ")); + if (fb->folder == outbox_folder) - g_string_sprintfa(work, _("%d unsent"), tmp); + g_string_sprintfa(work, _("%d unsent"), total); else if (fb->folder == sent_folder) - g_string_sprintfa(work, _("%d sent"), tmp); + g_string_sprintfa(work, _("%d sent"), total); else - g_string_sprintfa(work, _("%d total"), tmp); + g_string_sprintfa(work, _("%d total"), total); CORBA_exception_init(&ev); GNOME_Evolution_ShellView_setFolderBarLabel(fb->shell_view, work->str, &ev); |