]> cloud.milkyroute.net Git - dolphin.git/commitdiff
And finally: provide those "additional info" actions in the part too.
authorDavid Faure <faure@kde.org>
Tue, 22 Jan 2008 01:36:28 +0000 (01:36 +0000)
committerDavid Faure <faure@kde.org>
Tue, 22 Jan 2008 01:36:28 +0000 (01:36 +0000)
svn path=/branches/KDE/4.0/kdebase/apps/; revision=764549

src/dolphinpart.cpp
src/dolphinpart.h

index e7c919ad8457bd128ca1a9099635a7b75a0e402a..f144109cbd4cb744acea2f75168c51aa6c1d0d4c 100644 (file)
@@ -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"
index 883cf945631f3d57225d2bc8b2e6cf24e3cca771..3d9ec0306973bcddaf3ba4f2afa70490591e8daf 100644 (file)
@@ -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,