Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
文件管理器扩展右键菜单json扩展如何传参
Apps Section
844
views ·
4
replies ·
To
floor
Go
l0gic
deepin
2018-04-04 21:26
Author
本帖最后由 l0gic 于 2018-4-4 13:29 编辑
遵照github上dde-file-manager关于menuextention的文档
使用json扩展的方法,已经可以添加邮件菜单选项,如图
。
我希望在点击这个自定义的选项的时候,可以调用自己写的python程序。请问如何编写json的'Exec:'项,使得dde-file-manager将选中文件的路径当做参数传递给我编写的python程序?
Reply
Like 0
Favorite
View the author
All Replies
153******45
deepin
2018-04-04 22:23
#1
直接命令加参数就可以呀
Reply
Like 0
View the author
sinx
deepin
2018-04-04 22:26
#2
能贴一下文档的链接吗
Reply
Like 0
View the author
夜の乐
deepin
2018-04-04 22:45
#3
能贴一下文档的链接吗
Reply
Like 0
View the author
l0gic
deepin
2018-04-04 22:57
#4
文档的链接: https://github.com/linuxdeepin/dde-file-manager/tree/develop2.0/doc
通过阅读源代码,已经确认使用的命令行传参,直接接受命令行参数即可。
源代码的位置是/dde-file-manager/dde-file-manager-lib/interfaces/dfilemenumanager.cpp:639-654
谢谢大家。
https://bbs.deepin.org/user/78625
https://bbs.deepin.org/user/38874
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
How to fix grub boot menu that has disappeared?
Looking Deepin ci 25.2.0 Developer/Unstable repositories
Popular Events
More
遵照github上dde-file-manager关于menuextention的文档
使用json扩展的方法,已经可以添加邮件菜单选项,如图
我希望在点击这个自定义的选项的时候,可以调用自己写的python程序。请问如何编写json的'Exec:'项,使得dde-file-manager将选中文件的路径当做参数传递给我编写的python程序?