summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-15 17:10:53 -0800
committerJames Cook <james@lindenlab.com>2009-12-15 17:10:53 -0800
commitb030bb6e55df8574adfc38bc3d092176b34214b4 (patch)
tree855f700ce9f689864513b59c6652cb8af37a45af /indra/newview
parent1bb4c9e1c9e9d797d4f49152afe4ff80ba22405d (diff)
parent4428d4039fdf42932b39a861566a7ed2d2c2c946 (diff)
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml13
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llinspectavatar.cpp52
-rw-r--r--indra/newview/llpanellogin.cpp4
-rw-r--r--indra/newview/llpreview.cpp7
-rw-r--r--indra/newview/llpreviewgesture.cpp4
-rw-r--r--indra/newview/llviewermenu.cpp79
-rw-r--r--indra/newview/llviewerwindow.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_gesture.xml24
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml12
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml11
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml13
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml85
14 files changed, 202 insertions, 107 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 59252af362..37b55fdd86 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8,7 +8,7 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>F32</string>
+ <string>S32</string>
<key>Value</key>
<real>300.0</real>
</map>
@@ -45,17 +45,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AllowIdleAFK</key>
- <map>
- <key>Comment</key>
- <string>Automatically set AFK (away from keyboard) mode when idle</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>AllowMultipleViewers</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 90b8cd9572..a4dee14e40 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -332,7 +332,7 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
void idle_afk_check()
{
// check idle timers
- if (gSavedSettings.getBOOL("AllowIdleAFK") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout")))
+ if (gSavedSettings.getS32("AFKTimeout") && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getS32("AFKTimeout")))
{
gAgent.setAFK();
}
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 39114d64b4..dae980feb1 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -115,7 +115,7 @@ private:
void onClickTeleport();
void onClickInviteToGroup();
void onClickPay();
- void onClickBlock();
+ void onToggleMute();
void onClickReport();
void onClickFreeze();
void onClickEject();
@@ -126,6 +126,8 @@ private:
bool onVisibleZoomIn();
void onClickMuteVolume();
void onVolumeChange(const LLSD& data);
+ bool enableMute();
+ bool enableUnmute();
// Is used to determine if "Add friend" option should be enabled in gear menu
bool isNotFriend();
@@ -205,7 +207,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
mCommitCallbackRegistrar.add("InspectAvatar.Teleport", boost::bind(&LLInspectAvatar::onClickTeleport, this));
mCommitCallbackRegistrar.add("InspectAvatar.InviteToGroup", boost::bind(&LLInspectAvatar::onClickInviteToGroup, this));
mCommitCallbackRegistrar.add("InspectAvatar.Pay", boost::bind(&LLInspectAvatar::onClickPay, this));
- mCommitCallbackRegistrar.add("InspectAvatar.Block", boost::bind(&LLInspectAvatar::onClickBlock, this));
+ mCommitCallbackRegistrar.add("InspectAvatar.ToggleMute", boost::bind(&LLInspectAvatar::onToggleMute, this));
mCommitCallbackRegistrar.add("InspectAvatar.Freeze",
boost::bind(&LLInspectAvatar::onClickFreeze, this));
mCommitCallbackRegistrar.add("InspectAvatar.Eject",
@@ -221,6 +223,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn",
boost::bind(&LLInspectAvatar::onVisibleZoomIn, this));
mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this));
+ mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this));
+ mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this));
// can't make the properties request until the widgets are constructed
// as it might return immediately, so do it in postBuild.
@@ -625,10 +629,19 @@ void LLInspectAvatar::onClickPay()
closeFloater();
}
-void LLInspectAvatar::onClickBlock()
+void LLInspectAvatar::onToggleMute()
{
LLMute mute(mAvatarID, mAvatarName, LLMute::AGENT);
- LLMuteList::getInstance()->add(mute);
+
+ if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName))
+ {
+ LLMuteList::getInstance()->remove(mute);
+ }
+ else
+ {
+ LLMuteList::getInstance()->add(mute);
+ }
+
LLPanelBlockedList::showPanelAndSelect(mute.mID);
closeFloater();
}
@@ -663,6 +676,37 @@ void LLInspectAvatar::onClickFindOnMap()
LLFloaterReg::showInstance("world_map");
}
+
+bool LLInspectAvatar::enableMute()
+{
+ bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden");
+ bool is_self = mAvatarID == gAgent.getID();
+
+ if (!is_linden && !is_self && !LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+bool LLInspectAvatar::enableUnmute()
+{
+ bool is_linden = LLStringUtil::endsWith(mAvatarName, " Linden");
+ bool is_self = mAvatarID == gAgent.getID();
+
+ if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
//////////////////////////////////////////////////////////////////////////////
// LLInspectAvatarUtil
//////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index a5bfa18851..063491494e 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -677,12 +677,8 @@ void LLPanelLogin::refreshLocation( bool force_visible )
sInstance->childSetVisible("start_location_combo", show_start);
sInstance->childSetVisible("start_location_text", show_start);
-#if LL_RELEASE_FOR_DOWNLOAD
BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid");
sInstance->childSetVisible("server_combo", show_server);
-#else
- sInstance->childSetVisible("server_combo", TRUE);
-#endif
#endif
}
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index c95882931b..0b0c03e9e9 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -150,6 +150,13 @@ void LLPreview::onCommit()
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setDescription(childGetText("desc"));
+
+ std::string new_name = childGetText("name");
+ if ( (new_item->getName() != new_name) && !new_name.empty())
+ {
+ new_item->rename(childGetText("name"));
+ }
+
if(mObjectUUID.notNull())
{
// must be in an object
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 30cb21c83c..e2eee6708a 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -495,6 +495,10 @@ BOOL LLPreviewGesture::postBuild()
childSetCommitCallback("desc", LLPreview::onText, this);
childSetText("desc", item->getDescription());
childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
+
+ childSetCommitCallback("name", LLPreview::onText, this);
+ childSetText("name", item->getName());
+ childSetPrevalidate("name", &LLLineEditor::prevalidateASCIIPrintableNoPipe);
}
return LLPreview::postBuild();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 075c4a30fa..67858bcf9a 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5826,47 +5826,68 @@ void confirm_replace_attachment(S32 option, void* user_data)
}
}
-class LLAttachmentDrop : public view_listener_t
+bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
{
- bool handleEvent(const LLSD& userdata)
+ // Called when the user clicked on an object attached to them
+ // and selected "Drop".
+ LLUUID object_id = notification["payload"]["object_id"].asUUID();
+ LLViewerObject *object = gObjectList.findObject(object_id);
+
+ if (!object)
{
- // Called when the user clicked on an object attached to them
- // and selected "Drop".
- LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
- if (!object)
- {
- llwarns << "handle_drop_attachment() - no object to drop" << llendl;
- return true;
- }
+ llwarns << "handle_drop_attachment() - no object to drop" << llendl;
+ return true;
+ }
- LLViewerObject *parent = (LLViewerObject*)object->getParent();
- while (parent)
+ LLViewerObject *parent = (LLViewerObject*)object->getParent();
+ while (parent)
+ {
+ if(parent->isAvatar())
{
- if(parent->isAvatar())
- {
- break;
- }
- object = parent;
- parent = (LLViewerObject*)parent->getParent();
+ break;
}
+ object = parent;
+ parent = (LLViewerObject*)parent->getParent();
+ }
- if (!object)
+ if (!object)
+ {
+ llwarns << "handle_detach() - no object to detach" << llendl;
+ return true;
+ }
+
+ if (object->isAvatar())
+ {
+ llwarns << "Trying to detach avatar from avatar." << llendl;
+ return true;
+ }
+
+ // reselect the object
+ LLSelectMgr::getInstance()->selectObjectAndFamily(object);
+
+ LLSelectMgr::getInstance()->sendDropAttachment();
+
+ return true;
+}
+
+class LLAttachmentDrop : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLSD payload;
+ LLViewerObject *object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+
+ if (object)
{
- llwarns << "handle_detach() - no object to detach" << llendl;
- return true;
+ payload["object_id"] = object->getID();
}
-
- if (object->isAvatar())
+ else
{
- llwarns << "Trying to detach avatar from avatar." << llendl;
+ llwarns << "Drop object not found" << llendl;
return true;
}
- // The sendDropAttachment() method works on the list of selected
- // objects. Thus we need to clear the list, make sure it only
- // contains the object the user clicked, send the message,
- // then clear the list.
- LLSelectMgr::getInstance()->sendDropAttachment();
+ LLNotificationsUtil::add("AttachmentDrop", LLSD(), payload, &callback_attachment_drop);
return true;
}
};
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 966aeba25c..0ddc517754 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1014,7 +1014,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
{
mActive = FALSE;
- if (gSavedSettings.getBOOL("AllowIdleAFK"))
+ if (gSavedSettings.getS32("AFKTimeout"))
{
gAgent.setAFK();
}
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index 8cc2c91ef5..3dc546aee3 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -39,6 +39,28 @@
name="Title">
Gesture: [NAME]
</floater.string>
+ <text
+ type="string"
+ length="1"
+ follows="top|left"
+ font="SansSerifSmall"
+ height="10"
+ layout="topleft"
+ left="10"
+ name="name_text"
+ top="20"
+ font.style="BOLD"
+ width="100">
+ Name:
+ </text>
+ <line_editor
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_delta="84"
+ name="name"
+ top_delta="-4"
+ width="180" />
<text
type="string"
length="1"
@@ -48,7 +70,7 @@
layout="topleft"
left="10"
name="desc_label"
- top="25"
+ top_pad="10"
font.style="BOLD"
width="100">
Description:
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
index ef0bf72058..01df208850 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
@@ -48,7 +48,17 @@
label="Block"
name="block">
<menu_item_call.on_click
- function="InspectAvatar.Block"/>
+ function="InspectAvatar.ToggleMute"/>
+ <menu_item_call.on_visible
+ function="InspectAvatar.EnableMute" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unblock"
+ name="unblock">
+ <menu_item_call.on_click
+ function="InspectAvatar.ToggleMute"/>
+ <menu_item_call.on_visible
+ function="InspectAvatar.EnableUnmute" />
</menu_item_call>
<menu_item_call
label="Report"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 71b67594e5..a8e74c5fa9 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1098,17 +1098,6 @@
name="Advanced"
tear_off="true"
visible="false">
- <menu_item_check
- label="Set Away After 30 Minutes"
- layout="topleft"
- name="Go Away/AFK When Idle">
- <menu_item_check.on_check
- function="CheckControl"
- parameter="AllowIdleAFK" />
- <menu_item_check.on_click
- function="ToggleControl"
- parameter="AllowIdleAFK" />
- </menu_item_check>
<menu_item_call
label="Stop Animating Me"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 4645bfea74..3d17a4e32f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -370,6 +370,19 @@ Add this Ability to &apos;[ROLE_NAME]&apos;?
</notification>
<notification
+ icon="alertmodal.tga"
+ name="AttachmentDrop"
+ type="alertmodal">
+ You are about to drop your attachment.
+ Are you sure you want to continue?
+ <usetemplate
+ ignoretext="Confirm before dropping attachments"
+ name="okcancelignore"
+ notext="No"
+ yestext="Yes"/>
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="ClickUnimplemented"
type="alertmodal">
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 1b70b95a93..e096715cee 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -78,7 +78,6 @@ Maximum 200 per group daily
image_unselected="AddItem_Off"
image_disabled="AddItem_Disabled"
layout="topleft"
- label="Create a new notice"
left="5"
name="create_new_notice"
tool_tip="Create a new notice"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index b5c6b637e5..d711a2e6ec 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -290,48 +290,49 @@
tool_tip="Click to open Color Picker"
top_pad="5"
width="32" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="15"
- layout="topleft"
- left="30"
- name="title_afk_text"
- text_color="white"
- top_pad="-5"
- width="190">
- Away timeout:
- </text>
- <spinner
- control_name="AFKTimeout"
- decimal_digits="0"
- follows="left|top"
- halign="right"
- height="15"
- increment="1"
- initial_value="300"
- label=""
- label_width="0"
- layout="topleft"
- left_delta="50"
- max_val="600"
- min_val="30"
- name="afk_timeout_spinner"
- top_pad="5"
- width="50" />
- <text
- type="string"
- length="1"
- follows="left|top"
- halign="left"
- height="15"
- layout="topleft"
- left_pad="2"
- name="seconds_textbox"
- width="70">
- seconds
- </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left="30"
+ name="title_afk_text"
+ text_color="white"
+ top_pad="-5"
+ width="190">
+ Away timeout:
+ </text>
+ <combo_box
+ top_pad="-20"
+ height="20"
+ layout="topleft"
+ control_name="AFKTimeout"
+ left="140"
+ label="Away Timeout:"
+ name="afk"
+ width="130">
+ <combo_box.item
+ label="2 minutes"
+ name="item0"
+ value="120" />
+ <combo_box.item
+ label="5 minutes"
+ name="item1"
+ value="300" />
+ <combo_box.item
+ label="10 minutes"
+ name="item2"
+ value="600" />
+ <combo_box.item
+ label="30 minutes"
+ name="item3"
+ value="1800" />
+ <combo_box.item
+ label="never"
+ name="item4"
+ value="0" />
+ </combo_box>
<text
type="string"
length="1"