mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
fixed settings for tray message enable/disable
now it can be enabled and disabled at runtime git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3141 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6d3db4ae66
commit
1585859896
7 changed files with 90 additions and 73 deletions
|
@ -357,6 +357,20 @@ void MainWindow::createTrayIcon()
|
|||
trayIcon->show();
|
||||
}
|
||||
|
||||
/*static*/ void MainWindow::installGroupChatNotifier()
|
||||
{
|
||||
if (_instance == NULL) {
|
||||
// nothing to do
|
||||
return;
|
||||
}
|
||||
|
||||
if(Settings->getDisplayTrayGroupChat()) {
|
||||
QObject::connect(_instance->peersDialog, SIGNAL(notifyGroupChat(const QString&,const QString&)), _instance, SLOT(displaySystrayMsg(const QString&,const QString&)), Qt::QueuedConnection);
|
||||
} else {
|
||||
QObject::disconnect(_instance->peersDialog, SIGNAL(notifyGroupChat(const QString&,const QString&)), _instance, SLOT(displaySystrayMsg(const QString&,const QString&)));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::displaySystrayMsg(const QString& title,const QString& msg)
|
||||
{
|
||||
trayIcon->showMessage(title, msg, QSystemTrayIcon::Information, 3000);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue