- Fixed crash when closing the main window without the setting "Minimize to Tray Icon"

- Renamed the setting "Do not Minimize to Tray Icon" to "Minimize to Tray Icon" and fixed wrong usage
  Please check your setting!
- Updated english translation


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6557 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-08-04 23:53:29 +00:00
parent e763f46aee
commit c4c5eb5399
6 changed files with 70 additions and 91 deletions

View file

@ -1012,30 +1012,26 @@ void MainWindow::displayErrorMessage(int /*a*/,int /*b*/,const QString& error_ms
void MainWindow::closeEvent(QCloseEvent *e)
{
static bool firstTime = true;
e->ignore();
if(!Settings->getCloseToTray())
{
if (trayIcon->isVisible()) {
if (firstTime)
{
if (Settings->getCloseToTray())
{
if (trayIcon->isVisible()) {
/*****
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();
}
}
else
{
rsicontrol->rsGlobalShutDown();
rApp->quit();
}
static bool firstTime = true;
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();
}
return;
}
doQuit();
}
void MainWindow::updateMenu()