Merge
commit
c7906b34fd
2
.hgtags
2
.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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
bool run(const std::string& file_path);
|
||||
EErrorCode run(const std::string& file_path);
|
||||
|
||||
/**
|
||||
* Get a meaningful error message for the given status code.
|
||||
*/
|
||||
static std::string getErrorMessage(EErrorCode code);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 <nolink>[OBJECTFROMNAME]</nolink>, 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>
|
||||
|
|
@ -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"/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue