Merge branch 'master' into future

This commit is contained in:
Siana Gearz
2011-07-20 22:12:14 +02:00
83 changed files with 1181 additions and 745 deletions

View File

@@ -88,7 +88,7 @@ if (VIEWER)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
add_dependencies(viewer linux-crash-logger-strip-target)
elseif (DARWIN)
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
#add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
#add_subdirectory(${VIEWER_PREFIX}mac_updater)
add_dependencies(viewer mac-crash-logger)
#add_dependencies(viewer mac-updater)

View File

@@ -220,10 +220,13 @@ if (LINUX)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
else (${ARCH} STREQUAL "x86_64")
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -march=pentium4 -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2} -march=pentium4 -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS})
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=pentium4 -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -march=pentium4 -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS})
if (NOT STANDALONE)
set(MARCH_FLAG " -march=pentium4")
endif (NOT STANDALONE)
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELEASESSE2 "${CMAKE_C_FLAGS_RELEASESSE2}${MARCH_FLAG} -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS})
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse -msse2 ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}${MARCH_FLAG} -mfpmath=sse -msse2 "${GCC_EXTRA_OPTIMIZATIONS})
endif (${ARCH} STREQUAL "x86_64")
endif (VIEWER)
@@ -245,8 +248,8 @@ if (DARWIN)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
# NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -03 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -03 -msse3 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -O3 -msse2 -mtune=generic -mfpmath=sse ${GCC_EXTRA_OPTIMIZATIONS}")
@@ -278,11 +281,6 @@ endif (LINUX OR DARWIN)
if (STANDALONE)
add_definitions(-DLL_STANDALONE=1)
if (LINUX AND ${ARCH} STREQUAL "i686")
add_definitions(-march=pentiumpro)
endif (LINUX AND ${ARCH} STREQUAL "i686")
else (STANDALONE)
set(${ARCH}_linux_INCLUDES
ELFIO

View File

@@ -43,6 +43,7 @@ endif (NOT FMOD_LIBRARY)
find_path(FMOD_INCLUDE_DIR fmod.h
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include
${FMOD_SDK_DIR}/api/inc
${FMOD_SDK_DIR}/inc
${FMOD_SDK_DIR}

View File

@@ -24,11 +24,11 @@ else (STANDALONE)
endif (LINUX)
endif (STANDALONE)
if (GOOGLE_PERFTOOLS_FOUND)
if (GOOGLE_PERFTOOLS_FOUND AND STANDALONE)
set(USE_GOOGLE_PERFTOOLS ON CACHE BOOL "Build with Google PerfTools support.")
else (GOOGLE_PERFTOOLS_FOUND)
else ()
set(USE_GOOGLE_PERFTOOLS OFF)
endif (GOOGLE_PERFTOOLS_FOUND)
endif ()
# XXX Disable temporarily, until we have compilation issues on 64-bit
# Etch sorted.

View File

@@ -5,6 +5,12 @@ include(Boost)
include(EXPAT)
include(ZLIB)
if (DARWIN)
include(CMakeFindFrameworks)
find_library(CORESERVICES_LIBRARY CoreServices)
endif (DARWIN)
set(LLCOMMON_INCLUDE_DIRS
${LIBS_OPEN_DIR}/cwdebug
${LIBS_OPEN_DIR}/llcommon

View File

@@ -30,7 +30,7 @@ set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX})
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
set(VISTA_ICON OFF CACHE BOOL "Allow vista icon with pre 2008 Visual Studio IDEs. (Assumes replacement old rcdll.dll with new rcdll.dll from win sdk 7.0 or later)")
set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH

Binary file not shown.

View File

@@ -225,6 +225,7 @@ target_link_libraries(
${ZLIB_LIBRARIES}
${WINDOWS_LIBRARIES}
${CWDEBUG_LIBRARIES}
${CORESERVICES_LIBRARY}
)
if (LINUX)

View File

@@ -29,33 +29,22 @@
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "linden_common.h"
#include "llfasttimer.h"
#include "llmemory.h"
#include "llprocessor.h"
#if LL_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "lltimer.h"
#elif LL_LINUX || LL_SOLARIS
#include <sys/time.h>
#include <sched.h>
#include "lltimer.h"
#elif LL_DARWIN
#include <sys/time.h>
#include "lltimer.h" // get_clock_count()
#else
#error "architecture not supported"
#endif
#include "lltimer.h"
//////////////////////////////////////////////////////////////////////////////
// statics
LLFastTimer::EFastTimerType LLFastTimer::sCurType = LLFastTimer::FTM_OTHER;
int LLFastTimer::sCurDepth = 0;
U64 LLFastTimer::sStart[LLFastTimer::FTM_MAX_DEPTH];
@@ -70,44 +59,12 @@ S32 LLFastTimer::sLastFrameIndex = -1;
int LLFastTimer::sPauseHistory = 0;
int LLFastTimer::sResetHistory = 0;
#define USE_RDTSC 0
U64 LLFastTimer::sClockResolution = calc_clock_frequency(50U); // Resolution of get_clock_count()
#if LL_LINUX || LL_SOLARIS
U64 LLFastTimer::sClockResolution = 1000000000; // 1e9, Nanosecond resolution
#else
U64 LLFastTimer::sClockResolution = 1000000; // 1e6, Microsecond resolution
#endif
//static
#if (LL_DARWIN || LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
{
return sClockResolution >> 8;
}
#else // windows or x86-mac or x86-linux or x86-solaris
U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
{
#if USE_RDTSC || !LL_WINDOWS
//getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz
static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency()*1000000.0);
// we drop the low-order byte in our timers, so report a lower frequency
#else
// If we're not using RDTSC, each fasttimer tick is just a performance counter tick.
// Not redefining the clock frequency itself (in llprocessor.cpp/calculate_cpu_frequency())
// since that would change displayed MHz stats for CPUs
static bool firstcall = true;
static U64 sCPUClockFrequency;
if (firstcall)
{
QueryPerformanceFrequency((LARGE_INTEGER*)&sCPUClockFrequency);
firstcall = false;
}
#endif
return sCPUClockFrequency >> 8;
}
#endif
void LLFastTimer::reset()
{
@@ -162,139 +119,17 @@ void LLFastTimer::reset()
// Important note: These implementations must be FAST!
//
#if LL_WINDOWS
//
// Windows implementation of CPU clock
//
//
// NOTE: put back in when we aren't using platform sdk anymore
//
// because MS has different signatures for these functions in winnt.h
// need to rename them to avoid conflicts
//#define _interlockedbittestandset _renamed_interlockedbittestandset
//#define _interlockedbittestandreset _renamed_interlockedbittestandreset
//#include <intrin.h>
//#undef _interlockedbittestandset
//#undef _interlockedbittestandreset
//inline U32 LLFastTimer::getCPUClockCount32()
//{
// U64 time_stamp = __rdtsc();
// return (U32)(time_stamp >> 8);
//}
//
//// return full timer value, *not* shifted by 8 bits
//inline U64 LLFastTimer::getCPUClockCount64()
//{
// return __rdtsc();
//}
// shift off lower 8 bits for lower resolution but longer term timing
// on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing
#if USE_RDTSC
U32 LLFastTimer::getCPUClockCount32()
{
U32 ret_val;
__asm
{
_emit 0x0f
_emit 0x31
shr eax,8
shl edx,24
or eax, edx
mov dword ptr [ret_val], eax
}
return ret_val;
}
// return full timer value, *not* shifted by 8 bits
U64 LLFastTimer::getCPUClockCount64()
{
U64 ret_val;
__asm
{
_emit 0x0f
_emit 0x31
mov eax,eax
mov edx,edx
mov dword ptr [ret_val+4], edx
mov dword ptr [ret_val], eax
}
return ret_val;
}
std::string LLFastTimer::sClockType = "rdtsc";
#else
//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp
// These use QueryPerformanceCounter, which is arguably fine and also works on amd architectures.
// On windows these use QueryPerformanceCounter, which is arguably fine and also works on amd architectures.
U32 LLFastTimer::getCPUClockCount32()
{
return (U32)(get_clock_count()>>8);
return get_clock_count() >> 8;
}
U64 LLFastTimer::getCPUClockCount64()
{
return get_clock_count();
}
std::string LLFastTimer::sClockType = "QueryPerformanceCounter";
#endif
#endif
#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
//
// Linux and Solaris implementation of CPU clock - non-x86.
// This is accurate but SLOW! Only use out of desperation.
//
// Try to use the MONOTONIC clock if available, this is a constant time counter
// with nanosecond resolution (but not necessarily accuracy) and attempts are
// made to synchronize this value between cores at kernel start. It should not
// be affected by CPU frequency. If not available use the REALTIME clock, but
// this may be affected by NTP adjustments or other user activity affecting
// the system time.
U64 LLFastTimer::getCPUClockCount64()
{
struct timespec tp;
#ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time?
if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME
#endif
clock_gettime(CLOCK_REALTIME,&tp);
return (tp.tv_sec*LLFastTimer::sClockResolution)+tp.tv_nsec;
}
U32 LLFastTimer::getCPUClockCount32()
{
return (U32)(LLFastTimer::getCPUClockCount64() >> 8);
}
std::string LLFastTimer::sClockType = "clock_gettime";
#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__))
//
// Mac+Linux+Solaris FAST x86 implementation of CPU clock
U32 LLFastTimer::getCPUClockCount32()
{
U64 x;
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
return (U32)(x >> 8);
}
U64 LLFastTimer::getCPUClockCount64()
{
U64 x;
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
return x;
}
std::string LLFastTimer::sClockType = "rdtsc";
#endif

View File

@@ -256,7 +256,6 @@ public:
static void reset();
static U64 countsPerSecond();
static std::string sClockType;
public:
static int sCurDepth;
static U64 sStart[FTM_MAX_DEPTH];

View File

@@ -52,7 +52,7 @@
# include <sys/sysctl.h>
# include <sys/utsname.h>
# include <stdint.h>
//# include <Carbon/Carbon.h> May be needed?
# include <Carbon/Carbon.h>
#elif LL_LINUX
# include <errno.h>
# include <sys/utsname.h>

View File

@@ -35,8 +35,8 @@
const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 5;
const S32 LL_VERSION_PATCH = 9;
const S32 LL_VERSION_BUILD = 1;
const S32 LL_VERSION_PATCH = 10;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Singularity";

View File

@@ -293,7 +293,7 @@ int main(int argc, char **argv)
}
// Check for a change in this process's frontmost window.
if(FrontWindow() != front_window)
if(FrontNonFloatingWindow() != front_window)
{
ProcessSerialNumber self = { 0, kCurrentProcess };
ProcessSerialNumber parent = { 0, kNoProcess };
@@ -319,7 +319,7 @@ int main(int argc, char **argv)
}
}
if((FrontWindow() != NULL) && (front_window == NULL))
if((FrontNonFloatingWindow() != NULL) && (front_window == NULL))
{
// Opening the first window
@@ -331,7 +331,7 @@ int main(int argc, char **argv)
if(layer_group)
{
SetWindowGroup(FrontWindow(), layer_group);
SetWindowGroup(FrontNonFloatingWindow(), layer_group);
}
if(parent_is_front_process)
@@ -340,9 +340,9 @@ int main(int argc, char **argv)
(void) SetFrontProcess( &self );
}
ActivateWindow(FrontWindow(), true);
ActivateWindow(FrontNonFloatingWindow(), true);
}
else if((FrontWindow() == NULL) && (front_window != NULL))
else if((FrontNonFloatingWindow() == NULL) && (front_window != NULL))
{
// Closing the last window
@@ -362,7 +362,7 @@ int main(int argc, char **argv)
window_hack_state = 2;
}
front_window = FrontWindow();
front_window = FrontNonFloatingWindow();
}
}

View File

@@ -246,9 +246,9 @@ BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F
FT_Set_Charmap(mFTFace, mFTFace->charmaps[0]);
}
if (!mIsFallback)
if (!mIsFallback || !sOpenGLcrashOnRestart) // because this often crashes under Linux...
{
// Add the default glyph
// Add the empty glyph`5
addGlyph(0, 0);
}
@@ -362,7 +362,7 @@ BOOL LLFont::addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32
if (mFTFace == NULL)
return FALSE;
llassert(!mIsFallback);
//llassert(!mIsFallback);
fontp->renderGlyph(glyph_index);
S32 width = fontp->mFTFace->glyph->bitmap.width;
S32 height = fontp->mFTFace->glyph->bitmap.rows;
@@ -581,7 +581,7 @@ void LLFont::setSubImageLuminanceAlpha(const U32 x,
{
LLImageRaw *image_raw = mFontBitmapCachep->getImageRaw(bitmap_num);
llassert(!mIsFallback);
//llassert(!mIsFallback);
llassert(image_raw && (image_raw->getComponents() == 2));

View File

@@ -275,7 +275,7 @@ void LLFontGL::destroyAllGL()
else
{
sFontRegistry->destroyGL();
}
}
}
}

View File

@@ -129,7 +129,9 @@ public:
void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; }
LLFontGL::HAlign getHAlign() const { return mHAlign; }
void setLeftHPad( S32 pad ) { mLeftHPad = pad; }
S32 getLeftHPad() const { return mLeftHPad; }
void setRightHPad( S32 pad ) { mRightHPad = pad; }
S32 getRightHPad() const { return mRightHPad; }
const std::string getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); }
const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }

View File

@@ -297,7 +297,9 @@ private:
bool mDragOnLeft;
BOOL mButtonsEnabled[BUTTON_COUNT];
protected:
LLButton* mButtons[BUTTON_COUNT];
private:
F32 mButtonScale;
BOOL mAutoFocus;
LLHandle<LLFloater> mSnappedTo;

View File

@@ -344,7 +344,10 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
if( cur_delimiter->getType() == LLKeywordToken::TWO_SIDED_DELIMITER )
{
while( *cur && !cur_delimiter->isHead(cur))
LLWString str = cur_delimiter->getToken();
std::reverse(str.begin(),str.end()); //Flip the delim around (/* changes to */)
LLKeywordToken reverse_delimiter(cur_delimiter->getType(),cur_delimiter->getColor(),str,cur_delimiter->getToolTip());
while( *cur && !reverse_delimiter.isHead(cur))
{
// Check for an escape sequence.
if (*cur == '\\')
@@ -358,7 +361,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
cur++;
}
// Is the next character the end delimiter?
if (cur_delimiter->isHead(cur))
if (reverse_delimiter.isHead(cur))
{
// Is there was an odd number of backslashes, then this delimiter
// does not end the sequence.

View File

@@ -430,7 +430,7 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col
switch(mFontAlignment)
{
case LLFontGL::LEFT:
start_x = 0.f;
start_x = (mFontStyle & LLFontGL::ITALIC) ? 2.f : 0.f; //Italic text seems need a little padding.
break;
case LLFontGL::RIGHT:
start_x = (F32)getWidth();
@@ -1301,6 +1301,7 @@ void LLScrollListCtrl::swapWithPrevious(S32 index)
if (index <= 0)
{
// At beginning of list, don't do anything
return;
}
LLScrollListItem *cur_itemp = mItemList[index];
@@ -1308,6 +1309,18 @@ void LLScrollListCtrl::swapWithPrevious(S32 index)
mItemList[index - 1] = cur_itemp;
}
void LLScrollListCtrl::moveToFront(S32 index)
{
if(index == 0 || index >= (S32)mItemList.size())
{
return;
}
LLScrollListCtrl::item_list::iterator it = mItemList.begin();
std::advance(it,index);
mItemList.push_front(*it);
mItemList.erase(it);
}
void LLScrollListCtrl::deleteSingleItem(S32 target_index)
{
@@ -3002,6 +3015,9 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
std::string imagename;
child->getAttributeString("image", imagename);
std::string imageoverlay;
child->getAttributeString("image_overlay", imageoverlay);
BOOL columndynamicwidth = FALSE;
child->getAttributeBOOL("dynamicwidth", columndynamicwidth);
@@ -3021,6 +3037,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
columns[index]["sort"] = sortname;
columns[index]["sort_ascending"] = sort_ascending;
columns[index]["image"] = imagename;
columns[index]["image_overlay"] = imageoverlay;
columns[index]["label"] = labelname;
columns[index]["width"] = columnwidth;
columns[index]["relwidth"] = columnrelwidth;
@@ -3229,6 +3246,10 @@ void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos)
//new_column->mHeader->setScaleImage(false);
new_column->mHeader->setImage(column["image"].asString());
}
else if(column["image_overlay"].asString() != "")
{
new_column->mHeader->setImageOverlay(column["image_overlay"].asString());
}
else
{
new_column->mHeader->setLabel(new_column->mLabel);
@@ -3683,6 +3704,9 @@ LLColumnHeader::LLColumnHeader(const std::string& label, const LLRect &rect, LLS
addChild(mResizeBar);
mResizeBar->setEnabled(FALSE);
mImageOverlayAlignment = LLFontGL::HCENTER;
mImageOverlayColor = LLColor4::white;
}
LLColumnHeader::~LLColumnHeader()
@@ -3706,6 +3730,95 @@ void LLColumnHeader::draw()
// Draw children
LLComboBox::draw();
if (mImageOverlay.notNull()) //Ugly dupe code from llbutton...
{
BOOL pressed_by_keyboard = FALSE;
if (mButton->hasFocus())
{
pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mButton->getCommitOnReturn() && gKeyboard->getKeyDown(KEY_RETURN));
}
// Unselected image assignments
S32 local_mouse_x;
S32 local_mouse_y;
LLUI::getCursorPositionLocal(mButton, &local_mouse_x, &local_mouse_y);
BOOL pressed = pressed_by_keyboard
|| (mButton->hasMouseCapture() && mButton->pointInView(local_mouse_x, local_mouse_y))
|| mButton->getToggleState();
// Now draw special overlay..
// let overlay image and text play well together
S32 button_width = mButton->getRect().getWidth();
S32 button_height = mButton->getRect().getHeight();
S32 text_left = mButton->getLeftHPad();
S32 text_right = button_width - mButton->getRightHPad();
S32 text_width = text_right - text_left;
// draw overlay image
// get max width and height (discard level 0)
S32 overlay_width = mImageOverlay->getWidth();
S32 overlay_height = mImageOverlay->getHeight();
F32 scale_factor = llmin((F32)button_width / (F32)overlay_width, (F32)button_height / (F32)overlay_height, 1.f);
overlay_width = llround((F32)overlay_width * scale_factor);
overlay_height = llround((F32)overlay_height * scale_factor);
S32 center_x = mButton->getLocalRect().getCenterX();
S32 center_y = mButton->getLocalRect().getCenterY();
//FUGLY HACK FOR "DEPRESSED" BUTTONS
if (pressed)
{
center_y--;
center_x++;
}
// fade out overlay images on disabled buttons
LLColor4 overlay_color = mImageOverlayColor;
if (!mButton->getEnabled())
{
overlay_color.mV[VALPHA] = 0.5f;
}
switch(mImageOverlayAlignment)
{
case LLFontGL::LEFT:
text_left += overlay_width + 1;
text_width -= overlay_width + 1;
mImageOverlay->draw(
text_left,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
overlay_color);
break;
case LLFontGL::HCENTER:
mImageOverlay->draw(
center_x - (overlay_width / 2),
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
overlay_color);
break;
case LLFontGL::RIGHT:
text_right -= overlay_width + 1;
text_width -= overlay_width + 1;
mImageOverlay->draw(
text_right - overlay_width,
center_y - (overlay_height / 2),
overlay_width,
overlay_height,
overlay_color);
break;
default:
// draw nothing
break;
}
}
if (mList->getVisible())
{
// sync sort order with list selection every frame
@@ -3738,6 +3851,20 @@ void LLColumnHeader::setImage(const std::string &image_name)
}
}
void LLColumnHeader::setImageOverlay(const std::string &image_name, LLFontGL::HAlign alignment, const LLColor4& color)
{
if (image_name.empty())
{
mImageOverlay = NULL;
}
else
{
mImageOverlay = LLUI::getUIImage(image_name);
mImageOverlayAlignment = alignment;
mImageOverlayColor = color;
}
}
//static
void LLColumnHeader::onClick(void* user_data)
{

View File

@@ -274,6 +274,7 @@ public:
/*virtual*/ void userSetShape(const LLRect& new_rect);
void setImage(const std::string &image_name);
void setImageOverlay(const std::string &overlay_image, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
LLScrollListColumn* getColumn() { return mColumn; }
void setHasResizableElement(BOOL resizable);
void updateResizeBars();
@@ -294,6 +295,10 @@ private:
LLUIString mDescendingText;
BOOL mShowSortOptions;
BOOL mHasResizableElement;
LLPointer<LLUIImage> mImageOverlay;
LLFontGL::HAlign mImageOverlayAlignment;
LLColor4 mImageOverlayColor;
};
class LLScrollListItem
@@ -467,6 +472,7 @@ public:
void swapWithNext(S32 index);
void swapWithPrevious(S32 index);
void moveToFront(S32 index);
void setCanSelect(BOOL can_select) { mCanSelect = can_select; }
virtual BOOL getCanSelect() const { return mCanSelect; }

View File

@@ -63,10 +63,10 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask)
{
mIter = fs::directory_iterator(dir_path);
}
#if BOOST_FILESYSTEM_VERSION == 2
catch (fs::basic_filesystem_error<fs::path>& e)
#else
#if BOOST_FILESYSTEM_VERSION >= 3
catch (fs::filesystem_error& e)
#else
catch (fs::basic_filesystem_error<fs::path>& e)
#endif
{
llerrs << e.what() << llendl;
@@ -112,10 +112,10 @@ bool LLDirIterator::Impl::next(std::string &fname)
while (mIter != end_itr && !found)
{
boost::smatch match;
#if BOOST_FILESYSTEM_VERSION == 2
std::string name = mIter->path().filename();
#else
#if BOOST_FILESYSTEM_VERSION >= 3
std::string name = mIter->path().filename().string();
#else
std::string name = mIter->path().filename();
#endif
if (found = boost::regex_match(name, match, mFilterExp))
{
@@ -142,9 +142,6 @@ std::string glob_to_regex(const std::string& glob)
switch (c)
{
case '.':
regex+="\\.";
break;
case '*':
if (glob.begin() == i)
{
@@ -177,6 +174,14 @@ std::string glob_to_regex(const std::string& glob)
case '!':
regex+= square_brace_open ? '^' : c;
break;
case '.': // This collection have different regex meaning
case '^': // And so need escaping
case '(':
case ')':
case '+':
case '|':
case '$':
regex+='\\';
default:
regex+=c;
break;

View File

@@ -120,7 +120,7 @@ void LLScriptLSOParse::printRegisters(LLFILE *fp)
else if (gMajorVersion == LSL2_MAJOR_VERSION_TWO)
{
U64 data = get_register_u64(mRawData, (LSCRIPTRegisters)i);
fprintf(fp, "%s: 0x%X%X\n", gLSCRIPTRegisterNames[i], (U32)(data>>32), (U32)(data && 0xFFFFFFFF));
fprintf(fp, "%s: 0x%X%X\n", gLSCRIPTRegisterNames[i], (U32)(data>>32), (U32)(data & 0xFFFFFFFF));
}
}
fprintf(fp, "=============================\n\n");

View File

@@ -644,11 +644,12 @@ return Leave current function or event handler
# Comment
[one_sided_delimiter .8, .3, .15]
// Comment:Non-functional commentary or disabled code
# for now two_sided_delimiter spans from the token to the token, reversed. (eg: /* to */)
[two_sided_delimiter .8, .3, .15]
/* */ Comment:Non-functional commentary or disabled code
/* Comment:Non-functional commentary or disabled code
# String literals
[two_sided_delimiter_esc 0, .2, 0]
" " String literal
" String literal
#functions are supplied by the program now.

View File

@@ -9,6 +9,52 @@
<string>settings_rlv.xml</string>
</array>
<key>CCSAllowNameplateOverride</key>
<map>
<key>Comment</key>
<string>Allow CCS HUD to override nameplates.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>HTTPRequestRate</key>
<map>
<key>Comment</key>
<string>Number of HTTP texture requests fired per second.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>30</integer>
</map>
<key>HTTPMaxRequests</key>
<map>
<key>Comment</key>
<string>Maximum number of simultaneous HTTP requests in progress.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>32</integer>
</map>
<key>HTTPMinRequests</key>
<map>
<key>Comment</key>
<string>Attempt to maintain at least this many HTTP requests in progress by ignoring bandwidth</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>2</integer>
</map>
<key>AllowLargeSounds</key>
<map>
<key>Comment</key>

View File

@@ -365,17 +365,6 @@
<string>This is an autoresponse!</string>
</map>
</map>
<key>AscentInstantMessageAnnounceIncoming</key>
<map>
<key>Comment</key>
<string>Open a new IM tab when another person begins typing to you and announce that they are doing so.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MoyMiniMapCustomColor</key>
<map>
<key>Comment</key>
@@ -392,131 +381,6 @@
<real>1.0</real>
</array>
</map>
<!-- Ascent Account-Specific (If active) -->
<key>AscentFriendColor</key>
<map>
<key>Comment</key>
<string>Color of chat messages from other residents</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>1.0</real>
<real>0.0</real>
<real>1.0</real>
</array>
</map>
<key>AscentLindenColor</key>
<map>
<key>Comment</key>
<string>Color of chat messages from other residents</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.0</real>
<real>0.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
<key>AscentMutedColor</key>
<map>
<key>Comment</key>
<string>Color of chat messages from other residents</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.7</real>
<real>0.7</real>
<real>0.7</real>
<real>1.0</real>
</array>
</map>
<key>AscentEstateOwnerColor</key>
<map>
<key>Comment</key>
<string>Color of chat messages from other residents</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>1.0</real>
<real>0.6</real>
<real>1.0</real>
<real>1.0</real>
</array>
</map>
<key>AscentUseCustomTag</key>
<map>
<key>Comment</key>
<string>Show a custom local tag.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AscentCustomTagColor</key>
<map>
<key>Comment</key>
<string>Color of custom local tag.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Color4</string>
<key>Value</key>
<array>
<real>0.5</real>
<real>1.0</real>
<real>0.25</real>
<real>1.0</real>
</array>
</map>
<key>AscentCustomTagLabel</key>
<map>
<key>Comment</key>
<string>Label for the custom local tag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>Custom</string>
</map>
<key>AscentReportClientIndex</key>
<map>
<key>Comment</key>
<string>Show your own tag</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AscentReportClientUUID</key>
<map>
<key>Comment</key>
<string>Broadcasted Client Key</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>f25263b7-6167-4f34-a4ef-af65213b2e39</string>
</map>
<!-- Ascent Account-Specific (Always) -->
<!-- General additions -->
<key>rkeastInventoryPreviousCount</key>

View File

@@ -10,20 +10,20 @@
uniform sampler2D diffuseMap;
uniform float glowStrength;
float kern[4] = float[4](.25,.5,.8,1.0); //Initialize the correct (non nVidia cg) way
vec4 kern = vec4(.25,.5,.8,1.0);
void main()
{
vec4 col = vec4(0.0, 0.0, 0.0, 0.0);
col += kern[0] * texture2D(diffuseMap, gl_TexCoord[0].xy);
col += kern[1] * texture2D(diffuseMap, gl_TexCoord[1].xy);
col += kern[2] * texture2D(diffuseMap, gl_TexCoord[2].xy);
col += kern[3] * texture2D(diffuseMap, gl_TexCoord[3].xy);
col += kern[3] * texture2D(diffuseMap, gl_TexCoord[0].zw);
col += kern[2] * texture2D(diffuseMap, gl_TexCoord[1].zw);
col += kern[1] * texture2D(diffuseMap, gl_TexCoord[2].zw);
col += kern[0] * texture2D(diffuseMap, gl_TexCoord[3].zw);
col += kern.x * texture2D(diffuseMap, gl_TexCoord[0].xy);
col += kern.y * texture2D(diffuseMap, gl_TexCoord[1].xy);
col += kern.z * texture2D(diffuseMap, gl_TexCoord[2].xy);
col += kern.w * texture2D(diffuseMap, gl_TexCoord[3].xy);
col += kern.w * texture2D(diffuseMap, gl_TexCoord[0].zw);
col += kern.z * texture2D(diffuseMap, gl_TexCoord[1].zw);
col += kern.y * texture2D(diffuseMap, gl_TexCoord[2].zw);
col += kern.x * texture2D(diffuseMap, gl_TexCoord[3].zw);
gl_FragColor = vec4(col.rgb * glowStrength, col.a);
}

View File

@@ -32,7 +32,7 @@ vec4 applyWaterFog(vec4 color)
float depth = length(getPositionEye() - int_v);
//get "thickness" of water
float l = max(depth, 0.1);
float l = min(max(depth, 0.1),50.0);
float kd = waterFogDensity;
float ks = waterFogKS;

View File

@@ -491,6 +491,8 @@ void LLPrefsAscentChat::cancel()
// Update local copy so cancel has no effect
void LLPrefsAscentChat::apply()
{
gSavedPerAccountSettings.setString("AscentInstantMessageResponse", childGetValue("im_response"));
refreshValues();
refresh();
}

View File

@@ -68,6 +68,13 @@ if [ "$GTK_IM_MODULE" = "scim" ]; then
export GTK_IM_MODULE=xim
fi
# Work around for a crash bug when restarting OpenGL after a change in the
# graphic settings (anti-aliasing, VBO, FSAA, full screen mode, UI scale).
# When you enable this work around, you can change the settings without
# crashing, but you will have to restart the viewer after changing them
# because the display still gets corrupted.
export LL_OPENGL_RESTART_CRASH_BUG=x
## - Automatically work around the ATI mouse cursor crash bug:
## (this workaround is disabled as most fglrx users do not see the bug)
#if lsmod | grep fglrx &>/dev/null ; then

View File

@@ -2493,10 +2493,11 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
S32 count = mGroups.count();
for(S32 i = 0; i < count; ++i)
{
if(mGroups.get(i).mID == group_id)
LLGroupData &group = mGroups.get(i);
if(group.mID == group_id)
{
mGroups.get(i).mAcceptNotices = accept_notices;
mGroups.get(i).mListInProfile = list_in_profile;
group.mAcceptNotices = accept_notices;
group.mListInProfile = list_in_profile;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("SetGroupAcceptNotices");
msg->nextBlock("AgentData");
@@ -2508,6 +2509,9 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
msg->nextBlock("NewData");
msg->addBOOL("ListInProfile", list_in_profile);
sendReliableMessage();
update_group_floaters(group.mID);
return TRUE;
}
}

View File

@@ -873,4 +873,5 @@ extern std::string gAuthString;
extern LLUUID gReSitTargetID;
extern LLVector3 gReSitOffset;
// </edit>
void update_group_floaters(const LLUUID& group_id);
#endif

View File

@@ -679,7 +679,13 @@ bool LLAppViewer::init()
LLViewerJointMesh::updateVectorize();
// load MIME type -> media impl mappings
LLMIMETypes::parseMIMETypes( std::string("mime_types.xml") );
#if LL_WINDOWS
LLMIMETypes::parseMIMETypes( std::string("mime_types_windows.xml") );
#elif LL_DARWIN
LLMIMETypes::parseMIMETypes( std::string("mime_types_mac.xml") );
#elif LL_LINUX
LLMIMETypes::parseMIMETypes( std::string("mime_types_linux.xml") );
#endif
// Copy settings to globals. *TODO: Remove or move to appropriage class initializers
settings_to_globals();
@@ -1569,6 +1575,7 @@ bool LLAppViewer::cleanup()
end_messaging_system();
llinfos << "Message system deleted." << llendflush;
LLUserAuth::getInstance()->reset(); //reset before LLCurl::cleanupClass, else LLCURL::sHandleMutex == NULL
// *NOTE:Mani - The following call is not thread safe.
LLCurl::cleanupClass();
llinfos << "LLCurl cleaned up." << llendflush;

View File

@@ -75,8 +75,9 @@ LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
mFrameStatView->setVisible(FALSE); // start invisible
addChild(mFrameStatView);
r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f),
(S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
r.setLeftTopAndSize(25, rect.getHeight() - 50,
(S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f),
(S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
mFastTimerView = new LLFastTimerView("fast timers", r);
mFastTimerView->setFollowsTop();
mFastTimerView->setFollowsLeft();

View File

@@ -233,7 +233,7 @@ static const int FTV_DISPLAY_NUM = LL_ARRAY_SIZE(ft_display_table);
S32 ft_display_idx[FTV_DISPLAY_NUM]; // line of table entry for display purposes (for collapse)
LLFastTimerView::LLFastTimerView(const std::string& name, const LLRect& rect)
: LLFloater(name, rect, std::string("Fast Timers"))
: LLFloater(name, rect, std::string(), FALSE, 1, 1, FALSE, FALSE, TRUE)
{
setVisible(FALSE);
mDisplayMode = 0;
@@ -320,6 +320,15 @@ S32 LLFastTimerView::getLegendIndex(S32 y)
BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
{
{
S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft;
S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom;
if (mButtons[BUTTON_CLOSE]->getVisible() &&
mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y))
{
return LLFloater::handleMouseDown(x, y, mask);
}
}
if (x < mBarRect.mLeft)
{
S32 legend_index = getLegendIndex(y);
@@ -381,6 +390,15 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask)
{
{
S32 local_x = x - mButtons[BUTTON_CLOSE]->getRect().mLeft;
S32 local_y = y - mButtons[BUTTON_CLOSE]->getRect().mBottom;
if (mButtons[BUTTON_CLOSE]->getVisible() &&
mButtons[BUTTON_CLOSE]->pointInView(local_x, local_y))
{
return LLFloater::handleMouseUp(x, y, mask);
}
}
return FALSE;
}
@@ -429,6 +447,18 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
return TRUE;
}
void LLFastTimerView::onClose(bool app_quitting)
{
if (app_quitting)
{
LLFloater::close(app_quitting);
}
else
{
setVisible(FALSE);
}
}
void LLFastTimerView::draw()
{
LLFastTimer t(LLFastTimer::FTM_RENDER_TIMER);
@@ -442,8 +472,9 @@ void LLFastTimerView::draw()
S32 height = (S32) (gViewerWindow->getVirtualWindowRect().getHeight()*0.75f);
S32 width = (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f);
// HACK: casting away const. Should use setRect or some helper function instead.
const_cast<LLRect&>(getRect()).setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height);
LLRect new_rect;
new_rect.setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height);
setRect(new_rect);
S32 left, top, right, bottom;
S32 x, y, barw, barh, dx, dy;
@@ -591,11 +622,14 @@ void LLFastTimerView::draw()
left = x; right = x + texth;
top = y; bottom = y - texth;
S32 scale_offset = 0;
if (i == mHoverIndex)
if (y > 3 * texth)
{
scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 2.f);
if (i == mHoverIndex)
{
scale_offset = llfloor(sinf(mHighlightTimer.getElapsedTimeF32() * 6.f) * 2.f);
}
gl_rect_2d(left - scale_offset, top + scale_offset, right + scale_offset, bottom - scale_offset, *ft_display_table[i].color);
}
gl_rect_2d(left - scale_offset, top + scale_offset, right + scale_offset, bottom - scale_offset, *ft_display_table[i].color);
int tidx = ft_display_table[i].timer;
F32 ms = 0;
@@ -625,7 +659,7 @@ void LLFastTimerView::draw()
dx = (texth+4) + level*8;
LLColor4 color = disabled > 1 ? LLColor4::grey : LLColor4::white;
if (level > 0)
if (level > 0 && y > 3 * texth)
{
S32 line_start_y = (top + bottom) / 2;
S32 line_end_y = line_start_y + ((texth + 2) * (display_line[i] - display_line[parent])) - (texth / 2);
@@ -647,13 +681,16 @@ void LLFastTimerView::draw()
next_parent = ft_display_table[next_parent].parent;
}
if (is_child_of_hover_item)
if (y > 3 * texth)
{
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD);
}
else
{
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, color, LLFontGL::LEFT, LLFontGL::TOP);
if (is_child_of_hover_item)
{
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD);
}
else
{
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, color, LLFontGL::LEFT, LLFontGL::TOP);
}
}
y -= (texth + 2);
@@ -661,6 +698,11 @@ void LLFastTimerView::draw()
if (textw > legendwidth)
legendwidth = textw;
}
if (y <= 3 * texth)
{
LLFontGL::getFontMonospace()->renderUTF8("<list truncated>", 0, 3 * texth, 2 * texth, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD);
}
for (S32 i=cur_line; i<FTV_DISPLAY_NUM; i++)
{
ft_display_idx[i] = -1;

View File

@@ -47,6 +47,7 @@ public:
virtual BOOL handleMouseUp(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 void onClose(bool app_quitting);
virtual void draw();
S32 getLegendIndex(S32 y);

View File

@@ -1486,7 +1486,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicT
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET);
mDummyAvatar->hideSkirt();
gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
//gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
// stop extraneous animations
mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE );

View File

@@ -67,6 +67,9 @@ std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
// helper functions
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask = GP_ALL_POWERS);
//callbacks
void onGroupSortChanged(void* user_data);
///----------------------------------------------------------------------------
/// Class LLFloaterGroupPicker
///----------------------------------------------------------------------------
@@ -198,15 +201,9 @@ LLPanelGroups::~LLPanelGroups()
// clear the group list, and get a fresh set of info.
void LLPanelGroups::reset()
{
LLCtrlListInterface *group_list = childGetListInterface("group list");
if (group_list)
{
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
const std::string none_text = getString("none");
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
enableButtons();
@@ -220,7 +217,9 @@ BOOL LLPanelGroups::postBuild()
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
const std::string none_text = getString("none");
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
LLScrollListCtrl *group_list = getChild<LLScrollListCtrl>("group list");
init_group_list(group_list, gAgent.getGroupID(), none_text);
group_list->setSortChangedCallback(onGroupSortChanged); //Force 'none' to always be first entry.
childSetAction("Activate", onBtnActivate, this);
@@ -478,8 +477,97 @@ bool LLPanelGroups::callbackLeaveGroup(const LLSD& notification, const LLSD& res
void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
{
LLPanelGroups* self = (LLPanelGroups*)userdata;
if(self) self->enableButtons();
LLPanelGroups *self = (LLPanelGroups*)userdata;
if(!self)
return;
self->enableButtons();
LLScrollListCtrl *group_list = (LLScrollListCtrl*)self->getChild<LLScrollListCtrl>("group list");
if(!group_list)
return;
LLScrollListItem *item = group_list->getFirstSelected();
if(!item)
return;
const LLUUID group_id = item->getValue().asUUID();
if(group_id.isNull())
return;
LLGroupData group_data;
if(!gAgent.getGroupData(group_id,group_data))
return;
bool list_in_profile = item->getColumn(1)->getValue().asBoolean();
bool receive_chat = item->getColumn(2)->getValue().asBoolean();
bool recieve_notify = item->getColumn(3)->getValue().asBoolean();
bool update_floaters = false;
if(gIMMgr->getIgnoreGroup(group_id) == receive_chat)
{
gIMMgr->updateIgnoreGroup(group_id, !receive_chat);
update_floaters = true;
}
if( (bool)group_data.mListInProfile != list_in_profile ||
(bool)group_data.mAcceptNotices != recieve_notify )
{
gAgent.setUserGroupFlags(group_id, recieve_notify, list_in_profile);
}
else if(update_floaters) //gAgent.setUserGroupFlags already calls update_group_floaters
update_group_floaters(group_id);
}
LLSD create_group_element(const LLGroupData *group_datap, const LLUUID &active_group, const std::string& none_text, const U64 &powers_mask)
{
if(group_datap && !((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0)))
return LLSD();
const LLUUID &id = group_datap ? group_datap->mID : LLUUID::null;
const bool enabled = !!group_datap;
std::string style = (group_datap && group_datap->mListInProfile) ? "BOLD" : "NORMAL";
if(active_group == id)
{
style.append("|ITALIC");
}
LLSD element;
element["id"] = id;
LLSD& name_column = element["columns"][0];
name_column["column"] = "name";
name_column["value"] = group_datap ? group_datap->mName : none_text;
name_column["font"] = "SANSSERIF";
name_column["font-style"] = style;
LLSD& show_column = element["columns"][1];
show_column["column"] = "is_listed_group";
show_column["type"] = "checkbox";
show_column["enabled"] = enabled;
show_column["value"] = enabled && group_datap->mListInProfile;
LLSD& chat_column = element["columns"][2];
chat_column["column"] = "is_chattable_group";
chat_column["type"] = "checkbox";
chat_column["enabled"] = enabled;
chat_column["value"] = enabled && !gIMMgr->getIgnoreGroup(id);
LLSD& notice_column = element["columns"][3];
notice_column["column"] = "is_notice_group";
notice_column["type"] = "checkbox";
notice_column["enabled"] = enabled;
notice_column["value"] = enabled && group_datap->mAcceptNotices;
return element;
}
void onGroupSortChanged(void* user_data)
{
LLPanelGroups *panel = (LLPanelGroups*)user_data;
if(!panel)
return;
LLScrollListCtrl *group_list = (LLScrollListCtrl*)panel->getChild<LLScrollListCtrl>("group list");
if(!group_list)
return;
group_list->moveToFront(group_list->getItemIndex(LLUUID::null));
}
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask)
@@ -489,48 +577,29 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const s
LLCtrlListInterface *group_list = ctrl->getListInterface();
if (!group_list) return;
const LLUUID selected_id = group_list->getSelectedValue();
const S32 selected_idx = group_list->getFirstSelectedIndex();
const S32 scroll_pos = ctrl->getScrollPos();
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
for(S32 i = 0; i < count; ++i)
{
id = gAgent.mGroups.get(i).mID;
LLGroupData* group_datap = &gAgent.mGroups.get(i);
if ((powers_mask == GP_ALL_POWERS) || ((group_datap->mPowers & powers_mask) != 0))
{
std::string style = "NORMAL";
if(highlight_id == id)
{
style = "BOLD";
}
LLSD element;
element["id"] = id;
element["columns"][0]["column"] = "name";
element["columns"][0]["value"] = group_datap->mName;
element["columns"][0]["font"] = "SANSSERIF";
element["columns"][0]["font-style"] = style;
LLSD element = create_group_element(&gAgent.mGroups.get(i), highlight_id, none_text, powers_mask);
if(element.size())
group_list->addElement(element, ADD_SORTED);
}
}
// add "none" to list at top
{
std::string style = "NORMAL";
if (highlight_id.isNull())
{
style = "BOLD";
}
LLSD element;
element["id"] = LLUUID::null;
element["columns"][0]["column"] = "name";
element["columns"][0]["value"] = none_text;
element["columns"][0]["font"] = "SANSSERIF";
element["columns"][0]["font-style"] = style;
group_list->addElement(create_group_element(NULL, highlight_id, none_text, powers_mask), ADD_TOP);
group_list->addElement(element, ADD_TOP);
}
group_list->selectByValue(highlight_id);
if(selected_id.notNull())
group_list->selectByValue(selected_id);
else
group_list->selectByValue(highlight_id); //highlight is actually active group
if(selected_idx!=group_list->getFirstSelectedIndex()) //if index changed then our stored pos is pointless.
ctrl->scrollToShowSelected();
else
ctrl->setScrollPos(scroll_pos);
}

View File

@@ -40,6 +40,7 @@
#include "llagent.h"
#include "llbutton.h"
#include "llfloatergodtools.h"
#include "llfloateravatarinfo.h"
#include "llparcel.h"
#include "llscrolllistctrl.h"
#include "lllineeditor.h"
@@ -50,6 +51,10 @@
#include "llviewerregion.h"
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
#include "llagentcamera.h"
#include "llviewerobjectlist.h"
void cmdline_printchat(std::string message);
LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
@@ -104,6 +109,11 @@ BOOL LLFloaterTopObjects::postBuild()
childSetAction("disable_all_btn", onDisableAll, this);
childSetAction("refresh_btn", onRefresh, this);
childSetAction("lagwarning", onLagWarningBtn, this);
childSetAction("profile", onProfileBtn, this);
childSetAction("kick", onKickBtn, this);
childSetAction("tpto", onTPBtn, this);
childSetAction("filter_object_btn", onGetByObjectNameClicked, this);
childSetAction("filter_owner_btn", onGetByOwnerNameClicked, this);
@@ -202,6 +212,10 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
element["columns"][1]["column"] = "name";
element["columns"][1]["value"] = name_buf;
element["columns"][1]["font"] = "SANSSERIF";
if (name_buf == owner_buf)
{
element["columns"][1]["color"] = LLColor4::red.getValue();
}
element["columns"][2]["column"] = "owner";
element["columns"][2]["value"] = owner_buf;
element["columns"][2]["font"] = "SANSSERIF";
@@ -292,6 +306,28 @@ void LLFloaterTopObjects::onDoubleClickObjectsList(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->showBeacon();
self->lookAtAvatar();
}
void LLFloaterTopObjects::lookAtAvatar()
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
LLVOAvatar* voavatar = gObjectList.findAvatar(taskid);
if(voavatar)
{
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
gAgentCamera.changeCameraToThirdPerson();
gAgentCamera.setFocusGlobal(voavatar->getPositionGlobal(),taskid);
gAgentCamera.setCameraPosAndFocusGlobal(voavatar->getPositionGlobal()
+ LLVector3d(3.5,1.35,0.75) * voavatar->getRotation(),
voavatar->getPositionGlobal(),
taskid );
}
}
// static
@@ -381,6 +417,126 @@ void LLFloaterTopObjects::onReturnSelected(void* data)
sInstance->doToObjects(ACTION_RETURN, false);
}
void LLFloaterTopObjects::onLagWarningBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onLagWarning(data);
}
void LLFloaterTopObjects::onLagWarning(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
std::string name = first_selected->getColumn(1)->getValue().asString();
std::string score = first_selected->getColumn(0)->getValue().asString();
std::istringstream stm;
stm.str(score);
F32 f_score;
stm >> f_score;
F32 percentage = 100.f * (f_score / 22);
std::string message = llformat(
"Hello %s, you are receiving this automated message because you are wearing heavily scripted attachments/HUDs, "
"causing excessive script lag (%5.2f ms, that's ca. %5.2f%% of the region's resources.)\n\n"
"Please remove resizer scripts or attachments to reduce your script time, thank you.",
name.c_str(),
(F32)f_score,
(F32)percentage
);
std::string my_name;
gAgent.buildFullname(my_name);
cmdline_printchat(llformat("Script time warning sent to %s: (%5.2f ms)",
name.c_str(),(F32)f_score));
send_improved_im(LLUUID(taskid),
my_name,
message,
IM_ONLINE,
IM_NOTHING_SPECIAL,
LLUUID::null,
NO_TIMESTAMP,
(U8*)EMPTY_BINARY_BUCKET,
EMPTY_BINARY_BUCKET_SIZE);
}
void LLFloaterTopObjects::onProfileBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onProfile(data);
}
void LLFloaterTopObjects::onProfile(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
LLFloaterAvatarInfo::showFromDirectory(taskid);
}
void LLFloaterTopObjects::onKickBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onKick(data);
}
void LLFloaterTopObjects::onKick(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("EstateOwnerMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
msg->nextBlock("MethodData");
msg->addString("Method", "kickestate");
msg->addUUID("Invoice", LLUUID::null);
msg->nextBlock("ParamList");
msg->addString("Parameter", taskid.asString().c_str());
msg->sendReliable(gAgent.getRegionHost());
}
void LLFloaterTopObjects::onTPBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onTP(data);
}
void LLFloaterTopObjects::onTP(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
std::string name = first_selected->getColumn(1)->getValue().asString();
std::string pos_string = first_selected->getColumn(3)->getValue().asString();
F32 x, y, z;
S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z);
if (matched != 3) return;
LLVector3 pos_agent(x, y, z);
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
gAgent.teleportViaLocation( pos_global );
}
//static
bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response)

View File

@@ -56,6 +56,11 @@ public:
static void setMode(U32 mode) { if (sInstance) sInstance->mCurrentMode = mode; }
void onProfile(void* data);
void onKick(void* data);
void onTP(void* data);
void onLagWarning(void* data);
private:
LLFloaterTopObjects();
~LLFloaterTopObjects();
@@ -64,6 +69,7 @@ private:
static void onCommitObjectsList(LLUICtrl* ctrl, void* data);
static void onDoubleClickObjectsList(void* data);
void lookAtAvatar();
static void onClickShowBeacon(void* data);
void doToObjects(int action, bool all);
@@ -73,6 +79,11 @@ private:
static void onDisableAll(void* data);
static void onDisableSelected(void* data);
static void onProfileBtn(void* data);
static void onKickBtn(void* data);
static void onTPBtn(void* data);
static void onLagWarningBtn(void* data);
static bool callbackReturnAll(const LLSD& notification, const LLSD& response);
static bool callbackDisableAll(const LLSD& notification, const LLSD& response);

View File

@@ -221,7 +221,6 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
mOpenEnrollment(FALSE),
mMembershipFee(0),
mAllowPublish(FALSE),
mListInProfile(FALSE),
mMaturePublish(FALSE),
mChanged(FALSE),
mMemberCount(0),

View File

@@ -255,7 +255,6 @@ public:
BOOL mOpenEnrollment;
S32 mMembershipFee;
BOOL mAllowPublish;
BOOL mListInProfile;
BOOL mMaturePublish;
BOOL mChanged;
S32 mMemberCount;

View File

@@ -66,7 +66,7 @@ std::string LLLogChat::makeLogFileName(std::string filename)
std::string LLLogChat::cleanFileName(std::string filename)
{
std::string invalidChars = "\"\'\\/?*:<>|";
std::string invalidChars = "\"\'\\/?*:<>|[]{}~"; // Cannot match glob or illegal filename chars
S32 position = filename.find_first_of(invalidChars);
while (position != filename.npos)
{

View File

@@ -123,6 +123,8 @@ LLNetMap::LLNetMap(const std::string& name) :
(new mmsetblue())->registerListener(this, "MiniMap.setblue");
(new mmsetyellow())->registerListener(this, "MiniMap.setyellow");
(new mmsetcustom())->registerListener(this, "MiniMap.setcustom");
(new mmsetunmark())->registerListener(this, "MiniMap.setunmark");
(new mmenableunmark())->registerListener(this, "MiniMap.enableunmark");
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_mini_map.xml");
@@ -176,18 +178,15 @@ void LLNetMap::translatePan( F32 delta_x, F32 delta_y )
///////////////////////////////////////////////////////////////////////////////////
LLColor4 mm_mapcols[1024];
LLUUID mm_mapkeys[1024];
U32 mm_netmapnum;
std::size_t hash_value(const LLUUID& uuid)
{
return (std::size_t)uuid.getCRC32();
}
boost::unordered_map<const LLUUID,LLColor4> mm_MarkerColors;
void LLNetMap::mm_setcolor(LLUUID key,LLColor4 col){
if(mm_netmapnum>1023){
llinfos << "Minimap color buffer filled, relog or something to clear it" << llendl;
return;
}
mm_mapcols[mm_netmapnum]=col;
mm_mapkeys[mm_netmapnum]=key;
mm_netmapnum+=1;
void LLNetMap::mm_setcolor(LLUUID key,LLColor4 col)
{
mm_MarkerColors[key] = col;
}
void LLNetMap::draw()
{
@@ -376,7 +375,6 @@ void LLNetMap::draw()
std::vector<LLUUID> avatar_ids;
std::vector<LLVector3d> positions;
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
U32 a;
for(U32 i=0; i<avatar_ids.size(); i++)
{
LLColor4 avColor = standard_color;
@@ -416,12 +414,10 @@ void LLNetMap::draw()
else
{
// MOYMOD Minimap custom av colors.
for(a=0;a<mm_netmapnum;a+=1)
boost::unordered_map<const LLUUID,LLColor4>::const_iterator it = mm_MarkerColors.find(avatar_ids[i]);
if(it != mm_MarkerColors.end())
{
if(avatar_ids[i]==mm_mapkeys[a])
{
avColor = mm_mapcols[a];
}
avColor = it->second;
}
}
@@ -1090,6 +1086,18 @@ bool LLNetMap::mmsetcustom::handleEvent(LLPointer<LLEvent> event, const LLSD& us
//}
return true;
}
bool LLNetMap::mmsetunmark::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
mm_MarkerColors.erase(mPtr->mClosestAgentAtLastRightClick);
return true;
}
bool LLNetMap::mmenableunmark::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLNetMap *self = mPtr;
BOOL enabled = mPtr->mClosestAgentAtLastRightClick.notNull() && mm_MarkerColors.find(mPtr->mClosestAgentAtLastRightClick) != mm_MarkerColors.end();
self->findControl(userdata["control"].asString())->setValue(enabled);
return true;
}
bool LLNetMap::LLCenterMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
EMiniMapCenter center = (EMiniMapCenter)userdata.asInteger();

View File

@@ -210,7 +210,16 @@ private:
public:
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
};
class mmsetunmark : public LLMemberListener<LLNetMap> //moymod
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
};
class mmenableunmark : public LLMemberListener<LLNetMap> //moymod
{
public:
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
};

View File

@@ -101,7 +101,7 @@ bool LLNotifyBox::onNotification(const LLSD& notify)
//bring existing notification to top
//This getInstance is ugly, as LLNotifyBox is derived from both LLInstanceTracker and LLEventTimer, which also is derived from its own LLInstanceTracker
//Have to explicitly determine which getInstance function to use.
LLNotifyBox* boxp = LLNotifyBox::LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
if (boxp && !boxp->isDead())
{
gNotifyBoxView->showOnly(boxp);
@@ -118,7 +118,7 @@ bool LLNotifyBox::onNotification(const LLSD& notify)
}
else if (notify["sigtype"].asString() == "delete")
{
LLNotifyBox* boxp = LLNotifyBox::LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
LLNotifyBox* boxp = LLInstanceTracker<LLNotifyBox, LLUUID>::getInstance(notification->getID());
if (boxp && !boxp->isDead())
{
boxp->close();

View File

@@ -1689,6 +1689,10 @@ void LLPanelAvatar::resetGroupList()
LLScrollListCtrl* group_list = mPanelSecondLife->getChild<LLScrollListCtrl>("groups");
if (group_list)
{
const LLUUID selected_id = group_list->getSelectedValue();
const S32 selected_idx = group_list->getFirstSelectedIndex();
const S32 scroll_pos = group_list->getScrollPos();
group_list->deleteAllItems();
S32 count = gAgent.mGroups.count();
@@ -1717,11 +1721,19 @@ void LLPanelAvatar::resetGroupList()
row["id"] = id ;
row["columns"][0]["value"] = group_string;
row["columns"][0]["font"] = "SANSSERIF_SMALL";
row["columns"][0]["font-style"] = group_data.mListInProfile ? "BOLD" : "NORMAL";
std::string font_style = group_data.mListInProfile ? "BOLD" : "NORMAL";
if(group_data.mID == gAgent.getGroupID())
font_style.append("|ITALIC");
row["columns"][0]["font-style"] = font_style;
row["columns"][0]["width"] = 0;
group_list->addElement(row);
group_list->addElement(row,ADD_SORTED);
}
group_list->sortByColumnIndex(0, TRUE);
if(selected_id.notNull())
group_list->selectByValue(selected_id);
if(selected_idx!=group_list->getFirstSelectedIndex()) //if index changed then our stored pos is pointless.
group_list->scrollToShowSelected();
else
group_list->setScrollPos(scroll_pos);
}
}
}
@@ -2248,22 +2260,23 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**)
}
}
// Set normal color if not found or if group is visible in profile
if (!group_data || group_data->mListInProfile)
if (group_data)
{
row["columns"][0]["font-style"] = "BOLD";
std::string font_style = group_data->mListInProfile ? "BOLD" : "NORMAL";
if(group_data->mID == gAgent.getGroupID())
font_style.append("|ITALIC");
row["columns"][0]["font-style"] = font_style;
}
else
row["columns"][0]["font-style"] = "NORMAL";
}
if (group_list)
{
group_list->addElement(row);
group_list->addElement(row,ADD_SORTED);
}
}
}
if(group_list) group_list->sortByColumnIndex(0, TRUE);
}
}

View File

@@ -220,6 +220,7 @@ BOOL LLPanelGroupGeneral::postBuild()
mCtrlReceiveNotices->setCallbackUserData(this);
mCtrlReceiveNotices->set(accept_notices);
mCtrlReceiveNotices->setEnabled(data.mID.notNull());
mCtrlReceiveNotices->resetDirty();
}
mCtrlReceiveChat = getChild<LLCheckBoxCtrl>("receive_chat", recurse);
@@ -229,6 +230,7 @@ BOOL LLPanelGroupGeneral::postBuild()
mCtrlReceiveChat->setCallbackUserData(this);
mCtrlReceiveChat->set(!gIMMgr->getIgnoreGroup(mGroupID));
mCtrlReceiveChat->setEnabled(mGroupID.notNull());
mCtrlReceiveChat->resetDirty();
}
mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse);
@@ -549,9 +551,17 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
BOOL receive_notices = false;
BOOL list_in_profile = false;
if (mCtrlReceiveNotices)
{
receive_notices = mCtrlReceiveNotices->get();
mCtrlReceiveNotices->resetDirty(); //resetDirty() here instead of in update because this is where the settings
//are actually being applied. onCommitUserOnly doesn't call updateChanged directly.
}
if (mCtrlListGroup)
{
list_in_profile = mCtrlListGroup->get();
mCtrlListGroup->resetDirty(); //resetDirty() here instead of in update because this is where the settings
//are actually being applied. onCommitUserOnly doesn't call updateChanged directly.
}
gAgent.setUserGroupFlags(mGroupID, receive_notices, list_in_profile);
@@ -561,6 +571,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
gIMMgr->updateIgnoreGroup(mGroupID, !receive_chat);
// Save here too in case we crash somewhere down the road -- MC
gIMMgr->saveIgnoreGroup();
mCtrlReceiveChat->resetDirty();
}
mChanged = FALSE;
@@ -769,53 +780,80 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
mBtnInfo->setVisible(is_member && !mAllowEdit);
}
if (mCtrlReceiveNotices)
if(gc == GC_ALL || gc == GC_PROPERTIES)
{
mCtrlReceiveNotices->setVisible(is_member);
if (is_member)
if (mCtrlReceiveNotices)
{
mCtrlReceiveNotices->setEnabled(mAllowEdit);
mCtrlReceiveNotices->setVisible(is_member);
if (is_member)
{
mCtrlReceiveNotices->setEnabled(mAllowEdit);
if(!mCtrlReceiveNotices->isDirty()) //If the user hasn't edited this then refresh it. Value may have changed in groups panel, etc.
{
mCtrlReceiveNotices->set(agent_gdatap.mAcceptNotices);
mCtrlReceiveNotices->resetDirty();
}
}
}
mCtrlReceiveNotices->resetDirty();
}
if (mCtrlReceiveChat)
{
mCtrlReceiveChat->setVisible(is_member);
mCtrlReceiveChat->setEnabled(TRUE);
mCtrlReceiveChat->resetDirty();
}
if (mCtrlListGroup)
{
mCtrlListGroup->setVisible(is_member);
if (is_member)
{
mCtrlListGroup->setEnabled(mAllowEdit);
if(!mCtrlListGroup->isDirty()) //If the user hasn't edited this then refresh it. Value may have changed in groups panel, etc.
{
mCtrlListGroup->set(agent_gdatap.mListInProfile);
mCtrlListGroup->resetDirty();
}
}
}
if (mCtrlReceiveChat)
{
mCtrlReceiveChat->setVisible(is_member);
if (is_member)
{
mCtrlReceiveChat->setEnabled(mAllowEdit);
if(!mCtrlReceiveChat->isDirty()) //If the user hasn't edited this then refresh it. Value may have changed in groups panel, etc.
{
mCtrlReceiveChat->set(!gIMMgr->getIgnoreGroup(mGroupID));
mCtrlReceiveChat->resetDirty();
}
}
}
if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
if (mGroupName) mGroupName->setText(gdatap->mName);
if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE);
if (mFounderName) mFounderName->setNameID(gdatap->mFounderID,FALSE);
if (mGroupName) mGroupName->setText(gdatap->mName);
if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE);
if (mFounderName) mFounderName->setNameID(gdatap->mFounderID,FALSE);
LLNameEditor* key_edit = getChild<LLNameEditor>("group_key");
if(key_edit)
{
key_edit->setText(gdatap->getID().asString());
}
if (mInsignia)
{
if (gdatap->mInsigniaID.notNull())
LLNameEditor* key_edit = getChild<LLNameEditor>("group_key");
if(key_edit)
{
mInsignia->setImageAssetID(gdatap->mInsigniaID);
key_edit->setText(gdatap->getID().asString());
}
else
{
mInsignia->setImageAssetID(mDefaultIconID);
}
}
if (mEditCharter)
{
mEditCharter->setText(gdatap->mCharter);
mEditCharter->resetDirty();
if (mInsignia)
{
if (gdatap->mInsigniaID.notNull())
{
mInsignia->setImageAssetID(gdatap->mInsigniaID);
}
else
{
mInsignia->setImageAssetID(mDefaultIconID);
}
}
if (mEditCharter)
{
mEditCharter->setText(gdatap->mCharter);
mEditCharter->resetDirty();
}
}
if (mListVisibleMembers)

View File

@@ -179,7 +179,7 @@ void LLPanelLandInfo::refresh()
childSetEnabled("button abandon land",owner_release || manager_releaseable || gAgent.isGodlike());
// only mainland sims are subdividable by owner
if (regionp->getRegionFlags() && REGION_FLAGS_ALLOW_PARCEL_CHANGES)
if (regionp->getRegionFlags() & REGION_FLAGS_ALLOW_PARCEL_CHANGES)
{
childSetEnabled("button subdivide land",owner_divide || manager_divideable || gAgent.isGodlike());
}

View File

@@ -476,7 +476,7 @@ void LLPanelObject::getState( )
}
// can move or rotate only linked group with move permissions, or sub-object with move and modify perms
BOOL enable_move = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_move = objectp->permMove() && (!objectp->isAttachment() && objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_scale = objectp->permMove() && objectp->permModify();
BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
BOOL enable_link = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
@@ -492,15 +492,6 @@ void LLPanelObject::getState( )
enable_rotate = FALSE;
}
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
{
@@ -1125,14 +1116,14 @@ void LLPanelObject::getState( )
//top_shear_x_visible = FALSE;
//top_shear_y_visible = FALSE;
//advanced_cut_visible = TRUE;
//advanced_is_dimple = TRUE;
advanced_is_dimple = TRUE;
//twist_min = OBJECT_TWIST_MIN;
//twist_max = OBJECT_TWIST_MAX;
//twist_inc = OBJECT_TWIST_INC;
// Just like the others except no radius
size_is_hole = TRUE;
skew_visible = TRUE;
advanced_cut_visible = TRUE;
//advanced_cut_visible = TRUE;
taper_visible = TRUE;
radius_offset_visible = FALSE;
revolutions_visible = TRUE;
@@ -1145,8 +1136,9 @@ void LLPanelObject::getState( )
case MI_TEST_PRISM:
case MI_TEST_HEMICYLINDER:
cut_visible = FALSE;
advanced_cut_visible = TRUE;
taper_visible = FALSE;
//advanced_cut_visible = TRUE;
advanced_is_slice = TRUE;
//taper_visible = FALSE;
radius_offset_visible = FALSE;
revolutions_visible = FALSE;
top_shear_x_visible = FALSE;
@@ -2199,7 +2191,8 @@ void LLPanelObject::sendPosition(BOOL btn_down)
// won't get dumped by the simulator.
LLVector3d new_pos_global = regionp->getPosGlobalFromRegion(newpos);
if ( LLWorld::getInstance()->positionRegionValidGlobal(new_pos_global) )
if (LLWorld::getInstance()->positionRegionValidGlobal(new_pos_global) ||
mObject->isAttachment())
{
// send only if the position is changed, that is, the delta vector is not zero
LLVector3d old_pos_global = mObject->getPositionGlobal();
@@ -2637,9 +2630,9 @@ void LLPanelObject::onPastePos(void* user_data)
LLPanelObject* self = (LLPanelObject*) user_data;
LLCalc* calcp = LLCalc::getInstance();
mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], 0.f, 256.f);
mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], 0.f, 256.f);
mClipboardPos.mV[VZ] = llclamp( mClipboardPos.mV[VZ], 0.f, 4096.f);
mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], -3.5f, 256.f);
mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], -3.5f, 256.f);
mClipboardPos.mV[VZ] = llclamp( mClipboardPos.mV[VZ], -3.5f, 4096.f);
self->mCtrlPosX->set( mClipboardPos.mV[VX] );
self->mCtrlPosY->set( mClipboardPos.mV[VY] );
@@ -2716,9 +2709,9 @@ void LLPanelObject::onPastePosClip(void* user_data)
std::string stringVec = wstring_to_utf8str(temp_string);
if(!getvectorfromclip(stringVec, &mClipboardPos)) return;
mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], 0.f, 256.f);
mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], 0.f, 256.f);
mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], 0.f, 4096.f);
mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, 256.f);
mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, 256.f);
mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, 4096.f);
self->mCtrlPosX->set( mClipboardPos.mV[VX] );
self->mCtrlPosY->set( mClipboardPos.mV[VY] );

View File

@@ -400,7 +400,7 @@ void LLPreviewAnim::gotAssetForSave(LLVFS *vfs,
// static
void LLPreviewAnim::gotAssetForSave_continued(char* buffer, S32 size, AIFilePicker* filepicker)
{
if (!filepicker->hasFilename())
if (filepicker->hasFilename())
{
std::string filename = filepicker->getFilename();
std::ofstream export_file(filename.c_str(), std::ofstream::binary);

View File

@@ -472,6 +472,30 @@ public:
LLMutex* SGHostBlackList::sMutex = 0;
SGHostBlackList::blacklist_t SGHostBlackList::blacklist;
//call every time a connection is opened
//return true if connecting allowed
static bool sgConnectionThrottle() {
static LLMutex mutex;
LLMutexLock lock(&mutex);
const U32 THROTTLE_TIMESTEPS_PER_SECOND = 10;
static const LLCachedControl<U32> max_connections_per_second("HTTPRequestRate", 30);
S32 max_connections = max_connections_per_second/THROTTLE_TIMESTEPS_PER_SECOND;
const S32 timestep = USEC_PER_SEC/THROTTLE_TIMESTEPS_PER_SECOND;
U64 now = LLTimer::getTotalTime();
std::deque<U64> timestamps;
while(!timestamps.empty() && (timestamps[0]<=now-timestep)) {
timestamps.pop_front();
}
if(timestamps.size() < max_connections) {
//llinfos << "throttle pass" << llendl;
timestamps.push_back(now);
return true;
} else {
//llinfos << "throttle fail" << llendl;
return false;
}
}
#if HTTP_METRICS
// Cross-thread messaging for asset metrics.
@@ -1250,11 +1274,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
//1, not openning too many file descriptors at the same time;
//2, control the traffic of http so udp gets bandwidth.
//
static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 32;
static const S32 NUM_REQUESTS_TILL_THRESHOLDING = 2;
if((mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE) ||
static const LLCachedControl<S32> max_http_requests("HTTPMaxRequests", 32);
static const LLCachedControl<S32> min_http_requests("HTTPMinRequests", 2);
if((mFetcher->getNumHTTPRequests() > max_http_requests) ||
((mFetcher->getTextureBandwidth() > mFetcher->mMaxBandwidth) &&
mFetcher->getNumHTTPRequests() > NUM_REQUESTS_TILL_THRESHOLDING))
(mFetcher->getNumHTTPRequests() > min_http_requests)) ||
!sgConnectionThrottle())
{
return false ; //wait.
}
@@ -2058,8 +2083,8 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con
unlockQueue() ;
worker->lockWorkMutex();
worker->mActiveCount++;
worker->mNeedsAux = needs_aux;
worker->mActiveCount++;
worker->mNeedsAux = needs_aux;
worker->setCanUseHTTP(can_use_http) ;
worker->unlockWorkMutex();
}
@@ -2709,8 +2734,8 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8
res = worker->insertPacket(0, data, data_size);
worker->setPriority(LLWorkerThread::PRIORITY_HIGH | worker->mWorkPriority);
worker->mState = LLTextureFetchWorker::LOAD_FROM_SIMULATOR;
worker->unlockWorkMutex();
return res;
worker->unlockWorkMutex();
return res;
}
bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U16 packet_num, U16 data_size, U8* data)

View File

@@ -126,7 +126,6 @@ LLToolBar::LLToolBar()
BOOL LLToolBar::postBuild()
{
childSetCommitCallback("communicate_btn", onClickCommunicate, this);
childSetControlName("communicate_btn", "ShowCommunicate");
childSetAction("chat_btn", onClickChat, this);
childSetControlName("chat_btn", "ChatVisible");

View File

@@ -111,6 +111,10 @@ void process_generic_message(LLMessageSystem* msg, void**)
LLWaterParamManager * param_mgr = LLWaterParamManager::instance();
LLWaterParamSet & param_set = param_mgr->mCurParams;
LLWaterParamSet backup;
if(!param_mgr->getParamSet("LightShare-Backup", backup)) {
param_mgr->addParamSet("LightShare-Backup", param_set);
}
param_set.set("waterFogColor", wl->waterColor.red / 256.f, wl->waterColor.green / 256.f, wl->waterColor.blue / 256.f);
param_set.set("waterFogDensity", pow(2.0f, wl->waterFogDensityExponent));
@@ -147,11 +151,16 @@ void process_generic_message(LLMessageSystem* msg, void**)
normalMapTexture.set(out);
param_mgr->setParamSet( "Meta7CurrentRegion", param_set);
param_mgr->setParamSet( "LightShare-CurrentRegion", param_set);
param_mgr->setNormalMapID(normalMapTexture);
LLWLParamManager * wl_param_mgr = LLWLParamManager::instance();
LLWLParamSet & wl_param_set = wl_param_mgr->mCurParams;
LLWLParamSet wl_backup;
if(!wl_param_mgr->getParamSet("LightShare-Backup", wl_backup)) {
wl_param_mgr->addParamSet("LightShare-Backup", wl_param_set);
}
wl_param_set.setSunAngle(F_TWO_PI * wl->sunMoonPosiiton);
wl_param_set.setEastAngle(F_TWO_PI * wl->eastAngle);
wl_param_set.set("sunlight_color", wl->sunMoonColor.red * 3.0f, wl->sunMoonColor.green * 3.0f, wl->sunMoonColor.blue * 3.0f, wl->sunMoonColor.alpha * 3.0f);
@@ -175,12 +184,12 @@ void process_generic_message(LLMessageSystem* msg, void**)
wl_param_set.setEnableCloudScrollX(!wl->cloudScrollXLock);
wl_param_set.setEnableCloudScrollY(!wl->cloudScrollYLock);
wl_param_set.setStarBrightness(wl->starBrightness);
wl_param_mgr->removeParamSet("Meta7-CurrentRegion",true);
wl_param_mgr->addParamSet( "Meta7-CurrentRegion", wl_param_set);
wl_param_mgr->savePreset( "Meta7-CurrentRegion");
wl_param_mgr->removeParamSet("LightShare-CurrentRegion",true);
wl_param_mgr->addParamSet( "LightShare-CurrentRegion", wl_param_set);
wl_param_mgr->savePreset( "LightShare-CurrentRegion");
LLWLParamManager::instance()->mAnimator.mIsRunning = false;
LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
wl_param_mgr->loadPreset( "Meta7-CurrentRegion",true);
wl_param_mgr->loadPreset( "LightShare-CurrentRegion",true);
}
}
}

View File

@@ -690,7 +690,7 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi
{
// FIXME: figure out how to really discover the type for these schemes
// We use "data" internally for a text/html url for loading the login screen
if(initializeMedia("text/html"))
if(initializeMedia("text/html") && (plugin = getMediaPlugin()))
{
plugin->loadURI( url );
}
@@ -698,7 +698,7 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi
else
{
// This catches 'rtsp://' urls
if(initializeMedia(scheme))
if(initializeMedia(scheme) && (plugin = getMediaPlugin()))
{
plugin->loadURI( url );
}

View File

@@ -2863,15 +2863,10 @@ class LLObjectExport : public view_listener_t
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (!object) return true;
LLVOAvatar* avatar = find_avatar_from_object(object);
if (!avatar)
if (object)
{
LLObjectBackup::getInstance()->exportObject();
}
return true;
}
};

View File

@@ -154,16 +154,13 @@ std::string build_extensions_string(ELoadFilter filter)
}
class AIFileUpload {
protected:
AIFilePicker* mPicker;
public:
AIFileUpload(void) : mPicker(NULL) { }
virtual ~AIFileUpload() { llassert(!mPicker); if (mPicker) { mPicker->abort(); mPicker = NULL; } }
AIFileUpload(void) { }
virtual ~AIFileUpload() { }
public:
bool is_valid(std::string const& filename, ELoadFilter type);
void filepicker_callback(ELoadFilter type);
void filepicker_callback(ELoadFilter type, AIFilePicker* picker);
void start_filepicker(ELoadFilter type, char const* context);
protected:
@@ -179,21 +176,22 @@ void AIFileUpload::start_filepicker(ELoadFilter filter, char const* context)
// display();
}
llassert(!mPicker);
mPicker = AIFilePicker::create();
mPicker->open(filter, "", context);
mPicker->run(boost::bind(&AIFileUpload::filepicker_callback, this, filter));
AIFilePicker* picker = AIFilePicker::create();
picker->open(filter, "", context);
// Note that when the call back is called then we're still in the main loop of
// the viewer and therefore the AIFileUpload still exists, since that is only
// destructed at the end of main when exiting the viewer.
picker->run(boost::bind(&AIFileUpload::filepicker_callback, this, filter, picker));
}
void AIFileUpload::filepicker_callback(ELoadFilter type)
void AIFileUpload::filepicker_callback(ELoadFilter type, AIFilePicker* picker)
{
if (mPicker->hasFilename())
if (picker->hasFilename())
{
std::string filename = mPicker->getFilename();
std::string filename = picker->getFilename();
if (is_valid(filename, type))
handle_event(filename);
}
mPicker = NULL;
}
bool AIFileUpload::is_valid(std::string const& filename, ELoadFilter type)
@@ -478,7 +476,7 @@ class LLFileMinimizeAllWindows : public view_listener_t
};
// </edit>
class LLFileSaveTexture : public view_listener_t
class LLFileSavePreview : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
@@ -1275,12 +1273,11 @@ void init_menu_file()
// <edit>
(new LLFileMinimizeAllWindows())->registerListener(gMenuHolder, "File.MinimizeAllWindows");
// </edit>
(new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture");
(new LLFileSavePreview())->registerListener(gMenuHolder, "File.SavePreview");
(new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot");
(new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk");
(new LLFileQuit())->registerListener(gMenuHolder, "File.Quit");
(new LLFileLogOut())->registerListener(gMenuHolder, "File.LogOut");
//Emerald has a second llFileSaveTexture here... Same as the original. Odd. -HgB
(new LLFileEnableUpload())->registerListener(gMenuHolder, "File.EnableUpload");
(new LLFileEnableSaveAs())->registerListener(gMenuHolder, "File.EnableSaveAs");
}

View File

@@ -3096,7 +3096,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// RELEASE-RLVa: if this code changes, remember to change the code down below as well
if ( (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) &&
((!rlv_handler_t::isEnabled()) || (CHAT_TYPE_OWNER != chat.mChatType)) )
(CHAT_TYPE_OWNER != chat.mChatType) )
// [/RLVa:KB]
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
@@ -3430,8 +3430,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
#endif //shy_mod
// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-10 (RLVa-1.0.0g)
// Copy/paste from above
if ( (chatter) && (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) )
if ( chatter && (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) &&
(gSavedSettings.getBOOL("EffectScriptChatParticles")) &&
(CHAT_TYPE_OWNER != chat.mChatType) )
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);
@@ -3760,10 +3761,18 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
*/
//Reset the windlight profile to default
LLWLParamManager::instance()->mAnimator.mIsRunning = false;
LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
LLWLParamManager::instance()->loadPreset("Default", true);
LLWaterParamManager::instance()->loadPreset("Default",true);
//LLWLParamManager::instance()->mAnimator.mIsRunning = false;
//LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
LLWLParamSet wl_backup;
if(LLWLParamManager::instance()->getParamSet("LightShare-Backup", wl_backup)) {
LLWLParamManager::instance()->propagateParameters();
LLWLParamManager::instance()->removeParamSet("LightShare-Backup", true);
}
LLWaterParamSet backup;
if(LLWaterParamManager::instance()->getParamSet("LightShare-Backup", backup)) {
LLWaterParamManager::instance()->propagateParameters();
LLWaterParamManager::instance()->removeParamSet("LightShare-Backup", true);
}
// now, use the circuit info to tell simulator about us!
LL_INFOS("Messaging") << "process_teleport_finish() Enabling "

View File

@@ -34,12 +34,10 @@
#include <fstream>
#include <sstream>
#include "hippogridmanager.h"
// linden library includes
#include "indra_constants.h"
#include "llapr.h"
#include "llalertdialog.h"
#include "llapr.h"
#include "llcallbacklist.h"
#include "lldir.h"
#include "lleconomy.h"
@@ -79,9 +77,37 @@
#include "llviewerstats.h"
#include "llviewerwindow.h"
#include "hippogridmanager.h"
#include "llviewerobjectbackup.h"
LLObjectBackup* LLObjectBackup::sInstance = 0;
LLObjectBackup* LLObjectBackup::sInstance = NULL;
// Note: these default textures are initialized with hard coded values to
// prevent cheating. When not in SL, the user-configurable values are used
// instead (see setDefaultTextures() below).
static LLUUID LL_TEXTURE_PLYWOOD = LLUUID("89556747-24cb-43ed-920b-47caed15465f");
static LLUUID LL_TEXTURE_BLANK = LLUUID("5748decc-f629-461c-9a36-a35a221fe21f");
static LLUUID LL_TEXTURE_INVISIBLE = LLUUID("38b86f85-2575-52a9-a531-23108d8da837");
static LLUUID LL_TEXTURE_TRANSPARENT = LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903");
static LLUUID LL_TEXTURE_MEDIA = LLUUID("8b5fec65-8d8d-9dc5-cda8-8fdf2716e361");
void setDefaultTextures()
{
if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
{
// When not in SL (no texture perm check needed), we can get these
// defaults from the user settings...
LL_TEXTURE_PLYWOOD = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
LL_TEXTURE_BLANK = LLUUID(gSavedSettings.getString("UIImgWhiteUUID"));
if (gSavedSettings.controlExists("UIImgInvisibleUUID"))
{
// This control only exists in the Cool VL Viewer (added by the
// AllowInvisibleTextureInPicker patch)
LL_TEXTURE_INVISIBLE = LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"));
}
}
}
class importResponder: public LLNewAgentInventoryResponder
{
@@ -95,7 +121,7 @@ public:
//virtual
virtual void uploadComplete(const LLSD& content)
{
lldebugs << "LLNewAgentInventoryResponder::result from capabilities" << llendl;
LL_DEBUGS("ObjectBackup") << "LLNewAgentInventoryResponder::result from capabilities" << LL_ENDL;
LLAssetType::EType asset_type = LLAssetType::lookup(mPostData["asset_type"].asString());
LLInventoryType::EType inventory_type = LLInventoryType::lookup(mPostData["inventory_type"].asString());
@@ -120,8 +146,8 @@ public:
}
// Actually add the upload to viewer inventory
llinfos << "Adding " << content["new_inventory_item"].asUUID() << " "
<< content["new_asset"].asUUID() << " to inventory." << llendl;
LL_INFOS("ObjectBackup") << "Adding " << content["new_inventory_item"].asUUID() << " "
<< content["new_asset"].asUUID() << " to inventory." << LL_ENDL;
if (mPostData["folder_id"].asUUID().notNull())
{
LLPermissions perm;
@@ -154,7 +180,7 @@ public:
}
else
{
llwarns << "Can't find a folder to put it into" << llendl;
LL_WARNS("ObjectBackup") << "Can't find a folder to put it into" << LL_ENDL;
}
// remove the "Uploading..." message
@@ -177,7 +203,7 @@ public:
{
if (imageformat == IMG_CODEC_TGA && mFormattedImage->getCodec() == IMG_CODEC_J2C)
{
llwarns << "FAILED: texture " << mID << " is formatted as TGA. Not saving." << llendl;
LL_WARNS("ObjectBackup") << "FAILED: texture " << mID << " is formatted as TGA. Not saving." << LL_ENDL;
LLObjectBackup::getInstance()->mNonExportedTextures |= LLObjectBackup::TEXTURE_BAD_ENCODING;
mFormattedImage = NULL;
mImageSize = 0;
@@ -202,14 +228,14 @@ public:
{
if (success && mFormattedImage.notNull() && mImageSize > 0)
{
llinfos << "SUCCESS getting texture " << mID << llendl;
LL_INFOS("ObjectBackup") << "SUCCESS getting texture " << mID << LL_ENDL;
std::string name;
mID.toString(name);
name = LLObjectBackup::getInstance()->getfolder() + "//" + name;
llinfos << "Saving to " << name << llendl;
LL_INFOS("ObjectBackup") << "Saving to " << name << LL_ENDL;
if (!mFormattedImage->save(name))
{
llwarns << "FAILED to save texture " << mID << llendl;
LL_WARNS("ObjectBackup") << "FAILED to save texture " << mID << LL_ENDL;
LLObjectBackup::getInstance()->mNonExportedTextures |= LLObjectBackup::TEXTURE_SAVED_FAILED;
}
}
@@ -217,12 +243,12 @@ public:
{
if (!success)
{
llwarns << "FAILED to get texture " << mID << llendl;
LL_WARNS("ObjectBackup") << "FAILED to get texture " << mID << LL_ENDL;
LLObjectBackup::getInstance()->mNonExportedTextures |= LLObjectBackup::TEXTURE_MISSING;
}
if (mFormattedImage.isNull())
{
llwarns << "FAILED: NULL texture " << mID << llendl;
LL_WARNS("ObjectBackup") << "FAILED: NULL texture " << mID << LL_ENDL;
LLObjectBackup::getInstance()->mNonExportedTextures |= LLObjectBackup::TEXTURE_IS_NULL;
}
}
@@ -340,6 +366,9 @@ void LLObjectBackup::exportObject()
mLLSD.clear();
mThisGroup.clear();
setDefaultTextures();
LLSelectMgr::getInstance()->getSelection()->ref();
// Open the file save dialog
AIFilePicker* filepicker = AIFilePicker::create();
filepicker->open("", FFSAVE_XML);
@@ -351,6 +380,7 @@ void LLObjectBackup::exportObject_continued(AIFilePicker* filepicker)
if (!filepicker->hasFilename())
{
// User canceled save.
LLSelectMgr::getInstance()->getSelection()->unref();
return;
}
@@ -365,7 +395,7 @@ void LLObjectBackup::exportObject_continued(AIFilePicker* filepicker)
bool LLObjectBackup::validatePerms(const LLPermissions *item_permissions)
{
if (gHippoGridManager->getConnectedGrid()->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE)
if (gHippoGridManager->getConnectedGrid()->isSecondLife())
{
// In Second Life, you must be the creator to be permitted to export the asset.
return (gAgent.getID() == item_permissions->getOwner() &&
@@ -390,12 +420,21 @@ bool LLObjectBackup::validatePerms(const LLPermissions *item_permissions)
// the textures in the Library), whoever is the actual creator... Go figure !
LLUUID LLObjectBackup::validateTextureID(LLUUID asset_id)
{
if (gHippoGridManager->getConnectedGrid()->getPlatform() != HippoGridInfo::PLATFORM_SECONDLIFE)
if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
{
// If we are not in Second Life, don't bother.
return asset_id;
}
LLUUID texture = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
LLUUID texture = LL_TEXTURE_PLYWOOD;
if (asset_id == texture ||
asset_id == LL_TEXTURE_BLANK ||
asset_id == LL_TEXTURE_INVISIBLE ||
asset_id == LL_TEXTURE_TRANSPARENT ||
asset_id == LL_TEXTURE_MEDIA)
{
// Allow to export a few default SL textures.
return asset_id;
}
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
LLAssetIDMatches asset_id_matches(asset_id);
@@ -434,7 +473,6 @@ void LLObjectBackup::exportWorker(void *userdata)
case EXPORT_INIT:
{
LLObjectBackup::getInstance()->show(true);
LLSelectMgr::getInstance()->getSelection()->ref();
struct ff : public LLSelectedNodeFunctor
{
virtual bool apply(LLSelectNode* node)
@@ -449,7 +487,7 @@ void LLObjectBackup::exportWorker(void *userdata)
}
else
{
llwarns << "Incorrect permission to export" << llendl;
LL_WARNS("ObjectBackup") << "Incorrect permission to export" << LL_ENDL;
LLObjectBackup::getInstance()->mExportState = EXPORT_FAILED;
LLSelectMgr::getInstance()->getSelection()->unref();
}
@@ -462,13 +500,22 @@ void LLObjectBackup::exportWorker(void *userdata)
{
virtual bool apply(LLViewerObject* object)
{
bool is_attachment = object->isAttachment();
object->boostTexturePriority(TRUE);
LLViewerObject::child_list_t children = object->getChildren();
children.push_front(object); //push root onto list
LLSD prim_llsd = LLObjectBackup::getInstance()->primsToLLSD(children);
LLSD prim_llsd = LLObjectBackup::getInstance()->primsToLLSD(children, is_attachment);
LLSD stuff;
stuff["root_position"] = object->getPosition().getValue();
stuff["root_rotation"] = ll_sd_from_quaternion(object->getRotation());
if (is_attachment)
{
stuff["root_position"] = object->getPositionEdit().getValue();
stuff["root_rotation"] = ll_sd_from_quaternion(object->getRotationEdit());
}
else
{
stuff["root_position"] = object->getPosition().getValue();
stuff["root_rotation"] = ll_sd_from_quaternion(object->getRotation());
}
stuff["group_body"] = prim_llsd;
LLObjectBackup::getInstance()->mLLSD["data"].append(stuff);
return true;
@@ -512,12 +559,12 @@ void LLObjectBackup::exportWorker(void *userdata)
gIdleCallbacks.deleteFunction(exportWorker);
if (LLObjectBackup::getInstance()->mNonExportedTextures == LLObjectBackup::TEXTURE_OK)
{
llinfos << "Export successful and complete." << llendl;
LL_INFOS("ObjectBackup") << "Export successful and complete." << LL_ENDL;
LLNotifications::instance().add("ExportSuccessful");
}
else
{
llinfos << "Export successful but incomplete: some texture(s) not saved." << llendl;
LL_INFOS("ObjectBackup") << "Export successful but incomplete: some texture(s) not saved." << LL_ENDL;
std::string reason;
if (LLObjectBackup::getInstance()->mNonExportedTextures & LLObjectBackup::TEXTURE_BAD_PERM)
{
@@ -525,7 +572,7 @@ void LLObjectBackup::exportWorker(void *userdata)
}
if (LLObjectBackup::getInstance()->mNonExportedTextures & LLObjectBackup::TEXTURE_MISSING)
{
reason += "\nMissing texture.";
reason += "\nMissing texture (retrying after full rezzing might work).";
}
if (LLObjectBackup::getInstance()->mNonExportedTextures & LLObjectBackup::TEXTURE_BAD_ENCODING)
{
@@ -548,14 +595,14 @@ void LLObjectBackup::exportWorker(void *userdata)
case EXPORT_FAILED:
gIdleCallbacks.deleteFunction(exportWorker);
llwarns << "Export process aborted." << llendl;
LL_WARNS("ObjectBackup") << "Export process aborted." << LL_ENDL;
LLNotifications::instance().add("ExportFailed");
LLObjectBackup::getInstance()->close();
break;
}
}
LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list)
LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list, bool is_attachment)
{
LLViewerObject* object;
LLSD llsd;
@@ -566,7 +613,7 @@ LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list)
object = (*i);
LLUUID id = object->getID();
llinfos << "Exporting prim " << object->getID().asString() << llendl;
LL_INFOS("ObjectBackup") << "Exporting prim " << object->getID().asString() << LL_ENDL;
// Create an LLSD object that represents this prim. It will be injected in to the overall LLSD
// tree structure
@@ -588,9 +635,17 @@ LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list)
}
// Transforms
prim_llsd["position"] = object->getPosition().getValue();
if (is_attachment)
{
prim_llsd["position"] = object->getPositionEdit().getValue();
prim_llsd["rotation"] = ll_sd_from_quaternion(object->getRotationEdit());
}
else
{
prim_llsd["position"] = object->getPosition().getValue();
prim_llsd["rotation"] = ll_sd_from_quaternion(object->getRotation());
}
prim_llsd["scale"] = object->getScale().getValue();
prim_llsd["rotation"] = ll_sd_from_quaternion(object->getRotation());
// Flags
prim_llsd["shadows"] = object->flagCastShadows();
@@ -632,13 +687,13 @@ LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list)
}
if (alreadyseen == false)
{
llinfos << "Found a sculpt texture, adding to list " << sculpt_texture << llendl;
LL_INFOS("ObjectBackup") << "Found a sculpt texture, adding to list " << sculpt_texture << LL_ENDL;
mTexturesList.push_back(sculpt_texture);
}
}
else
{
llwarns << "Incorrect permission to export a sculpt texture." << llendl;
LL_WARNS("ObjectBackup") << "Incorrect permission to export a sculpt texture." << LL_ENDL;
LLObjectBackup::getInstance()->mExportState = EXPORT_FAILED;
}
}
@@ -655,14 +710,22 @@ LLSD LLObjectBackup::primsToLLSD(LLViewerObject::child_list_t child_list)
this_te_llsd = object->getTE(i)->asLLSD();
this_te_llsd["imageid"] = t_id;
te_llsd.append(this_te_llsd);
std::list<LLUUID>::iterator iter;
for (iter = mTexturesList.begin(); iter != mTexturesList.end(); iter++)
{
if ((*iter) == t_id)
alreadyseen = true;
// Do not export Linden textures even though they don't taint creation.
if (t_id != LL_TEXTURE_PLYWOOD &&
t_id != LL_TEXTURE_BLANK &&
t_id != LL_TEXTURE_TRANSPARENT &&
t_id != LL_TEXTURE_INVISIBLE &&
t_id != LL_TEXTURE_MEDIA)
{
std::list<LLUUID>::iterator iter;
for (iter = mTexturesList.begin(); iter != mTexturesList.end(); iter++)
{
if ((*iter) == t_id)
alreadyseen = true;
}
if (alreadyseen == false)
mTexturesList.push_back(t_id);
}
if (alreadyseen == false)
mTexturesList.push_back(t_id);
}
prim_llsd["textures"] = te_llsd;
@@ -679,7 +742,7 @@ void LLObjectBackup::exportNextTexture()
{
if (mTexturesList.empty())
{
llinfos << "Finished exporting textures." << llendl;
LL_INFOS("ObjectBackup") << "Finished exporting textures." << LL_ENDL;
return;
}
@@ -687,7 +750,7 @@ void LLObjectBackup::exportNextTexture()
std::list<LLUUID>::iterator iter;
iter = mTexturesList.begin();
while (1)
while (true)
{
if (iter == mTexturesList.end())
{
@@ -696,6 +759,13 @@ void LLObjectBackup::exportNextTexture()
}
id = (*iter);
if (id.isNull())
{
// NULL texture id: just remove and ignore.
mTexturesList.remove(id);
iter = mTexturesList.begin();
continue;
}
LLViewerTexture* imagep = LLViewerTextureManager::findTexture(id);
if (imagep != NULL)
@@ -716,15 +786,17 @@ void LLObjectBackup::exportNextTexture()
}
else
{
llwarns << "We *DON'T* have the texture " << llendl;
LL_WARNS("ObjectBackup") << "We *DON'T* have the texture " << id.asString() << LL_ENDL;
mNonExportedTextures |= TEXTURE_MISSING;
mTexturesList.remove(id);
return;
}
iter++;
}
mTexturesList.remove(id);
llinfos << "Requesting texture " << id << llendl;
LL_INFOS("ObjectBackup") << "Requesting texture " << id << LL_ENDL;
LLImageJ2C* mFormattedImage = new LLImageJ2C;
CacheReadResponder* responder = new CacheReadResponder(id, mFormattedImage);
LLAppViewer::getTextureCache()->readFromCache(id, LLWorkerThread::PRIORITY_HIGH, 0, 999999, responder);
@@ -735,27 +807,33 @@ void LLObjectBackup::importObject(bool upload)
mTexturesList.clear();
mAssetMap.clear();
mCurrentAsset = LLUUID::null;
setDefaultTextures();
mRetexture = upload;
// Open the file open dialog
AIFilePicker* filepicker = AIFilePicker::create();
AIFilePicker* filepicker = new AIFilePicker;
filepicker->open(FFLOAD_XML, "", "import");
filepicker->run(boost::bind(&LLObjectBackup::importObject_continued, this, filepicker));
return;
}
void LLObjectBackup::importObject_continued(AIFilePicker* filepicker)
{
if (!filepicker->hasFilename())
{
// User canceled save.
return;
std::string file_name = filepicker->getFilename();
}
std::string file_name = filepicker->getFilename();
mFolder = gDirUtilp->getDirName(file_name);
llifstream import_file(file_name);
LLSDSerialize::fromXML(mLLSD, import_file);
import_file.close();
show(false);
mAgentPos = gAgent.getPositionAgent();
mAgentRot = LLQuaternion(gAgent.getAtAxis(), gAgent.getLeftAxis(), gAgent.getUpAxis());
@@ -770,17 +848,6 @@ void LLObjectBackup::importObject_continued(AIFilePicker* filepicker)
mObjects = mLLSD["data"].size();
mPrims = 0;
mRezCount = 0;
if (mObjects <= 0) {
LLSD args;
args["MESSAGE"] = std::string("Object import failed.\nThe XML file has an incompatible format or does not contain any objects.");
LLNotifications::instance().add("GenericAlert", args);
llwarns << "Trying to import illegal XML object file." << llendl;
return;
}
show(false);
updateImportNumbers();
for (prim_arr_it = mLLSD["data"].beginArray(); prim_arr_it != mLLSD["data"].endArray(); prim_arr_it++)
@@ -806,7 +873,7 @@ void LLObjectBackup::importObject_continued(AIFilePicker* filepicker)
}
if (alreadyseen == false)
{
llinfos << "Found a new SCULPT texture to upload " << orig << llendl;
LL_INFOS("ObjectBackup") << "Found a new SCULPT texture to upload " << orig << LL_ENDL;
mTexturesList.push_back(orig);
}
}
@@ -819,18 +886,21 @@ void LLObjectBackup::importObject_continued(AIFilePicker* filepicker)
LLTextureEntry te;
te.fromLLSD(the_te);
te.getID();
bool alreadyseen = false;
LLUUID id = te.getID();
if (id != LL_TEXTURE_PLYWOOD && id != LL_TEXTURE_BLANK && id != LL_TEXTURE_INVISIBLE) // Do not upload the default textures
{
bool alreadyseen = false;
for (iter = mTexturesList.begin(); iter != mTexturesList.end(); iter++)
{
if ((*iter) == te.getID())
alreadyseen = true;
}
if (alreadyseen == false)
{
llinfos << "Found a new texture to upload "<< te.getID() << llendl;
mTexturesList.push_back(te.getID());
for (iter = mTexturesList.begin(); iter != mTexturesList.end(); iter++)
{
if ((*iter) == te.getID())
alreadyseen = true;
}
if (alreadyseen == false)
{
LL_INFOS("ObjectBackup") << "Found a new texture to upload "<< te.getID() << LL_ENDL;
mTexturesList.push_back(te.getID());
}
}
}
}
@@ -970,7 +1040,7 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
}
// Textures
llinfos << "Processing textures for prim" << llendl;
LL_INFOS("ObjectBackup") << "Processing textures for prim" << LL_ENDL;
LLSD te_llsd = prim_llsd["textures"];
LLSD::array_iterator text_it;
U8 i = 0;
@@ -990,7 +1060,7 @@ void LLObjectBackup::xmlToPrim(LLSD prim_llsd, LLViewerObject* object)
object->setTE(i++, te);
}
llinfos << "Textures done !" << llendl;
LL_INFOS("ObjectBackup") << "Textures done !" << LL_ENDL;
//bump the iterator now so the callbacks hook together nicely
//if (mPrimImportIter != mThisGroup.endMap())
@@ -1023,7 +1093,7 @@ void LLObjectBackup::primUpdate(LLViewerObject* object)
if (mPrimImportIter == mThisGroup.endMap())
{
llinfos << "Trying to link" << llendl;
LL_INFOS("ObjectBackup") << "Trying to link" << LL_ENDL;
if (mToSelect.size() > 1)
{
@@ -1053,7 +1123,7 @@ void LLObjectBackup::primUpdate(LLViewerObject* object)
if (mToSelect.empty())
{
llwarns << "error: ran out of objects to mod." << llendl;
LL_WARNS("ObjectBackup") << "error: ran out of objects to mod." << LL_ENDL;
return;
}
@@ -1085,7 +1155,7 @@ bool LLObjectBackup::newPrim(LLViewerObject* pobject)
}
else
{
llinfos << "All prims rezzed, moving to build stage" << llendl;
LL_INFOS("ObjectBackup") << "All prims rezzed, moving to build stage" << LL_ENDL;
// Deselecting is required to ensure that the first child prim
// in the link set (which is also the last rezzed prim and thus
// currently selected) will be properly renamed and desced.
@@ -1104,7 +1174,7 @@ void LLObjectBackup::updateMap(LLUUID uploaded_asset)
if (mCurrentAsset.isNull())
return;
llinfos << "Mapping " << mCurrentAsset << " to " << uploaded_asset << llendl;
LL_INFOS("ObjectBackup") << "Mapping " << mCurrentAsset << " to " << uploaded_asset << LL_ENDL;
mAssetMap.insert(std::pair<LLUUID, LLUUID>(mCurrentAsset, uploaded_asset));
}
@@ -1140,13 +1210,13 @@ void myupload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_
std::ostringstream llsdxml;
LLSDSerialize::toXML(body, llsdxml);
lldebugs << "posting body to capability: " << llsdxml.str() << llendl;
LL_DEBUGS("ObjectBackup") << "posting body to capability: " << llsdxml.str() << LL_ENDL;
//LLHTTPClient::post(url, body, new LLNewAgentInventoryResponder(body, uuid, asset_type));
LLHTTPClient::post(url, body, new importResponder(body, uuid, asset_type));
}
else
{
llinfos << "NewAgentInventory capability not found. Can't upload !" << llendl;
LL_INFOS("ObjectBackup") << "NewAgentInventory capability not found. Can't upload !" << LL_ENDL;
}
}
@@ -1154,7 +1224,7 @@ void LLObjectBackup::uploadNextAsset()
{
if (mTexturesList.empty())
{
llinfos << "Texture list is empty, moving to rez stage." << llendl;
LL_INFOS("ObjectBackup") << "Texture list is empty, moving to rez stage." << LL_ENDL;
mCurrentAsset = LLUUID::null;
importFirstObject();
return;
@@ -1167,7 +1237,7 @@ void LLObjectBackup::uploadNextAsset()
LLUUID id = *iter;
mTexturesList.pop_front();
llinfos << "Got texture ID " << id << ": trying to upload" << llendl;
LL_INFOS("ObjectBackup") << "Got texture ID " << id << ": trying to upload" << LL_ENDL;
mCurrentAsset = id;
std::string struid;
@@ -1182,7 +1252,7 @@ void LLObjectBackup::uploadNextAsset()
S32 file_size;
LLAPRFile outfile;
outfile.open(filename, LL_APR_RB, LLAPRFile::global, &file_size);
outfile.open(filename, LL_APR_RB, LLAPRFile::local, &file_size);
if (outfile.getFileHandle())
{
const S32 buf_size = 65536;
@@ -1197,7 +1267,7 @@ void LLObjectBackup::uploadNextAsset()
}
else
{
llwarns << "Unable to access output file " << filename << llendl;
LL_WARNS("ObjectBackup") << "Unable to access output file " << filename << LL_ENDL;
uploadNextAsset();
return;
}

View File

@@ -107,7 +107,7 @@ private:
LLUUID validateTextureID(LLUUID asset_id);
// Convert a selection list of objects to LLSD
LLSD primsToLLSD(LLViewerObject::child_list_t child_list);
LLSD primsToLLSD(LLViewerObject::child_list_t child_list, bool is_attachment);
// Start the import process
void importFirstObject();
@@ -176,3 +176,4 @@ private:
LLVector3 mAgentPos;
LLQuaternion mAgentRot;
};

View File

@@ -1163,7 +1163,7 @@ void LLViewerRegion::cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinary
// AND the CRC matches. JC
LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc)
{
llassert(mCacheLoaded);
//llassert(mCacheLoaded); unnecessary and annoyijng, davep agrees
LLVOCacheEntry* entry = get_if_there(mCacheMap, local_id, (LLVOCacheEntry*)NULL);

View File

@@ -1094,8 +1094,12 @@ const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons.
S32 LLViewerTextureList::getMinVideoRamSetting()
{
S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped());
//min texture mem sets to 64M if total physical mem is more than 1.5GB
return (system_ram > 1500) ? 64 : MIN_VIDEO_RAM_IN_MEGA_BYTES ;
if (system_ram > 2000)
return 128;
else if (system_ram > 1000)
return 64;
else
return MIN_VIDEO_RAM_IN_MEGA_BYTES;
}
//static

View File

@@ -4445,7 +4445,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
//rescale fonts
initFonts(scale_factor);
LLHUDText::reshape();
}
}
}
S32 output_buffer_offset_y = 0;
@@ -4608,7 +4608,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
gPipeline.resetDrawOrders();
}
if (high_res)
if (high_res && (show_ui || !hide_hud))
{
send_agent_resume();
}

View File

@@ -3523,9 +3523,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
}
// check attachments for nameplate override
static const LLCachedControl<bool> allow_nameplate_override ("CCSAllowNameplateOverride", true);
std::string nameplate;
attachment_map_t::iterator it, end=mAttachmentPoints.end();
for (it=mAttachmentPoints.begin(); it!=end; ++it) {
if (allow_nameplate_override) for (it=mAttachmentPoints.begin(); it!=end; ++it) {
// get attached object
LLViewerJointAttachment *atm = it->second;
if (!atm) continue;
@@ -8417,6 +8418,22 @@ void LLVOAvatar::setCompositeUpdatesEnabled( BOOL b )
}
}
void LLVOAvatar::setNameFromChat(const std::string &text) {
static const LLCachedControl<bool> allow_nameplate_override ("CCSAllowNameplateOverride", true);
if(allow_nameplate_override) {
mNameFromChatOverride = true;
mNameFromChatChanged = true;
mNameFromChatText = text;
}
}
void LLVOAvatar::clearNameFromChat() {
mNameFromChatOverride = false;
mNameFromChatChanged = true;
mNameFromChatText = "";
}
void LLVOAvatar::addChat(const LLChat& chat)
{
std::deque<LLChat>::iterator chat_iter;

View File

@@ -559,8 +559,8 @@ public:
void setCompositeUpdatesEnabled(BOOL b);
void setNameFromChat(const std::string &text) { mNameFromChatOverride = mNameFromChatChanged = true; mNameFromChatText = text; }
void clearNameFromChat() { mNameFromChatOverride = false; mNameFromChatChanged = true; mNameFromChatText = ""; }
void setNameFromChat(const std::string &text);
void clearNameFromChat();
public:

View File

@@ -526,24 +526,29 @@ void LLVOVolume::updateTextureVirtualSize()
vsize = face->getTextureVirtualSize();
if (isAttachment())
{
// Rez attachments faster and at full details !
if (permYouOwner())
{
// Our attachments must really rez fast and fully:
// we shouldn't have to zoom on them to get the textures
// fully loaded !
imagep->setBoostLevel(LLViewerTexture::BOOST_HUD);
imagep->dontDiscard();
imagep->setBoostLevel(LLViewerTexture::BOOST_HIGH);
}
}
}
mPixelArea = llmax(mPixelArea, face->getPixelArea());
if (face->mTextureMatrix != NULL)
{
// Animating textures also rez badly in Snowglobe because the
// actual displayed area is only a fraction (corresponding to one
// frame) of the animating texture. Let's fix that here:
if (mTextureAnimp && mTextureAnimp->mScaleS > 0.0f && mTextureAnimp->mScaleT > 0.0f)
{
// Adjust to take into account the actual frame size which is only a
// portion of the animating texture
vsize = vsize / mTextureAnimp->mScaleS / mTextureAnimp->mScaleT;
}
if ((vsize < MIN_TEX_ANIM_SIZE && old_size > MIN_TEX_ANIM_SIZE) ||
(vsize > MIN_TEX_ANIM_SIZE && old_size < MIN_TEX_ANIM_SIZE))
(vsize > MIN_TEX_ANIM_SIZE && old_size < MIN_TEX_ANIM_SIZE))
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_TCOORD, FALSE);
}

View File

@@ -298,6 +298,11 @@ void LLWaterParamManager::update(LLViewerCamera * cam)
mWaterPlane = LLVector4(enorm.v[0], enorm.v[1], enorm.v[2], -ep.dot(enorm));
if((mWaterPlane.mV[3] >= 0.f) == LLViewerCamera::getInstance()->cameraUnderWater()) //Sign borkage..
{
mWaterPlane.scaleVec(LLVector4(-1.f,-1.f,-1.f,-1.f));
}
LLVector3 sunMoonDir;
if (gSky.getSunDirection().mV[2] > LLSky::NIGHTTIME_ELEVATION_COS)
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -39,8 +39,8 @@
</string>
<button bottom="-40" follows="left|top" height="20" label="Profile" left="5"
name="profile_callee_btn" width="80" />
<!--button bottom="-40" follows="left|top" halign="center" height="20" label="Teleport" left_delta="80"
name="profile_tele_btn" width="80" /-->
<button bottom="-40" follows="left|top" halign="center" height="20" label="Teleport" left_delta="80"
name="profile_tele_btn" width="80" />
<button bottom="-40" follows="left|top" halign="center" height="20" label="History" left_delta="80"
name="history_btn" visible="true" width="80" />
<check_box bottom="-40" follows="left|top" halign="center" height="20" left_delta="80"

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="false"
rect_control="FloaterObjectBackuptRect"
height="80" width="200" name="Import" title="Import progress" mouse_opaque="true">
<text height="30" left="10" name="name_label" top="-20"> Progress </text>
</floater>

View File

@@ -632,7 +632,7 @@
text_enabled_color="0, 100, 40, 255" width="87" />
<spinner bottom_delta="-18" decimal_digits="3" follows="left|top" height="16"
increment="0.01" initial_val="0" label="Z" label_width="10" left_delta="0"
max_val="4096" min_val="0" mouse_opaque="true" name="Pos Z"
max_val="4096" min_val="-3.5" mouse_opaque="true" name="Pos Z"
text_enabled_color="0, 67, 132, 255" width="87" />
<button bottom_delta="35" follows="top|right" font="SansSerifSmall" halign="center"
height="18" label="C" left_delta="90" mouse_opaque="true" name="copypos" enabled="true"

View File

@@ -1,28 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
height="350" min_height="300" min_width="450" name="top_objects"
title="loading..." width="550">
height="400" min_height="300" min_width="580" name="top_objects"
title="loading..." width="580">
<text bottom="-50" follows="left|top" font="SansSerif" height="20" left="10"
name="title_text" width="400">
Loading...
</text>
<scroll_list bottom_delta="-150" draw_border="true" draw_heading="true"
follows="left|top|bottom|right" height="150" left="10" multi_select="true"
name="objects_list" width="530">
<column label="Score" name="score" width="55" />
<column label="Name" name="name" width="140"/>
<column label="Owner" name="owner" width="105" />
<column label="Location" name="location" width="130" />
<column label="Time" name="time" width="100" />
<column label="Mono Time" name="mono_time" width="55" />
</scroll_list>
<scroll_list bottom_delta="-200" draw_border="true" draw_heading="true"
follows="left|top|bottom|right" height="200" left="10" multi_select="true"
name="objects_list" width="560">
<column label="Score" name="score" width="43" />
<column label="Name" name="name" dynamicwidth="true" />
<column label="Owner" name="owner" width="100" />
<column label="Location" name="location" width="100" />
<column label="Time" name="time" width="105" />
<column label="Mono Time" name="mono_time" width="50" />
<column label="URLs" name="URLs" width="50" />
</scroll_list>
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
left="10" name="id_text" width="100">
Object ID:
</text>
<line_editor bottom_delta="3" enabled="false"
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
name="id_editor" width="350" />
name="id_editor" width="385" />
<button bottom_delta="0" follows="bottom|right" height="20" label="Show Beacon"
name="show_beacon_btn" right="-10" width="100" />
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
@@ -31,7 +32,7 @@
</text>
<line_editor bottom_delta="3" enabled="true"
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
name="object_name_editor" width="350" />
name="object_name_editor" width="385" />
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
name="filter_object_btn" right="-10" width="100" />
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
@@ -40,17 +41,26 @@
</text>
<line_editor bottom_delta="3" enabled="true"
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
name="owner_name_editor" width="350" />
name="owner_name_editor" width="385" />
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
name="filter_owner_btn" right="-10" width="100" />
<button bottom="35" follows="bottom|left" height="20" label="Return Selected" left="10"
name="return_selected_btn" width="130" />
<button bottom="35" follows="bottom|left" height="20" label="Return All" left="150"
name="return_all_btn" width="130" />
name="return_selected_btn" width="110" />
<button bottom="35" follows="bottom|left" height="20" label="Return All" left="125"
name="return_all_btn" width="110" />
<button bottom="35" follows="bottom|left" height="20" label="Lag Warning" left="240"
name="lagwarning" width="110" />
<button bottom="35" follows="bottom|left" height="20" label="Kick" left="355"
name="kick" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="Disable Selected"
left="10" name="disable_selected_btn" width="130" />
<button bottom="10" follows="bottom|left" height="20" label="Disable All" left="150"
name="disable_all_btn" width="130" />
left="10" name="disable_selected_btn" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="Disable All" left="125"
name="disable_all_btn" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="Profile" left="240"
name="profile" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="TP to" left="355"
name="tpto" width="110" />
<button bottom="35" follows="bottom|right" height="20" label="Refresh"
name="refresh_btn" right="-10" width="100" />
<string name="top_scripts_title">

View File

@@ -64,6 +64,10 @@
left="0" mouse_opaque="true" name="Custom" width="128">
<on_click function="MiniMap.setcustom" />
</menu_item_call>
</menu>
</menu>
<menu_item_call bottom_delta="-18" enabled = "true" height="18" label="Unmark"
left="0" mouse_opaque="true" name="Unmark" width="128">
<on_click function="MiniMap.setunmark" />
<on_enable function="MiniMap.enableunmark" />
</menu_item_call>
</menu>

View File

@@ -52,9 +52,9 @@
</menu_item_call>
<menu_item_separator bottom="-121" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator2" width="243" />
<menu_item_call bottom="-140" enabled="true" height="19" label="Save Texture As..." left="0"
mouse_opaque="true" name="Save Texture As..." width="243">
<on_click function="File.SaveTexture" userdata="" />
<menu_item_call bottom="-140" enabled="true" height="19" label="Save Preview As..." left="0"
mouse_opaque="true" name="Save Preview As..." width="243">
<on_click function="File.SavePreview" userdata="" />
<on_enable function="File.EnableSaveAs" />
</menu_item_call>
<menu_item_separator bottom="-148" enabled="true" height="8" label="-----------" left="0"

View File

@@ -1,5 +1,13 @@
<?xml version="1.0" ?><notifications>
<global name="VIEWER_NAME">
Singularity Viewer
</global>
<global name="VIEWER_SITE">
http://www.singularityviewer.org/
</global>
<global name="skipnexttime">
Don&apos;t show me this again
@@ -1887,6 +1895,15 @@ Multiple parcels selected.
Try selecting a single parcel.
</notification>
<notification
icon="notifytip.tga"
name="DeedToGroupFail"
type="notifytip">
Deed to group failed.
<tag>group</tag>
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="ParcelCanPlayMedia"

View File

@@ -1,18 +1,26 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel border="true" bottom="-371" height="300" left="280" mouse_opaque="true"
name="groups" width="350">
<scroll_list background_visible="true" bottom="45" column_padding="5" draw_border="true"
draw_heading="false" draw_stripes="true" enabled="true"
<scroll_list background_visible="true" bottom="45" column_padding="0" draw_border="true"
draw_heading="true" draw_stripes="true" enabled="true"
follows="left|top|right|bottom" left="10" mouse_opaque="true"
multi_select="false" name="group list" tab_stop="true" top="-10"
width="240">
<column label="" name="name" width="248" />
<column dynamicwidth="true" label="Name" name="name" tool_tip="Name" />
<!--<column label="Active" name="is_active_group"
tool_tip="Group is set as active" width="40" />-->
<column image_overlay="ff_visible_online.tga" name="is_listed_group"
tool_tip="Group is visible in profile." width="20" />
<column image_overlay="icn_chat_overlay.tga" name="is_chattable_group"
tool_tip="Receive group chat" width="20" />
<column image_overlay="smicon_warn.tga" name="is_notice_group"
tool_tip="Receive group notices" width="20" />
</scroll_list>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="22" drop_shadow_visible="true" enabled="true" follows="left|bottom"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12"
mouse_opaque="false" name="groupdesc" v_pad="0" width="248">
Your currently active group is displayed in bold.
Your currently active group is displayed in italics.
</text>
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="5" drop_shadow_visible="true" enabled="true" follows="left|bottom"

