┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.h
diff options
context:
space:
mode:
authorMiklos Marton <[email protected]>2017-10-12 23:17:51 +0200
committerElvis Angelaccio <[email protected]>2017-10-12 23:21:49 +0200
commitbd47eb2e6d80315115bb3f58987162fcb4911b10 (patch)
treed51172264a047f02e235cc2e78371330336e4792 /src/dolphinmainwindow.h
parent1ad3b7775ec7388352d3a02c704062baa5d0aca3 (diff)
Don't block unmounting when terminal panel's cwd is the mountpoint
When unmounting a removable media Dolphin checks if there are some files open on the device before performing the unmount. If the terminal window in dolphin is open and the to be unmounted path is open, the unmount process will be blocked. This patch sets the terminal window current path to the home directory upon unmount request if the terminal directory is set to the mount path. The unmount request could came from two sources: The user could hit right click on the media in the dolphin's places panel and hit unmount. The user could request an unmount from the indicator applet This patch was originally written by Arjun AK for the kdelibs4 version of Dolphin: https://git.reviewboard.kde.org/r/121613/ BUG: 158264 FIXED-IN: 17.11.80 Differential Revision: https://phabricator.kde.org/D7847
Diffstat (limited to 'src/dolphinmainwindow.h')
-rw-r--r--src/dolphinmainwindow.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index 06eb5a7a5..634c2a9e7 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -46,6 +46,8 @@ class KJob;
class KNewFileMenu;
class QToolButton;
class QIcon;
+class PlacesPanel;
+class TerminalPanel;
/**
* @short Main window for Dolphin.
@@ -90,6 +92,8 @@ public:
*/
KNewFileMenu* newFileMenu() const;
+ void setTabsToHomeIfMountPathOpen(const QString& mountPath);
+
public slots:
/**
* Pastes the clipboard data into the currently selected folder
@@ -410,6 +414,21 @@ private slots:
void setUrlAsCaption(const QUrl& url);
/**
+ * This slot is called when the user requested to unmount a removable media
+ * from the places menu
+ */
+ void slotStorageTearDownFromPlacesRequested(const QString& mountPath);
+
+ /**
+ * This slot is called when the user requested to unmount a removable media
+ * _not_ from the dolphin's places menu (from the notification area for e.g.)
+ * This slot is basically connected to each removable device's
+ * Solid::StorageAccess::teardownRequested(const QString & udi)
+ * signal through the places panel.
+ */
+ void slotStorageTearDownExternallyRequested(const QString& mountPath);
+
+ /**
* Is called when the view has finished loading the directory.
*/
void slotDirectoryLoadingCompleted();
@@ -496,6 +515,10 @@ private:
QTimer* m_updateToolBarTimer;
KIO::Job* m_lastHandleUrlStatJob;
+
+ TerminalPanel* m_terminalPanel;
+ PlacesPanel* m_placesPanel;
+ bool m_tearDownFromPlacesRequested;
};
inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const