diff options
| author | Callum Prentice <callum@lindenlab.com> | 2010-02-11 11:44:21 -0800 |
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2010-02-11 11:44:21 -0800 |
| commit | c7715a74fd63c5dda370a5fe07089213a53014cb (patch) | |
| tree | f9fda627380aa5f20d028482fc1999e4d3232166 /indra/newview/llviewermenu.cpp | |
| parent | 494a42a680cdaa90dce677fd66ff722ccf1401f3 (diff) | |
| parent | a97c4d3ad879b8e53696b9cab9c5ab7141c7fc6c (diff) | |
Merge with tip
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 8aae90ec3c..af89df448d 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"); |
