From 433eb89473e9aaa3864299b7ba50a320f14bba38 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 14 Jan 2010 09:38:46 +0800 Subject: EXT-3795 First run messages still display (click & drag on map, Build tools open, movement controlled, etc) --- indra/newview/llviewermenu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1bff04352c..d2ba898cf0 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -48,7 +48,7 @@ #include "llconsole.h" #include "lldebugview.h" #include "llfilepicker.h" -#include "llfirstuse.h" +//#include "llfirstuse.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" @@ -2491,7 +2491,7 @@ class LLObjectBuild : public view_listener_t LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); // Could be first use - LLFirstUse::useBuild(); + //LLFirstUse::useBuild(); return true; } }; @@ -2536,7 +2536,7 @@ void handle_object_edit() LLViewerJoystick::getInstance()->setNeedsReset(true); // Could be first use - LLFirstUse::useBuild(); + //LLFirstUse::useBuild(); return; } @@ -2587,7 +2587,7 @@ class LLLandBuild : public view_listener_t LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); // Could be first use - LLFirstUse::useBuild(); + //LLFirstUse::useBuild(); return true; } }; @@ -2824,7 +2824,7 @@ bool handle_go_to() } // Could be first use - LLFirstUse::useGoTo(); + //LLFirstUse::useGoTo(); return true; } @@ -3626,7 +3626,7 @@ void near_sit_down_point(BOOL success, void *) gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); // Might be first sit - LLFirstUse::useSit(); + //LLFirstUse::useSit(); } } @@ -5144,7 +5144,7 @@ void toggle_debug_menus(void*) gSavedSettings.setBOOL("UseDebugMenus", visible); if(visible) { - LLFirstUse::useDebugMenus(); + //LLFirstUse::useDebugMenus(); } show_debug_menus(); } -- cgit v1.2.3 From 506475f8818c398cfd77de2f847c23ae145f8230 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 15 Jan 2010 21:56:42 +0200 Subject: Fixed normal bug (EXT-4156) [BSI] Friendslist doesn't toggle open/close on shortcut - Added toggling for friends, groups and nearby people lists. --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 46 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1bff04352c..fe82da960c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3369,10 +3369,52 @@ class LLShowPanelPeopleTab : public view_listener_t { bool handleEvent(const LLSD& userdata) { + std::string panel_name = userdata.asString(); + // Open tab of the "People" panel in side tray. LLSD param; - param["people_panel_tab_name"] = userdata.asString(); - LLSideTray::getInstance()->showPanel("panel_people", param); + param["people_panel_tab_name"] = panel_name; + + static LLPanel* friends_panel = NULL; + static LLPanel* groups_panel = NULL; + static LLPanel* nearby_panel = NULL; + + if (panel_name == "friends_panel") + { + return togglePanel(friends_panel, param); + } + else if (panel_name == "groups_panel") + { + return togglePanel(groups_panel, param); + } + else if (panel_name == "nearby_panel") + { + return togglePanel(nearby_panel, param); + } + else + { + return false; + } + } + + static bool togglePanel(LLPanel* &panel, const LLSD& param) + { + if(!panel) + { + panel = LLSideTray::getInstance()->findChild(param["people_panel_tab_name"].asString()); + if(!panel) + return false; + } + + if (panel->isInVisibleChain()) + { + LLSideTray::getInstance()->collapseSideBar(); + } + else + { + LLSideTray::getInstance()->showPanel("panel_people", param); + } + return true; } }; -- cgit v1.2.3 From f28778b8b803af65fc4097cc904cf49b9090795a Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Mon, 18 Jan 2010 17:50:19 +0200 Subject: work on EXT-4322 Remove the Communicate floater leave some LLFloaterChat usages commented for later review... --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 48 ++---------------------------------------- 1 file changed, 2 insertions(+), 46 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fe82da960c..db462dee44 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -52,7 +52,6 @@ #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" -#include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloaterchatterbox.h" #include "llfloatergodtools.h" @@ -6381,51 +6380,8 @@ class LLToolsSelectedScriptAction : public view_listener_t void handle_selected_texture_info(void*) { - for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); - iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) - { - LLSelectNode* node = *iter; - - std::string msg; - msg.assign("Texture info for: "); - msg.append(node->mName); - LLChat chat(msg); - LLFloaterChat::addChat(chat); - - U8 te_count = node->getObject()->getNumTEs(); - // map from texture ID to list of faces using it - typedef std::map< LLUUID, std::vector > map_t; - map_t faces_per_texture; - for (U8 i = 0; i < te_count; i++) - { - if (!node->isTESelected(i)) continue; - - LLViewerTexture* img = node->getObject()->getTEImage(i); - LLUUID image_id = img->getID(); - faces_per_texture[image_id].push_back(i); - } - // Per-texture, dump which faces are using it. - map_t::iterator it; - for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) - { - LLUUID image_id = it->first; - U8 te = it->second[0]; - LLViewerTexture* img = node->getObject()->getTEImage(te); - S32 height = img->getHeight(); - S32 width = img->getWidth(); - S32 components = img->getComponents(); - msg = llformat("%dx%d %s on face ", - width, - height, - (components == 4 ? "alpha" : "opaque")); - for (U8 i = 0; i < it->second.size(); ++i) - { - msg.append( llformat("%d ", (S32)(it->second[i]))); - } - LLChat chat(msg); - LLFloaterChat::addChat(chat); - } - } + //useless without LLFloaterChat + //as since we don't use LLFloaterChat... } void handle_test_male(void*) -- cgit v1.2.3 From a5dfdf0c6f64d40dc8d3d61434427471dbcfc0b2 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 18 Jan 2010 20:13:48 +0200 Subject: Refactored fix for (EXT-4156) [BSI] Friendslist doesn't toggle open/close on shortcut - Moved side panel toggling from viewer menu to side tray class. --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f87d5693e8..88a61c9d49 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3365,13 +3365,13 @@ void handle_show_side_tray() root->addChild(side_tray); } -class LLShowPanelPeopleTab : public view_listener_t +// Toggle one of "People" panel tabs in side tray. +class LLTogglePanelPeopleTab : public view_listener_t { bool handleEvent(const LLSD& userdata) { std::string panel_name = userdata.asString(); - // Open tab of the "People" panel in side tray. LLSD param; param["people_panel_tab_name"] = panel_name; @@ -3381,15 +3381,15 @@ class LLShowPanelPeopleTab : public view_listener_t if (panel_name == "friends_panel") { - return togglePanel(friends_panel, param); + return togglePeoplePanel(friends_panel, panel_name, param); } else if (panel_name == "groups_panel") { - return togglePanel(groups_panel, param); + return togglePeoplePanel(groups_panel, panel_name, param); } else if (panel_name == "nearby_panel") { - return togglePanel(nearby_panel, param); + return togglePeoplePanel(nearby_panel, panel_name, param); } else { @@ -3397,23 +3397,16 @@ class LLShowPanelPeopleTab : public view_listener_t } } - static bool togglePanel(LLPanel* &panel, const LLSD& param) + static bool togglePeoplePanel(LLPanel* &panel, const std::string& panel_name, const LLSD& param) { if(!panel) { - panel = LLSideTray::getInstance()->findChild(param["people_panel_tab_name"].asString()); + panel = LLSideTray::getInstance()->getPanel(panel_name); if(!panel) return false; } - if (panel->isInVisibleChain()) - { - LLSideTray::getInstance()->collapseSideBar(); - } - else - { - LLSideTray::getInstance()->showPanel("panel_people", param); - } + LLSideTray::getInstance()->togglePanel(panel, "panel_people", param); return true; } @@ -7940,7 +7933,7 @@ void initialize_menus() view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); // we don't use boost::bind directly to delay side tray construction - view_listener_t::addMenu( new LLShowPanelPeopleTab(), "SideTray.PanelPeopleTab"); + view_listener_t::addMenu( new LLTogglePanelPeopleTab(), "SideTray.PanelPeopleTab"); // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); -- cgit v1.2.3 From 086135b6849bad2e3a5ddcf9bb9540fdb6fb72dd Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Wed, 20 Jan 2010 17:11:29 +0200 Subject: more on removing LLFloaterChat there was some places with messages that (as I think) should not go to nearby chat. but still probably should go somewhere... code is commented and messages are marked with: //TODO* CHAT: how to show this? --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 50 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d96d7df24a..5692ccee29 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6373,8 +6373,54 @@ class LLToolsSelectedScriptAction : public view_listener_t void handle_selected_texture_info(void*) { - //useless without LLFloaterChat - //as since we don't use LLFloaterChat... + for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); + iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) + { + LLSelectNode* node = *iter; + + std::string msg; + msg.assign("Texture info for: "); + msg.append(node->mName); + LLChat chat(msg); + LLFloaterChat::addChat(chat); + + U8 te_count = node->getObject()->getNumTEs(); + // map from texture ID to list of faces using it + typedef std::map< LLUUID, std::vector > map_t; + map_t faces_per_texture; + for (U8 i = 0; i < te_count; i++) + { + if (!node->isTESelected(i)) continue; + + LLViewerTexture* img = node->getObject()->getTEImage(i); + LLUUID image_id = img->getID(); + faces_per_texture[image_id].push_back(i); + } + // Per-texture, dump which faces are using it. + map_t::iterator it; + for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) + { + LLUUID image_id = it->first; + U8 te = it->second[0]; + LLViewerTexture* img = node->getObject()->getTEImage(te); + S32 height = img->getHeight(); + S32 width = img->getWidth(); + S32 components = img->getComponents(); + msg = llformat("%dx%d %s on face ", + width, + height, + (components == 4 ? "alpha" : "opaque")); + for (U8 i = 0; i < it->second.size(); ++i) + { + msg.append( llformat("%d ", (S32)(it->second[i]))); + } + + //TODO* CHAT: how to show this? + //LLSD args; + //args["MESSAGE"] = msg; + //LLNotificationsUtil::add("SystemMessage", args); + } + } } void handle_test_male(void*) -- cgit v1.2.3 From fd9def311a84f78c33013e52180deeb0582fd28a Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Wed, 20 Jan 2010 17:56:47 +0200 Subject: more on LLFloaterChat - oops...commit code with error --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5692ccee29..f1d550f625 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6381,8 +6381,11 @@ void handle_selected_texture_info(void*) std::string msg; msg.assign("Texture info for: "); msg.append(node->mName); - LLChat chat(msg); - LLFloaterChat::addChat(chat); + + //TODO* CHAT: how to show this? + //LLSD args; + //args["MESSAGE"] = msg; + //LLNotificationsUtil::add("SystemMessage", args); U8 te_count = node->getObject()->getNumTEs(); // map from texture ID to list of faces using it -- cgit v1.2.3 From 5f2669ab62b284759d0f471bca26549a1387d269 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 20 Jan 2010 18:22:56 +0200 Subject: got rid of win CR --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 86 +++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f1d550f625..3f556e5608 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6373,57 +6373,57 @@ class LLToolsSelectedScriptAction : public view_listener_t void handle_selected_texture_info(void*) { - for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); - iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) - { - LLSelectNode* node = *iter; - - std::string msg; - msg.assign("Texture info for: "); - msg.append(node->mName); - + for (LLObjectSelection::valid_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_begin(); + iter != LLSelectMgr::getInstance()->getSelection()->valid_end(); iter++) + { + LLSelectNode* node = *iter; + + std::string msg; + msg.assign("Texture info for: "); + msg.append(node->mName); + //TODO* CHAT: how to show this? //LLSD args; //args["MESSAGE"] = msg; //LLNotificationsUtil::add("SystemMessage", args); - - U8 te_count = node->getObject()->getNumTEs(); - // map from texture ID to list of faces using it - typedef std::map< LLUUID, std::vector > map_t; - map_t faces_per_texture; - for (U8 i = 0; i < te_count; i++) - { - if (!node->isTESelected(i)) continue; - - LLViewerTexture* img = node->getObject()->getTEImage(i); - LLUUID image_id = img->getID(); - faces_per_texture[image_id].push_back(i); - } - // Per-texture, dump which faces are using it. - map_t::iterator it; - for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) - { - LLUUID image_id = it->first; - U8 te = it->second[0]; - LLViewerTexture* img = node->getObject()->getTEImage(te); - S32 height = img->getHeight(); - S32 width = img->getWidth(); - S32 components = img->getComponents(); - msg = llformat("%dx%d %s on face ", - width, - height, - (components == 4 ? "alpha" : "opaque")); - for (U8 i = 0; i < it->second.size(); ++i) - { - msg.append( llformat("%d ", (S32)(it->second[i]))); - } - + + U8 te_count = node->getObject()->getNumTEs(); + // map from texture ID to list of faces using it + typedef std::map< LLUUID, std::vector > map_t; + map_t faces_per_texture; + for (U8 i = 0; i < te_count; i++) + { + if (!node->isTESelected(i)) continue; + + LLViewerTexture* img = node->getObject()->getTEImage(i); + LLUUID image_id = img->getID(); + faces_per_texture[image_id].push_back(i); + } + // Per-texture, dump which faces are using it. + map_t::iterator it; + for (it = faces_per_texture.begin(); it != faces_per_texture.end(); ++it) + { + LLUUID image_id = it->first; + U8 te = it->second[0]; + LLViewerTexture* img = node->getObject()->getTEImage(te); + S32 height = img->getHeight(); + S32 width = img->getWidth(); + S32 components = img->getComponents(); + msg = llformat("%dx%d %s on face ", + width, + height, + (components == 4 ? "alpha" : "opaque")); + for (U8 i = 0; i < it->second.size(); ++i) + { + msg.append( llformat("%d ", (S32)(it->second[i]))); + } + //TODO* CHAT: how to show this? //LLSD args; //args["MESSAGE"] = msg; //LLNotificationsUtil::add("SystemMessage", args); - } - } + } + } } void handle_test_male(void*) -- cgit v1.2.3