Export icon information to package metadata for remote service
Get the original package metadata's icon and inject this information into the package metadata that is going to be sent to the remote targets. This way we are able to use the icon in several UIs which makes things more beautiful ;) CCMAIL:ervin@kde.org Signed-off-by: Artur Duque de Souza <asouza@kde.org>
This commit is contained in:
parent
fa109eaaf9
commit
97b37637fa
@ -1666,6 +1666,7 @@ void Applet::publish(AnnouncementMethods methods, const QString &resourceName)
|
|||||||
PackageMetadata pm;
|
PackageMetadata pm;
|
||||||
pm.setName(d->appletDescription.name());
|
pm.setName(d->appletDescription.name());
|
||||||
pm.setDescription(d->appletDescription.comment());
|
pm.setDescription(d->appletDescription.comment());
|
||||||
|
pm.setIcon(d->appletDescription.icon());
|
||||||
d->service->d->publish(methods, resourceName, pm);
|
d->service->d->publish(methods, resourceName, pm);
|
||||||
} else {
|
} else {
|
||||||
kDebug() << "Can not publish invalid applets.";
|
kDebug() << "Can not publish invalid applets.";
|
||||||
|
@ -151,6 +151,7 @@ void AccessManagerPrivate::slotAddService(DNSSD::RemoteService::Ptr service)
|
|||||||
QMap<QString, QByteArray> textData = service->textData();
|
QMap<QString, QByteArray> textData = service->textData();
|
||||||
metadata.setName(textData["name"]);
|
metadata.setName(textData["name"]);
|
||||||
metadata.setDescription(textData["description"]);
|
metadata.setDescription(textData["description"]);
|
||||||
|
metadata.setIcon(textData["icon"]);
|
||||||
metadata.setRemoteLocation(url.prettyUrl());
|
metadata.setRemoteLocation(url.prettyUrl());
|
||||||
} else {
|
} else {
|
||||||
kDebug() << "no textdata?";
|
kDebug() << "no textdata?";
|
||||||
|
@ -112,6 +112,7 @@ void ServicePrivate::publish(AnnouncementMethods methods, const QString &name, c
|
|||||||
textData["name"] = name.toUtf8();
|
textData["name"] = name.toUtf8();
|
||||||
textData["plasmoidname"] = metadata.name().toUtf8();
|
textData["plasmoidname"] = metadata.name().toUtf8();
|
||||||
textData["description"] = metadata.description().toUtf8();
|
textData["description"] = metadata.description().toUtf8();
|
||||||
|
textData["icon"] = metadata.icon().toUtf8();
|
||||||
publicService->setTextData(textData);
|
publicService->setTextData(textData);
|
||||||
kDebug() << "about to publish";
|
kDebug() << "about to publish";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user