summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorleyla_linden <none@none>2011-10-12 17:19:25 -0700
committerleyla_linden <none@none>2011-10-12 17:19:25 -0700
commit3e55263e33fde4ab1ff19e8cfcb55125ee42b70d (patch)
treeaa0cc3194a64b976d99e532d83addb2c942c7fda /indra/newview/llviewermenu.cpp
parentfbd883ab36e49fea76b16a04aad0be5fc5196d49 (diff)
parent17731c50a8ad2c465654db3cf88bcc2e885e2716 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0cbbfae002..478af6ab7d 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3766,9 +3766,37 @@ class LLViewToggleUI : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility());
+ LLNotification::Params params("ConfirmHideUI");
+ params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2));
+ LLSD substitutions;
+#if LL_DARWIN
+ substitutions["SHORTCUT"] = "Cmd+Shift+U";
+#else
+ substitutions["SHORTCUT"] = "Ctrl+Shift+U";
+#endif
+ params.substitutions = substitutions;
+ if (gViewerWindow->getUIVisibility())
+ {
+ // hiding, so show notification
+ LLNotifications::instance().add(params);
+ }
+ else
+ {
+ LLNotifications::instance().forceResponse(params, 0);
+ }
+
return true;
}
+
+ void confirm(const LLSD& notification, const LLSD& response)
+ {
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+ if (option == 0) // OK
+ {
+ gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility());
+ }
+ }
};
class LLEditDuplicate : public view_listener_t