Scott Lawrence avatar Scott Lawrence committed 40b46ed Merge

merge changes for vmrg-182

Comments (0)

Files changed (186)

             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>1b92a69f5eba7cd8b017180659076db5</string>
+              <string>7108c2443dbcf4c032305814ce65ebb7</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/roxie_3p-llqtwebkit/rev/242182/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111003.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244065/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111028.tar.bz2</string>
             </map>
             <key>name</key>
             <string>darwin</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>1e7f24b69b0fc751c7e86efe7c621882</string>
+              <string>24048a31d7b852774dc3117acbd4a86a</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/roxie_3p-llqtwebkit/rev/242182/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111003.tar.bz2</string>
+              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244065/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111028.tar.bz2</string>
             </map>
             <key>name</key>
             <string>windows</string>

indra/llplugin/llpluginclassmedia.cpp

 	sendMessage(message);
 }
 
+void LLPluginClassMedia::set_page_zoom_factor( double factor )
+{
+	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "set_page_zoom_factor");
+
+	message.setValueReal("factor", factor);
+	sendMessage(message);
+}
+
 void LLPluginClassMedia::clear_cache()
 {
 	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "clear_cache");

indra/llplugin/llpluginclassmedia.h

 	bool pluginSupportsMediaBrowser(void);
 	
 	void focus(bool focused);
+	void set_page_zoom_factor( double factor );
 	void clear_cache();
 	void clear_cookies();
 	void set_cookies(const std::string &cookies);

indra/llui/lldockablefloater.cpp

 		mForceDocking = true;
 	}
 
-	mDockTongue = LLUI::getUIImage("windows/Flyout_Pointer.png");
+	mDockTongue = LLUI::getUIImage("Flyout_Pointer");
 	LLFloater::setDocked(true);
 	return LLView::postBuild();
 }
 	switch(dock_side)
 	{
 	case LLDockControl::LEFT:
-		mDockTongue = LLUI::getUIImage("windows/Flyout_Left.png");
+		mDockTongue = LLUI::getUIImage("Flyout_Left");
 		break;
 	case LLDockControl::RIGHT:
-		mDockTongue = LLUI::getUIImage("windows/Flyout_Right.png");
+		mDockTongue = LLUI::getUIImage("Flyout_Right");
 		break;
 	default:
-		mDockTongue = LLUI::getUIImage("windows/Flyout_Pointer.png");
+		mDockTongue = LLUI::getUIImage("Flyout_Pointer");
 		break;
 	}
 

indra/llui/llmenugl.cpp

 	mSpilloverMenu(NULL),
 	mJumpKey(p.jump_key),
 	mCreateJumpKeys(p.create_jump_keys),
-	mNeedsArrange(FALSE), 
+	mNeedsArrange(FALSE),
+	mResetScrollPositionOnShow(true),
 	mShortcutPad(p.shortcut_pad)
 {
 	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
 	S32 mouse_x, mouse_y;
 
 	// Resetting scrolling position
-	if (menu->isScrollable())
+	if (menu->isScrollable() && menu->isScrollPositionOnShowReset())
 	{
 		menu->mFirstVisibleItem = NULL;
 	}

indra/llui/llmenugl.h

 
 	static class LLMenuHolderGL* sMenuContainer;
 	
+	void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
+	bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
+
 protected:
 	void createSpilloverBranch();
 	void cleanupSpilloverBranch();
 	KEY				mJumpKey;
 	BOOL			mCreateJumpKeys;
 	S32				mShortcutPad;
+	bool			mResetScrollPositionOnShow;
 }; // end class LLMenuGL
 
 

indra/llui/lltoolbar.cpp

 	mPadBetween(p.pad_between),
 	mMinGirth(p.min_girth),
 	mPopupMenuHandle(),
+	mRightMouseTargetButton(NULL),
 	mStartDragItemCallback(NULL),
 	mHandleDragItemCallback(NULL),
 	mHandleDropCallback(NULL),
 
 		LLUICtrl::CommitCallbackRegistry::ScopedRegistrar commit_reg;
 		commit_reg.add("Toolbars.EnableSetting", boost::bind(&LLToolBar::onSettingEnable, this, _2));
+		commit_reg.add("Toolbars.RemoveSelectedCommand", boost::bind(&LLToolBar::onRemoveSelectedCommand, this));
 
 		LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_reg;
 		enable_reg.add("Toolbars.CheckSetting", boost::bind(&LLToolBar::isSettingChecked, this, _2));
 
 	if (handle_it_here)
 	{
+		// Determine which button the mouse was over during the click in case the context menu action
+		// is intended to affect the button.
+		BOOST_FOREACH(LLToolBarButton* button, mButtons)
+		{
+			LLRect button_rect;
+			button->localRectToOtherView(button->getLocalRect(), &button_rect, this);
+
+			if (button_rect.pointInRect(x, y))
+			{
+				mRightMouseTargetButton = button;
+				break;
+			}
+		}
+
 		createContextMenu();
 
 		LLContextMenu * menu = (LLContextMenu *) mPopupMenuHandle.get();
 	}
 }
 
+void LLToolBar::onRemoveSelectedCommand()
+{
+	llassert(!mReadOnly);
+
+	if (mRightMouseTargetButton)
+	{
+		removeCommand(mRightMouseTargetButton->getCommandId());
+
+		mRightMouseTargetButton = NULL;
+	}
+}
+
 void LLToolBar::setButtonType(LLToolBarEnums::ButtonType button_type)
 {
 	bool regenerate_buttons = (mButtonType != button_type);
 			S32 mid_point = (button_rect.mRight + button_rect.mLeft) / 2;
 			if (button_panel_x < mid_point)
 			{
-		mDragx = button_rect.mLeft - mPadLeft;
-		mDragy = button_rect.mTop + mPadTop;
-	}
-	else
-	{
+				mDragx = button_rect.mLeft - mPadLeft;
+				mDragy = button_rect.mTop + mPadTop;
+			}
+			else
+			{
 				rank++;
 				mDragx = button_rect.mRight + mPadRight - 1;
 				mDragy = button_rect.mTop + mPadTop;
 	{
 		// We hit passed the end of the list so put the insertion point at the end
 		if (orientation == LLLayoutStack::HORIZONTAL)
-	{
+		{
 			mDragx = button_rect.mRight + mPadRight;
 			mDragy = button_rect.mTop + mPadTop;
-	}
-	else
-	{
+		}
+		else
+		{
 			mDragx = button_rect.mLeft - mPadLeft;
 			mDragy = button_rect.mBottom - mPadBottom;
 		}
 	}
 	mButtons.clear();
 	mButtonMap.clear();
+	mRightMouseTargetButton = NULL;
 	
 	BOOST_FOREACH(LLCommandId& command_id, mButtonCommands)
 	{

indra/llui/lltoolbar.h

 
 	BOOL handleMouseDown(S32 x, S32 y, MASK mask);
 	BOOL handleHover(S32 x, S32 y, MASK mask);
+
 	void reshape(S32 width, S32 height, BOOL called_from_parent = true);
 	void setEnabled(BOOL enabled);
 	void setCommandId(const LLCommandId& id) { mId = id; }
+	LLCommandId getCommandId() { return mId; }
 
 	void setStartDragCallback(tool_startdrag_callback_t cb)   { mStartDragItemCallback  = cb; }
 	void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
 												pad_bottom,
 												pad_between,
 												min_girth;
-		// get rid of this
+
+		// default command set
 		Multiple<LLCommandId::Params>			commands;
 
 		Optional<LLPanel::Params>				button_panel;
 	// virtuals
 	void draw();
 	void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
-	int  getRankFromPosition(S32 x, S32 y);	
-	int  getRankFromPosition(const LLCommandId& id);	
 	BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
 	virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 								   EDragAndDropType cargo_type,
 								   std::string& tooltip_msg);
 	
 	static const int RANK_NONE = -1;
-	
 	bool addCommand(const LLCommandId& commandId, int rank = RANK_NONE);
 	int  removeCommand(const LLCommandId& commandId);		// Returns the rank the removed command was at, RANK_NONE if not found
-	bool hasCommand(const LLCommandId& commandId) const;
-	bool enableCommand(const LLCommandId& commandId, bool enabled);
-	bool stopCommandInProgress(const LLCommandId& commandId);
-	bool flashCommand(const LLCommandId& commandId, bool flash);
+	bool hasCommand(const LLCommandId& commandId) const;	// is this command bound to a button in this toolbar
+	bool enableCommand(const LLCommandId& commandId, bool enabled);	// enable/disable button bound to the specified command, if it exists in this toolbar
+	bool stopCommandInProgress(const LLCommandId& commandId);	// stop command if it is currently active
+	bool flashCommand(const LLCommandId& commandId, bool flash); // flash button associated with given command, if in this toolbar
 
-	void setStartDragCallback(tool_startdrag_callback_t cb)   { mStartDragItemCallback  = cb; }
+	void setStartDragCallback(tool_startdrag_callback_t cb)   { mStartDragItemCallback  = cb; } // connects drag and drop behavior to external logic
 	void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
 	void setHandleDropCallback(tool_handledrop_callback_t cb) { mHandleDropCallback     = cb; }
 	bool isReadOnly() const { return mReadOnly; }
 	boost::signals2::connection setButtonLeaveCallback(const button_signal_t::slot_type& cb);
 	boost::signals2::connection setButtonRemoveCallback(const button_signal_t::slot_type& cb);
 
-	void setTooltipButtonSuffix(const std::string& suffix) { mButtonTooltipSuffix = suffix; }
+	// append the specified string to end of tooltip
+	void setTooltipButtonSuffix(const std::string& suffix) { mButtonTooltipSuffix = suffix; } 
 
 	LLToolBarEnums::SideType getSideType() const { return mSideType; }
 	bool hasButtons() const { return !mButtons.empty(); }
 	bool isModified() const { return mModified; }
 
-protected:
+	int  getRankFromPosition(S32 x, S32 y);	
+	int  getRankFromPosition(const LLCommandId& id);	
+
+	// Methods used in loading and saving toolbar settings
+	void setButtonType(LLToolBarEnums::ButtonType button_type);
+	LLToolBarEnums::ButtonType getButtonType() { return mButtonType; }
+	command_id_list_t& getCommandsList() { return mButtonCommands; }
+	void clearCommandsList();
+
+private:
 	friend class LLUICtrlFactory;
 	LLToolBar(const Params&);
 	~LLToolBar();
 
 	void initFromParams(const Params&);
+	void createContextMenu();
+	void updateLayoutAsNeeded();
+	void createButtons();
+	void resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth);
+	BOOL isSettingChecked(const LLSD& userdata);
+	void onSettingEnable(const LLSD& userdata);
+	void onRemoveSelectedCommand();
+
+private:
+	// static layout state
+	const bool						mReadOnly;
+	const LLToolBarEnums::SideType	mSideType;
+	const bool						mWrap;
+	const S32						mPadLeft,
+									mPadRight,
+									mPadTop,
+									mPadBottom,
+									mPadBetween,
+									mMinGirth;
+
+	// drag and drop state
 	tool_startdrag_callback_t		mStartDragItemCallback;
 	tool_handledrag_callback_t		mHandleDragItemCallback;
 	tool_handledrop_callback_t		mHandleDropCallback;
 									mDragy,
 									mDragGirth;
 
-public:
-	// Methods used in loading and saving toolbar settings
-	void setButtonType(LLToolBarEnums::ButtonType button_type);
-	LLToolBarEnums::ButtonType getButtonType() { return mButtonType; }
-	command_id_list_t& getCommandsList() { return mButtonCommands; }
-	void clearCommandsList();
-					   
-private:
-	void createContextMenu();
-	void updateLayoutAsNeeded();
-	void createButtons();
-	void resizeButtonsInRow(std::vector<LLToolBarButton*>& buttons_in_row, S32 max_row_girth);
-	BOOL isSettingChecked(const LLSD& userdata);
-	void onSettingEnable(const LLSD& userdata);
-
-	const bool						mReadOnly;
-
 	typedef std::list<LLToolBarButton*> toolbar_button_list;
+	typedef std::map<LLUUID, LLToolBarButton*> command_id_map;
 	toolbar_button_list				mButtons;
 	command_id_list_t				mButtonCommands;
-	typedef std::map<LLUUID, LLToolBarButton*> command_id_map;
 	command_id_map					mButtonMap;
 
 	LLToolBarEnums::ButtonType		mButtonType;
+	LLToolBarButton::Params			mButtonParams[LLToolBarEnums::BTNTYPE_COUNT];
+
+	// related widgets
 	LLLayoutStack*					mCenteringStack;
-	LLLayoutStack*					mWrapStack;
 	LLPanel*						mButtonPanel;
-	LLToolBarEnums::SideType		mSideType;
-	
-	bool							mWrap;
+	LLHandle<class LLContextMenu>	mPopupMenuHandle;
+
+	LLToolBarButton*				mRightMouseTargetButton;
+
 	bool							mNeedsLayout;
 	bool							mModified;
-	S32								mPadLeft,
-									mPadRight,
-									mPadTop,
-									mPadBottom,
-									mPadBetween,
-									mMinGirth;
-
-	LLToolBarButton::Params			mButtonParams[LLToolBarEnums::BTNTYPE_COUNT];
-
-	LLHandle<class LLContextMenu>	mPopupMenuHandle;
 
 	button_signal_t*				mButtonAddSignal;
 	button_signal_t*				mButtonEnterSignal;
Add a comment to this file

indra/llui/lluictrlfactory.h

File contents unchanged.

indra/llwindow/llwindowmacosx.cpp

 			{
 				// This is where we would constrain move/resize to a particular screen
 
-				const S32 MIN_WIDTH  = 320;
-				const S32 MIN_HEIGHT = 240;
+				const S32 MIN_WIDTH  = 1024;
+				const S32 MIN_HEIGHT = 768;
 				
 				Rect currentBounds;
 				Rect previousBounds;

indra/llwindow/llwindowwin32.cpp

 				return 0;
 			}
 
+		case WM_GETMINMAXINFO:
+			{
+				LPMINMAXINFO min_max = (LPMINMAXINFO)l_param;
+				min_max->ptMinTrackSize.x = 1024;
+				min_max->ptMinTrackSize.y = 768;
+				return 0;
+			}
+
 		case WM_SIZE:
 			{
 				window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SIZE");
Add a comment to this file

indra/llxuixml/llinitparam.h

File contents unchanged.

indra/media_plugins/webkit/media_plugin_webkit.cpp

  * $/LicenseInfo$
  * @endcond
  */
-
 #include "llqtwebkit.h"
-
 #include "linden_common.h"
 #include "indra_constants.h" // for indra keyboard codes
 
+#include "lltimer.h"
 #include "llgl.h"
 
 #include "llplugininstance.h"
 	F32 mBackgroundG;
 	F32 mBackgroundB;
 	std::string mTarget;
-	
+	LLTimer mElapsedTime;
+		
 	VolumeCatcher mVolumeCatcher;
 
 	void postDebugMessage( const std::string& msg )
 	{
 		if ( mEnableMediaPluginDebugging )
 		{
+			std::stringstream str;
+			str << "@Media Msg> " << "[" << (double)mElapsedTime.getElapsedTimeF32()  << "] -- " << msg;
+
 			LLPluginMessage debug_message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "debug_message");
-			debug_message.setValue("message_text", "Media> " + msg);
+			debug_message.setValue("message_text", str.str());
 			debug_message.setValue("message_level", "info");
 			sendMessage(debug_message);
 		}
 		LLQtWebKit::getInstance()->enablePlugins( mPluginsEnabled );
 
 		// turn on/off Javascript based on what host app tells us
+#if LLQTWEBKIT_API_VERSION >= 11
+		LLQtWebKit::getInstance()->enableJavaScript( mJavascriptEnabled );
+#else
 		LLQtWebKit::getInstance()->enableJavascript( mJavascriptEnabled );
+#endif
 
 		std::stringstream str;
 		str << "Cookies enabled = " << mCookiesEnabled << ", plugins enabled = " << mPluginsEnabled << ", Javascript enabled = " << mJavascriptEnabled;
 		// append details to agent string
 		LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent );
 		postDebugMessage( "Updating user agent with " + mUserAgent );
-		
+
 #if !LL_QTWEBKIT_USES_PIXMAPS
 		// don't flip bitmap
 		LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
 		url << "%22%3E%3C/body%3E%3C/html%3E";
 		
 		//lldebugs << "data url is: " << url.str() << llendl;
-					
+
+		// loading overlay debug screen follows media debugging flag from client for now.
+#if LLQTWEBKIT_API_VERSION >= 16
+		LLQtWebKit::getInstance()->enableLoadingOverlay(mBrowserWindowId, mEnableMediaPluginDebugging);
+#else
+		llwarns << "Ignoring enableLoadingOverlay() call (llqtwebkit version is too old)." << llendl;
+#endif
+		str.clear();
+		str << "Loading overlay enabled = " << mEnableMediaPluginDebugging << " for mBrowserWindowId = " << mBrowserWindowId;
+		postDebugMessage( str.str() );
+
 		LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, url.str() );
 //		LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
 
 		// These could be passed through as well, but aren't really needed.
 //		message.setValue("uri", event.getEventUri());
 //		message.setValueBoolean("dead", (event.getIntValue() != 0))
+
+		// debug spam
+		postDebugMessage( "Sending cookie_set message from plugin: " + event.getStringValue() );
+
 		sendMessage(message);
 	}
 
 	mPluginsEnabled = true;		// default to on
 	mEnableMediaPluginDebugging = false;
 	mUserAgent = "LLPluginMedia Web Browser";
