diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-21 13:03:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-21 13:03:09 +0300 |
commit | eb5133f5bd812df62597d71bdd7d81fa8c0e9d71 (patch) | |
tree | 5c0cde1b7b58715358171d7436f09e928dac6076 | |
parent | 3e9f4cee927cd1e6d49d769883b0d42f91c1e5ad (diff) | |
download | mv-eb5133f5bd812df62597d71bdd7d81fa8c0e9d71.tar.gz mv-eb5133f5bd812df62597d71bdd7d81fa8c0e9d71.tar.bz2 mv-eb5133f5bd812df62597d71bdd7d81fa8c0e9d71.tar.xz mv-eb5133f5bd812df62597d71bdd7d81fa8c0e9d71.zip |
Show in outfits context menu, options from normal windows.
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 22 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.h | 2 |
2 files changed, 18 insertions, 6 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 00256fcbe..cf853966d 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -569,6 +569,7 @@ void PopupMenu::showOutfitsWindowPopup(const int x, const int y) { mX = x; mY = y; + mWindow = outfitWindow; mBrowserBox->clearRows(); @@ -578,6 +579,10 @@ void PopupMenu::showOutfitsWindowPopup(const int x, const int y) // TRANSLATORS: clear selected outfit mBrowserBox->addRow("clear outfit", _("Clear outfit")); mBrowserBox->addRow("##3---"); + + addWindowMenu(outfitWindow); + mBrowserBox->addRow("##3---"); + // TRANSLATORS: popup menu item // TRANSLATORS: close menu mBrowserBox->addRow("cancel", _("Cancel")); @@ -860,6 +865,17 @@ void PopupMenu::showWindowPopup(Window *const window, // TRANSLATORS: popup menu header mBrowserBox->addRow(_("window")); + addWindowMenu(window); + + // TRANSLATORS: popup menu item + // TRANSLATORS: close menu + mBrowserBox->addRow("cancel", _("Cancel")); + + showPopup(x, y); +} + +void PopupMenu::addWindowMenu(Window *const window) +{ if (window->getCloseButton()) { // TRANSLATORS: popup menu item @@ -882,12 +898,6 @@ void PopupMenu::showWindowPopup(Window *const window, mBrowserBox->addRow("window lock", _("Lock")); } } - - // TRANSLATORS: popup menu item - // TRANSLATORS: close menu - mBrowserBox->addRow("cancel", _("Cancel")); - - showPopup(x, y); } void PopupMenu::handleLink(const std::string &link, diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h index 6a991c9e8..fe9d0855e 100644 --- a/src/gui/popups/popupmenu.h +++ b/src/gui/popups/popupmenu.h @@ -172,6 +172,8 @@ class PopupMenu final : public Popup, public LinkHandler void addNormalRelations(); + void addWindowMenu(Window *const window); + void showGMPopup(); BrowserBox *mBrowserBox; |