Move RP Mode check into the Profile button dropdown
This commit is contained in:
@@ -567,13 +567,12 @@ BOOL LLFloaterIMPanel::postBuild()
|
|||||||
{
|
{
|
||||||
flyout->setCommitCallback(boost::bind(&LLFloaterIMPanel::onFlyoutCommit, this, flyout, _2));
|
flyout->setCommitCallback(boost::bind(&LLFloaterIMPanel::onFlyoutCommit, this, flyout, _2));
|
||||||
flyout->add(getString("ding off"), 6);
|
flyout->add(getString("ding off"), 6);
|
||||||
|
flyout->add(getString("rp mode off"), 7);
|
||||||
}
|
}
|
||||||
if (LLButton* btn = findChild<LLButton>("group_info_btn"))
|
if (LLButton* btn = findChild<LLButton>("group_info_btn"))
|
||||||
btn->setCommitCallback(boost::bind(LLGroupActions::show, mSessionUUID));
|
btn->setCommitCallback(boost::bind(LLGroupActions::show, mSessionUUID));
|
||||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("history_btn"))
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("history_btn"))
|
||||||
ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickHistory, this));
|
ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickHistory, this));
|
||||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("rp_mode"))
|
|
||||||
ctrl->setCommitCallback(boost::bind(&LLFloaterIMPanel::onRPMode, this, _2));
|
|
||||||
|
|
||||||
getChild<LLButton>("start_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::startCall, gIMMgr, mSessionUUID, LLVoiceChannel::OUTGOING_CALL));
|
getChild<LLButton>("start_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::startCall, gIMMgr, mSessionUUID, LLVoiceChannel::OUTGOING_CALL));
|
||||||
getChild<LLButton>("end_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::endCall, gIMMgr, mSessionUUID));
|
getChild<LLButton>("end_call_btn")->setCommitCallback(boost::bind(&LLIMMgr::endCall, gIMMgr, mSessionUUID));
|
||||||
@@ -1063,11 +1062,6 @@ void LLFloaterIMPanel::onTabClick(void* userdata)
|
|||||||
self->setInputFocus(TRUE);
|
self->setInputFocus(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterIMPanel::onRPMode(const LLSD& value)
|
|
||||||
{
|
|
||||||
mRPMode = value.asBoolean();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
|
void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
|
||||||
{
|
{
|
||||||
if (value.isUndefined())
|
if (value.isUndefined())
|
||||||
@@ -1085,8 +1079,10 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
|
|||||||
else if (option >= 6) // Options that change labels need to stay in order at the end
|
else if (option >= 6) // Options that change labels need to stay in order at the end
|
||||||
{
|
{
|
||||||
std::string ding_label(mDing ? getString("ding on") : getString("ding off"));
|
std::string ding_label(mDing ? getString("ding on") : getString("ding off"));
|
||||||
|
std::string rp_label(mRPMode ? getString("rp mode on") : getString("rp mode off"));
|
||||||
// First remove them all
|
// First remove them all
|
||||||
flyout->remove(ding_label);
|
flyout->remove(ding_label);
|
||||||
|
flyout->remove(rp_label);
|
||||||
|
|
||||||
// Toggle as requested, adjust the strings
|
// Toggle as requested, adjust the strings
|
||||||
if (option == 6)
|
if (option == 6)
|
||||||
@@ -1094,9 +1090,15 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
|
|||||||
mDing = !mDing;
|
mDing = !mDing;
|
||||||
ding_label = mDing ? getString("ding on") : getString("ding off");
|
ding_label = mDing ? getString("ding on") : getString("ding off");
|
||||||
}
|
}
|
||||||
|
else if (option == 7)
|
||||||
|
{
|
||||||
|
mRPMode = !mRPMode;
|
||||||
|
rp_label = mRPMode ? getString("rp mode on") : getString("rp mode off");
|
||||||
|
}
|
||||||
|
|
||||||
// Last add them back
|
// Last add them back
|
||||||
flyout->add(ding_label, 6);
|
flyout->add(ding_label, 6);
|
||||||
|
flyout->add(rp_label, 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ public:
|
|||||||
void selectAll();
|
void selectAll();
|
||||||
void selectNone();
|
void selectNone();
|
||||||
void setVisible(BOOL b);
|
void setVisible(BOOL b);
|
||||||
BOOL mRPMode;
|
|
||||||
|
|
||||||
S32 getNumUnreadMessages() { return mNumUnreadMessages; }
|
S32 getNumUnreadMessages() { return mNumUnreadMessages; }
|
||||||
|
|
||||||
@@ -114,7 +113,6 @@ public:
|
|||||||
static void onTabClick( void* userdata );
|
static void onTabClick( void* userdata );
|
||||||
|
|
||||||
void onClickHistory();
|
void onClickHistory();
|
||||||
void onRPMode(const LLSD& value);
|
|
||||||
void onFlyoutCommit(class LLComboBox* flyout, const LLSD& value);
|
void onFlyoutCommit(class LLComboBox* flyout, const LLSD& value);
|
||||||
static void onClickStartCall( void* userdata );
|
static void onClickStartCall( void* userdata );
|
||||||
static void onClickEndCall( void* userdata );
|
static void onClickEndCall( void* userdata );
|
||||||
@@ -241,6 +239,7 @@ private:
|
|||||||
BOOL mCallBackEnabled;
|
BOOL mCallBackEnabled;
|
||||||
|
|
||||||
bool mDing; // Whether or not to play a ding on new messages
|
bool mDing; // Whether or not to play a ding on new messages
|
||||||
|
bool mRPMode;
|
||||||
|
|
||||||
LLIMSpeakerMgr* mSpeakers;
|
LLIMSpeakerMgr* mSpeakers;
|
||||||
LLParticipantList* mSpeakerPanel;
|
LLParticipantList* mSpeakerPanel;
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
</flyout_button>
|
</flyout_button>
|
||||||
<string name="ding on" value="Ding on new messages (On)"/>
|
<string name="ding on" value="Ding on new messages (On)"/>
|
||||||
<string name="ding off" value="Ding on new messages (Off)"/>
|
<string name="ding off" value="Ding on new messages (Off)"/>
|
||||||
<check_box bottom="-37" follows="top" height="20" left_delta="80" name="rp_mode">RP Mode</check_box>
|
<string name="rp mode on" value="RP Mode (On)"/>
|
||||||
|
<string name="rp mode off" value="RP Mode (Off)"/>
|
||||||
<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="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"/>
|
<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"/>
|
||||||
<panel border="false" bottom="-34" follows="left|top" height="20" left_delta="80" name="speaker_controls" width="100">
|
<panel border="false" bottom="-34" follows="left|top" height="20" left_delta="80" name="speaker_controls" width="100">
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
</flyout_button>
|
</flyout_button>
|
||||||
<string name="ding on" value="Ding on new messages (On)"/>
|
<string name="ding on" value="Ding on new messages (On)"/>
|
||||||
<string name="ding off" value="Ding on new messages (Off)"/>
|
<string name="ding off" value="Ding on new messages (Off)"/>
|
||||||
<check_box bottom="-20" follows="right|top" height="20" left_delta="90" name="rp_mode">RP Mode</check_box>
|
<string name="rp mode on" value="RP Mode (On)"/>
|
||||||
|
<string name="rp mode off" value="RP Mode (Off)"/>
|
||||||
<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-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"/>
|
<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">
|
<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