diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-15 00:19:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-15 00:19:35 +0300 |
commit | f53e001120632302d214c9b90c373019448a889b (patch) | |
tree | 2cde2020d323aa65bd1a921051001a2adcb94b56 /src | |
parent | 981301a12e50dde848f7ddf9e78168d15673c9fc (diff) | |
download | mv-f53e001120632302d214c9b90c373019448a889b.tar.gz mv-f53e001120632302d214c9b90c373019448a889b.tar.bz2 mv-f53e001120632302d214c9b90c373019448a889b.tar.xz mv-f53e001120632302d214c9b90c373019448a889b.zip |
Fix context menu positions in some windows.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/viewport.cpp | 5 | ||||
-rw-r--r-- | src/gui/viewport.h | 2 | ||||
-rw-r--r-- | src/gui/whoisonline.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/avatarlistbox.cpp | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 15353d9f9..0fc7444ec 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -630,6 +630,11 @@ void Viewport::showPopup(int x, int y, Being *being) mPopupMenu->showPopup(x, y, being); } +void Viewport::showPopup(Being *being) +{ + mPopupMenu->showPopup(getMouseX(), getMouseY(), being); +} + void Viewport::showPlayerPopup(std::string nick) { mPopupMenu->showPlayerPopup(getMouseX(), getMouseY(), nick); diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 52a3257f5..774392cc0 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -152,6 +152,8 @@ class Viewport : public WindowContainer, public gcn::MouseListener, */ void showPopup(int x, int y, Being *being); + void showPopup(Being *being); + void showPlayerPopup(std::string nick); void showOutfitsPopup(int x, int y); diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index 73b6e2e8c..9c1a71478 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -164,7 +164,7 @@ void WhoIsOnline::handleLink(const std::string& link, gcn::MouseEvent *event) if (being && viewport) { - viewport->showPopup(event->getX(), event->getY(), being); + viewport->showPopup(being); return; } } diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp index a7331ae78..1c1c83ec8 100644 --- a/src/gui/widgets/avatarlistbox.cpp +++ b/src/gui/widgets/avatarlistbox.cpp @@ -324,7 +324,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event) model->getAvatarAt(selected)->getName(), Being::PLAYER); if (being) { - viewport->showPopup(event.getX(), event.getY(), being); + viewport->showPopup(being); } else { |