From b5de4d8ffb3823c6c4bc0ce3d47e74bfa3970d5e Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 29 Jun 2008 13:54:52 +0000 Subject: Don't disable the "Properties" action when no file is selected, just use the current folder as source. TODO: the code in DolphinPart::slotProperties() and DolphinMainWindow::properties() is quite similar -> move to DolphinViewActionHandler? CCMAIL: faure@kde.org BUG: 165311 svn path=/trunk/KDE/kdebase/apps/; revision=825846 --- src/dolphinmainwindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 46937fe1a..6822250e1 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -355,9 +355,15 @@ void DolphinMainWindow::updateNewMenu() void DolphinMainWindow::properties() { + KPropertiesDialog* dialog = 0; const KFileItemList list = m_activeViewContainer->view()->selectedItems(); + if (list.isEmpty()) { + const KUrl url = activeViewContainer()->url(); + dialog = new KPropertiesDialog(url, this); + } else { + dialog = new KPropertiesDialog(list, this); + } - KPropertiesDialog *dialog = new KPropertiesDialog(list, this); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show(); dialog->raise(); -- cgit v1.3