[Libreoffice-commits] core.git: Branch 'feature/priorities' - sfx2/source

Tobias Madl tobias.madl.dev at gmail.com
Sun Nov 9 23:56:30 PST 2014


 sfx2/source/appl/newhelp.cxx |   14 +++++++-------
 sfx2/source/appl/newhelp.hxx |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 3a604d5da0c6811cf57ccdb048ec7748f05c02e3
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Mon Nov 10 07:55:35 2014 +0000

    changed timer to idle
    
    Change-Id: Ib04932fe0f9e742e47bdff83748ffc5eb5706d71

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index d38356f..d9bb71d 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1402,9 +1402,9 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
     m_pActiveLB->SetSelectHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectHdl ) );
     nMinWidth = ( m_pActiveLB->GetSizePixel().Width() / 2 );
 
-    aTimer.SetTimeoutHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
-    aTimer.SetTimeout( 200 );
-    aTimer.Start();
+    aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
+    aIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER );
+    aIdle.Start();
 
     Show();
 }
@@ -1458,7 +1458,7 @@ void SfxHelpIndexWindow_Impl::SetActiveFactory()
     DBG_ASSERT( pIPage, "index page not initialized" );
     if ( !bIsInitDone && !m_pActiveLB->GetEntryCount() )
     {
-        aTimer.Stop();
+        aIdle.Stop();
         InitHdl( NULL );
     }
 
@@ -1518,7 +1518,7 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, ActivatePageHdl, TabControl *, pTabCtrl )
 
 IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectHdl)
 {
-    aTimer.Start();
+    aIdle.Start();
 
     return 0;
 }
@@ -1529,8 +1529,8 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl)
     Initialize();
 
     // now use the timer for selection
-    aTimer.SetTimeoutHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) );
-    aTimer.SetTimeout( 1000 );
+    aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) );
+    aIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
 
     return 0;
 }
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index eb303e1..233a317 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -274,7 +274,7 @@ private:
     ListBox*            m_pActiveLB;
     TabControl*         m_pTabCtrl;
 
-    Timer               aTimer;
+    Idle                aIdle;
 
     Link                aSelectFactoryLink;
     Link                aPageDoubleClickLink;


More information about the Libreoffice-commits mailing list