Show correct upload fee in outfit gallery context menu

meow-7.2.2
Ansariel 2016-08-09 13:12:01 +02:00
parent a8f93090ab
commit 07ced6fc09
6 changed files with 23 additions and 5 deletions

View File

@ -756,7 +756,16 @@ LLContextMenu* LLOutfitGalleryContextMenu::createMenu()
enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitGalleryContextMenu::onEnable, this, _2));
enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitGalleryContextMenu::onVisible, this, _2));
return createFromFile("menu_gallery_outfit_tab.xml");
// </FS:Ansariel> Show correct upload fee in context menu
//return createFromFile("menu_gallery_outfit_tab.xml");
LLContextMenu* menu = createFromFile("menu_gallery_outfit_tab.xml");
LLMenuItemCallGL* upload_item = menu->findChild<LLMenuItemCallGL>("upload_photo");
if (upload_item)
{
upload_item->setLabelArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()));
}
return menu;
// </FS:Ansariel>
}
void LLOutfitGalleryContextMenu::onUploadPhoto(const LLUUID& outfit_cat_id)

View File

@ -51,6 +51,7 @@
#include "llviewercontrol.h" // <FS:ND/> for gSavedSettings
#include "llresmgr.h"
#include "lltextbox.h"
#include "lleconomy.h"
static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y);
@ -1189,6 +1190,14 @@ LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_outfit_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
llassert(mMenu);
// </FS:Ansariel> Show correct upload fee in context menu
LLMenuItemCallGL* upload_item = mMenu->findChild<LLMenuItemCallGL>("upload_photo");
if (upload_item)
{
upload_item->setLabelArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()));
}
// </FS:Ansariel>
}
LLOutfitListGearMenuBase::~LLOutfitListGearMenuBase()

View File

@ -3,7 +3,7 @@
<menu_item_call label="Anziehen - Aktuelles Outfit ersetzen" name="wear_replace"/>
<menu_item_call label="Anziehen - Aktuelles Outfit hinzufügen" name="wear_add"/>
<menu_item_call label="Ausziehen - Aus aktuellem Outfit entfernen" name="take_off"/>
<menu_item_call label="Foto hochladen (L$10)" name="upload_photo"/>
<menu_item_call label="Foto hochladen (L$[UPLOAD_COST])" name="upload_photo"/>
<menu_item_call label="Foto auswählen" name="select_photo"/>
<menu_item_call label="Foto machen" name="take_snapshot"/>
<menu_item_call label="Foto entfernen" name="remove_photo"/>

View File

@ -3,7 +3,7 @@
<menu_item_call label="Anziehen - Aktuelles Outfit ersetzen" name="wear"/>
<menu_item_call label="Anziehen - Aktuelles Outfit hinzufügen" name="wear_add"/>
<menu_item_call label="Ausziehen - Aus aktuellem Outfit entfernen" name="take_off"/>
<menu_item_call label="Foto hochladen (L$10)" name="upload_photo"/>
<menu_item_call label="Foto hochladen (L$[UPLOAD_COST])" name="upload_photo"/>
<menu_item_call label="Foto auswählen" name="select_photo"/>
<menu_item_call label="Foto machen" name="take_snapshot"/>
<menu_item_call label="Foto entfernen" name="remove_photo"/>

View File

@ -42,7 +42,7 @@
parameter="take_off" />
</menu_item_call>
<menu_item_call
label="Upload Photo (L$10)"
label="Upload Photo (L$[UPLOAD_COST])"
layout="topleft"
name="upload_photo">
<on_click

View File

@ -40,7 +40,7 @@
parameter="take_off" />
</menu_item_call>
<menu_item_call
label="Upload Photo (L$10)"
label="Upload Photo (L$[UPLOAD_COST])"
layout="topleft"
name="upload_photo">
<on_click