From d52282f8a2a727ad332d4cceeeaa6b79af9267c1 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 25 Jan 2007 22:28:04 +0000 Subject: First step for making the details view usable again: - accept drops - Automatically resize the columns in a way that the whole available width is used by stretching the width of the 'Name' column. Qt4's QTreeView really rocks, only a few lines of code had been necessary to get this behavior :-) svn path=/trunk/playground/utils/dolphin/; revision=627189 --- src/dolphinmainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 300d99d92..eae9ca31a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -160,7 +160,7 @@ void DolphinMainWindow::dropUrls(const KUrl::List& urls, i18n("&Link Here") + "\t" + seq); popup.addSeparator(); - popup.addAction(KIcon("stop"), i18n("Cancel")); + QAction* cancelAction = popup.addAction(KIcon("stop"), i18n("Cancel")); QAction* activatedAction = popup.exec(QCursor::pos()); if (activatedAction == moveAction) { @@ -172,6 +172,9 @@ void DolphinMainWindow::dropUrls(const KUrl::List& urls, else if (activatedAction == linkAction) { action = Qt::LinkAction; } + else if (activatedAction == cancelAction) { + return; + } } switch (action) { -- cgit v1.3