mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
labwc-action(5): describe If action <prompt>
This commit is contained in:
parent
c63d35c942
commit
8a5a04cc1a
2 changed files with 31 additions and 0 deletions
|
|
@ -423,6 +423,7 @@ Actions that execute other actions. Used in keyboard/mouse bindings.
|
|||
```
|
||||
<action name="If">
|
||||
<query/>
|
||||
<prompt message=""/>
|
||||
<then><action/></then>
|
||||
<else><action/></else>
|
||||
</action>
|
||||
|
|
@ -494,6 +495,26 @@ Actions that execute other actions. Used in keyboard/mouse bindings.
|
|||
|
||||
This argument is optional.
|
||||
|
||||
*prompt*
|
||||
Display a yes/no prompt dialog (labnag by default). If 'yes' is
|
||||
selected, the *then* branch will be taken; and similarly with
|
||||
'no' and *else*. This argument is optional. Note that the syntax
|
||||
is different to that of Openbox where a prompt element is not
|
||||
tied to If-actions but would just be a child of the downstream
|
||||
action. The reason for this difference is increased flexibility
|
||||
and functionality gained by optionally using an *else* branch.
|
||||
|
||||
```
|
||||
<keybind key="W-q">
|
||||
<action name="If">
|
||||
<prompt message="Quit?"/>
|
||||
<then>
|
||||
<action name="Exit"/>
|
||||
</then>
|
||||
</action>
|
||||
</keybind>
|
||||
```
|
||||
|
||||
*then*
|
||||
A list of actions to be executed if the window matches any
|
||||
query. This argument is optional.
|
||||
|
|
|
|||
|
|
@ -65,6 +65,16 @@
|
|||
<item label="Exit">
|
||||
<action name="Exit" />
|
||||
</item>
|
||||
<!--
|
||||
# A prompt can be used as follows:
|
||||
<item label="Exit">
|
||||
<action name="If"/>
|
||||
<prompt message="Do you really want to exit the compositor?"/>
|
||||
<then>
|
||||
<action name="Exit"/>
|
||||
</then>
|
||||
</item>
|
||||
-->
|
||||
</menu>
|
||||
|
||||
<menu id="some-custom-menu">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue