CHUI-170 FIXED Save Torn off state of Nearby Chat between sessions
parent
c76c73770b
commit
73ad740443
|
|
@ -1639,6 +1639,17 @@
|
|||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>NearbyChatIsNotTornOff</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>saving torn-off state of the nearby chat between sessions</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>CloseChatOnReturn</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -55,12 +55,6 @@ LLIMConversation::LLIMConversation(const LLUUID& session_id)
|
|||
{
|
||||
mCommitCallbackRegistrar.add("IMSession.Menu.Action",
|
||||
boost::bind(&LLIMConversation::onIMSessionMenuItemClicked, this, _2));
|
||||
// mCommitCallbackRegistrar.add("IMSession.ExpCollapseBtn.Click",
|
||||
// boost::bind(&LLIMConversation::onSlide, this));
|
||||
// mCommitCallbackRegistrar.add("IMSession.CloseBtn.Click",
|
||||
// boost::bind(&LLFloater::onClickClose, this));
|
||||
mCommitCallbackRegistrar.add("IMSession.TearOffBtn.Click",
|
||||
boost::bind(&LLIMConversation::onTearOffClicked, this));
|
||||
mEnableCallbackRegistrar.add("IMSession.Menu.CompactExpandedModes.CheckItem",
|
||||
boost::bind(&LLIMConversation::onIMCompactExpandedMenuItemCheck, this, _2));
|
||||
mEnableCallbackRegistrar.add("IMSession.Menu.ShowModes.CheckItem",
|
||||
|
|
@ -366,7 +360,7 @@ void LLIMConversation::onClose(bool app_quitting)
|
|||
|
||||
void LLIMConversation::onTearOffClicked()
|
||||
{
|
||||
onClickTearOff(this);
|
||||
LLFloater::onClickTearOff(this);
|
||||
updateHeaderAndToolbar();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ protected:
|
|||
bool onIMShowModesMenuItemCheck(const LLSD& userdata);
|
||||
bool onIMShowModesMenuItemEnable(const LLSD& userdata);
|
||||
static void onSlide(LLIMConversation *self);
|
||||
void onTearOffClicked();
|
||||
virtual void onTearOffClicked();
|
||||
|
||||
// refresh a visual state of the Call button
|
||||
void updateCallBtnState(bool callIsActive);
|
||||
|
|
|
|||
|
|
@ -302,9 +302,8 @@ void LLIMFloaterContainer::setVisible(BOOL visible)
|
|||
if (visible)
|
||||
{
|
||||
// Make sure we have the Nearby Chat present when showing the conversation container
|
||||
LLUUID nearbychat_uuid = LLUUID::null; // Hacky but true: the session id for nearby chat is always null
|
||||
LLFloater* floaterp = findConversationItem(nearbychat_uuid);
|
||||
if (floaterp == NULL)
|
||||
LLFloater* nearby_chat = LLFloaterReg::findInstance("chat_bar");
|
||||
if (nearby_chat == NULL)
|
||||
{
|
||||
// If not found, force the creation of the nearby chat conversation panel
|
||||
// *TODO: find a way to move this to XML as a default panel or something like that
|
||||
|
|
|
|||
|
|
@ -345,15 +345,36 @@ void LLNearbyChat::enableDisableCallBtn()
|
|||
getChildView("voice_call_btn")->setEnabled(false /*btn_enabled*/);
|
||||
}
|
||||
|
||||
void LLNearbyChat::onTearOffClicked()
|
||||
{
|
||||
LLIMConversation::onTearOffClicked();
|
||||
|
||||
LLIMFloaterContainer* im_box = LLIMFloaterContainer::getInstance();
|
||||
|
||||
// see CHUI-170: Save torn-off state of the nearby chat between sessions
|
||||
BOOL in_the_multifloater = (getHost() == im_box);
|
||||
gSavedSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater);
|
||||
}
|
||||
|
||||
void LLNearbyChat::addToHost()
|
||||
{
|
||||
if (LLIMConversation::isChatMultiTab())
|
||||
if ( LLIMConversation::isChatMultiTab())
|
||||
{
|
||||
LLIMFloaterContainer* im_box = LLIMFloaterContainer::getInstance();
|
||||
|
||||
if (im_box)
|
||||
{
|
||||
im_box->addFloater(this, FALSE, LLTabContainer::END);
|
||||
if (gSavedSettings.getBOOL("NearbyChatIsNotTornOff"))
|
||||
{
|
||||
im_box->addFloater(this, TRUE, LLTabContainer::END);
|
||||
}
|
||||
else
|
||||
{
|
||||
// setting of the "potential" host: this sequence sets
|
||||
// LLFloater::mHostHandle = NULL (a current host), but
|
||||
// LLFloater::mLastHostHandle = im_box (a "future" host)
|
||||
setHost(im_box);
|
||||
setHost(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ protected:
|
|||
|
||||
void onToggleNearbyChatPanel();
|
||||
|
||||
/*virtual*/ void onTearOffClicked();
|
||||
|
||||
static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
|
||||
EChatType processChatTypeTriggers(EChatType type, std::string &str);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue