From c0d189a3d1496da697b1b9878cf00de28f8df77d Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 6 Jan 2010 15:12:09 +0200 Subject: fix for low EXT-2742 Invalid menu appearance after hiding navigation bar and/or favorites bar actually that was designed behavior. --HG-- branch : product-engine --- indra/llui/llmenugl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 2648cbf08d..abcc0010c0 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2959,7 +2959,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) LLUI::getMousePositionLocal(menu->getParent(), &mouse_x, &mouse_y); LLMenuHolderGL::sContextMenuSpawnPos.set(mouse_x,mouse_y); - const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getMenuRect(); + const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getRect(); const S32 HPAD = 2; LLRect rect = menu->getRect(); -- cgit v1.2.3 From fc785febb332442533c20b638132b8ab378732a9 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 6 Jan 2010 17:13:12 +0200 Subject: Fixed normal bug EXT-3944 ('Error while moderating' dialog after disabling voice for non-connected participant avatar from miniinspector) - improved condition to check if avatar can be moderated. - if not moderation panel (with "Disable Voice" button) is not shown at all. --HG-- branch : product-engine --- indra/newview/llinspectavatar.cpp | 1 + indra/newview/llparticipantlist.cpp | 3 +-- indra/newview/llspeakers.cpp | 5 +++++ indra/newview/llspeakers.h | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 7f206cb873..72b36374dd 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -402,6 +402,7 @@ void LLInspectAvatar::updateModeratorPanel() LLPointer selected_speakerp = speaker_mgr->findSpeaker(mAvatarID); if(speaker_mgr->isVoiceActive() && selected_speakerp && + selected_speakerp->isInVoiceChannel() && ((self_speakerp && self_speakerp->mIsModerator) || gAgent.isGodlike())) { getChild("enable_voice")->setVisible(selected_speakerp->mModeratorMutedVoice); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index e2da4c4475..362454ee3c 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -592,8 +592,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& if (speakerp.notNull()) { // not in voice participants can not be moderated - return speakerp->mStatus == LLSpeaker::STATUS_VOICE_ACTIVE - || speakerp->mStatus == LLSpeaker::STATUS_MUTED; + return speakerp->isInVoiceChannel(); } } return false; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 010dfd1b33..0dd9203c6d 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -88,6 +88,11 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const std::string& first, c mDisplayName = first + " " + last; } +bool LLSpeaker::isInVoiceChannel() +{ + return mStatus == LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; +} + LLSpeakerUpdateModeratorEvent::LLSpeakerUpdateModeratorEvent(LLSpeaker* source) : LLEvent(source, "Speaker add moderator event"), mSpeakerID (source->mID), diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 1a8c23f56a..da8dfdf548 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -67,6 +67,8 @@ public: void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); + bool isInVoiceChannel(); + ESpeakerStatus mStatus; // current activity status in speech group F32 mLastSpokeTime; // timestamp when this speaker last spoke F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) -- cgit v1.2.3 From 4f1d776da73df732f1c43c63f68917214bda7806 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 6 Jan 2010 17:18:01 +0200 Subject: fix for major EXT-3999 (nobody) appears in the Recent tab after receiving system notification --HG-- branch : product-engine --- indra/newview/llimview.cpp | 10 ++++++---- indra/newview/llimview.h | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index daabf1f717..87b2793f9f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -382,10 +382,6 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& f mSpeakers->speakerChatted(from_id); mSpeakers->setSpeakerTyping(from_id, FALSE); } - - if( mSessionType == P2P_SESSION || - mSessionType == ADHOC_SESSION) - LLRecentPeople::instance().add(from_id); } void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list& history) @@ -684,6 +680,12 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); if (!session) return false; + //good place to add some1 to recent list + //other places may be called from message history. + if( !from_id.isNull() && + ( session->isP2PSessionType() || session->isAdHocSessionType() ) ) + LLRecentPeople::instance().add(from_id); + // notify listeners LLSD arg; arg["session_id"] = session_id; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 20d8e28392..e72bda6c2b 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -78,6 +78,11 @@ public: bool isP2P(); bool isOtherParticipantAvaline(); + bool isP2PSessionType() const { return mSessionType == P2P_SESSION;} + bool isAdHocSessionType() const { return mSessionType == ADHOC_SESSION;} + bool isGroupSessionType() const { return mSessionType == GROUP_SESSION;} + bool isAvalineSessionType() const { return mSessionType == AVALINE_SESSION;} + LLUUID mSessionID; std::string mName; EInstantMessage mType; -- cgit v1.2.3 From 6ee29d8c2a2b7a47f62d7a391106084e704cd544 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 6 Jan 2010 17:22:25 +0200 Subject: work on EXT-3842 People / Recent shows residents who have not spoken or sent IM --HG-- branch : product-engine --- indra/newview/llfloaterchat.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index b9e0f928f1..8f91424f59 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -311,8 +311,10 @@ void LLFloaterChat::addChat(const LLChat& chat, BOOL from_instant_message, BOOL triggerAlerts(chat.mText); // Add the sender to the list of people with which we've recently interacted. - if(chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID.notNull()) - LLRecentPeople::instance().add(chat.mFromID); + // this is not the best place to add _all_ messages to recent list + // comment this for now, may remove later on code cleanup + //if(chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID.notNull()) + // LLRecentPeople::instance().add(chat.mFromID); bool add_chat = true; bool log_chat = true; -- cgit v1.2.3 From dff5b2f6ec027516a9c429b16af1f9fdc1c5bad8 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 6 Jan 2010 17:39:50 +0200 Subject: Decreased group/ad-hoc IM control panel width to 150 pixels (EXT-3790). --HG-- branch : product-engine --- .../default/xui/en/panel_adhoc_control_panel.xml | 17 +++++++++-------- .../default/xui/en/panel_group_control_panel.xml | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index 6c54532a3a..28a6995186 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -4,7 +4,7 @@ follows="all" height="215" name="panel_im_control_panel" - width="180"> + width="150"> + width="147"> @@ -39,7 +40,7 @@ show_info_btn="false" show_profile_btn="false" show_speaking_indicator="false" - width="180" /> + width="147" /> @@ -56,7 +57,7 @@ height="20" label="Call" name="call_btn" - width="160" + width="130" top="5" /> @@ -82,7 +83,7 @@ height="25" layout="topleft" min_height="25" - width="160" + width="130" name="voice_ctrls_btn_panel" user_resize="false" visible="false"> diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index 4073ef158b..aa7d621e4c 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -4,7 +4,7 @@ follows="all" height="238" name="panel_im_control_panel" - width="180"> + width="150"> + width="145"> @@ -39,7 +39,7 @@ show_info_btn="false" show_profile_btn="false" show_speaking_indicator="false" - width="180" /> + width="145" /> Proxy location - + + + -- cgit v1.2.3 From 9ffaacc47e8d6d48158adb1b99728c876a6da2ee Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 8 Jan 2010 17:26:47 -0800 Subject: First pass expose inventory item settings in XML (folder_view_item.xml) Optimized LLFolderViewItem constructor by passing param block as const ref to avoid copies. Removed per-item arrow and background images, use defaults. Removed unneeded static image pointers. Removed hard-coded rounded_square.tga, replaced with Rounded_Square Ditto for folder_arrow.tga Reviewed with Richard. --- indra/llui/llconsole.cpp | 2 +- indra/llui/llmultislider.cpp | 2 +- indra/llui/llscrolllistcell.cpp | 2 +- indra/newview/app_settings/settings.xml | 11 ---- indra/newview/llfasttimerview.cpp | 2 +- indra/newview/llfolderview.cpp | 10 +-- indra/newview/llfolderviewitem.cpp | 73 +++++++++++----------- indra/newview/llfolderviewitem.h | 14 ++--- indra/newview/llhudtext.cpp | 2 +- indra/newview/llmanip.cpp | 2 +- indra/newview/skins/default/textures/textures.xml | 3 +- .../default/xui/en/panel_preferences_graphics1.xml | 8 +-- .../skins/default/xui/en/panel_progress.xml | 2 +- .../default/xui/en/widgets/folder_view_item.xml | 8 +++ 14 files changed, 71 insertions(+), 70 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/widgets/folder_view_item.xml (limited to 'indra') diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index e08d93b232..59499f987b 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -180,7 +180,7 @@ void LLConsole::draw() // draw remaining lines F32 y_pos = 0.f; - LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); // F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index aea7c5f87c..27a727fdf5 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -490,7 +490,7 @@ void LLMultiSlider::draw() F32 opacity = getEnabled() ? 1.f : 0.3f; // Track - LLUIImagePtr thumb_imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr thumb_imagep = LLUI::getUIImage("Rounded_Square"); static LLUICachedControl multi_track_height ("UIMultiTrackHeight", 0); S32 height_offset = (getRect().getHeight() - multi_track_height) / 2; diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index 7238d903a3..3cc92baa8d 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -188,7 +188,7 @@ LLScrollListText::LLScrollListText(const LLScrollListCell::Params& p) // initialize rounded rect image if (!mRoundedRectImage) { - mRoundedRectImage = LLUI::getUIImage("rounded_square.tga"); + mRoundedRectImage = LLUI::getUIImage("Rounded_Square"); } } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7d98a4b6ce..382793a497 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3257,17 +3257,6 @@ Value 0.75 - FolderIndentation - - Comment - Number of pixels to indent subfolders in inventory - Persist - 1 - Type - S32 - Value - 8 - FolderLoadingMessageWaitTime Comment diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 7d8bb6e104..4fa97e789b 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -314,7 +314,7 @@ void LLFastTimerView::draw() S32 left, top, right, bottom; S32 x, y, barw, barh, dx, dy; S32 texth, textw; - LLPointer box_imagep = LLUI::getUIImage("rounded_square.tga"); + LLPointer box_imagep = LLUI::getUIImage("Rounded_Square"); // Draw the window background gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 41f4d1a663..1ab111a41d 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -206,7 +206,9 @@ LLFolderView::LLFolderView(const Params& p) mAutoOpenCandidate = NULL; mAutoOpenTimer.stop(); mKeyboardSelection = FALSE; - static LLUICachedControl indentation("FolderIndentation", 0); + const LLFolderViewItem::Params& item_params = + LLUICtrlFactory::getDefaultParams(); + S32 indentation = item_params.folder_indentation(); mIndentation = -indentation; // children start at indentation 0 gIdleCallbacks.addFunction(idle, this); @@ -395,7 +397,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen getRoot()->getFilter()->getShowFolderState(); S32 total_width = LEFT_PAD; - S32 running_height = mDebugFilters ? llceil(sSmallFont->getLineHeight()) : 0; + S32 running_height = mDebugFilters ? llceil(LLFontGL::getFontMonospace()->getLineHeight()) : 0; S32 target_height = running_height; S32 parent_item_height = getRect().getHeight(); @@ -866,8 +868,8 @@ void LLFolderView::draw() { std::string current_filter_string = llformat("Current Filter: %d, Least Filter: %d, Auto-accept Filter: %d", mFilter->getCurrentGeneration(), mFilter->getMinRequiredGeneration(), mFilter->getMustPassGeneration()); - sSmallFont->renderUTF8(current_filter_string, 0, 2, - getRect().getHeight() - sSmallFont->getLineHeight(), LLColor4(0.5f, 0.5f, 0.8f, 1.f), + LLFontGL::getFontMonospace()->renderUTF8(current_filter_string, 0, 2, + getRect().getHeight() - LLFontGL::getFontMonospace()->getLineHeight(), LLColor4(0.5f, 0.5f, 0.8f, 1.f), LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 9d54aafd67..41ceb5972e 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -51,11 +51,10 @@ /// Class LLFolderViewItem ///---------------------------------------------------------------------------- +static LLDefaultChildRegistry::Register r("folder_view_item"); + // statics std::map LLFolderViewItem::sFonts; // map of styles to fonts -const LLFontGL* LLFolderViewItem::sSmallFont = NULL; -LLUIImagePtr LLFolderViewItem::sArrowImage; -LLUIImagePtr LLFolderViewItem::sBoxImage; // only integers can be initialized in header const F32 LLFolderViewItem::FOLDER_CLOSE_TIME_CONSTANT = 0.02f; @@ -84,33 +83,34 @@ LLFontGL* LLFolderViewItem::getLabelFontForStyle(U8 style) //static void LLFolderViewItem::initClass() { - sSmallFont = LLFontGL::getFontMonospace(); - sArrowImage = LLUI::getUIImage("folder_arrow.tga"); - sBoxImage = LLUI::getUIImage("rounded_square.tga"); } //static void LLFolderViewItem::cleanupClass() { sFonts.clear(); - sArrowImage = NULL; - sBoxImage = NULL; } // NOTE: Optimize this, we call it a *lot* when opening a large inventory LLFolderViewItem::Params::Params() -: icon("icon"), - folder_arrow_image("folder_arrow_image", LLUI::getUIImage("folder_arrow.tga")), - selection_image("selection_image", LLUI::getUIImage("rounded_square.tga")) +: icon(), + icon_open(), + root(), + listener(), + folder_arrow_image("folder_arrow_image"), + folder_indentation("folder_indentation"), + selection_image("selection_image"), + font("font"), + item_height("item_height"), + creation_date() { mouse_opaque(true); follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT); - // JAMESDEBUG tab_stop(false); } // Default constructor -LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) +LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) : LLView(p), mLabelWidth(0), mLabelWidthDirty(false), @@ -121,6 +121,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mLabelStyle( LLFontGL::NORMAL ), mHasVisibleChildren(FALSE), mIndentation(0), + mItemHeight(p.item_height), mNumDescendantsSelected(0), mPassedFilter(FALSE), mLastFilterGeneration(-1), @@ -134,8 +135,6 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mIcon(p.icon), mIconOpen(p.icon_open), mListener(p.listener), - mArrowImage(p.folder_arrow_image), - mBoxImage(p.selection_image), mHidden(false), mShowLoadStatus(false) { @@ -392,10 +391,11 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo // makes sure that this view and it's children are the right size. S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) { - static LLUICachedControl indentation("FolderIndentation", 0); + const Params& p = LLUICtrlFactory::getDefaultParams(); + S32 indentation = p.folder_indentation(); + // Only indent deeper items in hierarchy mIndentation = (getParentFolder() - && getParentFolder()->getParentFolder() - && getParentFolder()->getParentFolder()->getParentFolder()) + && getParentFolder()->getParentFolder() ) ? mParentFolder->getIndentation() + indentation : 0; if (mLabelWidthDirty) @@ -421,9 +421,10 @@ S32 LLFolderViewItem::getItemHeight() { if (mHidden) return 0; - S32 icon_height = mIcon->getHeight(); - S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); - return llmax( icon_height, label_height ) + ICON_PAD; + //S32 icon_height = mIcon->getHeight(); + //S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); + //return llmax( icon_height, label_height ) + ICON_PAD; + return mItemHeight; } void LLFolderViewItem::filter( LLInventoryFilter& filter) @@ -834,6 +835,8 @@ void LLFolderViewItem::draw() static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemSuffixColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); + const Params& default_params = LLUICtrlFactory::getDefaultParams(); + bool possibly_has_children = false; bool up_to_date = mListener && mListener->isUpToDate(); if((up_to_date && hasVisibleChildren() ) || // we fetched our children and some of them have passed the filter... @@ -843,11 +846,9 @@ void LLFolderViewItem::draw() } if(/*mControlLabel[0] != '\0' && */possibly_has_children) { - if (sArrowImage) - { - gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD, - ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, sArrowImage->getImage(), sFgColor); - } + LLUIImage* arrow_image = default_params.folder_arrow_image; + gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD, + ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor); } F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); @@ -885,7 +886,7 @@ void LLFolderViewItem::draw() 0, getRect().getHeight(), getRect().getWidth() - 2, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD), + llfloor(getRect().getHeight() - mItemHeight), bg_color, filled); if (mIsCurSelection) { @@ -893,14 +894,14 @@ void LLFolderViewItem::draw() 0, getRect().getHeight(), getRect().getWidth() - 2, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD), + llfloor(getRect().getHeight() - mItemHeight), sHighlightFgColor, FALSE); } - if (getRect().getHeight() > llround(font->getLineHeight()) + ICON_PAD + 4) + if (getRect().getHeight() > mItemHeight + 4) { gl_rect_2d( 0, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 4, + llfloor(getRect().getHeight() - mItemHeight) - 4, getRect().getWidth() - 2, 2, sHighlightFgColor, FALSE); @@ -908,7 +909,7 @@ void LLFolderViewItem::draw() { gl_rect_2d( 0, - llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 4, + llfloor(getRect().getHeight() - mItemHeight) - 4, getRect().getWidth() - 2, 2, sHighlightBgColor, TRUE); @@ -963,7 +964,8 @@ void LLFolderViewItem::draw() } LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? LLColor4(0.5f, 0.8f, 0.5f, 1.f) : LLColor4(0.8f, 0.5f, 0.5f, 1.f); - sSmallFont->renderUTF8(mStatusText, 0, text_left, y, filter_color, + LLFontGL::getFontMonospace()->renderUTF8( + mStatusText, 0, text_left, y, filter_color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE ); text_left = right_x; @@ -1004,7 +1006,7 @@ void LLFolderViewItem::draw() S32_MAX, S32_MAX, &right_x, FALSE ); } - if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos) + if (mStringMatchOffset != std::string::npos) { // don't draw backgrounds for zero-length strings S32 filter_string_length = getRoot()->getFilterSubString().size(); @@ -1015,9 +1017,10 @@ void LLFolderViewItem::draw() S32 right = left + font->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2; S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3); S32 top = getRect().getHeight(); - + + LLUIImage* box_image = default_params.selection_image; LLRect box_rect(left, top, right, bottom); - sBoxImage->draw(box_rect, sFilterBGColor); + box_image->draw(box_rect, sFilterBGColor); F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mStringMatchOffset); F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD; font->renderUTF8( combined_string, mStringMatchOffset, match_string_left, y, diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 6f8c738a59..9e35f75c96 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -101,7 +101,10 @@ public: Optional listener; Optional folder_arrow_image; + Optional folder_indentation; // pixels Optional selection_image; + Optional font; + Optional item_height; // pixels Optional creation_date; //UTC seconds @@ -110,7 +113,7 @@ public: // layout constants static const S32 LEFT_PAD = 5; - // LEFT_INDENTATION is set via settings.xml FolderIndentation + // LEFT_INDENTATION is set via folder_indentation above static const S32 ICON_PAD = 2; static const S32 ICON_WIDTH = 16; static const S32 TEXT_PAD = 1; @@ -127,11 +130,7 @@ protected: friend class LLUICtrlFactory; friend class LLFolderViewEventListener; - LLFolderViewItem(Params p = LLFolderViewItem::Params()); - - static const LLFontGL* sSmallFont; - static LLUIImagePtr sArrowImage; - static LLUIImagePtr sBoxImage; + LLFolderViewItem(const Params& p); std::string mLabel; std::string mSearchableLabel; @@ -150,6 +149,7 @@ protected: LLUIImagePtr mIconOpen; BOOL mHasVisibleChildren; S32 mIndentation; + S32 mItemHeight; S32 mNumDescendantsSelected; BOOL mPassedFilter; S32 mLastFilterGeneration; @@ -157,8 +157,6 @@ protected: F32 mControlLabelRotation; LLFolderView* mRoot; BOOL mDragAndDropTarget; - LLUIImagePtr mArrowImage; - LLUIImagePtr mBoxImage; BOOL mIsLoading; LLTimer mTimeSinceRequestStart; bool mHidden; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 08cf86df4a..8ad94b957d 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -287,7 +287,7 @@ void LLHUDText::renderText(BOOL for_select) mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); // *TODO: cache this image - LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); // *TODO: make this a per-text setting LLColor4 bg_color = LLUIColorTable::instance().getColor("BackgroundChatColor"); diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index f30821cacf..a96240e31c 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -436,7 +436,7 @@ void LLManip::renderXYZ(const LLVector3 &vec) glPushMatrix(); { - LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); + LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square"); gViewerWindow->setup2DRender(); const LLVector2& display_scale = gViewerWindow->getDisplayScale(); glScalef(display_scale.mV[VX], display_scale.mV[VY], 1.f); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 75424e71f5..dab11149b9 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -167,6 +167,7 @@ with the same filename but different name + @@ -439,6 +440,7 @@ with the same filename but different name + @@ -676,7 +678,6 @@ with the same filename but different name - diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index f97ccafecc..cc00abf5a0 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -76,7 +76,7 @@ + -- cgit v1.2.3 From 86b78d84bc95017fe3060bc1cca994858159ca7a Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 11 Jan 2010 13:59:32 +0200 Subject: added no_group_text string to the profile panel; --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 2 +- indra/newview/skins/default/xui/en/panel_profile.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index d14bdc5ab5..a55979bb89 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -596,7 +596,7 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g std::string group_url= it->second.notNull() ? "[secondlife:///app/group/" + it->second.asString() + "/about " + it->first + "]" - : getString("no_partner_text"); + : getString("no_group_text"); groups += group_url; } diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 43947262ec..59400663b8 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -27,6 +27,9 @@ + [REG_DATE] ([AGE]) -- cgit v1.2.3 From d0c029c6094bf23ad9a016d9029b830d674a566a Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 11 Jan 2010 14:12:03 +0200 Subject: Fixed normal bug EXT-3764 - Notifications should not stack when selected from the Well. --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 14 +++++++++++++- indra/newview/llscreenchannel.h | 2 ++ indra/newview/llsyswellwindow.cpp | 4 ++++ indra/newview/llsyswellwindow.h | 3 +++ 4 files changed, 22 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index da3f1543dd..d0b537cdfc 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -357,7 +357,6 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id) toast->setIsHidden(false); toast->resetTimer(); mToastList.push_back((*it)); - mStoredToastList.erase(it); redrawToasts(); } @@ -778,6 +777,19 @@ void LLScreenChannel::hideToastsFromScreen() (*it).toast->setVisible(FALSE); } +//-------------------------------------------------------------------------- +void LLScreenChannel::hideToast(const LLUUID& notification_id) +{ + std::vector::iterator it = find(mToastList.begin(), mToastList.end(), notification_id); + if(mToastList.end() != it) + { + ToastElem te = *it; + te.toast->setVisible(FALSE); + te.toast->stopTimer(); + mToastList.erase(it); + } +} + //-------------------------------------------------------------------------- void LLScreenChannel::removeToastsFromChannel() { diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 38f27f756b..661b9e4e60 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -176,6 +176,8 @@ public: void modifyToastByNotificationID(LLUUID id, LLPanel* panel); // hide all toasts from screen, but not remove them from a channel void hideToastsFromScreen(); + // hide toast by notification id + void hideToast(const LLUUID& notification_id); // removes all toasts from a channel void removeToastsFromChannel(); // show all toasts in a channel diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 44cf82540a..b5884e8364 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -701,7 +701,11 @@ void LLNotificationWellWindow::onItemClick(LLSysWellItem* item) { LLUUID id = item->getID(); if(mChannel) + { + mChannel->hideToast(mLoadedToastId); mChannel->loadStoredToastByNotificationIDToChannel(id); + mLoadedToastId = id; + } } void LLNotificationWellWindow::onItemClose(LLSysWellItem* item) diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index ded3abcbf4..0c81d1f369 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -162,6 +162,9 @@ private: void onItemClick(LLSysWellItem* item); void onItemClose(LLSysWellItem* item); + // ID of a toast loaded by user (by clicking notification well item) + LLUUID mLoadedToastId; + }; /** -- cgit v1.2.3 From 4a902dd76ae1bbf2e080632ebb51896ed6f007b3 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Mon, 11 Jan 2010 15:07:44 +0200 Subject: fix normal EXT-3987 [BSI] *Save* button in group profile should be greyed out when there are no changes to save "save" btn will not be visible for groups where you are not a member. fixed enabled/disabled state --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 18 +++++++++++++----- indra/newview/llpanelgroupgeneral.cpp | 11 ++--------- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 94de17c17d..50f92ef116 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -423,6 +423,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) getChild("group_name")->setVisible(true); getChild("group_name_editor")->setVisible(false); + + if(button_apply) + button_apply->setVisible(is_member); } reposButtons(); @@ -471,12 +474,17 @@ void LLPanelGroup::draw() childEnable("btn_refresh"); } - bool enable = false; - std::string mesg; - for(std::vector::iterator it = mTabs.begin();it!=mTabs.end();++it) - enable = enable || (*it)->needsApply(mesg); + LLButton* button_apply = findChild("btn_apply"); + + if(button_apply && button_apply->getVisible()) + { + bool enable = false; + std::string mesg; + for(std::vector::iterator it = mTabs.begin();it!=mTabs.end();++it) + enable = enable || (*it)->needsApply(mesg); - childSetEnabled("btn_apply", enable); + childSetEnabled("btn_apply", enable); + } } void LLPanelGroup::refreshData() diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 31dfdde887..21b253223f 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -580,7 +580,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) } } - mComboActiveTitle->resetDirty(); } // If this was just a titles update, we are done. @@ -595,8 +594,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) { mCtrlShowInGroupList->set(gdatap->mShowInList); mCtrlShowInGroupList->setEnabled(mAllowEdit && can_change_ident); - mCtrlShowInGroupList->resetDirty(); - } if (mComboMature) { @@ -610,19 +607,16 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) } mComboMature->setEnabled(mAllowEdit && can_change_ident); mComboMature->setVisible( !gAgent.isTeen() ); - mComboMature->resetDirty(); } if (mCtrlOpenEnrollment) { mCtrlOpenEnrollment->set(gdatap->mOpenEnrollment); mCtrlOpenEnrollment->setEnabled(mAllowEdit && can_change_member_opts); - mCtrlOpenEnrollment->resetDirty(); } if (mCtrlEnrollmentFee) { mCtrlEnrollmentFee->set(gdatap->mMembershipFee > 0); mCtrlEnrollmentFee->setEnabled(mAllowEdit && can_change_member_opts); - mCtrlEnrollmentFee->resetDirty(); } if (mSpinEnrollmentFee) @@ -632,7 +626,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) mSpinEnrollmentFee->setEnabled( mAllowEdit && (fee > 0) && can_change_member_opts); - mSpinEnrollmentFee->resetDirty(); } if (mCtrlReceiveNotices) { @@ -641,7 +634,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) { mCtrlReceiveNotices->setEnabled(mAllowEdit); } - mCtrlReceiveNotices->resetDirty(); } @@ -665,7 +657,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) if (mEditCharter) { mEditCharter->setText(gdatap->mCharter); - mEditCharter->resetDirty(); } if (mListVisibleMembers) @@ -693,6 +684,8 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) mListVisibleMembers->addElement(row); } } + + resetDirty(); } void LLPanelGroupGeneral::updateMembers() -- cgit v1.2.3 From 35f1b788f9d6b0d850598c43d998abcebb095509 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Mon, 11 Jan 2010 17:42:22 +0200 Subject: Fixed normal bug EXT - 3786 ("View profile" arrow widget in People/Friends list needs tooltip) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_avatar_list_item.xml | 1 + indra/newview/skins/default/xui/en/panel_group_list_item.xml | 1 + 2 files changed, 2 insertions(+) (limited to 'indra') 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 45f9d9c7b6..4342318c22 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 @@ -98,6 +98,7 @@ left_pad="5" right="-3" name="profile_btn" + tool_tip="View profile" top_delta="-2" width="20" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml index 5f6b911620..c243d08b97 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml @@ -65,6 +65,7 @@ left_pad="5" right="-3" name="profile_btn" + tool_tip="View profile" top_delta="-2" width="20" /> -- cgit v1.2.3 From ab36981b3b02dd3dec9ed21b8c2220c8b97057ee Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 11 Jan 2010 17:45:46 +0200 Subject: Fix for normal bug EXT-3888 - [BSI] double click does not fetch/open attachment on group notice. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3362142807..8d7718c5dc 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1098,28 +1098,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this)); } - // *NOTE dzaporozhan - // Restored from viewer-1-23 to fix EXT-3520 - // Saves Group Notice Attachments to inventory. - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_ImprovedInstantMessage); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_MessageBlock); - msg->addBOOLFast(_PREHASH_FromGroup, FALSE); - msg->addUUIDFast(_PREHASH_ToAgentID, mFromID); - msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); - msg->addUUIDFast(_PREHASH_ID, mTransactionID); - msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary - std::string name; - LLAgentUI::buildFullname(name); - msg->addStringFast(_PREHASH_FromAgentName, name); - msg->addStringFast(_PREHASH_Message, ""); - msg->addU32Fast(_PREHASH_ParentEstateID, 0); - msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); - msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); - std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. @@ -1155,8 +1133,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& } } break; - case IM_TASK_INVENTORY_OFFERED: case IM_GROUP_NOTICE: + send_auto_receive_response(); + break; + case IM_TASK_INVENTORY_OFFERED: case IM_GROUP_NOTICE_REQUESTED: // This is an offer from a task or group. // We don't use a new instance of an opener @@ -1171,10 +1151,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // end switch (mIM) case IOR_ACCEPT: - msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); - msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), sizeof(mFolderID.mData)); - msg->sendReliable(mHost); - //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { -- cgit v1.2.3 From 8be80d14c199773001a1a22bce89f55bdf22af54 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 11 Jan 2010 19:12:19 +0200 Subject: Fixed normal bug EXT-3988 ([BSI] superfluous bottom bar buttons shown in mouse look after pressing enter) --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 976b312509..8c90fffa0a 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -251,14 +251,24 @@ void LLBottomTray::setVisible(BOOL visible) { LLView* viewp = *child_it; std::string name = viewp->getName(); - - if ("chat_bar" == name || "movement_panel" == name || "cam_panel" == name || "snapshot_panel" == name || "gesture_panel" == name) + + // Chat bar is always shown. But the move, camera, gesture and snapshot buttons shouldn't be displayed when we are in mouselook mode. See EXT-3988. + if ("chat_bar" == name || (visibility && ("movement_panel" == name || "cam_panel" == name || "snapshot_panel" == name || "gesture_panel" == name))) continue; else { viewp->setVisible(visibility); } } + + // Apply the saved settings when we are not in mouselook mode, see EXT-3988. + if (visibility) + { + showCameraButton(gSavedSettings.getBOOL("ShowCameraButton")); + showSnapshotButton(gSavedSettings.getBOOL("ShowSnapshotButton")); + showMoveButton(gSavedSettings.getBOOL("ShowMoveButton")); + showGestureButton(gSavedSettings.getBOOL("ShowGestureButton")); + } } } -- cgit v1.2.3 From 1bdae78926d11389ac6f4ca8daae3bf50ba7ceda Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 11 Jan 2010 18:39:15 +0200 Subject: Work on low task EXT-3456 (Code Improvements: Improve LLAvatarListItem to show/hide its buttons properly) Initial implementation: * implemented common functionality to update Avatar List Item children positions & size (for name) depend on children visibility * added its usage whereve visibility of child view is changed * removed direct changing of "info button" visibility in Avatar List when Avatar List Item is added --HG-- branch : product-engine --- indra/newview/llavatarlist.cpp | 2 - indra/newview/llavatarlistitem.cpp | 173 +++++++++++++++++---- indra/newview/llavatarlistitem.h | 49 +++++- .../default/xui/en/panel_avatar_list_item.xml | 6 +- 4 files changed, 194 insertions(+), 36 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 5df73a994e..13daa79528 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -323,14 +323,12 @@ boost::signals2::connection LLAvatarList::setRefreshCompleteCallback(const commi void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) { LLAvatarListItem* item = new LLAvatarListItem(); - item->showInfoBtn(true); item->showSpeakingIndicator(true); item->setName(name); item->setAvatarId(id, mIgnoreOnlineStatus); item->setOnline(mIgnoreOnlineStatus ? true : is_online); item->showLastInteractionTime(mShowLastInteractionTime); - item->childSetVisible("info_btn", false); item->setAvatarIconVisible(mShowIcons); item->setShowInfoBtn(mShowInfoBtn); item->setShowProfileBtn(mShowProfileBtn); diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 6945ac6932..aa5a575464 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -48,6 +48,10 @@ S32 LLAvatarListItem::sIconWidth = 0; S32 LLAvatarListItem::sInfoBtnWidth = 0; S32 LLAvatarListItem::sProfileBtnWidth = 0; S32 LLAvatarListItem::sSpeakingIndicatorWidth = 0; +S32 LLAvatarListItem::sLeftPadding = 0; +S32 LLAvatarListItem::sRightNamePadding = 0; +S32 LLAvatarListItem::sChildrenWidths[LLAvatarListItem::ALIC_COUNT]; + LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) : LLPanel(), @@ -95,10 +99,7 @@ BOOL LLAvatarListItem::postBuild() // so that we can hide and show the icon again later. if (!sStaticInitialized) { - sIconWidth = mAvatarName->getRect().mLeft - mAvatarIcon->getRect().mLeft; - sInfoBtnWidth = mInfoBtn->getRect().mRight - mSpeakingIndicator->getRect().mRight; - sProfileBtnWidth = mProfileBtn->getRect().mRight - mInfoBtn->getRect().mRight; - sSpeakingIndicatorWidth = mSpeakingIndicator->getRect().mRight - mAvatarName->getRect().mRight; + initChildrenWidths(this); sStaticInitialized = true; } @@ -137,6 +138,8 @@ void LLAvatarListItem::onMouseEnter(S32 x, S32 y, MASK mask) mProfileBtn->setVisible(mShowProfileBtn); LLPanel::onMouseEnter(x, y, mask); + + updateChildren(); } void LLAvatarListItem::onMouseLeave(S32 x, S32 y, MASK mask) @@ -146,6 +149,8 @@ void LLAvatarListItem::onMouseLeave(S32 x, S32 y, MASK mask) mProfileBtn->setVisible(false); LLPanel::onMouseLeave(x, y, mask); + + updateChildren(); } // virtual, called by LLAvatarTracker @@ -215,12 +220,8 @@ void LLAvatarListItem::showLastInteractionTime(bool show) if (show) return; - LLRect name_rect = mAvatarName->getRect(); - LLRect time_rect = mLastInteractionTime->getRect(); - mLastInteractionTime->setVisible(false); - name_rect.mRight += (time_rect.mRight - name_rect.mRight); - mAvatarName->setRect(name_rect); + updateChildren(); } void LLAvatarListItem::setLastInteractionTime(U32 secs_since) @@ -234,12 +235,6 @@ void LLAvatarListItem::setShowInfoBtn(bool show) if(mShowInfoBtn == show) return; mShowInfoBtn = show; - S32 width_delta = show ? - sInfoBtnWidth : sInfoBtnWidth; - - //Translating speaking indicator - mSpeakingIndicator->translate(width_delta, 0); - //Reshaping avatar name - mAvatarName->reshape(mAvatarName->getRect().getWidth() + width_delta, mAvatarName->getRect().getHeight()); } void LLAvatarListItem::setShowProfileBtn(bool show) @@ -248,12 +243,6 @@ void LLAvatarListItem::setShowProfileBtn(bool show) if(mShowProfileBtn == show) return; mShowProfileBtn = show; - S32 width_delta = show ? - sProfileBtnWidth : sProfileBtnWidth; - - //Translating speaking indicator - mSpeakingIndicator->translate(width_delta, 0); - //Reshaping avatar name - mAvatarName->reshape(mAvatarName->getRect().getWidth() + width_delta, mAvatarName->getRect().getHeight()); } void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible) @@ -262,10 +251,7 @@ void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible) if (mSpeakingIndicator->getVisible() == (BOOL)visible) return; mSpeakingIndicator->setVisible(visible); - S32 width_delta = visible ? - sSpeakingIndicatorWidth : sSpeakingIndicatorWidth; - - //Reshaping avatar name - mAvatarName->reshape(mAvatarName->getRect().getWidth() + width_delta, mAvatarName->getRect().getHeight()); + updateChildren(); } void LLAvatarListItem::setAvatarIconVisible(bool visible) @@ -276,11 +262,7 @@ void LLAvatarListItem::setAvatarIconVisible(bool visible) // Show/hide avatar icon. mAvatarIcon->setVisible(visible); - - // Move the avatar name horizontally by icon size + its distance from the avatar name. - LLRect name_rect = mAvatarName->getRect(); - name_rect.mLeft += visible ? sIconWidth : -sIconWidth; - mAvatarName->setRect(name_rect); + updateChildren(); } void LLAvatarListItem::onInfoBtnClick() @@ -346,6 +328,7 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str void LLAvatarListItem::reshapeAvatarName() { +/* S32 width_delta = 0; width_delta += mShowProfileBtn ? sProfileBtnWidth : 0; width_delta += mSpeakingIndicator->getVisible() ? sSpeakingIndicatorWidth : 0; @@ -357,6 +340,7 @@ void LLAvatarListItem::reshapeAvatarName() S32 width = getRect().getWidth() - width_delta; mAvatarName->reshape(width, height); +*/ } // Convert given number of seconds to a string like "23 minutes", "15 hours" or "3 years", @@ -492,4 +476,133 @@ LLAvatarListItem::icon_color_map_t& LLAvatarListItem::getItemIconColorMap() return item_icon_color_map; } +// static +void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item) +{ + //profile btn width + padding + S32 profile_btn_width = avatar_item->getRect().getWidth() - 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; + + // icon width + padding + S32 icon_width = avatar_item->mAvatarName->getRect().mLeft - avatar_item->mAvatarIcon->getRect().mLeft; + + sLeftPadding = avatar_item->mAvatarIcon->getRect().mLeft; + sRightNamePadding = avatar_item->mLastInteractionTime->getRect().mLeft - avatar_item->mAvatarName->getRect().mRight; + + S32 index = ALIC_COUNT; + 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; +} + +void LLAvatarListItem::updateChildren() +{ + LL_DEBUGS("AvatarItemReshape") << LL_ENDL; + LL_DEBUGS("AvatarItemReshape") << "Updating for: " << getAvatarName() << LL_ENDL; + + S32 name_new_width = getRect().getWidth(); + S32 ctrl_new_left = name_new_width; + S32 name_new_left = sLeftPadding; + + // iterate through all children and set them into correct position depend on each child visibility + // assume that child indexes are in back order: the first in Enum is the last (right) in the item + // iterate & set child views starting from right to left + for (S32 i = 0; i < ALIC_COUNT; ++i) + { + // skip "name" textbox, it will be processed out of loop later + if (ALIC_NAME == i) continue; + + LLView* control = getItemChildView((EAvatarListItemChildIndex)i); + + LL_DEBUGS("AvatarItemReshape") << "Processing control: " << control->getName() << LL_ENDL; + // skip invisible views + if (!control->getVisible()) continue; + + S32 ctrl_width = sChildrenWidths[i]; // including space between current & left controls + + // decrease available for + name_new_width -= ctrl_width; + LL_DEBUGS("AvatarItemReshape") << "width: " << ctrl_width << ", name_new_width: " << name_new_width << LL_ENDL; + + LLRect control_rect = control->getRect(); + LL_DEBUGS("AvatarItemReshape") << "rect before: " << control_rect << LL_ENDL; + + if (ALIC_ICON == i) + { + // assume that this is the last iteration, + // so it is not necessary to save "ctrl_new_left" value calculated on previous iterations + ctrl_new_left = sLeftPadding;//control_rect.mLeft; + name_new_left = ctrl_new_left + ctrl_width; + } + else + { + ctrl_new_left -= ctrl_width; + } + + LL_DEBUGS("AvatarItemReshape") << "ctrl_new_left: " << ctrl_new_left << LL_ENDL; + + control_rect.setLeftTopAndSize( + ctrl_new_left, + control_rect.mTop, + control_rect.getWidth(), + control_rect.getHeight()); + + LL_DEBUGS("AvatarItemReshape") << "rect after: " << control_rect << LL_ENDL; + control->setShape(control_rect); + } + + // set size and position of the "name" child + LLView* name_view = getItemChildView(ALIC_NAME); + LLRect name_view_rect = name_view->getRect(); + LL_DEBUGS("AvatarItemReshape") << "name rect before: " << name_view_rect << LL_ENDL; + + // apply paddings + name_new_width -= sLeftPadding; + name_new_width -= sRightNamePadding; + + name_view_rect.setLeftTopAndSize( + name_new_left, + name_view_rect.mTop, + name_new_width, + name_view_rect.getHeight()); + + name_view->setShape(name_view_rect); + + LL_DEBUGS("AvatarItemReshape") << "name rect after: " << name_view_rect << LL_ENDL; +} + +LLView* LLAvatarListItem::getItemChildView(EAvatarListItemChildIndex child_view_index) +{ + LLView* child_view = mAvatarName; + if (child_view_index < 0 || ALIC_COUNT <= child_view_index) + { + LL_WARNS("AvatarItemReshape") << "Child view index is out of range: " << child_view_index << LL_ENDL; + return child_view; + } + switch (child_view_index) + { + case ALIC_ICON: child_view = mAvatarIcon; break; + case ALIC_NAME: child_view = mAvatarName; break; + case ALIC_INTERACTION_TIME: child_view = mLastInteractionTime; break; + case ALIC_SPEAKER_INDICATOR: child_view = mSpeakingIndicator; break; + case ALIC_INFO_BUTTON: child_view = mInfoBtn; break; + case ALIC_PROFILE_BUTTON: child_view = mProfileBtn; break; + default: + LL_WARNS("AvatarItemReshape") << "Unexpected child view index is passed: " << child_view_index << LL_ENDL; + } + + return child_view; +} + // EOF diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 96097bc9b5..688197810e 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -98,7 +98,6 @@ public: void onProfileBtnClick(); void showSpeakingIndicator(bool show) { mSpeakingIndicator->setVisible(show); } - void showInfoBtn(bool show_info_btn) {mInfoBtn->setVisible(show_info_btn); } void showLastInteractionTime(bool show); /** @@ -124,6 +123,23 @@ private: E_UNKNOWN, } EOnlineStatus; + /** + * Enumeration of item elements in order from right to left. + * + * updateChildren() assumes that indexes are in the such order to process avatar icon easier. + * + * @see updateChildren() + */ + typedef enum e_avatar_item_child { + ALIC_PROFILE_BUTTON, + ALIC_INFO_BUTTON, + ALIC_SPEAKER_INDICATOR, + ALIC_INTERACTION_TIME, + ALIC_NAME, + ALIC_ICON, + ALIC_COUNT, + } EAvatarListItemChildIndex; + void setNameInternal(const std::string& name, const std::string& highlight); void onNameCache(const std::string& first_name, const std::string& last_name); @@ -135,6 +151,26 @@ private: typedef std::map icon_color_map_t; static icon_color_map_t& getItemIconColorMap(); + /** + * Initializes widths of all children to use them while changing visibility of any of them. + * + * @see updateChildren() + */ + static void initChildrenWidths(LLAvatarListItem* self); + + /** + * Updates position and rectangle of visible children to fit all available item's width. + */ + void updateChildren(); + + /** + * Gets child view specified by index. + * + * This method implemented via switch by all EAvatarListItemChildIndex values. + * It is used to not store children in array or vector to avoid of increasing memory usage. + */ + LLView* getItemChildView(EAvatarListItemChildIndex child_index); + LLTextBox* mAvatarName; LLTextBox* mLastInteractionTime; LLStyle::Params mAvatarNameStyle; @@ -155,6 +191,17 @@ private: static S32 sInfoBtnWidth; //info btn width + padding static S32 sProfileBtnWidth; //profile btn width + padding static S32 sSpeakingIndicatorWidth; //speaking indicator width + padding + static S32 sLeftPadding; // padding to first left visible child (icon or name) + static S32 sRightNamePadding; // right padding from name to next visible child + + /** + * Contains widths of each child specified by EAvatarListItemChildIndex + * including padding to the next right one. + * + * @see initChildrenWidths() + */ + static S32 sChildrenWidths[ALIC_COUNT]; + }; #endif //LL_LLAVATARLISTITEM_H 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 4342318c22..615ade99a2 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 @@ -58,13 +58,13 @@ top="6" use_ellipses="true" value="Unknown" - width="182" /> + width="180" /> Date: Mon, 11 Jan 2010 18:50:19 +0200 Subject: Work on low task EXT-3456 (Code Improvements: Improve LLAvatarListItem to show/hide its buttons properly) Code improved: * removed direct changing of "speaker indicator" visibility in Avatar List when Avatar List Item is added --HG-- branch : product-engine --- indra/newview/llavatarlist.cpp | 5 ++--- indra/newview/llavatarlistitem.cpp | 2 +- indra/newview/llavatarlistitem.h | 6 ++---- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 13daa79528..19e9e52ddf 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -82,7 +82,7 @@ void LLAvatarList::setSpeakingIndicatorsVisible(bool visible) getItems(items); for( std::vector::const_iterator it = items.begin(); it != items.end(); it++) { - static_cast(*it)->setSpeakingIndicatorVisible(mShowSpeakingIndicator); + static_cast(*it)->showSpeakingIndicator(mShowSpeakingIndicator); } } @@ -323,7 +323,6 @@ boost::signals2::connection LLAvatarList::setRefreshCompleteCallback(const commi void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) { LLAvatarListItem* item = new LLAvatarListItem(); - item->showSpeakingIndicator(true); item->setName(name); item->setAvatarId(id, mIgnoreOnlineStatus); item->setOnline(mIgnoreOnlineStatus ? true : is_online); @@ -332,7 +331,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->setAvatarIconVisible(mShowIcons); item->setShowInfoBtn(mShowInfoBtn); item->setShowProfileBtn(mShowProfileBtn); - item->setSpeakingIndicatorVisible(mShowSpeakingIndicator); + item->showSpeakingIndicator(mShowSpeakingIndicator); addItem(item, id, pos); } diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index aa5a575464..56ac168c1d 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -245,7 +245,7 @@ void LLAvatarListItem::setShowProfileBtn(bool show) mShowProfileBtn = show; } -void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible) +void LLAvatarListItem::showSpeakingIndicator(bool visible) { // Already done? Then do nothing. if (mSpeakingIndicator->getVisible() == (BOOL)visible) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 688197810e..64b480c21b 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -88,7 +88,8 @@ public: //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly void setShowProfileBtn(bool show); void setShowInfoBtn(bool show); - void setSpeakingIndicatorVisible(bool visible); + void showSpeakingIndicator(bool show); + void showLastInteractionTime(bool show); void setAvatarIconVisible(bool visible); const LLUUID& getAvatarId() const; @@ -97,9 +98,6 @@ public: void onInfoBtnClick(); void onProfileBtnClick(); - void showSpeakingIndicator(bool show) { mSpeakingIndicator->setVisible(show); } - void showLastInteractionTime(bool show); - /** * This method was added to fix EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label) * But this is a *HACK. The real reason of it was in incorrect logic while hiding profile/info/speaker buttons -- cgit v1.2.3 From 66f8c49bd6c1ddfe58cec9dc4d7dd83ae4e86063 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 11 Jan 2010 19:34:32 +0200 Subject: Work on low task EXT-3456 (Code Improvements: Improve LLAvatarListItem to show/hide its buttons properly) Code improved: * removed disabled method LLAvatarListItem::reshapeAvatarName * added refreshing chat participant list immediately after moderator rights are changed (for EXT-2364) --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 17 ----------------- indra/newview/llavatarlistitem.h | 7 ------- indra/newview/llparticipantlist.cpp | 5 +++-- 3 files changed, 3 insertions(+), 26 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 56ac168c1d..5efdbaceb7 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -326,23 +326,6 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str setName(name); } -void LLAvatarListItem::reshapeAvatarName() -{ -/* - S32 width_delta = 0; - width_delta += mShowProfileBtn ? sProfileBtnWidth : 0; - width_delta += mSpeakingIndicator->getVisible() ? sSpeakingIndicatorWidth : 0; - width_delta += mAvatarIcon->getVisible() ? sIconWidth : 0; - width_delta += mShowInfoBtn ? sInfoBtnWidth : 0; - width_delta += mLastInteractionTime->getVisible() ? mLastInteractionTime->getRect().getWidth() : 0; - - S32 height = mAvatarName->getRect().getHeight(); - S32 width = getRect().getWidth() - width_delta; - - mAvatarName->reshape(width, height); -*/ -} - // Convert given number of seconds to a string like "23 minutes", "15 hours" or "3 years", // taking i18n into account. The format string to use is taken from the panel XML. std::string LLAvatarListItem::formatSeconds(U32 secs) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 64b480c21b..5c8cc87b7b 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -98,13 +98,6 @@ public: void onInfoBtnClick(); void onProfileBtnClick(); - /** - * This method was added to fix EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label) - * But this is a *HACK. The real reason of it was in incorrect logic while hiding profile/info/speaker buttons - * *TODO: new reshape method should be provided in lieu of this one to be called when visibility if those buttons is changed - */ - void reshapeAvatarName(); - protected: /** * Contains indicator to show voice activity. diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 362454ee3c..b6f78d08f1 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -166,7 +166,6 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) { name.erase(found, moderator_indicator_len); item->setName(name); - item->reshapeAvatarName(); } } } @@ -188,7 +187,6 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) name += " "; name += moderator_indicator; item->setName(name); - item->reshapeAvatarName(); } } } @@ -279,6 +277,9 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer e mModeratorList.erase(id); } } + + // apply changes immediately + onAvatarListRefreshed(mAvatarList, LLSD()); } } return true; -- cgit v1.2.3 From b8774e9f6bb235c390854f706aab2f8391991b6a Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 11 Jan 2010 19:42:07 +0200 Subject: Work on low task EXT-3456 (Code Improvements: Improve LLAvatarListItem to show/hide its buttons properly) Code cleanup: * removed unused static members --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 6 +----- indra/newview/llavatarlistitem.h | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 5efdbaceb7..a2e17db3d8 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -44,10 +44,6 @@ #include "llbutton.h" bool LLAvatarListItem::sStaticInitialized = false; -S32 LLAvatarListItem::sIconWidth = 0; -S32 LLAvatarListItem::sInfoBtnWidth = 0; -S32 LLAvatarListItem::sProfileBtnWidth = 0; -S32 LLAvatarListItem::sSpeakingIndicatorWidth = 0; S32 LLAvatarListItem::sLeftPadding = 0; S32 LLAvatarListItem::sRightNamePadding = 0; S32 LLAvatarListItem::sChildrenWidths[LLAvatarListItem::ALIC_COUNT]; @@ -525,7 +521,7 @@ void LLAvatarListItem::updateChildren() { // assume that this is the last iteration, // so it is not necessary to save "ctrl_new_left" value calculated on previous iterations - ctrl_new_left = sLeftPadding;//control_rect.mLeft; + ctrl_new_left = sLeftPadding; name_new_left = ctrl_new_left + ctrl_width; } else diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 5c8cc87b7b..868ee546d4 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -178,10 +178,6 @@ private: bool mShowProfileBtn; static bool sStaticInitialized; // this variable is introduced to improve code readability - static S32 sIconWidth; // icon width + padding - static S32 sInfoBtnWidth; //info btn width + padding - static S32 sProfileBtnWidth; //profile btn width + padding - static S32 sSpeakingIndicatorWidth; //speaking indicator width + padding static S32 sLeftPadding; // padding to first left visible child (icon or name) static S32 sRightNamePadding; // right padding from name to next visible child -- cgit v1.2.3 From 0b63977570221ae7ca0ad46c9f844603ff91eeb4 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 11 Jan 2010 09:53:24 -0800 Subject: Fix build issue with ba93e704bd4f --- indra/newview/llviewermedia.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index f91d126073..9671b9e5dc 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -48,6 +48,8 @@ #include "llviewerwindow.h" #include "llfocusmgr.h" #include "llcallbacklist.h" +#include "llparcel.h" +#include "llaudioengine.h" // for gAudiop #include "llevent.h" // LLSimpleListener #include "llnotificationsutil.h" @@ -909,14 +911,14 @@ void LLViewerMedia::cleanupClass() ////////////////////////////////////////////////////////////////////////////////////////// // static -bool LLViewerParcelMedia::needsMediaFirstRun() +bool LLViewerMedia::needsMediaFirstRun() { return gWarningSettings.getBOOL("FirstStreamingMedia"); } ////////////////////////////////////////////////////////////////////////////////////////// // static -void LLViewerParcelMedia::displayMediaFirstRun() +void LLViewerMedia::displayMediaFirstRun() { gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); @@ -926,7 +928,7 @@ void LLViewerParcelMedia::displayMediaFirstRun() ////////////////////////////////////////////////////////////////////////////////////////// // static -bool LLViewerParcelMedia::firstRunCallback(const LLSD& notification, const LLSD& response) +bool LLViewerMedia::firstRunCallback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) -- cgit v1.2.3 From dd861135677b54a797305bb92199ac614cae5070 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 11 Jan 2010 10:03:00 -0800 Subject: Backed out changeset b6030bb6ff40 --- indra/newview/llviewermedia.cpp | 73 +++++++++++++++++++++++++++++++++++ indra/newview/llviewermedia.h | 6 +++ indra/newview/llviewerparcelmedia.cpp | 40 +------------------ 3 files changed, 81 insertions(+), 38 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 7e8c8eb92e..f91d126073 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -54,6 +54,7 @@ #include "lluuid.h" #include "llkeyboard.h" #include "llmutelist.h" +#include "llfirstuse.h" #include // for SkinFolder listener #include @@ -708,6 +709,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg) std::vector proximity_order; + bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); + bool needs_first_run = LLViewerMedia::needsMediaFirstRun(); U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal"); U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal"); U32 max_low = gSavedSettings.getU32("PluginInstancesLow"); @@ -822,6 +825,21 @@ void LLViewerMedia::updateMedia(void *dummy_arg) new_priority = LLPluginClassMedia::PRIORITY_LOW; } + if(!inworld_media_enabled) + { + // If inworld media is locked out, force all inworld media to stay unloaded. + if(!pimpl->getUsedInUI()) + { + new_priority = LLPluginClassMedia::PRIORITY_UNLOADED; + if(needs_first_run) + { + // Don't do this more than once in this loop. + needs_first_run = false; + LLViewerMedia::displayMediaFirstRun(); + } + } + } + pimpl->setPriority(new_priority); if(pimpl->getUsedInUI()) @@ -888,6 +906,61 @@ void LLViewerMedia::cleanupClass() gIdleCallbacks.deleteFunction(LLViewerMedia::updateMedia, NULL); } + +////////////////////////////////////////////////////////////////////////////////////////// +// static +bool LLViewerParcelMedia::needsMediaFirstRun() +{ + return gWarningSettings.getBOOL("FirstStreamingMedia"); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerParcelMedia::displayMediaFirstRun() +{ + gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); + + LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(), + boost::bind(firstRunCallback, _1, _2)); +} + +////////////////////////////////////////////////////////////////////////////////////////// +// static +bool LLViewerParcelMedia::firstRunCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) + { + // user has elected to automatically play media. + gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE); + gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); + gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); + gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); + + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + + if (parcel) + { + // play media right now, if available + LLViewerParcelMedia::play(parcel); + + // play music right now, if available + std::string music_url = parcel->getMusicURL(); + if (gAudiop && !music_url.empty()) + gAudiop->startInternetStream(music_url); + } + } + else + { + gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, FALSE); + gSavedSettings.setBOOL("AudioStreamingMedia", FALSE); + gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); + gSavedSettings.setBOOL("AudioStreamingMusic", FALSE); + } + return false; +} + + ////////////////////////////////////////////////////////////////////////////////////////// // LLViewerMediaImpl ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index b103c48bd8..3ce9f1887c 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -115,6 +115,12 @@ class LLViewerMedia // This is the comparitor used to sort the list. static bool priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2); + + // For displaying the media first-run dialog. + static bool needsMediaFirstRun(); + static void displayMediaFirstRun(); + static bool firstRunCallback(const LLSD& notification, const LLSD& response); + }; // Implementation functions not exported into header file diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 0f7903a7a5..56dee6b34c 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -56,10 +56,6 @@ LLUUID LLViewerParcelMedia::sMediaRegionID; viewer_media_t LLViewerParcelMedia::sMediaImpl; -// Local functions -bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel); - - // static void LLViewerParcelMedia::initClass() { @@ -112,12 +108,10 @@ void LLViewerParcelMedia::update(LLParcel* parcel) // First use warning if( (!mediaUrl.empty() || !parcel->getMusicURL().empty()) - && gWarningSettings.getBOOL("FirstStreamingMedia") ) + && LLViewerMedia::needsMediaFirstRun()) { - LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(), - boost::bind(callback_play_media, _1, _2, parcel)); + LLViewerMedia::displayMediaFirstRun(); return; - } // if we have a current (link sharing) url, use it instead @@ -591,36 +585,6 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent }; } -bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) - { - // user has elected to automatically play media. - gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE); - gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); - gSavedSettings.setBOOL("AudioStreamingMusic", TRUE); - if(!gSavedSettings.getBOOL("AudioStreamingMedia")) - gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); - // play media right now, if available - LLViewerParcelMedia::play(parcel); - // play music right now, if available - if (parcel) - { - std::string music_url = parcel->getMusicURL(); - if (gAudiop && !music_url.empty()) - gAudiop->startInternetStream(music_url); - } - } - else - { - gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); - gSavedSettings.setBOOL("AudioStreamingMusic", FALSE); - } - gWarningSettings.setBOOL("FirstStreamingMedia", FALSE); - return false; -} - // TODO: observer /* void LLViewerParcelMediaNavigationObserver::onNavigateComplete( const EventType& event_in ) -- cgit v1.2.3 From a452a4a6429bfc4404b07ea7e4ca33f336ec2546 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 11 Jan 2010 20:51:54 +0200 Subject: Fixed normal bug EXT-3984 (Bottom bar layout issues) * All buttons and controls need to move down 1 px (except chiclets, which are already vertically centered) * Left-hand controls need to shift left about 2 px (there should be 5 px of padding between the chat entry field and the edge of the window) * Right-hand controls (IM and notification buttons) also shift left so there is 5 px of padding against the right edge --HG-- branch : product-engine --- .../skins/default/xui/en/panel_bottomtray.xml | 39 ++++++++-------------- .../skins/default/xui/en/panel_nearby_chat_bar.xml | 4 +-- 2 files changed, 15 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index aeaa049f1f..ca547a79e2 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -33,10 +33,10 @@ height="10" image_name="spacer24.tga" layout="topleft" - min_width="4" + min_width="2" left="0" top="0" - width="4" /> + width="2" /> @@ -338,7 +338,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. layout="topleft" left="0" name="im_well" - top="4" + top="5" width="35"> Date: Tue, 12 Jan 2010 12:38:03 +0200 Subject: Update for normal bug EXT-3520 - Can't open Group Notices or Attachments. --HG-- branch : product-engine --- indra/newview/llpanelplaces.h | 4 ++++ indra/newview/llviewermessage.cpp | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 5ee8704992..b134cf0cba 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -71,6 +71,10 @@ public: void setItem(LLInventoryItem* item); + LLInventoryItem* getItem() { return mItem; } + + std::string getPlaceInfoType() { return mPlaceInfoType; } + private: void onLandmarkLoaded(LLLandmark* landmark); void onFilterEdit(const std::string& search_string, bool force_filter); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8d7718c5dc..2e4e1cf114 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -904,7 +904,19 @@ void open_inventory_offer(const std::vector& items, const std::string& f LLPanelPlaces *places_panel = dynamic_cast(LLSideTray::getInstance()->showPanel("panel_places", LLSD())); if (places_panel) { - places_panel->setItem(item); + // we are creating a landmark + if("create_landmark" == places_panel->getPlaceInfoType() && !places_panel->getItem()) + { + places_panel->setItem(item); + } + // we are opening a group notice attachment + else + { + LLSD args; + args["type"] = "landmark"; + args["id"] = item_id; + LLSideTray::getInstance()->showPanel("panel_places", args); + } } } } -- cgit v1.2.3 From ba320f7ca4957d7a8444df95211711a07055d2e1 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 12 Jan 2010 13:24:33 +0200 Subject: Fix for major bug EXT-4147 - Cannot click on Urls in LLExpandableTextBox objects. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_my_profile.xml | 11 ++++++----- indra/newview/skins/default/xui/en/panel_profile.xml | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'indra') 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 8327edfdd0..5a023dab97 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -62,10 +62,11 @@ + width="297"> + width="297"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. @@ -127,7 +128,7 @@ top_pad="10" left="10" name="first_life_image_panel" - width="300"> + width="297"> Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 59400663b8..4c4b2b10a0 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -65,10 +65,11 @@ + width="297"> + width="297"> + width="297"> Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. Aenean viverra tulip moosetop. Slan de heelish marfnik tooplod. Sum sum to whop de wompam booster copm. -- cgit v1.2.3 From 305cc649697fa347538973f4f70b707529208e02 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 12 Jan 2010 14:28:21 +0200 Subject: Fixed normal bug EXT-4150([BSI] Last Landmark in Teleport History disables teleport button) --HG-- branch : product-engine --- indra/newview/llpanelteleporthistory.cpp | 2 +- indra/newview/llteleporthistorystorage.cpp | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 65a3d9d41b..0a2217fc51 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -550,7 +550,7 @@ void LLTeleportHistoryPanel::updateVerbs() LLTeleportHistoryFlatItem* itemp = dynamic_cast (mLastSelectedFlatlList->getSelectedItem()); - mTeleportBtn->setEnabled(NULL != itemp && itemp->getIndex() < (S32)mTeleportHistory->getItems().size() - 1); + mTeleportBtn->setEnabled(NULL != itemp); mShowOnMapBtn->setEnabled(NULL != itemp); } diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index d3bbda1c72..c635f91423 100644 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -246,13 +246,6 @@ void LLTeleportHistoryStorage::goToItem(S32 idx) dump(); return; } - - if (idx == (S32)mItems.size() - 1) - { - llwarns << "Will not teleport to the same location." << llendl; - dump(); - return; - } // Attempt to teleport to the requested item. gAgent.teleportViaLocation(mItems[idx].mGlobalPos); -- cgit v1.2.3 From 6ea8552289ab6afc2380e6a5328aadba50ab98db Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 12 Jan 2010 14:58:28 +0200 Subject: Fix for normal bug EXT-4149 - Crash in Group Profile - Create New Notice interface. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2e4e1cf114..00d8851fe9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1185,7 +1185,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& { chat.mMuted = TRUE; } - LLFloaterChat::addChatHistory(chat); + + // *NOTE dzaporozhan + // Disabled logging to old chat floater to fix crash in group notices - EXT-4149 + // LLFloaterChat::addChatHistory(chat); LLInventoryFetchComboObserver::folder_ref_t folders; LLInventoryFetchComboObserver::item_ref_t items; -- cgit v1.2.3 From e8b34454072422c8c6e0af02a58da1bfaf2a69ae Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 12 Jan 2010 08:52:51 -0500 Subject: Removed some diagnostic code that got inadvertently left in --- indra/newview/llsidetray.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index d1236b948e..75414f31f2 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -644,12 +644,11 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para // This is just LLView::findChildView specialized to restrict the search to LLPanels. // Optimization for EXT-4068 to avoid searching down to the individual item level // when inventories are large. -LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse, S32& count) +LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse) { for (LLView::child_list_const_iter_t child_it = panel->beginChild(); child_it != panel->endChild(); ++child_it) { - count++; LLPanel *child_panel = dynamic_cast(*child_it); if (!child_panel) continue; @@ -661,11 +660,10 @@ LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse, S for (LLView::child_list_const_iter_t child_it = panel->beginChild(); child_it != panel->endChild(); ++child_it) { - count++; LLPanel *child_panel = dynamic_cast(*child_it); if (!child_panel) continue; - LLPanel *found_panel = findChildPanel(child_panel,name,recurse,count); + LLPanel *found_panel = findChildPanel(child_panel,name,recurse); if (found_panel) { return found_panel; @@ -677,16 +675,9 @@ LLPanel *findChildPanel(LLPanel *panel, const std::string& name, bool recurse, S LLPanel* LLSideTray::getPanel(const std::string& panel_name) { - static S32 max_count = 0; - S32 count = 0; for ( child_vector_const_iter_t child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) { - LLPanel *panel = findChildPanel(*child_it,panel_name,true,count); - if (count > max_count) - { - max_count = count; - llwarns << "max_count " << max_count << llendl; - } + LLPanel *panel = findChildPanel(*child_it,panel_name,true); if(panel) { return panel; -- cgit v1.2.3 From 7fffe078eb5b47521f0f314038c5fa9838fe3a5f Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 12 Jan 2010 15:57:23 +0200 Subject: Fix for normal bug EXT-4134 - Right side of llDialog buttons cannot be clicked. --HG-- branch : product-engine --- indra/newview/lltoastnotifypanel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 766cf83a01..d0c125eb77 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -179,7 +179,9 @@ void LLToastNotifyPanel::adjustPanelForScriptNotice(const LLNotificationFormPtr //adjust layout LLRect button_rect = mControlPanel->getRect(); reshape(getRect().getWidth(), mInfoPanel->getRect().getHeight() + button_panel_height); + button_rect.set(0, button_rect.mBottom + button_panel_height, button_rect.getWidth(), button_rect.mBottom); mControlPanel->reshape(button_rect.getWidth(), button_panel_height); + mControlPanel->setRect(button_rect); } // static @@ -217,7 +219,7 @@ LLButton* LLToastNotifyPanel::addButton(const std::string& name, const std::stri S32 ignore_pad = 0; S32 button_index = mNumButtons; S32 index = button_index; - S32 x = (HPAD * 4) + 32; + S32 x = HPAD * 2; // *2 - to make a nice offset if (mIsScriptDialog) { -- cgit v1.2.3 From 85467c0ba654e2a787b216b89807e10fe1b078d8 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 12 Jan 2010 17:27:36 +0200 Subject: Fixed major bug EXT-4121 ([BSI] Partner display is blank for residents on your friends list, on the first lookup after login) --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 13 +++++-------- indra/newview/skins/default/xui/en/panel_edit_profile.xml | 3 +-- indra/newview/skins/default/xui/en/panel_my_profile.xml | 3 +-- indra/newview/skins/default/xui/en/panel_profile.xml | 5 ++--- 4 files changed, 9 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 6c0a3880fa..85e95ca1d6 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -52,6 +52,7 @@ #include "llfloaterreg.h" #include "llnotificationsutil.h" #include "llvoiceclient.h" +#include "llnamebox.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLDropTarget @@ -624,19 +625,15 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) void LLPanelAvatarProfile::fillPartnerData(const LLAvatarData* avatar_data) { + LLNameBox* name_box = getChild("partner_text"); if (avatar_data->partner_id.notNull()) { - std::string first, last; - BOOL found = gCacheName->getName(avatar_data->partner_id, first, last); - if (found) - { - childSetTextArg("partner_text", "[FIRST]", first); - childSetTextArg("partner_text", "[LAST]", last); - } + name_box->setNameID(avatar_data->partner_id, FALSE); } else { - childSetTextArg("partner_text", "[FIRST]", getString("no_partner_text")); + name_box->setNameID(LLUUID::null, FALSE); + name_box->setText(getString("no_partner_text")); } } diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index be3c0bbd96..172cf18fc4 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -301,14 +301,13 @@ left="10" name="partner_data_panel" width="285"> - 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 5a023dab97..b8b9384462 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -261,14 +261,13 @@ name="partner_data_panel" top_pad="0" width="300"> - diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 4c4b2b10a0..ec697838f6 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -244,14 +244,13 @@ name="partner_data_panel" top_pad="0" width="300"> - @@ -379,4 +378,4 @@ - \ No newline at end of file + -- cgit v1.2.3 From fb7f1a5d2404c6d6e09d8b86dee4f3c71ce0342f Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 12 Jan 2010 17:39:51 +0200 Subject: fixed major EXT-3992 [BSI] No notification about capped messages, replaced logging to obsolete LLFloaterChat with posting notification system message; --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2e4e1cf114..6322c7dd2d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1756,10 +1756,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else if (from_id.isNull()) { - // Messages from "Second Life" ID don't go to IM history - // messages which should be routed to IM window come from a user ID with name=SYSTEM_NAME - chat.mText = name + ": " + message; - LLFloaterChat::addChat(chat, FALSE, FALSE); + LLSD args; + args["MESSAGE"] = message; + LLNotificationsUtil::add("SystemMessage", args); } else if (to_id.isNull()) { -- cgit v1.2.3 From f0bbe788370bdc4a4479899be620e2d298d0be70 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 12 Jan 2010 18:33:43 +0200 Subject: added missing no_group_text string constant to panel_my_profile.xml --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_my_profile.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') 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 b8b9384462..038d48cdd6 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -27,6 +27,9 @@ + [REG_DATE] ([AGE]) -- cgit v1.2.3 From 628b892a66023ec8eea4241977a64a5b86108774 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 12 Jan 2010 19:57:17 +0200 Subject: Completed low task EXT-3759 (NOTFORBETA0: Phone numbers for AvaLine calls should be human readable) - implemented formatting of avaline Number in the "Leaving call" notification --HG-- branch : product-engine --- indra/newview/llimview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1f994ecc71..e9661003ea 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1603,7 +1603,12 @@ void LLOutgoingCallDialog::show(const LLSD& key) if (!mPayload["disconnected_channel_name"].asString().empty()) { - childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + std::string channel_name = mPayload["disconnected_channel_name"].asString(); + if (LLIMModel::LLIMSession::AVALINE_SESSION == mPayload["session_type"].asInteger()) + { + channel_name = LLTextUtil::formatPhoneNumber(channel_name); + } + childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name); childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); } -- cgit v1.2.3 From 1f5e82e14023268a2d1b3076a6e788e37b2ddfdc Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 12 Jan 2010 20:01:10 +0200 Subject: Partially fixed major bug EXT-4112 ([BSI] Number of groups not limited to 25). Viewer now disallows joining or creating groups if the limit reached. A server-side fix is also needed. --HG-- branch : product-engine --- indra/newview/llagent.cpp | 5 +++++ indra/newview/llagent.h | 1 + indra/newview/llfloatergroups.cpp | 9 +-------- indra/newview/llgroupactions.cpp | 6 ++++++ indra/newview/llpanelpeople.cpp | 8 +++++++- indra/newview/skins/default/xui/en/notifications.xml | 10 ++++++++++ 6 files changed, 30 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 5e2e374df6..35b28d8ec0 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -5157,6 +5157,11 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO return FALSE; } +BOOL LLAgent::canJoinGroups() const +{ + return mGroups.count() < MAX_AGENT_GROUPS; +} + LLQuaternion LLAgent::getHeadRotation() { if (mAvatarObject.isNull() || !mAvatarObject->mPelvisp || !mAvatarObject->mHeadp) diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 2e95dc72be..beede7fbe3 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -972,6 +972,7 @@ public: BOOL setGroupContribution(const LLUUID& group_id, S32 contribution); BOOL setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile); const std::string &getGroupName() const { return mGroupName; } + BOOL canJoinGroups() const; private: std::string mGroupName; LLUUID mGroupID; diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 7cb925bc0b..29f415bd43 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -247,14 +247,7 @@ void LLPanelGroups::enableButtons() childDisable("IM"); childDisable("Leave"); } - if(gAgent.mGroups.count() < MAX_AGENT_GROUPS) - { - childEnable("Create"); - } - else - { - childDisable("Create"); - } + childSetEnabled("Create", gAgent.canJoinGroups()); } diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 7dd8ea694e..a78a0a43b4 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -146,6 +146,12 @@ void LLGroupActions::startCall(const LLUUID& group_id) // static void LLGroupActions::join(const LLUUID& group_id) { + if (!gAgent.canJoinGroups()) + { + LLNotificationsUtil::add("JoinedTooManyGroups"); + return; + } + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_id); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e14a5778ad..03cc870a59 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -35,6 +35,7 @@ // libs #include "llfloaterreg.h" #include "llmenugl.h" +#include "llnotificationsutil.h" #include "llfiltereditor.h" #include "lltabcontainer.h" #include "lluictrlfactory.h" @@ -750,7 +751,6 @@ void LLPanelPeople::updateButtons() LLPanel* groups_panel = mTabContainer->getCurrentPanel(); groups_panel->childSetEnabled("activate_btn", item_selected && !cur_group_active); // "none" or a non-active group selected - groups_panel->childSetEnabled("plus_btn", item_selected); groups_panel->childSetEnabled("minus_btn", item_selected && selected_id.notNull()); } else @@ -1138,6 +1138,12 @@ void LLPanelPeople::onAvatarPicked( void LLPanelPeople::onGroupPlusButtonClicked() { + if (!gAgent.canJoinGroups()) + { + LLNotificationsUtil::add("JoinedTooManyGroups"); + return; + } + LLMenuGL* plus_menu = (LLMenuGL*)mGroupPlusMenuHandle.get(); if (!plus_menu) return; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 410c398ea5..b4ce0df6a2 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2915,6 +2915,16 @@ You have reached your maximum number of groups. Please leave another group befor yestext="Join"/> + +You have reached your maximum number of groups. Please leave some group before joining or creating a new one. + + + Date: Tue, 12 Jan 2010 12:01:18 -0600 Subject: DEV-44675 Fix for sky wierdness on ATI 9.12 drivers. --- indra/llrender/llvertexbuffer.cpp | 42 ++++++++++++++++++++++----------------- indra/newview/lldrawpoolwlsky.cpp | 21 ++++++++++---------- indra/newview/lldrawpoolwlsky.h | 2 +- indra/newview/llvowlsky.cpp | 41 +++++++++++++++++++++++++++++++------- 4 files changed, 69 insertions(+), 37 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index db4189dfea..572ae13909 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1061,17 +1061,20 @@ void LLVertexBuffer::setBuffer(U32 data_mask) } } - glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); - if ((GLuint)buff != mGLIndices) + if (mGLIndices) { - if (gDebugSession) - { - error = TRUE; - gFailLog << "Invalid GL index buffer bound: " << buff << std::endl; - } - else + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); + if ((GLuint)buff != mGLIndices) { - llerrs << "Invalid GL index buffer bound: " << buff << llendl; + if (gDebugSession) + { + error = TRUE; + gFailLog << "Invalid GL index buffer bound: " << buff << std::endl; + } + else + { + llerrs << "Invalid GL index buffer bound: " << buff << llendl; + } } } } @@ -1095,17 +1098,20 @@ void LLVertexBuffer::setBuffer(U32 data_mask) } } - glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); - if ((GLuint)buff != mGLIndices) + if (mGLIndices != 0) { - if (gDebugSession) - { - error = TRUE; - gFailLog << "Invalid GL index buffer bound: "<< std::endl; - } - else + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, &buff); + if ((GLuint)buff != mGLIndices) { - llerrs << "Invalid GL index buffer bound: " << buff << llendl; + if (gDebugSession) + { + error = TRUE; + gFailLog << "Invalid GL index buffer bound: "<< std::endl; + } + else + { + llerrs << "Invalid GL index buffer bound: " << buff << llendl; + } } } } diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index c14ca2473b..c7cd77cb65 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -159,15 +159,10 @@ void LLDrawPoolWLSky::renderStars(void) const // *NOTE: have to have bound the cloud noise texture already since register // combiners blending below requires something to be bound // and we might as well only bind once. - //gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); + gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); gPipeline.disableLights(); - - if (!LLPipeline::sReflectionRender) - { - glPointSize(2.f); - } - + // *NOTE: we divide by two here and GL_ALPHA_SCALE by two below to avoid // clamping and allow the star_alpha param to brighten the stars. bool error; @@ -175,16 +170,20 @@ void LLDrawPoolWLSky::renderStars(void) const star_alpha.mV[3] = LLWLParamManager::instance()->mCurParams.getFloat("star_brightness", error) / 2.f; llassert_always(!error); + gGL.getTexUnit(0)->bind(gSky.mVOSkyp->getBloomTex()); + + gGL.pushMatrix(); + glRotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f); // gl_FragColor.rgb = gl_Color.rgb; // gl_FragColor.a = gl_Color.a * star_alpha.a; - gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_REPLACE, LLTexUnit::TBS_PREV_COLOR); - gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_PREV_ALPHA, LLTexUnit::TBS_CONST_ALPHA); + gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR); + gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT_X2, LLTexUnit::TBS_CONST_ALPHA, LLTexUnit::TBS_TEX_ALPHA); glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, star_alpha.mV); gSky.mVOWLSkyp->drawStars(); - glPointSize(1.f); - + gGL.popMatrix(); + // and disable the combiner states gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); } diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h index 7ff760ac39..9059f6382f 100644 --- a/indra/newview/lldrawpoolwlsky.h +++ b/indra/newview/lldrawpoolwlsky.h @@ -43,7 +43,7 @@ public: static const U32 SKY_VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0; static const U32 STAR_VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | - LLVertexBuffer::MAP_COLOR; + LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXCOORD0; LLDrawPoolWLSky(void); /*virtual*/ ~LLDrawPoolWLSky(); diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index d3238f16a8..0272a2ab34 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -491,7 +491,7 @@ void LLVOWLSky::drawStars(void) if (mStarsVerts.notNull()) { mStarsVerts->setBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK); - mStarsVerts->draw(LLRender::POINTS, getStarsNumIndices(), 0); + mStarsVerts->drawArrays(LLRender::QUADS, 0, getStarsNumVerts()*4); } } @@ -546,6 +546,7 @@ void LLVOWLSky::initStars() std::vector::iterator v_i = mStarIntensities.begin(); U32 i; + for (i = 0; i < getStarsNumVerts(); ++i) { v_p->mV[VX] = ll_frand() - 0.5f; @@ -771,17 +772,17 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) { LLStrider verticesp; LLStrider colorsp; - LLStrider indicesp; + LLStrider texcoordsp; if (mStarsVerts.isNull()) { mStarsVerts = new LLVertexBuffer(LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK, GL_DYNAMIC_DRAW); - mStarsVerts->allocateBuffer(getStarsNumVerts(), getStarsNumIndices(), TRUE); + mStarsVerts->allocateBuffer(getStarsNumVerts()*4, 0, TRUE); } - + BOOL success = mStarsVerts->getVertexStrider(verticesp) - && mStarsVerts->getIndexStrider(indicesp) - && mStarsVerts->getColorStrider(colorsp); + && mStarsVerts->getColorStrider(colorsp) + && mStarsVerts->getTexCoord0Strider(texcoordsp); if(!success) { @@ -791,11 +792,37 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) // *TODO: fix LLStrider with a real prefix increment operator so it can be // used as a model of OutputIterator. -Brad // std::copy(mStarVertices.begin(), mStarVertices.end(), verticesp); + + if (mStarVertices.size() < getStarsNumVerts()) + { + llerrs << "Star reference geometry insufficient." << llendl; + } + for (U32 vtx = 0; vtx < getStarsNumVerts(); ++vtx) { + LLVector3 at = mStarVertices[vtx]; + at.normVec(); + LLVector3 left = at%LLVector3(0,0,1); + LLVector3 up = at%left; + + F32 sc = 0.5f+ll_frand()*1.25f; + left *= sc; + up *= sc; + *(verticesp++) = mStarVertices[vtx]; + *(verticesp++) = mStarVertices[vtx]+left; + *(verticesp++) = mStarVertices[vtx]+left+up; + *(verticesp++) = mStarVertices[vtx]+up; + + *(texcoordsp++) = LLVector2(0,0); + *(texcoordsp++) = LLVector2(0,1); + *(texcoordsp++) = LLVector2(1,1); + *(texcoordsp++) = LLVector2(1,0); + + *(colorsp++) = LLColor4U(mStarColors[vtx]); + *(colorsp++) = LLColor4U(mStarColors[vtx]); + *(colorsp++) = LLColor4U(mStarColors[vtx]); *(colorsp++) = LLColor4U(mStarColors[vtx]); - *(indicesp++) = vtx; } mStarsVerts->setBuffer(0); -- cgit v1.2.3 From a619f9c307a46d709061c6e1d8179e699964688d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 12 Jan 2010 20:22:28 +0200 Subject: Fixed normal bug EXT-3865 ([BSI] dock and undocking an IM or group chat makes the close button disable) - removed overridden LLIMFloater::setTornOff functionality to not disable close button --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 10 ---------- indra/newview/llimfloater.h | 1 - 2 files changed, 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index b05568f353..02eb29eedd 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -484,16 +484,6 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock) } } -void LLIMFloater::setTornOff(bool torn_off) -{ - // When IM Floater isn't torn off, "close" button should be hidden. - // This call will just disables it, since there is a hack in LLFloater::updateButton, - // which prevents hiding of close button in that case. - setCanClose(torn_off); - - LLTransientDockableFloater::setTornOff(torn_off); -} - void LLIMFloater::setVisible(BOOL visible) { LLNotificationsUI::LLScreenChannel* channel = dynamic_cast diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index bc7a43e852..87ccad1d34 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -64,7 +64,6 @@ public: // LLFloater overrides /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); - /*virtual*/ void setTornOff(bool torn_off); // Make IM conversion visible and update the message history static LLIMFloater* show(const LLUUID& session_id); -- cgit v1.2.3 From 3d2506abe721037d9178406ed92a4602a338c71d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 12 Jan 2010 13:53:25 -0600 Subject: EXT-1331 Fix for avatars not rendering after they are loaded until camera is moved. --- indra/newview/llvoavatar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d0acb0bd39..5958742db2 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2535,6 +2535,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() if (isFullyLoaded()) { deleteParticleSource(); + updateLOD(); } else { -- cgit v1.2.3 From 7b03037cacc99c975624c44eef3c9071198adeed Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 12 Jan 2010 15:27:01 -0500 Subject: EXT-4193: Use different reply pumps for SRV and XMLRPC requests. This eliminates the timing hole (introduced by EXT-3934 fix) in which a belated SRV response could confuse the XMLRPC response code. Extend unit tests to positively drive the bug and validate the fix. --- indra/viewer_components/login/lllogin.cpp | 16 ++++++++++------ indra/viewer_components/login/tests/lllogin_test.cpp | 12 +++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index f5bda71846..b9f61ca7e1 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -143,7 +143,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential << " with uri '" << uri << "', credentials " << printable_credentials << LL_ENDL; // Arriving in SRVRequest state - LLEventStream replyPump("reply", true); + LLEventStream replyPump("SRVreply", true); // Should be an array of one or more uri strings. LLSD rewrittenURIs; { @@ -181,6 +181,10 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential } // we no longer need the filter LLEventPump& xmlrpcPump(LLEventPumps::instance().obtain("LLXMLRPCTransaction")); + // EXT-4193: use a DIFFERENT reply pump than for the SRV request. We used + // to share them -- but the EXT-3934 fix made it possible for an abandoned + // SRV response to arrive just as we were expecting the XMLRPC response. + LLEventStream loginReplyPump("loginreply", true); // Loop through the rewrittenURIs, counting attempts along the way. // Because of possible redirect responses, we may make more than one @@ -191,7 +195,7 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential urit != urend; ++urit) { LLSD request(credentials); - request["reply"] = replyPump.getName(); + request["reply"] = loginReplyPump.getName(); request["uri"] = *urit; std::string status; @@ -216,11 +220,11 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential // possible for the reply to arrive before the post() call // returns. Subsequent responses, of course, must be awaited // without posting again. - for (mAuthResponse = validateResponse(replyPump.getName(), - postAndWait(self, request, xmlrpcPump, replyPump, "reply")); + for (mAuthResponse = validateResponse(loginReplyPump.getName(), + postAndWait(self, request, xmlrpcPump, loginReplyPump, "reply")); mAuthResponse["status"].asString() == "Downloading"; - mAuthResponse = validateResponse(replyPump.getName(), - waitForEventOn(self, replyPump))) + mAuthResponse = validateResponse(loginReplyPump.getName(), + waitForEventOn(self, loginReplyPump))) { // Still Downloading -- send progress update. sendProgressEvent("offline", "downloading"); diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 8463e6d2ca..51f5cd0692 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -441,8 +441,8 @@ namespace tut // Testing normal login procedure. LLEventStream llaresPump("LLAres"); // Dummy LLAres pump. - // LLAresListener dummyLLAres("dummy_llares"); - // dummyLLAres.listenTo(llaresPump); + LLAresListener dummyLLAres("dummy_llares"); + dummyLLAres.listenTo(llaresPump); LLLogin login; LoginListener listener("test_ear"); @@ -470,6 +470,12 @@ namespace tut // the original URI. ensure_equals("Auth state", listener.lastEvent()["change"].asString(), "authenticating"); ensure_equals("Attempt", listener.lastEvent()["data"]["attempt"].asInteger(), 1); - ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); + ensure_equals("URI", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.bar.com"); + + // EXT-4193: if the SRV reply isn't lost but merely late, and if it + // arrives just at the moment we're expecting the XMLRPC reply, the + // original code got confused and crashed. Drive that case here. We + // observe that without the fix, this call DOES repro. + dummyLLAres.sendReply(); } } -- cgit v1.2.3 From 82d26e66222ce3fea92459b6054c8f4d8341598f Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Wed, 13 Jan 2010 10:06:55 +0000 Subject: EXT-3384: Added the final URLs for the Buy L$ links. Payment Method: http://www.secondlife.com/my/account/payment_method_management.php Currency: http://www.secondlife.com/my/account/currency.php --- indra/newview/skins/default/xui/en/floater_buy_currency.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 26b003cafe..86229c6691 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -222,7 +222,7 @@ width="300" height="30" name="currency_links"> - [http://www.secondlife.com/ payment method] | [http://www.secondlife.com/ currency] | [http://www.secondlife.com/my/account/exchange_rates.php exchange rate] + [http://www.secondlife.com/my/account/payment_method_management.php payment method] | [http://www.secondlife.com/my/account/currency.php currency] | [http://www.secondlife.com/my/account/exchange_rates.php exchange rate] Date: Wed, 13 Jan 2010 10:35:29 +0000 Subject: EXT-4021: Updated help ID for LSL Reference floater --- indra/newview/skins/default/xui/en/floater_lsl_guide.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml index a5b477313c..c9d87f158f 100644 --- a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml +++ b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml @@ -8,9 +8,9 @@ min_height="271" min_width="350" name="script ed float" - help_topic="script_ed_float" + help_topic="lsl_reference" save_rect="true" - title="LSL WIKI" + title="LSL REFERENCE" width="370"> Date: Wed, 13 Jan 2010 13:44:44 +0200 Subject: Fixed low bug EXT-4189 (Pressing Gesture button by SPACE/ENTER key doesn't open gestures list) --HG-- branch : product-engine --- indra/newview/llnearbychatbar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 8dbaa5ac53..75c2fb07d1 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -83,6 +83,9 @@ LLGestureComboBox::LLGestureComboBox(const LLGestureComboBox::Params& p) // This forces using of halign from xml, since LLComboBox // sets it to LLFontGL::LEFT, if text entry is disabled mButton->setHAlign(p.drop_down_button.font_halign); + + // Pressing Gesture button by SPACE/ENTER key should open gestures list + mButton->setCommitCallback(boost::bind(&LLComboBox::onButtonMouseDown, this)); } LLGestureComboBox::~LLGestureComboBox() -- cgit v1.2.3 From 4f51ab844859e0784324b70751b3d06dfd84cfa5 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 13 Jan 2010 14:27:15 +0200 Subject: fixed EXT-3821 [BSI] New IMs are not added as tabs --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 3 ++ indra/newview/llimfloater.cpp | 76 +++++++++++++++++++--------------- indra/newview/llimfloater.h | 4 ++ indra/newview/llimfloatercontainer.cpp | 11 +++++ indra/newview/llimfloatercontainer.h | 6 ++- 5 files changed, 65 insertions(+), 35 deletions(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 8c90fffa0a..c4de29e6ad 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -161,6 +161,9 @@ void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& nam { chiclet->setIMSessionName(name); chiclet->setOtherParticipantId(other_participant_id); + + LLIMFloater::onIMChicletCreated(session_id); + } else { diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 02eb29eedd..c52e749d64 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -361,35 +361,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) { if (!gIMMgr->hasSession(session_id)) return NULL; - // we should make sure all related chiclets are in place when the session is a voice call - // chiclets come firts, then comes IM window - if (gIMMgr->isVoiceCall(session_id)) - { - LLIMModel* im_model = LLIMModel::getInstance(); - LLBottomTray* b_tray = LLBottomTray::getInstance(); - - //*TODO hide that into Bottom tray - if (!b_tray->getChicletPanel()->findChiclet(session_id)) - { - LLIMChiclet* chiclet = b_tray->createIMChiclet(session_id); - if(chiclet) - { - chiclet->setIMSessionName(im_model->getName(session_id)); - chiclet->setOtherParticipantId(im_model->getOtherParticipantID(session_id)); - } - } - - LLIMWellWindow::getInstance()->addIMRow(session_id); - } - - bool not_existed = true; - - if(isChatMultiTab()) - { - LLIMFloater* target_floater = findInstance(session_id); - not_existed = NULL == target_floater; - } - else + if(!isChatMultiTab()) { //hide all LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("impanel"); @@ -404,19 +376,33 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) } } - LLIMFloater* floater = LLFloaterReg::showTypedInstance("impanel", session_id); + bool exist = findInstance(session_id); + + LLIMFloater* floater = getInstance(session_id); + if (!floater) return NULL; if(isChatMultiTab()) { + LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); + // do not add existed floaters to avoid adding torn off instances - if (not_existed) + if (!exist) { // LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END; // TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END; + + if (floater_container) + { + floater_container->addFloater(floater, TRUE, i_pt); + } + } - LLIMFloaterContainer* floater_container = LLFloaterReg::showTypedInstance("im_container"); - floater_container->addFloater(floater, TRUE, i_pt); + if (floater_container) + { + //selecting the panel resets a chiclet's counter + floater_container->selectFloater(floater); + floater_container->setVisible(TRUE); } } else @@ -443,8 +429,8 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) } // window is positioned, now we can show it. - floater->setVisible(true); } + floater->setVisible(TRUE); return floater; } @@ -538,6 +524,11 @@ LLIMFloater* LLIMFloater::findInstance(const LLUUID& session_id) return LLFloaterReg::findTypedInstance("impanel", session_id); } +LLIMFloater* LLIMFloater::getInstance(const LLUUID& session_id) +{ + return LLFloaterReg::getTypedInstance("impanel", session_id); +} + void LLIMFloater::sessionInitReplyReceived(const LLUUID& im_session_id) { mSessionInitialized = true; @@ -1016,3 +1007,20 @@ void LLIMFloater::sRemoveTypingIndicator(const LLSD& data) floater->removeTypingIndicator(); } + +void LLIMFloater::onIMChicletCreated( const LLUUID& session_id ) +{ + + if (isChatMultiTab()) + { + LLIMFloaterContainer* im_box = LLIMFloaterContainer::getInstance(); + if (!im_box) return; + + if (LLIMFloater::findInstance(session_id)) return; + + LLIMFloater* new_tab = LLIMFloater::getInstance(session_id); + + im_box->addFloater(new_tab, FALSE, LLTabContainer::END); + } + +} \ No newline at end of file diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 87ccad1d34..d9db385d06 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -74,6 +74,8 @@ public: static LLIMFloater* findInstance(const LLUUID& session_id); + static LLIMFloater* getInstance(const LLUUID& session_id); + void sessionInitReplyReceived(const LLUUID& im_session_id); // get new messages from LLIMModel @@ -112,6 +114,8 @@ public: //used as a callback on receiving new IM message static void sRemoveTypingIndicator(const LLSD& data); + static void onIMChicletCreated(const LLUUID& session_id); + private: // process focus events to set a currently active session /* virtual */ void onFocusLost(); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 2d7333f7e4..6cc985aef4 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llimfloatercontainer.h" +#include "llfloaterreg.h" // // LLIMFloaterContainer @@ -93,4 +94,14 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, } } +LLIMFloaterContainer* LLIMFloaterContainer::findInstance() +{ + return LLFloaterReg::findTypedInstance("im_container"); +} + +LLIMFloaterContainer* LLIMFloaterContainer::getInstance() +{ + return LLFloaterReg::getTypedInstance("im_container"); +} + // EOF diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index ead7cf4730..d4a542dfc2 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -52,7 +52,11 @@ public: LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); static LLFloater* getCurrentVoiceFloater(); - + + static LLIMFloaterContainer* findInstance(); + + static LLIMFloaterContainer* getInstance(); + protected: LLFloater* mActiveVoiceFloater; -- cgit v1.2.3 From ab5580d1e9f864c675a7ffc8e356a56463bb3e97 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Wed, 13 Jan 2010 14:54:21 +0200 Subject: Fixed linux build --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index c52e749d64..aee34eb0af 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -1023,4 +1023,4 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id ) im_box->addFloater(new_tab, FALSE, LLTabContainer::END); } -} \ No newline at end of file +} -- cgit v1.2.3 From 891f2b3a753a6f1526e8591c043a9d9280ae6612 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Wed, 13 Jan 2010 14:55:42 +0200 Subject: Fixed normal bug EXT - 4047 (No verb/action buttons at bottom of Group profile panel) --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 37 +++++++++++++++++++++- indra/newview/llpanelgroup.h | 4 +++ .../default/xui/en/panel_group_info_sidetray.xml | 18 ++++++++++- 3 files changed, 57 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 50f92ef116..daec793d75 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -151,6 +151,11 @@ BOOL LLPanelGroup::postBuild() button->setVisible(true); button->setEnabled(false); + button = getChild("btn_call"); + button->setClickedCallback(onBtnGroupCallClicked, this); + + button = getChild("btn_chat"); + button->setClickedCallback(onBtnGroupChatClicked, this); button = getChild("btn_join"); button->setVisible(false); @@ -215,6 +220,8 @@ void LLPanelGroup::reposButtons() reposButton("btn_create"); reposButton("btn_refresh"); reposButton("btn_cancel"); + reposButton("btn_chat"); + reposButton("btn_call"); } void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent ) @@ -262,6 +269,18 @@ void LLPanelGroup::onBtnApply(void* user_data) self->apply(); } +void LLPanelGroup::onBtnGroupCallClicked(void* user_data) +{ + LLPanelGroup* self = static_cast(user_data); + self->callGroup(); +} + +void LLPanelGroup::onBtnGroupChatClicked(void* user_data) +{ + LLPanelGroup* self = static_cast(user_data); + self->chatGroup(); +} + void LLPanelGroup::onBtnJoin() { lldebugs << "joining group: " << mID << llendl; @@ -349,6 +368,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) LLButton* button_create = findChild("btn_create"); LLButton* button_join = findChild("btn_join"); LLButton* button_cancel = findChild("btn_cancel"); + LLButton* button_call = findChild("btn_call"); + LLButton* button_chat = findChild("btn_chat"); bool is_null_group_id = group_id == LLUUID::null; @@ -362,6 +383,11 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(button_cancel) button_cancel->setVisible(!is_null_group_id); + if(button_call) + button_call->setVisible(!is_null_group_id); + if(button_chat) + button_chat->setVisible(!is_null_group_id); + getChild("prepend_founded_by")->setVisible(!is_null_group_id); LLAccordionCtrl* tab_ctrl = findChild("group_accordion"); @@ -431,7 +457,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) reposButtons(); } -bool LLPanelGroup::apply(LLPanelGroupTab* tab) +bool LLPanelGroup::apply(LLPanelGroupTab* tab) { if(!tab) return false; @@ -499,6 +525,15 @@ void LLPanelGroup::refreshData() mRefreshTimer.setTimerExpirySec(5); } +void LLPanelGroup::callGroup() +{ + LLGroupActions::startCall(getID()); +} + +void LLPanelGroup::chatGroup() +{ + LLGroupActions::startIM(getID()); +} void LLPanelGroup::showNotice(const std::string& subject, const std::string& message, diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index f6aefdb676..7ea5e67b44 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -74,6 +74,8 @@ public: bool apply(); void refreshData(); + void callGroup(); + void chatGroup(); virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); @@ -103,6 +105,8 @@ protected: static void onBtnApply(void*); static void onBtnRefresh(void*); + static void onBtnGroupCallClicked(void*); + static void onBtnGroupChatClicked(void*); void reposButton(const std::string& name); void reposButtons(); 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 c0db734f8c..8188048821 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 @@ -216,12 +216,28 @@ background_visible="true" visible="false" width="65" />-->