Clean up in the friends list code, fixing things~
The entire list should no longer lock up when changing friend rights for just some people Visual changes: Muted people's names in friends list are now displayed in the muted color (this still needs testing) The collapse and expand button now uses icons instead of < and > characters. Complex stuff devs may read: Remove pointless classes, definitions, and functions. Replace static callbacks with bound ones. Cleanup commented stuff Fix styling and spacing stuffs Comment out unexecuted code paths Optimizes updating uncached names so full refresh is not required, just a single name update. Comment out unused voice stuff, since SIP buddylist was removed in Voice Update. Switch to Params for list building~
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -38,15 +38,14 @@
|
||||
#include "llpanel.h"
|
||||
#include "llstring.h"
|
||||
#include "lluuid.h"
|
||||
#include "lleventtimer.h"
|
||||
|
||||
#include "llcallingcard.h"
|
||||
|
||||
class LLAvatarName;
|
||||
class LLFriendObserver;
|
||||
class LLRelationship;
|
||||
class LLScrollListItem;
|
||||
class LLScrollListCtrl;
|
||||
class AIFilePicker;
|
||||
class LLScrollListItem;
|
||||
|
||||
/**
|
||||
* @class LLPanelFriends
|
||||
@@ -55,19 +54,12 @@ class AIFilePicker;
|
||||
*
|
||||
* @sa LLFloater
|
||||
*/
|
||||
class LLPanelFriends : public LLPanel, public LLEventTimer
|
||||
class LLPanelFriends : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelFriends();
|
||||
virtual ~LLPanelFriends();
|
||||
|
||||
/**
|
||||
* @brief This method either creates or brings to the front the
|
||||
* current instantiation of this floater. There is only once since
|
||||
* you can currently only look at your local friends.
|
||||
*/
|
||||
virtual BOOL tick();
|
||||
|
||||
/**
|
||||
* @brief This method is called in response to the LLAvatarTracker
|
||||
* sending out a changed() message.
|
||||
@@ -99,16 +91,16 @@ private:
|
||||
// <dogmode> Contacts search and group system
|
||||
void filterContacts(const std::string& search_name);
|
||||
void categorizeContacts();
|
||||
void setContactGroup(std::string contact_grp);
|
||||
std::string cleanFileName(std::string filename);
|
||||
void setContactGroup(const std::string& contact_grp);
|
||||
//std::string cleanFileName(std::string filename);
|
||||
// --
|
||||
BOOL refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies);
|
||||
BOOL refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies);
|
||||
void refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies);
|
||||
void refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies);
|
||||
void refreshUI();
|
||||
void refreshRightsChangeList();
|
||||
void applyRightsToFriends();
|
||||
BOOL addFriend(const LLUUID& agent_id);
|
||||
BOOL updateFriendItem(const LLUUID& agent_id, const LLRelationship* relationship);
|
||||
void addFriend(const LLUUID& agent_id);
|
||||
void updateFriendItem(const LLUUID& agent_id, const LLRelationship* relationship);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -119,27 +111,22 @@ private:
|
||||
void sendRightsGrant(rights_map_t& ids);
|
||||
|
||||
// callback methods
|
||||
static void onSelectName(LLUICtrl* ctrl, void* user_data);
|
||||
static void onChangeContactGroup(LLUICtrl* ctrl, void* user_data);
|
||||
static void onPickAvatar(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names );
|
||||
void onContactFilterEdit(const std::string& search_string);
|
||||
static void onClickIM(void* user_data);
|
||||
static void onClickAssign(void* user_data);
|
||||
static void onClickExpand(void* user_data);
|
||||
static void updateColumns(void* user_data);
|
||||
static void onClickProfile(void* user_data);
|
||||
static void onClickAddFriend(void* user_data);
|
||||
static void onClickExport(void* user_data);
|
||||
static void onClickExport_continued(void* user_data, AIFilePicker* filepicker);
|
||||
static void onClickImport(void* user_data);
|
||||
static void onClickImport_filepicker_continued(AIFilePicker* filepicker);
|
||||
void onSelectName();
|
||||
static void onPickAvatar(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names);
|
||||
void onClickIM(const uuid_vec_t& ids);
|
||||
void updateColumns(bool collapsed);
|
||||
void onClickAddFriend();
|
||||
/*
|
||||
void onClickExport();
|
||||
void onClickExport_continued(class AIFilePicker* filepicker);
|
||||
void onClickImport();
|
||||
void onClickImport_filepicker_continued(AIFilePicker* filepicker);
|
||||
*/
|
||||
public:
|
||||
static void FriendImportState(LLUUID id, bool accepted);
|
||||
private:
|
||||
static void onClickPay(void* user_data);
|
||||
|
||||
static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
|
||||
bool modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights);
|
||||
bool modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t rights);
|
||||
|
||||
private:
|
||||
// member data
|
||||
@@ -147,13 +134,8 @@ private:
|
||||
LLUUID mAddFriendID;
|
||||
std::string mAddFriendName;
|
||||
LLScrollListCtrl* mFriendsList;
|
||||
std::string mContactFilter;
|
||||
BOOL mShowMaxSelectWarning;
|
||||
BOOL mAllowRightsChange;
|
||||
S32 mNumRightsChanged;
|
||||
S32 mNumOnline;
|
||||
std::string mLastContactSearch;
|
||||
};
|
||||
|
||||
|
||||
#endif // LL_LLFLOATERFRIENDS_H
|
||||
|
||||
@@ -533,7 +533,7 @@ void LLVivoxVoiceClient::connectorCreate()
|
||||
stream
|
||||
<< "<Logging>"
|
||||
<< "<Folder>" << logpath << "</Folder>"
|
||||
<< "<FileNamePrefix>Connector</FileNamePrefix>"
|
||||
<< "<FileNamePrefix>Connector</FileNamePrefix>"
|
||||
<< "<FileNameSuffix>.log</FileNameSuffix>"
|
||||
<< "<LogLevel>" << loglevel << "</LogLevel>"
|
||||
<< "</Logging>"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</combo_box-->
|
||||
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" name="Contact Search:" width="110">Contact Search:</text-->
|
||||
<filter_editor name="buddy_search_lineedit" label="Kontakt suche" tool_tip="Der Name des Freundes den du suchen möchtest"/>
|
||||
<button label="0" name="expand_collapse_btn" tool_tip="Ein und Ausklappen von mehr Informationen"/>
|
||||
<button name="expand_collapse_btn" tool_tip="Ein und Ausklappen von mehr Informationen"/>
|
||||
|
||||
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact" name="assign_btn" tool_tip="Assign a friend to a Contact Group" width="80"/-->
|
||||
<button label="IM/Anruf" name="im_btn" tool_tip="Öffnet eine Instant-Message-Sitzung"/>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</combo_box-->
|
||||
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" name="Contact Search:" width="110">Contact Search:</text-->
|
||||
<filter_editor name="buddy_search_lineedit" label="Kontakt suche" tool_tip="Der Name des Freundes den du suchen möchtest"/>
|
||||
<button label="0" name="expand_collapse_btn" tool_tip="Ein und Ausklappen von mehr Informationen"/>
|
||||
<button name="expand_collapse_btn" tool_tip="Ein und Ausklappen von mehr Informationen"/>
|
||||
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact" name="assign_btn" tool_tip="Assign a friend to a Contact Group" width="80"/-->
|
||||
<text name="friends">Online</text>
|
||||
<text name="f_num">0000</text>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</combo_box-->
|
||||
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" name="Contact Search:" width="110">Contact Search:</text-->
|
||||
<filter_editor bottom_delta="-40" enabled="true" follows="left|top" font="SansSerif" height="18" name="buddy_search_lineedit" label="Contact Search" tool_tip="The friend name you want to search for" width="160"/>
|
||||
<button bottom_delta="0" follows="top|right" height="22" label="0" left="-120" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info" width="22"/>
|
||||
<button bottom_delta="0" follows="top|right" height="22" left="-120" control_name="ContactListCollapsed" label="" image_selected="arrow_left.tga" image_unselected="arrow_right.tga" toggle="true" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info" width="22"/>
|
||||
<pad bottom="-7" height="0" left="-90" width="1"/>
|
||||
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact" name="assign_btn" tool_tip="Assign a friend to a Contact Group" width="80"/-->
|
||||
<button bottom_delta="-25" follows="top|right" height="22" label="IM/Call" name="im_btn" tool_tip="Open Instant Message session" width="80"/>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</combo_box-->
|
||||
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" name="Contact Search:" width="110">Contact Search:</text-->
|
||||
<filter_editor bottom_delta="-100" enabled="true" follows="left|top" font="SansSerif" height="18" name="buddy_search_lineedit" label="Contact Search" tool_tip="The friend name you want to search for" width="160"/>
|
||||
<button bottom_delta="0" follows="top|right" height="22" label="0" left="-25" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info" width="22"/>
|
||||
<button bottom_delta="0" follows="top|right" height="22" left="-25" control_name="ContactListCollapsed" label="" image_selected="arrow_left.tga" image_unselected="arrow_right.tga" toggle="true" name="expand_collapse_btn" tool_tip="Expand/Collapse extra info" width="22"/>
|
||||
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact" name="assign_btn" tool_tip="Assign a friend to a Contact Group" width="80"/-->
|
||||
<text bottom="38" left="12" follows="left|bottom" height="32" name="friends" width="95">Online:</text>
|
||||
<text bottom_delta="0" left_delta="60" follows="left|bottom" height="32" name="f_num" width="95">0000</text>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<column name="friend_last_update_generation"/>
|
||||
</scroll_list>
|
||||
<filter_editor name="buddy_search_lineedit" label="Buscar Contactos" tool_tip="Nombre del amigo que estás buscando"/>
|
||||
<button label="0" name="expand_collapse_btn" tool_tip="Ampliar/Contraer información extra"/>
|
||||
<button name="expand_collapse_btn" tool_tip="Ampliar/Contraer información extra"/>
|
||||
<button label="MI/Llamada" name="im_btn" tool_tip="Abrir sesión de Mensajes Instantáneos"/>
|
||||
<button label="Perfil" name="profile_btn" tool_tip="Mostrar foto, grupos e información adicional"/>
|
||||
<button label="Teleportar..." name="offer_teleport_btn" tool_tip="Ofrecer Teleporte a tu ubicación a este amigo" />
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</combo_box-->
|
||||
<!--text bottom_delta="-40" follows="left|top" font="SansSerifSmall" height="16" name="Contact Search:" width="110">Contact Search:</text-->
|
||||
<filter_editor name="buddy_search_lineedit" label="Buscar Contactos" tool_tip="El nombre del contacto que estás buscando"/>
|
||||
<button label="0" name="expand_collapse_btn" tool_tip="Expandir/Retraer información extra"/>
|
||||
<button name="expand_collapse_btn" tool_tip="Expandir/Retraer información extra"/>
|
||||
<!--button bottom_delta="-25" follows="top|right" height="22" label="Set Contact" name="assign_btn" tool_tip="Assign a friend to a Contact Group" width="80"/-->
|
||||
<text name="friends">Conectados:</text>
|
||||
<text name="f_num" width="95">0000</text>
|
||||
|
||||
Reference in New Issue
Block a user