From 48ba1af15e149e111592b1e9bfbc8cce4c15d5c4 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 10 Dec 2009 11:30:20 -0800 Subject: EXT-3047 "Block" item in "more verbs" menu of mini inspector isn't disabled when resident is blocked EXT-3358 Cannot toggle Grid pulldown on login screen reviewed by Richard --- indra/newview/llinspectavatar.cpp | 52 ++++++++++++++++++++-- indra/newview/llpanellogin.cpp | 4 -- .../default/xui/en/menu_inspect_avatar_gear.xml | 12 ++++- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 39114d64b4..dae980feb1 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -115,7 +115,7 @@ private: void onClickTeleport(); void onClickInviteToGroup(); void onClickPay(); - void onClickBlock(); + void onToggleMute(); void onClickReport(); void onClickFreeze(); void onClickEject(); @@ -126,6 +126,8 @@ private: bool onVisibleZoomIn(); void onClickMuteVolume(); void onVolumeChange(const LLSD& data); + bool enableMute(); + bool enableUnmute(); // Is used to determine if "Add friend" option should be enabled in gear menu bool isNotFriend(); @@ -205,7 +207,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mCommitCallbackRegistrar.add("InspectAvatar.Teleport", boost::bind(&LLInspectAvatar::onClickTeleport, this)); mCommitCallbackRegistrar.add("InspectAvatar.InviteToGroup", boost::bind(&LLInspectAvatar::onClickInviteToGroup, this)); mCommitCallbackRegistrar.add("InspectAvatar.Pay", boost::bind(&LLInspectAvatar::onClickPay, this)); - mCommitCallbackRegistrar.add("InspectAvatar.Block", boost::bind(&LLInspectAvatar::onClickBlock, this)); + mCommitCallbackRegistrar.add("InspectAvatar.ToggleMute", boost::bind(&LLInspectAvatar::onToggleMute, this)); mCommitCallbackRegistrar.add("InspectAvatar.Freeze", boost::bind(&LLInspectAvatar::onClickFreeze, this)); mCommitCallbackRegistrar.add("InspectAvatar.Eject", @@ -221,6 +223,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", boost::bind(&LLInspectAvatar::onVisibleZoomIn, this)); mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this)); + mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this)); + mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this)); // can't make the properties request until the widgets are constructed // as it might return immediately, so do it in postBuild. @@ -625,10 +629,19 @@ void LLInspectAvatar::onClickPay() closeFloater(); } -void LLInspectAvatar::onClickBlock() +void LLInspectAvatar::onToggleMute() { LLMute mute(mAvatarID, mAvatarName, LLMute::AGENT); - LLMuteList::getInstance()->add(mute); + + if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) + { + LLMuteList::getInstance()->remove(mute); + } + else + { + LLMuteList::getInstance()->add(mute); + } + LLPanelBlockedList::showPanelAndSelect(mute.mID); closeFloater(); } @@ -663,6 +676,37 @@ void LLInspectAvatar::onClickFindOnMap() LLFloaterReg::showInstance("world_map"); } + +bool LLInspectAvatar::enableMute() +{ + bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + bool is_self = mAvatarID == gAgent.getID(); + + if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName)) + { + return true; + } + else + { + return false; + } +} + +bool LLInspectAvatar::enableUnmute() +{ + bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden"); + bool is_self = mAvatarID == gAgent.getID(); + + if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName)) + { + return true; + } + else + { + return false; + } +} + ////////////////////////////////////////////////////////////////////////////// // LLInspectAvatarUtil ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a729b8c06f..5e983f41c7 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -671,12 +671,8 @@ void LLPanelLogin::refreshLocation( bool force_visible ) sInstance->childSetVisible("start_location_combo", show_start); sInstance->childSetVisible("start_location_text", show_start); -#if LL_RELEASE_FOR_DOWNLOAD BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); sInstance->childSetVisible("server_combo", show_server); -#else - sInstance->childSetVisible("server_combo", TRUE); -#endif #endif } diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml index ef0bf72058..01df208850 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml @@ -48,7 +48,17 @@ label="Block" name="block"> + function="InspectAvatar.ToggleMute"/> + + + + + Date: Mon, 14 Dec 2009 18:01:51 -0500 Subject: EXT-3297 Input/Output Devices are cut off in Preferences --- .../default/xui/en/panel_preferences_sound.xml | 75 +--------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index d8e3f4ccfb..032721192d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -400,86 +400,13 @@ name="voice_input_device" top_pad="-2" width="200" /> - - My volume: - - - - Please wait - - - - - - Date: Mon, 14 Dec 2009 15:47:15 -0800 Subject: ext-3362 - about land -> objects -> most recented sorted by day reviewed by Mani --- indra/newview/llfloaterland.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 5b03292b22..0694143190 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1527,7 +1527,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo object_count_str = llformat("%d", object_count); item_params.columns.add().value(object_count_str).font(FONT).column("count"); - item_params.columns.add().value(formatted_time((time_t)most_recent_time)).font(FONT).column("mostrecent"); + item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date"); self->mOwnerList->addRow(item_params); -- cgit v1.2.3 From f890a9399b0b7063594617fce6ce68b0c6ea3576 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 15 Dec 2009 10:14:58 +0000 Subject: EXT-3394 EXT-3297: Putting back the prefs volume slider. Further discussions between Q and Joe resulted in the decision to keep the master gain control in the sound prefs panel. Reverting to Lis' original change, which should match exactly the state in viewer-2-0. --- .../default/xui/en/panel_preferences_sound.xml | 75 +++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 032721192d..d8e3f4ccfb 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -400,13 +400,86 @@ name="voice_input_device" top_pad="-2" width="200" /> + + My volume: + + + + Please wait + + + + + + Date: Tue, 15 Dec 2009 10:12:33 -0500 Subject: Adjusted button label vertical placement and input field text vertical placement to match. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/skins/default/xui/en/widgets/button.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7ac7a09d56..59252af362 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9303,7 +9303,7 @@ Type S32 Value - 4 + 5 UIMaxComboWidth diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml index d7aa71a441..51f85e65e2 100644 --- a/indra/newview/skins/default/xui/en/widgets/button.xml +++ b/indra/newview/skins/default/xui/en/widgets/button.xml @@ -18,6 +18,6 @@ font="SansSerifSmall" hover_glow_amount="0.15" halign="center" - pad_bottom="2" + pad_bottom="3" scale_image="true"> -- cgit v1.2.3 From 9feaf35e06a25a321f6490b666281077952003e4 Mon Sep 17 00:00:00 2001 From: Lis Pardi Date: Tue, 15 Dec 2009 12:02:23 -0500 Subject: ext-3360 [BSI] Dates do not fit in most recent list on about land --> objects --- indra/newview/skins/default/xui/en/floater_about_land.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 10b72144e7..62edfb57e9 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1093,11 +1093,11 @@ + width="60" /> + width="170" /> Date: Tue, 15 Dec 2009 09:54:50 -0800 Subject: EXT-3471 Tabs need a pad_bottom override attribute Added label_pad_bottom and label_pad_left for tab containers. --- indra/llui/lltabcontainer.cpp | 13 ++++++++----- indra/llui/lltabcontainer.h | 9 ++++++++- .../newview/skins/default/xui/en/widgets/tab_container.xml | 10 ++++++++-- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 2d9106923e..83e2e3db50 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -120,6 +120,8 @@ LLTabContainer::Params::Params() tab_min_width("tab_min_width"), tab_max_width("tab_max_width"), tab_height("tab_height"), + label_pad_bottom("label_pad_bottom"), + label_pad_left("label_pad_left"), tab_position("tab_position"), hide_tabs("hide_tabs", false), tab_padding_right("tab_padding_right"), @@ -145,6 +147,8 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mMinTabWidth(0), mMaxTabWidth(p.tab_max_width), mTabHeight(p.tab_height), + mLabelPadBottom(p.label_pad_bottom), + mLabelPadLeft(p.label_pad_left), mPrevArrowBtn(NULL), mNextArrowBtn(NULL), mIsVertical( p.tab_position == LEFT ), @@ -906,7 +910,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) if (placeholder) { - btn_rect.translate(0, -3); // *TODO: make configurable + btn_rect.translate(0, -6); // *TODO: make configurable LLTextBox::Params params; params.name(trimmed_label); params.rect(btn_rect); @@ -933,6 +937,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.image_selected(mMiddleTabParams.tab_left_image_selected); p.scale_image(true); p.font_halign = mFontHalign; + p.pad_bottom( mLabelPadBottom ); p.tab_stop(false); p.label_shadow(false); if (indent) @@ -956,8 +961,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.tab_stop(false); p.label_shadow(false); // Try to squeeze in a bit more text - p.pad_left(4); + p.pad_left( mLabelPadLeft ); p.pad_right(2); + p.pad_bottom( mLabelPadBottom ); p.font_halign = mFontHalign; p.follows.flags = FOLLOWS_LEFT; p.follows.flags = FOLLOWS_LEFT; @@ -1897,6 +1903,3 @@ void LLTabContainer::commitHoveredButton(S32 x, S32 y) } } } - - - diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index be9c6c7d06..5d0f194bf9 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -79,7 +79,9 @@ public: Optional tab_width, tab_min_width, tab_max_width, - tab_height; + tab_height, + label_pad_bottom, + label_pad_left; Optional hide_tabs; Optional tab_padding_right; @@ -261,6 +263,11 @@ private: S32 mTotalTabWidth; S32 mTabHeight; + // Padding under the text labels of tab buttons + S32 mLabelPadBottom; + // Padding to the left of text labels of tab buttons + S32 mLabelPadLeft; + LLFrameTimer mDragAndDropDelayTimer; LLFontGL::HAlign mFontHalign; diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 477c6fb8b8..0174782c5b 100644 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -1,9 +1,15 @@ + + tab_height="21" + label_pad_bottom="2" + label_pad_left="4"> - \ No newline at end of file + -- cgit v1.2.3 From 6d411f006dc1bf56bc5a2f11ae746a8b0b59cc0c Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 15 Dec 2009 09:55:19 -0800 Subject: Removed "Show Side Tray" option from login debug menu It doesn't work and makes my viewer hang. --- indra/newview/skins/default/xui/en/menu_login.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 53be40d7fd..ba3bcc93b3 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -179,12 +179,14 @@ parameter="ui_preview" /> + Date: Tue, 15 Dec 2009 11:28:28 -0800 Subject: EXT-3478 - crazy scrollbars in profile when user has a long name --- .../skins/default/xui/en/panel_profile_view.xml | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index 8e683bffc1..6324ec2bd8 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -26,18 +26,20 @@ top="2" width="23" /> + allow_scroll="false" + bg_visible="false" + read_only = "true" + follows="top|left|right" + font="SansSerifHugeBold" + height="29" + layout="topleft" + left_pad="10" + name="user_name" + text_color="white" + top="0" + value="(Loading...)" + use_ellipses="true" + width="275" /> Date: Tue, 15 Dec 2009 13:04:38 -0800 Subject: EXT-3406 choosing About Land from parcel context menu toggles window Fixed to just show the window. --- indra/newview/skins/default/xui/en/menu_land.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml index d88a2f8d25..bf797555c5 100644 --- a/indra/newview/skins/default/xui/en/menu_land.xml +++ b/indra/newview/skins/default/xui/en/menu_land.xml @@ -6,7 +6,7 @@ label="About Land" name="Place Information..."> -- cgit v1.2.3 From 699e2e027bf241af6c0dec5a03a51422911b4e0f Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 15 Dec 2009 14:21:04 -0800 Subject: added "value" attribute to radio_items to better support arbitrary data selection moved LLRadioCtrl to internal implementation of LLRadioGroup reviewed by Leyla --- indra/llui/llradiogroup.cpp | 104 ++++++++++++++------- indra/llui/llradiogroup.h | 47 +++------- indra/llui/lluictrlfactory.cpp | 9 +- indra/llui/lluictrlfactory.h | 75 ++++++++------- indra/llui/llview.cpp | 2 - indra/newview/llfloatertools.h | 1 - .../skins/default/xui/en/floater_customize.xml | 2 + .../default/xui/en/floater_settings_debug.xml | 43 +++++---- .../default/xui/en/panel_preferences_chat.xml | 7 +- .../default/xui/en/panel_preferences_general.xml | 3 + .../default/xui/en/panel_preferences_graphics1.xml | 4 +- .../default/xui/en/panel_preferences_setup.xml | 38 ++++---- 12 files changed, 176 insertions(+), 159 deletions(-) diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 86bd2f05ce..74e30cd633 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -43,15 +43,43 @@ #include "llui.h" #include "llfocusmgr.h" #include "lluictrlfactory.h" +#include "llsdutil.h" static LLDefaultChildRegistry::Register r1("radio_group"); -static RadioGroupRegistry::Register register_radio_ctrl("radio_item"); +/* + * An invisible view containing multiple mutually exclusive toggling + * buttons (usually radio buttons). Automatically handles the mutex + * condition by highlighting only one button at a time. + */ +class LLRadioCtrl : public LLCheckBoxCtrl +{ +public: + typedef LLRadioGroup::ItemParams Params; + /*virtual*/ ~LLRadioCtrl(); + /*virtual*/ void setValue(const LLSD& value); + + /*virtual*/ BOOL postBuild(); + + LLSD getPayload() { return mPayload; } + // Ensure label is in an attribute, not the contents + static void setupParamsForExport(Params& p, LLView* parent); + +protected: + LLRadioCtrl(const LLRadioGroup::ItemParams& p); + friend class LLUICtrlFactory; + + LLSD mPayload; // stores data that this item represents in the radio group +}; +static LLWidgetNameRegistry::StaticRegistrar register_radio_item(&typeid(LLRadioGroup::ItemParams), "radio_item"); LLRadioGroup::Params::Params() -: has_border("draw_border") +: has_border("draw_border"), + items("item") { + addSynonym(items, "radio_item"); + name = "radio_group"; mouse_opaque = true; follows.flags = FOLLOWS_LEFT | FOLLOWS_TOP; @@ -76,6 +104,24 @@ LLRadioGroup::LLRadioGroup(const LLRadioGroup::Params& p) } } +void LLRadioGroup::initFromParams(const Params& p) +{ + LLUICtrl::initFromParams(p); + for (LLInitParam::ParamIterator::const_iterator it = p.items().begin(); + it != p.items().end(); + ++it) + { + LLRadioGroup::ItemParams item_params(*it); + item_params.font.setIfNotProvided(mFont); // apply radio group font by default + item_params.commit_callback.function = boost::bind(&LLRadioGroup::onClickButton, this, _1); + item_params.from_xui = p.from_xui; + + LLRadioCtrl* item = LLUICtrlFactory::create(item_params, this); + mRadioButtons.push_back(item); + } +} + + LLRadioGroup::~LLRadioGroup() { } @@ -141,7 +187,7 @@ void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled) BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) { - if (index < 0 || index >= (S32)mRadioButtons.size()) + if (index < 0 || (S32)mRadioButtons.size() <= index ) { return FALSE; } @@ -170,7 +216,7 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) if (!from_event) { - setControlValue(getSelectedIndex()); + setControlValue(getValue()); } return TRUE; @@ -235,27 +281,6 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) return handled; } - -// When adding a child button, we need to ensure that the radio -// group gets a message when the button is clicked. - -/*virtual*/ -bool LLRadioGroup::addChild(LLView* view, S32 tab_group) -{ - bool res = LLView::addChild(view, tab_group); - if (res) - { - LLRadioCtrl* radio_ctrl = dynamic_cast(view); - if (radio_ctrl) - { - radio_ctrl->setFont(mFont); - radio_ctrl->setCommitCallback(boost::bind(&LLRadioGroup::onClickButton, this, _1)); - mRadioButtons.push_back(radio_ctrl); - } - } - return res; -} - BOOL LLRadioGroup::handleMouseDown(S32 x, S32 y, MASK mask) { // grab focus preemptively, before child button takes mousecapture @@ -302,13 +327,12 @@ void LLRadioGroup::onClickButton(LLUICtrl* ctrl) void LLRadioGroup::setValue( const LLSD& value ) { - std::string value_name = value.asString(); int idx = 0; for (button_list_t::const_iterator iter = mRadioButtons.begin(); iter != mRadioButtons.end(); ++iter) { LLRadioCtrl* radio = *iter; - if (radio->getName() == value_name) + if (llsd_equals(radio->getPayload(), value)) { setSelectedIndex(idx); idx = -1; @@ -325,7 +349,7 @@ void LLRadioGroup::setValue( const LLSD& value ) } else { - llwarns << "LLRadioGroup::setValue: value not found: " << value_name << llendl; + llwarns << "LLRadioGroup::setValue: value not found: " << value.asString() << llendl; } } } @@ -337,7 +361,7 @@ LLSD LLRadioGroup::getValue() const for (button_list_t::const_iterator iter = mRadioButtons.begin(); iter != mRadioButtons.end(); ++iter) { - if (idx == index) return LLSD((*iter)->getName()); + if (idx == index) return LLSD((*iter)->getPayload()); ++idx; } return LLSD(); @@ -357,11 +381,10 @@ LLUUID LLRadioGroup::getCurrentID() const BOOL LLRadioGroup::setSelectedByValue(const LLSD& value, BOOL selected) { S32 idx = 0; - std::string value_string = value.asString(); for (button_list_t::const_iterator iter = mRadioButtons.begin(); iter != mRadioButtons.end(); ++iter) { - if((*iter)->getName() == value_string) + if(llsd_equals((*iter)->getPayload(), value)) { setSelectedIndex(idx); return TRUE; @@ -380,11 +403,10 @@ LLSD LLRadioGroup::getSelectedValue() BOOL LLRadioGroup::isSelected(const LLSD& value) const { S32 idx = 0; - std::string value_string = value.asString(); for (button_list_t::const_iterator iter = mRadioButtons.begin(); iter != mRadioButtons.end(); ++iter) { - if((*iter)->getName() == value_string) + if(llsd_equals((*iter)->getPayload(), value)) { if (idx == mSelectedIndex) { @@ -406,9 +428,21 @@ BOOL LLRadioGroup::operateOnAll(EOperation op) return FALSE; } -LLRadioCtrl::LLRadioCtrl(const LLRadioCtrl::Params& p) - : LLCheckBoxCtrl(p) +LLRadioGroup::ItemParams::ItemParams() +: value("value") { + addSynonym(value, "initial_value"); +} + +LLRadioCtrl::LLRadioCtrl(const LLRadioGroup::ItemParams& p) +: LLCheckBoxCtrl(p), + mPayload(p.value) +{ + // use name as default "Value" for backwards compatibility + if (!p.value.isProvided()) + { + mPayload = p.name(); + } } BOOL LLRadioCtrl::postBuild() diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h index 1e9b5115f8..2edfd7c2ca 100644 --- a/indra/llui/llradiogroup.h +++ b/indra/llui/llradiogroup.h @@ -37,35 +37,6 @@ #include "llcheckboxctrl.h" #include "llctrlselectioninterface.h" - -/* - * An invisible view containing multiple mutually exclusive toggling - * buttons (usually radio buttons). Automatically handles the mutex - * condition by highlighting only one button at a time. - */ -class LLRadioCtrl : public LLCheckBoxCtrl -{ -public: - struct Params : public LLInitParam::Block - {}; - - /*virtual*/ ~LLRadioCtrl(); - /*virtual*/ void setValue(const LLSD& value); - - /*virtual*/ BOOL postBuild(); - - // Ensure label is in an attribute, not the contents - static void setupParamsForExport(Params& p, LLView* parent); - -protected: - LLRadioCtrl(const Params& p); - friend class LLUICtrlFactory; -}; - - -struct RadioGroupRegistry : public LLChildRegistry -{}; - /* * An invisible view containing multiple mutually exclusive toggling * buttons (usually radio buttons). Automatically handles the mutex @@ -76,25 +47,31 @@ class LLRadioGroup { public: + struct ItemParams : public LLInitParam::Block + { + Optional value; + ItemParams(); + }; + struct Params : public LLInitParam::Block { - Optional has_border; + Optional has_border; + Multiple > items; Params(); }; - // my valid children are stored in this registry - typedef RadioGroupRegistry child_registry_t; - protected: LLRadioGroup(const Params&); friend class LLUICtrlFactory; public: + + /*virtual*/ void initFromParams(const Params&); + virtual ~LLRadioGroup(); virtual BOOL postBuild(); - virtual bool addChild(LLView* view, S32 tab_group = 0); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleKeyHere(KEY key, MASK mask); @@ -134,7 +111,7 @@ public: private: const LLFontGL* mFont; S32 mSelectedIndex; - typedef std::vector button_list_t; + typedef std::vector button_list_t; button_list_t mRadioButtons; BOOL mHasBorder; diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 3643bf44f7..6a7879c8c2 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -393,7 +393,6 @@ BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& na //static void LLUICtrlFactory::setCtrlParent(LLView* view, LLView* parent, S32 tab_group) { - if (tab_group < 0) tab_group = parent->getLastTabGroup(); parent->addChild(view, tab_group); } @@ -452,10 +451,4 @@ dummy_widget_creator_func_t* LLUICtrlFactory::getDefaultWidgetFunc(const std::ty const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_type) { return LLWidgetNameRegistry::instance().getValue(widget_type); -} - -// static -void LLUICtrlFactory::connect(LLView* parent, LLView* child) -{ - parent->addChild(child); -} +} \ No newline at end of file diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 55d7d745eb..e4bac48fd3 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -180,34 +180,55 @@ public: void popFactoryFunctions(); template - static T* create(typename T::Params& params, LLView* parent = NULL) + static T* createWidget(typename T::Params& params, LLView* parent = NULL) { - //#pragma message("Generating LLUICtrlFactory::create") - params.fillFrom(ParamDefaults::instance().get()); - //S32 foo = "test"; + // Apply layout transformations, usually munging rect + T::setupParams(params, parent); + + T* widget = NULL; if (!params.validateBlock()) { llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl; + //return NULL; } - T* widget = new T(params); - widget->initFromParams(params); + + { + LLFastTimer timer(FTM_WIDGET_CONSTRUCTION); + widget = new T(params); + } + { + LLFastTimer timer(FTM_INIT_FROM_PARAMS); + widget->initFromParams(params); + } + if (parent) { - connect(parent, widget); + S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : parent->getLastTabGroup(); + setCtrlParent(widget, parent, tab_group); } return widget; } - // fix for gcc template instantiation annoyance - static void connect(LLView* parent, LLView* child); - + template + static T* create(typename T::Params& params, LLView* parent = NULL) + { + params.fillFrom(ParamDefaults::instance().get()); + + T* widget = createWidget(params, parent); + if (widget) + { + widget->postBuild(); + } + + return widget; + } + LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t&, LLXMLNodePtr output_node ); template static T* createFromFile(const std::string &filename, LLView *parent, const widget_registry_t& registry, LLXMLNodePtr output_node = NULL) { - //#pragma message("Generating LLUICtrlFactory::createFromFile") T* widget = NULL; std::string skinned_filename = findSkinnedFilename(filename); @@ -272,7 +293,6 @@ fail: { LLFastTimer timer(FTM_WIDGET_SETUP); - //#pragma message("Generating LLUICtrlFactory::defaultBuilder") typename T::Params params(getDefaultParams()); LLXUIParser::instance().readXUI(node, params, LLUICtrlFactory::getInstance()->getCurFileName()); @@ -289,37 +309,16 @@ fail: output_node, output_params, &default_params); } - // Apply layout transformations, usually munging rect - T::setupParams(params, parent); - - if (!params.validateBlock()) - { - llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl; - } - T* widget; - { - LLFastTimer timer(FTM_WIDGET_CONSTRUCTION); - widget = new T(params); - } - { - LLFastTimer timer(FTM_INIT_FROM_PARAMS); - widget->initFromParams(params); - } + params.from_xui = true; - if (parent) - { - S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : -1; - setCtrlParent(widget, parent, tab_group); - } - - typedef typename T::child_registry_t registry_t; + T* widget = createWidget(params, parent); - createChildren(widget, node, registry_t::instance(), output_node); + createChildren(widget, node, typename T::child_registry_t::instance(), output_node); - if (!widget->postBuild()) + if (widget && !widget->postBuild()) { delete widget; - return NULL; + widget = NULL; } return widget; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 8917e4b813..7932b749a8 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -2494,8 +2494,6 @@ void LLView::setupParams(LLView::Params& p, LLView* parent) const S32 VPAD = 4; const S32 MIN_WIDGET_HEIGHT = 10; - p.from_xui(true); - // *NOTE: This will confuse export of floater/panel coordinates unless // the default is also "topleft". JC if (p.layout().empty() && parent) diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 05a88a31d3..2ec7ec46af 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -46,7 +46,6 @@ class LLPanelVolume; class LLPanelContents; class LLPanelFace; class LLPanelLandInfo; -class LLRadioCtrl; class LLRadioGroup; class LLSlider; class LLTabContainer; diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 275ab5bb8b..9d3694873e 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -167,6 +167,7 @@ left="1" name="radio" top="1" + value="0" width="82" /> diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml index ffb11f3f18..3ed2bd7206 100644 --- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml @@ -30,26 +30,29 @@ top_pad="10" width="320" word_wrap="true" /> - - - - - + + + + + + width="440"> @@ -340,6 +343,7 @@ layout="topleft" left="0" name="radio" + value="0" top="0" width="150" /> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index b5c6b637e5..3718a65b8c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -217,6 +217,7 @@ layout="topleft" left="0" name="radio" + value="0" top_pad="0" width="98" /> 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 04985d0fa9..f97ccafecc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -28,7 +28,7 @@ follows="left|top" height="15" increment="0.025" - initial_valu="1" + initial_value="1" layout="topleft" left_delta="52" max_val="1.4" @@ -656,6 +656,7 @@ layout="topleft" left="3" name="SunMoon" + value="0" top="3" width="156" /> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index a7def5306e..e06c15502c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -268,24 +268,26 @@ name="use_external_browser" top_pad="4" width="480"> - - + + Date: Tue, 15 Dec 2009 15:59:16 -0800 Subject: EXT-3494 Sanitize floater show versus toggle Eliminated legacy "ShowFloater" method in favor of Floater.Show and Floater.Toggle. Wrote new custom show methods where needed. Reviewed with Leyla. --- indra/newview/llviewermenu.cpp | 66 ++++++++-------------- .../skins/default/xui/en/menu_attachment_self.xml | 23 +------- .../skins/default/xui/en/menu_avatar_self.xml | 11 +--- .../default/xui/en/menu_inspect_self_gear.xml | 3 +- indra/newview/skins/default/xui/en/menu_land.xml | 3 +- indra/newview/skins/default/xui/en/menu_login.xml | 18 +++--- .../newview/skins/default/xui/en/menu_mini_map.xml | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 35 ++---------- .../skins/default/xui/en/panel_place_profile.xml | 4 +- 9 files changed, 44 insertions(+), 121 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0be0b56bc3..075c4a30fa 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5520,47 +5520,27 @@ void handle_viewer_disable_message_log(void*) gMessageSystem->stopLogging(); } -class LLShowFloater : public view_listener_t +void handle_customize_avatar() { - bool handleEvent(const LLSD& userdata) + if (gAgentWearables.areWearablesLoaded()) { - std::string floater_name = userdata.asString(); - if (floater_name == "appearance") - { - if (gAgentWearables.areWearablesLoaded()) - { - gAgent.changeCameraToCustomizeAvatar(); - } - } - else if (floater_name == "toolbar") - { - LLToolBar::toggle(NULL); - } - else if (floater_name == "buy land") - { - handle_buy_land(); - } - else if (floater_name == "script errors") - { - LLFloaterScriptDebug::show(LLUUID::null); - } - else if (floater_name == "complaint reporter") - { - // Prevent menu from appearing in screen shot. - gMenuHolder->hideMenus(); - LLFloaterReporter::showFromMenu(COMPLAINT_REPORT); - } - else if (floater_name == "buy currency") - { - LLFloaterBuyCurrency::buyCurrency(); - } - else - { - LLFloaterReg::toggleInstance(floater_name); - } - return true; + gAgent.changeCameraToCustomizeAvatar(); } -}; +} + +void handle_report_abuse() +{ + // Prevent menu from appearing in screen shot. + gMenuHolder->hideMenus(); + LLFloaterReporter::showFromMenu(COMPLAINT_REPORT); +} + +void handle_buy_currency() +{ + LLFloaterBuyCurrency::buyCurrency(); +} + + class LLFloaterVisible : public view_listener_t { @@ -5568,11 +5548,6 @@ class LLFloaterVisible : public view_listener_t { std::string floater_name = userdata.asString(); bool new_value = false; - if (floater_name == "toolbar") - { - new_value = LLToolBar::visible(NULL); - } - else { new_value = LLFloaterReg::instanceVisible(floater_name); } @@ -7607,6 +7582,7 @@ void initialize_menus() view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); + commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar)); // View menu view_listener_t::addMenu(new LLViewMouselook(), "View.Mouselook"); @@ -7931,9 +7907,11 @@ void initialize_menus() view_listener_t::addMenu(new LLLandEdit(), "Land.Edit"); view_listener_t::addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass"); + commit.add("Land.Buy", boost::bind(&handle_buy_land)); // Generic actions - view_listener_t::addMenu(new LLShowFloater(), "ShowFloater"); + commit.add("ReportAbuse", boost::bind(&handle_report_abuse)); + commit.add("BuyCurrency", boost::bind(&handle_buy_currency)); view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index c85dbbb1bc..281ec5a7c3 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -54,25 +54,6 @@ - @@ -88,11 +69,9 @@ + function="CustomizeAvatar" /> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index c6ce612a76..9212d2d648 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -187,8 +187,7 @@ layout="topleft" name="Appearance..."> + function="CustomizeAvatar" /> @@ -200,14 +199,6 @@ function="SideTray.PanelPeopleTab" parameter="friends_panel" /> - + function="CustomizeAvatar" /> diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml index bf797555c5..cc6d8ad9c1 100644 --- a/indra/newview/skins/default/xui/en/menu_land.xml +++ b/indra/newview/skins/default/xui/en/menu_land.xml @@ -28,8 +28,7 @@ label="Buy This Land" name="Land Buy"> + function="Land.Buy" /> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index ba3bcc93b3..7a0b11872a 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -16,7 +16,7 @@ name="Preferences..." shortcut="control|P"> @@ -53,7 +53,7 @@ label="About [APP_NAME]" name="About Second Life"> @@ -175,7 +175,7 @@ name="UI Preview Tool" shortcut="control|T"> @@ -196,7 +196,7 @@ name="Textbox" shortcut="control|1"> @@ -237,14 +237,14 @@ label="Show TOS" name="TOS"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0891afaf76..71b67594e5 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -32,8 +32,7 @@ layout="topleft" name="Buy and Sell L$"> + function="BuyCurrency" /> @@ -50,8 +49,7 @@ layout="topleft" name="Appearance"> + function="CustomizeAvatar" /> @@ -82,7 +80,7 @@ name="Gestures" shortcut="control|G"> + function="Land.Buy" /> @@ -295,7 +292,7 @@ layout="topleft" name="My Land"> - + function="ReportAbuse" /> - - - - @@ -652,7 +652,7 @@ tab_stop="false" width="105"> -- cgit v1.2.3 From 679983b33bc2ce577e63557b56d3d94668972ea1 Mon Sep 17 00:00:00 2001 From: Erica Date: Tue, 15 Dec 2009 16:05:37 -0800 Subject: EXT-3484 Create Notice button is illegible (old label was overriding art) --- indra/newview/skins/default/xui/en/panel_group_notices.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 1b70b95a93..e096715cee 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -78,7 +78,6 @@ Maximum 200 per group daily image_unselected="AddItem_Off" image_disabled="AddItem_Disabled" layout="topleft" - label="Create a new notice" left="5" name="create_new_notice" tool_tip="Create a new notice" -- cgit v1.2.3 From b76c4399833c202f6cc8a6fb903fee82e8fcd3f3 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 15 Dec 2009 16:25:11 -0800 Subject: EXT-2649 Replace 'Advanced > Set Away After 30 Minutes' with Away time options EXT-2649 [BSI] Confirm on Drop EXT-3416 Can't name a new gesture on creation (and renaming is HARD) reviewed by James --- indra/newview/app_settings/settings.xml | 13 +--- indra/newview/llappviewer.cpp | 2 +- indra/newview/llpreview.cpp | 7 ++ indra/newview/llpreviewgesture.cpp | 4 + indra/newview/llviewermenu.cpp | 79 ++++++++++++-------- indra/newview/llviewerwindow.cpp | 2 +- .../default/xui/en/floater_preview_gesture.xml | 24 +++++- indra/newview/skins/default/xui/en/menu_viewer.xml | 11 --- .../newview/skins/default/xui/en/notifications.xml | 13 ++++ .../default/xui/en/panel_preferences_general.xml | 85 +++++++++++----------- 10 files changed, 143 insertions(+), 97 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 59252af362..37b55fdd86 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8,7 +8,7 @@ Persist 1 Type - F32 + S32 Value 300.0 @@ -45,17 +45,6 @@ Value 0 - AllowIdleAFK - - Comment - Automatically set AFK (away from keyboard) mode when idle - Persist - 1 - Type - Boolean - Value - 1 - AllowMultipleViewers Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 90b8cd9572..a4dee14e40 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -332,7 +332,7 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ; void idle_afk_check() { // check idle timers - if (gSavedSettings.getBOOL("AllowIdleAFK") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout"))) + if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getS32("AFKTimeout"))) { gAgent.setAFK(); } diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index c95882931b..0b0c03e9e9 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -150,6 +150,13 @@ void LLPreview::onCommit() LLPointer new_item = new LLViewerInventoryItem(item); new_item->setDescription(childGetText("desc")); + + std::string new_name = childGetText("name"); + if ( (new_item->getName() != new_name) && !new_name.empty()) + { + new_item->rename(childGetText("name")); + } + if(mObjectUUID.notNull()) { // must be in an object diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 30cb21c83c..e2eee6708a 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -495,6 +495,10 @@ BOOL LLPreviewGesture::postBuild() childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); + + childSetCommitCallback("name", LLPreview::onText, this); + childSetText("name", item->getName()); + childSetPrevalidate("name", &LLLineEditor::prevalidateASCIIPrintableNoPipe); } return LLPreview::postBuild(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0be0b56bc3..91d305bee7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5851,47 +5851,68 @@ void confirm_replace_attachment(S32 option, void* user_data) } } -class LLAttachmentDrop : public view_listener_t +bool callback_attachment_drop(const LLSD& notification, const LLSD& response) { - bool handleEvent(const LLSD& userdata) + // Called when the user clicked on an object attached to them + // and selected "Drop". + LLUUID object_id = notification["payload"]["object_id"].asUUID(); + LLViewerObject *object = gObjectList.findObject(object_id); + + if (!object) { - // Called when the user clicked on an object attached to them - // and selected "Drop". - LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - if (!object) - { - llwarns << "handle_drop_attachment() - no object to drop" << llendl; - return true; - } + llwarns << "handle_drop_attachment() - no object to drop" << llendl; + return true; + } - LLViewerObject *parent = (LLViewerObject*)object->getParent(); - while (parent) + LLViewerObject *parent = (LLViewerObject*)object->getParent(); + while (parent) + { + if(parent->isAvatar()) { - if(parent->isAvatar()) - { - break; - } - object = parent; - parent = (LLViewerObject*)parent->getParent(); + break; } + object = parent; + parent = (LLViewerObject*)parent->getParent(); + } - if (!object) + if (!object) + { + llwarns << "handle_detach() - no object to detach" << llendl; + return true; + } + + if (object->isAvatar()) + { + llwarns << "Trying to detach avatar from avatar." << llendl; + return true; + } + + // reselect the object + LLSelectMgr::getInstance()->selectObjectAndFamily(object); + + LLSelectMgr::getInstance()->sendDropAttachment(); + + return true; +} + +class LLAttachmentDrop : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLSD payload; + LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + + if (object) { - llwarns << "handle_detach() - no object to detach" << llendl; - return true; + payload["object_id"] = object->getID(); } - - if (object->isAvatar()) + else { - llwarns << "Trying to detach avatar from avatar." << llendl; + llwarns << "Drop object not found" << llendl; return true; } - // The sendDropAttachment() method works on the list of selected - // objects. Thus we need to clear the list, make sure it only - // contains the object the user clicked, send the message, - // then clear the list. - LLSelectMgr::getInstance()->sendDropAttachment(); + LLNotificationsUtil::add("AttachmentDrop", LLSD(), payload, &callback_attachment_drop); return true; } }; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 966aeba25c..0ddc517754 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1014,7 +1014,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) { mActive = FALSE; - if (gSavedSettings.getBOOL("AllowIdleAFK")) + if (gSavedSettings.getS32("AFKTimeout")) { gAgent.setAFK(); } diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index 8cc2c91ef5..3dc546aee3 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -39,6 +39,28 @@ name="Title"> Gesture: [NAME] + + Name: + + Description: diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0891afaf76..aff28fd8c8 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1110,17 +1110,6 @@ name="Advanced" tear_off="true" visible="false"> - - - - + + You are about to drop your attachment. + Are you sure you want to continue? + + + - - Away timeout: - - - - seconds - + + Away timeout: + + + + + + + + Date: Tue, 15 Dec 2009 16:54:32 -0800 Subject: fixed enter not performing login --- indra/newview/llpanellogin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a5bfa18851..48adfd0011 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -249,7 +249,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("connect_btn", onClickConnect, this); - getChild("login_widgets")->setDefaultBtn("connect_btn"); + getChild("login")->setDefaultBtn("connect_btn"); std::string channel = gSavedSettings.getString("VersionChannelName"); std::string version = llformat("%s (%d)", -- cgit v1.2.3 From 1bb4c9e1c9e9d797d4f49152afe4ff80ba22405d Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 15 Dec 2009 17:09:35 -0800 Subject: EXT-3446 Manage Telehub floater opens below buildtools Took out custom positioning code, set left edge to 300 in XML --- indra/newview/llfloatertelehub.cpp | 11 ----------- indra/newview/skins/default/xui/en/floater_telehub.xml | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp index 9841cd2796..816181643f 100644 --- a/indra/newview/llfloatertelehub.cpp +++ b/indra/newview/llfloatertelehub.cpp @@ -84,17 +84,6 @@ void LLFloaterTelehub::onOpen(const LLSD& key) LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompTranslate::getInstance() ); - // Find tools floater, glue to bottom - if (gFloaterTools) - { - LLRect tools_rect = gFloaterTools->getRect(); - S32 our_width = getRect().getWidth(); - S32 our_height = getRect().getHeight(); - LLRect our_rect; - our_rect.setLeftTopAndSize(tools_rect.mLeft, tools_rect.mBottom, our_width, our_height); - setRect(our_rect); - } - sendTelehubInfoRequest(); mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); diff --git a/indra/newview/skins/default/xui/en/floater_telehub.xml b/indra/newview/skins/default/xui/en/floater_telehub.xml index bb463edd4d..da412ed8a0 100644 --- a/indra/newview/skins/default/xui/en/floater_telehub.xml +++ b/indra/newview/skins/default/xui/en/floater_telehub.xml @@ -1,8 +1,10 @@ + Date: Tue, 15 Dec 2009 18:47:46 -0800 Subject: EXT-2947 [BSI] Group Chat and Instant Message floaters missing minimze button, confusing functionality on X button --- .../skins/default/xui/en/floater_camera.xml | 6 +++--- .../skins/default/xui/en/floater_im_session.xml | 6 +++--- .../skins/default/xui/en/floater_moveview.xml | 22 +++++++++++----------- .../skins/default/xui/en/floater_nearby_chat.xml | 18 +++++++++--------- .../default/xui/en/floater_voice_controls.xml | 22 ++++++++++++---------- .../skins/default/xui/en/panel_chat_header.xml | 4 ++-- 6 files changed, 40 insertions(+), 38 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index d378b427f1..a797d54749 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -2,8 +2,8 @@ @@ -130,7 +130,7 @@ Date: Mon, 21 Dec 2009 19:45:20 +0200 Subject: Additional commit for EXT-3581: the code of updating of speakers order is moved to a separate method --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 4 ++++ indra/newview/llpanelimcontrolpanel.cpp | 5 ++--- indra/newview/llparticipantlist.cpp | 4 ++++ indra/newview/llparticipantlist.h | 5 +++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 1acdb96da6..2521bde8fa 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -153,6 +153,10 @@ void LLCallFloater::draw() setModeratorMutedVoice(is_moderator_muted); } + // Need to resort the participant list if it's in sort by recent speaker order. + if (mPaticipants) + mPaticipants->updateRecentSpeakersOrder(); + LLDockableFloater::draw(); } diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 8d03f9e686..3f309b3bf5 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -247,10 +247,9 @@ void LLPanelGroupControlPanel::draw() //Remove event does not raised until speakerp->mActivityTimer.hasExpired() is false, see LLSpeakerManager::update() //so we need update it to raise needed event mSpeakerManager->update(true); - // Need to refresh participants to display ones not in voice as disabled and - // resort the avatar list if it's in sort by recent speaker order. + // Need to resort the participant list if it's in sort by recent speaker order. if (mParticipantList) - mParticipantList->refreshVoiceState(); + mParticipantList->updateRecentSpeakersOrder(); LLPanelChatControlPanel::draw(); } diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 8fb4063ea7..dfe0b504bd 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -227,6 +227,10 @@ void LLParticipantList::refreshVoiceState() item->setOnline(!is_in_voice); } } +} + +void LLParticipantList::updateRecentSpeakersOrder() +{ if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder()) { // Resort avatar list diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 21eda86edd..515529452b 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -65,6 +65,11 @@ class LLParticipantList */ void refreshVoiceState(); + /** + * Refreshes the participant list if it's in sort by recent speaker order. + */ + void updateRecentSpeakersOrder(); + protected: /** * LLSpeakerMgr event handlers -- cgit v1.2.3 From 5aaaa4e9473615c06fde9e19f34d309aa7b9fb0f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 21 Dec 2009 12:56:52 -0500 Subject: EXT-3567 : Folders hsould show as "Loading..." when contents are being fetched Name change "DontShowInHierarchy"->"Hidden". --- indra/newview/llfolderview.cpp | 6 +++--- indra/newview/llfolderviewitem.cpp | 10 +++++----- indra/newview/llfolderviewitem.h | 9 ++++++--- indra/newview/llinventorypanel.cpp | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 8b05f8614d..9cca1b07db 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -751,7 +751,7 @@ void LLFolderView::sanitizeSelection() } // Don't allow invisible items (such as root folders) to be selected. - if (item->getDontShowInHierarchy()) + if (item->getHidden()) { items_to_remove.push_back(item); } @@ -774,7 +774,7 @@ void LLFolderView::sanitizeSelection() parent_folder; parent_folder = parent_folder->getParentFolder()) { - if (parent_folder->potentiallyVisible() && !parent_folder->getDontShowInHierarchy()) + if (parent_folder->potentiallyVisible() && !parent_folder->getHidden()) { // give initial selection to first ancestor folder that potentially passes the filter if (!new_selection) @@ -796,7 +796,7 @@ void LLFolderView::sanitizeSelection() // nothing selected to start with, so pick "My Inventory" as best guess new_selection = getItemByID(gInventory.getRootFolderID()); // ... except if it's hidden from the UI. - if (new_selection && new_selection->getDontShowInHierarchy()) + if (new_selection && new_selection->getHidden()) { new_selection = NULL; } diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index bfd9d6dca7..0be449fc9f 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -136,7 +136,7 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mListener(p.listener), mArrowImage(p.folder_arrow_image), mBoxImage(p.selection_image), - mDontShowInHierarchy(false), + mHidden(false), mShowLoadStatus(false) { refresh(); @@ -201,7 +201,7 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); // Skip over items that are invisible or are hidden from the UI. - while(itemp && (!itemp->getVisible() || itemp->getDontShowInHierarchy())) + while(itemp && (!itemp->getVisible() || itemp->getHidden())) { LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); if (itemp == next_itemp) @@ -418,7 +418,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) S32 LLFolderViewItem::getItemHeight() { - if (mDontShowInHierarchy) return 0; + if (mHidden) return 0; S32 icon_height = mIcon->getHeight(); S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); @@ -823,7 +823,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, void LLFolderViewItem::draw() { - if (mDontShowInHierarchy) return; + if (mHidden) return; static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); @@ -1257,7 +1257,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) // filter self only on first pass through LLFolderViewItem::filter( filter ); } - if (mDontShowInHierarchy) + if (mHidden) { setOpen(); } diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index a43096dcb2..21e24c2a4d 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -162,7 +162,7 @@ protected: LLUIImagePtr mBoxImage; BOOL mIsLoading; LLTimer mTimeSinceRequestStart; - bool mDontShowInHierarchy; + bool mHidden; bool mShowLoadStatus; // helper function to change the selection from the root. @@ -206,8 +206,11 @@ public: // makes sure that this view and it's children are the right size. virtual S32 arrange( S32* width, S32* height, S32 filter_generation ); virtual S32 getItemHeight(); - void setDontShowInHierarchy(bool dont_show) { mDontShowInHierarchy = dont_show; } - bool getDontShowInHierarchy() const { return mDontShowInHierarchy; } + + // Hide the folder from the UI, such as if you want to hide the root + // folder in an inventory panel. + void setHidden(bool hidden) { mHidden = hidden; } + bool getHidden() const { return mHidden; } // applies filters to control visibility of inventory items virtual void filter( LLInventoryFilter& filter); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 3c34ba32e2..0bdad791a7 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -502,7 +502,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) // but still have the parent folder present for listener-related operations. if (id == mStartFolderID) { - folderp->setDontShowInHierarchy(TRUE); + folderp->setHidden(TRUE); } } } -- cgit v1.2.3 From 3c7e1435fe58a2a34fa838addd7cf822e48d3aa2 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Mon, 21 Dec 2009 20:14:39 +0200 Subject: workaround for (EXT-3599) No chiclets in the IM Well Window - manually set rect for a chiclet in the IM Well Window --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 9b60f58be1..8c6ea59407 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -352,6 +352,7 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& } // Initialize chiclet. + mChiclet->setRect(LLRect(5, 28, 30, 3)); // *HACK: workaround for (EXT-3599) mChiclet->setChicletSizeChangedCallback(boost::bind(&LLIMWellWindow::RowPanel::onChicletSizeChanged, this, mChiclet, _2)); mChiclet->enableCounterControl(true); mChiclet->setCounter(chicletCounter); -- cgit v1.2.3 From 7bfb8ec0503d7c31d9241b2e95f103fa66b14e1e Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 21 Dec 2009 20:42:34 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- implemented decorating of left participants in voice chat via italic font style (draft, harcoded) --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 22 ++++ indra/newview/llavatarlistitem.h | 1 + indra/newview/llcallfloater.cpp | 235 +++++++++++++++++++++++++++++++++++- indra/newview/llcallfloater.h | 35 +++++- indra/newview/llparticipantlist.cpp | 21 ---- indra/newview/llparticipantlist.h | 6 - 6 files changed, 289 insertions(+), 31 deletions(-) diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index bbe5cdcc4a..76dce622ed 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -184,6 +184,28 @@ void LLAvatarListItem::setHighlight(const std::string& highlight) setNameInternal(mAvatarName->getText(), mHighlihtSubstring = highlight); } +void LLAvatarListItem::setStyle(const LLStyle::Params& new_style) +{ +// LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle = new_style); + + // Active group should be bold. + LLFontDescriptor new_desc(mAvatarName->getDefaultFont()->getFontDesc()); + + new_desc.setStyle(new_style.font()->getFontDesc().getStyle()); + // *NOTE dzaporozhan + // On Windows LLFontGL::NORMAL will not remove LLFontGL::BOLD if font + // is predefined as bold (SansSerifSmallBold, for example) +// new_desc.setStyle(active ? LLFontGL::BOLD : LLFontGL::NORMAL); + LLFontGL* new_font = LLFontGL::getFont(new_desc); + +// + mAvatarNameStyle.font = new_font; + + // *NOTE: You cannot set the style on a text box anymore, you must + // rebuild the text. This will cause problems if the text contains + // hyperlinks, as their styles will be wrong. + mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle/* = new_style*/); +} void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) { if (mAvatarId.notNull()) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index df8b04126e..ad85d5fa87 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -73,6 +73,7 @@ public: void setOnline(bool online); void setName(const std::string& name); void setHighlight(const std::string& highlight); + void setStyle(const LLStyle::Params& new_style); void setAvatarId(const LLUUID& id, bool ignore_status_changes = false); void setLastInteractionTime(U32 secs_since); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 2521bde8fa..fe4f0c5525 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -89,6 +89,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mAgentPanel(NULL) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) +, mInitParticipantsVoiceState(false) { mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); @@ -100,6 +101,8 @@ LLCallFloater::~LLCallFloater() delete mPaticipants; mPaticipants = NULL; + mAvatarListRefreshConnection.disconnect(); + // Don't use LLVoiceClient::getInstance() here // singleton MAY have already been destroyed. if(gVoiceClient) @@ -114,6 +117,8 @@ BOOL LLCallFloater::postBuild() { LLDockableFloater::postBuild(); mAvatarList = getChild("speakers_list"); + mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLCallFloater::onAvatarListRefreshed, this)); + childSetAction("leave_call_btn", boost::bind(&LLCallFloater::leaveCall, this)); mNonAvatarCaller = getChild("non_avatar_caller"); @@ -165,8 +170,7 @@ void LLCallFloater::onChange() { if (NULL == mPaticipants) return; - mPaticipants->refreshVoiceState(); - + updateParticipantsVoiceState(); } @@ -291,7 +295,23 @@ void LLCallFloater::refreshPartisipantList() { mAvatarList->setNoItemsCommentText(getString("no_one_near")); } - mPaticipants->refreshVoiceState(); + + // we have to made delayed initialization of voice state of participant list. + // it will be performed after first LLAvatarList refreshing in the onAvatarListRefreshed(). + mInitParticipantsVoiceState = true; + } +} + +void LLCallFloater::onAvatarListRefreshed() +{ + if (mInitParticipantsVoiceState) + { + initParticipantsVoiceState(); + mInitParticipantsVoiceState = false; + } + else + { + updateParticipantsVoiceState(); } } @@ -393,4 +413,213 @@ void LLCallFloater::updateAgentModeratorState() } mAgentPanel->childSetValue("user_text", name); } + +void get_voice_participants_uuids(std::vector& speakers_uuids) +{ + // Get a list of participants from VoiceClient + LLVoiceClient::participantMap *voice_map = gVoiceClient->getParticipantList(); + if (voice_map) + { + for (LLVoiceClient::participantMap::const_iterator iter = voice_map->begin(); + iter != voice_map->end(); ++iter) + { + LLUUID id = (*iter).second->mAvatarID; + speakers_uuids.push_back(id); + } + } +} + +void LLCallFloater::initParticipantsVoiceState() +{ + // Set initial status for each participant in the list. + std::vector items; + mAvatarList->getItems(items); + std::vector::const_iterator + it = items.begin(), + it_end = items.end(); + + + std::vector speakers_uuids; + get_voice_participants_uuids(speakers_uuids); + + for(; it != it_end; ++it) + { + LLAvatarListItem *item = dynamic_cast(*it); + + if (!item) continue; + + LLUUID speaker_id = item->getAvatarId(); + + std::vector::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id); + + // If an avatarID assigned to a panel is found in a speakers list + // obtained from VoiceClient we assign the JOINED status to the owner + // of this avatarID. + if (speaker_iter != speakers_uuids.end()) + { + setState(item, STATE_JOINED); + } + else + { + LLPointer speakerp = mSpeakerManager->findSpeaker(speaker_id); + // If someone has already left the call before, we create his + // avatar row panel with HAS_LEFT status and remove it after + // the timeout, otherwise we create a panel with INVITED status + if (speakerp.notNull() && speakerp.get()->mHasLeftCurrentCall) + { + setState(item, STATE_LEFT); + } + else + { + setState(item, STATE_INVITED); + } + } + } +} + +void LLCallFloater::updateParticipantsVoiceState() +{ + std::vector speakers_list; + + // Get a list of participants from VoiceClient + LLVoiceClient::participantMap *map = gVoiceClient->getParticipantList(); + if (!map) return; + + for (LLVoiceClient::participantMap::const_iterator iter = map->begin(); + iter != map->end(); ++iter) + { + LLUUID id = (*iter).second->mAvatarID; +// if ( id != gAgent.getID() ) + { + speakers_list.push_back(id); +/* + LLAvatarListItem* item = dynamic_cast (mAvatarList->getItemByValue(id)); + if (item) + { + setState(item, STATE_JOINED); + } +*/ + + } + } + + // Updating the status for each participant. + std::vector items; + mAvatarList->getItems(items); + std::vector::const_iterator + it = items.begin(), + it_end = items.end(); + + for(; it != it_end; ++it) + { + LLAvatarListItem *item = dynamic_cast(*it); + if (!item) continue; + + const LLUUID participant_id = item->getAvatarId(); + bool found = false; + + std::vector::iterator speakers_iter = std::find(speakers_list.begin(), speakers_list.end(), participant_id); + + lldebugs << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << llendl; + + // If an avatarID assigned to a panel is found in a speakers list + // obtained from VoiceClient we assign the JOINED status to the owner + // of this avatarID. + if (speakers_iter != speakers_list.end()) + { + setState(item, STATE_JOINED); + + LLPointer speaker = mSpeakerManager->findSpeaker(participant_id); + if (speaker.isNull()) + continue; + speaker->mHasLeftCurrentCall = FALSE; + + speakers_list.erase(speakers_iter); + found = true; + } + + // If an avatarID is not found in a speakers list from VoiceClient and + // a panel with this ID has a JOINED status this means that this person + // HAS LEFT the call. + if (!found) + { + if ((getState(participant_id) == STATE_JOINED)) + { + setState(item, STATE_LEFT); + + LLPointer speaker = mSpeakerManager->findSpeaker(item->getAvatarId()); + if (speaker.isNull()) + continue; + + speaker->mHasLeftCurrentCall = TRUE; + } + else if ((getState(participant_id) != STATE_LEFT)) + { + setState(item, STATE_INVITED); + } + +/* + // If there is already a started timer for the current panel don't do anything. + bool no_timer_for_current_panel = true; + if (mTimersMap.size() > 0) + { + timers_map::iterator found_it = mTimersMap.find(participant_id); + if (found_it != mTimersMap.end()) + { + no_timer_for_current_panel = false; + } + } + + if (no_timer_for_current_panel) + { + // Starting a timer to remove an avatar row panel after timeout + // *TODO Make the timeout period adjustable + mTimersMap.insert(timer_pair(participant_id, new LLAvatarRowRemoveTimer(this->getHandle(), 10, participant_id))); + } +*/ + } + } + +} + +void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) +{ + setState(item->getAvatarId(), state); + + LLStyle::Params speaker_style; + LLFontDescriptor new_desc(speaker_style.font()->getFontDesc()); + + switch (state) + { + case STATE_INVITED: +// status_str = "INVITED"; // *TODO: localize + new_desc.setStyle(LLFontGL::NORMAL); + break; + case STATE_JOINED: +// status_str = "JOINED"; // *TODO: localize + new_desc.setStyle(LLFontGL::NORMAL); + break; + case STATE_LEFT: + { + // status_str = "HAS LEFT CALL"; // *TODO: localize + new_desc.setStyle(LLFontGL::ITALIC); + + } + break; + default: + llwarns << "Unrecognized avatar panel state (" << state << ")" << llendl; + break; + } + + LLFontGL* new_font = LLFontGL::getFont(new_desc); + speaker_style.font = new_font; + item->setStyle(speaker_style); + +// if () + { + // found speaker is in voice, mark him as online + item->setOnline(STATE_JOINED == state); + } +} + //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index ac45e283eb..21fba433c6 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -38,6 +38,7 @@ #include "llvoiceclient.h" class LLAvatarList; +class LLAvatarListItem; class LLNonAvatarCaller; class LLOutputMonitorCtrl; class LLParticipantList; @@ -81,6 +82,16 @@ private: VC_PEER_TO_PEER }EVoiceControls; + typedef enum e_speaker_state + { + STATE_UNKNOWN, + STATE_INVITED, + STATE_JOINED, + STATE_LEFT, + } ESpeakerState; + + typedef std::map speaker_state_map_t; + void leaveCall(); /** @@ -95,7 +106,7 @@ private: * Refreshes participant list according to current Voice Channel */ void refreshPartisipantList(); - + void onAvatarListRefreshed(); void updateTitle(); @@ -103,7 +114,24 @@ private: void setModeratorMutedVoice(bool moderator_muted); void updateAgentModeratorState(); + void initParticipantsVoiceState(); + void updateParticipantsVoiceState(); + + void setState(LLAvatarListItem* item, ESpeakerState state); + void setState(const LLUUID& speaker_id, ESpeakerState state) + { + lldebugs << "Storing state: " << speaker_id << ", " << state << llendl; + mSpeakerStateMap[speaker_id] = state; + } + + ESpeakerState getState(const LLUUID& speaker_id) + { + lldebugs << "Getting state: " << speaker_id << ", " << mSpeakerStateMap[speaker_id] << llendl; + + return mSpeakerStateMap[speaker_id]; + } private: + speaker_state_map_t mSpeakerStateMap; LLSpeakerMgr* mSpeakerManager; LLParticipantList* mPaticipants; LLAvatarList* mAvatarList; @@ -112,6 +140,11 @@ private: LLPanel* mAgentPanel; LLOutputMonitorCtrl* mSpeakingIndicator; bool mIsModeratorMutedVoice; + + bool mInitParticipantsVoiceState; + + boost::signals2::connection mAvatarListRefreshConnection; + }; diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index dfe0b504bd..5941487c7d 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -208,27 +208,6 @@ LLParticipantList::EParticipantSortOrder LLParticipantList::getSortOrder() return mSortOrder; } -void LLParticipantList::refreshVoiceState() -{ - LLSpeakerMgr::speaker_list_t speakers; - mSpeakerMgr->getSpeakerList(&speakers, TRUE); - - for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin(); - iter != speakers.end(); ++iter) - { - LLSpeaker* speakerp = (*iter).get(); - const LLUUID& speaker_id = speakerp->mID; - LLAvatarListItem* item = dynamic_cast (mAvatarList->getItemByValue(speaker_id)); - if ( item ) - { - // if voice is disabled for this speaker show non voice speakers as disabled - bool is_in_voice = speakerp->mStatus > LLSpeaker::STATUS_VOICE_ACTIVE - && speakerp->mStatus != LLSpeaker::STATUS_MUTED; - item->setOnline(!is_in_voice); - } - } -} - void LLParticipantList::updateRecentSpeakersOrder() { if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder()) diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 515529452b..c4eb180917 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -59,12 +59,6 @@ class LLParticipantList void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); EParticipantSortOrder getSortOrder(); - /** - * Refreshes participants to display ones not in voice as disabled. - * TODO: mantipov: probably should be moved into derived class for LLFloaterCall - */ - void refreshVoiceState(); - /** * Refreshes the participant list if it's in sort by recent speaker order. */ -- cgit v1.2.3 From 7d308294e93c7d2a0ffb3f1b88386b96fcb7b42d Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 21 Dec 2009 20:45:27 +0200 Subject: Removed unused code (context menu handling in LLAvatarListItem). --HG-- branch : product-engine --- indra/newview/llavatarlist.cpp | 1 - indra/newview/llavatarlistitem.cpp | 1 - indra/newview/llavatarlistitem.h | 3 --- 3 files changed, 5 deletions(-) diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 5865df3e26..5317cf2cd0 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -322,7 +322,6 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->setAvatarId(id, mIgnoreOnlineStatus); item->setOnline(mIgnoreOnlineStatus ? true : is_online); item->showLastInteractionTime(mShowLastInteractionTime); - item->setContextMenu(mContextMenu); item->childSetVisible("info_btn", false); item->setAvatarIconVisible(mShowIcons); diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 76dce622ed..c8544bc3fb 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -57,7 +57,6 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) mSpeakingIndicator(NULL), mInfoBtn(NULL), mProfileBtn(NULL), - mContextMenu(NULL), mOnlineStatus(E_UNKNOWN), mShowInfoBtn(true), mShowProfileBtn(true) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index ad85d5fa87..0e058f75db 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -92,8 +92,6 @@ public: void showInfoBtn(bool show_info_btn) {mInfoBtn->setVisible(show_info_btn); } void showLastInteractionTime(bool show); - void setContextMenu(ContextMenu* menu) { mContextMenu = menu; } - /** * 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 @@ -127,7 +125,6 @@ private: LLButton* mInfoBtn; LLButton* mProfileBtn; - ContextMenu* mContextMenu; LLUUID mAvatarId; std::string mHighlihtSubstring; // substring to highlight -- cgit v1.2.3 From 2e8902d591c44698622ab1d2b088694dbc873007 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 21 Dec 2009 18:51:50 +0000 Subject: DEV-44367: Put back help IDs for prefs, land, and water. The help_topic tags for Preferences, About Land, and Advanced Water Editor were removed for EXT-2766. However, this has the sideeffect that those floaters no longer show the "?" Help button. So, I'm reverting that change and putting these help IDs back again. --- indra/newview/skins/default/xui/en/floater_about_land.xml | 1 + indra/newview/skins/default/xui/en/floater_preferences.xml | 1 + indra/newview/skins/default/xui/en/floater_water.xml | 1 + 3 files changed, 3 insertions(+) diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index a581190d18..cc955369e2 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -4,6 +4,7 @@ height="420" layout="topleft" name="floaterland" + help_topic="floaterland" save_rect="true" title="ABOUT LAND" width="490"> diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 2f26e5d0c1..15655a920e 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -7,6 +7,7 @@ height="460" layout="topleft" name="Preferences" + help_topic="preferences" single_instance="true" title="PREFERENCES" width="620"> diff --git a/indra/newview/skins/default/xui/en/floater_water.xml b/indra/newview/skins/default/xui/en/floater_water.xml index 7f31692ad9..32739ac953 100644 --- a/indra/newview/skins/default/xui/en/floater_water.xml +++ b/indra/newview/skins/default/xui/en/floater_water.xml @@ -4,6 +4,7 @@ height="240" layout="topleft" name="Water Floater" + help_topic="water_floater" save_rect="true" title="ADVANCED WATER EDITOR" width="700"> -- cgit v1.2.3 From c72de2edf0a2f7590fd43d86c59e83afcf7e8bcf Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 21 Dec 2009 20:56:38 +0200 Subject: Added context menu to the group list (task EXT-3595). --HG-- branch : product-engine --- indra/newview/llgrouplist.cpp | 71 ++++++++++++++++++++++ indra/newview/llgrouplist.h | 6 ++ .../skins/default/xui/en/menu_people_groups.xml | 57 +++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 indra/newview/skins/default/xui/en/menu_people_groups.xml diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index ab9db10f38..3ca459a403 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -37,6 +37,7 @@ // libs #include "llbutton.h" #include "lliconctrl.h" +#include "llmenugl.h" #include "lltextbox.h" #include "lltrans.h" @@ -46,6 +47,7 @@ #include "llfloaterreg.h" #include "lltextutil.h" #include "llviewercontrol.h" // for gSavedSettings +#include "llviewermenu.h" // for gMenuHolder static LLDefaultChildRegistry::Register r("group_list"); S32 LLGroupListItem::sIconWidth = 0; @@ -88,11 +90,24 @@ LLGroupList::LLGroupList(const Params& p) // Set default sort order. setComparator(&GROUP_COMPARATOR); + + // Set up context menu. + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + + registrar.add("People.Groups.Action", boost::bind(&LLGroupList::onContextMenuItemClick, this, _2)); + enable_registrar.add("People.Groups.Enable", boost::bind(&LLGroupList::onContextMenuItemEnable, this, _2)); + + LLMenuGL* context_menu = LLUICtrlFactory::getInstance()->createFromFile("menu_people_groups.xml", + gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + if(context_menu) + mContextMenuHandle = context_menu->getHandle(); } LLGroupList::~LLGroupList() { gAgent.removeListener(this); + LLView::deleteViewByHandle(mContextMenuHandle); } // virtual @@ -104,6 +119,22 @@ void LLGroupList::draw() LLFlatListView::draw(); } +// virtual +BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); + + LLMenuGL* context_menu = (LLMenuGL*)mContextMenuHandle.get(); + if (context_menu) + { + context_menu->buildDrawLabels(); + context_menu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, context_menu, x, y); + } + + return handled; +} + void LLGroupList::setNameFilter(const std::string& filter) { if (mNameFilter != filter) @@ -203,6 +234,46 @@ bool LLGroupList::handleEvent(LLPointer event, const LLSD& return false; } +bool LLGroupList::onContextMenuItemClick(const LLSD& userdata) +{ + std::string action = userdata.asString(); + LLUUID selected_group = getSelectedUUID(); + + if (action == "view_info") + { + LLGroupActions::show(selected_group); + } + else if (action == "chat") + { + LLGroupActions::startIM(selected_group); + } + else if (action == "call") + { + LLGroupActions::startCall(selected_group); + } + else if (action == "activate") + { + LLGroupActions::activate(selected_group); + } + else if (action == "leave") + { + LLGroupActions::leave(selected_group); + } + + return true; +} + +bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata) +{ + LLUUID selected_group_id = getSelectedUUID(); + bool real_group_selected = selected_group_id.notNull(); // a "real" (not "none") group is selected + + if (userdata.asString() == "activate") + return real_group_selected && gAgent.getGroupID() != selected_group_id; + + return real_group_selected; +} + /************************************************************************/ /* LLGroupListItem implementation */ /************************************************************************/ diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 33cfe005b9..f7afe0c0b2 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -60,6 +60,7 @@ public: virtual ~LLGroupList(); virtual void draw(); // from LLView + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); // from LLView void setNameFilter(const std::string& filter); void toggleIcons(); @@ -71,6 +72,11 @@ private: void addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, EAddPosition pos = ADD_BOTTOM); bool handleEvent(LLPointer event, const LLSD& userdata); // called on agent group list changes + bool onContextMenuItemClick(const LLSD& userdata); + bool onContextMenuItemEnable(const LLSD& userdata); + + LLHandle mContextMenuHandle; + bool mShowIcons; bool mDirty; std::string mNameFilter; diff --git a/indra/newview/skins/default/xui/en/menu_people_groups.xml b/indra/newview/skins/default/xui/en/menu_people_groups.xml new file mode 100644 index 0000000000..afa680139d --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_people_groups.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 0e44480705631ffe6a1f3086527411ecebfc0ec7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 21 Dec 2009 14:24:21 -0500 Subject: Add event API to enumerate registered LLCommandHandler instances. --- indra/newview/llcommanddispatcherlistener.cpp | 13 +++++++ indra/newview/llcommanddispatcherlistener.h | 1 + indra/newview/llcommandhandler.cpp | 55 +++++++++++++++++++++++++++ indra/newview/llcommandhandler.h | 5 +++ 4 files changed, 74 insertions(+) diff --git a/indra/newview/llcommanddispatcherlistener.cpp b/indra/newview/llcommanddispatcherlistener.cpp index 00a20de30e..91baeaf989 100644 --- a/indra/newview/llcommanddispatcherlistener.cpp +++ b/indra/newview/llcommanddispatcherlistener.cpp @@ -31,6 +31,11 @@ LLCommandDispatcherListener::LLCommandDispatcherListener(/* LLCommandDispatcher* "[\"query\"] map of parameters, as if from ?key1=val&key2=val\n" "[\"trusted\"] boolean indicating trusted browser [default true]", &LLCommandDispatcherListener::dispatch); + add("enumerate", + "Post to [\"reply\"] a map of registered LLCommandHandler instances, containing\n" + "name key and (e.g.) untrusted flag", + &LLCommandDispatcherListener::enumerate, + LLSD().with("reply", LLSD())); } void LLCommandDispatcherListener::dispatch(const LLSD& params) const @@ -45,3 +50,11 @@ void LLCommandDispatcherListener::dispatch(const LLSD& params) const LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], NULL, trusted_browser); } + +void LLCommandDispatcherListener::enumerate(const LLSD& params) const +{ + LLReqID reqID(params); + LLSD response(LLCommandDispatcher::enumerate()); + reqID.stamp(response); + LLEventPumps::instance().obtain(params["reply"]).post(response); +} diff --git a/indra/newview/llcommanddispatcherlistener.h b/indra/newview/llcommanddispatcherlistener.h index d0070ddd71..9bcddebcc1 100644 --- a/indra/newview/llcommanddispatcherlistener.h +++ b/indra/newview/llcommanddispatcherlistener.h @@ -23,6 +23,7 @@ public: private: void dispatch(const LLSD& params) const; + void enumerate(const LLSD& params) const; //LLCommandDispatcher* mDispatcher; }; diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index 8c7e7bea83..dc506a1692 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -36,6 +36,7 @@ #include "llcommandhandler.h" #include "llnotificationsutil.h" #include "llcommanddispatcherlistener.h" +#include "stringize.h" // system includes #include @@ -67,6 +68,7 @@ public: bool trusted_browser); private: + friend LLSD LLCommandDispatcher::enumerate(); std::map mMap; }; @@ -175,3 +177,56 @@ bool LLCommandDispatcher::dispatch(const std::string& cmd, return LLCommandHandlerRegistry::instance().dispatch( cmd, params, query_map, web, trusted_browser); } + +static std::string lookup(LLCommandHandler::EUntrustedAccess value); + +LLSD LLCommandDispatcher::enumerate() +{ + LLSD response; + LLCommandHandlerRegistry& registry(LLCommandHandlerRegistry::instance()); + for (std::map::const_iterator chi(registry.mMap.begin()), + chend(registry.mMap.end()); + chi != chend; ++chi) + { + LLSD info; + info["untrusted"] = chi->second.mUntrustedBrowserAccess; + info["untrusted_str"] = lookup(chi->second.mUntrustedBrowserAccess); + response[chi->first] = info; + } + return response; +} + +/*------------------------------ lookup stuff ------------------------------*/ +struct symbol_info +{ + const char* name; + LLCommandHandler::EUntrustedAccess value; +}; + +#define ent(SYMBOL) \ + { \ + #SYMBOL + 28, /* skip "LLCommandHandler::UNTRUSTED_" prefix */ \ + SYMBOL \ + } + +symbol_info symbols[] = +{ + ent(LLCommandHandler::UNTRUSTED_ALLOW), // allow commands from untrusted browsers + ent(LLCommandHandler::UNTRUSTED_BLOCK), // ignore commands from untrusted browsers + ent(LLCommandHandler::UNTRUSTED_THROTTLE) // allow untrusted, but only a few per min. +}; + +#undef ent + +static std::string lookup(LLCommandHandler::EUntrustedAccess value) +{ + for (symbol_info *sii(symbols), *siend(symbols + (sizeof(symbols)/sizeof(symbols[0]))); + sii != siend; ++sii) + { + if (sii->value == value) + { + return sii->name; + } + } + return STRINGIZE("UNTRUSTED_" << value); +} diff --git a/indra/newview/llcommandhandler.h b/indra/newview/llcommandhandler.h index 1bae6d9414..a1d4c880f5 100644 --- a/indra/newview/llcommandhandler.h +++ b/indra/newview/llcommandhandler.h @@ -34,6 +34,8 @@ #ifndef LLCOMMANDHANDLER_H #define LLCOMMANDHANDLER_H +#include "llsd.h" + /* Example: secondlife:///app/foo/ Command "foo" that takes one parameter, a UUID. @@ -103,6 +105,9 @@ public: // Execute a command registered via the above mechanism, // passing string parameters. // Returns true if command was found and executed correctly. + /// Return an LLSD::Map of registered LLCommandHandlers and associated + /// info (e.g. EUntrustedAccess). + static LLSD enumerate(); }; #endif -- cgit v1.2.3 From 434b10c9250d606d8b05c403bb8bdbc74fce6b17 Mon Sep 17 00:00:00 2001 From: Erica Date: Mon, 21 Dec 2009 11:31:28 -0800 Subject: EXT-3132 Artwork for IM&Chat system messages required --- indra/newview/skins/default/textures/icons/SL_Logo.png | Bin 0 -> 973 bytes indra/newview/skins/default/textures/textures.xml | 15 ++++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/SL_Logo.png diff --git a/indra/newview/skins/default/textures/icons/SL_Logo.png b/indra/newview/skins/default/textures/icons/SL_Logo.png new file mode 100644 index 0000000000..c9fbde987a Binary files /dev/null and b/indra/newview/skins/default/textures/icons/SL_Logo.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 4dbfd5bc81..24aa7712ed 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -485,7 +485,8 @@ with the same filename but different name - + + @@ -493,12 +494,12 @@ with the same filename but different name - - - - - - + + + + + + -- cgit v1.2.3 From fdaa7c3798efd070ac1f4ce707303f7f4ae89ea7 Mon Sep 17 00:00:00 2001 From: Erica Date: Mon, 21 Dec 2009 11:47:40 -0800 Subject: EXT-3220 Need an icon for inventory items broken links --- indra/newview/skins/default/textures/textures.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 24aa7712ed..9212d3d87b 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -232,6 +232,7 @@ with the same filename but different name + -- cgit v1.2.3 From c308dacfe26fa67e5871ba174dbc0c6cc545a6dd Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 21 Dec 2009 11:54:05 -0800 Subject: don't show incoming system messages in notification at bottom of chat history window --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 7f33a8329c..37e27cf165 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -422,7 +422,7 @@ void LLChatHistory::clear() void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_chat_history, const LLStyle::Params& input_append_params) { - if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID()) + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); mMoreChatPanel->setVisible(TRUE); -- cgit v1.2.3 From 37b04c150792bb3e53a5ba02c6631aa1d0f8686f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 21 Dec 2009 14:54:55 -0500 Subject: EXT-3582 : My Outfits populates from library if I delete my last outfit Tracking a "Is this my first time in viewer2.0?" flag and only populating My Outfits folder if it's true. --- indra/newview/llagentwearables.cpp | 5 +---- indra/newview/llinventorymodel.cpp | 17 +++++++++++++++++ indra/newview/llinventorymodel.h | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 454e547155..79948abefd 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -875,9 +875,6 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs LLUUID agent_id; gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); - const BOOL is_first_time_in_viewer2_0 = (gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) == LLUUID::null); - - LLVOAvatar* avatar = gAgent.getAvatarObject(); if (avatar && (agent_id == avatar->getID())) { @@ -957,7 +954,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs gInventory.addObserver(outfit); } - if (is_first_time_in_viewer2_0) + if (LLInventoryModel::getIsFirstTimeInViewer2()) gAgentWearables.populateMyOutfitsFolder(); } } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 0a8108899a..26a81ab084 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -67,6 +67,7 @@ F32 LLInventoryModel::sMaxTimeBetweenFetches = 10.f; BOOL LLInventoryModel::sTimelyFetchPending = FALSE; LLFrameTimer LLInventoryModel::sFetchTimer; S16 LLInventoryModel::sBulkFetchCount = 0; +BOOL LLInventoryModel::sFirstTimeInViewer2 = TRUE; // Increment this if the inventory contents change in a non-backwards-compatible way. // For viewer 2, the addition of link items makes a pre-viewer-2 cache incorrect. @@ -2614,6 +2615,9 @@ void LLInventoryModel::buildParentChildMap() notifyObservers(); } } + + const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) != LLUUID::null); + sFirstTimeInViewer2 = !COF_exists; } struct LLUUIDAndName @@ -3530,6 +3534,19 @@ void LLInventoryModel::setLibraryOwnerID(const LLUUID& val) mLibraryOwnerID = val; } +// static +BOOL LLInventoryModel::getIsFirstTimeInViewer2() +{ + // Do not call this before parentchild map is built. + if (!gInventory.mIsAgentInvUsable) + { + llwarns << "Parent Child Map not yet built; guessing as first time in viewer2." << llendl; + return TRUE; + } + + return sFirstTimeInViewer2; +} + //---------------------------------------------------------------------------- // *NOTE: DEBUG functionality diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 27bbca493d..29f2aec89e 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -499,9 +499,9 @@ public: // *NOTE: DEBUG functionality void dumpInventory() const; - //////////////////////////////////////////////////////////////////////////////// - // Bulk / Background Fetch + //////////////////////////////////////////////////////////////////////////////// + // Bulk fetch public: // Start and stop background breadth-first fetching of inventory contents. // This gets triggered when performing a filter-search @@ -525,6 +525,13 @@ private: // completing the fetch once per session should be sufficient static BOOL sBackgroundFetchActive; static S16 sBulkFetchCount; + + //////////////////////////////////////////////////////////////////////////////// + // Login status +public: + static BOOL getIsFirstTimeInViewer2(); +private: + static BOOL sFirstTimeInViewer2; }; // a special inventory model for the agent -- cgit v1.2.3 From d74d0d5c41d5ea114cef19aa7e54834d1c3b554b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 21 Dec 2009 13:02:42 -0800 Subject: DEV-44562 deferred rendering: crease noise sadness --- .../shaders/class2/deferred/blurLightF.glsl | 52 +++++++--------------- indra/newview/pipeline.cpp | 3 +- 2 files changed, 19 insertions(+), 36 deletions(-) diff --git a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl index 28908a311d..0fad5b4b50 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl @@ -10,7 +10,6 @@ uniform sampler2DRect depthMap; uniform sampler2DRect normalMap; uniform sampler2DRect lightMap; -uniform sampler2DRect edgeMap; uniform float dist_factor; uniform float blur_size; @@ -46,53 +45,36 @@ void main() dlt /= max(-pos.z*dist_factor, 1.0); - vec2 defined_weight = kern[0].xy; // special case the kern[0] (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free' + vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free' vec4 col = defined_weight.xyxx * ccol; - - float center_e = 1.0 - (texture2DRect(edgeMap, vary_fragcoord.xy).a+ - texture2DRect(edgeMap, vary_fragcoord.xy+dlt*0.333).a+ - texture2DRect(edgeMap, vary_fragcoord.xy-dlt*0.333).a); - float e = center_e; for (int i = 1; i < 4; i++) { vec2 tc = vary_fragcoord.xy + kern[i].z*dlt; - - e = max(e, 0.0); - - vec2 wght = kern[i].xy*e; - - col += texture2DRect(lightMap, tc)*wght.xyxx; - defined_weight += wght; - - e *= e; - e -= texture2DRect(edgeMap, tc.xy).a+ - texture2DRect(edgeMap, tc.xy+dlt*0.333).a+ - texture2DRect(edgeMap, tc.xy-dlt*0.333).a; + vec3 samppos = getPosition(tc).xyz; + float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane + if (d*d <= 0.003) + { + col += texture2DRect(lightMap, tc)*kern[i].xyxx; + defined_weight += kern[i].xy; + } } - - e = center_e; for (int i = 1; i < 4; i++) { vec2 tc = vary_fragcoord.xy - kern[i].z*dlt; - - e = max(e, 0.0); - - vec2 wght = kern[i].xy*e; - - col += texture2DRect(lightMap, tc)*wght.xyxx; - defined_weight += wght; - - e *= e; - e -= texture2DRect(edgeMap, tc.xy).a+ - texture2DRect(edgeMap, tc.xy+dlt*0.333).a+ - texture2DRect(edgeMap, tc.xy-dlt*0.333).a; + vec3 samppos = getPosition(tc).xyz; + float d = dot(norm.xyz, samppos.xyz-pos.xyz);// dist from plane + if (d*d <= 0.003) + { + col += texture2DRect(lightMap, tc)*kern[i].xyxx; + defined_weight += kern[i].xy; + } } + col /= defined_weight.xyxx; gl_FragColor = col; - - //gl_FragColor = ccol; } + diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 73b5222ee3..4f4fc83819 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6352,7 +6352,8 @@ void LLPipeline::renderDeferredLighting() mDeferredLight[0].flush(); - if (gSavedSettings.getBOOL("RenderDeferredBlurLight")) + if (gSavedSettings.getBOOL("RenderDeferredBlurLight") && + gSavedSettings.getBOOL("RenderDeferredGI")) { LLFastTimer ftm(FTM_EDGE_DETECTION); //get edge map -- cgit v1.2.3 From fb2bc3a0e0f61e6f1ba8f96999c1f6f3b88c1661 Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Mon, 21 Dec 2009 13:15:59 -0800 Subject: Better error handling for HTTP Texture code. --- indra/newview/lltexturefetch.cpp | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index e80dafe245..3f489544b4 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -801,7 +801,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mState == SEND_HTTP_REQ) { { - const S32 HTTP_QUEUE_MAX_SIZE = 32; + const S32 HTTP_QUEUE_MAX_SIZE = 8; // *TODO: Integrate this with llviewerthrottle // Note: LLViewerThrottle uses dynamic throttling which makes sense for UDP, // but probably not for Textures. @@ -874,12 +874,30 @@ bool LLTextureFetchWorker::doWork(S32 param) S32 cur_size = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0; if (mRequestedSize < 0) { - const S32 HTTP_MAX_RETRY_COUNT = 3; - S32 max_attempts = (mGetStatus == HTTP_NOT_FOUND) ? 1 : HTTP_MAX_RETRY_COUNT + 1; - llinfos << "HTTP GET failed for: " << mUrl - << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" - << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; - ++mHTTPFailCount; + S32 max_attempts; + if (mGetStatus == HTTP_NOT_FOUND) + { + mHTTPFailCount = max_attempts = 1; // Don't retry + llinfos << "Texture missing from server (404): " << mUrl << llendl; + } + else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE) + { + // *TODO: Should probably introduce a timer here to delay future HTTP requsts + // for a short time (~1s) to ease server load? Ideally the server would queue + // requests instead of returning 503... we already limit the number pending. + ++mHTTPFailCount; + max_attempts = mHTTPFailCount+1; // Keep retrying + LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL; + } + else + { + const S32 HTTP_MAX_RETRY_COUNT = 3; + max_attempts = HTTP_MAX_RETRY_COUNT + 1; + ++mHTTPFailCount; + llinfos << "HTTP GET failed for: " << mUrl + << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" + << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; + } if (mHTTPFailCount >= max_attempts) { if (cur_size > 0) -- cgit v1.2.3 From 87f64b2d8deeeb415bf765268d35b0c0af76b61d Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 21 Dec 2009 13:48:46 -0800 Subject: EXT-3550 Fixed messages from login.cgi not being displayed. Handling message from "indeterminate" state - feeding them to the llprogressview. Handling showing error message from incomplete login. --- indra/newview/lllogininstance.cpp | 41 ++++++++++++++----------------- indra/newview/lllogininstance.h | 2 +- indra/newview/llprogressview.cpp | 27 +++++++++++++++++++- indra/newview/llprogressview.h | 6 +++++ indra/newview/llstartup.cpp | 12 ++++++--- indra/viewer_components/login/lllogin.cpp | 11 ++++++++- 6 files changed, 70 insertions(+), 29 deletions(-) diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 2dc9f255d7..24c72c65ce 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -76,6 +76,7 @@ LLLoginInstance::LLLoginInstance() : mDispatcher.add("fail.login", boost::bind(&LLLoginInstance::handleLoginFailure, this, _1)); mDispatcher.add("connect", boost::bind(&LLLoginInstance::handleLoginSuccess, this, _1)); mDispatcher.add("disconnect", boost::bind(&LLLoginInstance::handleDisconnect, this, _1)); + mDispatcher.add("indeterminate", boost::bind(&LLLoginInstance::handleIndeterminate, this, _1)); } LLLoginInstance::~LLLoginInstance() @@ -204,6 +205,8 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event) mTransferRate = event["transfer_rate"].asReal(); } + + // Call the method registered in constructor, if any, for more specific // handling LLEventDispatcher::Callable method(mDispatcher.get(event["change"])); @@ -295,6 +298,22 @@ void LLLoginInstance::handleDisconnect(const LLSD& event) // placeholder } +void LLLoginInstance::handleIndeterminate(const LLSD& event) +{ + // The indeterminate response means that the server + // gave the viewer a new url and params to try. + // The login module handles the retry, but it gives us the + // server response so that we may show + // the user some status. + LLSD message = event.get("data").get("message"); + if(message.isDefined()) + { + LLSD progress_update; + progress_update["desc"] = message; + LLEventPumps::getInstance()->obtain("LLProgressView").post(progress_update); + } +} + bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key) { if(accepted) @@ -374,28 +393,6 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg) mNotifications->add(notification_name, args, payload, boost::bind(&LLLoginInstance::updateDialogCallback, this, _1, _2)); } - - /* *NOTE:Mani Experiment with Event API interface. - if(!mUpdateAppResponse) - { - bool make_unique = true; - mUpdateAppResponse.reset(new LLEventStream("logininstance_updateapp", make_unique)); - mUpdateAppResponse->listen("diaupdateDialogCallback", - boost::bind(&LLLoginInstance::updateDialogCallback, - this, _1 - ) - ); - } - - LLSD event; - event["op"] = "requestAdd"; - event["name"] = notification_name; - event["substitutions"] = args; - event["payload"] = payload; - event["reply"] = mUpdateAppResponse->getName(); - - LLEventPumps::getInstance()->obtain("LLNotifications").post(event); - */ } bool LLLoginInstance::updateDialogCallback(const LLSD& notification, const LLSD& response) diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index 19d7449bc1..c8704eddb4 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -89,6 +89,7 @@ private: void handleLoginFailure(const LLSD& event); void handleLoginSuccess(const LLSD& event); void handleDisconnect(const LLSD& event); + void handleIndeterminate(const LLSD& event); bool handleTOSResponse(bool v, const std::string& key); @@ -107,7 +108,6 @@ private: std::string mSerialNumber; int mLastExecEvent; UpdaterLauncherCallback mUpdaterLauncher; - boost::scoped_ptr mUpdateAppResponse; LLEventDispatcher mDispatcher; }; diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 5f6b210767..f723d9f240 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -72,10 +72,12 @@ const S32 ANIMATION_FRAMES = 1; //13; LLProgressView::LLProgressView(const LLRect &rect) : LLPanel(), mPercentDone( 0.f ), - mMouseDownInActiveArea( false ) + mMouseDownInActiveArea( false ), + mUpdateEvents("LLProgressView") { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_progress.xml"); reshape(rect.getWidth(), rect.getHeight()); + mUpdateEvents.listen("self", boost::bind(&LLProgressView::handleUpdate, this, _1)); } BOOL LLProgressView::postBuild() @@ -260,3 +262,26 @@ void LLProgressView::onClickMessage(void* data) } } } + +bool LLProgressView::handleUpdate(const LLSD& event_data) +{ + LLSD message = event_data.get("message"); + LLSD desc = event_data.get("desc"); + LLSD percent = event_data.get("percent"); + + if(message.isUndefined()) + { + setMessage(message.asString()); + } + + if(desc.isDefined()) + { + setText(desc.asString()); + } + + if(percent.isDefined()) + { + setPercent(percent.asReal()); + } + return false; +} diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index 865646c85d..6853674d88 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -35,6 +35,7 @@ #include "llpanel.h" #include "llframetimer.h" +#include "llevents.h" class LLImageRaw; class LLButton; @@ -75,7 +76,12 @@ protected: LLRect mOutlineRect; bool mMouseDownInActiveArea; + // The LLEventStream mUpdateEvents depends upon this class being a singleton + // to avoid pump name conflicts. static LLProgressView* sInstance; + LLEventStream mUpdateEvents; + + bool handleUpdate(const LLSD& event_data); }; #endif // LL_LLPROGRESSVIEW_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 539673ab9e..fdf8fa171d 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1170,12 +1170,16 @@ bool idle_startup() } else { - // Still waiting for response. - // *TODO:Mani - Actually check for login progress. // If we get here we have gotten past the potential stall // in curl, so take "may appear frozen" out of progress bar. JC - auth_desc = LLTrans::getString("LoginInProgressNoFrozen"); - set_startup_status(progress, auth_desc, auth_message); + // *NOTE:Mani - Actual responses handled by LLLoginInstance::handleLoginEvent() + static bool has_set_unfrozen_msg = false; + if(!has_set_unfrozen_msg) + { + auth_desc = LLTrans::getString("LoginInProgressNoFrozen"); + set_startup_status(progress, auth_desc, auth_message); + has_set_unfrozen_msg = true; + } } return FALSE; diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 018f691672..364088ab31 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -235,6 +235,8 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential break; } + sendProgressEvent("offline", "indeterminate", mAuthResponse["responses"]); + // Here the login service at the current URI is redirecting us // to some other URI ("indeterminate" -- why not "redirect"?). // The response should contain another uri to try, with its @@ -276,7 +278,14 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential // Here we got through all the rewrittenURIs without succeeding. Tell // caller this didn't work out so well. Of course, the only failure data // we can reasonably show are from the last of the rewrittenURIs. - sendProgressEvent("offline", "fail.login", mAuthResponse["responses"]); + + // *NOTE: The response from LLXMLRPCListener's Poller::poll method returns an + // llsd with no "responses" node. To make the output from an incomplete login symmetrical + // to success, add a data/message and data/reason fields. + LLSD error_response; + error_response["reason"] = mAuthResponse["status"]; + error_response["message"] = mAuthResponse["error"]; + sendProgressEvent("offline", "fail.login", error_response); } void LLLogin::Impl::disconnect() -- cgit v1.2.3 From c26034531a25590e718edc4d7efa41c04aa42731 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 21 Dec 2009 16:49:14 -0500 Subject: EXT-3582 : My Outfits populates from library if I delete my last outfit Autopopulation logic is now smarter and only triggers if this is the first time you're logging into viewer2.0. --- indra/newview/llagentwearables.cpp | 18 +++++++++++++----- indra/newview/llinventorymodel.cpp | 7 ++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 79948abefd..e75d94bb2c 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -871,6 +871,13 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs if (mInitialWearablesUpdateReceived) return; mInitialWearablesUpdateReceived = true; + + // If this is the very first time the user has logged into viewer2+ from a legacy viewer, + // then auto-populate outfits from the library into the My Outfits folder. + if (LLInventoryModel::getIsFirstTimeInViewer2()) + { + gAgentWearables.populateMyOutfitsFolder(); + } LLUUID agent_id; gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); @@ -880,12 +887,15 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs { gMessageSystem->getU32Fast(_PREHASH_AgentData, _PREHASH_SerialNum, gAgentQueryManager.mUpdateSerialNum); + const S32 NUM_BODY_PARTS = 4; S32 num_wearables = gMessageSystem->getNumberOfBlocksFast(_PREHASH_WearableData); - if (num_wearables < 4) + if (num_wearables < NUM_BODY_PARTS) { // Transitional state. Avatars should always have at least their body parts (hair, eyes, shape and skin). - // The fact that they don't have any here (only a dummy is sent) implies that this account existed - // before we had wearables, or that the database has gotten messed up. + // The fact that they don't have any here (only a dummy is sent) implies that either: + // 1. This account existed before we had wearables + // 2. The database has gotten messed up + // 3. This is the account's first login (i.e. the wearables haven't been generated yet). return; } @@ -954,8 +964,6 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs gInventory.addObserver(outfit); } - if (LLInventoryModel::getIsFirstTimeInViewer2()) - gAgentWearables.populateMyOutfitsFolder(); } } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 26a81ab084..96925490cf 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2518,6 +2518,10 @@ void LLInventoryModel::buildParentChildMap() llwarns << "Found " << lost << " lost categories." << llendl; } + const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) != LLUUID::null); + sFirstTimeInViewer2 = !COF_exists || gAgent.isFirstLogin(); + + // Now the items. We allocated in the last step, so now all we // have to do is iterate over the items and put them in the right // place. @@ -2615,9 +2619,6 @@ void LLInventoryModel::buildParentChildMap() notifyObservers(); } } - - const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) != LLUUID::null); - sFirstTimeInViewer2 = !COF_exists; } struct LLUUIDAndName -- cgit v1.2.3 From 89eab35b8069c3e2652591c0dffe2b0214fc0666 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 21 Dec 2009 13:49:23 -0800 Subject: DEV-44564 'speak' button PTT-toggles and displays voice monitor even when voice disabled, gives wrong impression that you should be able to talk --- indra/newview/llspeakbutton.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index fd39bde118..90214a1bd7 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -61,7 +61,9 @@ void LLSpeakButton::draw() { // gVoiceClient is the authoritative global source of info regarding our open-mic state, we merely reflect that state. bool openmic = gVoiceClient->getUserPTTState(); - mSpeakBtn->setToggleState(openmic); + bool voiceenabled = gVoiceClient->voiceEnabled(); + mSpeakBtn->setToggleState(openmic && voiceenabled); + mOutputMonitor->setIsMuted(!voiceenabled); LLUICtrl::draw(); } -- cgit v1.2.3 From a32f857fe68f6b191f8029b1a5b137aaa364395b Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Mon, 21 Dec 2009 15:59:20 -0600 Subject: EXT-2973 : turned off RenderDelayVBUpdate for all platforms and bumped feature table to apply it. Should solve index buff overflows. Reviewed by Davep --- indra/newview/featuretable.txt | 3 ++- indra/newview/featuretable_linux.txt | 3 ++- indra/newview/featuretable_mac.txt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index d20c23df80..4029bf95a0 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -1,4 +1,4 @@ -version 20 +version 21 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -28,6 +28,7 @@ RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 RenderAvatarVP 1 1 RenderCubeMap 1 1 +RenderDelayVBUpdate 1 0 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderFogRatio 1 4.0 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 57d712ede7..61a8e51c50 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -1,4 +1,4 @@ -version 20 +version 21 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -28,6 +28,7 @@ RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 RenderAvatarVP 1 1 RenderCubeMap 1 1 +RenderDelayVBUpdate 1 0 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderFogRatio 1 4.0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 15974c0691..12d47a904c 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 20 +version 21 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -28,6 +28,7 @@ RenderAvatarCloth 0 0 RenderAvatarLODFactor 1 1.0 RenderAvatarVP 1 0 RenderCubeMap 1 1 +RenderDelayVBUpdate 1 0 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 RenderFogRatio 1 4.0 -- cgit v1.2.3 From ced5b819d74fa70fc2050b13749bfe1387340583 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 21 Dec 2009 17:21:48 -0500 Subject: For EXT-3567: Folders should show as 'Loading...' when contents being fetched --- indra/newview/llfolderviewitem.cpp | 21 ++++++++++++--- indra/newview/llinventorymodel.cpp | 55 ++++++++++++++++++++++++++++++++++---- indra/newview/llinventorymodel.h | 9 +++++++ 3 files changed, 77 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index bfd9d6dca7..c430dc96af 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -970,11 +970,26 @@ void LLFolderViewItem::draw() font->renderUTF8( mLabel, 0, text_left, y, color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); +// LLViewerInventoryCategory *item = 0; +// if (getListener()) +// item = gInventory.getCategory(getListener()->getUUID()); + bool root_is_loading = false; + if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(),gInventory.getRootFolderID())) + { + // Descendent of my inventory. + root_is_loading = gInventory.myInventoryFetchInProgress(); + } + if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(),gInventory.getLibraryRootFolderID())) + { + // Descendent of library + root_is_loading = gInventory.libraryFetchInProgress(); + } + if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) - || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) + || (LLInventoryModel::backgroundFetchActive() && root_is_loading && mShowLoadStatus) ) { std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor, diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 0a8108899a..c8fd8d2062 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1339,8 +1339,7 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) //Initialize statics. bool LLInventoryModel::isBulkFetchProcessingComplete() { - return ( (sFetchQueue.empty() - && sBulkFetchCount<=0) ? TRUE : FALSE ) ; + return sFetchQueue.empty() && sBulkFetchCount<=0; } class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder @@ -1615,10 +1614,58 @@ void LLInventoryModel::bulkFetch(std::string url) } } +bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) +{ + for (std::deque::iterator it = sFetchQueue.begin(); + it != sFetchQueue.end(); ++it) + { + const LLUUID& fetch_id = *it; + if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) + return false; + } + return true; +} + +/* static */ +bool LLInventoryModel::libraryFetchStarted() +{ + return sLibraryFetchStarted; +} + +/* static */ +bool LLInventoryModel::libraryFetchCompleted() +{ + return libraryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getLibraryRootFolderID()); +} + +/* static */ +bool LLInventoryModel::libraryFetchInProgress() +{ + return libraryFetchStarted() && !libraryFetchCompleted(); +} + +/* static */ +bool LLInventoryModel::myInventoryFetchStarted() +{ + return sMyInventoryFetchStarted; +} + +/* static */ +bool LLInventoryModel::myInventoryFetchCompleted() +{ + return myInventoryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getRootFolderID()); +} + +/* static */ +bool LLInventoryModel::myInventoryFetchInProgress() +{ + return myInventoryFetchStarted() && !myInventoryFetchCompleted(); +} + // static bool LLInventoryModel::isEverythingFetched() { - return (sAllFoldersFetched ? true : false); + return sAllFoldersFetched; } //static @@ -1637,7 +1684,6 @@ void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id) if (!sMyInventoryFetchStarted) { sMyInventoryFetchStarted = TRUE; - sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); sFetchQueue.push_back(gInventory.getRootFolderID()); gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); } @@ -1645,7 +1691,6 @@ void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id) { sLibraryFetchStarted = TRUE; sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); - sFetchQueue.push_back(gInventory.getRootFolderID()); gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); } } diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 27bbca493d..28c51e97bc 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -516,6 +516,14 @@ public: // Add categories to a list to be fetched in bulk. static void bulkFetch(std::string url); + static bool libraryFetchStarted(); + static bool libraryFetchCompleted(); + static bool libraryFetchInProgress(); + + static bool myInventoryFetchStarted(); + static bool myInventoryFetchCompleted(); + static bool myInventoryFetchInProgress(); + private: static BOOL sMyInventoryFetchStarted; static BOOL sLibraryFetchStarted; @@ -525,6 +533,7 @@ private: // completing the fetch once per session should be sufficient static BOOL sBackgroundFetchActive; static S16 sBulkFetchCount; + }; // a special inventory model for the agent -- cgit v1.2.3 From e6349ac1927cb311c714e37c710c069b6de67a0b Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 21 Dec 2009 14:27:02 -0800 Subject: EXT-3550 Post-review fixes to previous commit. Reviewed by Nat --- indra/newview/llprogressview.cpp | 2 +- indra/newview/llstartup.cpp | 26 ++++++++++++-------------- indra/newview/llstartup.h | 1 + 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index f723d9f240..7a48f890e0 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -269,7 +269,7 @@ bool LLProgressView::handleUpdate(const LLSD& event_data) LLSD desc = event_data.get("desc"); LLSD percent = event_data.get("percent"); - if(message.isUndefined()) + if(message.isDefined()) { setMessage(message.asString()); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fdf8fa171d..786bcb5742 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1082,6 +1082,17 @@ bool idle_startup() credentials["passwd"] = gPassword; login->connect(credentials); + LLStartUp::setStartupState( STATE_LOGIN_CURL_UNSTUCK ); + return FALSE; + } + + if(STATE_LOGIN_CURL_UNSTUCK == LLStartUp::getStartupState()) + { + // If we get here we have gotten past the potential stall + // in curl, so take "may appear frozen" out of progress bar. JC + auth_desc = LLTrans::getString("LoginInProgressNoFrozen"); + set_startup_status(progress, auth_desc, auth_message); + LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE ); return FALSE; } @@ -1168,20 +1179,6 @@ bool idle_startup() show_connect_box = true; } } - else - { - // If we get here we have gotten past the potential stall - // in curl, so take "may appear frozen" out of progress bar. JC - // *NOTE:Mani - Actual responses handled by LLLoginInstance::handleLoginEvent() - static bool has_set_unfrozen_msg = false; - if(!has_set_unfrozen_msg) - { - auth_desc = LLTrans::getString("LoginInProgressNoFrozen"); - set_startup_status(progress, auth_desc, auth_message); - has_set_unfrozen_msg = true; - } - } - return FALSE; } @@ -2703,6 +2700,7 @@ std::string LLStartUp::startupStateToString(EStartupState state) RTNENUM( STATE_LOGIN_WAIT ); RTNENUM( STATE_LOGIN_CLEANUP ); RTNENUM( STATE_LOGIN_AUTH_INIT ); + RTNENUM( STATE_LOGIN_CURL_UNSTUCK ); RTNENUM( STATE_LOGIN_PROCESS_RESPONSE ); RTNENUM( STATE_WORLD_INIT ); RTNENUM( STATE_MULTIMEDIA_INIT ); diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index ab11b42e74..92fe9521d3 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -55,6 +55,7 @@ typedef enum { STATE_LOGIN_WAIT, // Wait for user input at login screen STATE_LOGIN_CLEANUP, // Get rid of login screen and start login STATE_LOGIN_AUTH_INIT, // Start login to SL servers + STATE_LOGIN_CURL_UNSTUCK, // Update progress to remove "SL appears frozen" msg. STATE_LOGIN_PROCESS_RESPONSE, // Check authentication reply STATE_WORLD_INIT, // Start building the world STATE_MULTIMEDIA_INIT, // Init the rest of multimedia library -- cgit v1.2.3 From 65dfc746888f44309efaacf439057ba30e713e06 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 21 Dec 2009 17:46:46 -0500 Subject: Minor comment change. --- indra/newview/llagentwearables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e75d94bb2c..79ba3fb51d 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -872,7 +872,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs return; mInitialWearablesUpdateReceived = true; - // If this is the very first time the user has logged into viewer2+ from a legacy viewer, + // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) // then auto-populate outfits from the library into the My Outfits folder. if (LLInventoryModel::getIsFirstTimeInViewer2()) { -- cgit v1.2.3 From 04b63a67e60afafeb472b76bcfb7976f4f01e191 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 21 Dec 2009 18:31:19 -0500 Subject: EXT-3619 : CRASH in xui preview tool when editing an inventory panel Now checking if inventory is usable before checking if views are initialized. --- indra/newview/llinventorypanel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 0bdad791a7..082b7a9468 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -402,9 +402,12 @@ void LLInventoryPanel::modelChanged(U32 mask) // static void LLInventoryPanel::onIdle(void *userdata) { + if (!gInventory.isInventoryUsable()) + return; + LLInventoryPanel *self = (LLInventoryPanel*)userdata; // Inventory just initialized, do complete build - if (!self->mViewsInitialized && gInventory.isInventoryUsable()) + if (!self->mViewsInitialized) { self->initializeViews(); } -- cgit v1.2.3 From cfa21aad6818fc5105836fbc491ff5b6bf38d138 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Mon, 21 Dec 2009 18:32:02 -0500 Subject: EXT-3573 : Wear and Edit buttons on AppearanceSP are difficult to click --- .../skins/default/xui/en/panel_outfits_inventory.xml | 2 +- .../skins/default/xui/en/sidepanel_appearance.xml | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 5c99022f35..d6d8e9562b 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -3,7 +3,7 @@ +width="333"> @@ -85,9 +86,9 @@ left="0" class="panel_outfits_inventory" filename="panel_outfits_inventory.xml" name="panel_outfits_inventory" - height="550" - min_height="510" - width="333" + height="515" + min_height="410" + width="320" top_pad="0" follows="all" /> -- cgit v1.2.3 From 9538f966139178b16c88393db301666e6d82d04e Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 21 Dec 2009 15:33:06 -0800 Subject: EXT-3523 Missing God Mode functions in User Profile EXT-2635 No message reminding user that a restart is required to reset cache (was Clear Cache) reviewed by Richard --- indra/newview/llavataractions.cpp | 109 +++++++++++++++++++++ indra/newview/llavataractions.h | 24 +++++ indra/newview/llfloaterpreference.cpp | 3 +- indra/newview/llpanelavatar.cpp | 34 +++++++ indra/newview/llpanelavatar.h | 9 ++ .../skins/default/xui/en/menu_profile_overflow.xml | 36 +++++++ 6 files changed, 214 insertions(+), 1 deletion(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 636b1de4d4..a98de900c8 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -336,6 +336,54 @@ void LLAvatarActions::pay(const LLUUID& id) } } +// static +void LLAvatarActions::kick(const LLUUID& id) +{ + LLSD payload; + payload["avatar_id"] = id; + LLNotifications::instance().add("KickUser", LLSD(), payload, handleKick); +} + +// static +void LLAvatarActions::freeze(const LLUUID& id) +{ + LLSD payload; + payload["avatar_id"] = id; + LLNotifications::instance().add("FreezeUser", LLSD(), payload, handleFreeze); +} + +// static +void LLAvatarActions::unfreeze(const LLUUID& id) +{ + LLSD payload; + payload["avatar_id"] = id; + LLNotifications::instance().add("UnFreezeUser", LLSD(), payload, handleUnfreeze); +} + +//static +void LLAvatarActions::csr(const LLUUID& id, std::string name) +{ + if (name.empty()) return; + + std::string url = "http://csr.lindenlab.com/agent/"; + + // slow and stupid, but it's late + S32 len = name.length(); + for (S32 i = 0; i < len; i++) + { + if (name[i] == ' ') + { + url += "%20"; + } + else + { + url += name[i]; + } + } + + LLWeb::loadURL(url); +} + //static void LLAvatarActions::share(const LLUUID& id) { @@ -459,6 +507,67 @@ bool LLAvatarActions::callbackAddFriendWithMessage(const LLSD& notification, con return false; } +// static +bool LLAvatarActions::handleKick(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + + if (option == 0) + { + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_GodKickUser); + msg->nextBlockFast(_PREHASH_UserInfo); + msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID()); + msg->addUUIDFast(_PREHASH_AgentID, avatar_id ); + msg->addU32("KickFlags", KICK_FLAGS_DEFAULT ); + msg->addStringFast(_PREHASH_Reason, response["message"].asString() ); + gAgent.sendReliableMessage(); + } + return false; +} +bool LLAvatarActions::handleFreeze(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + + if (option == 0) + { + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_GodKickUser); + msg->nextBlockFast(_PREHASH_UserInfo); + msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID()); + msg->addUUIDFast(_PREHASH_AgentID, avatar_id ); + msg->addU32("KickFlags", KICK_FLAGS_FREEZE ); + msg->addStringFast(_PREHASH_Reason, response["message"].asString() ); + gAgent.sendReliableMessage(); + } + return false; +} +bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + std::string text = response["message"].asString(); + if (option == 0) + { + LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID(); + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_GodKickUser); + msg->nextBlockFast(_PREHASH_UserInfo); + msg->addUUIDFast(_PREHASH_GodID, gAgent.getID() ); + msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID()); + msg->addUUIDFast(_PREHASH_AgentID, avatar_id ); + msg->addU32("KickFlags", KICK_FLAGS_UNFREEZE ); + msg->addStringFast(_PREHASH_Reason, text ); + gAgent.sendReliableMessage(); + } + return false; +} // static bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& response) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 01c18d4228..a4504ae679 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -138,11 +138,35 @@ public: */ static void inviteToGroup(const LLUUID& id); + /** + * Kick avatar off grid + */ + static void kick(const LLUUID& id); + + /** + * Freeze avatar + */ + static void freeze(const LLUUID& id); + + /** + * Unfreeze avatar + */ + static void unfreeze(const LLUUID& id); + + /** + * Open csr page for avatar + */ + static void csr(const LLUUID& id, std::string name); + + private: static bool callbackAddFriend(const LLSD& notification, const LLSD& response); static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response); static bool handleRemove(const LLSD& notification, const LLSD& response); static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id); + static bool handleKick(const LLSD& notification, const LLSD& response); + static bool handleFreeze(const LLSD& notification, const LLSD& response); + static bool handleUnfreeze(const LLSD& notification, const LLSD& response); static void callback_invite_to_group(LLUUID group_id, LLUUID id); // Just request friendship, no dialog. diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ff568a11a9..7e0e8bfaa7 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -760,8 +760,9 @@ void LLFloaterPreference::onClickResetCache() { gSavedSettings.setString("NewCacheLocation", ""); gSavedSettings.setString("NewCacheLocationTopFolder", ""); - LLNotificationsUtil::add("CacheWillBeMoved"); } + + LLNotificationsUtil::add("CacheWillBeMoved"); std::string cache_location = gDirUtilp->getCacheDir(true); gSavedSettings.setString("CacheLocation", cache_location); std::string top_folder(gDirUtilp->getBaseFileName(cache_location)); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index ffe7f57167..e9131a342e 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -403,6 +403,11 @@ void LLPanelProfileTab::updateButtons() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// +bool enable_god() +{ + return gAgent.isGodlike(); +} + LLPanelAvatarProfile::LLPanelAvatarProfile() : LLPanelProfileTab() { @@ -423,6 +428,13 @@ BOOL LLPanelAvatarProfile::postBuild() LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("Profile.Pay", boost::bind(&LLPanelAvatarProfile::pay, this)); registrar.add("Profile.Share", boost::bind(&LLPanelAvatarProfile::share, this)); + registrar.add("Profile.Kick", boost::bind(&LLPanelAvatarProfile::kick, this)); + registrar.add("Profile.Freeze", boost::bind(&LLPanelAvatarProfile::freeze, this)); + registrar.add("Profile.Unfreeze", boost::bind(&LLPanelAvatarProfile::unfreeze, this)); + registrar.add("Profile.CSR", boost::bind(&LLPanelAvatarProfile::csr, this)); + + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable; + enable.add("Profile.EnableGod", boost::bind(&enable_god)); mProfileMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -622,6 +634,28 @@ void LLPanelAvatarProfile::share() LLAvatarActions::share(getAvatarId()); } +void LLPanelAvatarProfile::kick() +{ + LLAvatarActions::kick(getAvatarId()); +} + +void LLPanelAvatarProfile::freeze() +{ + LLAvatarActions::freeze(getAvatarId()); +} + +void LLPanelAvatarProfile::unfreeze() +{ + LLAvatarActions::unfreeze(getAvatarId()); +} + +void LLPanelAvatarProfile::csr() +{ + std::string name; + gCacheName->getFullName(getAvatarId(), name); + LLAvatarActions::csr(getAvatarId(), name); +} + void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url) { LLWeb::loadURL(url); diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index b19c5cca49..8f07c67fb1 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -181,6 +181,15 @@ protected: */ void share(); + void kick(); + void freeze(); + void unfreeze(); + void csr(); + + + bool enableGod(); + + void onUrlTextboxClicked(const std::string& url); void onHomepageTextboxClicked(); void onAddFriendButtonClick(); diff --git a/indra/newview/skins/default/xui/en/menu_profile_overflow.xml b/indra/newview/skins/default/xui/en/menu_profile_overflow.xml index d0128d1c9a..1dc1c610cf 100644 --- a/indra/newview/skins/default/xui/en/menu_profile_overflow.xml +++ b/indra/newview/skins/default/xui/en/menu_profile_overflow.xml @@ -19,4 +19,40 @@ + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 4a460a1dcf610fd52d91acb7cfd2749e008a7486 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 21 Dec 2009 16:05:20 -0800 Subject: added optional timing of fast timers themselves --- indra/llcommon/llfasttimer.h | 27 ++++++++++++++++++++++----- indra/newview/llfasttimerview.cpp | 16 +++++++++++++--- indra/newview/llfasttimerview.h | 1 + 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 45b84ea3ea..f5c90291b8 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -36,6 +36,7 @@ #include "llinstancetracker.h" #define FAST_TIMER_ON 1 +#define TIME_FAST_TIMERS 0 #if LL_WINDOWS @@ -56,7 +57,7 @@ inline U32 get_cpu_clock_count_32() return ret_val; } -// return full timer value, still shifted by 8 bits +// return full timer value, *not* shifted by 8 bits inline U64 get_cpu_clock_count_64() { U64 ret_val; @@ -69,7 +70,7 @@ inline U64 get_cpu_clock_count_64() mov dword ptr [ret_val+4], edx mov dword ptr [ret_val], eax } - return ret_val >> 8; + return ret_val; } #endif // LL_WINDOWS @@ -242,6 +243,9 @@ public: LLFastTimer(NamedTimer::FrameState& timer) : mFrameState(&timer) { +#if TIME_FAST_TIMERS + U64 timer_start = get_cpu_clock_count_64(); +#endif #if FAST_TIMER_ON NamedTimer::FrameState* frame_state = &timer; U32 cur_time = get_cpu_clock_count_32(); @@ -255,11 +259,18 @@ public: mLastTimer = sCurTimer; sCurTimer = this; +#endif +#if TIME_FAST_TIMERS + U64 timer_end = get_cpu_clock_count_64(); + sTimerCycles += timer_end - timer_start; #endif } ~LLFastTimer() { +#if TIME_FAST_TIMERS + U64 timer_start = get_cpu_clock_count_64(); +#endif #if FAST_TIMER_ON NamedTimer::FrameState* frame_state = mFrameState; U32 cur_time = get_cpu_clock_count_32(); @@ -276,6 +287,11 @@ public: U32 total_time = cur_time - mStartTotalTime; last_timer->mStartSelfTime += total_time; #endif +#if TIME_FAST_TIMERS + U64 timer_end = get_cpu_clock_count_64(); + sTimerCycles += timer_end - timer_start; + sTimerCalls++; +#endif } @@ -297,11 +313,12 @@ public: static const NamedTimer* getTimerByName(const std::string& name); public: - static bool sPauseHistory; - static bool sResetHistory; + static bool sPauseHistory; + static bool sResetHistory; + static U64 sTimerCycles; + static U32 sTimerCalls; private: - typedef std::vector timer_stack_t; static LLFastTimer* sCurTimer; static S32 sCurFrameIndex; static S32 sLastFrameIndex; diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 0b27001f10..effa57b1ef 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -98,6 +98,7 @@ LLFastTimerView::LLFastTimerView(const LLRect& rect) mHoverBarIndex = -1; FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount(); mPrintStats = -1; + mAverageCyclesPerTimer = 0; } @@ -306,8 +307,9 @@ void LLFastTimerView::draw() S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f); S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f); - // HACK: casting away const. Should use setRect or some helper function instead. - const_cast(getRect()).setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height); + LLRect new_rect; + new_rect.setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height); + setRect(new_rect); S32 left, top, right, bottom; S32 x, y, barw, barh, dx, dy; @@ -321,6 +323,10 @@ void LLFastTimerView::draw() S32 xleft = margin; S32 ytop = margin; + mAverageCyclesPerTimer = llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f)); + LLFastTimer::sTimerCycles = 0; + LLFastTimer::sTimerCalls = 0; + // Draw some help { @@ -328,6 +334,10 @@ void LLFastTimerView::draw() y = height - ytop; texth = (S32)LLFontGL::getFontMonospace()->getLineHeight(); +#if TIME_FAST_TIMERS + tdesc = llformat("Cycles per timer call: %d", mAverageCyclesPerTimer); + LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); +#else char modedesc[][32] = { "2 x Average ", "Max ", @@ -342,7 +352,6 @@ void LLFastTimerView::draw() tdesc = llformat("Full bar = %s [Click to pause/reset] [SHIFT-Click to toggle]",modedesc[mDisplayMode]); LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - textw = LLFontGL::getFontMonospace()->getWidth(tdesc); x = xleft, y -= (texth + 2); @@ -352,6 +361,7 @@ void LLFastTimerView::draw() LLFontGL::getFontMonospace()->renderUTF8(std::string("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]"), 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); +#endif y -= (texth + 2); } diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 2bb023ab14..f5c8f23818 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -91,6 +91,7 @@ private: S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; S32 mPrintStats; + S32 mAverageCyclesPerTimer; }; #endif -- cgit v1.2.3 From 093795c10c9a15f293416467bf686f87f0fdbc8b Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 21 Dec 2009 17:32:05 -0800 Subject: EXT-3599 - no chiclets in the im well window --- indra/llui/llui.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 728ed4e7aa..d0ed3b6fca 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -2047,12 +2047,16 @@ namespace LLInitParam void TypedParam::setBlockFromValue() { - left = mData.mValue.mLeft; - right = mData.mValue.mRight; - bottom = mData.mValue.mBottom; - top = mData.mValue.mTop; - width.setProvided(false); - height.setProvided(false); + // because of the ambiguity in specifying a rect by position and/or dimensions + // we clear the "provided" flag so that values from xui/etc have priority + // over those calculated from the rect object + + left.set(mData.mValue.mLeft, false); + right.set(mData.mValue.mRight, false); + bottom.set(mData.mValue.mBottom, false); + top.set(mData.mValue.mTop, false); + width.set(mData.mValue.getWidth(), false); + height.set(mData.mValue.getHeight(), false); } TypedParam::TypedParam(BlockDescriptor& descriptor, const char* name, LLCoordGL value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count) -- cgit v1.2.3 From 5b978865e3b09e5b911728cd6381a2a4a7b3a9d3 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 21 Dec 2009 17:54:15 -0800 Subject: EXT-3623 - taking a snapshot on windows completely breakd the UI --- indra/newview/llfloatersnapshot.cpp | 7 ++++++- indra/newview/llfloatersnapshot.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index dbecd45d1f..f53b62e490 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1379,7 +1379,6 @@ void LLFloaterSnapshot::Impl::onClickDiscard(void* data) if (view) { - view->getParent()->setMouseOpaque(FALSE); view->closeFloater(); } } @@ -2105,6 +2104,12 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->adjustToFitScreen(this, FALSE); } +void LLFloaterSnapshot::onClose(bool app_quitting) +{ + getParent()->setMouseOpaque(FALSE); +} + + //static void LLFloaterSnapshot::update() { diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index bd01f6c573..1333497bd2 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -52,6 +52,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); static void update(); -- cgit v1.2.3 From 076edd8ba9d33e5cc66f3671122ac3b545bb7120 Mon Sep 17 00:00:00 2001 From: Erica Date: Mon, 21 Dec 2009 22:52:33 -0800 Subject: Cleaned up unused textures and xml, checked log for warnings --- indra/newview/skins/default/textures/textures.xml | 95 +++------------------- .../skins/default/xui/en/panel_landmark_info.xml | 1 - 2 files changed, 10 insertions(+), 86 deletions(-) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 9212d3d87b..6c9a63d0b3 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -168,6 +168,7 @@ with the same filename but different name + @@ -310,6 +311,9 @@ with the same filename but different name + + + @@ -549,8 +553,8 @@ with the same filename but different name - - + + @@ -635,28 +639,12 @@ with the same filename but different name - - - - - - - - - - - + - - - - - - @@ -666,67 +654,30 @@ with the same filename but different name - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - @@ -736,10 +687,6 @@ with the same filename but different name - - - - @@ -762,8 +709,6 @@ with the same filename but different name - - @@ -773,13 +718,11 @@ with the same filename but different name + + - - - - @@ -806,23 +749,5 @@ with the same filename but different name - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 68e58b27ec..d930cc3b1d 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -228,7 +228,6 @@ value="Title:" width="290" /> Date: Tue, 22 Dec 2009 10:14:47 +0000 Subject: EXT-3618: Add the "?" button back to the nearby chat floater. --- indra/newview/skins/default/xui/en/floater_nearby_chat.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index fb8893678d..58ba346e50 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -18,6 +18,7 @@ height="300" layout="topleft" name="nearby_chat" + help_topic="nearby_chat" save_rect="true" title="NEARBY CHAT" save_dock_state="true" -- cgit v1.2.3 From 4d9762eb846ae1894f0c31eecb6230803018e730 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Tue, 22 Dec 2009 12:26:06 +0200 Subject: work on EXT-3463 - Ambiguity: some system messages are shown as sent from avatar and others are shown as sent from SL --HG-- branch : product-engine --- indra/newview/llimview.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917cc11e1..a521eb56af 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -243,6 +243,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES std::string joined_call = LLTrans::getString("joined_call"); std::string other_avatar_name = ""; + std::string message; + switch(mSessionType) { case AVALINE_SESSION: @@ -255,10 +257,13 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); + message = other_avatar_name + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); + message = you + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -268,10 +273,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); + message = you + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, joined_call); + message = other_avatar_name + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -295,10 +302,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, other_avatar_name, mOtherParticipantID, started_call); + message = other_avatar_name + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), joined_call); + message = you + " " + joined_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -308,7 +317,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - LLIMModel::getInstance()->addMessageSilently(mSessionID, you, gAgent.getID(), started_call); + message = you + " " + started_call; + LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; default: break; -- cgit v1.2.3 From 33d76f152ee1df7600f157c627ce5f78a681778d Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 22 Dec 2009 15:35:06 +0200 Subject: Fixed low bug EXT-3430(Accept/reject voice call dialog appears in wrong place for several moments) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 19 ++++++++++++++----- indra/newview/llimview.h | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917cc11e1..403883ad99 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1403,11 +1403,20 @@ void LLCallDialog::getAllowedRect(LLRect& rect) rect = gViewerWindow->getWorldViewRectScaled(); } -void LLCallDialog::onOpen(const LLSD& key) +BOOL LLCallDialog::postBuild() { + if (!LLDockableFloater::postBuild()) + return FALSE; + // dock the dialog to the Speak Button, where other sys messages appear - setDockControl(new LLDockControl(LLBottomTray::getInstance()->getChild("speak_panel"), - this, getDockTongue(), LLDockControl::TOP, boost::bind(&LLCallDialog::getAllowedRect, this, _1))); + LLView *anchor_panel = LLBottomTray::getInstance()->getChild("speak_panel"); + + setDockControl(new LLDockControl( + anchor_panel, this, + getDockTongue(), LLDockControl::TOP, + boost::bind(&LLCallDialog::getAllowedRect, this, _1))); + + return TRUE; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1551,7 +1560,7 @@ void LLOutgoingCallDialog::onCancel(void* user_data) BOOL LLOutgoingCallDialog::postBuild() { - BOOL success = LLDockableFloater::postBuild(); + BOOL success = LLCallDialog::postBuild(); childSetAction("Cancel", onCancel, this); @@ -1570,7 +1579,7 @@ LLCallDialog(payload) BOOL LLIncomingCallDialog::postBuild() { - LLDockableFloater::postBuild(); + LLCallDialog::postBuild(); LLUUID session_id = mPayload["session_id"].asUUID(); LLSD caller_id = mPayload["caller_id"]; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 09f0c9df71..909fdaa37f 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -476,7 +476,7 @@ public: LLCallDialog(const LLSD& payload); ~LLCallDialog() {} - virtual void onOpen(const LLSD& key); + virtual BOOL postBuild(); protected: virtual void getAllowedRect(LLRect& rect); -- cgit v1.2.3 From c4ad806164e5d01bd95e46bd47dafc0eb8d95874 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 22 Dec 2009 15:51:28 +0200 Subject: Related to EXT-3581: removed unnecessary code from LLParticipantList::updateRecentSpeakersOrder method. --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 5941487c7d..7d5944ea2b 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -213,7 +213,6 @@ void LLParticipantList::updateRecentSpeakersOrder() if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder()) { // Resort avatar list - mAvatarList->setDirty(true); sort(); } } -- cgit v1.2.3 From 29ac4cf97ddbf7ee311092b75c8f3688019a5503 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Tue, 22 Dec 2009 16:10:10 +0200 Subject: fixed normal bug (EXT-3587) Notifications overflow toast cannot be dismissed during spam - reduced to minimum number of show/hide cycles for the Overflow toast, so it is easier now to click the (x) button - the Overflow toast is now created once for a channel --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index bd256ec9c2..c18fe8ad7e 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -217,7 +217,10 @@ void LLScreenChannel::addToast(const LLToast::Params& p) ToastElem new_toast_elem(p); + // reset HIDDEN flags for the Overflow Toast mOverflowToastHidden = false; + if(mOverflowToastPanel) + mOverflowToastPanel->setIsHidden(false); new_toast_elem.toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, _1)); new_toast_elem.toast->setOnToastDestroyedCallback(boost::bind(&LLScreenChannel::onToastDestroyed, this, _1)); @@ -459,8 +462,6 @@ void LLScreenChannel::showToastsBottom() S32 toast_margin = 0; std::vector::reverse_iterator it; - closeOverflowToastPanel(); - for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) { if(it != mToastList.rbegin()) @@ -513,7 +514,11 @@ void LLScreenChannel::showToastsBottom() mHiddenToastsNum++; } createOverflowToast(bottom, gSavedSettings.getS32("NotificationTipToastLifeTime")); - } + } + else + { + closeOverflowToastPanel(); + } } //-------------------------------------------------------------------------- @@ -544,11 +549,14 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) LLRect toast_rect; LLToast::Params p; p.lifetime_secs = timer; - mOverflowToastPanel = new LLToast(p); + + if(!mOverflowToastPanel) + mOverflowToastPanel = new LLToast(p); if(!mOverflowToastPanel) return; + mOverflowToastPanel->startFading(); mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this)); LLTextBox* text_box = mOverflowToastPanel->getChild("toast_text"); @@ -606,8 +614,8 @@ void LLScreenChannel::closeOverflowToastPanel() { if(mOverflowToastPanel != NULL) { - mOverflowToastPanel->closeFloater(); - mOverflowToastPanel = NULL; + mOverflowToastPanel->setVisible(FALSE); + mOverflowToastPanel->stopFading(); } } -- cgit v1.2.3 From 304e321f89e9a517ba90d6b41999a65591639ad9 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 22 Dec 2009 16:39:56 +0200 Subject: implemented EXT-3515 Click on IM button for multiple selected Avatars each time creates new IM session --HG-- branch : product-engine --- indra/newview/llavataractions.cpp | 1 - indra/newview/llgroupactions.cpp | 7 +---- indra/newview/llimview.cpp | 64 +++++++++++++++++++++++++++++++++++++-- indra/newview/llimview.h | 8 +++++ 4 files changed, 71 insertions(+), 9 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index c5a1ffdcb3..9f7a36e209 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -243,7 +243,6 @@ void LLAvatarActions::startAdhocCall(const std::vector& ids) return; } - // start the call once the session has fully initialized gIMMgr->autoStartCallOnStartup(session_id); make_ui_sound("UISndStartIM"); diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 22658b4d65..7dd8ea694e 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -138,12 +138,7 @@ void LLGroupActions::startCall(const LLUUID& group_id) } // start the call - // *TODO: move this to LLIMMgr? - LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); - if (session && session->mSessionInitialized) - gIMMgr->startCall(session_id); - else - gIMMgr->autoStartCallOnStartup(session_id); + gIMMgr->autoStartCallOnStartup(session_id); make_ui_sound("UISndStartIM"); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8917cc11e1..85880af923 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -429,6 +429,50 @@ LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const (LLIMModel::LLIMSession*) NULL); } +//*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code +LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector& ids) +{ + S32 num = ids.size(); + if (!num) return NULL; + + if (mId2SessionMap.empty()) return NULL; + + std::map::const_iterator it = mId2SessionMap.begin(); + for (; it != mId2SessionMap.end(); ++it) + { + LLIMSession* session = (*it).second; + + if (!session->isAdHoc()) continue; + if (session->mInitialTargetIDs.size() != num) continue; + + std::list tmp_list(session->mInitialTargetIDs.begin(), session->mInitialTargetIDs.end()); + + std::vector::const_iterator iter = ids.begin(); + while (iter != ids.end()) + { + tmp_list.remove(*iter); + ++iter; + + if (tmp_list.empty()) + { + break; + } + } + + if (tmp_list.empty() && iter == ids.end()) + { + return session; + } + } + + return NULL; +} + +bool LLIMModel::LLIMSession::isAdHoc() +{ + return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); +} + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { LLIMSession* session = findIMSession(old_session_id); @@ -2097,7 +2141,13 @@ BOOL LLIMMgr::getIMReceived() const void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id) { LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id); - if (session) + if (!session) return; + + if (session->mSessionInitialized) + { + startCall(session_id); + } + else { session->mStartCallOnInitialize = true; } @@ -2159,12 +2209,22 @@ LLUUID LLIMMgr::addSession( bool new_session = !LLIMModel::getInstance()->findIMSession(session_id); + //works only for outgoing ad-hoc sessions + if (new_session && IM_SESSION_CONFERENCE_START == dialog && ids.size()) + { + LLIMModel::LLIMSession* ad_hoc_found = LLIMModel::getInstance()->findAdHocIMSession(ids); + if (ad_hoc_found) + { + new_session = false; + session_id = ad_hoc_found->mSessionID; + } + } + if (new_session) { LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice); } - //*TODO remove this "floater" thing when Communicate Floater's gone LLFloaterIMPanel* floater = findFloaterBySession(session_id); if(!floater) diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 09f0c9df71..c928546219 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -74,6 +74,8 @@ public: void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction); static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); + bool isAdHoc(); + LLUUID mSessionID; std::string mName; EInstantMessage mType; @@ -133,6 +135,12 @@ public: */ LLIMSession* findIMSession(const LLUUID& session_id) const; + /** + * Find an Ad-Hoc IM Session with specified participants + * @return first found Ad-Hoc session or NULL if the session does not exist + */ + LLIMSession* findAdHocIMSession(const std::vector& ids); + /** * Rebind session data to a new session id. */ -- cgit v1.2.3 From 754801f66942b0e9ec5ab4278dacb034fd23a0dd Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Tue, 22 Dec 2009 17:32:30 +0200 Subject: fixed minor bug EXT-3627 'Loading..' is shown over second life icon in view profile panel --HG-- branch : product-engine --- indra/newview/lltexturectrl.cpp | 1 + indra/newview/lltexturectrl.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 5f7c2f5080..25e5e23e6f 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1237,6 +1237,7 @@ void LLTextureCtrl::draw() // Using the discard level, do not show the string if the texture is almost but not // fully loaded. if ( mTexturep.notNull() && + (!mTexturep->isFullyLoaded()) && (mShowLoadingPlaceholder == TRUE) && (mTexturep->getDiscardLevel() != 1) && (mTexturep->getDiscardLevel() != 0)) diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 0b232da62b..fb1d591e32 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -45,7 +45,7 @@ class LLButton; class LLFloaterTexturePicker; class LLInventoryItem; -class LLViewerTexture; +class LLViewerFetchedTexture; // used for setting drag & drop callbacks. typedef boost::function drag_n_drop_callback; @@ -189,7 +189,7 @@ private: drag_n_drop_callback mDropCallback; commit_callback_t mOnCancelCallback; commit_callback_t mOnSelectCallback; - LLPointer mTexturep; + LLPointer mTexturep; LLUIColor mBorderColor; LLUUID mImageItemID; LLUUID mImageAssetID; -- cgit v1.2.3 From 45e0b59524fbdc44051bb1b23b7958e357823de2 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Tue, 22 Dec 2009 18:37:32 +0200 Subject: fixed minor bug EXT-3462 Voice Chat vs Voice Call --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index acdf3d1bf7..32eae9d11d 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2904,13 +2904,13 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Joined the voice call - Joining Voice Chat... + Joining voice call... Connected, click End Call to hang up - Left Voice Chat + Left voice call Connecting... -- cgit v1.2.3 From 34b684c49e3e25002b34cf20466a5aeed3ee1f82 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 13:09:34 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- added doxygen comments in header -- replaced collecting of voice participants' uuids, added helpful & removed unused code comments in cpp --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 43 ++++++++++++----------------------------- indra/newview/llcallfloater.h | 30 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index fe4f0c5525..683cde7bee 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -482,28 +482,10 @@ void LLCallFloater::updateParticipantsVoiceState() std::vector speakers_list; // Get a list of participants from VoiceClient - LLVoiceClient::participantMap *map = gVoiceClient->getParticipantList(); - if (!map) return; - - for (LLVoiceClient::participantMap::const_iterator iter = map->begin(); - iter != map->end(); ++iter) - { - LLUUID id = (*iter).second->mAvatarID; -// if ( id != gAgent.getID() ) - { - speakers_list.push_back(id); -/* - LLAvatarListItem* item = dynamic_cast (mAvatarList->getItemByValue(id)); - if (item) - { - setState(item, STATE_JOINED); - } -*/ - - } - } + std::vector speakers_uuids; + get_voice_participants_uuids(speakers_uuids); - // Updating the status for each participant. + // Updating the status for each participant already in list. std::vector items; mAvatarList->getItems(items); std::vector::const_iterator @@ -518,14 +500,14 @@ void LLCallFloater::updateParticipantsVoiceState() const LLUUID participant_id = item->getAvatarId(); bool found = false; - std::vector::iterator speakers_iter = std::find(speakers_list.begin(), speakers_list.end(), participant_id); + std::vector::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id); lldebugs << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << llendl; // If an avatarID assigned to a panel is found in a speakers list // obtained from VoiceClient we assign the JOINED status to the owner // of this avatarID. - if (speakers_iter != speakers_list.end()) + if (speakers_iter != speakers_uuids.end()) { setState(item, STATE_JOINED); @@ -534,15 +516,15 @@ void LLCallFloater::updateParticipantsVoiceState() continue; speaker->mHasLeftCurrentCall = FALSE; - speakers_list.erase(speakers_iter); + speakers_uuids.erase(speakers_iter); found = true; } - // If an avatarID is not found in a speakers list from VoiceClient and - // a panel with this ID has a JOINED status this means that this person - // HAS LEFT the call. if (!found) { + // If an avatarID is not found in a speakers list from VoiceClient and + // a panel with this ID has a JOINED status this means that this person + // HAS LEFT the call. if ((getState(participant_id) == STATE_JOINED)) { setState(item, STATE_LEFT); @@ -553,6 +535,9 @@ void LLCallFloater::updateParticipantsVoiceState() speaker->mHasLeftCurrentCall = TRUE; } + // If an avatarID is not found in a speakers list from VoiceClient and + // a panel with this ID has a LEFT status this means that this person + // HAS ENTERED session but it is not in voice chat yet. So, set INVITED status else if ((getState(participant_id) != STATE_LEFT)) { setState(item, STATE_INVITED); @@ -592,18 +577,14 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) switch (state) { case STATE_INVITED: -// status_str = "INVITED"; // *TODO: localize new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_JOINED: -// status_str = "JOINED"; // *TODO: localize new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_LEFT: { - // status_str = "HAS LEFT CALL"; // *TODO: localize new_desc.setStyle(LLFontGL::ITALIC); - } break; default: diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 21fba433c6..1e64066647 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -106,6 +106,13 @@ private: * Refreshes participant list according to current Voice Channel */ void refreshPartisipantList(); + + /** + * Handles event on avatar list is refreshed after it was marked dirty. + * + * It sets initial participants voice states (once after the first refreshing) + * and updates voice states each time anybody is joined/left voice chat in session. + */ void onAvatarListRefreshed(); @@ -114,7 +121,21 @@ private: void setModeratorMutedVoice(bool moderator_muted); void updateAgentModeratorState(); + /** + * Sets initial participants voice states in avatar list (Invited, Joined, Has Left). + * + * @see refreshPartisipantList() + * @see onAvatarListRefreshed() + * @see mInitParticipantsVoiceState + */ void initParticipantsVoiceState(); + + /** + * Updates participants voice states in avatar list (Invited, Joined, Has Left). + * + * @see onAvatarListRefreshed() + * @see onChanged() + */ void updateParticipantsVoiceState(); void setState(LLAvatarListItem* item, ESpeakerState state); @@ -141,6 +162,15 @@ private: LLOutputMonitorCtrl* mSpeakingIndicator; bool mIsModeratorMutedVoice; + /** + * Flag indicated that participants voice states should be initialized. + * + * It is used due to Avatar List has delayed refreshing after it content is changed. + * Real initializing is performed when Avatar List is first time refreshed. + * + * @see onAvatarListRefreshed() + * @see initParticipantsVoiceState() + */ bool mInitParticipantsVoiceState; boost::signals2::connection mAvatarListRefreshConnection; -- cgit v1.2.3 From c6e24e53a1041ab12b74469e335281f416af5b75 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 14:45:49 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- implemented removing of participant who has left voice chat from the list (after hardcoded 10 seconds) -- added struct params to be set from the xml --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 109 ++++++++++++++++++++++++++++++++-------- indra/newview/llcallfloater.h | 63 +++++++++++++++++++++++ 2 files changed, 152 insertions(+), 20 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 683cde7bee..33253c2781 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -79,6 +79,28 @@ static void* create_non_avatar_caller(void*) return new LLNonAvatarCaller; } +LLCallFloater::LLAvatarListItemRemoveTimer::LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id) +: LLEventTimer(period) +, mRemoveCallback(remove_cb) +, mSpeakerId(speaker_id) +{ +} + +BOOL LLCallFloater::LLAvatarListItemRemoveTimer::tick() +{ + if (mRemoveCallback) + { + mRemoveCallback(mSpeakerId); + } + return TRUE; +} + + +LLCallFloater::Params::Params() +: voice_left_remove_delay("voice_left_remove_delay", 10) +{ +} + LLCallFloater::LLCallFloater(const LLSD& key) : LLDockableFloater(NULL, false, key) , mSpeakerManager(NULL) @@ -90,6 +112,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) , mInitParticipantsVoiceState(false) +, mVoiceLeftRemoveDelay(10) // TODO: mantipov: make xml driven { mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); @@ -98,6 +121,8 @@ LLCallFloater::LLCallFloater(const LLSD& key) LLCallFloater::~LLCallFloater() { + resetVoiceRemoveTimers(); + delete mPaticipants; mPaticipants = NULL; @@ -268,6 +293,8 @@ void LLCallFloater::updateSession() void LLCallFloater::refreshPartisipantList() { + resetVoiceRemoveTimers(); + delete mPaticipants; mPaticipants = NULL; mAvatarList->clear(); @@ -542,26 +569,6 @@ void LLCallFloater::updateParticipantsVoiceState() { setState(item, STATE_INVITED); } - -/* - // If there is already a started timer for the current panel don't do anything. - bool no_timer_for_current_panel = true; - if (mTimersMap.size() > 0) - { - timers_map::iterator found_it = mTimersMap.find(participant_id); - if (found_it != mTimersMap.end()) - { - no_timer_for_current_panel = false; - } - } - - if (no_timer_for_current_panel) - { - // Starting a timer to remove an avatar row panel after timeout - // *TODO Make the timeout period adjustable - mTimersMap.insert(timer_pair(participant_id, new LLAvatarRowRemoveTimer(this->getHandle(), 10, participant_id))); - } -*/ } } @@ -580,10 +587,12 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_JOINED: + removeVoiceRemoveTimer(item->getAvatarId()); new_desc.setStyle(LLFontGL::NORMAL); break; case STATE_LEFT: { + setVoiceRemoveTimer(item->getAvatarId()); new_desc.setStyle(LLFontGL::ITALIC); } break; @@ -603,4 +612,64 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) } } +void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) +{ + + // If there is already a started timer for the current panel don't do anything. + bool no_timer_for_current_panel = true; + if (mVoiceLeftTimersMap.size() > 0) + { + timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); + if (found_it != mVoiceLeftTimersMap.end()) + { + no_timer_for_current_panel = false; + } + } + + if (no_timer_for_current_panel) + { + // Starting a timer to remove an avatar row panel after timeout + mVoiceLeftTimersMap.insert(timer_pair(voice_speaker_id, + new LLAvatarListItemRemoveTimer(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), mVoiceLeftRemoveDelay, voice_speaker_id))); + } +} + +void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) +{ + if (mVoiceLeftTimersMap.size() > 0) + { + mVoiceLeftTimersMap.erase(mVoiceLeftTimersMap.find(voice_speaker_id)); + } + + mAvatarList->removeItemByUUID(voice_speaker_id); +} + + +void LLCallFloater::resetVoiceRemoveTimers() +{ + if (mVoiceLeftTimersMap.size() > 0) + { + for (timers_map::iterator iter = mVoiceLeftTimersMap.begin(); + iter != mVoiceLeftTimersMap.end(); ++iter) + { + delete iter->second; + } + } + mVoiceLeftTimersMap.clear(); +} + +void LLCallFloater::removeVoiceRemoveTimer(const LLUUID& voice_speaker_id) +{ + // Remove the timer if it has been already started + if (mVoiceLeftTimersMap.size() > 0) + { + timers_map::iterator found_it = mVoiceLeftTimersMap.find(voice_speaker_id); + if (found_it != mVoiceLeftTimersMap.end()) + { + delete found_it->second; + mVoiceLeftTimersMap.erase(found_it); + } + } +} + //EOF diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 1e64066647..537c57f671 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -57,6 +57,15 @@ class LLSpeakerMgr; class LLCallFloater : public LLDockableFloater, LLVoiceClientParticipantObserver { public: + struct Params : public LLInitParam::Block + { + Optional voice_left_remove_delay; + + Params(); + }; + + LOG_CLASS(LLCallFloater); + LLCallFloater(const LLSD& key); ~LLCallFloater(); @@ -151,6 +160,34 @@ private: return mSpeakerStateMap[speaker_id]; } + + /** + * Instantiates new LLAvatarListItemRemoveTimer and adds it into the map if it is not already created. + * + * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list when timer expires. + */ + void setVoiceRemoveTimer(const LLUUID& voice_speaker_id); + + /** + * Removes specified by UUID Avatar List item. + * + * @param voice_speaker_id LLUUID of Avatar List item to be removed from the list. + */ + void removeVoiceLeftParticipant(const LLUUID& voice_speaker_id); + + /** + * Deletes all timers from the list to prevent started timers from ticking after destruction + * and after switching on another voice channel. + */ + void resetVoiceRemoveTimers(); + + /** + * Removes specified by UUID timer from the map. + * + * @param voice_speaker_id LLUUID of Avatar List item whose timer should be removed from the map. + */ + void removeVoiceRemoveTimer(const LLUUID& voice_speaker_id); + private: speaker_state_map_t mSpeakerStateMap; LLSpeakerMgr* mSpeakerManager; @@ -175,6 +212,32 @@ private: boost::signals2::connection mAvatarListRefreshConnection; + /** + * class LLAvatarListItemRemoveTimer + * + * Implements a timer that removes avatar list item of a participant + * who has left the call. + */ + class LLAvatarListItemRemoveTimer : public LLEventTimer + { + public: + typedef boost::function callback_t; + + LLAvatarListItemRemoveTimer(callback_t remove_cb, F32 period, const LLUUID& speaker_id); + virtual ~LLAvatarListItemRemoveTimer() {}; + + virtual BOOL tick(); + + private: + callback_t mRemoveCallback; + LLUUID mSpeakerId; + }; + + typedef std::pair timer_pair; + typedef std::map timers_map; + + timers_map mVoiceLeftTimersMap; + S32 mVoiceLeftRemoveDelay; }; -- cgit v1.2.3 From 2094847b1f0b6abff25112f7161752819a8ff5d1 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 16:09:31 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- commented out updating participants voice states from draw() -- improved removing of HAS LEFT participant (now it is removed via LLAvatarList approach instead of LLFlatListView) --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 33253c2781..98ee085687 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -174,7 +174,11 @@ void LLCallFloater::draw() // It should be done only when she joins or leaves voice chat. // But seems that LLVoiceClientParticipantObserver is not enough to satisfy this requirement. // *TODO: mantipov: remove from draw() - onChange(); + + // NOTE: it looks like calling onChange() here is not necessary, + // but sometime it is not called properly from the observable object. + // Seems this is a problem somewhere in Voice Client (LLVoiceClient::participantAddedEvent) +// onChange(); bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID); @@ -641,7 +645,13 @@ void LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) mVoiceLeftTimersMap.erase(mVoiceLeftTimersMap.find(voice_speaker_id)); } - mAvatarList->removeItemByUUID(voice_speaker_id); + LLAvatarList::uuid_vector_t& speaker_uuids = mAvatarList->getIDs(); + LLAvatarList::uuid_vector_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); + if(pos != speaker_uuids.end()) + { + speaker_uuids.erase(pos); + mAvatarList->setDirty(); + } } -- cgit v1.2.3 From 5121891e473ba6e511c2f2cff2a5c1217e4c93a8 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 22 Dec 2009 17:01:31 +0200 Subject: Update for normal bug EXT-3520 - Can't open Group Notices or Attachments. Attachments will be opened in a preview floater. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6a31bbfa1e..519f58ca95 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -906,7 +906,20 @@ void open_inventory_offer(const std::vector& items, const std::string& f LLFloaterReg::showInstance("preview_texture", LLSD(item_id), take_focus); break; } + case LLAssetType::AT_ANIMATION: + LLFloaterReg::showInstance("preview_anim", LLSD(item_id), take_focus); + break; + case LLAssetType::AT_GESTURE: + LLFloaterReg::showInstance("preview_gesture", LLSD(item_id), take_focus); + break; + case LLAssetType::AT_SCRIPT: + LLFloaterReg::showInstance("preview_script", LLSD(item_id), take_focus); + break; + case LLAssetType::AT_SOUND: + LLFloaterReg::showInstance("preview_sound", LLSD(item_id), take_focus); + break; default: + LLFloaterReg::showInstance("properties", LLSD(item_id), take_focus); break; } } -- cgit v1.2.3 From 3b1ead667ce0d23532426320525024a136967fc2 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 22 Dec 2009 17:10:15 +0200 Subject: Work on normal bug EXT-3434 There is no difference between invited and left participants in a Group call (Voice Controls) -- implemented workaround not to set agent in HAS LEFT state --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 98ee085687..29f37a04b4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -297,8 +297,13 @@ void LLCallFloater::updateSession() void LLCallFloater::refreshPartisipantList() { + // lets forget states from the previous session + // for timers... resetVoiceRemoveTimers(); + // ...and for speaker state + mSpeakerStateMap.clear(); + delete mPaticipants; mPaticipants = NULL; mAvatarList->clear(); @@ -580,6 +585,19 @@ void LLCallFloater::updateParticipantsVoiceState() void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) { + // *HACK: mantipov: sometimes such situation is possible while switching to voice channel: +/* + - voice channel is switched to the one user is joining + - participant list is initialized with voice states: agent is in voice + - than such log messages were found (with agent UUID) + - LLVivoxProtocolParser::process_impl: parsing: 00912Audio + - LLVoiceClient::sessionState::removeParticipant: participant "sip:x2pwNkMbpR_mK4rtB_awASA==@bhr.vivox.com" (da9c0d90-c6e9-47f9-8ae2-bb41fdac0048) removed. + - and than while updating participants voice states agent is marked as HAS LEFT + - next updating of LLVoiceClient state makes agent JOINED + So, lets skip HAS LEFT state for agent's avatar +*/ + if (STATE_LEFT == state && item->getAvatarId() == gAgentID) return; + setState(item->getAvatarId(), state); LLStyle::Params speaker_style; -- cgit v1.2.3 From 8077f1990de23b10d73034c919027d0f220abe48 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 22 Dec 2009 12:22:33 -0500 Subject: Intercept notifications as filter rather than as a peer listener. --- indra/llui/llnotificationslistener.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp index 629964c322..ee6ec0f88f 100644 --- a/indra/llui/llnotificationslistener.cpp +++ b/indra/llui/llnotificationslistener.cpp @@ -188,9 +188,10 @@ public: LLNotificationChannelPtr channelptr(llnotifications.getChannel(channel)); if (channelptr) { - // Try connecting at the front of the 'changed' signal. That way - // we shouldn't get starved by preceding listeners. - channelptr->connectAtFrontChanged(boost::bind(&Forwarder::handle, this, _1)); + // Insert our processing as a "passed filter" listener. This way + // we get to run before all the "changed" listeners, and we get to + // swipe it (hide it from the other listeners) if desired. + channelptr->connectPassedFilter(boost::bind(&Forwarder::handle, this, _1)); } } @@ -251,6 +252,7 @@ bool LLNotificationsListener::Forwarder::handle(const LLSD& notification) const if (notification["sigtype"].asString() == "delete") { LL_INFOS("LLNotificationsListener") << "ignoring delete" << LL_ENDL; + // let other listeners see the "delete" operation return false; } LLNotificationPtr note(mNotifications.find(notification["id"])); @@ -262,6 +264,8 @@ bool LLNotificationsListener::Forwarder::handle(const LLSD& notification) const if (! matchType(mTypes, note->getType())) { LL_INFOS("LLNotificationsListener") << "didn't match types " << mTypes << LL_ENDL; + // We're not supposed to intercept this particular notification. Let + // other listeners process it. return false; } LL_INFOS("LLNotificationsListener") << "sending via '" << mPumpName << "'" << LL_ENDL; @@ -282,7 +286,11 @@ bool LLNotificationsListener::Forwarder::handle(const LLSD& notification) const mNotifications.cancel(note); } } - return false; // let other listeners get same notification + // If we've auto-responded to this notification, then it's going to be + // deleted. Other listeners would get the change operation, try to look it + // up and be baffled by lookup failure. So when we auto-respond, suppress + // this notification: don't pass it to other listeners. + return mRespond; } bool LLNotificationsListener::Forwarder::matchType(const LLSD& filter, const std::string& type) const @@ -314,7 +322,7 @@ bool LLNotificationsListener::Forwarder::matchType(const LLSD& filter, const std LLSD LLNotificationsListener::asLLSD(LLNotificationPtr note) { LLSD notificationInfo(note->asLLSD()); - // For some reason the following aren't included in asLLSD(). + // For some reason the following aren't included in LLNotification::asLLSD(). notificationInfo["summary"] = note->summarize(); notificationInfo["id"] = note->id(); notificationInfo["type"] = note->getType(); -- cgit v1.2.3 From 65557cde7071eba78f2cce310a113863cee8a69b Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 22 Dec 2009 20:03:10 +0200 Subject: Made the control panel in P2P IM sessions non-resizable (EXT-3470). --HG-- branch : product-engine --- indra/llui/lllayoutstack.cpp | 10 ++++++++++ indra/llui/lllayoutstack.h | 1 + indra/newview/llimfloater.cpp | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 7d8c102750..1aaba88c49 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -414,6 +414,16 @@ void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL au } } +void LLLayoutStack::setPanelUserResize(const std::string& panel_name, BOOL user_resize) +{ + LayoutPanel* panel = findEmbeddedPanelByName(panel_name); + + if (panel) + { + panel->mUserResize = user_resize; + } +} + bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp) { LayoutPanel* panel = findEmbeddedPanelByName(panel_name); diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index c1af428674..cde383b047 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -80,6 +80,7 @@ public: S32 getNumPanels() { return mPanels.size(); } void updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize); + void setPanelUserResize(const std::string& panel_name, BOOL user_resize); /** * Gets minimal width and/or height of the specified by name panel. diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index acaa6076f8..f61af716b6 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -45,6 +45,7 @@ #include "llfloaterchat.h" #include "llfloaterreg.h" #include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container +#include "lllayoutstack.h" #include "lllineeditor.h" #include "lllogchat.h" #include "llpanelimcontrolpanel.h" @@ -220,6 +221,12 @@ LLIMFloater::~LLIMFloater() //virtual BOOL LLIMFloater::postBuild() { + // User-resizable control panels in P2P sessions look ugly (EXT-3470). + if (mDialog == IM_NOTHING_SPECIAL || mDialog == IM_SESSION_P2P_INVITE) + { + getChild("im_panels")->setPanelUserResize("panel_im_control_panel", FALSE); + } + const LLUUID& other_party_id = LLIMModel::getInstance()->getOtherParticipantID(mSessionID); if (other_party_id.notNull()) { -- cgit v1.2.3 From c7b69713b794b9c326a79aad6cdee542c57ada4d Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 22 Dec 2009 20:14:51 +0200 Subject: =?UTF-8?q?fixed=20EXT-3564=20=E2=80=9CDocked=20windows=20hide=20w?= =?UTF-8?q?hen=20clicking=20on=20sidetray=20tabs=E2=80=9D,=20added=20sidet?= =?UTF-8?q?ray=20tab=20buttons=20panel=20to=20transient=20manager=20contro?= =?UTF-8?q?l=20list,=20added=20right=20padding=20to=20the=20docking=20rect?= =?UTF-8?q?=20area=20to=20avoid=20overlapping=20docked=20IM=20floaters=20w?= =?UTF-8?q?ith=20sidetray=20buttons;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index acaa6076f8..d511e6cd64 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -56,6 +56,7 @@ #include "llvoicechannel.h" #include "lltransientfloatermgr.h" #include "llinventorymodel.h" +#include "llrootview.h" @@ -437,6 +438,16 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) void LLIMFloater::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectRaw(); + static S32 right_padding = 0; + if (right_padding == 0) + { + LLPanel* side_bar_tabs = + gViewerWindow->getRootView()->getChild ( + "side_bar_tabs"); + right_padding = side_bar_tabs->getRect().getWidth(); + LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs); + } + rect.mRight -= right_padding; } void LLIMFloater::setDocked(bool docked, bool pop_on_undock) -- cgit v1.2.3 From 0a98034641267ea57360fdd369acb8b94ff9bc20 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 22 Dec 2009 20:17:47 +0200 Subject: Related to EXT-3628("Connecting to.." popup appears behind voice control panel while calling): Added workaround which sets current call dialog to front most. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 29f37a04b4..c222ced98f 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -291,6 +291,15 @@ void LLCallFloater::updateSession() if (show_me) { setVisible(true); + // Workaround(EM): Set current call dialog to front most because + // connect/leaving popups should appear on top of VCP. + // See bug EXT-3628. + LLOutgoingCallDialog* instance = + LLFloaterReg::findTypedInstance("outgoing_call", LLOutgoingCallDialog::OCD_KEY); + if(instance && instance->getVisible()) + { + instance->setFrontmost(); + } } } } -- cgit v1.2.3 From 6f2b14c716f1c91b3631fc6eeae2fd4bf4013e75 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Tue, 22 Dec 2009 11:36:35 -0800 Subject: EXT-3593 Fixed up llkdu and tcmalloc dependencies for the viewer build. --- indra/newview/CMakeLists.txt | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f3d399c616..7d8e9268e5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1397,12 +1397,29 @@ if (WINDOWS) # be met. I'm looking forward to a source-code split-up project next year that will address this kind of thing. # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py # and have the build deps get tracked *please* tell me about it. + + if(LLKDU_LIBRARY) + # Configure a var for llkdu which may not exist for all builds. + set(LLKDU_DLL_SOURCE ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll) + endif(LLKDU_LIBRARY) + + if(USE_GOOGLE_PERFTOOLS) + # Configure a var for tcmalloc location, if used. + # Note the need to specify multiple names explicitly. + set(GOOGLE_PERF_TOOLS_SOURCE + ${SHARED_LIB_STAGING_DIR}/Release/libtcmalloc_minimal.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll + ${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll + ) + endif(USE_GOOGLE_PERFTOOLS) + + set(COPY_INPUT_DEPENDECIES # The following commented dependencies are determined at variably at build time. Can't do this here. - #llkdu.dll => llkdu.dll #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg + ${LLKDU_DLL_SOURCE} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll @@ -1426,6 +1443,7 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/zlib1.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxplatform.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll + ${GOOGLE_PERF_TOOLS_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll @@ -1501,7 +1519,7 @@ if (WINDOWS) if(LLKDU_LIBRARY) # kdu may not exist! - add_dependencies(${VIEWER_BINARY_NAME} llkdu) + add_dependencies(copy_w_viewer_manifest llkdu) endif(LLKDU_LIBRARY) if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts) -- cgit v1.2.3 From 8f8e5c850a0574f30f9be1e3164531751139d2c5 Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Tue, 22 Dec 2009 14:06:25 -0600 Subject: EXT-3640 We support the eaglelake chipset No code changed --- indra/newview/gpu_table.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 5c5c4e5b3c..cc8f6780e3 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -157,7 +157,7 @@ Intel Bear Lake .*Intel.*Bear Lake.* 0 0 Intel Broadwater .*Intel.*Broadwater.* 0 0 Intel Brookdale .*Intel.*Brookdale.* 0 0 Intel Cantiga .*Intel.*Cantiga.* 0 0 -Intel Eaglelake .*Intel.*Eaglelake.* 0 0 +Intel Eaglelake .*Intel.*Eaglelake.* 0 1 Intel Montara .*Intel.*Montara.* 0 0 Intel Springdale .*Intel.*Springdale.* 0 0 Matrox .*Matrox.* 0 0 -- cgit v1.2.3 From 55c1f18c8d70304653d21373d3b71130123945b2 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 22 Dec 2009 16:41:21 -0500 Subject: For EXT-3622: Take off item, wear a different item --> first item is put on again --- indra/newview/llinventorybridge.cpp | 36 ++++++++++++++++++++++++------------ indra/newview/llinventorybridge.h | 4 +++- indra/newview/llviewermenu.cpp | 7 ++++++- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3fc2cbecbe..beecd48419 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4555,18 +4555,8 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod } else if (isRemoveAction(action)) { - if (get_is_item_worn(mUUID)) - { - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLWearableList::instance().getAsset(item->getAssetUUID(), - item->getName(), - item->getType(), - LLWearableBridge::onRemoveFromAvatarArrived, - new OnRemoveStruct(mUUID)); - } - } + removeFromAvatar(); + return; } else LLItemBridge::performAction(folder, model, action); } @@ -4949,6 +4939,28 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, delete on_remove_struct; } +/* static */ +void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) +{ + if (item) + { + LLWearableList::instance().getAsset(item->getAssetUUID(), + item->getName(), + item->getType(), + LLWearableBridge::onRemoveFromAvatarArrived, + new OnRemoveStruct(item->getUUID())); + } +} + +void LLWearableBridge::removeFromAvatar() +{ + if (get_is_item_worn(mUUID)) + { + LLViewerInventoryItem* item = getItem(); + removeItemFromAvatar(item); + } +} + LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type, const LLUUID& uuid,LLInventoryModel* model) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 4d83e9b684..c93fc85a7d 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -572,7 +572,9 @@ public: static BOOL canRemoveFromAvatar( void* userdata ); static void onRemoveFromAvatar( void* userdata ); - static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); + static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); + static void removeItemFromAvatar(LLViewerInventoryItem *item); + void removeFromAvatar(); protected: LLWearableBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLAssetType::EType asset_type, LLInventoryType::EType inv_type, EWearableType wearable_type) : diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 23bcca9603..46a21066ba 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7428,7 +7428,12 @@ class LLEditTakeOff : public view_listener_t { EWearableType type = LLWearableDictionary::typeNameToType(clothing); if (type >= WT_SHAPE && type < WT_COUNT) - LLAgentWearables::userRemoveWearable(type); + { + // MULTI-WEARABLES + LLViewerInventoryItem *item = dynamic_cast(gAgentWearables.getWearableInventoryItem(type,0)); + LLWearableBridge::removeItemFromAvatar(item); + } + } return true; } -- cgit v1.2.3 From 5a1e07002a8851e9227cf85171c1af497c94f0cf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 22 Dec 2009 19:17:14 -0500 Subject: Add lleventhost queries to list LLEventAPIs or describe one. Add LLEventDispatcher::getDispatchKey() to retrieve a previously- inaccessible value. --- indra/llcommon/lleventdispatcher.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h index c8c4fe0c3c..1e625bcee8 100644 --- a/indra/llcommon/lleventdispatcher.h +++ b/indra/llcommon/lleventdispatcher.h @@ -139,6 +139,9 @@ public: /// Get information about a specific Callable LLSD getMetadata(const std::string& name) const; + /// Retrieve the LLSD key we use for one-arg operator() method + std::string getDispatchKey() const { return mKey; } + private: template void addMethod(const std::string& name, const std::string& desc, -- cgit v1.2.3 From 3e8e3b85d9d84ef2386bb36beed4ade677c5a5e1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Dec 2009 16:47:50 -0800 Subject: DEV-44607 ugly/broken font used for region labels in world map view --- indra/newview/llworldmapview.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index e6857ea780..1940d65ae4 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -334,7 +334,6 @@ void LLWorldMapView::draw() gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); gGL.setColorMask(true, true); -#if 1 // Draw the image tiles drawMipmap(width, height); gGL.flush(); @@ -452,7 +451,7 @@ void LLWorldMapView::draw() // Draw the region name in the lower left corner if (sMapScale >= DRAW_TEXT_THRESHOLD) { - LLFontGL* font = LLFontGL::getFontSansSerifSmall(); + LLFontGL* font = LLFontGL::getFont(LLFontDescriptor("SansSerif", "Small", LLFontGL::BOLD)); std::string mesg; if (info->isDown()) { @@ -468,14 +467,13 @@ void LLWorldMapView::draw() mesg, 0, llfloor(left + 3), llfloor(bottom + 2), LLColor4::white, - LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW); } } } - #endif - #if 1 + // Draw background rectangle LLGLSUIDefault gls_ui; { @@ -566,7 +564,7 @@ void LLWorldMapView::draw() drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("Loading"), ""); } } - #endif + // turn off the scissor LLGLDisable no_scissor(GL_SCISSOR_TEST); -- cgit v1.2.3 From 1412e4f6671fed1641a0fa4372971aea9ab0bd2f Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 23 Dec 2009 11:58:04 +0200 Subject: Fix for normal bug EXT-3041 - Picks accordion doesn't fit to content. --HG-- branch : product-engine --- indra/llui/llflatlistview.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 26e84a6fe1..a488b00854 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -124,6 +124,8 @@ public: /** Returns full rect of child panel */ const LLRect& getItemsRect() const; + LLRect getRequiredRect() { return getItemsRect(); } + /** Returns distance between items */ const S32 getItemsPad() { return mItemPad; } -- cgit v1.2.3 From 3defdaa0071418ce15c0d33a3b25f8338763ccf1 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 23 Dec 2009 13:01:34 +0200 Subject: fix for EXT-2881 Enough space to place 5 chiclets without arrows in bottom bar when voice indicator isn't shown --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 19 +++++++++++++++++-- indra/newview/llchiclet.h | 2 ++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 17ef1f41a4..e6f56d89f7 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -477,7 +477,6 @@ void LLIMChiclet::setShowSpeaker(bool show) { mShowSpeaker = show; toggleSpeakerControl(); - onChicletSizeChanged(); } } @@ -502,7 +501,6 @@ void LLIMChiclet::setShowCounter(bool show) { LLChiclet::setShowCounter(show); toggleCounterControl(); - onChicletSizeChanged(); } } @@ -527,6 +525,8 @@ void LLIMChiclet::setRequiredWidth() } reshape(required_width, getRect().getHeight()); + + onChicletSizeChanged(); } void LLIMChiclet::toggleSpeakerControl() @@ -567,6 +567,7 @@ void LLIMChiclet::setShowNewMessagesIcon(bool show) { mNewMessagesIcon->setVisible(show); } + setRequiredWidth(); } bool LLIMChiclet::getShowNewMessagesIcon() @@ -1462,6 +1463,20 @@ void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent ) } +S32 LLChicletPanel::notifyParent(const LLSD& info) +{ + if(info.has("notification")) + { + std::string str_notification = info["notification"]; + if(str_notification == "size_changes") + { + arrange(); + return 1; + } + } + return LLPanel::notifyParent(info); +} + void LLChicletPanel::arrange() { if(mChicletList.empty()) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 2ab6abfb5b..511b85b0b6 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -1021,6 +1021,8 @@ public: S32 getTotalUnreadIMCount(); + S32 notifyParent(const LLSD& info); + protected: LLChicletPanel(const Params&p); friend class LLUICtrlFactory; -- cgit v1.2.3 From a6694da8841160c591a63f82b6bcc75752db1d19 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 23 Dec 2009 13:07:00 +0200 Subject: Update for low bug EXT-3353 - There's an ability to create classified w/o title and description. Classified name can accept only ascii. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_edit_classified.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml index b5760e977f..1fbf7abda9 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml @@ -103,6 +103,7 @@ top_pad="2" max_length="63" name="classified_name" + prevalidate_callback="ascii" text_color="black" width="290" /> Date: Wed, 23 Dec 2009 13:27:29 +0200 Subject: Update for normal bug EXT-3520 - Can't open Group Notices or Attachments. Disabled generic preview floater as it spawns for all new inventory items. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 519f58ca95..737f7a224d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -919,7 +919,6 @@ void open_inventory_offer(const std::vector& items, const std::string& f LLFloaterReg::showInstance("preview_sound", LLSD(item_id), take_focus); break; default: - LLFloaterReg::showInstance("properties", LLSD(item_id), take_focus); break; } } -- cgit v1.2.3 From fc2596e3c2cc7ca8d9a26cd85ef54c6bb7c17944 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 23 Dec 2009 14:03:02 +0200 Subject: fix for EXT-637 Please, add tooltips with a full names of the landmraks in the Favor bar / Overflow menu rect param actually do nothing. to change tooltip width we may manipulate max_width param. --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 832626e007..28e6f1321b 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -162,9 +162,22 @@ public: if (!region_name.empty()) { LLToolTip::Params params; - params.message = llformat("%s\n%s (%d, %d, %d)", getLabelSelected().c_str(), region_name.c_str(), + std::string extra_message = llformat("%s (%d, %d, %d)", region_name.c_str(), mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY(), mLandmarkInfoGetter.getPosZ()); - params.sticky_rect = calcScreenRect(); + + params.message = llformat("%s\n%s", getLabelSelected().c_str(), extra_message.c_str()); + + LLRect rect = calcScreenRect(); + LLFontGL* standart_font = LLFontGL::getFontSansSerif(); + if(standart_font) + { + S32 w = llmax((S32)(standart_font->getWidthF32(getLabelSelected())+0.5),(S32)(standart_font->getWidthF32(extra_message)+0.5)); + rect.mRight = rect.mLeft + w; + params.max_width = w; + } + + params.sticky_rect = rect; + LLToolTipMgr::instance().show(params); } return TRUE; -- cgit v1.2.3 From 0521baf33951965dfcd5aa6d80ba7624dbadbc19 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 23 Dec 2009 14:08:22 +0200 Subject: Fix for normal bug EXT-3626 - 'Online' accordion doesn't appear after online avatar is added to friends. --HG-- branch : product-engine --- indra/newview/llpanelpeople.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e5846c7318..374af5c059 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -984,6 +984,8 @@ void LLPanelPeople::onTabSelected(const LLSD& param) mNearbyListUpdater->setActive(tab_name == NEARBY_TAB_NAME); updateButtons(); + showFriendsAccordionsIfNeeded(); + if (GROUP_TAB_NAME == tab_name) mFilterEditor->setLabel(getString("groups_filter_label")); else -- cgit v1.2.3 From d07fd64b6fc3f4c6af648ec43b84cd82c7e62fc6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 14:40:52 +0200 Subject: finished EXT-1912 Add handling restrictions of PSTN P2P calls in new IM Floaters chiclets for avaline calls are not spawned anymore --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 6 ++++++ indra/newview/llimview.cpp | 11 +++++++++++ indra/newview/llimview.h | 2 ++ indra/newview/llsyswellwindow.cpp | 8 ++++++-- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 4d5d416907..976b312509 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -148,6 +148,12 @@ void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& nam { if (!getChicletPanel()) return; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (!session) return; + + // no need to spawn chiclets for participants in P2P calls called through Avaline + if (session->isP2P() && session->isOtherParticipantAvaline()) return; + if (getChicletPanel()->findChiclet(session_id)) return; LLIMChiclet* chiclet = createIMChiclet(session_id); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d209060b58..3345f7d0bf 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -483,6 +483,17 @@ bool LLIMModel::LLIMSession::isAdHoc() return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); } +bool LLIMModel::LLIMSession::isP2P() +{ + return IM_NOTHING_SPECIAL == mType; +} + +bool LLIMModel::LLIMSession::isOtherParticipantAvaline() +{ + return !mOtherParticipantIsAvatar; +} + + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { LLIMSession* session = findIMSession(old_session_id); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 3f46b0d754..92caf0af9a 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -75,6 +75,8 @@ public: static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); bool isAdHoc(); + bool isP2P(); + bool isOtherParticipantAvaline(); LLUUID mSessionID; std::string mName; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 8c6ea59407..3cddf6d902 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -743,9 +743,13 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (mMessageList->getItemByValue(session_id)) return; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (!session) return; + + // no need to spawn chiclets for participants in P2P calls called through Avaline + if (session->isP2P() && session->isOtherParticipantAvaline()) return; - if (!gIMMgr->hasSession(session_id)) return; + if (mMessageList->getItemByValue(session_id)) return; addIMRow(session_id, 0, name, other_participant_id); reshapeWindow(); -- cgit v1.2.3 From 4cea2cac115f47e3699f1528f92ce3adcf76d87a Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 16:35:45 +0200 Subject: fixed EXT-3635 States of Call/Leave Call buttons are not properly managed when starting call using Call button in people panels --HG-- branch : product-engine --- indra/newview/llpanelimcontrolpanel.cpp | 9 ++++++++- indra/newview/llpanelimcontrolpanel.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 3f309b3bf5..a8a75a1feb 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -65,7 +65,11 @@ void LLPanelChatControlPanel::onOpenVoiceControlsClicked() void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { - bool is_call_started = ( new_state >= LLVoiceChannel::STATE_CALL_STARTED ); + updateButtons(new_state >= LLVoiceChannel::STATE_CALL_STARTED); +} + +void LLPanelChatControlPanel::updateButtons(bool is_call_started) +{ childSetVisible("end_call_btn", is_call_started); childSetVisible("voice_ctrls_btn", is_call_started); childSetVisible("call_btn", ! is_call_started); @@ -112,6 +116,9 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id) if(voice_channel) { mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2)); + + //call (either p2p, group or ad-hoc) can be already in started state + updateButtons(voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED); } } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 711340efc7..c18be5a6df 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -57,6 +57,8 @@ public: virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); + void updateButtons(bool is_call_started); + virtual void setSessionId(const LLUUID& session_id); const LLUUID& getSessionId() { return mSessionId; } -- cgit v1.2.3 From caaa88306f5c29e2c937431efe999ce506e52d09 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 24 Dec 2009 13:06:43 +0200 Subject: =?UTF-8?q?fixed=20EXT-3036=20=E2=80=9CAvatar=20Notes&Privacy:=20'?= =?UTF-8?q?Allow=20this=20person=20to'=20checkboxes=20can=20be=20all=20set?= =?UTF-8?q?=20for=20non-friend=E2=80=9D,=20added=20checkboxes=20cleanup=20?= =?UTF-8?q?on=20panel=20update;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index e9131a342e..913152e259 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -179,6 +179,10 @@ void LLPanelAvatarNotes::onOpen(const LLSD& key) void LLPanelAvatarNotes::fillRightsData() { + childSetValue("status_check", FALSE); + childSetValue("map_check", FALSE); + childSetValue("objects_check", FALSE); + const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId()); // If true - we are viewing friend's profile, enable check boxes and set values. if(relation) -- cgit v1.2.3 From 6ed43b829b32b99b87cdd9b81e2ea3763fc49c56 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Thu, 24 Dec 2009 13:46:43 +0200 Subject: fixed minor bug EXT-3459 (Not user friendly notification after leaving group while group chat is opened) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f004c95aca..447901f984 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2990,6 +2990,13 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Error while moderating. + + + You have been removed from the group. + You have been removed from the group. -- cgit v1.2.3 From d36e0604a4935a258713a5872b8439a017fcd0a0 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 24 Dec 2009 14:00:36 +0200 Subject: =?UTF-8?q?fixed=20EXT-3449=20=E2=80=9C"Close"=20and=20"Dock"=20ic?= =?UTF-8?q?ons=20overlap=20title=20of=20"Nearby"=20chat=20window,=20when?= =?UTF-8?q?=20it=20has=20minimal=20size=E2=80=9D,=20added=20minimal=20size?= =?UTF-8?q?=20attribute=20to=20the=20nearby=20chat=20floater;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_nearby_chat.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index 58ba346e50..920f0c909a 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -16,6 +16,7 @@ can_dock="true" bevel_style="in" height="300" + min_width="150" layout="topleft" name="nearby_chat" help_topic="nearby_chat" -- cgit v1.2.3 From 15fb7171186413e0d5662c1af68fa9d6a9182b9a Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Thu, 24 Dec 2009 14:31:12 +0200 Subject: fixed normal bug EXT-3506 Snapshot button should appear pressed and green when snapshot floater is open --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_snapshot.xml | 1 + indra/newview/skins/default/xui/en/panel_bottomtray.xml | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index ec54522d3e..a36a1b591b 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -9,6 +9,7 @@ name="Snapshot" help_topic="snapshot" save_rect="true" + save_visibility="true" title="SNAPSHOT PREVIEW" width="215"> - -- cgit v1.2.3 From b0ed2ab7d92d79f0bb7005a7533c5c0e42f5bce7 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 23 Dec 2009 16:50:16 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- made timeout to fade HAS LEFT Voice participant xml driven --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llcallfloater.cpp | 11 ++++------- indra/newview/llcallfloater.h | 6 ------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 455c3587ff..c6abb7ba26 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10378,6 +10378,17 @@ Value Default + VoiceParticipantLeftRemoveDelay + + Comment + Timeout to remove participants who has left Voice chat from the list in Voice Controls Panel + Persist + 1 + Type + S32 + Value + 10 + VoicePort Comment diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 29f37a04b4..a02a30a710 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -95,12 +95,6 @@ BOOL LLCallFloater::LLAvatarListItemRemoveTimer::tick() return TRUE; } - -LLCallFloater::Params::Params() -: voice_left_remove_delay("voice_left_remove_delay", 10) -{ -} - LLCallFloater::LLCallFloater(const LLSD& key) : LLDockableFloater(NULL, false, key) , mSpeakerManager(NULL) @@ -112,8 +106,11 @@ LLCallFloater::LLCallFloater(const LLSD& key) , mSpeakingIndicator(NULL) , mIsModeratorMutedVoice(false) , mInitParticipantsVoiceState(false) -, mVoiceLeftRemoveDelay(10) // TODO: mantipov: make xml driven +, mVoiceLeftRemoveDelay(10) { + static LLUICachedControl voice_left_remove_delay ("VoiceParticipantLeftRemoveDelay", 10); + mVoiceLeftRemoveDelay = voice_left_remove_delay; + mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); LLTransientFloaterMgr::getInstance()->addControlView(this); diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 537c57f671..ee3bc9b9fe 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -57,12 +57,6 @@ class LLSpeakerMgr; class LLCallFloater : public LLDockableFloater, LLVoiceClientParticipantObserver { public: - struct Params : public LLInitParam::Block - { - Optional voice_left_remove_delay; - - Params(); - }; LOG_CLASS(LLCallFloater); -- cgit v1.2.3 From 6c48bb9f2df743eb85a91da040d33f0816721aa3 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 23 Dec 2009 16:51:21 +0200 Subject: =?UTF-8?q?fixed=20EXT-3425=20=E2=80=9CUndocked=20floaters=20focus?= =?UTF-8?q?=20issue=E2=80=9D,=20made=20focus=20be=20passed=20to=20game=20a?= =?UTF-8?q?rea=20in=20case=20floater=20can't=20hold=20focus;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/llfloater.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d7a692ec9b..845203b420 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2148,6 +2148,11 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) { child->setFocus(TRUE); + // floater did not take focus, so relinquish focus to world + if (!child->hasFocus()) + { + gFocusMgr.setKeyboardFocus(NULL); + } } } -- cgit v1.2.3 From 170719096ae6f249e7ac0ab7ad368cbaf24115f5 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 23 Dec 2009 17:01:02 +0200 Subject: Fixed low bug EXT-3007 (Viewer stalls while resetting filter in teleport history) --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 88 +++++++++++- indra/llui/llflatlistview.h | 11 +- indra/newview/llpanelteleporthistory.cpp | 223 +++++++++++++++++++++++++++---- 3 files changed, 294 insertions(+), 28 deletions(-) diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 7b7a3139a4..3754d155cf 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -66,7 +66,7 @@ const LLRect& LLFlatListView::getItemsRect() const return mItemsPanel->getRect(); } -bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null*/, EAddPosition pos /*= ADD_BOTTOM*/) +bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null*/, EAddPosition pos /*= ADD_BOTTOM*/,bool rearrange /*= true*/) { if (!item) return false; if (value.isUndefined()) return false; @@ -97,8 +97,11 @@ bool LLFlatListView::addItem(LLPanel * item, const LLSD& value /*= LLUUID::null* // Children don't accept the focus item->setTabStop(false); - rearrangeItems(); - notifyParentItemsRectChanged(); + if (rearrange) + { + rearrangeItems(); + notifyParentItemsRectChanged(); + } return true; } @@ -980,7 +983,86 @@ S32 LLFlatListView::notify(const LLSD& info) return 1; } } + else if (info.has("rearrange")) + { + rearrangeItems(); + notifyParentItemsRectChanged(); + return 1; + } return 0; } +void LLFlatListView::detachItems(std::vector& detached_items) +{ + LLSD action; + action.with("detach", LLSD()); + // Clear detached_items list + detached_items.clear(); + // Go through items and detach valid items, remove them from items panel + // and add to detached_items. + for (pairs_iterator_t + iter = mItemPairs.begin(), + iter_end = mItemPairs.end(); + iter != iter_end; ++iter) + { + LLPanel* pItem = (*iter)->first; + if (1 == pItem->notify(action)) + { + selectItemPair((*iter), false); + mItemsPanel->removeChild(pItem); + detached_items.push_back(pItem); + } + } + if (!detached_items.empty()) + { + // Some items were detached, clean ourself from unusable memory + if (detached_items.size() == mItemPairs.size()) + { + // This way will be faster if all items were disconnected + for (pairs_iterator_t + iter = mItemPairs.begin(), + iter_end = mItemPairs.end(); + iter != iter_end; ++iter) + { + (*iter)->first = NULL; + delete *iter; + } + mItemPairs.clear(); + // Also set items panel height to zero. + // Reshape it to allow reshaping of non-item children. + LLRect rc = mItemsPanel->getRect(); + rc.mBottom = rc.mTop; + mItemsPanel->reshape(rc.getWidth(), rc.getHeight()); + mItemsPanel->setRect(rc); + setNoItemsCommentVisible(true); + } + else + { + for (std::vector::const_iterator + detached_iter = detached_items.begin(), + detached_iter_end = detached_items.end(); + detached_iter != detached_iter_end; ++detached_iter) + { + LLPanel* pDetachedItem = *detached_iter; + for (pairs_iterator_t + iter = mItemPairs.begin(), + iter_end = mItemPairs.end(); + iter != iter_end; ++iter) + { + item_pair_t* item_pair = *iter; + if (item_pair->first == pDetachedItem) + { + mItemPairs.erase(iter); + item_pair->first = NULL; + delete item_pair; + break; + } + } + } + rearrangeItems(); + } + notifyParentItemsRectChanged(); + } +} + //EOF diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index a488b00854..5999e79f61 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -133,7 +133,7 @@ public: * Adds and item and LLSD value associated with it to the list at specified position * @return true if the item was added, false otherwise */ - virtual bool addItem(LLPanel * item, const LLSD& value = LLUUID::null, EAddPosition pos = ADD_BOTTOM); + virtual bool addItem(LLPanel * item, const LLSD& value = LLUUID::null, EAddPosition pos = ADD_BOTTOM, bool rearrange = true); /** * Insert item_to_add along with associated value to the list right after the after_item. @@ -270,6 +270,15 @@ public: /** Removes all items from the list */ virtual void clear(); + /** + * Removes all items that can be detached from the list but doesn't destroy + * them, caller responsible to manage items after they are detached. + * Detachable item should accept "detach" action via notify() method, + * where it disconnect all callbacks, does other valuable routines and + * return 1. + */ + void detachItems(std::vector& detached_items); + /** * Set comparator to use for future sorts. * diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 596bd2909a..3eb90e919c 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -60,13 +60,18 @@ class LLTeleportHistoryFlatItem : public LLPanel { public: LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl); - virtual ~LLTeleportHistoryFlatItem() {}; + virtual ~LLTeleportHistoryFlatItem(); virtual BOOL postBuild(); + /*virtual*/ S32 notify(const LLSD& info); + S32 getIndex() { return mIndex; } void setIndex(S32 index) { mIndex = index; } const std::string& getRegionName() { return mRegionName;} + void setRegionName(const std::string& name); + void setHighlightedText(const std::string& text); + void updateTitle(); /*virtual*/ void setValue(const LLSD& value); @@ -75,18 +80,51 @@ public: virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); static void showPlaceInfoPanel(S32 index); + + LLHandle getItemHandle() { mItemHandle.bind(this); return mItemHandle; } + private: void onProfileBtnClick(); LLButton* mProfileBtn; + LLTextBox* mTitle; LLTeleportHistoryPanel::ContextMenu *mContextMenu; S32 mIndex; std::string mRegionName; std::string mHighlight; + LLRootHandle mItemHandle; +}; + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +class LLTeleportHistoryFlatItemStorage: public LLSingleton { +protected: + typedef std::vector< LLHandle > flat_item_list_t; + +public: + LLTeleportHistoryFlatItem* getFlatItemForPersistentItem ( + LLTeleportHistoryPanel::ContextMenu *context_menu, + const LLTeleportHistoryPersistentItem& persistent_item, + const S32 cur_item_index, + const std::string &hl); + + void removeItem(LLTeleportHistoryFlatItem* item); + + void purge(); + +private: + + flat_item_list_t mItems; }; +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl) : LLPanel(), mIndex(index), @@ -97,18 +135,37 @@ LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistor LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history_item.xml"); } +LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem() +{ +} + //virtual BOOL LLTeleportHistoryFlatItem::postBuild() { - LLTextUtil::textboxSetHighlightedVal(getChild("region"), LLStyle::Params(), mRegionName, mHighlight); + mTitle = getChild("region"); mProfileBtn = getChild("profile_btn"); mProfileBtn->setClickedCallback(boost::bind(&LLTeleportHistoryFlatItem::onProfileBtnClick, this)); + updateTitle(); + return true; } +S32 LLTeleportHistoryFlatItem::notify(const LLSD& info) +{ + if(info.has("detach")) + { + delete mMouseDownSignal; + mMouseDownSignal = NULL; + delete mRightMouseDownSignal; + mRightMouseDownSignal = NULL; + return 1; + } + return 0; +} + void LLTeleportHistoryFlatItem::setValue(const LLSD& value) { if (!value.isMap()) return;; @@ -116,6 +173,25 @@ void LLTeleportHistoryFlatItem::setValue(const LLSD& value) childSetVisible("selected_icon", value["selected"]); } +void LLTeleportHistoryFlatItem::setHighlightedText(const std::string& text) +{ + mHighlight = text; +} + +void LLTeleportHistoryFlatItem::setRegionName(const std::string& name) +{ + mRegionName = name; +} + +void LLTeleportHistoryFlatItem::updateTitle() +{ + LLTextUtil::textboxSetHighlightedVal( + mTitle, + LLStyle::Params(), + mRegionName, + mHighlight); +} + void LLTeleportHistoryFlatItem::onMouseEnter(S32 x, S32 y, MASK mask) { childSetVisible("hovered_icon", true); @@ -155,6 +231,82 @@ void LLTeleportHistoryFlatItem::onProfileBtnClick() LLTeleportHistoryFlatItem::showPlaceInfoPanel(mIndex); } +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +LLTeleportHistoryFlatItem* +LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem ( + LLTeleportHistoryPanel::ContextMenu *context_menu, + const LLTeleportHistoryPersistentItem& persistent_item, + const S32 cur_item_index, + const std::string &hl) +{ + LLTeleportHistoryFlatItem* item = NULL; + if ( cur_item_index < mItems.size() ) + { + item = mItems[cur_item_index].get(); + if (item->getParent() == NULL) + { + item->setIndex(cur_item_index); + item->setRegionName(persistent_item.mTitle); + item->setHighlightedText(hl); + item->setVisible(TRUE); + item->updateTitle(); + } + else + { + // Item already added to parent + item = NULL; + } + } + + if ( !item ) + { + item = new LLTeleportHistoryFlatItem(cur_item_index, + context_menu, + persistent_item.mTitle, + hl); + mItems.push_back(item->getItemHandle()); + } + + return item; +} + +void LLTeleportHistoryFlatItemStorage::removeItem(LLTeleportHistoryFlatItem* item) +{ + if (item) + { + flat_item_list_t::iterator item_iter = std::find(mItems.begin(), + mItems.end(), + item->getItemHandle()); + if (item_iter != mItems.end()) + { + mItems.erase(item_iter); + } + } +} + +void LLTeleportHistoryFlatItemStorage::purge() +{ + for ( flat_item_list_t::iterator + it = mItems.begin(), + it_end = mItems.end(); + it != it_end; ++it ) + { + LLHandle item_handle = *it; + if ( !item_handle.isDead() && item_handle.get()->getParent() == NULL ) + { + item_handle.get()->die(); + } + } + mItems.clear(); +} + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + LLTeleportHistoryPanel::ContextMenu::ContextMenu() : mMenu(NULL) { @@ -236,6 +388,7 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel() LLTeleportHistoryPanel::~LLTeleportHistoryPanel() { + LLTeleportHistoryFlatItemStorage::instance().purge(); LLView::deleteViewByHandle(mGearMenuHandle); } @@ -319,8 +472,11 @@ void LLTeleportHistoryPanel::draw() // virtual void LLTeleportHistoryPanel::onSearchEdit(const std::string& string) { - sFilterSubString = string; - showTeleportHistory(); + if (sFilterSubString != string) + { + sFilterSubString = string; + showTeleportHistory(); + } } // virtual @@ -478,16 +634,15 @@ void LLTeleportHistoryPanel::refresh() while (mCurrentItem >= 0) { // Filtering - std::string landmark_title = items[mCurrentItem].mTitle; - LLStringUtil::toUpper(landmark_title); - - std::string::size_type match_offset = sFilterSubString.size() ? landmark_title.find(sFilterSubString) : std::string::npos; - bool passed = sFilterSubString.size() == 0 || match_offset != std::string::npos; - - if (!passed) + if (!sFilterSubString.empty()) { - mCurrentItem--; - continue; + std::string landmark_title(items[mCurrentItem].mTitle); + LLStringUtil::toUpper(landmark_title); + if( std::string::npos == landmark_title.find(sFilterSubString) ) + { + mCurrentItem--; + continue; + } } // Checking whether date of item is earlier, than tab_boundary_date. @@ -521,9 +676,14 @@ void LLTeleportHistoryPanel::refresh() if (curr_flat_view) { - LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, sFilterSubString); - curr_flat_view->addItem(item); - + LLTeleportHistoryFlatItem* item = + LLTeleportHistoryFlatItemStorage::instance() + .getFlatItemForPersistentItem(&mContextMenu, + items[mCurrentItem], + mCurrentItem, + sFilterSubString); + if ( !curr_flat_view->addItem(item, LLUUID::null, ADD_BOTTOM, false) ) + llerrs << "Couldn't add flat item to teleport history." << llendl; if (mLastSelectedItemIndex == mCurrentItem) curr_flat_view->selectItem(item, true); } @@ -534,6 +694,16 @@ void LLTeleportHistoryPanel::refresh() break; } + for (S32 n = mItemContainers.size() - 1; n >= 0; --n) + { + LLAccordionCtrlTab* tab = mItemContainers.get(n); + LLFlatListView* fv = getFlatListViewFromTab(tab); + if (fv) + { + fv->notify(LLSD().with("rearrange", LLSD())); + } + } + mHistoryAccordion->arrange(); updateVerbs(); @@ -566,11 +736,12 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index) } const LLTeleportHistoryStorage::slurl_list_t& history_items = mTeleportHistory->getItems(); - LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below - &mContextMenu, - history_items[history_items.size() - 1].mTitle, // Most recent item, it was - sFilterSubString); - // added instead of removed + LLTeleportHistoryFlatItem* item = LLTeleportHistoryFlatItemStorage::instance() + .getFlatItemForPersistentItem(&mContextMenu, + history_items[history_items.size() - 1], // Most recent item, it was added instead of removed + history_items.size(), // index will be decremented inside loop below + sFilterSubString); + fv->addItem(item, LLUUID::null, ADD_TOP); // Index of each item, from last to removed item should be decremented @@ -598,6 +769,8 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index) if (item->getIndex() == removed_index) { + LLTeleportHistoryFlatItemStorage::instance().removeItem(item); + fv->removeItem(item); // If flat list becames empty, then accordion tab should be hidden @@ -629,10 +802,12 @@ void LLTeleportHistoryPanel::showTeleportHistory() LLFlatListView* fv = getFlatListViewFromTab(tab); if (fv) - fv->clear(); + { + // Detached panels are managed by LLTeleportHistoryFlatItemStorage + std::vector detached_items; + fv->detachItems(detached_items); + } } - - refresh(); } void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected) -- cgit v1.2.3 From a6f854979acb5e3e83973c5021077362b3643e01 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 17:21:41 +0200 Subject: fixed EXT-3400 Instuction string doesn't fit button's caption in IM floater --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 32eae9d11d..f004c95aca 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2907,7 +2907,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Joining voice call... - Connected, click End Call to hang up + Connected, click Leave Call to hang up Left voice call -- cgit v1.2.3 From 315c6dec0647f6f985d73d2bd28070aa78f3899e Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Wed, 23 Dec 2009 17:25:49 +0200 Subject: fixed normal bug (EXT-2787) Outdated voice chat invitation never hides itself - P2P and AVALINE invitationswill hide now if a call is not valid anymore - GROUP and ADHOC invitations will stay on a screen --HG-- branch : product-engine --- indra/newview/llimview.cpp | 63 +++++++++++++++++++++- indra/newview/llimview.h | 22 +++++--- .../skins/default/xui/en/floater_incoming_call.xml | 4 ++ .../skins/default/xui/en/floater_outgoing_call.xml | 4 ++ 4 files changed, 85 insertions(+), 8 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 3345f7d0bf..e2e3524f74 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1511,7 +1511,7 @@ bool LLOutgoingCallDialog::lifetimeHasExpired() if (mLifetimeTimer.getStarted()) { F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); - if (elapsed_time > LIFETIME) + if (elapsed_time > mLifetime) { return true; } @@ -1532,6 +1532,13 @@ void LLOutgoingCallDialog::show(const LLSD& key) // hide all text at first hideAllText(); + // init notification's lifetime + std::istringstream ss( getString("lifetime") ); + if (!(ss >> mLifetime)) + { + mLifetime = DEFAULT_LIFETIME; + } + // customize text strings // tell the user which voice channel they are leaving if (!mPayload["old_channel_name"].asString().empty()) @@ -1641,6 +1648,43 @@ LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) : LLCallDialog(payload) { } +void LLIncomingCallDialog::draw() +{ + if (lifetimeHasExpired()) + { + onLifetimeExpired(); + } + LLDockableFloater::draw(); +} + +bool LLIncomingCallDialog::lifetimeHasExpired() +{ + if (mLifetimeTimer.getStarted()) + { + F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); + if (elapsed_time > mLifetime) + { + return true; + } + } + return false; +} + +void LLIncomingCallDialog::onLifetimeExpired() +{ + // check whether a call is valid or not + if (LLVoiceClient::getInstance()->findSession(mPayload["caller_id"].asUUID())) + { + // restart notification's timer if call is still valid + mLifetimeTimer.start(); + } + else + { + // close invitation if call is already not valid + mLifetimeTimer.stop(); + closeFloater(); + } +} BOOL LLIncomingCallDialog::postBuild() { @@ -1650,6 +1694,13 @@ BOOL LLIncomingCallDialog::postBuild() LLSD caller_id = mPayload["caller_id"]; std::string caller_name = mPayload["caller_name"].asString(); + // init notification's lifetime + std::istringstream ss( getString("lifetime") ); + if (!(ss >> mLifetime)) + { + mLifetime = DEFAULT_LIFETIME; + } + std::string call_type; if (gAgent.isInGroup(session_id)) { @@ -1687,6 +1738,16 @@ BOOL LLIncomingCallDialog::postBuild() childSetAction("Start IM", onStartIM, this); childSetFocus("Accept"); + if(mPayload["notify_box_type"] != "VoiceInviteGroup" && mPayload["notify_box_type"] != "VoiceInviteAdHoc") + { + // starting notification's timer for P2P and AVALINE invitations + mLifetimeTimer.start(); + } + else + { + mLifetimeTimer.stop(); + } + return TRUE; } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 92caf0af9a..d0ac819161 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -489,6 +489,14 @@ public: virtual BOOL postBuild(); protected: + // lifetime timer for a notification + LLTimer mLifetimeTimer; + // notification's lifetime in seconds + S32 mLifetime; + static const S32 DEFAULT_LIFETIME = 5; + virtual bool lifetimeHasExpired() {return false;}; + virtual void onLifetimeExpired() {}; + virtual void getAllowedRect(LLRect& rect); LLSD mPayload; }; @@ -501,11 +509,16 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + // check timer state + /*virtual*/ void draw(); + static void onAccept(void* user_data); static void onReject(void* user_data); static void onStartIM(void* user_data); private: + /*virtual*/ bool lifetimeHasExpired(); + /*virtual*/ void onLifetimeExpired(); void processCallResponse(S32 response); }; @@ -524,15 +537,10 @@ public: /*virtual*/ void draw(); private: - // hide all text boxes void hideAllText(); - // lifetime timer for NO_ANSWER notification - LLTimer mLifetimeTimer; - // lifetime duration for NO_ANSWER notification - static const S32 LIFETIME = 5; - bool lifetimeHasExpired(); - void onLifetimeExpired(); + /*virtual*/ bool lifetimeHasExpired(); + /*virtual*/ void onLifetimeExpired(); }; // Globals diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index 81c54ae55e..b9ce11600f 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -10,6 +10,10 @@ help_topic="incoming_call" title="UNKNOWN PERSON IS CALLING" width="410"> + + 5 + Nearby Voice Chat diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index c6bc093c6c..104ac2143f 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -10,6 +10,10 @@ help_topic="outgoing_call" title="CALLING" width="410"> + + 5 + Nearby Voice Chat -- cgit v1.2.3 From d741d040bc0f06f573b4a2507fba2b245191c36d Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 23 Dec 2009 17:47:22 +0200 Subject: fixed win build --HG-- branch : product-engine --- indra/newview/llpanelteleporthistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 3eb90e919c..03b616d280 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -243,7 +243,7 @@ LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem ( const std::string &hl) { LLTeleportHistoryFlatItem* item = NULL; - if ( cur_item_index < mItems.size() ) + if ( cur_item_index < (S32) mItems.size() ) { item = mItems[cur_item_index].get(); if (item->getParent() == NULL) -- cgit v1.2.3 From dd20b16ed084b936d2e6c11a48aa34d83828aab5 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 23 Dec 2009 18:13:57 +0200 Subject: no ticket. HACK !!!. HACK code to fix inventory root folder for some broken accounts code executed only once and takes O(N) where N - number of inventory items. --HG-- branch : product-engine --- indra/newview/llinventorymodel.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 1eb8d1bc2c..711114173c 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2654,6 +2654,33 @@ void LLInventoryModel::buildParentChildMap() cat_array_t* catsp = get_ptr_in_map(mParentChildCategoryTree, agent_inv_root_id); if(catsp) { + // *HACK - fix root inventory folder + // some accounts has pbroken inventory root folders + + std::string name = "My Inventory"; + LLUUID prev_root_id = mRootFolderID; + for (parent_cat_map_t::const_iterator it = mParentChildCategoryTree.begin(), + it_end = mParentChildCategoryTree.end(); it != it_end; ++it) + { + cat_array_t* cat_array = it->second; + for (cat_array_t::const_iterator cat_it = cat_array->begin(), + cat_it_end = cat_array->end(); cat_it != cat_it_end; ++cat_it) + { + LLPointer category = *cat_it; + + if(category && category->getPreferredType() != LLFolderType::FT_ROOT_INVENTORY) + continue; + if ( category && 0 == LLStringUtil::compareInsensitive(name, category->getName()) ) + { + if(category->getUUID()!=mRootFolderID) + { + LLUUID& new_inv_root_folder_id = const_cast(mRootFolderID); + new_inv_root_folder_id = category->getUUID(); + } + } + } + } + // 'My Inventory', // root of the agent's inv found. // The inv tree is built. -- cgit v1.2.3 From 40b8a7a3284daa90d3b0e278e8afb5b80b544d0d Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 23 Dec 2009 18:26:21 +0200 Subject: Fixed normal bug EXT-3628 ("Connecting to.." popup appears behind voice control panel while calling), removed temporary workaround. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 9 --------- indra/newview/llspeakbutton.cpp | 2 +- indra/newview/llvoicechannel.cpp | 11 +++++++++++ indra/newview/llvoicechannel.h | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c222ced98f..29f37a04b4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -291,15 +291,6 @@ void LLCallFloater::updateSession() if (show_me) { setVisible(true); - // Workaround(EM): Set current call dialog to front most because - // connect/leaving popups should appear on top of VCP. - // See bug EXT-3628. - LLOutgoingCallDialog* instance = - LLFloaterReg::findTypedInstance("outgoing_call", LLOutgoingCallDialog::OCD_KEY); - if(instance && instance->getVisible()) - { - instance->setFrontmost(); - } } } } diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index 90214a1bd7..8f2c877c7a 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -123,7 +123,7 @@ LLSpeakButton::LLSpeakButton(const Params& p) mOutputMonitor->setIsAgentControl(true); //*TODO find a better place to do that - LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1)); + LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true); } LLSpeakButton::~LLSpeakButton() diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 69d2458217..993853b9a6 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -446,6 +446,17 @@ void LLVoiceChannel::resume() } } +boost::signals2::connection LLVoiceChannel::setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front) +{ + if (at_front) + { + return sCurrentVoiceChannelChangedSignal.connect(cb, boost::signals2::at_front); + } + else + { + return sCurrentVoiceChannelChangedSignal.connect(cb); + } +} // // LLVoiceChannelGroup diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 77801142cb..cb86671305 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -64,7 +64,7 @@ public: typedef boost::function channel_changed_callback_t; typedef boost::signals2::signal channel_changed_signal_t; static channel_changed_signal_t sCurrentVoiceChannelChangedSignal; - static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb) { return sCurrentVoiceChannelChangedSignal.connect(cb); } + static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb, bool at_front = false); LLVoiceChannel(const LLUUID& session_id, const std::string& session_name); -- cgit v1.2.3 From 425fd9c6e0f68630191078a34a05bed518156efb Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 18:35:27 +0200 Subject: Fixed normal bug EXT-3299 "Can't drag and drop landmarks into an empty favorites folder through landmarksSP" - Added drag and drop for empty inventory panel. Dropped item gets to the root folder. - Fixed issue with empty "Landmarks" inventory panel not displaying "No matching items..." message. - Removed accordion updating and hiding in idle routine. This invalidates EXT-2346 "My Landmarks accordion panels shouldn't be displayed if there are no landmarks in respective folders" --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 7 +++ indra/newview/llinventorypanel.cpp | 8 +++- indra/newview/llpanellandmarks.cpp | 95 +++++++++++++++----------------------- indra/newview/llpanellandmarks.h | 18 +++----- 4 files changed, 56 insertions(+), 72 deletions(-) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 9cca1b07db..474d2ca21f 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1822,6 +1822,13 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + // When there are no visible children drag and drop is handled + // by the folder which is the hierarchy root. + if (!handled && !hasVisibleChildren()) + { + handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); + } + if (handled) { lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderView" << llendl; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 082b7a9468..164e72e621 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -628,9 +628,15 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + // If folder view is empty the (x, y) point won't be in its rect + // so the handler must be called explicitly. + if (!mFolders->hasVisibleChildren()) + { + handled = mFolders->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } + if (handled) { mFolders->setDragAndDropThisFrame(); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index e16bac2098..c627c60940 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -68,12 +68,13 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn"; // helper functions static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string); static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list); +static bool category_has_descendents(LLInventorySubTreePanel* inventory_list); /** - * Bridge to support knowing when the inventory has changed to update folder (open/close) state + * Bridge to support knowing when the inventory has changed to update folder (open/close) state * for landmarks panels. * - * Due to Inventory data are loaded in background we need to save folder state each time + * Due to Inventory data are loaded in background we need to save folder state each time * next level is loaded. See EXT-3094. */ class LLLandmarksPanelObserver : public LLInventoryObserver @@ -90,6 +91,7 @@ private: void LLLandmarksPanelObserver::changed(U32 mask) { mLP->saveFolderStateIfNoFilter(); + mLP->updateShowFolderState(); } LLLandmarksPanel::LLLandmarksPanel() @@ -134,22 +136,12 @@ BOOL LLLandmarksPanel::postBuild() getChild("tab_favorites")->setDisplayChildren(true); getChild("tab_landmarks")->setDisplayChildren(true); - gIdleCallbacks.addFunction(LLLandmarksPanel::doIdle, this); return TRUE; } // virtual void LLLandmarksPanel::onSearchEdit(const std::string& string) { - // show all folders in Landmarks Accordion for empty filter - if (mLandmarksInventoryPanel->getFilter()) - { - mLandmarksInventoryPanel->setShowFolderState(string.empty() ? - LLInventoryFilter::SHOW_ALL_FOLDERS : - LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS - ); - } - // give FolderView a chance to be refreshed. So, made all accordions visible for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) { @@ -173,6 +165,10 @@ void LLLandmarksPanel::onSearchEdit(const std::string& string) if (sFilterSubString != string) sFilterSubString = string; + + // show all folders in Landmarks Accordion for empty filter + // only if Landmarks inventory folder is not empty + updateShowFolderState(); } // virtual @@ -262,6 +258,23 @@ void LLLandmarksPanel::saveFolderStateIfNoFilter() save_folder_state_if_no_filter(mLibraryInventoryPanel); } +void LLLandmarksPanel::updateShowFolderState() +{ + if (!mLandmarksInventoryPanel->getFilter()) + return; + + bool show_all_folders = mLandmarksInventoryPanel->getRootFolder()->getFilterSubString().empty(); + if (show_all_folders) + { + show_all_folders = category_has_descendents(mLandmarksInventoryPanel); + } + + mLandmarksInventoryPanel->setShowFolderState(show_all_folders ? + LLInventoryFilter::SHOW_ALL_FOLDERS : + LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS + ); +} + ////////////////////////////////////////////////////////////////////////// // PROTECTED METHODS ////////////////////////////////////////////////////////////////////////// @@ -778,46 +791,6 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata) } } -void LLLandmarksPanel::updateFilteredAccordions() -{ - LLInventoryPanel* inventory_list = NULL; - LLAccordionCtrlTab* accordion_tab = NULL; - bool needs_arrange = false; - - for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) - { - accordion_tab = *iter; - - accordion_tab->setVisible(TRUE); - - inventory_list = dynamic_cast (accordion_tab->getAccordionView()); - if (NULL == inventory_list) continue; - - // This doesn't seem to work correctly. Disabling for now. -Seraph - // Enabled to show/hide accordions with/without landmarks. See EXT-2346. (Seth PE) - LLFolderView* fv = inventory_list->getRootFolder(); - - // arrange folder view contents to draw its descendants if it has any - fv->arrangeFromRoot(); - - bool has_descendants = fv->hasFilteredDescendants(); - if (!has_descendants) - needs_arrange = true; - - accordion_tab->setVisible(has_descendants); - - //accordion_tab->setVisible(TRUE); - } - - // we have to arrange accordion tabs for cases when filter string is less restrictive but - // all items are still filtered. - if (needs_arrange) - { - static LLAccordionCtrl* accordion = getChild("landmarks_accordion"); - accordion->arrange(); - } -} - /* Processes such actions: cut/rename/delete/paste actions @@ -926,13 +899,6 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg return true; } -// static -void LLLandmarksPanel::doIdle(void* landmarks_panel) -{ - LLLandmarksPanel* panel = (LLLandmarksPanel* ) landmarks_panel; - panel->updateFilteredAccordions(); -} - void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark) { LLVector3d landmark_global_pos; @@ -1067,4 +1033,15 @@ static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_li // inventory_list->saveFolderState(); // *TODO: commented out to fix build } } + +static bool category_has_descendents(LLInventorySubTreePanel* inventory_list) +{ + LLViewerInventoryCategory* category = gInventory.getCategory(inventory_list->getStartFolderID()); + if (category) + { + return category->getDescendentCount() > 0; + } + + return false; +} // EOF diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index b0e537f647..590fa395b6 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -72,6 +72,12 @@ public: */ void saveFolderStateIfNoFilter(); + /** + * Update filter ShowFolderState setting to show empty folder message + * if Landmarks inventory folder is empty. + */ + void updateShowFolderState(); + protected: /** * @return true - if current selected panel is not null and selected item is a landmark @@ -111,13 +117,6 @@ private: bool isActionEnabled(const LLSD& command_name) const; void onCustomAction(const LLSD& command_name); - /** - * Updates accordions according to filtered items in lists. - * - * It hides accordion for empty lists - */ - void updateFilteredAccordions(); - /** * Determines if selected item can be modified via context/gear menu. * @@ -132,11 +131,6 @@ private: */ bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); - /** - * Static callback for gIdleCallbacks to perform actions out of drawing - */ - static void doIdle(void* landmarks_panel); - /** * Landmark actions callbacks. Fire when a landmark is loaded from the list. */ -- cgit v1.2.3 From 75f6bdb469c01fbfb4b26603864d6616b70374f0 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 18:46:28 +0200 Subject: No ticket. Removed obsolete code for saving Places/My Landmarks folders state. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 27 +++------------------------ indra/newview/llpanellandmarks.h | 5 ----- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index c627c60940..7b64f7e221 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -67,15 +67,12 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn"; // helper functions static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string); -static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list); static bool category_has_descendents(LLInventorySubTreePanel* inventory_list); /** - * Bridge to support knowing when the inventory has changed to update folder (open/close) state - * for landmarks panels. - * - * Due to Inventory data are loaded in background we need to save folder state each time - * next level is loaded. See EXT-3094. + * Bridge to support knowing when the inventory has changed to update Landmarks tab + * ShowFolderState filter setting to show all folders when the filter string is empty and + * empty folder message when Landmarks inventory category has no children. */ class LLLandmarksPanelObserver : public LLInventoryObserver { @@ -90,7 +87,6 @@ private: void LLLandmarksPanelObserver::changed(U32 mask) { - mLP->saveFolderStateIfNoFilter(); mLP->updateShowFolderState(); } @@ -250,14 +246,6 @@ void LLLandmarksPanel::onSelectorButtonClicked() } } -void LLLandmarksPanel::saveFolderStateIfNoFilter() -{ - save_folder_state_if_no_filter(mFavoritesInventoryPanel); - save_folder_state_if_no_filter(mLandmarksInventoryPanel); - save_folder_state_if_no_filter(mMyInventoryPanel); - save_folder_state_if_no_filter(mLibraryInventoryPanel); -} - void LLLandmarksPanel::updateShowFolderState() { if (!mLandmarksInventoryPanel->getFilter()) @@ -1025,15 +1013,6 @@ static void filter_list(LLInventorySubTreePanel* inventory_list, const std::stri } -static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list) -{ - // save current folder open state if no filter currently applied - if (inventory_list->getRootFolder() && inventory_list->getRootFolder()->getFilterSubString().empty()) - { - // inventory_list->saveFolderState(); // *TODO: commented out to fix build - } -} - static bool category_has_descendents(LLInventorySubTreePanel* inventory_list) { LLViewerInventoryCategory* category = gInventory.getCategory(inventory_list->getStartFolderID()); diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 590fa395b6..9b02f73afa 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -67,11 +67,6 @@ public: mCurrentSelectedList = inventory_list; } - /** - * Saves folder state for all Inventory Panels if there are no applied filter. - */ - void saveFolderStateIfNoFilter(); - /** * Update filter ShowFolderState setting to show empty folder message * if Landmarks inventory folder is empty. -- cgit v1.2.3 From 798ba45606b4e4affcfde157ec64e877dd39e91c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 18:55:35 +0200 Subject: Fixed EXT-3348 "State of all folders (expanded/collapsed) in "My Landmarks" tab isn't saved after switching to "Teleport History" tab and back" - Disabled restoring folder state when empty filter is not changed. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 7b64f7e221..6a98210830 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -985,7 +985,7 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark) static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string) { // When search is cleared, restore the old folder state. - if (string == "") + if (!inventory_list->getRootFolder()->getFilterSubString().empty() && string == "") { inventory_list->setFilterSubString(LLStringUtil::null); // Re-open folders that were open before @@ -1010,7 +1010,6 @@ static void filter_list(LLInventorySubTreePanel* inventory_list, const std::stri // Set new filter string inventory_list->setFilterSubString(string); - } static bool category_has_descendents(LLInventorySubTreePanel* inventory_list) -- cgit v1.2.3 From e3211c4ac1830d5f480cc8206aad932fd0505e21 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Wed, 23 Dec 2009 17:14:27 +0000 Subject: EXT-3679: Send Session, Region, and Parcel IDs to Search. These IDs are sent as the following query parameters to the search server: sid=, rid=, pid=, for the Session ID, Region ID, and Parcel ID respectively. For some reason, Parcel ID always seems to be NULL though. I'll file a separate JIRA for that. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llweb.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 455c3587ff..ff7c2b1f5e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3585,7 +3585,7 @@ Type String Value - http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE] + http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID] HighResSnapshot diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index f8bb7336db..7866f735c5 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -38,10 +38,12 @@ // Library includes #include "llwindow.h" // spawnWebBrowser() +#include "llagent.h" #include "llappviewer.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" #include "lllogininstance.h" +#include "llparcel.h" #include "llsd.h" #include "lltoastalertpanel.h" #include "llui.h" @@ -49,6 +51,8 @@ #include "llversioninfo.h" #include "llviewercontrol.h" #include "llviewernetwork.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" #include "llviewerwindow.h" class URLLoader : public LLToastAlertPanel::URLLoader @@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + substitution["SESSION_ID"] = gAgent.getSessionID(); + // find the region ID + LLUUID region_id; + LLViewerRegion *region = gAgent.getRegion(); + if (region) + { + region_id = region->getRegionID(); + } + substitution["REGION_ID"] = region_id; + + // find the parcel ID + LLUUID parcel_id; + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if (parcel) + { + parcel_id = parcel->getID(); + } + substitution["PARCEL_ID"] = parcel_id; + + // expand all of the substitution strings and escape the url std::string expanded_url = url; LLStringUtil::format(expanded_url, substitution); -- cgit v1.2.3 From 46948d9fcc9149c3c416167f166aff6ce8fa88d5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 23 Dec 2009 20:00:48 +0200 Subject: Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven) -- made Avatar Item Voice States xml driven. Added fake xml panel file with one textbox per style. Style of the appropriate textbox is applied to avatar item's name -- It was necessary to change visibility of the LLTExtBase::getDefaultStyle() to public. --HG-- branch : product-engine --- indra/llui/lltextbase.h | 2 +- indra/newview/llavatarlistitem.cpp | 65 +++++++++++++++++++++++++++++--------- indra/newview/llavatarlistitem.h | 12 ++++++- indra/newview/llcallfloater.cpp | 19 ++--------- 4 files changed, 65 insertions(+), 33 deletions(-) diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index c91578b637..038b9eaa62 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -184,6 +184,7 @@ public: bool scrolledToEnd(); const LLFontGL* getDefaultFont() const { return mDefaultFont; } + LLStyle::Params getDefaultStyle(); public: // Fired when a URL link is clicked @@ -256,7 +257,6 @@ protected: LLTextBase(const Params &p); virtual ~LLTextBase(); void initFromParams(const Params& p); - LLStyle::Params getDefaultStyle(); virtual void onValueChange(S32 start, S32 end); // draw methods diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index c8544bc3fb..d70e3c61b9 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -183,28 +183,21 @@ void LLAvatarListItem::setHighlight(const std::string& highlight) setNameInternal(mAvatarName->getText(), mHighlihtSubstring = highlight); } -void LLAvatarListItem::setStyle(const LLStyle::Params& new_style) +void LLAvatarListItem::setStyle(EItemStyle voice_state) { -// LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle = new_style); + voice_state_map_t mVoiceStateMap = getItemStylesParams(); - // Active group should be bold. - LLFontDescriptor new_desc(mAvatarName->getDefaultFont()->getFontDesc()); - - new_desc.setStyle(new_style.font()->getFontDesc().getStyle()); - // *NOTE dzaporozhan - // On Windows LLFontGL::NORMAL will not remove LLFontGL::BOLD if font - // is predefined as bold (SansSerifSmallBold, for example) -// new_desc.setStyle(active ? LLFontGL::BOLD : LLFontGL::NORMAL); - LLFontGL* new_font = LLFontGL::getFont(new_desc); - -// - mAvatarNameStyle.font = new_font; + mAvatarNameStyle = mVoiceStateMap[voice_state]; // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains // hyperlinks, as their styles will be wrong. - mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle/* = new_style*/); + mAvatarName->setText(mAvatarName->getText(), mAvatarNameStyle); + + // *TODO: move icon colors into colors.xml + mAvatarIcon->setColor(voice_state == IS_VOICE_JOINED ? LLColor4::white : LLColor4::smoke); } + void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) { if (mAvatarId.notNull()) @@ -418,3 +411,45 @@ std::string LLAvatarListItem::formatSeconds(U32 secs) args["[COUNT]"] = llformat("%u", count); return getString(fmt, args); } + +// static +LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() +{ + static voice_state_map_t item_styles_params_map; + if (!item_styles_params_map.empty()) return item_styles_params_map; + + LLPanel::Params params = LLUICtrlFactory::getDefaultParams(); + LLPanel* params_panel = LLUICtrlFactory::create(params); + + BOOL sucsess = LLUICtrlFactory::instance().buildPanel(params_panel, "panel_avatar_list_item_params.xml"); + + if (sucsess) + { + + item_styles_params_map.insert( + std::make_pair(IS_DEFAULT, + params_panel->getChild("default_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_VOICE_INVITED, + params_panel->getChild("voice_call_invited_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_VOICE_JOINED, + params_panel->getChild("voice_call_joined_style")->getDefaultStyle())); + + item_styles_params_map.insert( + std::make_pair(IS_VOICE_LEFT, + params_panel->getChild("voice_call_left_style")->getDefaultStyle())); + } + else + { + item_styles_params_map.insert(std::make_pair(IS_DEFAULT, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_VOICE_INVITED, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_VOICE_JOINED, LLStyle::Params())); + item_styles_params_map.insert(std::make_pair(IS_VOICE_LEFT, LLStyle::Params())); + } + if (params_panel) params_panel->die(); + + return item_styles_params_map; +} diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 0e058f75db..d544ed459e 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -46,6 +46,13 @@ class LLAvatarIconCtrl; class LLAvatarListItem : public LLPanel, public LLFriendObserver { public: + typedef enum e_item_style_type { + IS_DEFAULT, + IS_VOICE_INVITED, + IS_VOICE_JOINED, + IS_VOICE_LEFT, + } EItemStyle; + class ContextMenu { public: @@ -73,7 +80,7 @@ public: void setOnline(bool online); void setName(const std::string& name); void setHighlight(const std::string& highlight); - void setStyle(const LLStyle::Params& new_style); + void setStyle(EItemStyle voice_state); void setAvatarId(const LLUUID& id, bool ignore_status_changes = false); void setLastInteractionTime(U32 secs_since); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly @@ -118,6 +125,9 @@ private: std::string formatSeconds(U32 secs); + typedef std::map voice_state_map_t; + static voice_state_map_t getItemStylesParams(); + LLAvatarIconCtrl* mAvatarIcon; LLTextBox* mAvatarName; LLTextBox* mLastInteractionTime; diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index a02a30a710..1c65eaba9c 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -597,38 +597,25 @@ void LLCallFloater::setState(LLAvatarListItem* item, ESpeakerState state) setState(item->getAvatarId(), state); - LLStyle::Params speaker_style; - LLFontDescriptor new_desc(speaker_style.font()->getFontDesc()); - switch (state) { case STATE_INVITED: - new_desc.setStyle(LLFontGL::NORMAL); + item->setStyle(LLAvatarListItem::IS_VOICE_INVITED); break; case STATE_JOINED: removeVoiceRemoveTimer(item->getAvatarId()); - new_desc.setStyle(LLFontGL::NORMAL); + item->setStyle(LLAvatarListItem::IS_VOICE_JOINED); break; case STATE_LEFT: { setVoiceRemoveTimer(item->getAvatarId()); - new_desc.setStyle(LLFontGL::ITALIC); + item->setStyle(LLAvatarListItem::IS_VOICE_LEFT); } break; default: llwarns << "Unrecognized avatar panel state (" << state << ")" << llendl; break; } - - LLFontGL* new_font = LLFontGL::getFont(new_desc); - speaker_style.font = new_font; - item->setStyle(speaker_style); - -// if () - { - // found speaker is in voice, mark him as online - item->setOnline(STATE_JOINED == state); - } } void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) -- cgit v1.2.3 From de485d96a45e53b14a853696c92b4b70b5778879 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 23 Dec 2009 20:15:48 +0200 Subject: Fixed spelling and a wrong doxygen tag. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 4 ++-- indra/newview/llcallfloater.h | 4 ++-- indra/newview/llparticipantlist.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c222ced98f..18dfc43220 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -280,7 +280,7 @@ void LLCallFloater::updateSession() bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; childSetVisible("leave_call_btn", !is_local_chat); - refreshPartisipantList(); + refreshParticipantList(); updateAgentModeratorState(); //show floater for voice calls @@ -304,7 +304,7 @@ void LLCallFloater::updateSession() } } -void LLCallFloater::refreshPartisipantList() +void LLCallFloater::refreshParticipantList() { // lets forget states from the previous session // for timers... diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 537c57f671..558f02d97e 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -114,7 +114,7 @@ private: /** * Refreshes participant list according to current Voice Channel */ - void refreshPartisipantList(); + void refreshParticipantList(); /** * Handles event on avatar list is refreshed after it was marked dirty. @@ -133,7 +133,7 @@ private: /** * Sets initial participants voice states in avatar list (Invited, Joined, Has Left). * - * @see refreshPartisipantList() + * @see refreshParticipantList() * @see onAvatarListRefreshed() * @see mInitParticipantsVoiceState */ diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 7d5944ea2b..424843d432 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -353,7 +353,7 @@ bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointergetValue().asUUID(); LLPointer speaker = mParent.mSpeakerMgr->findSpeaker(speaker_id); -- cgit v1.2.3 From def2fe77ce1608997696d7703887b30ca688d23c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 23 Dec 2009 21:10:00 +0200 Subject: Fixed normal bug EXT-3689 "Places/My Landmarks: "Collapse all folders" from gear menu closes root folder in landmarks accordions" - Added reopening root folder after all folders are collapsed. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 6a98210830..716a914306 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -661,7 +661,12 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) } else if ("collapse_all" == command_name) { - root_folder->closeAllFolders(); + root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + + // The top level folder is invisible, it must be open to + // display its sub-folders. + root_folder->openTopLevelFolders(); + root_folder->arrangeAll(); } else if ( "sort_by_date" == command_name) { -- cgit v1.2.3 From 069b410a884a5ee565d1cc09a2280b2b8b19ce1d Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Wed, 23 Dec 2009 11:24:43 -0800 Subject: Fix for world map textures not loading with HTTP Texture changes. --- indra/newview/lltexturefetch.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 3f489544b4..a75f631769 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -842,10 +842,10 @@ bool LLTextureFetchWorker::doWork(S32 param) mLoaded = FALSE; mGetStatus = 0; mGetReason.clear(); - lldebugs << "HTTP GET: " << mID << " Offset: " << offset - << " Bytes: " << mRequestedSize - << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth - << llendl; + LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << offset + << " Bytes: " << mRequestedSize + << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth + << LL_ENDL; setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); mState = WAIT_HTTP_REQ; @@ -1257,7 +1257,7 @@ void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, gTextureList.sTextureBits += data_size * 8; // Approximate - does not include header bits - //llinfos << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << llendl; + LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL; if (data_size > 0) { // *TODO: set the formatted image data here directly to avoid the copy @@ -1450,8 +1450,9 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C)) { // Only do partial requests for J2C at the moment - //llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl; + //llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl; desired_size = MAX_IMAGE_DATA_SIZE; + desired_discard = 0; } else if (desired_discard == 0) { -- cgit v1.2.3 From 183c991402a49caa5b29b85864b3ff9ef7a2fd53 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 23 Dec 2009 11:29:13 -0800 Subject: DEV-44614 ugly/broken font and formatting used for IM toast emotes fix bug, also fix some comments/typos/enumparams in this code area. --- indra/llrender/llfontgl.cpp | 2 +- indra/llui/lltextbase.cpp | 52 ++++++++++++++++++++-------------------- indra/newview/lltoastimpanel.cpp | 17 +++++++++---- 3 files changed, 39 insertions(+), 32 deletions(-) diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 7ad5f9608f..37a28ac721 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -135,7 +135,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons S32 scaled_max_pixels = max_pixels == S32_MAX ? S32_MAX : llceil((F32)max_pixels * sScaleX); - // determine which style flags need to be added programmatically by striping off the + // determine which style flags need to be added programmatically by stripping off the // style bits that are drawn by the underlying Freetype font U8 style_to_add = (style | mFontDescriptor.getStyle()) & ~mFontFreetype->getStyle(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e54032ac5e..7447a984ac 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -842,7 +842,7 @@ BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask) { // Did we just click on a link? if (cur_segment->getStyle() - && cur_segment->getStyle()->isLink()) + && cur_segment->getStyle()->isLink()) { // *TODO: send URL here? mURLClickSignal(this, LLSD() ); @@ -1477,7 +1477,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) } } -void LLTextBase::setText(const LLStringExplicit &utf8str ,const LLStyle::Params& input_params) +void LLTextBase::setText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params) { // clear out the existing text and segments getViewModel()->setDisplay(LLWStringUtil::null); @@ -2320,14 +2320,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele S32 end = llmin( selection_start, seg_end ); S32 length = end - start; font->render(text, start, - rect.mLeft, rect.mTop, - color, - LLFontGL::LEFT, LLFontGL::TOP, - 0, - mStyle->getShadowType(), - length, rect.getWidth(), - &right_x, - mEditor.getUseEllipses()); + rect.mLeft, rect.mTop, + color, + LLFontGL::LEFT, LLFontGL::TOP, + LLFontGL::NORMAL, + mStyle->getShadowType(), + length, rect.getWidth(), + &right_x, + mEditor.getUseEllipses()); } rect.mLeft = (S32)ceil(right_x); @@ -2339,14 +2339,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele S32 length = end - start; font->render(text, start, - rect.mLeft, rect.mTop, - LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ), - LLFontGL::LEFT, LLFontGL::TOP, - 0, - LLFontGL::NO_SHADOW, - length, rect.getWidth(), - &right_x, - mEditor.getUseEllipses()); + rect.mLeft, rect.mTop, + LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ), + LLFontGL::LEFT, LLFontGL::TOP, + LLFontGL::NORMAL, + LLFontGL::NO_SHADOW, + length, rect.getWidth(), + &right_x, + mEditor.getUseEllipses()); } rect.mLeft = (S32)ceil(right_x); if( selection_end < seg_end ) @@ -2356,14 +2356,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele S32 end = seg_end; S32 length = end - start; font->render(text, start, - rect.mLeft, rect.mTop, - color, - LLFontGL::LEFT, LLFontGL::TOP, - 0, - mStyle->getShadowType(), - length, rect.getWidth(), - &right_x, - mEditor.getUseEllipses()); + rect.mLeft, rect.mTop, + color, + LLFontGL::LEFT, LLFontGL::TOP, + LLFontGL::NORMAL, + mStyle->getShadowType(), + length, rect.getWidth(), + &right_x, + mEditor.getUseEllipses()); } return right_x; } diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index b7add03e0e..d62017cc2f 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -35,13 +35,14 @@ #include "llnotifications.h" #include "llinstantmessage.h" +#include "llviewerchat.h" const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; //-------------------------------------------------------------------------- LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification), - mAvatar(NULL), mUserName(NULL), - mTime(NULL), mMessage(NULL) + mAvatar(NULL), mUserName(NULL), + mTime(NULL), mMessage(NULL) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml"); @@ -52,8 +53,11 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mMessage = getChild("message"); LLStyle::Params style_params; - style_params.font.name(LLFontGL::nameFromFont(style_params.font)); - style_params.font.size(LLFontGL::sizeFromFont(style_params.font)); + LLFontGL* fontp = LLViewerChat::getChatFont(); + std::string font_name = LLFontGL::nameFromFont(fontp); + std::string font_size = LLFontGL::sizeFromFont(fontp); + style_params.font.name(font_name); + style_params.font.size(font_size); style_params.font.style = "UNDERLINE"; //Handle IRC styled /me messages. @@ -63,13 +67,16 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mMessage->clear(); style_params.font.style ="ITALIC"; - mMessage->appendText(p.from + " ", FALSE, style_params); + mMessage->appendText(p.from, FALSE, style_params); style_params.font.style = "ITALIC"; mMessage->appendText(p.message.substr(3), FALSE, style_params); } else + { mMessage->setValue(p.message); + } + mUserName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; -- cgit v1.2.3 From 5c8b2deb82cfe753d6fe25e418f99f05d76e0b73 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 23 Dec 2009 15:15:49 -0500 Subject: For EXT-3622: Take off item, wear a different item --> first item is put on again. Fixed the 'remove all clothing' case. --- indra/newview/llinventorybridge.cpp | 38 +++++++++++++++++++++++++++++++++++++ indra/newview/llinventorybridge.h | 1 + indra/newview/llviewermenu.cpp | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index beecd48419..d70221b22a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4939,6 +4939,44 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, delete on_remove_struct; } +/* static */ +void LLWearableBridge::removeAllClothesFromAvatar() +{ + // Remove COF links. + for (S32 itype = WT_SHAPE; itype < WT_COUNT; ++itype) + { + if (itype == WT_SHAPE || itype == WT_SKIN || itype == WT_HAIR || itype == WT_EYES) + continue; + + // MULTI-WEARABLES: fixed to index 0 + LLViewerInventoryItem *item = dynamic_cast( + gAgentWearables.getWearableInventoryItem((EWearableType)itype, 0)); + if (!item) + continue; + const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID()); + const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id); + if (!wearable) + continue; + + // Find and remove this item from the COF. + LLInventoryModel::item_array_t items = gInventory.collectLinkedItems( + item_id, LLAppearanceManager::instance().getCOF()); + llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF. + for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); + iter != items.end(); + ++iter) + { + const LLViewerInventoryItem *linked_item = (*iter); + const LLUUID &item_id = linked_item->getUUID(); + gInventory.purgeObject(item_id); + } + } + gInventory.notifyObservers(); + + // Remove wearables from gAgentWearables + LLAgentWearables::userRemoveAllClothes(); +} + /* static */ void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index c93fc85a7d..cc1fa45b26 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -574,6 +574,7 @@ public: static void onRemoveFromAvatar( void* userdata ); static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); static void removeItemFromAvatar(LLViewerInventoryItem *item); + static void removeAllClothesFromAvatar(); void removeFromAvatar(); protected: diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 46a21066ba..620c700077 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7423,7 +7423,7 @@ class LLEditTakeOff : public view_listener_t { std::string clothing = userdata.asString(); if (clothing == "all") - LLAgentWearables::userRemoveAllClothes(); + LLWearableBridge::removeAllClothesFromAvatar(); else { EWearableType type = LLWearableDictionary::typeNameToType(clothing); -- cgit v1.2.3 From 6b984521c302067e806e9228cb6abb6c9a58a834 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 23 Dec 2009 12:18:20 -0800 Subject: DEV-44626 pressing 'enter' in world map search field does not initiate the search --- indra/newview/skins/default/xui/en/floater_world_map.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 169a0ea676..8904d4f49c 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -480,7 +480,10 @@ name="location" select_on_focus="true" tool_tip="Type the name of a region" - width="152" /> + width="152"> + +