diff options
author | Duncan Foster <dfoster@openoffice.org> | 2003-06-18 12:32:26 +0000 |
---|---|---|
committer | Duncan Foster <dfoster@openoffice.org> | 2003-06-18 12:32:26 +0000 |
commit | a2cfa6350557178f3cb5fe63895bbb4266040dfd (patch) | |
tree | 0f1af64870bbaba43c7a5b104871e2a8bffd6fdd /scripting | |
parent | 7c2ff903bdc009c6f32a9a32716f502ad42a21b9 (diff) |
#i15737# navigation with keyboard in assign dialogs is confusing
Added listeners for keypress events that fire the corresponding item changed
event listeners on a return key press only
Also fixed a memory corruption(?) problem
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/workben/bindings/EditDebug.xdl | 4 | ||||
-rw-r--r-- | scripting/workben/bindings/EventsBinding.xdl | 6 | ||||
-rw-r--r-- | scripting/workben/bindings/KeyBinding.xdl | 5 | ||||
-rw-r--r-- | scripting/workben/bindings/MenuBinding.xdl | 7 | ||||
-rw-r--r-- | scripting/workben/bindings/ScriptBinding.xba | 23 |
5 files changed, 38 insertions, 7 deletions
diff --git a/scripting/workben/bindings/EditDebug.xdl b/scripting/workben/bindings/EditDebug.xdl index e975c81c302e..226104b2d746 100644 --- a/scripting/workben/bindings/EditDebug.xdl +++ b/scripting/workben/bindings/EditDebug.xdl @@ -4,9 +4,11 @@ <dlg:bulletinboard> <dlg:combobox dlg:id="LocationCombo" dlg:tab-index="0" dlg:left="64" dlg:top="17" dlg:width="110" dlg:height="13" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:combobox dlg:id="LanguageCombo" dlg:tab-index="1" dlg:left="64" dlg:top="33" dlg:width="110" dlg:height="13" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:checkbox dlg:id="detail" dlg:tab-index="2" dlg:left="12" dlg:top="70" dlg:width="45" dlg:height="10" dlg:value="Detailed view" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> @@ -31,4 +33,4 @@ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.DoBrowseAndEdit" script:language="StarBasic"/> </dlg:button> </dlg:bulletinboard> -</dlg:window> +</dlg:window>
\ No newline at end of file diff --git a/scripting/workben/bindings/EventsBinding.xdl b/scripting/workben/bindings/EventsBinding.xdl index 71cd56a087d4..fe980b5ddfdb 100644 --- a/scripting/workben/bindings/EventsBinding.xdl +++ b/scripting/workben/bindings/EventsBinding.xdl @@ -7,9 +7,11 @@ <dlg:bulletinboard> <dlg:combobox dlg:id="LocationCombo" dlg:tab-index="0" dlg:left="63" dlg:top="19" dlg:width="108" dlg:height="12" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> - <dlg:combobox dlg:id="LanguageCombo" dlg:tab-index="1" dlg:left="63" dlg:top="32" dlg:width="108" dlg:height="12" dlg:spin="true"> + <dlg:combobox dlg:id="LanguageCombo" dlg:tab-index="1" dlg:left="63" dlg:top="31" dlg:width="108" dlg:height="12" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:checkbox dlg:id="detail" dlg:tab-index="2" dlg:left="17" dlg:top="57" dlg:width="44" dlg:height="10" dlg:value="Detailed view" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> @@ -56,4 +58,4 @@ <dlg:text dlg:style-id="0" dlg:id="AddOn" dlg:tab-index="22" dlg:disabled="true" dlg:left="17" dlg:top="144" dlg:width="38" dlg:height="10" dlg:value="[Add-on's only]"/> <dlg:text dlg:id="fsonly" dlg:tab-index="23" dlg:disabled="true" dlg:left="13" dlg:top="86" dlg:width="45" dlg:height="8" dlg:value="[Filesystem only]"/> </dlg:bulletinboard> -</dlg:window> +</dlg:window>
\ No newline at end of file diff --git a/scripting/workben/bindings/KeyBinding.xdl b/scripting/workben/bindings/KeyBinding.xdl index 958f4a74a939..107adf2f1dd4 100644 --- a/scripting/workben/bindings/KeyBinding.xdl +++ b/scripting/workben/bindings/KeyBinding.xdl @@ -7,9 +7,11 @@ <dlg:bulletinboard> <dlg:combobox dlg:id="LocationCombo" dlg:tab-index="0" dlg:left="64" dlg:top="18" dlg:width="108" dlg:height="12" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:combobox dlg:id="LanguageCombo" dlg:tab-index="1" dlg:left="64" dlg:top="34" dlg:width="108" dlg:height="12" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:checkbox dlg:id="detail" dlg:tab-index="2" dlg:left="17" dlg:top="57" dlg:width="44" dlg:height="10" dlg:value="Detailed view" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> @@ -20,6 +22,7 @@ </dlg:button> <dlg:combobox dlg:id="KeyCombo" dlg:tab-index="5" dlg:left="63" dlg:top="110" dlg:width="108" dlg:height="12" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireKeyComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:menulist dlg:id="KeyList" dlg:tab-index="6" dlg:left="63" dlg:top="125" dlg:width="108" dlg:height="59"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.KeyListListener" script:language="StarBasic"/> @@ -53,4 +56,4 @@ <dlg:text dlg:style-id="0" dlg:id="AddOn" dlg:tab-index="23" dlg:disabled="true" dlg:left="17" dlg:top="154" dlg:width="38" dlg:height="10" dlg:value="[Add-on's only]"/> <dlg:text dlg:id="fsonly" dlg:tab-index="24" dlg:disabled="true" dlg:left="13" dlg:top="86" dlg:width="45" dlg:height="8" dlg:value="[Filesystem only]"/> </dlg:bulletinboard> -</dlg:window> +</dlg:window>
\ No newline at end of file diff --git a/scripting/workben/bindings/MenuBinding.xdl b/scripting/workben/bindings/MenuBinding.xdl index 7903e0cffcd1..b4e0b0e753de 100644 --- a/scripting/workben/bindings/MenuBinding.xdl +++ b/scripting/workben/bindings/MenuBinding.xdl @@ -7,9 +7,11 @@ <dlg:bulletinboard> <dlg:combobox dlg:id="LocationCombo" dlg:tab-index="0" dlg:left="63" dlg:top="17" dlg:width="108" dlg:height="13" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:combobox dlg:id="LanguageCombo" dlg:tab-index="1" dlg:left="63" dlg:top="32" dlg:width="108" dlg:height="13" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireLangLocComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:checkbox dlg:id="detail" dlg:tab-index="2" dlg:left="17" dlg:top="57" dlg:width="44" dlg:height="10" dlg:value="Detailed view" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.LangLocComboListener" script:language="StarBasic"/> @@ -20,6 +22,7 @@ </dlg:button> <dlg:combobox dlg:id="MenuCombo" dlg:tab-index="5" dlg:left="63" dlg:top="109" dlg:width="108" dlg:height="13" dlg:spin="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.MenuComboListener" script:language="StarBasic"/> + <script:event script:event-name="on-keydown" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.fireMenuComboListernerOnRet" script:language="StarBasic"/> </dlg:combobox> <dlg:menulist dlg:id="SubMenuList" dlg:tab-index="6" dlg:left="63" dlg:top="125" dlg:width="108" dlg:height="44"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ScriptBindingLibrary.ScriptBinding.SubMenuListListener" script:language="StarBasic"/> @@ -56,7 +59,7 @@ <dlg:text dlg:id="Label8" dlg:tab-index="23" dlg:left="12" dlg:top="32" dlg:width="35" dlg:height="9" dlg:value="Language"/> <dlg:text dlg:id="Label9" dlg:tab-index="24" dlg:left="12" dlg:top="49" dlg:width="23" dlg:height="8" dlg:value="Script"/> <dlg:text dlg:style-id="0" dlg:id="AddOn" dlg:tab-index="25" dlg:disabled="true" dlg:left="17" dlg:top="156" dlg:width="38" dlg:height="11" dlg:value="[Add-on's only]"/> - <dlg:text dlg:id="fsonly" dlg:tab-index="26" dlg:disabled="true" dlg:left="13" dlg:top="86" dlg:width="45" dlg:height="8" dlg:value="[Filesystem only]"/> <dlg:text dlg:id="Label10" dlg:tab-index="27" dlg:left="9" dlg:top="89" dlg:width="0" dlg:height="0" dlg:value="Label10"/> + <dlg:text dlg:id="fsonly" dlg:tab-index="26" dlg:disabled="true" dlg:left="13" dlg:top="86" dlg:width="45" dlg:height="8" dlg:value="[Filesystem only]"/> </dlg:bulletinboard> -</dlg:window> +</dlg:window>
\ No newline at end of file diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba index 609df9c9e95d..2b5c8a514480 100644 --- a/scripting/workben/bindings/ScriptBinding.xba +++ b/scripting/workben/bindings/ScriptBinding.xba @@ -1114,6 +1114,7 @@ sub PopulateScriptList( lang as String, loc as String ) endif scriptStorageID = scriptstoragemgr.getScriptStorageID( scriptLocationURI ) + dim resultList() as Object if ( scriptStorageID > -1 ) then storage = scriptstoragemgr.getScriptStorage( scriptStorageID ) implementations() = storage.getAllImplementations() @@ -1139,8 +1140,9 @@ sub PopulateScriptList( lang as String, loc as String ) endif endif next n + resultList = tempDisplayList() endif - ScriptDisplayList(0) = tempDisplayList() + ScriptDisplayList(0) = resultList() endif scriptList.selectItemPos( 0, true ) @@ -1600,6 +1602,12 @@ sub SubMenuListListener() end if end sub +REM a keypress listener that in turn fires the MenuCL on a return key even only +sub fireMenuComboListernerOnRet( eventobj as object ) + if (eventobj.KeyCode = 1280 ) then + MenuComboListener() + endif +end sub 'Populates the SubMenuList with the appropriate menu items from the Top-level menu selected from the combo box sub MenuComboListener() @@ -1613,6 +1621,13 @@ sub MenuComboListener() PopulateSubMenuList( counter ) end sub +REM a keypress listener that in turn fires the LLCL on a return key even only +sub fireLangLocComboListernerOnRet( eventobj as object ) + if (eventobj.KeyCode = 1280 ) then + LangLocComboListener() + endif +end sub + sub LangLocComboListener() combo = bindingDialog.getControl( "LanguageCombo" ) @@ -1655,6 +1670,12 @@ sub LangLocComboListener() end sub +REM a keypress listener that in turn fires the KeyCL on a return key even only +sub fireKeyComboListernerOnRet( eventobj as object ) + if (eventobj.KeyCode = 1280 ) then + KeyComboListener() + endif +end sub 'Populates the KeyList with the appropriate key combos from the Top-level key group selected from the combo box sub KeyComboListener() |