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

List:       kde-commits
Subject:    [kde-workspace/KDE/4.9] plasma/generic/applets/notifications/core: Fix url used in "open" action
From:       Martin Koller <kollix () aon ! at>
Date:       2012-08-03 15:26:57
Message-ID: 20120803152657.68DAEA6094 () git ! kde ! org
[Download RAW message or body]

Git commit c8b92a11882e3beb98209ac3c51c34567e3af8cd by Martin Koller.
Committed on 03/08/2012 at 17:22.
Pushed by mkoller into branch 'KDE/4.9'.

Fix url used in "open" action

clicking the open button opened the last file when a complete folder was copied.
Fix this by changing the url as done in the jobs completedMessage()

BUG: 241451
FIXED-IN: 4.9.1

M  +8    -1    plasma/generic/applets/notifications/core/completedjobnotification.cpp

http://commits.kde.org/kde-workspace/c8b92a11882e3beb98209ac3c51c34567e3af8cd

diff --git a/plasma/generic/applets/notifications/core/completedjobnotification.cpp \
b/plasma/generic/applets/notifications/core/completedjobnotification.cpp index \
                e987a66..9a08390 100644
--- a/plasma/generic/applets/notifications/core/completedjobnotification.cpp
+++ b/plasma/generic/applets/notifications/core/completedjobnotification.cpp
@@ -64,7 +64,14 @@ void CompletedJobNotification::setJob(Job *job)
         actions.insert("open", i18n("Open"));
         setActions(actions);
         setActionOrder(QStringList()<<"open");
-        m_destinationPrettyUrl = job->destination().prettyUrl();
+
+        // create location url as is done in job->completedMessage()
+        KUrl location(job->destination());
+        if (job->totalAmounts().value("files") > 1) {
+            location.setFileName(QString());
+        }
+
+        m_destinationPrettyUrl = location.prettyUrl();
     }
 
     m_job = job;


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

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