sc/source/ui/inc/tphfedit.hxx | 2 +- sc/source/ui/pagedlg/tphfedit.cxx | 16 ++++++++-------- sw/source/core/doc/DocumentTimerManager.cxx | 16 ++++++++-------- sw/source/core/inc/DocumentTimerManager.hxx | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-)
New commits: commit c3b749e186fda9fd4ff98994f967d90c4d0e77ab Author: Tobias Madl <tobias.madl....@gmail.com> Date: Tue Nov 11 08:21:19 2014 +0000 changed timers to Idle Change-Id: Ic7e795702618d1c623a2deeba1a86f804a249508 diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx index d304ebd..500e62d 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -100,7 +100,7 @@ class SC_DLLPUBLIC ScExtIButton : public ImageButton { private: - Timer aTimer; + Idle aIdle; PopupMenu* pPopupMenu; Link aMLink; sal_uInt16 nSelected; diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 33db5b3..3017413 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -331,7 +331,7 @@ ScExtIButton::ScExtIButton(vcl::Window* pParent, WinBits nBits ) : ImageButton(pParent,nBits), pPopupMenu(NULL) { nSelected=0; - aTimer.SetTimeout(600); + aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST); SetDropDown(PUSHBUTTON_DROPDOWN_TOOLBOX); } @@ -347,10 +347,10 @@ void ScExtIButton::SetPopupMenu(PopupMenu* pPopUp) void ScExtIButton::MouseButtonDown( const MouseEvent& rMEvt ) { - if(!aTimer.IsActive()) + if(!aIdle.IsActive()) { - aTimer.Start(); - aTimer.SetTimeoutHdl(LINK( this, ScExtIButton, TimerHdl)); + aIdle.SetIdleHdl(LINK( this, ScExtIButton, TimerHdl)); + aIdle.Start(); } ImageButton::MouseButtonDown(rMEvt ); @@ -358,15 +358,15 @@ void ScExtIButton::MouseButtonDown( const MouseEvent& rMEvt ) void ScExtIButton::MouseButtonUp( const MouseEvent& rMEvt) { - aTimer.Stop(); - aTimer.SetTimeoutHdl(Link()); + aIdle.Stop(); + aIdle.SetIdleHdl(Link()); ImageButton::MouseButtonUp(rMEvt ); } void ScExtIButton::Click() { - aTimer.Stop(); - aTimer.SetTimeoutHdl(Link()); + aIdle.Stop(); + aIdle.SetIdleHdl(Link()); ImageButton::Click(); } diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx index 180b50b..6ee6e85 100644 --- a/sw/source/core/doc/DocumentTimerManager.cxx +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -42,39 +42,39 @@ DocumentTimerManager::DocumentTimerManager( SwDoc& i_rSwdoc ) : m_rSwdoc( i_rSwd mbStartIdleTimer( false ), mIdleBlockCount( 0 ) { - maIdleTimer.SetTimeout( 600 ); - maIdleTimer.SetTimeoutHdl( LINK( this, DocumentTimerManager, DoIdleJobs) ); + maIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); + maIdle.SetIdleHdl( LINK( this, DocumentTimerManager, DoIdleJobs) ); } void DocumentTimerManager::StartIdling() { mbStartIdleTimer = true; if( !mIdleBlockCount ) - maIdleTimer.Start(); + maIdle.Start(); } void DocumentTimerManager::StopIdling() { mbStartIdleTimer = false; - maIdleTimer.Stop(); + maIdle.Stop(); } void DocumentTimerManager::BlockIdling() { - maIdleTimer.Stop(); + maIdle.Stop(); ++mIdleBlockCount; } void DocumentTimerManager::UnblockIdling() { --mIdleBlockCount; - if( !mIdleBlockCount && mbStartIdleTimer && !maIdleTimer.IsActive() ) - maIdleTimer.Start(); + if( !mIdleBlockCount && mbStartIdleTimer && !maIdle.IsActive() ) + maIdle.Start(); } void DocumentTimerManager::StartBackgroundJobs() { // Trigger DoIdleJobs(), asynchronously. - maIdleTimer.Start(); + maIdle.Start(); } IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer ) diff --git a/sw/source/core/inc/DocumentTimerManager.hxx b/sw/source/core/inc/DocumentTimerManager.hxx index 5becf1b..7aaea4c 100644 --- a/sw/source/core/inc/DocumentTimerManager.hxx +++ b/sw/source/core/inc/DocumentTimerManager.hxx @@ -60,7 +60,7 @@ private: bool mbStartIdleTimer; //< idle timer mode start/stop sal_Int32 mIdleBlockCount; - Timer maIdleTimer; + Idle maIdle; }; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits