]> git.lyx.org Git - lyx.git/commitdiff
Two little things:
authorAngus Leeming <leeming@lyx.org>
Thu, 14 Mar 2002 18:01:51 +0000 (18:01 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 14 Mar 2002 18:01:51 +0000 (18:01 +0000)
* Use Lars' preferred idiom for a for-loop in the graphics cache;
* Turn the forked call controller's timer off when their are no longer any
child processes running.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3755 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/GraphicsCache.C
src/support/ChangeLog
src/support/forkedcontr.C

index 199c24fb371cd20efd19c129d5e28d0bec9cde9c..072fd2e914dad34931850160bd2a4d2ec3c7f7c2 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
+
 2002-03-11  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * GraphicsConverter.[Ch] (converted): make first arg const ref.
index b478331033086f5b48e82136686ce20d0e76b293..0c86a59413f9edc619ef021d185afe72e9e07e9c 100644 (file)
@@ -141,8 +141,9 @@ void GCache::changeDisplay(bool changed_background)
 GCache::CacheType::iterator
 GCache::find(InsetGraphics const & inset)
 {
-       CacheType::iterator it = cache->begin();
-       for (; it != cache->end(); ++it) {
+       CacheType::iterator it  = cache->begin();
+       CacheType::iterator end = cache->end();
+       for (; it != end; ++it) {
                if (it->second->referencedBy(inset))
                        return it;
        }
@@ -154,8 +155,9 @@ GCache::find(InsetGraphics const & inset)
 GCache::CacheType::const_iterator
 GCache::find(InsetGraphics const & inset) const
 {
-       CacheType::const_iterator it = cache->begin();
-       for (; it != cache->end(); ++it) {
+       CacheType::const_iterator it  = cache->begin();
+       CacheType::const_iterator end = cache->end();
+       for (; it != end; ++it) {
                if (it->second->referencedBy(inset))
                        return it;
        }
index 9876e26a6c2698e5bab74e0fd8f9a0df27743b45..63350324add19ec16d549fee3e188321ed7c86dd 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * forkedcontr.C: turn the timer off when their are no longer any
+       child processes running.
+
 2002-03-11  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * forkedcall.h: docy fix
index 13b397eb8887c5881fac7a27c0b70f38f62919bf..11cc31b4f1edd6e4d0c19d8f647065fe63d7a4b6 100644 (file)
@@ -45,7 +45,7 @@ ForkedcallsController & ForkedcallsController::get()
 
 ForkedcallsController::ForkedcallsController()
 {
-       timeout_ = new Timeout(100, Timeout::CONTINUOUS);
+       timeout_ = new Timeout(100, Timeout::ONETIME);
        
        timeout_->timeout
                .connect(SigC::slot(this, &ForkedcallsController::timer));
@@ -143,8 +143,8 @@ void ForkedcallsController::timer()
                }
        }
 
-       if (forkedCalls.empty()) {
-               timeout_->stop();
+       if (!forkedCalls.empty()) {
+               timeout_->start();
        }
 
        if (start_size != forkedCalls.size())