From e4de40ad8e1abed99c8c8d681c1dda46e72df94f Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 14 Sep 2012 14:37:48 +0300 Subject: CHUI-119 (Add Nearby chat to Conversations floater): addit. fix: use LLSD(LLUUID::null) instead LLSD::null as "default" floater's key --- indra/llui/llfloaterreg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 9115eb7174..920525448c 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -318,7 +318,7 @@ void LLFloaterReg::showInitialVisibleInstances() BOOL isvis = LLFloater::getControlGroup()->getBOOL(controlname); if (isvis) { - showInstance(name, LLSD()); // keyed floaters shouldn't set save_vis to true + showInstance(name, LLSD(LLUUID())); // keyed floaters shouldn't set save_vis to true } } } -- cgit v1.2.3 From 0d25cca2e1e117962aad57dc951c102bec52cb50 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Mon, 22 Oct 2012 15:01:03 -0700 Subject: Backed out changeset: 4202e227f8e4 --- indra/llui/llfloaterreg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 920525448c..9115eb7174 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -318,7 +318,7 @@ void LLFloaterReg::showInitialVisibleInstances() BOOL isvis = LLFloater::getControlGroup()->getBOOL(controlname); if (isvis) { - showInstance(name, LLSD(LLUUID())); // keyed floaters shouldn't set save_vis to true + showInstance(name, LLSD()); // keyed floaters shouldn't set save_vis to true } } } -- cgit v1.2.3 From 86150b4019d1a84b4af73f0ea18c47baff955562 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 21 Feb 2013 19:15:48 -0800 Subject: CHUI-568 : WIP : Introduced Ctrl-T and Ctrl-H for conversations and nearby chat --- indra/llui/llfloaterreg.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 306caf2b91..c0be086671 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -264,11 +264,7 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key) LLFloater* instance = findInstance(name, key); if (instance) { - // When toggling *visibility*, close the host instead of the floater when hosted - if (instance->getHost()) - instance->getHost()->closeFloater(); - else - instance->closeFloater(); + instance->closeHostedFloater(); return true; } else @@ -281,18 +277,17 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key) // returns true if the instance is visible when completed bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key) { + llinfos << "Merov debug : toggleInstance, name = " << name << ", key = " << key.asString() << llendl; LLFloater* instance = findInstance(name, key); if (LLFloater::isShown(instance)) { - // When toggling *visibility*, close the host instead of the floater when hosted - if (instance->getHost()) - instance->getHost()->closeFloater(); - else - instance->closeFloater(); + llinfos << "Merov debug : call closeHostedFloater " << llendl; + instance->closeHostedFloater(); return false; } else { + llinfos << "Merov debug : call show instance " << llendl; return showInstance(name, key, TRUE) ? true : false; } } @@ -481,31 +476,42 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& // * Also, if it is not on top, bring it forward when focus is given. // * Else the target floater is open, close it. // + llinfos << "Merov debug : toggleInstanceOrBringToFront, name = " << sdname.asString() << ", key = " << key.asString() << llendl; std::string name = sdname.asString(); LLFloater* instance = getInstance(name, key); + if (!instance) { lldebugs << "Unable to get instance of floater '" << name << "'" << llendl; + return; } - else if (instance->isMinimized()) + + // If hosted, we need to take that into account + //LLFloater* host = instance->getHost(); + + if (instance->isMinimized()) { + llinfos << "Merov debug : unminimize, make visible and set to front " << llendl; instance->setMinimized(FALSE); instance->setVisibleAndFrontmost(); } else if (!instance->isShown()) { + llinfos << "Merov debug : open, make visible and set to front " << llendl; instance->openFloater(key); instance->setVisibleAndFrontmost(); } else if (!instance->isFrontmost()) { + llinfos << "Merov debug : make visible and set to front " << llendl; instance->setVisibleAndFrontmost(); } else { - instance->closeFloater(); + llinfos << "Merov debug : closeHostedFloater " << llendl; + instance->closeHostedFloater(); } } -- cgit v1.2.3 From 7f51bd7897a3ced0edc74a32b9148febd7866721 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Sat, 23 Feb 2013 11:22:09 -0800 Subject: CHUI-568 : Fixed! Implemented Ctrl-H for Nearby Chat, taking into account the existence of other conversations and docked/torn off state --- indra/llui/llfloaterreg.cpp | 65 ++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 28 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index c0be086671..c20d863612 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -265,29 +265,22 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key) if (instance) { instance->closeHostedFloater(); - return true; - } - else - { - return false; } + return (instance != NULL); } //static // returns true if the instance is visible when completed bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key) { - llinfos << "Merov debug : toggleInstance, name = " << name << ", key = " << key.asString() << llendl; LLFloater* instance = findInstance(name, key); if (LLFloater::isShown(instance)) { - llinfos << "Merov debug : call closeHostedFloater " << llendl; instance->closeHostedFloater(); return false; } else { - llinfos << "Merov debug : call show instance " << llendl; return showInstance(name, key, TRUE) ? true : false; } } @@ -476,8 +469,6 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& // * Also, if it is not on top, bring it forward when focus is given. // * Else the target floater is open, close it. // - llinfos << "Merov debug : toggleInstanceOrBringToFront, name = " << sdname.asString() << ", key = " << key.asString() << llendl; - std::string name = sdname.asString(); LLFloater* instance = getInstance(name, key); @@ -489,29 +480,47 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& } // If hosted, we need to take that into account - //LLFloater* host = instance->getHost(); + LLFloater* host = instance->getHost(); - if (instance->isMinimized()) - { - llinfos << "Merov debug : unminimize, make visible and set to front " << llendl; - instance->setMinimized(FALSE); - instance->setVisibleAndFrontmost(); - } - else if (!instance->isShown()) - { - llinfos << "Merov debug : open, make visible and set to front " << llendl; - instance->openFloater(key); - instance->setVisibleAndFrontmost(); - } - else if (!instance->isFrontmost()) + if (host) { - llinfos << "Merov debug : make visible and set to front " << llendl; - instance->setVisibleAndFrontmost(); + if (host->isMinimized() || !host->isShown() || !host->isFrontmost()) + { + host->setMinimized(FALSE); + instance->openFloater(key); + instance->setVisibleAndFrontmost(); + } + else if (!instance->getVisible()) + { + instance->openFloater(key); + instance->setVisibleAndFrontmost(); + instance->setFocus(TRUE); + } + else + { + instance->closeHostedFloater(); + } } else { - llinfos << "Merov debug : closeHostedFloater " << llendl; - instance->closeHostedFloater(); + if (instance->isMinimized()) + { + instance->setMinimized(FALSE); + instance->setVisibleAndFrontmost(); + } + else if (!instance->isShown()) + { + instance->openFloater(key); + instance->setVisibleAndFrontmost(); + } + else if (!instance->isFrontmost()) + { + instance->setVisibleAndFrontmost(); + } + else + { + instance->closeHostedFloater(); + } } } -- cgit v1.2.3 From 24e650b4039d3b3515109fa9e271abfa2a2ebd6a Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 8 Mar 2013 18:34:40 -0800 Subject: CHUI-835 (ctrl-h does not select nearby chat conversation in list): Modified setVisibleAndFrontMost() to now take a arguement for the key that was pressed (if one was pressed). This allows the floater to select the converation line item when becoming visible/frontmost. --- indra/llui/llfloaterreg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index c20d863612..1cdddf0d5b 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -488,12 +488,12 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& { host->setMinimized(FALSE); instance->openFloater(key); - instance->setVisibleAndFrontmost(); + instance->setVisibleAndFrontmost(true, key); } else if (!instance->getVisible()) { instance->openFloater(key); - instance->setVisibleAndFrontmost(); + instance->setVisibleAndFrontmost(true, key); instance->setFocus(TRUE); } else @@ -506,16 +506,16 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& if (instance->isMinimized()) { instance->setMinimized(FALSE); - instance->setVisibleAndFrontmost(); + instance->setVisibleAndFrontmost(true, key); } else if (!instance->isShown()) { instance->openFloater(key); - instance->setVisibleAndFrontmost(); + instance->setVisibleAndFrontmost(true, key); } else if (!instance->isFrontmost()) { - instance->setVisibleAndFrontmost(); + instance->setVisibleAndFrontmost(true, key); } else { -- cgit v1.2.3