From 79f14b7febf512e96a7d63eff8e6db895a7e72cf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 25 Aug 2011 14:54:38 -0400 Subject: CHOP-763: Move llwindowlistener.{h,cpp} from llwindow to newview. Instantiate LLWindowListener on LLViewerWindow instead of on LLWindow. This permits LLWindowListener to use machinery from llui, e.g. LLUI::resolvePath(). Document planned new ["path"], ["reply"] params to "keyDown", "keyUp", "mouseDown", "mouseUp", "mouseMove" operations; document relationship between ["path"] and ["x"] and ["y"]. NEW PARAMS NOT YET IMPLEMENTED. --- indra/newview/llviewerwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 988c4ed1a2..0501b61592 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include "llagent.h" #include "llagentcamera.h" @@ -198,6 +199,7 @@ #include "llfloaternotificationsconsole.h" #include "llnearbychat.h" +#include "llwindowlistener.h" #include "llviewerwindowlistener.h" #include "llpaneltopinfobar.h" @@ -1552,7 +1554,12 @@ LLViewerWindow::LLViewerWindow( mResDirty(false), mStatesDirty(false), mCurrResolutionIndex(0), - mViewerWindowListener(new LLViewerWindowListener(this)), + // 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 + // 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)), mProgressView(NULL) { LLNotificationChannel::buildChannel("VW_alerts", "Visible", LLNotificationFilters::filterBy(&LLNotification::getType, "alert")); -- cgit v1.2.3 From 5baf0de6a396b120aba4e2351ed5bff70f2562ef Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Mon, 19 Sep 2011 19:13:39 +0300 Subject: EXP-1203 FIXED (As a FUI user, I want the address bar and favorites to be on one line) - Relocated address bar, combined with favorite landmarks EXP-1208 - Added dragger to change amount of space allocated to address bar and favorites bar EXP-1217 - Modified Favorites ->> More spillover EXP-1218 - Combined context menu menuitems for favorites & address bars EXP-1219 --- indra/newview/llviewerwindow.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5893259d96..3665ed4b5b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1885,12 +1885,7 @@ void LLViewerWindow::initWorldUI() if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { - navbar->showNavigationPanel(FALSE); - } - - if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel")) - { - navbar->showFavoritesPanel(FALSE); + navbar->setVisible(FALSE); } // Top Info bar @@ -2196,7 +2191,9 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) LLNavigationBar* navbarp = LLUI::getRootView()->findChild("navigation_bar"); if (navbarp) { - navbarp->setVisible( visible ); + // when it's time to show navigation bar we need to ensure that the user wants to see it + // i.e. ShowNavbarNavigationPanel option is true + navbarp->setVisible( visible && gSavedSettings.getBOOL("ShowNavbarNavigationPanel") ); } } -- cgit v1.2.3 From bc3f0e0a81af79820a0c0a6877d266fca46ef917 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 20 Sep 2011 18:47:13 -0700 Subject: EXP-1230 FIX As a resident, I want to not have to choose a UI mode removed all references to basic mode --- indra/newview/llviewerwindow.cpp | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5893259d96..114a422c1d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1940,25 +1940,6 @@ void LLViewerWindow::initWorldUI() buttons_panel->setShape(buttons_panel_container->getLocalRect()); buttons_panel->setFollowsAll(); buttons_panel_container->addChild(buttons_panel); - - LLView* avatar_picker_destination_guide_container = gViewerWindow->getRootView()->getChild("avatar_picker_and_destination_guide_container"); - avatar_picker_destination_guide_container->getChild("close")->setCommitCallback(boost::bind(toggle_destination_and_avatar_picker, LLSD())); - LLMediaCtrl* destinations = avatar_picker_destination_guide_container->findChild("destination_guide_contents"); - LLMediaCtrl* avatar_picker = avatar_picker_destination_guide_container->findChild("avatar_picker_contents"); - if (destinations) - { - destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html"); - } - - if (avatar_picker) - { - avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html"); - } - - // show destinations by default - toggle_destination_and_avatar_picker(gSavedSettings.getS32("DestinationsAndAvatarsVisibility")); } // Destroy the UI -- cgit v1.2.3 From 7bc6e626f40a910b4a3e5b88161e96b9967bd24d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 21 Sep 2011 14:24:38 -0700 Subject: EXP-1207 : LLToolbarView skeleton, nothing operational yet... --- indra/newview/llviewerwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5893259d96..e92e7f1183 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -76,6 +76,7 @@ #include "lltimer.h" #include "timing.h" #include "llviewermenu.h" +#include "lltoolbarview.h" #include "lltooltip.h" #include "llmediaentry.h" #include "llurldispatcher.h" @@ -1778,6 +1779,14 @@ void LLViewerWindow::initBase() mHintHolder = main_view->getChild("hint_holder")->getHandle(); mLoginPanelHolder = main_view->getChild("login_panel_holder")->getHandle(); + // Update the toolbar global holder + // *TODO: Eventually, suppress the existence of this debug setting and turn toolbar FUI on permanently + if (gSavedSettings.getBOOL("DebugToolbarFUI")) + { + gToolBarView = main_view->getChild("Toolbar View"); + } + + // Constrain floaters to inside the menu and status bar regions. gFloaterView = main_view->getChild("Floater View"); gFloaterView->setFloaterSnapView(main_view->getChild("floater_snap_region")->getHandle()); @@ -2000,6 +2009,7 @@ void LLViewerWindow::shutdownViews() gIMMgr = NULL; gToolTipView = NULL; + gToolBarView = NULL; gFloaterView = NULL; gMorphView = NULL; -- cgit v1.2.3 From 65892a01cad5d22403f36a10187af40b37b48383 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 21 Sep 2011 19:31:07 -0700 Subject: EXP-1207 : More work on LLToolbarView, still not operational... --- indra/newview/llviewerwindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1055fd373b..d197782eed 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1783,10 +1783,17 @@ void LLViewerWindow::initBase() // *TODO: Eventually, suppress the existence of this debug setting and turn toolbar FUI on permanently if (gSavedSettings.getBOOL("DebugToolbarFUI")) { - gToolBarView = main_view->getChild("Toolbar View"); + llinfos << "Merov debug : Creating the toolbar view" << llendl; + // Get a pointer to the toolbar view holder + LLPanel* panel_holder = main_view->getChild("toolbar_view_holder"); + llinfos << "Merov debug : panel_holder = " << panel_holder << llendl; + // Load the toolbar view from file + gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", NULL, LLPanel::child_registry_t::instance()); + llinfos << "Merov debug : gToolBarView = " << gToolBarView << llendl; + // Attach it to the toolbar view holder + panel_holder->addChild(gToolBarView); } - // Constrain floaters to inside the menu and status bar regions. gFloaterView = main_view->getChild("Floater View"); gFloaterView->setFloaterSnapView(main_view->getChild("floater_snap_region")->getHandle()); -- cgit v1.2.3 From 1bcf6882c5faa94385f045e1c591da96408bb032 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 23 Sep 2011 15:09:37 -0700 Subject: EXP-1207 : More on lltoolbarview. Still not rendering --- indra/newview/llviewerwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d197782eed..e851398bf5 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1783,15 +1783,12 @@ void LLViewerWindow::initBase() // *TODO: Eventually, suppress the existence of this debug setting and turn toolbar FUI on permanently if (gSavedSettings.getBOOL("DebugToolbarFUI")) { - llinfos << "Merov debug : Creating the toolbar view" << llendl; // Get a pointer to the toolbar view holder LLPanel* panel_holder = main_view->getChild("toolbar_view_holder"); - llinfos << "Merov debug : panel_holder = " << panel_holder << llendl; // Load the toolbar view from file - gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", NULL, LLPanel::child_registry_t::instance()); - llinfos << "Merov debug : gToolBarView = " << gToolBarView << llendl; + gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", panel_holder, LLPanel::child_registry_t::instance()); // Attach it to the toolbar view holder - panel_holder->addChild(gToolBarView); + //panel_holder->addChild(gToolBarView); } // Constrain floaters to inside the menu and status bar regions. -- cgit v1.2.3 From 74d9663ff6444899bd5eedd29da197746a3ae226 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 23 Sep 2011 16:14:13 -0700 Subject: EXP-1246 Create chat bar floater reviewed by Leslie --- indra/newview/llviewerwindow.cpp | 57 ++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 26 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5893259d96..6381f58f63 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2467,38 +2467,43 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // Traverses up the hierarchy if( keyboard_focus ) { - LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL; - // arrow keys move avatar while chatting hack - if (chat_editor && chat_editor->hasFocus()) + LLNearbyChatBar* nearby_chat = LLFloaterReg::findTypedInstance("chat_bar"); + + if (nearby_chat) { - // 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")) + LLLineEditor* chat_editor = nearby_chat->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; @@ -2529,11 +2534,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 = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL; + 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. - LLBottomTray::getInstance()->getNearbyChatBar()->startChat(NULL); + LLNearbyChatBar::getInstance()->startChat(NULL); return TRUE; } } -- cgit v1.2.3 From 105b15436d37149f6df71866125871448ee4fbcb Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 23 Sep 2011 19:24:55 -0700 Subject: EXP-1027 : Fix the children creation code in LLToolBarView. Only a left panel is displayed now. --- 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 e851398bf5..c651e86606 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1786,7 +1786,7 @@ void LLViewerWindow::initBase() // Get a pointer to the toolbar view holder LLPanel* panel_holder = main_view->getChild("toolbar_view_holder"); // Load the toolbar view from file - gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", panel_holder, LLPanel::child_registry_t::instance()); + gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance()); // Attach it to the toolbar view holder //panel_holder->addChild(gToolBarView); } -- cgit v1.2.3 From e3199b98be55c7d3355258e836b6cab522922cfa Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 26 Sep 2011 15:19:04 -0700 Subject: EXP-1207 : Display toolbars only after login, use correct position (temporary), follow resize correctly, store pointers to toolbars, debug display (temporary) --- indra/newview/llviewerwindow.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 947f0ec184..34ee893594 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1779,7 +1779,7 @@ void LLViewerWindow::initBase() mHintHolder = main_view->getChild("hint_holder")->getHandle(); mLoginPanelHolder = main_view->getChild("login_panel_holder")->getHandle(); - // Update the toolbar global holder + // Create the toolbar view // *TODO: Eventually, suppress the existence of this debug setting and turn toolbar FUI on permanently if (gSavedSettings.getBOOL("DebugToolbarFUI")) { @@ -1787,8 +1787,8 @@ void LLViewerWindow::initBase() LLPanel* panel_holder = main_view->getChild("toolbar_view_holder"); // Load the toolbar view from file gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance()); - // Attach it to the toolbar view holder - //panel_holder->addChild(gToolBarView); + // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI()) + gToolBarView->setVisible(FALSE); } // Constrain floaters to inside the menu and status bar regions. @@ -1953,6 +1953,12 @@ void LLViewerWindow::initWorldUI() buttons_panel->setShape(buttons_panel_container->getLocalRect()); buttons_panel->setFollowsAll(); buttons_panel_container->addChild(buttons_panel); + + // Make the toolbars visible + if (gToolBarView) + { + gToolBarView->setVisible(TRUE); + } } // Destroy the UI -- cgit v1.2.3 From a465f816b8e7674aa3f22023d7708106ca35b350 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 26 Sep 2011 17:36:07 -0700 Subject: EXP-1239 FIX make toolbars wrap when there is not enough room toolbars resize to fit buttons toolbar view uses layout stacks to organize toolbars reviewed by Leslie --- indra/newview/llviewerwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 947f0ec184..4a20be63f6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1787,6 +1787,7 @@ void LLViewerWindow::initBase() LLPanel* panel_holder = main_view->getChild("toolbar_view_holder"); // Load the toolbar view from file gToolBarView = LLUICtrlFactory::getInstance()->createFromFile("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance()); + gToolBarView->setShape(panel_holder->getLocalRect()); // Attach it to the toolbar view holder //panel_holder->addChild(gToolBarView); } -- cgit v1.2.3 From 21543fdf26e8104d00bd683bdff5185d6dd620ef Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 28 Sep 2011 16:23:04 -0700 Subject: EXP-1257 : Implemented loading of toolbar settings per user account. Also factorize a bit and clean up the related saveToolbars code. --- indra/newview/llviewerwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7c930b80c2..6c9ee17a76 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1950,9 +1950,11 @@ void LLViewerWindow::initWorldUI() buttons_panel->setFollowsAll(); buttons_panel_container->addChild(buttons_panel); - // Make the toolbars visible + // Load and make the toolbars visible + // Note: we need to load the toolbars only *after* the user is logged in and IW if (gToolBarView) { + gToolBarView->loadToolbars(); gToolBarView->setVisible(TRUE); } } -- cgit v1.2.3 From 9d3fc5d930bd1dae07771350080e5140c0113891 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 29 Sep 2011 21:43:07 +0300 Subject: EXP-1209 FIXED Sidetray removed. - Removed all sidetray dependencies and the sidetray itself. - Also removed LLFloaterSidetrayTab and LLSidetrayListener as unused. --- indra/newview/llviewerwindow.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6c9ee17a76..149f9893d7 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -133,7 +133,6 @@ #include "llpreviewtexture.h" #include "llprogressview.h" #include "llresmgr.h" -#include "llsidetray.h" #include "llselectmgr.h" #include "llrootview.h" #include "llrendersphere.h" @@ -1773,7 +1772,6 @@ void LLViewerWindow::initBase() // placeholder widget that controls where "world" is rendered mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle(); - mNonSideTrayView = main_view->getChildView("non_side_tray_view")->getHandle(); mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle(); mPopupView = main_view->getChild("popup_holder"); mHintHolder = main_view->getChild("hint_holder")->getHandle(); @@ -1934,22 +1932,6 @@ void LLViewerWindow::initWorldUI() panel_ssf_container->addChild(panel_stand_stop_flying); panel_ssf_container->setVisible(TRUE); - // put sidetray in container - LLPanel* side_tray_container = getRootView()->getChild("side_tray_container"); - LLSideTray* sidetrayp = LLSideTray::getInstance(); - sidetrayp->setShape(side_tray_container->getLocalRect()); - // don't follow right edge to avoid spurious resizes, since we are using a fixed width layout - sidetrayp->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_BOTTOM); - side_tray_container->addChild(sidetrayp); - side_tray_container->setVisible(FALSE); - - // put sidetray buttons in their own panel - LLPanel* buttons_panel = sidetrayp->getButtonsPanel(); - LLPanel* buttons_panel_container = getRootView()->getChild("side_bar_tabs"); - buttons_panel->setShape(buttons_panel_container->getLocalRect()); - buttons_panel->setFollowsAll(); - buttons_panel_container->addChild(buttons_panel); - // Load and make the toolbars visible // Note: we need to load the toolbars only *after* the user is logged in and IW if (gToolBarView) @@ -3310,9 +3292,6 @@ void LLViewerWindow::updateKeyboardFocus() // make sure floater visible order is in sync with tab order gFloaterView->syncFloaterTabOrder(); } - - if(LLSideTray::instanceCreated())//just getInstance will create sidetray. we don't want this - LLSideTray::getInstance()->highlightFocused(); } static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View"); @@ -3336,12 +3315,6 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) new_world_rect.mTop = llround((F32)new_world_rect.mTop * mDisplayScale.mV[VY]); } - if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE) - { - // use right edge of window, ignoring sidebar - new_world_rect.mRight = mWindowRectRaw.mRight; - } - if (mWorldViewRectRaw != new_world_rect) { mWorldViewRectRaw = new_world_rect; -- cgit v1.2.3 From f31cb4c790de84e297ced3045f33a7ba6dc85521 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 5 Oct 2011 15:15:49 -0400 Subject: storm-1581 (partial): reset graphics only when GPU id changes, not class, and provide better explanation in the alert message --- 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 98ae746ca7..59fe5e870c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1651,7 +1651,7 @@ LLViewerWindow::LLViewerWindow( if (LLFeatureManager::getInstance()->isSafe() || (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion()) - || (gSavedSettings.getS32("LastGPUClass") != LLFeatureManager::getInstance()->getGPUClass()) + || (gSavedSettings.getString("LastGPUString") != LLFeatureManager::getInstance()->getGPUString()) || (gSavedSettings.getBOOL("ProbeHardwareOnStartup"))) { LLFeatureManager::getInstance()->applyRecommendedSettings(); -- cgit v1.2.3 From 6f9ed8b303e9e840fcd624b03ec0958dceba3dc7 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 5 Oct 2011 15:09:04 -0700 Subject: EXP-1273 Add floater for "Destinations" content --- indra/newview/llviewerwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 149f9893d7..30b6b0012d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1939,6 +1939,13 @@ void LLViewerWindow::initWorldUI() gToolBarView->loadToolbars(); gToolBarView->setVisible(TRUE); } + + LLMediaCtrl* destinations = LLFloaterReg::getInstance("destinations")->getChild("destination_guide_contents"); + if (destinations) + { + destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html"); + } } // Destroy the UI -- cgit v1.2.3 From 23205bb535e446979471296c9fa26f2530a9abaf Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 6 Oct 2011 17:18:49 -0700 Subject: EXP-1274 Create floater for "Avatar Picker" content --- indra/newview/llviewerwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a28950f376..fae3ee9081 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1945,6 +1945,12 @@ void LLViewerWindow::initWorldUI() destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html"); } + LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild("avatar_picker_contents"); + if (avatar_picker) + { + avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html"); + } } // Destroy the UI -- cgit v1.2.3 From 9273459251a6c59f8fabc50d9eef0b78e092e6fd Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Mon, 10 Oct 2011 17:09:46 +0300 Subject: EXP-1285 FIXED Chiclets moved to the upper right of the viewer window. - Floaters dock to chiclets at the bottom. - Floaters docking region limited to non-toolbar view. - Chiclet bar is positioned between the right toolbar and the minimized floaters stacked at the top left corner by default. --- indra/newview/llviewerwindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 665b31a427..85f74c9fdd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -84,6 +84,7 @@ // newview includes #include "llagent.h" #include "llbox.h" +#include "llchicletbar.h" #include "llconsole.h" #include "llviewercontrol.h" #include "llcylinder.h" @@ -1848,13 +1849,12 @@ void LLViewerWindow::initWorldUI() //getRootView()->sendChildToFront(gFloaterView); //getRootView()->sendChildToFront(gSnapshotFloaterView); - // new bottom panel - LLPanel* bottom_tray_container = getRootView()->getChild("bottom_tray_container"); - LLBottomTray* bottom_tray = LLBottomTray::getInstance(); - bottom_tray->setShape(bottom_tray_container->getLocalRect()); - bottom_tray->setFollowsAll(); - bottom_tray_container->addChild(bottom_tray); - bottom_tray_container->setVisible(TRUE); + LLPanel* chiclet_container = getRootView()->getChild("chiclet_container"); + LLChicletBar* chiclet_bar = LLChicletBar::getInstance(); + chiclet_bar->setShape(chiclet_container->getLocalRect()); + chiclet_bar->setFollowsAll(); + chiclet_container->addChild(chiclet_bar); + chiclet_container->setVisible(TRUE); LLRect morph_view_rect = full_window; morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); -- cgit v1.2.3 From d0cda13235079c6626ebc7bbe4de542784d50fa0 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 11 Oct 2011 22:49:00 -0700 Subject: EXP-1275 FIX A UI element or Keyboard shortcut to clear the viewport Ctrl+Shift+U now toggles UI and hides floaters refactored main_view.xml made all members of llviewerwindow private --- indra/newview/llviewerwindow.cpp | 42 ++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index fae3ee9081..2473d41a35 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -76,7 +76,6 @@ #include "lltimer.h" #include "timing.h" #include "llviewermenu.h" -#include "lltoolbarview.h" #include "lltooltip.h" #include "llmediaentry.h" #include "llurldispatcher.h" @@ -147,6 +146,7 @@ #include "lltexturefetch.h" #include "lltextureview.h" #include "lltool.h" +#include "lltoolbarview.h" #include "lltoolcomp.h" #include "lltooldraganddrop.h" #include "lltoolface.h" @@ -1339,7 +1339,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) { if (activated) { - mActive = TRUE; + mActive = true; send_agent_resume(); gAgent.clearAFK(); @@ -1348,7 +1348,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) } else { - mActive = FALSE; + mActive = false; // if the user has chosen to go Away automatically after some time, then go Away when minimizing if (gSavedSettings.getS32("AFKTimeout")) @@ -1531,7 +1531,8 @@ LLViewerWindow::LLViewerWindow( BOOL fullscreen, BOOL ignore_pixel_depth) // fullscreen is no longer used : mWindow(NULL), - mActive(TRUE), + mActive(true), + mUIVisible(true), mWindowRectRaw(0, height, width, 0), mWindowRectScaled(0, height, width, 0), mWorldViewRectRaw(0, height, width, 0), @@ -1771,7 +1772,6 @@ void LLViewerWindow::initBase() // placeholder widget that controls where "world" is rendered mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle(); - mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle(); mPopupView = main_view->getChild("popup_holder"); mHintHolder = main_view->getChild("hint_holder")->getHandle(); mLoginPanelHolder = main_view->getChild("login_panel_holder")->getHandle(); @@ -1882,7 +1882,7 @@ void LLViewerWindow::initWorldUI() gStatusBar->setShape(status_bar_container->getLocalRect()); // sync bg color with menu bar gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() ); - status_bar_container->addChild(gStatusBar); + status_bar_container->addChildInBack(gStatusBar); status_bar_container->setVisible(TRUE); // Navigation bar @@ -1922,8 +1922,7 @@ void LLViewerWindow::initWorldUI() hud_rect.mTop -= gMenuBarView->getRect().getHeight(); } gHUDView = new LLHUDView(hud_rect); - // put behind everything else in the UI - getRootView()->addChildInBack(gHUDView); + getRootView()->addChild(gHUDView); } LLPanel* panel_ssf_container = getRootView()->getChild("stand_stop_flying_container"); @@ -4084,7 +4083,7 @@ static S32 BORDERWIDTH = 0; void LLViewerWindow::movieSize(S32 new_width, S32 new_height) { LLCoordScreen size; - gViewerWindow->mWindow->getSize(&size); + gViewerWindow->getWindow()->getSize(&size); if ( (size.mX != new_width + BORDERWIDTH) ||(size.mY != new_height + BORDERHEIGHT)) { @@ -4095,7 +4094,7 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) BORDERHEIGHT = size.mY- y; LLCoordScreen new_size(new_width + BORDERWIDTH, new_height + BORDERHEIGHT); - gViewerWindow->mWindow->setSize(new_size); + gViewerWindow->getWindow()->setSize(new_size); } } @@ -4979,6 +4978,29 @@ bool LLViewerWindow::onAlert(const LLSD& notify) return false; } +void LLViewerWindow::setUIVisibility(bool visible) +{ + mUIVisible = visible; + + if (gToolBarView) + { + gToolBarView->setToolBarsVisible(visible); + } + + mRootView->getChildView("nav_bar_container")->setVisible(visible); + mRootView->getChildView("status_bar_container")->setVisible(visible); + + if (!visible) + { + gFloaterView->closeAllChildren(false); + } +} + +bool LLViewerWindow::getUIVisibility() +{ + return mUIVisible; +} + //////////////////////////////////////////////////////////////////////////// // // LLPickInfo -- cgit v1.2.3 From a1f0101ca293768a37889856b1dde69110b30b7c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 12 Oct 2011 13:50:20 -0700 Subject: EXP-1275 WIP A UI element or Keyboard shortcut to clear the viewport restores hidden floaters now --- indra/newview/llviewerwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2473d41a35..665b31a427 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4992,7 +4992,11 @@ void LLViewerWindow::setUIVisibility(bool visible) if (!visible) { - gFloaterView->closeAllChildren(false); + gFloaterView->hideAllFloaters(); + } + else + { + gFloaterView->showHiddenFloaters(); } } -- cgit v1.2.3 From bdf6363e6aa4216913607e83bfc5e159f2535407 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 14 Oct 2011 01:07:16 +0300 Subject: EXP-1282 FIXED Bottom bar removed. - LLBottomTray code and XUI removed. - "Speak" buttom which resided in Bottom bar removed. - Voice connection status update moved from LLBottomTray to LLVivoxVoiceClient. --- indra/newview/llviewerwindow.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 85f74c9fdd..1f8bac5069 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -187,7 +187,6 @@ #include "llviewerjoystick.h" #include "llviewernetwork.h" #include "llpostprocess.h" -#include "llbottomtray.h" #include "llnearbychatbar.h" #include "llagentui.h" #include "llwearablelist.h" @@ -2163,10 +2162,10 @@ void LLViewerWindow::reshape(S32 width, S32 height) // Hide normal UI when a logon fails void LLViewerWindow::setNormalControlsVisible( BOOL visible ) { - if(LLBottomTray::instanceExists()) + if(LLChicletBar::instanceExists()) { - LLBottomTray::getInstance()->setVisible(visible); - LLBottomTray::getInstance()->setEnabled(visible); + LLChicletBar::getInstance()->setVisible(visible); + LLChicletBar::getInstance()->setEnabled(visible); } if ( gMenuBarView ) @@ -4921,8 +4920,8 @@ S32 LLViewerWindow::getChatConsoleBottomPad() { S32 offset = 0; - if(LLBottomTray::instanceExists()) - offset += LLBottomTray::getInstance()->getRect().getHeight(); + if(gToolBarView) + offset += gToolBarView->getChild("bottom_toolbar_panel")->getRect().getHeight(); return offset; } -- cgit v1.2.3 From 8e3717e187766f0ad24f29886ae930be186a4394 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 13 Oct 2011 20:31:41 -0700 Subject: EXP-1323 FIX Mouselook text "Press ESC to return to World View" overlaps with bottom toolbar if mode is icon only hide toolbars in mouselook hide top_info_bar when hiding UI disable mouselook when hiding UI fixed layout of more button in navigation bar --- indra/newview/llviewerwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 665b31a427..92dc352cf4 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4987,11 +4987,13 @@ void LLViewerWindow::setUIVisibility(bool visible) gToolBarView->setToolBarsVisible(visible); } + mRootView->getChildView("topinfo_bar_container")->setVisible(visible); mRootView->getChildView("nav_bar_container")->setVisible(visible); mRootView->getChildView("status_bar_container")->setVisible(visible); if (!visible) { + gAgentCamera.changeCameraToDefault(); gFloaterView->hideAllFloaters(); } else -- cgit v1.2.3 From 9f682772d93b4530ad7bcbf52adb2300cd91cd4d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 13 Oct 2011 20:45:50 -0700 Subject: EXP-1323 FIX Mouselook text "Press ESC to return to World View" overlaps with bottom toolbar if mode is icon only fixed popping out of mouselook when turning off UI --- indra/newview/llviewerwindow.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 92dc352cf4..b8715bfa5b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4982,24 +4982,24 @@ void LLViewerWindow::setUIVisibility(bool visible) { mUIVisible = visible; - if (gToolBarView) - { - gToolBarView->setToolBarsVisible(visible); - } - - mRootView->getChildView("topinfo_bar_container")->setVisible(visible); - mRootView->getChildView("nav_bar_container")->setVisible(visible); - mRootView->getChildView("status_bar_container")->setVisible(visible); - if (!visible) { - gAgentCamera.changeCameraToDefault(); + gAgentCamera.changeCameraToThirdPerson(FALSE); gFloaterView->hideAllFloaters(); } else { gFloaterView->showHiddenFloaters(); } + + if (gToolBarView) + { + gToolBarView->setToolBarsVisible(visible); + } + + mRootView->getChildView("topinfo_bar_container")->setVisible(visible); + mRootView->getChildView("nav_bar_container")->setVisible(visible); + mRootView->getChildView("status_bar_container")->setVisible(visible); } bool LLViewerWindow::getUIVisibility() -- cgit v1.2.3 From aa7245fa2b5441285d2de384a9629782456af88a Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 14 Oct 2011 11:46:38 -0700 Subject: EXP-1361 FIX -- Repositioning Viewer Window on mac triggers click to walk * Mouse clicks outside the root view are now discarded before they can cause problems. Reviewed by Richard --- indra/newview/llviewerwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b8715bfa5b..0873e4f6ea 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -938,6 +938,11 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK // } //} + // Mark the click as handled and return if we aren't within the root view to avoid spurious bugs + if( !mRootView->pointInView(x, y) ) + { + return TRUE; + } // Give the UI views a chance to process the click if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) { -- cgit v1.2.3 From 7bc1eaf22f3c8bde69922215fb61b448afa8967a Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 14 Oct 2011 15:22:53 -0700 Subject: EXP-1342 FIX -- Update avatar picker and destination guide urls * URL's are in place with the [GRID_LOWERCASE] used in the link to go to the proper page based on the grid. * Added "GRID_LOWERCASE" substitution for URL's since it is case sensitive --- indra/newview/llviewerwindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0873e4f6ea..1d64e22db2 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1947,13 +1947,17 @@ void LLViewerWindow::initWorldUI() if (destinations) { destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html"); + std::string url = gSavedSettings.getString("DestinationGuideURL"); + url = LLWeb::expandURLSubstitutions(url, LLSD()); + destinations->navigateTo(url, "text/html"); } LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild("avatar_picker_contents"); if (avatar_picker) { avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); - avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html"); + std::string url = gSavedSettings.getString("AvatarPickerURL"); + url = LLWeb::expandURLSubstitutions(url, LLSD()); + avatar_picker->navigateTo(url, "text/html"); } } @@ -1980,7 +1984,7 @@ void LLViewerWindow::shutdownViews() // *TODO: Make LLNavigationBar part of gViewerWindow if (LLNavigationBar::instanceExists()) { - delete LLNavigationBar::getInstance(); + delete LLNavigationBar::getInstance(); } // destroy menus after instantiating navbar above, as it needs -- cgit v1.2.3 From 492c93369ccc08dda1f1f51912737dec81d7de83 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 19 Oct 2011 17:25:45 -0700 Subject: EXP-1426 FIX Voice Settings floater button has label Nearby Voice and tool tip with label nearby voice --- 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 b84db6b1c0..369e56878c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3174,7 +3174,7 @@ void LLViewerWindow::updateLayout() //gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible()); } - LLFloaterBuildOptions* build_options_floater = LLFloaterReg::getTypedInstance("build_options"); + LLFloaterBuildOptions* build_options_floater = LLFloaterReg::findTypedInstance("build_options"); if (build_options_floater && build_options_floater->getVisible()) { build_options_floater->updateGridMode(); -- cgit v1.2.3