summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp36
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");