diff options
author | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-11-13 14:50:26 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-12-09 12:34:57 +0000 |
commit | ea6399b837f1cd4fb28be91b8e311e9378988fc5 (patch) | |
tree | ded5273991f72512d5283962311fb1ba02f5d4be /sfx2 | |
parent | e5f67b2e943366042bed9995327840c5a71eae2a (diff) |
changed timers to idles
Change-Id: Ic0d7730f7880dfe2e83c84e773b8cc420249b269
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlgimpl.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 18da893e5823..fe2fe37ca3bd 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -200,7 +200,7 @@ void FileDialogHelper_Impl::handleFileSelectionChanged( const FilePickerEvent& ) updateVersions(); if ( mbShowPreview ) - maPreviewTimer.Start(); + maPreviewIdle.Start(); } void FileDialogHelper_Impl::handleDirectoryChanged( const FilePickerEvent& ) @@ -983,8 +983,8 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( mbHasPreview = true; // aPreviewTimer - maPreviewTimer.SetTimeout( 500 ); - maPreviewTimer.SetTimeoutHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); + maPreviewIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); + maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); break; case FILEOPEN_PLAY: @@ -1000,8 +1000,8 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( nTemplateDescription = TemplateDescription::FILEOPEN_LINK_PREVIEW; mbHasPreview = true; // aPreviewTimer - maPreviewTimer.SetTimeout( 500 ); - maPreviewTimer.SetTimeoutHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); + maPreviewIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); + maPreviewIdle.SetIdleHdl( LINK( this, FileDialogHelper_Impl, TimeOutHdl_Impl ) ); break; case FILESAVE_AUTOEXTENSION: @@ -1122,7 +1122,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl() if ( mbDeleteMatcher ) delete mpMatcher; - maPreviewTimer.SetTimeoutHdl( Link() ); + maPreviewIdle.SetIdleHdl( Link() ); ::comphelper::disposeComponent( mxFileDlg ); } diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 4d663d2e15d2..e20242102d87 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -64,7 +64,7 @@ namespace sfx2 OUString maSelectFilter; OUString maButtonLabel; - Timer maPreviewTimer; + Idle maPreviewIdle; Graphic maGraphic; const short m_nDialogType; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 8b8e1bf210be..ab9f9900cd6b 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -645,7 +645,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl pBindings ( pB ), pWindow ( pW ), pModule ( NULL ), - pTimer ( NULL ), + pIdle ( NULL ), m_pStyleFamiliesId ( NULL ), pStyleFamilies ( NULL ), pStyleSheetPool ( NULL ), @@ -870,7 +870,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() EndListening(*pStyleSheetPool); pStyleSheetPool = NULL; delete pTreeBox; - delete pTimer; + delete pIdle; if ( m_pDeletionWatcher ) m_pDeletionWatcher->signal(); } @@ -1432,10 +1432,10 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim ) } } bDontUpdate=false; - DELETEZ(pTimer); + DELETEZ(pIdle); } else - pTimer->Start(); + pIdle->Start(); return 0; } @@ -1524,13 +1524,13 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint dynamic_cast<const SfxStyleSheetHint*>(&rHint) || dynamic_cast<const SfxStyleSheetHintExtended*>(&rHint))) { - if(!pTimer) + if(!pIdle) { - pTimer=new Timer; - pTimer->SetTimeout(500); - pTimer->SetTimeoutHdl(LINK(this,SfxCommonTemplateDialog_Impl,TimeOut)); + pIdle=new Idle; + pIdle->SetPriority(VCL_IDLE_PRIORITY_LOWEST); + pIdle->SetIdleHdl(LINK(this,SfxCommonTemplateDialog_Impl,TimeOut)); } - pTimer->Start(); + pIdle->Start(); } } diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 65dfc7e2237e..6779c407a039 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -135,7 +135,7 @@ class SfxNewFileDialog_Impl PushButton* m_pLoadFilePB; VclExpander* m_pMoreBt; - Timer aPrevTimer; + Idle aPrevIdle; OUString aNone; OUString sLoadTemplate; @@ -285,7 +285,7 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, TemplateSelect) // Dialog is not opened return 0; - aPrevTimer.Start(); + aPrevIdle.Start(); return 0; } @@ -431,8 +431,8 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl( m_pRegionLb->SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect)); } - aPrevTimer.SetTimeout( 500 ); - aPrevTimer.SetTimeoutHdl( LINK( this, SfxNewFileDialog_Impl, Update)); + aPrevIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); + aPrevIdle.SetIdleHdl( LINK( this, SfxNewFileDialog_Impl, Update)); m_pRegionLb->SelectEntryPos(0); RegionSelect(m_pRegionLb); diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index b6ca268a6ad6..fa7a26b90964 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -159,7 +159,7 @@ protected: vcl::Window* pWindow; SfxModule* pModule; - Timer* pTimer; + Idle* pIdle; ResId* m_pStyleFamiliesId; SfxStyleFamilies* pStyleFamilies; |