summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llappviewer.cpp17
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp29
-rw-r--r--indra/newview/llsidepaneliteminfo.h2
-rw-r--r--indra/newview/llviewerjoystick.cpp27
-rw-r--r--indra/newview/llviewerwindow.cpp20
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml421
7 files changed, 75 insertions, 443 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2f7c256b49..f57734cf71 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -91,7 +91,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>300.0</real>
+ <real>300</real>
</map>
<key>AckCollectTime</key>
<map>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6e176183d8..062ab93a0b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -454,11 +454,20 @@ void idle_afk_check()
{
// check idle timers
F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
- F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
- if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
+ LLCachedControl<S32> afk_timeout(gSavedSettings, "AFKTimeout", 300);
+ if (afk_timeout() && (current_idle > afk_timeout()))
{
- LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
- gAgent.setAFK();
+ if (!gAgent.getAFK())
+ {
+ LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
+ gAgent.setAFK();
+ }
+ else
+ {
+ // Refresh timer so that random one click or hover won't clear the status.
+ // But expanding the window still should lift afk status
+ gAwayTimer.reset();
+ }
}
}
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index d6d5a4ef2d..2045820090 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -56,6 +56,8 @@
#include "llviewerregion.h"
+const char* const DEFAULT_DESC = "(No Description)";
+
class PropertiesChangedCallback : public LLInventoryCallback
{
public:
@@ -128,6 +130,7 @@ LLSidepanelItemInfo::LLSidepanelItemInfo(const LLPanel::Params& p)
, mUpdatePendingId(-1)
, mIsDirty(false) /*Not ready*/
, mParentFloater(NULL)
+ , mLabelItemDesc(NULL)
{
gInventory.addObserver(this);
gIdleCallbacks.addFunction(&LLSidepanelItemInfo::onIdle, (void*)this);
@@ -158,10 +161,11 @@ BOOL LLSidepanelItemInfo::postBuild()
mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon");
mLabelOwnerName = getChild<LLTextBox>("LabelOwnerName");
mLabelCreatorName = getChild<LLTextBox>("LabelCreatorName");
+ mLabelItemDesc = getChild<LLTextEditor>("LabelItemDesc");
getChild<LLLineEditor>("LabelItemName")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
- getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
+ mLabelItemDesc->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
// Thumnail edition
mChangeThumbnailBtn->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onEditThumbnail, this));
// acquired date
@@ -342,10 +346,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
getChild<LLUICtrl>("LabelItemName")->setValue(item->getName());
getChildView("LabelItemDescTitle")->setEnabled(TRUE);
- getChildView("LabelItemDesc")->setEnabled(is_modifiable);
- getChild<LLUICtrl>("LabelItemDesc")->setValue(item->getDescription());
getChild<LLUICtrl>("item_thumbnail")->setValue(item->getThumbnailUUID());
+ // Asset upload substitutes empty description with a (No Description) placeholder
+ std::string desc = item->getDescription();
+ mLabelItemDesc->setSelectAllOnFocusReceived(desc == DEFAULT_DESC);
+ mLabelItemDesc->setValue(desc);
+ mLabelItemDesc->setEnabled(is_modifiable);
+
LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
mItemTypeIcon->setImage(icon_img);
@@ -927,17 +935,22 @@ void LLSidepanelItemInfo::onCommitDescription()
LLViewerInventoryItem* item = findItem();
if(!item) return;
- LLTextEditor* labelItemDesc = getChild<LLTextEditor>("LabelItemDesc");
- if(!labelItemDesc)
+ if(!mLabelItemDesc)
{
return;
}
- if((item->getDescription() != labelItemDesc->getText()) &&
- (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE)))
+ if (!gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE))
+ {
+ return;
+ }
+ std::string old_desc = item->getDescription();
+ std::string new_desc = mLabelItemDesc->getText();
+ if(old_desc != new_desc)
{
+ mLabelItemDesc->setSelectAllOnFocusReceived(false);
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
- new_item->setDescription(labelItemDesc->getText());
+ new_item->setDescription(new_desc);
onCommitChanges(new_item);
}
}
diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h
index b916f44520..736420bac5 100644
--- a/indra/newview/llsidepaneliteminfo.h
+++ b/indra/newview/llsidepaneliteminfo.h
@@ -46,6 +46,7 @@ class LLObjectInventoryObserver;
class LLViewerObject;
class LLPermissions;
class LLTextBox;
+class LLTextEditor;
class LLSidepanelItemInfo : public LLPanel, public LLInventoryObserver
{
@@ -105,6 +106,7 @@ private:
LLIconCtrl* mItemTypeIcon;
LLTextBox* mLabelOwnerName;
LLTextBox* mLabelCreatorName;
+ LLTextEditor* mLabelItemDesc;
//
// UI Elements
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index e35cb26ce1..2bcec1ecee 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -806,6 +806,10 @@ void LLViewerJoystick::moveObjects(bool reset)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
if (sDelta[0] || sDelta[1] || sDelta[2])
{
@@ -980,6 +984,10 @@ void LLViewerJoystick::moveAvatar(bool reset)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
setCameraNeedsUpdate(true);
}
@@ -1192,10 +1200,17 @@ void LLViewerJoystick::moveFlycam(bool reset)
}
// Clear AFK state if moved beyond the deadzone
- if (!is_zero && gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
- {
- gAgent.clearAFK();
- }
+ if (!is_zero)
+ {
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
+ {
+ gAgent.clearAFK();
+ }
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
+ }
sFlycamPosition += LLVector3(sDelta) * sFlycamRotation;
@@ -1256,6 +1271,10 @@ bool LLViewerJoystick::toggleFlycam()
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
mOverrideCamera = !mOverrideCamera;
if (mOverrideCamera)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 37e64dfc17..4a8edfcf89 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1425,11 +1425,17 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
mWindow->showCursorFromMouseMove();
- if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME
- && !gDisconnected)
- {
- gAgent.clearAFK();
- }
+ if (!gDisconnected)
+ {
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
+ {
+ gAgent.clearAFK();
+ }
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
+ }
}
void LLViewerWindow::handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask)
@@ -1545,6 +1551,10 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
// *NOTE: We want to interpret KEY_RETURN later when it arrives as
// a Unicode char, not as a keydown. Otherwise when client frame
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
deleted file mode 100644
index 6c3214a76d..0000000000
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ /dev/null
@@ -1,421 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater
- legacy_header_height="18"
- height="340"
- layout="topleft"
- name="item properties"
- help_topic="item_properties"
- save_rect="true"
- title="INVENTORY ITEM PROPERTIES"
- width="350">
- <floater.string
- name="unknown">
- (unknown)
- </floater.string>
- <floater.string
- name="public">
- (public)
- </floater.string>
- <floater.string
- name="you_can">
- You can:
- </floater.string>
- <floater.string
- name="owner_can">
- Owner can:
- </floater.string>
- <floater.string
- name="acquiredDate">
- [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
- </floater.string>
- <icon
- follows="top|right"
- height="18"
- image_name="Lock"
- layout="topleft"
- left="276"
- mouse_opaque="true"
- name="IconLocked"
- top="4"
- width="18" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="LabelItemNameTitle"
- top="25"
- width="78">
- Name:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_delta="78"
- max_length_bytes="63"
- name="LabelItemName"
- top_delta="0"
- width="252" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="LabelItemDescTitle"
- top="45"
- width="78">
- Description:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_delta="78"
- max_length_bytes="127"
- name="LabelItemDesc"
- top_delta="0"
- width="252" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="LabelCreatorTitle"
- top="65"
- width="78">
- Creator:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="78"
- name="LabelCreatorName"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="170">
- TestString PleaseIgnore
- </text>
- <button
- follows="top|right"
- height="16"
- label="Profile..."
- layout="topleft"
- left_delta="174"
- name="BtnCreator"
- top_delta="0"
- width="78" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="LabelOwnerTitle"
- top="85"
- width="78">
- Owner:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="78"
- name="LabelOwnerName"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="170">
- TestString PleaseIgnore
- </text>
- <button
- follows="top|right"
- height="16"
- label="Profile..."
- layout="topleft"
- left_delta="174"
- name="BtnOwner"
- top_delta="0"
- width="78" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="LabelAcquiredTitle"
- top="105"
- width="78">
- Acquired:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="78"
- name="LabelAcquiredDate"
- top_delta="0"
- width="252">
- Wed May 24 12:50:46 2006
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="OwnerLabel"
- top="125"
- width="78">
- You:
- </text>
- <check_box
- height="16"
- label="Edit"
- layout="topleft"
- left_pad="5"
- name="CheckOwnerModify"
- top_delta="0"
- width="78" />
- <check_box
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="0"
- name="CheckOwnerCopy"
- top_pad="5"
- width="88" />
- <check_box
- height="16"
- label="Resell"
- layout="topleft"
- left_delta="0"
- name="CheckOwnerTransfer"
- top_pad="5"
- width="106" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="AnyoneLabel"
- top_pad="5"
- width="78">
- Anyone:
- </text>
- <check_box
- height="16"
- label="Copy"
- layout="topleft"
- left_pad="5"
- name="CheckEveryoneCopy"
- top_delta="0"
- width="130" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="GroupLabel"
- top_pad="5"
- width="78">
- Group:
- </text>
- <check_box
- height="16"
- label="Share"
- layout="topleft"
- left_pad="5"
- name="CheckShareWithGroup"
- top_delta="5"
- width="106" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="25"
- layout="topleft"
- left="10"
- name="NextOwnerLabel"
- top_pad="5"
- width="78"
- word_wrap="true">
- Next owner:
- </text>
- <check_box
- height="16"
- label="Edit"
- layout="topleft"
- left_pad="5"
- name="CheckNextOwnerModify"
- top_delta="0"
- width="78" />
- <check_box
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="0"
- name="CheckNextOwnerCopy"
- top_pad="5"
- width="88" />
- <check_box
- height="16"
- label="Resell"
- layout="topleft"
- left_delta="0"
- name="CheckNextOwnerTransfer"
- top_pad="5"
- width="106" />
- <check_box
- height="16"
- label="For Sale"
- layout="topleft"
- left="10"
- name="CheckPurchase"
- top_pad="5"
- width="78" />
- <combo_box
- height="19"
- left_pad="5"
- layout="topleft"
- follows="left|top"
- name="ComboBoxSaleType"
- width="110">
- <combo_box.item
- name="Copy"
- label="Copy"
- value="2" />
- <combo_box.item
- name="Contents"
- label="Contents"
- value="3" />
- <combo_box.item
- name="Original"
- label="Original"
- value="1" />
- </combo_box>
- <spinner
- follows="left|top"
- decimal_digits="0"
- increment="1"
- name="Edit Cost"
- label="Price:"
- label_width="100"
- left="10"
- width="192"
- min_val="1"
- height="19"
- max_val="999999999"
- top_pad="5"/>
- <text
- type="string"
- length="1"
- height="15"
- follows="left|top"
- layout="topleft"
- left_delta="82"
- name="CurrencySymbol"
- top_delta="1"
- width="18">
- L$
- </text>
-
- <!--line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="5"
- max_length_bytes="25"
- name="EditPrice"
- top_delta="0"
- width="242" /-->
-
- <!--text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="BaseMaskDebug"
- top="155"
- width="330">
- B:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="OwnerMaskDebug"
- top_delta="0"
- width="270">
- O:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="GroupMaskDebug"
- top_delta="0"
- width="210">
- G:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="EveryoneMaskDebug"
- top_delta="0"
- width="150">
- E:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="NextMaskDebug"
- top_delta="0"
- width="90">
- N:
- </text-->
-
-</floater>