[1025] in BarnOwl Developers
[D-O-H] r1010 - branches/barnowl_sqlite/owl
daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:12:15 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Wed, 2 Apr 2008 13:26:23 -0400 (EDT)
Author: nelhage
Date: 2008-04-02 13:26:23 -0400 (Wed, 02 Apr 2008)
New Revision: 1010
Modified:
branches/barnowl_sqlite/owl/functions.c
Log:
Make changefilter deal with the fact that initializing a new iterator
invalidates the view.
Modified: branches/barnowl_sqlite/owl/functions.c
===================================================================
--- branches/barnowl_sqlite/owl/functions.c 2008-04-02 17:26:20 UTC (rev 1009)
+++ branches/barnowl_sqlite/owl/functions.c 2008-04-02 17:26:23 UTC (rev 1010)
@@ -2329,7 +2329,7 @@
{
owl_view *v;
owl_filter *f;
- int curid=-1;
+ int curid=-1, topid;
owl_view_iterator *it;
owl_message *curm=NULL;
@@ -2351,6 +2351,8 @@
return;
}
+ topid = owl_message_get_id(owl_view_iterator_get_message(owl_global_get_topmsg(&g)));
+
owl_view_new_filter(v, filtname);
/* Figure out what to set the current message to.
@@ -2364,6 +2366,8 @@
owl_view_iterator_init_id(it, v, curid);
owl_global_set_curmsg(&g, it);
+ owl_view_iterator_init_id(owl_global_get_topmsg(&g), v, topid);
+
owl_function_calculate_topmsg(OWL_DIRECTION_DOWNWARDS);
owl_mainwin_redisplay(owl_global_get_mainwin(&g));
owl_global_set_direction_downwards(&g);