avmedia/inc/mediacontrol.hxx | 2 +- avmedia/source/framework/mediacontrol.cxx | 12 ++++++------ include/vcl/toolbox.hxx | 2 +- sfx2/source/control/dispatch.cxx | 24 ++++++++++++------------ svtools/source/contnr/imivctl.hxx | 2 +- svtools/source/contnr/imivctl1.cxx | 16 ++++++++-------- svx/source/tbxctrls/grafctrl.cxx | 8 ++++---- vcl/source/window/toolbox.cxx | 4 ++-- vcl/source/window/toolbox2.cxx | 4 ++-- 9 files changed, 37 insertions(+), 37 deletions(-)
New commits: commit 2348cc7996df846fca2c275c2c0d733dbb949be6 Author: Jennifer Liebel <jliebe...@gmail.com> Date: Tue Nov 18 13:07:45 2014 +0000 changed timers to idle Change-Id: I0d2119a297c9a6d9b99676a561ddf4dd654ecaea diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index 099a0fc..4d367a5 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -86,7 +86,7 @@ private: DECL_LINK(implTimeoutHdl, void *); ImageList maImageList; - Timer maTimer; + Idle maIdle; MediaItem maItem; ToolBox maPlayToolBox; Slider maTimeSlider; diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 96235e3..5d64845 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -188,9 +188,9 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl maMinSize.Height() = ( maMinSize.Height() << 1 ) + AVMEDIA_CONTROLOFFSET; } - maTimer.SetTimeout( AVMEDIA_TIMEOUT ); - maTimer.SetTimeoutHdl( LINK( this, MediaControl, implTimeoutHdl ) ); - maTimer.Start(); + maIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); + maIdle.SetIdleHdl( LINK( this, MediaControl, implTimeoutHdl ) ); + maIdle.Start(); } @@ -432,7 +432,7 @@ Image MediaControl::implGetImage( sal_Int32 nImageId ) const IMPL_LINK( MediaControl, implTimeHdl, Slider*, p ) { mbLocked = true; - maTimer.Stop(); + maIdle.Stop(); implUpdateTimeField( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE ); return 0; @@ -447,7 +447,7 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p ) aExecItem.setTime( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE ); execute( aExecItem ); update(); - maTimer.Start(); + maIdle.Start(); mbLocked = false; return 0; @@ -596,7 +596,7 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox*, p ) IMPL_LINK_NOARG(MediaControl, implTimeoutHdl) { update(); - maTimer.Start(); + maIdle.Start(); return 0; } diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index e8161b7..3f2fbc1 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -129,7 +129,7 @@ private: ImplToolBoxPrivateData* mpData; std::vector<ImplToolSize> maFloatSizes; ImageList maImageList; - Timer maTimer; + Idle maIdle; Rectangle maUpperRect; Rectangle maLowerRect; Rectangle maOutDockRect; diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index b471b3e..b465159 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -111,7 +111,7 @@ struct SfxDispatcher_Impl const SfxSlotServer* pCachedServ1; // last called message const SfxSlotServer* pCachedServ2; // penultimate called Message SfxShellStack_Impl aStack; // active functionality - Timer aTimer; // for Flush + Idle aIdle; // for Flush std::deque<SfxToDo_Impl> aToDoStack; // not processed Push/Pop SfxViewFrame* pFrame; // NULL or associated Frame SfxDispatcher* pParent; // AppDispatcher, NULL if possible @@ -339,8 +339,8 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent ) pImp->xPoster = new SfxHintPoster(aGenLink); - pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT); - pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); + pImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + pImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); } SfxDispatcher::SfxDispatcher( SfxDispatcher* pParent ) @@ -381,7 +381,7 @@ SfxDispatcher::~SfxDispatcher() #endif // So that no timer by Reschedule in PlugComm strikes the LeaveRegistrations - pImp->aTimer.Stop(); + pImp->aIdle.Stop(); pImp->xPoster->SetEventHdl( Link() ); // Notify the stack varialbles in Call_Impl @@ -475,14 +475,14 @@ void SfxDispatcher::Pop(SfxShell& rShell, sal_uInt16 nMode) if(!pSfxApp->IsDowning() && !pImp->aToDoStack.empty()) { // No immediate update is requested - pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT); - pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); - pImp->aTimer.Start(); + pImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + pImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); + pImp->aIdle.Start(); } else { // but to do nothing - pImp->aTimer.Stop(); + pImp->aIdle.Stop(); // Bindings may wake up again if(pImp->aToDoStack.empty()) @@ -686,9 +686,9 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI, SfxViewFrame* /* pOld */) if(!pImp->aToDoStack.empty()) { // No immediate update is requested - pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT); - pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); - pImp->aTimer.Start(); + pImp->aIdle.SetPriority(VCL_IDLE_PRIORITY_MEDIUM); + pImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) ); + pImp->aIdle.Start(); } } @@ -1436,7 +1436,7 @@ void SfxDispatcher::FlushImpl() OSL_TRACE("Flushing dispatcher!"); - pImp->aTimer.Stop(); + pImp->aIdle.Stop(); if ( pImp->pParent ) pImp->pParent->Flush(); diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index ed244ad..688516a 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -165,7 +165,7 @@ class SvxIconChoiceCtrl_Impl Rectangle aCurSelectionRect; std::vector<Rectangle*> aSelectedRectList; Idle aEditIdle; // for editing in place - Timer aAutoArrangeTimer; + Idle aAutoArrangeIdle; Timer aDocRectChangedTimer; Timer aVisRectChangedTimer; Idle aCallSelectHdlIdle; diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 84db12b..d61f6a4 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -137,8 +137,8 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( aEditIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); aEditIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,EditTimeoutHdl)); - aAutoArrangeTimer.SetTimeout( 100 ); - aAutoArrangeTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,AutoArrangeHdl)); + aAutoArrangeIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); + aAutoArrangeIdle.SetIdleHdl(LINK(this,SvxIconChoiceCtrl_Impl,AutoArrangeHdl)); aCallSelectHdlIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); aCallSelectHdlIdle.SetIdleHdl( LINK(this,SvxIconChoiceCtrl_Impl,CallSelectHdlHdl)); @@ -583,7 +583,7 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( bool bKeepPredecessors ) Rectangle aCurOutputArea( GetOutputRect() ); if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint ) bUpdateMode = false; - aAutoArrangeTimer.Stop(); + aAutoArrangeIdle.Stop(); nFlags &= ~F_MOVED_ENTRIES; nFlags |= F_ARRANGING; StopEditTimer(); @@ -1901,7 +1901,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const { SvxIconChoiceCtrlEntry* pPrev = FindEntryPredecessor( pEntry, rPos ); SetEntryPredecessor( pEntry, pPrev ); - aAutoArrangeTimer.Start(); + aAutoArrangeIdle.Start(); } ShowCursor( true ); } @@ -2888,7 +2888,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList() IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, AutoArrangeHdl) { - aAutoArrangeTimer.Stop(); + aAutoArrangeIdle.Stop(); Arrange( IsAutoArrange() ); return 0; } @@ -3506,7 +3506,7 @@ void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMod // unwanted overlaps, as these entries aren't taken into account in // Arrange. if( aEntries.size() ) - aAutoArrangeTimer.Start(); + aAutoArrangeIdle.Start(); return; } @@ -3520,7 +3520,7 @@ void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMod } if( aEntries.size() ) - aAutoArrangeTimer.Start(); + aAutoArrangeIdle.Start(); } else if( ePositionMode == IcnViewPositionModeAutoAdjust ) { @@ -3575,7 +3575,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry if( bSetHead ) pHead = pEntry; pEntry->SetFlags( ICNVIEW_FLAG_PRED_SET ); - aAutoArrangeTimer.Start(); + aAutoArrangeIdle.Start(); } SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry, diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 119d42f..b0a0925 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -86,7 +86,7 @@ class ImplGrafMetricField : public MetricField using Window::Update; private: - Timer maTimer; + Idle maIdle; OUString maCommand; Reference< XFrame > mxFrame; @@ -138,8 +138,8 @@ ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString& SetSpinSize( 1 ); } - maTimer.SetTimeout( 100 ); - maTimer.SetTimeoutHdl( LINK( this, ImplGrafMetricField, ImplModifyHdl ) ); + maIdle.SetPriority( VCL_IDLE_PRIORITY_LOW ); + maIdle.SetIdleHdl( LINK( this, ImplGrafMetricField, ImplModifyHdl ) ); } ImplGrafMetricField::~ImplGrafMetricField() @@ -148,7 +148,7 @@ ImplGrafMetricField::~ImplGrafMetricField() void ImplGrafMetricField::Modify() { - maTimer.Start(); + maIdle.Start(); } IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl) diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4bb6d2b..e07ad4b 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1407,8 +1407,8 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) mnKeyModifier = 0; mnActivateCount = 0; - maTimer.SetTimeout( 50 ); - maTimer.SetTimeoutHdl( LINK( this, ToolBox, ImplUpdateHdl ) ); + maIdle.SetPriority( VCL_IDLE_PRIORITY_RESIZE ); + maIdle.SetIdleHdl( LINK( this, ToolBox, ImplUpdateHdl ) ); // set timeout and handler for dropdown items mpData->maDropdownTimer.SetTimeout( 250 ); diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 2fc8c32..938a932 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -366,7 +366,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) { Invalidate( Rectangle( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder-1, mnDY-mnBottomBorder-1 ) ); - maTimer.Stop(); + maIdle.Stop(); } } else @@ -377,7 +377,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) // do we need to redraw? if ( IsReallyVisible() && IsUpdateMode() ) - maTimer.Start(); + maIdle.Start(); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits