[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdelibs=5D_plasma=3A_Export_icon_information_to_pac?=
From:       Artur Duque de Souza <asouza () kde ! org>
Date:       2011-04-28 21:52:24
Message-ID: 20110428215224.45959A60A4 () git ! kde ! org
[Download RAW message or body]

Git commit 7f749657da3e7fe33452a591376f0a25b7e3e453 by Artur Duque de Souza.
Committed on 28/04/2011 at 23:48.
Pushed by asouza into branch 'master'.

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>

M  +1    -0    plasma/applet.cpp     
M  +1    -0    plasma/remote/accessmanager.cpp     
M  +1    -0    plasma/service.cpp     

http://commits.kde.org/kdelibs/7f749657da3e7fe33452a591376f0a25b7e3e453

diff --git a/plasma/applet.cpp b/plasma/applet.cpp
index 83956fa..f6145f4 100644
--- a/plasma/applet.cpp
+++ b/plasma/applet.cpp
@@ -1666,6 +1666,7 @@ void Applet::publish(AnnouncementMethods methods, const QString &resourceName)
         PackageMetadata pm;
         pm.setName(d->appletDescription.name());
         pm.setDescription(d->appletDescription.comment());
+        pm.setIcon(d->appletDescription.icon());
         d->service->d->publish(methods, resourceName, pm);
     } else {
         kDebug() << "Can not publish invalid applets.";
diff --git a/plasma/remote/accessmanager.cpp b/plasma/remote/accessmanager.cpp
index 0a4f66a..6ffd0f2 100644
--- a/plasma/remote/accessmanager.cpp
+++ b/plasma/remote/accessmanager.cpp
@@ -151,6 +151,7 @@ void AccessManagerPrivate::slotAddService(DNSSD::RemoteService::Ptr service)
             QMap<QString, QByteArray> textData = service->textData();
             metadata.setName(textData["name"]);
             metadata.setDescription(textData["description"]);
+            metadata.setIcon(textData["icon"]);
             metadata.setRemoteLocation(url.prettyUrl());
         } else {
             kDebug() << "no textdata?";
diff --git a/plasma/service.cpp b/plasma/service.cpp
index fc88b17..c0f8696 100644
--- a/plasma/service.cpp
+++ b/plasma/service.cpp
@@ -112,6 +112,7 @@ void ServicePrivate::publish(AnnouncementMethods methods, const QString &name, c
             textData["name"] = name.toUtf8();
             textData["plasmoidname"] = metadata.name().toUtf8();
             textData["description"] = metadata.description().toUtf8();
+            textData["icon"] = metadata.icon().toUtf8();
             publicService->setTextData(textData);
             kDebug() << "about to publish";
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic