Skip to content

Improve behavior for selecting a menu entry on launch

Oliver Beard requested to merge work/olib/args2 into master

Previously, it would fail to search a menu for matching menu entries, meaning the app's second positional argument never worked. This commit fixes this error, and simplifies the interface for this by allowing you to specify entry and/or menu in one argument.

You can also now specify an entry only, which will find it in all menus. This should be particularly useful for plasma-desktop#140.

This can be tested with:

Before After
kmenuedit System org.kde.dolphin.desktop kmenuedit org.kde.dolphin.desktop
kmenuedit Utilities org.kde.kwrite.desktop kmenuedit Utilties/org.kde.kwrite.desktop
kmenuedit Education/Mathematics kmenuedit Education/Mathematics

denotes non-functional behavior (in this case, selection of a menu entry before this MR)

Edited by Oliver Beard

Merge request reports

Loading