[Libreoffice-commits] core.git: Branch 'feature/priorities' - cui/source extensions/source sw/source
Tobias Madl
tobias.madl.dev at gmail.com
Fri Nov 14 07:34:01 PST 2014
cui/source/dialogs/cuigaldlg.cxx | 12 ++++++------
cui/source/dialogs/thesdlg.cxx | 8 ++++----
cui/source/inc/cuigaldlg.hxx | 2 +-
cui/source/inc/thesdlg.hxx | 2 +-
cui/source/tabpages/backgrnd.cxx | 26 +++++++++++++-------------
cui/source/tabpages/chardlg.cxx | 8 ++++----
extensions/source/bibliography/bibcont.cxx | 6 +++---
extensions/source/bibliography/bibcont.hxx | 2 +-
extensions/source/bibliography/toolbar.cxx | 6 +++---
extensions/source/bibliography/toolbar.hxx | 2 +-
extensions/source/update/ui/updatecheckui.cxx | 12 ++++++------
sw/source/uibase/docvw/edtwin.cxx | 8 ++++----
sw/source/uibase/inc/edtwin.hxx | 2 +-
13 files changed, 48 insertions(+), 48 deletions(-)
New commits:
commit 5ee62de1e4fa55a45f49bbb0cfe81dd07111ba51
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date: Fri Nov 14 15:31:13 2014 +0000
changed timers to idles
Change-Id: I223026ce7676a3f8fcda7eb33326cd4ee949c6f0
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index e06c973..ddb379a 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -435,7 +435,7 @@ void TakeProgress::StartExecuteModal( const Link& rEndDialogHdl )
ActualizeProgress::ActualizeProgress(vcl::Window* pWindow, GalleryTheme* pThm)
: ModalDialog(pWindow, "GalleryUpdateProgress",
"cui/ui/galleryupdateprogress.ui")
- , pTimer(NULL)
+ , pIdle(NULL)
, pTheme(pThm)
{
get(m_pFtActualizeFile, "file");
@@ -447,13 +447,13 @@ short ActualizeProgress::Execute()
{
short nRet;
- pTimer = new Timer;
+ pIdle = new Idle;
- if ( pTimer )
+ if ( pIdle )
{
- pTimer->SetTimeoutHdl( LINK( this, ActualizeProgress, TimeoutHdl ) );
- pTimer->SetTimeout( 500 );
- pTimer->Start();
+ pIdle->SetIdleHdl( LINK( this, ActualizeProgress, TimeoutHdl ) );
+ pIdle->SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+ pIdle->Start();
}
nRet = ModalDialog::Execute();
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 03f587b..79c4d9e 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -60,8 +60,8 @@ LookUpComboBox::LookUpComboBox(vcl::Window *pParent)
{
EnableAutoSize(true);
- m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) );
- m_aModifyTimer.SetTimeout( 500 );
+ m_aModifyIdle.SetIdleHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) );
+ m_aModifyIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
EnableAutocomplete( false );
}
@@ -82,13 +82,13 @@ LookUpComboBox::~LookUpComboBox()
void LookUpComboBox::Modify()
{
- m_aModifyTimer.Start();
+ m_aModifyIdle.Start();
}
IMPL_LINK( LookUpComboBox, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ )
{
m_pDialog->LookUp( GetText() );
- m_aModifyTimer.Stop();
+ m_aModifyIdle.Stop();
return 0;
}
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 83f234f..ed98621 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -150,7 +150,7 @@ class ActualizeProgress : public ModalDialog
private:
FixedText* m_pFtActualizeFile;
CancelButton* m_pBtnCancel;
- Timer* pTimer;
+ Idle* pIdle;
GalleryTheme* pTheme;
GalleryProgress aStatusProgress;
diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx
index 95e712c..729fb8f 100644
--- a/cui/source/inc/thesdlg.hxx
+++ b/cui/source/inc/thesdlg.hxx
@@ -33,7 +33,7 @@ class SvxThesaurusDialog;
class LookUpComboBox : public ComboBox
{
- Timer m_aModifyTimer;
+ Idle m_aModifyIdle;
Selection m_aSelection;
SvxThesaurusDialog* m_pDialog;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 8cb9a4a..03fc1a7 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -106,11 +106,11 @@ struct SvxBackgroundPara_Impl
struct SvxBackgroundPage_Impl
{
- Timer* pLoadTimer;
+ Idle* pLoadIdle;
bool bIsImportDlgInExecute;
SvxBackgroundPage_Impl()
- : pLoadTimer(NULL)
+ : pLoadIdle(NULL)
, bIsImportDlgInExecute(false)
{}
};
@@ -421,7 +421,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
SvxBackgroundTabPage::~SvxBackgroundTabPage()
{
- delete pPageImpl->pLoadTimer;
+ delete pPageImpl->pLoadIdle;
delete pPageImpl;
delete pImportDlg;
@@ -719,10 +719,10 @@ void SvxBackgroundTabPage::FillUserData()
bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
- if ( pPageImpl->pLoadTimer && pPageImpl->pLoadTimer->IsActive() )
+ if ( pPageImpl->pLoadIdle && pPageImpl->pLoadIdle->IsActive() )
{
- pPageImpl->pLoadTimer->Stop();
- LoadTimerHdl_Impl( pPageImpl->pLoadTimer );
+ pPageImpl->pLoadIdle->Stop();
+ LoadTimerHdl_Impl( pPageImpl->pLoadIdle );
}
// os: Such a nonsense! One will always find such an item somewhere,
// but it must be existing in the rSet!
@@ -1091,9 +1091,9 @@ void SvxBackgroundTabPage::ShowSelector()
m_pBtnPosition->SetClickHdl( HDL(RadioClickHdl_Impl) );
// delayed loading via timer (because of UI-Update)
- pPageImpl->pLoadTimer = new Timer;
- pPageImpl->pLoadTimer->SetTimeout( 500 );
- pPageImpl->pLoadTimer->SetTimeoutHdl(
+ pPageImpl->pLoadIdle = new Idle;
+ pPageImpl->pLoadIdle->SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+ pPageImpl->pLoadIdle->SetIdleHdl(
LINK( this, SvxBackgroundTabPage, LoadTimerHdl_Impl ) );
bAllowShowSelector = false;
@@ -1419,7 +1419,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl)
*/
{
- if ( pPageImpl->pLoadTimer->IsActive() )
+ if ( pPageImpl->pLoadIdle->IsActive() )
return 0;
bool bHtml = 0 != ( nHtmlMode & HTMLMODE_ON );
@@ -1443,7 +1443,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl)
if ( !m_pBtnLink->IsChecked() && !m_pBtnPreview->IsChecked() )
m_pBtnPreview->Check( true );
// timer-delayed loading of the graphic
- pPageImpl->pLoadTimer->Start();
+ pPageImpl->pLoadIdle->Start();
}
else
DELETEZ( pImportDlg );
@@ -1462,9 +1462,9 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer )
*/
{
- if ( pTimer == pPageImpl->pLoadTimer )
+ if ( pTimer == pPageImpl->pLoadIdle )
{
- pPageImpl->pLoadTimer->Stop();
+ pPageImpl->pLoadIdle->Stop();
if ( pImportDlg )
{
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 3ca9967..cf30b06 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -235,7 +235,7 @@ void SvxCharBasePage::SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp
struct SvxCharNamePage_Impl
{
- Timer m_aUpdateTimer;
+ Idle m_aUpdateIdle;
OUString m_aNoStyleText;
const FontList* m_pFontList;
sal_Int32 m_nExtraEntryPos;
@@ -250,7 +250,7 @@ struct SvxCharNamePage_Impl
m_bInSearchMode ( false )
{
- m_aUpdateTimer.SetTimeout( 350 );
+ m_aUpdateIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
}
~SvxCharNamePage_Impl()
@@ -398,7 +398,7 @@ void SvxCharNamePage::Initialize()
m_pCTLFontSizeLB->SetModifyHdl( aLink );
m_pCTLFontLanguageLB->SetSelectHdl( aLink );
- m_pImpl->m_aUpdateTimer.SetTimeoutHdl( LINK( this, SvxCharNamePage, UpdateHdl_Impl ) );
+ m_pImpl->m_aUpdateIdle.SetIdleHdl( LINK( this, SvxCharNamePage, UpdateHdl_Impl ) );
}
@@ -1150,7 +1150,7 @@ IMPL_LINK_NOARG(SvxCharNamePage, UpdateHdl_Impl)
IMPL_LINK( SvxCharNamePage, FontModifyHdl_Impl, void*, pNameBox )
{
- m_pImpl->m_aUpdateTimer.Start();
+ m_pImpl->m_aUpdateIdle.Start();
if ( m_pWestFontNameLB == pNameBox || m_pEastFontNameLB == pNameBox || m_pCTLFontNameLB == pNameBox )
{
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
index c7787c4..56ed58e 100644
--- a/extensions/source/bibliography/bibcont.cxx
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -126,8 +126,8 @@ BibBookContainer::BibBookContainer(vcl::Window* pParent, WinBits nStyle):
pBottomWin(NULL)
{
pBibMod = OpenBibModul();
- aTimer.SetTimeoutHdl(LINK( this, BibBookContainer, SplitHdl));
- aTimer.SetTimeout(400);
+ aIdle.SetIdleHdl(LINK( this, BibBookContainer, SplitHdl));
+ aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
}
BibBookContainer::~BibBookContainer()
@@ -156,7 +156,7 @@ BibBookContainer::~BibBookContainer()
void BibBookContainer::Split()
{
- aTimer.Start();
+ aIdle.Start();
}
IMPL_LINK( BibBookContainer, SplitHdl, Timer*,/*pT*/)
{
diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx
index 7b2dacc..4c9e487 100644
--- a/extensions/source/bibliography/bibcont.hxx
+++ b/extensions/source/bibliography/bibcont.hxx
@@ -71,7 +71,7 @@ class BibBookContainer: public BibSplitWindow
BibWindowContainer* pTopWin;
BibWindowContainer* pBottomWin;
HdlBibModul pBibMod;
- Timer aTimer;
+ Idle aIdle;
DECL_LINK( SplitHdl, Timer*);
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index d4f433e..12010c8 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -206,8 +206,8 @@ BibToolBar::BibToolBar(vcl::Window* pParent, Link aLink, WinBits nStyle):
SvtMiscOptions().AddListenerLink( LINK( this, BibToolBar, OptionsChanged_Impl ) );
Application::AddEventListener( LINK( this, BibToolBar, SettingsChanged_Impl ) );
- aTimer.SetTimeoutHdl(LINK( this, BibToolBar, SendSelHdl));
- aTimer.SetTimeout(400);
+ aIdle.SetIdleHdl(LINK( this, BibToolBar, SendSelHdl));
+ aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
SetDropdownClickHdl( LINK( this, BibToolBar, MenuHdl));
@@ -453,7 +453,7 @@ bool BibToolBar::PreNotify( NotifyEvent& rNEvt )
IMPL_LINK( BibToolBar, SelHdl, ListBox*, /*pLb*/ )
{
- aTimer.Start();
+ aIdle.Start();
return 0;
}
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index a1e7886..177fc0b 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -110,7 +110,7 @@ class BibToolBar: public ToolBox
BibToolBarListenerArr aListenerArr;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xController;
- Timer aTimer;
+ Idle aIdle;
ImageList aImgLst;
ImageList aImgLstHC;
ImageList aBigImgLst;
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 15209ce..cccb034 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -132,7 +132,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper3
MenuBar* mpIconMBar;
ResMgr* mpUpdResMgr;
ResMgr* mpSfxResMgr;
- Timer maWaitTimer;
+ Idle maWaitIdle;
Timer maTimeoutTimer;
Link maWindowEventHdl;
Link maApplicationEventHdl;
@@ -212,8 +212,8 @@ UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xCont
maBubbleImage = GetBubbleImage( maBubbleImageURL );
- maWaitTimer.SetTimeout( 400 );
- maWaitTimer.SetTimeoutHdl( LINK( this, UpdateCheckUI, WaitTimeOutHdl ) );
+ maWaitIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+ maWaitIdle.SetIdleHdl( LINK( this, UpdateCheckUI, WaitTimeOutHdl ) );
maTimeoutTimer.SetTimeout( 10000 );
maTimeoutTimer.SetTimeoutHdl( LINK( this, UpdateCheckUI, TimeOutHdl ) );
@@ -551,7 +551,7 @@ void UpdateCheckUI::RemoveBubbleWindow( bool bRemoveIcon )
{
SolarMutexGuard aGuard;
- maWaitTimer.Stop();
+ maWaitIdle.Stop();
maTimeoutTimer.Stop();
if ( mpBubbleWin )
@@ -584,7 +584,7 @@ IMPL_LINK_NOARG(UpdateCheckUI, ClickHdl)
{
SolarMutexGuard aGuard;
- maWaitTimer.Stop();
+ maWaitIdle.Stop();
if ( mpBubbleWin )
mpBubbleWin->Show( false );
@@ -606,7 +606,7 @@ IMPL_LINK_NOARG(UpdateCheckUI, ClickHdl)
IMPL_LINK( UpdateCheckUI, HighlightHdl, MenuBar::MenuBarButtonCallbackArg*, pData )
{
if ( pData->bHighlight )
- maWaitTimer.Start();
+ maWaitIdle.Start();
else
RemoveBubbleWindow( false );
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index a090937..3aa5bc1 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4774,12 +4774,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
m_pApplyTempl->bUndo = true;
bCallBase = false;
- m_aTemplateTimer.Stop();
+ m_aTemplateIdle.Stop();
}
else if(rMEvt.GetClicks() == 1)
{
// no selection -> so turn off watering can
- m_aTemplateTimer.Start();
+ m_aTemplateIdle.Start();
}
}
}
@@ -4999,8 +4999,8 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
// TemplatePointer for colors should be resetted without
// selection after single click
- m_aTemplateTimer.SetTimeout(400);
- m_aTemplateTimer.SetTimeoutHdl(LINK(this, SwEditWin, TemplateTimerHdl));
+ m_aTemplateIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+ m_aTemplateIdle.SetIdleHdl(LINK(this, SwEditWin, TemplateTimerHdl));
// temporary solution!!! Should set the font of the current
// insert position at every curor movement!
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index 92e758d..d1f7e35 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -90,7 +90,7 @@ friend void PageNumNotify( SwViewShell* pVwSh,
Point m_aStartPos;
Point m_aMovePos;
Point m_aRszMvHdlPt;
- Timer m_aTemplateTimer;
+ Idle m_aTemplateIdle;
// type/object where the mouse pointer is
SwCallMouseEvent m_aSaveCallEvent;
More information about the Libreoffice-commits
mailing list