From kde-commits Sat Aug 01 18:48:52 2009 From: George Kiagiadakis Date: Sat, 01 Aug 2009 18:48:52 +0000 To: kde-commits Subject: playground/network/kcall Message-Id: <1249152532.482583.21327.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=124915254323834 SVN commit 1005680 by gkiagia: When the main window is about to be closed, show a messagebox informing the user that kcall will stay in the systray. M +10 -0 mainwindow.cpp M +3 -0 mainwindow.h --- trunk/playground/network/kcall/mainwindow.cpp #1005679:1005680 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -149,4 +150,13 @@ "org.freedesktop.Telepathy.Client.kcall_handler"); } +void MainWindow::closeEvent(QCloseEvent *event) +{ + KMessageBox::information(this, i18n("You have requested to close KCall. Note that KCall will " + "not actually quit, but it will stay active in the system " + "tray waiting for incoming calls."), + QString(), QLatin1String("CloseEventTrayNotification")); + KXmlGuiWindow::closeEvent(event); +} + #include "mainwindow.moc" --- trunk/playground/network/kcall/mainwindow.h #1005679:1005680 @@ -35,6 +35,9 @@ void onDialVideoButtonClicked(); void makeDirectCall(bool useVideo); +protected: + virtual void closeEvent(QCloseEvent *event); + private: void setupActions(); struct Private;