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
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
#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>
}
}
- 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();
*/
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().