From 1ea65f0285d7022ce20ef84d4e35e3c94bcb3fbd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Mar 2012 22:56:02 -0700 Subject: CHUI-51 WIP notifications routig code cleanup phase 1, removal of most of llnotificationhandler --- indra/newview/llviewerwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e0653fec30..6d9b8b4eb3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1548,11 +1548,11 @@ LLViewerWindow::LLViewerWindow(const Params& p) mViewerWindowListener(new LLViewerWindowListener(this)), mProgressView(NULL) { - LLNotificationChannel::buildChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alert")); - LLNotificationChannel::buildChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alertmodal")); + LLNotificationChannelPtr vw_alerts_channel(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alert"))); + LLNotificationChannelPtr vw_alerts_modal_channel(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alertmodal"))); - LLNotifications::instance().getChannel("VW_alerts")->connectChanged(&LLViewerWindow::onAlert); - LLNotifications::instance().getChannel("VW_alertmodal")->connectChanged(&LLViewerWindow::onAlert); + vw_alerts_channel->connectChanged(&LLViewerWindow::onAlert); + vw_alerts_modal_channel->connectChanged(&LLViewerWindow::onAlert); LLNotifications::instance().setIgnoreAllNotifications(gSavedSettings.getBOOL("IgnoreAllNotifications")); llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl; -- cgit v1.2.3 From 28d5727cecdad638202106fd1289bee25c0f97bd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 26 Apr 2012 15:30:08 -0700 Subject: post-merge build fixes --- indra/newview/llviewerwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 117078bcd1..32f693b009 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1542,14 +1542,14 @@ LLViewerWindow::LLViewerWindow(const Params& p) // pass its value right now. Instead, pass it a nullary function that // will, when we later need it, return the value of gKeyboard. // boost::lambda::var() constructs such a functor on the fly. - mWindowListener(new LLWindowListener(this, boost::lambda::var(gKeyboard))), - mViewerWindowListener(new LLViewerWindowListener(this)), + mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard))); + mViewerWindowListener.reset(new LLViewerWindowListener(this)); - LLNotificationChannelPtr vw_alerts_channel(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alert"))); - LLNotificationChannelPtr vw_alerts_modal_channel(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alertmodal"))); + mAlertsChannel.reset(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alert"))); + mModalAlertsChannel.reset(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alertmodal"))); - vw_alerts_channel->connectChanged(&LLViewerWindow::onAlert); - vw_alerts_modal_channel->connectChanged(&LLViewerWindow::onAlert); + mAlertsChannel->connectChanged(&LLViewerWindow::onAlert); + mModalAlertsChannel->connectChanged(&LLViewerWindow::onAlert); LLNotifications::instance().setIgnoreAllNotifications(gSavedSettings.getBOOL("IgnoreAllNotifications")); llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl; -- cgit v1.2.3 From bba0f4f74e56d911df8fc534d83cd4a84993bc8b Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 31 May 2012 16:37:22 +0300 Subject: CHUI-119 WIP --- indra/newview/llviewerwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 32f693b009..5b8cf52298 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -185,7 +185,7 @@ #include "llviewerjoystick.h" #include "llviewernetwork.h" #include "llpostprocess.h" -#include "llnearbychatbar.h" +#include "llnearbychat.h" #include "llagentui.h" #include "llwearablelist.h" @@ -2482,7 +2482,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // Traverses up the hierarchy if( keyboard_focus ) { - LLNearbyChatBar* nearby_chat = LLFloaterReg::findTypedInstance("chat_bar"); + LLNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("chat_bar"); if (nearby_chat) { @@ -2549,11 +2549,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance("chat_bar")->getChatBox(); + LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance("chat_bar")->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. - LLNearbyChatBar::getInstance()->startChat(NULL); + LLNearbyChat::getInstance()->startChat(NULL); return TRUE; } } -- cgit v1.2.3 From bc5e0eda1b1b9c289734bebe6a533565aadfd3a2 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Mon, 18 Jun 2012 21:11:56 +0300 Subject: CHUI-119 fixed bug with creating multiply instances of the nearby chat; --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7f14e021fd..016da1d994 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2555,7 +2555,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance("chat_bar")->getChatBox(); + LLLineEditor* chat_editor = LLNearbyChat::getInstance()->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. -- cgit v1.2.3 From 6bb554fc3661d3b8b1284db96bb7c7b0934df621 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Fri, 22 Jun 2012 16:54:42 +0300 Subject: CHUI-160 FIXED (Text entered in local chat text field scrolls up and becomes only partially visible after hitting return) - Replaced LLLineEditor with LLChatEntry in nearby chat - Moved reshape method from LLIMFloater to the base LLIMConversation so that vertical reshaping work properly for both LLNearbyChat and LLIMFloater --- indra/newview/llviewerwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 016da1d994..258bc5b698 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -56,6 +56,7 @@ // linden library includes #include "llaudioengine.h" // mute on minimize +#include "llchatentry.h" #include "indra_constants.h" #include "llassetstorage.h" #include "llerrorcontrol.h" @@ -2492,7 +2493,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if (nearby_chat) { - LLLineEditor* chat_editor = nearby_chat->getChatBox(); + LLChatEntry* chat_editor = nearby_chat->getChatBox(); // arrow keys move avatar while chatting hack if (chat_editor && chat_editor->hasFocus()) @@ -2555,7 +2556,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLLineEditor* chat_editor = LLNearbyChat::getInstance()->getChatBox(); + LLChatEntry* chat_editor = LLNearbyChat::getInstance()->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. -- cgit v1.2.3 From cfc5236e643618822e66bfc77dc912036bcb57cb Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 18 Jul 2012 15:49:47 -0500 Subject: MAINT-628 Fix for seams in high res snapshots when lighting and shadows is enabled. --- indra/newview/llviewerwindow.cpp | 55 +++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 862d53c613..25013eb08c 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4225,14 +4225,48 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei image_height = llmin(image_height, window_height); } + S32 original_width = 0; + S32 original_height = 0; + bool reset_deferred = false; + + LLRenderTarget scratch_space; + F32 scale_factor = 1.0f ; if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height)) { - // if image cropping or need to enlarge the scene, compute a scale_factor - F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; - snapshot_width = (S32)(ratio * image_width) ; - snapshot_height = (S32)(ratio * image_height) ; - scale_factor = llmax(1.0f, 1.0f / ratio) ; + if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) + { + if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true)) + { + original_width = gPipeline.mDeferredScreen.getWidth(); + original_height = gPipeline.mDeferredScreen.getHeight(); + + if (gPipeline.allocateScreenBuffer(image_width, image_height)) + { + window_width = image_width; + window_height = image_height; + snapshot_width = image_width; + snapshot_height = image_height; + reset_deferred = true; + mWorldViewRectRaw.set(0, image_height, image_width, 0); + scratch_space.bindTarget(); + } + else + { + scratch_space.release(); + gPipeline.allocateScreenBuffer(original_width, original_height); + } + } + } + + if (!reset_deferred) + { + // if image cropping or need to enlarge the scene, compute a scale_factor + F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ; + snapshot_width = (S32)(ratio * image_width) ; + snapshot_height = (S32)(ratio * image_height) ; + scale_factor = llmax(1.0f, 1.0f / ratio) ; + } } if (show_ui && scale_factor > 1.f) @@ -4421,11 +4455,20 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei gPipeline.resetDrawOrders(); } + if (reset_deferred) + { + mWorldViewRectRaw = window_rect; + scratch_space.flush(); + scratch_space.release(); + gPipeline.allocateScreenBuffer(original_width, original_height); + + } + if (high_res) { send_agent_resume(); } - + return ret; } -- cgit v1.2.3 From df7d6c90758eef95f2c8c004611add495b8a5eee Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 18 Jul 2012 12:37:52 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages continued clean up of llstats stuff --- indra/newview/llviewerwindow.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 39e330ad66..9e9b41d3c8 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -333,19 +333,13 @@ public: if (gSavedSettings.getBOOL("DebugShowTime")) { const U32 y_inc2 = 15; - for (std::map::reverse_iterator iter = gDebugTimers.rbegin(); - iter != gDebugTimers.rend(); ++iter) - { - S32 idx = iter->first; - LLFrameTimer& timer = iter->second; - F32 time = timer.getElapsedTimeF32(); - S32 hours = (S32)(time / (60*60)); - S32 mins = (S32)((time - hours*(60*60)) / 60); - S32 secs = (S32)((time - hours*(60*60) - mins*60)); - std::string label = gDebugTimerLabel[idx]; - if (label.empty()) label = llformat("Debug: %d", idx); - addText(xpos, ypos, llformat(" %s: %d:%02d:%02d", label.c_str(), hours,mins,secs)); ypos += y_inc2; - } + LLFrameTimer& timer = gTextureTimer; + F32 time = timer.getElapsedTimeF32(); + S32 hours = (S32)(time / (60*60)); + S32 mins = (S32)((time - hours*(60*60)) / 60); + S32 secs = (S32)((time - hours*(60*60) - mins*60)); + addText(xpos, ypos, llformat(" "Texture": %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2; + F32 time = gFrameTimeSeconds; S32 hours = (S32)(time / (60*60)); -- cgit v1.2.3 From 4d395a0de044328cf318598ef9b88eddde8e82af Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 18 Jul 2012 16:58:23 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages fixed build --- indra/newview/llviewerwindow.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9e9b41d3c8..fa4eed9e50 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -332,20 +332,23 @@ public: if (gSavedSettings.getBOOL("DebugShowTime")) { - const U32 y_inc2 = 15; - LLFrameTimer& timer = gTextureTimer; - F32 time = timer.getElapsedTimeF32(); - S32 hours = (S32)(time / (60*60)); - S32 mins = (S32)((time - hours*(60*60)) / 60); - S32 secs = (S32)((time - hours*(60*60) - mins*60)); - addText(xpos, ypos, llformat(" "Texture": %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2; - + { + const U32 y_inc2 = 15; + LLFrameTimer& timer = gTextureTimer; + F32 time = timer.getElapsedTimeF32(); + S32 hours = (S32)(time / (60*60)); + S32 mins = (S32)((time - hours*(60*60)) / 60); + S32 secs = (S32)((time - hours*(60*60) - mins*60)); + addText(xpos, ypos, llformat("Texture: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2; + } - F32 time = gFrameTimeSeconds; - S32 hours = (S32)(time / (60*60)); - S32 mins = (S32)((time - hours*(60*60)) / 60); - S32 secs = (S32)((time - hours*(60*60) - mins*60)); - addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc; + { + F32 time = gFrameTimeSeconds; + S32 hours = (S32)(time / (60*60)); + S32 mins = (S32)((time - hours*(60*60)) / 60); + S32 secs = (S32)((time - hours*(60*60) - mins*60)); + addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc; + } } #if LL_WINDOWS -- cgit v1.2.3 From c8a36e9cfd1e90a1aa385667c7272c25e2ef9136 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 7 Aug 2012 19:55:47 -0700 Subject: SH-3275 WIP Run viewer metrics for object update messages cleaned up LLStat and removed unnecessary includes --- indra/newview/llviewerwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 39e330ad66..bbce53bc9a 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -77,6 +77,7 @@ #include "llmediaentry.h" #include "llurldispatcher.h" #include "raytrace.h" +#include "llstat.h" // newview includes #include "llagent.h" @@ -1540,7 +1541,8 @@ LLViewerWindow::LLViewerWindow(const Params& p) mResDirty(false), mStatesDirty(false), mCurrResolutionIndex(0), - mProgressView(NULL) + mProgressView(NULL), + mMouseVelocityStat(new LLStat("Mouse Velocity")) { // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to // pass its value right now. Instead, pass it a nullary function that @@ -2064,6 +2066,8 @@ LLViewerWindow::~LLViewerWindow() delete mDebugText; mDebugText = NULL; + + delete mMouseVelocityStat; } @@ -3238,7 +3242,7 @@ void LLViewerWindow::updateMouseDelta() mouse_vel.setVec((F32) dx, (F32) dy); } - mMouseVelocityStat.addValue(mouse_vel.magVec()); + mMouseVelocityStat->addValue(mouse_vel.magVec()); } void LLViewerWindow::updateKeyboardFocus() -- cgit v1.2.3 From 14708a3ace184b0654ca7923732be6e06962d583 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 22 Aug 2012 18:27:29 +0300 Subject: CHUI_310 make NearbyChat a singletone --- indra/newview/llviewerwindow.cpp | 62 +++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 32 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1bcf15913f..23d2b1633d 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -198,7 +198,6 @@ #include "llfloaternotificationsconsole.h" -#include "llnearbychat.h" #include "llwindowlistener.h" #include "llviewerwindowlistener.h" #include "llpaneltopinfobar.h" @@ -2497,43 +2496,42 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // Traverses up the hierarchy if( keyboard_focus ) { - LLNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("chat_bar"); - - if (nearby_chat) + if (LLNearbyChat::instanceExists()) { - LLChatEntry* chat_editor = nearby_chat->getChatBox(); - - // arrow keys move avatar while chatting hack - if (chat_editor && chat_editor->hasFocus()) - { - // If text field is empty, there's no point in trying to move - // cursor with arrow keys, so allow movement - if (chat_editor->getText().empty() - || gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) + LLChatEntry* chat_editor = LLNearbyChat::instance().getChatBox(); + + // arrow keys move avatar while chatting hack + if (chat_editor && chat_editor->hasFocus()) { - // let Control-Up and Control-Down through for chat line history, - if (!(key == KEY_UP && mask == MASK_CONTROL) - && !(key == KEY_DOWN && mask == MASK_CONTROL)) + // If text field is empty, there's no point in trying to move + // cursor with arrow keys, so allow movement + if (chat_editor->getText().empty() + || gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) { - switch(key) + // let Control-Up and Control-Down through for chat line history, + if (!(key == KEY_UP && mask == MASK_CONTROL) + && !(key == KEY_DOWN && mask == MASK_CONTROL)) { - case KEY_LEFT: - case KEY_RIGHT: - case KEY_UP: - case KEY_DOWN: - case KEY_PAGE_UP: - case KEY_PAGE_DOWN: - case KEY_HOME: - // when chatbar is empty or ArrowKeysAlwaysMove set, - // pass arrow keys on to avatar... - return FALSE; - default: - break; + switch(key) + { + case KEY_LEFT: + case KEY_RIGHT: + case KEY_UP: + case KEY_DOWN: + case KEY_PAGE_UP: + case KEY_PAGE_DOWN: + case KEY_HOME: + // when chatbar is empty or ArrowKeysAlwaysMove set, + // pass arrow keys on to avatar... + return FALSE; + default: + break; + } } } } } - } + if (keyboard_focus->handleKey(key, mask, FALSE)) { return TRUE; @@ -2564,11 +2562,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLChatEntry* chat_editor = LLNearbyChat::getInstance()->getChatBox(); + LLChatEntry* chat_editor = LLNearbyChat::instance().getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. - LLNearbyChat::getInstance()->startChat(NULL); + LLNearbyChat::instance().startChat(NULL); return TRUE; } } -- cgit v1.2.3 From ae2e611dfb7b712c159ebafabb83ebbc1f7465b6 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 31 Aug 2012 16:52:50 +0300 Subject: CHUI-315 (Nearby chat messages do not appear in conversation floater): cancelled inheritance LLNearbyChat from LLSingleton; set mSingleInstance flag for it. --- indra/newview/llviewerwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 23d2b1633d..791cadaee4 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2493,12 +2493,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat"); + // Traverses up the hierarchy if( keyboard_focus ) { - if (LLNearbyChat::instanceExists()) + if (nearby_chat) { - LLChatEntry* chat_editor = LLNearbyChat::instance().getChatBox(); + LLChatEntry* chat_editor = nearby_chat->getChatBox(); // arrow keys move avatar while chatting hack if (chat_editor && chat_editor->hasFocus()) @@ -2562,11 +2564,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLChatEntry* chat_editor = LLNearbyChat::instance().getChatBox(); + LLChatEntry* chat_editor = nearby_chat->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. - LLNearbyChat::instance().startChat(NULL); + nearby_chat->startChat(NULL); return TRUE; } } -- cgit v1.2.3 From d9309bd16334a7d76da1b02e8fc43117a06ef7b2 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 7 Sep 2012 12:34:21 +0300 Subject: CHUI-323 FIXED (Local chat message panel out of position in Conversation floater): Prevented too early creation LLNearbyChat --- indra/newview/llviewerwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 791cadaee4..403288b2fd 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2493,7 +2493,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat"); + LLNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); // Traverses up the hierarchy if( keyboard_focus ) @@ -2561,10 +2561,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // If "Pressing letter keys starts local chat" option is selected, we are not in mouselook, // no view has keyboard focus, this is a printable character key (and no modifier key is // pressed except shift), then give focus to nearby chat (STORM-560) - if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && + if ( nearby_chat && gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { - LLChatEntry* chat_editor = nearby_chat->getChatBox(); + LLChatEntry* chat_editor = LLFloaterReg::findTypedInstance("nearby_chat")->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. -- cgit v1.2.3 From 7aca8ad6b83be2d260b26bd5d27ff36ec7786cff Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 11 Sep 2012 15:55:36 -0500 Subject: MAINT-1534 Fix for calls to find widgets getting out of hand. --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 79cdd732e7..72a1ea7df4 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4998,7 +4998,7 @@ S32 LLViewerWindow::getChatConsoleBottomPad() S32 offset = 0; if(gToolBarView) - offset += gToolBarView->getChild("bottom_toolbar_panel")->getRect().getHeight(); + offset += gToolBarView->getBottomToolbar()->getRect().getHeight(); return offset; } -- cgit v1.2.3 From 8a42d5cea3787edf294eec135af38c12ae322325 Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Thu, 18 Oct 2012 00:04:46 +0300 Subject: CHUI-399 (When user has Pressing Letter Keys starts local chat setting on, first presses of letter keys do not open chat) fixed --- indra/newview/llviewerwindow.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 403288b2fd..f80abc816f 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2561,9 +2561,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // If "Pressing letter keys starts local chat" option is selected, we are not in mouselook, // no view has keyboard focus, this is a printable character key (and no modifier key is // pressed except shift), then give focus to nearby chat (STORM-560) - if ( nearby_chat && gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && - !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) - { + if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && + !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) + { + // Initialize nearby chat if it's missing + if (!nearby_chat) + { + LLSD name("im_container"); + LLFloaterReg::toggleInstanceOrBringToFront(name); + } + LLChatEntry* chat_editor = LLFloaterReg::findTypedInstance("nearby_chat")->getChatBox(); if (chat_editor) { -- cgit v1.2.3 From 3ee73ee98d31e572e284371074b7cd4744005a29 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 17 Oct 2012 15:26:51 -0700 Subject: warn-on-failure:unix-eol --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 403288b2fd..11fe8fda26 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -283,7 +283,7 @@ private: struct Line { Line(const std::string& in_text, S32 in_x, S32 in_y) : text(in_text), x(in_x), y(in_y) {} - std::string text; + std::string text; S32 x,y; }; -- cgit v1.2.3 From c4eaaa3d6a08330863119d550d365315ba7526bb Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Thu, 8 Nov 2012 12:35:15 -0800 Subject: CHUI-484: Updating the code to rather than refer to it as Busy Mode, it now refers to it as Do Not Disturb mode. --- indra/newview/llviewerwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 3b2292c04d..ee838b19b7 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1824,8 +1824,8 @@ void LLViewerWindow::initBase() gDebugView->init(); gToolTipView = getRootView()->getChild("tooltip view"); - // Initialize busy response message when logged in - LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLFloaterPreference::initBusyResponse)); + // Initialize do not disturb response message when logged in + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLFloaterPreference::initDoNotDisturbResponse)); // Add the progress bar view (startup view), which overrides everything mProgressView = getRootView()->findChild("progress_view"); -- cgit v1.2.3 From 486bdf32845e248ec4923224f1f4ea5d239ac0f3 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 9 Nov 2012 12:45:36 +0200 Subject: CHUI-337 FIXED: To avoid confusion with a classes "...conversation..." and in accordance with the naming convention in the project, some classes and corresponding files should be renamed: LLIMConversation -> LLFloaterIMSessionTab LLIMFloater -> LLFloaterIMSession LLNearbyChat -> LLFloaterIMNearbyChat LLIMFloaterContainer -> LLFloaterIMContainer LLNearbyChatBarListener -> LLFloaterIMNearbyChatListener LLNearbyChatHandler -> LLFloaterIMNearbyChatHandler --- indra/newview/llviewerwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ee838b19b7..afc3e3965c 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -188,7 +188,7 @@ #include "llviewerjoystick.h" #include "llviewernetwork.h" #include "llpostprocess.h" -#include "llnearbychat.h" +#include "llfloaterimnearbychat.h" #include "llagentui.h" #include "llwearablelist.h" @@ -2496,7 +2496,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } - LLNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); // Traverses up the hierarchy if( keyboard_focus ) @@ -2574,7 +2574,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) LLFloaterReg::toggleInstanceOrBringToFront(name); } - LLChatEntry* chat_editor = LLFloaterReg::findTypedInstance("nearby_chat")->getChatBox(); + LLChatEntry* chat_editor = LLFloaterReg::findTypedInstance("nearby_chat")->getChatBox(); if (chat_editor) { // passing NULL here, character will be added later when it is handled by character handler. -- cgit v1.2.3 From 9da625d439a9a911733564177e32facc3669dc58 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Thu, 6 Dec 2012 20:28:25 -0800 Subject: CHUI-494: WIP First pass at getting the suppression of events in DND working. --- indra/newview/llviewerwindow.cpp | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1b45e6f85d..7b1cf6e180 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -39,6 +39,7 @@ #include "llagentcamera.h" #include "llfloaterreg.h" #include "llmeshrepository.h" +#include "llnotificationhandler.h" #include "llpanellogin.h" #include "llviewerkeyboard.h" #include "llviewermenu.h" @@ -127,6 +128,7 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" +#include "llnotificationhandler.h" #include "llpanelpathfindingrebakenavmesh.h" #include "llpaneltopinfobar.h" #include "llpopupview.h" @@ -1554,11 +1556,13 @@ LLViewerWindow::LLViewerWindow(const Params& p) mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard))); mViewerWindowListener.reset(new LLViewerWindowListener(this)); - mAlertsChannel.reset(new LLNotificationChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alert"))); - mModalAlertsChannel.reset(new LLNotificationChannel("VW_alertmodal", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alertmodal"))); + mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything)); + mCommunicationChannel.reset(new LLNotificationChannel("Communication", "Visible", boost::bind(&LLAgent::isDoNotDisturb, &gAgent))); + mAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alerts", "alert")); + mModalAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alertmodal", "alertmodal")); - mAlertsChannel->connectChanged(&LLViewerWindow::onAlert); - mModalAlertsChannel->connectChanged(&LLViewerWindow::onAlert); + //mAlertsChannel->connectChanged(&LLViewerWindow::onAlert); + //mModalAlertsChannel->connectChanged(&LLViewerWindow::onAlert); bool ignore = gSavedSettings.getBOOL("IgnoreAllNotifications"); LLNotifications::instance().setIgnoreAllNotifications(ignore); if (ignore) @@ -5001,25 +5005,6 @@ LLRect LLViewerWindow::getChatConsoleRect() //---------------------------------------------------------------------------- -//static -bool LLViewerWindow::onAlert(const LLSD& notify) -{ - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - - if (gHeadlessClient) - { - llinfos << "Alert: " << notification->getName() << llendl; - } - - // If we're in mouselook, the mouse is hidden and so the user can't click - // the dialog buttons. In that case, change to First Person instead. - if( gAgentCamera.cameraMouselook() ) - { - gAgentCamera.changeCameraToDefault(); - } - return false; -} - void LLViewerWindow::setUIVisibility(bool visible) { mUIVisible = visible; -- cgit v1.2.3 From 4d3590ae9c0040d010badc026b755634e7b3ac77 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 10 Dec 2012 19:14:37 -0800 Subject: Correcting a mac build error. --- indra/newview/llviewerwindow.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7b1cf6e180..eae5112b03 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1561,8 +1561,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) mAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alerts", "alert")); mModalAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alertmodal", "alertmodal")); - //mAlertsChannel->connectChanged(&LLViewerWindow::onAlert); - //mModalAlertsChannel->connectChanged(&LLViewerWindow::onAlert); bool ignore = gSavedSettings.getBOOL("IgnoreAllNotifications"); LLNotifications::instance().setIgnoreAllNotifications(ignore); if (ignore) -- cgit v1.2.3 From b5db4952590321acef60a4ff8726eb4162305c9f Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Tue, 11 Dec 2012 18:48:29 -0800 Subject: CHUI-494: Toggling the behavior of the communication notification channel filter as it should be true when not in DND mode and false when in DND mode. --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index eae5112b03..fcd65f7df2 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1557,7 +1557,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) mViewerWindowListener.reset(new LLViewerWindowListener(this)); mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything)); - mCommunicationChannel.reset(new LLNotificationChannel("Communication", "Visible", boost::bind(&LLAgent::isDoNotDisturb, &gAgent))); + mCommunicationChannel.reset(new LLNotificationChannel("Communication", "Visible", !boost::bind(&LLAgent::isDoNotDisturb, &gAgent))); mAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alerts", "alert")); mModalAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alertmodal", "alertmodal")); -- cgit v1.2.3 From c73947ac1fc6c48bca75ea7d6beeda63eb695b2b Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Tue, 18 Dec 2012 18:48:15 -0800 Subject: CHUI-499: Adding ability to serialize the communication notifications to local disk per user. --- indra/newview/llviewerwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 424898536e..1c463015e2 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -37,6 +37,7 @@ #include "llagent.h" #include "llagentcamera.h" +#include "llcommunicationchannel.h" #include "llfloaterreg.h" #include "llmeshrepository.h" #include "llnotificationhandler.h" @@ -1557,7 +1558,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) mViewerWindowListener.reset(new LLViewerWindowListener(this)); mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything)); - mCommunicationChannel.reset(new LLNotificationChannel("Communication", "Visible", !boost::bind(&LLAgent::isDoNotDisturb, &gAgent))); + mCommunicationChannel.reset(new LLCommunicationChannel("Communication", "Visible")); mAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alerts", "alert")); mModalAlertsChannel.reset(new LLNotificationsUI::LLViewerAlertHandler("VW_alertmodal", "alertmodal")); -- cgit v1.2.3 From 9e6677ffc29b779f7b47228cf96c5bcdc867669c Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Tue, 22 Jan 2013 17:53:18 +0200 Subject: CHUI-692 FIXED Arrow keys will move avatar while IM container, nearby chat or IM session floater is in focus. --- indra/newview/llviewerwindow.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2d5634a41d..36ddf26c82 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2503,22 +2503,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } - LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); + LLFloater* focused_floaterp = gFloaterView->getFocusedFloater(); + std::string focusedFloaterName = (focused_floaterp ? focused_floaterp->getInstanceName() : ""); - // Traverses up the hierarchy if( keyboard_focus ) { - if (nearby_chat) - { - LLChatEntry* chat_editor = nearby_chat->getChatBox(); - - // arrow keys move avatar while chatting hack - if (chat_editor && chat_editor->hasFocus()) + if ((focusedFloaterName == "nearby_chat") || (focusedFloaterName == "im_container") || (focusedFloaterName == "impanel")) { - // If text field is empty, there's no point in trying to move - // cursor with arrow keys, so allow movement - if (chat_editor->getText().empty() - || gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) + if (gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) { // let Control-Up and Control-Down through for chat line history, if (!(key == KEY_UP && mask == MASK_CONTROL) @@ -2540,7 +2532,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) break; } } - } } } @@ -2575,6 +2566,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { // Initialize nearby chat if it's missing + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance("nearby_chat"); if (!nearby_chat) { LLSD name("im_container"); -- cgit v1.2.3 From 9530b9d2b717d338af79108c60c2aa67e33ba6e5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 1 Mar 2013 14:24:47 +0200 Subject: CHUI-694 FIXED Handle ALT + Up/Down and ALT + Right/Left to switch conversations in the list. Handle ALT + Enter to expand participant list of selected conversation. --- indra/newview/llviewerwindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e6e93d81bc..e44a2cc4df 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2515,7 +2515,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { // let Control-Up and Control-Down through for chat line history, if (!(key == KEY_UP && mask == MASK_CONTROL) - && !(key == KEY_DOWN && mask == MASK_CONTROL)) + && !(key == KEY_DOWN && mask == MASK_CONTROL) + && !(key == KEY_UP && mask == MASK_ALT) + && !(key == KEY_DOWN && mask == MASK_ALT)) { switch(key) { @@ -2607,7 +2609,10 @@ BOOL LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask) if ((uni_char == 13 && mask != MASK_CONTROL) || (uni_char == 3 && mask == MASK_NONE)) { - return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN)); + if (mask != MASK_ALT) + { + return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN)); + } } // let menus handle navigation (jump) keys -- cgit v1.2.3