From 38115eb90b1760025ee299a167f6a9a2311f59ab Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 12 Nov 2009 12:15:32 +0200 Subject: Fixed path to image Generic_Object_Small --HG-- branch : product-engine --- indra/newview/skins/default/textures/textures.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 0e533b1c0e..508ae68975 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -117,7 +117,7 @@ - + -- cgit v1.2.3 From a35fbddb910fa0dd068622c3dc64af1b27ca19b7 Mon Sep 17 00:00:00 2001 From: angela Date: Wed, 18 Nov 2009 20:52:53 +0800 Subject: EXT-2094 --- indra/llcommon/llclickaction.h | 6 ++++-- indra/lscript/lscript_compile/indra.l | 1 + indra/newview/app_settings/keywords.ini | 1 + indra/newview/lltoolpie.cpp | 12 ++++++++++++ indra/newview/skins/default/xui/en/floater_tools.xml | 4 ++++ 5 files changed, 22 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llclickaction.h b/indra/llcommon/llclickaction.h index 8048724575..29c4df8df2 100644 --- a/indra/llcommon/llclickaction.h +++ b/indra/llcommon/llclickaction.h @@ -40,7 +40,9 @@ const U8 CLICK_ACTION_SIT = 1; const U8 CLICK_ACTION_BUY = 2; const U8 CLICK_ACTION_PAY = 3; const U8 CLICK_ACTION_OPEN = 4; -const U8 CLICK_ACTION_PLAY = 5; -const U8 CLICK_ACTION_OPEN_MEDIA = 6; +const U8 CLICK_ACTION_ZOOM = 5; +const U8 CLICK_ACTION_PLAY = 6; +const U8 CLICK_ACTION_OPEN_MEDIA = 7; + #endif diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 8c891b3e8f..e650c71bea 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -611,6 +611,7 @@ extern "C" { int yyerror(const char *fmt, ...); } "CLICK_ACTION_BUY" { count(); yylval.ival = CLICK_ACTION_BUY; return(INTEGER_CONSTANT); } "CLICK_ACTION_PAY" { count(); yylval.ival = CLICK_ACTION_PAY; return(INTEGER_CONSTANT); } "CLICK_ACTION_OPEN" { count(); yylval.ival = CLICK_ACTION_OPEN; return(INTEGER_CONSTANT); } +"CLICK_ACTION_ZOOM" { count(); yylval.ival = CLICK_ACTION_ZOOM; return(INTEGER_CONSTANT); } "CLICK_ACTION_PLAY" { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); } "CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); } diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 5f6fd6e4a7..71ea12bacd 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -508,6 +508,7 @@ CLICK_ACTION_SIT Used with llSetClickAction to set sit as the default act CLICK_ACTION_BUY Used with llSetClickAction to set buy as the default action when object is clicked CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default action when object is clicked CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked +CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9c8fca3552..d0350507ed 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -209,6 +209,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // touch behavior down below... break; case CLICK_ACTION_SIT: + if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // agent not already sitting { handle_object_sit_or_stand(); @@ -253,6 +254,11 @@ BOOL LLToolPie::pickLeftMouseDownCallback() } } return TRUE; + case CLICK_ACTION_ZOOM: + gAgent.setFocusOnAvatar(FALSE, FALSE); + gAgent.setFocusGlobal(mPick); + gAgent.setCameraZoomFraction(0.9); + return TRUE; case CLICK_ACTION_PLAY: handle_click_action_play(); return TRUE; @@ -413,6 +419,9 @@ ECursorType cursor_from_object(LLViewerObject* object) cursor = UI_CURSOR_HAND; } break; + case CLICK_ACTION_ZOOM: + cursor = UI_CURSOR_TOOLZOOMIN; + break; case CLICK_ACTION_PLAY: case CLICK_ACTION_OPEN_MEDIA: cursor = cursor_from_parcel_media(click_action); @@ -551,6 +560,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) case CLICK_ACTION_BUY: case CLICK_ACTION_PAY: case CLICK_ACTION_OPEN: + case CLICK_ACTION_ZOOM: + case CLICK_ACTION_PLAY: + case CLICK_ACTION_OPEN_MEDIA: // Because these actions open UI dialogs, we won't change // the cursor again until the next hover and GL pick over // the world. Keep the cursor an arrow, assuming that diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 944b4cda98..59964ef39f 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -983,6 +983,10 @@ label="Open" name="Open" value="Open" /> + Date: Wed, 18 Nov 2009 17:58:09 -0500 Subject: EXT-1916 : Places: Landmarks are not sorted in the Favorites Bar Accordion --- indra/newview/llfolderviewitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 7323c421da..a1260d1156 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2498,11 +2498,13 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde { static const LLUUID& favorites_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + static const LLUUID& landmarks_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); LLUUID a_uuid = a->getParentFolder()->getListener()->getUUID(); LLUUID b_uuid = b->getParentFolder()->getListener()->getUUID(); - if (a_uuid == favorites_folder_id && b_uuid == favorites_folder_id) + if ((a_uuid == favorites_folder_id && b_uuid == favorites_folder_id) || + (a_uuid == landmarks_folder_id && b_uuid == landmarks_folder_id)) { // *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem // or to LLInvFVBridge -- cgit v1.2.3 From 5b2c91598dffe7d5c9d676dd866f438d3adb9989 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 18 Nov 2009 21:07:49 -0500 Subject: EXT-2636 : No "fetching inventory" or other indication that inventory is loading. --- indra/newview/llfloaterinventory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 92778510e7..db38fc0fb3 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -64,10 +64,7 @@ BOOL LLFloaterInventory::postBuild() void LLFloaterInventory::draw() { - if (LLInventoryModel::isEverythingFetched()) - { - updateTitle(); - } + updateTitle(); LLFloater::draw(); } @@ -85,10 +82,14 @@ void LLFloaterInventory::updateTitle() { setTitle(getString("TitleFetching", string_args)); } - else + else if (LLInventoryModel::isEverythingFetched()) { setTitle(getString("TitleCompleted", string_args)); } + else + { + setTitle(getString("Title")); + } } void LLFloaterInventory::changed(U32 mask) -- cgit v1.2.3 From 7ab6dc37f8bcc348ecbdaddce4a32d068e344670 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 18 Nov 2009 19:21:09 -0800 Subject: EXT-1743 People inspectors should show Age, not Date born, fixed date math Changed date math to correctly account for month lengths and leap years. Extended unit test. Review pending. --- indra/newview/lldateutil.cpp | 71 ++++++++++++++++++++++++++++++--- indra/newview/llinspectavatar.cpp | 3 +- indra/newview/tests/lldateutil_test.cpp | 26 ++++++++++-- 3 files changed, 90 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/lldateutil.cpp b/indra/newview/lldateutil.cpp index 040fad3c4a..1fe1715995 100644 --- a/indra/newview/lldateutil.cpp +++ b/indra/newview/lldateutil.cpp @@ -66,23 +66,82 @@ static S32 age_days_from_date(const std::string& date_string, return age_days; } +static S32 DAYS_PER_MONTH_NOLEAP[] = + { 31, 28, 21, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; +static S32 DAYS_PER_MONTH_LEAP[] = + { 31, 29, 21, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + +static S32 days_from_month(S32 year, S32 month) +{ + if (year % 4 == 0 + && year % 100 != 0) + { + // leap year + return DAYS_PER_MONTH_LEAP[month]; + } + else + { + return DAYS_PER_MONTH_NOLEAP[month]; + } +} + std::string LLDateUtil::ageFromDate(const std::string& date_string, const LLDate& now) { +#define BAD_DATE_MATH 0 +#if BAD_DATE_MATH S32 age_days = age_days_from_date(date_string, now); if (age_days == S32_MIN) return "???"; - - // Noun pluralization depends on language - std::string lang = LLUI::getLanguage(); - - // Try for age in round number of years - LLStringUtil::format_map_t args; S32 age_years = age_days / 365; age_days = age_days % 365; // *NOTE: This is wrong. Not all months have 30 days, but we don't have a library // for relative date arithmetic. :-( JC S32 age_months = age_days / 30; age_days = age_days % 30; +#else + S32 born_month, born_day, born_year; + S32 matched = sscanf(date_string.c_str(), "%d/%d/%d", &born_month, &born_day, &born_year); + if (matched != 3) return "???"; + LLDate born_date; + born_date.fromYMDHMS(born_year, born_month, born_day); + F64 born_date_secs_since_epoch = born_date.secondsSinceEpoch(); + // Correct for the fact that account creation dates are in Pacific time, + // == UTC - 8 + born_date_secs_since_epoch += 8.0 * 60.0 * 60.0; + born_date.secondsSinceEpoch(born_date_secs_since_epoch); + // explode out to month/day/year again + born_date.split(&born_year, &born_month, &born_day); + + S32 now_year, now_month, now_day; + now.split(&now_year, &now_month, &now_day); + + // Do grade-school subtraction, from right-to-left, borrowing from the left + // when things go negative + S32 age_days = (now_day - born_day); + if (age_days < 0) + { + now_month -= 1; + if (now_month == 0) + { + now_year -= 1; + now_month = 12; + } + age_days += days_from_month(now_year, now_month); + } + S32 age_months = (now_month - born_month); + if (age_months < 0) + { + now_year -= 1; + age_months += 12; + } + S32 age_years = (now_year - born_year); +#endif + + // Noun pluralization depends on language + std::string lang = LLUI::getLanguage(); + + // Try for age in round number of years + LLStringUtil::format_map_t args; if (age_months > 0 || age_years > 0) { diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index baddd90d46..866669f326 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -39,6 +39,7 @@ #include "llavataractions.h" #include "llavatarpropertiesprocessor.h" #include "llcallingcard.h" +#include "lldateutil.h" #include "llfloaterreporter.h" #include "llfloaterworldmap.h" #include "llinspect.h" @@ -351,7 +352,7 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data) { LLStringUtil::format_map_t args; args["[BORN_ON]"] = data->born_on; - args["[AGE]"] = data->born_on; + args["[AGE]"] = LLDateUtil::ageFromDate(data->born_on, LLDate::now()); args["[SL_PROFILE]"] = data->about_text; args["[RW_PROFILE"] = data->fl_about_text; args["[ACCTTYPE]"] = LLAvatarPropertiesProcessor::accountType(data); diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp index ed753b6ff7..142a5eb5e6 100644 --- a/indra/newview/tests/lldateutil_test.cpp +++ b/indra/newview/tests/lldateutil_test.cpp @@ -60,6 +60,11 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil:: std::string LLTrans::getCountString(const std::string& language, const std::string& xml_desc, S32 count) { + count_string_t key(xml_desc, count); + if (gCountString.find(key) == gCountString.end()) + { + return std::string("Couldn't find ") + xml_desc; + } return gCountString[ count_string_t(xml_desc, count) ]; } @@ -91,8 +96,11 @@ namespace tut gCountString[ count_string_t("AgeYears", 2) ] = "2 years"; gCountString[ count_string_t("AgeMonths", 1) ] = "1 month"; gCountString[ count_string_t("AgeMonths", 2) ] = "2 months"; + gCountString[ count_string_t("AgeMonths", 11) ]= "11 months"; gCountString[ count_string_t("AgeWeeks", 1) ] = "1 week"; gCountString[ count_string_t("AgeWeeks", 2) ] = "2 weeks"; + gCountString[ count_string_t("AgeWeeks", 3) ] = "3 weeks"; + gCountString[ count_string_t("AgeWeeks", 4) ] = "4 weeks"; gCountString[ count_string_t("AgeDays", 1) ] = "1 day"; gCountString[ count_string_t("AgeDays", 2) ] = "2 days"; } @@ -113,12 +121,18 @@ namespace tut ensure_equals("years", LLDateUtil::ageFromDate("12/31/2007", mNow), "2 years old" ); - ensure_equals("single year", - LLDateUtil::ageFromDate("12/31/2008", mNow), - "1 year old" ); + ensure_equals("years", + LLDateUtil::ageFromDate("1/1/2008", mNow), + "1 year 11 months old" ); + ensure_equals("single year + one month", + LLDateUtil::ageFromDate("11/30/2008", mNow), + "1 year 1 month old" ); ensure_equals("single year + a bit", LLDateUtil::ageFromDate("12/12/2008", mNow), "1 year old" ); + ensure_equals("single year", + LLDateUtil::ageFromDate("12/31/2008", mNow), + "1 year old" ); } template<> template<> @@ -128,6 +142,9 @@ namespace tut ensure_equals("months", LLDateUtil::ageFromDate("10/30/2009", mNow), "2 months old" ); + ensure_equals("months 2", + LLDateUtil::ageFromDate("10/31/2009", mNow), + "2 months old" ); ensure_equals("single month", LLDateUtil::ageFromDate("11/30/2009", mNow), "1 month old" ); @@ -137,6 +154,9 @@ namespace tut void dateutil_object_t::test<3>() { set_test_name("Weeks"); + ensure_equals("4 weeks", + LLDateUtil::ageFromDate("12/1/2009", mNow), + "4 weeks old" ); ensure_equals("weeks", LLDateUtil::ageFromDate("12/17/2009", mNow), "2 weeks old" ); -- cgit v1.2.3 From b6ad65c04edc6e79637bf8ac9daf40b3654d80a6 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 19 Nov 2009 15:02:05 +0800 Subject: EXT-2094 Add click-to-zoom as a one-click settable option for objects --- indra/llcommon/llclickaction.h | 11 ++-- indra/lscript/lscript_compile/indra.l | 2 +- indra/newview/app_settings/keywords.ini | 2 +- indra/newview/llpanelpermissions.cpp | 71 ++++++++++++++++++++-- indra/newview/lltoolpie.cpp | 30 +++++++-- .../newview/skins/default/xui/en/floater_tools.xml | 8 +-- 6 files changed, 101 insertions(+), 23 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llclickaction.h b/indra/llcommon/llclickaction.h index 29c4df8df2..d4ffbf8634 100644 --- a/indra/llcommon/llclickaction.h +++ b/indra/llcommon/llclickaction.h @@ -33,16 +33,15 @@ #ifndef LL_LLCLICKACTION_H #define LL_LLCLICKACTION_H - +// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! const U8 CLICK_ACTION_NONE = 0; const U8 CLICK_ACTION_TOUCH = 0; const U8 CLICK_ACTION_SIT = 1; const U8 CLICK_ACTION_BUY = 2; const U8 CLICK_ACTION_PAY = 3; const U8 CLICK_ACTION_OPEN = 4; -const U8 CLICK_ACTION_ZOOM = 5; -const U8 CLICK_ACTION_PLAY = 6; -const U8 CLICK_ACTION_OPEN_MEDIA = 7; - - +const U8 CLICK_ACTION_PLAY = 5; +const U8 CLICK_ACTION_OPEN_MEDIA = 6; +const U8 CLICK_ACTION_ZOOM = 7; +// DO NOT CHANGE THE SEQUENCE OF THIS LIST!! #endif diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index e650c71bea..8fe9f5ed29 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -611,9 +611,9 @@ extern "C" { int yyerror(const char *fmt, ...); } "CLICK_ACTION_BUY" { count(); yylval.ival = CLICK_ACTION_BUY; return(INTEGER_CONSTANT); } "CLICK_ACTION_PAY" { count(); yylval.ival = CLICK_ACTION_PAY; return(INTEGER_CONSTANT); } "CLICK_ACTION_OPEN" { count(); yylval.ival = CLICK_ACTION_OPEN; return(INTEGER_CONSTANT); } -"CLICK_ACTION_ZOOM" { count(); yylval.ival = CLICK_ACTION_ZOOM; return(INTEGER_CONSTANT); } "CLICK_ACTION_PLAY" { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); } "CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); } +"CLICK_ACTION_ZOOM" { count(); yylval.ival = CLICK_ACTION_ZOOM; return(INTEGER_CONSTANT); } "TEXTURE_BLANK" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "5748decc-f629-461c-9a36-a35a221fe21f"); return(STRING_CONSTANT); } "TEXTURE_DEFAULT" { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "89556747-24cb-43ed-920b-47caed15465f"); return(STRING_CONSTANT); } diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 71ea12bacd..14025c8061 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -508,9 +508,9 @@ CLICK_ACTION_SIT Used with llSetClickAction to set sit as the default act CLICK_ACTION_BUY Used with llSetClickAction to set buy as the default action when object is clicked CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default action when object is clicked CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked -CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked +CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid. TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid. diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 0dc010e2e7..d8e0d91d88 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -66,6 +66,65 @@ #include "roles_constants.h" #include "llgroupactions.h" + +U8 string_value_to_click_action(std::string p_value); +std::string click_action_to_string_value( U8 action); + +U8 string_value_to_click_action(std::string p_value) +{ + if(p_value == "Touch") + { + return CLICK_ACTION_TOUCH; + } + if(p_value == "Sit") + { + return CLICK_ACTION_SIT; + } + if(p_value == "Buy") + { + return CLICK_ACTION_BUY; + } + if(p_value == "Pay") + { + return CLICK_ACTION_PAY; + } + if(p_value == "Open") + { + return CLICK_ACTION_OPEN; + } + if(p_value == "Zoom") + { + return CLICK_ACTION_ZOOM; + } + return CLICK_ACTION_TOUCH; +} + +std::string click_action_to_string_value( U8 action) +{ + switch (action) + { + case CLICK_ACTION_TOUCH: + default: + return "Touch"; + break; + case CLICK_ACTION_SIT: + return "Sit"; + break; + case CLICK_ACTION_BUY: + return "Buy"; + break; + case CLICK_ACTION_PAY: + return "Pay"; + break; + case CLICK_ACTION_OPEN: + return "Open"; + break; + case CLICK_ACTION_ZOOM: + return "Zoom"; + break; + } +} + ///---------------------------------------------------------------------------- /// Class llpanelpermissions ///---------------------------------------------------------------------------- @@ -774,7 +833,8 @@ void LLPanelPermissions::refresh() LLComboBox* ComboClickAction = getChild("clickaction"); if(ComboClickAction) { - ComboClickAction->setCurrentByIndex((S32)click_action); + std::string combo_value = click_action_to_string_value(click_action); + ComboClickAction->setValue(LLSD(combo_value)); } } childSetEnabled("label click action",is_perm_modify && all_volume); @@ -1015,8 +1075,9 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*) { LLComboBox* box = (LLComboBox*)ctrl; if (!box) return; - - U8 click_action = (U8)box->getCurrentIndex(); + std::string value = box->getValue().asString(); + U8 click_action = string_value_to_click_action(value); + if (click_action == CLICK_ACTION_BUY) { LLSaleInfo sale_info; @@ -1028,8 +1089,8 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*) // Set click action back to its old value U8 click_action = 0; LLSelectMgr::getInstance()->selectionGetClickAction(&click_action); - box->setCurrentByIndex((S32)click_action); - + std::string item_value = click_action_to_string_value(click_action); + box->setValue(LLSD(item_value)); return; } } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index d0350507ed..5ed8dc5fb9 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -253,12 +253,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() selectionPropertiesReceived(); } } - return TRUE; - case CLICK_ACTION_ZOOM: - gAgent.setFocusOnAvatar(FALSE, FALSE); - gAgent.setFocusGlobal(mPick); - gAgent.setCameraZoomFraction(0.9); - return TRUE; + return TRUE; case CLICK_ACTION_PLAY: handle_click_action_play(); return TRUE; @@ -266,6 +261,29 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // mClickActionObject = object; handle_click_action_open_media(object); return TRUE; + case CLICK_ACTION_ZOOM: + { + const F32 PADDING_FACTOR = 2.f; + LLViewerObject* object = gObjectList.findObject(mPick.mObjectID); + + if (object) + { + gAgent.setFocusOnAvatar(FALSE, ANIMATE); + + LLBBox bbox = object->getBoundingBoxAgent() ; + F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); + F32 distance = bbox.getExtentLocal().magVec() * PADDING_FACTOR / atan(angle_of_view); + + LLVector3 obj_to_cam = LLViewerCamera::getInstance()->getOrigin() - bbox.getCenterAgent(); + obj_to_cam.normVec(); + + LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); + gAgent.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + object_center_global, + mPick.mObjectID ); + } + } + return TRUE; default: // nothing break; diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 87d31b8f9b..8b6f0f03fe 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -968,19 +968,19 @@ + value="Touch" /> + value="Sit" /> + value="Buy" /> + value="Pay" /> Date: Thu, 19 Nov 2009 11:21:20 +0200 Subject: related to EXT-700 '"Offer" notifications should be accessible via chiclet' made 'FriendshipAccepted' notification show correct avatar icon; avoided empty avatar name on 'OfferFriendship' notifiaction; avoided creating IM session on offer from objects; --HG-- branch : product-engine --- indra/newview/llnotificationofferhandler.cpp | 26 +++++++++++++++------- indra/newview/llviewermessage.cpp | 7 ++++-- .../newview/skins/default/xui/en/notifications.xml | 9 ++++---- 3 files changed, 28 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 94e733913d..dea3a0c169 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -92,16 +92,26 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") { // add message to IM - LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, notification->getPayload()["from_id"]); - if (!LLIMMgr::instance().hasSession(session_id)) + const std::string + name = + notification->getSubstitutions().has("NAME") ? notification->getSubstitutions()["NAME"] + : notification->getSubstitutions()["[NAME]"]; + + // don't create IM session with objects + if (notification->getName() != "ObjectGiveItem" + && notification->getName() != "ObjectGiveItemUnknownUser") { - session_id = LLIMMgr::instance().addSession( - notification->getSubstitutions()["OBJECTFROMNAME"], IM_NOTHING_SPECIAL, - notification->getPayload()["from_id"]); + LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, + from_id); + if (!LLIMMgr::instance().hasSession(session_id)) + { + session_id = LLIMMgr::instance().addSession(name, + IM_NOTHING_SPECIAL, from_id); + } + LLIMMgr::instance().addMessage(session_id, LLUUID(), name, + notification->getMessage()); } - LLIMMgr::instance().addMessage(session_id, LLUUID(), - notification->getSubstitutions()["OBJECTFROMNAME"], - notification->getMessage()); LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 11b2f07f1b..8db6d5917a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1372,7 +1372,8 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) payload["from_id"] = info->mFromID; args["OBJECTFROMNAME"] = info->mFromName; - args["NAME"] = LLSLURL::buildCommand("agent", info->mFromID, "about"); + args["NAME"] = info->mFromName; + args["NAME_SLURL"] = LLSLURL::buildCommand("agent", info->mFromID, "about"); std::string verb = "highlight?name=" + msg; args["ITEM_SLURL"] = LLSLURL::buildCommand("inventory", info->mObjectID, verb.c_str()); @@ -2115,7 +2116,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) send_generic_message("requestonlinenotification", strings); args["NAME"] = name; - LLNotifications::instance().add("FriendshipAccepted", args); + LLSD payload; + payload["from_id"] = from_id; + LLNotifications::instance().add("FriendshipAccepted", args, payload); } break; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 56cb54c975..4897a4c8ab 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4959,7 +4959,7 @@ No valid parcel could be found. icon="notify.tga" name="ObjectGiveItem" type="offer"> -An object named [OBJECTFROMNAME] owned by [NAME] has offered you [OBJECTTYPE]: +An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has offered you [OBJECTTYPE]: [ITEM_SLURL]
+ + + + Date: Fri, 20 Nov 2009 09:47:47 +0800 Subject: Fix EXT-2645 Ensure link colors applied consistently to all text sources --- indra/llui/lltextbase.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index cd795282f9..e210667764 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1505,6 +1505,7 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c LLStyle::Params link_params = style_params; link_params.color = match.getColor(); + link_params.readonly_color = match.getColor(); // apply font name from requested style_params std::string font_name = LLFontGL::nameFromFont(style_params.font()); std::string font_size = LLFontGL::sizeFromFont(style_params.font()); -- cgit v1.2.3 From a8b603f33ef71ab8afae66236579d41a09b2fce1 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Thu, 19 Nov 2009 18:34:37 -0800 Subject: Push the policy that "back", "forward" and "stop" do different things out of LLViewerMedia. Now, LLViewerMedia has explicit skipBack() and skipForward() functions, and the buttons in LLPanelPrimMediaControls now map onto those functions neatly. --- indra/newview/llpanelprimmediacontrols.cpp | 21 ++++-- indra/newview/llpanelprimmediacontrols.h | 2 + indra/newview/llviewermedia.cpp | 79 +++++++++++----------- indra/newview/llviewermedia.h | 2 + indra/newview/llviewerparcelmedia.cpp | 5 +- .../default/xui/en/panel_prim_media_controls.xml | 3 +- 6 files changed, 63 insertions(+), 49 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 80d2a9425c..aca0e1d5c7 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -54,6 +54,7 @@ #include "llpanelprimmediacontrols.h" #include "llpluginclassmedia.h" #include "llprogressbar.h" +#include "llstring.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" #include "llviewermedia.h" @@ -92,6 +93,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mCommitCallbackRegistrar.add("MediaCtrl.Forward", boost::bind(&LLPanelPrimMediaControls::onClickForward, this)); mCommitCallbackRegistrar.add("MediaCtrl.Home", boost::bind(&LLPanelPrimMediaControls::onClickHome, this)); mCommitCallbackRegistrar.add("MediaCtrl.Stop", boost::bind(&LLPanelPrimMediaControls::onClickStop, this)); + mCommitCallbackRegistrar.add("MediaCtrl.MediaStop", boost::bind(&LLPanelPrimMediaControls::onClickMediaStop, this)); mCommitCallbackRegistrar.add("MediaCtrl.Reload", boost::bind(&LLPanelPrimMediaControls::onClickReload, this)); mCommitCallbackRegistrar.add("MediaCtrl.Play", boost::bind(&LLPanelPrimMediaControls::onClickPlay, this)); mCommitCallbackRegistrar.add("MediaCtrl.Pause", boost::bind(&LLPanelPrimMediaControls::onClickPause, this)); @@ -149,6 +151,7 @@ BOOL LLPanelPrimMediaControls::postBuild() mLeftBookend = getChild("left_bookend"); mRightBookend = getChild("right_bookend"); mBackgroundImage = LLUI::getUIImage(getString("control_background_image_name")); + LLStringUtil::convertToF32(getString("skip_step"), mSkipStep); // These are currently removed...but getChild creates a "dummy" widget. // This class handles them missing. @@ -873,6 +876,18 @@ void LLPanelPrimMediaControls::onClickStop() LLViewerMediaImpl* impl = getTargetMediaImpl(); + if(impl) + { + impl->navigateStop(); + } +} + +void LLPanelPrimMediaControls::onClickMediaStop() +{ + focusOnTarget(); + + LLViewerMediaImpl* impl = getTargetMediaImpl(); + if(impl) { impl->stop(); @@ -887,8 +902,7 @@ void LLPanelPrimMediaControls::onClickSkipBack() if (impl) { - // XXX Oddly, the impl has the policy that "skipping" is really navigating - impl->navigateBack(); + impl->skipBack(mSkipStep); } } @@ -900,8 +914,7 @@ void LLPanelPrimMediaControls::onClickSkipForward() if (impl) { - // XXX Oddly, the impl has the policy that "skipping" is really navigating - impl->navigateForward(); + impl->skipForward(mSkipStep); } } diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index aeee3685ed..54fc4e343f 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -97,6 +97,7 @@ private: void onClickZoom(); void onClickSkipBack(); void onClickSkipForward(); + void onClickMediaStop(); void onCommitURL(); void updateZoom(); @@ -158,6 +159,7 @@ private: LLUICtrl *mLeftBookend; LLUICtrl *mRightBookend; LLUIImage* mBackgroundImage; + F32 mSkipStep; LLUICtrl *mMediaPanelScroll; LLButton *mScrollUpCtrl; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 3a7c54479b..e55523c11e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -278,7 +278,7 @@ viewer_media_t LLViewerMedia::newMediaImpl( } else { - media_impl->stop(); + media_impl->unload(); media_impl->mTextureId = texture_id; media_impl->mMediaWidth = media_width; media_impl->mMediaHeight = media_height; @@ -1092,15 +1092,7 @@ void LLViewerMediaImpl::stop() { if(mMediaSource) { - if(mMediaSource->pluginSupportsMediaBrowser()) - { - mMediaSource->browse_stop(); - } - else - { - mMediaSource->stop(); - } - + mMediaSource->stop(); // destroyMediaSource(); } } @@ -1132,6 +1124,40 @@ void LLViewerMediaImpl::seek(F32 time) } } +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::skipBack(F32 step_scale) +{ + if(mMediaSource) + { + if(mMediaSource->pluginSupportsMediaTime()) + { + F64 back_step = mMediaSource->getCurrentTime() - (mMediaSource->getDuration()*step_scale); + if(back_step < 0.0) + { + back_step = 0.0; + } + mMediaSource->seek(back_step); + } + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::skipForward(F32 step_scale) +{ + if(mMediaSource) + { + if(mMediaSource->pluginSupportsMediaTime()) + { + F64 forward_step = mMediaSource->getCurrentTime() + (mMediaSource->getDuration()*step_scale); + if(forward_step > mMediaSource->getDuration()) + { + forward_step = mMediaSource->getDuration(); + } + mMediaSource->seek(forward_step); + } + } +} + ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::setVolume(F32 volume) { @@ -1339,21 +1365,7 @@ void LLViewerMediaImpl::navigateBack() { if (mMediaSource) { - if(mMediaSource->pluginSupportsMediaTime()) - { - F64 step_scale = 0.02; // temp , can be changed - F64 back_step = mMediaSource->getCurrentTime() - (mMediaSource->getDuration()*step_scale); - if(back_step < 0.0) - { - back_step = 0.0; - } - mMediaSource->seek(back_step); - //mMediaSource->start(-2.0); - } - else - { - mMediaSource->browse_back(); - } + mMediaSource->browse_back(); } } @@ -1362,21 +1374,7 @@ void LLViewerMediaImpl::navigateForward() { if (mMediaSource) { - if(mMediaSource->pluginSupportsMediaTime()) - { - F64 step_scale = 0.02; // temp , can be changed - F64 forward_step = mMediaSource->getCurrentTime() + (mMediaSource->getDuration()*step_scale); - if(forward_step > mMediaSource->getDuration()) - { - forward_step = mMediaSource->getDuration(); - } - mMediaSource->seek(forward_step); - //mMediaSource->start(2.0); - } - else - { - mMediaSource->browse_forward(); - } + mMediaSource->browse_forward(); } } @@ -1525,7 +1523,6 @@ void LLViewerMediaImpl::navigateStop() { mMediaSource->browse_stop(); } - } ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index f4afce6c4c..ac12112ed4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -149,6 +149,8 @@ public: void pause(); void start(); void seek(F32 time); + void skipBack(F32 step_scale); + void skipForward(F32 step_scale); void setVolume(F32 volume); void updateVolume(); F32 getVolume(); diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 7559fd8e72..cb2099b3b0 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -218,7 +218,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel) LL_DEBUGS("Media") << "new media impl with mime type " << mime_type << ", url " << media_url << LL_ENDL; // Delete the old one first so they don't fight over the texture. - sMediaImpl->stop(); + sMediaImpl->unload(); sMediaImpl = LLViewerMedia::newMediaImpl( placeholder_texture_id, @@ -261,8 +261,7 @@ void LLViewerParcelMedia::stop() // We need to remove the media HUD if it is up. LLViewerMediaFocus::getInstance()->clearFocus(); - // This will kill the media instance. - sMediaImpl->stop(); + // This will unload & kill the media instance. sMediaImpl = NULL; } diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 00e3116217..88049fe7d1 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -8,6 +8,7 @@ mouse_opaque="false" width="800"> Inspector_Background + 0.2 + function="MediaCtrl.MediaStop" /> Date: Thu, 19 Nov 2009 18:39:11 -0800 Subject: Group profile - widen lists and optimise for sidepanel EXT-2676 --- .../skins/default/xui/en/panel_group_general.xml | 22 +- .../default/xui/en/panel_group_info_sidetray.xml | 76 +++--- .../default/xui/en/panel_group_land_money.xml | 136 ++++++----- .../skins/default/xui/en/panel_group_notices.xml | 54 ++--- .../skins/default/xui/en/panel_group_notify.xml | 18 +- .../skins/default/xui/en/panel_group_roles.xml | 259 +++++++++------------ indra/newview/skins/default/xui/en/strings.xml | 245 ++++++++++--------- 7 files changed, 377 insertions(+), 433 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 58a78a0ab8..4c30db4034 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -1,7 +1,7 @@ + width="310"> @@ -75,7 +75,7 @@ Hover your mouse over the options for more help. name="active_title" tool_tip="Sets the title that appears in your avatar's name tag when this group is active." top_pad="2" - width="305" /> + width="300" /> + width="300"> + width="100" /> + expanded="false" + layout="topleft" + name="group_general_tab" + title="General"> + top="0" /> - + expanded="true" + layout="topleft" + name="group_roles_tab" + title="Roles"> + + top="0" /> + top="0" /> +