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

Tobias Madl tobias.madl.dev at gmail.com
Mon Nov 17 01:27:43 PST 2014


 include/sfx2/dinfdlg.hxx                |    4 ++--
 include/svx/numvset.hxx                 |    4 ++--
 sfx2/source/dialog/dinfdlg.cxx          |   16 ++++++++--------
 svx/source/dialog/svxbmpnumvalueset.cxx |    6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 55cf9f3194f5bc5a6b98b6424d806d53a617c3bc
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date:   Mon Nov 17 09:25:25 2014 +0000

    changed timers to idles
    
    Change-Id: Icb6e3e72939ab0d04d9f099f1e476131a223de48

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 340681a..0f867a4 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -424,8 +424,8 @@ private:
     std::vector< CustomPropertyLine* >  m_aCustomPropertiesLines;
     CustomPropertyLine*                 m_pCurrentLine;
     SvNumberFormatter                   m_aNumberFormatter;
-    Timer                               m_aEditLoseFocusTimer;
-    Timer                               m_aBoxLoseFocusTimer;
+    Idle                                m_aEditLoseFocusIdle;
+    Idle                                m_aBoxLoseFocusIdle;
     Link                                m_aRemovedHdl;
 
     DECL_LINK(  TypeHdl, CustomPropertiesTypeBox* );
diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx
index ae5a402..4bc16cf 100644
--- a/include/svx/numvset.hxx
+++ b/include/svx/numvset.hxx
@@ -90,7 +90,7 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
 
 class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
 {
-    Timer       aFormatTimer;
+    Idle        aFormatIdle;
     bool        bGrfNotFound;
 
     void init();
@@ -101,7 +101,7 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
     void            SetGrfNotFound(bool bSet) {bGrfNotFound = bSet;}
     bool            IsGrfNotFound()const {return bGrfNotFound;}
 
-    Timer&          GetFormatTimer() {return aFormatTimer;}
+    Idle&          GetFormatIdle() {return aFormatIdle;}
 
     public:
     SvxBmpNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 850cb9c..4ac4070 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1426,10 +1426,10 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
                         Application::GetSettings().GetLanguageTag().getLanguageType() )
 
 {
-    m_aEditLoseFocusTimer.SetTimeout( 300 );
-    m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
-    m_aBoxLoseFocusTimer.SetTimeout( 300 );
-    m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) );
+    m_aEditLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+    m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
+    m_aBoxLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+    m_aBoxLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) );
 
     m_aNameBox.add_mnemonic_label(m_pHeaderAccName);
     m_aNameBox.SetAccessibleName(m_pHeaderAccName->GetText());
@@ -1454,8 +1454,8 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
 
 CustomPropertiesWindow::~CustomPropertiesWindow()
 {
-    m_aEditLoseFocusTimer.Stop();
-    m_aBoxLoseFocusTimer.Stop();
+    m_aEditLoseFocusIdle.Stop();
+    m_aBoxLoseFocusIdle.Stop();
     ClearAllLines();
 }
 
@@ -1531,7 +1531,7 @@ IMPL_LINK( CustomPropertiesWindow, EditLoseFocusHdl, CustomPropertiesEdit*, pEdi
         if ( !pLine->m_bTypeLostFocus )
         {
             m_pCurrentLine = pLine;
-            m_aEditLoseFocusTimer.Start();
+            m_aEditLoseFocusIdle.Start();
         }
         else
             pLine->m_bTypeLostFocus = false;
@@ -1544,7 +1544,7 @@ IMPL_LINK( CustomPropertiesWindow, BoxLoseFocusHdl, CustomPropertiesTypeBox*, pB
     if ( pBox )
     {
         m_pCurrentLine = pBox->GetLine();
-        m_aBoxLoseFocusTimer.Start();
+        m_aBoxLoseFocusIdle.Start();
     }
 
     return 0;
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 0963e6d..55aebe3 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -480,15 +480,15 @@ void SvxBmpNumValueSet::init()
     GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
     SetStyle( GetStyle() | WB_VSCROLL );
     SetLineCount( 3 );
-    aFormatTimer.SetTimeout(300);
-    aFormatTimer.SetTimeoutHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
+    aFormatIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
+    aFormatIdle.SetIdleHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
 }
 
 
 SvxBmpNumValueSet::~SvxBmpNumValueSet()
 {
     GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS);
-    aFormatTimer.Stop();
+    aFormatIdle.Stop();
 }
 
 void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )


More information about the Libreoffice-commits mailing list