diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 12009e570..e5232abe4 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -36,7 +36,7 @@ if (WINDOWS) # Don't build DLLs. set(BUILD_SHARED_LIBS OFF) - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd" + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP" CACHE STRING "C++ compiler debug options" FORCE) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP" diff --git a/indra/llcharacter/llbvhconsts.h b/indra/llcharacter/llbvhconsts.h index d5876aa07..b77732de1 100644 --- a/indra/llcharacter/llbvhconsts.h +++ b/indra/llcharacter/llbvhconsts.h @@ -33,7 +33,7 @@ #ifndef LL_LLBVHCONSTS_H #define LL_LLBVHCONSTS_H -const F32 MAX_ANIM_DURATION = 30.f; +const F32 MAX_ANIM_DURATION = 60.f; typedef enum e_constraint_type { diff --git a/indra/llcommon/llversionviewer.h.in b/indra/llcommon/llversionviewer.h.in index 40933fcd4..030623505 100644 --- a/indra/llcommon/llversionviewer.h.in +++ b/indra/llcommon/llversionviewer.h.in @@ -35,7 +35,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 7; -const S32 LL_VERSION_PATCH = 2; +const S32 LL_VERSION_PATCH = 3; const S32 LL_VERSION_BUILD = ${vBUILD}; const char * const LL_CHANNEL = "${VIEWER_CHANNEL}"; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d090b8429..7f36990e7 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3055,15 +3055,29 @@ S32 sculpt_sides(F32 detail) // determine the number of vertices in both s and t direction for this sculpt -void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32& s, S32& t) +bool sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32& s, S32& t) { + //Singu Note: minimum number of vertices depend on stitching type. + S32 min_s = 1; + S32 min_t = 1; + + if ((type == LL_SCULPT_TYPE_SPHERE) || + (type == LL_SCULPT_TYPE_TORUS) || + (type == LL_SCULPT_TYPE_CYLINDER)) + min_s = 4; + + if (type == LL_SCULPT_TYPE_TORUS) + min_t = 4; + // this code has the following properties: // 1) the aspect ratio of the mesh is as close as possible to the ratio of the map // while still using all available verts // 2) the mesh cannot have more verts than is allowed by LOD // 3) the mesh cannot have more verts than is allowed by the map - - S32 max_vertices_lod = (S32)pow((double)sculpt_sides(detail), 2.0); + + //Singu Note: Replaced float math mangling to get an integer square with just one multiplication. + S32 const sculptsides = sculpt_sides(detail); + S32 max_vertices_lod = sculptsides * sculptsides; S32 max_vertices_map = width * height / 4; S32 vertices; @@ -3082,11 +3096,22 @@ void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32 s = (S32)(F32) sqrt(((F32)vertices / ratio)); - s = llmax(s, 4); // no degenerate sizes, please + s = llmax(s, min_s); // no degenerate sizes, please t = vertices / s; - t = llmax(t, 4); // no degenerate sizes, please + t = llmax(t, min_t); // no degenerate sizes, please s = vertices / t; + + // Singu Note: return false if we failed to get enough vertices for this stitching + // type (due to not enough data, ie while the sculpt is still loading). + bool enough_data = s >= min_s; + if (!enough_data) + { + // Uses standard lod stepping for the sphere that will be shown. + s = t = sculptsides; + } + + return enough_data; } // sculpt replaces generate() for sculpted surfaces @@ -3113,7 +3138,14 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, sculpt_detail = 4.0; } - sculpt_calc_mesh_resolution(sculpt_width, sculpt_height, sculpt_type, sculpt_detail, requested_sizeS, requested_sizeT); + //Singu Note: this function returns false when sculpt_width and sculpt_height are too small. + // In that case requested_sizeS and requested_sizeT are set to the same values as should have happened + // when either of sculpt_width or sculpt_height had been zero. + if (!sculpt_calc_mesh_resolution(sculpt_width, sculpt_height, sculpt_type, sculpt_detail, requested_sizeS, requested_sizeT)) + { + sculpt_level = -1; + data_is_empty = TRUE; + } mPathp->generate(mParams.getPathParams(), sculpt_detail, 0, TRUE, requested_sizeS); mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(), sculpt_detail, 0, TRUE, requested_sizeT); diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 5c715d3ff..b193c22b2 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -316,7 +316,8 @@ void LLRadioGroup::setValue( const LLSD& value ) } else { - llwarns << "LLRadioGroup::setValue: value not found: " << value_name << llendl; + llwarns << "LLRadioGroup::setValue: radio_item with name=\"" << value_name << "\" not found, radio_group values are set by radio_item name not value. Falling back on LLUICtrl::setValue." << llendl; + LLUICtrl::setValue(value); } } } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index f676eb7fe..38c9b67d7 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -752,7 +752,12 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect, addChild(mBorder); } - + LLTextBox* textBox = new LLTextBox("comment_text",mItemListRect,std::string()); + textBox->setBorderVisible(false); + textBox->setFollowsAll(); + textBox->setFontShadow(LLFontGL::NO_SHADOW); + textBox->setColor(LLUI::sColorsGroup->getColor("DefaultListText")); + addChild(textBox); } S32 LLScrollListCtrl::getSearchColumn() @@ -1688,7 +1693,7 @@ void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change) void LLScrollListCtrl::setCommentText(const std::string& comment_text) { - getChild("comment_text")->setValue(comment_text); + getChild("comment_text")->setWrappedText(comment_text); } LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos) @@ -2045,6 +2050,7 @@ void LLScrollListCtrl::draw() updateColumns(); + getChildView("comment_text")->setVisible(mItemList.empty()); drawItems(); @@ -3218,16 +3224,20 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { - if (child->hasName("row")) + if (child->hasName("row") || child->hasName("rows")) { LLUUID id; - child->getAttributeUUID("id", id); - LLSD row; - - row["id"] = id; + std::string value; + child->getAttributeString("value",value); + bool id_found = child->getAttributeUUID("id", id); + if(id_found) + row["id"] = id; + else + row["id"] = value; S32 column_idx = 0; + bool explicit_column = false; LLXMLNodePtr row_child; for (row_child = child->getFirstChild(); row_child.notNull(); row_child = row_child->getNextSibling()) { @@ -3249,28 +3259,24 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac row["columns"][column_idx]["font"] = font; row["columns"][column_idx]["font-style"] = font_style; column_idx++; + explicit_column = true; } } - scroll_list->addElement(row); + if(explicit_column) + scroll_list->addElement(row); + else + { + LLSD entry_id; + if(id_found) + entry_id = id; + scroll_list->addSimpleElement(value,ADD_BOTTOM,entry_id); + } } } std::string contents = node->getTextContents(); - if (!contents.empty()) - { - typedef boost::tokenizer > tokenizer; - boost::char_separator sep("\t\n"); - tokenizer tokens(contents, sep); - tokenizer::iterator token_iter = tokens.begin(); + scroll_list->setCommentText(contents); - while(token_iter != tokens.end()) - { - const std::string& line = *token_iter; - scroll_list->addSimpleElement(line); - ++token_iter; - } - } - return scroll_list; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ca7cc1672..524f071d7 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -781,7 +781,29 @@ Found in Advanced->Rendering->Info Displays Boolean Value 0 - ConciseIMButtons + + UseConciseGroupChatButtons + + Comment + Whether or not group chats use buttons concisely on the same line as the group name, changes apply to new group chats only. + Persist + 1 + Type + Boolean + Value + 0 + + UseConciseConferenceButtons + + Comment + Whether or not conferences use buttons concisely on the same line as the name of the conference, changes apply to new conferences only. + Persist + 1 + Type + Boolean + Value + 0 + ShowLocalChatFloaterBar Comment @@ -6553,6 +6575,17 @@ This should be as low as possible, but too low may break functionality Value 52 + RadarColumnNameWidth + + Comment + Width for radar's name column + Persist + 1 + Type + S32 + Value + 80 + RadarColumnMarkHidden Comment @@ -6732,7 +6765,18 @@ This should be as low as possible, but too low may break functionality RadarChatKeys Comment - Enable private chat alerts for avatars entering the region + Enable alerting scripts about avatars detected by the radar + Persist + 1 + Type + Boolean + Value + 0 + + RadarChatKeysStopAsking + + Comment + Do not ask if RadarChatKeys should be enabled when a script requests for the radar's keys. Persist 1 Type diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index 467d0b40b..dd8531965 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -378,6 +378,8 @@ void LLPrefsAscentChat::refreshValues() mShowLocalChatFloaterBar = gSavedSettings.getBOOL("ShowLocalChatFloaterBar"); mHorizButt = gSavedSettings.getBOOL("ContactsUseHorizontalButtons"); mOneLineIMButt = gSavedSettings.getBOOL("UseConciseIMButtons"); + mOneLineGroupButt = gSavedSettings.getBOOL("UseConciseGroupChatButtons"); + mOneLineConfButt = gSavedSettings.getBOOL("UseConciseConferenceButtons"); mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut"); //Spam -------------------------------------------------------------------------------- @@ -604,6 +606,8 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setBOOL("ShowLocalChatFloaterBar", mShowLocalChatFloaterBar); gSavedSettings.setBOOL("ContactsUseHorizontalButtons", mHorizButt); gSavedSettings.setBOOL("UseConciseIMButtons", mOneLineIMButt); + gSavedSettings.setBOOL("UseConciseGroupChatButtons", mOneLineGroupButt); + gSavedSettings.setBOOL("UseConciseConferenceButtons", mOneLineConfButt); gSavedSettings.setBOOL("CommunicateSpecificShortcut", mOnlyComm); //Spam -------------------------------------------------------------------------------- diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index d66297848..63cedf611 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -92,6 +92,8 @@ protected: bool mShowLocalChatFloaterBar; bool mHorizButt; bool mOneLineIMButt; + bool mOneLineGroupButt; + bool mOneLineConfButt; bool mOnlyComm; //Spam -------------------------------------------------------------------------------- diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 7dcd34a59..6d19d693c 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -461,7 +461,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type) return true; } -//case insensative search for avatar in draw distance +//case insensitive search for avatar in draw distance //TODO: make this use the avatar list floaters list so we have EVERYONE // even if they are out of draw distance. LLUUID cmdline_partial_name2key(std::string partial_name) @@ -471,7 +471,7 @@ LLUUID cmdline_partial_name2key(std::string partial_name) LLStringUtil::toLower(partial_name); LLWorld::getInstance()->getAvatars(&avatars); typedef std::vector::const_iterator av_iter; - bool has_avatarlist = (LLFloaterAvatarList::getInstance() ? true : false); + bool has_avatarlist = LLFloaterAvatarList::instanceExists(); if(has_avatarlist) LLFloaterAvatarList::getInstance()->updateAvatarList(); for(av_iter i = avatars.begin(); i != avatars.end(); ++i) @@ -511,7 +511,7 @@ void cmdline_tp2name(std::string target) cmdline_printchat("Avatar not found."); return; } - LLFloaterAvatarList* avlist = LLFloaterAvatarList::getInstance(); + LLFloaterAvatarList* avlist = LLFloaterAvatarList::instanceExists() ? LLFloaterAvatarList::getInstance() : NULL; LLVOAvatar* avatarp = gObjectList.findAvatar(avkey); if(avatarp) { diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 26d3aa0a9..8ea55dab0 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -515,6 +515,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, delete data; } +#if 0 //Client side compiling disabled. // static void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { @@ -551,7 +552,6 @@ void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* } // compile the file given and save it out. -#if 0 //Client side compiling disabled. void LLFloaterCompileQueue::compile(const std::string& filename, const LLUUID& item_id) { diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index ee49ac574..9114ce484 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -136,10 +136,6 @@ public: // will be responsible for it's own destruction. static LLFloaterCompileQueue* create(BOOL mono); - static void onSaveBytecodeComplete(const LLUUID& asset_id, - void* user_data, - S32 status); - // remove any object in mScriptScripts with the matching uuid. void removeItemByItemID(const LLUUID& item_id); @@ -158,6 +154,7 @@ protected: LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); +#if 0 //Client side compiling disabled. static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status); static void onSaveBytecodeComplete(const LLUUID& asset_id, @@ -165,7 +162,6 @@ protected: S32 status, LLExtStat ext_status); // compile the file given and save it out. -#if 0 //Client side compiling disabled. void compile(const std::string& filename, const LLUUID& asset_id); #endif diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 0c6e71773..92a80a517 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -84,6 +84,8 @@ typedef enum e_radar_alert_type ALERT_TYPE_AGE = 16, } ERadarAlertType; +namespace +{ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool entering) { if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) return; //RLVa:LF Don't announce people are around when blind, that cheats the system. @@ -94,7 +96,6 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool static LLCachedControl radar_alert_shout_range(gSavedSettings, "RadarAlertShoutRange"); static LLCachedControl radar_alert_chat_range(gSavedSettings, "RadarAlertChatRange"); static LLCachedControl radar_alert_age(gSavedSettings, "RadarAlertAge"); - static LLCachedControl radar_chat_keys(gSavedSettings, "RadarChatKeys"); LLFloaterAvatarList* self = LLFloaterAvatarList::getInstance(); LLStringUtil::format_map_t args; @@ -153,6 +154,21 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool } } + void send_keys_message(const int transact_num, const int num_ids, const std::string ids) + { + gMessageSystem->newMessage("ScriptDialogReply"); + gMessageSystem->nextBlock("AgentData"); + gMessageSystem->addUUID("AgentID", gAgent.getID()); + gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); + gMessageSystem->nextBlock("Data"); + gMessageSystem->addUUID("ObjectID", gAgent.getID()); + gMessageSystem->addS32("ChatChannel", -777777777); + gMessageSystem->addS32("ButtonIndex", 1); + gMessageSystem->addString("ButtonLabel", llformat("%d,%d", transact_num, num_ids) + ids); + gAgent.sendReliableMessage(); + } +} //namespace + LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string &name, const LLVector3d &position) : mID(id), mName(name), mPosition(position), mDrawPosition(), mMarked(false), mFocused(false), mUpdateTimer(), mFrame(gFrameCount), mInSimFrame(U32_MAX), mInDrawFrame(U32_MAX), @@ -427,7 +443,7 @@ BOOL LLFloaterAvatarList::postBuild() return TRUE; } -void col_helper(const bool hide, const std::string width_ctrl_name, LLScrollListColumn* col) +void col_helper(const bool hide, LLCachedControl &setting, LLScrollListColumn* col) { // Brief Explanation: // Check if we want the column hidden, and if it's still showing. If so, hide it, but save its width. @@ -437,44 +453,55 @@ void col_helper(const bool hide, const std::string width_ctrl_name, LLScrollList if (hide && width) { - gSavedSettings.setS32(width_ctrl_name, width); + setting = width; col->setWidth(0); } else if(!hide && !width) { - llinfos << "We got into the setter!!" << llendl; - col->setWidth(gSavedSettings.getS32(width_ctrl_name)); + col->setWidth(setting); } } +//Macro to reduce redundant lines. Preprocessor concatenation and stringizing avoids bloat that +//wrapping in a class would create. +#define BIND_COLUMN_TO_SETTINGS(col, name)\ + static const LLCachedControl hide_##name(gSavedSettings, "RadarColumn"#name"Hidden");\ + static LLCachedControl width_##name(gSavedSettings, "RadarColumn"#name"Width");\ + col_helper(hide_##name, width_##name, mAvatarList->getColumn(col)); + void LLFloaterAvatarList::assessColumns() { - static LLCachedControl hide_mark(gSavedSettings, "RadarColumnMarkHidden"); - col_helper(hide_mark, "RadarColumnMarkWidth", mAvatarList->getColumn(LIST_MARK)); + BIND_COLUMN_TO_SETTINGS(LIST_MARK,Mark); + BIND_COLUMN_TO_SETTINGS(LIST_POSITION,Position); + BIND_COLUMN_TO_SETTINGS(LIST_ALTITUDE,Altitude); + BIND_COLUMN_TO_SETTINGS(LIST_ACTIVITY,Activity); + BIND_COLUMN_TO_SETTINGS(LIST_AGE,Age); + BIND_COLUMN_TO_SETTINGS(LIST_TIME,Time); - static LLCachedControl hide_pos(gSavedSettings, "RadarColumnPositionHidden"); - col_helper(hide_pos, "RadarColumnPositionWidth", mAvatarList->getColumn(LIST_POSITION)); + static const LLCachedControl hide_client(gSavedSettings, "RadarColumnClientHidden"); + static LLCachedControl width_name(gSavedSettings, "RadarColumnNameWidth"); + bool client_hidden = hide_client || gHippoGridManager->getConnectedGrid()->isSecondLife(); + LLScrollListColumn* name_col = mAvatarList->getColumn(LIST_AVATAR_NAME); + LLScrollListColumn* client_col = mAvatarList->getColumn(LIST_CLIENT); - static LLCachedControl hide_alt(gSavedSettings, "RadarColumnAltitudeHidden"); - col_helper(hide_alt, "RadarColumnAltitudeWidth", mAvatarList->getColumn(LIST_ALTITUDE)); + if (client_hidden != !!name_col->mDynamicWidth) + { + //Don't save if its being hidden because of detected grid. Not that it really matters, as this setting(along with the other RadarColumn*Width settings) + //isn't handled in a way that allows it to carry across sessions, but I assume that may want to be fixed in the future.. + if(client_hidden && !gHippoGridManager->getConnectedGrid()->isSecondLife() && name_col->getWidth() > 0) + width_name = name_col->getWidth(); - static LLCachedControl hide_act(gSavedSettings, "RadarColumnActivityHidden"); - col_helper(hide_act, "RadarColumnActivityWidth", mAvatarList->getColumn(LIST_ACTIVITY)); + //MUST call setWidth(0) first to clear out mTotalStaticColumnWidth accumulation in parent before changing the mDynamicWidth value + client_col->setWidth(0); + name_col->setWidth(0); - static LLCachedControl hide_age(gSavedSettings, "RadarColumnAgeHidden"); - col_helper(hide_age, "RadarColumnAgeWidth", mAvatarList->getColumn(LIST_AGE)); + client_col->mDynamicWidth = !client_hidden; + name_col->mDynamicWidth = client_hidden; - static LLCachedControl hide_time(gSavedSettings, "RadarColumnTimeHidden"); - col_helper(hide_time, "RadarColumnTimeWidth", mAvatarList->getColumn(LIST_TIME)); - - static LLCachedControl hide_client(gSavedSettings, "RadarColumnClientHidden"); - if (gHippoGridManager->getConnectedGrid()->isSecondLife() || hide_client){ - mAvatarList->getColumn(LIST_AVATAR_NAME)->setWidth(0); - mAvatarList->getColumn(LIST_CLIENT)->setWidth(0); - mAvatarList->getColumn(LIST_CLIENT)->mDynamicWidth = FALSE; - mAvatarList->getColumn(LIST_CLIENT)->mRelWidth = 0; - mAvatarList->getColumn(LIST_AVATAR_NAME)->mDynamicWidth = TRUE; - mAvatarList->getColumn(LIST_AVATAR_NAME)->mRelWidth = -1; + if(!client_hidden) + { + name_col->setWidth(width_name); + } } else if (!hide_client) { @@ -567,7 +594,7 @@ void LLFloaterAvatarList::updateAvatarList() size_t i; size_t count = avatar_ids.size(); - bool announce = gSavedSettings.getBOOL("RadarChatKeys"); + static LLCachedControl announce(gSavedSettings, "RadarChatKeys"); std::queue announce_keys; for (i = 0; i < count; ++i) @@ -659,8 +686,9 @@ void LLFloaterAvatarList::updateAvatarList() } } //let us send the keys in a more timely fashion - if(announce && !announce_keys.empty()) + if (announce && !announce_keys.empty()) { + // NOTE: This fragment is repeated in sendKey std::ostringstream ids; int transact_num = (int)gFrameCount; int num_ids = 0; @@ -672,37 +700,17 @@ void LLFloaterAvatarList::updateAvatarList() ids << "," << id.asString(); ++num_ids; - if(ids.tellp() > 200) + if (ids.tellp() > 200) { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); + send_keys_message(transact_num, num_ids, ids.str()); num_ids = 0; ids.seekp(0); ids.str(""); } } - if(num_ids > 0) - { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); - } + if (num_ids > 0) + send_keys_message(transact_num, num_ids, ids.str()); } } @@ -1396,19 +1404,17 @@ void LLFloaterAvatarList::onClickGetKey() void LLFloaterAvatarList::sendKeys() { + // This would break for send_keys_btn callback, check this beforehand, if it matters. + //static LLCachedControl radar_chat_keys(gSavedSettings, "RadarChatKeys"); + //if (radar_chat_keys) return; + LLViewerRegion* regionp = gAgent.getRegion(); - if(!regionp)return;//ALWAYS VALIDATE DATA - std::ostringstream ids; + if (!regionp) return;//ALWAYS VALIDATE DATA + static int last_transact_num = 0; int transact_num = (int)gFrameCount; - int num_ids = 0; - if(!gSavedSettings.getBOOL("RadarChatKeys")) - { - return; - } - - if(transact_num > last_transact_num) + if (transact_num > last_transact_num) { last_transact_num = transact_num; } @@ -1419,7 +1425,9 @@ void LLFloaterAvatarList::sendKeys() return; } - if (!regionp) return; // caused crash if logged out/connection lost + std::ostringstream ids; + int num_ids = 0; + for (int i = 0; i < regionp->mMapAvatarIDs.count(); i++) { const LLUUID &id = regionp->mMapAvatarIDs.get(i); @@ -1428,67 +1436,54 @@ void LLFloaterAvatarList::sendKeys() ++num_ids; - if(ids.tellp() > 200) + if (ids.tellp() > 200) { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); + send_keys_message(transact_num, num_ids, ids.str()); num_ids = 0; ids.seekp(0); ids.str(""); } } - if(num_ids > 0) - { - gMessageSystem->newMessage("ScriptDialogReply"); - gMessageSystem->nextBlock("AgentData"); - gMessageSystem->addUUID("AgentID", gAgent.getID()); - gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); - gMessageSystem->nextBlock("Data"); - gMessageSystem->addUUID("ObjectID", gAgent.getID()); - gMessageSystem->addS32("ChatChannel", -777777777); - gMessageSystem->addS32("ButtonIndex", 1); - gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str()); - gAgent.sendReliableMessage(); - } + if (num_ids > 0) + send_keys_message(transact_num, num_ids, ids.str()); } //static void LLFloaterAvatarList::sound_trigger_hook(LLMessageSystem* msg,void **) { + if (!LLFloaterAvatarList::instanceExists()) return; // Don't bother if we're closed. + LLUUID sound_id,owner_id; msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_SoundID, sound_id); msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_OwnerID, owner_id); - if(owner_id == gAgent.getID() && sound_id == LLUUID("76c78607-93f9-f55a-5238-e19b1a181389")) + if (owner_id == gAgent.getID() && sound_id == LLUUID("76c78607-93f9-f55a-5238-e19b1a181389")) { - //let's ask if they want to turn it on. - if(gSavedSettings.getBOOL("RadarChatKeys")) - { + static LLCachedControl on("RadarChatKeys"); + static LLCachedControl do_not_ask("RadarChatKeysStopAsking"); + if (on) LLFloaterAvatarList::getInstance()->sendKeys(); - }else - { - LLSD args; - args["MESSAGE"] = "An object owned by you has request the keys from your radar.\nWould you like to enable announcing keys to objects in the sim?"; - LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), onConfirmRadarChatKeys); - } + else if (!do_not_ask) // Let's ask if they want to turn it on, but not pester them. + LLNotificationsUtil::add("RadarChatKeysRequest", LLSD(), LLSD(), onConfirmRadarChatKeys); } } // static bool LLFloaterAvatarList::onConfirmRadarChatKeys(const LLSD& notification, const LLSD& response ) { S32 option = LLNotification::getSelectedOption(notification, response); - if(option == 0) // yes + if (option == 1) // no { - gSavedSettings.setBOOL("RadarChatKeys",TRUE); + return false; + } + else if (option == 0) // yes + { + gSavedSettings.setBOOL("RadarChatKeys", true); LLFloaterAvatarList::getInstance()->sendKeys(); } + else if (option == 2) // No, and stop asking!! + { + gSavedSettings.setBOOL("RadarChatKeysStopAsking", true); + } + return false; } diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 926caee95..78aefe250 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -180,7 +180,7 @@ void LLFloaterBulkPermission::onCommitCopy(LLUICtrl* ctrl, void* data) BOOL LLFloaterBulkPermission::start() { // note: number of top-level objects to modify is mObjectIDs.count(). - getChild("queue output")->setCommentText(getString("start_text")); + getChild("queue output")->addSimpleElement(getString("start_text")); return nextObject(); } @@ -203,7 +203,7 @@ BOOL LLFloaterBulkPermission::nextObject() if(isDone() && !mDone) { - getChild("queue output")->setCommentText(getString("done_text")); + getChild("queue output")->addSimpleElement(getString("done_text")); mDone = TRUE; } return successful_start; @@ -349,7 +349,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInv status_text.setArg("[STATUS]", ""); } - list->setCommentText(status_text.getString()); + list->addSimpleElement(status_text.getString()); //TODO if we are an object inside an object we should check a recuse flag and if set //open the inventory of the object and recurse - Michelle2 Zenovka diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index a30dc7099..735b033b1 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -345,6 +345,7 @@ public: LLToolset* mLastToolset; boost::signals2::connection mQualityMouseUpConnection; + LLFocusableElement* mPrevDefaultKeyboardFocus; }; //---------------------------------------------------------------------------- @@ -1688,8 +1689,8 @@ void LLFloaterSnapshot::Impl::freezeTime(bool on) LLSnapshotLivePreview* previewp = getPreviewView(); if (on) { - // stop all mouse events at fullscreen preview layer - sInstance->getParent()->setMouseOpaque(TRUE); + // Stop all mouse events at fullscreen preview layer. + gSnapshotFloaterView->setMouseOpaque(TRUE); // can see and interact with fullscreen preview now if (previewp) @@ -1713,10 +1714,19 @@ void LLFloaterSnapshot::Impl::freezeTime(bool on) sInstance->impl.mLastToolset = LLToolMgr::getInstance()->getCurrentToolset(); LLToolMgr::getInstance()->setCurrentToolset(gCameraToolset); } + + // Make sure the floater keeps focus so that pressing ESC stops Freeze Time mode. + sInstance->impl.mPrevDefaultKeyboardFocus = gFocusMgr.getDefaultKeyboardFocus(); + gFocusMgr.setDefaultKeyboardFocus(sInstance); } - else // turning off freeze frame mode + else if (gSavedSettings.getBOOL("FreezeTime")) // turning off freeze frame mode { - sInstance->getParent()->setMouseOpaque(FALSE); + // Restore default keyboard focus. + gFocusMgr.setDefaultKeyboardFocus(sInstance->impl.mPrevDefaultKeyboardFocus); + sInstance->impl.mPrevDefaultKeyboardFocus = NULL; + + gSnapshotFloaterView->setMouseOpaque(FALSE); + if (previewp) { previewp->setVisible(FALSE); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 684825412..1a2860998 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1187,40 +1187,42 @@ void LLFloaterIMPanel::init(const std::string& session_label) mProfileButtonEnabled = FALSE; // [/Ansariel: Display name support] - static LLCachedControl concisebuttons("UseConciseIMButtons"); + static LLCachedControl concise_im("UseConciseIMButtons"); + static LLCachedControl concise_group("UseConciseGroupChatButtons"); + static LLCachedControl concise_conf("UseConciseConferenceButtons"); std::string xml_filename; switch(mDialog) { case IM_SESSION_GROUP_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); - xml_filename = "floater_instant_message_group.xml"; + xml_filename = concise_group ? "floater_instant_message_group_concisebuttons.xml" : "floater_instant_message_group.xml"; mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_INVITE: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); if (gAgent.isInGroup(mSessionUUID)) { - xml_filename = "floater_instant_message_group.xml"; + xml_filename = concise_group ? "floater_instant_message_group_concisebuttons.xml" : "floater_instant_message_group.xml"; } else // must be invite to ad hoc IM { - xml_filename = "floater_instant_message_ad_hoc.xml"; + xml_filename = concise_conf ? "floater_instant_message_ad_hoc_concisebuttons.xml" : "floater_instant_message_ad_hoc.xml"; } mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; case IM_SESSION_P2P_INVITE: - xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mVoiceChannel = new LLVoiceChannelP2P(mSessionUUID, mSessionLabel, mOtherParticipantUUID); break; case IM_SESSION_CONFERENCE_START: mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, this); - xml_filename = "floater_instant_message_ad_hoc.xml"; + xml_filename = concise_conf ? "floater_instant_message_ad_hoc_concisebuttons.xml" : "floater_instant_message_ad_hoc.xml"; mVoiceChannel = new LLVoiceChannelGroup(mSessionUUID, mSessionLabel); break; // just received text from another user case IM_NOTHING_SPECIAL: - xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; mTextIMPossible = LLVoiceClient::getInstance()->isSessionTextIMPossible(mSessionUUID); mProfileButtonEnabled = LLVoiceClient::getInstance()->isParticipantAvatar(mSessionUUID); @@ -1230,7 +1232,7 @@ void LLFloaterIMPanel::init(const std::string& session_label) break; default: llwarns << "Unknown session type" << llendl; - xml_filename = concisebuttons ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; + xml_filename = concise_im ? "floater_instant_message_concisebuttons.xml" : "floater_instant_message.xml"; break; } diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 0ec781e40..52fb33247 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -457,18 +457,7 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto } std::string contents = node->getTextContents(); - - typedef boost::tokenizer > tokenizer; - boost::char_separator sep("\t\n"); - tokenizer tokens(contents, sep); - tokenizer::iterator token_iter = tokens.begin(); - - while(token_iter != tokens.end()) - { - const std::string& line = *token_iter; - name_list->setCommentText(line); - ++token_iter; - } + name_list->setCommentText(contents); return name_list; } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index b1f702bcd..4e5bc6987 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -130,6 +130,10 @@ LLVector3 LLPanelObject::mClipboardPos; LLVector3 LLPanelObject::mClipboardSize; LLVector3 LLPanelObject::mClipboardRot; LLVolumeParams LLPanelObject::mClipboardVolumeParams; +LLFlexibleObjectData* LLPanelObject::mClipboardFlexiParams = NULL; +LLLightParams* LLPanelObject::mClipboardLightParams = NULL; +LLSculptParams* LLPanelObject::mClipboardSculptParams = NULL; +LLLightImageParams* LLPanelObject::mClipboardLightImageParams = NULL; BOOL LLPanelObject::hasParamClipboard = FALSE; BOOL LLPanelObject::postBuild() @@ -2493,15 +2497,65 @@ void LLPanelObject::onCopyRot(void* user_data) void LLPanelObject::onCopyParams(void* user_data) { LLPanelObject* self = (LLPanelObject*) user_data; + if (!self) return; + self->getVolumeParams(mClipboardVolumeParams); hasParamClipboard = TRUE; + + LLViewerObject* objp = self->mObject; + + mClipboardFlexiParams = (LLFlexibleObjectData*)objp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); + mClipboardLightParams = (LLLightParams*)objp->getParameterEntry(LLNetworkData::PARAMS_LIGHT); + mClipboardSculptParams = (LLSculptParams*)objp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); + if (mClipboardSculptParams) + { + LLUUID id = mClipboardSculptParams->getSculptTexture(); + + // Texture perms check + if (!(id.isNull() || gInventory.isObjectDescendentOf(id, gInventory.getLibraryRootFolderID()) + || id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID")) + || id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID")) + || id == LLUUID(std::string("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"))) // alpha + && findItemID(id).isNull()) + { + mClipboardSculptParams->setSculptTexture(LLUUID(SCULPT_DEFAULT_TEXTURE)); + } + } + mClipboardLightImageParams = (LLLightImageParams*)objp->getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); + if (mClipboardLightImageParams) + { + LLUUID id = mClipboardLightImageParams->getLightTexture(); + + // Texture perms check + if (!(id.isNull() || gInventory.isObjectDescendentOf(id, gInventory.getLibraryRootFolderID()) + || id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID")) + || id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID")) + || id == LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"))) // alpha + { + mClipboardLightImageParams->setLightTexture(findItemID(id)); + } + } } void LLPanelObject::onPasteParams(void* user_data) { + if(!hasParamClipboard) return; + LLPanelObject* self = (LLPanelObject*) user_data; - if(hasParamClipboard) - self->mObject->updateVolume(mClipboardVolumeParams); + if(!self) return; + + LLViewerObject* objp = self->mObject; + + objp->updateVolume(mClipboardVolumeParams); + + if (mClipboardFlexiParams) + objp->setParameterEntry(LLNetworkData::PARAMS_FLEXIBLE, *mClipboardFlexiParams, true); + if (mClipboardLightParams) + objp->setParameterEntry(LLNetworkData::PARAMS_LIGHT, *mClipboardLightParams, true); + if (mClipboardSculptParams) + objp->setParameterEntry(LLNetworkData::PARAMS_SCULPT, *mClipboardSculptParams, true); + if (mClipboardLightImageParams) + objp->setParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE, *mClipboardLightImageParams, true); } void LLPanelObject::onLinkObj(void* user_data) diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index ae2397294..e34d318c6 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -50,6 +50,10 @@ class LLColorSwatchCtrl; class LLTextureCtrl; class LLInventoryItem; class LLUUID; +class LLFlexibleObjectData; +class LLLightParams; +class LLLightImageParams; +class LLSculptParams; class LLPanelObject : public LLPanel { @@ -119,6 +123,10 @@ protected: static LLVector3 mClipboardSize; static LLVector3 mClipboardRot; static LLVolumeParams mClipboardVolumeParams; + static LLFlexibleObjectData* mClipboardFlexiParams; + static LLLightParams* mClipboardLightParams; + static LLSculptParams* mClipboardSculptParams; + static LLLightImageParams* mClipboardLightImageParams; static BOOL hasParamClipboard; S32 mComboMaterialItemCount; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index bf2bd3fb4..e5128f28c 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -485,10 +485,7 @@ bool LLScriptEdCore::writeToFile(const std::string& filename) { llwarns << "Unable to write to " << filename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mErrorList->addElement(row); + mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return false; } @@ -653,15 +650,12 @@ void LLScriptEdCore::autoSave() //mAutosaveFilename = llformat("%s.lsl", asfilename.c_str()); } - FILE* fp = LLFile::fopen(mAutosaveFilename.c_str(), "wb"); + LLFILE* fp = LLFile::fopen(mAutosaveFilename.c_str(), "wb"); if(!fp) { llwarns << "Unable to write to " << mAutosaveFilename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to temp file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mErrorList->addElement(row); + mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return; } @@ -706,9 +700,7 @@ void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string) // separate history items from full item list if (mLiveHelpHistorySize == 0) { - LLSD row; - row["columns"][0]["type"] = "separator"; - history_combo->addElement(row, ADD_TOP); + history_combo->addSeparator(ADD_TOP); } // delete all history items over history limit while(mLiveHelpHistorySize > MAX_HISTORY_COUNT - 1) @@ -1321,8 +1313,8 @@ LLPreviewLSL::LLPreviewLSL(const std::string& name, const LLRect& rect, void LLPreviewLSL::callbackLSLCompileSucceeded() { llinfos << "LSL Bytecode saved" << llendl; - mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); - mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileSuccessful")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("SaveComplete")); closeIfNeeded(); } @@ -1338,6 +1330,7 @@ void LLPreviewLSL::callbackLSLCompileFailed(const LLSD& compile_errors) LLSD row; std::string error_message = line->asString(); LLStringUtil::stripNonprintable(error_message); + row["columns"][0]["column"] = "default_column"; row["columns"][0]["value"] = error_message; row["columns"][0]["font"] = "OCRA"; mScriptEd->mErrorList->addElement(row); @@ -1480,10 +1473,7 @@ void LLPreviewLSL::saveIfNeeded() { llwarns << "Unable to write to " << filename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return; } @@ -1506,9 +1496,7 @@ void LLPreviewLSL::saveIfNeeded() else { LLSD row; - row["columns"][0]["value"] = LLTrans::getString("CompileQueueProblemUploading"); - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemUploading")); LLFile::remove(filename); } #if 0 //Client side compiling disabled. @@ -1622,7 +1610,6 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, LLFile::remove(err_filename); LLFile::remove(dst_filename); } -#endif // static void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) @@ -1710,6 +1697,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d } delete instance_uuid; } +#endif // static void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, @@ -1931,8 +1919,8 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, bool is_script_running) { lldebugs << "LSL Bytecode saved" << llendl; - mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); - mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileSuccessful")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("SaveComplete")); closeIfNeeded(); } @@ -1947,6 +1935,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) LLSD row; std::string error_message = line->asString(); LLStringUtil::stripNonprintable(error_message); + row["columns"][0]["column"] = "default_column"; row["columns"][0]["value"] = error_message; row["columns"][0]["font"] = "OCRA"; mScriptEd->mErrorList->addElement(row); @@ -2389,10 +2378,7 @@ void LLLiveLSLEditor::saveIfNeeded() { llwarns << "Unable to write to " << filename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return; } std::string utf8text = mScriptEd->mEditor->getText(); @@ -2419,10 +2405,7 @@ void LLLiveLSLEditor::saveIfNeeded() } else { - LLSD row; - row["columns"][0]["value"] = LLTrans::getString("CompileQueueProblemUploading"); - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemUploading")); LLFile::remove(filename); } #if 0 //Client side compiling disabled. @@ -2548,7 +2531,6 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, runningCheckbox->setLabel(getString("script_running")); runningCheckbox->setEnabled(TRUE); } -#endif void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { @@ -2579,7 +2561,6 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da data = NULL; } - void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; @@ -2593,7 +2574,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use if(self) { // Tell the user that the compile worked. - self->mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); + self->mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("SaveComplete")); // close the window if this completes both uploads self->getWindow()->decBusyCount(); self->mPendingUploads--; @@ -2627,6 +2608,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use LLFile::remove(dst_filename); delete data; } +#endif void LLLiveLSLEditor::open() { diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index f62a8fb5b..9b171763f 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -202,9 +202,11 @@ protected: void uploadAssetViaCaps(const std::string& url, const std::string& filename, const LLUUID& item_id); +#if 0 //Client side compiling disabled. void uploadAssetLegacy(const std::string& filename, const LLUUID& item_id, const LLTransactionID& tid); +#endif // virtual BOOL canSaveAs() const; virtual void saveAs(); @@ -218,8 +220,10 @@ protected: static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); +#if 0 //Client side compiling disabled. static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status); static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); +#endif public: static LLPreviewLSL* getInstance(const LLUUID& uuid); LLTextEditor* getEditor() { return mScriptEd->mEditor; } @@ -275,10 +279,12 @@ protected: const LLUUID& task_id, const LLUUID& item_id, BOOL is_running); +#if 0 //Client side compiling disabled. void uploadAssetLegacy(const std::string& filename, LLViewerObject* object, const LLTransactionID& tid, BOOL is_running); +#endif // virtual BOOL canSaveAs() const; virtual void saveAs(); @@ -292,8 +298,10 @@ protected: static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); +#if 0 //Client side compiling disabled. static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); +#endif static void onRunningCheckboxClicked(LLUICtrl*, void* userdata); static void onReset(void* userdata); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4a4b3863b..ec425421b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4655,8 +4655,8 @@ void LLSelectMgr::packObjectName(LLSelectNode* node, void* user_data) void LLSelectMgr::packObjectDescription(LLSelectNode* node, void* user_data) { const std::string* desc = (const std::string*)user_data; - if(!desc->empty()) - { + if(desc) + { // Empty (non-null, but zero length) descriptions are OK gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_LocalID, node->getObject()->getLocalID()); gMessageSystem->addStringFast(_PREHASH_Description, *desc); diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index c1814874d..ac6ac0227 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -24,7 +24,7 @@ * $/LicenseInfo$ */ -#ifndef LL_LLTEXTURECACHE_ +#ifndef LL_LLTEXTURECACHE_H #define LL_LLTEXTURECACHE_H #include "lldir.h" diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index efeb6bc2f..716edd7dd 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -272,7 +272,8 @@ void LLToolMgr::updateToolStatus() bool LLToolMgr::inEdit() { - return mBaseTool != LLToolPie::getInstance() && mBaseTool != gToolNull; + static const LLCachedControl freeze_time("FreezeTime",false); + return mBaseTool != LLToolPie::getInstance() && mBaseTool != gToolNull && (mCurrentToolset != gCameraToolset || !freeze_time); } bool LLToolMgr::canEdit() diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index d6383d311..5235334f9 100644 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -348,7 +348,7 @@ bool LLWLDayCycle::hasReferencesTo(const LLWLParamKey& keyframe) const void LLWLDayCycle::removeReferencesTo(const LLWLParamKey& keyframe) { lldebugs << "Removing references to key frame " << keyframe.toLLSD() << llendl; - F32 keytime; + F32 keytime = 0.f; // Avoid compiler warning. bool might_exist; do { diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 038b4ae33..eeece6875 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -124,12 +124,12 @@ std::map LLWorldMapView::sStringsMap; F32 DRAW_TEXT_THRESHOLD = 96.f; -const int SIM_MAP_AGENT_SCALE=8; // width in pixels, where we start drawing agents -const int SIM_DATA_SCALE=12; // width in pixels where we start requesting sim info +const int SIM_MAP_AGENT_SCALE=32; // width in pixels, where we start drawing agents +const int SIM_DATA_SCALE=32; // width in pixels where we start requesting sim info const int SIM_LANDFORSALE_SCALE=32; const int SIM_COMPOSITE_SCALE=2; // width in pixels, where we start drawing sim tiles. (legacy tiling method) -const int SIM_FETCH_SCALE=SIM_DATA_SCALE; // width in pixels, where we start requesting sim tile textures. (legacy tiling method) +const int SIM_FETCH_SCALE=12; // width in pixels, where we start requesting sim tile textures. (legacy tiling method) // When on, draw an outline for each mipmap tile gotten from S3 #define DEBUG_DRAW_TILE 0 diff --git a/indra/newview/skins/default/xui/en-us/floater_instant_message_ad_hoc_concisebuttons.xml b/indra/newview/skins/default/xui/en-us/floater_instant_message_ad_hoc_concisebuttons.xml new file mode 100644 index 000000000..bd0208d92 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_instant_message_ad_hoc_concisebuttons.xml @@ -0,0 +1,27 @@ + + + Joining Voice Chat... + Connected, click End Call to hang up + Left Voice Chat + icn_voice-groupfocus.tga + Instant Message with [NAME] + [NAME] is typing... + Starting session with [NAME], please wait. + Click here to instant message. +