aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/notifier/notifierwindowtab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/notifier/notifierwindowtab.cpp')
-rw-r--r--src/modules/notifier/notifierwindowtab.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/notifier/notifierwindowtab.cpp b/src/modules/notifier/notifierwindowtab.cpp
index fdfb487b5..ac1b1f8b5 100644
--- a/src/modules/notifier/notifierwindowtab.cpp
+++ b/src/modules/notifier/notifierwindowtab.cpp
@@ -45,6 +45,7 @@ KviNotifierWindowTab::KviNotifierWindowTab(KviWindow * pWnd, QTabWidget *parent)
{
m_label = m_pWnd->windowName();
connect(pWnd,SIGNAL(windowNameChanged()),this,SLOT(labelChanged()));
+ connect(pWnd,SIGNAL(destroyed()),this,SLOT(closeMe()));
} else {
m_label = (QString)"----";
}
@@ -127,6 +128,19 @@ void KviNotifierWindowTab::mouseDoubleClickEvent(QMouseEvent *)
m_pWnd->frame()->setActiveWindow(m_pWnd);
}
+void KviNotifierWindowTab::closeMe()
+{
+ //our window has been closed
+ if(m_pParent && g_pNotifierWindow)
+ {
+ int index = m_pParent->indexOf(this);
+ if(index!=-1)
+ {
+ g_pNotifierWindow->slotTabCloseRequested(index);
+ }
+ }
+}
+
#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES
#include "m_notifierwindowtab.moc"
#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES