summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-06-14 16:47:43 -0700
committerMerov Linden <merov@lindenlab.com>2012-06-14 16:47:43 -0700
commitc238027dd9917b1633ff5f16911fbdbe437f9a55 (patch)
tree0cebf0fe916b1d0b02e48e73ac9918cc7fd9720e /indra
parentb01ab3b9b2d55a8536894a049354b87bb1d71cdb (diff)
CHUI-139 : Use the Chat toolbar button to open and close the conversations multi floater. Force Nearby Conversation if floater is empty.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/commands.xml6
-rw-r--r--indra/newview/llimfloatercontainer.cpp13
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
3 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 73df064ab2..51211a8ce5 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -46,11 +46,11 @@
available_in_toybox="true"
icon="Command_Chat_Icon"
label_ref="Command_Chat_Label"
- tooltip_ref="Command_Chat_Tooltip"
+ tooltip_ref="Command_Conversations_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="chat_bar"
+ execute_parameters="im_container"
is_running_function="Floater.IsOpen"
- is_running_parameters="chat_bar"
+ is_running_parameters="im_container"
/>
<command name="compass"
available_in_toybox="false"
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 77bb103bda..c01a167169 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -27,6 +27,7 @@
#include "llviewerprecompiledheaders.h"
+#include "llimfloater.h"
#include "llimfloatercontainer.h"
#include "llfloaterreg.h"
@@ -86,7 +87,15 @@ BOOL LLIMFloaterContainer::postBuild()
void LLIMFloaterContainer::onOpen(const LLSD& key)
{
LLMultiFloater::onOpen(key);
-/*
+ if (getFloaterCount() == 0)
+ {
+ // If there's *no* conversation open so far, we force the opening of the nearby chat conversation
+ // *TODO: find a way to move this to XML as a default panel or something like that
+ LLSD name("chat_bar");
+ LLSD key("");
+ LLFloaterReg::toggleInstanceOrBringToFront(name,key);
+ }
+ /*
if (key.isDefined())
{
LLIMFloater* im_floater = LLIMFloater::findInstance(key.asUUID());
@@ -95,7 +104,7 @@ void LLIMFloaterContainer::onOpen(const LLSD& key)
im_floater->openFloater();
}
}
-*/
+ */
}
// virtual
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 0a2fc13aff..7790a382d9 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3692,6 +3692,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Avatar_Label">Avatar</string>
<string name="Command_Build_Label">Build</string>
<string name="Command_Chat_Label">Chat</string>
+ <string name="Command_Conversations_Label">Conversations</string>
<string name="Command_Compass_Label">Compass</string>
<string name="Command_Destinations_Label">Destinations</string>
<string name="Command_Gestures_Label">Gestures</string>
@@ -3718,6 +3719,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Avatar_Tooltip">Choose a complete avatar</string>
<string name="Command_Build_Tooltip">Building objects and reshaping terrain</string>
<string name="Command_Chat_Tooltip">Chat with people nearby using text</string>
+ <string name="Command_Conversations_Tooltip">Converse with everyone</string>
<string name="Command_Compass_Tooltip">Compass</string>
<string name="Command_Destinations_Tooltip">Destinations of interest</string>
<string name="Command_Gestures_Tooltip">Gestures for your avatar</string>