[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkde-baseapps=5D_dolphin/src=3A_Fix_problems_with_co?=
From:       Sebastian_Dörner <sebastian () sebastian-doerner ! de>
Date:       2011-06-01 21:00:05
Message-ID: 20110601210005.D37FAA60A4 () git ! kde ! org
[Download RAW message or body]

Git commit 2c05820deffccbeb0ab44facc89295f92c64f0f5 by Sebastian Dörner.
Committed on 01/06/2011 at 22:51.
Pushed by doerner into branch 'master'.

Fix problems with commit 8d789f2626243d

 - fix crash when Ctrl-D-ing in the terminal
 - don't respond to window manager actions, only when the dock itself is
   hidden

Refers to commit 8d789f2626243ddc6c763c84e582e8e20afe7689

M  +1    -1    dolphin/src/dolphinmainwindow.cpp     
M  +6    -3    dolphin/src/panels/terminal/terminalpanel.cpp     
M  +1    -1    dolphin/src/panels/terminal/terminalpanel.h     

http://commits.kde.org/kde-baseapps/2c05820deffccbeb0ab44facc89295f92c64f0f5

diff --git a/dolphin/src/dolphinmainwindow.cpp b/dolphin/src/dolphinmainwindow.cpp
index 3b5f493..4c584cd 100644
--- a/dolphin/src/dolphinmainwindow.cpp
+++ b/dolphin/src/dolphinmainwindow.cpp
@@ -1801,7 +1801,7 @@ void DolphinMainWindow::setupDockWidgets()
 
     connect(terminalPanel, SIGNAL(hideTerminalPanel()), terminalDock, SLOT(hide()));
     connect(terminalDock, SIGNAL(visibilityChanged(bool)),
-            terminalPanel, SLOT(visibilityChanged(bool)));
+            terminalPanel, SLOT(dockVisibilityChanged()));
 
     QAction* terminalAction = terminalDock->toggleViewAction();
     terminalAction->setShortcut(Qt::Key_F4);
diff --git a/dolphin/src/panels/terminal/terminalpanel.cpp \
b/dolphin/src/panels/terminal/terminalpanel.cpp index b45be62..b3bf050 100644
--- a/dolphin/src/panels/terminal/terminalpanel.cpp
+++ b/dolphin/src/panels/terminal/terminalpanel.cpp
@@ -50,13 +50,16 @@ TerminalPanel::~TerminalPanel()
 
 void TerminalPanel::terminalExited()
 {
-    emit hideTerminalPanel();
     m_terminal = 0;
+    emit hideTerminalPanel();
 }
 
-void TerminalPanel::visibilityChanged(bool visible)
+void TerminalPanel::dockVisibilityChanged()
 {
-    if (!visible && m_terminal && (m_terminal->foregroundProcessId() == -1)) {
+    // Only react when the DockWidget itself (not some parent) is hidden. This way \
we don't +    // respond when e.g. Dolphin is minimized.
+    if (parentWidget() && parentWidget()->isHidden() &&
+        m_terminal && (m_terminal->foregroundProcessId() == -1)) {
         // Make sure this terminal does not prevent unmounting any removable drives
         changeDir(KUrl::fromPath("/"));
     }
diff --git a/dolphin/src/panels/terminal/terminalpanel.h \
b/dolphin/src/panels/terminal/terminalpanel.h index 288cb05..cc27212 100644
--- a/dolphin/src/panels/terminal/terminalpanel.h
+++ b/dolphin/src/panels/terminal/terminalpanel.h
@@ -44,7 +44,7 @@ public:
 
 public slots:
     void terminalExited();
-    void visibilityChanged(bool visible);
+    void dockVisibilityChanged();
 
 signals:
     void hideTerminalPanel();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic