Conflicts:
	indra/llplugin/llplugininstance.cpp
	indra/llwindow/llwindowsdl.cpp
	indra/llwindow/llwindowsdl.h
	indra/newview/llpreviewnotecard.cpp
	indra/newview/llviewerwindow.h
This commit is contained in:
Siana Gearz
2011-10-03 16:10:35 +02:00
40 changed files with 986 additions and 591 deletions

View File

@@ -28,6 +28,11 @@
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#if LL_LINUX && defined(LL_STANDALONE)
#include <dlfcn.h>
#include <apr_portable.h>
#endif
#include "linden_common.h"
#include "apr_pools.h"
@@ -85,9 +90,15 @@ void LLImageJ2C::openDSO()
j2cimpl_dso_memory_pool.create();
//attempt to load the shared library
#if LL_LINUX && defined(LL_STANDALONE)
void *dso_handle = dlopen(dso_path.c_str(), RTLD_NOW | RTLD_GLOBAL);
rv = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&j2cimpl_dso_handle,
dso_handle, j2cimpl_dso_memory_pool());
#else
rv = apr_dso_load(&j2cimpl_dso_handle,
dso_path.c_str(),
j2cimpl_dso_memory_pool());
#endif
//now, check for success
if ( rv == APR_SUCCESS )

View File

@@ -65,6 +65,9 @@ endif (NOT WORD_SIZE EQUAL 32)
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
add_library (llplugin ${llplugin_SOURCE_FILES})
if(LINUX AND STANDALONE)
target_link_libraries (llplugin rt dl)
endif(LINUX AND STANDALONE)
add_dependencies(llplugin prepare)

View File

@@ -32,6 +32,10 @@
*
* @endcond
*/
#if LL_LINUX && defined(LL_STANDALONE)
#include <dlfcn.h>
#include <apr_portable.h>
#endif
#include "linden_common.h"
@@ -83,16 +87,25 @@ int LLPluginInstance::load(std::string &plugin_file)
{
pluginInitFunction init_function = NULL;
#if LL_LINUX && defined(LL_STANDALONE)
void *dso_handle = dlopen(plugin_file.c_str(), RTLD_NOW | RTLD_GLOBAL);
int result = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&mDSOHandle,
dso_handle, AIAPRRootPool::get()());
#else
int result = apr_dso_load(&mDSOHandle,
plugin_file.c_str(),
LLAPRRootPool::get()());
#endif
if(result != APR_SUCCESS)
{
char buf[1024];
apr_dso_error(mDSOHandle, buf, sizeof(buf));
#if LL_LINUX && defined(LL_STANDALONE)
LL_WARNS("Plugin") << "plugin load " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL;
#else
LL_WARNS("Plugin") << "apr_dso_load of " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL;
#endif
}
if(result == APR_SUCCESS)

View File

@@ -40,6 +40,7 @@
#include "llpluginmessageclasses.h"
#if LL_LINUX
#include <boost/program_options/parsers.hpp>
#include <boost/tokenizer.hpp>
#endif
#include "llapr.h"
@@ -406,7 +407,23 @@ void LLPluginProcessParent::idle(void)
std::string const terminal_command = (env = getenv("LL_DEBUG_TERMINAL_COMMAND")) ? env : "/usr/bin/xterm -geometry 160x24+0+0 -e %s";
char const* const gdb_path = (env = getenv("LL_DEBUG_GDB_PATH")) ? env : "/usr/bin/gdb";
cmd << gdb_path << " -n /proc/" << mProcess.getProcessID() << "/exe " << mProcess.getProcessID();
std::vector<std::string> tokens = boost::program_options::split_unix(terminal_command, " ");
typedef boost::tokenizer< boost::escaped_list_separator<
char>, typename std::basic_string<
char>::const_iterator,
std::basic_string<char> > tokenizerT;
tokenizerT tok(terminal_command.begin(),
terminal_command.end(),
boost::escaped_list_separator< char >("\\",
" ", "'\""));
std::vector< std::basic_string<char> > tokens;
for (typename tokenizerT::iterator
cur_token(tok.begin()), end_token(tok.end());
cur_token != end_token; ++cur_token) {
if (!cur_token->empty())
tokens.push_back(*cur_token);
}
std::vector<std::string>::iterator token = tokens.begin();
mDebugger.setExecutable(*token);
while (++token != tokens.end())

View File

@@ -2418,6 +2418,12 @@ BOOL LLTextEditor::handleEditKey(const KEY key, const MASK mask)
}
}
if( handled )
{
// take selection to 'primary' clipboard
updatePrimary();
}
return handled;
}

View File

@@ -49,6 +49,7 @@ set(llwindow_HEADER_FILES
set(viewer_SOURCE_FILES
llwindow.cpp
llmousehandler.cpp
)
set(viewer_HEADER_FILES

View File

@@ -0,0 +1,58 @@
/**
* @file llmousehandler.cpp
* @brief LLMouseHandler class implementation
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llmousehandler.h"
//virtual
BOOL LLMouseHandler::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
{
BOOL handled = FALSE;
if (down)
{
switch (clicktype)
{
case CLICK_LEFT: handled = handleMouseDown(x, y, mask); break;
case CLICK_RIGHT: handled = handleRightMouseDown(x, y, mask); break;
case CLICK_MIDDLE: handled = handleMiddleMouseDown(x, y, mask); break;
case CLICK_DOUBLELEFT: handled = handleDoubleClick(x, y, mask); break;
default:
llwarns << "Unhandled enum." << llendl;
}
}
else
{
switch (clicktype)
{
case CLICK_LEFT: handled = handleMouseUp(x, y, mask); break;
case CLICK_RIGHT: handled = handleRightMouseUp(x, y, mask); break;
case CLICK_MIDDLE: handled = handleMiddleMouseUp(x, y, mask); break;
case CLICK_DOUBLELEFT: handled = handleDoubleClick(x, y, mask); break;
default:
llwarns << "Unhandled enum." << llendl;
}
}
return handled;
}

View File

@@ -33,9 +33,10 @@
#ifndef LL_MOUSEHANDLER_H
#define LL_MOUSEHANDLER_H
#include "llstring.h"
#include "linden_common.h"
#include "llrect.h"
// Abstract interface.
// Mostly-abstract interface.
// Intended for use via multiple inheritance.
// A class may have as many interfaces as it likes, but never needs to inherit one more than once.
@@ -49,13 +50,23 @@ public:
SHOW_IF_NOT_BLOCKED,
SHOW_ALWAYS,
} EShowToolTip;
typedef enum {
CLICK_LEFT,
CLICK_MIDDLE,
CLICK_RIGHT,
CLICK_DOUBLELEFT
} EClickType;
virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down);
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleHover(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) = 0;
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleHover(S32 x, S32 y, MASK mask) = 0;
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks) = 0;
virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen) = 0;
virtual EShowToolTip getShowToolTip() { return SHOW_IF_NOT_BLOCKED; };
virtual const std::string& getName() const = 0;

View File

@@ -1372,7 +1372,7 @@ BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &dst)
BOOL LLWindowSDL::copyTextToPrimary(const LLWString &s)
{
return FALSE; // unsupported
return FALSE; // unsupported
}
#endif // LL_GTK

View File

@@ -82,6 +82,7 @@ public:
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
/*virtual*/ BOOL copyTextToClipboard(const LLWString & src);
@@ -89,7 +90,7 @@ public:
/*virtual*/ BOOL isPrimaryTextAvailable();
/*virtual*/ BOOL pasteTextFromPrimary(LLWString &dst);
/*virtual*/ BOOL copyTextToPrimary(const LLWString & src);
/*virtual*/ void flashIcon(F32 seconds);
/*virtual*/ F32 getGamma();
/*virtual*/ BOOL setGamma(const F32 gamma); // Set the gamma

View File

@@ -232,6 +232,7 @@ set(viewer_SOURCE_FILES
llfloaterproperties.cpp
llfloaterregioninfo.cpp
llfloaterreporter.cpp
llfloatersearchreplace.cpp
llfloaterscriptdebug.cpp
llfloatersellland.cpp
llfloatersettingsdebug.cpp
@@ -714,6 +715,7 @@ set(viewer_HEADER_FILES
llfloaterproperties.h
llfloaterregioninfo.h
llfloaterreporter.h
llfloatersearchreplace.h
llfloaterscriptdebug.h
llfloatersellland.h
llfloatersettingsdebug.h

View File

@@ -212,7 +212,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
<integer>1</integer>
</map>
<key>MediaFilterRect</key>
<map>

View File

@@ -116,10 +116,13 @@ fi
export VIEWER_BINARY='singularity-do-not-run-directly'
BINARY_TYPE=$(expr match "$(file -b bin/$VIEWER_BINARY)" '\(.*executable\)')
QPP=qt4/plugins/imageformats/
if [ "${BINARY_TYPE}" == "ELF 64-bit LSB executable" ]; then
export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib64:"`pwd`"/lib32:"${LD_LIBRARY_PATH}"'
QTPLUGINS=/usr/lib64/$QPP:/lib64/$QPP:/usr/local/lib64/$QPP
export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib64:"`pwd`"/lib32:$QTPLUGINS:"${LD_LIBRARY_PATH}"'
else
export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"${LD_LIBRARY_PATH}"'
QTPLUGINS=/usr/lib/$QPP:/lib/$QPP:/usr/local/lib/$QPP
export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:$QTPLUGINS:"${LD_LIBRARY_PATH}"'
fi
export SL_CMD='$LL_WRAPPER bin/$VIEWER_BINARY'

View File

@@ -32,6 +32,11 @@
#if LL_DBUS_ENABLED
#ifdef LL_STANDALONE
#include <dlfcn.h>
#include <apr_portable.h>
#endif
#include "linden_common.h"
extern "C" {
@@ -71,9 +76,17 @@ bool grab_dbus_syms(std::string dbus_dso_name)
//attempt to load the shared library
apr_pool_create(&sSymDBUSDSOMemoryPool, NULL);
#ifdef LL_STANDALONE
void *dso_handle = dlopen(dbus_dso_name.c_str(), RTLD_NOW | RTLD_GLOBAL);
rv = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&sSymDBUSDSOHandle,
dso_handle, sSymDBUSDSOMemoryPool);
if ( APR_SUCCESS == rv )
#else
if ( APR_SUCCESS == (rv = apr_dso_load(&sSymDBUSDSOHandle,
dbus_dso_name.c_str(),
sSymDBUSDSOMemoryPool) ))
#endif
{
INFOMSG("Found DSO: %s", dbus_dso_name.c_str());

View File

@@ -0,0 +1,114 @@
#include "llviewerprecompiledheaders.h"
#include "llcheckboxctrl.h"
#include "llfocusmgr.h"
#include "lluictrlfactory.h"
#include "llfloatersearchreplace.h"
const S32 SEARCH_REPLACE_WIDTH = 300;
const S32 SEARCH_REPLACE_HEIGHT = 120;
const std::string SEARCH_REPLACE_TITLE = "Search and Replace";
LLFloaterSearchReplace* LLFloaterSearchReplace::sInstance = NULL;
LLFloaterSearchReplace::LLFloaterSearchReplace() : mEditor(NULL),
LLFloater(std::string("searchreplace"), LLRect(0, 0, SEARCH_REPLACE_WIDTH, SEARCH_REPLACE_HEIGHT), SEARCH_REPLACE_TITLE)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_search_replace.xml");
}
LLFloaterSearchReplace::~LLFloaterSearchReplace()
{
sInstance = NULL;
}
void LLFloaterSearchReplace::open()
{
LLFloater::open();
if (mEditor)
{
bool fReadOnly = mEditor->isReadOnly();
childSetEnabled("replace_label", !fReadOnly);
childSetEnabled("replace_text", !fReadOnly);
childSetEnabled("replace_btn", !fReadOnly);
childSetEnabled("replace_all_btn", !fReadOnly);
}
childSetFocus("search_text", TRUE);
}
BOOL LLFloaterSearchReplace::postBuild()
{
childSetAction("search_btn", onBtnSearch, this);
childSetAction("replace_btn", onBtnReplace, this);
childSetAction("replace_all_btn", onBtnReplaceAll, this);
setDefaultBtn("search_btn");
return TRUE;
}
void LLFloaterSearchReplace::show(LLTextEditor* editor)
{
if (!sInstance)
{
sInstance = new LLFloaterSearchReplace();
}
if ( (sInstance) && (editor) )
{
sInstance->mEditor = editor;
LLFloater* newdependee, *olddependee = sInstance->getDependee();
LLView* viewp = editor->getParent();
while (viewp)
{
newdependee = dynamic_cast<LLFloater*>(viewp);
if (newdependee)
{
if (newdependee != olddependee)
{
if (olddependee)
olddependee->removeDependentFloater(sInstance);
if (!newdependee->getHost())
newdependee->addDependentFloater(sInstance);
else
newdependee->getHost()->addDependentFloater(sInstance);
}
break;
}
viewp = viewp->getParent();
}
sInstance->open();
}
}
void LLFloaterSearchReplace::onBtnSearch(void* userdata)
{
if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) )
return;
LLCheckBoxCtrl* caseChk = sInstance->getChild<LLCheckBoxCtrl>("case_text");
sInstance->mEditor->selectNext(sInstance->childGetText("search_text"), caseChk->get());
}
void LLFloaterSearchReplace::onBtnReplace(void* userdata)
{
if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) )
return;
LLCheckBoxCtrl* caseChk = sInstance->getChild<LLCheckBoxCtrl>("case_text");
sInstance->mEditor->replaceText(sInstance->childGetText("search_text"), sInstance->childGetText("replace_text"), caseChk->get());
}
void LLFloaterSearchReplace::onBtnReplaceAll(void* userdata)
{
if ( (!sInstance) || (!sInstance->mEditor) || (!sInstance->getDependee()) )
return;
LLCheckBoxCtrl* caseChk = sInstance->getChild<LLCheckBoxCtrl>("case_text");
sInstance->mEditor->replaceTextAll(sInstance->childGetText("search_text"), sInstance->childGetText("replace_text"), caseChk->get());
}

View File

@@ -0,0 +1,32 @@
#ifndef LL_LLFLOATERSEARCHREPLACE_H
#define LL_LLFLOATERSEARCHREPLACE_H
#include "llfloater.h"
#include "lltexteditor.h"
class LLFloaterSearchReplace : public LLFloater
{
private:
LLFloaterSearchReplace();
virtual ~LLFloaterSearchReplace();
public:
virtual void open();
virtual BOOL postBuild();
public:
static void show(LLTextEditor* editor);
static void onBtnSearch(void* userdata);
static void onBtnReplace(void* userdata);
static void onBtnReplaceAll(void* userdata);
static LLFloaterSearchReplace* getInstance() { return sInstance; }
private:
LLTextEditor* mEditor;
static LLFloaterSearchReplace* sInstance;
};
#endif // LL_LLFLOATERSEARCHREPLACE_H

View File

@@ -529,6 +529,7 @@ void LLOverlayBar::toggleMediaPlay(void*)
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
LLViewerParcelMedia::sIsUserAction = true;
LLViewerParcelMedia::play(parcel);
}
}
@@ -554,7 +555,8 @@ void LLOverlayBar::toggleMusicPlay(void*)
// stream is stopped, it doesn't return the right thing - commenting out for now.
// if ( gAudiop->isInternetStreamPlaying() == 0 )
{
gAudiop->startInternetStream(parcel->getMusicURL());
LLViewerParcelMedia::sIsUserAction = true;
LLViewerParcelMedia::playStreamingMusic(parcel);
}
}
}

View File

@@ -260,6 +260,9 @@ BOOL LLPanelDisplay::postBuild()
// Avatar Render Mode
mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
mCtrlAvatarImpostors->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
mCtrlAvatarImpostors->setCallbackUserData(this);
mCtrlNonImpostors = getChild<LLSliderCtrl>("AvatarMaxVisible");
//----------------------------------------------------------------------------
// radio set for lighting detail
@@ -417,6 +420,7 @@ void LLPanelDisplay::refresh()
// avatar settings
mAvatarImpostors = gSavedSettings.getBOOL("RenderUseImpostors");
mNonImpostors = gSavedSettings.getS32("RenderAvatarMaxVisible");
mAvatarCloth = gSavedSettings.getBOOL("RenderAvatarCloth");
// Draw distance
@@ -514,6 +518,9 @@ void LLPanelDisplay::refreshEnabledState()
//GI won't do anything with shadows off, but disabling it here is less than intuitive. Ignore shadow setting for now.
mCtrlDeferredGI->setEnabled(mCtrlShadowDetail->getEnabled()/* && gSavedSettings.getS32("RenderShadowDetail") > 0*/);
// Disable max non-impostors slider if avatar impostors are off
mCtrlNonImpostors->setEnabled(gSavedSettings.getBOOL("RenderUseImpostors"));
// Vertex Shaders
// mCtrlShaderEnable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0a
@@ -612,6 +619,7 @@ void LLPanelDisplay::disableUnavailableSettings()
{
mCtrlAvatarImpostors->setEnabled(FALSE);
mCtrlAvatarImpostors->setValue(FALSE);
mCtrlNonImpostors->setEnabled(FALSE);
}
// disabled deferred
if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"))
@@ -654,6 +662,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
llassert(mCtrlAvatarVP != NULL);
llassert(mCtrlShaderEnable != NULL);
llassert(mCtrlAvatarImpostors != NULL);
llassert(mCtrlNonImpostors != NULL);
llassert(mCtrlAvatarCloth != NULL);
llassert(mRadioLightingDetail2 != NULL);
@@ -702,6 +711,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
mCtrlAvatarVP->setVisible(!isHidden);
mCtrlShaderEnable->setVisible(!isHidden);
mCtrlAvatarImpostors->setVisible(!isHidden);
mCtrlNonImpostors->setVisible(!isHidden);
mCtrlAvatarCloth->setVisible(!isHidden);
mRadioLightingDetail2->setVisible(!isHidden);
@@ -752,6 +762,7 @@ void LLPanelDisplay::cancel()
gSavedSettings.setS32("RenderShadowDetail", mShadowDetail);
gSavedSettings.setBOOL("RenderUseImpostors", mAvatarImpostors);
gSavedSettings.setS32("RenderAvatarMaxVisible", mNonImpostors);
gSavedSettings.setBOOL("RenderAvatarCloth", mAvatarCloth);
gSavedSettings.setBOOL("RenderLocalLights", mLocalLights);
@@ -994,6 +1005,11 @@ void LLPanelDisplay::onVertexShaderEnable(LLUICtrl* self, void* data)
void LLPanelDisplay::setHardwareDefaults(void* user_data)
{
LLFeatureManager::getInstance()->applyRecommendedSettings();
LLControlVariable* controlp = gSavedSettings.getControl("RenderAvatarMaxVisible");
if (controlp)
{
controlp->resetToDefault(true);
}
LLFloaterPreference::refreshEnabledGraphics();
}

View File

@@ -106,6 +106,7 @@ protected:
LLSliderCtrl *mCtrlSkyFactor; // LOD for terrain
LLSliderCtrl *mCtrlMaxParticle; // Max Particle
LLSliderCtrl *mCtrlPostProcess; // Max Particle
LLSliderCtrl *mCtrlNonImpostors; // Max non-impostors
LLCheckBoxCtrl *mCtrlBumpShiny;
LLCheckBoxCtrl *mCtrlWindLight;
@@ -162,6 +163,7 @@ protected:
S32 mShadowDetail;
BOOL mAvatarImpostors;
S32 mNonImpostors;
BOOL mAvatarCloth;
S32 mAvatarMode;
BOOL mLocalLights;

View File

@@ -47,6 +47,9 @@
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "lldbstrings.h"
#include "llfloatersearchreplace.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
#include "llagent.h"
#include "llvoavatarself.h"
#include "llselectmgr.h"
@@ -579,6 +582,24 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click)
{
opened_preview->loadAsset();
}
LLFloater* search_floater = LLFloaterSearchReplace::getInstance();
if (search_floater && search_floater->getDependee() == this)
{
LLPreviewNotecard* notecard_preview; LLPreviewLSL* script_preview;
if ((notecard_preview = dynamic_cast<LLPreviewNotecard*>(opened_preview)) != NULL)
{
LLFloaterSearchReplace::show(notecard_preview->getEditor());
}
else if ((script_preview = dynamic_cast<LLPreviewLSL*>(opened_preview)) != NULL)
{
LLFloaterSearchReplace::show(script_preview->getEditor());
}
else
{
search_floater->setVisible(FALSE);
}
}
}
//static

View File

@@ -42,6 +42,7 @@
#include "llassetuploadresponders.h"
#include "llviewerwindow.h"
#include "llbutton.h"
#include "llfloatersearchreplace.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
@@ -112,7 +113,6 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
else
{
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml");
childSetAction("Save",onClickSave,this);
// <edit>
childSetAction("Get Items", onClickGetItems, this);
// </edit>
@@ -126,6 +126,7 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
}
}
}
childSetAction("Save",onClickSave,this);
// only assert shape if not hosted in a multifloater
if (!getHost())
@@ -154,6 +155,8 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
editor->setHandleEditKeysDirectly(TRUE);
}
initMenu();
gAgentCamera.changeCameraToDefault();
}
@@ -223,6 +226,12 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
return TRUE;
}
if ('F' == key && (mask & MASK_CONTROL) && !(mask & (MASK_SHIFT | MASK_ALT)))
{
LLFloaterSearchReplace::show(getChild<LLViewerTextEditor>("Notecard Editor"));
return TRUE;
}
return LLPreview::handleKeyHere(key, mask);
}
@@ -776,4 +785,221 @@ LLTextEditor* LLPreviewNotecard::getEditor()
return getChild<LLViewerTextEditor>("Notecard Editor");
}
void LLPreviewNotecard::initMenu()
{
LLMenuItemCallGL* menuItem = getChild<LLMenuItemCallGL>("Undo");
menuItem->setMenuCallback(onUndoMenu, this);
menuItem->setEnabledCallback(enableUndoMenu);
menuItem = getChild<LLMenuItemCallGL>("Redo");
menuItem->setMenuCallback(onRedoMenu, this);
menuItem->setEnabledCallback(enableRedoMenu);
menuItem = getChild<LLMenuItemCallGL>("Cut");
menuItem->setMenuCallback(onCutMenu, this);
menuItem->setEnabledCallback(enableCutMenu);
menuItem = getChild<LLMenuItemCallGL>("Copy");
menuItem->setMenuCallback(onCopyMenu, this);
menuItem->setEnabledCallback(enableCopyMenu);
menuItem = getChild<LLMenuItemCallGL>("Paste");
menuItem->setMenuCallback(onPasteMenu, this);
menuItem->setEnabledCallback(enablePasteMenu);
menuItem = getChild<LLMenuItemCallGL>("Select All");
menuItem->setMenuCallback(onSelectAllMenu, this);
menuItem->setEnabledCallback(enableSelectAllMenu);
menuItem = getChild<LLMenuItemCallGL>("Deselect");
menuItem->setMenuCallback(onDeselectMenu, this);
menuItem->setEnabledCallback(enableDeselectMenu);
menuItem = getChild<LLMenuItemCallGL>("Search / Replace...");
menuItem->setMenuCallback(onSearchMenu, this);
menuItem->setEnabledCallback(NULL);
}
// static
void LLPreviewNotecard::onSearchMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
LLFloaterSearchReplace::show(editor);
}
}
}
// static
void LLPreviewNotecard::onUndoMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
editor->undo();
}
}
}
// static
void LLPreviewNotecard::onRedoMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
editor->redo();
}
}
}
// static
void LLPreviewNotecard::onCutMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
editor->cut();
}
}
}
// static
void LLPreviewNotecard::onCopyMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
editor->copy();
}
}
}
// static
void LLPreviewNotecard::onPasteMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
editor->paste();
}
}
}
// static
void LLPreviewNotecard::onSelectAllMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
editor->selectAll();
}
}
}
// static
void LLPreviewNotecard::onDeselectMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (self)
{
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (editor)
{
editor->deselect();
}
}
}
// static
BOOL LLPreviewNotecard::enableUndoMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (!self) return FALSE;
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (!editor) return FALSE;
return editor->canUndo();
}
// static
BOOL LLPreviewNotecard::enableRedoMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (!self) return FALSE;
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (!editor) return FALSE;
return editor->canRedo();
}
// static
BOOL LLPreviewNotecard::enableCutMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (!self) return FALSE;
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (!editor) return FALSE;
return editor->canCut();
}
// static
BOOL LLPreviewNotecard::enableCopyMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (!self) return FALSE;
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (!editor) return FALSE;
return editor->canCopy();
}
// static
BOOL LLPreviewNotecard::enablePasteMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (!self) return FALSE;
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (!editor) return FALSE;
return editor->canPaste();
}
// static
BOOL LLPreviewNotecard::enableSelectAllMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (!self) return FALSE;
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (!editor) return FALSE;
return editor->canSelectAll();
}
// static
BOOL LLPreviewNotecard::enableDeselectMenu(void* userdata)
{
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
if (!self) return FALSE;
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
if (!editor) return FALSE;
return editor->canDeselect();
}
// EOF

View File

@@ -45,6 +45,8 @@
class LLTextEditor;
class LLViewerTextEditor;
class LLTextEditor;
class LLMenuBarGL;
class LLButton;
class AIFilePicker;
@@ -117,6 +119,25 @@ protected:
virtual const char *getTitleName() const { return "Note"; }
void initMenu();
static void onSearchMenu(void* userdata);
static void onUndoMenu(void* userdata);
static void onRedoMenu(void* userdata);
static void onCutMenu(void* userdata);
static void onCopyMenu(void* userdata);
static void onPasteMenu(void* userdata);
static void onSelectAllMenu(void* userdata);
static void onDeselectMenu(void* userdata);
static BOOL enableUndoMenu(void* userdata);
static BOOL enableRedoMenu(void* userdata);
static BOOL enableCutMenu(void* userdata);
static BOOL enableCopyMenu(void* userdata);
static BOOL enablePasteMenu(void* userdata);
static BOOL enableSelectAllMenu(void* userdata);
static BOOL enableDeselectMenu(void* userdata);
protected:
LLViewerTextEditor* mEditor;
LLButton* mSaveBtn;

View File

@@ -79,6 +79,7 @@
#include "lldir.h"
#include "llcombobox.h"
//#include "llfloaterchat.h"
#include "llfloatersearchreplace.h"
#include "llviewerstats.h"
#include "llviewertexteditor.h"
#include "llviewerwindow.h"
@@ -136,10 +137,6 @@ const S32 SCRIPT_MIN_HEIGHT =
const S32 MAX_EXPORT_SIZE = 1000;
const S32 SCRIPT_SEARCH_WIDTH = 300;
const S32 SCRIPT_SEARCH_HEIGHT = 120;
const S32 SCRIPT_SEARCH_LABEL_WIDTH = 50;
const S32 SCRIPT_SEARCH_BUTTON_WIDTH = 80;
const S32 TEXT_EDIT_COLUMN_HEIGHT = 16;
const S32 MAX_HISTORY_COUNT = 10;
const F32 LIVE_HELP_REFRESH_TIME = 1.f;
@@ -150,148 +147,6 @@ static bool have_script_upload_cap(LLUUID& object_id)
return object && (! object->getRegion()->getCapability("UpdateScriptTask").empty());
}
/// ---------------------------------------------------------------------------
/// LLFloaterScriptSearch
/// ---------------------------------------------------------------------------
class LLFloaterScriptSearch : public LLFloater
{
public:
LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core);
~LLFloaterScriptSearch();
static void show(LLScriptEdCore* editor_core);
static void onBtnSearch(void* userdata);
void handleBtnSearch();
static void onBtnReplace(void* userdata);
void handleBtnReplace();
static void onBtnReplaceAll(void* userdata);
void handleBtnReplaceAll();
LLScriptEdCore* getEditorCore() { return mEditorCore; }
static LLFloaterScriptSearch* getInstance() { return sInstance; }
void open(); /*Flawfinder: ignore*/
private:
LLScriptEdCore* mEditorCore;
static LLFloaterScriptSearch* sInstance;
};
LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL;
LLFloaterScriptSearch::LLFloaterScriptSearch(std::string title, LLRect rect, LLScriptEdCore* editor_core)
: LLFloater("script search",rect,title), mEditorCore(editor_core)
{
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_search.xml");
childSetAction("search_btn", onBtnSearch,this);
childSetAction("replace_btn", onBtnReplace,this);
childSetAction("replace_all_btn", onBtnReplaceAll,this);
setDefaultBtn("search_btn");
if (!getHost())
{
LLRect curRect = getRect();
translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
}
sInstance = this;
childSetFocus("search_text", TRUE);
// find floater in which script panel is embedded
LLView* viewp = (LLView*)editor_core;
while(viewp)
{
LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
if (floaterp)
{
floaterp->addDependentFloater(this);
break;
}
viewp = viewp->getParent();
}
}
//static
void LLFloaterScriptSearch::show(LLScriptEdCore* editor_core)
{
if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core)
{
sInstance->close();
delete sInstance;
}
if (!sInstance)
{
S32 left = 0;
S32 top = 0;
gFloaterView->getNewFloaterPosition(&left,&top);
// sInstance will be assigned in the constructor.
new LLFloaterScriptSearch("Script Search",LLRect(left,top,left + SCRIPT_SEARCH_WIDTH,top - SCRIPT_SEARCH_HEIGHT),editor_core);
}
sInstance->open(); /*Flawfinder: ignore*/
}
LLFloaterScriptSearch::~LLFloaterScriptSearch()
{
sInstance = NULL;
}
// static
void LLFloaterScriptSearch::onBtnSearch(void *userdata)
{
LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata;
self->handleBtnSearch();
}
void LLFloaterScriptSearch::handleBtnSearch()
{
LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
mEditorCore->mEditor->selectNext(childGetText("search_text"), caseChk->get());
}
// static
void LLFloaterScriptSearch::onBtnReplace(void *userdata)
{
LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata;
self->handleBtnReplace();
}
void LLFloaterScriptSearch::handleBtnReplace()
{
LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
mEditorCore->mEditor->replaceText(childGetText("search_text"), childGetText("replace_text"), caseChk->get());
}
// static
void LLFloaterScriptSearch::onBtnReplaceAll(void *userdata)
{
LLFloaterScriptSearch* self = (LLFloaterScriptSearch*)userdata;
self->handleBtnReplaceAll();
}
void LLFloaterScriptSearch::handleBtnReplaceAll()
{
LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
mEditorCore->mEditor->replaceTextAll(childGetText("search_text"), childGetText("replace_text"), caseChk->get());
}
void LLFloaterScriptSearch::open() /*Flawfinder: ignore*/
{
LLFloater::open(); /*Flawfinder: ignore*/
childSetFocus("search_text", TRUE);
}
/// ---------------------------------------------------------------------------
/// LLScriptEdCore
/// ---------------------------------------------------------------------------
@@ -435,14 +290,6 @@ LLScriptEdCore::LLScriptEdCore(
LLScriptEdCore::~LLScriptEdCore()
{
deleteBridges();
// If the search window is up for this editor, close it.
LLFloaterScriptSearch* script_search = LLFloaterScriptSearch::getInstance();
if (script_search && script_search->getEditorCore() == this)
{
script_search->close();
delete script_search;
}
}
BOOL LLScriptEdCore::tick()
@@ -486,6 +333,10 @@ void LLScriptEdCore::initMenu()
menuItem->setMenuCallback(onSelectAllMenu, this);
menuItem->setEnabledCallback(enableSelectAllMenu);
menuItem = getChild<LLMenuItemCallGL>("Deselect");
menuItem->setMenuCallback(onDeselectMenu, this);
menuItem->setEnabledCallback(enableDeselectMenu);
menuItem = getChild<LLMenuItemCallGL>("Search / Replace...");
menuItem->setMenuCallback(onSearchMenu, this);
menuItem->setEnabledCallback(NULL);
@@ -933,7 +784,10 @@ void LLScriptEdCore::onBtnUndoChanges( void* userdata )
void LLScriptEdCore::onSearchMenu(void* userdata)
{
LLScriptEdCore* sec = (LLScriptEdCore*)userdata;
LLFloaterScriptSearch::show(sec);
if (sec && sec->mEditor)
{
LLFloaterSearchReplace::show(sec->mEditor);
}
}
// static
@@ -1341,7 +1195,10 @@ void LLPreviewLSL::onSearchReplace(void* userdata)
{
LLPreviewLSL* self = (LLPreviewLSL*)userdata;
LLScriptEdCore* sec = self->mScriptEd;
LLFloaterScriptSearch::show(sec);
if (sec && sec->mEditor)
{
LLFloaterSearchReplace::show(sec->mEditor);
}
}
// static
@@ -2195,7 +2052,10 @@ void LLLiveLSLEditor::onSearchReplace(void* userdata)
LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
LLScriptEdCore* sec = self->mScriptEd;
LLFloaterScriptSearch::show(sec);
if (sec && sec->mEditor)
{
LLFloaterSearchReplace::show(sec->mEditor);
}
}
struct LLLiveLSLSaveData

View File

@@ -51,7 +51,6 @@ class LLScrollListCtrl;
class LLViewerObject;
struct LLEntryAndEdCore;
class LLMenuBarGL;
class LLFloaterScriptSearch;
class LLKeywordToken;
class AIFilePicker;
@@ -61,7 +60,6 @@ class LLScriptEdCore : public LLPanel, public LLEventTimer
friend class LLPreviewScript;
friend class LLPreviewLSL;
friend class LLLiveLSLEditor;
friend class LLFloaterScriptSearch;
public:
LLScriptEdCore(
@@ -204,6 +202,7 @@ protected:
static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
public:
static LLPreviewLSL* getInstance(const LLUUID& uuid);
LLTextEditor* getEditor() { return mScriptEd->mEditor; }
protected:
static void* createScriptEdPanel(void* userdata);

View File

@@ -1380,6 +1380,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false ;
}
else
{
// UDP is not an option, we are dead
resetFormattedData();
return true; // failed
}
}
else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE)
{
@@ -1402,7 +1408,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mHTTPFailCount >= max_attempts)
{
if (cur_size > 0)
// Make max_attempts attempt at decoding what data we have,
// then bail forever on this image
if (cur_size > 0 && (mHTTPFailCount < (max_attempts+1)) )
{
// Use available data
mLoadedDiscard = mFormattedImage->getDiscardLevel();
@@ -1411,9 +1419,21 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
else
{
resetFormattedData();
mState = DONE;
return true; // failed
//roll back to try UDP
if(mCanUseNET)
{
mState = INIT ;
mCanUseHTTP = false ;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false ;
}
else
{
// UDP is not an option, we are dead
resetFormattedData();
mState = DONE;
return true; // failed
}
}
}
else

View File

@@ -127,6 +127,20 @@ BOOL LLTool::handleRightMouseUp(S32 x, S32 y, MASK mask)
return FALSE;
}
BOOL LLTool::handleMiddleMouseDown(S32 x,S32 y,MASK mask)
{
// by default, didn't handle it
// llinfos << "LLTool::handleMiddleMouseDown" << llendl;
return FALSE;
}
BOOL LLTool::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
// by default, didn't handle it
// llinfos << "LLTool::handleMiddleMouseUp" << llendl;
return FALSE;
}
BOOL LLTool::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen)
{
// by default, didn't handle it

View File

@@ -57,6 +57,9 @@ public:
// Virtual functions inherited from LLMouseHandler
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);

View File

@@ -660,8 +660,6 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
*/
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
LLViewerObject *object = NULL;
LLViewerObject *parent = NULL;
// object = gViewerWindow->getHoverPick().getObject();

View File

@@ -721,47 +721,84 @@ bool LLViewerWindow::shouldShowToolTipFor(LLMouseHandler *mh)
return false;
}
BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
{
std::string buttonname;
std::string buttonstatestr;
BOOL handled = FALSE;
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
LLView::sMouseHandlerMessage.clear();
if (down)
buttonstatestr = "down";
else
buttonstatestr = "up";
if (gDebugClicks)
switch (clicktype)
{
llinfos << "ViewerWindow left mouse down at " << x << "," << y << llendl;
case LLMouseHandler::CLICK_LEFT:
mLeftMouseDown = down;
buttonname = "Left";
break;
case LLMouseHandler::CLICK_RIGHT:
mRightMouseDown = down;
buttonname = "Right";
break;
case LLMouseHandler::CLICK_MIDDLE:
mMiddleMouseDown = down;
buttonname = "Middle";
break;
case LLMouseHandler::CLICK_DOUBLELEFT:
mLeftMouseDown = down;
buttonname = "Left Double Click";
break;
}
LLView::sMouseHandlerMessage.clear();
if (gMenuBarView)
{
// stop ALT-key access to menu
gMenuBarView->resetMenuTrigger();
}
mLeftMouseDown = TRUE;
if (gDebugClicks)
{
llinfos << "ViewerWindow " << buttonname << " mouse " << buttonstatestr << " at " << x << "," << y << llendl;
}
// Make sure we get a coresponding mouseup event, even if the mouse leaves the window
mWindow->captureMouse();
if (down)
{
mWindow->captureMouse();
}
else
{
mWindow->releaseMouse();
}
// Indicate mouse was active
gMouseIdleTimer.reset();
// Hide tooltips on mousedown
mToolTipBlocked = TRUE;
if (down)
{
mToolTipBlocked = TRUE;
mToolTip->setVisible(FALSE);
}
// Also hide hover info on mousedown
// Also hide hover info on mousedown/mouseup
if (gHoverView)
{
gHoverView->cancelHover();
}
// Don't let the user move the mouse out of the window until mouse up.
if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() )
if (LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown())
{
mWindow->setMouseClipping(TRUE);
mWindow->setMouseClipping(down);
}
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
@@ -772,10 +809,9 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
if (LLView::sDebugMouseHandling)
{
llinfos << "Left Mouse Down handled by captor " << mouse_captor->getName() << llendl;
llinfos << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << llendl;
}
return mouse_captor->handleMouseDown(local_x, local_y, mask);
return mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down);
}
// Topmost view gets a chance before the hierarchy
@@ -784,216 +820,94 @@ BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask
{
S32 local_x, local_y;
top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
if (top_ctrl->pointInView(local_x, local_y))
if (down)
{
return top_ctrl->handleMouseDown(local_x, local_y, mask);
}
if (top_ctrl->pointInView(local_x, local_y))
{
return top_ctrl->handleAnyMouseClick(local_x, local_y, mask, clicktype, down) ;
}
else
{
gFocusMgr.setTopCtrl(NULL);
}
}
else
{
gFocusMgr.setTopCtrl(NULL);
}
handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask);
}
// Give the UI views a chance to process the click
if( mRootView->handleMouseDown(x, y, mask) )
if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) )
{
if (LLView::sDebugMouseHandling)
{
llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl;
llinfos << buttonname << " Mouse " << buttonstatestr << " " << LLView::sMouseHandlerMessage << llendl;
}
return TRUE;
}
else if (LLView::sDebugMouseHandling)
{
llinfos << "Left Mouse Down not handled by view" << llendl;
llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl;
}
// Do not allow tool manager to handle mouseclicks if we have disconnected
if (gDisconnected)
if (down)
{
return FALSE;
}
// Do not allow tool manager to handle mouseclicks if we have disconnected
if (gDisconnected)
{
return FALSE;
}
if(LLToolMgr::getInstance()->getCurrentTool()->handleMouseDown( x, y, mask ) )
if(LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
{
// This is necessary to force clicks in the world to cause edit
// boxes that might have keyboard focus to relinquish it, and hence
// cause a commit to update their value. JC
gFocusMgr.setKeyboardFocus(NULL);
return TRUE;
}
}
else
{
// This is necessary to force clicks in the world to cause edit
// boxes that might have keyboard focus to relinquish it, and hence
// cause a commit to update their value. JC
gFocusMgr.setKeyboardFocus(NULL);
return TRUE;
mWindow->releaseMouse();
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
if( !handled )
{
handled = mRootView->handleAnyMouseClick(x, y, mask, clicktype, down);
}
if( !handled )
{
if (tool)
{
handled = tool->handleAnyMouseClick(x, y, mask, clicktype, down);
}
}
}
return FALSE;
return (!down);
}
BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
{
BOOL down = TRUE;
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down);
}
BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK mask)
{
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
LLView::sMouseHandlerMessage.clear();
if (gDebugClicks)
{
llinfos << "ViewerWindow left mouse double-click at " << x << "," << y << llendl;
}
mLeftMouseDown = TRUE;
// Hide tooltips
if( mToolTip )
{
mToolTip->setVisible( FALSE );
}
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
if( mouse_captor )
{
S32 local_x;
S32 local_y;
mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
if (LLView::sDebugMouseHandling)
{
llinfos << "Left Mouse Down handled by captor " << mouse_captor->getName() << llendl;
}
return mouse_captor->handleDoubleClick(local_x, local_y, mask);
}
// Check for hit on UI.
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
if (top_ctrl)
{
S32 local_x, local_y;
top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
if (top_ctrl->pointInView(local_x, local_y))
{
return top_ctrl->handleDoubleClick(local_x, local_y, mask);
}
else
{
gFocusMgr.setTopCtrl(NULL);
}
}
if (mRootView->handleDoubleClick(x, y, mask))
{
if (LLView::sDebugMouseHandling)
{
llinfos << "Left Mouse Down" << LLView::sMouseHandlerMessage << llendl;
}
return TRUE;
}
else if (LLView::sDebugMouseHandling)
{
llinfos << "Left Mouse Down not handled by view" << llendl;
}
// Why is this here? JC 9/3/2002
if (gNoRender)
{
return TRUE;
}
if(LLToolMgr::getInstance()->getCurrentTool()->handleDoubleClick( x, y, mask ) )
{
return TRUE;
}
// if we got this far and nothing handled a double click, pass a normal mouse down
return handleMouseDown(window, pos, mask);
// try handling as a double-click first, then a single-click if that
// wasn't handled.
BOOL down = TRUE;
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_DOUBLELEFT,down) ||
handleMouseDown(window, pos, mask);
}
BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
LLView::sMouseHandlerMessage.clear();
if (gDebugClicks)
{
llinfos << "ViewerWindow left mouse up" << llendl;
}
mLeftMouseDown = FALSE;
// Indicate mouse was active
gMouseIdleTimer.reset();
// Hide tooltips on mouseup
if( mToolTip )
{
mToolTip->setVisible( FALSE );
}
// Also hide hover info on mouseup
if (gHoverView) gHoverView->cancelHover();
BOOL handled = FALSE;
mWindow->releaseMouse();
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
if( tool->clipMouseWhenDown() )
{
mWindow->setMouseClipping(FALSE);
}
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
if( mouse_captor )
{
S32 local_x;
S32 local_y;
mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
if (LLView::sDebugMouseHandling)
{
llinfos << "Left Mouse Up handled by captor " << mouse_captor->getName() << llendl;
}
return mouse_captor->handleMouseUp(local_x, local_y, mask);
}
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
if (top_ctrl)
{
S32 local_x, local_y;
top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask);
}
if( !handled )
{
handled = mRootView->handleMouseUp(x, y, mask);
}
if (LLView::sDebugMouseHandling)
{
if (handled)
{
llinfos << "Left Mouse Up" << LLView::sMouseHandlerMessage << llendl;
}
else
{
llinfos << "Left Mouse Up not handled by view" << llendl;
}
}
if( !handled )
{
if (tool)
{
handled = tool->handleMouseUp(x, y, mask);
}
}
// Always handled as far as the OS is concerned.
return TRUE;
BOOL down = FALSE;
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down);
}
@@ -1006,89 +920,11 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
LLView::sMouseHandlerMessage.clear();
if (gDebugClicks)
{
llinfos << "ViewerWindow right mouse down at " << x << "," << y << llendl;
}
BOOL down = TRUE;
BOOL handle = handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down);
if (handle)
return handle;
if (gMenuBarView)
{
// stop ALT-key access to menu
gMenuBarView->resetMenuTrigger();
}
mRightMouseDown = TRUE;
// Make sure we get a coresponding mouseup event, even if the mouse leaves the window
mWindow->captureMouse();
// Hide tooltips
if( mToolTip )
{
mToolTip->setVisible( FALSE );
}
// Also hide hover info on mousedown
if (gHoverView)
{
gHoverView->cancelHover();
}
// Don't let the user move the mouse out of the window until mouse up.
if( LLToolMgr::getInstance()->getCurrentTool()->clipMouseWhenDown() )
{
mWindow->setMouseClipping(TRUE);
}
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
if( mouse_captor )
{
S32 local_x;
S32 local_y;
mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
if (LLView::sDebugMouseHandling)
{
llinfos << "Right Mouse Down handled by captor " << mouse_captor->getName() << llendl;
}
return mouse_captor->handleRightMouseDown(local_x, local_y, mask);
}
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
if (top_ctrl)
{
S32 local_x, local_y;
top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
if (top_ctrl->pointInView(local_x, local_y))
{
return top_ctrl->handleRightMouseDown(local_x, local_y, mask);
}
else
{
gFocusMgr.setTopCtrl(NULL);
}
}
if( mRootView->handleRightMouseDown(x, y, mask) )
{
if (LLView::sDebugMouseHandling)
{
llinfos << "Right Mouse Down" << LLView::sMouseHandlerMessage << llendl;
}
return TRUE;
}
else if (LLView::sDebugMouseHandling)
{
llinfos << "Right Mouse Down not handled by view" << llendl;
}
if(LLToolMgr::getInstance()->getCurrentTool()->handleRightMouseDown( x, y, mask ) )
{
// This is necessary to force clicks in the world to cause edit
// boxes that might have keyboard focus to relinquish it, and hence
// cause a commit to update their value. JC
gFocusMgr.setKeyboardFocus(NULL);
return TRUE;
}
// *HACK: this should be rolled into the composite tool logic, not
// hardcoded at the top level.
@@ -1106,97 +942,15 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
LLView::sMouseHandlerMessage.clear();
// Don't care about caps lock for mouse events.
if (gDebugClicks)
{
llinfos << "ViewerWindow right mouse up" << llendl;
}
mRightMouseDown = FALSE;
// Indicate mouse was active
gMouseIdleTimer.reset();
// Hide tooltips on mouseup
if( mToolTip )
{
mToolTip->setVisible( FALSE );
}
// Also hide hover info on mouseup
if (gHoverView) gHoverView->cancelHover();
BOOL handled = FALSE;
mWindow->releaseMouse();
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
if( tool->clipMouseWhenDown() )
{
mWindow->setMouseClipping(FALSE);
}
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
if( mouse_captor )
{
S32 local_x;
S32 local_y;
mouse_captor->screenPointToLocal( x, y, &local_x, &local_y );
if (LLView::sDebugMouseHandling)
{
llinfos << "Right Mouse Up handled by captor " << mouse_captor->getName() << llendl;
}
return mouse_captor->handleRightMouseUp(local_x, local_y, mask);
}
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
if (top_ctrl)
{
S32 local_x, local_y;
top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleRightMouseUp(local_x, local_y, mask);
}
if( !handled )
{
handled = mRootView->handleRightMouseUp(x, y, mask);
}
if (LLView::sDebugMouseHandling)
{
if (handled)
{
llinfos << "Right Mouse Up" << LLView::sMouseHandlerMessage << llendl;
}
else
{
llinfos << "Right Mouse Up not handled by view" << llendl;
}
}
if( !handled )
{
if (tool)
{
handled = tool->handleRightMouseUp(x, y, mask);
}
}
// Always handled as far as the OS is concerned.
return TRUE;
BOOL down = FALSE;
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_RIGHT,down);
}
BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
{
BOOL down = TRUE;
gVoiceClient->middleMouseState(true);
handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down);
// Always handled as far as the OS is concerned.
return TRUE;
@@ -1204,7 +958,9 @@ BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MAS
BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
{
BOOL down = FALSE;
gVoiceClient->middleMouseState(false);
handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down);
// Always handled as far as the OS is concerned.
return TRUE;
@@ -1589,6 +1345,7 @@ LLViewerWindow::LLViewerWindow(
mWindowRectRaw(0, height, width, 0),
mWindowRectScaled(0, height, width, 0),
mLeftMouseDown(FALSE),
mMiddleMouseDown(FALSE),
mRightMouseDown(FALSE),
mToolTip(NULL),
mToolTipBlocked(FALSE),

View File

@@ -50,6 +50,7 @@
#include "llstat.h"
#include "llmousehandler.h"
#include "llalertdialog.h"
#include "llmousehandler.h"
#include "llnotifications.h"
class LLView;
@@ -159,6 +160,7 @@ public:
/*virtual*/ BOOL handleTranslatedKeyUp(KEY key, MASK mask);
/*virtual*/ void handleScanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
/*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, MASK mask); // NOT going to handle extended
/*virtual*/ BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down);
/*virtual*/ BOOL handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask);
/*virtual*/ BOOL handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
/*virtual*/ BOOL handleCloseRequest(LLWindow *window);
@@ -236,6 +238,7 @@ public:
LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; }
LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; }
BOOL getLeftMouseDown() const { return mLeftMouseDown; }
BOOL getMiddleMouseDown() const { return mMiddleMouseDown; }
BOOL getRightMouseDown() const { return mRightMouseDown; }
const LLPickInfo& getLastPick() const { return mLastPick; }
@@ -414,6 +417,7 @@ protected:
LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame
LLStat mMouseVelocityStat;
BOOL mLeftMouseDown;
BOOL mMiddleMouseDown;
BOOL mRightMouseDown;
LLProgressView *mProgressView;

