added Enable disable minimize to Tray feature when closing RetroShare

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1614 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-09-08 12:34:18 +00:00
parent 700fd1d72f
commit 26b149429b
4 changed files with 36 additions and 7 deletions

View file

@ -515,18 +515,27 @@ void MainWindow::closeEvent(QCloseEvent *e)
{
static bool firstTime = true;
if (trayIcon->isVisible()) {
if (firstTime)
{
if(!_settings->value(QString::fromUtf8("ClosetoTray"), false).toBool())
{
if (trayIcon->isVisible()) {
if (firstTime)
{
/*****
QMessageBox::information(this, tr("RetroShare System tray"),
tr("Application will continue running. Quit using context menu in the system tray"));
*****/
firstTime = false;
}
hide();
e->ignore();
}
}
hide();
e->ignore();
}
}
else
{
rsicontrol->rsGlobalShutDown();
qApp->quit();
}
}