From: David Faure Date: Tue, 22 Jan 2008 01:36:28 +0000 (+0000) Subject: And finally: provide those "additional info" actions in the part too. X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/e6dcf5e8ffd8c4fe9a011aba92783d6ad1a7a63c And finally: provide those "additional info" actions in the part too. svn path=/branches/KDE/4.0/kdebase/apps/; revision=764549 --- diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index e7c919ad8..f144109cb 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -95,6 +95,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QStringLi this, SLOT(updateViewActions())); connect(m_view, SIGNAL(sortOrderChanged(Qt::SortOrder)), this, SLOT(slotSortOrderChanged(Qt::SortOrder))); + connect(m_view, SIGNAL(additionalInfoChanged()), + this, SLOT(slotAdditionalInfoChanged())); QClipboard* clipboard = QApplication::clipboard(); connect(clipboard, SIGNAL(dataChanged()), @@ -153,6 +155,9 @@ void DolphinPart::createActions() KAction* sortDescending = DolphinView::createSortDescendingAction(actionCollection()); connect(sortDescending, SIGNAL(triggered()), m_view, SLOT(toggleSortOrder())); + QActionGroup* showInformationActionGroup = DolphinView::createAdditionalInformationActionGroup(actionCollection()); + connect(showInformationActionGroup, SIGNAL(triggered(QAction*)), m_view, SLOT(toggleAdditionalInfo(QAction*))); + // Go menu KAction* newDirAction = DolphinView::createNewDirAction(actionCollection()); @@ -447,4 +452,9 @@ void DolphinPart::slotSortOrderChanged(Qt::SortOrder order) descending->setChecked(sortDescending); } +void DolphinPart::slotAdditionalInfoChanged() +{ + m_view->updateAdditionalInfoActions(actionCollection()); +} + #include "dolphinpart.moc" diff --git a/src/dolphinpart.h b/src/dolphinpart.h index 883cf9456..3d9ec0306 100644 --- a/src/dolphinpart.h +++ b/src/dolphinpart.h @@ -139,6 +139,9 @@ private Q_SLOTS: /** Updates the state of the 'Sort Ascending/Descending' action. */ void slotSortOrderChanged(Qt::SortOrder); + /** Updates the state of the 'Additional Information' actions. */ + void slotAdditionalInfoChanged(); + private: void createActions(); void createGoAction(const char* name, const char* iconName,