diff options
-rw-r--r-- | indra/llui/llcommandmanager.cpp | 9 | ||||
-rw-r--r-- | indra/llui/llcommandmanager.h | 23 | ||||
-rw-r--r-- | indra/llui/lltoolbar.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llagent.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llnearbychat.cpp | 7 | ||||
-rw-r--r-- | indra/newview/lltoolbarview.cpp | 53 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_avatar.xml | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_destinations.xml | 2 |
8 files changed, 65 insertions, 38 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 128ba609cb..0e2f3f1961 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -41,7 +41,7 @@ // LLCommandId class // -const LLCommandId LLCommandId::null = LLCommandId(); +const LLCommandId LLCommandId::null = LLCommandId("null command"); // // LLCommand class @@ -67,10 +67,11 @@ LLCommand::Params::Params() } LLCommand::LLCommand(const LLCommand::Params& p) - : mAvailableInToybox(p.available_in_toybox) + : mIdentifier(p.name) + , mAvailableInToybox(p.available_in_toybox) , mIcon(p.icon) - , mIdentifier(p.name) , mLabelRef(p.label_ref) + , mName(p.name) , mTooltipRef(p.tooltip_ref) , mExecuteFunction(p.execute_function) , mExecuteParameters(p.execute_parameters) @@ -134,7 +135,7 @@ void LLCommandManager::addCommand(LLCommand * command) mCommandIndices[command_id.uuid()] = mCommands.size(); mCommands.push_back(command); - lldebugs << "Successfully added command: " << command->id().name() << llendl; + lldebugs << "Successfully added command: " << command->name() << llendl; } //static diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h index 9b93ab735a..a7276a48aa 100644 --- a/indra/llui/llcommandmanager.h +++ b/indra/llui/llcommandmanager.h @@ -50,31 +50,20 @@ public: {} }; - LLCommandId() - : mName("null command") - { - mUUID = LLUUID::generateNewID(mName); - } - LLCommandId(const std::string& name) - : mName(name) { mUUID = LLUUID::generateNewID(name); } LLCommandId(const Params& p) - : mName(p.name) { mUUID = LLUUID::generateNewID(p.name); } LLCommandId(const LLUUID& uuid) - : mName(""), - mUUID(uuid) - { - } + : mUUID(uuid) + {} - const std::string& name() const { return mName; } const LLUUID& uuid() const { return mUUID; } bool operator!=(const LLCommandId& command) const @@ -87,15 +76,9 @@ public: return (mUUID == command.mUUID); } - bool operator<(const LLCommandId& command) const - { - return (mName < command.mName); - } - static const LLCommandId null; private: - std::string mName; LLUUID mUUID; }; @@ -137,6 +120,7 @@ public: const std::string& icon() const { return mIcon; } const LLCommandId& id() const { return mIdentifier; } const std::string& labelRef() const { return mLabelRef; } + const std::string& name() const { return mName; } const std::string& tooltipRef() const { return mTooltipRef; } const std::string& executeFunctionName() const { return mExecuteFunction; } @@ -160,6 +144,7 @@ private: bool mAvailableInToybox; std::string mIcon; std::string mLabelRef; + std::string mName; std::string mTooltipRef; std::string mExecuteFunction; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index bceda9bf54..515605200e 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -821,7 +821,7 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) if (!commandp) return NULL; LLToolBarButton::Params button_p; - button_p.name = commandp->id().name(); // Make sure to retrieve the name from the command itself, not the passed in id + button_p.name = commandp->name(); button_p.label = LLTrans::getString(commandp->labelRef()); button_p.tool_tip = LLTrans::getString(commandp->tooltipRef()); button_p.image_overlay = LLUI::getUIImage(commandp->icon()); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 21cb3380c9..f8b204eca0 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -175,7 +175,9 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) } else if (param == "speak") { - if ( gAgent.isVoiceConnected() && LLViewerParcelMgr::getInstance()->allowAgentVoice() ) + if ( gAgent.isVoiceConnected() && + LLViewerParcelMgr::getInstance()->allowAgentVoice() && + ! LLVoiceClient::getInstance()->inTuningMode() ) { retval = true; } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 67d745248f..3418462192 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -214,9 +214,10 @@ void LLNearbyChat::updateChatHistoryStyle() //static void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue) { - //LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); - //if(nearby_chat) - // nearby_chat->updateChatHistoryStyle(); + LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar"); + LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat"); + if(nearby_chat) + nearby_chat->updateChatHistoryStyle(); } bool isWordsName(const std::string& name) diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 75bec15082..619d17efad 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -29,6 +29,7 @@ #include "lltoolbarview.h" +#include "llappviewer.h" #include "lldir.h" #include "llxmlnode.h" #include "lltoolbar.h" @@ -36,12 +37,18 @@ #include "lltooldraganddrop.h" #include "llclipboard.h" +#include "llagent.h" // HACK for destinations guide on startup +#include "llfloaterreg.h" // HACK for destinations guide on startup +#include "llviewercontrol.h" // HACK for destinations guide on startup + #include <boost/foreach.hpp> LLToolBarView* gToolBarView = NULL; static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view"); +void handleLoginToolbarSetup(); + bool isToolDragged() { return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER); @@ -97,6 +104,8 @@ BOOL LLToolBarView::postBuild() mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3)); mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4)); mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4)); + + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup)); return TRUE; } @@ -128,7 +137,7 @@ bool LLToolBarView::addCommand(const LLCommandId& command, LLToolBar* toolbar) } else { - llwarns << "Toolbars creation : the command " << command.name() << " cannot be found in the command manager" << llendl; + llwarns << "Toolbars creation : the command with id " << command.uuid().asString() << " cannot be found in the command manager" << llendl; return false; } return true; @@ -193,9 +202,12 @@ bool LLToolBarView::loadToolbars(bool force_default) LLToolBarEnums::ButtonType button_type = toolbar_set.left_toolbar.button_display_mode; mToolbarLeft->setButtonType(button_type); } - BOOST_FOREACH(LLCommandId::Params& command, toolbar_set.left_toolbar.commands) + BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.left_toolbar.commands) { - addCommand(LLCommandId(command),mToolbarLeft); + if (addCommand(LLCommandId(command_name_param), mToolbarLeft) == false) + { + llwarns << "Error adding command '" << command_name_param.name() << "' to left toolbar." << llendl; + } } } if (toolbar_set.right_toolbar.isProvided() && mToolbarRight) @@ -205,9 +217,12 @@ bool LLToolBarView::loadToolbars(bool force_default) LLToolBarEnums::ButtonType button_type = toolbar_set.right_toolbar.button_display_mode; mToolbarRight->setButtonType(button_type); } - BOOST_FOREACH(LLCommandId::Params& command, toolbar_set.right_toolbar.commands) + BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.right_toolbar.commands) { - addCommand(LLCommandId(command),mToolbarRight); + if (addCommand(LLCommandId(command_name_param), mToolbarRight) == false) + { + llwarns << "Error adding command '" << command_name_param.name() << "' to right toolbar." << llendl; + } } } if (toolbar_set.bottom_toolbar.isProvided() && mToolbarBottom) @@ -217,9 +232,12 @@ bool LLToolBarView::loadToolbars(bool force_default) LLToolBarEnums::ButtonType button_type = toolbar_set.bottom_toolbar.button_display_mode; mToolbarBottom->setButtonType(button_type); } - BOOST_FOREACH(LLCommandId::Params& command, toolbar_set.bottom_toolbar.commands) + BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.bottom_toolbar.commands) { - addCommand(LLCommandId(command),mToolbarBottom); + if (addCommand(LLCommandId(command_name_param), mToolbarBottom) == false) + { + llwarns << "Error adding command '" << command_name_param.name() << "' to bottom toolbar." << llendl; + } } } return true; @@ -289,9 +307,9 @@ void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolb LLCommand* command = mgr.getCommand(*it); if (command) { - LLCommandId::Params commandParams; - commandParams.name = command->id().name(); - toolbar.commands.add(commandParams); + LLCommandId::Params command_name_param; + command_name_param.name = command->name(); + toolbar.commands.add(command_name_param); } } } @@ -457,3 +475,18 @@ bool LLToolBarView::isModified() const return modified; } + + +// +// HACK to bring up destinations guide at startup +// + +void handleLoginToolbarSetup() +{ + // Open the destinations guide by default on first login, per Rhett + if (gSavedSettings.getBOOL("FirstLoginThisInstall") || gAgent.isFirstLogin()) + { + LLFloaterReg::showInstance("destinations"); + } +} + diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml index 3c7de6f334..2d973e7d90 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar.xml @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater + open_positioning="cascading" + ignore_ui_scale="false" legacy_header_height="225" can_minimize="true" can_close="true" @@ -12,6 +14,7 @@ single_instance="true" help_topic="avatar" save_rect="true" + save_visibility="true" title="AVATAR PICKER" width="635"> <web_browser diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml index e63dc02a57..373114a1eb 100644 --- a/indra/newview/skins/default/xui/en/floater_destinations.xml +++ b/indra/newview/skins/default/xui/en/floater_destinations.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater open_positioning="cascading" + ignore_ui_scale="false" legacy_header_height="225" can_minimize="true" can_close="true" @@ -14,6 +15,7 @@ single_instance="true" help_topic="destinations" save_rect="true" + save_visibility="true" title="DESTINATIONS" width="840"> <web_browser |