From 17c9dd061a06b7574447895dc6170fe0c3e7ff48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Fri, 3 Dec 2021 14:20:36 +0000 Subject: [PATCH] Resolve "Remove lock option from item menu in guild inventory" --- .../src/interface_v3/action_handler_item.cpp | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ryzom/client/src/interface_v3/action_handler_item.cpp b/ryzom/client/src/interface_v3/action_handler_item.cpp index 8870a9f21..da7e95fd8 100644 --- a/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -208,7 +208,7 @@ void CInterfaceItemEdition::CItemEditionWindow::begin() { if(_CurrItemSheet && !WindowName.empty()) { - + const CItemSheet *pIS = _CurrItemSheet->asItemSheet(); if ((pIS != NULL) && ITEMFAMILY::isTextCustomizable(pIS->Family) ) { @@ -342,7 +342,7 @@ void CInterfaceItemEdition::CItemEditionWindow::begin() // ******************************************************************************************** void CInterfaceItemEdition::CItemEditionWindow::end() { - + CDBCtrlSheet *pCSItem = _CurrItemSheet; std::string windowName = WindowName; if(pCSItem && !windowName.empty()) @@ -371,7 +371,7 @@ void CInterfaceItemEdition::CItemEditionWindow::end() editBoxShort->setActive(false); editShort->setActive(false); editBoxLarge->setActive(false); - editLarge->setActive(false); + editLarge->setActive(false); display->setActive(false); editButtons->setActive(false); closeButton->setActive(false); @@ -413,7 +413,7 @@ void CInterfaceItemEdition::CItemEditionWindow::validate() textValid = editLarge->getActive(); text = editBoxLarge->getInputString(); } - + if (textValid) { CBitMemStream out; @@ -1722,7 +1722,7 @@ void CItemMenuInBagInfoWaiter::infoReceived() void CItemMenuInBagInfoWaiter::infoValidated(CDBCtrlSheet* ctrlSheet) { CInterfaceManager *pIM = CInterfaceManager::getInstance(); - + // get the dialog stack CInterfaceGroup* pMenu = dynamic_cast( CWidgetManager::getInstance()->getElementFromId("ui:interface:item_menu_in_bag") ); if(!pMenu) return; @@ -2036,7 +2036,7 @@ class CHandlerItemMenuCheck : public IActionHandler if (pMoveSubMenu) pMoveSubMenu->setActive(false); } - if (bIsLockedByOwner) + if (bIsLockedByOwner) { if (pLockUnlock) pLockUnlock->setHardText("uimUnlockItem"); // Cannot drop/destroy if locked by owner @@ -2049,7 +2049,8 @@ class CHandlerItemMenuCheck : public IActionHandler } // Only show lock menu item if inventory contains the info - if (pLockUnlock) pLockUnlock->setActive(pCS->canOwnerLock()); + if (invId!=INVENTORIES::guild) + if (pLockUnlock) pLockUnlock->setActive(pCS->canOwnerLock()); // **** Gray Entries @@ -2206,7 +2207,7 @@ class CHandlerItemMenuBaseCheck : public IActionHandler CViewTextMenu *pDestroy = dynamic_cast(pMenu->getView("destroy")); CViewTextMenu *pLockUnlock = dynamic_cast(pMenu->getView("lockunlock")); - if (pCS->getLockedByOwner()) + if (pCS->getLockedByOwner()) { pLockUnlock->setHardText("uimUnlockItem"); // Cannot destroy if locked by owner @@ -2363,7 +2364,7 @@ class CHandlerItemTextDisplay : public IActionHandler std::string const& windowName = sParams; CInterfaceManager *pIM = CInterfaceManager::getInstance(); CDBCtrlSheet *pCSItem = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); - if (pCSItem == NULL || windowName.empty()) + if (pCSItem == NULL || windowName.empty()) return; const CItemSheet *pIS = pCSItem->asItemSheet(); @@ -2384,7 +2385,7 @@ class CHandlerItemTextEdition : public IActionHandler std::string const& windowName = sParams; CInterfaceManager *pIM = CInterfaceManager::getInstance(); CDBCtrlSheet *pCSItem = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); - if (pCSItem == NULL || windowName.empty()) + if (pCSItem == NULL || windowName.empty()) return; CInterfaceItemEdition::getInstance()->setCurrWindow(pCSItem, windowName, true);