Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
cc795a2d
Commit
cc795a2d
authored
Jun 25, 2011
by
Max-Wilhelm Bruker
Browse files
don't call alert() when a message in a public chat is received
parent
a4c3d483
Changes
4
Show whitespace changes
Inline
Side-by-side
cockatrice/src/tab.h
View file @
cc795a2d
...
@@ -9,7 +9,7 @@ class TabSupervisor;
...
@@ -9,7 +9,7 @@ class TabSupervisor;
class
Tab
:
public
QWidget
{
class
Tab
:
public
QWidget
{
Q_OBJECT
Q_OBJECT
signals:
signals:
void
userEvent
();
void
userEvent
(
bool
globalEvent
=
true
);
protected:
protected:
QMenu
*
tabMenu
;
QMenu
*
tabMenu
;
TabSupervisor
*
tabSupervisor
;
TabSupervisor
*
tabSupervisor
;
...
...
cockatrice/src/tab_room.cpp
View file @
cc795a2d
...
@@ -262,5 +262,5 @@ void TabRoom::processLeaveRoomEvent(Event_LeaveRoom *event)
...
@@ -262,5 +262,5 @@ void TabRoom::processLeaveRoomEvent(Event_LeaveRoom *event)
void
TabRoom
::
processSayEvent
(
Event_RoomSay
*
event
)
void
TabRoom
::
processSayEvent
(
Event_RoomSay
*
event
)
{
{
chatView
->
appendMessage
(
event
->
getPlayerName
(),
event
->
getMessage
());
chatView
->
appendMessage
(
event
->
getPlayerName
(),
event
->
getMessage
());
emit
userEvent
();
emit
userEvent
(
false
);
}
}
cockatrice/src/tab_supervisor.cpp
View file @
cc795a2d
...
@@ -101,7 +101,7 @@ void TabSupervisor::retranslateUi()
...
@@ -101,7 +101,7 @@ void TabSupervisor::retranslateUi()
int
TabSupervisor
::
myAddTab
(
Tab
*
tab
)
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
());
return
addTab
(
tab
,
tab
->
getTabText
());
}
}
...
@@ -299,13 +299,14 @@ void TabSupervisor::talkLeft(TabMessage *tab)
...
@@ -299,13 +299,14 @@ void TabSupervisor::talkLeft(TabMessage *tab)
removeTab
(
indexOf
(
tab
));
removeTab
(
indexOf
(
tab
));
}
}
void
TabSupervisor
::
tabUserEvent
()
void
TabSupervisor
::
tabUserEvent
(
bool
globalEvent
)
{
{
Tab
*
tab
=
static_cast
<
Tab
*>
(
sender
());
Tab
*
tab
=
static_cast
<
Tab
*>
(
sender
());
if
(
tab
!=
currentWidget
())
{
if
(
tab
!=
currentWidget
())
{
tab
->
setContentsChanged
(
true
);
tab
->
setContentsChanged
(
true
);
setTabIcon
(
indexOf
(
tab
),
*
tabChangedIcon
);
setTabIcon
(
indexOf
(
tab
),
*
tabChangedIcon
);
}
}
if
(
globalEvent
)
QApplication
::
alert
(
this
);
QApplication
::
alert
(
this
);
}
}
...
...
cockatrice/src/tab_supervisor.h
View file @
cc795a2d
...
@@ -78,7 +78,7 @@ private slots:
...
@@ -78,7 +78,7 @@ private slots:
void
processUserLeft
(
const
QString
&
userName
);
void
processUserLeft
(
const
QString
&
userName
);
void
processUserJoined
(
const
QString
&
userName
);
void
processUserJoined
(
const
QString
&
userName
);
void
talkLeft
(
TabMessage
*
tab
);
void
talkLeft
(
TabMessage
*
tab
);
void
tabUserEvent
();
void
tabUserEvent
(
bool
globalEvent
);
void
processRoomEvent
(
RoomEvent
*
event
);
void
processRoomEvent
(
RoomEvent
*
event
);
void
processGameEventContainer
(
GameEventContainer
*
cont
);
void
processGameEventContainer
(
GameEventContainer
*
cont
);
void
processMessageEvent
(
Event_Message
*
event
);
void
processMessageEvent
(
Event_Message
*
event
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment