diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llrender/llfontgl.cpp | 5 | ||||
| -rw-r--r-- | indra/llui/lltextbase.cpp | 1 | ||||
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llfloaterimnearbychat.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsessiontab.h | 1 | ||||
| -rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llimview.cpp | 5 | ||||
| -rwxr-xr-x | indra/newview/llviewermessage.cpp | 113 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 1 | 
10 files changed, 100 insertions, 52 deletions
| diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 647512eb2e..8772779645 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -599,6 +599,11 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch  		if(!fgi)  		{  			fgi = mFontFreetype->getGlyphInfo(wch); + +			if (NULL == fgi) +			{ +				return 0; +			}  		}  		// account for glyphs that run beyond the starting point for the next glyphs diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 0f6947ca19..c4ec1edc73 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2338,7 +2338,6 @@ const LLWString& LLTextBase::getWText() const  S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line) const  {  	// Figure out which line we're nearest to. -	LLRect visible_region = getVisibleDocumentRect();  	LLRect doc_rect = mDocumentView->getRect();  	S32 doc_y = local_y - doc_rect.mBottom; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 2f120479d9..d5e08fa29b 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2515,7 +2515,6 @@ void LLTextEditor::updateSegments()  		mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this);  		clearSegments(); -		segment_set_t::iterator insert_it = mSegments.begin();  		for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it)  		{  			insertSegment(*list_it); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index cfee5001a6..eb1a1f54ed 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -274,7 +274,7 @@ void LLFloaterIMNearbyChat::onTearOffClicked()  	LLFloaterIMSessionTab::onTearOffClicked();  	// see CHUI-170: Save torn-off state of the nearby chat between sessions -	BOOL in_the_multifloater = !isTornOff(); +	BOOL in_the_multifloater = (BOOL)getHost();  	gSavedSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater);  } @@ -297,8 +297,10 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting)  void LLFloaterIMNearbyChat::onClickCloseBtn()  {  	if (!isTornOff()) +	{  		return; -	onTearOffClicked(); +	} +	LLFloaterIMSessionTab::onTearOffClicked();  	LLFloaterIMContainer *im_box = LLFloaterIMContainer::findInstance();  	if (im_box) diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index faeb860712..9fd22b1537 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -61,6 +61,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)    , mRefreshTimer(new LLTimer())    , mIsHostAttached(false)    , mHasVisibleBeenInitialized(false) +  , mIsParticipantListExpanded(true)  {      setAutoFocus(FALSE);  	mSession = LLIMModel::getInstance()->findIMSession(mSessionID); @@ -180,6 +181,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id)  				// LLFloater::mLastHostHandle = floater_container (a "future" host)  				conversp->setHost(floater_container);  				conversp->setHost(NULL); +  				conversp->forceReshape();  			}  			// Added floaters share some state (like sort order) with their host @@ -253,6 +255,7 @@ BOOL LLFloaterIMSessionTab::postBuild()      p.root = NULL;      p.use_ellipses = true;      p.options_menu = "menu_conversation.xml"; +    p.name = "root";  	mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p);      mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar);  	// Attach that root to the scroller @@ -268,6 +271,12 @@ BOOL LLFloaterIMSessionTab::postBuild()  	mRefreshTimer->setTimerExpirySec(0);  	mRefreshTimer->start();  	initBtns(); + +	if (mIsParticipantListExpanded != (bool)gSavedSettings.getBOOL("IMShowControlPanel")) +	{ +		LLFloaterIMSessionTab::onSlide(this); +	} +  	return result;  } @@ -637,7 +646,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar()  	// Participant list should be visible only in torn off floaters.  	bool is_participant_list_visible =  			!is_not_torn_off -			&& gSavedSettings.getBOOL("IMShowControlPanel") +			&& mIsParticipantListExpanded  			&& !mIsP2PChat;  	mParticipantListPanel->setVisible(is_participant_list_visible); @@ -768,9 +777,8 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self)  			// Expand/collapse the IM control panel  			self->mParticipantListPanel->setVisible(expand); - -			gSavedSettings.setBOOL("IMShowControlPanel", expand); - +            gSavedSettings.setBOOL("IMShowControlPanel", expand); +            self->mIsParticipantListExpanded = expand;  			self->mExpandCollapseBtn->setImageOverlay(self->getString(expand ? "collapse_icon" : "expand_icon"));  		}  	} diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index d55b021df7..e8ae557412 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -138,6 +138,7 @@ protected:  	bool mIsNearbyChat;  	bool mIsP2PChat; +	bool mIsParticipantListExpanded;  	LLIMModel::LLIMSession* mSession; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index b308a820b2..a28af2101b 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -443,6 +443,8 @@ BOOL LLFloaterPreference::postBuild()  	std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "");  	setCacheLocation(cache_location); +	getChild<LLUICtrl>("log_path_string")->setEnabled(FALSE); // make it read-only but selectable +  	getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this));  	getChild<LLComboBox>("FriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"FriendIMOptions")); @@ -1572,7 +1574,6 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im  	getChildView("send_im_to_email")->setEnabled(TRUE);  	getChild<LLUICtrl>("send_im_to_email")->setValue(im_via_email);  	getChildView("favorites_on_login_check")->setEnabled(TRUE); -	getChildView("log_path_string")->setEnabled(FALSE);// LineEditor becomes readonly in this case.  	getChildView("log_path_button")->setEnabled(TRUE);  	getChildView("chat_font_size")->setEnabled(TRUE);  } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8f3f5145a9..37f5888e8c 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -285,6 +285,11 @@ void on_new_message(const LLSD& msg)              {  				//Surface conversations floater  				LLFloaterReg::showInstance("im_container"); + +				if (session_floater && session_floater->isMinimized()) +				{ +					LLFloater::onClickMinimize(session_floater); +				}  			}              //If in DND mode, allow notification to be stored so upon DND exit  diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2340436a01..a13c793899 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2382,7 +2382,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  	    LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false);  		break; -	case IM_NOTHING_SPECIAL:  +	case IM_NOTHING_SPECIAL:	// p2p IM  		// Don't show dialog, just do IM  		if (!gAgent.isGodlike()  				&& gAgent.getRegion()->isPrelude()  @@ -2783,47 +2783,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  	}  	break; -	case IM_SESSION_SEND: -	{ -		if (is_do_not_disturb) -		{ -			return; -		} - -		// Only show messages if we have a session open (which -		// should happen after you get an "invitation" -		if ( !gIMMgr->hasSession(session_id) ) -		{ -			return; -		} - -		// standard message, not from system -		std::string saved; -		if(offline == IM_OFFLINE) -		{ -			saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); -		} -		buffer = saved + message; -		BOOL is_this_agent = FALSE; -		if(from_id == gAgentID) -		{ -			is_this_agent = TRUE; -		} -		gIMMgr->addMessage( -			session_id, -			from_id, -			name, -			buffer, -			IM_OFFLINE == offline, -			ll_safe_string((char*)binary_bucket), -			IM_SESSION_INVITE, -			parent_estate_id, -			region_id, -			position, -			true); -	} -	break; -  	case IM_FROM_TASK:  		{  			if (is_do_not_disturb && !is_owned_by_me) @@ -2922,6 +2881,76 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)  			LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, from_group);  		}  		break; + +	case IM_SESSION_SEND:		// ad-hoc or group IMs + +		// Only show messages if we have a session open (which +		// should happen after you get an "invitation" +		if ( !gIMMgr->hasSession(session_id) ) +		{ +			return; +		} + +		else if (offline == IM_ONLINE && is_do_not_disturb) +		{ + +			// return a standard "do not disturb" message, but only do it to online IM  +			// (i.e. not other auto responses and not store-and-forward IM) +			if (!gIMMgr->hasSession(session_id)) +			{ +				// if there is not a panel for this conversation (i.e. it is a new IM conversation +				// initiated by the other party) then... +				send_do_not_disturb_message(msg, from_id, session_id); +			} + +			// now store incoming IM in chat history + +			buffer = message; +	 +			LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; + +			// add to IM panel, but do not bother the user +			gIMMgr->addMessage( +				session_id, +				from_id, +				name, +				buffer, +				IM_OFFLINE == offline, +				ll_safe_string((char*)binary_bucket), +				IM_SESSION_INVITE, +				parent_estate_id, +				region_id, +				position, +				true); +		} +		else +		{ +			// standard message, not from system +			std::string saved; +			if(offline == IM_OFFLINE) +			{ +				saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); +			} + +			buffer = saved + message; + +			LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; + +			gIMMgr->addMessage( +				session_id, +				from_id, +				name, +				buffer, +				IM_OFFLINE == offline, +				ll_safe_string((char*)binary_bucket), +				IM_SESSION_INVITE, +				parent_estate_id, +				region_id, +				position, +				true); +		} +		break; +  	case IM_FROM_TASK_AS_ALERT:  		if (is_do_not_disturb && !is_owned_by_me)  		{ diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 9db3816c92..bd096ebb88 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -429,7 +429,6 @@      </text>      <line_editor -    	enabled="false"          control_name="InstantMessageLogPath"          border_style="line"          border_thickness="1" | 
