diff options
| -rw-r--r-- | indra/llrender/llfontgl.cpp | 5 | ||||
| -rw-r--r-- | indra/llui/lltextbase.cpp | 1 | ||||
| -rw-r--r-- | indra/llui/llurlaction.cpp | 31 | ||||
| -rw-r--r-- | indra/llui/llurlaction.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llavataractions.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llchathistory.cpp | 13 | ||||
| -rwxr-xr-x | indra/newview/llconversationview.cpp | 36 | ||||
| -rwxr-xr-x | indra/newview/llconversationview.h | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_object_icon.xml | 18 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_url_agent.xml | 17 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_url_objectim.xml | 2 | 
11 files changed, 105 insertions, 24 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 af29f3b56f..c4ec1edc73 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1919,6 +1919,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)  	registrar.add("Url.Teleport", boost::bind(&LLUrlAction::teleportToLocation, url));  	registrar.add("Url.ShowProfile", boost::bind(&LLUrlAction::showProfile, url));  	registrar.add("Url.SendIM", boost::bind(&LLUrlAction::sendIM, url)); +	registrar.add("Url.AddFriend", boost::bind(&LLUrlAction::addFriend, url));  	registrar.add("Url.ShowOnMap", boost::bind(&LLUrlAction::showLocationOnMap, url));  	registrar.add("Url.CopyLabel", boost::bind(&LLUrlAction::copyLabelToClipboard, url));  	registrar.add("Url.CopyUrl", boost::bind(&LLUrlAction::copyURLToClipboard, url)); diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index fd872eca4b..f51aeaec13 100644 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -24,7 +24,6 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  #include "linden_common.h"  #include "llurlaction.h" @@ -32,6 +31,7 @@  #include "llwindow.h"  #include "llurlregistry.h" +  // global state for the callback functions  LLUrlAction::url_callback_t 		LLUrlAction::sOpenURLCallback;  LLUrlAction::url_callback_t 		LLUrlAction::sOpenURLInternalCallback; @@ -158,16 +158,33 @@ void LLUrlAction::showProfile(std::string url)  	}  } -void LLUrlAction::sendIM(std::string url) +std::string LLUrlAction::getUserID(std::string url)  {  	LLURI uri(url);  	LLSD path_array = uri.pathArray(); +	std::string id_str;  	if (path_array.size() == 4)  	{ -		std::string id_str = path_array.get(2).asString(); -		if (LLUUID::validate(id_str)) -		{ -			executeSLURL("secondlife:///app/agent/" + id_str + "/im"); -		} +		id_str = path_array.get(2).asString();  	} +	return id_str;  } + +void LLUrlAction::sendIM(std::string url) +{ +	std::string id_str = getUserID(url); +	if (LLUUID::validate(id_str)) +	{ +		executeSLURL("secondlife:///app/agent/" + id_str + "/im"); +	} +} + +void LLUrlAction::addFriend(std::string url) +{ +	std::string id_str = getUserID(url); +	if (LLUUID::validate(id_str)) +	{ +		executeSLURL("secondlife:///app/agent/" + id_str + "/requestfriend"); +	} +} + diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index f5f2ceba72..e31cd71a20 100644 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -76,7 +76,9 @@ public:  	/// if the Url specifies an SL command in the form like 'app/{cmd}/{id}/*', show its profile  	static void showProfile(std::string url); +	static std::string getUserID(std::string url);  	static void sendIM(std::string url); +	static void addFriend(std::string url);  	/// specify the callbacks to enable this class's functionality  	typedef boost::function<void (const std::string&)> url_callback_t; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index ce063a9887..b513a52ff7 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -193,7 +193,7 @@ static void on_avatar_name_cache_start_im(const LLUUID& agent_id,  // static  void LLAvatarActions::startIM(const LLUUID& id)  { -	if (id.isNull()) +	if (id.isNull() || gAgent.getID() == id)  		return;  	LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2)); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0152571e20..53926c1fef 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -58,7 +58,7 @@  #include "llworld.h"  #include "lluiconstants.h"  #include "llstring.h" - +#include "llurlaction.h"  #include "llviewercontrol.h"  static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history"); @@ -156,6 +156,17 @@ public:  			LLFloaterSidePanelContainer::showPanel("people", "panel_people",  				LLSD().with("people_panel_tab_name", "blocked_panel").with("blocked_to_select", getAvatarId()));  		} +		else if (level == "map") +		{ +			std::string url = "secondlife://" + mObjectData["slurl"].asString(); +			LLUrlAction::showLocationOnMap(url); +		} +		else if (level == "teleport") +		{ +			std::string url = "secondlife://" + mObjectData["slurl"].asString(); +			LLUrlAction::teleportToLocation(url); +		} +  	}  	void onAvatarIconContextMenuItemClicked(const LLSD& userdata) diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 837389aed5..956abcd586 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -257,20 +257,38 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )      //This node (conversation) was selected and a child (participant) was not      if(result && getRoot())      { -    	if(getRoot()->getCurSelectedItem() == this) -    	{ -    		LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); -    		LLUUID session_id = item? item->getUUID() : LLUUID(); +		selectConversationItem(); +    } -    		LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); -    		im_container->flashConversationItemWidget(session_id,false); -    		im_container->selectConversationPair(session_id, false); -    		im_container->collapseMessagesPane(false); -    	} +	return result; +} + +BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ +    BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask); + +    if(result) +    { +		selectConversationItem();      } +  	return result;  } +void LLConversationViewSession::selectConversationItem() +{ +	if(getRoot()->getCurSelectedItem() == this) +	{ +		LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); +		LLUUID session_id = item? item->getUUID() : LLUUID(); + +		LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); +		im_container->flashConversationItemWidget(session_id,false); +		im_container->selectConversationPair(session_id, false); +		im_container->collapseMessagesPane(false); +	} +} +  // virtual  S32 LLConversationViewSession::arrange(S32* width, S32* height)  { diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 76d3d079ea..3eb2e63792 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -68,6 +68,7 @@ public:  	/*virtual*/ BOOL postBuild();  	/*virtual*/ void draw();  	/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); +	/*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );  	/*virtual*/ S32 arrange(S32* width, S32* height); @@ -90,6 +91,7 @@ private:  	void onCurrentVoiceSessionChanged(const LLUUID& session_id);  	void startFlashing(); +	void selectConversationItem();  	LLPanel*				mItemPanel;  	LLPanel*				mCallIconLayoutPanel; diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index 0c8a2af002..2d4f1792c2 100644 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -24,4 +24,22 @@           function="ObjectIcon.Action"           parameter="block" />      </menu_item_call> +    <menu_item_separator +     layout="topleft" /> +    <menu_item_call +     label="Show on Map" +     layout="topleft" +     name="show_on_map"> +        <menu_item_call.on_click +         function="ObjectIcon.Action"  +         parameter="map" /> +    </menu_item_call> +    <menu_item_call +     label="Teleport to Object Location" +     layout="topleft" +     name="teleport_to_object"> +        <menu_item_call.on_click +         function="ObjectIcon.Action" +         parameter="teleport" /> +    </menu_item_call>  </menu> diff --git a/indra/newview/skins/default/xui/en/menu_url_agent.xml b/indra/newview/skins/default/xui/en/menu_url_agent.xml index 88ae441bd3..7cd56f257a 100644 --- a/indra/newview/skins/default/xui/en/menu_url_agent.xml +++ b/indra/newview/skins/default/xui/en/menu_url_agent.xml @@ -1,20 +1,27 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <context_menu   layout="topleft" - name="Url Popup"> + name="Url Popup">        <menu_item_call -     label="Send IM" +     label="View Profile"       layout="topleft"       name="show_agent">          <menu_item_call.on_click +         function="Url.ShowProfile" />          +    </menu_item_call> +    <menu_item_call +     label="Send IM..." +     layout="topleft" +     name="send_im"> +        <menu_item_call.on_click           function="Url.SendIM" />              </menu_item_call>      <menu_item_call -     label="Show Resident Profile" +     label="Add Friend..."       layout="topleft" -     name="show_agent"> +     name="add_friend">          <menu_item_call.on_click -         function="Url.ShowProfile" /> +         function="Url.AddFriend" />              </menu_item_call>      <menu_item_separator       layout="topleft" /> diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml index 35c2269b0d..87ab58e622 100644 --- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml @@ -3,7 +3,7 @@   layout="topleft"   name="Url Popup">      <menu_item_call -     label="Show Object Information" +     label="Object Profile..."       layout="topleft"       name="show_object">          <menu_item_call.on_click | 
