From a3f951fa468482235527b6ed995739bb03ee8d43 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 22 Jan 2010 13:58:53 +0200 Subject: Fixed low bug EXT-4596 - '99' number is displayed if there are more than 99 active notifications. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index de3de45718..38e9219b5b 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -418,7 +418,6 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well name="Unread" image_overlay="Notices_Unread" image_overlay_alignment="center" - pad_right="15" tool_tip="Notifications" width="35" > Date: Fri, 22 Jan 2010 14:32:54 +0200 Subject: Fixed normal bug EXT-4321 - Pop-up window with description doesn't appear if choose 'Copy SLUrl' from 'Favorites Bar' context menu. --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index fb94657278..0e42ff09d8 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -51,6 +51,7 @@ #include "llinventorymodel.h" #include "llfloaterworldmap.h" #include "lllandmarkactions.h" +#include "llnotificationsutil.h" #include "llsidetray.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" @@ -975,6 +976,10 @@ BOOL LLFavoritesBarCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) void copy_slurl_to_clipboard_cb(std::string& slurl) { gClipboard.copyFromString(utf8str_to_wstring(slurl)); + + LLSD args; + args["SLURL"] = slurl; + LLNotificationsUtil::add("CopySLURL", args); } -- cgit v1.2.3 From 7b41de5fac1e95a0623b519fbb7dd3d93d9fc42a Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 22 Jan 2010 15:16:53 +0200 Subject: Work on normal task EXT-2214 Refactor IM Control Panels -- removed reference to LLSpeakerMgr from LLPanelGroupControlPanel (group text chat) --HG-- branch : product-engine --- indra/newview/llpanelimcontrolpanel.cpp | 6 ++++-- indra/newview/llpanelimcontrolpanel.h | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 86bdee7c7d..a334eb9d68 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -245,7 +245,6 @@ void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::str LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id): mParticipantList(NULL) { - mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id); } BOOL LLPanelGroupControlPanel::postBuild() @@ -304,7 +303,10 @@ void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) // for group and Ad-hoc chat we need to include agent into list if(!mParticipantList) - mParticipantList = new LLParticipantList(mSpeakerManager, getChild("speakers_list"), true,false); + { + LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(session_id); + mParticipantList = new LLParticipantList(speaker_manager, getChild("speakers_list"), true,false); + } } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index c18be5a6df..25fdf944c9 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -37,8 +37,6 @@ #include "llvoicechannel.h" #include "llcallingcard.h" -class LLSpeakerMgr; -class LLAvatarList; class LLParticipantList; class LLPanelChatControlPanel : public LLPanel @@ -110,7 +108,6 @@ public: protected: LLUUID mGroupID; - LLSpeakerMgr* mSpeakerManager; LLParticipantList* mParticipantList; -- cgit v1.2.3 From 0c80b1f7825643e247f151e038b2d3243421420a Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 22 Jan 2010 17:03:13 +0200 Subject: Related to normal task EXT-2214 Refactor IM Control Panels & EXT-3434 (There is no difference between invited and left participants in a Group call (Voice Controls)) -- replaced functionality to delayed removing of has left voice partcipants in VCP with one implemented in changeset f48e7cc41501 Behaviour of VCP implemented in EXT-3434 was not changed --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 69 +++++------------------------------------ indra/newview/llcallfloater.h | 31 ++++-------------- 2 files changed, 14 insertions(+), 86 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index f346a4b8c2..d4c8adadc6 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -93,22 +93,6 @@ static void* create_non_avatar_caller(void*) return new LLNonAvatarCaller; } -LLCallFloater::LLAvatarListItemRemoveTimer::LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id) -: LLEventTimer(period) -, mRemoveCallback(remove_cb) -, mSpeakerId(speaker_id) -{ -} - -BOOL LLCallFloater::LLAvatarListItemRemoveTimer::tick() -{ - if (mRemoveCallback) - { - mRemoveCallback(mSpeakerId); - } - return TRUE; -} - LLVoiceChannel* LLCallFloater::sCurrentVoiceCanel = NULL; LLCallFloater::LLCallFloater(const LLSD& key) @@ -122,10 +106,9 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) , mInitParticipantsVoiceState(false) -, mVoiceLeftRemoveDelay(10) { static LLUICachedControl voice_left_remove_delay ("VoiceParticipantLeftRemoveDelay", 10); - mVoiceLeftRemoveDelay = voice_left_remove_delay; + mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), voice_left_remove_delay); mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); @@ -135,6 +118,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) LLCallFloater::~LLCallFloater() { resetVoiceRemoveTimers(); + delete mSpeakerDelayRemover; delete mParticipants; mParticipants = NULL; @@ -648,33 +632,11 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) { - - // If there is already a started timer for the current panel don't do anything. - bool no_timer_for_current_panel = true; - if (mVoiceLeftTimersMap.size() > 0) - { - timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); - if (found_it != mVoiceLeftTimersMap.end()) - { - no_timer_for_current_panel = false; - } - } - - if (no_timer_for_current_panel) - { - // Starting a timer to remove an avatar row panel after timeout - mVoiceLeftTimersMap.insert(timer_pair(voice_speaker_id, - new LLAvatarListItemRemoveTimer(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), mVoiceLeftRemoveDelay, voice_speaker_id))); - } + mSpeakerDelayRemover->setActionTimer(voice_speaker_id); } -void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) +bool LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) { - if (mVoiceLeftTimersMap.size() > 0) - { - mVoiceLeftTimersMap.erase(mVoiceLeftTimersMap.find(voice_speaker_id)); - } - LLAvatarList::uuid_vector_t& speaker_uuids = mAvatarList->getIDs(); LLAvatarList::uuid_vector_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); if(pos != speaker_uuids.end()) @@ -682,34 +644,19 @@ void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) speaker_uuids.erase(pos); mAvatarList->setDirty(); } + + return false; } void LLCallFloater::resetVoiceRemoveTimers() { - if (mVoiceLeftTimersMap.size() > 0) - { - for (timers_map::iterator iter = mVoiceLeftTimersMap.begin(); - iter != mVoiceLeftTimersMap.end(); ++iter) - { - delete iter->second; - } - } - mVoiceLeftTimersMap.clear(); + mSpeakerDelayRemover->removeAllTimers(); } void LLCallFloater::removeVoiceRemoveTimer(const LLUUID& voice_speaker_id) { - // Remove the timer if it has been already started - if (mVoiceLeftTimersMap.size() > 0) - { - timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); - if (found_it != mVoiceLeftTimersMap.end()) - { - delete found_it->second; - mVoiceLeftTimersMap.erase(found_it); - } - } + mSpeakerDelayRemover->unsetActionTimer(voice_speaker_id); } bool LLCallFloater::validateSpeaker(const LLUUID& speaker_id) diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 096594aaa2..eded3a426b 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -44,6 +44,8 @@ class LLNonAvatarCaller; class LLOutputMonitorCtrl; class LLParticipantList; class LLSpeakerMgr; +class LLSpeakersDelayActionsStorage; + /** * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. * It can be torn-off and freely positioned onscreen. @@ -169,7 +171,7 @@ private: * * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list. */ - void removeVoiceLeftParticipant(const LLUUID& voice_speaker_id); + bool removeVoiceLeftParticipant(const LLUUID& voice_speaker_id); /** * Deletes all timers from the list to prevent started timers from ticking after destruction @@ -240,32 +242,11 @@ private: boost::signals2::connection mAvatarListRefreshConnection; + /** - * class LLAvatarListItemRemoveTimer - * - * Implements a timer that removes avatar list item of a participant - * who has left the call. + * time out speakers when they are not part of current session */ - class LLAvatarListItemRemoveTimer : public LLEventTimer - { - public: - typedef boost::function callback_t; - - LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id); - virtual ~LLAvatarListItemRemoveTimer() {}; - - virtual BOOL tick(); - - private: - callback_t mRemoveCallback; - LLUUID mSpeakerId; - }; - - typedef std::pair timer_pair; - typedef std::map timers_map; - - timers_map mVoiceLeftTimersMap; - S32 mVoiceLeftRemoveDelay; + LLSpeakersDelayActionsStorage* mSpeakerDelayRemover; /** * Stores reference to current voice channel. -- cgit v1.2.3 From ba3bbb2131f299f4a6bcef1fec72169e47d5717b Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 22 Jan 2010 18:06:53 +0200 Subject: Fixed bug EXT-4583 ([BSI] Changing group image via drag and drop from Inventory floater doesn't trigger "save" button to become active). Modified LLTextureCtrl's no_commit_on_selection paramater behavior so that the widget gets dirty only on DnD or when the OK button is pressed in the picker. This is needed for panels that rely on LLTextureCtrl::isDirty() to enable their "Apply" button. --HG-- branch : product-engine --- indra/newview/lltexturectrl.cpp | 10 ++++++++-- indra/newview/lltexturectrl.h | 3 ++- .../newview/skins/default/xui/en/panel_group_info_sidetray.xml | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 9c4825763b..2b846d33fc 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1103,7 +1103,10 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) { if (op == TEXTURE_CANCEL) mViewModel->resetDirty(); - else + // If the "no_commit_on_selection" parameter is set + // we get dirty only when user presses OK in the picker + // (i.e. op == TEXTURE_SELECT) or texture changes via DnD. + else if (mCommitOnSelection || op == TEXTURE_SELECT) mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? if( floaterp->isDirty() ) @@ -1125,7 +1128,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op) { // If the "no_commit_on_selection" parameter is set // we commit only when user presses OK in the picker - // (i.e. op == TEXTURE_SELECT) or changes texture via DnD. + // (i.e. op == TEXTURE_SELECT) or texture changes via DnD. if (mCommitOnSelection || op == TEXTURE_SELECT) onCommit(); } @@ -1165,6 +1168,9 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, { if(doDrop(item)) { + if (!mCommitOnSelection) + mViewModel->setDirty(); + // This removes the 'Multiple' overlay, since // there is now only one texture selected. setTentative( FALSE ); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 023329a9b2..8ca92c3d87 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -74,7 +74,8 @@ public: Optional default_image_name; Optional allow_no_texture; Optional can_apply_immediately; - Optional no_commit_on_selection; // don't commit unless it's DnD or OK button press + Optional no_commit_on_selection; // alternative mode: commit occurs and the widget gets dirty + // only on DnD or when OK is pressed in the picker Optional label_width; Optional border_color; diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 673052c3b5..0893c204e7 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -67,6 +67,7 @@ background_visible="true" layout="topleft" left="20" name="insignia" + no_commit_on_selection="true" tool_tip="Click to choose a picture" top_pad="5" width="100" /> -- cgit v1.2.3 From a2105d170261608cf515e1698b9b473d6e73558b Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 22 Jan 2010 18:10:07 +0200 Subject: implemented EXT-4523 Log for all Ad-Hoc conferences is stored in one file * for outgoing ad-hoc sessions chat history is saved into new file for every distinct set of initial participants format: ["Ad-hoc Conference" "hash".txt] ex: Ad-hoc Conference hash77a0ff26-614d-0dbd-ce19-5da9108f141a.txt * for incoming ad-hoc sessions, chat history of each session is saved into a separate file: format: [ <4 first symbols of session id>.txt] ex: Igor ProductEngine Conference 2010_01_22 07_41 2752.txt --HG-- branch : product-engine --- indra/newview/llimview.cpp | 69 +++++++++++++++++++++++++++++++++++++-------- indra/newview/llimview.h | 14 ++++++++- indra/newview/lllogchat.cpp | 6 ++-- indra/newview/lllogchat.h | 2 +- 4 files changed, 74 insertions(+), 17 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ff20a55358..c2a7969c0d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -55,6 +55,7 @@ #include "llfloaterchatterbox.h" #include "llimfloater.h" #include "llgroupiconctrl.h" +#include "llmd5.h" #include "llmutelist.h" #include "llrecentpeople.h" #include "llviewermessage.h" @@ -215,12 +216,14 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionID); } + buildHistoryFileName(); + if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) { std::list chat_history; //involves parsing of a chat history - LLLogChat::loadAllHistory(mName, chat_history); + LLLogChat::loadAllHistory(mHistoryFileName, chat_history); addMessagesFromHistory(chat_history); } } @@ -467,6 +470,44 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline() return !mOtherParticipantIsAvatar; } +void LLIMModel::LLIMSession::buildHistoryFileName() +{ + mHistoryFileName = mName; + + //ad-hoc requires sophisticated chat history saving schemes + if (isAdHoc()) + { + //in case of outgoing ad-hoc sessions + if (mInitialTargetIDs.size()) + { + std::set sorted_uuids(mInitialTargetIDs.begin(), mInitialTargetIDs.end()); + mHistoryFileName = mName + " hash" + generateHash(sorted_uuids); + return; + } + + //in case of incoming ad-hoc sessions + mHistoryFileName = mName + " " + LLLogChat::timestamp(true) + " " + mSessionID.asString().substr(0, 4); + } +} + +//static +std::string LLIMModel::LLIMSession::generateHash(const std::set& sorted_uuids) +{ + LLMD5 md5_uuid; + + std::set::const_iterator it = sorted_uuids.begin(); + while (it != sorted_uuids.end()) + { + md5_uuid.update((unsigned char*)(*it).mData, 16); + it++; + } + md5_uuid.finalize(); + + LLUUID participants_md5_hash; + md5_uuid.raw_digest((unsigned char*) participants_md5_hash.mData); + return participants_md5_hash.asString(); +} + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { @@ -614,11 +655,11 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, return true; } -bool LLIMModel::logToFile(const std::string& session_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) +bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) { - LLLogChat::saveHistory(session_name, from, from_id, utf8_text); + LLLogChat::saveHistory(file_name, from, from_id, utf8_text); return true; } else @@ -629,15 +670,7 @@ bool LLIMModel::logToFile(const std::string& session_name, const std::string& fr bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { - if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) - { - LLLogChat::saveHistory(LLIMModel::getInstance()->getName(session_id), from, from_id, utf8_text); - return true; - } - else - { - return false; - } + return logToFile(LLIMModel::getInstance()->getHistoryFileName(session_id), from, from_id, utf8_text); } bool LLIMModel::proccessOnlineOfflineNotification( @@ -782,6 +815,18 @@ LLIMSpeakerMgr* LLIMModel::getSpeakerManager( const LLUUID& session_id ) const return session->mSpeakers; } +const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const +{ + LLIMSession* session = findIMSession(session_id); + if (!session) + { + llwarns << "session " << session_id << " does not exist " << llendl; + return LLStringUtil::null; + } + + return session->mHistoryFileName; +} + // TODO get rid of other participant ID void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing) diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index a226d66b12..a3b4f78af0 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -69,6 +69,8 @@ public: void addMessagesFromHistory(const std::list& history); void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time); void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); + + /** @deprecated */ static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); bool isAdHoc(); @@ -80,12 +82,20 @@ public: bool isGroupSessionType() const { return mSessionType == GROUP_SESSION;} bool isAvalineSessionType() const { return mSessionType == AVALINE_SESSION;} + //*TODO make private + /** ad-hoc sessions involve sophisticated chat history file naming schemes */ + void buildHistoryFileName(); + + //*TODO make private + static std::string generateHash(const std::set& sorted_uuids); + LLUUID mSessionID; std::string mName; EInstantMessage mType; SType mSessionType; LLUUID mOtherParticipantID; std::vector mInitialTargetIDs; + std::string mHistoryFileName; // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; @@ -231,6 +241,8 @@ public: */ LLIMSpeakerMgr* getSpeakerManager(const LLUUID& session_id) const; + const std::string& getHistoryFileName(const LLUUID& session_id) const; + static void sendLeaveSession(const LLUUID& session_id, const LLUUID& other_participant_id); static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id, const std::vector& ids, EInstantMessage dialog); @@ -243,7 +255,7 @@ public: /** * Saves an IM message into a file */ - bool logToFile(const std::string& session_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text); + bool logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text); private: diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 4e5aaeb66a..dc187bf36c 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -237,15 +237,15 @@ void append_to_last_message(std::list& messages, const std::string& line) messages.back()[IM_TEXT] = im_text; } -void LLLogChat::loadAllHistory(const std::string& session_name, std::list& messages) +void LLLogChat::loadAllHistory(const std::string& file_name, std::list& messages) { - if (session_name.empty()) + if (file_name.empty()) { llwarns << "Session name is Empty!" << llendl; return ; } - LLFILE* fptr = LLFile::fopen(makeLogFileName(session_name), "r"); /*Flawfinder: ignore*/ + LLFILE* fptr = LLFile::fopen(makeLogFileName(file_name), "r"); /*Flawfinder: ignore*/ if (!fptr) return; //No previous conversation with this name. char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/ diff --git a/indra/newview/lllogchat.h b/indra/newview/lllogchat.h index 3d3f5c4458..4290e4bbc0 100644 --- a/indra/newview/lllogchat.h +++ b/indra/newview/lllogchat.h @@ -56,7 +56,7 @@ public: void (*callback)(ELogLineType, const LLSD&, void*), void* userdata); - static void loadAllHistory(const std::string& session_name, std::list& messages); + static void loadAllHistory(const std::string& file_name, std::list& messages); private: static std::string cleanFileName(std::string filename); }; -- cgit v1.2.3 From eaefaf7b33dba4326b0ef0e9b82edda2436ae581 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 22 Jan 2010 18:27:17 +0200 Subject: fixed low bug EXT-4594 Highlight landmark on right mouse click in the Favorites Bar --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/favorites_bar_button.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml index 6adf2a5950..b365040c20 100644 --- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml +++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml @@ -10,6 +10,8 @@ image_selected="transparent.j2c" image_unselected="transparent.j2c" image_pressed="Favorite_Link_Over" + image_hover_selected="Favorite_Link_Over" + image_hover_unselected="Favorite_Link_Over" hover_glow_amount="0.15" label_shadow="false" layout="topleft" -- cgit v1.2.3 From 1bcf723a3b6427a913729e02c62108e0e06e1f23 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 22 Jan 2010 17:54:13 +0200 Subject: Fixed low bug EXT-4306 - Landmark name is shown with prefix in the group notice attachment. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7487fa9997..0358efc0af 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1472,7 +1472,12 @@ void inventory_offer_handler(LLOfferInfo* info) { LLStringUtil::truncate(msg, indx); } - + + if(LLAssetType::AT_LANDMARK == info->mType) + { + msg = LLViewerInventoryItem::getDisplayName(msg); + } + LLSD args; args["[OBJECTNAME]"] = msg; -- cgit v1.2.3 From ff852efdd21b814868c51411989c69fcdaa1eca1 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 22 Jan 2010 18:42:16 +0200 Subject: Fixed normal bug EXT-4497 - Edit Profile and Edit Appearance buttons layout issue in side panel. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_my_profile.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index 34cde61252..4894ae01da 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -1,7 +1,7 @@ @@ -384,7 +385,9 @@ height="23" label="Edit Appearance" left_pad="10" + layout="topleft" name="edit_appearance_btn" + top="5" tool_tip="Create/edit your appearance: physical data, clothes and etc." width="130" /> -- cgit v1.2.3 From 189329853b8d50da53f34dfa1cf42f49cc02df77 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 22 Jan 2010 20:08:09 +0200 Subject: Fixed bug EXT-4582 ([BSI] "Report" from avatar inspector does not auto-populate "Abuser name" when Resident is not nearby). Added method LLFloaterReporter::showFromAvatar() to use for remote avatars. --HG-- branch : product-engine --- indra/newview/llfloaterreporter.cpp | 43 ++++++++++++++++++++++++++----------- indra/newview/llfloaterreporter.h | 4 ++++ indra/newview/llinspectavatar.cpp | 2 +- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index e0f2fca580..2efae0c8db 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -277,13 +277,8 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) { object_owner.append("Unknown"); } - childSetText("object_name", object_owner); - std::string owner_link = - LLSLURL::buildCommand("agent", mObjectID, "inspect"); - childSetText("owner_name", owner_link); - childSetText("abuser_name_edit", object_owner); - mAbuserID = object_id; - mOwnerName = object_owner; + + setFromAvatar(object_id, object_owner); } else { @@ -305,7 +300,6 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) } } - void LLFloaterReporter::onClickSelectAbuser() { gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE )); @@ -323,6 +317,17 @@ void LLFloaterReporter::callbackAvatarID(const std::vector& names, } +void LLFloaterReporter::setFromAvatar(const LLUUID& avatar_id, const std::string& avatar_name) +{ + mAbuserID = mObjectID = avatar_id; + mOwnerName = avatar_name; + + std::string avatar_link = LLSLURL::buildCommand("agent", mObjectID, "inspect"); + childSetText("owner_name", avatar_link); + childSetText("object_name", avatar_name); // name + childSetText("abuser_name_edit", avatar_name); +} + // static void LLFloaterReporter::onClickSend(void *userdata) { @@ -458,9 +463,8 @@ void LLFloaterReporter::showFromMenu(EReportType report_type) } } - // static -void LLFloaterReporter::showFromObject(const LLUUID& object_id) +void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_name) { LLFloaterReporter* f = LLFloaterReg::showTypedInstance("reporter"); @@ -469,8 +473,11 @@ void LLFloaterReporter::showFromObject(const LLUUID& object_id) LLAgentUI::buildFullname(fullname); f->childSetText("reporter_field", fullname); - // Request info for this object - f->getObjectInfo(object_id); + if (avatar_name.empty()) + // Request info for this object + f->getObjectInfo(object_id); + else + f->setFromAvatar(object_id, avatar_name); // Need to deselect on close f->mDeselectOnClose = TRUE; @@ -479,6 +486,18 @@ void LLFloaterReporter::showFromObject(const LLUUID& object_id) } +// static +void LLFloaterReporter::showFromObject(const LLUUID& object_id) +{ + show(object_id); +} + +// static +void LLFloaterReporter::showFromAvatar(const LLUUID& avatar_id, const std::string avatar_name) +{ + show(avatar_id, avatar_name); +} + void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id) { childSetText("object_name", object_name); diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index cc2dfb2f98..7c6473f975 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -93,6 +93,7 @@ public: static void showFromMenu(EReportType report_type); static void showFromObject(const LLUUID& object_id); + static void showFromAvatar(const LLUUID& avatar_id, const std::string avatar_name); static void onClickSend (void *userdata); static void onClickCancel (void *userdata); @@ -109,6 +110,8 @@ public: void setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id); private: + static void show(const LLUUID& object_id, const std::string& avatar_name = LLStringUtil::null); + void takeScreenshot(); void sendReportViaCaps(std::string url); void uploadImage(); @@ -121,6 +124,7 @@ private: void enableControls(BOOL own_avatar); void getObjectInfo(const LLUUID& object_id); void callbackAvatarID(const std::vector& names, const std::vector& ids); + void setFromAvatar(const LLUUID& avatar_id, const std::string& avatar_name = LLStringUtil::null); private: EReportType mReportType; diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 0374a1d25b..4b0539337b 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -689,7 +689,7 @@ void LLInspectAvatar::onToggleMute() void LLInspectAvatar::onClickReport() { - LLFloaterReporter::showFromObject(mAvatarID); + LLFloaterReporter::showFromAvatar(mAvatarID, mAvatarName); closeFloater(); } -- cgit v1.2.3 From 16b1af72b2c5f723a84f37b9278ff3f2bdc17e7d Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 22 Jan 2010 20:02:10 +0200 Subject: Fixed (EXT-4589) 'About Land' floater loose information after user quit Place Profile - Fixed Places panel not to remove parcel selection when it is used by "About Land" floater. --HG-- branch : product-engine --- indra/newview/llpanelplaceinfo.cpp | 19 ----- indra/newview/llpanelplaceinfo.h | 1 - indra/newview/llpanelplaceprofile.cpp | 19 +++++ indra/newview/llpanelplaceprofile.h | 2 + indra/newview/llpanelplaces.cpp | 154 ++++++++++++++++++++-------------- indra/newview/llpanelplaces.h | 2 + 6 files changed, 114 insertions(+), 83 deletions(-) diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index b80eb9db38..3121aca05f 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -265,25 +265,6 @@ void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) } } -// virtual -void LLPanelPlaceInfo::handleVisibilityChange(BOOL new_visibility) -{ - LLPanel::handleVisibilityChange(new_visibility); - - LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); - if (!parcel_mgr) - return; - - // Remove land selection when panel hides. - if (!new_visibility) - { - if (!parcel_mgr->selectionEmpty()) - { - parcel_mgr->deselectLand(); - } - } -} - void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel) { std::string region_name = mRegionName->getText(); diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 7dfc7b2444..3091f7ed24 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -94,7 +94,6 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - /*virtual*/ void handleVisibilityChange (BOOL new_visibility); // Create a pick for the location specified // by global_pos. diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 402d50ba9c..d892e2885b 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -257,6 +257,25 @@ void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data) } } +// virtual +void LLPanelPlaceProfile::handleVisibilityChange(BOOL new_visibility) +{ + LLPanel::handleVisibilityChange(new_visibility); + + LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); + if (!parcel_mgr) + return; + + // Remove land selection when panel hides. + if (!new_visibility) + { + if (!parcel_mgr->selectionEmpty()) + { + parcel_mgr->deselectUnused(); + } + } +} + void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, LLViewerRegion* region, const LLVector3d& pos_global, diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 8c30ca92fb..8ca9526875 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -52,6 +52,8 @@ public: /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); + /*virtual*/ void handleVisibilityChange(BOOL new_visibility); + // Displays information about the currently selected parcel // without sending a request to the server. // If is_current_parcel true shows "You Are Here" banner. diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index b037674c37..306e08e7ec 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -289,89 +289,92 @@ BOOL LLPanelPlaces::postBuild() void LLPanelPlaces::onOpen(const LLSD& key) { - if(!mPlaceProfile || !mLandmarkInfo || key.size() == 0) + if (!mPlaceProfile || !mLandmarkInfo) return; - mFilterEditor->clear(); - onFilterEdit("", false); - - mPlaceInfoType = key["type"].asString(); - mPosGlobal.setZero(); - mItem = NULL; - isLandmarkEditModeOn = false; - togglePlaceInfoPanel(TRUE); - - if (mPlaceInfoType == AGENT_INFO_TYPE) - { - mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT); - } - else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) + if (key.size() != 0) { - mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); + mFilterEditor->clear(); + onFilterEdit("", false); - if (key.has("x") && key.has("y") && key.has("z")) + mPlaceInfoType = key["type"].asString(); + mPosGlobal.setZero(); + mItem = NULL; + isLandmarkEditModeOn = false; + togglePlaceInfoPanel(TRUE); + + if (mPlaceInfoType == AGENT_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); + mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT); } - else + else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) { - mPosGlobal = gAgent.getPositionGlobal(); - } - - mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); - // Disable Save button because there is no item to save yet. - // The button will be enabled in onLandmarkLoaded callback. - mSaveBtn->setEnabled(FALSE); - } - else if (mPlaceInfoType == LANDMARK_INFO_TYPE) - { - mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); + if (key.has("x") && key.has("y") && key.has("z")) + { + mPosGlobal = LLVector3d(key["x"].asReal(), + key["y"].asReal(), + key["z"].asReal()); + } + else + { + mPosGlobal = gAgent.getPositionGlobal(); + } - LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); - if (!item) - return; + mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); - setItem(item); - } - else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) - { - if (key.has("id")) + // Disable Save button because there is no item to save yet. + // The button will be enabled in onLandmarkLoaded callback. + mSaveBtn->setEnabled(FALSE); + } + else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { - LLUUID parcel_id = key["id"].asUUID(); - mPlaceProfile->setParcelID(parcel_id); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); - // query the server to get the global 3D position of this - // parcel - we need this for teleport/mapping functions. - mRemoteParcelObserver->setParcelID(parcel_id); + LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); + if (!item) + return; + + setItem(item); } - else + else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + if (key.has("id")) + { + LLUUID parcel_id = key["id"].asUUID(); + mPlaceProfile->setParcelID(parcel_id); + + // query the server to get the global 3D position of this + // parcel - we need this for teleport/mapping functions. + mRemoteParcelObserver->setParcelID(parcel_id); + } + else + { + mPosGlobal = LLVector3d(key["x"].asReal(), + key["y"].asReal(), + key["z"].asReal()); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + } + + mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); } + else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) + { + S32 index = key["id"].asInteger(); - mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); - } - else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) - { - S32 index = key["id"].asInteger(); + const LLTeleportHistoryStorage::slurl_list_t& hist_items = + LLTeleportHistoryStorage::getInstance()->getItems(); - const LLTeleportHistoryStorage::slurl_list_t& hist_items = - LLTeleportHistoryStorage::getInstance()->getItems(); + mPosGlobal = hist_items[index].mGlobalPos; - mPosGlobal = hist_items[index].mGlobalPos; + mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + } - mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + updateVerbs(); } - updateVerbs(); - LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); if (!parcel_mgr) return; @@ -388,9 +391,12 @@ void LLPanelPlaces::onOpen(const LLSD& key) { parcel_mgr->removeObserver(mParcelObserver); + // Clear the reference to selection to allow its removal in deselectUnused(). + mParcel.clear(); + if (!parcel_mgr->selectionEmpty()) { - parcel_mgr->deselectLand(); + parcel_mgr->deselectUnused(); } } } @@ -826,6 +832,14 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) mLandmarkInfo->setVisible(FALSE); } + else if (mPlaceInfoType == AGENT_INFO_TYPE) + { + LLViewerParcelMgr::getInstance()->removeObserver(mParcelObserver); + + // Clear reference to parcel selection when closing place profile panel. + // LLViewerParcelMgr removes the selection if it has 1 reference to it. + mParcel.clear(); + } } else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE || mPlaceInfoType == LANDMARK_INFO_TYPE) @@ -858,6 +872,20 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) } } +// virtual +void LLPanelPlaces::handleVisibilityChange(BOOL new_visibility) +{ + LLPanel::handleVisibilityChange(new_visibility); + + if (!new_visibility && mPlaceInfoType == AGENT_INFO_TYPE) + { + LLViewerParcelMgr::getInstance()->removeObserver(mParcelObserver); + + // Clear reference to parcel selection when closing places panel. + mParcel.clear(); + } +} + void LLPanelPlaces::changedParcelSelection() { if (!mPlaceProfile) diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 27b5911ebb..0eba7f3afc 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -97,6 +97,8 @@ private: void togglePickPanel(BOOL visible); void togglePlaceInfoPanel(BOOL visible); + /*virtual*/ void handleVisibilityChange(BOOL new_visibility); + void updateVerbs(); LLPanelPlaceInfo* getCurrentInfoPanel(); -- cgit v1.2.3 From 09e9cdeb2e7e979ea1d4898fa7c2d40e8ebc52b2 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 22 Jan 2010 20:20:11 +0200 Subject: No ticket, Includes cleanup. Spaces cleanup. --HG-- branch : product-engine --- indra/newview/llpanelplaceinfo.cpp | 8 +------- indra/newview/llpanelplaces.cpp | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 3121aca05f..0c10f11bfc 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -34,26 +34,20 @@ #include "llpanelplaceinfo.h" -#include "roles_constants.h" #include "llsdutil.h" -#include "llsecondlifeurls.h" #include "llsdutil_math.h" + #include "llregionhandle.h" -#include "message.h" #include "lliconctrl.h" #include "lltextbox.h" #include "llagent.h" -#include "llavatarpropertiesprocessor.h" #include "llexpandabletextbox.h" #include "llpanelpick.h" #include "lltexturectrl.h" -#include "llviewerinventory.h" -#include "llviewerparcelmgr.h" #include "llviewerregion.h" -#include "llviewertexteditor.h" LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 306e08e7ec..a4f0e55a93 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -771,23 +771,23 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) mPickPanel->reshape(rect.getWidth(), rect.getHeight()); mPickPanel->setRect(rect); } - else if (item == "add_to_favbar") - { - if ( mItem.notNull() ) - { - const LLUUID& favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - if ( favorites_id.notNull() ) - { - copy_inventory_item(gAgent.getID(), - mItem->getPermissions().getOwner(), - mItem->getUUID(), - favorites_id, - std::string(), - LLPointer(NULL)); - llinfos << "Copied inventory item #" << mItem->getUUID() << " to favorites." << llendl; - } - } - } + else if (item == "add_to_favbar") + { + if ( mItem.notNull() ) + { + const LLUUID& favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + if ( favorites_id.notNull() ) + { + copy_inventory_item(gAgent.getID(), + mItem->getPermissions().getOwner(), + mItem->getUUID(), + favorites_id, + std::string(), + LLPointer(NULL)); + llinfos << "Copied inventory item #" << mItem->getUUID() << " to favorites." << llendl; + } + } + } } void LLPanelPlaces::onBackButtonClicked() -- cgit v1.2.3 From 8cf95e16830521d5aa9467b1f4d84e4d1343bd31 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 22 Jan 2010 20:27:58 +0200 Subject: Fixed normal bug EXT-4486(nearby voice list not aligned correctly): Corrected indent of my_panel content. Changed the order of buttons of avatar list item, notice that it affects all avatar lists(on people panel, group chat participants, etc). --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 12 +++++----- indra/newview/llavatarlistitem.h | 2 +- .../default/xui/en/floater_voice_controls.xml | 3 ++- .../default/xui/en/panel_avatar_list_item.xml | 28 ++++++++++++---------- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 66ab32f3e8..2bcd097717 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -440,17 +440,17 @@ LLAvatarListItem::icon_color_map_t& LLAvatarListItem::getItemIconColorMap() // static void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item) { + //speaking indicator width + padding + S32 speaking_indicator_width = avatar_item->getRect().getWidth() - avatar_item->mSpeakingIndicator->getRect().mLeft; + //profile btn width + padding - S32 profile_btn_width = avatar_item->getRect().getWidth() - avatar_item->mProfileBtn->getRect().mLeft; + S32 profile_btn_width = avatar_item->mSpeakingIndicator->getRect().mLeft - avatar_item->mProfileBtn->getRect().mLeft; //info btn width + padding S32 info_btn_width = avatar_item->mProfileBtn->getRect().mLeft - avatar_item->mInfoBtn->getRect().mLeft; - //speaking indicator width + padding - S32 speaking_indicator_width = avatar_item->mInfoBtn->getRect().mLeft - avatar_item->mSpeakingIndicator->getRect().mLeft; - // last interaction time textbox width + padding - S32 last_interaction_time_width = avatar_item->mSpeakingIndicator->getRect().mLeft - avatar_item->mLastInteractionTime->getRect().mLeft; + S32 last_interaction_time_width = avatar_item->mInfoBtn->getRect().mLeft - avatar_item->mLastInteractionTime->getRect().mLeft; // icon width + padding S32 icon_width = avatar_item->mAvatarName->getRect().mLeft - avatar_item->mAvatarIcon->getRect().mLeft; @@ -462,9 +462,9 @@ void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item) sChildrenWidths[--index] = icon_width; sChildrenWidths[--index] = 0; // for avatar name we don't need its width, it will be calculated as "left available space" sChildrenWidths[--index] = last_interaction_time_width; - sChildrenWidths[--index] = speaking_indicator_width; sChildrenWidths[--index] = info_btn_width; sChildrenWidths[--index] = profile_btn_width; + sChildrenWidths[--index] = speaking_indicator_width; } void LLAvatarListItem::updateChildren() diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 479a4833cb..61c0a8660e 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -129,9 +129,9 @@ private: * @see updateChildren() */ typedef enum e_avatar_item_child { + ALIC_SPEAKER_INDICATOR, ALIC_PROFILE_BUTTON, ALIC_INFO_BUTTON, - ALIC_SPEAKER_INDICATOR, ALIC_INTERACTION_TIME, ALIC_NAME, ALIC_ICON, diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index f473a51ff6..c4411db8c5 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -56,7 +56,7 @@ height="18" default_icon_name="Generic_Person" layout="topleft" - left="0" + left="5" name="user_icon" top="0" width="18" /> @@ -78,6 +78,7 @@ follows="top|right" height="16" layout="topleft" + right="-3" name="speaking_indicator" left_pad="5" visible="true" diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index 615ade99a2..c605975c8e 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -65,28 +65,18 @@ height="15" layout="topleft" left_pad="5" + right="-72" name="last_interaction" text_color="LtGray_50" value="0s" width="24" /> -