summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorPeter Burow <pb@openoffice.org>2002-08-05 11:41:11 +0000
committerPeter Burow <pb@openoffice.org>2002-08-05 11:41:11 +0000
commit5ed76096216d7b5dae72ccf97a2672b076cae0eb (patch)
tree86dce037080d483b90c862ce10a1a28a4c685035 /sfx2
parent5415ea126e88865d5e97cac74ca1b2fec28280b9 (diff)
fix: #99588# timer for selection
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx40
-rw-r--r--sfx2/source/appl/newhelp.hxx7
2 files changed, 31 insertions, 16 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 0eb09516930b..26e0872a1a6f 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: newhelp.cxx,v $
*
- * $Revision: 1.80 $
+ * $Revision: 1.81 $
*
- * last change: $Author: os $ $Date: 2002-08-01 11:38:34 $
+ * last change: $Author: pb $ $Date: 2002-08-05 12:41:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1554,9 +1554,9 @@ SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* _pParent )
pIPage = new IndexTabPage_Impl( &aTabCtrl );
pIPage->SetKeywordHdl( LINK( this, SfxHelpIndexWindow_Impl, KeywordHdl ) );
- aInitTimer.SetTimeoutHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
- aInitTimer.SetTimeout( 200 );
- aInitTimer.Start();
+ aTimer.SetTimeoutHdl( LINK( this, SfxHelpIndexWindow_Impl, InitHdl ) );
+ aTimer.SetTimeout( 200 );
+ aTimer.Start();
}
// -----------------------------------------------------------------------
@@ -1686,14 +1686,7 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, ActivatePageHdl, TabControl *, pTabCtrl )
IMPL_LINK( SfxHelpIndexWindow_Impl, SelectHdl, ListBox *, EMPTYARG )
{
- String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData( aActiveLB.GetSelectEntryPos() );
- if ( pFactory )
- {
- String aFactory( *pFactory );
- aFactory.ToLowerAscii();
- SetFactory( aFactory, sal_False );
- aSelectFactoryLink.Call( this );
- }
+ aTimer.Start();
return 0;
}
@@ -1703,6 +1696,27 @@ IMPL_LINK( SfxHelpIndexWindow_Impl, SelectHdl, ListBox *, EMPTYARG )
IMPL_LINK( SfxHelpIndexWindow_Impl, InitHdl, Timer *, EMPTYARG )
{
Initialize();
+
+ // now use the timer for selection
+ aTimer.SetTimeoutHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) );
+ aTimer.SetTimeout( 1000 );
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxHelpIndexWindow_Impl, SelectFactoryHdl, Timer *, EMPTYARG )
+{
+ String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData( aActiveLB.GetSelectEntryPos() );
+ if ( pFactory )
+ {
+ String aFactory( *pFactory );
+ aFactory.ToLowerAscii();
+ SetFactory( aFactory, sal_False );
+ aSelectFactoryLink.Call( this );
+ }
+
return 0;
}
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index f4a6e64369ca..712c60cc09d8 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: newhelp.hxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: pb $ $Date: 2002-06-04 08:22:11 $
+ * last change: $Author: pb $ $Date: 2002-08-05 12:41:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -337,7 +337,7 @@ private:
FixedLine aActiveLine;
TabControl aTabCtrl;
- Timer aInitTimer;
+ Timer aTimer;
Link aSelectFactoryLink;
String sKeyword;
@@ -358,6 +358,7 @@ private:
DECL_LINK( ActivatePageHdl, TabControl* );
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( InitHdl, Timer* );
+ DECL_LINK( SelectFactoryHdl, Timer* );
DECL_LINK( KeywordHdl, IndexTabPage_Impl* );
public: