From 7447454e7e733699f57f545bac13f46a72b916b7 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 4 Aug 2009 23:41:19 +0000 Subject: Fix for a crash bug on login after clearing the cache. --- indra/newview/llgesturemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 69498d3099..59274c8638 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -1151,7 +1151,7 @@ void LLGestureManager::done() { for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it) { - if(it->second->mName.empty()) + if(it->second && it->second->mName.empty()) { LLViewerInventoryItem* item = gInventory.getItem(it->first); if(item) -- cgit v1.2.3 From 85f940092705281f1040081ca5ebc207c3cb4a5b Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 5 Aug 2009 01:05:39 +0000 Subject: EXT-316 Enable the Viewer to generate calling cards for any agent Added code to store agent ID in the description field of calling cards so that we can use them to store user generated contacts. Currently enabled as a context menu for avatars (just for initial testing). reviewed by richard --- indra/llinventory/llinventory.h | 4 ++++ indra/llinventory/llpermissions.h | 6 +++++- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llinventorymodel.cpp | 21 ++++++++++++++++++--- indra/newview/llviewerinventory.cpp | 20 ++++++++++++++++++++ indra/newview/llviewerinventory.h | 9 ++++++++- indra/newview/llviewermenu.cpp | 14 ++++++++++++++ 7 files changed, 70 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index ce64317f48..5b8f7ba661 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -263,6 +263,10 @@ public: void setInventoryType(LLInventoryType::EType inv_type); void setFlags(U32 flags); void setCreationDate(time_t creation_date_utc); + + // This is currently only used in the Viewer to handle calling cards + // where the creator is actually used to store the target. + void setCreator(const LLUUID& creator) { mPermissions.setCreator(creator); } // Put this inventory item onto the current outgoing mesage. It // assumes you have already called nextBlock(). diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index d4ec399436..864088148f 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -252,7 +252,11 @@ public: BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits); BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits); BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits); - + + // This is currently only used in the Viewer to handle calling cards + // where the creator is actually used to store the target. Use with care. + void setCreator(const LLUUID& creator) { mCreator = creator; } + // // METHODS // diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 5877a0b19c..bf09774203 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1090,7 +1090,7 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const } const LLViewerInventoryItem* item = getItem(); - if (LLAssetType::lookupIsLinkType(item->getActualType())) + if (item && LLAssetType::lookupIsLinkType(item->getActualType())) { font |= LLFontGL::ITALIC; } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index bba0c9a90d..b4bd312cc0 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -565,9 +565,11 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) } LLViewerInventoryItem* old_item = getItem(item->getUUID()); + LLPointer new_item; if(old_item) { // We already have an old item, modify its values + new_item = old_item; LLUUID old_parent_id = old_item->getParentUUID(); LLUUID new_parent_id = item->getParentUUID(); if(old_parent_id != new_parent_id) @@ -596,7 +598,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) else { // Simply add this item - LLPointer new_item = new LLViewerInventoryItem(item); + new_item = new LLViewerInventoryItem(item); addItem(new_item); if(item->getParentUUID().isNull()) @@ -656,11 +658,24 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item) } mask |= LLInventoryObserver::ADD; } - if(item->getType() == LLAssetType::AT_CALLINGCARD) + if(new_item->getType() == LLAssetType::AT_CALLINGCARD) { mask |= LLInventoryObserver::CALLING_CARD; + // Handle user created calling cards. + // Target ID is stored in the description field of the card. + LLUUID id; + std::string desc = new_item->getDescription(); + BOOL isId = desc.empty() ? FALSE : id.set(desc, FALSE); + if (isId) + { + // Valid UUID; set the item UUID and rename it + new_item->setCreator(id); + std::string avatar_name; + // Fetch the currect name + gCacheName->get(id, FALSE, boost::bind(&LLViewerInventoryItem::onCallingCardNameLookup, new_item.get(), _1, _2, _3)); + } } - addChangedMask(mask, item->getUUID()); + addChangedMask(mask, new_item->getUUID()); return mask; } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index bb14a619c5..820abe2fbd 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -728,6 +728,16 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, gAgent.sendReliableMessage(); } +void create_inventory_callingcard(const LLUUID& avatar_id) +{ + std::string item_desc = avatar_id.asString(); + std::string item_name; + gCacheName->getFullName(avatar_id, item_name); + create_inventory_item(gAgent.getID(), gAgent.getSessionID(), + LLUUID::null, LLTransactionID::tnull, item_name, item_desc, LLAssetType::AT_CALLINGCARD, + LLInventoryType::IT_CALLINGCARD, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, NULL); +} + void copy_inventory_item( const LLUUID& agent_id, const LLUUID& current_owner, @@ -1102,3 +1112,13 @@ const LLViewerInventoryCategory *LLViewerInventoryItem::getLinkedCategory() cons } return NULL; } + +//---------- + +void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name) +{ + rename(first_name + " " + last_name); + gInventory.addChangedMask(LLInventoryObserver::LABEL, getUUID()); + gInventory.notifyObservers(); +} + diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 5198f5efc7..0ee9b21d3a 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -48,7 +48,7 @@ class LLViewerInventoryCategory; // their inventory. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLViewerInventoryItem : public LLInventoryItem +class LLViewerInventoryItem : public LLInventoryItem, public boost::signals2::trackable { public: typedef LLDynamicArray > item_array_t; @@ -144,6 +144,10 @@ public: const LLViewerInventoryItem *getLinkedItem() const; const LLViewerInventoryCategory *getLinkedCategory() const; + // callback + void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name); + +public: BOOL mIsComplete; LLTransactionID mTransactionID; }; @@ -271,6 +275,7 @@ extern LLInventoryCallbackManager gInventoryCallbacks; #define NOT_WEARABLE (EWearableType)0 +// *TODO: Find a home for these void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, const LLUUID& parent, const LLTransactionID& transaction_id, const std::string& name, @@ -279,6 +284,8 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, U32 next_owner_perm, LLPointer cb); +void create_inventory_callingcard(const LLUUID& avatar_id); + /** * @brief Securely create a new inventory item by copying from another. */ diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c7df1d9d70..cbaee2ac70 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5373,6 +5373,19 @@ class LLAvatarAddFriend : public view_listener_t } }; +class LLAvatarAddContact : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); + if(avatar) + { + create_inventory_callingcard(avatar->getID()); + } + return true; + } +}; + bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle) { S32 option = LLNotification::getSelectedOption(notification, response); @@ -7931,6 +7944,7 @@ void initialize_menus() // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend"); + view_listener_t::addMenu(new LLAvatarAddContact(), "Avatar.AddContact"); view_listener_t::addMenu(new LLAvatarFreeze(), "Avatar.Freeze"); view_listener_t::addMenu(new LLAvatarDebug(), "Avatar.Debug"); view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); -- cgit v1.2.3 From 936a1e36de45cc1f8a56cdd84dd05ed4382aea83 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 5 Aug 2009 01:13:57 +0000 Subject: merge -r 129526 skinning-19 -> viewer-2.0.0-3 Cherry pick a fix to enable IM windows. --- indra/llui/llfocusmgr.cpp | 44 ++++++++++++++++++++++++++++++++++++-------- indra/llui/llfocusmgr.h | 4 ++++ 2 files changed, 40 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index a66f147dcc..7e452a25a3 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -98,8 +98,6 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke return; } - //llinfos << "Keyboard focus handled by " << (new_focus ? new_focus->getName() : "nothing") << llendl; - mKeystrokesOnly = keystrokes_only; if( new_focus != mKeyboardFocus ) @@ -107,17 +105,47 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke mLastKeyboardFocus = mKeyboardFocus; mKeyboardFocus = new_focus; - if( mLastKeyboardFocus ) + view_handle_list_t new_focus_list; + + // walk up the tree to root and add all views to the new_focus_list + for (LLView* ctrl = mKeyboardFocus; ctrl && ctrl != LLUI::getRootView(); ctrl = ctrl->getParent()) { - mLastKeyboardFocus->onFocusLost(); + if (ctrl) + { + new_focus_list.push_front(ctrl->getHandle()); + } } - // clear out any existing flash - if (new_focus) + view_handle_list_t::iterator new_focus_iter = new_focus_list.begin(); + view_handle_list_t::iterator old_focus_iter = mCachedKeyboardFocusList.begin(); + + // compare the new focus sub-tree to the old focus sub-tree + // iterate through the lists in lockstep until we get to a non-common ancestor + while ((new_focus_iter != new_focus_list.end()) && + (old_focus_iter != mCachedKeyboardFocusList.end()) && + ((*new_focus_iter) == (*old_focus_iter))) { - mFocusWeight = 0.f; - new_focus->onFocusReceived(); + new_focus_iter++; + old_focus_iter++; } + + // call onFocusLost on all remaining in the old focus list + while (old_focus_iter != mCachedKeyboardFocusList.end()) + { + old_focus_iter->get()->onFocusLost(); + old_focus_iter++; + } + + // call onFocusReceived on all remaining in the new focus list + while (new_focus_iter != new_focus_list.end()) + { + new_focus_iter->get()->onFocusReceived(); + new_focus_iter++; + } + + // cache the new focus list for next time + swap(mCachedKeyboardFocusList, new_focus_list); + mFocusTimer.reset(); #ifdef _DEBUG diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index aaeb25a870..165a114f3d 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -102,6 +102,10 @@ private: LLUICtrl* mLastKeyboardFocus; // who last had focus LLUICtrl* mDefaultKeyboardFocus; BOOL mKeystrokesOnly; + + // caching list of keyboard focus ancestors for calling onFocusReceived and onFocusLost + typedef std::list > view_handle_list_t; + view_handle_list_t mCachedKeyboardFocusList; // Top View LLUICtrl* mTopCtrl; -- cgit v1.2.3 From e3d84d5e88751633eac27723bc775a5ad0248906 Mon Sep 17 00:00:00 2001 From: Mark Palange Date: Fri, 7 Aug 2009 23:11:55 +0000 Subject: EXT-295 - Added script to generate application config file. Reviewed by Poppy --- indra/newview/build_win32_appConfig.py | 57 ++++++++++++++++++++++++++++++++++ indra/newview/viewer_manifest.py | 6 ++-- 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 indra/newview/build_win32_appConfig.py (limited to 'indra') diff --git a/indra/newview/build_win32_appConfig.py b/indra/newview/build_win32_appConfig.py new file mode 100644 index 0000000000..2ac0e17dc1 --- /dev/null +++ b/indra/newview/build_win32_appConfig.py @@ -0,0 +1,57 @@ +# @file build_win32_appConfig.py +# @brief Create the windows app.config file to redirect crt linkage. +# +# $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$ + +import sys, os +from xml.dom.minidom import parse + +def main(): + src_manifest_name = sys.argv[1] + src_config_name = sys.argv[2] + dst_config_name = sys.argv[3] + + manifest_dom = parse(src_manifest_name) + node = manifest_dom.getElementsByTagName('assemblyIdentity')[0] + manifest_assm_ver = node.getAttribute('version') + + config_dom = parse(src_config_name) + node = config_dom.getElementsByTagName('bindingRedirect')[0] + node.setAttribute('newVersion', manifest_assm_ver) + node.setAttribute('oldVersion', node.getAttribute('oldVersion') + manifest_assm_ver) + comment = config_dom.createComment("This file is automatically generated by the build. see indra/newview/build_win32_appConfig.py") + config_dom.insertBefore(comment, config_dom.childNodes[0]) + + f = open(dst_config_name, 'w') + config_dom.writexml(f) + f.close() + + return 0 + +if __name__ == "__main__": + main() diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5dc8efba4a..54095f866f 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -207,6 +207,9 @@ class WindowsManifest(ViewerManifest): self.path("Microsoft.VC80.CRT.manifest") self.end_prefix() + # The config file name needs to match the exe's name. + self.path(src="%s/secondlife-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config") + # Mozilla runtime DLLs (CP) if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): self.path("freebl3.dll") @@ -235,9 +238,6 @@ class WindowsManifest(ViewerManifest): # Mozilla hack to get it to accept newer versions of msvc*80.dll than are listed in manifest # necessary as llmozlib2-vc80.lib refers to an old version of msvc*80.dll - can be removed when new version of llmozlib is built - Nyx - # The config file name needs to match the exe's name. - self.path("SecondLife.exe.config", dst=self.final_exe() + ".config") - # Vivox runtimes if self.prefix(src="vivox-runtime/i686-win32", dst=""): self.path("SLVoice.exe") -- cgit v1.2.3 From 9828faf565d0146739495cb14270c400c9249c8d Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 7 Aug 2009 23:41:29 +0000 Subject: Command: Merging from https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra, revision 1245 to https://svn.aws.productengine.com/secondlife/pe/stable-1/indra, revision 1246 into P:\svn\viewer-2-0\latest\indra, ignoring ancestry * EXT-277 - Modifications to the Location Bar Context Menu * EXT-252 - /whisper, /shout * EXT-254 - IM chiclet counter * EXT-267 - 'Status' drop-down menu doesn't drop in the Side tray / Me panel * EXT-298 - Update Places Panel Spec to reflect latest Create Landmark format * EXT-278 - Input Field History should display human readable names * EXT-317 - Avatar profile isn't opened in the sidetray as Profile Info panel when selecting an avatar in the search * Changes to notification tips * Changes to movement and camera controls * Side Tray functionality additions and code cleanup --- indra/newview/CMakeLists.txt | 6 +-- indra/newview/llfloatercamera.cpp | 10 +++- indra/newview/lllocationhistory.cpp | 59 +++++++++++++++++----- indra/newview/lllocationhistory.h | 13 +++-- indra/newview/lllocationinputctrl.cpp | 10 ++-- indra/newview/llmoveview.cpp | 2 +- indra/newview/llnavigationbar.cpp | 93 +++++++++++++++++++++++++++-------- indra/newview/llnavigationbar.h | 22 ++++++--- indra/newview/llpanelplaceinfo.cpp | 36 ++++++++------ indra/newview/llpanelplaces.cpp | 45 +++++++++++------ indra/newview/llpanelplaces.h | 1 - indra/newview/llscreenchannel.h | 72 ++++++++++++++++++--------- indra/newview/llviewerfloaterreg.cpp | 2 - indra/newview/llviewermenu.cpp | 4 +- 14 files changed, 260 insertions(+), 115 deletions(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0be84e2ab9..4286b91654 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -135,7 +135,6 @@ set(viewer_SOURCE_FILES llflexibleobject.cpp llfloaterabout.cpp llfloateractivespeakers.cpp - llfloateraddlandmark.cpp llfloateranimpreview.cpp llfloaterauction.cpp llfloateravatarpicker.cpp @@ -283,7 +282,6 @@ set(viewer_SOURCE_FILES llpanelavatarrow.cpp llpanelavatartag.cpp llpanelclassified.cpp - llsidetraypanelcontainer.cpp llpanelcontents.cpp llpaneldirbrowser.cpp llpaneldirclassified.cpp @@ -344,6 +342,7 @@ set(viewer_SOURCE_FILES llscreenchannel.cpp llselectmgr.cpp llsidetray.cpp + llsidetraypanelcontainer.cpp llsky.cpp llslurl.cpp llspatialpartition.cpp @@ -577,7 +576,6 @@ set(viewer_HEADER_FILES llflexibleobject.h llfloaterabout.h llfloateractivespeakers.h - llfloateraddlandmark.h llfloateranimpreview.h llfloaterauction.h llfloateravatarpicker.h @@ -724,7 +722,6 @@ set(viewer_HEADER_FILES llpanelavatarrow.h llpanelavatartag.h llpanelclassified.h - llsidetraypanelcontainer.h llpanelcontents.h llpaneldirbrowser.h llpaneldirclassified.h @@ -787,6 +784,7 @@ set(viewer_HEADER_FILES llsavedsettingsglue.h llselectmgr.h llsidetray.h + llsidetraypanelcontainer.h llsky.h llslurl.h llspatialpartition.h diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 81f1beb40d..8cba42dea5 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -53,6 +53,11 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f; #define PAN "cam_track_stick" #define CONTROLS "controls" + +void show_tip(LLFirstTimeTipsManager::EFirstTimeTipType tipType, LLView* anchorView) +{ + LLFirstTimeTipsManager::showTipsFor(tipType, anchorView, LLFirstTimeTipsManager::TPA_POS_RIGHT_ALIGN_TOP); +} // // Member functions // @@ -93,7 +98,8 @@ void LLFloaterCamera::update() { ECameraControlMode mode = determineMode(); if (mode != mCurrMode) setMode(mode); - LLFirstTimeTipsManager::showTipsFor(mMode2TipType[mode], this); + updatePosition(); + show_tip(mMode2TipType[mode], this); } @@ -270,7 +276,7 @@ void LLFloaterCamera::onClickBtn(ECameraControlMode mode) switchMode(mode); - LLFirstTimeTipsManager::showTipsFor(mMode2TipType[mode], mMode2Button[mode]); + show_tip(mMode2TipType[mode], this); } void LLFloaterCamera::assignButton2Mode(ECameraControlMode mode, const std::string& button_name) diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index 68143fd1e3..03d6953521 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -38,33 +38,58 @@ #include "llui.h" +const char LLLocationHistory::delimiter = '\t'; + LLLocationHistory::LLLocationHistory() : mFilename("typed_locations.txt") { } -void LLLocationHistory::addItem(std::string item) -{ +void LLLocationHistory::addItem(const std::string & item, const std::string & tooltip) { static LLUICachedControl max_items("LocationHistoryMaxSize", 100); - - std::vector::iterator item_iter = std::find(mItems.begin(), mItems.end(), item); - if (item_iter != mItems.end()) { - mItems.erase(item_iter); + // check if this item doesn't duplicate any existing one + if (touchItem(item)) { + return; } mItems.push_back(item); + mToolTips[item] = tooltip; // If the vector size exceeds the maximum, purge the oldest items. - if ((S32)mItems.size() > max_items) - mItems.erase(mItems.begin(), mItems.end()-max_items); + if ((S32)mItems.size() > max_items) { + for(std::vector::iterator i = mItems.begin(); i != mItems.end()-max_items; ++i) { + mToolTips.erase(*i); + mItems.erase(i); + } + } +} + +bool LLLocationHistory::touchItem(const std::string & item) { + bool result = false; + std::vector::iterator item_iter = std::find(mItems.begin(), mItems.end(), item); + + // the last used item should be the first in the history + if (item_iter != mItems.end()) { + mItems.erase(item_iter); + mItems.push_back(item); + result = true; + } + + return result; } void LLLocationHistory::removeItems() { mItems.clear(); + mToolTips.clear(); } +std::string LLLocationHistory::getToolTip(const std::string & item) const { + std::map::const_iterator i = mToolTips.find(item); + + return i != mToolTips.end() ? i->second : ""; +} bool LLLocationHistory::getMatchingItems(std::string substring, location_list_t& result) const { @@ -110,7 +135,7 @@ void LLLocationHistory::save() const } for (location_list_t::const_iterator it = mItems.begin(); it != mItems.end(); ++it) - file << (*it) << std::endl; + file << (*it) << delimiter << mToolTips.find(*it)->second << std::endl; file.close(); } @@ -129,13 +154,21 @@ void LLLocationHistory::load() return; } - // remove current entries before we load over them - mItems.clear(); + removeItems(); // add each line in the file to the list std::string line; - while (std::getline(file, line)) - addItem(line); + + while (std::getline(file, line)) { + size_t dp = line.find(delimiter); + + if (dp != std::string::npos) { + const std::string reg_name = line.substr(0, dp); + const std::string tooltip = line.substr(dp + 1, std::string::npos); + + addItem(reg_name, tooltip); + } + } file.close(); diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h index 19032686c1..67eabcdaca 100644 --- a/indra/newview/lllocationhistory.h +++ b/indra/newview/lllocationhistory.h @@ -37,6 +37,7 @@ #include #include +#include #include class LLLocationHistory: public LLSingleton @@ -50,8 +51,10 @@ public: LLLocationHistory(); - void addItem(std::string item); + void addItem(const std::string & item, const std::string & tooltip); + bool touchItem(const std::string & item); void removeItems(); + std::string getToolTip(const std::string & item) const; size_t getItemCount() const { return mItems.size(); } const location_list_t& getItems() const { return mItems; } bool getMatchingItems(std::string substring, location_list_t& result) const; @@ -62,9 +65,11 @@ public: void dump() const; private: - std::vector mItems; - std::string mFilename; /// File to store the history to. - loaded_signal_t mLoadedSignal; + const static char delimiter; + std::vector mItems; + std::map mToolTips; + std::string mFilename; /// File to store the history to. + loaded_signal_t mLoadedSignal; }; #endif diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 3880ea91eb..a20296a122 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -234,6 +234,13 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* // Let the buttons show their tooltips. if (LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen) && !msg.empty()) { + LLLocationHistory* lh = LLLocationHistory::getInstance(); + const std::string tooltip = lh->getToolTip(msg); + + if (!tooltip.empty()) { + msg = tooltip; + } + return TRUE; } @@ -347,9 +354,6 @@ void LLLocationInputCtrl::onInfoButtonClicked() void LLLocationInputCtrl::onAddLandmarkButtonClicked() { LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); - - // Floater "Add Landmark" functionality moved to Side Tray - //LLFloaterReg::showInstance("add_landmark"); } void LLLocationInputCtrl::onAgentParcelChange() diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 124a2def7f..96c8f3e2e9 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -435,7 +435,7 @@ void LLFloaterMove::showQuickTips(const EMovementMode mode) default: llwarns << "Quick Tip type was not detected, FTT_MOVE_WALK will be used" << llendl; } - LLFirstTimeTipsManager::showTipsFor(tipType, this); + LLFirstTimeTipsManager::showTipsFor(tipType, this, LLFirstTimeTipsManager::TPA_POS_LEFT_ALIGN_TOP); } void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode) diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 06cab9afb0..b980490434 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -181,10 +181,14 @@ LLNavigationBar::LLNavigationBar() mBtnHome(NULL), mCmbLocation(NULL), mLeSearch(NULL), - mPurgeTPHistoryItems(false) + mPurgeTPHistoryItems(false), + mUpdateTypedLocationHistory(false) { setIsChrome(TRUE); + mParcelMgrConnection = LLViewerParcelMgr::getInstance()->setAgentParcelChangedCallback( + boost::bind(&LLNavigationBar::onTeleportFinished, this)); + // Register callbacks and load the location field context menu (NB: the order matters). mCommitCallbackRegistrar.add("Navbar.Action", boost::bind(&LLNavigationBar::onLocationContextMenuItemClicked, this, _2)); mEnableCallbackRegistrar.add("Navbar.EnableMenuItem", boost::bind(&LLNavigationBar::onLocationContextMenuItemEnabled, this, _2)); @@ -200,6 +204,7 @@ LLNavigationBar::LLNavigationBar() LLNavigationBar::~LLNavigationBar() { + mParcelMgrConnection.disconnect(); sInstance = 0; } @@ -324,12 +329,12 @@ void LLNavigationBar::onLocationSelection() std::string region_name; LLVector3 local_coords(128, 128, 0); + S32 x = 0, y = 0, z = 0; // Is the typed location a SLURL? if (LLSLURL::isSLURL(typed_location)) { // Yes. Extract region name and local coordinates from it. - S32 x = 0, y = 0, z = 0; if (LLURLSimString::parse(LLSLURL::stripProtocol(typed_location), ®ion_name, &x, &y, &z)) local_coords.set(x, y, z); else @@ -337,8 +342,13 @@ void LLNavigationBar::onLocationSelection() } else { + region_name = extractLocalCoordsFromRegName(typed_location, &x, &y, &z); + + if (region_name != typed_location) { + local_coords.set(x, y, z); + } // Treat it as region name. - region_name = typed_location; + // region_name = typed_location; } // Resolve the region name to its global coordinates. @@ -349,6 +359,32 @@ void LLNavigationBar::onLocationSelection() LLWorldMap::getInstance()->sendNamedRegionRequest(region_name, cb, std::string("unused"), false); } +void LLNavigationBar::onTeleportFinished() { + + if (mUpdateTypedLocationHistory) { + LLLocationHistory* lh = LLLocationHistory::getInstance(); + + // Location is valid. Add it to the typed locations history. + // If user has typed text this variable will contain -1. + if (mCmbLocation->getCurrentIndex() != -1) { + lh->touchItem(mCmbLocation->getSelectedItemLabel()); + } else { + std::string region_name; + std::string url = gAgent.getSLURL(); + S32 x = 0, y = 0, z = 0; + + if (LLSLURL::isSLURL(url)) { + LLURLSimString::parse(LLSLURL::stripProtocol(url), ®ion_name, &x, &y, &z); + appendLocalCoordsToRegName(®ion_name, x, y, z); + lh->addItem(region_name, url); + } + } + + lh->save(); + mUpdateTypedLocationHistory = false; + } +} + void LLNavigationBar::onTeleportHistoryChanged() { // Update navigation controls. @@ -415,27 +451,13 @@ void LLNavigationBar::onRegionNameResponse( return; } - // Location is valid. Add it to the typed locations history. - // If user has typed text this variable will contain -1. - S32 selected_item = mCmbLocation->getCurrentIndex(); - - /* - LLLocationHistory* lh = LLLocationHistory::getInstance(); - lh->addItem(selected_item == -1 ? typed_location : mCmbLocation->getSelectedItemLabel()); - lh->save(); - */ - // Teleport to the location. LLVector3d region_pos = from_region_handle(region_handle); LLVector3d global_pos = region_pos + (LLVector3d) local_coords; - + mUpdateTypedLocationHistory = true; llinfos << "Teleporting to: " << global_pos << llendl; gAgent.teleportViaLocation(global_pos); - - LLLocationHistory* lh = LLLocationHistory::getInstance(); - lh->addItem(selected_item == -1 ? typed_location : mCmbLocation->getSelectedItemLabel()); - lh->save(); } void LLNavigationBar::showTeleportHistoryMenu() @@ -474,9 +496,6 @@ void LLNavigationBar::onLocationContextMenuItemClicked(const LLSD& userdata) else if (item == std::string("landmark")) { LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); - - // Floater "Add Landmark" functionality moved to Side Tray - //LLFloaterReg::showInstance("add_landmark"); } else if (item == std::string("cut")) { @@ -546,6 +565,38 @@ void LLNavigationBar::invokeSearch(std::string search_text) LLFloaterReg::showInstance("search", LLSD().insert("panel", "all").insert("id", LLSD(search_text))); } +void LLNavigationBar::appendLocalCoordsToRegName(std::string* reg_name, S32 x, S32 y, S32 z) { + std::string fmt = *reg_name + " (%d, %d, %d)"; + *reg_name = llformat(fmt.c_str(), x, y, z); +} + +std::string LLNavigationBar::extractLocalCoordsFromRegName(const std::string & reg_name, S32* x, S32* y, S32* z) { + /* + * This regular expression extracts numbers from the following string + * construct: "(num1, num2, num3)", where num1, num2 and num3 are decimal + * numbers. Leading and trailing spaces are also caught by the expression. + */ + const boost::regex re("\\s*\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)\\s*"); + + boost::smatch m; + if (boost::regex_search(reg_name, m, re)) { + // string representations of parsed by regex++ numbers + std::string xstr(m[1].first, m[1].second); + std::string ystr(m[2].first, m[2].second); + std::string zstr(m[3].first, m[3].second); + + *x = atoi(xstr.c_str()); + *y = atoi(ystr.c_str()); + *z = atoi(zstr.c_str()); + + return boost::regex_replace(reg_name, re, ""); + } + + *x = *y = *z = 0; + + return reg_name; +} + void LLNavigationBar::clearHistoryCache() { mCmbLocation->removeall(); diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 17a1438912..1c93a05348 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -68,6 +68,9 @@ private: void showTeleportHistoryMenu(); void invokeSearch(std::string search_text); + static void appendLocalCoordsToRegName(std::string* reg_name, S32 x, S32 y, S32 z); + static std::string extractLocalCoordsFromRegName(const std::string & reg_name, S32* x, S32* y, S32* z); + // callbacks bool onLocationContextMenuItemEnabled(const LLSD& userdata); void onLocationContextMenuItemClicked(const LLSD& userdata); @@ -81,6 +84,7 @@ private: void onLocationSelection(); void onLocationPrearrange(const LLSD& data); void onSearchCommit(); + void onTeleportFinished(); void onRegionNameResponse( std::string typed_location, std::string region_name, @@ -90,14 +94,16 @@ private: static LLNavigationBar *sInstance; - LLMenuGL* mLocationContextMenu; - LLMenuGL* mTeleportHistoryMenu; - LLButton* mBtnBack; - LLButton* mBtnForward; - LLButton* mBtnHome; - LLSearchEditor* mLeSearch; - LLLocationInputCtrl* mCmbLocation; - bool mPurgeTPHistoryItems; + LLMenuGL* mLocationContextMenu; + LLMenuGL* mTeleportHistoryMenu; + LLButton* mBtnBack; + LLButton* mBtnForward; + LLButton* mBtnHome; + LLSearchEditor* mLeSearch; + LLLocationInputCtrl* mCmbLocation; + boost::signals2::connection mParcelMgrConnection; + bool mPurgeTPHistoryItems; + bool mUpdateTypedLocationHistory; }; #endif diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 40275be82f..a2d491c2cf 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -67,7 +67,10 @@ LLPanelPlaceInfo::LLPanelPlaceInfo() mRequestedID(), mPosRegion(), mLandmarkID(), - mMinHeight(0) + mMinHeight(0), + mScrollingPanel(NULL), + mInfoPanel(NULL), + mMediaPanel(NULL) {} LLPanelPlaceInfo::~LLPanelPlaceInfo() @@ -110,9 +113,10 @@ BOOL LLPanelPlaceInfo::postBuild() mMinHeight = scroll_container->getScrolledViewRect().getHeight(); mScrollingPanel = getChild("scrolling_panel"); - - mInfoPanel = getChild("info_panel", TRUE, FALSE); - mMediaPanel = getChild("media_panel", TRUE, FALSE); + mInfoPanel = getChild("info_panel"); + mMediaPanel = getChild("media_panel"); + if (!(mMediaPanel && mInfoPanel && mScrollingPanel)) + return FALSE; return TRUE; } @@ -240,12 +244,20 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) if (!mInfoPanel) return; + if (type != PLACE) + toggleMediaPanel(FALSE); + + bool is_landmark_info_type = type == LANDMARK; + LLPanel* landmark_info_panel = getChild("landmark_info_panel"); + if (landmark_info_panel) + { + landmark_info_panel->setVisible(is_landmark_info_type); + } + switch(type) { case CREATE_LANDMARK: mCurrentTitle = getString("title_create_landmark"); - - toggleMediaPanel(FALSE); break; case PLACE: @@ -261,14 +273,10 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) // a landmark or a teleport history item case LANDMARK: mCurrentTitle = getString("title_landmark"); - - toggleMediaPanel(FALSE); break; - + case TELEPORT_HISTORY: mCurrentTitle = getString("title_place"); - - toggleMediaPanel(FALSE); break; } } @@ -383,7 +391,7 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) if (mCurrentTitle != getString("title_landmark")) { - mTitleEditor->setText(parcel_data.name + "; " + name); + mTitleEditor->setText(parcel_data.name); mNotesEditor->setText(LLStringUtil::null); } } @@ -499,7 +507,7 @@ void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id) // If typed name is empty use the parcel name instead. if (name.empty()) { - name = mParcelName->getText() + "; " + mRegionName->getText(); + name = mParcelName->getText(); } LLStringUtil::replaceChar(desc, '\n', ' '); @@ -510,7 +518,7 @@ void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id) void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) { - if (mMinHeight > 0) + if (mMinHeight > 0 && mScrollingPanel != NULL) { mScrollingPanel->reshape(mScrollingPanel->getRect().getWidth(), mMinHeight); } diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 31b2d01dcf..5976897970 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -106,6 +106,9 @@ BOOL LLPanelPlaces::postBuild() mOverflowBtn = getChild("overflow_btn"); + // *TODO: Assign the action to an appropriate event. + mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::toggleMediaPanel, this)); + mTabContainer = getChild("Places Tabs"); if (mTabContainer) { @@ -118,17 +121,14 @@ BOOL LLPanelPlaces::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelPlaces::onFilterEdit, this, _2)); } - mPlaceInfo = getChild("panel_place_info", TRUE, FALSE); - if (mPlaceInfo) + mPlaceInfo = getChild("panel_place_info"); + if (!mPlaceInfo) + return FALSE; + + LLButton* back_btn = mPlaceInfo->getChild("back_btn"); + if (back_btn) { - LLButton* back_btn = mPlaceInfo->getChild("back_btn"); - if (back_btn) - { - back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); - } - - // *TODO: Assign the action to an appropriate event. - mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::toggleMediaPanel, this)); + back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); } return TRUE; @@ -136,7 +136,7 @@ BOOL LLPanelPlaces::postBuild() void LLPanelPlaces::onOpen(const LLSD& key) { - if(key.size() == 0) + if(mPlaceInfo == NULL || key.size() == 0) return; mPlaceInfoType = key["type"].asString(); @@ -201,6 +201,9 @@ void LLPanelPlaces::onOpen(const LLSD& key) void LLPanelPlaces::setItem(LLInventoryItem* item) { + if (!mPlaceInfo) + return; + mItem = item; // If the item is a link get a linked item @@ -224,6 +227,9 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark) { + if (!mPlaceInfo) + return; + LLUUID region_id; landmark->getRegionID(region_id); LLVector3d pos_global; @@ -263,11 +269,6 @@ void LLPanelPlaces::onShareButtonClicked() // TODO: Launch the "Things" Share wizard } -void LLPanelPlaces::onAddLandmarkButtonClicked() -{ - LLFloaterReg::showInstance("add_landmark"); -} - void LLPanelPlaces::onCopySLURLButtonClicked() { mActivePanel->onCopySLURL(); @@ -276,6 +277,9 @@ void LLPanelPlaces::onCopySLURLButtonClicked() void LLPanelPlaces::onTeleportButtonClicked() { + if (!mPlaceInfo) + return; + if (mPlaceInfo->getVisible()) { if (mPlaceInfoType == "landmark") @@ -302,6 +306,9 @@ void LLPanelPlaces::onTeleportButtonClicked() void LLPanelPlaces::onShowOnMapButtonClicked() { + if (!mPlaceInfo) + return; + if (mPlaceInfo->getVisible()) { LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance(); @@ -430,6 +437,9 @@ void LLPanelPlaces::changed(U32 mask) void LLPanelPlaces::onAgentParcelChange() { + if (!mPlaceInfo) + return; + if (mPlaceInfo->getVisible() && (mPlaceInfoType == "agent" || mPlaceInfoType == "create_landmark")) { onOpen(LLSD().insert("type", mPlaceInfoType)); @@ -442,6 +452,9 @@ void LLPanelPlaces::onAgentParcelChange() void LLPanelPlaces::updateVerbs() { + if (!mPlaceInfo) + return; + bool is_place_info_visible = mPlaceInfo->getVisible(); bool is_agent_place_info_visible = mPlaceInfoType == "agent"; bool is_create_landmark_visible = mPlaceInfoType == "create_landmark"; diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 695c78cfba..431c8168d9 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -66,7 +66,6 @@ private: void onFilterEdit(const std::string& search_string); void onTabSelected(); - //void onAddLandmarkButtonClicked(); //void onCopySLURLButtonClicked(); //void onShareButtonClicked(); void onTeleportButtonClicked(); diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index a205b913ab..579f41eac8 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -59,36 +59,55 @@ public: LLScreenChannel(); virtual ~LLScreenChannel(); + // Channel's outfit-functions + // classic reshape void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - - LLToast* addToast(LLUUID id, LLPanel* panel, bool is_not_tip = true); + // initialization of channel's shape and position void init(S32 channel_left, S32 channel_right); + // set allignment of toasts inside a channel + void setToastAlignment(e_notification_toast_alignment align) {mToastAlignment = align;} + // set a template for a string in the OverflowToast + void setOverflowFormatString ( std::string str) { mOverflowFormatString = str; } + // Operating with toasts + // add a toast to a channel + LLToast* addToast(LLUUID id, LLPanel* panel, bool is_not_tip = true); + // kill or modify a toast by its ID void killToastByNotificationID(LLUUID id); void modifyToastByNotificationID(LLUUID id, LLPanel* panel); - - void setToastAlignment(e_notification_toast_alignment align) {mToastAlignment = align;} - - void setControlHovering(bool control) { mControlHovering = control; } - void setHovering(bool hovering) { mIsHovering = hovering; } - + // hide all toasts from screen, but not remove them from a channel + void hideToastsFromScreen(); + // removes all toasts from a channel void removeToastsFromChannel(); + // show all toasts in a channel + void showToasts(); + // + void loadStoredToastsToChannel(); + // void closeUnreadToastsPanel(); - void hideToastsFromScreen(); + // Channel's behavior-functions + // set whether a channel will control hovering inside itself or not + void setControlHovering(bool control) { mControlHovering = control; } + // set Hovering flag for a channel + void setHovering(bool hovering) { mIsHovering = hovering; } + // set whether a channel will store faded toasts or not void setStoreToasts(bool store) { mStoreToasts = store; } - void loadStoredToastsToChannel(); - - void showToasts(); + // tell all channels that the StartUp toast was shown and allow them showing of toasts + static void setStartUpToastShown() { mWasStartUpToastShown = true; } + // Channel's other interface functions functions S32 getNumberOfHiddenToasts() { return mHiddenToastsNum;} + // TODO: split StartUp and Overflow toasts void setNumberOfHiddenToasts(S32 num) { mHiddenToastsNum = num;} - - static void setStartUpToastShown() { mWasStartUpToastShown = true; } - e_notification_toast_alignment getToastAlignment() {return mToastAlignment;} - void setOverflowFormatString ( std::string str) { mOverflowFormatString = str; } + // Channel's callbacks + // callback for storing of faded toasts + typedef boost::function store_tost_callback_t; + typedef boost::signals2::signal store_tost_signal_t; + store_tost_signal_t mOnStoreToast; + boost::signals2::connection setOnStoreToastCallback(store_tost_callback_t cb) { return mOnStoreToast.connect(cb); } private: struct ToastElem @@ -117,31 +136,38 @@ private: } }; + // Channel's handlers void onToastHover(LLToast* toast, bool mouse_enter); - void onToastFade(LLToast* toast); + void onOverflowToastHide(); + + // void storeToast(ToastElem& toast_elem); + // show-functions depending on allignment of toasts void showToastsBottom(); void showToastsCentre(); void showToastsTop(); + // create the OverflowToast void createOverflowToast(S32 bottom, F32 timer); - void onOverflowToastHide(); + // Channel's flags static bool mWasStartUpToastShown; bool mControlHovering; bool mIsHovering; bool mStoreToasts; bool mOverflowToastHidden; - S32 mHiddenToastsNum; - LLToast* mUnreadToastsPanel; - std::vector mToastList; - std::vector mStoredToastList; + // e_notification_toast_alignment mToastAlignment; - std::map mToastEventStack; + S32 mHiddenToastsNum; + LLToast* mUnreadToastsPanel; std::string mOverflowFormatString; + + std::vector mToastList; + std::vector mStoredToastList; + std::map mToastEventStack; }; } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 9c29131def..f573a0858b 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -40,7 +40,6 @@ #include "llcompilequeue.h" #include "llfloaterabout.h" #include "llfloateractivespeakers.h" -#include "llfloateraddlandmark.h" #include "llfloateranimpreview.h" #include "llfloaterauction.h" #include "llfloateravatarpicker.h" @@ -129,7 +128,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("active_speakers", "floater_active_speakers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("add_landmark", "floater_add_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index cbaee2ac70..3af85a82c9 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5280,9 +5280,7 @@ class LLWorldCreateLandmark : public view_listener_t bool handleEvent(const LLSD& userdata) { LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); - - // Floater "Add Landmark" functionality moved to Side Tray - //LLFloaterReg::showInstance("add_landmark"); + return true; } }; -- cgit v1.2.3 From 8c6748bddb63943c5649096594035fae15619d1e Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 10 Aug 2009 06:09:38 +0000 Subject: EXT-5 - 'Press ESC' doesn't leave mouselook mode --- indra/newview/llviewermenu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3af85a82c9..fe599a3370 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5106,13 +5106,13 @@ void print_agent_nvpairs(void*) void show_debug_menus() { - // this can get called at login screen where there is no menu so only toggle it if one exists + // this might get called at login screen where there is no menu so only toggle it if one exists if ( gMenuBarView ) { BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); gMenuBarView->setItemVisible("Advanced", debug); - gMenuBarView->setItemEnabled("Advanced", debug); +// gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden gMenuBarView->setItemVisible("Debug", debug); gMenuBarView->setItemEnabled("Debug", debug); -- cgit v1.2.3 From 6da22957610c8dcfe1f466375a76861946fb5f6e Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 10 Aug 2009 16:05:28 +0000 Subject: Small change to disable echoing chat and IM to the "console" (2d text overlay in the 3D window) in 2.0. --- indra/newview/llfloaterchat.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 8fcb7b985f..742cc5c5de 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -339,11 +339,14 @@ void LLFloaterChat::addChat(const LLChat& chat, text_color = LLUIColorTable::instance().getColor("IMChatColor"); size = INSTANT_MSG_SIZE; } + // Disabling the console for 2.0 - SJB +#if 0 // We display anything if it's not an IM. If it's an IM, check pref... if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatConsole") ) { gConsole->addLine(chat.mText, size, text_color); } +#endif } if(from_instant_message && (gSavedPerAccountSettings.getS32("IMLogOptions")== LOG_BOTH_TOGETHER)) -- cgit v1.2.3 From ad04dcc19d174d774c2cb598f047436849333386 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 11 Aug 2009 00:47:46 +0000 Subject: DEV-35969 - notecards opened from object inventory are blank Also changed notecard previews to only have a "Save" button; "Keep/Discard" behavior has been deprecated. --- indra/newview/llpreviewnotecard.cpp | 27 +++++++--------------- indra/newview/llpreviewnotecard.h | 1 - .../default/xui/en/floater_preview_notecard.xml | 16 ++----------- 3 files changed, 10 insertions(+), 34 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index f3d0dc538d..ce9fcd9da2 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -73,10 +73,9 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id, const LLInventoryItem *item = getItem(); if (item) { - mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID(); - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE); mAssetID = item->getAssetUUID(); } + //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE); } LLPreviewNotecard::~LLPreviewNotecard() @@ -91,18 +90,8 @@ BOOL LLPreviewNotecard::postBuild() ed->setNotecardInfo(mItemUUID, mObjectID, getKey()); ed->makePristine(); } - if (mShowKeepDiscard) - { - childSetAction("Keep",onKeepBtn,this); - childSetAction("Discard",onDiscardBtn,this); - } - else - { - getChild("Keep")->setLabel(getString("Save")); - childSetAction("Keep",onClickSave,this); - childSetVisible("Discard", false); - } + childSetAction("Save", onClickSave, this); childSetVisible("lock", FALSE); const LLInventoryItem* item = getItem(); @@ -137,18 +126,16 @@ void LLPreviewNotecard::setEnabled( BOOL enabled ) childSetEnabled("Notecard Editor", enabled); childSetVisible("lock", !enabled); childSetEnabled("desc", enabled); - childSetEnabled("Keep", enabled && editor && (!editor->isPristine())); - + childSetEnabled("Save", enabled && editor && (!editor->isPristine())); } void LLPreviewNotecard::draw() { - LLViewerTextEditor* editor = getChild("Notecard Editor"); - BOOL script_changed = !editor->isPristine(); + BOOL changed = !editor->isPristine(); - childSetEnabled("Keep", script_changed && getEnabled()); + childSetEnabled("Save", changed && getEnabled()); LLPreview::draw(); } @@ -293,7 +280,9 @@ void LLPreviewNotecard::loadAsset() editor->setText(LLStringUtil::null); editor->makePristine(); editor->setEnabled(TRUE); - mAssetStatus = PREVIEW_ASSET_LOADED; + // Don't set asset status here; we may not have set the item id yet + // (e.g. when this gets called initially) + //mAssetStatus = PREVIEW_ASSET_LOADED; } } diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index 2a008be1e6..5b8cf1c2f6 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -102,7 +102,6 @@ protected: LLUUID mAssetID; LLUUID mObjectID; - BOOL mShowKeepDiscard; }; diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index 3327dc8c8b..f8f1abd179 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -83,23 +83,11 @@