Anonymous avatar Anonymous committed a635aa3 Merge

Merge with head

Comments (0)

Files changed (6)

indra/llui/llcommandmanager.cpp

 // LLCommandId class
 //
 
-const LLCommandId LLCommandId::null = LLCommandId();
+const LLCommandId LLCommandId::null = LLCommandId("null command");
 
 //
 // LLCommand class
 }
 
 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)
 	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

indra/llui/llcommandmanager.h

 		{}
 	};
 
-	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
 		return (mUUID == command.mUUID);
 	}
 
-	bool operator<(const LLCommandId& command) const
-	{
-		return (mName < command.mName);
-	}
-
 	static const LLCommandId null;
 
 private:
-	std::string mName;
 	LLUUID		mUUID;
 };
 
 	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; }
 	bool        mAvailableInToybox;
 	std::string mIcon;
 	std::string mLabelRef;
+	std::string mName;
 	std::string mTooltipRef;
 
 	std::string mExecuteFunction;

indra/llui/llfloater.cpp

 {
 	bool saved_rect = false;
 
-	if (LLFloaterReg::getLastFloaterInGroup(mInstanceName))
+	LLFloater* last_in_group = LLFloaterReg::getLastFloaterInGroup(mInstanceName);
+	if (last_in_group && last_in_group != this)
 	{
 		// other floaters in our group, position ourselves relative to them and don't save the rect
 		mRectControl.clear();
 		if (mDocked)
 		{
 			setMinimized(FALSE);
+			mOpenPositioning = LLFloaterEnums::OPEN_POSITIONING_NONE;
 		}
 
 		updateTitleButtons();

indra/llui/lltoolbar.cpp

 	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());

indra/llxuixml/llinitparam.h

 					if (parser.readValue(name))
 					{
 						// try to parse a per type named value
-						if (name_value_lookup_t::getValueFromName(name, typed_param.mValues))
+						if (name_value_lookup_t::getValueFromName(name, value))
 						{
 							typed_param.add(value);
 							typed_param.mValues.back().setValueName(name);
 					bool value_written = parser.writeValue(*it, name_stack);
 					if (!value_written)
 					{
-						std::string calculated_key = typed_param.calcValueName(typed_param.getValue());
+						std::string calculated_key = it->calcValueName(key);
 						if (!parser.writeValue(calculated_key, name_stack))
 						{
 							break;

indra/newview/lltoolbarview.cpp

 	}
 	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;
 			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)
 			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)
 			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;
 		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);
 		}
 	}
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.