Fix tray tooltip again

This commit is contained in:
Klaas Freitag 2012-05-14 13:23:04 +02:00
parent f913790f29
commit 5a443bde70

View file

@ -413,9 +413,14 @@ void Application::slotRemoveFolder( const QString& alias )
if( ret == QMessageBox::No ) { if( ret == QMessageBox::No ) {
return; return;
} }
Folder *f = _folderMan->folder(alias);
if( f && _overallStatusStrings.contains( f )) {
_overallStatusStrings.remove( f );
}
_folderMan->slotRemoveFolder( alias ); _folderMan->slotRemoveFolder( alias );
_statusDialog->slotRemoveSelectedFolder( ); _statusDialog->slotRemoveSelectedFolder( );
computeOverallSyncStatus();
setupContextMenu(); setupContextMenu();
} }
@ -623,7 +628,10 @@ void Application::computeOverallSyncStatus()
// create the tray blob message // create the tray blob message
QStringList allStatusStrings = _overallStatusStrings.values(); QStringList allStatusStrings = _overallStatusStrings.values();
trayMessage = allStatusStrings.join("\n"); if( ! allStatusStrings.isEmpty() )
trayMessage = allStatusStrings.join("\n");
else
trayMessage = tr("No sync folders configured.");
QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 48 ); QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 48 );