summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-09-27 17:54:52 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-09-27 17:54:52 -0700
commita4b223248eac077c7d8e00c5fbb9f5fb067cc9bd (patch)
tree760a282276c5bf6e4095b0944b1a08a3bfd32d87 /indra/newview/llviewerwindow.cpp
parent7fc48fb1259d3dbceed5248d8ccda39048d6ba8d (diff)
parente6688f993f82d2683e3eadce96c893959c94be2d (diff)
Merge
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 172026558f..a0a3380441 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"
@@ -1512,7 +1513,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);
@@ -1520,7 +1521,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");
@@ -1558,7 +1560,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);
@@ -2131,10 +2133,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)))
{
@@ -2170,7 +2182,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;
@@ -2388,7 +2399,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");
}
@@ -2423,6 +2434,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
@@ -2483,6 +2506,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();
@@ -3910,7 +3944,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
{
@@ -4244,14 +4278,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)