diff options
| author | Sebastian Dörner <[email protected]> | 2011-05-25 22:14:14 +0100 |
|---|---|---|
| committer | Sebastian Dörner <[email protected]> | 2011-05-25 22:19:11 +0100 |
| commit | 603ec47b8b1221c8fdf5ff2eaaae0a6a9fcc4880 (patch) | |
| tree | 9eecd28b36544585b1b288c987ac29637160ade1 /src/panels | |
| parent | f192c0d663c43c7c9cd7babf14c4ffb52c55f7b2 (diff) | |
Don't let hidden terminals prevent unmounting
Previous state: When the terminal is hidden, the cwd is not updated
anymore. If it was on a removable device when hiding, the hidden
terminal might prevent unmounting this device.
This patch fixes that bug by changing the cwd to "/" when hiding the panel.
REVIEW: 101387
BUG: 158264
FIXED-IN: 4.7.0
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 8 | ||||
| -rw-r--r-- | src/panels/terminal/terminalpanel.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 8977111f8..b45be621a 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -54,6 +54,14 @@ void TerminalPanel::terminalExited() m_terminal = 0; } +void TerminalPanel::visibilityChanged(bool visible) +{ + if (!visible && m_terminal && (m_terminal->foregroundProcessId() == -1)) { + // Make sure this terminal does not prevent unmounting any removable drives + changeDir(KUrl::fromPath("/")); + } +} + bool TerminalPanel::urlChanged() { if (!url().isValid()) { diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h index e4d76d54c..288cb05d3 100644 --- a/src/panels/terminal/terminalpanel.h +++ b/src/panels/terminal/terminalpanel.h @@ -44,6 +44,7 @@ public: public slots: void terminalExited(); + void visibilityChanged(bool visible); signals: void hideTerminalPanel(); |
