]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Move "Adjust view properties" to dolphinviewactionhandler so that it's available...
authorDavid Faure <faure@kde.org>
Sun, 4 May 2008 21:16:30 +0000 (21:16 +0000)
committerDavid Faure <faure@kde.org>
Sun, 4 May 2008 21:16:30 +0000 (21:16 +0000)
Bug reported by kde-bug-hunter "lemma".

svn path=/trunk/KDE/kdebase/apps/; revision=804037

src/CMakeLists.txt
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinviewactionhandler.cpp
src/dolphinviewactionhandler.h
src/viewpropertiesdialog.h

index 6bac07194d0d8a96b267859b504f6b86017ed0e9..03e952ac6ef5bc0db0744b0c80876245b9bc633f 100644 (file)
@@ -35,6 +35,10 @@ set(dolphinprivate_LIB_SRCS
     selectionmanager.cpp
     tooltipmanager.cpp
     viewproperties.cpp
+    viewpropertiesdialog.cpp
+    viewpropsprogressinfo.cpp
+    additionalinfodialog.cpp
+    applyviewpropsjob.cpp
     )
 
 kde4_add_kcfg_files(dolphinprivate_LIB_SRCS
@@ -84,8 +88,6 @@ install(FILES dolphinpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
 ##########################################
 
 set(dolphin_SRCS
-    additionalinfodialog.cpp
-    applyviewpropsjob.cpp
     columnviewsettingspage.cpp
     commentwidget.cpp
     commenteditwidget.cpp
@@ -121,10 +123,9 @@ set(dolphin_SRCS
     treeviewcontextmenu.cpp
     treeviewsidebarpage.cpp
     sidebartreeview.cpp
-    viewpropertiesdialog.cpp
     viewsettingspage.cpp
     viewsettingspagebase.cpp
-    viewpropsprogressinfo.cpp)
+    )
 
 kde4_add_kcfg_files(dolphin_SRCS
     dolphin_folderspanelsettings.kcfgc)
index 8e07123f99ca9ae5b6d502420fb7a55932d79bfb..afa6ea43f71b5f67d4428e5581054db6207eb428 100644 (file)
@@ -37,7 +37,6 @@
 #include "metadatawidget.h"
 #include "mainwindowadaptor.h"
 #include "treeviewsidebarpage.h"
-#include "viewpropertiesdialog.h"
 #include "viewproperties.h"
 
 #ifndef Q_OS_WIN
@@ -562,13 +561,6 @@ void DolphinMainWindow::editLocation()
     lineEdit->setSelection(0, text.length());
 }
 
-void DolphinMainWindow::adjustViewProperties()
-{
-    clearStatusBar();
-    ViewPropertiesDialog dlg(m_activeViewContainer->view());
-    dlg.exec();
-}
-
 void DolphinMainWindow::goBack()
 {
     clearStatusBar();
@@ -976,10 +968,6 @@ void DolphinMainWindow::setupActions()
     editLocation->setShortcut(Qt::Key_F6);
     connect(editLocation, SIGNAL(triggered()), this, SLOT(editLocation()));
 
-    KAction* adjustViewProps = actionCollection()->addAction("view_properties");
-    adjustViewProps->setText(i18nc("@action:inmenu View", "Adjust View Properties..."));
-    connect(adjustViewProps, SIGNAL(triggered()), this, SLOT(adjustViewProperties()));
-
     // setup 'Go' menu
     KAction* backAction = KStandardAction::back(this, SLOT(goBack()), actionCollection());
     KShortcut backShortcut = backAction->shortcut();
index 47fddf381aeaaf6f3327f7e92d54bdd0de9eee84..c03e2404d460ee99743d73d7747dd0dbe62fcf92 100644 (file)
@@ -254,12 +254,6 @@ private slots:
      */
     void editLocation();
 
-    /**
-     * Opens the view properties dialog, which allows to modify the properties
-     * of the currently active view.
-     */
-    void adjustViewProperties();
-
     /** Goes back on step of the URL history. */
     void goBack();
 
index f382a10c1a6c872634a1335469723a5665dc9484..938ce785d996035b3004c4048fa1aa49cd02024b 100644 (file)
  ***************************************************************************/
 
 #include "dolphinviewactionhandler.h"
-#include <kdebug.h>
 
+#include "viewpropertiesdialog.h"
 #include "dolphinview.h"
 
 #include <konq_operations.h>
 
 #include <kaction.h>
 #include <kactioncollection.h>
+#include <kdebug.h>
 #include <klocale.h>
 #include <ktoggleaction.h>
 
@@ -132,6 +133,9 @@ void DolphinViewActionHandler::createActions()
     showHiddenFiles->setShortcut(Qt::ALT | Qt::Key_Period);
     connect(showHiddenFiles, SIGNAL(triggered(bool)), this, SLOT(toggleShowHiddenFiles(bool)));
 
+    KAction* adjustViewProps = m_actionCollection->addAction("view_properties");
+    adjustViewProps->setText(i18nc("@action:inmenu View", "Adjust View Properties..."));
+    connect(adjustViewProps, SIGNAL(triggered()), this, SLOT(slotAdjustViewProperties()));
 }
 
 QActionGroup* DolphinViewActionHandler::createAdditionalInformationActionGroup()
@@ -471,3 +475,10 @@ void DolphinViewActionHandler::slotSortTriggered(QAction* action)
     const DolphinView::Sorting sorting = action->data().value<DolphinView::Sorting>();
     m_currentView->setSorting(sorting);
 }
+
+void DolphinViewActionHandler::slotAdjustViewProperties()
+{
+    emit actionBeingHandled();
+    ViewPropertiesDialog dlg(m_currentView);
+    dlg.exec();
+}
index 4eb856387b28d2d4312ca359c78072bc5b8affb8..4cc63b86ae46a596d3501783f243e0a9a65869f3 100644 (file)
@@ -167,6 +167,12 @@ private Q_SLOTS:
      */
     void slotShowHiddenFilesChanged();
 
+    /**
+     * Opens the view properties dialog, which allows to modify the properties
+     * of the currently active view.
+     */
+    void slotAdjustViewProperties();
+
 private:
     /**
      * Create all the actions.
index a0a933f557123b27374483d8826273ec33bd5e66..6d0be52fc3cafc0c7625621c908112a51fa3df0e 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef VIEWPROPERTIESDIALOG_H
 #define VIEWPROPERTIESDIALOG_H
 
+#include "libdolphin_export.h"
+
 #include <kdialog.h>
 
 class QCheckBox;
@@ -37,7 +39,7 @@ class DolphinView;
  * and previews should be shown. The properties can be assigned to the current folder,
  * or recursively to all sub folders.
  */
-class ViewPropertiesDialog : public KDialog
+class LIBDOLPHINPRIVATE_EXPORT ViewPropertiesDialog : public KDialog
 {
     Q_OBJECT