From: Dawit Alemayehu Date: Wed, 22 Jun 2011 03:00:28 +0000 (-0400) Subject: Squeeze the filename shown in the rename dialog when it is too long X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/02c3dc16afce6b9aa9738c285ab973eb87033d6e Squeeze the filename shown in the rename dialog when it is too long and show the full name in a tool tip instead. --- 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",