summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-01-05 16:29:11 -0800
committerJames Cook <james@lindenlab.com>2010-01-05 16:29:11 -0800
commit8a033dba8dd77a6f4c4bdeaa6b897101ccb26472 (patch)
tree4fb1f9ffba3b224c79d2e9d263a9b010c3d3eadf /indra
parenta3adfe54cb9fc953cae0adf2f61c578aa3ca5842 (diff)
parentab3dbd647e78cff67ce7ffe85bb6fbc5c5461312 (diff)
Merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llmenubutton.h1
-rw-r--r--indra/newview/llinspect.h2
-rw-r--r--indra/newview/llinspectavatar.cpp19
-rw-r--r--indra/newview/llinspectobject.cpp15
-rw-r--r--indra/newview/llviewermenu.cpp3
5 files changed, 36 insertions, 4 deletions
diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h
index 02eb9d3806..d0e99d9f40 100644
--- a/indra/llui/llmenubutton.h
+++ b/indra/llui/llmenubutton.h
@@ -55,6 +55,7 @@ public:
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask );
void hideMenu();
+ LLMenuGL* getMenu() { return mMenu; }
protected:
friend class LLUICtrlFactory;
diff --git a/indra/newview/llinspect.h b/indra/newview/llinspect.h
index 731e99534b..a1cb9cd71c 100644
--- a/indra/newview/llinspect.h
+++ b/indra/newview/llinspect.h
@@ -55,7 +55,7 @@ public:
/// Inspectors close themselves when they lose focus
/*virtual*/ void onFocusLost();
-private:
+protected:
LLFrameTimer mCloseTimer;
LLFrameTimer mOpenTimer;
};
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index dae980feb1..0e6bbd318e 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -93,6 +93,10 @@ public:
// Update view based on information from avatar properties processor
void processAvatarData(LLAvatarData* data);
+ // override the inspector mouse leave so timer is only paused if
+ // gear menu is not open
+ /* virtual */ void onMouseLeave(S32 x, S32 y, MASK mask);
+
private:
// Make network requests for all the data to display in this view.
// Used on construction and if avatar id changes.
@@ -257,8 +261,6 @@ BOOL LLInspectAvatar::postBuild(void)
}
-
-
// Multiple calls to showInstance("inspect_avatar", foo) will provide different
// LLSD for foo, which we will catch here.
//virtual
@@ -382,6 +384,19 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data)
mPropertiesRequest = NULL;
}
+// For the avatar inspector, we only want to unpause the fade timer
+// if neither the gear menu or self gear menu are open
+void LLInspectAvatar::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ LLMenuGL* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
+ LLMenuGL* gear_menu_self = getChild<LLMenuButton>("gear_self_btn")->getMenu();
+ if ( !(gear_menu && gear_menu->getVisible()) &&
+ !(gear_menu_self && gear_menu_self->getVisible()))
+ {
+ mOpenTimer.unpause();
+ }
+}
+
void LLInspectAvatar::updateModeratorPanel()
{
bool enable_moderator_panel = false;
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index cb35a287e9..3be9d5fb0e 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -82,6 +82,10 @@ public:
// Release the selection and do other cleanup
/*virtual*/ void onClose(bool app_quitting);
+ // override the inspector mouse leave so timer is only paused if
+ // gear menu is not open
+ /* virtual */ void onMouseLeave(S32 x, S32 y, MASK mask);
+
private:
// Refresh displayed data with information from selection manager
void update();
@@ -181,7 +185,6 @@ BOOL LLInspectObject::postBuild(void)
return TRUE;
}
-
// Multiple calls to showInstance("inspect_avatar", foo) will provide different
// LLSD for foo, which we will catch here.
//virtual
@@ -562,6 +565,16 @@ void LLInspectObject::updateSecureBrowsing()
getChild<LLUICtrl>("secure_browsing")->setVisible(is_secure_browsing);
}
+// For the object inspector, only unpause the fade timer
+// if the gear menu is not open
+void LLInspectObject::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ LLMenuGL* gear_menu = getChild<LLMenuButton>("gear_btn")->getMenu();
+ if ( !(gear_menu && gear_menu->getVisible()))
+ {
+ mOpenTimer.unpause();
+ }
+}
void LLInspectObject::onClickBuy()
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index fb64a1929d..149b7a6d65 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -62,6 +62,7 @@
#include "llfloaterreporter.h"
#include "llfloatersearch.h"
#include "llfloaterscriptdebug.h"
+#include "llfloatersnapshot.h"
#include "llfloatertools.h"
#include "llfloaterworldmap.h"
#include "llavataractions.h"
@@ -446,6 +447,8 @@ void init_menus()
// Otherwise tool tips for menu items would be overlapped by menu, since
// main view is behind of menu holder now.
gViewerWindow->getRootView()->addChild(gToolTipView);
+
+ gViewerWindow->getRootView()->addChild(gSnapshotFloaterView);
gViewerWindow->setMenuBackgroundColor(false,
LLViewerLogin::getInstance()->isInProductionGrid());