+
+	mElapsedTime.reset();
 }
 
 MediaPluginWebKit::~MediaPluginWebKit()
 			{
 				mEnableMediaPluginDebugging = message_in.getValueBoolean( "enable" );
 			}
-
 			else
 			if(message_name == "js_enable_object")
 			{
 					mFirstFocus = false;
 				}
 			}
+			else if(message_name == "set_page_zoom_factor")
+			{
+#if LLQTWEBKIT_API_VERSION >= 15
+				F32 factor = message_in.getValueReal("factor");
+				LLQtWebKit::getInstance()->setPageZoomFactor(factor);
+#else
+				llwarns << "Ignoring setPageZoomFactor message (llqtwebkit version is too old)." << llendl;
+#endif
+			}
 			else if(message_name == "clear_cache")
 			{
 				LLQtWebKit::getInstance()->clearCache();
 			else if(message_name == "set_cookies")
 			{
 				LLQtWebKit::getInstance()->setCookies(message_in.getValue("cookies"));
+
+				// debug spam
+				postDebugMessage( "Plugin setting cookie: " + message_in.getValue("cookies") );
 			}
 			else if(message_name == "proxy_setup")
 			{

indra/newview/app_settings/settings.xml

       <key>Value</key>
       <integer>-1</integer>
     </map>
-    <key>DebugToolbarFUI</key>
-    <map>
-      <key>Comment</key>
-      <string>Turn on the FUI Toolbars</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>Boolean</string>
-      <key>Value</key>
-      <integer>1</integer>
-    </map>
     <key>DebugViews</key>
     <map>
       <key>Comment</key>

indra/newview/app_settings/settings_per_account.xml

     <key>DisplayDestinationsOnInitialRun</key>
         <map>
         <key>Comment</key>
-          <string>Display the destinations guide when a user first launches FUI.</string>
+          <string>Display the destinations guide when a user first launches Second Life.</string>
         <key>Persist</key>
           <integer>1</integer>
         <key>Type</key>

indra/newview/llfavoritesbar.cpp

 	if (tool_dad->getSource() == LLToolDragAndDrop::SOURCE_NOTECARD)
 	{
 		viewer_item->setType(LLAssetType::AT_LANDMARK);
-		copy_inventory_from_notecard(tool_dad->getObjectID(), tool_dad->getSourceID(), viewer_item.get(), gInventoryCallbacks.registerCB(cb));
+		copy_inventory_from_notecard(favorites_id,
+									 tool_dad->getObjectID(),
+									 tool_dad->getSourceID(),
+									 viewer_item.get(),
+									 gInventoryCallbacks.registerCB(cb));
 	}
 	else
 	{
 	LLMenuItemCallGL::Params item_params;
 	item_params.name("open_my_landmarks");
 	item_params.label(translated ? label_transl: label_untrans);
-	item_params.on_click.function(boost::bind(&LLFloaterSidePanelContainer::showPanel, "places", LLSD()));
+	LLSD key;
+	key["type"] = "open_landmark_tab";
+	item_params.on_click.function(boost::bind(&LLFloaterSidePanelContainer::showPanel, "places", key));
 	LLMenuItemCallGL* menu_item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
 
 	fitLabelWidth(menu_item);
 	LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
 	if (mRestoreOverflowMenu && menu && !menu->getVisible())
 	{
+		menu->resetScrollPositionOnShow(false);
 		showDropDownMenu();
+		menu->resetScrollPositionOnShow(true);
 	}
 }
 

indra/newview/llfloatertoybox.cpp

 	, mToolBar(NULL)
 {
 	mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this));
+	mCommitCallbackRegistrar.add("Toybox.ClearAll", boost::bind(&LLFloaterToybox::onBtnClearAll, this));
 }
 
 LLFloaterToybox::~LLFloaterToybox()
 	{
 		LLToolBarView::loadDefaultToolbars();
 	}
+
 	return false;
 }
+
+static bool finish_clear_all_toybox(const LLSD& notification, const LLSD& response)
+{
+	S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+
+	if (option == 0)
+	{
+		LLToolBarView::clearAllToolbars();
+	}
+
+	return false;
+}
+
 static LLNotificationFunctorRegistration finish_restore_toybox_reg("ConfirmRestoreToybox", finish_restore_toybox);
+static LLNotificationFunctorRegistration finish_clear_all_toybox_reg("ConfirmClearAllToybox", finish_clear_all_toybox);
 
 void LLFloaterToybox::onBtnRestoreDefaults()
 {
 	LLNotificationsUtil::add("ConfirmRestoreToybox");
 }
 
+void LLFloaterToybox::onBtnClearAll()
+{
+	LLNotificationsUtil::add("ConfirmClearAllToybox");
+}
+
 BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
 	EDragAndDropType cargo_type,
 	void* cargo_data,

indra/newview/llfloatertoybox.h

 		std::string& tooltip_msg);
 
 protected:
+	void onBtnClearAll();
 	void onBtnRestoreDefaults();
 
 	void onToolBarButtonEnter(LLView* button);

indra/newview/llfolderviewitem.h

 	folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); }
 	folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); }
 	folders_t::size_type getFoldersCount() const { return mFolders.size(); }
+
+	items_t::const_iterator getItemsBegin() const { return mItems.begin(); }
+	items_t::const_iterator getItemsEnd() const { return mItems.end(); }
+	items_t::size_type getItemsCount() const { return mItems.size(); }
 };
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

indra/newview/llinventorybridge.cpp

 #endif
 				}
 			}
-			if (move_is_into_outbox && !move_is_from_outbox)
+			else if (move_is_into_outbox && !move_is_from_outbox)
 			{
 				dropFolderToOutbox(inv_cat);
 			}
 		// because they must contain only links to wearable items.
 		accept = !(move_is_into_current_outfit || move_is_into_outfit);
 
-		if(drop)
+		if(accept && drop)
 		{
-			copy_inventory_from_notecard(LLToolDragAndDrop::getInstance()->getObjectID(),
-										 LLToolDragAndDrop::getInstance()->getSourceID(), inv_item);
+			copy_inventory_from_notecard(mUUID,  // Drop to the chosen destination folder
+										 LLToolDragAndDrop::getInstance()->getObjectID(),
+										 LLToolDragAndDrop::getInstance()->getSourceID(),
+										 inv_item);
 		}
 	}
 	else if(LLToolDragAndDrop::SOURCE_LIBRARY == source)

indra/newview/llinventorymodel.cpp

 	{
 		LLPointer<LLViewerInventoryCategory> tfolder = new LLViewerInventoryCategory(gAgent.getID());
 		tfolder->unpackMessage(msg, _PREHASH_FolderData, i);
-		//llinfos << "unpaked folder '" << tfolder->getName() << "' ("
-		//		<< tfolder->getUUID() << ") in " << tfolder->getParentUUID()
-		//		<< llendl;
+		llinfos << "unpacked folder '" << tfolder->getName() << "' ("
+				<< tfolder->getUUID() << ") in " << tfolder->getParentUUID()
+				<< llendl;
 		if(tfolder->getUUID().notNull())
 		{
 			folders.push_back(tfolder);
 	{
 		LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
 		titem->unpackMessage(msg, _PREHASH_ItemData, i);
-		//llinfos << "unpaked item '" << titem->getName() << "' in "
-		//		<< titem->getParentUUID() << llendl;
+		llinfos << "unpaked item '" << titem->getName() << "' in "
+				<< titem->getParentUUID() << llendl;
 		U32 callback_id;
 		msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id);
 		if(titem->getUUID().notNull())

indra/newview/llmediactrl.cpp

 LLMediaCtrl::Params::Params()
 :	start_url("start_url"),
 	border_visible("border_visible", true),
-	ignore_ui_scale("ignore_ui_scale", true),
 	decouple_texture_size("decouple_texture_size", false),
 	texture_width("texture_width", 1024),
 	texture_height("texture_height", 1024),
 	mFrequentUpdates( true ),
 	mForceUpdate( false ),
 	mHomePageUrl( "" ),
-	mIgnoreUIScale( true ),
 	mAlwaysRefresh( false ),
 	mMediaSource( 0 ),
 	mTakeFocusOnClick( p.focus_on_click ),
 		setCaretColor( (unsigned int)color.mV[0], (unsigned int)color.mV[1], (unsigned int)color.mV[2] );
 	}
 
-	setIgnoreUIScale(p.ignore_ui_scale);
-	
 	setHomePageUrl(p.start_url, p.initial_mime_type);
 	
 	setBorderVisible(p.border_visible);
 
 	if(!getDecoupleTextureSize())
 	{
-		S32 screen_width = mIgnoreUIScale ? 
-			llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]) : getRect().getWidth();
-		S32 screen_height = mIgnoreUIScale ? 
-			llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight();
+		S32 screen_width = llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]);
+		S32 screen_height = llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]);
 			
 		setTextureSize(screen_width, screen_height);
 	}
 {
 	if(!getDecoupleTextureSize())
 	{
-		S32 screen_width = mIgnoreUIScale ? llround((F32)width * LLUI::sGLScaleFactor.mV[VX]) : width;
-		S32 screen_height = mIgnoreUIScale ? llround((F32)height * LLUI::sGLScaleFactor.mV[VY]) : height;
+		S32 screen_width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
+		S32 screen_height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
 
 		// when floater is minimized, these sizes are negative
 		if ( screen_height > 0 && screen_width > 0 )
 			mMediaSource->addObserver( this );
 			mMediaSource->setBackgroundColor( getBackgroundColor() );
 			mMediaSource->setTrustedBrowser(mTrusted);
+			mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
+
 			if(mClearCache)
 			{
 				mMediaSource->clearCache();
 	{
 		gGL.pushUIMatrix();
 		{
-			if (mIgnoreUIScale)
-			{
-				gGL.loadUIIdentity();
-				// font system stores true screen origin, need to scale this by UI scale factor
-				// to get render origin for this view (with unit scale)
-				gGL.translateUI(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]), 
-							floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]), 
-							LLFontGL::sCurOrigin.mZ);
-			}
+			mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
 
 			// scale texture to fit the space using texture coords
 			gGL.getTexUnit(0)->bind(media_texture);
 			x_offset = (r.getWidth() - width) / 2;
 			y_offset = (r.getHeight() - height) / 2;		
 
-			if(mIgnoreUIScale)
-			{
-				x_offset = llround((F32)x_offset * LLUI::sGLScaleFactor.mV[VX]);
-				y_offset = llround((F32)y_offset * LLUI::sGLScaleFactor.mV[VY]);
-				width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
-				height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
-			}
-
 			// draw the browser
 			gGL.begin( LLRender::QUADS );
 			if (! media_plugin->getTextureCoordsOpenGL())
 		coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
 	}
 	
