summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp54
1 files changed, 40 insertions, 14 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 43d18c6d83..983a2d25c8 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -96,6 +96,7 @@
#include "llface.h"
#include "llfeaturemanager.h"
#include "llfilepicker.h"
+#include "llfirstuse.h"
#include "llfloater.h"
#include "llfloaterbuildoptions.h"
#include "llfloaterbuyland.h"
@@ -1515,7 +1516,7 @@ void LLViewerWindow::initBase()
// (But wait to add it as a child of the root view so that it will be in front of the
// other views.)
MainPanel* main_view = new MainPanel();
- LLUICtrlFactory::instance().buildPanel(main_view, "main_view.xml");
+ main_view->buildFromFile("main_view.xml");
main_view->setShape(full_window);
getRootView()->addChild(main_view);
@@ -1523,7 +1524,8 @@ void LLViewerWindow::initBase()
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<LLPopupView>("popup_holder");
+ mPopupView = main_view->findChild<LLPopupView>("popup_holder");
+ mHintHolder = main_view->getChild<LLView>("hint_holder")->getHandle();
// Constrain floaters to inside the menu and status bar regions.
gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
@@ -1561,7 +1563,7 @@ void LLViewerWindow::initBase()
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLFloaterPreference::initBusyResponse));
// Add the progress bar view (startup view), which overrides everything
- mProgressView = getRootView()->getChild<LLProgressView>("progress_view");
+ mProgressView = getRootView()->findChild<LLProgressView>("progress_view");
setShowProgress(FALSE);
setProgressCancelButtonVisible(FALSE);
@@ -2134,10 +2136,20 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
return TRUE;
}
+ LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
+
// give menus a chance to handle modified (Ctrl, Alt) shortcut keys before current focus
// as long as focus isn't locked
if (mask & (MASK_CONTROL | MASK_ALT) && !gFocusMgr.focusLocked())
{
+ // Check the current floater's menu first, if it has one.
+ if (gFocusMgr.keyboardFocusHasAccelerators()
+ && keyboard_focus
+ && keyboard_focus->handleKey(key,mask,FALSE))
+ {
+ return TRUE;
+ }
+
if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
{
@@ -2173,7 +2185,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
// Traverses up the hierarchy
- LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus();
if( keyboard_focus )
{
LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
@@ -2391,7 +2402,7 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
{
if (viewp)
{
- if (!params.styled_message().empty())
+ if (!params.styled_message.empty())
{
params.styled_message.add().text("\n---------\n");
}
@@ -2426,6 +2437,18 @@ void LLViewerWindow::updateUI()
static std::string last_handle_msg;
+ if (gLoggedInTime.getStarted())
+ {
+ if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("DestinationGuideHintTimeout"))
+ {
+ LLFirstUse::notUsingDestinationGuide();
+ }
+ if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("SidePanelHintTimeout"))
+ {
+ LLFirstUse::notUsingSidePanel();
+ }
+ }
+
LLConsole::updateClass();
// animate layout stacks so we have up to date rect for world view
@@ -2486,6 +2509,17 @@ void LLViewerWindow::updateUI()
// only update mouse hover set when UI is visible (since we shouldn't send hover events to invisible UI
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
+ // include all ancestors of captor_view as automatically having mouse
+ if (captor_view)
+ {
+ LLView* captor_parent_view = captor_view->getParent();
+ while(captor_parent_view)
+ {
+ mouse_hover_set.insert(captor_parent_view->getHandle());
+ captor_parent_view = captor_parent_view->getParent();
+ }
+ }
+
// aggregate visible views that contain mouse cursor in display order
LLPopupView::popup_list_t popups = mPopupView->getCurrentPopups();
@@ -3913,7 +3947,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
}
if(image_buffer_x > 0 && image_buffer_y > 0)
{
- raw->resize(image_buffer_x, image_buffer_y, 3);
+ raw->resize(image_buffer_x, image_buffer_y, 3);
}
else
{
@@ -4247,14 +4281,6 @@ BOOL LLViewerWindow::getShowProgress() const
return (mProgressView && mProgressView->getVisible());
}
-void LLViewerWindow::moveProgressViewToFront()
-{
- if( mProgressView && mRootView )
- {
- mRootView->sendChildToFront(mProgressView);
- }
-}
-
void LLViewerWindow::setProgressString(const std::string& string)
{
if (mProgressView)