updateViewActions();\r
}\r
\r
+void DolphinMainWindow::slotShowPreviewChanged()\r
+{\r
+ // It is not enough to update the 'Show Preview' action, also\r
+ // the 'Zoom In' and 'Zoom Out' actions must be adapted.\r
+ updateViewActions();\r
+}\r
+\r
void DolphinMainWindow::slotShowHiddenFilesChanged()\r
{\r
KToggleAction* showHiddenFilesAction =\r
void DolphinMainWindow::slotUrlChanged(const KUrl& url)\r
{\r
updateEditActions();\r
+ updateViewActions();\r
updateGoActions();\r
setCaption(url.fileName());\r
}\r
connect(menu, SIGNAL(aboutToShow()),\r
this, SLOT(updateNewMenu()));\r
\r
- QAction* action = actionCollection()->addAction("new_window");\r
- action->setIcon(KIcon("window_new"));\r
- action->setText(i18n("New &Window"));\r
- connect(action, SIGNAL(triggered()), this, SLOT(openNewMainWindow()));\r
+ QAction* newWindow = actionCollection()->addAction("new_window");\r
+ newWindow->setIcon(KIcon("window_new"));\r
+ newWindow->setText(i18n("New &Window"));\r
+ newWindow->setShortcut(Qt::CTRL | Qt::Key_N);\r
+ connect(newWindow, SIGNAL(triggered()), this, SLOT(openNewMainWindow()));\r
\r
QAction* rename = actionCollection()->addAction("rename");\r
rename->setText(i18n("Rename"));\r
\r
QAction* deleteAction = actionCollection()->addAction("delete");\r
deleteAction->setText(i18n("Delete"));\r
- deleteAction->setShortcut(Qt::ALT | Qt::Key_Delete);\r
+ deleteAction->setShortcut(Qt::SHIFT | Qt::Key_Delete);\r
deleteAction->setIcon(KIcon("editdelete"));\r
connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItems()));\r
\r
static_cast<KToggleAction*>(actionCollection()->action("show_filter_bar"));\r
showFilterBarAction->setChecked(m_activeView->isFilterBarVisible());\r
\r
+ KToggleAction* showPreviewAction =\r
+ static_cast<KToggleAction*>(actionCollection()->action("show_preview"));\r
+ showPreviewAction->setChecked(m_activeView->showPreview());\r
+\r
KToggleAction* showHiddenFilesAction =\r
static_cast<KToggleAction*>(actionCollection()->action("show_hidden_files"));\r
showHiddenFilesAction->setChecked(m_activeView->showHiddenFiles());\r
DolphinView* view = m_view[viewIndex];\r
connect(view, SIGNAL(modeChanged()),\r
this, SLOT(slotViewModeChanged()));\r
+ connect(view, SIGNAL(showPreviewChanged()),\r
+ this, SLOT(slotShowPreviewChanged()));\r
connect(view, SIGNAL(showHiddenFilesChanged()),\r
this, SLOT(slotShowHiddenFilesChanged()));\r
connect(view, SIGNAL(sortingChanged(DolphinView::Sorting)),\r