Merge pull request !7 from phoenix-firestorm-testy search-nearby-chat

Added a search button to nearby chat and IM session floaters.
meow-7.2.2
Ansariel Hiller 2020-04-03 10:57:59 +02:00
commit 657fbfef9a
8 changed files with 114 additions and 1 deletions

View File

@ -53,6 +53,7 @@
#include "llfloaterabout.h" // for sysinfo button -Zi
#include "llfloateravatarpicker.h"
#include "llfloaterreg.h"
#include "llfloatersearchreplace.h"
#include "llgroupactions.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
@ -466,6 +467,11 @@ void FSFloaterIM::sendMsgFromInputEditor(EChatType type)
setTyping(false);
}
void FSFloaterIM::onChatSearchButtonClicked()
{
LLFloaterSearchReplace::show(mChatHistory);
}
void FSFloaterIM::sendMsg(const std::string& msg)
{
// const std::string utf8_text = utf8str_truncate(msg, MAX_MSG_BUF_SIZE - 1);
@ -915,6 +921,8 @@ BOOL FSFloaterIM::postBuild()
getChild<LLButton>("send_chat")->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL));
getChild<LLButton>("chat_search_btn")->setCommitCallback(boost::bind(&FSFloaterIM::onChatSearchButtonClicked, this));
bool isFSSupportGroup = FSData::getInstance()->isFirestormGroup(mSessionID);
bool isFSTestingGroup = FSData::getInstance()->isTestingGroup(mSessionID);

View File

@ -120,6 +120,8 @@ public:
static void clearAllOpenHistories(); // <FS:CR> FIRE-11734
void onChatSearchButtonClicked();
BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop, EDragAndDropType cargo_type,
void *cargo_data, EAcceptance *accept,

View File

@ -51,6 +51,7 @@
#include "llconsole.h"
#include "lldraghandle.h"
#include "llfloaterreg.h"
#include "llfloatersearchreplace.h"
#include "llfocusmgr.h"
#include "llgesturemgr.h"
#include "lliconctrl.h"
@ -145,6 +146,8 @@ BOOL FSFloaterNearbyChat::postBuild()
getChild<LLButton>("chat_history_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onHistoryButtonClicked, this));
getChild<LLButton>("chat_search_btn")->setCommitCallback(boost::bind(&FSFloaterNearbyChat::onSearchButtonClicked, this));
// chat type selector and send chat button
mChatTypeCombo = getChild<LLComboBox>("chat_type");
mChatTypeCombo->selectByValue("say");
@ -314,6 +317,18 @@ void FSFloaterNearbyChat::onHistoryButtonClicked()
}
}
void FSFloaterNearbyChat::onSearchButtonClicked()
{
if (mChatHistory->getVisible())
{
LLFloaterSearchReplace::show(mChatHistory);
}
else if (mChatHistoryMuted->getVisible())
{
LLFloaterSearchReplace::show(mChatHistoryMuted);
}
}
void FSFloaterNearbyChat::onChatOptionsContextMenuItemClicked(const LLSD& userdata)
{
FSChatOptionsMenu::onMenuItemClick(userdata, this);

View File

@ -79,6 +79,8 @@ public:
void onHistoryButtonClicked();
void onSearchButtonClicked();
// overridden to fix the multitab focus bug -Zi
BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE );

View File

@ -422,6 +422,28 @@
tool_tip="Chat Options"
name="chat_options_btn"/>
</layout_panel>
<layout_panel
name="lp_chat_search_btn"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="20"
width="26"
follows="left|top">
<button
name="chat_search_btn"
follows="left|top"
top="0"
width="24"
height="20"
left_delta="2"
image_hover_unselected="Toolbar_Middle_Over"
image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off"
tool_tip="Search chat"
image_overlay="Script_Search"/>
</layout_panel>
<!-- Checkbox for FS prefix on support groups -->
<layout_panel

View File

@ -128,6 +128,28 @@
tool_tip="Chat Options"
name="chat_options_btn"/>
</layout_panel>
<layout_panel
name="lp_chat_search_btn"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="20"
width="26"
follows="left|top">
<button
name="chat_search_btn"
follows="left|top"
top="0"
width="24"
height="20"
left_delta="2"
image_hover_unselected="Toolbar_Middle_Over"
image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off"
tool_tip="Search nearby chat"
image_overlay="Script_Search"/>
</layout_panel>
<layout_panel
name="lp_bar"
auto_resize="true"

View File

@ -407,6 +407,28 @@
tool_tip="Chat Options"
name="chat_options_btn"/>
</layout_panel>
<layout_panel
name="lp_chat_search_btn"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="26"
width="26"
follows="left|top">
<button
name="chat_search_btn"
follows="left|top"
height="20"
width="24"
left_delta="2"
image_pressed="Info_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
top="0"
tool_tip="Search chat"
image_overlay="Script_Search"/>
</layout_panel>
<!-- Checkbox for FS prefix on support groups -->
<layout_panel

View File

@ -125,7 +125,27 @@
tool_tip="Chat Options"
name="chat_options_btn"/>
</layout_panel>
<layout_panel
name="lp_chat_search_btn"
auto_resize="false"
user_resize="false"
top="0"
layout="topleft"
height="26"
width="26"
follows="left|top">
<button
name="chat_search_btn"
follows="left|top"
top="2"
width="24"
height="24"
image_overlay="Script_Search"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
tool_tip="Search nearby chat"/>
</layout_panel>
</layout_stack>
<layout_stack
tab_group="1"