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

Tobias Madl tobias.madl.dev at gmail.com
Fri Nov 7 03:14:29 PST 2014


 sfx2/source/appl/newhelp.cxx |    6 +++---
 sfx2/source/appl/newhelp.hxx |    2 +-
 vcl/source/edit/textdat2.hxx |    2 +-
 vcl/source/edit/textdata.cxx |    5 +++--
 vcl/source/edit/texteng.cxx  |    2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 2b468b1b6b3bde9ac931a19ee30b8783c893fc49
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Fri Nov 7 11:13:37 2014 +0000

    change timers to idles
    
    Change-Id: I224976e75b020d03e4b0d8beb79ad1c1310e8874

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 4ee115d..d38356f 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1875,8 +1875,8 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
     InitOnStartupBox( false );
     aOnStartupCB.SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) );
 
-    aSelectTimer.SetTimeoutHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) );
-    aSelectTimer.SetTimeout( 1000 );
+    aSelectIdle.SetIdleHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) );
+    aSelectIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
 
     char* pEnv = getenv( "help_debug" );
     if ( pEnv )
@@ -2497,7 +2497,7 @@ void SfxHelpTextWindow_Impl::SelectSearchText( const OUString& rSearchText, bool
 {
     aSearchText = rSearchText;
     bIsFullWordSearch = _bIsFullWordSearch;
-    aSelectTimer.Start();
+    aSelectIdle.Start();
 }
 
 
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index a910fd0..eb303e1 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -405,7 +405,7 @@ class SfxHelpTextWindow_Impl : public vcl::Window
 private:
     ToolBox                 aToolBox;
     CheckBox                aOnStartupCB;
-    Timer                   aSelectTimer;
+    Idle                    aSelectIdle;
     Image                   aIndexOnImage;
     Image                   aIndexOffImage;
     OUString                aIndexOnText;
diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx
index b5e2118..820be5e 100644
--- a/vcl/source/edit/textdat2.hxx
+++ b/vcl/source/edit/textdat2.hxx
@@ -261,7 +261,7 @@ public:
     virtual void    DestroyAnchor() SAL_OVERRIDE;
 };
 
-class IdleFormatter : public Timer
+class IdleFormatter : public Idle
 {
 private:
     TextView*   mpView;
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index e6bebd2..dbdfbee 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -223,6 +223,7 @@ IdleFormatter::IdleFormatter()
 {
     mpView = 0;
     mnRestarts = 0;
+    SetPriority(VCL_IDLE_PRIORITY_HIGH);
 }
 
 IdleFormatter::~IdleFormatter()
@@ -240,7 +241,7 @@ void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts )
     if ( mnRestarts > nMaxRestarts )
     {
         mnRestarts = 0;
-        ((Link&)GetTimeoutHdl()).Call( this );
+        ((Link&)GetIdleHdl()).Call( this );
     }
     else
     {
@@ -254,7 +255,7 @@ void IdleFormatter::ForceTimeout()
     {
         Stop();
         mnRestarts = 0;
-        ((Link&)GetTimeoutHdl()).Call( this );
+        ((Link&)GetIdleHdl()).Call( this );
     }
 }
 
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 5be733f..629c8a7 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -92,7 +92,7 @@ TextEngine::TextEngine()
     mpLocaleDataWrapper = NULL;
 
     mpIdleFormatter = new IdleFormatter;
-    mpIdleFormatter->SetTimeoutHdl( LINK( this, TextEngine, IdleFormatHdl ) );
+    mpIdleFormatter->SetIdleHdl( LINK( this, TextEngine, IdleFormatHdl ) );
 
     mpRefDev = new VirtualDevice;
 


More information about the Libreoffice-commits mailing list