mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: implement hidden KUiServerJobTracker feature to override the application name and icon
also updated the D-Bus interface file Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6ae96c3c1d
commit
4ba42b20e1
2 changed files with 24 additions and 6 deletions
|
@ -83,15 +83,21 @@ void KUiServerJobTracker::registerJob(KJob *job)
|
||||||
}
|
}
|
||||||
|
|
||||||
KComponentData componentData = KGlobal::mainComponent();
|
KComponentData componentData = KGlobal::mainComponent();
|
||||||
QString programIconName = componentData.aboutData()->programIconName();
|
QString appName = job->property("appName").toString();
|
||||||
|
if (appName.isEmpty()) {
|
||||||
if (programIconName.isEmpty()) {
|
appName = componentData.aboutData()->programName();
|
||||||
programIconName = componentData.aboutData()->appName();
|
}
|
||||||
|
QString appIconName = job->property("appIconName").toString();
|
||||||
|
if (appIconName.isEmpty()) {
|
||||||
|
appIconName = componentData.aboutData()->programIconName();
|
||||||
|
}
|
||||||
|
if (appIconName.isEmpty()) {
|
||||||
|
appIconName = componentData.aboutData()->appName();
|
||||||
}
|
}
|
||||||
|
|
||||||
QWeakPointer<KJob> jobWatch = job;
|
QWeakPointer<KJob> jobWatch = job;
|
||||||
QDBusReply<QDBusObjectPath> reply = serverProxy->uiserver().requestView(componentData.aboutData()->programName(),
|
QDBusReply<QDBusObjectPath> reply = serverProxy->uiserver().requestView(appName,
|
||||||
programIconName,
|
appIconName,
|
||||||
job->capabilities());
|
job->capabilities());
|
||||||
|
|
||||||
// If we got a valid reply, register the interface for later usage.
|
// If we got a valid reply, register the interface for later usage.
|
||||||
|
|
|
@ -42,6 +42,18 @@
|
||||||
<arg name="number" type="u" direction="in"/>
|
<arg name="number" type="u" direction="in"/>
|
||||||
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="setAppName">
|
||||||
|
<arg name="message" type="s" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="setAppIconName">
|
||||||
|
<arg name="message" type="s" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
|
<method name="setCapabilities">
|
||||||
|
<arg name="number" type="i" direction="in"/>
|
||||||
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
</method>
|
||||||
<method name="setDestUrl">
|
<method name="setDestUrl">
|
||||||
<arg name="destUrl" type="v" direction="in"/>
|
<arg name="destUrl" type="v" direction="in"/>
|
||||||
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue