From f28778b8b803af65fc4097cc904cf49b9090795a Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Mon, 18 Jan 2010 17:50:19 +0200 Subject: work on EXT-4322 Remove the Communicate floater leave some LLFloaterChat usages commented for later review... --HG-- branch : product-engine --- indra/newview/CMakeLists.txt | 2 -- indra/newview/llchatbar.cpp | 3 +- indra/newview/llcompilequeue.cpp | 5 --- indra/newview/llfloaterbulkpermission.cpp | 1 - indra/newview/llfloaterchat.cpp | 2 -- indra/newview/llfloaterchatterbox.cpp | 28 +-------------- indra/newview/llimfloater.cpp | 1 - indra/newview/llimpanel.cpp | 1 - indra/newview/llimview.cpp | 5 --- indra/newview/llinventoryfunctions.cpp | 1 - indra/newview/lllogchat.cpp | 1 - indra/newview/llmenucommands.cpp | 1 - indra/newview/llmutelist.cpp | 4 --- indra/newview/llpreviewnotecard.cpp | 1 - indra/newview/llpreviewscript.cpp | 1 - indra/newview/llstartup.cpp | 8 ----- indra/newview/llstatusbar.cpp | 1 - indra/newview/lltoolbar.cpp | 19 +---------- indra/newview/llviewerfloaterreg.cpp | 3 +- indra/newview/llviewermenu.cpp | 48 ++------------------------ indra/newview/llviewermessage.cpp | 57 +++++++++++++------------------ indra/newview/llviewertexteditor.cpp | 1 - indra/newview/llviewerwindow.cpp | 1 - indra/newview/llvoiceclient.cpp | 5 --- 24 files changed, 29 insertions(+), 171 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 958b9521fa..73c275c54c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -156,7 +156,6 @@ set(viewer_SOURCE_FILES llfloaterbuycurrency.cpp llfloaterbuyland.cpp llfloatercamera.cpp - llfloaterchat.cpp llfloaterchatterbox.cpp llfloatercolorpicker.cpp llfloatercustomize.cpp @@ -665,7 +664,6 @@ set(viewer_HEADER_FILES llfloaterbuycurrency.h llfloaterbuyland.h llfloatercamera.h - llfloaterchat.h llfloaterchatterbox.h llfloatercolorpicker.h llfloatercustomize.h diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 442dc660cd..b32a955038 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -48,7 +48,6 @@ #include "llcombobox.h" #include "llcommandhandler.h" // secondlife:///app/chat/ support #include "llviewercontrol.h" -#include "llfloaterchat.h" #include "llgesturemgr.h" #include "llkeyboard.h" #include "lllineeditor.h" @@ -548,7 +547,7 @@ void LLChatBar::onInputEditorFocusLost() // static void LLChatBar::onInputEditorGainFocus() { - LLFloaterChat::setHistoryCursorAndScrollToEnd(); + //LLFloaterChat::setHistoryCursorAndScrollToEnd(); } void LLChatBar::onClickSay( LLUICtrl* ctrl ) diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index eb9a2fec2f..72074955d1 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -59,7 +59,6 @@ #include "llbutton.h" #include "lldir.h" -#include "llfloaterchat.h" #include "llnotificationsutil.h" #include "llviewerstats.h" #include "llvfile.h" @@ -447,14 +446,10 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ) { - LLChat chat(LLTrans::getString("CompileQueueScriptNotFound")); - LLFloaterChat::addChat(chat); buffer = LLTrans::getString("CompileQueueProblemDownloading") + (": ") + data->mScriptName; } else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) { - LLChat chat(LLTrans::getString("CompileQueueInsufficientPermDownload")); - LLFloaterChat::addChat(chat); buffer = LLTrans::getString("CompileQueueInsufficientPermFor") + (": ") + data->mScriptName; } else diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 538b44c056..5c3a54e34b 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -48,7 +48,6 @@ #include "llresmgr.h" #include "llbutton.h" #include "lldir.h" -#include "llfloaterchat.h" #include "llviewerstats.h" #include "lluictrlfactory.h" #include "llselectmgr.h" diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 18b9f0484f..c24c224133 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -37,8 +37,6 @@ #include "llviewerprecompiledheaders.h" -#include "llfloaterchat.h" - // project include #include "llagent.h" #include "llappviewer.h" diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 9108cfb72b..84b423399e 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -38,7 +38,6 @@ #include "llfloaterreg.h" #include "llfloaterchatterbox.h" #include "lluictrlfactory.h" -#include "llfloaterchat.h" #include "llfloaterfriends.h" #include "llfloatergroups.h" #include "llviewercontrol.h" @@ -134,22 +133,6 @@ BOOL LLFloaterChatterBox::postBuild() addFloater(LLFloaterMyFriends::getInstance(), TRUE); } - if (gSavedSettings.getBOOL("ChatHistoryTornOff")) - { - LLFloaterChat* floater_chat = LLFloaterChat::getInstance(); - if(floater_chat) - { - // add then remove to set up relationship for re-attach - addFloater(floater_chat, FALSE); - removeFloater(floater_chat); - // reparent to floater view - gFloaterView->addChild(floater_chat); - } - } - else - { - addFloater(LLFloaterChat::getInstance(), FALSE); - } mTabContainer->lockTabs(); return TRUE; } @@ -230,8 +213,6 @@ void LLFloaterChatterBox::onOpen(const LLSD& key) //*TODO:Skinning show the session id associated with key if (key.asString() == "local") { - LLFloaterChat* chat = LLFloaterReg::findTypedInstance("chat"); - chat->openFloater(); } else if (key.isDefined()) { @@ -245,12 +226,6 @@ void LLFloaterChatterBox::onOpen(const LLSD& key) void LLFloaterChatterBox::onVisibilityChange ( const LLSD& new_visibility ) { - // HACK: potentially need to toggle console - LLFloaterChat* instance = LLFloaterChat::getInstance(); - if(instance) - { - instance->updateConsoleVisibility(); - } } void LLFloaterChatterBox::removeFloater(LLFloater* floaterp) @@ -349,8 +324,7 @@ LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater() } if (LLVoiceChannelProximal::getInstance() == LLVoiceChannel::getCurrentVoiceChannel()) { - // show near me tab if in proximal channel - return LLFloaterChat::getInstance(); + return NULL; } else { diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index aee34eb0af..24ac983645 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -42,7 +42,6 @@ #include "llbottomtray.h" #include "llchannelmanager.h" #include "llchiclet.h" -#include "llfloaterchat.h" #include "llfloaterreg.h" #include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container #include "lllayoutstack.h" diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 029ddbaf2c..9a6115dd63 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -59,7 +59,6 @@ #include "llinventory.h" #include "llinventorymodel.h" #include "llfloaterinventory.h" -#include "llfloaterchat.h" #include "lliconctrl.h" #include "llkeyboard.h" #include "lllineeditor.h" diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e9661003ea..1930667d1e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -51,7 +51,6 @@ #include "llchat.h" #include "llchiclet.h" #include "llresmgr.h" -#include "llfloaterchat.h" #include "llfloaterchatterbox.h" #include "llavataractions.h" #include "llhttpnode.h" @@ -2236,7 +2235,6 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess LLChat chat(message); chat.mSourceType = CHAT_SOURCE_SYSTEM; - LLFloaterChat::addChatHistory(chat); LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); if(nearby_chat) @@ -3136,9 +3134,6 @@ public: ll_vector3_from_sd(message_params["position"]), true); - 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 std::string url = gAgent.getRegion()->getCapability( "ChatSessionRequest"); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 8f4136c01f..031f44606a 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -51,7 +51,6 @@ #include "llappearancemgr.h" #include "llappviewer.h" #include "llfirstuse.h" -#include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfocusmgr.h" #include "llfolderview.h" diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 92f19c9232..4e5aaeb66a 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -35,7 +35,6 @@ #include "llagent.h" #include "llagentui.h" #include "lllogchat.h" -#include "llfloaterchat.h" #include "lltrans.h" #include "llviewercontrol.h" diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp index a2aef9ba63..8268ef7a57 100644 --- a/indra/newview/llmenucommands.cpp +++ b/indra/newview/llmenucommands.cpp @@ -46,7 +46,6 @@ #include "llcallingcard.h" #include "llviewercontrol.h" #include "llfirstuse.h" -#include "llfloaterchat.h" #include "llfloaterworldmap.h" #include "lllineeditor.h" #include "llstatusbar.h" diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index b520bc1c2d..55cfd7adae 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -64,7 +64,6 @@ #include "llviewerwindow.h" #include "llworld.h" //for particle system banning #include "llchat.h" -#include "llfloaterchat.h" #include "llimview.h" #include "llnotifications.h" #include "lluistring.h" @@ -532,9 +531,6 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n LLIMModel::getInstance()->addMessage(agent_id, SYSTEM_FROM, LLUUID::null, message); } - - LLChat auto_chat(message); - LLFloaterChat::addChat(auto_chat, FALSE, FALSE); } } diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 95756ac5f3..cc70360528 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -55,7 +55,6 @@ #include "llviewerobjectlist.h" #include "llviewerregion.h" #include "lldir.h" -//#include "llfloaterchat.h" #include "llviewerstats.h" #include "llviewercontrol.h" // gSavedSettings #include "llappviewer.h" // app_abort_quit() diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 646c9fb6a4..fccf71f3cb 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -79,7 +79,6 @@ #include "llslider.h" #include "lldir.h" #include "llcombobox.h" -//#include "llfloaterchat.h" #include "llviewerstats.h" #include "llviewertexteditor.h" #include "llviewerwindow.h" diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 99fa271b78..c7700b1c87 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -101,7 +101,6 @@ #include "llface.h" #include "llfeaturemanager.h" #include "llfirstuse.h" -#include "llfloaterchat.h" #include "llfloaterhud.h" #include "llfloaterland.h" #include "llfloaterpreference.h" @@ -958,13 +957,6 @@ bool idle_startup() LLFile::mkdir(gDirUtilp->getChatLogsDir()); LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); - // chat history must be loaded AFTER chat directories are defined. - if (!gNoRender && gSavedPerAccountSettings.getBOOL("LogShowHistory")) - { - LLFloaterChat::loadHistory(); - } - - //good as place as any to create user windlight directories std::string user_windlight_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", "")); LLFile::mkdir(user_windlight_path_name.c_str()); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b3b2b9ee5d..e6ae10acd5 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -40,7 +40,6 @@ #include "llcommandhandler.h" #include "llviewercontrol.h" #include "llfloaterbuycurrency.h" -#include "llfloaterchat.h" #include "llfloaterlagmeter.h" #include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index bf6d715c31..f60688bd07 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -70,7 +70,6 @@ #include "llviewerwindow.h" #include "lltoolgrab.h" #include "llcombobox.h" -#include "llfloaterchat.h" #include "llimpanel.h" #include "lllayoutstack.h" @@ -281,21 +280,6 @@ void LLToolBar::updateCommunicateList() } itemp = communicate_button->addElement(contact_sd, ADD_TOP); - LLSD communicate_sd; - communicate_sd["value"] = "local chat"; - communicate_sd["columns"][0]["value"] = LLFloaterChat::getInstance()->getShortTitle(); - - if (LLFloaterChat::getInstance() == frontmost_floater) - { - communicate_sd["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - communicate_sd["columns"][0]["font"]["style"] = "BOLD"; - if (selected.isUndefined()) - { - selected = "local chat"; - } - } - itemp = communicate_button->addElement(communicate_sd, ADD_TOP); - communicate_button->addSeparator(ADD_TOP); communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP); communicate_button->addSeparator(ADD_TOP); @@ -357,8 +341,7 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data) if(chatterbox_instance) { chatterbox_instance->addFloater(LLFloaterMyFriends::getInstance(), FALSE); - chatterbox_instance->addFloater(LLFloaterChat::getInstance(), FALSE); - + LLUUID session_to_show; std::set >::const_iterator floater_handle_it; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e81115c8ab..3a834e7532 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -54,7 +54,6 @@ #include "llfloaterbulkpermission.h" #include "llfloaterbump.h" #include "llfloatercamera.h" -#include "llfloaterchat.h" #include "llfloaterchatterbox.h" #include "llfloaterdaycycle.h" #include "llfloatersearch.h" @@ -154,7 +153,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + //LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fe82da960c..db462dee44 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -52,7 +52,6 @@ #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" -#include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloaterchatterbox.h" #include "llfloatergodtools.h" @@ -6381,51 +6380,8 @@ class LLToolsSelectedScriptAction : public view_listener_t void handle_selected_texture_info(void*) { - for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); - iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) - { - LLSelectNode* node = *iter; - - std::string msg; - msg.assign("Texture info for: "); - msg.append(node->mName); - LLChat chat(msg); - LLFloaterChat::addChat(chat); - - U8 te_count = node->getObject()->getNumTEs(); - // map from texture ID to list of faces using it - typedef std::map< LLUUID, std::vector > map_t; - map_t faces_per_texture; - for (U8 i = 0; i < te_count; i++) - { - if (!node->isTESelected(i)) continue; - - LLViewerTexture* img = node->getObject()->getTEImage(i); - LLUUID image_id = img->getID(); - faces_per_texture[image_id].push_back(i); - } - // Per-texture, dump which faces are using it. - map_t::iterator it; - for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) - { - LLUUID image_id = it->first; - U8 te = it->second[0]; - LLViewerTexture* img = node->getObject()->getTEImage(te); - S32 height = img->getHeight(); - S32 width = img->getWidth(); - S32 components = img->getComponents(); - msg = llformat("%dx%d %s on face ", - width, - height, - (components == 4 ? "alpha" : "opaque")); - for (U8 i = 0; i < it->second.size(); ++i) - { - msg.append( llformat("%d ", (S32)(it->second[i]))); - } - LLChat chat(msg); - LLFloaterChat::addChat(chat); - } - } + //useless without LLFloaterChat + //as since we don't use LLFloaterChat... } void handle_test_male(void*) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4999ac000e..21ba0b1a95 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -54,7 +54,6 @@ #include "llfirstuse.h" #include "llfloaterbuycurrency.h" #include "llfloaterbuyland.h" -#include "llfloaterchat.h" #include "llfloaterland.h" #include "llfloaterregioninfo.h" #include "llfloaterlandholdings.h" @@ -834,9 +833,11 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } message << ", automatic preview disabled for " << OFFER_THROTTLE_TIME << " seconds."; - chat.mText = message.str(); + + //* TODO - cleanup or transfer to nearby chat + //chat.mText = message.str(); //this is kinda important, so actually put it on screen - LLFloaterChat::addChat(chat, FALSE, FALSE); + //LLFloaterChat::addChat(chat, FALSE, FALSE); throttle_logged=true; } return false; @@ -1177,8 +1178,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - chat.mText = log_message; - LLFloaterChat::addChatHistory(chat); + //* TODO - cleanup or transfer to nearby chat + //chat.mText = log_message; + //LLFloaterChat::addChatHistory(chat); } break; @@ -1350,9 +1352,10 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - chat.mText = log_message; - LLFloaterChat::addChatHistory(chat); + //* TODO - cleanup or transfer to nearby chat + //log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + //chat.mText = log_message; + //LLFloaterChat::addChatHistory(chat); } // we will want to open this item when it comes back. @@ -1394,13 +1397,17 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); + //* TODO - cleaup or transfer to nearby chat + /* log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; chat.mText = log_message; if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 { chat.mMuted = TRUE; } + LLFloaterChat::addChatHistory(chat); + */ if (busy && (!mFromGroup && !mFromObject)) { @@ -1762,10 +1769,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, 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; - LLFloaterChat::addChat( chat, TRUE, TRUE ); } else if (from_id.isNull()) { @@ -1821,19 +1824,19 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message; - - BOOL local_agent = FALSE; - LLFloaterChat::addChat( chat, TRUE, local_agent ); } else { // muted user, so don't start an IM session, just record line in chat // history. Pretend the chat is from a local agent, // so it will go into the history but not be shown on screen. + + //* TODO - cleaup or transfer to nearby chat + /* chat.mText = buffer; BOOL local_agent = TRUE; LLFloaterChat::addChat( chat, TRUE, local_agent ); + */ } } break; @@ -2130,9 +2133,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); - - chat.mText = std::string("IM: ") + name + separator_string + saved + message; - LLFloaterChat::addChat(chat, TRUE, is_this_agent); } break; @@ -2637,22 +2637,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mMuted = is_muted && !is_linden; - if (!visible_in_chat_bubble - && (is_linden || !is_busy || is_owned_by_me)) - { - // show on screen and add to history - LLNotificationsUI::LLNotificationManager::instance().onChat( - chat, LLNotificationsUI::NT_NEARBYCHAT); - - LLFloaterChat::addChat(chat, FALSE, FALSE); - } - else - { - LLNotificationsUI::LLNotificationManager::instance().onChat( + LLNotificationsUI::LLNotificationManager::instance().onChat( chat, LLNotificationsUI::NT_NEARBYCHAT); - // adding temporarily - LLFloaterChat::addChatHistory(chat); - } } } @@ -3037,9 +3023,12 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (avatarp) { // Chat the "back" SLURL. (DEV-4907) + //* TODO - cleaup or transfer to nearby chat + /* LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); chat.mSourceType = CHAT_SOURCE_SYSTEM; LLFloaterChat::addChatHistory(chat); + */ // Set the new position avatarp->setPositionAgent(agent_pos); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 300aea1620..2e92512b31 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -37,7 +37,6 @@ #include "llagent.h" #include "llaudioengine.h" #include "llavataractions.h" -#include "llfloaterchat.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ddaf4a221c..2e2f839dce 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -101,7 +101,6 @@ #include "llfloaterbuildoptions.h" #include "llfloaterbuyland.h" #include "llfloatercamera.h" -#include "llfloaterchat.h" #include "llfloaterchatterbox.h" #include "llfloatercustomize.h" #include "llfloaterland.h" diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 42b8a1c2b6..107ccd35a8 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -70,7 +70,6 @@ #include "llvoicechannel.h" #include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel -#include "llfloaterchat.h" // for LLFloaterChat::addChat() // for base64 decoding #include "apr_base64.h" @@ -4709,10 +4708,6 @@ void LLVoiceClient::messageEvent( LLUUID::null, // default arg LLVector3::zero, // default arg true); // prepend name and make it a link to the user's profile - - chat.mText = std::string("IM: ") + session->mName + std::string(": ") + message; - // If the chat should come in quietly (i.e. we're in busy mode), pretend it's from a local agent. - LLFloaterChat::addChat( chat, TRUE, quiet_chat ); } } } -- cgit v1.2.3 From a6429a6a14a2e40eae9ae623f3efb9244fa0748a Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Tue, 19 Jan 2010 08:15:50 +0200 Subject: Fixed low bug EXT - 3703 (Startup toast message doesn't fit toast width) --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 21 ++++++++++++++++++++- indra/newview/skins/default/xui/en/panel_toast.xml | 3 ++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 0adc9fc258..a00b6a9288 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -47,6 +47,7 @@ #include "llsyswellwindow.h" #include "llimfloater.h" #include "llscriptfloater.h" +#include "llfontgl.h" #include @@ -568,6 +569,7 @@ void LLScreenChannel::showToastsTop() void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) { LLRect toast_rect; + LLRect tbox_rect; LLToast::Params p; p.lifetime_secs = timer; p.enable_hide_btn = false; @@ -582,9 +584,26 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) std::string text = LLTrans::getString("StartUpNotifications"); + tbox_rect = text_box->getRect(); + S32 tbox_width = tbox_rect.getWidth(); + S32 tbox_vpad = text_box->getVPad(); + S32 text_width = text_box->getDefaultFont()->getWidth(text); + S32 text_height = text_box->getTextPixelHeight(); + + // EXT - 3703 (Startup toast message doesn't fit toast width) + // Calculating TextBox HEIGHT needed to include the whole string according to the given WIDTH of the TextBox. + S32 new_tbox_height = (text_width/tbox_width + 1) * text_height; + // Calculating TOP position of TextBox + S32 new_tbox_top = new_tbox_height + tbox_vpad + gSavedSettings.getS32("ToastGap"); + // Calculating toast HEIGHT according to the new TextBox size + S32 toast_height = new_tbox_height + tbox_vpad * 2; + + tbox_rect.setLeftTopAndSize(tbox_rect.mLeft, new_tbox_top, tbox_rect.getWidth(), new_tbox_height); + text_box->setRect(tbox_rect); + toast_rect = mStartUpToastPanel->getRect(); mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true); - toast_rect.setLeftTopAndSize(0, toast_rect.getHeight()+gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight()); + toast_rect.setLeftTopAndSize(0, toast_height + gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_height); mStartUpToastPanel->setRect(toast_rect); text_box->setValue(text); diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml index ba2d61afb7..d198237e5d 100644 --- a/indra/newview/skins/default/xui/en/panel_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_toast.xml @@ -39,7 +39,8 @@ name="toast_text" word_wrap="true" text_color="white" - top="5" + top="5" + v_pad="5" use_ellipses="true" width="260"> Toast text; -- cgit v1.2.3 From a23277a6733da4789746b4ea7ce319015c5ff343 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 19 Jan 2010 11:25:25 +0200 Subject: a bit more to removing LLFloaterChat - add some system notifications --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 58 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 21ba0b1a95..13d9b761ab 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -834,10 +834,11 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) message << ", automatic preview disabled for " << OFFER_THROTTLE_TIME << " seconds."; - //* TODO - cleanup or transfer to nearby chat - //chat.mText = message.str(); - //this is kinda important, so actually put it on screen - //LLFloaterChat::addChat(chat, FALSE, FALSE); + //this is kinda important, so actually put it on screen + LLSD args; + args["MESSAGE"] = message; + LLNotificationsUtil::add("SystemMessage", args); + throttle_logged=true; } return false; @@ -1178,9 +1179,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //* TODO - cleanup or transfer to nearby chat - //chat.mText = log_message; - //LLFloaterChat::addChatHistory(chat); + LLSD args; + args["MESSAGE"] = log_message; + LLNotificationsUtil::add("SystemMessage", args); } break; @@ -1352,10 +1353,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - //* TODO - cleanup or transfer to nearby chat - //log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //chat.mText = log_message; - //LLFloaterChat::addChatHistory(chat); + log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + //TODO* should go to history only - how? + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); } // we will want to open this item when it comes back. @@ -1397,17 +1399,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); - //* TODO - cleaup or transfer to nearby chat - /* - log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; - chat.mText = log_message; - if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269 - { - chat.mMuted = TRUE; - } - - LLFloaterChat::addChatHistory(chat); - */ + //TODO* should go to message history only... + //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); if (busy && (!mFromGroup && !mFromObject)) { @@ -1831,7 +1827,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // history. Pretend the chat is from a local agent, // so it will go into the history but not be shown on screen. - //* TODO - cleaup or transfer to nearby chat + //TODO* should go to message hisyory only + //and this is not system message... + //LLSD args; + //args["MESSAGE"] = buffer; + //LLNotificationsUtil::add("SystemMessage", args); + /* chat.mText = buffer; BOOL local_agent = TRUE; @@ -3023,12 +3024,11 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (avatarp) { // Chat the "back" SLURL. (DEV-4907) - //* TODO - cleaup or transfer to nearby chat - /* - LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); - chat.mSourceType = CHAT_SOURCE_SYSTEM; - LLFloaterChat::addChatHistory(chat); - */ + + //should go to history only so leave commented + //LLSD args; + //args["MESSAGE"] = message; + //LLNotificationsUtil::add("SystemMessage", args); // Set the new position avatarp->setPositionAgent(agent_pos); -- cgit v1.2.3 From 8bc11c7355573846e14cef30c9603161c9f88a08 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 19 Jan 2010 11:40:18 +0200 Subject: fix link error... --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 43 ++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 13d9b761ab..880892239e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -834,10 +834,11 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) message << ", automatic preview disabled for " << OFFER_THROTTLE_TIME << " seconds."; - //this is kinda important, so actually put it on screen - LLSD args; - args["MESSAGE"] = message; - LLNotificationsUtil::add("SystemMessage", args); + //this is kinda important, so actually put it on screen + std::string log_msg = message.str(); + LLSD args; + args["MESSAGE"] = log_msg; + LLNotificationsUtil::add("SystemMessage", args); throttle_logged=true; } @@ -1179,9 +1180,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - LLSD args; - args["MESSAGE"] = log_message; - LLNotificationsUtil::add("SystemMessage", args); + LLSD args; + args["MESSAGE"] = log_message; + LLNotificationsUtil::add("SystemMessage", args); } break; @@ -1353,11 +1354,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //TODO* should go to history only - how? - //LLSD args; - //args["MESSAGE"] = log_message; - //LLNotificationsUtil::add("SystemMessage", args); + log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); + //TODO* should go to history only - how? + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); } // we will want to open this item when it comes back. @@ -1401,9 +1402,9 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //TODO* should go to message history only... //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; - //LLSD args; - //args["MESSAGE"] = log_message; - //LLNotificationsUtil::add("SystemMessage", args); + //LLSD args; + //args["MESSAGE"] = log_message; + //LLNotificationsUtil::add("SystemMessage", args); if (busy && (!mFromGroup && !mFromObject)) { @@ -1829,9 +1830,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) //TODO* should go to message hisyory only //and this is not system message... - //LLSD args; - //args["MESSAGE"] = buffer; - //LLNotificationsUtil::add("SystemMessage", args); + //LLSD args; + //args["MESSAGE"] = buffer; + //LLNotificationsUtil::add("SystemMessage", args); /* chat.mText = buffer; @@ -3026,9 +3027,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) // Chat the "back" SLURL. (DEV-4907) //should go to history only so leave commented - //LLSD args; - //args["MESSAGE"] = message; - //LLNotificationsUtil::add("SystemMessage", args); + //LLSD args; + //args["MESSAGE"] = message; + //LLNotificationsUtil::add("SystemMessage", args); // Set the new position avatarp->setPositionAgent(agent_pos); -- cgit v1.2.3 From 862ca3fa1628b0cef2e3db22f6c917a85492216f Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 19 Jan 2010 12:42:33 +0200 Subject: Fixed major bug EXT-4206 - Bottom bar spec calls for button background art on IM Chiclets. --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 57 ++++++++++++++++++++++ indra/newview/llchiclet.h | 19 +++++++- indra/newview/llimfloater.cpp | 13 +++++ indra/newview/llscriptfloater.cpp | 26 ++++++++++ indra/newview/llscriptfloater.h | 4 ++ .../default/xui/en/widgets/chiclet_im_adhoc.xml | 13 ++++- .../default/xui/en/widgets/chiclet_im_group.xml | 16 ++++-- .../default/xui/en/widgets/chiclet_im_p2p.xml | 15 ++++-- .../skins/default/xui/en/widgets/chiclet_offer.xml | 14 ++++-- .../default/xui/en/widgets/chiclet_script.xml | 14 ++++-- 10 files changed, 175 insertions(+), 16 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 5cbe6f9670..f21fbbe6f5 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -453,6 +453,7 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) , mNewMessagesIcon(NULL) , mSpeakerCtrl(NULL) , mCounterCtrl(NULL) +, mChicletButton(NULL) { enableCounterControl(p.enable_counter); } @@ -576,6 +577,11 @@ void LLIMChiclet::onMouseDown() setCounter(0); } +void LLIMChiclet::setToggleState(bool toggle) +{ + mChicletButton->setToggleState(toggle); +} + BOOL LLIMChiclet::handleMouseDown(S32 x, S32 y, MASK mask) { onMouseDown(); @@ -634,6 +640,7 @@ LLIMChiclet::EType LLIMChiclet::getIMSessionType(const LLUUID& session_id) LLIMP2PChiclet::Params::Params() : avatar_icon("avatar_icon") +, chiclet_button("chiclet_button") , unread_notifications("unread_notifications") , speaker("speaker") , new_message_icon("new_message_icon") @@ -646,6 +653,10 @@ LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) , mChicletIconCtrl(NULL) , mPopupMenu(NULL) { + LLButton::Params button_params = p.chiclet_button; + mChicletButton = LLUICtrlFactory::create(button_params); + addChild(mChicletButton); + LLIconCtrl::Params new_msg_params = p.new_message_icon; mNewMessagesIcon = LLUICtrlFactory::create(new_msg_params); addChild(mNewMessagesIcon); @@ -760,6 +771,7 @@ void LLIMP2PChiclet::onMenuItemClicked(const LLSD& user_data) LLAdHocChiclet::Params::Params() : avatar_icon("avatar_icon") +, chiclet_button("chiclet_button") , unread_notifications("unread_notifications") , speaker("speaker") , new_message_icon("new_message_icon") @@ -773,6 +785,10 @@ LLAdHocChiclet::LLAdHocChiclet(const Params& p) , mChicletIconCtrl(NULL) , mPopupMenu(NULL) { + LLButton::Params button_params = p.chiclet_button; + mChicletButton = LLUICtrlFactory::create(button_params); + addChild(mChicletButton); + LLIconCtrl::Params new_msg_params = p.new_message_icon; mNewMessagesIcon = LLUICtrlFactory::create(new_msg_params); addChild(mNewMessagesIcon); @@ -887,6 +903,7 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) LLIMGroupChiclet::Params::Params() : group_icon("group_icon") +, chiclet_button("chiclet_button") , unread_notifications("unread_notifications") , speaker("speaker") , new_message_icon("new_message_icon") @@ -900,6 +917,10 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p) , mChicletIconCtrl(NULL) , mPopupMenu(NULL) { + LLButton::Params button_params = p.chiclet_button; + mChicletButton = LLUICtrlFactory::create(button_params); + addChild(mChicletButton); + LLIconCtrl::Params new_msg_params = p.new_message_icon; mNewMessagesIcon = LLUICtrlFactory::create(new_msg_params); addChild(mNewMessagesIcon); @@ -1414,6 +1435,32 @@ S32 LLChicletPanel::notifyParent(const LLSD& info) return LLPanel::notifyParent(info); } +void LLChicletPanel::setChicletToggleState(const LLUUID& session_id, bool toggle) +{ + if(session_id.isNull()) + { + llwarns << "Null Session ID" << llendl; + } + + // toggle off all chiclets, except specified + S32 size = getChicletCount(); + for(int n = 0; n < size; ++n) + { + LLIMChiclet* chiclet = getChiclet(n); + if(chiclet && chiclet->getSessionId() != session_id) + { + chiclet->setToggleState(false); + } + } + + // toggle specified chiclet + LLIMChiclet* chiclet = findChiclet(session_id); + if(chiclet) + { + chiclet->setToggleState(toggle); + } +} + void LLChicletPanel::arrange() { if(mChicletList.empty()) @@ -1806,6 +1853,7 @@ LLChicletSpeakerCtrl::LLChicletSpeakerCtrl(const Params&p) LLScriptChiclet::Params::Params() : icon("icon") + , chiclet_button("chiclet_button") , new_message_icon("new_message_icon") { } @@ -1814,6 +1862,10 @@ LLScriptChiclet::LLScriptChiclet(const Params&p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) { + LLButton::Params button_params = p.chiclet_button; + mChicletButton = LLUICtrlFactory::create(button_params); + addChild(mChicletButton); + LLIconCtrl::Params new_msg_params = p.new_message_icon; mNewMessagesIcon = LLUICtrlFactory::create(new_msg_params); addChild(mNewMessagesIcon); @@ -1862,6 +1914,7 @@ static const std::string INVENTORY_USER_OFFER ("UserGiveItem"); LLInvOfferChiclet::Params::Params() : icon("icon") + , chiclet_button("chiclet_button") , new_message_icon("new_message_icon") { } @@ -1870,6 +1923,10 @@ LLInvOfferChiclet::LLInvOfferChiclet(const Params&p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) { + LLButton::Params button_params = p.chiclet_button; + mChicletButton = LLUICtrlFactory::create(button_params); + addChild(mChicletButton); + LLIconCtrl::Params new_msg_params = p.new_message_icon; mNewMessagesIcon = LLUICtrlFactory::create(new_msg_params); addChild(mNewMessagesIcon); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 3665e4d093..ae5b2148db 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -422,6 +422,8 @@ public: */ virtual void onMouseDown(); + virtual void setToggleState(bool toggle); + protected: LLIMChiclet(const LLIMChiclet::Params& p); @@ -438,7 +440,7 @@ protected: LLIconCtrl* mNewMessagesIcon; LLChicletNotificationCounterCtrl* mCounterCtrl; LLChicletSpeakerCtrl* mSpeakerCtrl; - + LLButton* mChicletButton; /** the id of another participant, either an avatar id or a group id*/ LLUUID mOtherParticipantId; @@ -473,6 +475,8 @@ class LLIMP2PChiclet : public LLIMChiclet public: struct Params : public LLInitParam::Block { + Optional chiclet_button; + Optional avatar_icon; Optional unread_notifications; @@ -538,6 +542,8 @@ class LLAdHocChiclet : public LLIMChiclet public: struct Params : public LLInitParam::Block { + Optional chiclet_button; + Optional avatar_icon; Optional unread_notifications; @@ -614,6 +620,8 @@ public: struct Params : public LLInitParam::Block { + Optional chiclet_button; + Optional icon; Optional new_message_icon; @@ -656,6 +664,8 @@ public: struct Params : public LLInitParam::Block { + Optional chiclet_button; + Optional icon; Optional new_message_icon; @@ -697,6 +707,8 @@ public: struct Params : public LLInitParam::Block { + Optional chiclet_button; + Optional group_icon; Optional unread_notifications; @@ -1040,6 +1052,11 @@ public: S32 notifyParent(const LLSD& info); + /** + * Toggle chiclet by session id ON and toggle OFF all other chiclets. + */ + void setChicletToggleState(const LLUUID& session_id, bool toggle); + protected: LLChicletPanel(const Params&p); friend class LLUICtrlFactory; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index aee34eb0af..eb3f1b1d10 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -115,6 +115,8 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) void LLIMFloater::onFocusLost() { LLIMModel::getInstance()->resetActiveSessionID(); + + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, false); } void LLIMFloater::onFocusReceived() @@ -126,6 +128,8 @@ void LLIMFloater::onFocusReceived() { mInputEditor->setFocus(TRUE); } + + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true); } // virtual @@ -490,6 +494,15 @@ void LLIMFloater::setVisible(BOOL visible) updateMessages(); mInputEditor->setFocus(TRUE); } + + if(!visible) + { + LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet(mSessionID); + if(chiclet) + { + chiclet->setToggleState(false); + } + } } //static diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index cf62d47362..0d9cf06bc3 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -72,6 +72,9 @@ LLScriptFloater::LLScriptFloater(const LLSD& key) bool LLScriptFloater::toggle(const LLUUID& object_id) { + // Force chiclet toggle on here because first onFocusReceived() will not toggle it on. + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(object_id, true); + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", notification_id); @@ -180,6 +183,15 @@ void LLScriptFloater::setVisible(BOOL visible) LLDockableFloater::setVisible(visible); hideToastsIfNeeded(); + + if(!visible) + { + LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet(getObjectId()); + if(chiclet) + { + chiclet->setToggleState(false); + } + } } void LLScriptFloater::onMouseDown() @@ -199,6 +211,20 @@ void LLScriptFloater::onMouseDown() } } +void LLScriptFloater::onFocusLost() +{ + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(getObjectId(), false); +} + +void LLScriptFloater::onFocusReceived() +{ + // first focus will be received before setObjectId() call - don't toggle chiclet + if(getObjectId().notNull()) + { + LLBottomTray::getInstance()->getChicletPanel()->setChicletToggleState(getObjectId(), true); + } +} + void LLScriptFloater::hideToastsIfNeeded() { using namespace LLNotificationsUI; diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index ed10dc5fe9..f86605c5d1 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -174,6 +174,10 @@ protected: */ void onMouseDown(); + /*virtual*/ void onFocusLost(); + + /*virtual*/ void onFocusReceived(); + private: LLToastNotifyPanel* mScriptForm; LLUUID mObjectId; diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml index 693c43f141..2bec5b8a29 100644 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_im_adhoc.xml @@ -4,6 +4,13 @@ name="im_adhoc_chiclet" show_speaker="false" width="25"> + + width="19" /> + + width="19" /> + + width="19" /> + + width="19" /> + + width="19"/> Date: Tue, 19 Jan 2010 13:23:51 +0200 Subject: Fixed EXT-3818 [BSI] plain text chat has too much space between lines by redoing fix for the EXT-3263 Cut and Paste from text chat loses new lines --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2fc83c7e54..977f5c2bd0 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -577,23 +577,17 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ view->reshape(target_rect.getWidth(), view->getRect().getHeight()); view->setOrigin(target_rect.mLeft, view->getRect().mBottom); - std::string header_text = "[" + chat.mTimeStr + "] "; + std::string widget_associated_text = "\n[" + chat.mTimeStr + "] "; if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM) - header_text += chat.mFromName + delimiter; + widget_associated_text += chat.mFromName + delimiter; - mEditor->appendWidget(p, header_text, false); + mEditor->appendWidget(p, widget_associated_text, false); mLastFromName = chat.mFromName; mLastFromID = chat.mFromID; mLastMessageTime = new_message_time; } std::string message = irc_me ? chat.mText.substr(3) : chat.mText; - if ( message.size() > 0 && !LLStringOps::isSpace(message[message.size() - 1]) ) - { - // Ensure that message ends with NewLine, to avoid losing of new lines - // while copy/paste from text chat. See EXT-3263. - message += NEW_LINE; - } mEditor->appendText(message, FALSE, style_params); mEditor->blockUndo(); -- cgit v1.2.3 From 4610e911c959cdd21728822ae80b9e717ccd3012 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 19 Jan 2010 16:39:03 +0200 Subject: working on floaters rezise-position bugs: EXT-4414, EXT-2625 --HG-- branch : product-engine --- indra/llui/llfloater.cpp | 15 +++----- indra/llui/llresizehandle.cpp | 81 ++++++++++++++++++++---------------------- indra/newview/llbottomtray.cpp | 5 +++ 3 files changed, 49 insertions(+), 52 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a17e306325..194325cc20 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2360,7 +2360,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out LLRect::tCoordType screen_width = getSnapRect().getWidth(); LLRect::tCoordType screen_height = getSnapRect().getHeight(); - + // only automatically resize non-minimized, resizable floaters if( floater->isResizable() && !floater->isMinimized() ) { @@ -2385,16 +2385,11 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out new_width = llmax(new_width, min_width); new_height = llmax(new_height, min_height); - floater->reshape( new_width, new_height, TRUE ); - if (floater->followsRight()) - { - floater->translate(old_width - new_width, 0); - } + LLRect new_rect; + new_rect.setLeftTopAndSize(view_rect.mTop,view_rect.mLeft,new_width, new_height); - if (floater->followsTop()) - { - floater->translate(0, old_height - new_height); - } + floater->reshape( new_width, new_height, TRUE ); + floater->setRect(new_rect); } } diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index 6239a8f721..3df09d124a 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -124,7 +124,7 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) { // Make sure the mouse in still over the application. We don't want to make the parent // so big that we can't see the resize handle any more. - + S32 screen_x; S32 screen_y; localPointToScreen(x, y, &screen_x, &screen_y); @@ -146,68 +146,61 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) LLRect scaled_rect = orig_rect; S32 delta_x = screen_x - mDragLastScreenX; S32 delta_y = screen_y - mDragLastScreenY; + + if(delta_x == 0 && delta_y == 0) + return FALSE; + LLCoordGL mouse_dir; // use hysteresis on mouse motion to preserve user intent when mouse stops moving mouse_dir.mX = (screen_x == mLastMouseScreenX) ? mLastMouseDir.mX : screen_x - mLastMouseScreenX; mouse_dir.mY = (screen_y == mLastMouseScreenY) ? mLastMouseDir.mY : screen_y - mLastMouseScreenY; + mLastMouseScreenX = screen_x; mLastMouseScreenY = screen_y; mLastMouseDir = mouse_dir; - S32 x_multiple = 1; - S32 y_multiple = 1; - switch( mCorner ) - { - case LEFT_TOP: - x_multiple = -1; - y_multiple = 1; - break; - case LEFT_BOTTOM: - x_multiple = -1; - y_multiple = -1; - break; - case RIGHT_TOP: - x_multiple = 1; - y_multiple = 1; - break; - case RIGHT_BOTTOM: - x_multiple = 1; - y_multiple = -1; - break; - } + S32 new_width = orig_rect.getWidth(); + S32 new_height = orig_rect.getHeight(); - S32 new_width = orig_rect.getWidth() + x_multiple * delta_x; - if( new_width < mMinWidth ) - { - new_width = mMinWidth; - delta_x = x_multiple * (mMinWidth - orig_rect.getWidth()); - } - - S32 new_height = orig_rect.getHeight() + y_multiple * delta_y; - if( new_height < mMinHeight ) - { - new_height = mMinHeight; - delta_y = y_multiple * (mMinHeight - orig_rect.getHeight()); - } + S32 new_pos_x = orig_rect.mLeft; + S32 new_pos_y = orig_rect.mTop; switch( mCorner ) { - case LEFT_TOP: - scaled_rect.translate(delta_x, 0); + case LEFT_TOP: + new_width-=delta_x; + new_height+=delta_y; + new_pos_x+=delta_x; + new_pos_y+=delta_y; break; case LEFT_BOTTOM: - scaled_rect.translate(delta_x, delta_y); + new_width-=delta_x; + new_height-=delta_y; + new_pos_x+=delta_x; break; case RIGHT_TOP: + new_width+=delta_x; + new_height+=delta_y; + new_pos_y+=delta_y; break; case RIGHT_BOTTOM: - scaled_rect.translate(0, delta_y); + new_width+=delta_x; + new_height-=delta_y; break; } + new_width = llmax(new_width,mMinWidth); + new_height = llmax(new_height,mMinHeight); + + LLRect::tCoordType screen_width = resizing_view->getParent()->getSnapRect().getWidth(); + LLRect::tCoordType screen_height = resizing_view->getParent()->getSnapRect().getHeight(); + + new_width = llmin(new_width, screen_width); + new_height = llmin(new_height, screen_height); + // temporarily set new parent rect - scaled_rect.mRight = scaled_rect.mLeft + new_width; - scaled_rect.mTop = scaled_rect.mBottom + new_height; + scaled_rect.setLeftTopAndSize(new_pos_x,new_pos_y,new_width,new_height); + resizing_view->setRect(scaled_rect); LLView* snap_view = NULL; @@ -258,7 +251,11 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) resizing_view->setRect(orig_rect); // translate and scale to new shape - resizing_view->setShape(scaled_rect, true); + resizing_view->reshape(scaled_rect.getWidth(),scaled_rect.getHeight()); + resizing_view->setRect(scaled_rect); + //set shape to handle dependent floaters... + resizing_view->handleReshape(scaled_rect, false); + // update last valid mouse cursor position based on resized view's actual size LLRect new_rect = resizing_view->getRect(); diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 8a7ed23b59..bbdaf5449f 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -325,6 +325,11 @@ void LLBottomTray::setVisible(BOOL visible) } } } + + if(visible) + gFloaterView->setSnapOffsetBottom(getRect().getHeight()); + else + gFloaterView->setSnapOffsetBottom(0); } void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask) -- cgit v1.2.3 From 00c05a885fb1cbee967065798f57d74bf47f2478 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 19 Jan 2010 16:42:55 +0200 Subject: fixed EXT-3609 IM Floater that Opens Upon Friendship Acceptance Shows Accepting Av as Offline When They Aren't --HG-- branch : product-engine --- indra/newview/llimview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index f751fa2273..23822cef35 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2404,7 +2404,9 @@ LLUUID LLIMMgr::addSession( //we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions if (!new_session) return session_id; - noteOfflineUsers(session_id, floater, ids); + //Per Plan's suggestion commented "explicit offline status warning" out to make Dessie happier (see EXT-3609) + //*TODO After February 2010 remove this commented out line if no one will be missing that warning + //noteOfflineUsers(session_id, floater, ids); // Only warn for regular IMs - not group IMs if( dialog == IM_NOTHING_SPECIAL ) -- cgit v1.2.3 From d970835f411c16e685915bf344c01f207e57c905 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 20 Jan 2010 15:26:29 +0200 Subject: Fixed magor bug EXT-3889 (Group IM window voice icons do not show who has joined the group voice call) - processing agent's speaking indicators in avatar lists in the same way as others (if voice is disabled indicators are invisible) --HG-- branch : product-engine --- indra/newview/llspeakingindicatormanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index b450d38b5a..5e1d408e8d 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -36,7 +36,6 @@ #include "llspeakingindicatormanager.h" -#include "llagentdata.h" #include "llvoicechannel.h" #include "llvoiceclient.h" @@ -134,7 +133,7 @@ private: ////////////////////////////////////////////////////////////////////////// void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator) { - if (speaker_id == gAgentID) return; + // do not exclude agent's indicators. They should be processed in the same way as others. See EXT-3889. LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << LL_ENDL; speaking_indicator_value_t value_type(speaker_id, speaking_indicator); -- cgit v1.2.3 From 3324c736d7df4035bc73b5f27c8eea756ff43234 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 20 Jan 2010 15:41:48 +0200 Subject: =?UTF-8?q?fixed=20=20EXT-4515=20=E2=80=9CCrash=20when=20ending=20?= =?UTF-8?q?an=20IM=20session=E2=80=9D,=20corrected=20chiclet=20destroying;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 1d739f07b1..5497d6121f 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1293,11 +1293,12 @@ void LLChicletPanel::onChicletClick(LLUICtrl*ctrl,const LLSD¶m) void LLChicletPanel::removeChiclet(chiclet_list_t::iterator it) { - mScrollArea->removeChild(*it); + LLChiclet* chiclet = *it; + mScrollArea->removeChild(chiclet); mChicletList.erase(it); arrange(); - (*it)->die(); + chiclet->die(); } void LLChicletPanel::removeChiclet(S32 index) -- cgit v1.2.3 From a719c3631a06169c4cd1caca9a35ba5f2edc7981 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 20 Jan 2010 16:25:26 +0200 Subject: Fixed major bug EXT-4364 ( Crash clicking "View IM & Chat" when someone else joins group call) - disabled processing of Incoming dialog buttons' clicks after viewer is disconnected --HG-- branch : product-engine --- indra/newview/llimview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6064415a10..3ff156eca3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -45,6 +45,7 @@ #include "lluictrlfactory.h" #include "llagent.h" +#include "llappviewer.h" #include "llavatariconctrl.h" #include "llbottomtray.h" #include "llcallingcard.h" @@ -1855,7 +1856,7 @@ void LLIncomingCallDialog::onStartIM(void* user_data) void LLIncomingCallDialog::processCallResponse(S32 response) { - if (!gIMMgr) + if (!gIMMgr || gDisconnected) return; LLUUID session_id = mPayload["session_id"].asUUID(); -- cgit v1.2.3 From 086135b6849bad2e3a5ddcf9bb9540fdb6fb72dd Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Wed, 20 Jan 2010 17:11:29 +0200 Subject: more on removing LLFloaterChat there was some places with messages that (as I think) should not go to nearby chat. but still probably should go somewhere... code is commented and messages are marked with: //TODO* CHAT: how to show this? --HG-- branch : product-engine --- indra/newview/llcompilequeue.cpp | 10 ++++++++ indra/newview/llviewermenu.cpp | 50 +++++++++++++++++++++++++++++++++++++-- indra/newview/llviewermessage.cpp | 14 ++++------- 3 files changed, 62 insertions(+), 12 deletions(-) diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 72074955d1..47f1b7c9f5 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -446,10 +446,20 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ) { + //TODO* CHAT: how to show this? + //LLSD args; + //args["MESSAGE"] = LLTrans::getString("CompileQueueScriptNotFound); + //LLNotificationsUtil::add("SystemMessage", args); + buffer = LLTrans::getString("CompileQueueProblemDownloading") + (": ") + data->mScriptName; } else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status) { + //TODO* CHAT: how to show this? + //LLSD args; + //args["MESSAGE"] = LLTrans::getString("CompileQueueScriptNotFound); + //LLNotificationsUtil::add("SystemMessage", args); + buffer = LLTrans::getString("CompileQueueInsufficientPermFor") + (": ") + data->mScriptName; } else diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d96d7df24a..5692ccee29 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6373,8 +6373,54 @@ class LLToolsSelectedScriptAction : public view_listener_t void handle_selected_texture_info(void*) { - //useless without LLFloaterChat - //as since we don't use LLFloaterChat... + for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); + iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) + { + LLSelectNode* node = *iter; + + std::string msg; + msg.assign("Texture info for: "); + msg.append(node->mName); + LLChat chat(msg); + LLFloaterChat::addChat(chat); + + U8 te_count = node->getObject()->getNumTEs(); + // map from texture ID to list of faces using it + typedef std::map< LLUUID, std::vector > map_t; + map_t faces_per_texture; + for (U8 i = 0; i < te_count; i++) + { + if (!node->isTESelected(i)) continue; + + LLViewerTexture* img = node->getObject()->getTEImage(i); + LLUUID image_id = img->getID(); + faces_per_texture[image_id].push_back(i); + } + // Per-texture, dump which faces are using it. + map_t::iterator it; + for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) + { + LLUUID image_id = it->first; + U8 te = it->second[0]; + LLViewerTexture* img = node->getObject()->getTEImage(te); + S32 height = img->getHeight(); + S32 width = img->getWidth(); + S32 components = img->getComponents(); + msg = llformat("%dx%d %s on face ", + width, + height, + (components == 4 ? "alpha" : "opaque")); + for (U8 i = 0; i < it->second.size(); ++i) + { + msg.append( llformat("%d ", (S32)(it->second[i]))); + } + + //TODO* CHAT: how to show this? + //LLSD args; + //args["MESSAGE"] = msg; + //LLNotificationsUtil::add("SystemMessage", args); + } + } } void handle_test_male(void*) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5279c4174a..8372711cd1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1356,7 +1356,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const if (check_offer_throttle(mFromName, true)) { log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + mDesc + LLTrans::getString("."); - //TODO* should go to history only - how? + //TODO* CHAT: how to show this? //LLSD args; //args["MESSAGE"] = log_message; //LLNotificationsUtil::add("SystemMessage", args); @@ -1401,7 +1401,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); - //TODO* should go to message history only... + //TODO* CHAT: how to show this? //log_message = LLTrans::getString("InvOfferYouDecline") + " " + mDesc + " " + LLTrans::getString("InvOfferFrom") + " " + mFromName +"."; //LLSD args; //args["MESSAGE"] = log_message; @@ -1829,17 +1829,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // history. Pretend the chat is from a local agent, // so it will go into the history but not be shown on screen. - //TODO* should go to message hisyory only + //TODO* CHAT: how to show this? //and this is not system message... //LLSD args; //args["MESSAGE"] = buffer; //LLNotificationsUtil::add("SystemMessage", args); - - /* - chat.mText = buffer; - BOOL local_agent = TRUE; - LLFloaterChat::addChat( chat, TRUE, local_agent ); - */ } } break; @@ -3076,7 +3070,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) { // Chat the "back" SLURL. (DEV-4907) - //should go to history only so leave commented + //TODO* CHAT: how to show this? //LLSD args; //args["MESSAGE"] = message; //LLNotificationsUtil::add("SystemMessage", args); -- cgit v1.2.3 From a03e00799a2fb0a293c414870184bf4ec911eb45 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 20 Jan 2010 17:24:01 +0200 Subject: fixed EXT-4428 [BSI] Chat bubble color preference doesn't honor color choice --HG-- branch : product-engine --- .../newview/skins/default/xui/en/panel_preferences_advanced.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 1e7acb566f..141678f7eb 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -34,7 +34,14 @@ name="background" tool_tip="Choose color for bubble chat" top_delta="1" - width="44" /> + width="44"> + + + Date: Wed, 20 Jan 2010 17:56:47 +0200 Subject: more on LLFloaterChat - oops...commit code with error --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5692ccee29..f1d550f625 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6381,8 +6381,11 @@ void handle_selected_texture_info(void*) std::string msg; msg.assign("Texture info for: "); msg.append(node->mName); - LLChat chat(msg); - LLFloaterChat::addChat(chat); + + //TODO* CHAT: how to show this? + //LLSD args; + //args["MESSAGE"] = msg; + //LLNotificationsUtil::add("SystemMessage", args); U8 te_count = node->getObject()->getNumTEs(); // map from texture ID to list of faces using it -- cgit v1.2.3 From 5f2669ab62b284759d0f471bca26549a1387d269 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 20 Jan 2010 18:22:56 +0200 Subject: got rid of win CR --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 86 +++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f1d550f625..3f556e5608 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6373,57 +6373,57 @@ class LLToolsSelectedScriptAction : public view_listener_t void handle_selected_texture_info(void*) { - for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); - iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) - { - LLSelectNode* node = *iter; - - std::string msg; - msg.assign("Texture info for: "); - msg.append(node->mName); - + for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); + iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) + { + LLSelectNode* node = *iter; + + std::string msg; + msg.assign("Texture info for: "); + msg.append(node->mName); + //TODO* CHAT: how to show this? //LLSD args; //args["MESSAGE"] = msg; //LLNotificationsUtil::add("SystemMessage", args); - - U8 te_count = node->getObject()->getNumTEs(); - // map from texture ID to list of faces using it - typedef std::map< LLUUID, std::vector > map_t; - map_t faces_per_texture; - for (U8 i = 0; i < te_count; i++) - { - if (!node->isTESelected(i)) continue; - - LLViewerTexture* img = node->getObject()->getTEImage(i); - LLUUID image_id = img->getID(); - faces_per_texture[image_id].push_back(i); - } - // Per-texture, dump which faces are using it. - map_t::iterator it; - for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) - { - LLUUID image_id = it->first; - U8 te = it->second[0]; - LLViewerTexture* img = node->getObject()->getTEImage(te); - S32 height = img->getHeight(); - S32 width = img->getWidth(); - S32 components = img->getComponents(); - msg = llformat("%dx%d %s on face ", - width, - height, - (components == 4 ? "alpha" : "opaque")); - for (U8 i = 0; i < it->second.size(); ++i) - { - msg.append( llformat("%d ", (S32)(it->second[i]))); - } - + + U8 te_count = node->getObject()->getNumTEs(); + // map from texture ID to list of faces using it + typedef std::map< LLUUID, std::vector > map_t; + map_t faces_per_texture; + for (U8 i = 0; i < te_count; i++) + { + if (!node->isTESelected(i)) continue; + + LLViewerTexture* img = node->getObject()->getTEImage(i); + LLUUID image_id = img->getID(); + faces_per_texture[image_id].push_back(i); + } + // Per-texture, dump which faces are using it. + map_t::iterator it; + for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) + { + LLUUID image_id = it->first; + U8 te = it->second[0]; + LLViewerTexture* img = node->getObject()->getTEImage(te); + S32 height = img->getHeight(); + S32 width = img->getWidth(); + S32 components = img->getComponents(); + msg = llformat("%dx%d %s on face ", + width, + height, + (components == 4 ? "alpha" : "opaque")); + for (U8 i = 0; i < it->second.size(); ++i) + { + msg.append( llformat("%d ", (S32)(it->second[i]))); + } + //TODO* CHAT: how to show this? //LLSD args; //args["MESSAGE"] = msg; //LLNotificationsUtil::add("SystemMessage", args); - } - } + } + } } void handle_test_male(void*) -- cgit v1.2.3 From 9c277d95b6ed91fd43aa70c433db21ae44799f42 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 20 Jan 2010 18:23:23 +0200 Subject: fixed EXT-4162 Remove "Show IMs in Nearby Chat" --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llfloaterchat.cpp | 16 ++-------------- indra/newview/llfloaterchat.h | 2 +- indra/newview/skins/default/xui/en/menu_viewer.xml | 11 ----------- 4 files changed, 3 insertions(+), 37 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 69336243da..53ac1dc0b9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3664,17 +3664,6 @@ Value - IMInChat - - Comment - Copy IM into chat console - Persist - 1 - Type - Boolean - Value - 0 - IMShowTimestamps Comment diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index c24c224133..cdb9b8edb8 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -311,7 +311,7 @@ void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data) } // Put a line of chat in all the right places -void LLFloaterChat::addChat(const LLChat& chat, BOOL from_instant_message, BOOL local_agent) +void LLFloaterChat::addChat(const LLChat& chat, BOOL local_agent) { triggerAlerts(chat.mText); @@ -321,19 +321,7 @@ void LLFloaterChat::addChat(const LLChat& chat, BOOL from_instant_message, BOOL //if(chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID.notNull()) // LLRecentPeople::instance().add(chat.mFromID); - bool add_chat = true; - bool log_chat = true; - if(from_instant_message) - { - if (!gSavedSettings.getBOOL("IMInChat")) - add_chat = false; - //log_chat = false; -} - - if (add_chat) - { - addChatHistory(chat, log_chat); - } + addChatHistory(chat, true); } // Moved from lltextparser.cpp to break llui/llaudio library dependency. diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h index 84fc199bfa..4437a0a5c2 100644 --- a/indra/newview/llfloaterchat.h +++ b/indra/newview/llfloaterchat.h @@ -61,7 +61,7 @@ public: // *TODO:Skinning - move these to LLChat (or LLViewerChat?) // Add chat to console and history list. // Color based on source, type, distance. - static void addChat(const LLChat& chat, BOOL from_im = FALSE, BOOL local_agent = FALSE); + static void addChat(const LLChat& chat, BOOL local_agent = FALSE); // Add chat to history alone. static void addChatHistory(const LLChat& chat, bool log_to_file = true); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 21fe2bb242..a98a049c17 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1603,17 +1603,6 @@ function="ToggleControl" parameter="MouseSmooth" /> - - - - Date: Wed, 20 Jan 2010 19:06:05 +0200 Subject: fix for major EXT-4414 Floaters can be expanded over bottom bar left<->top...:) --HG-- branch : product-engine --- indra/llui/llfloater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 3734a22f7e..4f519afa06 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2388,10 +2388,12 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out new_height = llmax(new_height, min_height); LLRect new_rect; - new_rect.setLeftTopAndSize(view_rect.mTop,view_rect.mLeft,new_width, new_height); + new_rect.setLeftTopAndSize(view_rect.mLeft,view_rect.mTop,new_width, new_height); floater->reshape( new_width, new_height, TRUE ); floater->setRect(new_rect); + + floater->translateIntoRect( getLocalRect(), false ); } } -- cgit v1.2.3 From 6fac1bf369f6f0fecd5724f8cff801d3b755cda0 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 19 Jan 2010 17:22:13 +0200 Subject: Fix for normal bug EXT-3749 - Clicking landmark attachment on Group notices doesn't open side panel. --HG-- branch : product-engine --- indra/newview/lllandmarklist.cpp | 6 ++++++ indra/newview/llpanelplaces.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index bd9d22c327..355f048308 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -59,6 +59,12 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t LLLandmark* landmark = get_ptr_in_map(mList, asset_uuid); if(landmark) { + if(cb && !landmark->getGlobalPos(LLVector3d())) + { + // landmark is not completely loaded yet + loaded_callback_map_t::value_type vt(asset_uuid, cb); + mLoadedCallbackMap.insert(vt); + } return landmark; } else diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 685104a8b1..59b12c7096 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -460,6 +460,8 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark) mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal); mSaveBtn->setEnabled(TRUE); + + updateVerbs(); } void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_filter) -- cgit v1.2.3 From bde7830bf531245570d5754e71f5724ead72dfc1 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 19 Jan 2010 17:58:17 +0200 Subject: =?UTF-8?q?fixed=20EXT-4478=20=E2=80=9CMemory=20leak=20in=20LLChic?= =?UTF-8?q?letPanel=E2=80=9D,=20added=20destroying=20chiclet=20on=20chicle?= =?UTF-8?q?t=20panel=20item=20remove=20event;=20made=20LLIMChiclet=20destr?= =?UTF-8?q?uctor=20virtual;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 1 + indra/newview/llchiclet.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index f21fbbe6f5..1d739f07b1 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1297,6 +1297,7 @@ void LLChicletPanel::removeChiclet(chiclet_list_t::iterator it) mChicletList.erase(it); arrange(); + (*it)->die(); } void LLChicletPanel::removeChiclet(S32 index) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index ae5b2148db..bb4846aa57 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -325,7 +325,7 @@ public: }; - /*virtual*/ ~LLIMChiclet() {}; + virtual ~LLIMChiclet() {}; /** * Sets IM session name. This name will be displayed in chiclet tooltip. -- cgit v1.2.3 From f53f65cc1a90673af0b7dde970c175ed9acd60fc Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 19 Jan 2010 18:03:25 +0200 Subject: Update for normal bug EXT-3749 - Clicking landmark attachment on Group notices doesn't open side panel. --HG-- branch : product-engine --- indra/newview/llpanellandmarkinfo.cpp | 7 +++++++ indra/newview/llpanelplaces.cpp | 16 ++++++++++++++++ indra/newview/llpanelplaces.h | 2 ++ indra/newview/llviewermessage.cpp | 1 + 4 files changed, 26 insertions(+) diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 597b8bdb2d..9654e17659 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -185,6 +185,13 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) region_z = llround(mPosRegion.mV[VZ]); } + LLSD info; + info["update_verbs"] = true; + info["global_x"] = parcel_data.global_x; + info["global_y"] = parcel_data.global_y; + info["global_z"] = parcel_data.global_z; + notifyParent(info); + if (mInfoType == CREATE_LANDMARK) { if (parcel_data.name.empty()) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 59b12c7096..a71c8d8958 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -449,6 +449,22 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) } } +S32 LLPanelPlaces::notifyParent(const LLSD& info) +{ + if(info.has("update_verbs")) + { + if(mPosGlobal.isExactlyZero()) + { + mPosGlobal.setVec(info["global_x"], info["global_y"], info["global_z"]); + } + + updateVerbs(); + + return 1; + } + return LLPanel::notifyParent(info); +} + void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark) { if (!mLandmarkInfo) diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index b134cf0cba..27b5911ebb 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -75,6 +75,8 @@ public: std::string getPlaceInfoType() { return mPlaceInfoType; } + /*virtual*/ S32 notifyParent(const LLSD& info); + private: void onLandmarkLoaded(LLLandmark* landmark); void onFilterEdit(const std::string& search_string, bool force_filter); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8372711cd1..6061d23477 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -961,6 +961,7 @@ void open_inventory_offer(const std::vector& items, const std::string& f const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") && (asset_type != LLAssetType::AT_CALLINGCARD) && (item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) && + (asset_type != LLAssetType::AT_LANDMARK) && !from_name.empty(); LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); if(active_panel) -- cgit v1.2.3 From ac8f5e6f91dab3c3cb9c2fb2ed0274e71f17f1bb Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 19 Jan 2010 18:23:42 +0200 Subject: fix for low EXT-4464 There is no visual indication of current selection while traversing Group Profile accordion using keyboard actually that was done for some reason... but I really really really don't understand them --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 9d6ba57c29..4bfe44135a 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -157,7 +157,8 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() // because the user's mental model of focus is that it goes away after // the accordion is closed. if (getParent()->hasFocus() - && !(collapsible && !expanded)) + /*&& !(collapsible && !expanded)*/ // WHY?? + ) { mImageHeaderFocused->draw(0,0,width,height); } -- cgit v1.2.3 From a2d083f3ce7b490c88285410591dbcf3592609a2 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 19 Jan 2010 19:24:01 +0200 Subject: Fixed major bug EXT-4336 (Inspectors display groups as people). Added storing item type (avatar/group) in its value, so that we can choose the proper inspector. --HG-- branch : product-engine --- indra/newview/llnamelistctrl.cpp | 80 +++++++++++++++++++++++++++++----------- indra/newview/llnamelistctrl.h | 5 ++- 2 files changed, 62 insertions(+), 23 deletions(-) diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 7e6145f578..6375362ae2 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -74,12 +74,12 @@ void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, { //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl; - std::string fullname; - gCacheName->getFullName(agent_id, fullname); - - fullname.append(suffix); + NameItem item; + item.value = agent_id; + item.enabled = enabled; + item.target = INDIVIDUAL; - addStringUUIDItem(fullname, agent_id, pos, enabled); + addNameItemRow(item, pos); } // virtual, public @@ -130,11 +130,12 @@ BOOL LLNameListCtrl::handleDragAndDrop( return handled; } -void LLNameListCtrl::showAvatarInspector(const LLUUID& avatar_id) +void LLNameListCtrl::showInspector(const LLUUID& avatar_id, bool is_group) { - LLSD key; - key["avatar_id"] = avatar_id; - LLFloaterReg::showInstance("inspect_avatar", key); + if (is_group) + LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", avatar_id)); + else + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", avatar_id)); } //virtual @@ -147,7 +148,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) && column_index == mNameColumnIndex) { // ...this is the column with the avatar name - LLUUID avatar_id = hit_item->getValue().asUUID(); + LLUUID avatar_id = getItemId(hit_item); if (avatar_id.notNull()) { // ...valid avatar id @@ -164,9 +165,12 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop ); LLPointer icon = LLUI::getUIImage("Info_Small"); + // Should we show a group or an avatar inspector? + bool is_group = hit_item->getValue()["is_group"].asBoolean(); + LLToolTip::Params params; params.background_visible( false ); - params.click_callback( boost::bind(&LLNameListCtrl::showAvatarInspector, this, avatar_id) ); + params.click_callback( boost::bind(&LLNameListCtrl::showInspector, this, avatar_id, is_group) ); params.delay_time(0.0f); // spawn instantly on hover params.image( icon ); params.message(""); @@ -220,9 +224,22 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p } -LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& name_item, EAddPosition pos) +LLScrollListItem* LLNameListCtrl::addNameItemRow( + const LLNameListCtrl::NameItem& name_item, + EAddPosition pos, + std::string& suffix) { - LLScrollListItem* item = LLScrollListCtrl::addRow(name_item, pos); + LLUUID id = name_item.value().asUUID(); + LLScrollListItem* item = NULL; + + // Store item type so that we can invoke the proper inspector. + // *TODO Vadim: Is there a more proper way of storing additional item data? + { + LLNameListCtrl::NameItem name_item_(name_item); + name_item_.value = LLSD().with("uuid", id).with("is_group", name_item.target() == GROUP); + item = LLScrollListCtrl::addRow(name_item_, pos); + } + if (!item) return NULL; // use supplied name by default @@ -230,7 +247,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& switch(name_item.target) { case GROUP: - gCacheName->getGroupName(name_item.value().asUUID(), fullname); + gCacheName->getGroupName(id, fullname); // fullname will be "nobody" if group not found break; case SPECIAL: @@ -239,7 +256,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& case INDIVIDUAL: { std::string name; - if (gCacheName->getFullName(name_item.value().asUUID(), name)) + if (gCacheName->getFullName(id, name)) { fullname = name; } @@ -249,6 +266,12 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& break; } + // Append optional suffix. + if (!suffix.empty()) + { + fullname.append(suffix); + } + LLScrollListCell* cell = item->getColumn(mNameColumnIndex); if (cell) { @@ -270,15 +293,24 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& // public void LLNameListCtrl::removeNameItem(const LLUUID& agent_id) { - BOOL item_exists = selectByID( agent_id ); - if(item_exists) + // Find the item specified with agent_id. + S32 idx = -1; + for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++) { - S32 index = getItemIndex(getFirstSelected()); - if(index >= 0) + LLScrollListItem* item = *it; + if (getItemId(item) == agent_id) { - deleteSingleItem(index); + idx = getItemIndex(item); + break; } } + + // Remove it. + if (idx >= 0) + { + selectNthItem(idx); // not sure whether this is needed, taken from previous implementation + deleteSingleItem(idx); + } } // public @@ -303,7 +335,7 @@ void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first, for (iter = getItemList().begin(); iter != getItemList().end(); iter++) { LLScrollListItem* item = *iter; - if (item->getUUID() == id) + if (getItemId(item) == id) { LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(0); cell = item->getColumn(mNameColumnIndex); @@ -343,3 +375,9 @@ void LLNameListCtrl::updateColumns() } } } + +// static +LLUUID LLNameListCtrl::getItemId(LLScrollListItem* item) +{ + return item->getValue()["uuid"].asUUID(); +} diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index d0f0ec4d21..192a3a5afa 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -94,7 +94,7 @@ public: void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); - LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM); + LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, std::string& suffix = LLStringUtil::null); // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. @@ -121,7 +121,8 @@ public: /*virtual*/ void updateColumns(); private: - void showAvatarInspector(const LLUUID& avatar_id); + void showInspector(const LLUUID& avatar_id, bool is_group); + static LLUUID getItemId(LLScrollListItem* item); private: S32 mNameColumnIndex; -- cgit v1.2.3 From 1d9237e299e152c5a58f89be3da2f40e1e2d7338 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Tue, 19 Jan 2010 19:49:39 +0200 Subject: fixed bug EXT-4445 [BSI] Can start an IM session with myself and offer items via context menu in group chat participants list --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 2 +- indra/newview/skins/default/xui/en/menu_participant_list.xml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 0a180512ce..b049f914ad 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -582,7 +582,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); - if (item == "can_mute_text" || "can_block" == item) + if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item) { return mUUIDs.front() != gAgentID; } diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index 31263fbea8..805ffbae66 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -47,6 +47,9 @@ name="IM"> + + Date: Tue, 19 Jan 2010 20:17:37 +0200 Subject: Fixed bug EXT-4471 (Group Profile Group Founder not Clickable). --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 8188048821..5b0a7107e4 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -88,6 +88,7 @@ background_visible="true" initial_value="(retrieving)" layout="topleft" left_delta="0" + link="true" name="founder_name" top_pad="2" use_ellipses="true" -- cgit v1.2.3 From c9896ba504467117bf13a5f2d3526effc123212c Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 19 Jan 2010 20:21:08 +0200 Subject: Fixed name_box to display correct initial value (e.g. "Loading...") until the name is cached instead of a broken link "(nobody)". --HG-- branch : product-engine --- indra/newview/llnamebox.cpp | 13 ++++++++++--- indra/newview/llnamebox.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index d434017804..cd810b9793 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -53,6 +53,7 @@ LLNameBox::LLNameBox(const Params& p) { mNameID = LLUUID::null; mLink = p.link; + mInitialValue = p.initial_value().asString(); LLNameBox::sInstances.insert(this); setText(LLStringUtil::null); } @@ -67,17 +68,23 @@ void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group) mNameID = name_id; std::string name; + BOOL got_name = FALSE; if (!is_group) { - gCacheName->getFullName(name_id, name); + got_name = gCacheName->getFullName(name_id, name); } else { - gCacheName->getGroupName(name_id, name); + got_name = gCacheName->getGroupName(name_id, name); } - setName(name, is_group); + // Got the name already? Set it. + // Otherwise it will be set later in refresh(). + if (got_name) + setName(name, is_group); + else + setText(mInitialValue); } void LLNameBox::refresh(const LLUUID& id, const std::string& firstname, diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index 0109525e85..48b54faec8 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -76,6 +76,7 @@ private: private: LLUUID mNameID; BOOL mLink; + std::string mInitialValue; }; -- cgit v1.2.3 From e57ab1e22500fdf4184fe2b2c9733984496dea53 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 19 Jan 2010 20:40:17 +0200 Subject: Made name boxes displaying an avatar's partner clickable and have a proper initial value. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_edit_profile.xml | 2 ++ indra/newview/skins/default/xui/en/panel_my_profile.xml | 1 + indra/newview/skins/default/xui/en/panel_profile.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index 172cf18fc4..8268937e7f 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -304,8 +304,10 @@ Date: Tue, 19 Jan 2010 21:44:04 +0200 Subject: Fixed low bug EXT-3890([BSI] someone has said text cutoff when opening and closing user list) --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 8 ++++++++ indra/newview/llchathistory.h | 1 + 2 files changed, 9 insertions(+) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 977f5c2bd0..a46cd84b60 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -609,3 +609,11 @@ void LLChatHistory::draw() LLUICtrl::draw(); } +void LLChatHistory::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + bool is_scrolled_to_end = mEditor->scrolledToEnd(); + LLUICtrl::reshape( width, height, called_from_parent ); + // update scroll + if (is_scrolled_to_end) + mEditor->setCursorAndScrollToEnd(); +} diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 260015e2dc..f2d403f639 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -119,6 +119,7 @@ class LLChatHistory : public LLUICtrl */ void appendMessage(const LLChat& chat, const bool use_plain_text_chat_history = false, const LLStyle::Params& input_append_params = LLStyle::Params()); /*virtual*/ void clear(); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); private: std::string mLastFromName; -- cgit v1.2.3 From c4a2c1f462cec0e4fe40c6f1caf479ebfa13f25f Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 19 Jan 2010 21:59:24 +0200 Subject: Fixed bug EXT-4373 (Edit gesture: 'Save' btn disabled after changes). Changing name or description now enables the Save button. --HG-- branch : product-engine --- indra/newview/llpreviewgesture.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 2a40cbaba0..84bdaafacf 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -364,6 +364,12 @@ BOOL LLPreviewGesture::postBuild() LLTextBox* text; LLCheckBoxCtrl* check; + edit = getChild("name"); + edit->setKeystrokeCallback(onKeystrokeCommit, this); + + edit = getChild("desc"); + edit->setKeystrokeCallback(onKeystrokeCommit, this); + edit = getChild("trigger_editor"); edit->setKeystrokeCallback(onKeystrokeCommit, this); edit->setCommitCallback(onCommitSetDirty, this); -- cgit v1.2.3 From 85c97cab02b0f2ba89b7af05c14a69ff90ffa25e Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Tue, 19 Jan 2010 22:03:55 +0200 Subject: Fixed normal bug Bug EXT-4444 ([BSI] Buy L$ art in top bar is clipped when Fav and Navbar are hidden). - Changed vertical alignment of "Buy L$" and some other elements in status bar via xml. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_status_bar.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index bfca2f2e46..7a6089c74e 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -53,7 +53,7 @@ label_shadow="false" name="buycurrency" tool_tip="My Balance" - top="5" + top="3" width="100" />