Mention popup fix

+ will now only popup with a mention alert when you are not on the same
tab/window.
+ will also no longer popup by mentioning yourself
This commit is contained in:
Matt Lowe 2015-04-05 12:43:02 +02:00
parent 8ca2135f08
commit b20ae9710c
4 changed files with 15 additions and 5 deletions

View file

@ -5,13 +5,11 @@
#include <QDesktopServices>
#include <QApplication>
#include <QDebug>
#include <QSystemTrayIcon>
#include "chatview.h"
#include "user_level.h"
#include "user_context_menu.h"
#include "pixmapgenerator.h"
#include "settingscache.h"
#include "main.h"
#include "tab_userlists.h"
const QColor DEFAULT_MENTION_COLOR = QColor(194, 31, 47);
@ -282,9 +280,7 @@ bool ChatView::shouldShowSystemPopup() {
}
void ChatView::showSystemPopup(QString &sender) {
disconnect(trayIcon, SIGNAL(messageClicked()), 0, 0);
trayIcon->showMessage(sender + tr(" mentioned you."), tr("Click to view"));
connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(actMessageClicked()));
emit showMentionPopup(sender);
}