diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 19:05:51 +0000 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 19:05:51 +0000 |
| commit | 773e8eb8ea3acc75b0e8137412458f77effffb70 (patch) | |
| tree | b3e5a3069ac0ef154f10971ae701940eab369fcc /indra/newview/llviewermenu.cpp | |
| parent | 15ff4379e53eb5b3ed914c46c0051c3926de1ecb (diff) | |
| parent | a97c4d3ad879b8e53696b9cab9c5ab7141c7fc6c (diff) | |
merge from viewer2.
trivial xml conflict resolved.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d4ec33f282..967a951fd3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5599,21 +5599,6 @@ void handle_buy_currency() LLFloaterBuyCurrency::buyCurrency(); } - - -class LLFloaterVisible : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - std::string floater_name = userdata.asString(); - bool new_value = false; - { - new_value = LLFloaterReg::instanceVisible(floater_name); - } - return new_value; - } -}; - class LLShowHelp : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -5644,6 +5629,25 @@ class LLShowSidetrayPanel : public view_listener_t } }; +class LLSidetrayPanelVisible : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string panel_name = userdata.asString(); + // Toggle the panel + if (LLSideTray::getInstance()->isPanelActive(panel_name)) + { + return true; + } + else + { + return false; + } + + } +}; + + bool callback_show_url(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -8026,8 +8030,8 @@ void initialize_menus() enable.add("EnableEdit", boost::bind(&enable_object_edit)); enable.add("VisibleBuild", boost::bind(&enable_object_build)); - view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible"); view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel"); + view_listener_t::addMenu(new LLSidetrayPanelVisible(), "SidetrayPanelVisible"); view_listener_t::addMenu(new LLSomethingSelected(), "SomethingSelected"); view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD"); view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected"); |
