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 @@