X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/9c8e7f4e43d23c6d014ca4ffe2083ad8cc737753..e8851fb22724fec6a72b2cee5280b526807ed445:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 2585a7b82..edb57ef7f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -250,6 +250,13 @@ void DolphinMainWindow::slotViewModeChanged() updateViewActions(); } +void DolphinMainWindow::slowShowPreviewChanged() +{ + KToggleAction* showPreviewAction = + static_cast(actionCollection()->action("show_preview")); + showPreviewAction->setChecked(m_activeView->showPreview()); +} + void DolphinMainWindow::slotShowHiddenFilesChanged() { KToggleAction* showHiddenFilesAction = @@ -994,10 +1001,11 @@ void DolphinMainWindow::setupActions() connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateNewMenu())); - QAction* action = actionCollection()->addAction("new_window"); - action->setIcon(KIcon("window_new")); - action->setText(i18n("New &Window")); - connect(action, SIGNAL(triggered()), this, SLOT(openNewMainWindow())); + QAction* newWindow = actionCollection()->addAction("new_window"); + newWindow->setIcon(KIcon("window_new")); + newWindow->setText(i18n("New &Window")); + newWindow->setShortcut(Qt::CTRL | Qt::Key_N); + connect(newWindow, SIGNAL(triggered()), this, SLOT(openNewMainWindow())); QAction* rename = actionCollection()->addAction("rename"); rename->setText(i18n("Rename")); @@ -1012,7 +1020,7 @@ void DolphinMainWindow::setupActions() QAction* deleteAction = actionCollection()->addAction("delete"); deleteAction->setText(i18n("Delete")); - deleteAction->setShortcut(Qt::ALT | Qt::Key_Delete); + deleteAction->setShortcut(Qt::SHIFT | Qt::Key_Delete); deleteAction->setIcon(KIcon("editdelete")); connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItems())); @@ -1289,6 +1297,10 @@ void DolphinMainWindow::updateViewActions() static_cast(actionCollection()->action("show_filter_bar")); showFilterBarAction->setChecked(m_activeView->isFilterBarVisible()); + KToggleAction* showPreviewAction = + static_cast(actionCollection()->action("show_preview")); + showPreviewAction->setChecked(m_activeView->showPreview()); + KToggleAction* showHiddenFilesAction = static_cast(actionCollection()->action("show_hidden_files")); showHiddenFilesAction->setChecked(m_activeView->showHiddenFiles()); @@ -1336,6 +1348,8 @@ void DolphinMainWindow::connectViewSignals(int viewIndex) DolphinView* view = m_view[viewIndex]; connect(view, SIGNAL(modeChanged()), this, SLOT(slotViewModeChanged())); + connect(view, SIGNAL(showPreviewChanged()), + this, SLOT(slowShowPreviewChanged())); connect(view, SIGNAL(showHiddenFilesChanged()), this, SLOT(slotShowHiddenFilesChanged())); connect(view, SIGNAL(sortingChanged(DolphinView::Sorting)),