merge
commit
8ed4b4d3df
|
|
@ -704,29 +704,11 @@ void LLFloater::openFloater(const LLSD& key)
|
|||
dirtyRect();
|
||||
}
|
||||
|
||||
void LLFloater::verifyClose( bool app_quitting )
|
||||
{
|
||||
LLPanel::handleCloseConfirmation( app_quitting );
|
||||
}
|
||||
|
||||
void LLFloater::closeFloater(bool app_quitting)
|
||||
{
|
||||
llinfos << "Closing floater " << getName() << llendl;
|
||||
|
||||
if (!app_quitting)
|
||||
{
|
||||
if ( mVerifyUponClose && !mForceCloseAfterVerify )
|
||||
{
|
||||
onClose( app_quitting );
|
||||
if ( mForceCloseAfterVerify )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (app_quitting)
|
||||
{
|
||||
{
|
||||
LLFloater::sQuitting = true;
|
||||
}
|
||||
|
||||
|
|
@ -799,7 +781,7 @@ void LLFloater::closeFloater(bool app_quitting)
|
|||
dirtyRect();
|
||||
|
||||
// Close callbacks
|
||||
onClose(app_quitting);
|
||||
onClose(app_quitting);
|
||||
mCloseSignal(this, LLSD(app_quitting));
|
||||
|
||||
// Hide or Destroy
|
||||
|
|
@ -1639,7 +1621,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
|
|||
|
||||
|
||||
// virtual
|
||||
void LLFloater::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
|
||||
void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key)
|
||||
{
|
||||
LLMultiFloater* hostp = getHost();
|
||||
if (hostp)
|
||||
|
|
@ -1806,19 +1788,11 @@ void LLFloater::initRectControl()
|
|||
void LLFloater::closeFrontmostFloater()
|
||||
{
|
||||
LLFloater* floater_to_close = gFloaterView->getFrontmostClosableFloater();
|
||||
if( floater_to_close )
|
||||
if(floater_to_close)
|
||||
{
|
||||
if ( floater_to_close->mVerifyUponClose )
|
||||
{
|
||||
floater_to_close->verifyClose();
|
||||
//Closing of the window handle in the subclass - so bug out here.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
floater_to_close->closeFloater();
|
||||
}
|
||||
floater_to_close->closeFloater();
|
||||
}
|
||||
|
||||
// if nothing took focus after closing focused floater
|
||||
// give it to next floater (to allow closing multiple windows via keyboard in rapid succession)
|
||||
if (gFocusMgr.getKeyboardFocus() == NULL)
|
||||
|
|
@ -2657,14 +2631,7 @@ void LLFloaterView::closeAllChildren(bool app_quitting)
|
|||
if (floaterp->canClose() && !floaterp->isDead() &&
|
||||
(app_quitting || floaterp->getVisible()))
|
||||
{
|
||||
if ( floaterp->mVerifyUponClose )
|
||||
{
|
||||
floaterp->verifyClose(app_quitting);
|
||||
}
|
||||
else
|
||||
{
|
||||
floaterp->closeFloater(app_quitting);
|
||||
}
|
||||
floaterp->closeFloater(app_quitting);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,6 @@ public:
|
|||
|
||||
// If allowed, close the floater cleanly, releasing focus.
|
||||
virtual void closeFloater(bool app_quitting = false);
|
||||
virtual void verifyClose( bool app_quitting = false );
|
||||
|
||||
// Close the floater or its host. Use when hidding or toggling a floater instance.
|
||||
virtual void closeHostedFloater();
|
||||
|
|
@ -304,9 +303,9 @@ public:
|
|||
|
||||
/*virtual*/ void setVisible(BOOL visible); // do not override
|
||||
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); // do not override
|
||||
void handleCloseConfirmation( );
|
||||
|
||||
void setFrontmost(BOOL take_focus = TRUE);
|
||||
virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
|
||||
virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
|
||||
|
||||
// Defaults to false.
|
||||
virtual BOOL canSaveAs() const { return FALSE; }
|
||||
|
|
|
|||
|
|
@ -114,10 +114,7 @@ LLPanel::LLPanel(const LLPanel::Params& p)
|
|||
mCommitCallbackRegistrar(false),
|
||||
mEnableCallbackRegistrar(false),
|
||||
mXMLFilename(p.filename),
|
||||
mVisibleSignal(NULL),
|
||||
mCloseConfirmationSignal(NULL),
|
||||
mVerifyUponClose(false),
|
||||
mForceCloseAfterVerify(false)
|
||||
mVisibleSignal(NULL)
|
||||
// *NOTE: Be sure to also change LLPanel::initFromParams(). We have too
|
||||
// many classes derived from LLPanel to retrofit them all to pass in params.
|
||||
{
|
||||
|
|
@ -130,7 +127,6 @@ LLPanel::LLPanel(const LLPanel::Params& p)
|
|||
LLPanel::~LLPanel()
|
||||
{
|
||||
delete mVisibleSignal;
|
||||
delete mCloseConfirmationSignal;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -353,14 +349,6 @@ void LLPanel::handleVisibilityChange ( BOOL new_visibility )
|
|||
(*mVisibleSignal)(this, LLSD(new_visibility) ); // Pass BOOL as LLSD
|
||||
}
|
||||
|
||||
|
||||
void LLPanel::handleCloseConfirmation( bool app_quitting)
|
||||
{
|
||||
if (mCloseConfirmationSignal)
|
||||
{
|
||||
(*mCloseConfirmationSignal)(this, LLSD( app_quitting ) );
|
||||
}
|
||||
}
|
||||
void LLPanel::setFocus(BOOL b)
|
||||
{
|
||||
if( b && !hasFocus())
|
||||
|
|
@ -971,17 +959,10 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t::
|
|||
{
|
||||
mVisibleSignal = new commit_signal_t();
|
||||
}
|
||||
|
||||
return mVisibleSignal->connect(cb);
|
||||
}
|
||||
|
||||
boost::signals2::connection LLPanel::setCloseConfirmationCallback( const commit_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mCloseConfirmationSignal)
|
||||
{
|
||||
mCloseConfirmationSignal = new commit_signal_t();
|
||||
}
|
||||
return mCloseConfirmationSignal->connect(cb);
|
||||
}
|
||||
static LLFastTimer::DeclareTimer FTM_BUILD_PANELS("Build Panels");
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -116,8 +116,6 @@ public:
|
|||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
|
||||
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
|
||||
void handleCloseConfirmation( bool app_quitting );
|
||||
|
||||
|
||||
// From LLFocusableElement
|
||||
/*virtual*/ void setFocus( BOOL b );
|
||||
|
|
@ -253,8 +251,6 @@ public:
|
|||
std::string getXMLFilename() { return mXMLFilename; };
|
||||
|
||||
boost::signals2::connection setVisibleCallback( const commit_signal_t::slot_type& cb );
|
||||
boost::signals2::connection setCloseConfirmationCallback( const commit_signal_t::slot_type& cb );
|
||||
|
||||
|
||||
protected:
|
||||
// Override to set not found list
|
||||
|
|
@ -264,7 +260,6 @@ protected:
|
|||
EnableCallbackRegistry::ScopedRegistrar mEnableCallbackRegistrar;
|
||||
|
||||
commit_signal_t* mVisibleSignal; // Called when visibility changes, passes new visibility as LLSD()
|
||||
commit_signal_t* mCloseConfirmationSignal;
|
||||
|
||||
std::string mHelpTopic; // the name of this panel's help topic to display in the Help Viewer
|
||||
typedef std::deque<const LLCallbackMap::map_t*> factory_stack_t;
|
||||
|
|
@ -272,11 +267,7 @@ protected:
|
|||
|
||||
// for setting the xml filename when building panel in context dependent cases
|
||||
std::string mXMLFilename;
|
||||
//Specific close-down logic in subclass
|
||||
BOOL mVerifyUponClose;
|
||||
public:
|
||||
BOOL mForceCloseAfterVerify;
|
||||
|
||||
|
||||
private:
|
||||
BOOL mBgVisible; // any background at all?
|
||||
BOOL mBgOpaque; // use opaque color or image
|
||||
|
|
|
|||
|
|
@ -483,7 +483,9 @@ void AISUpdate::doUpdate()
|
|||
del_it != mObjectsDeleted.end(); ++del_it)
|
||||
{
|
||||
LL_DEBUGS("Inventory") << "deleted item " << *del_it << llendl;
|
||||
gInventory.onObjectDeletedFromServer(*del_it, false, false);
|
||||
gInventory.onObjectDeletedFromServer(*del_it, false, false, false);
|
||||
}
|
||||
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,29 +40,13 @@
|
|||
const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
|
||||
|
||||
LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params)
|
||||
: LLFloater(key, params)
|
||||
, mAppQuiting( false )
|
||||
: LLFloater(key, params)
|
||||
{
|
||||
// Prevent transient floaters (e.g. IM windows) from hiding
|
||||
// when this floater is clicked.
|
||||
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::GLOBAL, this);
|
||||
//We want this container to handle the shutdown logic of the sidepanelappearance.
|
||||
mVerifyUponClose = TRUE;
|
||||
}
|
||||
|
||||
BOOL LLFloaterSidePanelContainer::postBuild()
|
||||
{
|
||||
setCloseConfirmationCallback( boost::bind(&LLFloaterSidePanelContainer::onConfirmationClose,this,_2));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterSidePanelContainer::onConfirmationClose( const LLSD &confirm )
|
||||
{
|
||||
mAppQuiting = confirm.asBoolean();
|
||||
onClickCloseBtn();
|
||||
}
|
||||
|
||||
|
||||
LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
|
||||
{
|
||||
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::GLOBAL, this);
|
||||
|
|
@ -71,34 +55,26 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
|
|||
void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
|
||||
{
|
||||
getChild<LLPanel>(sMainPanelName)->onOpen(key);
|
||||
mAppQuiting = false;
|
||||
}
|
||||
|
||||
void LLFloaterSidePanelContainer::onClose( bool app_quitting )
|
||||
{
|
||||
if (! mAppQuiting ) { mForceCloseAfterVerify = true; }
|
||||
LLSidepanelAppearance* panel = getSidePanelAppearance();
|
||||
if ( panel )
|
||||
{
|
||||
panel->mRevertSet = true;
|
||||
panel->onCloseFromAppearance( this );
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterSidePanelContainer::onClickCloseBtn()
|
||||
{
|
||||
LLSidepanelAppearance* panel = getSidePanelAppearance();
|
||||
if ( panel )
|
||||
LLPanelOutfitEdit* panel_outfit_edit =
|
||||
dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
|
||||
if (panel_outfit_edit)
|
||||
{
|
||||
panel->onClose( this );
|
||||
LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
|
||||
if (parent == this )
|
||||
{
|
||||
LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
|
||||
if ( panel_appearance )
|
||||
{
|
||||
panel_appearance->getWearable()->onClose();
|
||||
panel_appearance->showOutfitsInventoryPanel();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloater::onClickCloseBtn();
|
||||
}
|
||||
}
|
||||
void LLFloaterSidePanelContainer::close()
|
||||
{
|
||||
|
||||
LLFloater::onClickCloseBtn();
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +85,7 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
|
|||
|
||||
if (!getVisible())
|
||||
{
|
||||
openFloater();
|
||||
openFloater();
|
||||
}
|
||||
|
||||
LLPanel* panel = NULL;
|
||||
|
|
@ -130,30 +106,10 @@ LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_na
|
|||
|
||||
void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, const LLSD& key)
|
||||
{
|
||||
//If we're already open then check whether anything is dirty
|
||||
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
|
||||
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
|
||||
if (floaterp)
|
||||
{
|
||||
if ( floaterp->getVisible() )
|
||||
{
|
||||
LLSidepanelAppearance* panel = floaterp->getSidePanelAppearance();
|
||||
if ( panel )
|
||||
{
|
||||
if ( panel->checkForDirtyEdits() )
|
||||
{
|
||||
panel->onClickConfirmExitWithoutSaveIntoAppearance( floaterp );
|
||||
}
|
||||
else
|
||||
{
|
||||
//or a call into some new f() that just shows inv panel?
|
||||
floaterp->openChildPanel(sMainPanelName, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
floaterp->openChildPanel(sMainPanelName, key);
|
||||
}
|
||||
floaterp->openChildPanel(sMainPanelName, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -177,19 +133,3 @@ LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name,
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LLSidepanelAppearance* LLFloaterSidePanelContainer::getSidePanelAppearance()
|
||||
{
|
||||
LLSidepanelAppearance* panel_appearance = NULL;
|
||||
LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast<LLPanelOutfitEdit*>(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit"));
|
||||
if (panel_outfit_edit)
|
||||
{
|
||||
LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit);
|
||||
if (parent == this )
|
||||
{
|
||||
panel_appearance = dynamic_cast<LLSidepanelAppearance*>(getPanel("appearance"));
|
||||
}
|
||||
}
|
||||
return panel_appearance;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLSidepanelAppearance;
|
||||
|
||||
/**
|
||||
* Class LLFloaterSidePanelContainer
|
||||
*
|
||||
|
|
@ -44,8 +42,6 @@ class LLSidepanelAppearance;
|
|||
*/
|
||||
class LLFloaterSidePanelContainer : public LLFloater
|
||||
{
|
||||
friend class LLSidePanelAppearance;
|
||||
|
||||
private:
|
||||
static const std::string sMainPanelName;
|
||||
|
||||
|
|
@ -54,15 +50,11 @@ public:
|
|||
~LLFloaterSidePanelContainer();
|
||||
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
/*virtual*/ void onClickCloseBtn();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
void onConfirmationClose( const LLSD &confirm );
|
||||
|
||||
LLPanel* openChildPanel(const std::string& panel_name, const LLSD& params);
|
||||
|
||||
void close();
|
||||
|
||||
static void showPanel(const std::string& floater_name, const LLSD& key);
|
||||
|
||||
static void showPanel(const std::string& floater_name, const std::string& panel_name, const LLSD& key);
|
||||
|
|
@ -86,12 +78,6 @@ public:
|
|||
}
|
||||
return panel;
|
||||
}
|
||||
|
||||
private:
|
||||
LLSidepanelAppearance* getSidePanelAppearance();
|
||||
|
||||
public:
|
||||
bool mAppQuiting;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERSIDEPANELCONTAINER_H
|
||||
|
|
|
|||
|
|
@ -1157,6 +1157,7 @@ void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat,
|
|||
|
||||
void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLSD& update)
|
||||
{
|
||||
LLTimer timer;
|
||||
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
|
||||
{
|
||||
dump_sequential_xml(gAgentAvatarp->getFullname() + "_ais_update", update);
|
||||
|
|
@ -1164,6 +1165,7 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS
|
|||
|
||||
AISUpdate ais_update(update); // parse update llsd into stuff to do.
|
||||
ais_update.doUpdate(); // execute the updates in the appropriate order.
|
||||
llinfos << "elapsed: " << timer.getElapsedTimeF32() << llendl;
|
||||
}
|
||||
|
||||
void LLInventoryModel::onItemUpdated(const LLUUID& item_id, const LLSD& updates, bool update_parent_version)
|
||||
|
|
@ -1316,7 +1318,7 @@ void LLInventoryModel::onDescendentsPurgedFromServer(const LLUUID& object_id, bo
|
|||
|
||||
// Update model after an item is confirmed as removed from
|
||||
// server. Works for categories or items.
|
||||
void LLInventoryModel::onObjectDeletedFromServer(const LLUUID& object_id, bool fix_broken_links, bool update_parent_version)
|
||||
void LLInventoryModel::onObjectDeletedFromServer(const LLUUID& object_id, bool fix_broken_links, bool update_parent_version, bool do_notify_observers)
|
||||
{
|
||||
LLPointer<LLInventoryObject> obj = getObject(object_id);
|
||||
if(obj)
|
||||
|
|
@ -1337,13 +1339,13 @@ void LLInventoryModel::onObjectDeletedFromServer(const LLUUID& object_id, bool f
|
|||
|
||||
// From purgeObject()
|
||||
LLPreview::hide(object_id);
|
||||
deleteObject(object_id, fix_broken_links);
|
||||
deleteObject(object_id, fix_broken_links, do_notify_observers);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Delete a particular inventory object by ID.
|
||||
void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links)
|
||||
void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, bool do_notify_observers)
|
||||
{
|
||||
lldebugs << "LLInventoryModel::deleteObject()" << llendl;
|
||||
LLPointer<LLInventoryObject> obj = getObject(id);
|
||||
|
|
@ -1402,7 +1404,10 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links)
|
|||
{
|
||||
updateLinkedObjectsFromPurge(id);
|
||||
}
|
||||
notifyObservers();
|
||||
if (do_notify_observers)
|
||||
{
|
||||
notifyObservers();
|
||||
}
|
||||
}
|
||||
|
||||
void LLInventoryModel::updateLinkedObjectsFromPurge(const LLUUID &baseobj_id)
|
||||
|
|
|
|||
|
|
@ -334,7 +334,10 @@ public:
|
|||
|
||||
// Update model after an item is confirmed as removed from
|
||||
// server. Works for categories or items.
|
||||
void onObjectDeletedFromServer(const LLUUID& item_id, bool fix_broken_links = true, bool update_parent_version = true);
|
||||
void onObjectDeletedFromServer(const LLUUID& item_id,
|
||||
bool fix_broken_links = true,
|
||||
bool update_parent_version = true,
|
||||
bool do_notify_observers = true);
|
||||
|
||||
// Update model after all descendents removed from server.
|
||||
void onDescendentsPurgedFromServer(const LLUUID& object_id, bool fix_broken_links = true);
|
||||
|
|
@ -349,7 +352,7 @@ public:
|
|||
// object from the internal data structures, maintaining a
|
||||
// consistent internal state. No cache accounting, observer
|
||||
// notification, or server update is performed.
|
||||
void deleteObject(const LLUUID& id, bool fix_broken_links = true);
|
||||
void deleteObject(const LLUUID& id, bool fix_broken_links = true, bool do_notify_observers = true);
|
||||
/// move Item item_id to Trash
|
||||
void removeItem(const LLUUID& item_id);
|
||||
/// move Category category_id to Trash
|
||||
|
|
|
|||
|
|
@ -48,9 +48,6 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llviewerwearable.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llfloatersidepanelcontainer.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLSidepanelAppearance> t_appearance("sidepanel_appearance");
|
||||
|
||||
|
|
@ -73,139 +70,13 @@ private:
|
|||
LLSidepanelAppearance *mPanel;
|
||||
};
|
||||
|
||||
bool LLSidepanelAppearance::callBackExitWithoutSaveViaBack(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if ( option == 0 )
|
||||
{
|
||||
LLAppearanceMgr::instance().setOutfitDirty( true );
|
||||
showOutfitsInventoryPanel();
|
||||
LLAppearanceMgr::getInstance()->wearBaseOutfit();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLSidepanelAppearance::onCloseFromAppearance(LLFloaterSidePanelContainer* obj)
|
||||
{
|
||||
mLLFloaterSidePanelContainer = obj;
|
||||
if ( mEditWearable->isAvailable() && mEditWearable->isDirty() )
|
||||
{
|
||||
LLSidepanelAppearance* pSelf = (LLSidepanelAppearance *)this;
|
||||
LLNotificationsUtil::add("ConfirmExitWithoutSave", LLSD(), LLSD(), boost::bind(&LLSidepanelAppearance::callBackExitWithoutSaveViaClose,pSelf,_1,_2) );
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVOAvatarSelf::onCustomizeEnd(FALSE);
|
||||
toggleWearableEditPanel(FALSE);
|
||||
mLLFloaterSidePanelContainer->mForceCloseAfterVerify=false;
|
||||
}
|
||||
}
|
||||
bool LLSidepanelAppearance::onSaveCommit(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (0 == option)
|
||||
{
|
||||
std::string outfit_name = response["message"].asString();
|
||||
LLStringUtil::trim(outfit_name);
|
||||
std::string current_outfit_name;
|
||||
|
||||
LLAppearanceMgr::getInstance()->getBaseOutfitName(current_outfit_name);
|
||||
|
||||
if ( current_outfit_name == outfit_name )
|
||||
{
|
||||
LLAppearanceMgr::getInstance()->updateBaseOutfit();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUUID outfit_folder = LLAppearanceMgr::getInstance()->makeNewOutfitLinks( outfit_name,FALSE );
|
||||
}
|
||||
|
||||
LLVOAvatarSelf::onCustomizeEnd( FALSE );
|
||||
mLLFloaterSidePanelContainer->close();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
bool LLSidepanelAppearance::callBackExitWithoutSaveViaClose(const LLSD& notification, const LLSD& response)
|
||||
{ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if ( option == 0 )
|
||||
{
|
||||
std::string outfit_name;
|
||||
if (!LLAppearanceMgr::getInstance()->getBaseOutfitName(outfit_name))
|
||||
{
|
||||
outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT);
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
args["DESC"] = outfit_name;
|
||||
|
||||
LLSD payload;
|
||||
LLNotificationsUtil::add("SaveOutfitEither", args, payload, boost::bind(&LLSidepanelAppearance::onSaveCommit, this, _1, _2));
|
||||
showOutfitEditPanel();
|
||||
return false;
|
||||
}
|
||||
else if ( option == 1 )
|
||||
{
|
||||
mEditWearable->revertChanges();
|
||||
toggleWearableEditPanel(FALSE);
|
||||
showOutfitEditPanel();
|
||||
LLVOAvatarSelf::onCustomizeEnd( FALSE );
|
||||
if ( !mLLFloaterSidePanelContainer->mAppQuiting )
|
||||
{
|
||||
mRevertSet = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
mLLFloaterSidePanelContainer->closeFloater( true );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
mLLFloaterSidePanelContainer->mForceCloseAfterVerify = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLSidepanelAppearance::onClickConfirmExitWithoutSaveIntoAppearance( LLFloaterSidePanelContainer* obj )
|
||||
{
|
||||
mLLFloaterSidePanelContainer = obj;
|
||||
if ( LLAppearanceMgr::getInstance()->isOutfitDirty() || mEditWearable->isDirty() )
|
||||
{
|
||||
LLSidepanelAppearance* pSelf = (LLSidepanelAppearance *)this;
|
||||
LLNotificationsUtil::add("ConfirmExitWithoutSave", LLSD(), LLSD(), boost::bind(&LLSidepanelAppearance::callBackExitWithoutSaveViaClose,pSelf,_1,_2) );
|
||||
}
|
||||
else
|
||||
{
|
||||
showOutfitsInventoryPanel();
|
||||
}
|
||||
}
|
||||
void LLSidepanelAppearance::onClickConfirmExitWithoutSaveViaBack()
|
||||
{
|
||||
showOutfitsInventoryPanel();
|
||||
}
|
||||
|
||||
void LLSidepanelAppearance::onClose(LLFloaterSidePanelContainer* obj)
|
||||
{ mLLFloaterSidePanelContainer = obj;
|
||||
if ( mEditWearable->isAvailable() && mEditWearable->isDirty() )
|
||||
{
|
||||
LLSidepanelAppearance* pSelf = (LLSidepanelAppearance *)this;
|
||||
LLNotificationsUtil::add("ConfirmExitWithoutSave", LLSD(), LLSD(), boost::bind(&LLSidepanelAppearance::callBackExitWithoutSaveViaClose,pSelf,_1,_2) );
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVOAvatarSelf::onCustomizeEnd(FALSE);
|
||||
mLLFloaterSidePanelContainer->close();
|
||||
}
|
||||
}
|
||||
|
||||
LLSidepanelAppearance::LLSidepanelAppearance() :
|
||||
LLPanel(),
|
||||
mFilterSubString(LLStringUtil::null),
|
||||
mFilterEditor(NULL),
|
||||
mOutfitEdit(NULL),
|
||||
mCurrOutfitPanel(NULL),
|
||||
mOpened(false),
|
||||
mSidePanelJustOpened(true),
|
||||
mRevertSet(false)
|
||||
mOpened(false)
|
||||
{
|
||||
LLOutfitObserver& outfit_observer = LLOutfitObserver::instance();
|
||||
outfit_observer.addBOFReplacedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
|
||||
|
|
@ -214,8 +85,6 @@ LLSidepanelAppearance::LLSidepanelAppearance() :
|
|||
|
||||
gAgentWearables.addLoadingStartedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, true));
|
||||
gAgentWearables.addLoadedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, false));
|
||||
|
||||
|
||||
}
|
||||
|
||||
LLSidepanelAppearance::~LLSidepanelAppearance()
|
||||
|
|
@ -250,8 +119,8 @@ BOOL LLSidepanelAppearance::postBuild()
|
|||
{
|
||||
LLButton* back_btn = mOutfitEdit->getChild<LLButton>("back_btn");
|
||||
if (back_btn)
|
||||
{
|
||||
back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onClickConfirmExitWithoutSaveViaBack, this));
|
||||
{
|
||||
back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::showOutfitsInventoryPanel, this));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -275,7 +144,6 @@ BOOL LLSidepanelAppearance::postBuild()
|
|||
|
||||
setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2));
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -286,15 +154,11 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
|
|||
{
|
||||
// No specific panel requested.
|
||||
// If we're opened for the first time then show My Outfits.
|
||||
// Else show outfit edit panel
|
||||
// Else do nothing.
|
||||
if (!mOpened)
|
||||
{
|
||||
showOutfitsInventoryPanel();
|
||||
}
|
||||
else
|
||||
{
|
||||
showOutfitEditPanel();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -319,12 +183,6 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
|
|||
|
||||
void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
|
||||
{
|
||||
//handle leaving and subsequent user verification of discarding any unsaved data
|
||||
if ( mSidePanelJustOpened )
|
||||
{
|
||||
mSidePanelJustOpened = false;
|
||||
}
|
||||
|
||||
LLSD visibility;
|
||||
visibility["visible"] = new_visibility.asBoolean();
|
||||
visibility["reset_accordion"] = false;
|
||||
|
|
@ -333,9 +191,8 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
|
|||
|
||||
void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility)
|
||||
{
|
||||
if (new_visibility["visible"].asBoolean() )
|
||||
if (new_visibility["visible"].asBoolean())
|
||||
{
|
||||
|
||||
const BOOL is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible();
|
||||
const BOOL is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible();
|
||||
|
||||
|
|
@ -595,7 +452,7 @@ void LLSidepanelAppearance::editWearable(LLViewerWearable *wearable, LLView *dat
|
|||
LLFloaterSidePanelContainer::showPanel("appearance", LLSD());
|
||||
LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data);
|
||||
if (panel)
|
||||
{
|
||||
{
|
||||
panel->showWearableEditPanel(wearable, disable_camera_switch);
|
||||
}
|
||||
}
|
||||
|
|
@ -686,9 +543,3 @@ void LLSidepanelAppearance::updateScrollingPanelList()
|
|||
mEditWearable->updateScrollingPanelList();
|
||||
}
|
||||
}
|
||||
|
||||
bool LLSidepanelAppearance::checkForDirtyEdits()
|
||||
{
|
||||
return ( mEditWearable->isDirty() ) ? true : false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,11 +38,9 @@ class LLCurrentlyWornFetchObserver;
|
|||
class LLPanelEditWearable;
|
||||
class LLViewerWearable;
|
||||
class LLPanelOutfitsInventory;
|
||||
class LLFloaterSidePanelContainer;
|
||||
|
||||
class LLSidepanelAppearance : public LLPanel
|
||||
{
|
||||
|
||||
{
|
||||
LOG_CLASS(LLSidepanelAppearance);
|
||||
public:
|
||||
LLSidepanelAppearance();
|
||||
|
|
@ -50,9 +48,6 @@ public:
|
|||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void onClose(LLFloaterSidePanelContainer* obj);
|
||||
|
||||
void onClickCloseBtn();
|
||||
|
||||
void refreshCurrentOutfitName(const std::string& name = "");
|
||||
|
||||
|
|
@ -70,12 +65,6 @@ public:
|
|||
void updateScrollingPanelList();
|
||||
void updateToVisibility( const LLSD& new_visibility );
|
||||
LLPanelEditWearable* getWearable(){ return mEditWearable; }
|
||||
bool callBackExitWithoutSaveViaBack(const LLSD& notification, const LLSD& response);
|
||||
void onClickConfirmExitWithoutSaveViaBack();
|
||||
bool callBackExitWithoutSaveViaClose(const LLSD& notification, const LLSD& response);
|
||||
bool checkForDirtyEdits();
|
||||
void onClickConfirmExitWithoutSaveIntoAppearance(LLFloaterSidePanelContainer* obj);
|
||||
void onCloseFromAppearance(LLFloaterSidePanelContainer* obj);
|
||||
|
||||
private:
|
||||
void onFilterEdit(const std::string& search_string);
|
||||
|
|
@ -88,9 +77,6 @@ private:
|
|||
void toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch = FALSE);
|
||||
void toggleWearableEditPanel(BOOL visible, LLViewerWearable* wearable = NULL, BOOL disable_camera_switch = FALSE);
|
||||
|
||||
|
||||
bool onSaveCommit(const LLSD& notification, const LLSD& response);
|
||||
|
||||
LLFilterEditor* mFilterEditor;
|
||||
LLPanelOutfitsInventory* mPanelOutfitsInventory;
|
||||
LLPanelOutfitEdit* mOutfitEdit;
|
||||
|
|
@ -99,7 +85,6 @@ private:
|
|||
LLButton* mOpenOutfitBtn;
|
||||
LLButton* mEditAppearanceBtn;
|
||||
LLButton* mNewOutfitBtn;
|
||||
|
||||
LLPanel* mCurrOutfitPanel;
|
||||
|
||||
LLTextBox* mCurrentLookName;
|
||||
|
|
@ -114,13 +99,6 @@ private:
|
|||
|
||||
// Gets set to true when we're opened for the first time.
|
||||
bool mOpened;
|
||||
// Set to true if sidepanel has just been opened
|
||||
bool mSidePanelJustOpened;
|
||||
LLFloaterSidePanelContainer* mLLFloaterSidePanelContainer;
|
||||
|
||||
public:
|
||||
|
||||
bool mRevertSet;
|
||||
};
|
||||
|
||||
#endif //LL_LLSIDEPANELAPPEARANCE_H
|
||||
|
|
|
|||
|
|
@ -10114,37 +10114,5 @@ Cannot create large prims that intersect other players. Please re-try when othe
|
|||
</notification>
|
||||
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ConfirmExitWithoutSave"
|
||||
type="alertmodal">
|
||||
You have not saved the changes to your outfit. Would you like to save it now?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
name="yesnocancelbuttons"
|
||||
notext="Revert"
|
||||
yestext="Yes"
|
||||
canceltext="Dismiss"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
label="Save Outfit"
|
||||
name="SaveOutfitEither"
|
||||
type="alertmodal">
|
||||
<unique/>
|
||||
Save outfit (defaults to current outfit):
|
||||
<tag>confirm</tag>
|
||||
<form name="form">
|
||||
<input name="message" type="text">
|
||||
[DESC]
|
||||
</input>
|
||||
<button
|
||||
default="true"
|
||||
index="0"
|
||||
name="OK"
|
||||
text="Save"/>
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
|
||||
</notifications>
|
||||
|
|
|
|||
Loading…
Reference in New Issue