diff options
44 files changed, 291 insertions, 109 deletions
diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 9ce7533e1b..d8e035a320 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -41,7 +41,7 @@ // LLCommandId class // -const LLCommandId LLCommandId::null("null command"); +const LLCommandId LLCommandId::null = LLCommandId(); // // LLCommand class @@ -152,7 +152,7 @@ bool LLCommandManager::load() if (!commandsParams.validateBlock()) { - llerrs << "Unable to validate commands param block from file: " << commands_file << llendl; + llerrs << "Invalid commands file: " << commands_file << llendl; return false; } diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h index 8f9f956ec7..fdad7cd1b5 100644 --- a/indra/llui/llcommandmanager.h +++ b/indra/llui/llcommandmanager.h @@ -50,6 +50,12 @@ public: {} }; + LLCommandId() + : mName("null command") + { + mUUID = LLUUID::generateNewID(mName); + } + LLCommandId(const std::string& name) : mName(name) { @@ -62,10 +68,9 @@ public: mUUID = LLUUID::generateNewID(p.name); } - LLCommandId(const LLUUID& uuid) - : mName(""), + LLCommandId(const std::string& name, const LLUUID& uuid) + : mName(name), mUUID(uuid) - { } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index c28bcc2ec9..cc49238a0b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -840,9 +840,9 @@ void LLFloater::applyRectControl() if (mRectControl.size() > 1) { const LLRect& rect = getControlGroup()->getRect(mRectControl); - if (rect.getWidth() > 0 && rect.getHeight() > 0) + if (rect.notEmpty()) { - translate( rect.mLeft - getRect().mLeft, rect.mBottom - getRect().mBottom); + setOrigin(rect.mLeft, rect.mBottom); if (mResizable) { reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight())); diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index c34fbcd4f5..6332b2674a 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -33,6 +33,7 @@ #include "llcommandmanager.h" #include "llmenugl.h" #include "lltrans.h" +#include "llinventory.h" // uncomment this and remove the one in llui.cpp when there is an external reference to this translation unit // thanks, MSVC! @@ -86,6 +87,7 @@ LLToolBar::Params::Params() pad_right("pad_right"), pad_bottom("pad_bottom"), pad_between("pad_between"), + min_girth("min_girth"), button_panel("button_panel") {} @@ -103,6 +105,7 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p) mPadTop(p.pad_top), mPadBottom(p.pad_bottom), mPadBetween(p.pad_between), + mMinGirth(p.min_girth), mPopupMenuHandle(), mStartDragItemCallback(NULL), mHandleDragItemCallback(NULL), @@ -111,6 +114,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p) { mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text; mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon; + mDraggedCommand = LLCommandId::null; + mRank = 0; } LLToolBar::~LLToolBar() @@ -201,17 +206,24 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank) { LLCommand * command = LLCommandManager::instance().getCommand(commandId); if (!command) return false; - + llinfos << "Merov debug : addCommand, " << commandId.name() << ", " << commandId.uuid() << llendl; + // Create the button and do the things that don't need ordering LLToolBarButton* button = createButton(commandId); mButtonPanel->addChild(button); - mButtonMap.insert(std::make_pair(commandId, button)); + LLCommandId temp_command = commandId; + if (commandId.name() == "Drag Tool") + { + temp_command = LLCommandId("Drag Tool"); + } + mButtonMap.insert(std::make_pair(temp_command.uuid(), button)); + // Insert the command and button in the right place in their respective lists if ((rank >= mButtonCommands.size()) || (rank < 0)) { // In that case, back load - mButtonCommands.push_back(commandId); + mButtonCommands.push_back(temp_command); mButtons.push_back(button); } else @@ -226,7 +238,7 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank) rank--; } // ...then insert - mButtonCommands.insert(it_command,commandId); + mButtonCommands.insert(it_command,temp_command); mButtons.insert(it_button,button); } @@ -239,14 +251,20 @@ bool LLToolBar::removeCommand(const LLCommandId& commandId) { if (!hasCommand(commandId)) return false; + llinfos << "Merov debug : removeCommand, " << commandId.name() << ", " << commandId.uuid() << llendl; // First erase the map record - command_id_map::iterator it = mButtonMap.find(commandId); + LLCommandId temp_command = commandId; + if (commandId.name() == "Drag Tool") + { + temp_command = LLCommandId("Drag Tool"); + } + command_id_map::iterator it = mButtonMap.find(temp_command.uuid()); mButtonMap.erase(it); // Now iterate on the commands and buttons to identify the relevant records std::list<LLToolBarButton*>::iterator it_button = mButtons.begin(); command_id_list_t::iterator it_command = mButtonCommands.begin(); - while (*it_command != commandId) + while (*it_command != temp_command) { ++it_button; ++it_command; @@ -274,7 +292,12 @@ bool LLToolBar::hasCommand(const LLCommandId& commandId) const { if (commandId != LLCommandId::null) { - command_id_map::const_iterator it = mButtonMap.find(commandId); + LLCommandId temp_command = commandId; + if (commandId.name() == "Drag Tool") + { + temp_command = LLCommandId("Drag Tool"); + } + command_id_map::const_iterator it = mButtonMap.find(temp_command.uuid()); return (it != mButtonMap.end()); } @@ -287,7 +310,12 @@ bool LLToolBar::enableCommand(const LLCommandId& commandId, bool enabled) if (commandId != LLCommandId::null) { - command_id_map::iterator it = mButtonMap.find(commandId); + LLCommandId temp_command = commandId; + if (commandId.name() == "Drag Tool") + { + temp_command = LLCommandId("Drag Tool"); + } + command_id_map::iterator it = mButtonMap.find(temp_command.uuid()); if (it != mButtonMap.end()) { it->second->setEnabled(enabled); @@ -505,7 +533,7 @@ void LLToolBar::updateLayoutAsNeeded() button_rect.setLeftTopAndSize(cur_row, panel_rect.mTop - cur_start, button_clamped_width, button->getRect().getHeight()); } button->setShape(button_rect); - + buttons_in_row.push_back(button); row_running_length += button_length + mPadBetween; @@ -517,6 +545,8 @@ void LLToolBar::updateLayoutAsNeeded() S32 total_girth = cur_row // current row position... + max_row_girth // ...incremented by size of final row... + girth_pad_end; // ...plus padding reserved on end + total_girth = llmax(total_girth,mMinGirth); + max_row_length = llmax(max_row_length, row_running_length - mPadBetween + row_pad_end); resizeButtonsInRow(buttons_in_row, max_row_girth); @@ -588,6 +618,12 @@ void LLToolBar::draw() } } } + // HACK!!! + if (!mDragAndDropTarget) + { + removeCommand(mDraggedCommand); + mDraggedCommand = LLCommandId::null; + } updateLayoutAsNeeded(); // rect may have shifted during layout @@ -618,7 +654,12 @@ void LLToolBar::createButtons() LLToolBarButton* button = createButton(command_id); mButtons.push_back(button); mButtonPanel->addChild(button); - mButtonMap.insert(std::make_pair(command_id, button)); + LLCommandId temp_command = command_id; + if (command_id.name() == "Drag Tool") + { + temp_command = LLCommandId("Drag Tool"); + } + mButtonMap.insert(std::make_pair(temp_command.uuid(), button)); } mNeedsLayout = true; } @@ -709,7 +750,31 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, *accept = (handled ? ACCEPT_YES_SINGLE : ACCEPT_NO); // We'll use that flag to change the visual aspect of the toolbar target on draw() - mDragAndDropTarget = handled; + mDragAndDropTarget = false; + + // HACK!!! + if (!isReadOnly() && handled) + { + if (!drop) + { + LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; + LLAssetType::EType type = inv_item->getType(); + if (type == LLAssetType::AT_WIDGET) + { + mRank = getRankFromPosition(x, y); + mDraggedCommand = LLCommandId("Drag Tool",inv_item->getUUID()); + removeCommand(mDraggedCommand); + addCommand(mDraggedCommand,mRank); + mDragAndDropTarget = true; + } + } + else + { + removeCommand(mDraggedCommand); + mDraggedCommand = LLCommandId::null; + } + + } return handled; } @@ -723,7 +788,10 @@ LLToolBarButton::LLToolBarButton(const Params& p) mId(""), mIsEnabledSignal(NULL), mIsRunningSignal(NULL), - mIsStartingSignal(NULL) + mIsStartingSignal(NULL), + mIsDragged(false), + mStartDragItemCallback(NULL), + mHandleDragItemCallback(NULL) { mButtonFlashRate = 0.0; mButtonFlashCount = 0; diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index 4fac081130..9e48dee608 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -141,7 +141,8 @@ public: pad_top, pad_right, pad_bottom, - pad_between; + pad_between, + min_girth; // get rid of this Multiple<LLCommandId::Params> commands; @@ -183,6 +184,8 @@ protected: tool_handledrag_callback_t mHandleDragItemCallback; tool_handledrop_callback_t mHandleDropCallback; bool mDragAndDropTarget; + int mRank; + LLCommandId mDraggedCommand; public: // Methods used in loading and saving toolbar settings @@ -204,7 +207,7 @@ private: typedef std::list<LLToolBarButton*> toolbar_button_list; toolbar_button_list mButtons; command_id_list_t mButtonCommands; - typedef std::map<LLCommandId, LLToolBarButton*> command_id_map; + typedef std::map<LLUUID, LLToolBarButton*> command_id_map; command_id_map mButtonMap; LLToolBarEnums::ButtonType mButtonType; @@ -219,7 +222,8 @@ private: mPadRight, mPadTop, mPadBottom, - mPadBetween; + mPadBetween, + mMinGirth; LLToolBarButton::Params mButtonParams[LLToolBarEnums::BTNTYPE_COUNT]; diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 8ee4b7d075..dab57d44bd 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -26,9 +26,9 @@ label_ref="Command_Avatar_Label" tooltip_ref="Command_Avatar_Tooltip" execute_function="Floater.ToolbarToggle" - execute_parameters="avatar_picker" + execute_parameters="avatar" is_running_function="Floater.IsOpen" - is_running_parameters="avatar_picker" + is_running_parameters="avatar" /> <command name="build" available_in_toybox="true" @@ -37,6 +37,8 @@ tooltip_ref="Command_Build_Tooltip" execute_function="Floater.ToolbarToggle" execute_parameters="build" + is_enabled_function="Agent.IsActionAllowed" + is_enabled_parameters="build" is_running_function="Floater.IsOpen" is_running_parameters="build" /> @@ -207,6 +209,8 @@ tooltip_ref="Command_Speak_Tooltip" execute_function="Floater.ToolbarToggle" execute_parameters="speak" + is_enabled_function="Agent.IsActionAllowed" + is_enabled_parameters="speak" is_running_function="Floater.IsOpen" is_running_parameters="speak" /> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 203bcab03a..aa2ff646a8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -619,7 +619,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string></string> + <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/avatars.html</string> </map> <key>AvatarBakedTextureUploadTimeout</key> <map> @@ -4246,7 +4246,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>InventoryDisplayOutbox</key> <map> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ba42126985..ed29ac7960 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -71,6 +71,7 @@ #include "lltoolpie.h" #include "lltoolmgr.h" #include "lltrans.h" +#include "lluictrl.h" #include "llurlentry.h" #include "llviewercontrol.h" #include "llviewerdisplay.h" @@ -152,6 +153,34 @@ bool handleSlowMotionAnimation(const LLSD& newvalue) return true; } +// static +void LLAgent::parcelChangedCallback() +{ + bool can_edit = LLToolMgr::getInstance()->canEdit(); + + gAgent.mCanEditParcel = can_edit; +} + +// static +bool LLAgent::isActionAllowed(const LLSD& sdname) +{ + bool retval = false; + + const std::string& param = sdname.asString(); + + if (param == "build") + { + retval = gAgent.canEditParcel(); + } + else if (param == "speak") + { + retval = true; + } + + return retval; +} + + // ************************************************************ // Enabled this definition to compile a 'hacked' viewer that // locally believes the end user has godlike powers. @@ -183,6 +212,7 @@ LLAgent::LLAgent() : mbTeleportKeepsLookAt(false), mAgentAccess(new LLAgentAccess(gSavedSettings)), + mCanEditParcel(false), mTeleportSourceSLURL(new LLSLURL), mTeleportState( TELEPORT_NONE ), mRegionp(NULL), @@ -246,6 +276,10 @@ LLAgent::LLAgent() : mListener.reset(new LLAgentListener(*this)); mMoveTimer.stop(); + + LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); + + LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); } // Requires gSavedSettings to be initialized. @@ -3361,7 +3395,14 @@ bool LLAgent::teleportCore(bool is_local) LLFloaterReg::hideInstance("region_info"); // minimize the Search floater (STORM-1474) - LLFloaterReg::getInstance("search")->setMinimized(TRUE); + { + LLFloater* instance = LLFloaterReg::getInstance("search"); + + if (instance && instance->getVisible()) + { + instance->setMinimized(TRUE); + } + } LLViewerParcelMgr::getInstance()->deselectLand(); LLViewerMediaFocus::getInstance()->clearFocus(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 5e23ced424..1775a0235c 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -575,6 +575,15 @@ private: ** ** *******************************************************************************/ + // Build +public: + bool canEditParcel() const { return mCanEditParcel; } +private: + bool mCanEditParcel; + + static bool isActionAllowed(const LLSD& sdname); + static void parcelChangedCallback(); + /******************************************************************************** ** ** ** ACCESS diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index 58bb417b71..609041803a 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -62,9 +62,9 @@ BOOL LLFloaterToybox::postBuild() mBtnRestoreDefaults = getChild<LLButton>("btn_restore_defaults"); mToolBar = getChild<LLToolBar>("toybox_toolbar"); - mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); - mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); - mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4)); + mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3)); + mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4)); + mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4)); LLCommandManager& cmdMgr = LLCommandManager::instance(); diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 95ed603bbf..44b244f163 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -43,6 +43,11 @@ LLToolBarView* gToolBarView = NULL; static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view"); bool LLToolBarView::sDragStarted = false; +bool isToolDragged() +{ + return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER); +} + LLToolBarView::Toolbar::Toolbar() : button_display_mode("button_display_mode"), commands("command") @@ -80,17 +85,17 @@ BOOL LLToolBarView::postBuild() mToolbarRight = getChild<LLToolBar>("toolbar_right"); mToolbarBottom = getChild<LLToolBar>("toolbar_bottom"); - mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); - mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); - mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4)); + mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3)); + mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4)); + mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4)); - mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); - mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); - mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4)); + mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3)); + mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4)); + mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4)); - mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragItem,_1,_2,_3)); - mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragItem,_1,_2,_3,_4)); - mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDrop,_1,_2,_3,_4)); + 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)); return TRUE; } @@ -306,37 +311,34 @@ void LLToolBarView::draw() mToolbarRight->localRectToOtherView(mToolbarRight->getLocalRect(), &right_rect, this); } - // Debug draw - LLColor4 back_color = LLColor4::blue; - LLColor4 back_color_vert = LLColor4::red; - LLColor4 back_color_hori = LLColor4::yellow; - back_color[VALPHA] = 0.5f; - back_color_hori[VALPHA] = 0.5f; - back_color_vert[VALPHA] = 0.5f; - //gl_rect_2d(getLocalRect(), back_color, TRUE); - //gl_rect_2d(bottom_rect, back_color_hori, TRUE); - //gl_rect_2d(left_rect, back_color_vert, TRUE); - //gl_rect_2d(right_rect, back_color_vert, TRUE); + // Draw drop zones if drop of a tool is active + if (isToolDragged()) + { + LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" ); + gl_rect_2d(bottom_rect, drop_color, TRUE); + gl_rect_2d(left_rect, drop_color, TRUE); + gl_rect_2d(right_rect, drop_color, TRUE); + } LLUICtrl::draw(); } // ---------------------------------------- -// Drag and Drop hacks (under construction) +// Drag and Drop Handling // ---------------------------------------- -void LLToolBarView::startDragItem( S32 x, S32 y, const LLUUID& uuid) +void LLToolBarView::startDragTool( S32 x, S32 y, const LLUUID& uuid) { - //llinfos << "Merov debug: startDragItem() : x = " << x << ", y = " << y << llendl; + //llinfos << "Merov debug: startDragTool() : x = " << x << ", y = " << y << llendl; LLToolDragAndDrop::getInstance()->setDragStart( x, y ); sDragStarted = false; } -BOOL LLToolBarView::handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type) +BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type) { -// llinfos << "Merov debug: handleDragItem() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; +// llinfos << "Merov debug: handleDragTool() : x = " << x << ", y = " << y << ", uuid = " << uuid << llendl; if (LLToolDragAndDrop::getInstance()->isOverThreshold( x, y )) { if (!sDragStarted) @@ -348,7 +350,7 @@ BOOL LLToolBarView::handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp gClipboard.setSourceObject(uuid,LLAssetType::AT_WIDGET); LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_VIEWER; LLUUID srcID; - //llinfos << "Merov debug: handleDragItem() : beginMultiDrag()" << llendl; + //llinfos << "Merov debug: handleDragTool() : beginMultiDrag()" << llendl; LLToolDragAndDrop::getInstance()->beginMultiDrag(types, cargo_ids, src, srcID); sDragStarted = true; return TRUE; @@ -362,18 +364,18 @@ BOOL LLToolBarView::handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp return FALSE; } -BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar) +BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar) { LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; - //llinfos << "Merov debug : handleDrop. Drop " << inv_item->getUUID() << " named " << inv_item->getName() << " of type " << inv_item->getType() << llendl; - + //llinfos << "Merov debug : handleDropTool. Drop " << inv_item->getUUID() << " named " << inv_item->getName() << " of type " << inv_item->getType() << llendl; + LLAssetType::EType type = inv_item->getType(); if (type == LLAssetType::AT_WIDGET) { - //llinfos << "Merov debug : handleDrop. Drop source is a widget -> drop it in place..." << llendl; + //llinfos << "Merov debug : handleDropTool. Drop source is a widget -> drop it in place..." << llendl; // Get the command from its uuid LLCommandManager& mgr = LLCommandManager::instance(); - LLCommandId command_id(inv_item->getUUID()); + LLCommandId command_id("",inv_item->getUUID()); LLCommand* command = mgr.getCommand(command_id); if (command) { @@ -385,9 +387,10 @@ BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolb } // Suppress the command from the toolbars (including the one it's dropped in, // this will handle move position). - gToolBarView->mToolbarLeft->removeCommand(command->id()); - gToolBarView->mToolbarRight->removeCommand(command->id()); - gToolBarView->mToolbarBottom->removeCommand(command->id()); + llinfos << "Merov debug : handleDropTool, " << command_id.name() << ", " << command_id.uuid() << llendl; + gToolBarView->mToolbarLeft->removeCommand(command_id); + gToolBarView->mToolbarRight->removeCommand(command_id); + gToolBarView->mToolbarBottom->removeCommand(command_id); // Now insert it in the toolbar at the detected rank if (!toolbar->isReadOnly()) { @@ -399,8 +402,11 @@ BOOL LLToolBarView::handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolb llwarns << "Command couldn't be found in command manager" << llendl; } } - + stopDragTool(); return TRUE; } - +void LLToolBarView::stopDragTool() +{ + sDragStarted = false; +} diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index 414fcd8751..a0c526ac54 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -74,9 +74,10 @@ public: static bool loadDefaultToolbars(); - static void startDragItem( S32 x, S32 y, const LLUUID& uuid); - static BOOL handleDragItem( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); - static BOOL handleDrop( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); + static void startDragTool( S32 x, S32 y, const LLUUID& uuid); + static BOOL handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); + static BOOL handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); + static void stopDragTool(); protected: friend class LLUICtrlFactory; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 7befc741e3..b0daf9f3c2 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -168,6 +168,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>); + LLFloaterReg::add("avatar", "floater_avatar.xml", &LLFloaterReg::build<LLFloater>); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 13dbc5e386..41b4dc01e8 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1488,7 +1488,8 @@ void LLViewerMedia::setOpenIDCookie() new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()), headers); - doOnetimeEarlyHTTPRequests(); + // FUI: No longer perform the user_status query + //doOnetimeEarlyHTTPRequests(); } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a28950f376..fae3ee9081 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1945,6 +1945,12 @@ void LLViewerWindow::initWorldUI() destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html"); } + LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild<LLMediaCtrl>("avatar_picker_contents"); + if (avatar_picker) + { + avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html"); + } } // Destroy the UI diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index b5cc949ebf..8baaa14595 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -795,6 +795,10 @@ <color name="DirectChatColor" reference="LtOrange" /> + + <color + name="ToolbarDropZoneColor" + value=".48 .69 1 .5" /> <!-- Generic color names (legacy) --> <color diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index a98ef58f50..0e4b354e0d 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -125,29 +125,29 @@ with the same filename but different name <texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" /> <texture name="Check_Mark" file_name="icons/check_mark" preload="true" /> - <texture name="Command_AboutLand_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Appearance_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Avatar_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Build_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Chat_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Compass_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Destinations_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Gestures_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_HowTo_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Inventory_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Map_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Marketplace_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_MiniMap_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Move_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_People_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Places_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Preferences_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Profile_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Search_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Snapshot_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Speak_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_View_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> - <texture name="Command_Voice_Icon" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" /> + <texture name="Command_AboutLand_Icon" file_name="toolbar_icons/land.png" preload="true" /> + <texture name="Command_Appearance_Icon" file_name="toolbar_icons/appearance.png" preload="true" /> + <texture name="Command_Avatar_Icon" file_name="toolbar_icons/avatars.png" preload="true" /> + <texture name="Command_Build_Icon" file_name="toolbar_icons/build.png" preload="true" /> + <texture name="Command_Chat_Icon" file_name="toolbar_icons/chat.png" preload="true" /> + <texture name="Command_Compass_Icon" file_name="toolbar_icons/land.png" preload="true" /> + <texture name="Command_Destinations_Icon" file_name="toolbar_icons/destinations.png" preload="true" /> + <texture name="Command_Gestures_Icon" file_name="toolbar_icons/gestures.png" preload="true" /> + <texture name="Command_HowTo_Icon" file_name="toolbar_icons/howto.png" preload="true" /> + <texture name="Command_Inventory_Icon" file_name="toolbar_icons/inventory.png" preload="true" /> + <texture name="Command_Map_Icon" file_name="toolbar_icons/map.png" preload="true" /> + <texture name="Command_Marketplace_Icon" file_name="toolbar_icons/marketplace.png" preload="true" /> + <texture name="Command_MiniMap_Icon" file_name="toolbar_icons/mini_map.png" preload="true" /> + <texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" /> + <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" /> + <texture name="Command_Places_Icon" file_name="toolbar_icons/places.png" preload="true" /> + <texture name="Command_Preferences_Icon" file_name="toolbar_icons/preferences.png" preload="true" /> + <texture name="Command_Profile_Icon" file_name="toolbar_icons/profile.png" preload="true" /> + <texture name="Command_Search_Icon" file_name="toolbar_icons/search.png" preload="true" /> + <texture name="Command_Snapshot_Icon" file_name="toolbar_icons/snapshot.png" preload="true" /> + <texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" /> + <texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" /> + <texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" /> <texture name="ComboButton_Disabled" file_name="widgets/ComboButton_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> diff --git a/indra/newview/skins/default/textures/toolbar_icons/appearance.png b/indra/newview/skins/default/textures/toolbar_icons/appearance.png Binary files differnew file mode 100644 index 0000000000..e6b1365388 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/appearance.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/avatars.png b/indra/newview/skins/default/textures/toolbar_icons/avatars.png Binary files differnew file mode 100644 index 0000000000..8fa0600cee --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/avatars.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/build.png b/indra/newview/skins/default/textures/toolbar_icons/build.png Binary files differnew file mode 100644 index 0000000000..e21ab3f0e4 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/build.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/chat.png b/indra/newview/skins/default/textures/toolbar_icons/chat.png Binary files differnew file mode 100644 index 0000000000..e0dbac495f --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/chat.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/destinations.png b/indra/newview/skins/default/textures/toolbar_icons/destinations.png Binary files differnew file mode 100644 index 0000000000..e2325f083a --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/destinations.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/gestures.png b/indra/newview/skins/default/textures/toolbar_icons/gestures.png Binary files differnew file mode 100644 index 0000000000..2404bb4e25 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/gestures.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/howto.png b/indra/newview/skins/default/textures/toolbar_icons/howto.png Binary files differnew file mode 100644 index 0000000000..8594d71113 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/howto.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/inventory.png b/indra/newview/skins/default/textures/toolbar_icons/inventory.png Binary files differnew file mode 100644 index 0000000000..ab3191255e --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/inventory.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/land.png b/indra/newview/skins/default/textures/toolbar_icons/land.png Binary files differnew file mode 100644 index 0000000000..89ea7604a4 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/land.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/map.png b/indra/newview/skins/default/textures/toolbar_icons/map.png Binary files differnew file mode 100644 index 0000000000..ed1049b7db --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/map.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/marketplace.png b/indra/newview/skins/default/textures/toolbar_icons/marketplace.png Binary files differnew file mode 100644 index 0000000000..62bad20be6 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/marketplace.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/mini_map.png b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png Binary files differnew file mode 100644 index 0000000000..b66af223bb --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/move.png b/indra/newview/skins/default/textures/toolbar_icons/move.png Binary files differnew file mode 100644 index 0000000000..5854110782 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/move.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png Binary files differnew file mode 100644 index 0000000000..5bdcb22aa5 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/people.png b/indra/newview/skins/default/textures/toolbar_icons/people.png Binary files differnew file mode 100644 index 0000000000..7228ae8e2f --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/people.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/places.png b/indra/newview/skins/default/textures/toolbar_icons/places.png Binary files differnew file mode 100644 index 0000000000..97d9fa066c --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/places.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/preferences.png b/indra/newview/skins/default/textures/toolbar_icons/preferences.png Binary files differnew file mode 100644 index 0000000000..df80d926b5 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/preferences.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/profile.png b/indra/newview/skins/default/textures/toolbar_icons/profile.png Binary files differnew file mode 100644 index 0000000000..32fe2bf8ac --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/profile.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/search.png b/indra/newview/skins/default/textures/toolbar_icons/search.png Binary files differnew file mode 100644 index 0000000000..bcb11e950d --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/search.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/snapshot.png b/indra/newview/skins/default/textures/toolbar_icons/snapshot.png Binary files differnew file mode 100644 index 0000000000..d26da9b1d2 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/snapshot.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/speak.png b/indra/newview/skins/default/textures/toolbar_icons/speak.png Binary files differnew file mode 100644 index 0000000000..10cd354c5c --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/speak.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/view.png b/indra/newview/skins/default/textures/toolbar_icons/view.png Binary files differnew file mode 100644 index 0000000000..5425af87e0 --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/view.png diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml new file mode 100644 index 0000000000..a0c1f4c021 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_avatar.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="225" + can_minimize="true" + can_close="true" + user_resize="true" + can_resize="true" + min_height="230" + min_width="455" + max_height="230" + height="230" + layout="topleft" + name="Avatar" + single_instance="true" + help_topic="avatar" + save_rect="true" + title="Avatar Picker" + width="445"> + <web_browser + top="25" + height="200" + width="435" + follows="all" + name="avatar_picker_contents" + trusted_content="true"/> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml index 50a279c046..9dd9338f37 100644 --- a/indra/newview/skins/default/xui/en/floater_destinations.xml +++ b/indra/newview/skins/default/xui/en/floater_destinations.xml @@ -6,6 +6,8 @@ user_resize="true" can_resize="true" min_height="230" + min_width="525" + max_height="230" height="230" layout="topleft" name="Destinations" diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index cf566d7d23..57baa7cdd3 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -90,15 +90,6 @@ top="0" visible="false" width="1024"/> - <panel bottom="500" - follows="left|right|bottom" - height="25" - left="0" - mouse_opaque="false" - tab_stop="false" - name="stand_stop_flying_container" - visible="false" - width="500"/> </layout_panel> <!--<layout_panel auto_resize="false" min_height="33" diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml index 44da813f61..03d45887d4 100644 --- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml @@ -41,10 +41,10 @@ <toolbar follows="left|top|bottom" button_panel.bg_opaque_image="Rounded_Rect_Right" name="toolbar_left" - height="500" width="30" left="0" - top="0" + top="10" + bottom="-10" side="left" button_display_mode="icons_only"> </toolbar> @@ -52,7 +52,19 @@ <layout_panel name="non_toolbar_panel" auto_resize="true" user_resize="false" - mouse_opaque="false"/> + mouse_opaque="false" + height="100" + width="100"> + <panel bottom="100" + follows="left|right|bottom" + height="25" + left="0" + mouse_opaque="false" + tab_stop="false" + name="stand_stop_flying_container" + visible="false" + width="100"/> + </layout_panel> <layout_panel name="right_toolbar_panel" auto_resize="false" user_resize="false" @@ -63,10 +75,10 @@ button_panel.bg_opaque_image="Rounded_Rect_Left" follows="right|top|bottom" name="toolbar_right" - height="500" width="30" left="0" - top="0" + top="10" + bottom="-10" side="right" button_display_mode="icons_only"> </toolbar> @@ -83,8 +95,8 @@ button_panel.bg_opaque_image="Rounded_Rect_Top" name="toolbar_bottom" height="30" - width="1024" - left="0" + left="40" + right="-40" top="0" side="bottom" follows="left|right|bottom" diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml index 613dc66762..d36b015005 100644 --- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml +++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml @@ -4,6 +4,7 @@ pad_top="1" pad_bottom="1" pad_between="1" + min_girth="24" mouse_opaque="false" read_only="false"> <button_panel name="button_panel" |