summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lltoolbar.cpp19
-rw-r--r--indra/llui/lltoolbarview.cpp36
-rw-r--r--indra/llui/lltoolbarview.h8
-rw-r--r--indra/llui/llui.cpp1
-rw-r--r--indra/llui/lluictrlfactory.h4
-rw-r--r--indra/newview/app_settings/commands.xml126
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llbottomtray.cpp32
-rw-r--r--indra/newview/llnearbychat.cpp2
-rw-r--r--indra/newview/llnearbychatbar.cpp35
-rw-r--r--indra/newview/llnearbychatbar.h8
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp20
-rw-r--r--indra/newview/skins/default/textures/textures.xml22
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_toolbar_view.xml28
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml38
17 files changed, 295 insertions, 91 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index e5ffe391a6..31a18dc707 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -89,7 +89,7 @@ LLToolBar::Params::Params()
button_panel("button_panel")
{}
-LLToolBar::LLToolBar(const Params& p)
+LLToolBar::LLToolBar(const LLToolBar::Params& p)
: LLUICtrl(p),
mButtonType(p.button_display_mode),
mSideType(p.side),
@@ -112,6 +112,9 @@ LLToolBar::LLToolBar(const Params& p)
void LLToolBar::initFromParams(const LLToolBar::Params& p)
{
+ // Initialize the base object
+ LLUICtrl::initFromParams(p);
+
LLLayoutStack::ELayoutOrientation orientation = getOrientation(p.side);
LLLayoutStack::Params centering_stack_p;
@@ -217,7 +220,7 @@ void LLToolBar::updateLayoutAsNeeded()
if (!mNeedsLayout) return;
LLLayoutStack::ELayoutOrientation orientation = getOrientation(mSideType);
-
+
// our terminology for orientation-agnostic layout is such that
// length refers to a distance in the direction we stack the buttons
// and girth refers to a distance in the direction buttons wrap
@@ -261,8 +264,8 @@ void LLToolBar::updateLayoutAsNeeded()
std::vector<LLToolBarButton*> buttons_in_row;
- BOOST_FOREACH(LLToolBarButton* button, mButtons)
- {
+ BOOST_FOREACH(LLToolBarButton* button, mButtons)
+ {
button->reshape(mMinButtonWidth, mButtonHeight);
button->autoResize();
@@ -293,11 +296,11 @@ void LLToolBar::updateLayoutAsNeeded()
cur_start = row_pad_start;
cur_row += max_row_girth + mPadBetween;
max_row_girth = 0;
- }
+ }
LLRect button_rect;
if (orientation == LLLayoutStack::HORIZONTAL)
- {
+ {
button_rect.setLeftTopAndSize(cur_start, panel_rect.mTop - cur_row, button_clamped_width, button->getRect().getHeight());
}
else // VERTICAL
@@ -305,7 +308,7 @@ void LLToolBar::updateLayoutAsNeeded()
button_rect.setLeftTopAndSize(cur_row, panel_rect.mTop - cur_start, button_clamped_width, button->getRect().getHeight());
}
button->setShape(button_rect);
-
+
buttons_in_row.push_back(button);
row_running_length += button_length + mPadBetween;
@@ -338,7 +341,7 @@ void LLToolBar::updateLayoutAsNeeded()
mButtonPanel->translate(mButtonPanel->getRect().getWidth() - total_girth, 0);
}
mButtonPanel->reshape(total_girth, max_row_length);
- }
+ }
// re-center toolbar buttons
mCenteringStack->updateLayout();
diff --git a/indra/llui/lltoolbarview.cpp b/indra/llui/lltoolbarview.cpp
index 0e54c91cea..590cd4ffca 100644
--- a/indra/llui/lltoolbarview.cpp
+++ b/indra/llui/lltoolbarview.cpp
@@ -28,6 +28,7 @@
#include "linden_common.h"
#include "lltoolbarview.h"
+
#include "lltoolbar.h"
#include "llbutton.h"
@@ -35,33 +36,39 @@ LLToolBarView* gToolBarView = NULL;
static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
-LLToolBarView::LLToolBarView(const Params& p)
+LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
: LLUICtrl(p)
{
}
-BOOL LLToolBarView::postBuild()
+void LLToolBarView::initFromParams(const LLToolBarView::Params& p)
+{
+ // Initialize the base object
+ LLUICtrl::initFromParams(p);
+}
+
+LLToolBarView::~LLToolBarView()
{
- LLRect ctrl_rect = getRect();
- LLButton* btn = getChild<LLButton>("test");
- LLRect btn_rect = btn->getRect();
- llinfos << "Merov debug : control rect = " << ctrl_rect.mLeft << ", " << ctrl_rect.mTop << ", " << ctrl_rect.mRight << ", " << ctrl_rect.mBottom << llendl;
- llinfos << "Merov debug : test rect = " << btn_rect.mLeft << ", " << btn_rect.mTop << ", " << btn_rect.mRight << ", " << btn_rect.mBottom << llendl;
- return TRUE;
}
void LLToolBarView::draw()
{
static bool debug_print = true;
+ static S32 old_width = 0;
+ static S32 old_height = 0;
LLToolBar* toolbar_bottom = getChild<LLToolBar>("toolbar_bottom");
LLToolBar* toolbar_left = getChild<LLToolBar>("toolbar_left");
LLToolBar* toolbar_right = getChild<LLToolBar>("toolbar_right");
+ LLPanel* sizer_left = getChild<LLPanel>("sizer_left");
LLRect bottom_rect = toolbar_bottom->getRect();
LLRect left_rect = toolbar_left->getRect();
LLRect right_rect = toolbar_right->getRect();
+ LLRect sizer_left_rect = sizer_left->getRect();
+ if ((old_width != getRect().getWidth()) || (old_height != getRect().getHeight()))
+ debug_print = true;
if (debug_print)
{
LLRect ctrl_rect = getRect();
@@ -69,13 +76,18 @@ void LLToolBarView::draw()
llinfos << "Merov debug : draw bottom rect = " << bottom_rect.mLeft << ", " << bottom_rect.mTop << ", " << bottom_rect.mRight << ", " << bottom_rect.mBottom << llendl;
llinfos << "Merov debug : draw left rect = " << left_rect.mLeft << ", " << left_rect.mTop << ", " << left_rect.mRight << ", " << left_rect.mBottom << llendl;
llinfos << "Merov debug : draw right rect = " << right_rect.mLeft << ", " << right_rect.mTop << ", " << right_rect.mRight << ", " << right_rect.mBottom << llendl;
+ llinfos << "Merov debug : draw s left rect = " << sizer_left_rect.mLeft << ", " << sizer_left_rect.mTop << ", " << sizer_left_rect.mRight << ", " << sizer_left_rect.mBottom << llendl;
+ old_width = ctrl_rect.getWidth();
+ old_height = ctrl_rect.getHeight();
debug_print = false;
}
// Debug draw
- gl_rect_2d(getLocalRect(), LLColor4::blue, TRUE);
- gl_rect_2d(bottom_rect, LLColor4::red, TRUE);
- gl_rect_2d(left_rect, LLColor4::green, TRUE);
- gl_rect_2d(right_rect, LLColor4::yellow, TRUE);
+ LLColor4 back_color = LLColor4::blue;
+ back_color[VALPHA] = 0.5f;
+// gl_rect_2d(getLocalRect(), back_color, TRUE);
+// gl_rect_2d(bottom_rect, LLColor4::red, TRUE);
+// gl_rect_2d(left_rect, LLColor4::green, TRUE);
+// gl_rect_2d(right_rect, LLColor4::yellow, TRUE);
LLUICtrl::draw();
}
diff --git a/indra/llui/lltoolbarview.h b/indra/llui/lltoolbarview.h
index 0bd0070ab7..73278e226b 100644
--- a/indra/llui/lltoolbarview.h
+++ b/indra/llui/lltoolbarview.h
@@ -30,19 +30,23 @@
#include "lluictrl.h"
+class LLUICtrlFactory;
+
// Parent of all LLToolBar
class LLToolBarView : public LLUICtrl
{
public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> {};
- void draw();
- /*virtual*/ BOOL postBuild();
+ virtual ~LLToolBarView();
+ virtual void draw();
protected:
friend class LLUICtrlFactory;
LLToolBarView(const Params&);
+ void initFromParams(const Params&);
+
private:
LLHandle<LLView> mSnapView;
};
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 1bc575438c..a4303780fd 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -93,7 +93,6 @@ std::list<std::string> gUntranslated;
static LLDefaultChildRegistry::Register<LLFilterEditor> register_filter_editor("filter_editor");
static LLDefaultChildRegistry::Register<LLFlyoutButton> register_flyout_button("flyout_button");
static LLDefaultChildRegistry::Register<LLSearchEditor> register_search_editor("search_editor");
-static LLDefaultChildRegistry::Register<LLToolBar> r1("toolbar");
// register other widgets which otherwise may not be linked in
static LLDefaultChildRegistry::Register<LLLoadingIndicator> register_loading_indicator("loading_indicator");
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index d345ad4cd0..71c38237c1 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -172,7 +172,7 @@ public:
static T* createFromFile(const std::string &filename, LLView *parent, const widget_registry_t& registry, LLXMLNodePtr output_node = NULL)
{
T* widget = NULL;
-
+
std::string skinned_filename = findSkinnedFilename(filename);
instance().pushFileName(filename);
{
@@ -201,10 +201,10 @@ public:
// not of right type, so delete it
if (!widget)
{
+ llwarns << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << llendl;
delete view;
view = NULL;
}
-
}
}
fail:
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 8e45e866ca..5cb8ddffcd 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -7,6 +7,83 @@
function="Floater.ToolbarToggle"
param="avatar"
/>
+ <command name="build"
+ icon="Command_Build_Icon"
+ label_ref="Command_Build_Label"
+ tooltip_ref="Command_Build_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="build"
+ />
+ <command name="chat"
+ icon="Command_Chat_Icon"
+ label_ref="Command_Chat_Label"
+ tooltip_ref="Command_Chat_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="chat"
+ />
+ <command name="compass"
+ icon="Command_Compass_Icon"
+ label_ref="Command_Compass_Label"
+ tooltip_ref="Command_Compass_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="compass"
+ />
+ <command name="gestures"
+ icon="Command_Gestures_Icon"
+ label_ref="Command_Gestures_Label"
+ tooltip_ref="Command_Gestures_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="gestures"
+ />
+ <command name="howto"
+ icon="Command_HowTo_Icon"
+ label_ref="Command_HowTo_Label"
+ tooltip_ref="Command_HowTo_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="howto"
+ />
+ <command name="landmarks"
+ icon="Command_Landmarks_Icon"
+ label_ref="Command_Landmarks_Label"
+ tooltip_ref="Command_Landmarks_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="landmarks"
+ />
+ <command name="map"
+ icon="Command_Map_Icon"
+ label_ref="Command_Map_Label"
+ tooltip_ref="Command_Map_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="map"
+ />
+ <command name="move"
+ icon="Command_Move_Icon"
+ label_ref="Command_Move_Label"
+ tooltip_ref="Command_Move_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="move"
+ />
+ <command name="myland"
+ icon="Command_MyLand_Icon"
+ label_ref="Command_MyLand_Label"
+ tooltip_ref="Command_MyLand_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="myland"
+ />
+ <command name="mystuff"
+ icon="Command_MyStuff_Icon"
+ label_ref="Command_MyStuff_Label"
+ tooltip_ref="Command_MyStuff_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="mystuff"
+ />
+ <command name="people"
+ icon="Command_People_Icon"
+ label_ref="Command_People_Label"
+ tooltip_ref="Command_People_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="people"
+ />
<command name="places"
icon="Command_Places_Icon"
label_ref="Command_Places_Label"
@@ -14,4 +91,53 @@
function="Floater.ToolbarToggle"
param="places"
/>
+ <command name="search"
+ icon="Command_Search_Icon"
+ label_ref="Command_Search_Label"
+ tooltip_ref="Command_Search_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="search"
+ />
+ <command name="settings"
+ icon="Command_Settings_Icon"
+ label_ref="Command_Settings_Label"
+ tooltip_ref="Command_Settings_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="settings"
+ />
+ <command name="shop"
+ icon="Command_Shop_Icon"
+ label_ref="Command_Shop_Label"
+ tooltip_ref="Command_Shop_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="shop"
+ />
+ <command name="snapshot"
+ icon="Command_Snapshot_Icon"
+ label_ref="Command_Snapshot_Label"
+ tooltip_ref="Command_Snapshot_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="snapshot"
+ />
+ <command name="speak"
+ icon="Command_Speak_Icon"
+ label_ref="Command_Speak_Label"
+ tooltip_ref="Command_Speak_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="speak"
+ />
+ <command name="upload"
+ icon="Command_Upload_Icon"
+ label_ref="Command_Upload_Label"
+ tooltip_ref="Command_Upload_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="upload"
+ />
+ <command name="view"
+ icon="Command_View_Icon"
+ label_ref="Command_View_Label"
+ tooltip_ref="Command_View_Tooltip"
+ function="Floater.ToolbarToggle"
+ param="view"
+ />
</commands>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index cc9e17409f..f1db72e5cc 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1493,7 +1493,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>ChatBubbleOpacity</key>
<map>
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index c8cfe5b51e..7a60903950 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -165,13 +165,13 @@ public:
mChatBarContainer(NULL),
mGesturePanel(NULL)
{
- mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
+ //mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
buildFromFile("panel_bottomtray_lite.xml");
}
BOOL postBuild()
{
- mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar");
+ //mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar");
mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel");
mGesturePanel = getChild<LLPanel>("gesture_panel");
@@ -224,7 +224,7 @@ LLBottomTray::LLBottomTray(const LLSD&)
// before chiclets do that.
LLIMMgr::getInstance()->addSessionObserver(this);
- mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
+ //mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
buildFromFile("panel_bottomtray.xml");
@@ -271,7 +271,8 @@ LLBottomTray::~LLBottomTray()
// *TODO Vadim: why void* ?
void* LLBottomTray::createNearbyChatBar(void* userdata)
{
- return new LLNearbyChatBar();
+ //return new LLNearbyChatBar();
+ return NULL;
}
LLNearbyChatBar* LLBottomTray::getNearbyChatBar()
@@ -537,10 +538,10 @@ BOOL LLBottomTray::postBuild()
mBottomTrayContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_bottomtray.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
gMenuHolder->addChild(mBottomTrayContextMenu);
- mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar");
- LLHints::registerHintTarget("chat_bar", mNearbyChatBar->LLView::getHandle());
+ //mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar");
+ //LLHints::registerHintTarget("chat_bar", mNearbyChatBar->LLView::getHandle());
- mListener.reset(new LLNearbyChatBarListener(*mNearbyChatBar));
+ //mListener.reset(new LLNearbyChatBarListener(*mNearbyChatBar));
mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel");
mNearbyCharResizeHandlePanel = getChild<LLPanel>("chat_bar_resize_handle_panel");
@@ -577,7 +578,7 @@ BOOL LLBottomTray::postBuild()
// Registering Chat Bar to receive Voice client status change notifications.
LLVoiceClient::getInstance()->addObserver(this);
- mNearbyChatBar->getChatBox()->setContextMenu(NULL);
+ //mNearbyChatBar->getChatBox()->setContextMenu(NULL);
mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
@@ -882,6 +883,7 @@ void LLBottomTray::draw()
bool LLBottomTray::onContextMenuItemEnabled(const LLSD& userdata)
{
std::string item = userdata.asString();
+ /*
LLLineEditor* edit_box = mNearbyChatBar->findChild<LLLineEditor>("chat_box");
if (item == "can_cut")
@@ -903,13 +905,13 @@ bool LLBottomTray::onContextMenuItemEnabled(const LLSD& userdata)
else if (item == "can_select_all")
{
return edit_box->canSelectAll() && (edit_box->getLength()>0);
- }
+ }*/
return true;
}
void LLBottomTray::onContextMenuItemClicked(const LLSD& userdata)
-{
+{/*
std::string item = userdata.asString();
LLLineEditor* edit_box = mNearbyChatBar->findChild<LLLineEditor>("chat_box");
@@ -933,7 +935,7 @@ void LLBottomTray::onContextMenuItemClicked(const LLSD& userdata)
else if (item == "select_all")
{
edit_box->selectAll();
- }
+ }*/
}
void LLBottomTray::log(LLView* panel, const std::string& descr)
@@ -1117,8 +1119,8 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
// chatbar should only be shrunk here, not stretched
if (shrink_by > 0)
{
- lldebugs << "Shrinking nearby chat bar by " << shrink_by << " px " << llendl;
- mChatBarContainer->reshape(mNearbyChatBar->getRect().getWidth() - shrink_by, mChatBarContainer->getRect().getHeight());
+ //lldebugs << "Shrinking nearby chat bar by " << delta_panel << " px " << llendl;
+ //mChatBarContainer->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mChatBarContainer->getRect().getHeight());
}
log(mNearbyChatBar, "after processing panel decreasing via nearby chatbar panel");
@@ -1144,8 +1146,8 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
if (buttons_freed_width > 0)
{
- S32 nearby_needed_width = mDesiredNearbyChatWidth - mNearbyChatBar->getRect().getWidth();
- if (nearby_needed_width > 0)
+ S32 nearby_needed_width = mDesiredNearbyChatWidth;
+ if ( 0)
{
S32 compensative_width = nearby_needed_width > buttons_freed_width ? buttons_freed_width : nearby_needed_width;
log(mNearbyChatBar, "before applying compensative width");
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 03ebc344f1..361912a5cb 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -92,7 +92,7 @@ BOOL LLNearbyChat::postBuild()
if (getDockControl() == NULL)
{
setDockControl(new LLDockControl(
- LLBottomTray::getInstance()->getNearbyChatBar(), this,
+ LLFloaterReg::getInstance("chat_bar"), this,
getDockTongue(), LLDockControl::TOP, boost::bind(&LLNearbyChat::getAllowedRect, this, _1)));
}
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4b961db5f9..185acb1414 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -411,8 +411,9 @@ LLCtrlListInterface* LLGestureComboList::getListInterface()
return mList;
}
-LLNearbyChatBar::LLNearbyChatBar()
-: mChatBox(NULL)
+LLNearbyChatBar::LLNearbyChatBar(const LLSD& key)
+ : LLFloater(key),
+ mChatBox(NULL)
{
mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
}
@@ -457,19 +458,13 @@ void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
//static
LLNearbyChatBar* LLNearbyChatBar::getInstance()
{
- return LLBottomTray::getInstance() ? LLBottomTray::getInstance()->getNearbyChatBar() : NULL;
-}
-
-//static
-bool LLNearbyChatBar::instanceExists()
-{
- return LLBottomTray::instanceExists() && LLBottomTray::getInstance()->getNearbyChatBar() != NULL;
+ return LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar");
}
void LLNearbyChatBar::draw()
{
displaySpeakingIndicator();
- LLPanel::draw();
+ LLFloater::draw();
}
std::string LLNearbyChatBar::getCurrentChat()
@@ -780,17 +775,12 @@ void LLNearbyChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type,
// static
void LLNearbyChatBar::startChat(const char* line)
{
- LLBottomTray *bt = LLBottomTray::getInstance();
-
- if (!bt)
- return;
-
- LLNearbyChatBar* cb = bt->getNearbyChatBar();
+ LLNearbyChatBar* cb = LLNearbyChatBar::getInstance();
if (!cb )
return;
- bt->setVisible(TRUE);
+ cb->setVisible(TRUE);
cb->mChatBox->setFocus(TRUE);
if (line)
@@ -811,7 +801,7 @@ void LLNearbyChatBar::stopChat()
if (!bt)
return;
- LLNearbyChatBar* cb = bt->getNearbyChatBar();
+ LLNearbyChatBar* cb = LLNearbyChatBar::getInstance();
if (!cb)
return;
@@ -822,6 +812,15 @@ void LLNearbyChatBar::stopChat()
gAgent.stopTyping();
}
+void LLNearbyChatBar::onClose(bool app_quitting)
+{
+ LLFloater* nearby_chat = LLFloaterReg::findInstance("nearby_chat", LLSD());
+ if (nearby_chat)
+ {
+ nearby_chat->closeFloater(app_quitting);
+ }
+}
+
// If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20.
// Otherwise returns input and channel 0.
LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index efddec942f..f4a8605e18 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -93,23 +93,23 @@ private:
};
class LLNearbyChatBar
-: public LLPanel
+: public LLFloater
{
public:
// constructor for inline chat-bars (e.g. hosted in chat history window)
- LLNearbyChatBar();
+ LLNearbyChatBar(const LLSD& key);
~LLNearbyChatBar() {}
virtual BOOL postBuild();
static LLNearbyChatBar* getInstance();
- static bool instanceExists();
-
LLLineEditor* getChatBox() { return mChatBox; }
virtual void draw();
+ virtual void onClose(bool app_quitting);
+
std::string getCurrentChat();
virtual BOOL handleKeyHere( KEY key, MASK mask );
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 375ee3ad33..b44e7283da 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -129,6 +129,7 @@
#include "llscriptfloater.h"
#include "llfloatermodelpreview.h"
#include "llcommandhandler.h"
+#include "llnearbychatbar.h"
// *NOTE: Please add files in alphabetical order to keep merges easy.
@@ -180,6 +181,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
+ LLFloaterReg::add("chat_bar", "floater_chat_bar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChatBar>);
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index d197782eed..5355e77bfc 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1783,15 +1783,12 @@ void LLViewerWindow::initBase()
// *TODO: Eventually, suppress the existence of this debug setting and turn toolbar FUI on permanently
if (gSavedSettings.getBOOL("DebugToolbarFUI"))
{
- llinfos << "Merov debug : Creating the toolbar view" << llendl;
// Get a pointer to the toolbar view holder
LLPanel* panel_holder = main_view->getChild<LLPanel>("toolbar_view_holder");
- llinfos << "Merov debug : panel_holder = " << panel_holder << llendl;
// Load the toolbar view from file
- gToolBarView = LLUICtrlFactory::getInstance()->createFromFile<LLToolBarView>("panel_toolbar_view.xml", NULL, LLPanel::child_registry_t::instance());
- llinfos << "Merov debug : gToolBarView = " << gToolBarView << llendl;
+ gToolBarView = LLUICtrlFactory::getInstance()->createFromFile<LLToolBarView>("panel_toolbar_view.xml", panel_holder, LLPanel::child_registry_t::instance());
// Attach it to the toolbar view holder
- panel_holder->addChild(gToolBarView);
+ //panel_holder->addChild(gToolBarView);
}
// Constrain floaters to inside the menu and status bar regions.
@@ -2465,7 +2462,12 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// Traverses up the hierarchy
if( keyboard_focus )
{
- LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
+ LLNearbyChatBar* nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChatBar>("chat_bar");
+
+ if (nearby_chat)
+ {
+ LLLineEditor* chat_editor = nearby_chat->getChatBox();
+
// arrow keys move avatar while chatting hack
if (chat_editor && chat_editor->hasFocus())
{
@@ -2496,7 +2498,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
}
}
}
-
+ }
if (keyboard_focus->handleKey(key, mask, FALSE))
{
return TRUE;
@@ -2527,11 +2529,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
!keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) )
{
- LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
+ LLLineEditor* chat_editor = LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar")->getChatBox();
if (chat_editor)
{
// passing NULL here, character will be added later when it is handled by character handler.
- LLBottomTray::getInstance()->getNearbyChatBar()->startChat(NULL);
+ LLNearbyChatBar::getInstance()->startChat(NULL);
return TRUE;
}
}
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 598e39730c..d68594097c 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -125,8 +125,26 @@ with the same filename but different name
<texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" />
<texture name="Check_Mark" file_name="icons/check_mark" preload="true" />
- <texture name="Command_Avatar_Icon" file_name="icons/SL_Logo.png" preload="true" />
- <texture name="Command_Places_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Avatar_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Build_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Chat_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Compass_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Gestures_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_HowTo_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Landmarks_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Map_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Move_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_MyLand_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_MyStuff_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_People_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Places_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Search_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Settings_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Shop_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Snapshot_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Speak_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_Upload_Icon" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="Command_View_Icon" file_name="icons/SL_Logo.png" preload="true" />
<texture name="ComboButton_Disabled" file_name="widgets/ComboButton_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
<texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index a21c988bb8..448f10a93c 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -170,7 +170,8 @@
top="0"
left="0"
mouse_opaque="false"
- tab_stop="false"/>
+ tab_stop="false">
+ </panel>
</layout_panel>
</layout_stack>
<panel mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
index b58f8e837a..33a19bcdb0 100644
--- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<ui_ctrl
+<toolbar_view
follows="all"
layout="topleft"
name="toolbar view"
@@ -16,7 +16,6 @@
width="30"
left="0"
top="0"
- button_display_mode="icons_only"
side="left"
visible="true" />
<toolbar
@@ -27,7 +26,6 @@
width="964"
left="30"
top="470"
- button_display_mode="icons_with_text"
side="bottom"
visible="true" />
<toolbar
@@ -38,18 +36,20 @@
width="30"
left="994"
top="0"
- button_display_mode="icons_only"
side="right"
visible="true" />
- <button
- follows="none"
- name="test"
+ <panel
+ follows="right|bottom|left"
layout="topleft"
- top="100"
- left="100"
- height="28"
- width="28"
- image_selected="eye_button_active.tga"
- image_unselected="eye_button_inactive.tga"
+ name="sizer_left"
+ height="500"
+ width="30"
+ left="0"
+ top="0"
+ background_opaque="false"
+ border_visible="false"
+ background_visible="true"
+ bg_opaque_image="Toast_Over"
+ bg_alpha_image="Toast_Background"
visible="true" />
-</ui_ctrl>
+</toolbar_view>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 3b986664db..d4c2bc50ca 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3653,8 +3653,44 @@ Try enclosing path to the editor with double quotes.
<!-- commands -->
<string name="Command_Avatar_Label">Avatar</string>
- <string name="Command_Avatar_Tooltip">Customize your avatar</string>
+ <string name="Command_Avatar_Tooltip">Change the appearance of your avatar</string>
+ <string name="Command_Build_Label">Build</string>
+ <string name="Command_Build_Tooltip">Building, reshaping terrain</string>
+ <string name="Command_Chat_Label">Chat</string>
+ <string name="Command_Chat_Tooltip">Chat with people nearby</string>
+ <string name="Command_Compass_Label">Compass</string>
+ <string name="Command_Compass_Tooltip"></string>
+ <string name="Command_Gestures_Label">Gestures</string>
+ <string name="Command_Gestures_Tooltip"></string>
+ <string name="Command_HowTo_Label">How To</string>
+ <string name="Command_HowTo_Tooltip"></string>
+ <string name="Command_Landmarks_Label">Landmarks</string>
+ <string name="Command_Landmarks_Tooltip"></string>
+ <string name="Command_Map_Label">Map</string>
+ <string name="Command_Map_Tooltip"></string>
+ <string name="Command_Move_Label">Move</string>
+ <string name="Command_Move_Tooltip"></string>
+ <string name="Command_MyLand_Label">My Land</string>
+ <string name="Command_MyLand_Tooltip">Information about the land you're visiting</string>
+ <string name="Command_MyStuff_Label">My Stuff</string>
+ <string name="Command_MyStuff_Tooltip">View and use your belongings</string>
+ <string name="Command_People_Label">People</string>
+ <string name="Command_People_Tooltip"></string>
<string name="Command_Places_Label">Places</string>
<string name="Command_Places_Tooltip">Destination guide</string>
+ <string name="Command_Search_Label">Search</string>
+ <string name="Command_Search_Tooltip">Find...</string>
+ <string name="Command_Settings_Label">Settings</string>
+ <string name="Command_Settings_Tooltip">Preferences</string>
+ <string name="Command_Shop_Label">Shop</string>
+ <string name="Command_Shop_Tooltip"></string>
+ <string name="Command_Snapshot_Label">Snapshot</string>
+ <string name="Command_Snapshot_Tooltip">Take a picture</string>
+ <string name="Command_Speak_Label">Speak</string>
+ <string name="Command_Speak_Tooltip">Speak with people nearby using your microphone</string>
+ <string name="Command_Upload_Label">Upload</string>
+ <string name="Command_Upload_Tooltip"></string>
+ <string name="Command_View_Label">View</string>
+ <string name="Command_View_Tooltip">Changing your view of the world</string>
</strings>