diff options
| author | Leslie Linden <leslie@lindenlab.com> | 2011-10-12 17:50:03 -0700 |
|---|---|---|
| committer | Leslie Linden <leslie@lindenlab.com> | 2011-10-12 17:50:03 -0700 |
| commit | 1181e7c75747361e1a57f083cf82c63ef152bfc5 (patch) | |
| tree | 03d41962e61ccbbe40d3dac843a0bfe74a81a3b4 /indra/newview/llviewermenu.cpp | |
| parent | 20358ea89dc9823ac0b539030fdf03268dbdf4e9 (diff) | |
| parent | 3e55263e33fde4ab1ff19e8cfcb55125ee42b70d (diff) | |
Merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index da1b149b59..478af6ab7d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -373,8 +373,6 @@ void set_underclothes_menu_options() void init_menus() { - S32 top = gViewerWindow->getRootView()->getRect().getHeight(); - // Initialize actions initialize_menus(); @@ -3768,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 |
