summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/lldate.cpp23
-rw-r--r--indra/llui/llaccordionctrltab.cpp13
-rw-r--r--indra/llui/llaccordionctrltab.h2
-rw-r--r--indra/newview/llagentwearables.cpp12
-rw-r--r--indra/newview/llagentwearables.h7
-rw-r--r--indra/newview/llappearancemgr.cpp23
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llfloatersnapshot.cpp79
-rw-r--r--indra/newview/lloutfitobserver.cpp7
-rw-r--r--indra/newview/llpanelgrouproles.cpp2
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp7
-rw-r--r--indra/newview/llpaneloutfitsinventory.h1
-rw-r--r--indra/newview/llsidepanelappearance.cpp1
-rw-r--r--indra/newview/llsidetray.cpp10
-rw-r--r--indra/newview/llsidetray.h2
-rw-r--r--indra/newview/llstartup.cpp3
16 files changed, 140 insertions, 54 deletions
diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp
index de7f2ead74..a7ef28b431 100644
--- a/indra/llcommon/lldate.cpp
+++ b/indra/llcommon/lldate.cpp
@@ -248,8 +248,27 @@ bool LLDate::fromStream(std::istream& s)
s >> fractional;
seconds_since_epoch += fractional;
}
- c = s.get(); // skip the Z
- if (c != 'Z') { return false; }
+
+ c = s.peek(); // check for offset
+ if (c == '+' || c == '-')
+ {
+ S32 offset_sign = (c == '+') ? 1 : -1;
+ S32 offset_hours = 0;
+ S32 offset_minutes = 0;
+ S32 offset_in_seconds = 0;
+
+ s >> offset_hours;
+
+ c = s.get(); // skip the colon a get the minutes if there are any
+ if (c == ':')
+ {
+ s >> offset_minutes;
+ }
+
+ offset_in_seconds = (offset_hours * 60 + offset_sign * offset_minutes) * 60;
+ seconds_since_epoch -= offset_in_seconds;
+ }
+ else if (c != 'Z') { return false; } // skip the Z
mSecondsSinceEpoch = seconds_since_epoch;
return true;
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 1bc8086a27..be231fd8cf 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -968,3 +968,16 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
}
return LLUICtrl::handleToolTip(x, y, mask);
}
+BOOL LLAccordionCtrlTab::handleScrollWheel ( S32 x, S32 y, S32 clicks )
+{
+ if( LLUICtrl::handleScrollWheel(x,y,clicks))
+ {
+ return TRUE;
+ }
+ if( mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) )
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index 480b26e130..19d4ec0a1c 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -166,6 +166,8 @@ public:
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
+ virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
+
virtual bool addChild(LLView* child, S32 tab_group);
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 342f9a5d80..557b3b0a77 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -2099,7 +2099,19 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
}
}
+boost::signals2::connection LLAgentWearables::addLoadingStartedCallback(loading_started_callback_t cb)
+{
+ return mLoadingStartedSignal.connect(cb);
+}
+
boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_t cb)
{
return mLoadedSignal.connect(cb);
}
+
+void LLAgentWearables::notifyLoadingStarted()
+{
+ mLoadingStartedSignal();
+}
+
+// EOF
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index a41b949be6..3295544e04 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -224,11 +224,18 @@ public:
// Signals
//--------------------------------------------------------------------
public:
+ typedef boost::function<void()> loading_started_callback_t;
+ typedef boost::signals2::signal<void()> loading_started_signal_t;
+ boost::signals2::connection addLoadingStartedCallback(loading_started_callback_t cb);
+
typedef boost::function<void()> loaded_callback_t;
typedef boost::signals2::signal<void()> loaded_signal_t;
boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
+ void notifyLoadingStarted();
+
private:
+ loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed
loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded
//--------------------------------------------------------------------
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 3691d731ed..a7206095d3 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -644,6 +644,13 @@ const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink()
const LLViewerInventoryCategory *cat = item->getLinkedCategory();
if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT)
{
+ const LLUUID parent_id = cat->getParentUUID();
+ LLViewerInventoryCategory* parent_cat = gInventory.getCategory(parent_id);
+ // if base outfit moved to trash it means that we don't have base outfit
+ if (parent_cat != NULL && parent_cat->getPreferredType() == LLFolderType::FT_TRASH)
+ {
+ return NULL;
+ }
return item;
}
}
@@ -1400,6 +1407,7 @@ void LLAppearanceMgr::getUserDescendents(const LLUUID& category,
void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append)
{
+ gAgentWearables.notifyLoadingStarted();
if(!category) return;
llinfos << "wearInventoryCategory( " << category->getName()
@@ -1992,13 +2000,19 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id)
class LLShowCreatedOutfit: public LLInventoryCallback
{
public:
- LLShowCreatedOutfit(LLUUID& folder_id): mFolderID(folder_id)
+ LLShowCreatedOutfit(LLUUID& folder_id, bool show_panel = true): mFolderID(folder_id), mShowPanel(show_panel)
{}
virtual ~LLShowCreatedOutfit()
{
LLSD key;
- LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);
+
+ //EXT-7727. For new accounts LLShowCreatedOutfit is created during login process
+ // add may be processed after login process is finished
+ if (mShowPanel)
+ {
+ LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key);
+ }
LLPanelOutfitsInventory *outfit_panel =
dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
if (outfit_panel)
@@ -2022,9 +2036,10 @@ public:
private:
LLUUID mFolderID;
+ bool mShowPanel;
};
-LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name)
+LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, bool show_panel)
{
if (!isAgentAvatarValid()) return LLUUID::null;
@@ -2037,7 +2052,7 @@ LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name)
updateClothingOrderingInfo();
- LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id);
+ LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id,show_panel);
shallowCopyCategoryContents(getCOF(),folder_id, cb);
createBaseOutfitLink(folder_id, cb);
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 2227a43cd8..e42f9f7d6f 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -151,7 +151,7 @@ public:
void removeItemFromAvatar(const LLUUID& item_id);
- LLUUID makeNewOutfitLinks(const std::string& new_folder_name);
+ LLUUID makeNewOutfitLinks(const std::string& new_folder_name,bool show_panel = true);
bool moveWearable(LLViewerInventoryItem* item, bool closer_to_body);
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 00981d3c25..129dd55e48 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -164,8 +164,6 @@ public:
void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; }
void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
LLFloaterPostcard* savePostcard();
- void confirmSavingTexture(bool set_as_profile_pic = false);
- bool onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic);
void saveTexture(bool set_as_profile_pic = false);
BOOL saveLocal();
void saveWeb(std::string url);
@@ -981,27 +979,6 @@ void profile_pic_upload_callback(const LLUUID& uuid)
floater->setAsProfilePic(uuid);
}
-void LLSnapshotLivePreview::confirmSavingTexture(bool set_as_profile_pic)
-{
- LLSD args;
- args["AMOUNT"] = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
- LLNotificationsUtil::add("UploadConfirmation", args, LLSD(),
- boost::bind(&LLSnapshotLivePreview::onSavingTextureConfirmed, this, _1, _2, set_as_profile_pic));
-}
-
-bool LLSnapshotLivePreview::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
- if (option == 0)
- {
- saveTexture(set_as_profile_pic);
- }
-
- return false;
-}
-
-
void LLSnapshotLivePreview::saveTexture(bool set_as_profile_pic)
{
// gen a new uuid for this asset
@@ -1180,6 +1157,9 @@ public:
static void onCommitSnapshotFormat(LLUICtrl* ctrl, void* data);
static void onCommitCustomResolution(LLUICtrl *ctrl, void* data);
static void onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type);
+ static void confirmSavingTexture(LLFloaterSnapshot* view, bool set_as_profile_pic = false);
+ static void onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, LLFloaterSnapshot* view, bool set_as_profile_pic);
+ static void checkCloseOnKeep(LLFloaterSnapshot* view);
static void onCommitProfilePic(LLFloaterSnapshot* view);
static void showAdvanced(LLFloaterSnapshot* view, const BOOL visible);
static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ;
@@ -1719,13 +1699,7 @@ public:
void LLFloaterSnapshot::Impl::onCommitProfilePic(LLFloaterSnapshot* view)
{
- //first save to harddrive
- LLSnapshotLivePreview* previewp = getPreviewView(view);
-
- if(previewp)
- {
- previewp->confirmSavingTexture(true);
- }
+ confirmSavingTexture(view, true);
}
void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type)
@@ -1739,14 +1713,17 @@ void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapsh
if (type == LLSnapshotLivePreview::SNAPSHOT_WEB)
{
previewp->saveWeb(view->getString("share_to_web_url"));
+ checkCloseOnKeep(view);
}
else if (type == LLSnapshotLivePreview::SNAPSHOT_LOCAL)
{
previewp->saveLocal();
+ checkCloseOnKeep(view);
}
else if (type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
{
- previewp->confirmSavingTexture();
+ // uploads and then calls checkCloseOnKeep() on confirmation from user
+ confirmSavingTexture(view);
}
else if (type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD)
{
@@ -1759,16 +1736,40 @@ void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapsh
gSnapshotFloaterView->addChild(floater);
view->addDependentFloater(floater, FALSE);
}
+ checkCloseOnKeep(view);
}
+ }
+}
- if (gSavedSettings.getBOOL("CloseSnapshotOnKeep"))
- {
- view->closeFloater();
- }
- else
- {
- checkAutoSnapshot(previewp);
- }
+void LLFloaterSnapshot::Impl::confirmSavingTexture(LLFloaterSnapshot* view, bool set_as_profile_pic)
+{
+ LLSD args;
+ args["AMOUNT"] = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ LLNotificationsUtil::add("UploadConfirmation", args, LLSD(),
+ boost::bind(&onSavingTextureConfirmed, _1, _2, view, set_as_profile_pic));
+}
+
+void LLFloaterSnapshot::Impl::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, LLFloaterSnapshot* view, bool set_as_profile_pic)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ if (option == 0)
+ {
+ LLSnapshotLivePreview* previewp = getPreviewView(view);
+ previewp->saveTexture(set_as_profile_pic);
+ checkCloseOnKeep(view);
+ }
+}
+
+void LLFloaterSnapshot::Impl::checkCloseOnKeep(LLFloaterSnapshot* view)
+{
+ if (gSavedSettings.getBOOL("CloseSnapshotOnKeep"))
+ {
+ view->closeFloater();
+ }
+ else
+ {
+ checkAutoSnapshot(getPreviewView(view));
}
}
diff --git a/indra/newview/lloutfitobserver.cpp b/indra/newview/lloutfitobserver.cpp
index efa01bade9..03414b9964 100644
--- a/indra/newview/lloutfitobserver.cpp
+++ b/indra/newview/lloutfitobserver.cpp
@@ -56,12 +56,9 @@ void LLOutfitObserver::changed(U32 mask)
if (!gInventory.isInventoryUsable())
return;
- bool COF_changed = checkCOF();
+ checkCOF();
- if (!COF_changed)
- {
- checkBaseOutfit();
- }
+ checkBaseOutfit();
}
// static
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index b356fe6bfd..26e8a932aa 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -815,6 +815,8 @@ void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id)
if(mRoleDescription) mRoleDescription->clear();
if(mRoleTitle) mRoleTitle->clear();
+ mHasRoleChange = FALSE;
+
setFooterEnabled(FALSE);
LLPanelGroupSubTab::setGroupID(id);
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 1157c40b39..5563214407 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -245,6 +245,7 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this));
+ gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoading, this));
LLOutfitObserver& observer = LLOutfitObserver::instance();
observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this));
@@ -382,7 +383,6 @@ void LLPanelOutfitsInventory::onWearButtonClick()
if (!isCOFPanelActive())
{
mMyOutfitsPanel->performAction("replaceoutfit");
- setWearablesLoading(true);
}
else
{
@@ -854,6 +854,11 @@ void LLPanelOutfitsInventory::onWearablesLoaded()
setWearablesLoading(false);
}
+void LLPanelOutfitsInventory::onWearablesLoading()
+{
+ setWearablesLoading(true);
+}
+
// static
LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP()
{
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index d58ae554b0..863dc9dd7c 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -127,6 +127,7 @@ protected:
bool hasItemsSelected();
void setWearablesLoading(bool val);
void onWearablesLoaded();
+ void onWearablesLoading();
private:
LLPanel* mListCommands;
LLOutfitListGearMenu* mGearMenu;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 445bde1206..e2d4f5ad45 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -83,6 +83,7 @@ LLSidepanelAppearance::LLSidepanelAppearance() :
mOpened(false)
{
LLOutfitObserver& outfit_observer = LLOutfitObserver::instance();
+ outfit_observer.addBOFReplacedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
outfit_observer.addBOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
outfit_observer.addCOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
}
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 9406f80b75..fed39c362e 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -35,6 +35,7 @@
#include "lltextbox.h"
#include "llagentcamera.h"
+#include "llappviewer.h"
#include "llbottomtray.h"
#include "llsidetray.h"
#include "llviewerwindow.h"
@@ -272,9 +273,18 @@ BOOL LLSideTray::postBuild()
collapseSideBar();
setMouseOpaque(false);
+
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this));
+
return true;
}
+void LLSideTray::handleLoginComplete()
+{
+ //reset tab to "home" tab if it was changesd during login process
+ selectTabByName("sidebar_home");
+}
+
LLSideTrayTab* LLSideTray::getTab(const std::string& name)
{
return getChild<LLSideTrayTab>(name,false);
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index e176ff5aff..3a8d308425 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -161,6 +161,8 @@ public:
commit_signal_t& getCollapseSignal() { return mCollapseSignal; }
+ void handleLoginComplete();
+
protected:
LLSideTrayTab* getTab (const std::string& name);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 9bfcceab2f..df5be34e39 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2494,8 +2494,7 @@ void LLStartUp::saveInitialOutfit()
{
sWearablesLoadedCon.disconnect();
}
-
- LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit);
+ LLAppearanceMgr::getInstance()->makeNewOutfitLinks(sInitialOutfit,false);
}
std::string& LLStartUp::getInitialOutfitName()