Exchange most of the buttons on the instant message floater for a flyout button that offers more like Request Teleport!
This commit is contained in:
@@ -561,16 +561,14 @@ BOOL LLFloaterIMPanel::postBuild()
|
||||
mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
|
||||
mInputEditor->setPassDelete( TRUE );
|
||||
|
||||
if (LLButton* btn = findChild<LLButton>("profile_callee_btn"))
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("instant_message_flyout"))
|
||||
{
|
||||
btn->setCommitCallback(boost::bind(LLAvatarActions::showProfile, mOtherParticipantUUID, false));
|
||||
if (!mProfileButtonEnabled) btn->setEnabled(false);
|
||||
ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onFlyoutCommit, this, _2));
|
||||
}
|
||||
if (LLButton* btn = findChild<LLButton>("profile_tele_btn"))
|
||||
btn->setCommitCallback(boost::bind(static_cast<void(*)(const LLUUID&)>(LLAvatarActions::offerTeleport), mOtherParticipantUUID));
|
||||
if (LLButton* btn = findChild<LLButton>("group_info_btn"))
|
||||
btn->setCommitCallback(boost::bind(LLGroupActions::show, mSessionUUID));
|
||||
childSetAction("history_btn", onClickHistory, this);
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("history_btn"))
|
||||
ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickHistory, this));
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("rp_mode"))
|
||||
ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onRPMode, this, _2));
|
||||
|
||||
@@ -1061,17 +1059,30 @@ void LLFloaterIMPanel::onRPMode(const LLSD& value)
|
||||
mRPMode = value.asBoolean();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMPanel::onClickHistory( void* userdata )
|
||||
void LLFloaterIMPanel::onFlyoutCommit(const LLSD& value)
|
||||
{
|
||||
LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
|
||||
|
||||
if (self->mOtherParticipantUUID.notNull())
|
||||
if (value.isUndefined())
|
||||
{
|
||||
LLAvatarActions::showProfile(mOtherParticipantUUID);
|
||||
return;
|
||||
}
|
||||
|
||||
int option = value.asInteger();
|
||||
if (option == 1) onClickHistory();
|
||||
else if (option == 2) LLAvatarActions::offerTeleport(mOtherParticipantUUID);
|
||||
else if (option == 3) LLAvatarActions::teleportRequest(mOtherParticipantUUID);
|
||||
else if (option == 4) LLAvatarActions::pay(mOtherParticipantUUID);
|
||||
else if (option == 5) LLAvatarActions::inviteToGroup(mOtherParticipantUUID);
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onClickHistory()
|
||||
{
|
||||
if (mOtherParticipantUUID.notNull())
|
||||
{
|
||||
char command[256];
|
||||
// [Ansariel: Display name support]
|
||||
//std::string fullname(gDirUtilp->getScrubbedFileName(self->getTitle()));
|
||||
std::string fullname(gDirUtilp->getScrubbedFileName(self->mSessionLabel));
|
||||
//std::string fullname(gDirUtilp->getScrubbedFileName(getTitle()));
|
||||
std::string fullname(gDirUtilp->getScrubbedFileName(mSessionLabel));
|
||||
// [/Ansariel: Display name support]
|
||||
sprintf(command, "\"%s%s%s.txt\"", gDirUtilp->getPerAccountChatLogsDir().c_str(), gDirUtilp->getDirDelimiter().c_str(), fullname.c_str());
|
||||
gViewerWindow->getWindow()->ShellEx(command);
|
||||
|
||||
@@ -113,8 +113,9 @@ public:
|
||||
void onInputEditorKeystroke(LLLineEditor* caller);
|
||||
static void onTabClick( void* userdata );
|
||||
|
||||
static void onClickHistory( void* userdata );
|
||||
void onClickHistory();
|
||||
void onRPMode(const LLSD& value);
|
||||
void onFlyoutCommit(const LLSD& value);
|
||||
static void onClickStartCall( void* userdata );
|
||||
static void onClickEndCall( void* userdata );
|
||||
void onClickToggleActiveSpeakers(const LLSD& value);
|
||||
|
||||
@@ -11,9 +11,13 @@
|
||||
<string name="default_text_label">Click here to instant message.</string>
|
||||
<string name="unavailable_text_label">Text chat is not available for this call.</string>
|
||||
<string name="inventory_item_offered">Inventory item offered</string>
|
||||
<button bottom="-37" height="20" label="Profile" left="5" name="profile_callee_btn" width="80"/>
|
||||
<button bottom="-37" follows="left|top" halign="center" height="20" label="History" left_delta="80" name="history_btn" visible="true" width="80"/>
|
||||
<button bottom="-37" height="20" label="Teleport" left_delta="80" name="profile_tele_btn" width="80"/>
|
||||
<flyout_button bottom="-37" height="20" label="Profile" left="5" name="instant_message_flyout" width="80" list_position="below">
|
||||
<flyout_button_item label="History" name="history_btn" value="1"/>
|
||||
<flyout_button_item label="Offer Teleport" name="profile_tele_btn" value="2"/>
|
||||
<flyout_button_item label="Request Teleport" name="profile_tele_btn" value="3"/>
|
||||
<flyout_button_item label="Pay" name="profile_tele_btn" value="4"/>
|
||||
<flyout_button_item label="Invite To Group" name="profile_tele_btn" value="5"/>
|
||||
</flyout_button>
|
||||
<check_box bottom="-37" follows="top" height="20" left_delta="80" name="rp_mode">RP Mode</check_box>
|
||||
<button bottom="-37" follows="left|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="80" name="start_call_btn" width="80"/>
|
||||
<button bottom="-37" follows="top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" label="End" name="end_call_btn" visible="false" width="80"/>
|
||||
|
||||
@@ -11,10 +11,14 @@
|
||||
<string name="default_text_label">Click here to instant message.</string>
|
||||
<string name="unavailable_text_label">Text chat is not available for this call.</string>
|
||||
<string name="inventory_item_offered">Inventory item offered</string>
|
||||
<button bottom="-20" follows="right|top" height="20" label="Profile" left="135" name="profile_callee_btn" width="60"/>
|
||||
<button bottom="-20" follows="right|top" halign="center" height="20" label="History" left_delta="60" name="history_btn" visible="true" width="60"/>
|
||||
<button bottom="-20" follows="right|top" height="20" label="Teleport" left_delta="60" name="profile_tele_btn" width="70"/>
|
||||
<check_box bottom="-20" follows="right|top" height="20" left_delta="70" name="rp_mode">RP Mode</check_box>
|
||||
<flyout_button bottom="-20" follows="right|top" halign="center" height="20" label="Profile" left_delta="60" name="instant_message_flyout" width="80" list_position="below">
|
||||
<flyout_button_item label="History" name="history_btn" value="1"/>
|
||||
<flyout_button_item label="Offer Teleport" name="profile_tele_btn" value="2"/>
|
||||
<flyout_button_item label="Request Teleport" name="profile_tele_btn" value="3"/>
|
||||
<flyout_button_item label="Pay" name="profile_tele_btn" value="4"/>
|
||||
<flyout_button_item label="Invite To Group" name="profile_tele_btn" value="5"/>
|
||||
</flyout_button>
|
||||
<check_box bottom="-20" follows="right|top" height="20" left_delta="90" name="rp_mode">RP Mode</check_box>
|
||||
<button bottom="-20" follows="right|top" height="20" image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" label="Call" left_delta="67" name="start_call_btn" width="60"/>
|
||||
<button bottom="-20" follows="right|top" height="20" image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" scale_image="true" label="End" name="end_call_btn" width="24"/>
|
||||
<panel mouse_opaque="false" border="false" bottom="-20" follows="right|top" height="20" left_delta="16" name="speaker_controls" width="60">
|
||||
|
||||
Reference in New Issue
Block a user