FIRE-210: Add an option to display the full name in the contact list as "Username (Display name)"
parent
4833c6bbbd
commit
812791be27
|
|
@ -22644,6 +22644,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSFriendListFullNameFormat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Defines the order of how the full name in the contacts list is shown (0 = username (display name), 1 = display name (username))</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ BOOL FSFloaterContacts::postBuild()
|
|||
|
||||
mRlvBehaviorCallbackConnection = gRlvHandler.setBehaviourCallback(boost::bind(&FSFloaterContacts::updateRlvRestrictions, this, _1));
|
||||
|
||||
gSavedSettings.getControl("FSFriendListFullNameFormat")->getSignal()->connect(boost::bind(&FSFloaterContacts::onFullNameFormatChanged, this));
|
||||
gSavedSettings.getControl("FSFriendListSortOrder")->getSignal()->connect(boost::bind(&FSFloaterContacts::sortFriendList, this));
|
||||
gSavedSettings.getControl("FSFriendListColumnShowUserName")->getSignal()->connect(boost::bind(&FSFloaterContacts::onColumnDisplayModeChanged, this, "FSFriendListColumnShowUserName"));
|
||||
gSavedSettings.getControl("FSFriendListColumnShowDisplayName")->getSignal()->connect(boost::bind(&FSFloaterContacts::onColumnDisplayModeChanged, this, "FSFriendListColumnShowDisplayName"));
|
||||
|
|
@ -609,10 +610,10 @@ void FSFloaterContacts::addFriend(const LLUUID& agent_id)
|
|||
display_name_column["value"] = av_name.getDisplayName();
|
||||
display_name_column["font"]["name"] = mFriendListFontName;
|
||||
display_name_column["font"]["style"]= "NORMAL";
|
||||
|
||||
|
||||
LLSD& friend_column = element["columns"][LIST_FRIEND_NAME];
|
||||
friend_column["column"] = "full_name";
|
||||
friend_column["value"] = av_name.getCompleteName();
|
||||
friend_column["value"] = getFullName(av_name);
|
||||
friend_column["font"]["name"] = mFriendListFontName;
|
||||
friend_column["font"]["style"] = "NORMAL";
|
||||
|
||||
|
|
@ -711,7 +712,7 @@ void FSFloaterContacts::updateFriendItem(const LLUUID& agent_id, const LLRelatio
|
|||
|
||||
itemp->getColumn(LIST_FRIEND_USER_NAME)->setValue( av_name.getUserNameForDisplay() );
|
||||
itemp->getColumn(LIST_FRIEND_DISPLAY_NAME)->setValue( av_name.getDisplayName() );
|
||||
itemp->getColumn(LIST_FRIEND_NAME)->setValue( av_name.getCompleteName() );
|
||||
itemp->getColumn(LIST_FRIEND_NAME)->setValue( getFullName(av_name) );
|
||||
|
||||
// render name of online friends in bold text
|
||||
LLFontGL::StyleFlags font_style = ((isOnline || isOnlineSIP) ? LLFontGL::BOLD : LLFontGL::NORMAL);
|
||||
|
|
@ -1154,4 +1155,35 @@ void FSFloaterContacts::onColumnDisplayModeChanged(const std::string& settings_n
|
|||
mFriendsList->setSearchColumn(mFriendsList->getColumn("full_name")->mIndex);
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onFullNameFormatChanged()
|
||||
{
|
||||
std::vector<LLScrollListItem*> items = mFriendsList->getAllData();
|
||||
for (std::vector<LLScrollListItem*>::iterator it = items.begin(); it != items.end(); ++it)
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get((*it)->getUUID(), &av_name))
|
||||
{
|
||||
(*it)->getColumn(LIST_FRIEND_NAME)->setValue(getFullName(av_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string FSFloaterContacts::getFullName(const LLAvatarName& av_name)
|
||||
{
|
||||
if (av_name.isDisplayNameDefault())
|
||||
{
|
||||
return av_name.getDisplayName();
|
||||
}
|
||||
|
||||
if (gSavedSettings.getS32("FSFriendListFullNameFormat"))
|
||||
{
|
||||
// Display name (Username)
|
||||
return llformat("%s (%s)", av_name.getDisplayName().c_str(), av_name.getUserNameForDisplay().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Username (Display name)
|
||||
return llformat("%s (%s)", av_name.getUserNameForDisplay().c_str(), av_name.getDisplayName().c_str());
|
||||
}
|
||||
}
|
||||
// EOF
|
||||
|
|
|
|||
|
|
@ -117,7 +117,8 @@ private:
|
|||
// misc callbacks
|
||||
static void onAvatarPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
|
||||
void onColumnDisplayModeChanged(const std::string& settings_name = "");
|
||||
|
||||
void onFullNameFormatChanged();
|
||||
|
||||
// friend buttons
|
||||
void onViewProfileButtonClicked();
|
||||
void onImButtonClicked();
|
||||
|
|
@ -154,6 +155,8 @@ private:
|
|||
|
||||
void updateRlvRestrictions(ERlvBehaviour behavior);
|
||||
boost::signals2::connection mRlvBehaviorCallbackConnection;
|
||||
|
||||
std::string getFullName(const LLAvatarName& av_name);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,19 +16,30 @@
|
|||
<check_box label="Deaktiviere Fortschrittsanzeige während des Logouts" name="logout_screen_toggle" tool_tip="Deaktiviert die schwarze Fortschrittsanzeige während des Logouts."/>
|
||||
<check_box label="Deaktiviere automatisches Öffnen der Blockierliste" name="FSDisableBlockListAutoOpen" tool_tip="Deaktiviert das automatische Öffnen der Blockierliste, wenn Avatare oder Objekte geblockt werden."/>
|
||||
<check_box label="Objekte immer mit der Landgruppe rezzen, falls möglich" name="grouplandrez" tool_tip="Versucht Objekte mit der Landgruppe zu rezzen, sofern du ein Mitglied der Gruppe bist, unabhängig davon, welche Gruppe gerade aktiv ist."/>
|
||||
<text name="textFriendlistColumns">
|
||||
Sichtbare Namensspalten in Kontaktliste:
|
||||
<text name="textFriendlistOptions">
|
||||
Einstellungen für Kontaktliste:
|
||||
</text>
|
||||
<text name="textFriendlistColumns" width="145">
|
||||
Sichtbare Namensspalten:
|
||||
</text>
|
||||
<check_box label="Benutzername" name="FSFriendListColumnShowUserName" tool_tip="Die Kontaktliste zeigt eine Spalte mit dem Benutzernamen des Freundes an." width="95"/>
|
||||
<check_box label="Anzeigename" name="FSFriendListColumnShowDisplayName" tool_tip="Die Kontaktliste zeigt eine Spalte mit dem Anzeigenamen des Freundes an."/>
|
||||
<check_box label="Vollständiger Name" name="FSFriendListColumnShowFullName" tool_tip="Die Kontaktliste zeigt eine Spalte mit dem vollständigen Namen des Freundes an."/>
|
||||
<text name="textFriendListSortOrder" width="150">
|
||||
Kontaktliste sortieren nach:
|
||||
<text name="textFriendListSortOrder" width="85">
|
||||
Sortieren nach:
|
||||
</text>
|
||||
<radio_group name="FSFriendListSortOrder">
|
||||
<radio_item label="Benutzername" name="username" width="95"/>
|
||||
<radio_item label="Anzeigename" name="displayname" width="95"/>
|
||||
</radio_group>
|
||||
<text name="textFriendListFullNameFormat" width="155">
|
||||
Format vollständiger Name:
|
||||
</text>
|
||||
<radio_group name="FSFriendListFullNameFormat">
|
||||
<radio_item label="Benutzern. (Anzeigen.)" name="username_displayname" width="140"/>
|
||||
<radio_item label="Anzeigen. (Benutzern.)" name="displayname_username" width="140"/>
|
||||
</radio_group>
|
||||
<check_box label="Kontaktliste immer nach Benutzername sortieren" name="sortcontactsbyun" tool_tip="Sortiert Kontaktlisten immer anhand des Benutzernamens, auch wenn Anzeigenamen aktiviert sind."/>
|
||||
<check_box label="Blockierte Avatare als Partikelwolke darstellen" name="ShowMutedAvatarsAsCloud" tool_tip="Blockierte Avatare werden als Partikelwolke in einer speziellen Farbe dargestellt."/>
|
||||
<check_box label="Leere Systemordner im Inventar verstecken" name="DebugHideEmptySystemFolders" tool_tip="Versteckt leere Systemordner wie z.B. Favoriten oder Landmarken usw. in den Inventarfenstern."/>
|
||||
<check_box label="Ordner "Erhaltene Artikel" im Inventar anzeigen" name="FSShowInboxFolder" tool_tip="Falls aktiviert, wird der Ordner "Erhaltene Artikel" als normaler Ordner im Inventar angezeigt."/>
|
||||
|
|
|
|||
|
|
@ -126,12 +126,22 @@
|
|||
follows="left|top"
|
||||
height="16"
|
||||
width="300"
|
||||
name="textFriendlistOptions">
|
||||
Contact list options:
|
||||
</text>
|
||||
<text
|
||||
top_pad="2"
|
||||
left="30"
|
||||
layout="topleft"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
width="125"
|
||||
name="textFriendlistColumns">
|
||||
Visible name columns in contact list:
|
||||
Visible name columns:
|
||||
</text>
|
||||
<check_box
|
||||
top_pad="2"
|
||||
left="25"
|
||||
top_delta="0"
|
||||
left_pad="15"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
label="Username"
|
||||
|
|
@ -169,12 +179,12 @@
|
|||
function="FS.CheckContactListColumnMode" />
|
||||
</check_box>
|
||||
<text
|
||||
top_pad="5"
|
||||
left="18"
|
||||
top_pad="2"
|
||||
left="30"
|
||||
follows="left|top"
|
||||
name="textFriendListSortOrder"
|
||||
width="100">
|
||||
Sort contact list by:
|
||||
width="60">
|
||||
Sort list by:
|
||||
</text>
|
||||
<radio_group
|
||||
top_delta="0"
|
||||
|
|
@ -201,6 +211,40 @@
|
|||
value="1"
|
||||
width="75" />
|
||||
</radio_group>
|
||||
<text
|
||||
top_pad="2"
|
||||
left="30"
|
||||
follows="left|top"
|
||||
name="textFriendListFullNameFormat"
|
||||
width="105">
|
||||
Show full name as:
|
||||
</text>
|
||||
<radio_group
|
||||
top_delta="0"
|
||||
left_pad="15"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
enabled_control="FSFriendListColumnShowFullName"
|
||||
control_name="FSFriendListFullNameFormat"
|
||||
name="FSFriendListFullNameFormat"
|
||||
tool_tip=""
|
||||
width="331">
|
||||
<radio_item
|
||||
label="Username (Display name)"
|
||||
layout="topleft"
|
||||
name="username_displayname"
|
||||
value="0"
|
||||
top_pad="7"
|
||||
width="160" />
|
||||
<radio_item
|
||||
left_pad="15"
|
||||
label="Display name (Username)"
|
||||
layout="topleft"
|
||||
top_delta="0"
|
||||
name="displayname_username"
|
||||
value="1"
|
||||
width="75" />
|
||||
</radio_group>
|
||||
<check_box
|
||||
top_pad="2"
|
||||
left="18"
|
||||
|
|
|
|||
Loading…
Reference in New Issue