diff options
Diffstat (limited to 'indra')
55 files changed, 1537 insertions, 404 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index bab5cfd56e..d9520b3bf6 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -61,11 +61,8 @@ BOOL LLRenderTarget::sUseFBO = FALSE; LLRenderTarget::LLRenderTarget() : mResX(0), mResY(0), - mViewportWidth(0), - mViewportHeight(0), mTex(0), mFBO(0), - mColorFmt(0), mDepth(0), mStencil(0), mUseDepth(FALSE), @@ -92,15 +89,10 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, BOO stop_glerror(); mResX = resx; mResY = resy; - // default viewport to entire texture - mViewportWidth = mResX; - mViewportHeight = mResY; mStencil = stencil; mUsage = usage; mUseDepth = depth; - mFBO = 0; - mColorFmt = color_fmt; release(); @@ -320,7 +312,7 @@ void LLRenderTarget::bindTarget() } } - glViewport(0, 0, mViewportWidth, mViewportHeight); + glViewport(0, 0, mResX, mResY); sBoundTarget = this; } @@ -523,18 +515,12 @@ BOOL LLRenderTarget::isComplete() const return (!mTex.empty() || mDepth) ? TRUE : FALSE; } -void LLRenderTarget::setViewport(U32 width, U32 height) -{ - mViewportWidth = llmin(width, mResX); - mViewportHeight = llmin(height, mResY); -} - void LLRenderTarget::getViewport(S32* viewport) { viewport[0] = 0; viewport[1] = 0; - viewport[2] = mViewportWidth; - viewport[3] = mViewportHeight; + viewport[2] = mResX; + viewport[3] = mResY; } //================================================== @@ -595,7 +581,7 @@ void LLMultisampleBuffer::bindTarget(LLRenderTarget* ref) check_framebuffer_status(); - glViewport(0, 0, mViewportWidth, mViewportHeight); + glViewport(0, 0, mResX, mResY); sBoundTarget = this; } @@ -610,14 +596,10 @@ void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth stop_glerror(); mResX = resx; mResY = resy; - mViewportWidth = mResX; - mViewportHeight = mResY; mUsage = usage; mUseDepth = depth; mStencil = stencil; - mFBO = 0; - mColorFmt = color_fmt; releaseSampleBuffer(); diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h index 125747424c..b7ebfc8f7f 100644 --- a/indra/llrender/llrendertarget.h +++ b/indra/llrender/llrendertarget.h @@ -107,9 +107,6 @@ public: //uses scissor rect if in copy-to-texture mode void clear(U32 mask = 0xFFFFFFFF); - // override default viewport to a smaller size - void setViewport(U32 width, U32 height); - //get applied viewport void getViewport(S32* viewport); @@ -153,16 +150,12 @@ protected: friend class LLMultisampleBuffer; U32 mResX; U32 mResY; - U32 mViewportWidth; - U32 mViewportHeight; std::vector<U32> mTex; U32 mFBO; - U32 mColorFmt; U32 mDepth; BOOL mStencil; BOOL mUseDepth; BOOL mRenderDepth; - LLTexUnit::eTextureType mUsage; U32 mSamples; LLMultisampleBuffer* mSampleBuffer; diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 48c76cf105..fa0abd55d0 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -392,9 +392,4 @@ void LLConsole::addLine(const LLWString& wline, F32 size, const LLColor4 &color) Paragraph paragraph(wline, color, mTimer.getElapsedTimeF32(), mFont, (F32)getRect().getWidth() ); mParagraphs.push_back ( paragraph ); - -#if LL_WINDOWS && LL_LCD_COMPILE - // add to LCD screen - AddNewDebugConsoleToLCD(wline); -#endif } diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index eac947a0d7..3867e910c0 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -50,7 +50,7 @@ class LLTextBox; * is ignored. The option "keep_one_selected" forces at least one item to be selected at any time (only for mouse events on items) * since any item of the list was selected. * - * Examples of using this control are presented in Picks panel (Me Profile and Profile View), where this control is used to + * Examples of using this control are presented in Picks panel (My Profile and Profile View), where this control is used to * manage the list of pick items. * * ASSUMPTIONS AND STUFF diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 95c8dd84f6..1b98dddddc 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -195,6 +195,7 @@ public: /// The static isShown() can accept a NULL pointer (which of course /// returns false). When non-NULL, it calls the non-static isShown(). static bool isShown(const LLFloater* floater); + BOOL isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts BOOL isFrontmost(); BOOL isDependent() { return !mDependeeHandle.isDead(); } void setCanMinimize(BOOL can_minimize); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 3619b36c0d..7bf10d774c 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2065,16 +2065,16 @@ void LLTextBase::updateRects() mContentsRect.unionWith(line_iter->mRect); } - mContentsRect.mLeft = 0; + S32 delta_pos_x = -mContentsRect.mLeft; mContentsRect.mTop += mVPad; S32 delta_pos = -mContentsRect.mBottom; // move line segments to fit new document rect for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it) { - it->mRect.translate(0, delta_pos); + it->mRect.translate(delta_pos_x, delta_pos); } - mContentsRect.translate(0, delta_pos); + mContentsRect.translate(delta_pos_x, delta_pos); } // update document container dimensions according to text contents diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 219fae84be..b51709e208 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -34,6 +34,7 @@ #include "linden_common.h" #include "llurlentry.h" #include "lluri.h" + #include "llcachename.h" #include "lltrans.h" #include "lluicolortable.h" @@ -383,6 +384,38 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa } } +// +// LLUrlEntryInventory Describes a Second Life inventory Url, e.g., +// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select +// +LLUrlEntryInventory::LLUrlEntryInventory() +{ + mPattern = boost::regex("secondlife:///app/inventory/[\\da-f-]+/\\w+", + boost::regex::perl|boost::regex::icase); + mMenuName = "menu_url_inventory.xml"; +} + +std::string LLUrlEntryInventory::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ + return unescapeUrl(url); + // TODO: Figure out if we can somehow access the inventory from here to get the actual item name + /* + std::string inventory_id_string = getIDStringFromUrl(url); + if (inventory_id_string.empty()) + { + // something went wrong, give raw url + return unescapeUrl(url); + } + LLUUID inventory_id(inventory_id_string); + LLInventoryItem* item = gInventory.getItem(inventory_id); + if(!item) + { + return unescapeUrl(url); + } + return item->getName(); */ +} + + /// /// LLUrlEntryParcel Describes a Second Life parcel Url, e.g., /// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 7970b48eb5..b3fb333fdd 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -174,6 +174,19 @@ private: }; /// +/// LLUrlEntryInventory Describes a Second Life inventory Url, e.g., +/// secondlife:///app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select +/// +class LLUrlEntryInventory : public LLUrlEntryBase +{ +public: + LLUrlEntryInventory(); + /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); +private: +}; + + +/// /// LLUrlEntryParcel Describes a Second Life parcel Url, e.g., /// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about /// diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index a6922b019b..b2f084e5ac 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -55,6 +55,7 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntryPlace()); registerUrl(new LLUrlEntrySL()); registerUrl(new LLUrlEntrySLLabel()); + registerUrl(new LLUrlEntryInventory()); } LLUrlRegistry::~LLUrlRegistry() diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 611875a1e2..e632cbaaf2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -325,7 +325,7 @@ set(viewer_SOURCE_FILES llpanelmediasettingsgeneral.cpp llpanelmediasettingspermissions.cpp llpanelmediasettingssecurity.cpp - llpanelmeprofile.cpp + llpanelme.cpp llpanelobject.cpp llpanelobjectinventory.cpp llpaneloutfitsinventory.cpp @@ -821,7 +821,7 @@ set(viewer_HEADER_FILES llpanelmediasettingsgeneral.h llpanelmediasettingspermissions.h llpanelmediasettingssecurity.h - llpanelmeprofile.h + llpanelme.h llpanelobject.h llpanelobjectinventory.h llpaneloutfitsinventory.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index fa0ea557ba..edad76a072 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -799,13 +799,6 @@ bool LLAppViewer::init() // call all self-registered classes LLInitClassList::instance().fireCallbacks(); - #if LL_LCD_COMPILE - // start up an LCD window on a logitech keyboard, if there is one - HINSTANCE hInstance = GetModuleHandle(NULL); - gLcdScreen = new LLLCD(hInstance); - CreateLCDDebugWindows(); -#endif - LLFolderViewItem::initClass(); // SJB: Needs to happen after initWindow(), not sure why but related to fonts gGLManager.getGLInfo(gDebugInfo); diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index a133bd6fe6..839a84f2d2 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -297,7 +297,7 @@ void LLAvatarActions::showProfile(const LLUUID& id) //Show own profile if(gAgent.getID() == id) { - LLSideTray::getInstance()->showPanel("panel_me_profile", params); + LLSideTray::getInstance()->showPanel("panel_me", params); } //Show other user profile else diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index cd0456b308..2c9b38b82a 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -199,10 +199,8 @@ public: userName->setValue(SL); } + setTimeField(chat.mTimeStr); - LLUICtrl* timeBox = getChild<LLUICtrl>("time_box"); - timeBox->setValue(chat.mTimeStr); - LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); if(mSourceType != CHAT_SOURCE_AGENT) @@ -268,7 +266,28 @@ protected: } } - +private: + void setTimeField(const std::string& time_value) + { + LLTextBox* time_box = getChild<LLTextBox>("time_box"); + + LLRect rect_before = time_box->getRect(); + time_box->setValue(time_value); + + // set necessary textbox width to fit all text + time_box->reshapeToFitText(); + LLRect rect_after = time_box->getRect(); + + // move rect to the left to correct position... + S32 delta_pos_x = rect_before.getWidth() - rect_after.getWidth(); + S32 delta_pos_y = rect_before.getHeight() - rect_after.getHeight(); + time_box->translate(delta_pos_x, delta_pos_y); + + //... & change width of the name control + LLTextBox* user_name = getChild<LLTextBox>("user_name"); + const LLRect& user_rect = user_name->getRect(); + user_name->reshape(user_rect.getWidth() + delta_pos_x, user_rect.getHeight()); + } protected: LLHandle<LLView> mPopupMenuHandleAvatar; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 795770d3db..ee93a9349a 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -110,10 +110,10 @@ void LLIMFloater::onFocusReceived() // virtual void LLIMFloater::onClose(bool app_quitting) { - if (!gIMMgr->hasSession(mSessionID)) return; - setTyping(false); - gIMMgr->leaveSession(mSessionID); + // SJB: We want the close button to hide the session window, not end it + // *NOTE: Yhis is functional, but not ideal - it's still closing the floater; we really want to change the behavior of the X button instead. + //gIMMgr->leaveSession(mSessionID); } /* static */ diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c066f1f77a..ffa943092f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -71,6 +71,7 @@ #include "llviewermessage.h" #include "llviewerwindow.h" #include "llnotify.h" +#include "llnearbychat.h" #include "llviewerregion.h" #include "llvoicechannel.h" #include "lltrans.h" @@ -1611,6 +1612,12 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess LLChat chat(message); chat.mSourceType = CHAT_SOURCE_SYSTEM; LLFloaterChat::addChatHistory(chat); + + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); + if(nearby_chat) + { + nearby_chat->addMessage(chat); + } } else // going to IM session { diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index a6a5ecb8e7..86f691dda2 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2769,7 +2769,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop) { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model || !inv_item) return FALSE; // cannot drag into library if(!isAgentInventory()) diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 384e6292e8..e908506b33 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -113,7 +113,7 @@ public: bool isEverythingComplete() const; void fetchItems(const item_ref_t& ids); - virtual void done() = 0; + virtual void done() {}; protected: item_ref_t mComplete; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 03401d934f..2c27808f03 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -120,7 +120,7 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, static LLDefaultChildRegistry::Register<LLDropTarget> r("drop_target"); static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile("panel_profile"); -static LLRegisterPanelClassWrapper<LLPanelAvatarMeProfile> t_panel_me_profile("panel_me_profile"); +static LLRegisterPanelClassWrapper<LLPanelMyProfile> t_panel_my_profile("panel_my_profile"); static LLRegisterPanelClassWrapper<LLPanelAvatarNotes> t_panel_notes("panel_notes"); //----------------------------------------------------------------------------- @@ -359,7 +359,7 @@ void LLPanelAvatarProfile::onOpen(const LLSD& key) { LLPanelProfileTab::onOpen(key); - mGroups.erase(); + mGroups.clear(); //Disable "Add Friend" button for friends. childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId())); @@ -391,7 +391,7 @@ void LLPanelAvatarProfile::resetControls() void LLPanelAvatarProfile::resetData() { - mGroups.erase(); + mGroups.clear(); childSetValue("2nd_life_pic",LLUUID::null); childSetValue("real_world_pic",LLUUID::null); childSetValue("online_status",LLStringUtil::null); @@ -443,23 +443,29 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g // Group properties may arrive in two callbacks, we need to save them across // different calls. We can't do that in textbox as textbox may change the text. - std::string groups = mGroups; LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin(); const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end(); - if(groups.empty() && it_end != it) - { - groups = (*it).group_name; - ++it; - } for(; it_end != it; ++it) { LLAvatarGroups::LLGroupData group_data = *it; - groups += ", "; - groups += group_data.group_name; + + // Check if there is no duplicates for this group + if (std::find(mGroups.begin(), mGroups.end(), group_data.group_name) == mGroups.end()) + mGroups.push_back(group_data.group_name); + } + + // Creating string, containing group list + std::string groups = ""; + for (group_list_t::const_iterator it = mGroups.begin(); it != mGroups.end(); ++it) + { + if (it != mGroups.begin()) + groups += ", "; + + groups += *it; } - mGroups = groups; - childSetValue("sl_groups",mGroups); + + childSetValue("sl_groups", groups); } void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) @@ -589,19 +595,19 @@ void LLPanelAvatarProfile::onOverflowButtonClicked() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -LLPanelAvatarMeProfile::LLPanelAvatarMeProfile() +LLPanelMyProfile::LLPanelMyProfile() : LLPanelAvatarProfile() { } -BOOL LLPanelAvatarMeProfile::postBuild() +BOOL LLPanelMyProfile::postBuild() { LLPanelAvatarProfile::postBuild(); mStatusCombobox = getChild<LLComboBox>("status_combo"); - childSetCommitCallback("status_combo", boost::bind(&LLPanelAvatarMeProfile::onStatusChanged, this), NULL); - childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelAvatarMeProfile::onStatusMessageChanged, this), NULL); + childSetCommitCallback("status_combo", boost::bind(&LLPanelMyProfile::onStatusChanged, this), NULL); + childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelMyProfile::onStatusMessageChanged, this), NULL); resetControls(); resetData(); @@ -609,12 +615,12 @@ BOOL LLPanelAvatarMeProfile::postBuild() return TRUE; } -void LLPanelAvatarMeProfile::onOpen(const LLSD& key) +void LLPanelMyProfile::onOpen(const LLSD& key) { LLPanelProfileTab::onOpen(key); } -void LLPanelAvatarMeProfile::processProfileProperties(const LLAvatarData* avatar_data) +void LLPanelMyProfile::processProfileProperties(const LLAvatarData* avatar_data) { fillCommonData(avatar_data); @@ -625,7 +631,7 @@ void LLPanelAvatarMeProfile::processProfileProperties(const LLAvatarData* avatar fillAccountStatus(avatar_data); } -void LLPanelAvatarMeProfile::fillStatusData(const LLAvatarData* avatar_data) +void LLPanelMyProfile::fillStatusData(const LLAvatarData* avatar_data) { std::string status; if (gAgent.getAFK()) @@ -644,7 +650,7 @@ void LLPanelAvatarMeProfile::fillStatusData(const LLAvatarData* avatar_data) mStatusCombobox->setValue(status); } -void LLPanelAvatarMeProfile::resetControls() +void LLPanelMyProfile::resetControls() { childSetVisible("status_panel", false); childSetVisible("profile_buttons_panel", false); @@ -654,7 +660,7 @@ void LLPanelAvatarMeProfile::resetControls() childSetVisible("profile_me_buttons_panel", true); } -void LLPanelAvatarMeProfile::onStatusChanged() +void LLPanelMyProfile::onStatusChanged() { LLSD::String status = mStatusCombobox->getValue().asString(); @@ -676,7 +682,7 @@ void LLPanelAvatarMeProfile::onStatusChanged() } } -void LLPanelAvatarMeProfile::onStatusMessageChanged() +void LLPanelMyProfile::onStatusMessageChanged() { updateData(); } diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index a0caf0c915..716bb29d45 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -47,7 +47,7 @@ enum EOnlineStatus }; /** -* Base class for any Profile View or Me Profile Panel. +* Base class for any Profile View or My Profile Panel. */ class LLPanelProfileTab : public LLPanel @@ -148,7 +148,7 @@ protected: virtual void processGroupProperties(const LLAvatarGroups* avatar_groups); /** - * Fills common for Avatar profile and Me Profile fields. + * Fills common for Avatar profile and My Profile fields. */ virtual void fillCommonData(const LLAvatarData* avatar_data); @@ -183,18 +183,20 @@ protected: private: - std::string mGroups; + typedef std::list<std::string> group_list_t; + group_list_t mGroups; + LLToggleableMenu* mProfileMenu; }; /** * Panel for displaying own first and second life related info. */ -class LLPanelAvatarMeProfile +class LLPanelMyProfile : public LLPanelAvatarProfile { public: - LLPanelAvatarMeProfile(); + LLPanelMyProfile(); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 78f3469f0e..ec0f8e303c 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -391,6 +391,10 @@ LLPanelLogin::~LLPanelLogin() //// We know we're done with the image, so be rid of it. //gTextureList.deleteImage( mLogoImage ); + + // Controls having keyboard focus by default + // must reset it on destroy. (EXT-2748) + gFocusMgr.setDefaultKeyboardFocus(NULL); } // virtual @@ -682,8 +686,6 @@ void LLPanelLogin::closePanel() if (sInstance) { gViewerWindow->getRootView()->removeChild( LLPanelLogin::sInstance ); - - gFocusMgr.setDefaultKeyboardFocus(NULL); delete sInstance; sInstance = NULL; diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp new file mode 100644 index 0000000000..046118cf75 --- /dev/null +++ b/indra/newview/llpanelme.cpp @@ -0,0 +1,272 @@ +/** + * @file llpanelme.cpp + * @brief Side tray "Me" (My Profile) panel + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelprofile.h" +#include "llavatarconstants.h" +#include "llpanelme.h" +#include "llagent.h" +#include "llagentwearables.h" +#include "lliconctrl.h" +#include "llsidetray.h" +#include "lltabcontainer.h" +#include "lltexturectrl.h" + +#define PICKER_SECOND_LIFE "2nd_life_pic" +#define PICKER_FIRST_LIFE "real_world_pic" +#define PANEL_PROFILE "panel_profile" + +static LLRegisterPanelClassWrapper<LLPanelMyProfileEdit> t_panel_me_profile_edit("edit_profile_panel"); +static LLRegisterPanelClassWrapper<LLPanelMe> t_panel_me_profile("panel_me"); + +LLPanelMe::LLPanelMe(void) + : LLPanelProfile() + , mEditPanel(NULL) +{ + setAvatarId(gAgent.getID()); +} + +BOOL LLPanelMe::postBuild() +{ + LLPanelProfile::postBuild(); + + getTabContainer()[PANEL_PROFILE]->childSetAction("edit_profile_btn", boost::bind(&LLPanelMe::onEditProfileClicked, this), this); + getTabContainer()[PANEL_PROFILE]->childSetAction("edit_appearance_btn", boost::bind(&LLPanelMe::onEditAppearanceClicked, this), this); + + return TRUE; +} + +void LLPanelMe::onOpen(const LLSD& key) +{ + LLPanelProfile::onOpen(key); +} + +void LLPanelMe::notifyChildren(const LLSD& info) +{ + if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state") + { + // Implement task panel tri-state behavior. + // + // When the button of an active open task panel is clicked, side tray + // calls notifyChildren() on the panel, passing task-panel-action=>handle-tri-state as an argument. + // The task panel is supposed to handle this by reverting to the default view, + // i.e. closing any dependent panels like "pick info" or "profile edit". + + bool on_default_view = true; + + const LLRect& task_panel_rect = getRect(); + for (LLView* child = getFirstChild(); child; child = findNextSibling(child)) + { + LLPanel* panel = dynamic_cast<LLPanel*>(child); + if (!panel) + continue; + + // *HACK: implement panel stack instead (e.g. me->pick_info->pick_edit). + if (panel->getRect().getWidth() == task_panel_rect.getWidth() && + panel->getRect().getHeight() == task_panel_rect.getHeight() && + panel->getVisible()) + { + panel->setVisible(FALSE); + on_default_view = false; + } + } + + if (on_default_view) + LLSideTray::getInstance()->collapseSideBar(); + + return; // this notification is only supposed to be handled by task panels + } + + LLPanel::notifyChildren(info); +} + +void LLPanelMe::buildEditPanel() +{ + if (NULL == mEditPanel) + { + mEditPanel = new LLPanelMyProfileEdit(); + mEditPanel->childSetAction("save_btn", boost::bind(&LLPanelMe::onSaveChangesClicked, this), this); + mEditPanel->childSetAction("cancel_btn", boost::bind(&LLPanelMe::onCancelClicked, this), this); + } +} + + +void LLPanelMe::onEditProfileClicked() +{ + buildEditPanel(); + togglePanel(mEditPanel, getAvatarId()); // open +} + +void LLPanelMe::onEditAppearanceClicked() +{ + if (gAgentWearables.areWearablesLoaded()) + { + gAgent.changeCameraToCustomizeAvatar(); + } +} + +void LLPanelMe::onSaveChangesClicked() +{ + LLAvatarData data = LLAvatarData(); + data.avatar_id = gAgent.getID(); + data.image_id = mEditPanel->getChild<LLTextureCtrl>(PICKER_SECOND_LIFE)->getImageAssetID(); + data.fl_image_id = mEditPanel->getChild<LLTextureCtrl>(PICKER_FIRST_LIFE)->getImageAssetID(); + data.about_text = mEditPanel->childGetValue("sl_description_edit").asString(); + data.fl_about_text = mEditPanel->childGetValue("fl_description_edit").asString(); + data.profile_url = mEditPanel->childGetValue("homepage_edit").asString(); + data.allow_publish = mEditPanel->childGetValue("show_in_search_checkbox"); + + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate(&data); + togglePanel(mEditPanel); // close + onOpen(getAvatarId()); +} + +void LLPanelMe::onCancelClicked() +{ + togglePanel(mEditPanel); // close +} + +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +LLPanelMyProfileEdit::LLPanelMyProfileEdit() + : LLPanelMyProfile() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_edit_profile.xml"); + + setAvatarId(gAgent.getID()); +} + +void LLPanelMyProfileEdit::onOpen(const LLSD& key) +{ + resetData(); + + // Disable editing until data is loaded, or edited fields will be overwritten when data + // is loaded. + enableEditing(false); + LLPanelMyProfile::onOpen(getAvatarId()); +} + +void LLPanelMyProfileEdit::processProperties(void* data, EAvatarProcessorType type) +{ + if(APT_PROPERTIES == type) + { + const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data); + if(avatar_data && getAvatarId() == avatar_data->avatar_id) + { + // *TODO dzaporozhan + // Workaround for ticket EXT-1099, waiting for fix for ticket EXT-1128 + enableEditing(true); + processProfileProperties(avatar_data); + LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this); + } + } +} + +void LLPanelMyProfileEdit::processProfileProperties(const LLAvatarData* avatar_data) +{ + fillCommonData(avatar_data); + + fillOnlineStatus(avatar_data); + + fillPartnerData(avatar_data); + + fillAccountStatus(avatar_data); + + childSetValue("show_in_search_checkbox", (BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH)); + + std::string first, last; + BOOL found = gCacheName->getName(avatar_data->avatar_id, first, last); + if (found) + { + childSetTextArg("name_text", "[FIRST]", first); + childSetTextArg("name_text", "[LAST]", last); + } +} + +BOOL LLPanelMyProfileEdit::postBuild() +{ + initTexturePickerMouseEvents(); + + childSetTextArg("partner_edit_link", "[URL]", getString("partner_edit_link_url")); + + return LLPanelAvatarProfile::postBuild(); +} +/** + * Inits map with texture picker and appropriate edit icon. + * Sets callbacks of Mouse Enter and Mouse Leave signals of Texture Pickers + */ +void LLPanelMyProfileEdit::initTexturePickerMouseEvents() +{ + LLTextureCtrl* text_pic = getChild<LLTextureCtrl>(PICKER_SECOND_LIFE); + LLIconCtrl* text_icon = getChild<LLIconCtrl>("2nd_life_edit_icon"); + mTextureEditIconMap[text_pic->getName()] = text_icon; + text_pic->setMouseEnterCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseEnter, this, _1)); + text_pic->setMouseLeaveCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseLeave, this, _1)); + text_icon->setVisible(FALSE); + + text_pic = getChild<LLTextureCtrl>(PICKER_FIRST_LIFE); + text_icon = getChild<LLIconCtrl>("real_world_edit_icon"); + mTextureEditIconMap[text_pic->getName()] = text_icon; + text_pic->setMouseEnterCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseEnter, this, _1)); + text_pic->setMouseLeaveCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseLeave, this, _1)); + text_icon->setVisible(FALSE); +} + +void LLPanelMyProfileEdit::resetData() +{ + LLPanelMyProfile::resetData(); + + childSetTextArg("name_text", "[FIRST]", LLStringUtil::null); + childSetTextArg("name_text", "[LAST]", LLStringUtil::null); +} + +void LLPanelMyProfileEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl) +{ + mTextureEditIconMap[ctrl->getName()]->setVisible(TRUE); +} +void LLPanelMyProfileEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl) +{ + mTextureEditIconMap[ctrl->getName()]->setVisible(FALSE); +} + +void LLPanelMyProfileEdit::enableEditing(bool enable) +{ + childSetEnabled("2nd_life_pic", enable); + childSetEnabled("real_world_pic", enable); + childSetEnabled("sl_description_edit", enable); + childSetEnabled("fl_description_edit", enable); + childSetEnabled("homepage_edit", enable); + childSetEnabled("show_in_search_checkbox", enable); +} diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h new file mode 100644 index 0000000000..17d367132e --- /dev/null +++ b/indra/newview/llpanelme.h @@ -0,0 +1,111 @@ +/** + * @file llpanelme.h + * @brief Side tray "Me" (My Profile) panel + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLPANELMEPROFILE_H +#define LL_LLPANELMEPROFILE_H + +#include "llpanel.h" +#include "llpanelavatar.h" + +class LLPanelMyProfileEdit; +class LLPanelProfile; +class LLIconCtrl; + +/** +* Panel for displaying Agent's profile, it consists of two sub panels - Profile +* and Picks. +* LLPanelMe allows user to edit his profile and picks. +*/ +class LLPanelMe : public LLPanelProfile +{ + LOG_CLASS(LLPanelMe); + +public: + + LLPanelMe(); + + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void notifyChildren(const LLSD& info); + + /*virtual*/ BOOL postBuild(); + +private: + + void buildEditPanel(); + + void onEditProfileClicked(); + void onEditAppearanceClicked(); + void onSaveChangesClicked(); + void onCancelClicked(); + + LLPanelMyProfileEdit * mEditPanel; + +}; + +class LLPanelMyProfileEdit : public LLPanelMyProfile +{ + LOG_CLASS(LLPanelMyProfileEdit); + +public: + + LLPanelMyProfileEdit(); + + /*virtual*/void processProperties(void* data, EAvatarProcessorType type); + + /*virtual*/BOOL postBuild(); + + /*virtual*/ void onOpen(const LLSD& key); + +protected: + + /*virtual*/void resetData(); + + void processProfileProperties(const LLAvatarData* avatar_data); + +private: + void initTexturePickerMouseEvents(); + void onTexturePickerMouseEnter(LLUICtrl* ctrl); + void onTexturePickerMouseLeave(LLUICtrl* ctrl); + + /** + * Enabled/disables controls to prevent overwriting edited data upon receiving + * current data from server. + */ + void enableEditing(bool enable); + +private: + // map TexturePicker name => Edit Icon pointer should be visible while hovering Texture Picker + typedef std::map<std::string, LLIconCtrl*> texture_edit_icon_map_t; + texture_edit_icon_map_t mTextureEditIconMap; +}; + +#endif // LL_LLPANELMEPROFILE_H diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 0c832defd7..f9e6e5507c 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -56,6 +56,8 @@ #include "llgrouplist.h" #include "llinventoryobserver.h" #include "llpanelpeoplemenus.h" +#include "llsidetray.h" +#include "llsidetraypanelcontainer.h" #include "llrecentpeople.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewermenu.h" // for gMenuHolder @@ -1270,6 +1272,31 @@ void LLPanelPeople::onOpen(const LLSD& key) reSelectedCurrentTab(); } +void LLPanelPeople::notifyChildren(const LLSD& info) +{ + if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state") + { + LLSideTrayPanelContainer* container = dynamic_cast<LLSideTrayPanelContainer*>(getParent()); + if (!container) + { + llwarns << "Cannot find People panel container" << llendl; + return; + } + + if (container->getCurrentPanelIndex() > 0) + { + // if not on the default panel, switch to it + container->onOpen(LLSD().insert(LLSideTrayPanelContainer::PARAM_SUB_PANEL_NAME, getName())); + } + else + LLSideTray::getInstance()->collapseSideBar(); + + return; // this notification is only supposed to be handled by task panels + } + + LLPanel::notifyChildren(info); +} + void LLPanelPeople::showAccordion(const std::string name, bool show) { if(name.empty()) diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index a369bcd3e2..d9dd76f3ac 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -50,8 +50,8 @@ public: virtual ~LLPanelPeople(); /*virtual*/ BOOL postBuild(); - - virtual void onOpen(const LLSD& key); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void notifyChildren(const LLSD& info); // internals class Updater; diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 4b90ea5048..b17b6d6fe9 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -83,7 +83,7 @@ public: LLClassifiedItem* getSelectedClassifiedItem(); //*NOTE top down approch when panel toggling is done only by - // parent panels failed to work (picks related code was in me profile panel) + // parent panels failed to work (picks related code was in my profile panel) void setProfilePanel(LLPanelProfile* profile_panel); private: diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 02f45c1b48..4d152a13f3 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -158,28 +158,14 @@ void LLPanelProfile::onOpen(const LLSD& key) } //*TODO redo panel toggling -void LLPanelProfile::togglePanel(LLPanel* panel) +void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key) { // TRUE - we need to open/expand "panel" bool expand = getChildList()->front() != panel; // mTabCtrl->getVisible(); if (expand) { - if (panel->getParent() != this) - { - addChild(panel); - } - else - { - sendChildToFront(panel); - } - - panel->setVisible(TRUE); - - LLRect new_rect = getRect(); - panel->reshape(new_rect.getWidth(), new_rect.getHeight()); - new_rect.setLeftTopAndSize(0, new_rect.getHeight(), new_rect.getWidth(), new_rect.getHeight()); - panel->setRect(new_rect); + openPanel(panel, key); } else { diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index e0b827c986..067beb248b 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -40,7 +40,7 @@ class LLTabContainer; /** -* Base class for Profile View and Me Profile. +* Base class for Profile View and My Profile. */ class LLPanelProfile : public LLPanel { @@ -51,7 +51,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); - virtual void togglePanel(LLPanel*); + virtual void togglePanel(LLPanel*, const LLSD& key = LLSD()); virtual void openPanel(LLPanel* panel, const LLSD& params); diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index bcf5b16aa6..7832f63e6a 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -193,8 +193,10 @@ void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& getChild<LLUICtrl>("user_name", FALSE)->setValue(first_name + " " + last_name); } -void LLPanelProfileView::togglePanel(LLPanel* panel) +void LLPanelProfileView::togglePanel(LLPanel* panel, const LLSD& key) { + // *TODO: unused method? + LLPanelProfile::togglePanel(panel); if(FALSE == panel->getVisible()) { diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h index 45c2fc116e..5dc617d4a0 100644 --- a/indra/newview/llpanelprofileview.h +++ b/indra/newview/llpanelprofileview.h @@ -64,7 +64,7 @@ public: /*virtual*/ BOOL postBuild(); - /*virtual*/ void togglePanel(LLPanel* panel); + /*virtual*/ void togglePanel(LLPanel* panel, const LLSD& key = LLSD()); BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 057cdde6f0..67d0e13786 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -262,6 +262,7 @@ BOOL LLTeleportHistoryPanel::postBuild() fl->setCommitOnSelectionChange(true); fl->setDoubleClickCallback(boost::bind(&LLTeleportHistoryPanel::onDoubleClickItem, this)); fl->setCommitCallback(boost::bind(&LLTeleportHistoryPanel::handleItemSelect, this, fl)); + fl->setReturnCallback(boost::bind(&LLTeleportHistoryPanel::onReturnKeyPressed, this)); } } } @@ -636,6 +637,12 @@ void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected) updateVerbs(); } +void LLTeleportHistoryPanel::onReturnKeyPressed() +{ + // Teleport to selected region as default action on return key pressed + onTeleport(); +} + void LLTeleportHistoryPanel::onDoubleClickItem() { // If item got doubleclick, then that item is already selected diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index b34d9e876c..a31ff34cb6 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -80,6 +80,7 @@ public: private: void onDoubleClickItem(); + void onReturnKeyPressed(); void onAccordionTabRightClick(LLView *view, S32 x, S32 y, MASK mask); void onAccordionTabOpen(LLAccordionCtrlTab *tab); void onAccordionTabClose(LLAccordionCtrlTab *tab); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index fb9db42cf6..24ba288c49 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -115,7 +115,9 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right) // LLScreenChannel ////////////////////// //-------------------------------------------------------------------------- -LLScreenChannel::LLScreenChannel(LLUUID& id): LLScreenChannelBase(id) +LLScreenChannel::LLScreenChannel(LLUUID& id): +LLScreenChannelBase(id) +,mStartUpToastPanel(NULL) { } @@ -358,8 +360,6 @@ void LLScreenChannel::redrawToasts() if(mToastList.size() == 0 || isHovering()) return; - hideToastsFromScreen(); - switch(mToastAlignment) { case NA_TOP : @@ -383,6 +383,8 @@ void LLScreenChannel::showToastsBottom() S32 toast_margin = 0; std::vector<ToastElem>::reverse_iterator it; + closeOverflowToastPanel(); + for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) { if(it != mToastList.rbegin()) @@ -408,7 +410,20 @@ void LLScreenChannel::showToastsBottom() if(stop_showing_toasts) break; - (*it).toast->setVisible(TRUE); + if( !(*it).toast->getVisible() ) + { + if((*it).toast->isFirstLook()) + { + (*it).toast->setVisible(TRUE); + } + else + { + // HACK + // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts + (*it).toast->setVisible(TRUE); + gFloaterView->sendChildToBack((*it).toast); + } + } } if(it != mToastList.rend() && !mOverflowToastHidden) @@ -417,6 +432,7 @@ void LLScreenChannel::showToastsBottom() for(; it != mToastList.rend(); it++) { (*it).toast->stopTimer(); + (*it).toast->setVisible(FALSE); mHiddenToastsNum++; } createOverflowToast(bottom, gSavedSettings.getS32("NotificationTipToastLifeTime")); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 2f98435b83..ee5fa46c9c 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -436,35 +436,16 @@ void LLSideTray::processTriState () expandSideBar(); else { - //!!!!!!!!!!!!!!!!! - //** HARDCODED!!!!! - //!!!!!!!!!!!!!!!!! - - //there is no common way to determine "default" panel for tab - //so default panels for now will be hardcoded - - //hardcoded for people tab and profile tab - - /*if(mActiveTab == getTab("sidebar_people")) - { - LLSideTrayPanelContainer* container = findChild<LLSideTrayPanelContainer>("panel_container"); - if(container && container->getCurrentPanelIndex()>0) - { - container->onOpen(LLSD().insert("sub_panel_name","panel_people")); - } - else - collapseSideBar(); - } - else if(mActiveTab == getTab("sidebar_me")) - { - LLTabContainer* tab_container = findChild<LLTabContainer>("tabs"); - if(tab_container && tab_container->getCurrentPanelIndex()>0) - tab_container->selectFirstTab(); - else - collapseSideBar(); - } - else*/ - collapseSideBar(); +#if 0 // *TODO: EXT-2092 + + // Tell the active task panel to switch to its default view + // or collapse side tray if already on the default view. + LLSD info; + info["task-panel-action"] = "handle-tri-state"; + mActiveTab->notifyChildren(info); +#else + collapseSideBar(); +#endif } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d36ff1605e..736be67710 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2153,7 +2153,7 @@ void login_callback(S32 option, void *userdata) LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); return; } - else if (QUIT_OPTION == option) + else if (QUIT_OPTION == option) // *TODO: THIS CODE SEEMS TO BE UNREACHABLE!!!!! login_callback is never called with option equal to QUIT_OPTION { // Make sure we don't save the password if the user is trying to clear it. std::string first, last, password; diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index ed2cedbd10..f9cbdc20d6 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -227,7 +227,7 @@ void LLToast::setVisible(BOOL show) } LLModalDialog::setFrontmost(FALSE); } - LLPanel::setVisible(show); + LLFloater::setVisible(show); if(mPanel) { if(!mPanel->isDead()) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 87d256b60a..c6ec25c1cb 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -56,11 +56,43 @@ #include "lltrans.h" #include "llappearancemgr.h" #include "llfloatercustomize.h" +#include "llcommandhandler.h" +#include "llviewermessage.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- +class LLInventoryHandler : public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLInventoryHandler() : LLCommandHandler("inventory", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() < 2) return false; + LLUUID inventory_id; + if (!inventory_id.set(params[0], FALSE)) + { + return false; + } + + const std::string verb = params[1].asString(); + if (verb == "select") + { + std::vector<LLUUID> items_to_open; + items_to_open.push_back(inventory_id); + open_inventory_offer(items_to_open, ""); + return true; + } + + return false; + } +}; +LLInventoryHandler gInventoryHandler; + ///---------------------------------------------------------------------------- /// Class LLViewerInventoryItem ///---------------------------------------------------------------------------- diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4d7d3ee8ac..adad06dc6f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -170,7 +170,6 @@ static const F32 LLREQUEST_PERMISSION_THROTTLE_INTERVAL = 10.0f; // seconds extern BOOL gDebugClicks; // function prototypes -void open_offer(const std::vector<LLUUID>& items, const std::string& from_name); bool check_offer_throttle(const std::string& from_name, bool check_only); //inventory offer throttle globals @@ -727,7 +726,7 @@ public: LLOpenAgentOffer(const std::string& from_name) : mFromName(from_name) {} /*virtual*/ void done() { - open_offer(mComplete, mFromName); + open_inventory_offer(mComplete, mFromName); gInventory.removeObserver(this); delete this; } @@ -745,7 +744,7 @@ class LLOpenTaskOffer : public LLInventoryAddedObserver protected: /*virtual*/ void done() { - open_offer(mAdded, ""); + open_inventory_offer(mAdded, ""); mAdded.clear(); } }; @@ -876,7 +875,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } } -void open_offer(const std::vector<LLUUID>& items, const std::string& from_name) +void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& from_name) { std::vector<LLUUID>::const_iterator it = items.begin(); std::vector<LLUUID>::const_iterator end = items.end(); @@ -1066,12 +1065,60 @@ LLSD LLOfferInfo::asLLSD() return sd; } +void LLOfferInfo::send_auto_receive_response(void) +{ + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ImprovedInstantMessage); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_MessageBlock); + msg->addBOOLFast(_PREHASH_FromGroup, FALSE); + msg->addUUIDFast(_PREHASH_ToAgentID, mFromID); + msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); + msg->addUUIDFast(_PREHASH_ID, mTransactionID); + msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary + std::string name; + LLAgentUI::buildFullname(name); + msg->addStringFast(_PREHASH_FromAgentName, name); + msg->addStringFast(_PREHASH_Message, ""); + msg->addU32Fast(_PREHASH_ParentEstateID, 0); + msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); + msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); + + // Auto Receive Message. The math for the dialog works, because the accept + // for inventory_offered, task_inventory_offer or + // group_notice_inventory is 1 greater than the offer integer value. + // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, + // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED + msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), + sizeof(mFolderID.mData)); + // send the message + msg->sendReliable(mHost); + + if(IM_INVENTORY_OFFERED == mIM) + { + // add buddy to recent people list + LLRecentPeople::instance().add(mFromID); + } +} + bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& response) - { +{ LLChat chat; std::string log_message; S32 button = LLNotification::getSelectedOption(notification, response); - + + LLInventoryObserver* opener = NULL; + LLViewerInventoryCategory* catp = NULL; + catp = (LLViewerInventoryCategory*)gInventory.getCategory(mObjectID); + LLViewerInventoryItem* itemp = NULL; + if(!catp) + { + itemp = (LLViewerInventoryItem*)gInventory.getItem(mObjectID); + } + // For muting, we need to add the mute, then decline the offer. // This must be done here because: // * callback may be called immediately, @@ -1082,6 +1129,136 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback); } + std::string from_string; // Used in the pop-up. + std::string chatHistory_string; // Used in chat history. + + // TODO: when task inventory offers can also be handled the new way, migrate the code that sets these strings here: + from_string = chatHistory_string = mFromName; + + bool busy=FALSE; + + switch(button) + { + case IOR_SHOW: + // we will want to open this item when it comes back. + LL_DEBUGS("Messaging") << "Initializing an opener for tid: " << mTransactionID + << LL_ENDL; + switch (mIM) + { + case IM_INVENTORY_OFFERED: + { + // This is an offer from an agent. In this case, the back + // end has already copied the items into your inventory, + // so we can fetch it out of our inventory. + LLInventoryFetchObserver::item_ref_t items; + items.push_back(mObjectID); + LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(from_string); + open_agent_offer->fetchItems(items); + if(catp || (itemp && itemp->isComplete())) + { + open_agent_offer->done(); + } + else + { + opener = open_agent_offer; + } + } + break; + case IM_TASK_INVENTORY_OFFERED: + case IM_GROUP_NOTICE: + case IM_GROUP_NOTICE_REQUESTED: + // This is an offer from a task or group. + // We don't use a new instance of an opener + // We instead use the singular observer gOpenTaskOffer + // Since it already exists, we don't need to actually do anything + break; + default: + LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL; + break; + } // end switch (mIM) + + // Show falls through to accept. + + case IOR_ACCEPT: + //don't spam them if they are getting flooded + if (check_offer_throttle(mFromName, true)) + { + log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + chat.mText = log_message; + LLFloaterChat::addChatHistory(chat); + } + break; + + case IOR_BUSY: + //Busy falls through to decline. Says to make busy message. + busy=TRUE; + case IOR_MUTE: + // MUTE falls through to decline + case IOR_DECLINE: + { + log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; + chat.mText = log_message; + if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 + { + chat.mMuted = TRUE; + } + LLFloaterChat::addChatHistory(chat); + + LLInventoryFetchComboObserver::folder_ref_t folders; + LLInventoryFetchComboObserver::item_ref_t items; + items.push_back(mObjectID); + LLDiscardAgentOffer* discard_agent_offer; + discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID); + discard_agent_offer->fetch(folders, items); + if(catp || (itemp && itemp->isComplete())) + { + discard_agent_offer->done(); + } + else + { + opener = discard_agent_offer; + } + + + if (busy && (!mFromGroup && !mFromObject)) + { + busy_message(gMessageSystem, mFromID); + } + break; + } + default: + // close button probably + // The item has already been fetched and is in your inventory, we simply won't highlight it + // OR delete it if the notification gets killed, since we don't want that to be a vector for + // losing inventory offers. + break; + } + + if(opener) + { + gInventory.addObserver(opener); + } + + delete this; + return false; +} + +bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const LLSD& response) +{ + LLChat chat; + std::string log_message; + S32 button = LLNotification::getSelectedOption(notification, response); + + // For muting, we need to add the mute, then decline the offer. + // This must be done here because: + // * callback may be called immediately, + // * adding the mute sends a message, + // * we can't build two messages at once. + if (2 == button) + { + gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback); + } + LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_ImprovedInstantMessage); msg->nextBlockFast(_PREHASH_AgentData); @@ -1108,7 +1285,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { itemp = (LLViewerInventoryItem*)gInventory.getItem(mObjectID); } - + std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. if (mFromObject == TRUE) @@ -1119,16 +1296,16 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (gCacheName->getGroupName(mFromID, group_name)) { from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'" - + mFromName + LLTrans::getString("'") +" " + LLTrans::getString("InvOfferOwnedByGroup") - + " "+ "'" + group_name + "'"; + + mFromName + LLTrans::getString("'") +" " + LLTrans::getString("InvOfferOwnedByGroup") + + " "+ "'" + group_name + "'"; chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByGroup") - + " " + group_name + "'"; + + " " + group_name + "'"; } else { from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'" - + mFromName +"'"+ " " + LLTrans::getString("InvOfferOwnedByUnknownGroup"); + + mFromName +"'"+ " " + LLTrans::getString("InvOfferOwnedByUnknownGroup"); chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownGroup"); } } @@ -1138,13 +1315,13 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (gCacheName->getName(mFromID, first_name, last_name)) { from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName - + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + first_name + " " + last_name; + + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + first_name + " " + last_name; chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + first_name + " " + last_name; } else { from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+LLTrans::getString("'") - + mFromName + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedByUnknownUser"); + + mFromName + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedByUnknownUser"); chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownUser"); } } @@ -1158,137 +1335,90 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& switch(button) { - case IOR_ACCEPT: - // ACCEPT. The math for the dialog works, because the accept - // for inventory_offered, task_inventory_offer or - // group_notice_inventory is 1 greater than the offer integer value. - // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, - // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED - msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), - sizeof(mFolderID.mData)); - // send the message - msg->sendReliable(mHost); - - //don't spam them if they are getting flooded - if (check_offer_throttle(mFromName, true)) - { - log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - chat.mText = log_message; - LLFloaterChat::addChatHistory(chat); - } - - // we will want to open this item when it comes back. - LL_DEBUGS("Messaging") << "Initializing an opener for tid: " << mTransactionID - << LL_ENDL; - switch (mIM) - { - case IM_INVENTORY_OFFERED: - { - // This is an offer from an agent. In this case, the back - // end has already copied the items into your inventory, - // so we can fetch it out of our inventory. - LLInventoryFetchObserver::item_ref_t items; - items.push_back(mObjectID); - LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(from_string); - open_agent_offer->fetchItems(items); - if(catp || (itemp && itemp->isComplete())) + case IOR_ACCEPT: + // ACCEPT. The math for the dialog works, because the accept + // for inventory_offered, task_inventory_offer or + // group_notice_inventory is 1 greater than the offer integer value. + // Generates IM_INVENTORY_ACCEPTED, IM_TASK_INVENTORY_ACCEPTED, + // or IM_GROUP_NOTICE_INVENTORY_ACCEPTED + msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), + sizeof(mFolderID.mData)); + // send the message + msg->sendReliable(mHost); + + //don't spam them if they are getting flooded + if (check_offer_throttle(mFromName, true)) { - open_agent_offer->done(); + log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + chat.mText = log_message; + LLFloaterChat::addChatHistory(chat); } - else + + // we will want to open this item when it comes back. + LL_DEBUGS("Messaging") << "Initializing an opener for tid: " << mTransactionID + << LL_ENDL; + switch (mIM) + { + case IM_TASK_INVENTORY_OFFERED: + case IM_GROUP_NOTICE: + case IM_GROUP_NOTICE_REQUESTED: { - opener = open_agent_offer; + // This is an offer from a task or group. + // We don't use a new instance of an opener + // We instead use the singular observer gOpenTaskOffer + // Since it already exists, we don't need to actually do anything } - } + break; + default: + LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL; + break; + } // end switch (mIM) break; - case IM_TASK_INVENTORY_OFFERED: - case IM_GROUP_NOTICE: - case IM_GROUP_NOTICE_REQUESTED: - { - // This is an offer from a task or group. - // We don't use a new instance of an opener - // We instead use the singular observer gOpenTaskOffer - // Since it already exists, we don't need to actually do anything - } - break; + + case IOR_BUSY: + //Busy falls through to decline. Says to make busy message. + busy=TRUE; + case IOR_MUTE: + // MUTE falls through to decline + case IOR_DECLINE: + // DECLINE. The math for the dialog works, because the decline + // for inventory_offered, task_inventory_offer or + // group_notice_inventory is 2 greater than the offer integer value. + // Generates IM_INVENTORY_DECLINED, IM_TASK_INVENTORY_DECLINED, + // or IM_GROUP_NOTICE_INVENTORY_DECLINED default: - LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL; - break; - } // end switch (mIM) - break; - - case IOR_BUSY: - //Busy falls through to decline. Says to make busy message. - busy=TRUE; - case IOR_MUTE: - // MUTE falls through to decline - case IOR_DECLINE: - // DECLINE. The math for the dialog works, because the decline - // for inventory_offered, task_inventory_offer or - // group_notice_inventory is 2 greater than the offer integer value. - // Generates IM_INVENTORY_DECLINED, IM_TASK_INVENTORY_DECLINED, - // or IM_GROUP_NOTICE_INVENTORY_DECLINED - default: - // close button probably (or any of the fall-throughs from above) - msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 2)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE); - // send the message - msg->sendReliable(mHost); - - log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; - chat.mText = log_message; - if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 - { - chat.mMuted = TRUE; - } - LLFloaterChat::addChatHistory(chat); - - // If it's from an agent, we have to fetch the item to throw - // it away. If it's from a task or group, just denying the - // request will suffice to discard the item. - if(IM_INVENTORY_OFFERED == mIM) - { - LLInventoryFetchComboObserver::folder_ref_t folders; - LLInventoryFetchComboObserver::item_ref_t items; - items.push_back(mObjectID); - LLDiscardAgentOffer* discard_agent_offer; - discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID); - discard_agent_offer->fetch(folders, items); - if(catp || (itemp && itemp->isComplete())) + // close button probably (or any of the fall-throughs from above) + msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 2)); + msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE); + // send the message + msg->sendReliable(mHost); + + log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; + chat.mText = log_message; + if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 { - discard_agent_offer->done(); + chat.mMuted = TRUE; } - else + LLFloaterChat::addChatHistory(chat); + + if (busy && (!mFromGroup && !mFromObject)) { - opener = discard_agent_offer; + busy_message(msg,mFromID); } - - } - if (busy && (!mFromGroup && !mFromObject)) - { - busy_message(msg,mFromID); - } - break; - } - - if(IM_INVENTORY_OFFERED == mIM) - { - // add buddy to recent people list - LLRecentPeople::instance().add(mFromID); + break; } - + if(opener) { gInventory.addObserver(opener); } - + delete this; return false; } - -void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) +void inventory_offer_handler(LLOfferInfo* info) { //Until throttling is implmented, busy mode should reject inventory instead of silently //accepting it. SEE SL-39554 @@ -1375,21 +1505,45 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) args["OBJECTFROMNAME"] = info->mFromName; args["NAME"] = info->mFromName; args["NAME_SLURL"] = LLSLURL::buildCommand("agent", info->mFromID, "about"); - std::string verb = "highlight?name=" + msg; + std::string verb = "select?name=" + msg; args["ITEM_SLURL"] = LLSLURL::buildCommand("inventory", info->mObjectID, verb.c_str()); LLNotification::Params p("ObjectGiveItem"); - p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2)); - if (from_task) + // Object -> Agent Inventory Offer + if (info->mFromObject) { + // Inventory Slurls don't currently work for non agent transfers, so only display the object name. + args["ITEM_SLURL"] = msg; + // Note: sets inventory_task_offer_callback as the callback + p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_task_offer_callback, info, _1, _2)); p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser"; } - else + else // Agent -> Agent Inventory Offer { + // Note: sets inventory_offer_callback as the callback + p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2)); p.name = "UserGiveItem"; + + // Prefetch the item into your local inventory. + LLInventoryFetchObserver::item_ref_t items; + items.push_back(info->mObjectID); + LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver(); + fetch_item->fetchItems(items); + if(fetch_item->isEverythingComplete()) + { + fetch_item->done(); + } + else + { + gInventory.addObserver(fetch_item); + } + + // In viewer 2 we're now auto receiving inventory offers and messaging as such (not sending reject messages). + info->send_auto_receive_response(); } - + + // Pop up inv offer notification and let the user accept (keep), or reject (and silently delete) the inventory. LLNotifications::instance().add(p); } @@ -1885,7 +2039,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - inventory_offer_handler(info, dialog == IM_TASK_INVENTORY_OFFERED); + inventory_offer_handler(info); } } break; diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index e24da2013d..1a98828010 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -59,7 +59,8 @@ enum InventoryOfferResponse IOR_ACCEPT, IOR_DECLINE, IOR_MUTE, - IOR_BUSY + IOR_BUSY, + IOR_SHOW }; BOOL can_afford_transaction(S32 cost); @@ -197,6 +198,7 @@ void invalid_message_callback(LLMessageSystem*, void*, EMessageException); void process_initiate_download(LLMessageSystem* msg, void**); void start_new_inventory_observer(); +void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& from_name); struct LLOfferInfo { @@ -218,7 +220,9 @@ struct LLOfferInfo LLHost mHost; LLSD asLLSD(); + void send_auto_receive_response(void); bool inventory_offer_callback(const LLSD& notification, const LLSD& response); + bool inventory_task_offer_callback(const LLSD& notification, const LLSD& response); }; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 29d40d073c..e30c8ab346 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1347,6 +1347,7 @@ LLViewerWindow::LLViewerWindow( mDebugText = new LLDebugText(this); + mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale); } void LLViewerWindow::initGLDefaults() @@ -2868,19 +2869,17 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) if (mWorldViewRectRaw != new_world_rect) { - // sending a signal with a new WorldView rect - mOnWorldViewRectUpdated(mWorldViewRectRaw, new_world_rect); - + LLRect old_world_rect = mWorldViewRectRaw; mWorldViewRectRaw = new_world_rect; gResizeScreenTexture = TRUE; LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); - mWorldViewRectScaled = mWorldViewRectRaw; - mWorldViewRectScaled.mLeft = llround((F32)mWorldViewRectScaled.mLeft / mDisplayScale.mV[VX]); - mWorldViewRectScaled.mRight = llround((F32)mWorldViewRectScaled.mRight / mDisplayScale.mV[VX]); - mWorldViewRectScaled.mBottom = llround((F32)mWorldViewRectScaled.mBottom / mDisplayScale.mV[VY]); - mWorldViewRectScaled.mTop = llround((F32)mWorldViewRectScaled.mTop / mDisplayScale.mV[VY]); + mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale); + + // sending a signal with a new WorldView rect + old_world_rect = calcScaledRect(old_world_rect, mDisplayScale); + mOnWorldViewRectUpdated(old_world_rect, mWorldViewRectScaled); } } @@ -4753,7 +4752,6 @@ F32 LLViewerWindow::getWorldViewAspectRatio() const } else { - llinfos << "World aspect ratio: " << world_aspect << llendl; return world_aspect; } } @@ -4795,6 +4793,18 @@ void LLViewerWindow::calcDisplayScale() } } +//static +LLRect LLViewerWindow::calcScaledRect(const LLRect & rect, const LLVector2& display_scale) +{ + LLRect res = rect; + res.mLeft = llround((F32)res.mLeft / display_scale.mV[VX]); + res.mRight = llround((F32)res.mRight / display_scale.mV[VX]); + res.mBottom = llround((F32)res.mBottom / display_scale.mV[VY]); + res.mTop = llround((F32)res.mTop / display_scale.mV[VY]); + + return res; +} + S32 LLViewerWindow::getChatConsoleBottomPad() { S32 offset = 0; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 517993182b..747fd3b253 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -391,6 +391,7 @@ public: F32 getWorldViewAspectRatio() const; const LLVector2& getDisplayScale() const { return mDisplayScale; } void calcDisplayScale(); + static LLRect calcScaledRect(const LLRect & rect, const LLVector2& display_scale); private: bool shouldShowToolTipFor(LLMouseHandler *mh); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 5aad87630d..f908a015df 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -346,10 +346,7 @@ LLPipeline::LLPipeline() : mLightMovingMask(0), mLightingDetail(0), mScreenWidth(0), - mScreenHeight(0), - mViewportWidth(0), - mViewportHeight(0) - + mScreenHeight(0) { mNoiseMap = 0; mTrueNoiseMap = 0; @@ -517,46 +514,29 @@ void LLPipeline::resizeScreenTexture() LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE); if (gPipeline.canUseVertexShaders() && assertInitialized()) { - GLuint resX = gViewerWindow->getWindowWidthRaw(); - GLuint resY = gViewerWindow->getWindowHeightRaw(); - GLuint view_width = gViewerWindow->getWorldViewWidthRaw(); - GLuint view_height = gViewerWindow->getWorldViewHeightRaw(); + GLuint resX = gViewerWindow->getWorldViewWidthRaw(); + GLuint resY = gViewerWindow->getWorldViewHeightRaw(); - allocateScreenBuffer(resX, resY, view_width, view_height); + allocateScreenBuffer(resX,resY); } } -void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U32 viewport_height) +void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) { - bool screen_size_changed = resX != mScreenWidth || resY != mScreenHeight; - bool viewport_size_changed = viewport_width != mViewportWidth || viewport_height != mViewportHeight; - - if (!screen_size_changed - && !viewport_size_changed) - { - // nothing to do - return; - } - // remember these dimensions mScreenWidth = resX; mScreenHeight = resY; - mViewportWidth = viewport_width; - mViewportHeight = viewport_height; - - llinfos << "RESIZED SCREEN TEXTURE: " << resX << "x" << resY << llendl; - + U32 samples = gSavedSettings.getU32("RenderFSAASamples"); - U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor"); + if (res_mod > 1 && res_mod < resX && res_mod < resY) { resX /= res_mod; resY /= res_mod; } - if (gSavedSettings.getBOOL("RenderUIBuffer") - && screen_size_changed) + if (gSavedSettings.getBOOL("RenderUIBuffer")) { mUIScreen.allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); } @@ -564,51 +544,30 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U3 if (LLPipeline::sRenderDeferred) { //allocate deferred rendering color buffers - if (screen_size_changed) - { - mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE); - mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); - addDeferredAttachments(mDeferredScreen); - } + mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE); + mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); + addDeferredAttachments(mDeferredScreen); + // always set viewport to desired size, since allocate resets the viewport - mDeferredScreen.setViewport(viewport_width, viewport_height); - mDeferredDepth.setViewport(viewport_width, viewport_height); - if (screen_size_changed) - { - mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); - mEdgeMap.allocate(resX, resY, GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); - } - mScreen.setViewport(viewport_width, viewport_height); - mEdgeMap.setViewport(viewport_width, viewport_height); + mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); + mEdgeMap.allocate(resX, resY, GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); for (U32 i = 0; i < 3; i++) { - if (screen_size_changed) - { - mDeferredLight[i].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE); - } - mDeferredLight[i].setViewport(viewport_width, viewport_height); + mDeferredLight[i].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE); } for (U32 i = 0; i < 2; i++) { - if (screen_size_changed) - { - mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE); - } - mGIMapPost[i].setViewport(viewport_width, viewport_height); + mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE); } F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale"); for (U32 i = 0; i < 4; i++) { - if (screen_size_changed) - { - mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE); - } - mShadow[i].setViewport(viewport_width, viewport_height); + mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE); } @@ -617,52 +576,36 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U3 for (U32 i = 4; i < 6; i++) { - if (screen_size_changed) - { - mShadow[i].allocate(width, height, 0, TRUE, FALSE); - } - mShadow[i].setViewport(viewport_width, viewport_height); + mShadow[i].allocate(width, height, 0, TRUE, FALSE); } width = nhpo2(resX)/2; height = nhpo2(resY)/2; - if (screen_size_changed) - { - mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE); - } - mLuminanceMap.setViewport(viewport_width, viewport_height); + mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE); } else { - if (screen_size_changed) - { - mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE); - } - mScreen.setViewport(viewport_width, viewport_height); + mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE); } if (gGLManager.mHasFramebufferMultisample && samples > 1) { - if (screen_size_changed) + mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples); + if (LLPipeline::sRenderDeferred) { - mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples); - if (LLPipeline::sRenderDeferred) - { - addDeferredAttachments(mSampleBuffer); - mDeferredScreen.setSampleBuffer(&mSampleBuffer); - } + addDeferredAttachments(mSampleBuffer); + mDeferredScreen.setSampleBuffer(&mSampleBuffer); } - mSampleBuffer.setViewport(viewport_width, viewport_height); + mScreen.setSampleBuffer(&mSampleBuffer); stop_glerror(); } - if (LLPipeline::sRenderDeferred - && screen_size_changed) + if (LLPipeline::sRenderDeferred) { //share depth buffer between deferred targets mDeferredScreen.shareDepthBuffer(mScreen); for (U32 i = 0; i < 3; i++) @@ -762,10 +705,8 @@ void LLPipeline::createGLBuffers() stop_glerror(); - GLuint resX = gViewerWindow->getWindowWidthRaw(); - GLuint resY = gViewerWindow->getWindowHeightRaw(); - GLuint viewport_width = gViewerWindow->getWorldViewWidthRaw(); - GLuint viewport_height = gViewerWindow->getWorldViewHeightRaw(); + GLuint resX = gViewerWindow->getWorldViewWidthRaw(); + GLuint resY = gViewerWindow->getWorldViewHeightRaw(); if (LLPipeline::sRenderGlow) { //screen space glow buffers @@ -777,11 +718,10 @@ void LLPipeline::createGLBuffers() mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE); } - // force reallocation of buffers by clearing known dimensions + allocateScreenBuffer(resX,resY); mScreenWidth = 0; mScreenHeight = 0; - allocateScreenBuffer(resX,resY, viewport_width, viewport_height); } if (sRenderDeferred) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 11b7b55f20..67004a5f2d 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -111,7 +111,7 @@ public: void resizeScreenTexture(); void releaseGLBuffers(); void createGLBuffers(); - void allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U32 viewport_height); + void allocateScreenBuffer(U32 resX, U32 resY); void resetVertexBuffers(LLDrawable* drawable); void setUseVBO(BOOL use_vbo); @@ -469,9 +469,7 @@ public: //screen texture U32 mScreenWidth; U32 mScreenHeight; - U32 mViewportWidth; - U32 mViewportHeight; - + LLRenderTarget mScreen; LLRenderTarget mUIScreen; LLRenderTarget mDeferredScreen; diff --git a/indra/newview/skins/default/xui/de/panel_me.xml b/indra/newview/skins/default/xui/de/panel_me.xml new file mode 100644 index 0000000000..a685a430f0 --- /dev/null +++ b/indra/newview/skins/default/xui/de/panel_me.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel label="Ich" name="panel_me"> + <tab_container name="tabs"> + <panel label="Mein Profil" name="panel_profile"/> + <panel label="Auswahl" name="panel_picks"/> + </tab_container> +</panel> 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 7f2f37409c..645c2973d8 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -18,7 +18,7 @@ min_height="350"> <layout_stack follows="all" - height="350" + height="320" width="300" layout="topleft" orientation="horizontal" @@ -35,7 +35,8 @@ <layout_panel left="0" top="0" - width="180" + height="200" + width="185" user_resize="false"> <button height="20" @@ -55,10 +56,9 @@ width="25" name="slide_right_btn" /> <chat_history - length="1" font="SansSerifSmall" - follows="left|right|top" - height="280" + follows="left|right|top|bottom" + height="150" name="chat_history" parse_highlights="true" allow_html="true" @@ -66,12 +66,13 @@ width="180"> </chat_history> <line_editor - follows="left|right|top" + bottom="0" + follows="left|right|bottom" font="SansSerifSmall" height="20" label="To" + layout="bottomleft" name="chat_editor" - top_pad="1" width="180"> </line_editor> </layout_panel> diff --git a/indra/newview/skins/default/xui/en/menu_url_inventory.xml b/indra/newview/skins/default/xui/en/menu_url_inventory.xml new file mode 100644 index 0000000000..cf9d1d5881 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_url_inventory.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Url Popup"> + <menu_item_call + label="Show Inventory Item" + layout="topleft" + name="show_item"> + <menu_item_call.on_click + function="Url.Execute" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Copy Name to clipboard" + layout="topleft" + name="url_copy_label"> + <menu_item_call.on_click + function="Url.CopyLabel" /> + </menu_item_call> + <menu_item_call + label="Copy SLurl to clipboard" + layout="topleft" + name="url_copy"> + <menu_item_call.on_click + function="Url.CopyUrl" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 9d1bcb8f60..a87f05cbcc 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4494,7 +4494,7 @@ You don't have permission to copy this. icon="notifytip.tga" name="InventoryAccepted" type="notifytip"> -[NAME] accepted your inventory offer. +[NAME] received your inventory offer. </notification> <notification @@ -4966,17 +4966,17 @@ No valid parcel could be found. icon="notify.tga" name="ObjectGiveItem" type="offer"> -An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has offered you [OBJECTTYPE]: +An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you [OBJECTTYPE]: [ITEM_SLURL] <form name="form"> <button index="0" name="Keep" - text="OK"/> + text="Keep"/> <button index="1" name="Discard" - text="Cancel"/> + text="Discard"/> <button index="2" name="Mute" @@ -4988,17 +4988,17 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has offered you [OBJECTTY icon="notify.tga" name="ObjectGiveItemUnknownUser" type="offer"> -An object named [OBJECTFROMNAME] owned by (an unknown Resident) has offered you [OBJECTTYPE]: +An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [OBJECTTYPE]: [ITEM_SLURL] <form name="form"> <button index="0" name="Keep" - text="OK"/> + text="Keep"/> <button index="1" name="Discard" - text="Cancel"/> + text="Discard"/> <button index="2" name="Mute" @@ -5010,17 +5010,21 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has offered you icon="notify.tga" name="UserGiveItem" type="offer"> -[NAME_SLURL] has offered you [OBJECTTYPE]: +[NAME_SLURL] has given you [OBJECTTYPE]: [ITEM_SLURL] <form name="form"> <button index="0" name="Keep" - text="Accept"/> + text="Keep"/> + <button + index="4" + name="Show" + text="Show"/> <button index="1" name="Discard" - text="No, thanks"/> + text="Discard"/> </form> </notification> diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index a283cff5b3..368ab17689 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel border="false" + follows="all" height="215" name="panel_im_control_panel" width="180"> @@ -23,7 +24,7 @@ bg_alpha_color="DkGray2" border="false" bottom="1" - follows="left|bottom" + follows="left|right|bottom" height="70" left="0" left_pad="0" @@ -32,6 +33,7 @@ width="180"> <button bottom="10" + follows="all" height="20" label="Call" left_delta="40" @@ -39,6 +41,7 @@ width="100" /> <button bottom="40" + follows="all" height="20" label="Leave Call" name="end_call_btn" @@ -46,6 +49,7 @@ width="100" /> <button enabled="false" + follows="all" bottom="10" height="20" label="Voice Controls" 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 692461b1a2..c1090a1686 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -27,7 +27,7 @@ height="12" layout="topleft" left_pad="5" - right="-50" + right="-60" name="user_name" text_color="white" top="8" @@ -41,7 +41,7 @@ layout="topleft" left_pad="5" name="time_box" - right="-10" + right="-5" top="8" value="23:30" width="50" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index 2fee2033f6..41b210557e 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel border="false" + follows="left|top|right|bottom" height="238" name="panel_im_control_panel" width="180"> @@ -22,6 +23,7 @@ <button bottom_pad="0" + follows="left|right|bottom" height="20" label="Group Info" left_delta="28" @@ -32,7 +34,7 @@ background_visible="true" bg_alpha_color="0.2 0.2 0.2 1" border="false" - follows="left|bottom" + follows="left|right|bottom" height="70" left="0" left_pad="0" @@ -42,6 +44,7 @@ <button bottom="10" + follows="all" height="20" label="Call Group" left_delta="28" @@ -50,6 +53,7 @@ <button bottom="40" + follows="all" height="20" label="Leave Call" name="end_call_btn" @@ -59,6 +63,7 @@ <button enabled="false" bottom="10" + follows="all" height="20" label="Open Voice Controls" name="voice_ctrls_btn" diff --git a/indra/newview/skins/default/xui/en/panel_me.xml b/indra/newview/skins/default/xui/en/panel_me.xml new file mode 100644 index 0000000000..a99777848b --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_me.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + background_visible="true" + border="false" + follows="all" + height="570" + label="My Profile" + layout="topleft" + left="0" + name="panel_me" + top="0" + width="333"> + <!--<text + type="string" + follows="top|left|right" + font="SansSerifHugeBold" + height="20" + layout="topleft" + left="15" + name="user_name" + text_color="white" + top="0" + mouse_opaque="true" + width="280"> + (Loading...) + </text> --> + <tab_container + follows="all" + height="575" + halign="center" + layout="topleft" + left="10" + name="tabs" + tab_min_width="95" + tab_height="30" + tab_position="top" + top_pad="10" + width="313"> + <panel + class="panel_my_profile" + filename="panel_my_profile.xml" + label="PROFILE" + help_topic="panel_my_profile_tab" + name="panel_profile" /> + <panel + class="panel_picks" + filename="panel_picks.xml" + label="PICKS" + help_topic="panel_my_picks_tab" + name="panel_picks" /> + </tab_container> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml new file mode 100644 index 0000000000..fe3e010cf9 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -0,0 +1,429 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="all" + height="535" + label="Profile" + layout="topleft" + left="0" + name="panel_profile" + top="0" + width="313"> + <string + name="CaptionTextAcctInfo"> + [ACCTTYPE] +[PAYMENTINFO] [AGEVERIFICATION] + </string> + <string + name="payment_update_link_url"> + http://www.secondlife.com/account/billing.php?lang=en + </string> + <string + name="partner_edit_link_url"> + http://www.secondlife.com/account/partners.php?lang=en + </string> + <string + name="my_account_link_url" + value="http://secondlife.com/account" /> + <string + name="no_partner_text" + value="None" /> + <string + name="RegisterDateFormat"> + [REG_DATE] ([AGE]) + </string> + <scroll_container + color="DkGray2" + follows="all" + height="485" + layout="topleft" + name="profile_scroll" + reserve_scroll_corner="true" + opaque="true" + top="0" + width="313"> + <panel + name="scroll_content_panel" + follows="left|top|right" + height="485" + layout="topleft" + top="0" + left="0" + width="313"> + <panel + follows="left|top" + height="117" + layout="topleft" + left="10" + name="second_life_image_panel" + top="0" + width="280"> + <texture_picker + allow_no_texture="true" + default_image_name="None" + enabled="false" + follows="top|left" + height="117" + layout="topleft" + left="0" + name="2nd_life_pic" + top="10" + width="102" /> + <icon + height="102" + image_name="Blank" + layout="topleft" + name="2nd_life_edit_icon" + label="" + left="0" + tool_tip="Click the Edit Profile button below to change image" + top="10" + width="102" /> + <text + follows="left|top|right" + font.style="BOLD" + height="15" + layout="topleft" + left_pad="10" + name="title_sl_descr_text" + text_color="white" + top_delta="0" + value="[SECOND_LIFE]:" + width="165" /> + <expandable_text + follows="left|top|right" + height="95" + layout="topleft" + left="107" + textbox.max_length="512" + name="sl_description_edit" + top_pad="-3" + width="173" + expanded_bg_visible="true" + expanded_bg_color="DkGray"> + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. + </expandable_text> + </panel> + <panel + follows="left|top" + height="117" + layout="topleft" + top_pad="10" + left="10" + name="first_life_image_panel" + width="280"> + <texture_picker + allow_no_texture="true" + default_image_name="None" + enabled="false" + follows="top|left" + height="117" + layout="topleft" + left="0" + name="real_world_pic" + width="102" /> + <icon + height="102" + image_name="Blank" + layout="topleft" + name="real_world_edit_icon" + label="" + left="0" + tool_tip="Click the Edit Profile button below to change image" + top="4" + width="102" /> + <text + follows="left|top|right" + font.style="BOLD" + height="15" + layout="topleft" + left_pad="10" + name="title_rw_descr_text" + text_color="white" + top_delta="0" + value="Real World:" + width="165" /> + <expandable_text + follows="left|top|right" + height="95" + layout="topleft" + left="107" + textbox.max_length="512" + name="fl_description_edit" + top_pad="-3" + width="173" + expanded_bg_visible="true" + expanded_bg_color="DkGray"> + Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. + </expandable_text> + </panel> + + + <!-- <panel + name="lifes_images_panel" + follows="left|top|right" + height="244" + layout="topleft" + top="0" + left="0" + width="285"> + <panel + follows="left|top" + height="117" + layout="topleft" + left="10" + name="second_life_image_panel" + top="0" + width="285"> + <text + follows="left|top|right" + font.style="BOLD" + height="15" + layout="topleft" + left="0" + name="second_life_photo_title_text" + text_color="white" + value="[SECOND_LIFE]:" + width="170" /> + <texture_picker + allow_no_texture="true" + default_image_name="None" + enabled="false" + follows="top|left" + height="117" + layout="topleft" + left="0" + name="2nd_life_pic" + top_pad="0" + width="102" /> + </panel> + <icon + height="18" + image_name="AddItem_Off" + layout="topleft" + name="2nd_life_edit_icon" + label="" + left="87" + tool_tip="Click to select an image" + top="25" + width="18" /> + </panel> --> + + + + + <text + type="string" + follows="left|top" + font="SansSerifSmall" + font.style="BOLD" + height="15" + layout="topleft" + left="10" + name="me_homepage_text" + text_color="white" + top_pad="0" + width="280"> + Homepage: + </text> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="homepage_edit" + top_pad="0" + value="http://librarianavengers.org" + width="280" + word_wrap="false" + use_ellipses="true" + /> + <text + follows="left|top" + font.style="BOLD" + height="10" + layout="topleft" + left="10" + name="title_member_text" + text_color="white" + top_pad="10" + value="Member Since:" + width="280" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="10" + name="register_date" + value="05/31/1976" + width="280" + word_wrap="true" /> + <text + follows="left|top" + font.style="BOLD" + height="15" + layout="topleft" + left="10" + name="title_acc_status_text" + text_color="white" + top_pad="10" + value="Account Status:" + width="280" /> + <!-- <text + type="string" + follows="left|top" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="10" + name="my_account_link" + top_delta="0" + value="Go to Dashboard" + width="100"/> --> + <text + follows="left|top" + height="20" + layout="topleft" + left="10" + name="acc_status_text" + top_pad="0" + value="Resident. No payment info on file." + width="280" + word_wrap="true" /> + <text + follows="left|top" + font.style="BOLD" + height="15" + layout="topleft" + left="10" + name="title_partner_text" + text_color="white" + top_pad="5" + value="Partner:" + width="280" /> + <panel + follows="left|top" + height="15" + layout="topleft" + left="10" + name="partner_data_panel" + top_pad="0" + width="280"> + <text + follows="left|top" + height="10" + layout="topleft" + left="0" + name="partner_text" + top="0" + value="[FIRST] [LAST]" + width="280" + word_wrap="true" /> + </panel> + <text + follows="left|top" + font.style="BOLD" + height="15" + layout="topleft" + left="10" + name="title_groups_text" + text_color="white" + top_pad="8" + value="Groups:" + width="280" /> + <expandable_text + follows="left|top|bottom" + height="60" + layout="topleft" + left="10" + name="sl_groups" + top_pad="0" + width="280" + expanded_bg_visible="true" + expanded_bg_color="DkGray"> + Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. + </expandable_text> + </panel> + </scroll_container> + <panel + follows="bottom|left" + layout="topleft" + left="0" + name="profile_buttons_panel" + top_pad="2" + bottom="10" + height="19" + width="303"> + <button + follows="bottom|left" + height="19" + label="Add Friend" + layout="topleft" + left="0" + mouse_opaque="false" + name="add_friend" + top="5" + width="75" /> + <button + follows="bottom|left" + height="19" + label="IM" + layout="topleft" + name="im" + top="5" + left_pad="5" + width="45" /> + <button + follows="bottom|left" + height="19" + label="Call" + layout="topleft" + name="call" + left_pad="5" + top="5" + width="45" /> + <button + enabled="false" + follows="bottom|left" + height="19" + label="Map" + layout="topleft" + name="show_on_map_btn" + top="5" + left_pad="5" + width="45" /> + <button + follows="bottom|left" + height="19" + label="Teleport" + layout="topleft" + name="teleport" + left_pad="5" + top="5" + width="80" /> + </panel> + <panel + follows="bottom|left" + layout="topleft" + left="0" + top_pad="-17" + name="profile_me_buttons_panel" + visible="false" + height="19" + width="303"> + <button + follows="bottom|right" + height="19" + left="10" + label="Edit Profile" + name="edit_profile_btn" + width="130" /> + <button + follows="bottom|right" + height="19" + label="Edit Appearance" + left_pad="10" + name="edit_appearance_btn" + right="-10" + width="130" /> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 69a81adecd..ca84c9147b 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -24,7 +24,7 @@ top="10" visible="false" width="313"> - There are no any picks/classifieds here + There are no picks/classifieds here </text> <accordion follows="all" diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml index d02354a647..95242a9639 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml @@ -102,9 +102,9 @@ background_visible="true" > <panel - class="panel_me_profile_view" - name="panel_me_profile" - filename="panel_me_profile.xml" + class="panel_me" + name="panel_me" + filename="panel_me.xml" label="Me" /> </sidetray_tab> diff --git a/indra/newview/skins/default/xui/fr/panel_me.xml b/indra/newview/skins/default/xui/fr/panel_me.xml new file mode 100644 index 0000000000..5bedee4616 --- /dev/null +++ b/indra/newview/skins/default/xui/fr/panel_me.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel label="Moi" name="panel_me"> + <tab_container name="tabs"> + <panel label="Mon Profil" name="panel_profile"/> + <panel label="Préférences" name="panel_picks"/> + </tab_container> +</panel> diff --git a/indra/newview/skins/default/xui/ja/panel_me.xml b/indra/newview/skins/default/xui/ja/panel_me.xml new file mode 100644 index 0000000000..84151f43cf --- /dev/null +++ b/indra/newview/skins/default/xui/ja/panel_me.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel label="ミー" name="panel_me"> + <tab_container name="tabs"> + <panel label="プロフィール" name="panel_profile"/> + <panel label="ピック" name="panel_picks"/> + </tab_container> +</panel> |