-	x = mIgnoreUIScale ? llround((F32)x * LLUI::sGLScaleFactor.mV[VX]) : x;
+	x = llround((F32)x * LLUI::sGLScaleFactor.mV[VX]);
 	if ( ! coords_opengl )
 	{
-		y = mIgnoreUIScale ? llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]) : y;
+		y = llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]);
 	}
 	else
 	{
-		y = mIgnoreUIScale ? llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]) : getRect().getHeight() - y;
+		y = llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]);
 	};
 }
 

indra/newview/llmediactrl.h

 		Optional<std::string>	start_url;
 		
 		Optional<bool>			border_visible,
-								ignore_ui_scale,
 								hide_loading,
 								decouple_texture_size,
 								trusted_content,
 		bool getFrequentUpdates() { return mFrequentUpdates; };
 		void setFrequentUpdates( bool frequentUpdatesIn ) {  mFrequentUpdates = frequentUpdatesIn; };
 
-		void setIgnoreUIScale(bool ignore) { mIgnoreUIScale = ignore; }
-		bool getIgnoreUIScale() { return mIgnoreUIScale; }
-
 		void setAlwaysRefresh(bool refresh) { mAlwaysRefresh = refresh; }
 		bool getAlwaysRefresh() { return mAlwaysRefresh; }
 		
 		const S32 mTextureDepthBytes;
 		LLUUID mMediaTextureID;
 		LLViewBorder* mBorder;
-		bool mFrequentUpdates;
-		bool mForceUpdate;
-		bool mTrusted;
-		std::string mHomePageUrl;
-		std::string mHomePageMimeType;
-		std::string mCurrentNavUrl;
-		std::string mErrorPageURL;
-		std::string mTarget;
-		bool mIgnoreUIScale;
-		bool mAlwaysRefresh;
+		bool	mFrequentUpdates,
+				mForceUpdate,
+				mTrusted,
+				mAlwaysRefresh,
+				mTakeFocusOnClick,
+				mStretchToFill,
+				mMaintainAspectRatio,
+				mHideLoading,
+				mHidingInitialLoad,
+				mClearCache,
+				mHoverTextChanged,
+				mDecoupleTextureSize;
+
+		std::string mHomePageUrl,
+					mHomePageMimeType,
+					mCurrentNavUrl,
+					mErrorPageURL,
+					mTarget;
 		viewer_media_t mMediaSource;
-		bool mTakeFocusOnClick;
-		bool mStretchToFill;
-		bool mMaintainAspectRatio;
-		bool mHideLoading;
-		bool mHidingInitialLoad;
-		bool mDecoupleTextureSize;
-		S32 mTextureWidth;
-		S32 mTextureHeight;
-		bool mClearCache;
+		S32 mTextureWidth,
+			mTextureHeight;
+
 		class LLWindowShade* mWindowShade;
-		bool mHoverTextChanged;
 		LLContextMenu* mContextMenu;
 };
 

indra/newview/llnearbychat.cpp

 
 static LLRegisterPanelClassWrapper<LLNearbyChat> t_panel_nearby_chat("panel_nearby_chat");
 
-LLNearbyChat::LLNearbyChat() 
-	: LLPanel()
-	,mChatHistory(NULL)
-{
-}
-
-LLNearbyChat::~LLNearbyChat()
+LLNearbyChat::LLNearbyChat(const LLNearbyChat::Params& p) 
+:	LLPanel(p),
+	mChatHistory(NULL)
 {
 }
 
 	return false;
 }
 
+void LLNearbyChat::removeScreenChat()
+{
+	LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
+	if(chat_channel)
+	{
+		chat_channel->removeToastsFromChannel();
+	}
+}
+
 void	LLNearbyChat::setVisible(BOOL visible)
 {
 	if(visible)
 	{
-		LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
-		if(chat_channel)
-		{
-			chat_channel->removeToastsFromChannel();
-		}
+		removeScreenChat();
 	}
 
 	LLPanel::setVisible(visible);

indra/newview/llnearbychat.h

 class LLNearbyChat: public LLPanel
 {
 public:
-	LLNearbyChat();
-	~LLNearbyChat();
+	LLNearbyChat(const Params& p = LLPanel::getDefaultParams());
 
 	BOOL	postBuild			();
 
 	void loadHistory();
 
 	static LLNearbyChat* getInstance();
+	void removeScreenChat();
 
 private:
 
 	void	getAllowedRect		(LLRect& rect);
 
 	void	onNearbySpeakers	();
-	
+
 
 private:
 	LLHandle<LLView>	mPopupMenuHandle;

indra/newview/llnearbychatbar.cpp

 #include "llviewerwindow.h"
 #include "llrootview.h"
 #include "llviewerchat.h"
+#include "llnearbychat.h"
 
 #include "llresizehandle.h"
 
 
 void LLNearbyChatBar::setMinimized(BOOL b)
 {
-	if (b != LLFloater::isMinimized())
+	LLNearbyChat* nearby_chat = getChild<LLNearbyChat>("nearby_chat");
+	// when unminimizing with nearby chat visible, go ahead and kill off screen chats
+	if (!b && nearby_chat->getVisible())
 	{
+		nearby_chat->removeScreenChat();
+	}
 		LLFloater::setMinimized(b);
-		getChildView("nearby_chat")->setVisible(!b);
-	}
 }
 
 void LLNearbyChatBar::onChatBoxCommit()

indra/newview/llnotificationtiphandler.cpp

 
 #include "llfloaterreg.h"
 #include "llnearbychat.h"
+#include "llnearbychatbar.h"
 #include "llnotificationhandler.h"
 #include "llnotifications.h"
 #include "lltoastnotifypanel.h"
 
 			// don't show toast if Nearby Chat is opened
 			LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
-			if (nearby_chat->getVisible())
+			LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance();
+			if (nearby_chat_bar->getVisible() && nearby_chat->getVisible())
 			{
 				return false;
 			}

indra/newview/llpanellandmarks.cpp

 		inventory_list->restoreFolderState();
 	}
 
-	// Open the immediate children of the root folder, since those
-	// are invisible in the UI and thus must always be open.
-	inventory_list->getRootFolder()->openTopLevelFolders();
-
 	if (inventory_list->getFilterSubString().empty() && string.empty())
 	{
 		// current filter and new filter empty, do nothing

indra/newview/llpanelmarketplaceinbox.cpp

 					fresh_item_count++;
 				}
 			}
+
+			LLFolderViewFolder::items_t::const_iterator items_it = inbox_folder->getItemsBegin();
+			LLFolderViewFolder::items_t::const_iterator items_end = inbox_folder->getItemsEnd();
+
+			for (; items_it != items_end; ++items_it)
+			{
+				const LLFolderViewItem * item_view = *items_it;
+				const LLInboxFolderViewItem * inbox_item_view = dynamic_cast<const LLInboxFolderViewItem*>(item_view);
+
+				if (inbox_item_view && inbox_item_view->isFresh())
+				{
+					fresh_item_count++;
+				}
+			}
 		}
 	}
 
 		if (inbox_folder)
 		{
 			item_count += inbox_folder->getFoldersCount();
+			item_count += inbox_folder->getItemsCount();
 		}
 	}
 	

indra/newview/llpanelmarketplaceinboxinventory.cpp

 
 static LLDefaultChildRegistry::Register<LLInboxInventoryPanel> r1("inbox_inventory_panel");
 static LLDefaultChildRegistry::Register<LLInboxFolderViewFolder> r2("inbox_folder_view_folder");
+static LLDefaultChildRegistry::Register<LLInboxFolderViewItem> r3("inbox_folder_view_item");
 
 
 //
 
 LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge)
 {
-	LLFolderViewItem::Params params;
+	LLInboxFolderViewItem::Params params;
 
 	params.name = bridge->getDisplayName();
 	params.icon = bridge->getIcon();
 #endif
 }
 
-LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
-{
-}
-
 // virtual
 void LLInboxFolderViewFolder::draw()
 {
 	LLFolderViewFolder::draw();
 }
 
+void LLInboxFolderViewFolder::selectItem()
+{
+	LLFolderViewFolder::selectItem();
+
+	deFreshify();
+}
+
+void LLInboxFolderViewFolder::toggleOpen()
+{
+	LLFolderViewFolder::toggleOpen();
+
+	deFreshify();
+}
+
 void LLInboxFolderViewFolder::computeFreshness()
 {
 	const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
 	gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
 }
 
-void LLInboxFolderViewFolder::selectItem()
-{
-	LLFolderViewFolder::selectItem();
-
-	deFreshify();
-}
-
-void LLInboxFolderViewFolder::toggleOpen()
-{
-	LLFolderViewFolder::toggleOpen();
-
-	deFreshify();
-}
-
 void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc)
 { 
 	mCreationDate = creation_date_utc; 
 // LLInboxFolderViewItem Implementation
 //
 
+LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p)
+	: LLFolderViewItem(p)
+	, LLBadgeOwner(getHandle())
+	, mFresh(false)
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+	initBadgeParams(p.new_badge());
+#endif
+}
+
+BOOL LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
+{
+	BOOL retval = LLFolderViewItem::addToFolder(folder, root);
+
+#if SUPPORTING_FRESH_ITEM_COUNT
+	// Compute freshness if our parent is the root folder for the inbox
+	if (mParentFolder == mRoot)
+	{
+		computeFreshness();
+	}
+#endif
+	
+	return retval;
+}
+
 BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask)
 {
 	return TRUE;
 }
 
+// virtual
+void LLInboxFolderViewItem::draw()
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+	if (!badgeHasParent())
+	{
+		addBadgeToParentPanel();
+	}
+
+	setBadgeVisibility(mFresh);
+#endif
+
+	LLFolderViewItem::draw();
+}
+
+void LLInboxFolderViewItem::selectItem()
+{
+	LLFolderViewItem::selectItem();
+
+	deFreshify();
+}
+
+void LLInboxFolderViewItem::computeFreshness()
+{
+	const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity");
+
+	if (last_expansion_utc > 0)
+	{
+		mFresh = (mCreationDate > last_expansion_utc);
+
+#if DEBUGGING_FRESHNESS
+		if (mFresh)
+		{
+			llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl;
+		}
+#endif
+	}
+	else
+	{
+		mFresh = true;
+	}
+}
+
+void LLInboxFolderViewItem::deFreshify()
+{
+	mFresh = false;
+
+	gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+}
+
+
 // eof

indra/newview/llpanelmarketplaceinboxinventory.h

 	};
 	
 	LLInboxFolderViewFolder(const Params& p);
-	~LLInboxFolderViewFolder();
-
+	
 	void draw();
 	
+	void selectItem();
+	void toggleOpen();
+
 	void computeFreshness();
 	void deFreshify();
 
-	void selectItem();
-	void toggleOpen();
-
 	bool isFresh() const { return mFresh; }
 	
 protected:
 };
 
 
-class LLInboxFolderViewItem : public LLFolderViewItem
+class LLInboxFolderViewItem : public LLFolderViewItem, public LLBadgeOwner
 {
 public:
-	LLInboxFolderViewItem(const Params& p)
-		: LLFolderViewItem(p)
+	struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
 	{
-	}
+		Optional<LLBadge::Params>	new_badge;
 
+		Params()
+			: new_badge("new_badge")
+		{
+		}
+	};
+
+	LLInboxFolderViewItem(const Params& p);
+
+	BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
 	BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
+	void draw();
+
+	void selectItem();
+
+	void computeFreshness();
+	void deFreshify();
+
+	bool isFresh() const { return mFresh; }
+
+protected:
+	bool mFresh;
 };
 
 #endif //LL_INBOXINVENTORYPANEL_H

indra/newview/llpanelpicks.cpp

 
 	void createPick()
 	{
-		LLSD params;
-		params["id"] = gAgent.getID();
-		params["open_tab_name"] = "panel_picks";
-		params["show_tab_panel"] = "create_pick";
-		LLFloaterSidePanelContainer::showPanel("my_profile", params);
+		// open the new pick panel on the Picks floater
+		LLFloater* picks_floater = LLFloaterReg::showInstance("picks");
+
+		LLPanelPicks* picks = picks_floater->findChild<LLPanelPicks>("panel_picks");
+		picks->createNewPick();
 	}
 
 	void editPick(LLPickData* pick_info)
 
 	void createClassified()
 	{
-		// open the new classified panel on the Me > Picks sidetray
-		LLSD params;
-		params["id"] = gAgent.getID();
-		params["open_tab_name"] = "panel_picks";
-		params["show_tab_panel"] = "create_classified";
-		LLFloaterSidePanelContainer::showPanel("my_profile", params);
+		// open the new classified panel on the Picks floater
+		LLFloater* picks_floater = LLFloaterReg::showInstance("picks");
+
+		LLPanelPicks* picks = picks_floater->findChild<LLPanelPicks>("panel_picks");
+		picks->createNewClassified();
 	}
 
 	void openClassified(LLAvatarClassifiedInfo* c_info)

indra/newview/llpanelpicks.h

 	// parent panels failed to work (picks related code was in my profile panel)
 	void setProfilePanel(LLPanelProfile* profile_panel);
 
+	void createNewPick();
+	void createNewClassified();
+
 protected:
 	/*virtual*/void updateButtons();
 
 
 	bool onEnableMenuItem(const LLSD& user_data);
 
-	void createNewPick();
-	void createNewClassified();
-
 	void openPickInfo();
 	void openClassifiedInfo();
 	void openClassifiedInfo(const LLSD& params);

indra/newview/llpanelplaces.cpp

 static const std::string LANDMARK_INFO_TYPE			= "landmark";
 static const std::string REMOTE_PLACE_INFO_TYPE		= "remote_place";
 static const std::string TELEPORT_HISTORY_INFO_TYPE	= "teleport_history";
+static const std::string LANDMARK_TAB_INFO_TYPE     = "open_landmark_tab";
 
 // Support for secondlife:///app/parcel/{UUID}/about SLapps
 class LLParcelHandler : public LLCommandHandler
 
 	if (key.size() != 0)
 	{
-		mFilterEditor->clear();
-		onFilterEdit("", false);
+		std::string key_type = key["type"].asString();
+		if (key_type == LANDMARK_TAB_INFO_TYPE)
+		{
+			// Small hack: We need to toggle twice. The first toggle moves from the Landmark 
+			// or Teleport History info panel to the Landmark or Teleport History list panel.
+			// For this first toggle, the mPlaceInfoType should be the one previously used so 
+			// that the state can be corretly set.
+			// The second toggle forces the list to be set to Landmark.
+			// This avoids extracting and duplicating all the state logic from togglePlaceInfoPanel() 
+			// here or some specific private method
+			togglePlaceInfoPanel(FALSE);
+			mPlaceInfoType = key_type;
+			togglePlaceInfoPanel(FALSE);
+			// Update the active tab
+			onTabSelected();
+			// Update the buttons at the bottom of the panel
+			updateVerbs();
+		}
+		else
+		{
+			mFilterEditor->clear();
+			onFilterEdit("", false);
 
-		mPlaceInfoType = key["type"].asString();
-		mPosGlobal.setZero();
-		mItem = NULL;
-		isLandmarkEditModeOn = false;
-		togglePlaceInfoPanel(TRUE);
+			mPlaceInfoType = key_type;
+			mPosGlobal.setZero();
+			mItem = NULL;
+			isLandmarkEditModeOn = false;
+			togglePlaceInfoPanel(TRUE);
 
-		if (mPlaceInfoType == AGENT_INFO_TYPE)
-		{
-			mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT);
-		}
-		else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
-		{
-			mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
+			if (mPlaceInfoType == AGENT_INFO_TYPE)
+			{
+				mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT);
+			}
+			else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
+			{
+				mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
 
-			if (key.has("x") && key.has("y") && key.has("z"))
+				if (key.has("x") && key.has("y") && key.has("z"))
+				{
+					mPosGlobal = LLVector3d(key["x"].asReal(),
+											key["y"].asReal(),
+											key["z"].asReal());
+				}
+				else
+				{
+					mPosGlobal = gAgent.getPositionGlobal();
+				}
+
+				mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+
+				mSaveBtn->setEnabled(FALSE);
+			}
+			else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
 			{
-				mPosGlobal = LLVector3d(key["x"].asReal(),
-										key["y"].asReal(),
-										key["z"].asReal());
+				mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
+
+				LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
+				if (!item)
+					return;
+
+				setItem(item);
 			}
-			else
+			else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
 			{
-				mPosGlobal = gAgent.getPositionGlobal();
+				if (key.has("id"))
+				{
+					LLUUID parcel_id = key["id"].asUUID();
+					mPlaceProfile->setParcelID(parcel_id);
+
+					// query the server to get the global 3D position of this
+					// parcel - we need this for teleport/mapping functions.
+					mRemoteParcelObserver->setParcelID(parcel_id);
+				}
+				else
+				{
+					mPosGlobal = LLVector3d(key["x"].asReal(),
+											key["y"].asReal(),
+											key["z"].asReal());
+					mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
+				}
+
+				mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE);
 			}
+			else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE)
+			{
+				S32 index = key["id"].asInteger();
 
-			mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+				const LLTeleportHistoryStorage::slurl_list_t& hist_items =
+							LLTeleportHistoryStorage::getInstance()->getItems();
 
-			mSaveBtn->setEnabled(FALSE);
-		}
-		else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
-		{
-			mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
+				mPosGlobal = hist_items[index].mGlobalPos;
 
-			LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
-			if (!item)
-				return;
-
-			setItem(item);
-		}
-		else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
-		{
-			if (key.has("id"))
-			{
-				LLUUID parcel_id = key["id"].asUUID();
-				mPlaceProfile->setParcelID(parcel_id);
-
-				// query the server to get the global 3D position of this
-				// parcel - we need this for teleport/mapping functions.
-				mRemoteParcelObserver->setParcelID(parcel_id);
-			}
-			else
-			{
-				mPosGlobal = LLVector3d(key["x"].asReal(),
-										key["y"].asReal(),
-										key["z"].asReal());
+				mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
 				mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
 			}
 
-			mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE);
+			updateVerbs();
 		}
-		else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE)
-		{
-			S32 index = key["id"].asInteger();
-
-			const LLTeleportHistoryStorage::slurl_list_t& hist_items =
-						LLTeleportHistoryStorage::getInstance()->getItems();
-
-			mPosGlobal = hist_items[index].mGlobalPos;
-
-			mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
-			mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
-		}
-
-		updateVerbs();
 	}
 
 	LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance();
 		}
 	}
 	else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE ||
-			 mPlaceInfoType == LANDMARK_INFO_TYPE)
+			 mPlaceInfoType == LANDMARK_INFO_TYPE ||
+			 mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
 	{
 		mLandmarkInfo->setVisible(visible);
 
 		{
 			LLLandmarksPanel* landmarks_panel =
 					dynamic_cast<LLLandmarksPanel*>(mTabContainer->getPanelByName("Landmarks"));
-			if (landmarks_panel && mItem.notNull())
+			if (landmarks_panel)
 			{
 				// If a landmark info is being closed we open the landmarks tab
 				// and set this landmark selected.
 				mTabContainer->selectTabPanel(landmarks_panel);
-
-				landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
+				if (mItem.notNull())
+				{
+					landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
+				}
 			}
 		}
 	}
 		return mPlaceProfile;
 	}
 	else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE ||
-			 mPlaceInfoType == LANDMARK_INFO_TYPE)
+			 mPlaceInfoType == LANDMARK_INFO_TYPE ||
+			 mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
 	{
 		return mLandmarkInfo;
 	}

indra/newview/llpreview.cpp

 		// Copy to inventory
 		if (self->mNotecardInventoryID.notNull())
 		{
-			copy_inventory_from_notecard(self->mNotecardObjectID,
-				self->mNotecardInventoryID, item);
+			copy_inventory_from_notecard(LLUUID::null,
+										 self->mNotecardObjectID,
+										 self->mNotecardInventoryID,
+										 item);
 		}
 		else
 		{

indra/newview/llscreenchannel.cpp

 //--------------------------------------------------------------------------
 void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
 {
+	LLScreenChannelBase::updateRect();
+
 	LLRect toast_rect;
 	LLToast::Params p;
 	p.lifetime_secs = timer;
 	text_box->setValue(text);
 	text_box->setVisible(TRUE);
 
-	S32 old_height = text_box->getRect().getHeight();
 	text_box->reshapeToFitText();
 	text_box->setOrigin(text_box->getRect().mLeft, (wrapper_panel->getRect().getHeight() - text_box->getRect().getHeight())/2);
-	S32 new_height = text_box->getRect().getHeight();
-	S32 height_delta = new_height - old_height;
 
-	toast_rect.setLeftTopAndSize(0, toast_rect.getHeight() + height_delta +gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
+	toast_rect.setLeftTopAndSize(0, getRect().getHeight() - gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
 	mStartUpToastPanel->setRect(toast_rect);
 
 	addChild(mStartUpToastPanel);

indra/newview/llsidepanelinventory.cpp

 			switch (added_category_type)
 			{
 				case LLFolderType::FT_INBOX:
+					mSidepanelInventory->enableInbox(true);
 					mSidepanelInventory->observeInboxModifications(added_category->getUUID());
 					break;
 				case LLFolderType::FT_OUTBOX:
+					mSidepanelInventory->enableOutbox(true);
 					mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
 					break;
-				case LLFolderType::FT_NONE:
-					// HACK until sim update to properly create folder with system type
-					if (added_category->getName() == "Received Items")
-					{
-						mSidepanelInventory->observeInboxModifications(added_category->getUUID());
-					}
-					else if (added_category->getName() == "Merchant Outbox")
-					{
-						mSidepanelInventory->observeOutboxModifications(added_category->getUUID());
-					}
 				default:
 					break;
 			}
 	gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
 	gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged));
 
-	updateInboxOutbox();
 	// Update the verbs buttons state.
 	updateVerbs();
 
 	// Set up observer for inbox changes, if we have an inbox already
 	if (!inbox_id.isNull())
 	{
-		observeInboxModifications(inbox_id);
-
 		// Enable the display of the inbox if it exists
 		enableInbox(true);
+
+		observeInboxModifications(inbox_id);
 	}
 	
 #if ENABLE_MERCHANT_OUTBOX_PANEL
 	// Set up observer for outbox changes, if we have an outbox already
 	if (!outbox_id.isNull())
 	{
-		observeOutboxModifications(outbox_id);
-
 		// Enable the display of the outbox if it exists
 		enableOutbox(true);
+
+		observeOutboxModifications(outbox_id);
 	}
 #endif
 }

indra/newview/llstartup.cpp

 #include "lllogin.h"
 #include "llevents.h"
 #include "llstartuplistener.h"
+#include "lltoolbarview.h"
 
 #if LL_WINDOWS
 #include "lldxhardware.h"
 #else
 	BOOL bUseDebugLogin = TRUE;
 #endif
-
+	// Hide the toolbars: may happen to come back here if login fails after login agent but before login in region
+	if (gToolBarView)
+	{
+		gToolBarView->setVisible(FALSE);
+	}
+	
 	LLPanelLogin::show(	gViewerWindow->getWindowRectScaled(),
 						bUseDebugLogin || gSavedSettings.getBOOL("SecondLifeEnterprise"),
 						login_callback, NULL );

indra/newview/lltoolbarview.cpp

 	return true;
 }
 
+bool LLToolBarView::clearToolbars()
+{
+	for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+	{
+		if (mToolbars[i])
+		{
+			mToolbars[i]->clearCommandsList();
+		}
+	}
+
+	return true;
+}
+
 //static
 bool LLToolBarView::loadDefaultToolbars()
 {
 	return retval;
 }
 
+//static
+bool LLToolBarView::clearAllToolbars()
+{
+	bool retval = false;
+
+	if (gToolBarView)
+	{
+		retval = gToolBarView->clearToolbars();
+		if (retval)
+		{
+			gToolBarView->saveToolbars();
+		}
+	}
+
+	return retval;
+}
+
 void LLToolBarView::saveToolbars() const
 {
 	if (!mToolbarsLoaded)

indra/newview/lltoolbarview.h

 	// Loads the toolbars from the existing user or default settings
 	bool loadToolbars(bool force_default = false);	// return false if load fails
 	
+	// Clears all buttons off the toolbars
+	bool clearToolbars();
+	
 	void setToolBarsVisible(bool visible);
 
 	static bool loadDefaultToolbars();
+	static bool clearAllToolbars();
 	
 	static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton);
 	static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);

indra/newview/llviewerinventory.cpp

 	gAgent.sendReliableMessage();
 }