文件管理器扩展右键菜单json扩展如何传参
Tofloor
poster avatar
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 Favorite View the author
All Replies
avatar
153******45
deepin
2018-04-04 22:23
#1
直接命令加参数就可以呀
Reply View the author
avatar
sinx
deepin
2018-04-04 22:26
#2
能贴一下文档的链接吗
Reply View the author
avatar
夜の乐
deepin
2018-04-04 22:45
#3
能贴一下文档的链接吗
Reply View the author
avatar
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 View the author