diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llavatariconctrl.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llavatariconctrl.h | 3 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 3 | ||||
-rw-r--r-- | indra/newview/llimfloater.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llpanelclassified.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llpanelclassified.h | 9 | ||||
-rw-r--r-- | indra/newview/llpanelpicks.cpp | 5 | ||||
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 27 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_avatar_list_item.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_instant_message.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_picks.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/avatar_icon.xml | 4 |
18 files changed, 103 insertions, 73 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 46902006a6..327d80ba34 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -143,7 +143,8 @@ void LLAvatarIconIDCache::remove (const LLUUID& avatar_id) LLAvatarIconCtrl::Params::Params() : avatar_id("avatar_id"), - draw_tooltip("draw_tooltip", true) + draw_tooltip("draw_tooltip", true), + default_icon_name("default_icon_name") { name = "avatar_icon"; } @@ -151,7 +152,8 @@ LLAvatarIconCtrl::Params::Params() LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) : LLIconCtrl(p), - mDrawTooltip(p.draw_tooltip) + mDrawTooltip(p.draw_tooltip), + mDefaultIconName(p.default_icon_name) { mPriority = LLViewerFetchedTexture::BOOST_ICON; @@ -193,7 +195,7 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) } else { - LLIconCtrl::setValue("default_profile_picture.j2c"); + LLIconCtrl::setValue(mDefaultIconName); } } @@ -260,7 +262,7 @@ bool LLAvatarIconCtrl::updateFromCache() } else { - LLIconCtrl::setValue("default_profile_picture.j2c"); + LLIconCtrl::setValue(mDefaultIconName); } return true; diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h index 5eb830df4b..38616b7852 100644 --- a/indra/newview/llavatariconctrl.h +++ b/indra/newview/llavatariconctrl.h @@ -74,6 +74,7 @@ public: { Optional <LLUUID> avatar_id; Optional <bool> draw_tooltip; + Optional <std::string> default_icon_name; Params(); }; @@ -106,7 +107,7 @@ protected: std::string mFirstName; std::string mLastName; bool mDrawTooltip; - + std::string mDefaultIconName; bool updateFromCache(); }; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2ccd6b7d35..3b893aa529 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -47,7 +47,6 @@ #include "llmutelist.h" static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history"); -static const std::string MESSAGE_USERNAME_DATE_SEPARATOR(" ----- "); std::string formatCurrentTime() { @@ -333,7 +332,7 @@ LLView* LLChatHistory::getHeader(const LLChat& chat) void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& style_params) { LLView* view = NULL; - std::string view_text; + std::string view_text = "\n[" + formatCurrentTime() + "]:[" + chat.mFromName + "] ";; LLInlineViewSegment::Params p; p.force_newline = true; @@ -343,14 +342,12 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty if (mLastFromName == chat.mFromName) { view = getSeparator(); - view_text = "\n"; p.top_pad = mTopSeparatorPad; p.bottom_pad = mBottomSeparatorPad; } else { view = getHeader(chat); - view_text = chat.mFromName + MESSAGE_USERNAME_DATE_SEPARATOR + formatCurrentTime() + '\n'; if (getText().size() == 0) p.top_pad = 0; else @@ -370,8 +367,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty appendWidget(p, view_text, false); //Append the text message - std::string message = chat.mText + '\n'; - appendText(message, FALSE, style_params); + appendText(chat.mText, FALSE, style_params); mLastFromName = chat.mFromName; blockUndo(); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 5402f88cd3..eda4bfaa78 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -103,6 +103,7 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) // connect counter handlers to the signals connectCounterUpdatersToSignal("notify"); connectCounterUpdatersToSignal("groupnotify"); + connectCounterUpdatersToSignal("offer"); } LLNotificationChiclet::~LLNotificationChiclet() diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index e7afd7f08e..eab4a282f5 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -107,6 +107,7 @@ public: { draw_tooltip(FALSE); mouse_opaque(FALSE); + default_icon_name("Generic_Person"); }; }; @@ -128,7 +129,7 @@ public: Optional<std::string> default_icon; Params() - : default_icon("default_icon", "default_land_picture.j2c") + : default_icon("default_icon", "Generic_Group") { }; }; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index a634a1b0fd..8b44ccebdd 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -479,11 +479,29 @@ void LLIMFloater::updateMessages() LLStyle::Params style_params; style_params.color(chat_color); - LLChat chat(message); + LLChat chat; chat.mFromID = from_id; chat.mFromName = from; - mChatHistory->appendWidgetMessage(chat, style_params); + //Handle IRC styled /me messages. + std::string prefix = message.substr(0, 4); + if (prefix == "/me " || prefix == "/me'") + { + if (from.size() > 0) + { + style_params.font.style = "ITALIC"; + chat.mText = from + " "; + mChatHistory->appendWidgetMessage(chat, style_params); + } + message = message.substr(3); + style_params.font.style = "UNDERLINE"; + mChatHistory->appendText(message, FALSE, style_params); + } + else + { + chat.mText = message; + mChatHistory->appendWidgetMessage(chat, style_params); + } mLastMessageIndex = msg["index"].asInteger(); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 476d312c69..e894022e52 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -651,22 +651,10 @@ void LLIMModel::sendMessage(const std::string& utf8_text, //local echo for the legacy communicate panel std::string history_echo; - std::string utf8_copy = utf8_text; LLAgentUI::buildFullname(history_echo); - // Look for IRC-style emotes here. + history_echo += ": " + utf8_text; - std::string prefix = utf8_copy.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") - { - utf8_copy.replace(0,3,""); - } - else - { - history_echo += ": "; - } - history_echo += utf8_copy; - LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(im_session_id); if (floater) floater->addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID()); @@ -2337,15 +2325,6 @@ public: BOOL is_linden = LLMuteList::getInstance()->isLinden(name); std::string separator_string(": "); - int message_offset=0; - - //Handle IRC styled /me messages. - std::string prefix = message.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") - { - separator_string = ""; - message_offset = 3; - } chat.mMuted = is_muted && !is_linden; chat.mFromID = from_id; @@ -2362,7 +2341,7 @@ public: { saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); } - std::string buffer = saved + message.substr(message_offset); + std::string buffer = saved + message; BOOL is_this_agent = FALSE; if(from_id == gAgentID) @@ -2381,7 +2360,7 @@ public: ll_vector3_from_sd(message_params["position"]), true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + saved + message; LLFloaterChat::addChat(chat, TRUE, is_this_agent); //K now we want to accept the invitation diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 75ef5208e7..6305ca12aa 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -95,14 +95,9 @@ bool LLOfferHandler::processNotification(const LLSD& notify) LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, notification->getPayload()["from_id"]); if (!LLIMMgr::instance().hasSession(session_id)) { - // create session with faked type to avoid creating chicklets session_id = LLIMMgr::instance().addSession( notification->getSubstitutions()["NAME"], IM_NOTHING_SPECIAL, notification->getPayload()["from_id"]); - if (session_id != LLUUID::null) - { - LLIMFloater::show(session_id); - } } LLIMMgr::instance().addMessage(session_id, LLUUID(), notification->getSubstitutions()["NAME"], diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 5679233844..67a2704501 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -1167,7 +1167,9 @@ LLPanelClassifiedInfo* LLPanelClassifiedInfo::create() BOOL LLPanelClassifiedInfo::postBuild() { - childSetAction("back_btn", boost::bind(&LLPanelClassifiedInfo::onExit, this), NULL); + childSetAction("back_btn", boost::bind(&LLPanelClassifiedInfo::onExit, this)); + childSetAction("show_on_map_btn", boost::bind(&LLPanelClassifiedInfo::onMapClick, this)); + childSetAction("teleport_btn", boost::bind(&LLPanelClassifiedInfo::onTeleportClick, this)); return TRUE; } @@ -1177,6 +1179,11 @@ void LLPanelClassifiedInfo::setExitCallback(const commit_callback_t& cb) getChild<LLButton>("back_btn")->setClickedCallback(cb); } +void LLPanelClassifiedInfo::setEditClassifiedCallback(const commit_callback_t& cb) +{ + getChild<LLButton>("edit_btn")->setClickedCallback(cb); +} + void LLPanelClassifiedInfo::onOpen(const LLSD& key) { LLUUID avatar_id = key["avatar_id"]; @@ -1216,6 +1223,7 @@ void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t setDescription(c_info->description); setSnapshotId(c_info->snapshot_id); setParcelId(c_info->parcel_id); + setPosGlobal(c_info->pos_global); setClassifiedLocation(createLocationText(c_info->parcel_name, c_info->sim_name, c_info->pos_global)); childSetValue("category", LLClassifiedInfo::sCategories[c_info->category]); @@ -1325,6 +1333,21 @@ std::string LLPanelClassifiedInfo::createLocationText( return location_text; } +void LLPanelClassifiedInfo::onMapClick() +{ + LLFloaterWorldMap::getInstance()->trackLocation(getPosGlobal()); + LLFloaterReg::showInstance("world_map", "center"); +} + +void LLPanelClassifiedInfo::onTeleportClick() +{ + if (!getPosGlobal().isExactlyZero()) + { + gAgent.teleportViaLocation(getPosGlobal()); + LLFloaterWorldMap::getInstance()->trackLocation(getPosGlobal()); + } +} + void LLPanelClassifiedInfo::onExit() { LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this); diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 187bdbb37e..8b32495854 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -249,7 +249,9 @@ public: void setInfoLoaded(bool loaded) { mInfoLoaded = loaded; } - virtual void setExitCallback(const commit_callback_t& cb); + void setExitCallback(const commit_callback_t& cb); + + void setEditClassifiedCallback(const commit_callback_t& cb); protected: @@ -264,9 +266,8 @@ protected: const std::string& sim_name, const LLVector3d& pos_global); - void onClickMap(); - void onClickTeleport(); - void onClickBack(); + void onMapClick(); + void onTeleportClick(); void onExit(); private: diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index c30658755a..6905c7e546 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -687,6 +687,10 @@ void LLPanelPicks::onPanelClassifiedSave(LLPanelClassifiedEdit* panel) c_item->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4)); c_item->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this)); c_item->childSetAction("info_chevron", boost::bind(&LLPanelPicks::onClickInfo, this)); + + // order does matter, showAccordion will invoke arrange for accordions. + mClassifiedsAccTab->changeOpenClose(false); + showAccordion("tab_classifieds", true); } else { @@ -740,6 +744,7 @@ void LLPanelPicks::createClassifiedInfoPanel() { mPanelClassifiedInfo = LLPanelClassifiedInfo::create(); mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo)); + mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this)); mPanelClassifiedInfo->setVisible(FALSE); } } diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index c02fd7a5ef..9370e318cf 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -50,7 +50,19 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mMessage = getChild<LLTextBox>("message"); mReplyBtn = getChild<LLButton>("reply"); - mMessage->setValue(p.message); + LLStyle::Params style_params; + //Handle IRC styled /me messages. + std::string prefix = p.message.substr(0, 4); + if (prefix == "/me " || prefix == "/me'") + { + mMessage->clear(); + style_params.font.style= "ITALIC"; + mMessage->appendText(p.from + " ", FALSE, style_params); + style_params.font.style= "UNDERLINE"; + mMessage->appendText(p.message.substr(3), FALSE, style_params); + } + else + mMessage->setValue(p.message); mUserName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ea1097c477..bb61b4e16f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1498,15 +1498,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } std::string separator_string(": "); - int message_offset = 0; - - //Handle IRC styled /me messages. - std::string prefix = message.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") - { - separator_string = ""; - message_offset = 3; - } LLSD args; switch(dialog) @@ -1558,7 +1549,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // now store incoming IM in chat history - buffer = message.substr(message_offset); + buffer = message; LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; @@ -1576,7 +1567,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) true); // pretend this is chat generated by self, so it does not show up on screen - chat.mText = std::string("IM: ") + name + separator_string + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + message; LLFloaterChat::addChat( chat, TRUE, TRUE ); } else if (from_id.isNull()) @@ -1596,7 +1587,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Treat like a system message and put in chat history. // Claim to be from a local agent so it doesn't go into // console. - chat.mText = name + separator_string + message.substr(message_offset); + chat.mText = name + separator_string + message; LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); if(nearby_chat) @@ -1612,7 +1603,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); } - buffer = saved + message.substr(message_offset); + buffer = saved + message; LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; @@ -1634,7 +1625,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + saved + message; BOOL local_agent = FALSE; LLFloaterChat::addChat( chat, TRUE, local_agent ); @@ -1922,7 +1913,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); } - buffer = saved + message.substr(message_offset); + buffer = saved + message; BOOL is_this_agent = FALSE; if(from_id == gAgentID) { @@ -1940,7 +1931,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) position, true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + saved + message; LLFloaterChat::addChat(chat, TRUE, is_this_agent); } break; @@ -1953,7 +1944,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } LLSD substitutions; - substitutions["MSG"] = message.substr(message_offset); + substitutions["MSG"] = message; LLNotifications::instance().add("ServerObjectMessage", substitutions); } break; @@ -1978,7 +1969,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) else { // TODO: after LLTrans hits release, get "busy response" into translatable file - buffer = llformat("%s (%s): %s", name.c_str(), "busy response", message.substr(message_offset).c_str()); + buffer = llformat("%s (%s): %s", name.c_str(), "busy response", message.c_str()); gIMMgr->addMessage(session_id, from_id, name, buffer); } break; diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index 0c42686531..2eaa3a94ee 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -30,7 +30,7 @@ <avatar_icon follows="top|left" height="20" - image_name="smile.png" + default_icon_name="Generic_Person" layout="topleft" left="5" mouse_opaque="true" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 34fa7dbef2..cea6759292 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -90,12 +90,12 @@ height="28" layout="topleft" min_height="28" - width="80" + width="82" top_delta="0" min_width="76" name="gesture_panel" user_resize="false"> - <button + <gesture_combo_box follows="right" height="23" label="Gesture" @@ -104,7 +104,7 @@ left="0" top="3" use_ellipses="true" - width="80" + width="82" tool_tip="Shows/hides gestures"/> </layout_panel> <icon diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml index 26d8304551..be56866119 100644 --- a/indra/newview/skins/default/xui/en/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml @@ -79,7 +79,7 @@ text_color="white" top="33" use_ellipses="true" - value="MESSAGE" + value="" width="285" word_wrap="true" max_length="350" /> diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index dbe76e553b..9cfbed432a 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -22,6 +22,7 @@ left="0" name="accordion" top="0" + single_expansion="true" width="313"> <accordion_tab can_resize="false" @@ -46,7 +47,7 @@ layout="topleft" height="235" name="tab_classifieds" - title="Classified" + title="Classifieds" visible="false"> <flat_list_view color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml new file mode 100644 index 0000000000..a35e2c3663 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> + +<avatar_icon default_icon_name="Generic_Person_Large"> +</avatar_icon> |