[Translate] More work yay~
This moves checkboxes on the local chat floater into a centralized flyout Adds persistent setting for whether or not to show muted text in local chat. Translators: Please translate the new flyout button and the strings in floater_chat_history.xml
This commit is contained in:
@@ -785,6 +785,17 @@
|
||||
<key>Value</key>
|
||||
<boolean>1</boolean>
|
||||
</map>
|
||||
<key>SinguShowMutedLocal</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show muted chat in local chat</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>UseWebProfiles</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -93,11 +93,9 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed)
|
||||
// do not automatically open singleton floaters (as result of getInstance())
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chat_history.xml", &getFactoryMap(), /*no_open =*/false);
|
||||
|
||||
LLTextEditor* history_editor_with_mute = getChild<LLTextEditor>("Chat History Editor with mute");
|
||||
getChild<LLUICtrl>("show mutes")->setCommitCallback(boost::bind(&LLFloaterChat::onClickToggleShowMute, this, _2, getChild<LLTextEditor>("Chat History Editor"), history_editor_with_mute));
|
||||
history_editor_with_mute->setVisible(false);
|
||||
getChild<LLUICtrl>("chat_history_open")->setCommitCallback(boost::bind(show_log_browser, "chat", "chat"));
|
||||
getChildView("translate chat")->setEnabled(LLTranslate::isTranslationConfigured());
|
||||
LLComboBox* combo = getChild<LLComboBox>("history_combo");
|
||||
combo->setCommitCallback(boost::bind(&LLFloaterChat::onFlyout, this, combo, _2));
|
||||
adjustDynamics(combo, true);
|
||||
}
|
||||
|
||||
LLFloaterChat::~LLFloaterChat()
|
||||
@@ -337,18 +335,36 @@ void LLFloaterChat::setHistoryCursorAndScrollToEnd()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//static
|
||||
void LLFloaterChat::onClickToggleShowMute(bool show_mute, LLTextEditor* history_editor, LLTextEditor* history_editor_with_mute)
|
||||
void LLFloaterChat::adjustDynamics(LLComboBox* combo, bool init)
|
||||
{
|
||||
history_editor->setVisible(!show_mute);
|
||||
history_editor_with_mute->setVisible(show_mute);
|
||||
(show_mute ? history_editor_with_mute : history_editor)->setCursorAndScrollToEnd();
|
||||
bool translate(gSavedSettings.getBOOL("TranslateChat"));
|
||||
bool muted(gSavedSettings.getBOOL("SinguShowMutedLocal"));
|
||||
if (!init)
|
||||
{
|
||||
combo->remove(getString(translate ? "translate off" : "translate on"));
|
||||
combo->remove(getString(muted ? "show muted text" : "hide muted text"));
|
||||
}
|
||||
|
||||
combo->add(getString(muted ? "hide muted text" : "show muted text"), 1);
|
||||
if (LLTranslate::isTranslationConfigured())
|
||||
combo->add(getString(translate ? "translate on" : "translate off"), 2);
|
||||
}
|
||||
|
||||
void LLFloaterChat::showTranslationCheckbox(bool show)
|
||||
void LLFloaterChat::onFlyout(LLComboBox* ctrl, const LLSD& val)
|
||||
{
|
||||
getChildView("translate chat")->setEnabled(show);
|
||||
if (val.isUndefined())
|
||||
show_log_browser("chat", "chat");
|
||||
else
|
||||
{
|
||||
LLControlVariable* control(gSavedSettings.getControl(val.asInteger() == 1 ? "SinguShowMutedLocal" : "TranslateChat"));
|
||||
control->set(!control->get());
|
||||
adjustDynamics(ctrl);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterChat::showTranslationCheckbox()
|
||||
{
|
||||
adjustDynamics(getChild<LLComboBox>("history_combo"));
|
||||
}
|
||||
|
||||
// Put a line of chat in all the right places
|
||||
|
||||
@@ -70,9 +70,10 @@ public:
|
||||
|
||||
static void triggerAlerts(const std::string& text);
|
||||
|
||||
void onClickToggleShowMute(bool show_mute, class LLTextEditor* history_editor, LLTextEditor* history_editor_with_mute);
|
||||
void adjustDynamics(class LLComboBox* combo, bool init = false);
|
||||
void onFlyout(LLComboBox* ctrl, const LLSD& val);
|
||||
static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata);
|
||||
void showTranslationCheckbox(bool show);
|
||||
void showTranslationCheckbox();
|
||||
static void loadHistory();
|
||||
static void* createSpeakersPanel(void* data);
|
||||
static void* createChatPanel(void* data);
|
||||
|
||||
@@ -315,6 +315,6 @@ void LLPanelTranslationSettings::apply()
|
||||
gSavedSettings.setString("TranslationService", getSelectedService());
|
||||
gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());
|
||||
gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey());
|
||||
LLFloaterChat::getInstance()->showTranslationCheckbox(LLTranslate::isTranslationConfigured());
|
||||
LLFloaterChat::getInstance()->showTranslationCheckbox();
|
||||
}
|
||||
|
||||
|
||||
@@ -1328,7 +1328,7 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
|
||||
std::stringstream str;
|
||||
|
||||
LLSDSerialize::toPrettyXML(sim_features, str);
|
||||
LL_DEBUGS("SimFeatures") << "\n" << str.str() << LL_ENDL;
|
||||
LL_DEBUGS("SimFeatures") << '\n' << str.str() << LL_ENDL;
|
||||
mSimulatorFeatures = sim_features;
|
||||
|
||||
mFeaturesReceived = true;
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
<combo_box label="Gesten" name="Gesture">
|
||||
<combo_item name="Gestures">Gesten</combo_item>
|
||||
</combo_box>
|
||||
<check_box label="Stummgeschalteten Text anzeigen" name="show mutes"/>
|
||||
<!--check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Translate Chat (powered by Google)" name="translate chat" width="100"/-->
|
||||
<button label="Teleport Historie" name="chat_history_open" tool_tip="Klicken Sie hier zur Anzeige des Gesprächsverlaufs im externen Editor"/>
|
||||
<button label="< <" label_selected="> >" name="toggle_active_speakers_btn" tool_tip="Klicken Sie hier, um eine Liste der aktiven Teilnehmer an dieser IM-Sitzung anzuzeigen."/>
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
<string name="voice_icon">icn_voice-localchat.tga</string>
|
||||
<string name="IM_logging_string">-- Logging Enabled --</string>
|
||||
<string name="IM_end_log_string">-- End of Log --</string>
|
||||
<string name="show muted text" value="Show Muted Text"/>
|
||||
<string name="hide muted text" value="Hide Muted Text"/>
|
||||
<string name="translate on" value="Translate (on)"/>
|
||||
<string name="translate off" value="Translate (off)"/>
|
||||
<layout_stack border="false" bottom="0" follows="left|top|right|bottom" height="160" left="0" orientation="horizontal" width="430" name="panels">
|
||||
<layout_panel border="false" bottom="0" height="160" left="0" min_width="275" name="im_contents_panel" width="305">
|
||||
<layout_stack border="false" bottom="0" default_tab_group="1" follows="all" height="160" left="0" orientation="vertical" name="im_contents_stack" width="305">
|
||||
@@ -15,12 +19,10 @@
|
||||
<combo_box follows="left|top" height="18" label="Gestures" left="6" name="Gesture" width="120">
|
||||
<combo_item name="Gestures">Gestures</combo_item>
|
||||
</combo_box>
|
||||
<check_box bottom_delta="-2" enabled="true" follows="left|top" font="SansSerifSmall" height="20" initial_value="false" label="Show Muted Text" left_delta="124" name="show mutes" width="116"/>
|
||||
<check_box bottom_delta="-12" follows="left|top" height="20" label="Translate chat" name="translate chat" width="100"/>
|
||||
<button bottom_delta="2" left_delta="120" follows="left|top" font="SansSerifSmall" height="20" width="100" label="Open History" name="chat_history_open" tool_tip="Click here to open chat history in external editor."/>
|
||||
<flyout_button bottom="-23" height="20" left_delta="124" label="Open History" left="5" name="history_combo" font="SansSerifSmall" width="120" list_position="below"/>
|
||||
<button bottom_delta="0" follows="right|top" height="20" label="< <" label_selected="> >" toggle="true" left="272" name="toggle_active_speakers_btn" right="305" tool_tip="Click here to show a list of active participants in this IM session." width="80"/>
|
||||
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" left="5" max_length="2147483647" name="Chat History Editor" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
|
||||
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" max_length="2147483647" name="Chat History Editor with mute" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true"/>
|
||||
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" left="5" max_length="2147483647" name="Chat History Editor" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true" invisibility_control="SinguShowMutedLocal"/>
|
||||
<text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" bottom="0" enabled="false" follows="left|top|right|bottom" font="SansSerif" height="107" max_length="2147483647" name="Chat History Editor with mute" text_color="ChatHistoryTextColor" track_bottom="true" text_readonly_color="ChatHistoryTextColor" width="300" word_wrap="true" visibility_control="SinguShowMutedLocal"/>
|
||||
</layout_panel>
|
||||
<layout_panel user_resize="false" auto_resize="false" bottom_delta="-25" follows="left|right|bottom" left="5" name="chat_layout_panel" right="-5" tab_group="1" height="25">
|
||||
<panel bottom="5" follows="left|right|bottom" left="5" name="chat_panel" right="-5" top="25">
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
Gestos
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<check_box label="Mostrar Texto Ignorado" name="show mutes"/>
|
||||
<button label="Abrir Historial" name="chat_history_open" tool_tip="Pulsá aquí para abrir el historial de chat en un editor externo." left_delta="150"/>
|
||||
<button label="< <" label_selected="> >" name="toggle_active_speakers_btn" tool_tip="Pulsa aqui para ver la lista de los participantes en esta sesión de MI"/>
|
||||
<text_editor name="Chat History Editor"/>
|
||||
<text_editor name="Chat History Editor with mute"/>
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
<layout_panel name="im_contents_panel">
|
||||
<layout_stack name="im_contents_stack">
|
||||
<layout_panel name="history_panel">
|
||||
<check_box label="Montre le Texte mute" name="show mutes"/>
|
||||
<button label="Historique" name="chat_history_open" tool_tip="" left_delta="150"/>
|
||||
<button name="toggle_active_speakers_btn" tool_tip=""/>
|
||||
</layout_panel>
|
||||
<layout_panel name="chat_layout_panel">
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
Gesture
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<check_box label="Mostra testo mutato" name="show mutes"/>
|
||||
<button label="< <" label_selected="> >" name="toggle_active_speakers_btn" tool_tip="Clicca qui per vedere la lista dei partecipanti attivi in questa sessione IM."/>
|
||||
<panel name="chat_panel">
|
||||
<string name="gesture_label">
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
Gestos
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<check_box label="Mostrar texto silenciado" name="show mutes"/>
|
||||
<button label="< <" label_selected="> >" name="toggle_active_speakers_btn" tool_tip="Clique aqui para mostrar uma lista dos participantes ativos desta sessão de mensagem instantânea."/>
|
||||
<panel name="chat_panel">
|
||||
<string name="gesture_label">
|
||||
|
||||
Reference in New Issue
Block a user