User: obo Date: 2007-06-12 05:32:28+0000 Modified: dba/dbaccess/source/ui/app/AppControllerGen.cxx
Log: INTEGRATION: CWS dba23ui (1.24.4); FILE MERGED 2006/12/21 08:32:43 fs 1.24.4.1: #i72799# enhanced mnemonics handling, now also for the task pane File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppControllerGen.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.24&r2=1.25 Delta lines: +20 -1 -------------------- --- AppControllerGen.cxx 2006-12-13 16:46:56+0000 1.24 +++ AppControllerGen.cxx 2007-06-12 05:32:26+0000 1.25 @@ -96,6 +96,9 @@ #ifndef _SV_SVAPP_HXX //autogen #include <vcl/svapp.hxx> #endif +#ifndef _SV_MNEMONIC_HXX +#include <vcl/mnemonic.hxx> +#endif #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> #endif @@ -645,7 +648,23 @@ _xLayoutManager->requestElement( s_sStatusbar ); if ( getContainer() ) - getContainer()->createIconAutoMnemonics(); + { + // we need to share the "mnemonic space": + MnemonicGenerator aMnemonicGenerator; + // - the menu already has mnemonics + SystemWindow* pSystemWindow = getContainer()->GetSystemWindow(); + MenuBar* pMenu = pSystemWindow ? pSystemWindow->GetMenuBar() : NULL; + if ( pMenu ) + { + USHORT nMenuItems = pMenu->GetItemCount(); + for ( USHORT i = 0; i < nMenuItems; ++i ) + aMnemonicGenerator.RegisterMnemonic( pMenu->GetItemText( pMenu->GetItemId( i ) ) ); + } + // - the icons should use automatic ones + getContainer()->createIconAutoMnemonics( aMnemonicGenerator ); + // - as well as the entries in the task pane + getContainer()->setTaskExternalMnemonics( aMnemonicGenerator ); + } Execute( SID_DB_APP_VIEW_FORMS, Sequence< PropertyValue >() ); InvalidateAll(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
