summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llbottomtray.cpp12
-rw-r--r--indra/newview/llnearbychatbar.cpp26
-rw-r--r--indra/newview/llnearbychatbar.h3
-rw-r--r--indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml6
11 files changed, 6 insertions, 83 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 24b8ef3320..3511328161 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -60,6 +60,7 @@ namespace
const std::string& PANEL_MOVEMENT_NAME = "movement_panel";
const std::string& PANEL_CAMERA_NAME = "cam_panel";
const std::string& PANEL_GESTURE_NAME = "gesture_panel";
+ const S32 MAX_CHAT_BAR_WIDTH = 320;
S32 get_panel_min_width(LLLayoutStack* stack, LLPanel* panel)
{
@@ -672,7 +673,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
}
const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth();
- const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth();
+ const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar);
if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width)
{
// we have some space to decrease chatbar panel
@@ -748,8 +749,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth();
const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth();
- const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth();
- const S32 chatbar_panel_max_width = mNearbyChatBar->getMaxWidth();
+ const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar);
const S32 chatbar_available_shrink_width = chatbar_panel_width - chatbar_panel_min_width;
const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width;
@@ -826,9 +826,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
// how many space can nearby chatbar take?
S32 chatbar_panel_width_ = mNearbyChatBar->getRect().getWidth();
- if (delta_width > 0 && chatbar_panel_width_ < chatbar_panel_max_width)
+ if (delta_width > 0 && chatbar_panel_width_ < MAX_CHAT_BAR_WIDTH)
{
- S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_;
+ S32 delta_panel_max = MAX_CHAT_BAR_WIDTH - chatbar_panel_width_;
S32 delta_panel = llmin(delta_width, delta_panel_max);
lldebugs << "Unprocesed delta width: " << delta_width
<< ", can be applied to chatbar: " << delta_panel_max
@@ -1186,7 +1186,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible
{
// Calculate the possible shrunk width as difference between current and minimal widths
const S32 chatbar_shrunk_width =
- mNearbyChatBar->getRect().getWidth() - mNearbyChatBar->getMinWidth();
+ mNearbyChatBar->getRect().getWidth() - get_panel_min_width(mToolbarStack, mNearbyChatBar);
const S32 sum_of_min_widths =
get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_CAMERA]) +
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index ad98a29fb2..483756b16e 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -407,32 +407,6 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask )
return handled;
}
-S32 LLNearbyChatBar::getMinWidth() const
-{
- static S32 min_width = -1;
-
- if (min_width < 0)
- {
- const std::string& s = getString("min_width");
- min_width = !s.empty() ? atoi(s.c_str()) : 300;
- }
-
- return min_width;
-}
-
-S32 LLNearbyChatBar::getMaxWidth() const
-{
- static S32 max_width = -1;
-
- if (max_width < 0)
- {
- const std::string& s = getString("max_width");
- max_width = !s.empty() ? atoi(s.c_str()) : 510;
- }
-
- return max_width;
-}
-
BOOL LLNearbyChatBar::matchChatTypeTrigger(const std::string& in_str, std::string* out_str)
{
U32 in_len = in_str.length();
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index d9a7403611..559c1ee091 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -117,9 +117,6 @@ public:
static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
- S32 getMinWidth() const;
- S32 getMaxWidth() const;
-
protected:
static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str);
static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata);
diff --git a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml
index 2aa7ed7c6c..949cbcbd7b 100644
--- a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <string name="min_width">
- 192
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor label="Klik her for at chatte." name="chat_box" tool_tip="Tryk på enter for at tale, Ctrl-Enter for at råbe."/>
<button name="show_nearby_chat" tool_tip="Viser/skjuler log for chat nærved"/>
</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml
index 5e6e460c65..08cc0b0ec8 100644
--- a/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <string name="min_width">
- 192
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor label="Zum Chatten hier klicken." name="chat_box" tool_tip="Eingabe drücken, um zu sprechen, Strg-Eingabe drücken, um zu Rufen."/>
<button name="show_nearby_chat" tool_tip="Protokoll des Chats in der Nähe anzeigen/ausblenden"/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 088f098f85..1d99de1fa7 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -8,12 +8,6 @@
name="chat_bar"
top="21"
width="310">
- <string name="min_width">
- 216
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor
border_style="line"
border_thickness="1"
diff --git a/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml
index 1df45108ab..af2b6e920b 100644
--- a/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <string name="min_width">
- 192
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor label="Pulsa aquí para chatear." name="chat_box" tool_tip="Pulsa Enter para decirlo o Ctrl+Enter para gritarlo"/>
<button name="show_nearby_chat" tool_tip="Muestra o esconde el registro del chat"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml
index 8ed441cbae..82cdf292ab 100644
--- a/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <string name="min_width">
- 192
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor label="Cliquer ici pour chatter." name="chat_box" tool_tip="Appuyer sur Entrée pour dire, Ctrl-Entrée pour crier"/>
<button name="show_nearby_chat" tool_tip="Affiche/Masque le journal de chats près de vous"/>
</panel>
diff --git a/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml
index 0361eb49ed..f7a58581d4 100644
--- a/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <string name="min_width">
- 192
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor label="Clicca qui per la chat." name="chat_box" tool_tip="Premi Invio per dire, Ctrl+Invio per gridare"/>
<button name="show_nearby_chat" tool_tip="Mostra/Nasconde la chat log nei dintorni"/>
</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml
index 3dbabc62be..5998206f27 100644
--- a/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <string name="min_width">
- 192
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor label="ここをクリックしてチャットを開始します。" name="chat_box" tool_tip="Enter キーを押して発言し、Ctrl + Enter キーで叫びます。"/>
<button name="show_nearby_chat" tool_tip="近くのチャットログを表示・非表示"/>
</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml
index a8c74d50e4..9b993488be 100644
--- a/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="chat_bar">
- <string name="min_width">
- 192
- </string>
- <string name="max_width">
- 320
- </string>
<line_editor label="Clique aqui para bater papo." name="chat_box" tool_tip="Tecle Enter para falar, Ctrl+Enter para gritar"/>
<button name="show_nearby_chat" tool_tip="Mostra/oculta o histórico do bate-papo local"/>
</panel>