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
059a62a0
Commit
059a62a0
authored
Feb 04, 2015
by
Zach
Browse files
Merge pull request #689 from Cockatrice/fix-688
Fix #688. Reuse chat tabs when user opens more chat with same user
parents
6e5f4d1f
f22e4242
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/tab_supervisor.cpp
View file @
059a62a0
...
...
@@ -371,7 +371,16 @@ TabMessage *TabSupervisor::addMessageTab(const QString &receiverName, bool focus
otherUser
=
twi
->
getUserInfo
();
else
otherUser
.
set_name
(
receiverName
.
toStdString
());
TabMessage
*
tab
=
new
TabMessage
(
this
,
client
,
*
userInfo
,
otherUser
);
TabMessage
*
tab
;
tab
=
messageTabs
.
value
(
QString
::
fromStdString
(
otherUser
.
name
()));
if
(
tab
)
{
if
(
focus
)
setCurrentWidget
(
tab
);
return
tab
;
}
tab
=
new
TabMessage
(
this
,
client
,
*
userInfo
,
otherUser
);
connect
(
tab
,
SIGNAL
(
talkClosing
(
TabMessage
*
)),
this
,
SLOT
(
talkLeft
(
TabMessage
*
)));
int
tabIndex
=
myAddTab
(
tab
);
addCloseButtonToTab
(
tab
,
tabIndex
);
...
...
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