diff options
Diffstat (limited to 'indra')
67 files changed, 594 insertions, 445 deletions
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 355ecb58f0..946fc6b375 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -23,12 +23,11 @@ else (STANDALONE) endif (STANDALONE) if (GOOGLE_PERFTOOLS_FOUND) - set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.") + # XXX Disable temporarily, until we have compilation issues on 64-bit + # Etch sorted. + set(USE_GOOGLE_PERFTOOLS OFF CACHE BOOL "Build with Google PerfTools support.") endif (GOOGLE_PERFTOOLS_FOUND) -# XXX Disable temporarily, until we have compilation issues on 64-bit -# Etch sorted. -set(USE_GOOGLE_PERFTOOLS OFF) if (WINDOWS) # *TODO -reenable this once we get server usage sorted out #set(USE_GOOGLE_PERFTOOLS ON) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index e41c75846b..416303342a 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -9,6 +9,7 @@ include(Linking) include(Boost) include(Pth) include(LLSharedLibs) +include(GooglePerfTools) include(Copy3rdPartyLibs) include_directories( @@ -259,6 +260,7 @@ target_link_libraries( ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} ${PTH_LIBRARIES} + ${GOOGLE_PERFTOOLS_LIBRARIES} ) add_dependencies(llcommon stage_third_party_libs) diff --git a/indra/llcommon/llchat.h b/indra/llcommon/llchat.h index acd0da61a4..5af7991006 100644 --- a/indra/llcommon/llchat.h +++ b/indra/llcommon/llchat.h @@ -84,6 +84,7 @@ public: mAudible(CHAT_AUDIBLE_FULLY), mMuted(FALSE), mTime(0.0), + mTimeStr(), mPosAgent(), mURL(), mChatStyle(CHAT_STYLE_NORMAL) @@ -97,6 +98,7 @@ public: EChatAudible mAudible; BOOL mMuted; // pass muted chat to maintain list of chatters F64 mTime; // viewer only, seconds from viewer start + std::string mTimeStr; LLVector3 mPosAgent; std::string mURL; EChatStyle mChatStyle; diff --git a/indra/llcommon/llclickaction.h b/indra/llcommon/llclickaction.h index 8048724575..d4ffbf8634 100644 --- a/indra/llcommon/llclickaction.h +++ b/indra/llcommon/llclickaction.h @@ -33,7 +33,7 @@ #ifndef LL_LLCLICKACTION_H #define LL_LLCLICKACTION_H - +// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! const U8 CLICK_ACTION_NONE = 0; const U8 CLICK_ACTION_TOUCH = 0; const U8 CLICK_ACTION_SIT = 1; @@ -42,5 +42,6 @@ const U8 CLICK_ACTION_PAY = 3; const U8 CLICK_ACTION_OPEN = 4; const U8 CLICK_ACTION_PLAY = 5; const U8 CLICK_ACTION_OPEN_MEDIA = 6; - +const U8 CLICK_ACTION_ZOOM = 7; +// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! #endif diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 9a2f2ab4d3..9c69e4f2b6 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -206,16 +206,6 @@ void LLDockableFloater::draw() LLFloater::draw(); } -void LLDockableFloater::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - if (isDocked()) - { - setDocked(false); - } - - LLFloater::reshape(width, height, called_from_parent); -} - void LLDockableFloater::setDockControl(LLDockControl* dockControl) { mDockControl.reset(dockControl); diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index e5f94dca91..46491d8a29 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -65,7 +65,6 @@ public: /* virtula */BOOL postBuild(); /* virtual */void setDocked(bool docked, bool pop_on_undock = true); /* virtual */void draw(); - /* virtual */void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /** * If descendant class overrides setVisible() then it must still invoke its diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index 7449c339a0..6239a8f721 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -135,6 +135,12 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) LLView* resizing_view = getParent(); if( resizing_view ) { + // undock floater when user resize it + if (((LLFloater*)getParent())->isDocked()) + { + ((LLFloater*)getParent())->setDocked(false, false); + } + // Resize the parent LLRect orig_rect = resizing_view->getRect(); LLRect scaled_rect = orig_rect; diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 8c891b3e8f..8fe9f5ed29 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -613,6 +613,7 @@ extern "C" { int yyerror(const char *fmt, ...); } "CLICK_ACTION_OPEN" { count(); yylval.ival = CLICK_ACTION_OPEN; return(INTEGER_CONSTANT); } "CLICK_ACTION_PLAY" { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); } "CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); } +"CLICK_ACTION_ZOOM" { count(); yylval.ival = CLICK_ACTION_ZOOM; return(INTEGER_CONSTANT); } "TEXTURE_BLANK" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "5748decc-f629-461c-9a36-a35a221fe21f"); return(STRING_CONSTANT); } "TEXTURE_DEFAULT" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "89556747-24cb-43ed-920b-47caed15465f"); return(STRING_CONSTANT); } diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 5f6fd6e4a7..14025c8061 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -510,6 +510,7 @@ CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default act CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked +CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid. TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid. diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index e658b9af6a..4dd569e2fa 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -6330,7 +6330,7 @@ void LLAgent::sendAgentSetAppearance() msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); } msg->nextBlockFast(_PREHASH_ObjectData); - mAvatarObject->packTEMessage( gMessageSystem ); + mAvatarObject->sendAppearanceMessage( gMessageSystem ); } else { diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6b2033fc6f..538dcb6f3d 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -653,11 +653,13 @@ LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearable *wearable) { - if (!getWearable(type,index)) + LLWearable *old_wearable = getWearable(type,index); + if (!old_wearable) { pushWearable(type,wearable); return; } + wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type); if (wearable_iter == mWearableDatas.end()) { @@ -672,6 +674,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab else { wearable_vec[index] = wearable; + old_wearable->setLabelUpdated(); mAvatarObject->wearableUpdated(wearable->getType()); } } @@ -688,6 +691,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl { mWearableDatas[type].push_back(wearable); mAvatarObject->wearableUpdated(wearable->getType()); + wearable->setLabelUpdated(); return mWearableDatas[type].size()-1; } return MAX_WEARABLES_PER_TYPE; @@ -717,6 +721,7 @@ void LLAgentWearables::popWearable(const EWearableType type, U32 index) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); mAvatarObject->wearableUpdated(wearable->getType()); + wearable->setLabelUpdated(); } } @@ -1412,14 +1417,10 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem for (S32 i=max_entry; i>=0; i--) { LLWearable* old_wearable = getWearable(type,i); - const LLUUID &item_id = getWearableItemID(type,i); - popWearable(type,i); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - LLAppearanceManager::instance().removeItemLinks(item_id,false); - //queryWearableCache(); // moved below if (old_wearable) { + popWearable(old_wearable); old_wearable->removeFromAvatar(TRUE); } } @@ -1428,16 +1429,11 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem else { LLWearable* old_wearable = getWearable(type, index); - - const LLUUID &item_id = getWearableItemID(type,index); - popWearable(type, index); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - LLAppearanceManager::instance().removeItemLinks(item_id,false); - //queryWearableCache(); // moved below if (old_wearable) { + popWearable(old_wearable); old_wearable->removeFromAvatar(TRUE); } } @@ -1499,7 +1495,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it continue; } - gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); // Assumes existing wearables are not dirty. if (old_wearable->isDirty()) { @@ -1508,9 +1503,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } } - setWearable(type,0,new_wearable); if (new_wearable) new_wearable->setItemID(new_item->getUUID()); + setWearable(type,0,new_wearable); } std::vector<LLWearable*> wearables_being_removed; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 60c6061e96..d6265a85f6 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -579,7 +579,6 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, if(wearables.count() > 0) { gAgentWearables.setWearableOutfit(items, wearables, !append); - gInventory.notifyObservers(); } delete holder; @@ -819,15 +818,23 @@ bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventor (a->getWearableType() == b->getWearableType())); } -void LLAppearanceManager::addItemLink( LLInventoryItem* item, bool do_update ) +void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update ) { - LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item); + const LLInventoryItem *item = gInventory.getItem(item_id); + addCOFItemLink(item); +} + +void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_update ) +{ + const LLViewerInventoryItem *vitem = dynamic_cast<const LLViewerInventoryItem*>(item); if (!vitem) { llwarns << "not an llviewerinventoryitem, failed" << llendl; return; } - + + gInventory.addChangedMask(LLInventoryObserver::LABEL, vitem->getLinkedUUID()); + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceManager::getCOF(), @@ -839,7 +846,7 @@ void LLAppearanceManager::addItemLink( LLInventoryItem* item, bool do_update ) { // Are these links to the same object? const LLViewerInventoryItem* inv_item = item_array.get(i).get(); - if (inv_item->getLinkedUUID() == item->getLinkedUUID()) + if (inv_item->getLinkedUUID() == vitem->getLinkedUUID()) { linked_already = true; } @@ -850,7 +857,6 @@ void LLAppearanceManager::addItemLink( LLInventoryItem* item, bool do_update ) { gAgentWearables.removeWearable(inv_item->getWearableType(),true,0); gInventory.purgeObject(inv_item->getUUID()); - gInventory.notifyObservers(); } } if (linked_already) @@ -886,8 +892,10 @@ void LLAppearanceManager::addEnsembleLink( LLInventoryCategory* cat, bool do_upd #endif } -void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update) +void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_update) { + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceManager::getCOF(), @@ -899,7 +907,8 @@ void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update) const LLInventoryItem* item = item_array.get(i).get(); if (item->getLinkedUUID() == item_id) { - gInventory.purgeObject(item_array.get(i)->getUUID()); + const LLUUID& item_id = item_array.get(i)->getUUID(); + gInventory.purgeObject(item_id); } } if (do_update) @@ -978,18 +987,13 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) void LLAppearanceManager::registerAttachment(const LLUUID& item_id) { mRegisteredAttachments.insert(item_id); + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); //dumpAttachmentSet(mRegisteredAttachments,"after register:"); if (mAttachmentInvLinkEnabled) { - LLViewerInventoryItem *item = gInventory.getItem(item_id); - if (item) - { - //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Adding attachment link:"); - LLAppearanceManager::addItemLink(item,false); // Add COF link for item. - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - gInventory.notifyObservers(); - } + //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Adding attachment link:"); + LLAppearanceManager::addCOFItemLink(item_id, false); // Add COF link for item. } else { @@ -1000,15 +1004,14 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id) void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id) { mRegisteredAttachments.erase(item_id); + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + //dumpAttachmentSet(mRegisteredAttachments,"after unregister:"); if (mAttachmentInvLinkEnabled) { //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:"); - LLAppearanceManager::removeItemLinks(item_id, false); - // BAP - needs to change for label to track link. - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - gInventory.notifyObservers(); + LLAppearanceManager::removeCOFItemLinks(item_id, false); } else { @@ -1023,13 +1026,7 @@ void LLAppearanceManager::linkRegisteredAttachments() ++it) { LLUUID item_id = *it; - LLViewerInventoryItem *item = gInventory.getItem(item_id); - if (item) - { - addItemLink(item, false); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - gInventory.notifyObservers(); - } + addCOFItemLink(item_id, false); } mRegisteredAttachments.clear(); } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 12ffa336b4..5daa6d067b 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -54,12 +54,6 @@ public: void wearOutfitByName(const std::string& name); void changeOutfit(bool proceed, const LLUUID& category, bool append); - // Add COF link to individual item. - void addItemLink(LLInventoryItem* item, bool do_update = true); - - // Add COF link to ensemble folder. - void addEnsembleLink(LLInventoryCategory* item, bool do_update = true); - // Copy all items in a category. void shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb); @@ -67,9 +61,6 @@ public: // Find the Current Outfit folder. LLUUID getCOF(); - // Remove COF entries - void removeItemLinks(const LLUUID& item_id, bool do_update = true); - void updateAgentWearables(LLWearableHoldingPattern* holder, bool append); // For debugging - could be moved elsewhere. @@ -87,6 +78,16 @@ public: LLInventoryModel::item_array_t& items, LLPointer<LLInventoryCallback> cb); + // Add COF link to individual item. + void addCOFItemLink(const LLUUID& item_id, bool do_update = true); + void addCOFItemLink(const LLInventoryItem *item, bool do_update = true); + + // Remove COF entries + void removeCOFItemLinks(const LLUUID& item_id, bool do_update = true); + + // Add COF link to ensemble folder. + void addEnsembleLink(LLInventoryCategory* item, bool do_update = true); + protected: LLAppearanceManager(); ~LLAppearanceManager(); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f82d178089..3d7b324458 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3534,6 +3534,7 @@ void LLAppViewer::idle() gEventNotifier.update(); gIdleCallbacks.callFunctions(); + gInventory.notifyObservers(); } if (gDisconnected) diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 0aed5549a1..94c303a30f 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -37,7 +37,6 @@ #include "llappviewer.h" #include "llviewercontrol.h" #include "llimview.h" -#include "llbottomtray.h" #include "llviewerwindow.h" #include "llrootview.h" #include "llsyswellwindow.h" diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index cd5c5edac0..4ce3b50ed5 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -50,21 +50,6 @@ static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history"); -std::string formatCurrentTime() -{ - time_t utc_time; - utc_time = time_corrected(); - std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" - +LLTrans::getString("TimeMin")+"]"; - - LLSD substitution; - - substitution["datetime"] = (S32) utc_time; - LLStringUtil::format (timeStr, substitution); - - return timeStr; -} - class LLChatHistoryHeader: public LLPanel { public: @@ -219,7 +204,7 @@ public: LLTextBox* timeBox = getChild<LLTextBox>("time_box"); - timeBox->setValue(formatCurrentTime()); + timeBox->setValue(chat.mTimeStr); LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); @@ -352,7 +337,7 @@ LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style void LLChatHistory::appendWidgetMessage(const LLChat& chat, const LLStyle::Params& input_append_params) { LLView* view = NULL; - std::string view_text = "\n[" + formatCurrentTime() + "] "; + std::string view_text = "\n[" + chat.mTimeStr + "] "; if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM) view_text += chat.mFromName + ": "; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 997aed4277..8a6935b71b 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -187,8 +187,18 @@ void LLNearbyChatToastPanel::init(LLSD& notification) msg_text->setText(mFromName, style_params); } mText = mText.substr(3); - style_params.font.style = "UNDERLINE"; + style_params.font.style = "ITALIC"; +#define INFINITE_REFLOW_BUG 0 +#if INFINITE_REFLOW_BUG + // This causes LLTextBase::reflow() to infinite loop until the viewer + // runs out of memory, throws a bad_alloc exception from std::vector + // in mLineInfoList, and the main loop catches it and continues. + // It appears to be caused by addText() adding a line separator in the + // middle of a line. See EXT-2579, EXT-1949 msg_text->addText(mText,style_params); +#else + msg_text->appendText(mText, FALSE, style_params); +#endif } else { diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 4078fac4ec..caf6917d90 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -81,27 +81,17 @@ LLNotificationChiclet::Params::Params() button.tab_stop(FALSE); button.label(LLStringUtil::null); - unread_notifications.name("unread"); - unread_notifications.font(LLFontGL::getFontSansSerif()); - unread_notifications.text_color=(LLColor4::white); - unread_notifications.font_halign(LLFontGL::HCENTER); - unread_notifications.mouse_opaque(FALSE); } LLNotificationChiclet::LLNotificationChiclet(const Params& p) : LLChiclet(p) , mButton(NULL) -, mCounterCtrl(NULL) +, mCounter(0) { LLButton::Params button_params = p.button; - button_params.rect(p.rect()); mButton = LLUICtrlFactory::create<LLButton>(button_params); addChild(mButton); - LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications; - mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params); - addChild(mCounterCtrl); - // connect counter handlers to the signals connectCounterUpdatersToSignal("notify"); connectCounterUpdatersToSignal("groupnotify"); @@ -126,13 +116,15 @@ void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notificat void LLNotificationChiclet::setCounter(S32 counter) { - mCounterCtrl->setCounter(counter); -} + std::string s_count; + if(counter != 0) + { + s_count = llformat("%d", counter); + } -void LLNotificationChiclet::setShowCounter(bool show) -{ - LLChiclet::setShowCounter(show); - mCounterCtrl->setVisible(getShowCounter()); + mButton->setLabel(s_count); + + mCounter = counter; } boost::signals2::connection LLNotificationChiclet::setClickCallback( diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index eab4a282f5..bb5dc1e550 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -638,13 +638,14 @@ public: /*virtual*/ void setCounter(S32 counter); - /*virtual*/S32 getCounter() { return mCounterCtrl->getCounter(); } - - /*virtual*/ void setShowCounter(bool show); + // *TODO: mantipov: seems getCounter is not necessary for LLNotificationChiclet + // but inherited interface requires it to implement. + // Probably it can be safe removed. + /*virtual*/S32 getCounter() { return mCounter; } boost::signals2::connection setClickCallback(const commit_callback_t& cb); - /*virtual*/ ~ LLNotificationChiclet(); + /*virtual*/ ~LLNotificationChiclet(); // methods for updating a number of unread System notifications void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); } @@ -662,7 +663,7 @@ protected: protected: LLButton* mButton; - LLChicletNotificationCounterCtrl* mCounterCtrl; + S32 mCounter; }; /* diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index bf74c5c936..7323c421da 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1253,6 +1253,10 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) // filter self only on first pass through LLFolderViewItem::filter( filter ); } + if (mDontShowInHierarchy) + { + setOpen(); + } } if (getRoot()->getDebugFilters()) diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 8e774dc199..d85ac477e1 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -60,6 +60,9 @@ // Longest time, in seconds, to wait for all animations to stop playing const F32 MAX_WAIT_ANIM_SECS = 30.f; +// If this gesture is a link, get the base gesture that this link points to, +// otherwise just return this id. +static const LLUUID& get_linked_uuid(const LLUUID& item_id); // Lightweight constructor. // init() does the heavy lifting. @@ -213,6 +216,8 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, BOOL inform_server, BOOL deactivate_similar) { + const LLUUID& base_item_id = get_linked_uuid(item_id); + if( !gAssetStorage ) { llwarns << "LLGestureManager::activateGestureWithAsset without valid gAssetStorage" << llendl; @@ -233,13 +238,13 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, // For now, put NULL into the item map. We'll build a gesture // class object when the asset data arrives. - mActive[item_id] = NULL; + mActive[base_item_id] = NULL; // Copy the UUID if (asset_id.notNull()) { LLLoadInfo* info = new LLLoadInfo; - info->mItemID = item_id; + info->mItemID = base_item_id; info->mInformServer = inform_server; info->mDeactivateSimilar = deactivate_similar; @@ -259,7 +264,8 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, void LLGestureManager::deactivateGesture(const LLUUID& item_id) { - item_map_t::iterator it = mActive.find(item_id); + const LLUUID& base_item_id = get_linked_uuid(item_id); + item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) { llwarns << "deactivateGesture for inactive gesture " << item_id << llendl; @@ -279,7 +285,7 @@ void LLGestureManager::deactivateGesture(const LLUUID& item_id) } mActive.erase(it); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + gInventory.addChangedMask(LLInventoryObserver::LABEL, base_item_id); // Inform the database of this change LLMessageSystem* msg = gMessageSystem; @@ -301,6 +307,7 @@ void LLGestureManager::deactivateGesture(const LLUUID& item_id) void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id) { + const LLUUID& base_in_item_id = get_linked_uuid(in_item_id); std::vector<LLUUID> gest_item_ids; // Deactivate all gestures that match @@ -312,7 +319,7 @@ void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUI // Don't deactivate the gesture we are looking for duplicates of // (for replaceGesture) - if (!gest || item_id == in_item_id) + if (!gest || item_id == base_in_item_id) { // legal, can have null pointers in list ++it; @@ -387,14 +394,17 @@ void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUI BOOL LLGestureManager::isGestureActive(const LLUUID& item_id) { - item_map_t::iterator it = mActive.find(item_id); + const LLUUID& base_item_id = get_linked_uuid(item_id); + item_map_t::iterator it = mActive.find(base_item_id); return (it != mActive.end()); } BOOL LLGestureManager::isGesturePlaying(const LLUUID& item_id) { - item_map_t::iterator it = mActive.find(item_id); + const LLUUID& base_item_id = get_linked_uuid(item_id); + + item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) return FALSE; LLMultiGesture* gesture = (*it).second; @@ -405,19 +415,21 @@ BOOL LLGestureManager::isGesturePlaying(const LLUUID& item_id) void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id) { - item_map_t::iterator it = mActive.find(item_id); + const LLUUID& base_item_id = get_linked_uuid(item_id); + + item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) { - llwarns << "replaceGesture for inactive gesture " << item_id << llendl; + llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl; return; } LLMultiGesture* old_gesture = (*it).second; stopGesture(old_gesture); - mActive.erase(item_id); + mActive.erase(base_item_id); - mActive[item_id] = new_gesture; + mActive[base_item_id] = new_gesture; delete old_gesture; old_gesture = NULL; @@ -428,7 +440,7 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new mDeactivateSimilarNames.clear(); LLLoadInfo* info = new LLLoadInfo; - info->mItemID = item_id; + info->mItemID = base_item_id; info->mInformServer = TRUE; info->mDeactivateSimilar = FALSE; @@ -445,16 +457,18 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id) { - item_map_t::iterator it = LLGestureManager::instance().mActive.find(item_id); + const LLUUID& base_item_id = get_linked_uuid(item_id); + + item_map_t::iterator it = LLGestureManager::instance().mActive.find(base_item_id); if (it == mActive.end()) { - llwarns << "replaceGesture for inactive gesture " << item_id << llendl; + llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl; return; } // mActive owns this gesture pointer, so clean up memory. LLMultiGesture* gesture = (*it).second; - LLGestureManager::instance().replaceGesture(item_id, gesture, new_asset_id); + LLGestureManager::instance().replaceGesture(base_item_id, gesture, new_asset_id); } void LLGestureManager::playGesture(LLMultiGesture* gesture) @@ -478,7 +492,9 @@ void LLGestureManager::playGesture(LLMultiGesture* gesture) // Convenience function that looks up the item_id for you. void LLGestureManager::playGesture(const LLUUID& item_id) { - item_map_t::iterator it = mActive.find(item_id); + const LLUUID& base_item_id = get_linked_uuid(item_id); + + item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) return; LLMultiGesture* gesture = (*it).second; @@ -1074,7 +1090,9 @@ void LLGestureManager::stopGesture(LLMultiGesture* gesture) void LLGestureManager::stopGesture(const LLUUID& item_id) { - item_map_t::iterator it = mActive.find(item_id); + const LLUUID& base_item_id = get_linked_uuid(item_id); + + item_map_t::iterator it = mActive.find(base_item_id); if (it == mActive.end()) return; LLMultiGesture* gesture = (*it).second; @@ -1171,3 +1189,15 @@ void LLGestureManager::done() } notifyObservers(); } + +// static +const LLUUID& get_linked_uuid(const LLUUID &item_id) +{ + LLViewerInventoryItem* item = gInventory.getItem(item_id); + if (item && item->getIsLinkType()) + { + return item->getLinkedUUID(); + } + return item_id; +} + diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index ab768bf236..dbbf98ad08 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -474,6 +474,7 @@ void LLIMFloater::updateMessages() chat.mFromID = from_id; chat.mFromName = from; chat.mText = message; + chat.mTimeStr = time; //Handle IRC styled /me messages. std::string prefix = message.substr(0, 4); @@ -494,12 +495,12 @@ void LLIMFloater::updateMessages() if (from.size() > 0) { append_style_params.font.style = "ITALIC"; - chat.mText = from + " "; + chat.mText = from; mChatHistory->appendWidgetMessage(chat, append_style_params); } message = message.substr(3); - append_style_params.font.style = "UNDERLINE"; + append_style_params.font.style = "ITALIC"; mChatHistory->appendText(message, FALSE, append_style_params); } else diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ab8cc0bad7..ad80e7ed61 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -49,6 +49,7 @@ #include "llbottomtray.h"
#include "llcallingcard.h"
#include "llchat.h"
+#include "llchiclet.h"
#include "llresmgr.h"
#include "llfloaterchat.h"
#include "llfloaterchatterbox.h"
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2d8b058ed8..173f2634aa 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -31,73 +31,37 @@ */
#include "llviewerprecompiledheaders.h"
-
-#include <utility> // for std::pair<>
-
-#include "llfloaterinventory.h"
#include "llinventorybridge.h"
-#include "message.h"
-
#include "llagent.h"
#include "llagentwearables.h"
-#include "llcallingcard.h"
-#include "llcheckboxctrl.h" // for radio buttons
-#include "llfloaterreg.h"
-#include "llradiogroup.h"
-#include "llspinctrl.h"
-#include "lltextbox.h"
-#include "llui.h"
-
-#include "llviewercontrol.h"
-#include "llfirstuse.h"
-#include "llfoldertype.h"
-#include "llfloaterchat.h"
+#include "llappearancemgr.h"
+#include "llavataractions.h"
#include "llfloatercustomize.h"
-#include "llfloaterproperties.h"
+#include "llfloaterinventory.h"
+#include "llfloateropenobject.h"
+#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
-#include "llfocusmgr.h"
-#include "llfolderview.h"
#include "llfriendcard.h"
-#include "llavataractions.h"
#include "llgesturemgr.h"
-#include "lliconctrl.h"
+#include "llimfloater.h"
+#include "llimview.h"
+#include "llinventoryclipboard.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorypanel.h"
-#include "llinventoryclipboard.h"
-#include "lllineeditor.h"
-#include "llmenugl.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
-#include "llpreviewnotecard.h"
-#include "llpreviewscript.h"
-#include "llpreviewsound.h"
#include "llpreviewtexture.h"
-#include "llresmgr.h"
-#include "llscrollcontainer.h"
-#include "llimview.h"
-#include "lltooldraganddrop.h"
-#include "llviewerfoldertype.h"
-#include "llviewertexturelist.h"
-#include "llviewerinventory.h"
-#include "llviewerobjectlist.h"
-#include "llviewerwindow.h"
-#include "llvoavatar.h"
-#include "llwearable.h"
-#include "llwearablelist.h"
-#include "llviewerassettype.h"
-#include "llviewermessage.h"
-#include "llviewerregion.h"
-#include "llvoavatarself.h"
-#include "lltabcontainer.h"
-#include "lluictrlfactory.h"
#include "llselectmgr.h"
#include "llsidetray.h"
-#include "llfloateropenobject.h"
#include "lltrans.h"
-#include "llappearancemgr.h"
-#include "llimfloater.h"
+#include "llviewerassettype.h"
+#include "llviewermessage.h"
+#include "llviewerobjectlist.h"
+#include "llviewerwindow.h"
+#include "llvoavatarself.h"
+#include "llwearablelist.h"
using namespace LLOldEvents;
@@ -219,37 +183,6 @@ BOOL LLInvFVBridge::isItemRemovable() return FALSE;
}
-// Sends an update to all link items that point to the base item.
-void LLInvFVBridge::renameLinkedItems(const LLUUID &item_id, const std::string& new_name)
-{
- LLInventoryModel* model = getInventoryModel();
- if(!model) return;
-
- LLInventoryItem* itemp = model->getItem(mUUID);
- if (!itemp) return;
-
- if (itemp->getIsLinkType())
- {
- return;
- }
-
- LLInventoryModel::item_array_t item_array = model->collectLinkedItems(item_id);
- for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
- iter != item_array.end();
- iter++)
- {
- LLViewerInventoryItem *linked_item = (*iter);
- if (linked_item->getUUID() == item_id) continue;
-
- LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(linked_item);
- new_item->rename(new_name);
- new_item->updateServer(FALSE);
- model->updateItem(new_item);
- // model->addChangedMask(LLInventoryObserver::LABEL, linked_item->getUUID());
- }
- model->notifyObservers();
-}
-
// Can be moved to another folder
BOOL LLInvFVBridge::isItemMovable() const
{
@@ -2898,9 +2831,11 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, }
const LLUUID& favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
-
+ const LLUUID& landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
+ const BOOL folder_allows_reorder = ((mUUID == landmarks_id) || (mUUID == favorites_id));
+
// we can move item inside a folder only if this folder is Favorites. See EXT-719
- accept = is_movable && ((mUUID != inv_item->getParentUUID()) || (mUUID == favorites_id));
+ accept = is_movable && ((mUUID != inv_item->getParentUUID()) || folder_allows_reorder);
if(accept && drop)
{
if (inv_item->getType() == LLAssetType::AT_GESTURE
@@ -2923,12 +2858,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, }
// if dragging from/into favorites folder only reorder items
- if ((mUUID == inv_item->getParentUUID()) && (favorites_id == mUUID))
+ if ((mUUID == inv_item->getParentUUID()) && folder_allows_reorder)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLIsType is_type(LLAssetType::AT_LANDMARK);
- model->collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
+ model->collectDescendentsIf(mUUID, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type);
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
LLFolderViewItem* itemp = panel ? panel->getRootFolder()->getDraggingOverItem() : NULL;
@@ -2958,7 +2893,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // BAP - should skip if dup.
if (move_is_into_current_outfit)
{
- LLAppearanceManager::instance().addItemLink(inv_item);
+ LLAppearanceManager::instance().addCOFItemLink(inv_item);
}
else
{
@@ -3723,6 +3658,11 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) }
else
{
+ LLInventoryItem* item = getItem();
+ if (item && item->getIsLinkType())
+ {
+ items.push_back(std::string("Find Original"));
+ }
items.push_back(std::string("Open"));
items.push_back(std::string("Properties"));
@@ -3948,6 +3888,7 @@ std::string LLObjectBridge::getLabelSuffix() const {
std::string attachment_point_name = avatar->getAttachedPointName(mUUID);
+ // e.g. "(worn on ...)" / "(attached to ...)"
LLStringUtil::format_map_t args;
args["[ATTACHMENT_POINT]"] = attachment_point_name.c_str();
return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args);
@@ -4205,7 +4146,7 @@ void wear_inventory_item_on_avatar( LLInventoryItem* item ) lldebugs << "wear_inventory_item_on_avatar( " << item->getName()
<< " )" << llendl;
- LLAppearanceManager::instance().addItemLink(item);
+ LLAppearanceManager::instance().addCOFItemLink(item);
}
}
@@ -4362,6 +4303,7 @@ std::string LLWearableBridge::getLabelSuffix() const {
if( gAgentWearables.isWearingItem( mUUID ) )
{
+ // e.g. "(worn)"
return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn");
}
else
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 56cb0f93ed..49e64ebdde 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -204,8 +204,6 @@ protected: const LLUUID& new_parent, BOOL restamp); void removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch); - void renameLinkedItems(const LLUUID &item_id, const std::string& new_name); - protected: LLHandle<LLPanel> mInventoryPanel; const LLUUID mUUID; // item id diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 84588fbe8c..fbaab385fe 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -509,7 +509,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, } } -void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) +void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask) { const LLInventoryObject *obj = getObject(object_id); if (!obj || obj->getIsLinkType()) @@ -532,7 +532,7 @@ void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) cat_iter++) { LLViewerInventoryCategory *linked_cat = (*cat_iter); - addChangedMask(LLInventoryObserver::LABEL, linked_cat->getUUID()); + addChangedMask(mask, linked_cat->getUUID()); }; for (LLInventoryModel::item_array_t::iterator iter = item_array.begin(); @@ -540,9 +540,8 @@ void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) iter++) { LLViewerInventoryItem *linked_item = (*iter); - addChangedMask(LLInventoryObserver::LABEL, linked_item->getUUID()); + addChangedMask(mask, linked_item->getUUID()); }; - notifyObservers(); } const LLUUID& LLInventoryModel::getLinkedItemID(const LLUUID& object_id) const @@ -1133,6 +1132,14 @@ void LLInventoryModel::notifyObservers(const std::string service_name) llwarns << "Call was made to notifyObservers within notifyObservers!" << llendl; return; } + + if ((mModifyMask == LLInventoryObserver::NONE) && (service_name == "")) + { + mModifyMask = LLInventoryObserver::NONE; + mChangedItemIDs.clear(); + return; + } + mIsNotifyObservers = TRUE; for (observer_list_t::iterator iter = mObservers.begin(); iter != mObservers.end(); ) @@ -1180,7 +1187,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent) // not sure what else might need to be accounted for this. if (mModifyMask & LLInventoryObserver::LABEL) { - updateLinkedItems(referent); + addChangedMaskForLinks(referent, LLInventoryObserver::LABEL); } } diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index aa4ffb392f..da12dbdf7f 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -167,8 +167,6 @@ public: // Assumes item_id is itself not a linked item. item_array_t collectLinkedItems(const LLUUID& item_id, const LLUUID& start_folder_id = LLUUID::null); - // Updates all linked items pointing to this id. - void updateLinkedItems(const LLUUID& object_id); // Get the inventoryID that this item points to, else just return item_id const LLUUID& getLinkedItemID(const LLUUID& object_id) const; @@ -440,6 +438,9 @@ protected: bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting); + // Updates all linked items pointing to this id. + void addChangedMaskForLinks(const LLUUID& object_id, U32 mask); + protected: cat_array_t* getUnlockedCatArray(const LLUUID& id); item_array_t* getUnlockedItemArray(const LLUUID& id); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 450ce92412..99591dea57 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -345,14 +345,6 @@ void LLInventoryPanel::modelChanged(U32 mask) view_item->destroyView();
}
}
- else
- {
- // Hmm, we got an ADD/REMOVE/STRUCTURE notification for this item but there's nothing to be done to it.
- llwarns << "Notification triggered for item that isn't changing. "
- << "Operation: ( mask: " << mask << " panel name: " << mStartFolderString << " ) "
- << "Item: [ Name:" << model_item->getName() << " UUID: " << *id_it << " ]" << llendl;
-
- }
}
// This item has been removed from memory, but its associated UI element still exists.
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 0ee883e221..93db337053 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -83,11 +83,6 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) { } -LLFloaterMove::~LLFloaterMove() -{ - LLPanelStandStopFlying::getInstance()->reparent(NULL); -} - // virtual BOOL LLFloaterMove::postBuild() { @@ -161,6 +156,31 @@ void LLFloaterMove::setEnabled(BOOL enabled) showModeButtons(enabled); } +// *NOTE: we assume that setVisible() is called on floater close. +// virtual +void LLFloaterMove::setVisible(BOOL visible) +{ + // Ignore excessive calls of this method (from LLTransientFloaterMgr?). + if (getVisible() == visible) + return; + + if (visible) + { + // Attach the Stand/Stop Flying panel. + LLPanelStandStopFlying* ssf_panel = LLPanelStandStopFlying::getInstance(); + ssf_panel->reparent(this); + const LLRect& mode_actions_rect = mModeActionsPanel->getRect(); + ssf_panel->setOrigin(mode_actions_rect.mLeft, mode_actions_rect.mBottom); + } + else + { + // Detach the Stand/Stop Flying panel. + LLPanelStandStopFlying::getInstance()->reparent(NULL); + } + + LLTransientDockableFloater::setVisible(visible); +} + // static F32 LLFloaterMove::getYawRate( F32 time ) { @@ -429,16 +449,6 @@ void LLFloaterMove::showModeButtons(BOOL bShow) if (NULL == mModeActionsPanel || mModeActionsPanel->getVisible() == bShow) return; mModeActionsPanel->setVisible(bShow); - - if (bShow) - LLPanelStandStopFlying::getInstance()->reparent(NULL); - else - { - LLPanelStandStopFlying* ssf_panel = LLPanelStandStopFlying::getInstance(); - ssf_panel->reparent(this); - const LLRect& mode_actions_rect = mModeActionsPanel->getRect(); - ssf_panel->setOrigin(mode_actions_rect.mLeft, mode_actions_rect.mBottom); - } } //static diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 2664fe6e40..06463f02af 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -51,11 +51,12 @@ class LLFloaterMove private: LLFloaterMove(const LLSD& key); - ~LLFloaterMove(); + ~LLFloaterMove() {} public: /*virtual*/ BOOL postBuild(); /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void setVisible(BOOL visible); static F32 getYawRate(F32 time); static void setFlyingMode(BOOL fly); void setFlyingModeImpl(BOOL fly); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 0c2782fd8a..114d26af8a 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -186,7 +186,6 @@ LLNavigationBar::LLNavigationBar() LLNavigationBar::~LLNavigationBar() { mTeleportFinishConnection.disconnect(); - LLSearchHistory::getInstance()->save(); } BOOL LLNavigationBar::postBuild() diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 1567668813..09fd9b2949 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -177,7 +177,7 @@ void LLNearbyChat::addMessage(const LLChat& chat) } message = message.substr(3); - append_style_params.font.style = "UNDERLINE"; + append_style_params.font.style = "ITALIC"; mChatHistory->appendText(message, FALSE, append_style_params); } else diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 00502341fc..5e23662a0b 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -44,6 +44,7 @@ #include "llimview.h" #include "llvoicechannel.h" #include "llsidetray.h" +#include "lltrans.h" void LLPanelChatControlPanel::onCallButtonClicked() { @@ -161,6 +162,11 @@ void LLPanelIMControlPanel::onShareButtonClicked() { LLSD key; LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); + + if (gIMMgr->hasSession(getSessionId())) + { + LLIMModel::getInstance()->addMessage(getSessionId(), SYSTEM_FROM, LLUUID::null, LLTrans::getString("share_alert"), false); + } } void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 923c5acbd2..7bfc432ef2 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -58,6 +58,7 @@ public: virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); virtual void setSessionId(const LLUUID& session_id); + const LLUUID& getSessionId() { return mSessionId; } private: LLUUID mSessionId; diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 0dc010e2e7..d8e0d91d88 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -66,6 +66,65 @@ #include "roles_constants.h" #include "llgroupactions.h" + +U8 string_value_to_click_action(std::string p_value); +std::string click_action_to_string_value( U8 action); + +U8 string_value_to_click_action(std::string p_value) +{ + if(p_value == "Touch") + { + return CLICK_ACTION_TOUCH; + } + if(p_value == "Sit") + { + return CLICK_ACTION_SIT; + } + if(p_value == "Buy") + { + return CLICK_ACTION_BUY; + } + if(p_value == "Pay") + { + return CLICK_ACTION_PAY; + } + if(p_value == "Open") + { + return CLICK_ACTION_OPEN; + } + if(p_value == "Zoom") + { + return CLICK_ACTION_ZOOM; + } + return CLICK_ACTION_TOUCH; +} + +std::string click_action_to_string_value( U8 action) +{ + switch (action) + { + case CLICK_ACTION_TOUCH: + default: + return "Touch"; + break; + case CLICK_ACTION_SIT: + return "Sit"; + break; + case CLICK_ACTION_BUY: + return "Buy"; + break; + case CLICK_ACTION_PAY: + return "Pay"; + break; + case CLICK_ACTION_OPEN: + return "Open"; + break; + case CLICK_ACTION_ZOOM: + return "Zoom"; + break; + } +} + ///---------------------------------------------------------------------------- /// Class llpanelpermissions ///---------------------------------------------------------------------------- @@ -774,7 +833,8 @@ void LLPanelPermissions::refresh() LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); if(ComboClickAction) { - ComboClickAction->setCurrentByIndex((S32)click_action); + std::string combo_value = click_action_to_string_value(click_action); + ComboClickAction->setValue(LLSD(combo_value)); } } childSetEnabled("label click action",is_perm_modify && all_volume); @@ -1015,8 +1075,9 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*) { LLComboBox* box = (LLComboBox*)ctrl; if (!box) return; - - U8 click_action = (U8)box->getCurrentIndex(); + std::string value = box->getValue().asString(); + U8 click_action = string_value_to_click_action(value); + if (click_action == CLICK_ACTION_BUY) { LLSaleInfo sale_info; @@ -1028,8 +1089,8 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*) // Set click action back to its old value U8 click_action = 0; LLSelectMgr::getInstance()->selectionGetClickAction(&click_action); - box->setCurrentByIndex((S32)click_action); - + std::string item_value = click_action_to_string_value(click_action); + box->setValue(LLSD(item_value)); return; } } diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 963d39de8a..6ba3790fe2 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -57,7 +57,11 @@ LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), mParcelID(), mRequestedID(), - mPosRegion() + mPosRegion(), + mScrollingPanelMinHeight(0), + mScrollingPanelWidth(0), + mScrollingPanel(NULL), + mScrollContainer(NULL) {} //virtual @@ -83,6 +87,12 @@ BOOL LLPanelPlaceInfo::postBuild() mMaturityRatingIcon = getChild<LLIconCtrl>("maturity_icon"); mMaturityRatingText = getChild<LLTextBox>("maturity_value"); + mScrollingPanel = getChild<LLPanel>("scrolling_panel"); + mScrollContainer = getChild<LLScrollContainer>("place_scroll"); + + mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight(); + mScrollingPanelWidth = mScrollingPanel->getRect().getWidth(); + return TRUE; } @@ -231,6 +241,27 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) } // virtual +void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLPanel::reshape(width, height, called_from_parent); + + if (!mScrollContainer || !mScrollingPanel) + return; + + static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); + + S32 scroll_height = mScrollContainer->getRect().getHeight(); + if (mScrollingPanelMinHeight >= scroll_height) + { + mScrollingPanel->reshape(mScrollingPanelWidth, mScrollingPanelMinHeight); + } + else + { + mScrollingPanel->reshape(mScrollingPanelWidth + scrollbar_size, scroll_height); + } +} + +// virtual void LLPanelPlaceInfo::handleVisibilityChange(BOOL new_visibility) { LLPanel::handleVisibilityChange(new_visibility); diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 133933a880..b9bf92b534 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -45,6 +45,7 @@ class LLIconCtrl; class LLInventoryItem; class LLPanelPickEdit; class LLParcel; +class LLScrollContainer; class LLTextBox; class LLTextureCtrl; class LLViewerRegion; @@ -92,6 +93,7 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void handleVisibilityChange (BOOL new_visibility); // Create a pick for the location specified @@ -110,8 +112,12 @@ protected: LLUUID mRequestedID; LLVector3 mPosRegion; std::string mCurrentTitle; + S32 mScrollingPanelMinHeight; + S32 mScrollingPanelWidth; INFO_TYPE mInfoType; + LLScrollContainer* mScrollContainer; + LLPanel* mScrollingPanel; LLTextBox* mTitle; LLTextureCtrl* mSnapshotCtrl; LLTextBox* mRegionName; diff --git a/indra/newview/llsearchhistory.h b/indra/newview/llsearchhistory.h index 253ef21e9e..eb6efdb86f 100644 --- a/indra/newview/llsearchhistory.h +++ b/indra/newview/llsearchhistory.h @@ -34,12 +34,15 @@ #define LL_LLSEARCHHISTORY_H #include "llsingleton.h" +#include "llui.h" + /** * Search history container able to save and load history from file. * History is stored in chronological order, most recent at the beginning. */ -class LLSearchHistory : public LLSingleton<LLSearchHistory> +class LLSearchHistory : public LLSingleton<LLSearchHistory>, private LLDestroyClass<LLSearchHistory> { + friend class LLDestroyClass<LLSearchHistory>; public: // Forward declaration @@ -130,6 +133,12 @@ protected: private: + // Implementation of LLDestroyClass<LLSearchHistory> + static void destroyClass() + { + LLSearchHistory::getInstance()->save(); + } + search_history_list_t mSearchHistory; }; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 6aa5c53194..58962b67d6 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -46,7 +46,8 @@ static LLRegisterPanelClassWrapper<LLSidepanelInventory> t_inventory("sidepanel_ LLSidepanelInventory::LLSidepanelInventory()
: LLPanel(),
- mItemPanel(NULL)
+ mItemPanel(NULL),
+ mPanelMainInventory(NULL)
{
//LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
@@ -80,8 +81,8 @@ BOOL LLSidepanelInventory::postBuild() mOverflowBtn = mInventoryPanel->getChild<LLButton>("overflow_btn");
mOverflowBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onOverflowButtonClicked, this));
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
- panel_main_inventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2));
+ mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
+ mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2));
}
// UI elements from item panel
@@ -127,6 +128,10 @@ void LLSidepanelInventory::onOpen(const LLSD& key) mTaskPanel->setObjectSelection(LLSelectMgr::getInstance()->getSelection());
showTaskInfoPanel();
}
+ if (key.has("select"))
+ {
+ mPanelMainInventory->getPanel()->setSelection(key["select"].asUUID(), TAKE_FOCUS_NO);
+ }
}
void LLSidepanelInventory::onInfoButtonClicked()
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 681af7fafa..9eba77b5c3 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -68,6 +68,7 @@ private: LLPanel* mInventoryPanel; // Main inventory view
LLSidepanelItemInfo* mItemPanel; // Individual item view
LLSidepanelTaskInfo* mTaskPanel; // Individual in-world object view
+ LLPanelMainInventory* mPanelMainInventory;
protected:
void onInfoButtonClicked();
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index cbc5f7358f..3e4cdbdcbe 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -39,12 +39,13 @@ #include "llbutton.h" #include "llscreenchannel.h" #include "llscrollcontainer.h" -#include "llchiclet.h" #include "llimview.h" #include "boost/shared_ptr.hpp" class LLFlatListView; +class LLChiclet; +class LLIMChiclet; class LLSysWellWindow : public LLDockableFloater, LLIMSessionObserver { diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index d2cc6d0726..9040bdb41a 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -64,7 +64,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif style_params.font.style ="ITALIC"; mMessage->appendText(p.from + " ", FALSE, style_params); - style_params.font.style = "UNDERLINE"; + style_params.font.style = "ITALIC"; mMessage->appendText(p.message.substr(3), FALSE, style_params); } else diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 48b68e4292..699424ef36 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -48,7 +48,6 @@ const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL; LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification) : LLToastPanel(notification), mTextBox(NULL), -mIcon(NULL), mInfoPanel(NULL), mControlPanel(NULL), mNumOptions(0), @@ -58,7 +57,6 @@ mAddedDefaultBtn(false) LLUICtrlFactory::getInstance()->buildPanel(this, "panel_notification.xml"); mInfoPanel = getChild<LLPanel>("info_panel"); mControlPanel = getChild<LLPanel>("control_panel"); - mIcon = getChild<LLIconCtrl>("info_icon"); // customize panel's attributes // is it intended for displaying a tip @@ -94,26 +92,6 @@ mAddedDefaultBtn(false) // preliminary adjust panel's layout mIsTip ? adjustPanelForTipNotice() : adjustPanelForScriptNotice(form); - // choose a right icon - if (mIsTip) - { - // use the tip notification icon - mIcon->setValue("notify_tip_icon.tga"); - LLRect icon_rect = mIcon->getRect(); - icon_rect.setLeftTopAndSize(icon_rect.mLeft, getRect().getHeight() - VPAD, icon_rect.getWidth(), icon_rect.getHeight()); - mIcon->setRect(icon_rect); - } - else if (mIsCaution) - { - // use the caution notification icon - mIcon->setValue("notify_caution_icon.tga"); - } - else - { - // use the default notification icon - mIcon->setValue("notify_box_icon.tga"); - } - // adjust text options according to the notification type // add a caution textbox at the top of a caution notification if (mIsCaution && !mIsTip) diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index 66534edcdf..eea70705ec 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -73,7 +73,6 @@ private: // panel elements LLTextBase* mTextBox; - LLIconCtrl* mIcon; LLPanel* mInfoPanel; // a panel, that contains an information LLPanel* mControlPanel; // a panel, that contains buttons (if present) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9c8fca3552..5ed8dc5fb9 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -209,6 +209,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // touch behavior down below... break; case CLICK_ACTION_SIT: + if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // agent not already sitting { handle_object_sit_or_stand(); @@ -252,7 +253,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() selectionPropertiesReceived(); } } - return TRUE; + return TRUE; case CLICK_ACTION_PLAY: handle_click_action_play(); return TRUE; @@ -260,6 +261,29 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // mClickActionObject = object; handle_click_action_open_media(object); return TRUE; + case CLICK_ACTION_ZOOM: + { + const F32 PADDING_FACTOR = 2.f; + LLViewerObject* object = gObjectList.findObject(mPick.mObjectID); + + if (object) + { + gAgent.setFocusOnAvatar(FALSE, ANIMATE); + + LLBBox bbox = object->getBoundingBoxAgent() ; + F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); + F32 distance = bbox.getExtentLocal().magVec() * PADDING_FACTOR / atan(angle_of_view); + + LLVector3 obj_to_cam = LLViewerCamera::getInstance()->getOrigin() - bbox.getCenterAgent(); + obj_to_cam.normVec(); + + LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); + gAgent.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + object_center_global, + mPick.mObjectID ); + } + } + return TRUE; default: // nothing break; @@ -413,6 +437,9 @@ ECursorType cursor_from_object(LLViewerObject* object) cursor = UI_CURSOR_HAND; } break; + case CLICK_ACTION_ZOOM: + cursor = UI_CURSOR_TOOLZOOMIN; + break; case CLICK_ACTION_PLAY: case CLICK_ACTION_OPEN_MEDIA: cursor = cursor_from_parcel_media(click_action); @@ -551,6 +578,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) case CLICK_ACTION_BUY: case CLICK_ACTION_PAY: case CLICK_ACTION_OPEN: + case CLICK_ACTION_ZOOM: + case CLICK_ACTION_PLAY: + case CLICK_ACTION_OPEN_MEDIA: // Because these actions open UI dialogs, we won't change // the cursor again until the next hover and GL pick over // the world. Keep the cursor an arrow, assuming that diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 1d62ead843..089535dfab 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1215,11 +1215,6 @@ void LLViewerInventoryItem::rename(const std::string& n) const LLPermissions& LLViewerInventoryItem::getPermissions() const { - if (const LLViewerInventoryItem *linked_item = getLinkedItem()) - { - return linked_item->getPermissions(); - } - // Use the actual permissions of the symlink, not its parent. return LLInventoryItem::getPermissions(); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ef6a621323..11b2f07f1b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -939,6 +939,11 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) !from_name.empty()) { view = LLFloaterInventory::showAgentInventory(); + //TODO:this should be moved to the end of method after all the checks, + //but first decide what to do with active inventory if any (EK) + LLSD key; + key["select"] = item->getUUID(); + LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); } else { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b6c1ee2f11..75e35e5221 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6267,7 +6267,7 @@ LLColor4 LLVOAvatar::getDummyColor() return DUMMY_COLOR; } -void LLVOAvatar::dumpAvatarTEs( const std::string& context ) +void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const { /* const char* te_name[] = { "TEX_HEAD_BODYPAINT ", diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 2fd1a506a9..4b3e850e7a 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -889,7 +889,7 @@ public: static void dumpArchetypeXML(void*); static void dumpBakedStatus(); const std::string getBakedStatusForPrintout() const; - void dumpAvatarTEs(const std::string& context); + void dumpAvatarTEs(const std::string& context) const; static F32 sUnbakedTime; // Total seconds with >=1 unbaked avatars static F32 sUnbakedUpdateTime; // Last time stats were updated (to prevent multiple updates per frame) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 711e9f90fc..d9c5e932a2 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2074,6 +2074,49 @@ void LLVOAvatarSelf::setInvisible(BOOL newvalue) } } +// HACK: this will null out the avatar's local texture IDs before the TE message is sent +// to ensure local texture IDs are not sent to other clients in the area. +// this is a short-term solution. The long term solution will be to not set the texture +// IDs in the avatar object, and keep them only in the wearable. +// This will involve further refactoring that is too risky for the initial release of 2.0. +bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const +{ + LLUUID texture_id[TEX_NUM_INDICES]; + // pack away current TEs to make sure we don't send them out + for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); + iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); + ++iter) + { + const ETextureIndex index = iter->first; + const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second; + if (!texture_dict->mIsBakedTexture) + { + LLTextureEntry* entry = getTE((U8) index); + texture_id[index] = entry->getID(); + entry->setID(IMG_DEFAULT_AVATAR); + } + } + + bool success = packTEMessage(mesgsys); + + // unpack TEs to make sure we don't re-trigger a bake + for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin(); + iter != LLVOAvatarDictionary::getInstance()->getTextures().end(); + ++iter) + { + const ETextureIndex index = iter->first; + const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second; + if (!texture_dict->mIsBakedTexture) + { + LLTextureEntry* entry = getTE((U8) index); + entry->setID(texture_id[index]); + } + } + + return success; +} + + //------------------------------------------------------------------------ // needsRenderBeam() //------------------------------------------------------------------------ diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 6702f030fe..a1cad82eff 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -310,6 +310,7 @@ public: public: static void onChangeSelfInvisible(BOOL newvalue); void setInvisible(BOOL newvalue); + bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; /** Appearance ** ** diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 2849cfa20e..ced0b64896 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -38,6 +38,7 @@ #include "lllocaltextureobject.h" #include "llviewertexturelist.h" #include "llinventorymodel.h" +#include "llinventoryobserver.h" #include "llviewerregion.h" #include "llvoavatar.h" #include "llvoavatarself.h" @@ -1098,6 +1099,12 @@ void LLWearable::destroyTextures() mSavedTEMap.clear(); } + +void LLWearable::setLabelUpdated() const +{ + gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID()); +} + struct LLWearableSaveData { EWearableType mType; diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index fd19a86406..0863adb7f5 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -128,6 +128,8 @@ public: BOOL isOnTop() const; + // Something happened that requires the wearable's label to be updated (e.g. worn/unworn). + void setLabelUpdated() const; private: typedef std::map<S32, LLLocalTextureObject*> te_map_t; diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml index 833e8beb8d..77a0e9b91b 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml @@ -56,7 +56,7 @@ <text type="string" length="1" - follows="left|top" + follows="left|bottom" font="SansSerif" height="16" layout="topleft" @@ -68,7 +68,7 @@ Buy for L$[AMOUNT] from [NAME]? </text> <check_box - follows="left|top" + follows="left|bottom" height="16" label="Wear clothing now" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 4792a1a476..e972cf39bf 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -8,67 +8,71 @@ left="0" name="panel_im" top="0" - can_close="false" + can_close="true" can_dock="true" - can_minimize="false" + can_minimize="true" visible="true" - width="320" + width="350" can_resize="true" min_width="300" min_height="350"> - <layout_stack follows="all" - height="350" - width="300" - layout="topleft" - orientation="horizontal" - name="im_panels" - top="20" - left="0"> + <layout_stack + follows="all" + height="350" + width="300" + layout="topleft" + orientation="horizontal" + name="im_panels" + top="20" + left="0"> <layout_panel name="panel_im_control_panel" layout="topleft" - top_delta="-3" - height="350" follows="left" label="IM Control Panel" auto_resize="false" user_resize="false" /> - <layout_panel height="350" - width="" - left_delta="110" - top="0" - user_resize="false"> - <button height="20" - follows="left|top" - top="0" - image_overlay="TabIcon_Open_Off" - layout="topleft" - width="25" - name="slide_left_btn" /> - <button height="20" - follows="left|top" - top="0" - image_overlay="TabIcon_Close_Off" - width="25" - name="slide_right_btn" /> - <chat_history - length="1" - follows="all" - height="275" - layout="topleft" - name="chat_history" - parse_highlights="true" - allow_html="true" - width="160"> - </chat_history> - <line_editor - follows="left|right" - height="20" - label="To" - layout="topleft" - name="chat_editor" - width="160"> - </line_editor> + <layout_panel + left="0" + top="0" + user_resize="false"> + <button + height="20" + follows="left|top" + top="0" + left="2" + image_overlay="TabIcon_Open_Off" + layout="topleft" + width="25" + name="slide_left_btn" /> + <button + height="20" + follows="left|top" + top="0" + left="2" + image_overlay="TabIcon_Close_Off" + width="25" + name="slide_right_btn" /> + <chat_history + length="1" + font="SansSerifSmall" + follows="left|right|top" + height="280" + name="chat_history" + parse_highlights="true" + allow_html="true" + left="1" + width="180"> + </chat_history> + <line_editor + follows="left|right|top" + font="SansSerifSmall" + height="20" + label="To" + name="chat_editor" + top_pad="1" + width="180"> + </line_editor> </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index 69b015a727..d8534bfe0b 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -5,7 +5,7 @@ can_tear_off="false" can_resize="true" can_drag_on_left="false" - can_close="false" + can_close="true" can_dock="true" bevel_style="in" height="300" diff --git a/indra/newview/skins/default/xui/en/floater_region_info.xml b/indra/newview/skins/default/xui/en/floater_region_info.xml index 9bb30f8e86..262bcd07a0 100644 --- a/indra/newview/skins/default/xui/en/floater_region_info.xml +++ b/indra/newview/skins/default/xui/en/floater_region_info.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="512" + height="555" help_topic="regioninfo" layout="topleft" name="regioninfo" @@ -9,7 +9,7 @@ title="REGION/ESTATE" width="480"> <tab_container - bottom="512" + bottom="555" follows="left|right|top|bottom" layout="topleft" left="1" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index a626e1b353..8b6f0f03fe 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -968,23 +968,27 @@ <combo_box.item label="Touch (default)" name="Touch/grab(default)" - value="Touch/grab (default)" /> + value="Touch" /> <combo_box.item label="Sit on object" name="Sitonobject" - value="Sit on object" /> + value="Sit" /> <combo_box.item label="Buy object" name="Buyobject" - value="Buy object" /> + value="Buy" /> <combo_box.item label="Pay object" name="Payobject" - value="Pay object" /> + value="Pay" /> <combo_box.item label="Open" name="Open" value="Open" /> + <combo_box.item + label="Zoom" + name="Zoom" + value="Zoom" /> </combo_box> <check_box height="16" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index d2933c0c0e..00711a29e0 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -299,8 +299,8 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_height="28" top="0" name="sys_well_panel" - width="34" - min_width="34" + width="54" + min_width="54" user_resize="false"> <chiclet_notification follows="right" @@ -309,22 +309,21 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. left="0" name="sys_well" top="4" - width="34"> + width="54"> <button auto_resize="true" halign="right" height="23" follows="right" flash_color="EmphasisColor" + left="0" name="Unread" image_overlay="Notices_Unread" - width="20" + image_overlay_alignment="right" + pad_right="6" + pad_left="6" + width="54" /> - <unread_notifications - width="34" - height="20" - left="0" - top="19" /> </chiclet_notification> </layout_panel> <icon diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 323ee957e7..7a3eae35a9 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -3,13 +3,13 @@ background_visible="true" bevel_style="in" bg_alpha_color="black" - follows="top" + follows="top|left|right" height="24" - label="im_header" - layout="topleft" - name="im_header" - width="300"> - <avatar_icon + label="im_header" + layout="topleft" + name="im_header" + width="300"> + <avatar_icon follows="left" height="18" image_name="Generic_Person" diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 9573904c93..73d843e6dd 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -38,28 +38,29 @@ label="Teleport" name="teleport_btn" width="100" /> - <button + <!-- <button follows="left|top" height="20" label="Share" name="share_btn" - width="100" /> - <button + width="100" />--> + <!--Removing pay button to save space - will update spec - verified by Erica/Steve --> + <!-- <button follows="left|top" height="20" label="Pay" name="pay_btn" - width="100" /> + width="100" />--> <panel background_visible="true" bg_alpha_color="DkGray2" border="false" - follows="left|top" + top_pad="10" + follows="left|bottom" height="70" - left="0" - left_pad="0" + left="1" name="panel_call_buttons" - width="110"> + width="109"> <button bottom="10" height="20" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index b01ddbf75a..a219e30b8b 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -87,8 +87,8 @@ width="313"> <panel bg_alpha_color="DkGray2" - follows="all" - height="533" + follows="left|top|right" + height="610" layout="topleft" left="0" min_height="300" @@ -145,7 +145,7 @@ top_pad="10" width="18" /> <text - follows="right|top" + follows="left|top|right" height="16" layout="topleft" left_pad="8" diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml index 462188ee24..df37f9973c 100644 --- a/indra/newview/skins/default/xui/en/panel_notification.xml +++ b/indra/newview/skins/default/xui/en/panel_notification.xml @@ -90,15 +90,4 @@ name="control_panel" top_pad="0"> </panel> - <!-- - <icon - follows="left|top" - height="32" - image_name="notify_tip_icon.tga" - layout="topleft" - left="8" - mouse_opaque="false" - name="info_icon" - top="20" - width="32" /> --> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index e6084202d7..9ab5c6b4f7 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -172,7 +172,7 @@ width="313"> <panel bg_alpha_color="DkGray2" - follows="all" + follows="left|top|right" height="533" layout="topleft" left="0" @@ -192,7 +192,7 @@ <layout_stack border_size="0" clip="false" - follows="all" + follows="left|top|right" height="50" layout="topleft" mouse_opaque="false" @@ -305,7 +305,7 @@ top_delta="0" width="18" /> <text - follows="right|top" + follows="left|top|right" height="16" layout="topleft" left_pad="8" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index add1476179..e25ff0d548 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -81,7 +81,7 @@ regions in the estate. <view_border bevel_style="in" follows="top|left" - height="290" + height="310" layout="topleft" left_delta="-4" top_pad="5" @@ -185,48 +185,48 @@ regions in the estate. follows="left|top" height="20" layout="topleft" - left="10" + left="15" name="abuse_email_text" - top_pad="5" + top_pad="10" width="180"> Abuse email address: </text> <line_editor follows="top|left" - height="19" + height="23" layout="topleft" left="15" name="abuse_email_address" - top_pad="5" - width="205" /> + top_pad="-5" + width="230" /> <button enabled="false" follows="left|top" - height="20" + height="23" label="Apply" layout="topleft" name="apply_btn" - right="250" - top_pad="4" - width="90" /> + top_pad="10" + left="78" + width="97" /> <button follows="left|top" - height="20" + height="23" label="Send Message To Estate..." layout="topleft" - left="8" + left="50" name="message_estate_btn" - top_pad="5" - width="250" /> + top_pad="20" + width="160" /> <button follows="left|top" - height="20" + height="23" label="Kick User from Estate..." layout="topleft" - left="8" + left="50" name="kick_user_from_estate_btn" top_pad="5" - width="250" /> + width="160" /> <text type="string" @@ -243,14 +243,14 @@ regions in the estate. <view_border bevel_style="none" follows="top|left" - height="60" + height="71" layout="topleft" right="470" - top_pad="5" + top_pad="-5" width="200" /> <name_list follows="left|top" - height="60" + height="71" layout="topleft" left_delta="0" multi_select="true" @@ -259,22 +259,22 @@ regions in the estate. width="200" /> <button follows="left|top" - height="20" + height="23" label="Remove..." layout="topleft" name="remove_estate_manager_btn" right="470" top_pad="5" - width="90" /> + width="97" /> <button follows="left|top" - height="20" + height="23" label="Add..." layout="topleft" - left_delta="-110" + left_delta="-103" name="add_estate_manager_btn" top_delta="0" - width="90" /> + width="97" /> <text type="string" length="1" @@ -283,21 +283,21 @@ regions in the estate. layout="topleft" left_delta="0" name="allow_resident_label" - top_pad="5" + top_pad="10" width="200"> Allowed Residents: </text> <view_border bevel_style="none" follows="top|left" - height="60" + height="71" layout="topleft" right="470" - top_pad="5" + top_pad="-5" width="200" /> <name_list follows="left|top" - height="60" + height="71" layout="topleft" left_delta="0" multi_select="true" @@ -306,22 +306,22 @@ regions in the estate. width="200" /> <button follows="left|top" - height="20" + height="23" label="Remove..." layout="topleft" name="remove_allowed_avatar_btn" right="470" top_pad="5" - width="90" /> + width="97" /> <button follows="left|top" - height="20" + height="23" label="Add..." layout="topleft" - left_delta="-110" + left_delta="-103" name="add_allowed_avatar_btn" top_delta="0" - width="90" /> + width="97" /> <text type="string" length="1" @@ -330,21 +330,21 @@ regions in the estate. layout="topleft" left_delta="0" name="allow_group_label" - top_pad="5" + top_pad="10" width="200"> Allowed Groups: </text> <view_border bevel_style="none" follows="top|left" - height="60" + height="71" layout="topleft" right="470" - top_pad="5" + top_pad="-5" width="200" /> <name_list follows="left|top" - height="60" + height="71" layout="topleft" left_delta="0" multi_select="true" @@ -353,22 +353,22 @@ regions in the estate. width="200" /> <button follows="left|top" - height="20" + height="23" label="Remove..." layout="topleft" name="remove_allowed_group_btn" right="470" top_pad="5" - width="90" /> + width="97" /> <button follows="left|top" - height="20" + height="23" label="Add..." layout="topleft" - left_delta="-110" + left_delta="-103" name="add_allowed_group_btn" top_delta="0" - width="90" /> + width="97" /> <text type="string" length="1" @@ -377,21 +377,21 @@ regions in the estate. layout="topleft" left_delta="0" name="ban_resident_label" - top_pad="5" + top_pad="10" width="200"> Banned Residents: </text> <view_border bevel_style="none" follows="top|left" - height="60" + height="71" layout="topleft" right="470" - top_pad="5" + top_pad="-5" width="200" /> <name_list follows="left|top" - height="60" + height="71" layout="topleft" left_delta="0" multi_select="true" @@ -400,20 +400,20 @@ regions in the estate. width="200" /> <button follows="left|top" - height="20" + height="23" label="Remove..." layout="topleft" name="remove_banned_avatar_btn" right="470" top_pad="5" - width="90" /> + width="97" /> <button follows="left|top" - height="20" + height="23" label="Add..." layout="topleft" - left_delta="-110" + left_delta="-103" name="add_banned_avatar_btn" top_delta="0" - width="90" /> + width="97" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml index 4ab6175805..3384852f27 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml @@ -18,7 +18,7 @@ visible="false" width="380" /> <icon - height="24" + height="20" follows="top|right|left" image_name="ListItem_Select" layout="topleft" @@ -55,7 +55,7 @@ left_pad="5" right="-3" name="profile_btn" - top_delta="-2" + top="1" visible="false" width="20" /> </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index a5272d1883..e76763d7eb 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2868,6 +2868,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="inventory_item_offered-im"> Inventory item offered </string> + <string name="share_alert"> + Drag items from inventory here + </string> <string name="only_user_message"> You are the only user in this session. |