summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llcheckboxctrl.cpp2
-rw-r--r--indra/llui/llmenubutton.h1
-rw-r--r--indra/newview/lldateutil.cpp7
-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.cpp17
-rw-r--r--indra/newview/skins/default/colors.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_widgets.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml4
-rw-r--r--indra/newview/tests/lldateutil_test.cpp10
11 files changed, 73 insertions, 15 deletions
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index cd10dfdb1c..3d32157406 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -107,8 +107,8 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
{
tbparams.font(p.font);
}
+ tbparams.text_color( p.enabled() ? p.text_enabled_color() : p.text_disabled_color() );
mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
-
addChild(mLabel);
// Button
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/lldateutil.cpp b/indra/newview/lldateutil.cpp
index 10b7935caf..abb2fdeb9a 100644
--- a/indra/newview/lldateutil.cpp
+++ b/indra/newview/lldateutil.cpp
@@ -44,15 +44,18 @@ static S32 DAYS_PER_MONTH_LEAP[] =
static S32 days_from_month(S32 year, S32 month)
{
+ llassert_always(1 <= month);
+ llassert_always(month <= 12);
+
if (year % 4 == 0
&& year % 100 != 0)
{
// leap year
- return DAYS_PER_MONTH_LEAP[month];
+ return DAYS_PER_MONTH_LEAP[month - 1];
}
else
{
- return DAYS_PER_MONTH_NOLEAP[month];
+ return DAYS_PER_MONTH_NOLEAP[month - 1];
}
}
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 40c74ccf82..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());
@@ -5856,8 +5859,12 @@ void confirm_replace_attachment(S32 option, void* user_data)
}
}
-bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
+void callback_attachment_drop(const LLSD& notification, const LLSD& response)
{
+ // Ensure user confirmed the drop
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0) return;
+
// Called when the user clicked on an object attached to them
// and selected "Drop".
LLUUID object_id = notification["payload"]["object_id"].asUUID();
@@ -5866,7 +5873,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
if (!object)
{
llwarns << "handle_drop_attachment() - no object to drop" << llendl;
- return true;
+ return;
}
LLViewerObject *parent = (LLViewerObject*)object->getParent();
@@ -5883,13 +5890,13 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
if (!object)
{
llwarns << "handle_detach() - no object to detach" << llendl;
- return true;
+ return;
}
if (object->isAvatar())
{
llwarns << "Trying to detach avatar from avatar." << llendl;
- return true;
+ return;
}
// reselect the object
@@ -5897,7 +5904,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
LLSelectMgr::getInstance()->sendDropAttachment();
- return true;
+ return;
}
class LLAttachmentDrop : public view_listener_t
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index cb511c2f0b..67816a6a87 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -64,7 +64,7 @@
value="0 0 1 1" />
<color
name="Yellow"
- value="0.114 0.65 0.1" />
+ value="1 1 0 1" />
<color
name="Green"
value="0 .39 .10 1" />
@@ -168,6 +168,9 @@
name="ChatHistoryTextColor"
reference="LtGray" />
<color
+ name="ChicletFlashColor"
+ reference="0.114 0.65 0.1" />
+ <color
name="ColorDropShadow"
reference="Black_50" />
<color
diff --git a/indra/newview/skins/default/xui/en/floater_test_widgets.xml b/indra/newview/skins/default/xui/en/floater_test_widgets.xml
index 84adabe4fa..2f88c234cc 100644
--- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml
@@ -123,6 +123,12 @@
layout="topleft"
tool_tip="checkbox"
name="test_checkbox" />
+ <check_box
+ top_pad="5"
+ enabled="false"
+ label="Checkbox Disabled"
+ tool_tip="checkbox disabled"
+ name="test_checkbox_disabled" />
<!-- "combo_box" is a pop-menu of items. Optionally the box itself can
contain a general purpose line input editor, allowing the user to
provide input that is not a list item. -->
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index b92aa10ffc..aeaa049f1f 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -350,7 +350,7 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well
-->
<button
auto_resize="true"
- flash_color="Yellow"
+ flash_color="ChicletFlashColor"
follows="right"
halign="center"
height="23"
@@ -403,7 +403,7 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well
halign="center"
height="23"
follows="right"
- flash_color="Yellow"
+ flash_color="ChicletFlashColor"
label_color="Black"
left="5"
name="Unread"
diff --git a/indra/newview/tests/lldateutil_test.cpp b/indra/newview/tests/lldateutil_test.cpp
index 142a5eb5e6..7ba82fbd2c 100644
--- a/indra/newview/tests/lldateutil_test.cpp
+++ b/indra/newview/tests/lldateutil_test.cpp
@@ -179,4 +179,14 @@ namespace tut
LLDateUtil::ageFromDate("12/31/2009", mNow),
"Joined today" );
}
+
+ template<> template<>
+ void dateutil_object_t::test<5>()
+ {
+ set_test_name("2010 rollover");
+ LLDate now(std::string("2010-01-04T12:00:00Z"));
+ ensure_equals("days",
+ LLDateUtil::ageFromDate("12/13/2009", now),
+ "3 weeks old" );
+ }
}