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

List:       kde-commits
Subject:    =?utf-8?q?=5Bkde-workspace=5D_plasma/desktop/shell=3A_Use_remote?=
From:       Artur Duque de Souza <asouza () kde ! org>
Date:       2011-04-28 21:53:43
Message-ID: 20110428215343.DB9D9A60A4 () git ! kde ! org
[Download RAW message or body]

Git commit 49939d6542629bb59ace93760bd615b23faa4923 by Artur Duque de Souza.
Committed on 28/04/2011 at 23:51.
Pushed by asouza into branch 'master'.

Use remote widget's icon on announcement notification

Now that we have the original icon we should use that instead of
Plasma's icon. It's improves usability as it's easier to recognize
which plasmoid is being shared and also it makes things beautiful.

CCMAIL:ervin@kde.org
Signed-off-by: Artur Duque de Souza <asouza@kde.org>

M  +6    -0    plasma/desktop/shell/plasmaapp.cpp     

http://commits.kde.org/kde-workspace/49939d6542629bb59ace93760bd615b23faa4923

diff --git a/plasma/desktop/shell/plasmaapp.cpp b/plasma/desktop/shell/plasmaapp.cpp
index b14f296..ba12fc7 100644
--- a/plasma/desktop/shell/plasmaapp.cpp
+++ b/plasma/desktop/shell/plasmaapp.cpp
@@ -60,6 +60,7 @@
 #include <KRun>
 #include <KWindowSystem>
 #include <KService>
+#include <KIconLoader>
 
 #include <ksmserver_interface.h>
 
@@ -1326,6 +1327,11 @@ void PlasmaApp::remotePlasmoidAdded(Plasma::PackageMetadata \
                metadata)
     notification->setText(i18n("A new widget has become available on the \
network:<br><b>%1</b> - <i>%2</i>",  metadata.name(), metadata.description()));
 
+    // setup widget icon
+    if (!metadata.icon().isEmpty()) {
+        notification->setPixmap(KIcon(metadata.icon()).pixmap(IconSize(KIconLoader::Desktop)));
 +    }
+
     // locked, but the user is able to unlock
     if (m_corona->immutability() == Plasma::UserImmutable) {
         m_unlockCorona = true;


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

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