feat: add desktopfilegenerator and method addUserApplication
1. change type of ActionName to 'a{sa{ss}}' 2. refactor the method of serialization Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
@ -44,7 +44,7 @@
|
||||
<property name="Terminal" type="b" access="read">
|
||||
<annotation
|
||||
name="org.freedesktop.DBus.Description"
|
||||
value="Indicate this application should launch by DEFAULT terminal or not."
|
||||
value="Indicate this application should launch by terminal or not."
|
||||
/>
|
||||
</property>
|
||||
|
||||
@ -56,10 +56,10 @@
|
||||
/>
|
||||
</property>
|
||||
|
||||
<property name="ActionName" type="a{ss}" access="read">
|
||||
<property name="ActionName" type="a{sa{ss}}" access="read">
|
||||
<annotation
|
||||
name="org.freedesktop.DBus.Description"
|
||||
value="The type of ActionName is a Map, where the key represents the locale and the value is the corresponding content."
|
||||
value="The type of ActionName is a Map, first key represents action, second key represents locale and the value is the corresponding content."
|
||||
/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="PropMap"/>
|
||||
</property>
|
||||
@ -69,7 +69,7 @@
|
||||
name="org.freedesktop.DBus.Description"
|
||||
value="The type of IconName is a Map, where the key represents the action and the value is the corresponding content."
|
||||
/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="PropMap"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QStringMap"/>
|
||||
</property>
|
||||
|
||||
<property name="Name" type="a{ss}" access="read">
|
||||
@ -77,7 +77,7 @@
|
||||
name="org.freedesktop.DBus.Description"
|
||||
value="The meaning of this property's type is same as which in ActionName."
|
||||
/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="PropMap"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QStringMap"/>
|
||||
</property>
|
||||
|
||||
<property name="GenericName" type="a{ss}" access="read">
|
||||
@ -85,7 +85,7 @@
|
||||
name="org.freedesktop.DBus.Description"
|
||||
value="The meaning of this property's type is same as which in ActionName."
|
||||
/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="PropMap"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QStringMap"/>
|
||||
</property>
|
||||
|
||||
<method name="Launch">
|
||||
|
@ -30,5 +30,20 @@
|
||||
1. You should use pidfd_open(2) to get a pidfd."
|
||||
/>
|
||||
</method>
|
||||
<method name="addUserApplication">
|
||||
<arg type="a{sv}" name="desktop_file" direction="in"/>
|
||||
<arg type="s" name="name" direction="in"/>
|
||||
<arg type="s" name="app_id" direction="out" />
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap" />
|
||||
<annotation
|
||||
name="org.freedesktop.DBus.Description"
|
||||
value="Desktop-entry-spec: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html,
|
||||
type of `v` is depends on the property which you want to set.
|
||||
examples:
|
||||
{'Name':{'en_US':'example','default':'测试'},{'custom':10}} : a{sa{sv}} // Name=测试 Name[en_US]=example custom=10
|
||||
{'custom':20,'Name':'example'} : a{sv} // custom=20 Name=example
|
||||
"
|
||||
/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
|
Reference in New Issue
Block a user