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

List:       kde-commits
Subject:    [kde-workspace/KDE/4.8] plasma/generic/applets/icon: desktop icon drag'n'drop url name
From:       Gregor_Tätzner <gregor () freenet ! de>
Date:       2012-04-20 20:21:55
Message-ID: 20120420202155.4097FA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 246d9bcc81878977d68c3cc030f1b6fd2e28cb87 by Gregor Tätzner.
Committed on 11/01/2012 at 20:57.
Pushed by gregort into branch 'KDE/4.8'.

desktop icon drag'n'drop url name

I have added an additional check so the desktop icon gets a pretty name
when you drag and drop a favicon onto the desktop.

BUG: 199811
REVIEW: 103435

M  +3    -0    plasma/generic/applets/icon/icon.cpp

http://commits.kde.org/kde-workspace/246d9bcc81878977d68c3cc030f1b6fd2e28cb87

diff --git a/plasma/generic/applets/icon/icon.cpp b/plasma/generic/applets/icon/icon.cpp
index 9f5b212..4bdbae4 100644
--- a/plasma/generic/applets/icon/icon.cpp
+++ b/plasma/generic/applets/icon/icon.cpp
@@ -203,6 +203,9 @@ void IconApplet::setUrl(const KUrl& url, bool fromConfigDialog)
             if (m_text.isEmpty() && m_url.isLocalFile()) {
                 //handle special case like the / folder
                 m_text = m_url.directory();
+            } else if (m_url.protocol().contains("http")) {
+                m_text = m_url.prettyUrl();
+                m_text.remove(QRegExp("http://(www.)*"));
             } else if (m_text.isEmpty()) {
                 m_text = m_url.prettyUrl();
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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