]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Forwardport 773570:
authorDavid Faure <faure@kde.org>
Mon, 11 Feb 2008 12:44:46 +0000 (12:44 +0000)
committerDavid Faure <faure@kde.org>
Mon, 11 Feb 2008 12:44:46 +0000 (12:44 +0000)
Factorize all the view-related action handling to DolphinViewActionHandler, to remove code duplication between mainwindow and part, and to remove my code-splitting with the static createFooAction methods in the view.

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

1  2 
src/CMakeLists.txt
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinview.cpp
src/dolphinview.h

index deb1b3bb6d8e9a5c0ed30161f761548d18e9fe5b,b2cdfd582e8546d398aae6c34143985ac4f007ab..f5a6c3ed9c993307fd1e1f40d8287aabbe27c5c1
@@@ -23,13 -19,15 +23,14 @@@ set(dolphinprivate_LIB_SRC
      dolphinmodel.cpp
      dolphinsettings.cpp
      dolphincategorydrawer.cpp
 -    viewproperties.cpp
 -    dolphinsortfilterproxymodel.cpp
 -    renamedialog.cpp
      dolphinview.cpp
+     dolphinviewactionhandler.cpp
 +    iconmanager.cpp
      ratingpainter.cpp
 -    dolphindropcontroller.cpp
 +    renamedialog.cpp
 +    selectiontoggle.cpp
 +    selectionmanager.cpp
 +    viewproperties.cpp
      )
  
  kde4_add_kcfg_files(dolphinprivate_LIB_SRCS
index afabdf9838d57a95828914219fa2a3c91bb1f612,c1d6cef39b583d0f1e90ac1f5388a3448524e40d..160c423ecc038979fbe8423300d3e56542be1468
@@@ -58,9 -60,7 +59,8 @@@
  #include <kmenu.h>
  #include <kmenubar.h>
  #include <kmessagebox.h>
 +#include <kurlnavigator.h>
  #include <konqmimedata.h>
- #include <konq_operations.h>
  #include <kpropertiesdialog.h>
  #include <kprotocolinfo.h>
  #include <ktoggleaction.h>
@@@ -246,26 -224,6 +224,13 @@@ void DolphinMainWindow::slotSortingChan
      }
  }
  
- void DolphinMainWindow::slotSortOrderChanged(Qt::SortOrder order)
- {
-     QAction* descending = actionCollection()->action("descending");
-     const bool sortDescending = (order == Qt::DescendingOrder);
-     descending->setChecked(sortDescending);
- }
- void DolphinMainWindow::slotAdditionalInfoChanged()
- {
-     DolphinView* view = m_activeViewContainer->view();
-     view->updateAdditionalInfoActions(actionCollection());
- }
 +void DolphinMainWindow::slotEditableStateChanged(bool editable)
 +{
 +    KToggleAction* editableLocationAction =
 +        static_cast<KToggleAction*>(actionCollection()->action("editable_location"));
 +    editableLocationAction->setChecked(editable);
 +}
 +
  void DolphinMainWindow::slotSelectionChanged(const KFileItemList& selection)
  {
      updateEditActions();
index edc5c1bd657a358b0cb4149d9654fdc502a19a1c,b1694c323ac4869b94328ab658b85a2ef9e47001..bddeba7b1d42721e7e361f1932d8d670ec626b20
@@@ -305,14 -270,8 +270,8 @@@ private slots
       */
      void toggleFilterBarVisibility(bool show);
  
-     /** Increases the size of the current set view mode. */
-     void zoomIn();
-     /** Decreases the size of the current set view mode. */
-     void zoomOut();
      /**
 -     * Toggles between edit and brose mode of the navigation bar.
 +     * Toggles between edit and browse mode of the navigation bar.
       */
      void toggleEditLocation();
  
      /** Updates the state of the 'Sort by' actions. */
      void slotSortingChanged(DolphinView::Sorting sorting);
  
-     /** Updates the state of the 'Sort Ascending/Descending' action. */
-     void slotSortOrderChanged(Qt::SortOrder order);
-     /** Updates the state of the 'Additional Information' actions. */
-     void slotAdditionalInfoChanged();
 +    /** Updates the state of the 'Show Full Location' action. */
 +    void slotEditableStateChanged(bool editable);
 +
      /**
       * Updates the state of the 'Edit' menu actions and emits
       * the signal selectionChanged().
Simple merge
Simple merge