Add multi item properties floater support for new item properties
parent
881d5156a5
commit
09f24c4ffd
|
|
@ -46,6 +46,7 @@
|
|||
#include "lltextbox.h"
|
||||
#include "lltrans.h"
|
||||
#include "fscommon.h"
|
||||
#include "llviewerwindow.h" // <FS:Ansariel> Multi item properties floater
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLPanelMarketplaceListings
|
||||
|
|
@ -996,3 +997,22 @@ void LLFloaterItemProperties::onOpen(const LLSD& key)
|
|||
}
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Multi item properties floater
|
||||
LLMultiItemProperties::LLMultiItemProperties(const LLSD& key)
|
||||
: LLMultiFloater(LLSD())
|
||||
{
|
||||
// start with a small rect in the top-left corner ; will get resized
|
||||
LLRect rect;
|
||||
rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 350, 350);
|
||||
setRect(rect);
|
||||
LLFloater* last_floater = LLFloaterReg::getLastFloaterInGroup(key.asString());
|
||||
if (last_floater)
|
||||
{
|
||||
stackWith(*last_floater);
|
||||
}
|
||||
setTitle(LLTrans::getString("MultiPropertiesTitle"));
|
||||
buildTabContainer();
|
||||
// <FS:Ansariel> Center multifloater on screen
|
||||
center();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "llnotificationptr.h"
|
||||
#include "llmodaldialog.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "llmultifloater.h" // <FS:Ansariel> Multi item properties floater
|
||||
|
||||
class LLInventoryCategoriesObserver;
|
||||
class LLInventoryCategoryAddedObserver;
|
||||
|
|
@ -227,4 +228,12 @@ public:
|
|||
private:
|
||||
};
|
||||
|
||||
// <FS:Ansariel> Multi item properties floater
|
||||
class LLMultiItemProperties : public LLMultiFloater
|
||||
{
|
||||
public:
|
||||
LLMultiItemProperties(const LLSD& key);
|
||||
};
|
||||
// </FS:Ansariel>
|
||||
|
||||
#endif // LL_LLFLOATERMARKETPLACELISTINGS_H
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@
|
|||
#include "aoengine.h"
|
||||
#include "fsfloaterwearablefavorites.h"
|
||||
#include "fslslbridge.h"
|
||||
#include "llfloatermarketplacelistings.h"
|
||||
#include "llfloaterproperties.h"
|
||||
|
||||
BOOL LLInventoryState::sWearNewClothing = FALSE;
|
||||
|
|
@ -2842,6 +2843,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
|
|||
|
||||
LLMultiPreview* multi_previewp = NULL;
|
||||
LLMultiProperties* multi_propertiesp = NULL; // <FS:Ansariel> Keep legacy properties floater
|
||||
LLMultiItemProperties* multi_itempropertiesp = nullptr; // <FS:Ansariel> Multi item properties floater
|
||||
|
||||
if (("task_open" == action || "open" == action) && selected_items.size() > 1)
|
||||
{
|
||||
|
|
@ -2878,9 +2880,18 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
|
|||
// <FS:Ansariel> Keep legacy properties floater
|
||||
//// Isn't supported (previously used LLMultiProperties)
|
||||
//LL_WARNS() << "Tried to open properties for multiple items" << LL_ENDL;
|
||||
multi_propertiesp = new LLMultiProperties();
|
||||
gFloaterView->addChild(multi_propertiesp);
|
||||
LLFloater::setFloaterHost(multi_propertiesp);
|
||||
if (gSavedSettings.getBOOL("FSUseLegacyObjectProperties"))
|
||||
{
|
||||
multi_propertiesp = new LLMultiProperties();
|
||||
gFloaterView->addChild(multi_propertiesp);
|
||||
LLFloater::setFloaterHost(multi_propertiesp);
|
||||
}
|
||||
else
|
||||
{
|
||||
multi_itempropertiesp = new LLMultiItemProperties("item_properties");
|
||||
gFloaterView->addChild(multi_itempropertiesp);
|
||||
LLFloater::setFloaterHost(multi_itempropertiesp);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
|
|
@ -3065,6 +3076,10 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
|
|||
{
|
||||
multi_propertiesp->openFloater(LLSD());
|
||||
}
|
||||
else if (multi_itempropertiesp)
|
||||
{
|
||||
multi_itempropertiesp->openFloater(LLSD());
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue