Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support prompts for actions #22

Open
montagdude opened this issue Jul 21, 2018 · 2 comments
Open

Feature request: support prompts for actions #22

montagdude opened this issue Jul 21, 2018 · 2 comments

Comments

@montagdude
Copy link

montagdude commented Jul 21, 2018

Openbox actions can have a prompt specified, which brings up a dialog box displaying the message with a Yes/No button. I use prompts for shutdown, restart, and suspend actions, for example. Currently, I have to add these prompts in manually after generating the menu. It would be nice if prompts could be put in schema.pl instead as an optional 4th argument for an item. The syntax for the prompt in menu.xml is:

<item ...><action ...><command>...</command><prompt>Message text</prompt></action><item>

@trizen
Copy link
Owner

trizen commented Jul 21, 2018

For now, items with actions can be added by using the raw entry:

our $SCHEMA = [
    # ...
    {raw => q(<item ...><action ...><command>...</command><prompt>Message text</prompt></action<item>)},
    # ...
]

@montagdude
Copy link
Author

Thanks for the suggestion. I didn't know about the raw entry. It's a decent workaround, except that if you use icons, with this method you have to hardcode the icon path and manually update it if you change the icon theme. (Unless I'm missing something.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants