diff options
33 files changed, 798 insertions, 458 deletions
| diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 8d57c68cf2..fd711b72b0 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -52,6 +52,7 @@ LLBottomTray::LLBottomTray(const LLSD&)  	mNearbyChatBar(NULL),  	mToolbarStack(NULL)  ,	mMovementButton(NULL) +,	mResizeState(RS_NORESIZE)  // Add more members  {  	mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); @@ -261,22 +262,22 @@ void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask)  void LLBottomTray::showGestureButton(BOOL visible)  { -	showTrayButton(RS_BUTTON_GESTURES, visible); +	setTrayButtonVisibleIfPossible(RS_BUTTON_GESTURES, visible);  }  void LLBottomTray::showMoveButton(BOOL visible)  { -	showTrayButton(RS_BUTTON_MOVEMENT, visible); +	setTrayButtonVisibleIfPossible(RS_BUTTON_MOVEMENT, visible);  }  void LLBottomTray::showCameraButton(BOOL visible)  { -	showTrayButton(RS_BUTTON_CAMERA, visible); +	setTrayButtonVisibleIfPossible(RS_BUTTON_CAMERA, visible);  }  void LLBottomTray::showSnapshotButton(BOOL visible)  { -	showTrayButton(RS_BUTTON_SNAPSHOT, visible); +	setTrayButtonVisibleIfPossible(RS_BUTTON_SNAPSHOT, visible);  }  namespace @@ -367,74 +368,87 @@ void LLBottomTray::verifyChildControlsSizes()  		mNearbyChatBar->setRect(rect);  	}  } -#define __FEATURE_EXT_991 +  void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)  { -	lldebugs << "****************************************" << llendl; +	static S32 debug_calling_number = 0; +	lldebugs << "**************************************** " << ++debug_calling_number << llendl;  	S32 current_width = getRect().getWidth(); +	S32 delta_width = width - current_width;  	lldebugs << "Reshaping: "   		<< ", width: " << width -		<< ", height: " << height -		<< ", called_from_parent: " << called_from_parent  		<< ", cur width: " << current_width -		<< ", cur height: " << getRect().getHeight() +		<< ", delta_width: " << delta_width +		<< ", called_from_parent: " << called_from_parent  		<< llendl;  	if (mNearbyChatBar)			log(mNearbyChatBar, "before");  	if (mChicletPanel)			log(mChicletPanel, "before"); +	// stores width size on which bottom tray is less than width required by its children. EXT-991 +	static S32 extra_shrink_width = 0; +	bool should_be_reshaped = true; +  	if (mChicletPanel && mToolbarStack && mNearbyChatBar)  	{  		mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE);   		verifyChildControlsSizes(); - 		updateResizeState(width, current_width); -	} - -	LLPanel::reshape(width, height, called_from_parent); - - -	if (mNearbyChatBar)			log(mNearbyChatBar, "after"); -	if (mChicletPanel)			log(mChicletPanel, "after"); -} - -void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width) -{ -	mResizeState = RS_NORESIZE; - -	S32 delta_width = new_width - cur_width; -//	if (delta_width == 0) return; -	bool shrink = new_width < cur_width; - -	const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); -	const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); -	const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); -	const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); -	const S32 chatbar_panel_max_width = mNearbyChatBar->getMaxWidth(); - -	lldebugs << "chatbar_panel_width: " << chatbar_panel_width -		<< ", chatbar_panel_min_width: " << chatbar_panel_min_width -		<< ", chatbar_panel_max_width: " << chatbar_panel_max_width -		<< ", chiclet_panel_width: " << chiclet_panel_width -		<< ", chiclet_panel_min_width: " << chiclet_panel_min_width -		<< llendl; +		// bottom tray is narrowed +		if (delta_width < 0) +		{ +			if (extra_shrink_width > 0) +			{ +				// is world rect was extra shrunk and decreasing again only update this value +				// to delta_width negative +				extra_shrink_width -= delta_width; // use "-=" because delta_width is negative +				should_be_reshaped = false; +			} +			else +			{ +				extra_shrink_width = processWidthDecreased(delta_width); -	// bottom tray is narrowed -	if (shrink) -	{ -		processWidthDecreased(delta_width); +				// increase new width to extra_shrink_width value to not reshape less than bottom tray minimum +				width += extra_shrink_width; +			} +		} +		// bottom tray is widen +		else +		{ +			if (extra_shrink_width > delta_width) +			{ +				// Less than minimum width is more than increasing (delta_width)  +				// only reduce it value and make no reshape +				extra_shrink_width -= delta_width; +				should_be_reshaped = false; +			} +			else  +			{ +				if (extra_shrink_width > 0) +				{ +					// If we have some extra shrink width let's reduce delta_width & width +					delta_width -= extra_shrink_width; +					width -= extra_shrink_width; +					extra_shrink_width = 0; +				} +				processWidthIncreased(delta_width); +			} +		}  	} -	// bottom tray is widen -	else + +	lldebugs << "There is no enough width to reshape all children: " << extra_shrink_width << llendl; +	if (should_be_reshaped)  	{ -		processWidthIncreased(delta_width); +		lldebugs << "Reshape all children with width: " << width << llendl; +		LLPanel::reshape(width, height, called_from_parent);  	} -	lldebugs << "New resize state: " << mResizeState << llendl; +	if (mNearbyChatBar)			log(mNearbyChatBar, "after"); +	if (mChicletPanel)			log(mChicletPanel, "after");  } -void LLBottomTray::processWidthDecreased(S32 delta_width) +S32 LLBottomTray::processWidthDecreased(S32 delta_width)  {  	bool still_should_be_processed = true; @@ -445,7 +459,6 @@ void LLBottomTray::processWidthDecreased(S32 delta_width)  	{  		// we have some space to decrease chiclet panel  		S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; -		mResizeState |= RS_CHICLET_PANEL;  		S32 delta_panel = llmin(-delta_width, panel_delta_min); @@ -473,27 +486,25 @@ void LLBottomTray::processWidthDecreased(S32 delta_width)  	{  		// we have some space to decrease chatbar panel  		S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width; -		mResizeState |= RS_CHATBAR_INPUT;  		S32 delta_panel = llmin(-delta_width, panel_delta_min); -		// is chatbar panel width enough to process resizing? +		// whether chatbar panel width is enough to process resizing?  		delta_width += panel_delta_min; -  		still_should_be_processed = delta_width < 0;  		mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight()); +		log(mChicletPanel, "after processing panel decreasing via nearby chatbar panel"); +  		lldebugs << "RS_CHATBAR_INPUT"  			<< ", delta_panel: " << delta_panel  			<< ", delta_width: " << delta_width  			<< llendl; - -		log(mChicletPanel, "after nearby was processed"); -  	} +	S32 extra_shrink_width = 0;  	S32 buttons_freed_width = 0;  	if (still_should_be_processed)  	{ @@ -516,7 +527,9 @@ void LLBottomTray::processWidthDecreased(S32 delta_width)  		if (delta_width < 0)  		{ -			llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl; +			extra_shrink_width = -delta_width; +			lldebugs << "There is no enough room for bottom tray, resizing still should be processed: "  +				<< extra_shrink_width << llendl;  		}  		if (buttons_freed_width > 0) @@ -527,10 +540,14 @@ void LLBottomTray::processWidthDecreased(S32 delta_width)  			lldebugs << buttons_freed_width << llendl;  		}  	} + +	return extra_shrink_width;  }  void LLBottomTray::processWidthIncreased(S32 delta_width)  { +	if (delta_width <= 0) return; +  	const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth();  	const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); @@ -609,7 +626,6 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)  	S32 chatbar_panel_width_ = mNearbyChatBar->getRect().getWidth();  	if (delta_width > 0 && chatbar_panel_width_ < chatbar_panel_max_width)  	{ -		mResizeState |= RS_CHATBAR_INPUT;  		S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_;  		S32 delta_panel = llmin(delta_width, delta_panel_max);  		delta_width -= delta_panel_max; @@ -625,7 +641,7 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa  		lldebugs << "There is no object to process for state: " << shown_object_type << llendl;  		return false;  	} -	bool can_be_shown = canButtonBeShown(panel); +	bool can_be_shown = canButtonBeShown(shown_object_type);  	if (can_be_shown)  	{  		//validate if we have enough room to show this button @@ -636,22 +652,23 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa  			*available_width -= required_width;  			*buttons_required_width += required_width; -			showTrayButton(shown_object_type, true); +			setTrayButtonVisible(shown_object_type, true);  			lldebugs << "processing object type: " << shown_object_type  				<< ", buttons_required_width: " << *buttons_required_width  				<< llendl; +			mResizeState &= ~shown_object_type;  		}  	}  	return can_be_shown;  } -void LLBottomTray::processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width) +void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width)  { -	LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; +	LLPanel* panel = mStateProcessedObjectMap[processed_object_type];  	if (NULL == panel)  	{ -		lldebugs << "There is no object to process for state: " << shown_object_type << llendl; +		lldebugs << "There is no object to process for state: " << processed_object_type << llendl;  		return;  	} @@ -664,20 +681,41 @@ void LLBottomTray::processHideButton(EResizeState shown_object_type, S32* requir  			*buttons_freed_width += *required_width;  		} -		showTrayButton(shown_object_type, false); +		setTrayButtonVisible(processed_object_type, false); + +		mResizeState |= processed_object_type; -		lldebugs << "processing object type: " << shown_object_type +		lldebugs << "processing object type: " << processed_object_type  			<< ", buttons_freed_width: " << *buttons_freed_width  			<< llendl;  	}  } -bool LLBottomTray::canButtonBeShown(LLPanel* panel) const +bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const  { -	bool can_be_shown = !panel->getVisible(); +	bool can_be_shown = mResizeState & processed_object_type;  	if (can_be_shown)  	{ -		// *TODO: mantipov: synchronize with situation when button was hidden via context menu; +		static MASK MOVEMENT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES; +		static MASK CAMERA_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT; +		static MASK SNAPSHOT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT | RS_BUTTON_CAMERA; + +		switch(processed_object_type) +		{ +		case RS_BUTTON_GESTURES: // Gestures should be shown first +			break; +		case RS_BUTTON_MOVEMENT: // Move only if gesture is shown +			can_be_shown = !(MOVEMENT_PREVIOUS_BUTTONS_MASK & mResizeState); +			break; +		case RS_BUTTON_CAMERA: +			can_be_shown = !(CAMERA_PREVIOUS_BUTTONS_MASK & mResizeState); +			break; +		case RS_BUTTON_SNAPSHOT: +			can_be_shown = !(SNAPSHOT_PREVIOUS_BUTTONS_MASK & mResizeState); +			break; +		default: // nothing to do here +			break; +		}  	}  	return can_be_shown;  } @@ -690,7 +728,7 @@ void LLBottomTray::initStateProcessedObjectMap()  	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel));  } -void LLBottomTray::showTrayButton(EResizeState shown_object_type, bool visible) +void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible)  {  	LLPanel* panel = mStateProcessedObjectMap[shown_object_type];  	if (NULL == panel) @@ -701,4 +739,49 @@ void LLBottomTray::showTrayButton(EResizeState shown_object_type, bool visible)  	panel->setVisible(visible);  } + +void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible) +{ +	bool can_be_set = true; + +	if (visible) +	{ +		LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; +		if (NULL == panel) +		{ +			lldebugs << "There is no object to process for state: " << shown_object_type << llendl; +			return; +		} + +		const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); +		const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); + +		const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); +		const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); + +		const S32 available_width = (chatbar_panel_width - chatbar_panel_min_width) +			+ (chiclet_panel_width - chiclet_panel_min_width); + +		const S32 required_width = panel->getRect().getWidth(); +		can_be_set = available_width >= required_width; +	} + +	if (can_be_set) +	{ +		setTrayButtonVisible(shown_object_type, visible); + +		// if we hide the button mark it NOT to show while future bottom tray extending +		if (!visible) +		{ +			mResizeState &= ~shown_object_type; +		} +	} +	else +	{ +		// mark this button to show it while future bottom tray extending +		mResizeState |= shown_object_type; +		LLNotifications::instance().add("BottomTrayButtonCanNotBeShown"); +	} +} +  //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 3847168ae1..974289d5e0 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -103,14 +103,39 @@ private:  	void updateResizeState(S32 new_width, S32 cur_width);  	void verifyChildControlsSizes(); -	void processWidthDecreased(S32 delta_width); +	S32 processWidthDecreased(S32 delta_width);  	void processWidthIncreased(S32 delta_width);  	void log(LLView* panel, const std::string& descr);  	bool processShowButton(EResizeState shown_object_type, S32* available_width, S32* buttons_required_width); -	void processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width); -	bool canButtonBeShown(LLPanel* panel) const; +	void processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width); + +	/** +	 * Determines if specified by type object can be shown. It should be hidden by shrink before. +	 * +	 * Processes buttons a such way to show buttons in constant order: +	 *   - Gestures, Move, View, Snapshot +	 */ +	bool canButtonBeShown(EResizeState processed_object_type) const;  	void initStateProcessedObjectMap(); -	void showTrayButton(EResizeState shown_object_type, bool visible); + +	/** +	 * Sets passed visibility to object specified by resize type. +	 */ +	void setTrayButtonVisible(EResizeState shown_object_type, bool visible); + +	/** +	 * Sets passed visibility to object specified by resize type if it is possible. +	 * +	 * If it is impossible to show required button due to there is no enough room in bottom tray +	 * it will no be shown. Is called via context menu commands. +	 * In this case Alert Dialog will be shown to notify user about that. +	 * +	 * Method also stores resize state to be processed while future bottom tray extending: +	 *  - if hidden while resizing button should be hidden it will not be shown while extending; +	 *  - if hidden via context menu button should be shown but there is no enough room for now +	 *    it will be shown while extending. +	 */ +	void setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible);  	MASK mResizeState; diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 4523267edd..442dc660cd 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -210,8 +210,9 @@ void LLChatBar::refreshGestures()  		// collect list of unique gestures  		std::map <std::string, BOOL> unique; -		LLGestureManager::item_map_t::iterator it; -		for (it = LLGestureManager::instance().mActive.begin(); it != LLGestureManager::instance().mActive.end(); ++it) +		LLGestureManager::item_map_t::const_iterator it; +		const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); +		for (it = active_gestures.begin(); it != active_gestures.end(); ++it)  		{  			LLMultiGesture* gesture = (*it).second;  			if (gesture) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0070e654ee..028bb7a384 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -53,7 +53,7 @@ std::string formatCurrentTime()  	time_t utc_time;  	utc_time = time_corrected();  	std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" -		+LLTrans::getString("TimeMin")+"] "; +		+LLTrans::getString("TimeMin")+"]";  	LLSD substitution; @@ -84,6 +84,10 @@ public:  		if (level == "profile")  		{ +			LLSD params; +			params["object_id"] = getAvatarId(); + +			LLFloaterReg::showInstance("inspect_object", params);  		}  		else if (level == "block")  		{ @@ -344,7 +348,9 @@ LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style  void LLChatHistory::appendWidgetMessage(const LLChat& chat)  {  	LLView* view = NULL; -	std::string view_text = "\n[" + formatCurrentTime() + "] " + chat.mFromName + ": "; +	std::string view_text = "\n[" + formatCurrentTime() + "] "; +	if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM) +		view_text += chat.mFromName + ": ";  	LLInlineViewSegment::Params p; diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index fd86192650..9e290c8c04 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -838,11 +838,15 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){  	LLUUID session_id = data["session_id"].asUUID();  	LLUUID from_id = data["from_id"].asUUID();  	const std::string from = data["from"].asString(); +	S32 unread = data["num_unread"].asInteger(); -	//we do not show balloon (indicator of new messages) for system messages and our own messages -	if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return; +	// if new message came +	if(unread != 0) +	{ +		//we do not show balloon (indicator of new messages) for system messages and our own messages +		if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return; +	} -	S32 unread = data["num_unread"].asInteger();  	LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);  	if (im_floater && im_floater->getVisible())  	{ @@ -862,7 +866,6 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){  	    	llwarns << "Unable to set counter for chiclet " << session_id << llendl;  	    }  	} -  } diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index c114eed4a2..ca0ba96a08 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -89,6 +89,52 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key)  	//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_gesture.xml");  } +void LLFloaterGesture::done() +{ +	//this method can be called twice: for GestureFolder and once after loading all sudir of GestureFolder +	if (gInventory.isCategoryComplete(mGestureFolderID)) +	{ +		LL_DEBUGS("Gesture")<< "mGestureFolderID loaded" << LL_ENDL; +		// we load only gesture folder without childred. +		LLInventoryModel::cat_array_t* categories; +		LLInventoryModel::item_array_t* items; +		folder_ref_t unloaded_folders; +		LL_DEBUGS("Gesture")<< "Get subdirs of Gesture Folder...." << LL_ENDL; +		gInventory.getDirectDescendentsOf(mGestureFolderID, categories, items); +		if (categories->empty()) +		{ +			gInventory.removeObserver(this); +			LL_INFOS("Gesture")<< "Gesture dos NOT contains sub-directories."<< LL_ENDL; +			return; +		} +		LL_DEBUGS("Gesture")<< "There are " << categories->size() << " Folders "<< LL_ENDL; +		for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); it != categories->end(); it++) +		{ +			if (!gInventory.isCategoryComplete(it->get()->getUUID())) +			{ +				unloaded_folders.push_back(it->get()->getUUID()); +				LL_DEBUGS("Gesture")<< it->get()->getName()<< " Folder added to fetchlist"<< LL_ENDL; +			} + +		} +		if (!unloaded_folders.empty()) +		{ +			LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL; +			fetchDescendents(unloaded_folders); +		} +		else +		{ +			LL_DEBUGS("Gesture")<< "All Gesture subdirectories have been loaded."<< LL_ENDL; +			gInventory.removeObserver(this); +			buildGestureList(); +		} +	} +	else +	{ +		LL_WARNS("Gesture")<< "Gesture list was NOT loaded"<< LL_ENDL; +	} +} +  // virtual  LLFloaterGesture::~LLFloaterGesture()  { @@ -121,7 +167,14 @@ BOOL LLFloaterGesture::postBuild()  	childSetVisible("play_btn", true);  	childSetVisible("stop_btn", false);  	setDefaultBtn("play_btn"); -	 +	mGestureFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE, false); + +	folder_ref_t folders; +	folders.push_back(mGestureFolderID); +	//perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details. +	gInventory.addObserver(this); +	fetchDescendents(folders); +  	buildGestureList();  	childSetFocus("gesture_list"); @@ -171,101 +224,125 @@ void LLFloaterGesture::buildGestureList()  	if (! (list && scroll)) return; -	// attempt to preserve scroll position through re-builds -	// since we do re-build any time anything dirties -	S32 current_scroll_pos = scroll->getScrollPos(); -	 +	LLUUID selected_item = list->getCurrentID(); +	LL_DEBUGS("Gesture")<< "Rebuilding gesture list "<< LL_ENDL;  	list->operateOnAll(LLCtrlListInterface::OP_DELETE); -	LLGestureManager::item_map_t::iterator it; -	for (it = LLGestureManager::instance().mActive.begin(); it != LLGestureManager::instance().mActive.end(); ++it) +	LLGestureManager::item_map_t::const_iterator it; +	const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); +	for (it = active_gestures.begin(); it != active_gestures.end(); ++it)  	{ -		const LLUUID& item_id = (*it).first; -		LLMultiGesture* gesture = (*it).second; +		addGesture(it->first,it->second, list); +	} +	if (gInventory.isCategoryComplete(mGestureFolderID)) +	{ +		LLIsType is_gesture(LLAssetType::AT_GESTURE); +		LLInventoryModel::cat_array_t categories; +		LLInventoryModel::item_array_t items; +		gInventory.collectDescendentsIf(mGestureFolderID, categories, items, +				LLInventoryModel::EXCLUDE_TRASH, is_gesture); -		// Note: Can have NULL item if inventory hasn't arrived yet. -		std::string item_name = getString("loading"); -		LLInventoryItem* item = gInventory.getItem(item_id); -		if (item) +		for (LLInventoryModel::item_array_t::iterator it = items.begin(); it!= items.end(); ++it)  		{ -			item_name = item->getName(); +			LLInventoryItem* item = it->get(); +			if (active_gestures.find(item->getUUID()) == active_gestures.end()) +			{ +				// if gesture wasn't loaded yet, we can display only name +				addGesture(item->getUUID(), NULL, list); +			}  		} +	} +	// attempt to preserve scroll position through re-builds +	// since we do re-build any time anything dirties +	if(list->selectByValue(LLSD(selected_item))) +	{ +		scroll->scrollToShowSelected(); +	} +} -		std::string font_style = "NORMAL"; -		// If gesture is playing, bold it +void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gesture,LLCtrlListInterface * list ) +{ +	// Note: Can have NULL item if inventory hasn't arrived yet. +	static std::string item_name = getString("loading"); +	LLInventoryItem* item = gInventory.getItem(item_id); +	if (item) +	{ +		item_name = item->getName(); +	} + +	static std::string font_style = "NORMAL"; +	// If gesture is playing, bold it -		LLSD element; -		element["id"] = item_id; +	LLSD element; +	element["id"] = item_id; -		if (gesture) +	if (gesture) +	{ +		if (gesture->mPlaying)  		{ -			if (gesture->mPlaying) -			{ -				font_style = "BOLD"; -			} +			font_style = "BOLD"; +		} -			element["columns"][0]["column"] = "trigger"; -			element["columns"][0]["value"] = gesture->mTrigger; -			element["columns"][0]["font"]["name"] = "SANSSERIF"; -			element["columns"][0]["font"]["style"] = font_style; +		element["columns"][0]["column"] = "trigger"; +		element["columns"][0]["value"] = gesture->mTrigger; +		element["columns"][0]["font"]["name"] = "SANSSERIF"; +		element["columns"][0]["font"]["style"] = font_style; -			std::string key_string = LLKeyboard::stringFromKey(gesture->mKey); -			std::string buffer; +		std::string key_string = LLKeyboard::stringFromKey(gesture->mKey); +		std::string buffer; -			if (gesture->mKey == KEY_NONE) -			{ -				buffer = "---"; -				key_string = "~~~";		// alphabetize to end -			} -			else -			{ -				buffer = LLKeyboard::stringFromAccelerator( gesture->mMask, gesture->mKey ); -			} +		if (gesture->mKey == KEY_NONE) +		{ +			buffer = "---"; +			key_string = "~~~"; // alphabetize to end +		} +		else +		{ +			buffer = LLKeyboard::stringFromAccelerator(gesture->mMask, +					gesture->mKey); +		} -			element["columns"][1]["column"] = "shortcut"; -			element["columns"][1]["value"] = buffer; -			element["columns"][1]["font"]["name"] = "SANSSERIF"; -			element["columns"][1]["font"]["style"] = font_style; +		element["columns"][1]["column"] = "shortcut"; +		element["columns"][1]["value"] = buffer; +		element["columns"][1]["font"]["name"] = "SANSSERIF"; +		element["columns"][1]["font"]["style"] = font_style; -			// hidden column for sorting -			element["columns"][2]["column"] = "key"; -			element["columns"][2]["value"] = key_string; -			element["columns"][2]["font"]["name"] = "SANSSERIF"; -			element["columns"][2]["font"]["style"] = font_style; +		// hidden column for sorting +		element["columns"][2]["column"] = "key"; +		element["columns"][2]["value"] = key_string; +		element["columns"][2]["font"]["name"] = "SANSSERIF"; +		element["columns"][2]["font"]["style"] = font_style; -			// Only add "playing" if we've got the name, less confusing. JC -			if (item && gesture->mPlaying) -			{ -				item_name += " " + getString("playing"); -			} -			element["columns"][3]["column"] = "name"; -			element["columns"][3]["value"] = item_name; -			element["columns"][3]["font"]["name"] = "SANSSERIF"; -			element["columns"][3]["font"]["style"] = font_style; -		} -		else +		// Only add "playing" if we've got the name, less confusing. JC +		if (item && gesture->mPlaying)  		{ -			element["columns"][0]["column"] = "trigger"; -			element["columns"][0]["value"] = ""; -			element["columns"][0]["font"]["name"] = "SANSSERIF"; -			element["columns"][0]["font"]["style"] = font_style; -			element["columns"][0]["column"] = "trigger"; -			element["columns"][0]["value"] = "---"; -			element["columns"][0]["font"]["name"] = "SANSSERIF"; -			element["columns"][0]["font"]["style"] = font_style; -			element["columns"][2]["column"] = "key"; -			element["columns"][2]["value"] = "~~~"; -			element["columns"][2]["font"]["name"] = "SANSSERIF"; -			element["columns"][2]["font"]["style"] = font_style; -			element["columns"][3]["column"] = "name"; -			element["columns"][3]["value"] = item_name; -			element["columns"][3]["font"]["name"] = "SANSSERIF"; -			element["columns"][3]["font"]["style"] = font_style; +			item_name += " " + getString("playing");  		} -		list->addElement(element, ADD_BOTTOM); +		element["columns"][3]["column"] = "name"; +		element["columns"][3]["value"] = item_name; +		element["columns"][3]["font"]["name"] = "SANSSERIF"; +		element["columns"][3]["font"]["style"] = font_style;  	} -	 -	scroll->setScrollPos(current_scroll_pos); +	else +	{ +		element["columns"][0]["column"] = "trigger"; +		element["columns"][0]["value"] = ""; +		element["columns"][0]["font"]["name"] = "SANSSERIF"; +		element["columns"][0]["font"]["style"] = font_style; +		element["columns"][0]["column"] = "trigger"; +		element["columns"][0]["value"] = "---"; +		element["columns"][0]["font"]["name"] = "SANSSERIF"; +		element["columns"][0]["font"]["style"] = font_style; +		element["columns"][2]["column"] = "key"; +		element["columns"][2]["value"] = "~~~"; +		element["columns"][2]["font"]["name"] = "SANSSERIF"; +		element["columns"][2]["font"]["style"] = font_style; +		element["columns"][3]["column"] = "name"; +		element["columns"][3]["value"] = item_name; +		element["columns"][3]["font"]["name"] = "SANSSERIF"; +		element["columns"][3]["font"]["style"] = font_style; +	} +	list->addElement(element, ADD_BOTTOM);  }  void LLFloaterGesture::onClickInventory() @@ -284,14 +361,21 @@ void LLFloaterGesture::onClickPlay()  	LLCtrlListInterface *list = childGetListInterface("gesture_list");  	if (!list) return;  	const LLUUID& item_id = list->getCurrentID(); +	if(item_id.isNull()) return; -	if (LLGestureManager::instance().isGesturePlaying(item_id)) +	LL_DEBUGS("Gesture")<<" Trying to play gesture id: "<< item_id <<LL_ENDL; +	if(!LLGestureManager::instance().isGestureActive(item_id))  	{ -		LLGestureManager::instance().stopGesture(item_id); +		// we need to inform server about gesture activating to be consistent with LLPreviewGesture. +		BOOL inform_server = TRUE; +		BOOL deactivate_similar = FALSE; +		LLGestureManager::instance().activateGestureWithAsset(item_id, gInventory.getItem(item_id)->getAssetUUID(), inform_server, deactivate_similar); +		LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL; +		LLGestureManager::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id));  	}  	else  	{ -		LLGestureManager::instance().playGesture(item_id); +		playGesture(item_id);  	}  } @@ -345,3 +429,14 @@ void LLFloaterGesture::onCommitList()  		childSetVisible("stop_btn", false);  	}  } +void LLFloaterGesture::playGesture(LLUUID item_id) +{ +	if (LLGestureManager::instance().isGesturePlaying(item_id)) +	{ +		LLGestureManager::instance().stopGesture(item_id); +	} +	else +	{ +		LLGestureManager::instance().playGesture(item_id); +	} +} diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 9c1ab27cb0..9d047bf1cf 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -38,7 +38,7 @@  #define LL_LLFLOATERGESTURE_H  #include "llfloater.h" - +#include "llinventorymodel.h"  #include "lldarray.h"  class LLScrollContainer; @@ -51,31 +51,35 @@ class LLGestureOptions;  class LLScrollListCtrl;  class LLFloaterGestureObserver;  class LLFloaterGestureInventoryObserver; +class LLMultiGesture;  class LLFloaterGesture -:	public LLFloater +:	public LLFloater, LLInventoryFetchDescendentsObserver  { +	LOG_CLASS(LLFloaterGesture);  public:  	LLFloaterGesture(const LLSD& key);  	virtual ~LLFloaterGesture();  	virtual BOOL postBuild(); - +	virtual void done ();  	void refreshAll();  protected:  	// Reads from the gesture manager's list of active gestures  	// and puts them in this list.  	void buildGestureList(); - +	void addGesture(const LLUUID& item_id, LLMultiGesture* gesture, LLCtrlListInterface * list);  	void onClickInventory();  	void onClickEdit();  	void onClickPlay();  	void onClickNew();  	void onCommitList(); +	void playGesture(LLUUID item_id);  protected:  	LLUUID mSelectedID; +	LLUUID mGestureFolderID;  	LLFloaterGestureObserver* mObserver;  }; diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 1ff2566dca..481b75cf73 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -91,44 +91,39 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect  	return LLUUID::null;  } - -// LLViewerInventoryCategory::fetchDescendents has it own period of fetching. -// for now it is FETCH_TIMER_EXPIRY = 10.0f; So made our period a bit more. -const F32 FETCH_FRIENDS_DESCENDENTS_PERIOD = 11.0f; - -  /** - * Intended to call passed callback after the specified period of time. + * Class for fetching initial friend cards data   * - * Implemented to fix an issue when Inventory folders are in incomplete state. See EXT-2061, EXT-1935, EXT-813. - * For now it uses to periodically sync Inventory Friends/All folder with a Agent's Friends List - * until it is complete. - */  -class FriendListUpdater : public LLEventTimer + * Implemented to fix an issue when Inventory folders are in incomplete state. + * See EXT-2320, EXT-2061, EXT-1935, EXT-813. + * Uses a callback to sync Inventory Friends/All folder with agent's Friends List. + */ +class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver  {  public: -	typedef boost::function<bool()> callback_t; +	typedef boost::function<void()> callback_t; -	FriendListUpdater(callback_t cb, F32 period) -		:	LLEventTimer(period) -		,	mCallback(cb) -	{ -		mEventTimer.start(); -	} +	LLInitialFriendCardsFetch(callback_t cb) +		:	mCheckFolderCallback(cb)	{} -	virtual BOOL tick() // from LLEventTimer -	{ -		return mCallback(); -	} +	/* virtual */ void done();  private: -	callback_t		mCallback; +	callback_t		mCheckFolderCallback;  }; +void LLInitialFriendCardsFetch::done() +{ +	// This observer is no longer needed. +	gInventory.removeObserver(this); + +	mCheckFolderCallback(); + +	delete this; +}  // LLFriendCardsManager Constructor / Destructor  LLFriendCardsManager::LLFriendCardsManager() -: mFriendsAllFolderCompleted(true)  {  	LLAvatarTracker::instance().addObserver(this);  } @@ -167,30 +162,6 @@ const LLUUID LLFriendCardsManager::extractAvatarID(const LLUUID& avatarID)  	return rv;  } -// be sure LLInventoryModel::buildParentChildMap() has been called before it. -// and this method must be called before any actions with friend list -void LLFriendCardsManager::ensureFriendFoldersExist() -{ -	const LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); - -	LLUUID friendFolderUUID = findFriendFolderUUIDImpl(); - -	if (friendFolderUUID.isNull()) -	{ -		friendFolderUUID = gInventory.createNewCategory(callingCardsFolderID, -			LLFolderType::FT_CALLINGCARD, get_friend_folder_name()); -	} - -	LLUUID friendAllSubfolderUUID = findFriendAllSubfolderUUIDImpl(); - -	if (friendAllSubfolderUUID.isNull()) -	{ -		friendAllSubfolderUUID = gInventory.createNewCategory(friendFolderUUID, -			LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name()); -	} -} - -  bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* item)  {  	if (item->getType() != LLAssetType::AT_CALLINGCARD) @@ -305,63 +276,12 @@ bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const  	return TRUE == gInventory.isObjectDescendentOf(catID, friendFolderID);  } -bool LLFriendCardsManager::syncFriendsFolder() +void LLFriendCardsManager::syncFriendCardsFolders()  { -	//lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" if they are absent -	LLFriendCardsManager::instance().ensureFriendFoldersExist(); - -	LLAvatarTracker::buddy_map_t all_buddies; -	LLAvatarTracker::instance().copyBuddyList(all_buddies); - -	// 1. Remove Friend Cards for non-friends -	LLInventoryModel::cat_array_t cats; -	LLInventoryModel::item_array_t items; - -	gInventory.collectDescendents(findFriendAllSubfolderUUIDImpl(), cats, items, LLInventoryModel::EXCLUDE_TRASH); -	 -	LLInventoryModel::item_array_t::const_iterator it; -	for (it = items.begin(); it != items.end(); ++it) -	{ -		lldebugs << "Check if buddy is in list: " << (*it)->getName() << " " << (*it)->getCreatorUUID() << llendl; -		if (NULL == get_ptr_in_map(all_buddies, (*it)->getCreatorUUID())) -		{ -			lldebugs << "NONEXISTS, so remove it" << llendl; -			removeFriendCardFromInventory((*it)->getCreatorUUID()); -		} -	} - -	// 2. Add missing Friend Cards for friends -	LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); -	llinfos << "try to build friends, count: " << all_buddies.size() << llendl;  -	mFriendsAllFolderCompleted = true; -	for(; buddy_it != all_buddies.end(); ++buddy_it) -	{ -		const LLUUID& buddy_id = (*buddy_it).first; -		addFriendCardToInventory(buddy_id); -	} - -	if (!mFriendsAllFolderCompleted) -	{ -		forceFriendListIsLoaded(findFriendAllSubfolderUUIDImpl()); - -		static bool timer_started = false; -		if (!timer_started) -		{ -			lldebugs << "Create and start timer to sync Inventory Friends All folder with Friends list" << llendl; - -			// do not worry about destruction of the FriendListUpdater.  -			// It will be deleted by LLEventTimer::updateClass when FriendListUpdater::tick() returns true. -			new FriendListUpdater(boost::bind(&LLFriendCardsManager::syncFriendsFolder, this), -				FETCH_FRIENDS_DESCENDENTS_PERIOD); -		} -		timer_started = true; -	} -	else -	{ -		lldebugs << "Friends/All Inventory folder is synchronized with the Agent's Friends List" << llendl; -	} +	const LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); -	return mFriendsAllFolderCompleted; +	fetchAndCheckFolderDescendents(callingCardsFolderID, +			boost::bind(&LLFriendCardsManager::ensureFriendsFolderExists, this));  }  void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const @@ -482,6 +402,122 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve  	}  } +void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_id,  callback_t cb) +{ +	// This instance will be deleted in LLInitialFriendCardsFetch::done(). +	LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(cb); + +	LLInventoryFetchDescendentsObserver::folder_ref_t folders; +	folders.push_back(folder_id); + +	fetch->fetchDescendents(folders); +	if(fetch->isEverythingComplete()) +	{ +		// everything is already here - call done. +		fetch->done(); +	} +	else +	{ +		// it's all on it's way - add an observer, and the inventory +		// will call done for us when everything is here. +		gInventory.addObserver(fetch); +	} +} + +// Make sure LLInventoryModel::buildParentChildMap() has been called before it. +// This method must be called before any actions with friends list. +void LLFriendCardsManager::ensureFriendsFolderExists() +{ +	const LLUUID calling_cards_folder_ID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); + +	// If "Friends" folder exists in "Calling Cards" we should check if "All" sub-folder +	// exists in "Friends", otherwise we create it. +	LLUUID friends_folder_ID = findFriendFolderUUIDImpl(); +	if (friends_folder_ID.notNull()) +	{ +		fetchAndCheckFolderDescendents(friends_folder_ID, +				boost::bind(&LLFriendCardsManager::ensureFriendsAllFolderExists, this)); +	} +	else +	{ +		if (!gInventory.isCategoryComplete(calling_cards_folder_ID)) +		{ +			LLViewerInventoryCategory* cat = gInventory.getCategory(calling_cards_folder_ID); +			std::string cat_name = cat ? cat->getName() : "unknown"; +			llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl; +		} + +		friends_folder_ID = gInventory.createNewCategory(calling_cards_folder_ID, +			LLFolderType::FT_CALLINGCARD, get_friend_folder_name()); + +		gInventory.createNewCategory(friends_folder_ID, +			LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name()); + +		// Now when we have all needed folders we can sync their contents with buddies list. +		syncFriendsFolder(); +	} +} + +// Make sure LLFriendCardsManager::ensureFriendsFolderExists() has been called before it. +void LLFriendCardsManager::ensureFriendsAllFolderExists() +{ +	LLUUID friends_all_folder_ID = findFriendAllSubfolderUUIDImpl(); +	if (friends_all_folder_ID.notNull()) +	{ +		fetchAndCheckFolderDescendents(friends_all_folder_ID, +				boost::bind(&LLFriendCardsManager::syncFriendsFolder, this)); +	} +	else +	{ +		LLUUID friends_folder_ID = findFriendFolderUUIDImpl(); + +		if (!gInventory.isCategoryComplete(friends_folder_ID)) +		{ +			LLViewerInventoryCategory* cat = gInventory.getCategory(friends_folder_ID); +			std::string cat_name = cat ? cat->getName() : "unknown"; +			llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl; +		} + +		friends_all_folder_ID = gInventory.createNewCategory(friends_folder_ID, +			LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name()); + +		// Now when we have all needed folders we can sync their contents with buddies list. +		syncFriendsFolder(); +	} +} + +void LLFriendCardsManager::syncFriendsFolder() +{ +	LLAvatarTracker::buddy_map_t all_buddies; +	LLAvatarTracker::instance().copyBuddyList(all_buddies); + +	// 1. Remove Friend Cards for non-friends +	LLInventoryModel::cat_array_t cats; +	LLInventoryModel::item_array_t items; + +	gInventory.collectDescendents(findFriendAllSubfolderUUIDImpl(), cats, items, LLInventoryModel::EXCLUDE_TRASH); + +	LLInventoryModel::item_array_t::const_iterator it; +	for (it = items.begin(); it != items.end(); ++it) +	{ +		lldebugs << "Check if buddy is in list: " << (*it)->getName() << " " << (*it)->getCreatorUUID() << llendl; +		if (NULL == get_ptr_in_map(all_buddies, (*it)->getCreatorUUID())) +		{ +			lldebugs << "NONEXISTS, so remove it" << llendl; +			removeFriendCardFromInventory((*it)->getCreatorUUID()); +		} +	} + +	// 2. Add missing Friend Cards for friends +	LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); +	llinfos << "try to build friends, count: " << all_buddies.size() << llendl; +	for(; buddy_it != all_buddies.end(); ++buddy_it) +	{ +		const LLUUID& buddy_id = (*buddy_it).first; +		addFriendCardToInventory(buddy_id); +	} +} +  class CreateFriendCardCallback : public LLInventoryCallback  {  public: @@ -494,9 +530,8 @@ public:  	}  }; -bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) +void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)  { -	LLInventoryModel* invModel = &gInventory;  	bool shouldBeAdded = true;  	std::string name; @@ -518,13 +553,6 @@ bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)  		lldebugs << "is found in sentRequests: " << name << llendl;   	} -	LLUUID friendListFolderID = findFriendAllSubfolderUUIDImpl(); -	if (friendListFolderID.notNull() && shouldBeAdded && !invModel->isCategoryComplete(friendListFolderID)) -	{ -		mFriendsAllFolderCompleted = false; -		shouldBeAdded = false; -		lldebugs << "Friends/All category is not completed" << llendl;  -	}  	if (shouldBeAdded)  	{  		putAvatarData(avatarID); @@ -533,10 +561,8 @@ bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)  		// TODO: mantipov: Is CreateFriendCardCallback really needed? Probably not  		LLPointer<LLInventoryCallback> cb = new CreateFriendCardCallback(); -		create_inventory_callingcard(avatarID, friendListFolderID, cb); +		create_inventory_callingcard(avatarID, findFriendAllSubfolderUUIDImpl(), cb);  	} - -	return shouldBeAdded;  }  void LLFriendCardsManager::removeFriendCardFromInventory(const LLUUID& avatarID) @@ -582,11 +608,4 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask)  	}  } -void LLFriendCardsManager::forceFriendListIsLoaded(const LLUUID& folder_id) const -{ -	bool fetching_inventory = gInventory.fetchDescendentsOf(folder_id); -	lldebugs << "Trying to fetch descendants of Friends/All Inventory folder, fetched: " -		<< fetching_inventory << llendl; -} -  // EOF diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index feea05bc1d..98dc3153d0 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -58,14 +58,6 @@ public:  	}  	/** -	 *	Ensures that all necessary folders are created in Inventory. -	 *  -	 *	For now it processes Calling Card, Calling Card/Friends & Calling Card/Friends/All folders -	 */ -	void ensureFriendFoldersExist(); - - -	/**  	 *	Determines if specified Inventory Calling Card exists in any of lists   	 *	in the Calling Card/Friends/ folder (Default, or Custom)  	 */ @@ -88,11 +80,10 @@ public:  	bool isAnyFriendCategory(const LLUUID& catID) const;  	/** -	 *	Synchronizes content of the Calling Card/Friends/All Global Inventory folder with Agent's Friend List -	 * -	 *	@return true - if folder is already synchronized, false otherwise. +	 *	Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" category +	 *	(creates them otherwise) and fetches their contents to synchronize with Agent's Friends List.  	 */ -	bool syncFriendsFolder(); +	void syncFriendCardsFolders();  	/*!  	 * \brief @@ -108,6 +99,8 @@ public:  	void collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const;  private: +	typedef boost::function<void()> callback_t; +  	LLFriendCardsManager();  	~LLFriendCardsManager(); @@ -133,10 +126,29 @@ private:  	const LLUUID& findFriendCardInventoryUUIDImpl(const LLUUID& avatarID);  	void findMatchedFriendCards(const LLUUID& avatarID, LLInventoryModel::item_array_t& items) const; +	void fetchAndCheckFolderDescendents(const LLUUID& folder_id, callback_t cb); + +	/** +	 *	Checks whether "Calling Cards/Friends" folder exists. If not, creates it with "All" +	 *	sub-folder and synchronizes its contents with buddies list. +	 */ +	void ensureFriendsFolderExists(); + +	/** +	 *	Checks whether "Calling Cards/Friends/All" folder exists. If not, creates it and +	 *	synchronizes its contents with buddies list. +	 */ +	void ensureFriendsAllFolderExists(); + +	/** +	 *	Synchronizes content of the Calling Card/Friends/All Global Inventory folder with Agent's Friend List +	 */ +	void syncFriendsFolder(); +  	/**  	 *	Adds avatar specified by its UUID into the Calling Card/Friends/All Global Inventory folder  	 */ -	bool addFriendCardToInventory(const LLUUID& avatarID); +	void addFriendCardToInventory(const LLUUID& avatarID);  	/**  	 *	Removes an avatar specified by its UUID from the Calling Card/Friends/All Global Inventory folder @@ -146,20 +158,11 @@ private:  	void onFriendListUpdate(U32 changed_mask); -	/** -	 * Force fetching of the Inventory folder specified by passed folder's LLUUID. -	 * -	 * It only sends request to server, server reply should be processed in other place. -	 * Because request can be sent via UDP we need to periodically check if request was completed with success. -	 */ -	void forceFriendListIsLoaded(const LLUUID& folder_id) const; -  private:  	typedef std::set<LLUUID> avatar_uuid_set_t;  	avatar_uuid_set_t mBuddyIDSet; -	bool mFriendsAllFolderCompleted;  };  #endif // LL_LLFRIENDCARD_H diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 59274c8638..8e774dc199 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -37,7 +37,6 @@  // system  #include <functional>  #include <algorithm> -#include <boost/tokenizer.hpp>  // library  #include "lldatapacker.h" @@ -206,6 +205,9 @@ struct LLLoadInfo  // If inform_server is true, will send a message upstream to update  // the user_gesture_active table. +/** + * It will load a gesture from remote storage + */  void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id,  												const LLUUID& asset_id,  												BOOL inform_server, @@ -921,8 +923,8 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,  	delete info;  	info = NULL; - -	LLGestureManager::instance().mLoadingCount--; +	LLGestureManager& self = LLGestureManager::instance(); +	self.mLoadingCount--;  	if (0 == status)  	{ @@ -944,15 +946,15 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,  		{  			if (deactivate_similar)  			{ -				LLGestureManager::instance().deactivateSimilarGestures(gesture, item_id); +				self.deactivateSimilarGestures(gesture, item_id);  				// Display deactivation message if this was the last of the bunch. -				if (LLGestureManager::instance().mLoadingCount == 0 -					&& LLGestureManager::instance().mDeactivateSimilarNames.length() > 0) +				if (self.mLoadingCount == 0 +					&& self.mDeactivateSimilarNames.length() > 0)  				{  					// we're done with this set of deactivations  					LLSD args; -					args["NAMES"] = LLGestureManager::instance().mDeactivateSimilarNames; +					args["NAMES"] = self.mDeactivateSimilarNames;  					LLNotifications::instance().add("DeactivatedGesturesTrigger", args);  				}  			} @@ -965,9 +967,9 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,  			else  			{  				// Watch this item and set gesture name when item exists in inventory -				LLGestureManager::instance().watchItem(item_id); +				self.watchItem(item_id);  			} -			LLGestureManager::instance().mActive[item_id] = gesture; +			self.mActive[item_id] = gesture;  			// Everything has been successful.  Add to the active list.  			gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); @@ -989,14 +991,21 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,  				gAgent.sendReliableMessage();  			} +			callback_map_t::iterator i_cb = self.mCallbackMap.find(item_id); +			 +			if(i_cb != self.mCallbackMap.end()) +			{ +				i_cb->second(gesture); +				self.mCallbackMap.erase(i_cb); +			} -			LLGestureManager::instance().notifyObservers(); +			self.notifyObservers();  		}  		else  		{  			llwarns << "Unable to load gesture" << llendl; -			LLGestureManager::instance().mActive.erase(item_id); +			self.mActive.erase(item_id);  			delete gesture;  			gesture = NULL; diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h index 947773d66d..7c3b742780 100644 --- a/indra/newview/llgesturemgr.h +++ b/indra/newview/llgesturemgr.h @@ -57,6 +57,12 @@ public:  class LLGestureManager : public LLSingleton<LLGestureManager>, public LLInventoryCompletionObserver  {  public: + +	typedef boost::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t; +	// Maps inventory item_id to gesture +	typedef std::map<LLUUID, LLMultiGesture*> item_map_t; +	typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t; +  	LLGestureManager();  	~LLGestureManager(); @@ -97,6 +103,7 @@ public:  	BOOL isGesturePlaying(const LLUUID& item_id); +	const item_map_t& getActiveGestures() const { return mActive; }  	// Force a gesture to be played, for example, if it is being  	// previewed.  	void playGesture(LLMultiGesture* gesture); @@ -106,7 +113,15 @@ public:  	// Also remove from playing list  	void stopGesture(LLMultiGesture* gesture);  	void stopGesture(const LLUUID& item_id); - +	/** +	 * Add cb into callbackMap. +	 * Note: +	 * Manager will call cb after gesture will be loaded and will remove cb automatically.  +	 */ +	void setGestureLoadedCallback(LLUUID inv_item_id, gesture_loaded_callback_t cb) +	{ +		mCallbackMap[inv_item_id] = cb; +	}  	// Trigger the first gesture that matches this key.  	// Returns TRUE if it finds a gesture bound to that key.  	BOOL triggerGesture(KEY key, MASK mask); @@ -144,13 +159,7 @@ protected:  						   LLAssetType::EType type,  						   void* user_data, S32 status, LLExtStat ext_status); -public: -	BOOL mValid; -	std::vector<LLMultiGesture*> mPlaying; - -	// Maps inventory item_id to gesture -	typedef std::map<LLUUID, LLMultiGesture*> item_map_t; - +private:  	// Active gestures.  	// NOTE: The gesture pointer CAN BE NULL.  This means that  	// there is a gesture with that item_id, but the asset data @@ -159,8 +168,11 @@ public:  	S32 mLoadingCount;  	std::string mDeactivateSimilarNames; - +	  	std::vector<LLGestureManagerObserver*> mObservers; +	callback_map_t mCallbackMap; +	std::vector<LLMultiGesture*> mPlaying;	 +	BOOL mValid;  };  #endif diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 0f32d0b313..aa5a5822eb 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -120,11 +120,7 @@ void LLIMFloater::newIMCallback(const LLSD& data){  		LLUUID session_id = data["session_id"].asUUID();  		LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); -		if (floater == NULL) -		{ -			llwarns << "new_im_callback for non-existent session_id " << session_id << llendl; -			return; -		} +		if (floater == NULL) return;          // update if visible, otherwise will be updated when opened  		if (floater->getVisible()) diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index bd6702a0b2..d7eaad94f0 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -134,16 +134,31 @@ void LLJoystick::updateSlop()  	return;  } +BOOL LLJoystick::pointInCircle(S32 x, S32 y) const  +{  +	//cnt is x and y coordinates of center of joystick circle, and also its radius, +	//because area is not just rectangular, it's a square! +	//Make sure to change method if this changes. +	int cnt = this->getLocalRect().mTop/2; +	if((x-cnt)*(x-cnt)+(y-cnt)*(y-cnt)<=cnt*cnt) +		return TRUE; +	return FALSE; +}  BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask)  {  	//llinfos << "joystick mouse down " << x << ", " << y << llendl; +	bool handles = false; -	mLastMouse.set(x, y); -	mFirstMouse.set(x, y); +	if(handles = pointInCircle(x, y)) +	{ +		mLastMouse.set(x, y); +		mFirstMouse.set(x, y); +		mMouseDownTimer.reset(); +		handles = LLButton::handleMouseDown(x, y, mask); +	} -	mMouseDownTimer.reset(); -	return LLButton::handleMouseDown(x, y, mask); +	return handles;  } diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 4c657913b8..0465f78031 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -78,6 +78,8 @@ public:  	static void		onBtnHeldDown(void *userdata);		// called by llbutton callback handler  	void            setInitialQuadrant(EJoystickQuadrant initial) { mInitialQuadrant = initial; }; + +	BOOL			pointInCircle(S32 x, S32 y) const;  	static std::string nameFromQuadrant(const EJoystickQuadrant quadrant);  	static EJoystickQuadrant quadrantFromName(const std::string& name); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 94b8791147..333646d2c5 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -97,9 +97,10 @@ void LLGestureComboBox::refreshGestures()  	clearRows();  	mGestures.clear(); -	LLGestureManager::item_map_t::iterator it; +	LLGestureManager::item_map_t::const_iterator it; +	const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures();  	LLSD::Integer idx(0); -	for (it = LLGestureManager::instance().mActive.begin(); it != LLGestureManager::instance().mActive.end(); ++it) +	for (it = active_gestures.begin(); it != active_gestures.end(); ++it)  	{  		LLMultiGesture* gesture = (*it).second;  		if (gesture) diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index e6665a935e..cd77f59ee1 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -332,7 +332,8 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)  	//only messages from AGENTS  	if(CHAT_SOURCE_OBJECT == chat_msg.mSourceType)  	{ -		return;//dn't show toast for messages from objects +		if(chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) +			return;//ok for now we don't skip messeges from object, so skip only debug messages  	}  	LLUUID id; diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 471dd28426..94e733913d 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -96,11 +96,11 @@ bool LLOfferHandler::processNotification(const LLSD& notify)  		if (!LLIMMgr::instance().hasSession(session_id))  		{  			session_id = LLIMMgr::instance().addSession( -					notification->getSubstitutions()["NAME"], IM_NOTHING_SPECIAL, +					notification->getSubstitutions()["OBJECTFROMNAME"], IM_NOTHING_SPECIAL,  					notification->getPayload()["from_id"]);  		}  		LLIMMgr::instance().addMessage(session_id, LLUUID(), -				notification->getSubstitutions()["NAME"], +				notification->getSubstitutions()["OBJECTFROMNAME"],  				notification->getMessage());  		LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 2bbb2b7153..ca87ebf5a2 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -519,7 +519,6 @@ BOOL LLPanelPeople::postBuild()  	LLPanel* groups_panel = getChild<LLPanel>(GROUP_TAB_NAME);  	groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked,	this));  	groups_panel->childSetAction("plus_btn",	boost::bind(&LLPanelPeople::onGroupPlusButtonClicked,	this)); -	groups_panel->childSetAction("minus_btn",	boost::bind(&LLPanelPeople::onGroupMinusButtonClicked,	this));  	LLPanel* friends_panel = getChild<LLPanel>(FRIENDS_TAB_NAME);  	friends_panel->childSetAction("add_btn",	boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked,	this)); @@ -568,6 +567,7 @@ BOOL LLPanelPeople::postBuild()  	LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;  	registrar.add("People.Group.Plus.Action",  boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked,  this, _2)); +	registrar.add("People.Group.Minus.Action", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked,  this));  	registrar.add("People.Friends.ViewSort.Action",  boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked,  this, _2));  	registrar.add("People.Nearby.ViewSort.Action",  boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemClicked,  this, _2));  	registrar.add("People.Groups.ViewSort.Action",  boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked,  this, _2)); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index ed606d5457..81eb133b07 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -455,7 +455,7 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)  	if(!mOverflowToastPanel)  		return; -	mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::closeOverflowToastPanel, this)); +	mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this));  	LLTextBox* text_box = mOverflowToastPanel->getChild<LLTextBox>("toast_text");  	std::string	text = llformat(mOverflowFormatString.c_str(),mHiddenToastsNum); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 2ed82b7d62..261bdbcfc0 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -359,6 +359,9 @@ void LLSpeakerMgr::updateSpeakerList()  LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)  { +	//In some conditions map causes crash if it is empty(Windows only), adding check (EK) +	if (mSpeakers.size() == 0) +		return NULL;  	speaker_map_t::iterator found_it = mSpeakers.find(speaker_id);  	if (found_it == mSpeakers.end())  	{ diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2c59d62b4b..696b0d9af1 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1691,8 +1691,11 @@ bool idle_startup()  		//all categories loaded. lets create "My Favorites" category  		gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE,true); -		// lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" and fill it with buddies -		LLFriendCardsManager::instance().syncFriendsFolder(); +		// Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" folder, +		// fetches their contents if needed and synchronizes it with buddies list. +		// If the folders are not found they are created. +		LLFriendCardsManager::instance().syncFriendCardsFolders(); +  		// set up callbacks  		llinfos << "Registering Callbacks" << llendl; diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 9370e318cf..1ea5f515b7 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -69,7 +69,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) :	LLToastPanel(p.notif  	mNotification = p.notification;  	// if message comes from the system - there shouldn't be a reply btn -	if(p.from == "Second Life") +	if(p.from == SYSTEM_FROM)  	{  		mAvatar->setVisible(FALSE);  		sys_msg_icon->setVisible(TRUE); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 1890e0bf1d..200ecbc6d6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1366,7 +1366,9 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)  	payload["from_id"] = info->mFromID;  	args["OBJECTFROMNAME"] = info->mFromName; -	args["NAME"] = info->mFromName; +	args["NAME"] = LLSLURL::buildCommand("agent", info->mFromID, "about"); +	std::string verb = "highlight?name=" + msg; +	args["ITEM_SLURL"] = LLSLURL::buildCommand("inventory", info->mObjectID, verb.c_str());  	LLNotification::Params p("ObjectGiveItem");  	p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2)); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 2af451400e..f553184c19 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -107,6 +107,7 @@           image_unselected="Cam_Rotate_Out"           layout="topleft"           left="45" +         mouse_opaque="false"            name="cam_rotate_stick"           quadrant="left"           scale_image="false" diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index b23482655c..a3ac878202 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -84,21 +84,21 @@                   top_delta="0"                   width="18" />                  <button -                 follows="bottom|left" +                 follows="bottom|right"                   font="SansSerifBigBold"                   height="18"                   image_selected="TrashItem_Press"                   image_unselected="TrashItem_Off"                   image_disabled="TrashItem_Disabled"                   layout="topleft" -                 left_pad="230"                   name="del_btn" +                 right="-5"                   tool_tip="Delete this gesture"                   top_delta="0"                   width="18" />              </panel>      <button -     follows="bottom|right" +     follows="left|bottom"       height="23"       label="Edit"       layout="topleft" @@ -107,7 +107,7 @@       top_pad="5"       width="83" />      <button -     follows="bottom|right" +     follows="left|bottom"       height="23"       label="Play"       layout="topleft" @@ -116,7 +116,7 @@       top_delta="0"       width="83" />      <button -     follows="bottom|right" +     follows="left|bottom"       height="23"       label="Stop"       layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml index 6dd44255bf..304492bedb 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml @@ -13,15 +13,11 @@         function="CheckControl"         parameter="GroupListShowIcons" />    </menu_item_check> -  <menu_item_check +  <menu_item_call     label="Leave Selected Group"     layout="topleft"     name="Leave Selected Group"> -      <menu_item_check.on_click -       function="People.Groups.ViewSort.Action" -       parameter="show_icons" /> -      <menu_item_check.on_check -       function="CheckControl" -       parameter="GroupListShowIcons" /> -  </menu_item_check> +      <menu_item_call.on_click +       function="People.Group.Minus.Action"/> +  </menu_item_call>  </menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index df263ddf3d..9fe03859bb 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4957,8 +4957,9 @@ No valid parcel could be found.    <notification     icon="notify.tga"     name="ObjectGiveItem" -   type="notify"> -An object named [OBJECTFROMNAME] owned by [FIRST] [LAST] has given you a [OBJECTTYPE] named [OBJECTNAME]. +   type="offer"> +An object named [OBJECTFROMNAME] owned by [NAME] has offered you [OBJECTTYPE]: +[ITEM_SLURL]      <form name="form">        <button         index="0" @@ -5000,7 +5001,8 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you a     icon="notify.tga"     name="UserGiveItem"     type="offer"> -[NAME] has given you a [OBJECTTYPE] named '[OBJECTNAME]'. +[NAME] has offered you [OBJECTTYPE]: +[ITEM_SLURL]      <form name="form">        <button         index="0" @@ -5739,6 +5741,15 @@ Are you sure you want to delete your teleport history?       yestext="OK"/>    </notification> +  <notification +   icon="alert.tga" +   name="BottomTrayButtonCanNotBeShown" +   type="alert"> +Selected button can not be shown right now. +The button will be shown when there is enough space for it.
 +  </notification> + +    <global name="UnsupportedCPU">  - Your CPU speed does not meet the minimum requirements.    </global> diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml index 5562ec8406..38294c907a 100644 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml @@ -7,7 +7,9 @@  	left="0"  	height="35"  	width="318" -	background_visible="false"> +  background_opaque="false"
 +  background_visible="true"
 +  bg_alpha_color="0.0 0.0 0.0 0.0" >    <chiclet_im_p2p  		name="p2p_chiclet"  		layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 3c16a439d9..a902f50582 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -333,6 +333,6 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.           min_width="4"            right="-1"           top="0" -         width="26"/> +         width="4"/>      </layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml index ef3120174e..984a799b41 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notify.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml @@ -1,77 +1,117 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel background_visible="true" bevel_style="in" bg_alpha_color="0 0 0 0" -	height="155" label="instant_message" layout="topleft" left="0" -	name="panel_group_notify" top="0" width="350"> -    <string -     name="message_max_lines_count"> -        4 -    </string> -	<panel follows="top" background_visible="true" bevel_style="in" bg_alpha_color="black" -		height="30" label="header" layout="topleft" left="0" name="header" -		top="0" width="350"> -		<icon follows="left|top|right|bottom" height="20"  width="20" layout="topleft" -			top="5"  left="5" mouse_opaque="true" name="group_icon"/> -		<text type="string" length="1" follows="left|top|right|bottom" -			font="SansSerifBigBold" height="20" layout="topleft" left_pad="10" name="title" -			text_color="GroupNotifyTextColor" top="5" width="275" use_ellipses="true"> -			Sender Name / Group Name -        </text> -	</panel> -	<text -     follows="top" -     height="20" -     layout="topleft" -     left="25" -     name="subject" -     text_color="GroupNotifyTextColor" -     font="SansSerifBig" -     top="40" -     use_ellipses="true" -     value="subject" -     width="300" -     word_wrap="true"> -     subject  -    </text> -    <text -     follows="top" -     height="20" -     layout="topleft" -     left="25" -     name="datetime" -     text_color="GroupNotifyTextColor" -     font="SansSerif" -     top="80" -     use_ellipses="true" -     value="datetime" -     width="300" -     word_wrap="true"> -     datetime -    </text> -    <text -     follows="left|top|bottom|right" -     height="0" -     layout="topleft" -     left="25" -     name="message" -     text_color="GroupNotifyTextColor" -     top="100" -     use_ellipses="true" -     value="message" -     width="300" -     word_wrap="true" -     visible="true" > -    </text> -    <icon -	  follows="left|bottom|right" height="15" width="15" -		layout="topleft" bottom="122" left="25" mouse_opaque="true" name="attachment_icon" visible="true" -	/> -	<text font="SansSerif" font.style="UNDERLINE" font_shadow="none" -		type="string" length="1" follows="left|bottom|right" layout="topleft" -		left="45" bottom="122" height="15" width="280" name="attachment" -		text_color="GroupNotifyTextColor" visible="true"> -		Attachment -     </text> - -	<button label="OK" layout="topleft" bottom="145" left="140" height="20" -		width="70" name="btn_ok" follows="bottom" /> -</panel>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 +<panel
 + background_visible="true"
 + bevel_style="in"
 + bg_alpha_color="0 0 0 0"
 + height="135"
 + label="instant_message"
 + layout="topleft"
 + left="0"
 + name="panel_group_notify"
 + top="0"
 + width="305">
 +    <string
 +     name="message_max_lines_count"
 +     value="4" />
 +    <panel
 +     background_visible="true"
 +     bevel_style="in"
 +     bg_alpha_color="black"
 +     follows="top"
 +     height="30"
 +     label="header"
 +     layout="topleft"
 +     left="0"
 +     name="header"
 +     top="0"
 +     width="305">
 +        <icon
 +         follows="left|top|right|bottom"
 +         height="20"
 +         layout="topleft"
 +         left="5"
 +         mouse_opaque="true"
 +         name="group_icon"
 +         top="5"
 +         width="20" />
 +        <text
 +         follows="left|top|right|bottom"
 +         font="SansSerifBigBold"
 +         height="20"
 +         layout="topleft"
 +         left_pad="10"
 +         name="title"
 +         text_color="GroupNotifyTextColor"
 +         top="5"
 +         use_ellipses="true"
 +         value="Sender Name / Group Name"
 +         width="230" />
 +    </panel>
 +    <text
 +     follows="top"
 +     font="SansSerifBig"
 +     height="20"
 +     layout="topleft"
 +     left="25"
 +     name="subject"
 +     text_color="GroupNotifyTextColor"
 +     top="40"
 +     use_ellipses="true"
 +     value="subject"
 +     width="270"
 +     wrap="true" />
 +    <text
 +     follows="top"
 +     font="SansSerif"
 +     height="20"
 +     layout="topleft"
 +     left="25"
 +     name="datetime"
 +     text_color="GroupNotifyTextColor"
 +     top="80"
 +     use_ellipses="true"
 +     value="datetime"
 +     width="270"
 +     wrap="true" />
 +    <text
 +     follows="left|top|bottom|right"
 +     height="0"
 +     layout="topleft"
 +     left="25"
 +     name="message"
 +     text_color="GroupNotifyTextColor"
 +     top="100"
 +     use_ellipses="true"
 +     value="message"
 +     width="270"
 +     wrap="true" />
 +    <icon
 +     bottom="122"
 +     follows="left|bottom|right"
 +     height="15"
 +     layout="topleft"
 +     left="25"
 +     mouse_opaque="true"
 +     name="attachment_icon"
 +     width="15" />
 +    <text
 +     bottom="122"
 +     follows="left|bottom|right"
 +     font="SansSerif"
 +     height="15"
 +     layout="topleft"
 +     left="45"
 +     name="attachment"
 +     text_color="GroupNotifyTextColor"
 +     value="Attachment"
 +     width="280" />
 +    <button
 +     bottom="130"
 +     follows="bottom"
 +     height="20"
 +     label="OK"
 +     layout="topleft"
 +     left="25"
 +     name="btn_ok"
 +     width="70" />
 +</panel>
 diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index a77094e942..ecf35523cd 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -23,7 +23,7 @@       layout="topleft"       left_delta="7"       left="0" -     max_length="254" +     max_length="512"       name="chat_box"       tool_tip="Press Enter to say, Ctrl+Enter to shout"       top="0" diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml index 34a185fb44..462188ee24 100644 --- a/indra/newview/skins/default/xui/en/panel_notification.xml +++ b/indra/newview/skins/default/xui/en/panel_notification.xml @@ -10,7 +10,7 @@    left="0"    name="notification_panel"    top="0" -  	height="10" +  	height="140"    width="305">    <!-- THIS PANEL CONTROLS TOAST HEIGHT? -->    <panel @@ -20,18 +20,18 @@    bg_alpha_color="0.3 0.3 0.3 0"    bg_opaque_color="0.3 0.3 0.3 0"      follows="left|right|top" -    height="10" +    height="100"      label="info_panel"      layout="topleft"      left="0"      name="info_panel"      top="0"      width="305"> -  <!--  <text +    <text        border_visible="false"        follows="left|right|top|bottom"        font="SansSerif" -      height="90" +      height="85"        layout="topleft"        left="10"        name="text_box" @@ -39,21 +39,21 @@        text_color="white"        top="10"        visible="false"  -      width="300" +      width="285"        wrap="true"/>      <text        border_visible="false"        follows="left|right|top|bottom"        font="SansSerifBold" -      height="90" +      height="85"        layout="topleft" -      left="45" +      left="10"        name="caution_text_box"        text_color="1 0.82 0.46 1" -      top="5" +      top="10"        visible="false" -      width="300" -      wrap="true"/>  --> +      width="285" +      wrap="true"/>      <text_editor      	h_pad="0"  	v_pad="0" @@ -63,6 +63,7 @@        enabled="false"        follows="left|right|top|bottom"        font="SansSerif" +      height="85"         layout="topleft"        left="10"        mouse_opaque="false" @@ -74,17 +75,20 @@        top="10"        visible="false"        width="285" -      wrap="true"/> +      wrap="true" +      parse_highlights="true" +      allow_html="true"/>    </panel>    <panel      background_visible="false"      follows="left|right|bottom" +    height="40"       label="control_panel"      layout="topleft"      left="0"      left_delta="-38"      name="control_panel" -    top="20"> +    top_pad="0">    </panel>    <!--    <icon diff --git a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml index 7722583ce2..63e60aab78 100644 --- a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml +++ b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml @@ -9,7 +9,10 @@    width="300"    height="35"    layout="topleft" -  follows="left|right"> +  follows="left|right" +  background_opaque="false"
 +  background_visible="true"
 +  bg_alpha_color="0.0 0.0 0.0 0.0" >    <text      top="2"      left="10" | 
