summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-03-25 14:11:27 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-03-25 14:11:27 -0700
commitc7906b34fd637d02b638a1cf587be2b413d79243 (patch)
tree3e709f30fa3c21f34a8fe3d24b364c86062bd6b9
parent3528753a3a5e2f569872c49cdf6154833f483245 (diff)
parent44774cd265306c6d29f0a63c0876c7fa7b84311e (diff)
Merge
-rw-r--r--.hgtags2
-rw-r--r--indra/newview/llexternaleditor.cpp34
-rw-r--r--indra/newview/llexternaleditor.h22
-rw-r--r--indra/newview/llfloatertopobjects.cpp2
-rw-r--r--indra/newview/llfloateruipreview.cpp21
-rw-r--r--indra/newview/llpreviewscript.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/floater_ui_preview.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_script_ed.xml4
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml8
-rw-r--r--indra/newview/skins/minimal/xui/en/floater_help_browser.xml10
-rw-r--r--indra/newview/skins/minimal/xui/es/floater_media_browser.xml30
-rw-r--r--indra/newview/skins/minimal/xui/es/floater_web_content.xml14
-rw-r--r--indra/newview/skins/minimal/xui/es/menu_inspect_self_gear.xml18
-rw-r--r--indra/newview/skins/minimal/xui/es/notifications.xml19
-rw-r--r--indra/newview/skins/minimal/xui/es/panel_bottomtray.xml8
-rw-r--r--indra/newview/skins/minimal/xui/es/panel_group_control_panel.xml11
-rw-r--r--indra/newview/skins/minimal/xui/es/panel_login.xml4
17 files changed, 190 insertions, 44 deletions
diff --git a/.hgtags b/.hgtags
index 10be7765c4..a6751aa6a2 100644
--- a/.hgtags
+++ b/.hgtags
@@ -84,3 +84,5 @@ f1827b441e05bf37c68e2c15ebc6d09e9b03f527 2.6.0-start
9283d6d1d7eb71dfe4c330e7c9144857e7356bde 2.6.0-beta1
9283d6d1d7eb71dfe4c330e7c9144857e7356bde DRTVWR-40_2.6.0-beta1
c5bdef3aaa2744626aef3c217ce29e1900d357b3 2.6.1-start
+9e4641f4a7870c0f565a25a2971368d5a29516a1 DRTVWR-41_2.6.0-beta2
+9e4641f4a7870c0f565a25a2971368d5a29516a1 2.6.0-beta2
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index 54968841ab..ed1d7e860a 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -27,6 +27,7 @@
#include "llviewerprecompiledheaders.h"
#include "llexternaleditor.h"
+#include "lltrans.h"
#include "llui.h"
// static
@@ -35,13 +36,13 @@ const std::string LLExternalEditor::sFilenameMarker = "%s";
// static
const std::string LLExternalEditor::sSetting = "ExternalEditor";
-bool LLExternalEditor::setCommand(const std::string& env_var, const std::string& override)
+LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env_var, const std::string& override)
{
std::string cmd = findCommand(env_var, override);
if (cmd.empty())
{
- llwarns << "Empty editor command" << llendl;
- return false;
+ llwarns << "Editor command is empty or not set" << llendl;
+ return EC_NOT_SPECIFIED;
}
// Add the filename marker if missing.
@@ -55,7 +56,7 @@ bool LLExternalEditor::setCommand(const std::string& env_var, const std::string&
if (tokenize(tokens, cmd) < 2) // 2 = bin + at least one arg (%s)
{
llwarns << "Error parsing editor command" << llendl;
- return false;
+ return EC_PARSE_ERROR;
}
// Check executable for existence.
@@ -63,7 +64,7 @@ bool LLExternalEditor::setCommand(const std::string& env_var, const std::string&
if (!LLFile::isfile(bin_path))
{
llwarns << "Editor binary [" << bin_path << "] not found" << llendl;
- return false;
+ return EC_BINARY_NOT_FOUND;
}
// Save command.
@@ -76,16 +77,16 @@ bool LLExternalEditor::setCommand(const std::string& env_var, const std::string&
}
llinfos << "Setting command [" << bin_path << " " << mArgs << "]" << llendl;
- return true;
+ return EC_SUCCESS;
}
-bool LLExternalEditor::run(const std::string& file_path)
+LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path)
{
std::string args = mArgs;
if (mProcess.getExecutable().empty() || args.empty())
{
llwarns << "Editor command not set" << llendl;
- return false;
+ return EC_NOT_SPECIFIED;
}
// Substitute the filename marker in the command with the actual passed file name.
@@ -111,7 +112,22 @@ bool LLExternalEditor::run(const std::string& file_path)
mProcess.orphan();
}
- return result == 0;
+ return result == 0 ? EC_SUCCESS : EC_FAILED_TO_RUN;
+}
+
+// static
+std::string LLExternalEditor::getErrorMessage(EErrorCode code)
+{
+ switch (code)
+ {
+ case EC_SUCCESS: return LLTrans::getString("ok");
+ case EC_NOT_SPECIFIED: return LLTrans::getString("ExternalEditorNotSet");
+ case EC_PARSE_ERROR: return LLTrans::getString("ExternalEditorCommandParseError");
+ case EC_BINARY_NOT_FOUND: return LLTrans::getString("ExternalEditorNotFound");
+ case EC_FAILED_TO_RUN: return LLTrans::getString("ExternalEditorFailedToRun");
+ }
+
+ return LLTrans::getString("Unknown");
}
// static
diff --git a/indra/newview/llexternaleditor.h b/indra/newview/llexternaleditor.h
index 6ea210d5e2..ef5db56c6e 100644
--- a/indra/newview/llexternaleditor.h
+++ b/indra/newview/llexternaleditor.h
@@ -42,6 +42,14 @@ class LLExternalEditor
public:
+ typedef enum e_error_code {
+ EC_SUCCESS, /// No error.
+ EC_NOT_SPECIFIED, /// Editor path not specified.
+ EC_PARSE_ERROR, /// Editor command parsing error.
+ EC_BINARY_NOT_FOUND, /// Could find the editor binary (missing or not quoted).
+ EC_FAILED_TO_RUN, /// Could not execute the editor binary.
+ } EErrorCode;
+
/**
* Set editor command.
*
@@ -51,19 +59,25 @@ public:
* First tries the override, then a predefined setting (sSetting),
* then the environment variable.
*
- * @return Command if found, empty string otherwise.
+ * @return EC_SUCCESS if command is valid and refers to an existing executable,
+ * EC_NOT_SPECIFIED or EC_FAILED_TO_RUNan on error.
*
* @see sSetting
*/
- bool setCommand(const std::string& env_var, const std::string& override = LLStringUtil::null);
+ EErrorCode setCommand(const std::string& env_var, const std::string& override = LLStringUtil::null);
/**
* Run the editor with the given file.
*
* @param file_path File to edit.
- * @return true on success, false on error.
+ * @return EC_SUCCESS on success, error code on error.
+ */
+ EErrorCode run(const std::string& file_path);
+
+ /**
+ * Get a meaningful error message for the given status code.
*/
- bool run(const std::string& file_path);
+ static std::string getErrorMessage(EErrorCode code);
private:
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 2aaf403d5f..19f6038b56 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -185,7 +185,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
have_extended_data = true;
msg->getU32("DataExtended", "TimeStamp", time_stamp, block);
msg->getF32("DataExtended", "MonoScore", mono_score, block);
- msg->getS32(_PREHASH_ReportData,"PublicURLs",public_urls,block);
+ msg->getS32("DataExtended", "PublicURLs", public_urls, block);
}
LLSD element;
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 11b3379814..0d8601410a 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -1037,18 +1037,29 @@ void LLFloaterUIPreview::onClickEditFloater()
cmd_override = bin + " " + args;
}
}
- if (!mExternalEditor.setCommand("LL_XUI_EDITOR", cmd_override))
+
+ LLExternalEditor::EErrorCode status = mExternalEditor.setCommand("LL_XUI_EDITOR", cmd_override);
+ if (status != LLExternalEditor::EC_SUCCESS)
{
- std::string warning = "Select an editor by setting the environment variable LL_XUI_EDITOR "
- "or the ExternalEditor setting or specifying its path in the \"Editor Path\" field.";
+ std::string warning;
+
+ if (status == LLExternalEditor::EC_NOT_SPECIFIED) // Use custom message for this error.
+ {
+ warning = getString("ExternalEditorNotSet");
+ }
+ else
+ {
+ warning = LLExternalEditor::getErrorMessage(status);
+ }
+
popupAndPrintWarning(warning);
return;
}
// Run the editor.
- if (!mExternalEditor.run(file_path))
+ if (mExternalEditor.run(file_path) != LLExternalEditor::EC_SUCCESS)
{
- popupAndPrintWarning("Failed to run editor");
+ popupAndPrintWarning(LLExternalEditor::getErrorMessage(status));
return;
}
}
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 22ff362b5a..b19bf5d234 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -956,16 +956,31 @@ void LLScriptEdCore::openInExternalEditor()
// Open it in external editor.
{
LLExternalEditor ed;
+ LLExternalEditor::EErrorCode status;
+ std::string msg;
- if (!ed.setCommand("LL_SCRIPT_EDITOR"))
+ status = ed.setCommand("LL_SCRIPT_EDITOR");
+ if (status != LLExternalEditor::EC_SUCCESS)
{
- std::string msg = "Select an editor by setting the environment variable LL_SCRIPT_EDITOR "
- "or the ExternalEditor setting"; // *TODO: localize
+ if (status == LLExternalEditor::EC_NOT_SPECIFIED) // Use custom message for this error.
+ {
+ msg = getString("external_editor_not_set");
+ }
+ else
+ {
+ msg = LLExternalEditor::getErrorMessage(status);
+ }
+
LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", msg));
return;
}
- ed.run(filename);
+ status = ed.run(filename);
+ if (status != LLExternalEditor::EC_SUCCESS)
+ {
+ msg = LLExternalEditor::getErrorMessage(status);
+ LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", msg));
+ }
}
}
diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
index 12c4561753..3921cfcd2c 100644
--- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
@@ -12,6 +12,10 @@
title="XUI PREVIEW TOOL"
translate="false"
width="750">
+ <string name="ExternalEditorNotSet">
+Select an editor by setting the environment variable LL_XUI_EDITOR
+or the ExternalEditor setting
+or specifying its path in the "Editor Path" field.</string>
<panel
bottom="640"
follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index 627b12cfe1..8d42024386 100644
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -28,6 +28,10 @@
name="Title">
Script: [NAME]
</panel.string>
+ <panel.string
+ name="external_editor_not_set">
+ Select an editor by setting the environment variable LL_SCRIPT_EDITOR or the ExternalEditor setting.
+ </panel.string>
<menu_bar
bg_visible="false"
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index b7bf2526ab..a39832bbc5 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3312,6 +3312,14 @@ Abuse Report</string>
<string name="DeleteItem">Delete selected item?</string>
<string name="EmptyOutfitText">There are no items in this outfit</string>
+
+ <!-- External editor status codes -->
+ <string name="ExternalEditorNotSet">Select an editor using the ExternalEditor setting.</string>
+ <string name="ExternalEditorNotFound">Cannot find the external editor you specified.
+Try enclosing path to the editor with double quotes.
+(e.g. "/path to my/editor" "%s")</string>
+ <string name="ExternalEditorCommandParseError">Error parsing the external editor command.</string>
+ <string name="ExternalEditorFailedToRun">External editor failed to run.</string>
<!-- Key names begin -->
<string name="Esc">Esc</string>
diff --git a/indra/newview/skins/minimal/xui/en/floater_help_browser.xml b/indra/newview/skins/minimal/xui/en/floater_help_browser.xml
index eddfe41c25..cc551f7d58 100644
--- a/indra/newview/skins/minimal/xui/en/floater_help_browser.xml
+++ b/indra/newview/skins/minimal/xui/en/floater_help_browser.xml
@@ -8,12 +8,12 @@
min_height="360"
left="645"
top="10"
- min_width="300"
+ min_width="345"
name="floater_help_browser"
save_rect="true"
single_instance="true"
title="HOW TO"
- width="300">
+ width="335">
<floater.string
name="loading_text">
Loading...
@@ -29,14 +29,14 @@
orientation="vertical"
name="stack1"
top="20"
- width="290">
+ width="325">
<layout_panel
layout="topleft"
left_delta="0"
top_delta="0"
name="external_controls"
user_resize="false"
- width="280">
+ width="325">
<web_browser
trusted_content="true"
bottom="-5"
@@ -46,7 +46,7 @@
name="browser"
top="0"
height="300"
- width="280" />
+ width="325" />
</layout_panel>
</layout_stack>
</floater>
diff --git a/indra/newview/skins/minimal/xui/es/floater_media_browser.xml b/indra/newview/skins/minimal/xui/es/floater_media_browser.xml
new file mode 100644
index 0000000000..a7086c2d6d
--- /dev/null
+++ b/indra/newview/skins/minimal/xui/es/floater_media_browser.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_about" title="EXPLORADOR DE MEDIA">
+ <floater.string name="home_page_url">
+ http://www.secondlife.com
+ </floater.string>
+ <floater.string name="support_page_url">
+ http://support.secondlife.com
+ </floater.string>
+ <layout_stack name="stack1">
+ <layout_panel name="nav_controls">
+ <button label="Atrás" name="back"/>
+ <button label="Adelante" name="forward"/>
+ <button label="Recargar" name="reload"/>
+ <button label="Ir" name="go"/>
+ </layout_panel>
+ <layout_panel name="time_controls">
+ <button label="rebobinar" name="rewind"/>
+ <button label="parar" name="stop"/>
+ <button label="avanzar" name="seek"/>
+ </layout_panel>
+ <layout_panel name="parcel_owner_controls">
+ <button label="Enviar a la parcela la página actual" name="assign"/>
+ </layout_panel>
+ <layout_panel name="external_controls">
+ <button label="Abrir en mi propio navegador" name="open_browser"/>
+ <check_box label="Abrir siempre en mi propio navegador" name="open_always"/>
+ <button label="Cerrar" name="close"/>
+ </layout_panel>
+ </layout_stack>
+</floater>
diff --git a/indra/newview/skins/minimal/xui/es/floater_web_content.xml b/indra/newview/skins/minimal/xui/es/floater_web_content.xml
new file mode 100644
index 0000000000..b012809679
--- /dev/null
+++ b/indra/newview/skins/minimal/xui/es/floater_web_content.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="floater_web_content" title="">
+ <layout_stack name="stack1">
+ <layout_panel name="nav_controls">
+ <button name="back" tool_tip="Navegar hacia atrás"/>
+ <button name="forward" tool_tip="Navegar hacia adelante"/>
+ <button name="stop" tool_tip="Parar navegación"/>
+ <button name="reload" tool_tip="Recargar página"/>
+ <combo_box name="address" tool_tip="Escribe la URL aquí"/>
+ <icon name="media_secure_lock_flag" tool_tip="Navegación segura"/>
+ <button name="popexternal" tool_tip="Abrir la URL actual en tu explorador de escritorio"/>
+ </layout_panel>
+ </layout_stack>
+</floater>
diff --git a/indra/newview/skins/minimal/xui/es/menu_inspect_self_gear.xml b/indra/newview/skins/minimal/xui/es/menu_inspect_self_gear.xml
index c8a1e9d9da..6b76137114 100644
--- a/indra/newview/skins/minimal/xui/es/menu_inspect_self_gear.xml
+++ b/indra/newview/skins/minimal/xui/es/menu_inspect_self_gear.xml
@@ -1,10 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu name="Gear Menu">
- <menu_item_call label="Sentarte" name="sit_down_here"/>
- <menu_item_call label="Levantarme" name="stand_up"/>
- <menu_item_call label="Cambiar vestuario" name="change_outfit"/>
- <menu_item_call label="Mi perfil" name="my_profile"/>
- <menu_item_call label="Mis amigos" name="my_friends"/>
- <menu_item_call label="Mis grupos" name="my_groups"/>
- <menu_item_call label="Depurar las texturas" name="Debug..."/>
-</menu>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<toggleable_menu name="Gear Menu">
+ <menu_item_call label="Sentarme" name="Sit Down Here"/>
+ <menu_item_call label="Levantarme" name="Stand Up"/>
+ <menu_item_call label="Mis amigos" name="Friends..."/>
+ <menu_item_call label="Mi perfil" name="Profile..."/>
+ <menu_item_call label="Depurar texturas" name="Debug..."/>
+</toggleable_menu>
diff --git a/indra/newview/skins/minimal/xui/es/notifications.xml b/indra/newview/skins/minimal/xui/es/notifications.xml
new file mode 100644
index 0000000000..b08ebb5f76
--- /dev/null
+++ b/indra/newview/skins/minimal/xui/es/notifications.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<notifications>
+ <notification name="UserGiveItem">
+ [NAME_SLURL] te ofrece un/a [ITEM_SLURL]. Para utilizar este ítem, cambia al modo Avanzado y búscalo en el inventario. Para cambiar al modo Avanzado, sal de la aplicación, reiníciala y cambia el ajuste de modo en la pantalla de inicio de sesión.
+ <form name="form">
+ <button name="Show" text="Conservar ítem"/>
+ <button name="Discard" text="Rechazar ítem"/>
+ <button name="Mute" text="Bloquear usuario"/>
+ </form>
+ </notification>
+ <notification name="ObjectGiveItem">
+ Un objeto de nombre &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt;, propiedad de [NAME_SLURL], te ofrece un/a [ITEM_SLURL]. Para utilizar este ítem, cambia al modo Avanzado y búscalo en el inventario. Para cambiar al modo Avanzado, sal de la aplicación, reiníciala y cambia el ajuste de modo en la pantalla de inicio de sesión.
+ <form name="form">
+ <button name="Keep" text="Conservar ítem"/>
+ <button name="Discard" text="Rechazar ítem"/>
+ <button name="Mute" text="Bloquear objeto"/>
+ </form>
+ </notification>
+</notifications>
diff --git a/indra/newview/skins/minimal/xui/es/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/es/panel_bottomtray.xml
index 9ab30b5613..f782d66ae7 100644
--- a/indra/newview/skins/minimal/xui/es/panel_bottomtray.xml
+++ b/indra/newview/skins/minimal/xui/es/panel_bottomtray.xml
@@ -11,10 +11,10 @@
<bottomtray_button label="Visión" name="camera_btn" tool_tip="Muestra/Oculta los controles de la cámara"/>
</layout_panel>
<layout_panel name="avatar_and_destinations_panel">
- <radio_group name="avatar_and_destination_btns">
- <radio_item name="destination_btn" value="0"/>
- <radio_item name="avatar_btn" value="1"/>
- </radio_group>
+ <bottomtray_button label="Destinos" name="destination_btn" tool_tip="Muestra la ventana de gente"/>
+ </layout_panel>
+ <layout_panel name="avatar_and_destinations_panel">
+ <bottomtray_button label="Mi avatar" name="avatar_btn"/>
</layout_panel>
<layout_panel name="people_panel">
<bottomtray_button label="Gente" name="show_people_button" tool_tip="Muestra la ventana de gente"/>
diff --git a/indra/newview/skins/minimal/xui/es/panel_group_control_panel.xml b/indra/newview/skins/minimal/xui/es/panel_group_control_panel.xml
new file mode 100644
index 0000000000..e77156b0d4
--- /dev/null
+++ b/indra/newview/skins/minimal/xui/es/panel_group_control_panel.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel name="panel_im_control_panel">
+ <layout_stack name="vertical_stack">
+ <layout_panel name="end_call_btn_panel">
+ <button label="Colgar" name="end_call_btn"/>
+ </layout_panel>
+ <layout_panel name="voice_ctrls_btn_panel">
+ <button label="Abrir los controles de la voz" name="voice_ctrls_btn"/>
+ </layout_panel>
+ </layout_stack>
+</panel>
diff --git a/indra/newview/skins/minimal/xui/es/panel_login.xml b/indra/newview/skins/minimal/xui/es/panel_login.xml
index 161ea19b0e..689a71e277 100644
--- a/indra/newview/skins/minimal/xui/es/panel_login.xml
+++ b/indra/newview/skins/minimal/xui/es/panel_login.xml
@@ -20,8 +20,8 @@
<text name="mode_selection_text">
Modo:
</text>
- <combo_box name="mode_combo">
- <combo_box.item label="Básico (Predeterminado)" name="Basic"/>
+ <combo_box name="mode_combo" tool_tip="Selecciona el modo. Elige Básico para una exploración rápida y fácil y para chatear. Elige Avanzado para tener acceso a más funciones.">
+ <combo_box.item label="Básico" name="Basic"/>
<combo_box.item label="Avanzado" name="Advanced"/>
</combo_box>
</layout_panel>