View File

@@ -29,6 +29,9 @@
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#if LL_LINUX && defined(LL_STANDALONE)
#include <glib.h>
#endif
#include "llviewerprecompiledheaders.h"
#include "llvoiceclient.h"
@@ -1637,10 +1640,23 @@ void LLVoiceClient::stateMachine()
{
// Launch the voice daemon
// *FIX:Mani - Using the executable dir instead
// of mAppRODataDir, the working directory from which the app
// is launched.
//std::string exe_path = gDirUtilp->getAppRODataDir();
#if LL_LINUX && defined(LL_STANDALONE)
// Look for the vivox daemon in the executable path list
// using glib first.
char *voice_path = g_find_program_in_path ("SLVoice");
std::string exe_path;
if (voice_path) {
exe_path = llformat("%s", voice_path);
free(voice_path);
} else {
exe_path = gDirUtilp->getExecutableDir() +
gDirUtilp->getDirDelimiter() + "SLVoice";
}
#else
// *FIX:Mani - Using the executable dir instead
// of mAppRODataDir, the working directory from which the
// app is launched.
//std::string exe_path = gDirUtilp->getAppRODataDir();
std::string exe_path = gDirUtilp->getExecutableDir();
exe_path += gDirUtilp->getDirDelimiter();
#if LL_WINDOWS
@@ -1649,6 +1665,7 @@ void LLVoiceClient::stateMachine()
exe_path += "../Resources/SLVoice";
#else
exe_path += "SLVoice";
#endif
#endif
// See if the vivox executable exists
llstat s;

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater bottom="-400" can_close="true" can_drag_on_left="false"
can_minimize="true" can_resize="false" height="224"
left="50" min_height="200" min_width="600" mouse_opaque="true"
can_minimize="true" can_resize="false" height="244"
left="50" min_height="244" min_width="500" mouse_opaque="true"
name="Hardware Settings Floater" title="Hardware Settings" width="500">
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-42" drop_shadow_visible="true" enabled="true" follows="left|top"
@@ -94,6 +94,16 @@
follows="left|top" height="16" increment="0.1"
initial_val="4" label="Fog Distance Ratio:" label_width="138" left="10"
max_val="10" min_val="0.5" mouse_opaque="true" name="fog" width="202" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom_delta="-50" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="40"
left="10" mouse_opaque="true" name="note" v_pad="0"
width="480">
Note: the Gamma and Fog Distance Ratio settings are unavailable (since useless) when the
Atmospheric Shaders are enabled.
</text>
<button bottom="10" enabled="true" follows="right|bottom" font="SansSerif"
halign="center" height="20" label="OK" label_selected="OK"
left="-110" mouse_opaque="true" name="OK" scale_image="true" width="90" />

View File

@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater bottom="-762" can_close="true" can_drag_on_left="false" can_minimize="true"
can_resize="true" enabled="true" follows="left|top" height="361" left="273"
min_height="243" min_width="234" mouse_opaque="true"
can_resize="true" enabled="true" follows="left|top" height="377" left="273"
min_height="259" min_width="234" mouse_opaque="true"
name="preview notecard" title="Note:" width="400">
<button bottom="-352" enabled="false" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Save" label_selected="Save" left="9"
mouse_opaque="false" name="Save" scale_image="true" width="100" />
<button bottom="-352" enabled="true" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Get Items" label_selected="Get Items" left_delta="110"
<button bottom="-370" enabled="true" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Get Items" label_selected="Get Items" left_delta="120"
mouse_opaque="false" name="Get Items" scale_image="true" width="100" />
<!--<check_box follows="left|bottom" bottom_delta="0" left_delta="110" name="https_chk" label="Saves via HTTPS" />-->
<icon bottom="-19" color="1 1 1 1" enabled="true" follows="top|right" height="16"
@@ -24,12 +21,44 @@
handle_edit_keys_directly="false" height="19" left="93" max_length="127"
mouse_opaque="true" name="desc" select_all_on_focus_received="false"
select_on_focus="false" width="294" spell_check="true" />
<text_editor type="string" length="1" bottom="-327" embedded_items="true" enabled="true"
follows="left|top|right|bottom" font="SansSerif" height="281"
<menu_bar bottom="-56" drop_shadow="false" enabled="true" follows="left|top|right"
height="18" left="8" mouse_opaque="false" name="motecard_menu" opaque="false"
tear_off="false" width="220">
<menu bottom_delta="16" left="0" drop_shadow="true" enabled="true" height="198" width="150"
mouse_opaque="false" name="Edit" opaque="true" tear_off="false">
<menu_item_call bottom_delta="-30" enabled="false" height="20" label="Undo" left="0"
mouse_opaque="true" name="Undo" width="139" />
<menu_item_call bottom_delta="-50" enabled="false" height="20" label="Redo" left="0"
mouse_opaque="true" name="Redo" width="139" />
<menu_item_separator bottom_delta="-58" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator1" width="139" />
<menu_item_call bottom_delta="-78" enabled="false" height="20" label="Cut" left="0"
mouse_opaque="true" name="Cut" width="139" />
<menu_item_call bottom_delta="-98" enabled="false" height="20" label="Copy" left="0"
mouse_opaque="true" name="Copy" width="139" />
<menu_item_call bottom_delta="-118" enabled="false" height="20" label="Paste" left="0"
mouse_opaque="true" name="Paste" width="139" />
<menu_item_separator bottom_delta="-126" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator2" width="139" />
<menu_item_call bottom_delta="-146" enabled="true" height="20" label="Select All" left="0"
mouse_opaque="true" name="Select All" width="139" />
<menu_item_call bottom_delta="-166" enabled="false" height="20" label="Deselect" left="0"
mouse_opaque="true" name="Deselect" width="139" />
<menu_item_separator bottom_delta="-174" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator3" width="139" />
<menu_item_call bottom_delta="-194" enabled="true" height="20" label="Search / Replace..."
left="0" mouse_opaque="true" name="Search / Replace..." width="139" />
</menu>
</menu_bar>
<text_editor type="string" length="1" bottom="-344" embedded_items="true" enabled="true"
follows="left|top|right|bottom" font="SansSerif" height="285"
ignore_tab="false" left="4" max_length="65536" mouse_opaque="true"
name="Notecard Editor" width="392" word_wrap="true" spell_check="true">
Loading...
</text_editor>
<button bottom="-370" enabled="false" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Save" label_selected="Save" left="9"
mouse_opaque="false" name="Save" scale_image="true" width="100" />
<string name="no_object">
Unable to find object containing this note.
</string>

View File

@@ -1,35 +1,71 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater bottom="-484" can_close="true" can_drag_on_left="false" can_minimize="true"
can_resize="true" enabled="true" height="400" left="138" min_height="243"
min_width="234" mouse_opaque="true" name="preview_notecard" width="400">
<text_editor type="string" length="1" bottom="-366"
embedded_items="true" enabled="true" follows="left|top|right|bottom"
font="SansSerif" height="320" ignore_tab="false" left="4"
max_length="65536" mouse_opaque="true" name="Notecard Editor" width="392"
word_wrap="true">
Loading...
</text_editor>
<floater bottom="-762" can_close="true" can_drag_on_left="false" can_minimize="true"
can_resize="true" enabled="true" follows="left|top" height="377" left="273"
min_height="259" min_width="350" mouse_opaque="true"
name="preview notecard" title="Note:" width="400">
<icon bottom="-19" color="1 1 1 1" enabled="true" follows="top|right" height="16"
image_name="icon_lock.tga" left="344" mouse_opaque="true" name="lock"
width="16" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-38" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerif" h_pad="0" halign="left" height="19" left="13"
mouse_opaque="true" name="desc txt" v_pad="0" width="80">
Description:
</text>
<icon bottom="-19" color="1 1 1 1" enabled="true" follows="top|right" height="16"
image_name="icon_lock.tga" left="344" mouse_opaque="true" name="lock"
width="16" />
<button bottom="-391" enabled="true" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Keep" label_selected="Keep" left="9"
mouse_opaque="true" name="Keep" scale_image="true" width="100" />
<button bottom="-391" enabled="true" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Discard" label_selected="Discard"
left="114" mouse_opaque="true" name="Discard" scale_image="true"
width="100" />
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-38"
enabled="true" follows="left|top|right" font="SansSerif"
handle_edit_keys_directly="false" height="19" left="93" max_length="127"
mouse_opaque="true" name="desc" select_all_on_focus_received="false"
select_on_focus="false" width="294" spell_check="true" />
<string name="no_object">Unable to find object containing this note.:</string>
<string name="not_allowed">You are not allowed to view this note.</string>
<menu_bar bottom="-56" drop_shadow="false" enabled="true" follows="left|top|right"
height="18" left="8" mouse_opaque="false" name="motecard_menu" opaque="false"
tear_off="false" width="220">
<menu bottom_delta="16" left="0" drop_shadow="true" enabled="true" height="198" width="150"
mouse_opaque="false" name="Edit" opaque="true" tear_off="false">
<menu_item_call bottom_delta="-30" enabled="false" height="20" label="Undo" left="0"
mouse_opaque="true" name="Undo" width="139" />
<menu_item_call bottom_delta="-50" enabled="false" height="20" label="Redo" left="0"
mouse_opaque="true" name="Redo" width="139" />
<menu_item_separator bottom_delta="-58" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator1" width="139" />
<menu_item_call bottom_delta="-78" enabled="false" height="20" label="Cut" left="0"
mouse_opaque="true" name="Cut" width="139" />
<menu_item_call bottom_delta="-98" enabled="false" height="20" label="Copy" left="0"
mouse_opaque="true" name="Copy" width="139" />
<menu_item_call bottom_delta="-118" enabled="false" height="20" label="Paste" left="0"
mouse_opaque="true" name="Paste" width="139" />
<menu_item_separator bottom_delta="-126" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator2" width="139" />
<menu_item_call bottom_delta="-146" enabled="true" height="20" label="Select All" left="0"
mouse_opaque="true" name="Select All" width="139" />
<menu_item_call bottom_delta="-166" enabled="false" height="20" label="Deselect" left="0"
mouse_opaque="true" name="Deselect" width="139" />
<menu_item_separator bottom_delta="-174" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator3" width="139" />
<menu_item_call bottom_delta="-194" enabled="true" height="20" label="Search / Replace..."
left="0" mouse_opaque="true" name="Search / Replace..." width="139" />
</menu>
</menu_bar>
<text_editor type="string" length="1" bottom="-344" embedded_items="true" enabled="true"
follows="left|top|right|bottom" font="SansSerif" height="285"
ignore_tab="false" left="4" max_length="65536" mouse_opaque="true"
name="Notecard Editor" width="392" word_wrap="true">
Loading...
</text_editor>
<button bottom="-370" enabled="true" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Keep" label_selected="Keep" left="9"
mouse_opaque="true" name="Keep" scale_image="true" width="100" />
<button bottom="-370" enabled="false" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Save" label_selected="Save" left="114"
mouse_opaque="false" name="Save" scale_image="true" width="100" />
<button bottom="-370" enabled="true" follows="left|bottom" font="SansSerif"
halign="center" height="20" label="Discard" label_selected="Discard"
left="219" mouse_opaque="true" name="Discard" scale_image="true"
width="100" />
<string name="no_object">
Unable to find object containing this note.
</string>
<string name="not_allowed">
You are not allowed to view this note.
</string>
</floater>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater bottom="-423" can_close="true" can_drag_on_left="false" can_minimize="true"
can_resize="false" can_tear_off="true" enabled="true" height="120"
left="223" min_height="100" min_width="100" mouse_opaque="true"
name="script search" title="Search / Replace" width="300">
<check_box bottom="-77" control_name="LSLFindCaseInsensitivity" enabled="true" follows="left|top" font="SansSerifSmall"
height="16" initial_value="false" label="Case Insensitive" left="55"
mouse_opaque="true" name="case_text" radio_style="false" width="240" />
<button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
label="Search" label_selected="Search" left="10" mouse_opaque="true"
name="search_btn" scale_image="true" width="90" />
<button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
label="Replace" label_selected="Replace" left="105" mouse_opaque="true"
name="replace_btn" scale_image="true" width="90" />
<button bottom="-108" enabled="true" font="SansSerif" halign="center" height="24"
label="Replace All" label_selected="Replace All" left="200"
mouse_opaque="true" name="replace_all_btn" scale_image="true" width="90" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-37" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="5"
mouse_opaque="true" name="search_label" v_pad="0" width="45">
Search
</text>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-58" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="5"
mouse_opaque="true" name="replace_label" v_pad="0" width="45">
Replace
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-37"
enabled="true" follows="left|top" font="SansSerifSmall"
handle_edit_keys_directly="false" height="16" left="55" max_length="254"
mouse_opaque="true" name="search_text" select_all_on_focus_received="false"
select_on_focus="false" width="240" />
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-58"
enabled="true" follows="left|top" font="SansSerifSmall"
handle_edit_keys_directly="false" height="16" left="55" max_length="254"
mouse_opaque="true" name="replace_text"
select_all_on_focus_received="false" select_on_focus="false" width="240" />
</floater>

View File

@@ -54,6 +54,11 @@
<on_click function="Edit.TakeOff" userdata="tattoo" />
<on_enable function="Edit.EnableTakeOff" userdata="tattoo" />
</menu_item_call>
<menu_item_call bottom="-165" enabled="false" height="19" label="Alpha" left="0"
mouse_opaque="true" name="Self Alpha" width="118">
<on_click function="Edit.TakeOff" userdata="alpha" />
<on_enable function="Edit.EnableTakeOff" userdata="alpha" />
</menu_item_call>
<menu_item_call bottom="-162" enabled="false" height="19" label="Underpants" left="0"
mouse_opaque="true" name="Self Underpants" width="118">
<on_click function="Edit.TakeOff" userdata="underpants" />

View File

@@ -196,11 +196,25 @@
<on_click function="Edit.TakeOff" userdata="skirt" />
<on_enable function="Edit.EnableTakeOff" userdata="skirt" />
</menu_item_call>
<menu_item_call bottom="-200" enabled="false" height="19" label="Physics" left="0"
<menu_item_call bottom="-185" enabled="false" height="19" label="Tattoo" left="0"
mouse_opaque="true" name="Tattoo" width="118">
<on_click function="Edit.TakeOff" userdata="tattoo" />
<on_enable function="Edit.EnableTakeOff" userdata="tattoo" />
</menu_item_call>
<menu_item_separator bottom="-187" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator51" width="153" />
<menu_item_call bottom="-190" enabled="false" height="19" label="Alpha" left="0"
mouse_opaque="true" name="Alpha" width="118">
<on_click function="Edit.TakeOff" userdata="alpha" />
<on_enable function="Edit.EnableTakeOff" userdata="alpha" />
</menu_item_call>
<menu_item_call bottom="-200" enabled="false" height="19" label="Physics" left="0"
mouse_opaque="true" name="Physics" width="118">
<on_click function="Edit.TakeOff" userdata="physics" />
<on_enable function="Edit.EnableTakeOff" userdata="physics" />
</menu_item_call>
<on_click function="Edit.TakeOff" userdata="physics" />
<on_enable function="Edit.EnableTakeOff" userdata="physics" />
</menu_item_call>
<menu_item_separator bottom="-195" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator51" width="153" />
<menu_item_call bottom="-119" enabled="true" height="19" label="All Clothes" left="0"
mouse_opaque="true" name="All Clothes" width="118">
<on_click function="Edit.TakeOff" userdata="all" />

View File

@@ -7,7 +7,7 @@
<check_box bottom="-23" enabled="true" follows="left|top" font="SansSerifSmall"
height="16" initial_value="false"
label="Run viewer in a window" left="10" mouse_opaque="true"
name="windowed mode" radio_style="false" width="100" />
name="windowed mode" radio_style="false" width="120" />
<text_editor type="string" length="1" allow_html="false" bg_readonly_color="0 0 0 0" bottom="-43"
embedded_items="false" enabled="false" follows="left|top"
font="SansSerifSmall" height="20" hide_border="true"
@@ -163,8 +163,8 @@
follows="left|top" font="SansSerifSmall" height="16"
initial_value="true" label="Custom" left="385" mouse_opaque="true"
name="CustomSettings" radio_style="false" width="256" />
<view_border bevel_style="none" border_thickness="1" bottom="-405" follows="top|left"
height="290" left="5" name="GraphicsBorder" width="485" />
<view_border bevel_style="none" border_thickness="1" bottom="-395" follows="top|left"
height="280" left="5" name="GraphicsBorder" width="485" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-130" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="12"
@@ -274,9 +274,14 @@
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
label="Avatar Impostors" left_delta="0" mouse_opaque="true"
name="AvatarImpostors" radio_style="false" width="256" />
<check_box bottom_delta="-17" control_name="RenderAvatarVP" enabled="true"
<slider bottom_delta="-17" can_edit_text="false" control_name="RenderAvatarMaxVisible"
decimal_digits="0" enabled="true" follows="left|top" height="16"
increment="1" initial_val="35" label="Max non-impostors"
label_width="100" left_delta="8" max_val="50" min_val="1" mouse_opaque="true"
name="AvatarMaxVisible" show_text="true" width="195" />
<check_box bottom_delta="-20" control_name="RenderAvatarVP" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
label="Hardware Skinning" left_delta="0" mouse_opaque="true"
label="Hardware Skinning" left="10" mouse_opaque="true"
name="AvatarVertexProgram" radio_style="false" width="256" />
<check_box bottom_delta="-17" control_name="RenderAvatarCloth" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
@@ -412,7 +417,7 @@
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-352" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="12"
left="210" mouse_opaque="true" name="LightingDetailText" v_pad="0"
left="215" mouse_opaque="true" name="LightingDetailText" v_pad="0"
width="128">
Lighting Detail:
</text>
@@ -430,7 +435,7 @@
</radio_group>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-352" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="360"
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="370"
mouse_opaque="true" name="TerrainDetailText" v_pad="0" width="128">
Terrain Detail:
</text>

View File

@@ -52,6 +52,10 @@ extern "C" {
#include "llaprpool.h"
#include "apr_dso.h"
#ifdef LL_STANDALONE
#include <dlfcn.h>
#include <apr_portable.h>
#endif
}
////////////////////////////////////////////////////
@@ -87,9 +91,16 @@ bool grab_pa_syms(std::string pulse_dso_name)
//attempt to load the shared library
sSymPADSOMemoryPool.create();
#ifdef LL_STANDALONE
void *dso_handle = dlopen(pulse_dso_name.c_str(), RTLD_NOW | RTLD_GLOBAL);
rv = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&sSymPADSOHandle,
dso_handle, sSymPADSOMemoryPool());
if ( APR_SUCCESS == rv )
#else
if ( APR_SUCCESS == (rv = apr_dso_load(&sSymPADSOHandle,
pulse_dso_name.c_str(),
sSymPADSOMemoryPool()) ))
#endif
{
INFOMSG("Found DSO: %s", pulse_dso_name.c_str());

View File

@@ -94,7 +94,7 @@ namespace tut
return;
case LLSD::TypeReal:
ensure_equals(msg + " real", actual.asReal(), expected.asReal());
tut::ensure_equals(msg + " real", actual.asReal(), expected.asReal());
return;
case LLSD::TypeString: