mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-14 14:07:35 -08:00
don't call alert() when a message in a public chat is received
This commit is contained in:
@@ -9,7 +9,7 @@ class TabSupervisor;
|
||||
class Tab : public QWidget {
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void userEvent();
|
||||
void userEvent(bool globalEvent = true);
|
||||
protected:
|
||||
QMenu *tabMenu;
|
||||
TabSupervisor *tabSupervisor;
|
||||
|
||||
@@ -262,5 +262,5 @@ void TabRoom::processLeaveRoomEvent(Event_LeaveRoom *event)
|
||||
void TabRoom::processSayEvent(Event_RoomSay *event)
|
||||
{
|
||||
chatView->appendMessage(event->getPlayerName(), event->getMessage());
|
||||
emit userEvent();
|
||||
emit userEvent(false);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void TabSupervisor::retranslateUi()
|
||||
|
||||
int TabSupervisor::myAddTab(Tab *tab)
|
||||
{
|
||||
connect(tab, SIGNAL(userEvent()), this, SLOT(tabUserEvent()));
|
||||
connect(tab, SIGNAL(userEvent(bool)), this, SLOT(tabUserEvent(bool)));
|
||||
return addTab(tab, tab->getTabText());
|
||||
}
|
||||
|
||||
@@ -299,14 +299,15 @@ void TabSupervisor::talkLeft(TabMessage *tab)
|
||||
removeTab(indexOf(tab));
|
||||
}
|
||||
|
||||
void TabSupervisor::tabUserEvent()
|
||||
void TabSupervisor::tabUserEvent(bool globalEvent)
|
||||
{
|
||||
Tab *tab = static_cast<Tab *>(sender());
|
||||
if (tab != currentWidget()) {
|
||||
tab->setContentsChanged(true);
|
||||
setTabIcon(indexOf(tab), *tabChangedIcon);
|
||||
}
|
||||
QApplication::alert(this);
|
||||
if (globalEvent)
|
||||
QApplication::alert(this);
|
||||
}
|
||||
|
||||
void TabSupervisor::processRoomEvent(RoomEvent *event)
|
||||
|
||||
@@ -78,7 +78,7 @@ private slots:
|
||||
void processUserLeft(const QString &userName);
|
||||
void processUserJoined(const QString &userName);
|
||||
void talkLeft(TabMessage *tab);
|
||||
void tabUserEvent();
|
||||
void tabUserEvent(bool globalEvent);
|
||||
void processRoomEvent(RoomEvent *event);
|
||||
void processGameEventContainer(GameEventContainer *cont);
|
||||
void processMessageEvent(Event_Message *event);
|
||||
|
||||
Reference in New Issue
Block a user