balsa r7835 - in branches/mailbox-gsequence: . libbalsa src
- From: PeterB svn gnome org
- To: svn-commits-list gnome org
- Subject: balsa r7835 - in branches/mailbox-gsequence: . libbalsa src
- Date: Mon, 28 Jan 2008 17:55:29 +0000 (GMT)
Author: PeterB
Date: Mon Jan 28 17:55:29 2008
New Revision: 7835
URL: http://svn.gnome.org/viewvc/balsa?rev=7835&view=rev
Log:
correct hidden messages count
Modified:
branches/mailbox-gsequence/ChangeLog
branches/mailbox-gsequence/libbalsa/mailbox.c
branches/mailbox-gsequence/src/balsa-mblist.c
Modified: branches/mailbox-gsequence/libbalsa/mailbox.c
==============================================================================
--- branches/mailbox-gsequence/libbalsa/mailbox.c (original)
+++ branches/mailbox-gsequence/libbalsa/mailbox.c Mon Jan 28 17:55:29 2008
@@ -705,12 +705,13 @@
guint
libbalsa_mailbox_n_nodes(LibBalsaMailbox * mailbox)
{
- guint n = 0;
-
- libbalsa_mailbox_traverse(mailbox, G_PRE_ORDER,
- lbm_node_count, &n);
-
- return n;
+ if (mailbox->msg_tree) {
+ guint n = 0;
+ libbalsa_mailbox_traverse(mailbox, G_PRE_ORDER,
+ lbm_node_count, &n);
+ return n;
+ } else
+ return libbalsa_mailbox_total_messages(mailbox);
}
static gboolean
Modified: branches/mailbox-gsequence/src/balsa-mblist.c
==============================================================================
--- branches/mailbox-gsequence/src/balsa-mblist.c (original)
+++ branches/mailbox-gsequence/src/balsa-mblist.c Mon Jan 28 17:55:29 2008
@@ -2286,15 +2286,12 @@
{
gint total_messages = libbalsa_mailbox_total_messages(mailbox);
gint unread_messages = mailbox->unread_messages;
- gint hidden_messages;
+ gint hidden_messages =
+ total_messages - libbalsa_mailbox_n_nodes(mailbox);
GString *desc = g_string_new(NULL);
GtkStatusbar *statusbar;
guint context_id;
- hidden_messages =
- mailbox->msg_tree ? total_messages -
- (libbalsa_mailbox_n_nodes(mailbox) - 1) : 0;
-
/* xgettext: this is the first part of the message
* "Shown mailbox: %s with %d messages, %d new, %d hidden". */
g_string_append_printf(desc, _("Shown mailbox: %s "), mailbox->name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]