View File

@@ -603,11 +603,12 @@ return Leave current function or event handler
# Comment
[one_sided_delimiter .86, .69, .50]
// Comment:Non-functional commentary or disabled code
# for now two_sided_delimiter spans from the token to the token, reversed. (eg: /* to */)
[two_sided_delimiter .86, .69, .50]
/* */ Comment:Non-functional commentary or disabled code
/* Comment:Non-functional commentary or disabled code
# String literals
[two_sided_delimiter_esc .57, .83, .52]
" " String literal
" String literal
#functions are supplied by the program now.

View File

@@ -79,7 +79,7 @@ AITHREADSAFESIMPLE(U64, AIStateMachine::sMaxCount, );
void AIStateMachine::updateSettings(void)
{
Dout(dc::statemachine, "Initializing AIStateMachine::sMaxCount");
*AIAccess<U64>(sMaxCount) = LLFastTimer::countsPerSecond() * gSavedSettings.getU32("StateMachineMaxTime") / 1000;
*AIAccess<U64>(sMaxCount) = LLFastTimer::sClockResolution * gSavedSettings.getU32("StateMachineMaxTime") / 1000;
}
//----------------------------------------------------------------------------
@@ -319,7 +319,7 @@ void AIStateMachine::mainloop(void*)
if (total_clocks >= max_count)
{
#ifndef LL_RELEASE_FOR_DOWNLOAD
llwarns << "AIStateMachine::mainloop did run for " << (total_clocks * 1000 / LLFastTimer::countsPerSecond()) << " ms." << llendl;
llwarns << "AIStateMachine::mainloop did run for " << (total_clocks * 1000 / LLFastTimer::sClockResolution) << " ms." << llendl;
#endif
std::sort(active_statemachines.begin(), active_statemachines.end(), QueueElementComp());
break;

View File

@@ -85,9 +85,6 @@ class ViewerManifest(LLManifest):
self.path("*.png")
self.path("textures.xml")
self.end_prefix("default/textures")
self.exclude("default/xui/en_us/mime_types_windows.xml")
self.exclude("default/xui/en_us/mime_types_mac.xml")
self.exclude("default/xui/en_us/mime_types_linux.xml")
self.path("default/xui/*/*.xml")
self.path("Default.xml")
self.path("default/*.xml")
@@ -269,9 +266,6 @@ class WindowsManifest(ViewerManifest):
self.path("qtwcodecs4.dll")
self.end_prefix()
# Per platform MIME config on the cheap. See SNOW-307 / DEV-41388
self.path("skins/default/xui/en-us/mime_types_windows.xml", "skins/default/xui/en-us/mime_types.xml")
# Get llcommon and deps. If missing assume static linkage and continue.
if self.prefix(src=self.args['configuration'], dst=""):
try:
@@ -461,10 +455,10 @@ class DarwinManifest(ViewerManifest):
# copy additional libs in <bundle>/Contents/MacOS/
self.path("../../libraries/universal-darwin/lib_release/libhunspell-1.2.dylib", dst="MacOS/libhunspell-1.2.dylib")
self.path("../../libraries/universal-darwin/lib_release/libndofdev.dylib", dst="MacOS/libndofdev.dylib")
self.path("../../libraries/universal-darwin/lib_release/libvorbisenc.2.dylib", dst="MacOS/libvorbisenc.2.dylib")
self.path("../../libraries/universal-darwin/lib_release/libvorbisfile.3.dylib", dst="MacOS/libvorbisfile.3.dylib")
self.path("../../libraries/universal-darwin/lib_release/libvorbis.0.dylib", dst="MacOS/libvorbis.0.dylib")
self.path("../../libraries/universal-darwin/lib_release/libogg.0.dylib", dst="MacOS/libogg.0.dylib")
#self.path("../../libraries/universal-darwin/lib_release/libvorbisenc.2.dylib", dst="MacOS/libvorbisenc.2.dylib")
#self.path("../../libraries/universal-darwin/lib_release/libvorbisfile.3.dylib", dst="MacOS/libvorbisfile.3.dylib")
#self.path("../../libraries/universal-darwin/lib_release/libvorbis.0.dylib", dst="MacOS/libvorbis.0.dylib")
#self.path("../../libraries/universal-darwin/lib_release/libogg.0.dylib", dst="MacOS/libogg.0.dylib")
# most everything goes in the Resources directory
if self.prefix(src="", dst="Resources"):
@@ -520,8 +514,11 @@ class DarwinManifest(ViewerManifest):
self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
# our apps
self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
#self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
try:
self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
except:
pass
# plugin launcher
self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin.app", "SLPlugin.app")
@@ -534,14 +531,14 @@ class DarwinManifest(ViewerManifest):
"libaprutil-1.0.3.8.dylib",
"libexpat.0.5.0.dylib"):
target_lib = os.path.join('../../..', libfile)
self.run_command("ln -sf %(target)r %(link)r" %
{'target': target_lib,
'link' : os.path.join(mac_crash_logger_res_path, libfile)}
)
self.run_command("ln -sf %(target)r %(link)r" %
{'target': target_lib,
'link' : os.path.join(slplugin_res_path, libfile)}
)
#self.run_command("ln -sf %(target)r %(link)r" %
# {'target': target_lib,
# 'link' : os.path.join(mac_crash_logger_res_path, libfile)}
# )
# plugins
if self.prefix(src="", dst="llplugin"):
@@ -552,9 +549,6 @@ class DarwinManifest(ViewerManifest):
self.end_prefix("llplugin")
# Per platform MIME config on the cheap. See SNOW-307 / DEV-41388
self.path("skins/default/xui/en-us/mime_types_mac.xml", "skins/default/xui/en-us/mime_types.xml")
# command line arguments for connecting to the proper grid
self.put_in_file(self.flags_list(), 'arguments.txt')
@@ -707,9 +701,6 @@ class LinuxManifest(ViewerManifest):
self.path("../plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
self.end_prefix("bin/llplugin")
# Per platform MIME config on the cheap. See SNOW-307 / DEV-41388
self.path("skins/default/xui/en-us/mime_types_linux.xml", "skins/default/xui/en-us/mime_types.xml")
self.path("featuretable_linux.txt")
def wrapper_name(self):

View File

@@ -63,12 +63,21 @@ else (WINDOWS)
set(WINDOWS_API_LIBRARIES "")
endif (WINDOWS)
if (DARWIN)
include(CMakeFindFrameworks)
find_library(APPKIT_LIBRARY AppKit)
find_library(CARBON_LIBRARY Carbon)
find_library(IOKIT_LIBRARY IOKit)
set(OSX_FILE_LIBRARIES ${APPKIT_LIBRARY} ${CARBON_LIBRARY} ${IOKIT_LIBRARY})
endif (DARWIN)
target_link_libraries(basic_plugin_filepicker
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BASIC_PLUGIN_BASE_LIBRARIES}
${UI_LIBRARIES}
${WINDOWS_API_LIBRARIES}
${OSX_FILE_LIBRARIES}
)
add_dependencies(basic_plugin_filepicker

View File

@@ -189,16 +189,12 @@ OSStatus LLDirPicker::doNavChooseDialog()
error = NavCreateChooseFolderDialog(&mNavOptions, &doNavCallbackEvent, NULL, NULL, &navRef);
gViewerWindow->mWindow->beforeDialog();
if (error == noErr)
{
PLS_FLUSH;
error = NavDialogRun(navRef);
}
gViewerWindow->mWindow->afterDialog();
if (error == noErr)
error = NavDialogGetReply(navRef, &navReply);
@@ -232,7 +228,7 @@ BOOL LLDirPicker::getDir(std::string const& folder)
BOOL success = FALSE;
OSStatus error = noErr;
mFileName = folder;
mFileName = const_cast<std::string*>(&folder);
// mNavOptions.saveFileName

View File

@@ -761,7 +761,7 @@ Boolean LLFilePickerBase::navOpenFilterProc(AEDesc *theItem, void *info, void *c
}
else if (filter == FFLOAD_XML)
{
if (fileInfo.filetype != 'XML' &&
if (fileInfo.filetype != 'XML ' &&
(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("xml"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
)
{
@@ -785,7 +785,7 @@ Boolean LLFilePickerBase::navOpenFilterProc(AEDesc *theItem, void *info, void *c
}
else if (filter == FFLOAD_RAW)
{
if (fileInfo.filetype != L'\?\?\?\?' &&
if (fileInfo.filetype != '\?\?\?\?' &&
(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("raw"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
)
{
@@ -952,14 +952,14 @@ OSStatus LLFilePickerBase::doNavSaveDialog(ESaveFilter filter, std::string const
extension = CFSTR(".png");
break;
case FFSAVE_AVI:
type = L'\?\?\?\?';
creator = L'\?\?\?\?';
type = '\?\?\?\?';
creator = '\?\?\?\?';
extension = CFSTR(".mov");
break;
case FFSAVE_ANIM:
type = L'\?\?\?\?';
creator = L'\?\?\?\?';
type = '\?\?\?\?';
creator = '\?\?\?\?';
extension = CFSTR(".xaf");
break;
@@ -971,26 +971,26 @@ OSStatus LLFilePickerBase::doNavSaveDialog(ESaveFilter filter, std::string const
break;
#endif
case FFSAVE_RAW:
type = L'\?\?\?\?';
creator = L'\?\?\?\?';
type = '\?\?\?\?';
creator = '\?\?\?\?';
extension = CFSTR(".raw");
break;
case FFSAVE_J2C:
type = L'\?\?\?\?';
type = '\?\?\?\?';
creator = 'prvw';
extension = CFSTR(".j2c");
break;
case FFSAVE_ALL:
default:
type = L'\?\?\?\?';
creator = L'\?\?\?\?';
type = '\?\?\?\?';
creator = '\?\?\?\?';
extension = CFSTR("");
break;
}
NavEventUPP eventUPP = NewNavEventUPP(navSetDefaultFolderProc);
NavEventUPP eventUPP = NewNavEventUPP(NULL); //TODO: test filepicker
mFolder = folder;
// Create the dialog

View File

@@ -39,6 +39,7 @@
#ifndef LL_LLFILEPICKER_H
#define LL_LLFILEPICKER_H
#include "basic_plugin_base.h" // For PLS_INFOS etc.
#include "legacy.h"
#include <vector>
@@ -163,10 +164,10 @@ private:
#if LL_DARWIN
NavDialogCreationOptions mNavOptions;
OSStatus doNavChooseDialog(ELoadFilter filter);
OSStatus doNavSaveDialog(ESaveFilter filter, const std::string& filename);
OSStatus doNavChooseDialog(ELoadFilter filter, const std::string& folder);
OSStatus doNavSaveDialog(ESaveFilter filter, const std::string& filename, const std::string& folder);
static Boolean navOpenFilterProc(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode);
static pascal void LLFilePickerBase::doNavCallbackEvent(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void* callBackUD);
static pascal void doNavCallbackEvent(NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void* callBackUD);
ELoadFilter getLoadFilter(void) const { return mLoadFilter; }
std::string const& getFolder(void) const { return mFolder; }
#endif // LL_DARWIN
@@ -189,6 +190,7 @@ public:
#endif // LL_GTK
#if !LL_WINDOWS && !(LL_GTK && LL_X11)
public:
void setWindowID(unsigned long window_id) { PLS_WARNS << "Calling unimplemented LLFilePickerBase::setWindowID" << PLS_ENDL; }
#endif

View File

@@ -403,9 +403,9 @@
<key>darwin</key>
<map>
<key>md5sum</key>
<string>694173293a483c01472a30cc7d895c5a</string>
<string>a9ab0e2910e1a8fe06a2a42ffdc8b7da</string>
<key>url</key>
<uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/freetype-2.1.5-darwin-20080812.tar.bz2</uri>
<uri>https://github.com/siana-osx/SingularityViewer/downloads/freetype-2.4.4-darwin-20110705.tar.bz2</uri>
</map>
<key>linux</key>
<map>