// invoked from callbackConfirmPublish
bool LLPanelClassified::confirmPublish(const LLSD& notification, const LLSD& response)
{
	S32 option = LLNotification::getSelectedOption(notification, response);
	// Option 0 = publish
	if (option != 0) return false;

	sendClassifiedInfoUpdate();

	// Big hack - assume that top picks are always in a browser,
	// and non-finder-classifieds are always in a tab container.
	if (mInFinder)
	{
		// TODO: enable this
		//LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)getParent();
		//panel->renameClassified(mClassifiedID, mNameEditor->getText());
	}
	else
	{
		LLTabContainer* tab = (LLTabContainer*)getParent();
		tab->setCurrentTabName(mNameEditor->getText());
	}

	resetDirty();
	return false;
}
BOOL LLFloaterPreference::postBuild()
{
	gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));

	gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));

	gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));

	gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));

	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
	if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
		tabcontainer->selectFirstTab();

	std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
	getChild<LLUICtrl>("cache_location")->setValue(cache_location);

	// if floater is opened before login set default localized busy message
	if (LLStartUp::getStartupState() < STATE_STARTED)
	{
		gSavedPerAccountSettings.setString("BusyModeResponse", LLTrans::getString("BusyModeResponseDefault"));
	}

	return TRUE;
}
void LLPanelGroupLandMoney::update(LLGroupChange gc)
{
	if (gc != GC_ALL) return;  //Don't update if it's the wrong panel!

	LLTabContainer* tabp = getChild<LLTabContainer>("group_money_tab_container");

	if ( tabp )
	{
		LLPanel* panelp;
		LLGroupMoneyTabEventHandler* eh;

		panelp = tabp->getCurrentPanel();

		//now pull the event handler associated with that L$ tab
		if ( panelp )
		{
			eh = get_if_there(LLGroupMoneyTabEventHandler::sTabsToHandlers,
							  panelp,
							  (LLGroupMoneyTabEventHandler*)NULL);
			if ( eh ) eh->onClickTab();
		}
	}

	mImplementationp->requestGroupLandInfo();
	mImplementationp->setYourContributionTextField(mImplementationp->getStoredContribution());
}
void LLFloaterPreference::cancel()
{
	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
	// Call cancel() on all panels that derive from LLPanelPreference
	for (child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
		iter != tabcontainer->getChildList()->end(); ++iter)
	{
		LLView* view = *iter;
		LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
		if (panel)
			panel->cancel();
	}
	// hide joystick pref floater
	LLFloaterReg::hideInstance("pref_joystick");
	
	// cancel hardware menu
	LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance<LLFloaterHardwareSettings>("prefs_hardware_settings");
	if (hardware_settings)
	{
		hardware_settings->cancel();
	}
	
	// reverts any changes to current skin
	gSavedSettings.setString("SkinCurrent", sSkin);
	
	LLFloaterVoiceDeviceSettings* voice_device_settings = LLFloaterReg::findTypedInstance<LLFloaterVoiceDeviceSettings>("pref_voicedevicesettings");
	if (voice_device_settings)
	{
		voice_device_settings ->cancel();
	}
	
	LLFloaterReg::hideInstance("pref_voicedevicesettings");
	
}
示例#5
0
// static
void LLPanelPick::onCommitAny(LLUICtrl* ctrl, void* data)
{
	LLPanelPick* self = (LLPanelPick*)data;

	// have we received up to date data for this pick?
	if (self->mDataReceived)
	{
		self->sendPickInfoUpdate();

		// Big hack - assume that top picks are always in a browser,
		// and non-top-picks are always in a tab container.
		/*if (self->mTopPick)
		{
			LLPanelDirPicks* panel = (LLPanelDirPicks*)self->getParent();
			panel->renamePick(self->mPickID, self->mNameEditor->getText());
		}
		else
		{*/
		LLTabContainer* tab = (LLTabContainer*)self->getParent();
		if (tab)
		{
			if(tab) tab->setCurrentTabName(self->mNameEditor->getText());
		}
		//}
	}
}
示例#6
0
// static 
void LLTabContainer::onTabBtn( void* userdata )
{
	LLTabTuple* tuple = (LLTabTuple*) userdata;
	LLTabContainer* self = tuple->mTabContainer;
	self->selectTabPanel( tuple->mTabPanel );

	tuple->mTabPanel->setFocus(TRUE);
}
示例#7
0
void LLPanel::childShowTab(const std::string& id, const std::string& tabname, bool visible)
{
	LLTabContainer* child = findChild<LLTabContainer>(id);
	if (child)
	{
		child->selectTabByName(tabname);
	}
}
示例#8
0
//static
void LLFloaterWindLight::selectTab(std::string tab_name)
{
	if (!tab_name.empty())
	{
		LLTabContainer* tabs = LLFloaterWindLight::instance()->getChild<LLTabContainer>("WindLight Tabs");
		tabs->selectTabByName(tab_name);
	}
}
示例#9
0
// static 
void LLTabContainer::onCloseBtn( void* userdata )
{
	LLTabContainer* self = (LLTabContainer*) userdata;
	if( self->mCloseCallback )
	{
		self->mCloseCallback( self->mCallbackUserdata );
	}
}
示例#10
0
// static 
void LLTabContainer::onPrevBtn( void* userdata )
{
	LLTabContainer* self = (LLTabContainer*) userdata;
	if (!self->mScrolled)
	{
		self->scrollPrev();
	}
	self->mScrolled = FALSE;
}
示例#11
0
LLPanel *LLPanel::childGetVisibleTab(const std::string& id) const
{
	LLTabContainer* child = findChild<LLTabContainer>(id);
	if (child)
	{
		return child->getCurrentPanel();
	}
	return NULL;
}
void LLFloaterDirectory::focusCurrentPanel()
{
	LLTabContainer* tabs = getChild<LLTabContainer>("Directory Tabs");
	if (!tabs) return;

	LLPanel* panel = tabs->getCurrentPanel();
	if (!panel) return;

	panel->setFocus(TRUE);
}
示例#13
0
// static 
void LLTabContainer::onPrevBtnHeld( void* userdata )
{
	LLTabContainer* self = (LLTabContainer*) userdata;
	if (self->mScrollTimer.getElapsedTimeF32() > SCROLL_STEP_TIME)
	{
		self->mScrollTimer.reset();
		self->scrollPrev();
		self->mScrolled = TRUE;
	}
}
示例#14
0
// static 
void LLTabContainer::onNextBtn( void* userdata )
{
	// Scroll tabs to the left
	LLTabContainer* self = (LLTabContainer*) userdata;
	if (!self->mScrolled)
	{
		self->scrollNext();
	}
	self->mScrolled = FALSE;
}
void LLFloaterFacebook::showPhotoPanel()
{
	LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mFacebookPhotoPanel->getParent());
	if (!parent)
	{
		LL_WARNS() << "Cannot find panel container" << LL_ENDL;
		return;
	}

	parent->selectTabPanel(mFacebookPhotoPanel);
}
void LLFloaterPreference::saveSettings()
{
	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
	child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
	child_list_t::const_iterator end = tabcontainer->getChildList()->end();
	for ( ; iter != end; ++iter)
	{
		LLView* view = *iter;
		LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
		if (panel)
			panel->saveSettings();
	}
}	
示例#17
0
void LLPanel::childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata)
{
    LLTabContainer* child = getChild<LLTabContainer>(id);
    if (child)
    {
        LLPanel *panel = child->getPanelByName(tabname);
        if (panel)
        {
            child->setTabChangeCallback(panel, on_tab_clicked);
            child->setTabUserData(panel, userdata);
        }
    }
}
void LLFloaterPreference::setHardwareDefaults()
{
	LLFeatureManager::getInstance()->applyRecommendedSettings();
	refreshEnabledGraphics();
	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
	child_list_t::const_iterator iter = tabcontainer->getChildList()->begin();
	child_list_t::const_iterator end = tabcontainer->getChildList()->end();
	for ( ; iter != end; ++iter)
	{
		LLView* view = *iter;
		LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
		if (panel)
			panel->setHardwareDefaults();
	}
}
示例#19
0
void LLPanelNearByMedia::onAdvancedButtonClick()
{	
	// bring up the prefs floater
	LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*>(LLFloaterReg::showInstance("preferences"));
	if (prefsfloater)
	{
		// grab the 'audio' panel from the preferences floater and
		// bring it the front!
		LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
		LLPanel* audiopanel = prefsfloater->getChild<LLPanel>("audio");
		if (tabcontainer && audiopanel)
		{
			tabcontainer->selectTabPanel(audiopanel);
		}
	}
}
示例#20
0
static LLPanel *childGetVisibleTabWithHelp(LLView *parent)
{
	LLView *child;

	// look through immediate children first for an active tab with help
	for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child))
	{
		LLPanel *curTabPanel = NULL;

		// do we have a tab container?
		LLTabContainer *tab = dynamic_cast<LLTabContainer *>(child);
		if (tab && tab->getVisible())
		{
			curTabPanel = tab->getCurrentPanel();
		}

		// do we have an accordion tab?
		LLAccordionCtrlTab* accordion = dynamic_cast<LLAccordionCtrlTab *>(child);
		if (accordion && accordion->getDisplayChildren())
		{
			curTabPanel = dynamic_cast<LLPanel *>(accordion->getAccordionView());
		}

		// if we found a valid tab, does it have a help topic?
		if (curTabPanel && !curTabPanel->getHelpTopic().empty())
		{
			return curTabPanel;
		}
	}

	// then try a bit harder and recurse through all children
	for (child = parent->getFirstChild(); child; child = parent->findNextSibling(child))
	{
		if (child->getVisible())
		{
			LLPanel* tab = ::childGetVisibleTabWithHelp(child);
			if (tab)
			{
				return tab;
			}
		}
	}

	// couldn't find any active tabs with a help topic string
	return NULL;
}
void LLPanelNearByMedia::onAdvancedButtonClick()
{	
	// bring up the prefs floater
	
	LLFloaterPreference::show(NULL);
	LLFloaterPreference* prefsfloater = LLFloaterPreference::sInstance;
		
	if (prefsfloater)
	{
		// grab the 'audio' panel from the preferences floater and
		// bring it the front!
		LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
		if (tabcontainer)
		{
			tabcontainer->selectTabByName("Media panel");
		}
	}
}
void LLPanelGroupLandMoney::activate()
{
	if ( !mImplementationp->mBeenActivated )
	{
		//select the first tab
		LLTabContainer* tabp = getChild<LLTabContainer>("group_money_tab_container");

		if ( tabp )
		{
			tabp->selectFirstTab();
			mImplementationp->mBeenActivated = true;
		}
		
		setLabelArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
		childSetTextArg("group_money_heading", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());

		//fill in the max contribution

		//This calculation is unfortunately based on
		//the status bar's concept of how much land the user has
		//which can change dynamically if the user buys new land, gives
		//more land to a group, etc.
		//A race condition can occur if we want to update the UI's
		//concept of the user's max contribution before the status
		//bar has been updated from a change in the user's group contribution.

		//Since the max contribution should not change solely on changing
		//a user's group contribution, (it would only change through
		//purchasing of new land) this code is placed here
		//and only updated once to prevent the race condition
		//at the price of having stale data.
		//We need to have the status bar have observers
		//or find better way of distributing up to date land data. - jwolk
		S32 max_avail = mImplementationp->getStoredContribution();
		if(gStatusBar)
		{
			max_avail += gStatusBar->getSquareMetersLeft();
		}
		mImplementationp->setYourMaxContributionTextBox(max_avail);
	}

	mImplementationp->mMapButtonp->setEnabled(false);
	update(GC_ALL);
}
void LLFloaterAvatarPicker::onList()
{
	getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());

// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
	if (rlv_handler_t::isEnabled())
	{
		LLTabContainer* pTabs = getChild<LLTabContainer>("ResidentChooserTabs");
		LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
		RLV_ASSERT( (pTabs) && (pNearMePanel) );
		if ( (pTabs) && (pNearMePanel) )
		{
			bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
			pTabs->enableTabButton(pTabs->getIndexForPanel(pNearMePanel), fRlvEnable);
			if ( (!fRlvEnable) && (pTabs->getCurrentPanel() == pNearMePanel) )
				pTabs->selectTabByName("SearchPanel");
		}
	}
// [/RLVa:KB]
}
void LLPanelVolumePulldown::onAdvancedButtonClick(const LLSD& user_data)
{
	// close the global volume minicontrol, we're bringing up the big one
	setVisible(FALSE);

	// bring up the prefs floater
	LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*>
		(LLFloaterReg::showInstance("preferences"));
	if (prefsfloater)
	{
		// grab the 'audio' panel from the preferences floater and
		// bring it the front!
		LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
		LLPanel* audiopanel = prefsfloater->getChild<LLPanel>("audio");
		if (tabcontainer && audiopanel)
		{
			tabcontainer->selectTabPanel(audiopanel);
		}
	}
}
BOOL LLFloaterPreference::postBuild()
{
	gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));

	gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));

	gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));

	gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));

	LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
	if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
		tabcontainer->selectFirstTab();
	S32 show_avatar_nametag_options = gSavedSettings.getS32("AvatarNameTagMode");
	handleNameTagOptionChanged(LLSD(show_avatar_nametag_options));

	std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");
	childSetText("cache_location", cache_location);

	return TRUE;
}
示例#26
0
LLPanel* LLPanel::childGetVisibleTabWithHelp()
{
	LLView *child;

	bfs_tree_iterator_t it = beginTreeBFS();
	// skip ourselves
	++it;
	for (; it != endTreeBFS(); ++it)
	{
		child = *it;
		LLPanel *curTabPanel = NULL;

		// do we have a tab container?
		LLTabContainer *tab = dynamic_cast<LLTabContainer *>(child);
		if (tab && tab->getVisible())
		{
			curTabPanel = tab->getCurrentPanel();
		}

		// do we have an accordion tab?
		LLAccordionCtrlTab* accordion = dynamic_cast<LLAccordionCtrlTab *>(child);
		if (accordion && accordion->getDisplayChildren())
		{
			curTabPanel = dynamic_cast<LLPanel *>(accordion->getAccordionView());
		}

		// if we found a valid tab, does it have a help topic?
		if (curTabPanel && !curTabPanel->getHelpTopic().empty())
		{
			return curTabPanel;
		}
	}

	// couldn't find any active tabs with a help topic string
	return NULL;
}
LLFloaterDirectory::LLFloaterDirectory(const std::string& name)
:	LLFloater(name, std::string("FloaterFindRect2"), LLStringUtil::null),
	mMinimizing(false)
{
	sInstance = this;

	mFindAllPanel = NULL;
	mClassifiedPanel = NULL;
	mEventsPanel = NULL;
	mLandPanel = NULL;

	mPanelAvatarp = NULL;
	mPanelEventp = NULL;
	mPanelGroupp = NULL;
	mPanelGroupHolderp = NULL;
	mPanelPlacep = NULL;
	mPanelPlaceSmallp = NULL;
	mPanelClassifiedp = NULL;
	
	// Build the floater with our tab panel classes
	bool secondlife = gHippoGridManager->getConnectedGrid()->isSecondLife();

	LLCallbackMap::map_t factory_map;
	factory_map["classified_panel"] = LLCallbackMap(createClassified, this);
	factory_map["events_panel"] = LLCallbackMap(createEvents, this);
	factory_map["places_panel"] = LLCallbackMap(createPlaces, this);
	factory_map["land_sales_panel"] = LLCallbackMap(createLand, this);
	factory_map["people_panel"] = LLCallbackMap(createPeople, this);
	factory_map["groups_panel"] = LLCallbackMap(createGroups, this);
	factory_map[market_panel] = LLCallbackMap(LLPanelDirMarket::create, this);
	factory_map["find_all_panel"] = LLCallbackMap(createFindAll, this);
	factory_map["showcase_panel"] = LLCallbackMap(createShowcase, this);
	if (secondlife)
	{
		factory_map["web_panel"] = LLCallbackMap(createWebPanel, this);
	}
	else
	{
		factory_map["find_all_old_panel"] = LLCallbackMap(createFindAllOld, this);
	}

	factory_map["classified_details_panel"] = LLCallbackMap(createClassifiedDetail, this);
	factory_map["event_details_panel"] = LLCallbackMap(createEventDetail, this);
	factory_map["group_details_panel"] = LLCallbackMap(createGroupDetail, this);
	factory_map["group_details_panel_holder"] = LLCallbackMap(createGroupDetailHolder, this);
	factory_map["place_details_panel"] = LLCallbackMap(createPlaceDetail, this);
	factory_map["place_details_small_panel"] = LLCallbackMap(createPlaceDetailSmall, this);

	factory_map["Panel Avatar"] = LLCallbackMap(createPanelAvatar, this);
	
	mCommitCallbackRegistrar.add("Search.WebFloater", boost::bind(&LLFloaterSearch::open, boost::bind(LLFloaterSearch::getInstance)));
	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_directory.xml", &factory_map);
	moveResizeHandlesToFront();

	if (mPanelAvatarp)
	{
		mPanelAvatarp->selectTab(0);
	}
	
	LLTabContainer* container = getChild<LLTabContainer>("Directory Tabs");
	if (secondlife)
	{
		container->removeTabPanel(getChild<LLPanel>("find_all_old_panel")); // Not used
	}
	else
	{
		container->removeTabPanel(getChild<LLPanel>("web_panel")); // Not needed
		LLPanel* panel(getChild<LLPanel>("find_all_panel"));
		LLPanel* prev_tab(getChild<LLPanel>("find_all_old_panel"));
		LFSimFeatureHandler& inst(LFSimFeatureHandler::instance());
		set_tab_visible(container, panel, !inst.searchURL().empty(), prev_tab);
		inst.setSearchURLCallback(boost::bind(set_tab_visible, container, panel, !boost::bind(&std::string::empty, _1), prev_tab));
		panel = getChild<LLPanel>("showcase_panel");
		prev_tab = getChild<LLPanel>("events_panel");
		set_tab_visible(container, panel, !inst.destinationGuideURL().empty(), prev_tab);
		inst.setDestinationGuideURLCallback(boost::bind(set_tab_visible, container, panel, !boost::bind(&std::string::empty, _1), prev_tab));

		LLPanelDirMarket* marketp = static_cast<LLPanelDirMarket*>(container->getPanelByName(market_panel));
		container->removeTabPanel(marketp); // Until we get a MarketPlace URL, tab is removed.
		marketp->handleRegionChange(container);
		gAgent.addRegionChangedCallback(boost::bind(&LLPanelDirMarket::handleRegionChange, marketp, container));
	}
	container->setCommitCallback(boost::bind(&LLFloaterDirectory::onTabChanged,_2));
}
// static
void LLPreferenceCore::onTabChanged(void* user_data, bool from_click)
{
	LLTabContainer* self = (LLTabContainer*)user_data;

	gSavedSettings.setS32("LastPrefTab", self->getCurrentPanelIndex());
}
示例#29
0
BOOL LLSidepanelInventory::postBuild()
{
	// UI elements from inventory panel
	{
		mInventoryPanel = getChild<LLPanel>("sidepanel__inventory_panel");

		mInfoBtn = mInventoryPanel->getChild<LLButton>("info_btn");
		mInfoBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onInfoButtonClicked, this));
		
		mShareBtn = mInventoryPanel->getChild<LLButton>("share_btn");
		mShareBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShareButtonClicked, this));
		
		mShopBtn = mInventoryPanel->getChild<LLButton>("shop_btn");
		mShopBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onShopButtonClicked, this));

		mWearBtn = mInventoryPanel->getChild<LLButton>("wear_btn");
		mWearBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onWearButtonClicked, this));
		
		mPlayBtn = mInventoryPanel->getChild<LLButton>("play_btn");
		mPlayBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onPlayButtonClicked, this));
		
		mTeleportBtn = mInventoryPanel->getChild<LLButton>("teleport_btn");
		mTeleportBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onTeleportButtonClicked, this));
		
		mOverflowBtn = mInventoryPanel->getChild<LLButton>("overflow_btn");
		mOverflowBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onOverflowButtonClicked, this));
		
		mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
		mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2));
		LLTabContainer* tabs = mPanelMainInventory->getChild<LLTabContainer>("inventory filter tabs");
		tabs->setCommitCallback(boost::bind(&LLSidepanelInventory::updateVerbs, this));

		/* 
		   EXT-4846 : "Can we suppress the "Landmarks" and "My Favorites" folder since they have their own Task Panel?"
		   Deferring this until 2.1.
		LLInventoryPanel *my_inventory_panel = mPanelMainInventory->getChild<LLInventoryPanel>("All Items");
		my_inventory_panel->addHideFolderType(LLFolderType::FT_LANDMARK);
		my_inventory_panel->addHideFolderType(LLFolderType::FT_FAVORITE);
		*/

		LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLSidepanelInventory::updateVerbs, this));
	}

	// UI elements from item panel
	{
		mItemPanel = getChild<LLSidepanelItemInfo>("sidepanel__item_panel");
		
		LLButton* back_btn = mItemPanel->getChild<LLButton>("back_btn");
		back_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onBackButtonClicked, this));
	}

	// UI elements from task panel
	{
		mTaskPanel = findChild<LLSidepanelTaskInfo>("sidepanel__task_panel");
		if (mTaskPanel)
		{
			LLButton* back_btn = mTaskPanel->getChild<LLButton>("back_btn");
			back_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onBackButtonClicked, this));
		}
	}
	
	// Received items inbox setup
	{
		LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);

		// Collapse inbox panel
		inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true);
		
		// Set up button states and callbacks
		LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME);

		inbox_button->setToggleState(false);
		inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this));

		// Set the inbox visible based on debug settings (final setting comes from http request below)
		enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));

		// Trigger callback for after login so we can setup to track inbox changes after initial inventory load
		LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInbox, this));
	}

	gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));

	// Update the verbs buttons state.
	updateVerbs();

	return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
// static
void LLFloaterMediaSettings::onTabChanged(void* user_data, bool from_click)
{
	LLTabContainer* self = (LLTabContainer*)user_data;
	gSavedSettings.setS32("LastMediaSettingsTab", self->getCurrentPanelIndex());
}