desktop/source/deployment/gui/dp_gui_dialog2.cxx | 20 ++++++++++---------- desktop/source/deployment/gui/dp_gui_dialog2.hxx | 4 ++-- framework/inc/services/layoutmanager.hxx | 4 ++-- framework/inc/uielement/toolbarmanager.hxx | 2 +- framework/source/layoutmanager/layoutmanager.cxx | 22 +++++++++++----------- framework/source/uielement/toolbarmanager.cxx | 16 ++++++++-------- include/vcl/timer.hxx | 2 +- 7 files changed, 35 insertions(+), 35 deletions(-)
New commits: commit 2168a3ee6b9566f2c4bb8b37b3d1d007b51a1819 Author: Jennifer Liebel <jliebe...@gmail.com> Date: Thu Nov 6 11:52:02 2014 +0000 changed some timer to idle Change-Id: If137dbd80f7260d9507e48709d3f0f14b60a25f6 diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 63fe382..468d4a2e 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -709,14 +709,14 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager) m_pUpdateBtn->Enable(false); - m_aTimeoutTimer.SetTimeout( 500 ); // mSec - m_aTimeoutTimer.SetTimeoutHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) ); + m_aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST); + m_aIdle.SetIdleHdl( LINK( this, ExtMgrDialog, TimeOutHdl ) ); } ExtMgrDialog::~ExtMgrDialog() { - m_aTimeoutTimer.Stop(); + m_aIdle.Stop(); } @@ -951,7 +951,7 @@ IMPL_LINK( ExtMgrDialog, startProgress, void*, _bLockInterface ) bool bLockInterface = (bool) _bLockInterface; if ( m_bStartProgress && !m_bHasProgress ) - m_aTimeoutTimer.Start(); + m_aIdle.Start(); if ( m_bStopProgress ) { @@ -1096,7 +1096,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl) if ( m_pProgressBar->IsVisible() ) m_pProgressBar->SetValue( (sal_uInt16) m_nProgress ); - m_aTimeoutTimer.Start(); + m_aIdle.Start(); } return 1; @@ -1191,13 +1191,13 @@ UpdateRequiredDialog::UpdateRequiredDialog(vcl::Window *pParent, TheExtensionMan m_pUpdateBtn->Enable( false ); m_pCloseBtn->GrabFocus(); - m_aTimeoutTimer.SetTimeout( 50 ); // mSec - m_aTimeoutTimer.SetTimeoutHdl( LINK( this, UpdateRequiredDialog, TimeOutHdl ) ); + m_aIdle.SetPriority( VCL_IDLE_PRIORITY_MEDIUM ); + m_aIdle.SetIdleHdl( LINK( this, UpdateRequiredDialog, TimeOutHdl ) ); } UpdateRequiredDialog::~UpdateRequiredDialog() { - m_aTimeoutTimer.Stop(); + m_aIdle.Stop(); } long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage, @@ -1266,7 +1266,7 @@ IMPL_LINK( UpdateRequiredDialog, startProgress, void*, _bLockInterface ) bool bLockInterface = (bool) _bLockInterface; if ( m_bStartProgress && !m_bHasProgress ) - m_aTimeoutTimer.Start(); + m_aIdle.Start(); if ( m_bStopProgress ) { @@ -1427,7 +1427,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl) if ( m_pProgressBar->IsVisible() ) m_pProgressBar->SetValue( (sal_uInt16) m_nProgress ); - m_aTimeoutTimer.Start(); + m_aIdle.Start(); } return 1; diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index b639b73..e2c1629 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -121,7 +121,7 @@ class ExtMgrDialog : public ModelessDialog, bool m_bDisableWarning; bool m_bDeleteWarning; long m_nProgress; - Timer m_aTimeoutTimer; + Idle m_aIdle; TheExtensionManager *m_pManager; ::com::sun::star::uno::Reference< ::com::sun::star::task::XAbortChannel > m_xAbortChannel; @@ -191,7 +191,7 @@ class UpdateRequiredDialog : public ModalDialog, bool m_bDisableWarning; bool m_bHasLockedEntries; long m_nProgress; - Timer m_aTimeoutTimer; + Idle m_aIdle; TheExtensionManager *m_pManager; ::com::sun::star::uno::Reference< ::com::sun::star::task::XAbortChannel > m_xAbortChannel; diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 0dcfc45..12e9d30 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -309,8 +309,8 @@ namespace framework css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowState; css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowStateSupplier; GlobalSettings* m_pGlobalSettings; - OUString m_aModuleIdentifier; - Timer m_aAsyncLayoutTimer; + OUString m_aModuleIdentifier; + Idle m_aAsyncLayoutIdle; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener ToolbarLayoutManager* m_pToolbarManager; css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener > m_xToolbarManager; diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 462f48e..320aa7c 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -208,7 +208,7 @@ class ToolBarManager : public ToolbarManager_Base CommandToInfoMap m_aCommandMap; SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap; - Timer m_aAsyncUpdateControllersTimer; + Idle m_aAsyncUpdateControllersIdle; OUString m_sIconTheme; MenuDescriptionMap m_aMenuMap; bool m_bAcceleratorCfg; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index ad8187d..e5cc2dd 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -138,8 +138,8 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - m_aAsyncLayoutTimer.SetTimeout( 50 ); - m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); + m_aAsyncLayoutIdle.SetPriority( VCL_IDLE_PRIORITY_RESIZE ); + m_aAsyncLayoutIdle.SetIdleHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, ::getCppuType( &m_bAutomaticToolbars ) ); registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); @@ -152,7 +152,7 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : LayoutManager::~LayoutManager() { Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - m_aAsyncLayoutTimer.Stop(); + m_aAsyncLayoutIdle.Stop(); setDockingAreaAcceptor(NULL); delete m_pGlobalSettings; } @@ -1250,7 +1250,7 @@ throw ( RuntimeException, std::exception ) // IMPORTANT: Be sure to stop layout timer if don't have a docking area acceptor! if ( !xDockingAreaAcceptor.is() ) - m_aAsyncLayoutTimer.Stop(); + m_aAsyncLayoutIdle.Stop(); bool bAutomaticToolbars( m_bAutomaticToolbars ); std::vector< Reference< awt::XWindow > > oldDockingAreaWindows; @@ -1258,7 +1258,7 @@ throw ( RuntimeException, std::exception ) ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; if ( !xDockingAreaAcceptor.is() ) - m_aAsyncLayoutTimer.Stop(); + m_aAsyncLayoutIdle.Stop(); // Remove listener from old docking area acceptor if ( m_xDockingAreaAcceptor.is() ) @@ -2259,7 +2259,7 @@ throw (RuntimeException, std::exception) SolarMutexClearableGuard aWriteLock; if ( bDoLayout ) - m_aAsyncLayoutTimer.Stop(); + m_aAsyncLayoutIdle.Stop(); aWriteLock.clear(); Any a( nLockCount ); @@ -2658,14 +2658,14 @@ throw( uno::RuntimeException, std::exception ) // application modules need this. So we have to check if this is the first // call after the async layout time expired. m_bMustDoLayout = true; - if ( !m_aAsyncLayoutTimer.IsActive() ) + if ( !m_aAsyncLayoutIdle.IsActive() ) { - const Link& aLink = m_aAsyncLayoutTimer.GetTimeoutHdl(); + const Link& aLink = m_aAsyncLayoutIdle.GetTimeoutHdl(); if ( aLink.IsSet() ) - aLink.Call( &m_aAsyncLayoutTimer ); + aLink.Call( &m_aAsyncLayoutIdle ); } if ( m_nLockCount == 0 ) - m_aAsyncLayoutTimer.Start(); + m_aAsyncLayoutIdle.Start(); } else if ( m_xFrame.is() && aEvent.Source == m_xFrame->getContainerWindow() ) { @@ -2735,7 +2735,7 @@ void SAL_CALL LayoutManager::windowHidden( const lang::EventObject& aEvent ) thr IMPL_LINK_NOARG(LayoutManager, AsyncLayoutHdl) { SolarMutexClearableGuard aReadLock; - m_aAsyncLayoutTimer.Stop(); + m_aAsyncLayoutIdle.Stop(); if( !m_xContainerWindow.is() ) return 0; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index e00a974..b2591bb 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -235,8 +235,8 @@ ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext, aHelpIdAsString += OUStringToOString( aToolbarName, RTL_TEXTENCODING_UTF8 );; m_pToolBar->SetHelpId( aHelpIdAsString ); - m_aAsyncUpdateControllersTimer.SetTimeout( 50 ); - m_aAsyncUpdateControllersTimer.SetTimeoutHdl( LINK( this, ToolBarManager, AsyncUpdateControllersHdl ) ); + m_aAsyncUpdateControllersIdle.SetPriority( VCL_IDLE_PRIORITY_MEDIUM ); + m_aAsyncUpdateControllersIdle.SetIdleHdl( LINK( this, ToolBarManager, AsyncUpdateControllersHdl ) ); SvtMiscOptions().AddListenerLink( LINK( this, ToolBarManager, MiscOptionsChanged ) ); } @@ -475,7 +475,7 @@ throw ( RuntimeException, std::exception ) { SolarMutexGuard g; if ( Action.Action == FrameAction_CONTEXT_CHANGED ) - m_aAsyncUpdateControllersTimer.Start(); + m_aAsyncUpdateControllersIdle.Start(); } void SAL_CALL ToolBarManager::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) @@ -564,7 +564,7 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception SolarMutexGuard g; // stop timer to prevent timer events after dispose - m_aAsyncUpdateControllersTimer.Stop(); + m_aAsyncUpdateControllersIdle.Stop(); RemoveControllers(); @@ -1412,7 +1412,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if( m_pToolBar->WillUsePopupMode() ) UpdateControllers(); else if ( m_pToolBar->IsReallyVisible() ) - m_aAsyncUpdateControllersTimer.Start(); + m_aAsyncUpdateControllersIdle.Start(); // Try to retrieve UIName from the container property set and set it as the title // if it is not empty. @@ -2038,11 +2038,11 @@ IMPL_LINK( ToolBarManager, StateChanged, StateChangedType*, pStateChangedType ) else if ( *pStateChangedType == StateChangedType::VISIBLE ) { if ( m_pToolBar->IsReallyVisible() ) - m_aAsyncUpdateControllersTimer.Start(); + m_aAsyncUpdateControllersIdle.Start(); } else if ( *pStateChangedType == StateChangedType::INITSHOW ) { - m_aAsyncUpdateControllersTimer.Start(); + m_aAsyncUpdateControllersIdle.Start(); } return 1; } @@ -2097,7 +2097,7 @@ IMPL_LINK_NOARG(ToolBarManager, AsyncUpdateControllersHdl) return 1; // Request to update our controllers - m_aAsyncUpdateControllersTimer.Stop(); + m_aAsyncUpdateControllersIdle.Stop(); UpdateControllers(); return 0; diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx index 10dd3fc..c71f04d 100644 --- a/include/vcl/timer.hxx +++ b/include/vcl/timer.hxx @@ -111,4 +111,4 @@ class VCL_DLLPUBLIC Idle : public Timer #endif // INCLUDED_VCL_TIMER_HXX -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits