[Radar] Feature request: Add a checkbox for people with notes

This is off by default,
right click, hide columns to show or find it in Extras tab!
This commit is contained in:
Lirusaito
2019-03-12 16:28:00 -04:00
parent 1e0741cf17
commit 757cf4c8e7
6 changed files with 47 additions and 2 deletions

View File

@@ -7636,6 +7636,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>24</integer>
</map>
<key>RadarColumnNotesWidth</key>
<map>
<key>Comment</key>
<string>Width for radar's notes column</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>24</integer>
</map>
<key>RadarColumnAgeWidth</key>
<map>
<key>Comment</key>
@@ -7724,6 +7735,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<boolean>0</boolean>
</map>
<key>RadarColumnNotesHidden</key>
<map>
<key>Comment</key>
<string>Hide radar's notes column</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>RadarColumnAgeHidden</key>
<map>
<key>Comment</key>

View File

@@ -143,6 +143,7 @@ LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string& name,
LLAvatarPropertiesProcessor& inst(LLAvatarPropertiesProcessor::instance());
inst.addObserver(mID, this);
inst.sendAvatarPropertiesRequest(mID);
inst.sendAvatarNotesRequest(mID);
}
LLAvatarListEntry::~LLAvatarListEntry()
@@ -192,6 +193,10 @@ void LLAvatarListEntry::processProperties(void* data, EAvatarProcessorType type)
}
}
break;
case APT_NOTES:
if (const LLAvatarNotes* pAvatarNotes = static_cast<const LLAvatarNotes*>(data))
mNotes = !pAvatarNotes->notes.empty();
break;
}
}
@@ -413,6 +418,7 @@ BOOL LLFloaterAvatarList::postBuild()
gSavedSettings.getControl("RadarColumnAltitudeHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this));
gSavedSettings.getControl("RadarColumnActivityHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this));
gSavedSettings.getControl("RadarColumnVoiceHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this));
gSavedSettings.getControl("RadarColumnNotesHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this));
gSavedSettings.getControl("RadarColumnAgeHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this));
gSavedSettings.getControl("RadarColumnTimeHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this));
@@ -466,6 +472,7 @@ enum AVATARS_COLUMN_ORDER
LIST_ALTITUDE,
LIST_ACTIVITY,
LIST_VOICE,
LIST_NOTES,
LIST_AGE,
LIST_TIME,
LIST_CLIENT,
@@ -485,6 +492,7 @@ void LLFloaterAvatarList::assessColumns()
BIND_COLUMN_TO_SETTINGS(LIST_ALTITUDE,Altitude);
BIND_COLUMN_TO_SETTINGS(LIST_ACTIVITY,Activity);
BIND_COLUMN_TO_SETTINGS(LIST_VOICE,Voice);
BIND_COLUMN_TO_SETTINGS(LIST_NOTES,Notes);
BIND_COLUMN_TO_SETTINGS(LIST_AGE,Age);
BIND_COLUMN_TO_SETTINGS(LIST_TIME,Time);
@@ -929,6 +937,12 @@ void LLFloaterAvatarList::refreshAvatarList()
element.columns.add(voice);
}
static const LLCachedControl<bool> hide_notes("RadarColumnNotesHidden");
if (!hide_notes)
{
element.columns.add(LLScrollListCell::Params().column("notes").type("checkbox").enabled(false).value(entry->mNotes));
}
static const LLCachedControl<bool> hide_age("RadarColumnAgeHidden");
if (!hide_age)
{

View File

@@ -143,6 +143,7 @@ private:
bool mMarked;
bool mFocused;
bool mIsInList;
bool mNotes = false;
int mAge;
/**

View File

@@ -1463,7 +1463,9 @@ void LLPanelAvatar::sendAvatarNotesUpdate()
notes == mLastNotes) // Avatar notes unchanged
return;
LLAvatarPropertiesProcessor::instance().sendNotes(mAvatarID, notes);
auto& inst(LLAvatarPropertiesProcessor::instance());
inst.sendNotes(mAvatarID, notes);
inst.sendAvatarNotesRequest(mAvatarID); // Rerequest notes to update anyone that might be listening, also to be sure we match the server.
}
// virtual

View File

@@ -18,6 +18,7 @@
<column name="altitude" label="Alt." width="48" tool_tip="Altitude"/>
<column name="activity" label="Act." width="24" tool_tip="Activity"/>
<column name="voice" image_overlay="inv_item_sound.tga" width="24" tool_tip="Voice Status"/>
<column name="notes" image_overlay="inv_item_notecard.tga" width="24" tool_tip="Whether or not you've added notes to this avatar's profile"/>
<column name="age" label="Age" width="45" tool_tip="Age"/>
<column name="time" label="Time" width="52" tool_tip="Time since arrival in the sim."/>
<column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
@@ -337,9 +338,10 @@
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnAltitudeHidden" name="hide_alt" label="Alt." tool_tip="Altitude"/>
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnActivityHidden" name="hide_act" label="Act." tool_tip="Activity"/>
<check_box follows="bottom|left" bottom_delta="-20" left="5" control_name="RadarColumnVoiceHidden" name="hide_voice" label="Voice" tool_tip="Voice Status"/>
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnNotesHidden" name="hide_notes" label="Notes" tool_tip="Notes Checkbox"/>
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnAgeHidden" name="hide_age" label="Age"/>
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnTimeHidden" name="hide_time" label="Time"/>
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnClientHidden" name="hide_client" label="Client"/>
<check_box follows="bottom|left" bottom_delta="-20" left="5" control_name="RadarColumnClientHidden" name="hide_client" label="Client"/>
</panel>
</tab_container>
<string name="Out Of Range">Out Of Range</string>

View File

@@ -196,6 +196,10 @@
<on_click function="ToggleControl" userdata="RadarColumnVoiceHidden"/>
<on_check control="RadarColumnVoiceHidden"/>
</menu_item_check>
<menu_item_check label="Notes" name="Notes">
<on_click function="ToggleControl" userdata="RadarColumnNotesHidden"/>
<on_check control="RadarColumnNotesHidden"/>
</menu_item_check>
<menu_item_check label="Age" name="Age">
<on_click function="ToggleControl" userdata="RadarColumnAgeHidden"/>
<on_check control="RadarColumnAgeHidden"/>