From 02c3dc16afce6b9aa9738c285ab973eb87033d6e Mon Sep 17 00:00:00 2001 From: Dawit Alemayehu Date: Tue, 21 Jun 2011 23:00:28 -0400 Subject: [PATCH] Squeeze the filename shown in the rename dialog when it is too long and show the full name in a tool tip instead. --- src/views/renamedialog.cpp | 9 ++++++--- 1 file 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 %1 to:", m_newName), - page); + m_newName = items.first().name(); + editLabel = new QLabel(i18nc("@label:textbox", "Rename the item %1 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", -- 2.47.3