Merge Firestorm LGPL

meow-7.2.2
Ansariel 2017-03-03 19:05:55 +01:00
commit 7e83a4b7e6
14 changed files with 96 additions and 88 deletions

View File

@ -33,6 +33,7 @@
#include "lltimer.h"
//#include "llmemory.h"
#define OPENJPEG_VERSION "2.1" // This actually needs to be in openjpeg.h
struct ndUserdata
{
@ -126,23 +127,16 @@ OPJ_BOOL nd_opj_stream_seek_fn(OPJ_OFF_T p_nb_bytes, void * p_user_data)
return OPJ_TRUE;
}
const char* fallbackEngineInfoLLImageJ2CImpl()
{
static std::string version_string =
std::string("OpenJPEG: 2.1, Runtime: ")
+ opj_version();
return version_string.c_str();
}
// Factory function: see declaration in llimagej2c.cpp
LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl()
{
return new LLImageJ2COJ();
}
void fallbackDestroyLLImageJ2CImpl(LLImageJ2CImpl* impl)
std::string LLImageJ2COJ::getEngineInfo() const
{
delete impl;
impl = NULL;
return std::string("OpenJPEG: " OPENJPEG_VERSION ", Runtime: ")
+ opj_version();
}
// Return string from message, eliminating final \n if present
@ -200,19 +194,19 @@ LLImageJ2COJ::~LLImageJ2COJ()
{
}
BOOL LLImageJ2COJ::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level, int* region)
bool LLImageJ2COJ::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level, int* region)
{
// No specific implementation for this method in the OpenJpeg case
return FALSE;
return false;
}
BOOL LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels)
bool LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels)
{
// No specific implementation for this method in the OpenJpeg case
return FALSE;
return false;
}
BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count)
bool LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count)
{
// <FS:Techwolf Lupindo> texture comment metadata reader
U8* c_data = base.getData();
@ -304,7 +298,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
opj_image_destroy(image);
}
return TRUE; // done
return true; // done
}
// sometimes we get bad data out of the cache - check to see if the decode succeeded
@ -314,8 +308,8 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
{
// if we didn't get the discard level we're expecting, fail
opj_image_destroy(image);
base.mDecoding = FALSE;
return TRUE;
base.mDecoding = false;
return true;
}
}
@ -327,7 +321,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
opj_image_destroy(image);
}
return TRUE;
return true;
}
// Copy image data into our raw image format (instead of the separate channel format
@ -351,6 +345,16 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
raw_image.resize(width, height, channels);
U8 *rawp = raw_image.getData();
// <FS:Ansariel> Port fix for MAINT-4327/MAINT-6584 to OpenJPEG decoder
if (!rawp)
{
base.setLastError("Memory error");
base.decodeFailed();
opj_image_destroy(image);
return true; // done
}
// <FS:Ansariel>
// first_channel is what channel to start copying from
// dest is what channel to copy to. first_channel comes from the
// argument, dest always starts writing at channel zero.
@ -374,18 +378,18 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
LL_DEBUGS("Texture") << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << LL_ENDL;
opj_image_destroy(image);
return TRUE; // done
return true; // done
}
}
/* free image data structure */
opj_image_destroy(image);
return TRUE; // done
return true; // done
}
BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, BOOL reversible)
bool LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, bool reversible)
{
const S32 MAX_COMPS = 5;
opj_cparameters_t parameters; /* compression parameters */
@ -495,7 +499,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con
if (!bSuccess)
{
LL_DEBUGS("Texture") << "Failed to encode image." << LL_ENDL;
return FALSE;
return false;
}
codestream_length = pStreamdata->mOutput.size();
@ -513,7 +517,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con
/* free image data */
opj_image_destroy(image);
return TRUE;
return true;
}
inline S32 extractLong4( U8 const *aBuffer, int nOffset )
@ -573,7 +577,7 @@ bool getMetadataFast( LLImageJ2C &aImage, S32 &aW, S32 &aH, S32 &aComps )
return true;
}
BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base)
bool LLImageJ2COJ::getMetadata(LLImageJ2C &base)
{
//
// FIXME: We get metadata by decoding the ENTIRE image.
@ -589,7 +593,7 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base)
if ( getMetadataFast( base, width, height, img_components ) )
{
base.setSize(width, height, img_components);
return TRUE;
return true;
}
// Do it the old and slow way, decode the image with openjpeg
@ -634,7 +638,7 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base)
if(!image)
{
LL_WARNS() << "ERROR -> getMetadata: failed to decode image!" << LL_ENDL;
return FALSE;
return false;
}
// Copy image data into our raw image format (instead of the separate channel format
@ -647,5 +651,5 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base)
/* free image data structure */
opj_image_destroy(image);
return TRUE;
return true;
}

View File

@ -59,6 +59,7 @@
#include "llwindow.h"
#include "llnotificationsutil.h" // <FS:Zi> Add float LSL color entry widgets
#include <boost/algorithm/string_regex.hpp>
// System includes
#include <sstream>
@ -744,7 +745,7 @@ void LLFloaterColorPicker::updateTextEntry ()
getChild<LLUICtrl>("gspin_lsl")->setValue(( getCurG () ) );
getChild<LLUICtrl>("bspin_lsl")->setValue(( getCurB () ) );
getChild<LLUICtrl>("hex_value")->setValue(llformat("%02x%02x%02x",(S32) (getCurR()*255.0),(S32) (getCurG()*255.0),(S32) (getCurB()*255.0)));
getChild<LLUICtrl>("hex_value")->setValue(llformat("%02x%02x%02x", (S32)(getCurR() * 255.f), (S32)(getCurG() * 255.f), (S32)(getCurB() * 255.f)));
// </FS:Zi>
}
@ -805,7 +806,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
}
// update current RGB (and implicitly HSL)
setCurRgb ( rVal, gVal, bVal );
selectCurRgb ( rVal, gVal, bVal );
updateTextEntry ();
}
@ -816,24 +817,23 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
F32 rVal, gVal, bVal;
getCurRgb ( rVal, gVal, bVal );
std::string hex_string=ctrl->getValue().asString();
std::string hex_string = ctrl->getValue().asString();
if(hex_string.length()!=6)
std::string reg_ex("[[:xdigit:]]{6}");
boost::regex pattern(reg_ex.c_str());
if (!boost::regex_match(hex_string, pattern))
{
return;
}
LLStringUtil::toLower(hex_string);
sscanf(hex_string.c_str(), "%02x%02x%02x", &r, &g, &b);
if(hex_string.find_first_not_of("0123456789abcdef")!=std::string::npos)
return;
sscanf(hex_string.c_str(),"%02x%02x%02x", &r,&g,&b);
rVal=(F32) r/255.0;
gVal=(F32) g/255.0;
bVal=(F32) b/255.0;
rVal = F32(r) / 255.f;
gVal = F32(g) / 255.f;
bVal = F32(b) / 255.f;
// update current RGB (and implicitly HSL)
setCurRgb ( rVal, gVal, bVal );
selectCurRgb ( rVal, gVal, bVal );
updateTextEntry ();
}
@ -1217,11 +1217,11 @@ void LLFloaterColorPicker::onClickCopyLSL ( void* data )
{
if (data)
{
LLFloaterColorPicker* self = ( LLFloaterColorPicker* )data;
LLFloaterColorPicker* self = (LLFloaterColorPicker*)data;
if ( self )
if (self)
{
getWindow()->copyTextToClipboard(utf8str_to_wstring(llformat("<%.3f, %.3f, %.3f>",self->getCurR(),self->getCurG(),self->getCurB())));
getWindow()->copyTextToClipboard(utf8str_to_wstring(llformat("<%.3f, %.3f, %.3f>", self->getCurR(), self->getCurG(), self->getCurB())));
LLNotificationsUtil::add("LSLColorCopiedToClipboard");
}
}

View File

@ -58,7 +58,6 @@ public:
/*virtual*/ ~LLPanelSnapshotPostcard(); // <FS:Ansariel> Store settings at logout
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ S32 notify(const LLSD& info);
private:
/*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; }
@ -80,7 +79,6 @@ private:
void onSend();
bool mHasFirstMsgFocus;
std::string mAgentEmail;
};
static LLPanelInjector<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard");
@ -115,36 +113,19 @@ BOOL LLPanelSnapshotPostcard::postBuild()
// virtual
void LLPanelSnapshotPostcard::onOpen(const LLSD& key)
{
// pick up the user's up-to-date email address
if (mAgentEmail.empty())
// <FS:Ansariel> Fill "From" field
LLLineEditor* from = getChild<LLLineEditor>("name_form");
if (from->getText().empty())
{
gAgent.sendAgentUserInfoRequest();
std::string name_string;
LLAgentUI::buildFullname(name_string);
getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
from->setText(name_string);
}
// </FS:Ansariel>
LLPanelSnapshot::onOpen(key);
}
// virtual
S32 LLPanelSnapshotPostcard::notify(const LLSD& info)
{
if (!info.has("agent-email"))
{
llassert(info.has("agent-email"));
return 0;
}
if (mAgentEmail.empty())
{
mAgentEmail = info["agent-email"].asString();
}
return 1;
}
// virtual
void LLPanelSnapshotPostcard::updateControls(const LLSD& info)
{
@ -197,7 +178,6 @@ void LLPanelSnapshotPostcard::sendPostcard()
if (!url.empty())
{
LLResourceUploadInfo::ptr_t uploadInfo(new LLPostcardUploadInfo(
mAgentEmail,
getChild<LLUICtrl>("name_form")->getValue().asString(),
getChild<LLUICtrl>("to_form")->getValue().asString(),
getChild<LLUICtrl>("subject_form")->getValue().asString(),
@ -260,12 +240,6 @@ void LLPanelSnapshotPostcard::onSend()
return;
}
if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format))
{
LLNotificationsUtil::add("PromptSelfEmail");
return;
}
std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString());
if(subject.empty() || !mHasFirstMsgFocus)
{

View File

@ -40,11 +40,10 @@
///////////////////////////////////////////////////////////////////////////////
LLPostcardUploadInfo::LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo,
LLPostcardUploadInfo::LLPostcardUploadInfo(std::string nameFrom, std::string emailTo,
std::string subject, std::string message, LLVector3d globalPosition,
LLPointer<LLImageFormatted> image, invnUploadFinish_f finish) :
LLBufferedAssetUploadInfo(LLUUID::null, image, finish),
mEmailFrom(emailFrom),
mNameFrom(nameFrom),
mEmailTo(emailTo),
mSubject(subject),
@ -58,7 +57,6 @@ LLSD LLPostcardUploadInfo::generatePostBody()
LLSD postcard = LLSD::emptyMap();
postcard["pos-global"] = mGlobalPosition.getValue();
postcard["to"] = mEmailTo;
postcard["from"] = mEmailFrom;
postcard["name"] = mNameFrom;
postcard["subject"] = mSubject;
postcard["msg"] = mMessage;

View File

@ -53,13 +53,12 @@ private:
class LLPostcardUploadInfo : public LLBufferedAssetUploadInfo
{
public:
LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo,
LLPostcardUploadInfo(std::string nameFrom, std::string emailTo,
std::string subject, std::string message, LLVector3d globalPosition,
LLPointer<LLImageFormatted> image, invnUploadFinish_f finish);
virtual LLSD generatePostBody();
private:
std::string mEmailFrom;
std::string mNameFrom;
std::string mEmailTo;
std::string mSubject;

View File

@ -1,17 +1,23 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_tphistory" title="Teleport History">
<floater name="floater_tphistory" title="テレポート履歴">
<filter_editor label="土地をフィルター" name="Filter" />
<panel name="history_placeholder" />
<panel name="button_panel">
<layout_stack name="bottom_bar_ls0">
<layout_panel name="show_lm_panel">
<layout_stack name="bottom_bar_ls1">
<layout_panel name="teleport_btn_lp">
<button label="テレポート" name="teleport_btn" tool_tip="選択した地域にテレポートします。" />
</layout_panel>
<layout_panel name="chat_btn_lp">
<button label="地図" name="map_btn" tool_tip="該当する地域を世界地図上に表示します。"/>
</layout_panel>
<layout_panel name="chat_btn_lp">
<button label="プロフィールを表示" name="profile_btn" tool_tip="この場所のプロフィールを表示します。" />
</layout_panel>

View File

@ -61,6 +61,7 @@
<menu_item_call label="着用中のアウトフィットに追加する" name="Add To Outfit"/>
<menu_item_call label="アイテムを装着" name="Wear Items" />
<menu_item_call label="着用中のアウトフィットから取り除く" name="Remove From Outfit"/>
<menu_item_call label="アウトフィットリストをクリップボードにコピー" name="Copy outfit list to clipboard" />
<menu_item_call label="オリジナルを探す" name="Find Original"/>
<menu_item_call label="アイテムを除外する" name="Purge Item"/>
<menu_item_call label="アイテムを復元する" name="Restore Item"/>

View File

@ -88,7 +88,10 @@
name="Appearance &gt;">
<pie_slice label="シェイプを編集"
name="Edit My Shape"/>
<pie_separator />
<pie_menu name="ResetMenu" label="リセット &gt;">
<pie_slice label="スケルトンとアニメ" name="Reset Skeleton And Animations" />
<pie_slice label="スケルトン" name="Reset Skeleton" />
</pie_menu>
<pie_slice
label="テクスチャ更新"
name="Texture Refresh"/>

View File

@ -2,5 +2,16 @@
<menu name="Teleport History Gear Context Menu">
<menu_item_call label="フォルダをすべて開く" name="Expand all folders"/>
<menu_item_call label="フォルダをすべて閉じる" name="Collapse all folders"/>
<!-- FS:Beq [timezone support for teleport history] -->
<menu name="TPHistoryTimeZone" label="タイムゾーン選択...">
<menu_item_check name="teleport_history_tz_utc" label="UTC" />
<menu_item_check name="teleport_history_tz_slt" label="SLT" />
<menu_item_check name="teleport_history_tz_local" label="ローカル" />
</menu>
<!-- /FS:Beq [timezone support for teleport history] -->
<menu name="Show Menu" label="表示内容...">
<menu_item_check name="Show Position" label="位置" />
<menu_item_check name="Show Date" label="日付" />
</menu>
<menu_item_call label="テレポートの履歴をクリア" name="Clear Teleport History"/>
</menu>

View File

@ -575,8 +575,9 @@
<menu_item_call label="SIMの仕様を周辺チャットに書き出す" name="DumpSimFeaturesToChat" />
</menu>
<menu label="UI" name="UI">
<menu_item_call label="メディアブラウザ" name="Media Browser"/>
<menu_item_call label="メディアブラウザのテスト" name="Web Browser Test" />
<menu_item_check label="地域再起動のテスト..." name="Region Restart Test" />
<menu_item_call label="Web コンテンツブラウザ" name="Web Content Browser" shortcut="control|shift|Z" />
<menu_item_call label="FB 接続テスト" name="FB Connect Test" />
<menu_item_call label="SelectMgr をダンプ" name="Dump SelectMgr"/>
<menu_item_call label="持ち物の出力" name="Dump Inventory"/>

View File

@ -3981,8 +3981,10 @@ M キーを押して変更します。
</form>
</notification>
<notification name="ModeChange" label="">
モードの変更にはビューワの終了と再起動が必要です。
<usetemplate name="okcancelbuttons" yestext="終了する" notext="終了しない"/>
モードの変更にはビューワの終了と再起動が必要です。
モードを変更して終了しますか?
<usetemplate name="okcancelbuttons" yestext="OK" notext="取り消し"/>
</notification>
<notification label="" name="NoClassifieds">
クラシファイド広告の作成と編集はアドバンスモードでのみ利用できます。終了してモードを変更しますか?モードはログイン画面で選択できます。

View File

@ -7,6 +7,9 @@
<menu_button name="plus_btn" />
<button name="unblock_btn" tool_tip="住人やオブジェクトをブロックリストから除外します" />
</panel>
<text name="block_limit">
ブロック件数: [COUNT] (最大 [LIMIT])
</text>
<fs_scroll_list name="block_list">
<fs_scroll_list.columns name="item_name" label="名前" />
<fs_scroll_list.columns name="item_type" label="種類" />

View File

@ -123,7 +123,8 @@
<check_box label="名前をクリックするとアバターのプロフィールをすぐに表示" name="FSInspectAvatarSlurlOpensProfile" tool_tip="Iここにチェックを入れると、名前の表示されているリンクをクリックすると Firestorm はそのアバターのプロフィールを表示します。" />
<check_box label="Webのプロフィールをデフォルトで使用" name="FSUseWebProfiles" tool_tip="プロフィールを表示するのに、V1形式のパネルではなく、Webページのプロフィールを使用します。"/>
<check_box label="無視リストが自動的に開かないようにする" name="FSDisableBlockListAutoOpen" tool_tip="アバターやオブジェクトをブロックする時に、無視リストが自動的に開かないようにします。" />
<check_box label="「コミュニケーション」メニューの「フレンド」と「所属グループ」をV3形式のウィンドウで開く" name="FSUseV2Friends" tool_tip="ここにチェックを入れると、「フレンド」や「所属グループ」を「人」パネルで開くようになります。チェックを入れない場合は、「連絡先」パネルで開きます。"/>
<check_box label="「コミュニケーション」メニューの「フレンド」と「所属グループ」をV5形式のウィンドウで開く" name="FSUseV2Friends" tool_tip="ここにチェックを入れると、「フレンド」や「所属グループ」を「人」パネルで開くようになります。チェックを入れない場合は、「連絡先」パネルで開きます。"/>
<check_box label="古いタイプのオブジェクト・プロパティを使用" name="FSUseLegacyObjectProperties" tool_tip="ここにチェックを入れると、オブジェクトのプロパティを開く時に、古いタイプのオブジェクト・プロパティが使用されます。"/>
<text name="standalone_textbox">
次の項目に独立したウィンドウを使用:
</text>

View File

@ -5,6 +5,11 @@
<fs_scroll_list.columns name="item_type" label="種類" />
<fs_scroll_list.columns name="item_mute_type" />
</fs_scroll_list>
<text name="block_limit">
ブロック件数: [COUNT] (最大 [LIMIT])
</text>
<layout_stack name="block_list_sidetray_main">
<!-- will be shown or hidden in code, depending on whether this
is a sub tab or standalone panel -Zi -->