How can I create a two level service menu?

Reimage creates a two level service menu. I have the four Reimage .desktop files and have studied them like the Zapruder film.

I’m trying to do exactly what they do but always end up with two top level entries, instead of being grouped under a single top level menu entry with submenus.

I’ve read this document and it’s a nice start but seems to be light on detail.

I notice that desktop-file-validate throws errors that I believe are valid syntax. Certainly, it indicates errors in my .desktop files, as well as the reimage .desktop files. Perhaps it is a bit out of date.

I must be missing something extremely simple.

***** process.desktop *****

[Desktop Entry]

# Name=VideoKit

Type=Service

ServiceTypes=KonqPopupMenu/Plugin;

MimeType=video/*;

Icon=transcode

X-KDE-Submenu=Process

# hides the whole service if missing

TryExec=videokit-util

# top-level items in the VideoKit submenu

Actions=Process-Standard

# ==========================================

# Parent action: Process submenu

# ==========================================

[Desktop Action Process-Standard]

Name=Process (strip subs/metadata/title)

# X-TryExec=videokit-util

Exec=konsole -e videokit-util --process --exit-delay --file “%f”

Icon=subtitlecomposer

# X-MimeType=video/*;

# X-Terminal=true

***** transcode.desktop *****

[Desktop Entry]

Name=VideoKit

Type=Service

ServiceTypes=KonqPopupMenu/Plugin

MimeType=video/*;

Icon=transcode

X-KDE-Submenu=Transcode

# hides the whole service if missing

TryExec=videokit-util

# top-level items in the VideoKit submenu

Actions=Transcode-Standard

[Desktop Action Transcode-Standard]

Name=Standard transcode

Exec=konsole -e videokit-util --transcode-file --file “%f” --exit-delay

Icon=transcode

Terminal=true

[Desktop Action Transcode-Film]

Name=Optimize for Film

Exec=konsole -e videokit-util --transcode-file --file “%f” --exit-delay --optimize-film

Icon=transcode

Terminal=true

[Desktop Action Transcode-BW]

Name=Optimize for B&W Film

Exec=konsole -e videokit-util --transcode-file --file “%f” --exit-delay --optimize-bw

Icon=transcode

Terminal=true

Take a look at these.

My Service Menu that goes into a submenu:

[Desktop Entry]
Type=Service
MimeType=video/mp4;video/x-matroska;video/avi;video/quicktime;video/x-msvideo;
Actions=fftrimAction
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
X-KDE-Priority=TopLevel
X-KDE-MinNumberOfUrls=1
X-KDE-Submenu=Video Scripts

[Desktop Action fftrimAction]
Name=Trim Video (FFmpeg)
Icon=video-x-generic
Exec=$HOME/Appz/Auto_Scripts/ffmpeg_trim.sh %F

Yours that doesn’t:

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin;
MimeType=video/*;
Icon=transcode
X-KDE-Submenu=Process
TryExec=videokit-util

[Desktop Action Process-Standard]
Name=Process (strip subs/metadata/title)
Exec=konsole -e videokit-util --process --exit-delay --file “%f”
Icon=subtitlecomposer

Can you see the differences?

[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin # <<< These lines
MimeType=video/*;
Actions=Process-Standard # <<< These lines
X-KDE-Submenu=Process # <<< These lines
TryExec=videokit-util

[Desktop Action Process-Standard]
Name=Process (strip subs/metadata/title)
Icon=subtitlecomposer
Exec=konsole -e videokit-util --process --exit-delay --file "%f"   

from my notes:

## SERVICEMENUS ##

# by default servicemenus add a new context menu item called :Actions below the trash section
# the :Actions menu does not sort out the Actions= from various desktop files, they are all together

# to suppress the :Actions submenu and move all Actions= to the root of the context menu, use
X-KDE-Priority=TopLevel (keeps all .desktop entries in alphanumeric order)
X-KDE-Priority=1 (places above TopLevel)
# all .desktop entries or Actions= will be sorted alphanumeric within the same priority level

# to keep all Actions= organized under their .desktop submenu, use
X-KDE-Submenu=<submenu name>

# Icon= key value found in [Desktop Entry] defines icon of .desktop file in dolphin
# Icon= key value found in [Desktop Action xxxx] defines the icon for each action in the context menu
# Icon= key value found in the first [Desktop Action xxxx] defines icon for a submenu
# use "_SEPARATOR_" at the front of Actions= value to suppress using the first Icon= value for a submenu
# use "_SEPARATOR_" to place lines between Actions= added to Type=Application .desktop files as well