diff options
| author | Dawit Alemayehu <[email protected]> | 2011-06-21 23:00:28 -0400 |
|---|---|---|
| committer | Dawit Alemayehu <[email protected]> | 2011-07-03 16:17:06 -0400 |
| commit | 02c3dc16afce6b9aa9738c285ab973eb87033d6e (patch) | |
| tree | 0a510fdb51f74bded8897b43b40c4689ce7e591e /src/views | |
| parent | ca5d3fde114dfdb280e46995e8a425d3ec558596 (diff) | |
Squeeze the filename shown in the rename dialog when it is too long
and show the full name in a tool tip instead.
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/renamedialog.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index c0c6ad58c..830884dc2 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -65,9 +65,12 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) : QLabel* editLabel = 0; if (m_renameOneItem) { - m_newName = items.first().name(); - editLabel = new QLabel(i18nc("@label:textbox", "Rename the item <filename>%1</filename> to:", m_newName), - page); + m_newName = items.first().name(); + editLabel = new QLabel(i18nc("@label:textbox", "Rename the item <filename>%1</filename> to:", + KStringHandler::csqueeze(m_newName)), page); + if (m_newName.size() > 40) { + editLabel->setToolTip(m_newName); // Set the filename as a the tool tip... + } } else { m_newName = i18nc("@info:status", "New name #"); editLabel = new QLabel(i18ncp("@label:textbox", |
