From a46551d63efd09b34fe33766533f6f5333737f22 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 28 Feb 2007 19:17:26 +0000 Subject: Jippie: file previews are generated again! Thanks to Fredrik for giving me a hint how to do it (if I would have known that it is so easy, I'd have implemented it already some weeks ago...). It's very nice that the details view now also is able to show previews (Kudos to Interview & KDirModel). svn path=/trunk/KDE/kdebase/apps/; revision=638081 --- src/dolphinmainwindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 7a0ff6c6a..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 = @@ -1290,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()); @@ -1337,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)), -- cgit v1.3