From adde3d4e3cd21d35be78c6a827b4b69a05d6e10c Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 15 Dec 2010 18:40:08 +0000 Subject: Fix issue that the enabled state of the "Create New..." menu is not updated correctly in the column-view. BUG: 258534 FIXED-IN: 4.6.0 svn path=/trunk/KDE/kdebase/apps/; revision=1206749 --- src/views/dolphinview.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/views/dolphinview.h') diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index bb6108e1a..91909710f 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -529,6 +529,13 @@ signals: */ void redirection(const KUrl& oldUrl, const KUrl& newUrl); + /** + * Is emitted when the write state of the folder has been changed. The application + * should disable all actions like "Create New..." that depend on the write + * state. + */ + void writeStateChanged(bool isFolderWritable); + protected: /** @see QWidget::mouseReleaseEvent */ virtual void mouseReleaseEvent(QMouseEvent* event); @@ -623,6 +630,12 @@ private slots: */ void slotDeleteFileFinished(KJob* job); + /** + * Invoked when the directory lister has been started the + * loading of \a url. + */ + void slotDirListerStarted(const KUrl& url); + /** * Invoked when the directory lister has completed the loading of * items. Assures that pasted items and renamed items get seleced. @@ -666,6 +679,8 @@ private slots: */ void restoreContentsPosition(); + void slotUrlChangeRequested(const KUrl& url); + private: void loadDirectory(const KUrl& url, bool reload = false); @@ -726,6 +741,13 @@ private: void connectViewAccessor(); void disconnectViewAccessor(); + /** + * Updates m_isFolderWritable dependent on whether the folder represented by + * the current URL is writable. If the state has changed, the signal + * writeableStateChanged() will be emitted. + */ + void updateWritableState(); + private: /** * Abstracts the access to the different view implementations @@ -795,6 +817,7 @@ private: bool m_isContextMenuOpen : 1; // TODO: workaround for Qt-issue 207192 bool m_assureVisibleCurrentIndex : 1; bool m_expanderActive : 1; + bool m_isFolderWritable : 1; Mode m_mode; -- cgit v1.3