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

List:       kde-commits
Subject:    KDE/kdebase/apps/dolphin/src/search
From:       Peter Penz <peter.penz19 () gmail ! com>
Date:       2010-11-11 18:27:14
Message-ID: 20101111182714.9BC23AC89E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1195670 by ppenz:

The string freeze is near: Add a string that may contain the file-name as paramater.


 M  +5 -0      dolphinsearchbox.cpp  


--- trunk/KDE/kdebase/apps/dolphin/src/search/dolphinsearchbox.cpp #1195669:1195670
@@ -81,6 +81,11 @@
 {
     m_searchPath = url;
     m_filterButton->setVisible(m_nepomukActivated && isSearchPathIndexed());
+
+    QFontMetrics metrics(m_fromHereButton->font());
+    const int maxWidth = metrics.averageCharWidth() * 15;
+    const QString fileName = metrics.elidedText(url.fileName(), Qt::ElideMiddle, maxWidth);
+    m_fromHereButton->setText(i18nc("action:button", "From Here (%1)", fileName));
 }
 
 KUrl DolphinSearchBox::searchPath() const
[prev in list] [next in list] [prev in thread] [next in thread] 

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