diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2009-12-15 16:25:11 -0800 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2009-12-15 16:25:11 -0800 |
commit | b76c4399833c202f6cc8a6fb903fee82e8fcd3f3 (patch) | |
tree | 34d7789b2d8781299004f73dab1e059be82e6fcb | |
parent | 5242a31b5d643adcac1c0bf8318145d2805502a0 (diff) |
EXT-2649 Replace 'Advanced > Set Away After 30 Minutes' with Away time options
EXT-2649 [BSI] Confirm on Drop
EXT-3416 Can't name a new gesture on creation (and renaming is HARD)
reviewed by James
-rw-r--r-- | indra/newview/app_settings/settings.xml | 13 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpreview.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llpreviewgesture.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 79 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preview_gesture.xml | 24 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_general.xml | 85 |
10 files changed, 143 insertions, 97 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/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 0be0b56bc3..91d305bee7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5851,47 +5851,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_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0891afaf76..aff28fd8c8 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1110,17 +1110,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 '[ROLE_NAME]'? </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_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" |