Skip to content

Commit

Permalink
Instead of "?object_not_owner" display " (Owner)" appended on Object …
Browse files Browse the repository at this point in the history
…IM Info Floater

Translators may want to update floater_object_im_info.xml, string "owner" was added.
  • Loading branch information
LiruMouse committed Feb 13, 2015
1 parent a2058bc commit e9a5179
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions indra/newview/llfloaterobjectiminfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ BOOL LLFloaterObjectIMInfo::postBuild()
{
getChild<LLUICtrl>("Mute")->setCommitCallback(boost::bind(&LLFloaterObjectIMInfo::onClickMute, this));
getChild<LLTextBox>("OwnerName")->setClickedCallback(boost::bind(boost::ref(mGroupOwned) ? boost::bind(LLGroupActions::show, boost::ref(mOwnerID)) : boost::bind(show_avatar_profile, boost::ref(mOwnerID))));
getChild<LLTextBox>("Slurl")->setClickedCallback(boost::bind(LLUrlAction::showLocationOnMap, "secondlife://" + static_cast<std::string>(boost::ref(mSLurl))));
getChild<LLTextBox>("Slurl")->setClickedCallback(boost::bind(LLUrlAction::executeSLURL, boost::bind(std::plus<std::string>(), "secondlife:///app/worldmap/", boost::ref(mSLurl))));

return true;
}
Expand All @@ -104,7 +104,11 @@ void LLFloaterObjectIMInfo::update(const LLSD& data)
childSetVisible("Slurl",have_slurl);

childSetText("ObjectName",mName);
childSetText("Slurl",mSLurl);
std::string slurl(mSLurl);
std::string::size_type i = slurl.rfind("?owner_not_object");
if (i != std::string::npos)
slurl.erase(i) += getString("owner");
childSetText("Slurl", slurl);
childSetText("OwnerName", LLStringUtil::null);
getChildView("ObjectID")->setValue(data["object_id"].asUUID());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
border_thickness="0" bottom_delta="-10" enabled="true" follows="left|top"
font="SansSerif" height="20" is_unicode="false" left="70" hover="true"
max_length="254" mouse_opaque="true" name="Slurl" font-style="UNDERLINE"
width="200" hover_cursor="UI_CURSOR_HAND" text_color="TextLinkColor" hover_color="TextLinkHoverColor"/>
hover_cursor="UI_CURSOR_HAND" text_color="TextLinkColor" hover_color="TextLinkHoverColor"/>

<!-- A new viewer talking to an old sim will not have a slurl available and will show this. -->
<text bevel_style="none" border_style="line" border_visible="false"
Expand Down Expand Up @@ -55,4 +55,5 @@
<button bottom_delta="-28" font="SansSerif" halign="center" height="20" label="Mute Owner"
label_selected="Mute Owner" left="70" mouse_opaque="true" name="Mute"
width="160" />
<string name="owner" value=" (Owner)"/>
</floater>

0 comments on commit e9a5179

Please sign in to comment.