balsa r7871 - in trunk: . libbalsa
- From: PeterB svn gnome org
- To: svn-commits-list gnome org
- Subject: balsa r7871 - in trunk: . libbalsa
- Date: Wed, 27 Feb 2008 19:36:50 +0000 (GMT)
Author: PeterB
Date: Wed Feb 27 19:36:49 2008
New Revision: 7871
URL: http://svn.gnome.org/viewvc/balsa?rev=7871&view=rev
Log:
restore immediate view filtering
Modified:
trunk/ChangeLog
trunk/libbalsa/mailbox.c
trunk/libbalsa/mailbox.h
Modified: trunk/libbalsa/mailbox.c
==============================================================================
--- trunk/libbalsa/mailbox.c (original)
+++ trunk/libbalsa/mailbox.c Wed Feb 27 19:36:49 2008
@@ -2003,19 +2003,24 @@
gboolean update_immediately)
{
gboolean retval = FALSE;
+ gboolean view_is_stale;
libbalsa_lock_mailbox(mailbox);
- if (libbalsa_condition_compare(mailbox->view_filter, cond))
- update_immediately = FALSE;
+ view_is_stale = mailbox->view_filter_pending
+ || !libbalsa_condition_compare(mailbox->view_filter, cond);
libbalsa_condition_unref(mailbox->view_filter);
mailbox->view_filter = libbalsa_condition_ref(cond);
- if (update_immediately) {
- LIBBALSA_MAILBOX_GET_CLASS(mailbox)->update_view_filter(mailbox,
- cond);
- retval = lbm_set_threading(mailbox, mailbox->view->threading_type);
+ if (view_is_stale) {
+ if (update_immediately) {
+ LIBBALSA_MAILBOX_GET_CLASS(mailbox)->update_view_filter(mailbox,
+ cond);
+ retval = lbm_set_threading(mailbox, mailbox->view->threading_type);
+ mailbox->view_filter_pending = FALSE;
+ } else
+ mailbox->view_filter_pending = TRUE;
}
libbalsa_unlock_mailbox(mailbox);
Modified: trunk/libbalsa/mailbox.h
==============================================================================
--- trunk/libbalsa/mailbox.h (original)
+++ trunk/libbalsa/mailbox.h Wed Feb 27 19:36:49 2008
@@ -224,7 +224,12 @@
LibBalsaCondition *view_filter; /* to choose a subset of messages
* to be displayed, e.g., only
* undeleted. */
- LibBalsaCondition *persistent_view_filter;
+ LibBalsaCondition *persistent_view_filter; /* the part of the view
+ * filter that will persist
+ * to the next time the
+ * mailbox is opened */
+ gboolean view_filter_pending; /* a view filter has been set
+ * but the view has not been updated */
/* info fields */
gboolean has_unread_messages;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]