diff options
27 files changed, 88 insertions, 232 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 980cd2abd7..3734a22f7e 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2362,7 +2362,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() ) { @@ -2387,16 +2387,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/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/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 9b215e4096..988867ef84 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -330,6 +330,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) 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<LLFloaterChat>("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 eb3f1b1d10..d7c60ff34e 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 23822cef35..6064415a10 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<LLNearbyChat>("nearby_chat", LLSD()); if(nearby_chat) @@ -3138,9 +3136,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 e3caabf08f..2885ba13fa 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 757eb3c9bc..8d950f072d 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 af66b6e3de..cf4a08ce76 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 ad88534a5d..88b4c34e2b 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 24895e7a35..8a36475510 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 224c5b64bc..edbaa0d45a 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<LLHandle<LLFloater> >::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<LLFloaterBump>); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>); - LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>); + //LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>); LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>); LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatterBox>); LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 88a61c9d49..d96d7df24a 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" @@ -6374,51 +6373,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<U8> > 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 c929e81ea4..5279c4174a 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" @@ -835,9 +834,13 @@ 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(); + //this is kinda important, so actually put it on screen - LLFloaterChat::addChat(chat, FALSE, FALSE); + std::string log_msg = message.str(); + LLSD args; + args["MESSAGE"] = log_msg; + LLNotificationsUtil::add("SystemMessage", args); + throttle_logged=true; } return false; @@ -1178,8 +1181,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); + LLSD args; + args["MESSAGE"] = log_message; + LLNotificationsUtil::add("SystemMessage", args); } break; @@ -1352,8 +1356,10 @@ 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("."); - chat.mText = log_message; - LLFloaterChat::addChatHistory(chat); + //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. @@ -1395,13 +1401,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // send the message msg->sendReliable(mHost); - 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)) { @@ -1763,10 +1767,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()) { @@ -1822,19 +1822,24 @@ 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* 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; LLFloaterChat::addChat( chat, TRUE, local_agent ); + */ } } break; @@ -2138,9 +2143,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; @@ -2687,22 +2689,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( + LLNotificationsUI::LLNotificationManager::instance().onChat( chat, LLNotificationsUI::NT_NEARBYCHAT); - - LLFloaterChat::addChat(chat, FALSE, FALSE); - } - else - { - LLNotificationsUI::LLNotificationManager::instance().onChat( - chat, LLNotificationsUI::NT_NEARBYCHAT); - // adding temporarily - LLFloaterChat::addChatHistory(chat); - } } } @@ -3087,9 +3075,11 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (avatarp) { // Chat the "back" SLURL. (DEV-4907) - 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); 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 769344d183..c1817496b1 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 30f00f04af..51a75b5825 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 ); } } } |