diff options
| author | Peter Penz <[email protected]> | 2010-11-11 18:27:14 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-11-11 18:27:14 +0000 |
| commit | 943cb0c1c79629e5780163825422cf6827ef6008 (patch) | |
| tree | 1398e41d4759a40aa1a6c5deb10ee4a2e0c87abe /src/search | |
| parent | bc0bdf1f379646dde51a2d8a18520776e3780279 (diff) | |
The string freeze is near: Add a string that may contain the file-name as paramater.
svn path=/trunk/KDE/kdebase/apps/; revision=1195670
Diffstat (limited to 'src/search')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 6ab1362c8..0ff9e9b1d 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -81,6 +81,11 @@ void DolphinSearchBox::setSearchPath(const KUrl& url) { 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 |
