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
87933ba8
Commit
87933ba8
authored
Mar 03, 2011
by
Max-Wilhelm Bruker
Browse files
fix
parent
50de6552
Changes
4
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/playerlistwidget.cpp
View file @
87933ba8
...
...
@@ -149,7 +149,7 @@ void PlayerListWidget::showContextMenu(const QPoint &pos, const QModelIndex &ind
menu
->
addSeparator
();
menu
->
addAction
(
aDetails
);
menu
->
addAction
(
aChat
);
if
(
userLevel
&
ServerInfo_User
::
IsRegistered
)
{
if
(
(
userLevel
&
ServerInfo_User
::
IsRegistered
)
&&
(
tabSupervisor
->
getUserLevel
()
&
ServerInfo_User
::
IsRegistered
))
{
menu
->
addSeparator
();
if
(
tabSupervisor
->
getUserListsTab
()
->
getBuddyList
()
->
userInList
(
userName
))
menu
->
addAction
(
aRemoveFromBuddyList
);
...
...
cockatrice/src/tab_supervisor.cpp
View file @
87933ba8
...
...
@@ -57,6 +57,7 @@ void TabSupervisor::start(AbstractClient *_client, ServerInfo_User *userInfo)
{
client
=
_client
;
userName
=
userInfo
->
getName
();
userLevel
=
userInfo
->
getUserLevel
();
connect
(
client
,
SIGNAL
(
roomEventReceived
(
RoomEvent
*
)),
this
,
SLOT
(
processRoomEvent
(
RoomEvent
*
)));
connect
(
client
,
SIGNAL
(
gameEventContainerReceived
(
GameEventContainer
*
)),
this
,
SLOT
(
processGameEventContainer
(
GameEventContainer
*
)));
...
...
cockatrice/src/tab_supervisor.h
View file @
87933ba8
...
...
@@ -25,6 +25,7 @@ class TabSupervisor : public QTabWidget {
Q_OBJECT
private:
QString
userName
;
int
userLevel
;
QIcon
*
tabChangedIcon
;
AbstractClient
*
client
;
QList
<
AbstractClient
*>
localClients
;
...
...
@@ -46,6 +47,7 @@ public:
int
getGameCount
()
const
{
return
gameTabs
.
size
();
}
TabUserLists
*
getUserListsTab
()
const
{
return
tabUserLists
;
}
bool
getAdminLocked
()
const
;
int
getUserLevel
()
const
{
return
userLevel
;
}
signals:
void
setMenu
(
QMenu
*
menu
);
void
localGameEnded
();
...
...
cockatrice/src/userlist.cpp
View file @
87933ba8
...
...
@@ -183,7 +183,7 @@ void UserList::showContextMenu(const QPoint &pos, const QModelIndex &index)
menu
->
addSeparator
();
menu
->
addAction
(
aDetails
);
menu
->
addAction
(
aChat
);
if
(
userLevel
&
ServerInfo_User
::
IsRegistered
)
{
if
(
(
userLevel
&
ServerInfo_User
::
IsRegistered
)
&&
(
tabSupervisor
->
getUserLevel
()
&
ServerInfo_User
::
IsRegistered
))
{
menu
->
addSeparator
();
if
(
tabSupervisor
->
getUserListsTab
()
->
getBuddyList
()
->
userInList
(
userName
))
menu
->
addAction
(
aRemoveFromBuddyList
);
...
...
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