Merge e:/SL_Dev/Siana
This commit is contained in:
@@ -88,7 +88,7 @@ if (VIEWER)
|
|||||||
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
|
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
|
||||||
add_dependencies(viewer linux-crash-logger-strip-target)
|
add_dependencies(viewer linux-crash-logger-strip-target)
|
||||||
elseif (DARWIN)
|
elseif (DARWIN)
|
||||||
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
|
#add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
|
||||||
#add_subdirectory(${VIEWER_PREFIX}mac_updater)
|
#add_subdirectory(${VIEWER_PREFIX}mac_updater)
|
||||||
add_dependencies(viewer mac-crash-logger)
|
add_dependencies(viewer mac-crash-logger)
|
||||||
#add_dependencies(viewer mac-updater)
|
#add_dependencies(viewer mac-updater)
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ endif (NOT FMOD_LIBRARY)
|
|||||||
|
|
||||||
find_path(FMOD_INCLUDE_DIR fmod.h
|
find_path(FMOD_INCLUDE_DIR fmod.h
|
||||||
${LIBS_PREBUILT_DIR}/include
|
${LIBS_PREBUILT_DIR}/include
|
||||||
|
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include
|
||||||
${FMOD_SDK_DIR}/api/inc
|
${FMOD_SDK_DIR}/api/inc
|
||||||
${FMOD_SDK_DIR}/inc
|
${FMOD_SDK_DIR}/inc
|
||||||
${FMOD_SDK_DIR}
|
${FMOD_SDK_DIR}
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ include(Boost)
|
|||||||
include(EXPAT)
|
include(EXPAT)
|
||||||
include(ZLIB)
|
include(ZLIB)
|
||||||
|
|
||||||
|
if (DARWIN)
|
||||||
|
include(CMakeFindFrameworks)
|
||||||
|
find_library(CORESERVICES_LIBRARY CoreServices)
|
||||||
|
endif (DARWIN)
|
||||||
|
|
||||||
|
|
||||||
set(LLCOMMON_INCLUDE_DIRS
|
set(LLCOMMON_INCLUDE_DIRS
|
||||||
${LIBS_OPEN_DIR}/cwdebug
|
${LIBS_OPEN_DIR}/cwdebug
|
||||||
${LIBS_OPEN_DIR}/llcommon
|
${LIBS_OPEN_DIR}/llcommon
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX})
|
|||||||
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
||||||
set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
|
set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
|
||||||
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_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(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
|
set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH
|
||||||
|
|||||||
Binary file not shown.
@@ -223,6 +223,7 @@ target_link_libraries(
|
|||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${WINDOWS_LIBRARIES}
|
${WINDOWS_LIBRARIES}
|
||||||
${CWDEBUG_LIBRARIES}
|
${CWDEBUG_LIBRARIES}
|
||||||
|
${CORESERVICES_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
|
|||||||
@@ -29,33 +29,22 @@
|
|||||||
* COMPLETENESS OR PERFORMANCE.
|
* COMPLETENESS OR PERFORMANCE.
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
|
|
||||||
#include "llfasttimer.h"
|
#include "llfasttimer.h"
|
||||||
|
|
||||||
#include "llmemory.h"
|
#include "llmemory.h"
|
||||||
#include "llprocessor.h"
|
#include "llprocessor.h"
|
||||||
|
|
||||||
|
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#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
|
#endif
|
||||||
|
#include "lltimer.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// statics
|
// statics
|
||||||
|
|
||||||
|
|
||||||
LLFastTimer::EFastTimerType LLFastTimer::sCurType = LLFastTimer::FTM_OTHER;
|
LLFastTimer::EFastTimerType LLFastTimer::sCurType = LLFastTimer::FTM_OTHER;
|
||||||
int LLFastTimer::sCurDepth = 0;
|
int LLFastTimer::sCurDepth = 0;
|
||||||
U64 LLFastTimer::sStart[LLFastTimer::FTM_MAX_DEPTH];
|
U64 LLFastTimer::sStart[LLFastTimer::FTM_MAX_DEPTH];
|
||||||
@@ -70,44 +59,12 @@ S32 LLFastTimer::sLastFrameIndex = -1;
|
|||||||
int LLFastTimer::sPauseHistory = 0;
|
int LLFastTimer::sPauseHistory = 0;
|
||||||
int LLFastTimer::sResetHistory = 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
|
U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
|
||||||
{
|
{
|
||||||
return sClockResolution >> 8;
|
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()
|
void LLFastTimer::reset()
|
||||||
{
|
{
|
||||||
@@ -162,139 +119,17 @@ void LLFastTimer::reset()
|
|||||||
// Important note: These implementations must be FAST!
|
// 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
|
// 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
|
// 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
|
//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()
|
U32 LLFastTimer::getCPUClockCount32()
|
||||||
{
|
{
|
||||||
return (U32)(get_clock_count()>>8);
|
return get_clock_count() >> 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
U64 LLFastTimer::getCPUClockCount64()
|
U64 LLFastTimer::getCPUClockCount64()
|
||||||
{
|
{
|
||||||
return get_clock_count();
|
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
|
|
||||||
@@ -256,7 +256,6 @@ public:
|
|||||||
static void reset();
|
static void reset();
|
||||||
static U64 countsPerSecond();
|
static U64 countsPerSecond();
|
||||||
|
|
||||||
static std::string sClockType;
|
|
||||||
public:
|
public:
|
||||||
static int sCurDepth;
|
static int sCurDepth;
|
||||||
static U64 sStart[FTM_MAX_DEPTH];
|
static U64 sStart[FTM_MAX_DEPTH];
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
# include <sys/sysctl.h>
|
# include <sys/sysctl.h>
|
||||||
# include <sys/utsname.h>
|
# include <sys/utsname.h>
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
//# include <Carbon/Carbon.h> May be needed?
|
# include <Carbon/Carbon.h>
|
||||||
#elif LL_LINUX
|
#elif LL_LINUX
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
# include <sys/utsname.h>
|
# include <sys/utsname.h>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
const S32 LL_VERSION_MAJOR = 1;
|
const S32 LL_VERSION_MAJOR = 1;
|
||||||
const S32 LL_VERSION_MINOR = 5;
|
const S32 LL_VERSION_MINOR = 5;
|
||||||
const S32 LL_VERSION_PATCH = 9;
|
const S32 LL_VERSION_PATCH = 9;
|
||||||
const S32 LL_VERSION_BUILD = 1;
|
const S32 LL_VERSION_BUILD = 2;
|
||||||
|
|
||||||
const char * const LL_CHANNEL = "Singularity";
|
const char * const LL_CHANNEL = "Singularity";
|
||||||
|
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for a change in this process's frontmost window.
|
// Check for a change in this process's frontmost window.
|
||||||
if(FrontWindow() != front_window)
|
if(FrontNonFloatingWindow() != front_window)
|
||||||
{
|
{
|
||||||
ProcessSerialNumber self = { 0, kCurrentProcess };
|
ProcessSerialNumber self = { 0, kCurrentProcess };
|
||||||
ProcessSerialNumber parent = { 0, kNoProcess };
|
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
|
// Opening the first window
|
||||||
|
|
||||||
@@ -331,7 +331,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if(layer_group)
|
if(layer_group)
|
||||||
{
|
{
|
||||||
SetWindowGroup(FrontWindow(), layer_group);
|
SetWindowGroup(FrontNonFloatingWindow(), layer_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(parent_is_front_process)
|
if(parent_is_front_process)
|
||||||
@@ -340,9 +340,9 @@ int main(int argc, char **argv)
|
|||||||
(void) SetFrontProcess( &self );
|
(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
|
// Closing the last window
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ int main(int argc, char **argv)
|
|||||||
window_hack_state = 2;
|
window_hack_state = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
front_window = FrontWindow();
|
front_window = FrontNonFloatingWindow();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,9 @@ public:
|
|||||||
void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; }
|
void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; }
|
||||||
LLFontGL::HAlign getHAlign() const { return mHAlign; }
|
LLFontGL::HAlign getHAlign() const { return mHAlign; }
|
||||||
void setLeftHPad( S32 pad ) { mLeftHPad = pad; }
|
void setLeftHPad( S32 pad ) { mLeftHPad = pad; }
|
||||||
|
S32 getLeftHPad() const { return mLeftHPad; }
|
||||||
void setRightHPad( S32 pad ) { mRightHPad = pad; }
|
void setRightHPad( S32 pad ) { mRightHPad = pad; }
|
||||||
|
S32 getRightHPad() const { return mRightHPad; }
|
||||||
|
|
||||||
const std::string getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); }
|
const std::string getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); }
|
||||||
const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
|
const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
|
||||||
|
|||||||
@@ -344,7 +344,10 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
|
|||||||
|
|
||||||
if( cur_delimiter->getType() == LLKeywordToken::TWO_SIDED_DELIMITER )
|
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.
|
// Check for an escape sequence.
|
||||||
if (*cur == '\\')
|
if (*cur == '\\')
|
||||||
@@ -358,7 +361,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegment *>* seg_list, const LLWS
|
|||||||
cur++;
|
cur++;
|
||||||
}
|
}
|
||||||
// Is the next character the end delimiter?
|
// 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
|
// Is there was an odd number of backslashes, then this delimiter
|
||||||
// does not end the sequence.
|
// does not end the sequence.
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col
|
|||||||
switch(mFontAlignment)
|
switch(mFontAlignment)
|
||||||
{
|
{
|
||||||
case LLFontGL::LEFT:
|
case LLFontGL::LEFT:
|
||||||
start_x = 0.f;
|
start_x = (mFontStyle & LLFontGL::ITALIC) ? 2.f : 0.f; //Italic text seems need a little padding.
|
||||||
break;
|
break;
|
||||||
case LLFontGL::RIGHT:
|
case LLFontGL::RIGHT:
|
||||||
start_x = (F32)getWidth();
|
start_x = (F32)getWidth();
|
||||||
@@ -1301,6 +1301,7 @@ void LLScrollListCtrl::swapWithPrevious(S32 index)
|
|||||||
if (index <= 0)
|
if (index <= 0)
|
||||||
{
|
{
|
||||||
// At beginning of list, don't do anything
|
// At beginning of list, don't do anything
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLScrollListItem *cur_itemp = mItemList[index];
|
LLScrollListItem *cur_itemp = mItemList[index];
|
||||||
@@ -1308,6 +1309,18 @@ void LLScrollListCtrl::swapWithPrevious(S32 index)
|
|||||||
mItemList[index - 1] = cur_itemp;
|
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)
|
void LLScrollListCtrl::deleteSingleItem(S32 target_index)
|
||||||
{
|
{
|
||||||
@@ -3002,6 +3015,9 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
|||||||
std::string imagename;
|
std::string imagename;
|
||||||
child->getAttributeString("image", imagename);
|
child->getAttributeString("image", imagename);
|
||||||
|
|
||||||
|
std::string imageoverlay;
|
||||||
|
child->getAttributeString("image_overlay", imageoverlay);
|
||||||
|
|
||||||
BOOL columndynamicwidth = FALSE;
|
BOOL columndynamicwidth = FALSE;
|
||||||
child->getAttributeBOOL("dynamicwidth", columndynamicwidth);
|
child->getAttributeBOOL("dynamicwidth", columndynamicwidth);
|
||||||
|
|
||||||
@@ -3021,6 +3037,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
|
|||||||
columns[index]["sort"] = sortname;
|
columns[index]["sort"] = sortname;
|
||||||
columns[index]["sort_ascending"] = sort_ascending;
|
columns[index]["sort_ascending"] = sort_ascending;
|
||||||
columns[index]["image"] = imagename;
|
columns[index]["image"] = imagename;
|
||||||
|
columns[index]["image_overlay"] = imageoverlay;
|
||||||
columns[index]["label"] = labelname;
|
columns[index]["label"] = labelname;
|
||||||
columns[index]["width"] = columnwidth;
|
columns[index]["width"] = columnwidth;
|
||||||
columns[index]["relwidth"] = columnrelwidth;
|
columns[index]["relwidth"] = columnrelwidth;
|
||||||
@@ -3229,6 +3246,10 @@ void LLScrollListCtrl::addColumn(const LLSD& column, EAddPosition pos)
|
|||||||
//new_column->mHeader->setScaleImage(false);
|
//new_column->mHeader->setScaleImage(false);
|
||||||
new_column->mHeader->setImage(column["image"].asString());
|
new_column->mHeader->setImage(column["image"].asString());
|
||||||
}
|
}
|
||||||
|
else if(column["image_overlay"].asString() != "")
|
||||||
|
{
|
||||||
|
new_column->mHeader->setImageOverlay(column["image_overlay"].asString());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_column->mHeader->setLabel(new_column->mLabel);
|
new_column->mHeader->setLabel(new_column->mLabel);
|
||||||
@@ -3683,6 +3704,9 @@ LLColumnHeader::LLColumnHeader(const std::string& label, const LLRect &rect, LLS
|
|||||||
addChild(mResizeBar);
|
addChild(mResizeBar);
|
||||||
|
|
||||||
mResizeBar->setEnabled(FALSE);
|
mResizeBar->setEnabled(FALSE);
|
||||||
|
|
||||||
|
mImageOverlayAlignment = LLFontGL::HCENTER;
|
||||||
|
mImageOverlayColor = LLColor4::white;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLColumnHeader::~LLColumnHeader()
|
LLColumnHeader::~LLColumnHeader()
|
||||||
@@ -3706,6 +3730,95 @@ void LLColumnHeader::draw()
|
|||||||
// Draw children
|
// Draw children
|
||||||
LLComboBox::draw();
|
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())
|
if (mList->getVisible())
|
||||||
{
|
{
|
||||||
// sync sort order with list selection every frame
|
// 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
|
//static
|
||||||
void LLColumnHeader::onClick(void* user_data)
|
void LLColumnHeader::onClick(void* user_data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -274,6 +274,7 @@ public:
|
|||||||
/*virtual*/ void userSetShape(const LLRect& new_rect);
|
/*virtual*/ void userSetShape(const LLRect& new_rect);
|
||||||
|
|
||||||
void setImage(const std::string &image_name);
|
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; }
|
LLScrollListColumn* getColumn() { return mColumn; }
|
||||||
void setHasResizableElement(BOOL resizable);
|
void setHasResizableElement(BOOL resizable);
|
||||||
void updateResizeBars();
|
void updateResizeBars();
|
||||||
@@ -294,6 +295,10 @@ private:
|
|||||||
LLUIString mDescendingText;
|
LLUIString mDescendingText;
|
||||||
BOOL mShowSortOptions;
|
BOOL mShowSortOptions;
|
||||||
BOOL mHasResizableElement;
|
BOOL mHasResizableElement;
|
||||||
|
|
||||||
|
LLPointer<LLUIImage> mImageOverlay;
|
||||||
|
LLFontGL::HAlign mImageOverlayAlignment;
|
||||||
|
LLColor4 mImageOverlayColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLScrollListItem
|
class LLScrollListItem
|
||||||
@@ -467,6 +472,7 @@ public:
|
|||||||
|
|
||||||
void swapWithNext(S32 index);
|
void swapWithNext(S32 index);
|
||||||
void swapWithPrevious(S32 index);
|
void swapWithPrevious(S32 index);
|
||||||
|
void moveToFront(S32 index);
|
||||||
|
|
||||||
void setCanSelect(BOOL can_select) { mCanSelect = can_select; }
|
void setCanSelect(BOOL can_select) { mCanSelect = can_select; }
|
||||||
virtual BOOL getCanSelect() const { return mCanSelect; }
|
virtual BOOL getCanSelect() const { return mCanSelect; }
|
||||||
|
|||||||
@@ -142,9 +142,6 @@ std::string glob_to_regex(const std::string& glob)
|
|||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '.':
|
|
||||||
regex+="\\.";
|
|
||||||
break;
|
|
||||||
case '*':
|
case '*':
|
||||||
if (glob.begin() == i)
|
if (glob.begin() == i)
|
||||||
{
|
{
|
||||||
@@ -177,6 +174,14 @@ std::string glob_to_regex(const std::string& glob)
|
|||||||
case '!':
|
case '!':
|
||||||
regex+= square_brace_open ? '^' : c;
|
regex+= square_brace_open ? '^' : c;
|
||||||
break;
|
break;
|
||||||
|
case '.': // This collection have different regex meaning
|
||||||
|
case '^': // And so need escaping
|
||||||
|
case '(':
|
||||||
|
case ')':
|
||||||
|
case '+':
|
||||||
|
case '|':
|
||||||
|
case '$':
|
||||||
|
regex+='\\';
|
||||||
default:
|
default:
|
||||||
regex+=c;
|
regex+=c;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -644,11 +644,12 @@ return Leave current function or event handler
|
|||||||
# Comment
|
# Comment
|
||||||
[one_sided_delimiter .8, .3, .15]
|
[one_sided_delimiter .8, .3, .15]
|
||||||
// Comment:Non-functional commentary or disabled code
|
// 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]
|
[two_sided_delimiter .8, .3, .15]
|
||||||
/* */ Comment:Non-functional commentary or disabled code
|
/* Comment:Non-functional commentary or disabled code
|
||||||
|
|
||||||
# String literals
|
# String literals
|
||||||
[two_sided_delimiter_esc 0, .2, 0]
|
[two_sided_delimiter_esc 0, .2, 0]
|
||||||
" " String literal
|
" String literal
|
||||||
|
|
||||||
#functions are supplied by the program now.
|
#functions are supplied by the program now.
|
||||||
|
|||||||
@@ -10,20 +10,20 @@
|
|||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D diffuseMap;
|
||||||
uniform float glowStrength;
|
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()
|
void main()
|
||||||
{
|
{
|
||||||
|
|
||||||
vec4 col = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 col = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
|
||||||
col += kern[0] * texture2D(diffuseMap, gl_TexCoord[0].xy);
|
col += kern.x * texture2D(diffuseMap, gl_TexCoord[0].xy);
|
||||||
col += kern[1] * texture2D(diffuseMap, gl_TexCoord[1].xy);
|
col += kern.y * texture2D(diffuseMap, gl_TexCoord[1].xy);
|
||||||
col += kern[2] * texture2D(diffuseMap, gl_TexCoord[2].xy);
|
col += kern.z * texture2D(diffuseMap, gl_TexCoord[2].xy);
|
||||||
col += kern[3] * texture2D(diffuseMap, gl_TexCoord[3].xy);
|
col += kern.w * texture2D(diffuseMap, gl_TexCoord[3].xy);
|
||||||
col += kern[3] * texture2D(diffuseMap, gl_TexCoord[0].zw);
|
col += kern.w * texture2D(diffuseMap, gl_TexCoord[0].zw);
|
||||||
col += kern[2] * texture2D(diffuseMap, gl_TexCoord[1].zw);
|
col += kern.z * texture2D(diffuseMap, gl_TexCoord[1].zw);
|
||||||
col += kern[1] * texture2D(diffuseMap, gl_TexCoord[2].zw);
|
col += kern.y * texture2D(diffuseMap, gl_TexCoord[2].zw);
|
||||||
col += kern[0] * texture2D(diffuseMap, gl_TexCoord[3].zw);
|
col += kern.x * texture2D(diffuseMap, gl_TexCoord[3].zw);
|
||||||
|
|
||||||
gl_FragColor = vec4(col.rgb * glowStrength, col.a);
|
gl_FragColor = vec4(col.rgb * glowStrength, col.a);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2493,10 +2493,11 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
|
|||||||
S32 count = mGroups.count();
|
S32 count = mGroups.count();
|
||||||
for(S32 i = 0; i < count; ++i)
|
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;
|
group.mAcceptNotices = accept_notices;
|
||||||
mGroups.get(i).mListInProfile = list_in_profile;
|
group.mListInProfile = list_in_profile;
|
||||||
LLMessageSystem* msg = gMessageSystem;
|
LLMessageSystem* msg = gMessageSystem;
|
||||||
msg->newMessage("SetGroupAcceptNotices");
|
msg->newMessage("SetGroupAcceptNotices");
|
||||||
msg->nextBlock("AgentData");
|
msg->nextBlock("AgentData");
|
||||||
@@ -2508,6 +2509,9 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
|
|||||||
msg->nextBlock("NewData");
|
msg->nextBlock("NewData");
|
||||||
msg->addBOOL("ListInProfile", list_in_profile);
|
msg->addBOOL("ListInProfile", list_in_profile);
|
||||||
sendReliableMessage();
|
sendReliableMessage();
|
||||||
|
|
||||||
|
update_group_floaters(group.mID);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -873,4 +873,5 @@ extern std::string gAuthString;
|
|||||||
extern LLUUID gReSitTargetID;
|
extern LLUUID gReSitTargetID;
|
||||||
extern LLVector3 gReSitOffset;
|
extern LLVector3 gReSitOffset;
|
||||||
// </edit>
|
// </edit>
|
||||||
|
void update_group_floaters(const LLUUID& group_id);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -679,7 +679,13 @@ bool LLAppViewer::init()
|
|||||||
LLViewerJointMesh::updateVectorize();
|
LLViewerJointMesh::updateVectorize();
|
||||||
|
|
||||||
// load MIME type -> media impl mappings
|
// 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
|
// Copy settings to globals. *TODO: Remove or move to appropriage class initializers
|
||||||
settings_to_globals();
|
settings_to_globals();
|
||||||
@@ -1569,6 +1575,7 @@ bool LLAppViewer::cleanup()
|
|||||||
end_messaging_system();
|
end_messaging_system();
|
||||||
llinfos << "Message system deleted." << llendflush;
|
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.
|
// *NOTE:Mani - The following call is not thread safe.
|
||||||
LLCurl::cleanupClass();
|
LLCurl::cleanupClass();
|
||||||
llinfos << "LLCurl cleaned up." << llendflush;
|
llinfos << "LLCurl cleaned up." << llendflush;
|
||||||
|
|||||||
@@ -1486,7 +1486,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicT
|
|||||||
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
|
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
|
||||||
mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET);
|
mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET);
|
||||||
mDummyAvatar->hideSkirt();
|
mDummyAvatar->hideSkirt();
|
||||||
gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
|
//gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
|
||||||
|
|
||||||
// stop extraneous animations
|
// stop extraneous animations
|
||||||
mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE );
|
mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE );
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
|
|||||||
// helper functions
|
// helper functions
|
||||||
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask = GP_ALL_POWERS);
|
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
|
/// Class LLFloaterGroupPicker
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
@@ -198,15 +201,9 @@ LLPanelGroups::~LLPanelGroups()
|
|||||||
// clear the group list, and get a fresh set of info.
|
// clear the group list, and get a fresh set of info.
|
||||||
void LLPanelGroups::reset()
|
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", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
|
||||||
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
||||||
|
|
||||||
|
|
||||||
const std::string none_text = getString("none");
|
const std::string none_text = getString("none");
|
||||||
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
|
init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
|
||||||
enableButtons();
|
enableButtons();
|
||||||
@@ -220,7 +217,9 @@ BOOL LLPanelGroups::postBuild()
|
|||||||
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));
|
||||||
|
|
||||||
const std::string none_text = getString("none");
|
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);
|
childSetAction("Activate", onBtnActivate, this);
|
||||||
|
|
||||||
@@ -478,8 +477,97 @@ bool LLPanelGroups::callbackLeaveGroup(const LLSD& notification, const LLSD& res
|
|||||||
|
|
||||||
void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
|
void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
|
||||||
{
|
{
|
||||||
LLPanelGroups* self = (LLPanelGroups*)userdata;
|
LLPanelGroups *self = (LLPanelGroups*)userdata;
|
||||||
if(self) self->enableButtons();
|
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)
|
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();
|
LLCtrlListInterface *group_list = ctrl->getListInterface();
|
||||||
if (!group_list) return;
|
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);
|
group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
|
||||||
|
|
||||||
for(S32 i = 0; i < count; ++i)
|
for(S32 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
id = gAgent.mGroups.get(i).mID;
|
LLSD element = create_group_element(&gAgent.mGroups.get(i), highlight_id, none_text, powers_mask);
|
||||||
LLGroupData* group_datap = &gAgent.mGroups.get(i);
|
if(element.size())
|
||||||
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;
|
|
||||||
|
|
||||||
group_list->addElement(element, ADD_SORTED);
|
group_list->addElement(element, ADD_SORTED);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add "none" to list at top
|
// add "none" to list at top
|
||||||
{
|
group_list->addElement(create_group_element(NULL, highlight_id, none_text, powers_mask), ADD_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(element, ADD_TOP);
|
if(selected_id.notNull())
|
||||||
}
|
group_list->selectByValue(selected_id);
|
||||||
|
else
|
||||||
group_list->selectByValue(highlight_id);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
#include "llagent.h"
|
#include "llagent.h"
|
||||||
#include "llbutton.h"
|
#include "llbutton.h"
|
||||||
#include "llfloatergodtools.h"
|
#include "llfloatergodtools.h"
|
||||||
|
#include "llfloateravatarinfo.h"
|
||||||
#include "llparcel.h"
|
#include "llparcel.h"
|
||||||
#include "llscrolllistctrl.h"
|
#include "llscrolllistctrl.h"
|
||||||
#include "lllineeditor.h"
|
#include "lllineeditor.h"
|
||||||
@@ -50,6 +51,10 @@
|
|||||||
#include "llviewerregion.h"
|
#include "llviewerregion.h"
|
||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
#include "llviewerwindow.h"
|
#include "llviewerwindow.h"
|
||||||
|
#include "llagentcamera.h"
|
||||||
|
#include "llviewerobjectlist.h"
|
||||||
|
|
||||||
|
void cmdline_printchat(std::string message);
|
||||||
|
|
||||||
LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
|
LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
|
||||||
|
|
||||||
@@ -104,6 +109,11 @@ BOOL LLFloaterTopObjects::postBuild()
|
|||||||
childSetAction("disable_all_btn", onDisableAll, this);
|
childSetAction("disable_all_btn", onDisableAll, this);
|
||||||
childSetAction("refresh_btn", onRefresh, 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_object_btn", onGetByObjectNameClicked, this);
|
||||||
childSetAction("filter_owner_btn", onGetByOwnerNameClicked, 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]["column"] = "name";
|
||||||
element["columns"][1]["value"] = name_buf;
|
element["columns"][1]["value"] = name_buf;
|
||||||
element["columns"][1]["font"] = "SANSSERIF";
|
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]["column"] = "owner";
|
||||||
element["columns"][2]["value"] = owner_buf;
|
element["columns"][2]["value"] = owner_buf;
|
||||||
element["columns"][2]["font"] = "SANSSERIF";
|
element["columns"][2]["font"] = "SANSSERIF";
|
||||||
@@ -292,6 +306,28 @@ void LLFloaterTopObjects::onDoubleClickObjectsList(void* data)
|
|||||||
{
|
{
|
||||||
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
|
||||||
self->showBeacon();
|
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
|
// static
|
||||||
@@ -381,6 +417,126 @@ void LLFloaterTopObjects::onReturnSelected(void* data)
|
|||||||
sInstance->doToObjects(ACTION_RETURN, false);
|
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
|
//static
|
||||||
bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response)
|
bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response)
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ public:
|
|||||||
|
|
||||||
static void setMode(U32 mode) { if (sInstance) sInstance->mCurrentMode = mode; }
|
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:
|
private:
|
||||||
LLFloaterTopObjects();
|
LLFloaterTopObjects();
|
||||||
~LLFloaterTopObjects();
|
~LLFloaterTopObjects();
|
||||||
@@ -64,6 +69,7 @@ private:
|
|||||||
|
|
||||||
static void onCommitObjectsList(LLUICtrl* ctrl, void* data);
|
static void onCommitObjectsList(LLUICtrl* ctrl, void* data);
|
||||||
static void onDoubleClickObjectsList(void* data);
|
static void onDoubleClickObjectsList(void* data);
|
||||||
|
void lookAtAvatar();
|
||||||
static void onClickShowBeacon(void* data);
|
static void onClickShowBeacon(void* data);
|
||||||
|
|
||||||
void doToObjects(int action, bool all);
|
void doToObjects(int action, bool all);
|
||||||
@@ -73,6 +79,11 @@ private:
|
|||||||
static void onDisableAll(void* data);
|
static void onDisableAll(void* data);
|
||||||
static void onDisableSelected(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 callbackReturnAll(const LLSD& notification, const LLSD& response);
|
||||||
static bool callbackDisableAll(const LLSD& notification, const LLSD& response);
|
static bool callbackDisableAll(const LLSD& notification, const LLSD& response);
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,6 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
|
|||||||
mOpenEnrollment(FALSE),
|
mOpenEnrollment(FALSE),
|
||||||
mMembershipFee(0),
|
mMembershipFee(0),
|
||||||
mAllowPublish(FALSE),
|
mAllowPublish(FALSE),
|
||||||
mListInProfile(FALSE),
|
|
||||||
mMaturePublish(FALSE),
|
mMaturePublish(FALSE),
|
||||||
mChanged(FALSE),
|
mChanged(FALSE),
|
||||||
mMemberCount(0),
|
mMemberCount(0),
|
||||||
|
|||||||
@@ -255,7 +255,6 @@ public:
|
|||||||
BOOL mOpenEnrollment;
|
BOOL mOpenEnrollment;
|
||||||
S32 mMembershipFee;
|
S32 mMembershipFee;
|
||||||
BOOL mAllowPublish;
|
BOOL mAllowPublish;
|
||||||
BOOL mListInProfile;
|
|
||||||
BOOL mMaturePublish;
|
BOOL mMaturePublish;
|
||||||
BOOL mChanged;
|
BOOL mChanged;
|
||||||
S32 mMemberCount;
|
S32 mMemberCount;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ std::string LLLogChat::makeLogFileName(std::string filename)
|
|||||||
|
|
||||||
std::string LLLogChat::cleanFileName(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);
|
S32 position = filename.find_first_of(invalidChars);
|
||||||
while (position != filename.npos)
|
while (position != filename.npos)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ LLNetMap::LLNetMap(const std::string& name) :
|
|||||||
(new mmsetblue())->registerListener(this, "MiniMap.setblue");
|
(new mmsetblue())->registerListener(this, "MiniMap.setblue");
|
||||||
(new mmsetyellow())->registerListener(this, "MiniMap.setyellow");
|
(new mmsetyellow())->registerListener(this, "MiniMap.setyellow");
|
||||||
(new mmsetcustom())->registerListener(this, "MiniMap.setcustom");
|
(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");
|
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];
|
std::size_t hash_value(const LLUUID& uuid)
|
||||||
LLUUID mm_mapkeys[1024];
|
{
|
||||||
U32 mm_netmapnum;
|
return (std::size_t)uuid.getCRC32();
|
||||||
|
}
|
||||||
|
boost::unordered_map<const LLUUID,LLColor4> mm_MarkerColors;
|
||||||
|
|
||||||
void LLNetMap::mm_setcolor(LLUUID key,LLColor4 col){
|
void LLNetMap::mm_setcolor(LLUUID key,LLColor4 col)
|
||||||
if(mm_netmapnum>1023){
|
{
|
||||||
llinfos << "Minimap color buffer filled, relog or something to clear it" << llendl;
|
mm_MarkerColors[key] = col;
|
||||||
return;
|
|
||||||
}
|
|
||||||
mm_mapcols[mm_netmapnum]=col;
|
|
||||||
mm_mapkeys[mm_netmapnum]=key;
|
|
||||||
mm_netmapnum+=1;
|
|
||||||
}
|
}
|
||||||
void LLNetMap::draw()
|
void LLNetMap::draw()
|
||||||
{
|
{
|
||||||
@@ -376,7 +375,6 @@ void LLNetMap::draw()
|
|||||||
std::vector<LLUUID> avatar_ids;
|
std::vector<LLUUID> avatar_ids;
|
||||||
std::vector<LLVector3d> positions;
|
std::vector<LLVector3d> positions;
|
||||||
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
|
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
|
||||||
U32 a;
|
|
||||||
for(U32 i=0; i<avatar_ids.size(); i++)
|
for(U32 i=0; i<avatar_ids.size(); i++)
|
||||||
{
|
{
|
||||||
LLColor4 avColor = standard_color;
|
LLColor4 avColor = standard_color;
|
||||||
@@ -416,12 +414,10 @@ void LLNetMap::draw()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// MOYMOD Minimap custom av colors.
|
// 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 = it->second;
|
||||||
{
|
|
||||||
avColor = mm_mapcols[a];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1090,6 +1086,18 @@ bool LLNetMap::mmsetcustom::handleEvent(LLPointer<LLEvent> event, const LLSD& us
|
|||||||
//}
|
//}
|
||||||
return true;
|
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)
|
bool LLNetMap::LLCenterMap::handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
EMiniMapCenter center = (EMiniMapCenter)userdata.asInteger();
|
EMiniMapCenter center = (EMiniMapCenter)userdata.asInteger();
|
||||||
|
|||||||
@@ -210,7 +210,16 @@ private:
|
|||||||
public:
|
public:
|
||||||
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
|
/*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);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ bool LLNotifyBox::onNotification(const LLSD& notify)
|
|||||||
//bring existing notification to top
|
//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
|
//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.
|
//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())
|
if (boxp && !boxp->isDead())
|
||||||
{
|
{
|
||||||
gNotifyBoxView->showOnly(boxp);
|
gNotifyBoxView->showOnly(boxp);
|
||||||
@@ -118,7 +118,7 @@ bool LLNotifyBox::onNotification(const LLSD& notify)
|
|||||||
}
|
}
|
||||||
else if (notify["sigtype"].asString() == "delete")
|
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())
|
if (boxp && !boxp->isDead())
|
||||||
{
|
{
|
||||||
boxp->close();
|
boxp->close();
|
||||||
|
|||||||
@@ -1689,6 +1689,10 @@ void LLPanelAvatar::resetGroupList()
|
|||||||
LLScrollListCtrl* group_list = mPanelSecondLife->getChild<LLScrollListCtrl>("groups");
|
LLScrollListCtrl* group_list = mPanelSecondLife->getChild<LLScrollListCtrl>("groups");
|
||||||
if (group_list)
|
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();
|
group_list->deleteAllItems();
|
||||||
|
|
||||||
S32 count = gAgent.mGroups.count();
|
S32 count = gAgent.mGroups.count();
|
||||||
@@ -1717,11 +1721,19 @@ void LLPanelAvatar::resetGroupList()
|
|||||||
row["id"] = id ;
|
row["id"] = id ;
|
||||||
row["columns"][0]["value"] = group_string;
|
row["columns"][0]["value"] = group_string;
|
||||||
row["columns"][0]["font"] = "SANSSERIF_SMALL";
|
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;
|
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
|
// 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)
|
if (group_list)
|
||||||
{
|
{
|
||||||
group_list->addElement(row);
|
group_list->addElement(row,ADD_SORTED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(group_list) group_list->sortByColumnIndex(0, TRUE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ BOOL LLPanelGroupGeneral::postBuild()
|
|||||||
mCtrlReceiveNotices->setCallbackUserData(this);
|
mCtrlReceiveNotices->setCallbackUserData(this);
|
||||||
mCtrlReceiveNotices->set(accept_notices);
|
mCtrlReceiveNotices->set(accept_notices);
|
||||||
mCtrlReceiveNotices->setEnabled(data.mID.notNull());
|
mCtrlReceiveNotices->setEnabled(data.mID.notNull());
|
||||||
|
mCtrlReceiveNotices->resetDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
mCtrlReceiveChat = getChild<LLCheckBoxCtrl>("receive_chat", recurse);
|
mCtrlReceiveChat = getChild<LLCheckBoxCtrl>("receive_chat", recurse);
|
||||||
@@ -229,6 +230,7 @@ BOOL LLPanelGroupGeneral::postBuild()
|
|||||||
mCtrlReceiveChat->setCallbackUserData(this);
|
mCtrlReceiveChat->setCallbackUserData(this);
|
||||||
mCtrlReceiveChat->set(!gIMMgr->getIgnoreGroup(mGroupID));
|
mCtrlReceiveChat->set(!gIMMgr->getIgnoreGroup(mGroupID));
|
||||||
mCtrlReceiveChat->setEnabled(mGroupID.notNull());
|
mCtrlReceiveChat->setEnabled(mGroupID.notNull());
|
||||||
|
mCtrlReceiveChat->resetDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse);
|
mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse);
|
||||||
@@ -549,9 +551,17 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
|
|||||||
BOOL receive_notices = false;
|
BOOL receive_notices = false;
|
||||||
BOOL list_in_profile = false;
|
BOOL list_in_profile = false;
|
||||||
if (mCtrlReceiveNotices)
|
if (mCtrlReceiveNotices)
|
||||||
|
{
|
||||||
receive_notices = mCtrlReceiveNotices->get();
|
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)
|
if (mCtrlListGroup)
|
||||||
|
{
|
||||||
list_in_profile = mCtrlListGroup->get();
|
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);
|
gAgent.setUserGroupFlags(mGroupID, receive_notices, list_in_profile);
|
||||||
|
|
||||||
@@ -561,6 +571,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
|
|||||||
gIMMgr->updateIgnoreGroup(mGroupID, !receive_chat);
|
gIMMgr->updateIgnoreGroup(mGroupID, !receive_chat);
|
||||||
// Save here too in case we crash somewhere down the road -- MC
|
// Save here too in case we crash somewhere down the road -- MC
|
||||||
gIMMgr->saveIgnoreGroup();
|
gIMMgr->saveIgnoreGroup();
|
||||||
|
mCtrlReceiveChat->resetDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
mChanged = FALSE;
|
mChanged = FALSE;
|
||||||
@@ -769,53 +780,80 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
|
|||||||
mBtnInfo->setVisible(is_member && !mAllowEdit);
|
mBtnInfo->setVisible(is_member && !mAllowEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCtrlReceiveNotices)
|
if(gc == GC_ALL || gc == GC_PROPERTIES)
|
||||||
{
|
{
|
||||||
mCtrlReceiveNotices->setVisible(is_member);
|
if (mCtrlReceiveNotices)
|
||||||
if (is_member)
|
|
||||||
{
|
{
|
||||||
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)
|
if (mCtrlListGroup)
|
||||||
{
|
{
|
||||||
mCtrlReceiveChat->setVisible(is_member);
|
mCtrlListGroup->setVisible(is_member);
|
||||||
mCtrlReceiveChat->setEnabled(TRUE);
|
if (is_member)
|
||||||
mCtrlReceiveChat->resetDirty();
|
{
|
||||||
}
|
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 (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
|
||||||
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
|
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
|
||||||
|
|
||||||
if (mGroupName) mGroupName->setText(gdatap->mName);
|
if (mGroupName) mGroupName->setText(gdatap->mName);
|
||||||
if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE);
|
if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE);
|
||||||
if (mFounderName) mFounderName->setNameID(gdatap->mFounderID,FALSE);
|
if (mFounderName) mFounderName->setNameID(gdatap->mFounderID,FALSE);
|
||||||
|
|
||||||
LLNameEditor* key_edit = getChild<LLNameEditor>("group_key");
|
LLNameEditor* key_edit = getChild<LLNameEditor>("group_key");
|
||||||
if(key_edit)
|
if(key_edit)
|
||||||
{
|
|
||||||
key_edit->setText(gdatap->getID().asString());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mInsignia)
|
|
||||||
{
|
|
||||||
if (gdatap->mInsigniaID.notNull())
|
|
||||||
{
|
{
|
||||||
mInsignia->setImageAssetID(gdatap->mInsigniaID);
|
key_edit->setText(gdatap->getID().asString());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
mInsignia->setImageAssetID(mDefaultIconID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mEditCharter)
|
if (mInsignia)
|
||||||
{
|
{
|
||||||
mEditCharter->setText(gdatap->mCharter);
|
if (gdatap->mInsigniaID.notNull())
|
||||||
mEditCharter->resetDirty();
|
{
|
||||||
|
mInsignia->setImageAssetID(gdatap->mInsigniaID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mInsignia->setImageAssetID(mDefaultIconID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mEditCharter)
|
||||||
|
{
|
||||||
|
mEditCharter->setText(gdatap->mCharter);
|
||||||
|
mEditCharter->resetDirty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mListVisibleMembers)
|
if (mListVisibleMembers)
|
||||||
|
|||||||
@@ -400,7 +400,7 @@ void LLPreviewAnim::gotAssetForSave(LLVFS *vfs,
|
|||||||
// static
|
// static
|
||||||
void LLPreviewAnim::gotAssetForSave_continued(char* buffer, S32 size, AIFilePicker* filepicker)
|
void LLPreviewAnim::gotAssetForSave_continued(char* buffer, S32 size, AIFilePicker* filepicker)
|
||||||
{
|
{
|
||||||
if (!filepicker->hasFilename())
|
if (filepicker->hasFilename())
|
||||||
{
|
{
|
||||||
std::string filename = filepicker->getFilename();
|
std::string filename = filepicker->getFilename();
|
||||||
std::ofstream export_file(filename.c_str(), std::ofstream::binary);
|
std::ofstream export_file(filename.c_str(), std::ofstream::binary);
|
||||||
|
|||||||
@@ -126,7 +126,6 @@ LLToolBar::LLToolBar()
|
|||||||
BOOL LLToolBar::postBuild()
|
BOOL LLToolBar::postBuild()
|
||||||
{
|
{
|
||||||
childSetCommitCallback("communicate_btn", onClickCommunicate, this);
|
childSetCommitCallback("communicate_btn", onClickCommunicate, this);
|
||||||
childSetControlName("communicate_btn", "ShowCommunicate");
|
|
||||||
|
|
||||||
childSetAction("chat_btn", onClickChat, this);
|
childSetAction("chat_btn", onClickChat, this);
|
||||||
childSetControlName("chat_btn", "ChatVisible");
|
childSetControlName("chat_btn", "ChatVisible");
|
||||||
|
|||||||
@@ -154,16 +154,13 @@ std::string build_extensions_string(ELoadFilter filter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
class AIFileUpload {
|
class AIFileUpload {
|
||||||
protected:
|
|
||||||
AIFilePicker* mPicker;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AIFileUpload(void) : mPicker(NULL) { }
|
AIFileUpload(void) { }
|
||||||
virtual ~AIFileUpload() { llassert(!mPicker); if (mPicker) { mPicker->abort(); mPicker = NULL; } }
|
virtual ~AIFileUpload() { }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool is_valid(std::string const& filename, ELoadFilter type);
|
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);
|
void start_filepicker(ELoadFilter type, char const* context);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -179,21 +176,22 @@ void AIFileUpload::start_filepicker(ELoadFilter filter, char const* context)
|
|||||||
// display();
|
// display();
|
||||||
}
|
}
|
||||||
|
|
||||||
llassert(!mPicker);
|
AIFilePicker* picker = AIFilePicker::create();
|
||||||
mPicker = AIFilePicker::create();
|
picker->open(filter, "", context);
|
||||||
mPicker->open(filter, "", context);
|
// Note that when the call back is called then we're still in the main loop of
|
||||||
mPicker->run(boost::bind(&AIFileUpload::filepicker_callback, this, filter));
|
// 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))
|
if (is_valid(filename, type))
|
||||||
handle_event(filename);
|
handle_event(filename);
|
||||||
}
|
}
|
||||||
mPicker = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AIFileUpload::is_valid(std::string const& filename, ELoadFilter type)
|
bool AIFileUpload::is_valid(std::string const& filename, ELoadFilter type)
|
||||||
@@ -478,7 +476,7 @@ class LLFileMinimizeAllWindows : public view_listener_t
|
|||||||
};
|
};
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
class LLFileSaveTexture : public view_listener_t
|
class LLFileSavePreview : public view_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
@@ -1268,12 +1266,11 @@ void init_menu_file()
|
|||||||
// <edit>
|
// <edit>
|
||||||
(new LLFileMinimizeAllWindows())->registerListener(gMenuHolder, "File.MinimizeAllWindows");
|
(new LLFileMinimizeAllWindows())->registerListener(gMenuHolder, "File.MinimizeAllWindows");
|
||||||
// </edit>
|
// </edit>
|
||||||
(new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture");
|
(new LLFileSavePreview())->registerListener(gMenuHolder, "File.SavePreview");
|
||||||
(new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot");
|
(new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot");
|
||||||
(new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk");
|
(new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk");
|
||||||
(new LLFileQuit())->registerListener(gMenuHolder, "File.Quit");
|
(new LLFileQuit())->registerListener(gMenuHolder, "File.Quit");
|
||||||
(new LLFileLogOut())->registerListener(gMenuHolder, "File.LogOut");
|
(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 LLFileEnableUpload())->registerListener(gMenuHolder, "File.EnableUpload");
|
||||||
(new LLFileEnableSaveAs())->registerListener(gMenuHolder, "File.EnableSaveAs");
|
(new LLFileEnableSaveAs())->registerListener(gMenuHolder, "File.EnableSaveAs");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3759,10 +3759,10 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//Reset the windlight profile to default
|
//Reset the windlight profile to default
|
||||||
LLWLParamManager::instance()->mAnimator.mIsRunning = false;
|
/*LLWLParamManager::instance()->mAnimator.mIsRunning = false;
|
||||||
LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
|
LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
|
||||||
LLWLParamManager::instance()->loadPreset("Default", true);
|
LLWLParamManager::instance()->loadPreset("Default", true);
|
||||||
LLWaterParamManager::instance()->loadPreset("Default",true);
|
LLWaterParamManager::instance()->loadPreset("Default",true);*/
|
||||||
|
|
||||||
// now, use the circuit info to tell simulator about us!
|
// now, use the circuit info to tell simulator about us!
|
||||||
LL_INFOS("Messaging") << "process_teleport_finish() Enabling "
|
LL_INFOS("Messaging") << "process_teleport_finish() Enabling "
|
||||||
|
|||||||
BIN
indra/newview/skins/default/textures/icn_chat_overlay.tga
Normal file
BIN
indra/newview/skins/default/textures/icn_chat_overlay.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@@ -1,28 +1,29 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
<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"
|
height="400" min_height="300" min_width="580" name="top_objects"
|
||||||
title="loading..." width="550">
|
title="loading..." width="580">
|
||||||
<text bottom="-50" follows="left|top" font="SansSerif" height="20" left="10"
|
<text bottom="-50" follows="left|top" font="SansSerif" height="20" left="10"
|
||||||
name="title_text" width="400">
|
name="title_text" width="400">
|
||||||
Loading...
|
Loading...
|
||||||
</text>
|
</text>
|
||||||
<scroll_list bottom_delta="-150" draw_border="true" draw_heading="true"
|
<scroll_list bottom_delta="-200" draw_border="true" draw_heading="true"
|
||||||
follows="left|top|bottom|right" height="150" left="10" multi_select="true"
|
follows="left|top|bottom|right" height="200" left="10" multi_select="true"
|
||||||
name="objects_list" width="530">
|
name="objects_list" width="560">
|
||||||
<column label="Score" name="score" width="55" />
|
<column label="Score" name="score" width="43" />
|
||||||
<column label="Name" name="name" width="140"/>
|
<column label="Name" name="name" dynamicwidth="true" />
|
||||||
<column label="Owner" name="owner" width="105" />
|
<column label="Owner" name="owner" width="100" />
|
||||||
<column label="Location" name="location" width="130" />
|
<column label="Location" name="location" width="100" />
|
||||||
<column label="Time" name="time" width="100" />
|
<column label="Time" name="time" width="105" />
|
||||||
<column label="Mono Time" name="mono_time" width="55" />
|
<column label="Mono Time" name="mono_time" width="50" />
|
||||||
</scroll_list>
|
<column label="URLs" name="URLs" width="50" />
|
||||||
|
</scroll_list>
|
||||||
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
||||||
left="10" name="id_text" width="100">
|
left="10" name="id_text" width="100">
|
||||||
Object ID:
|
Object ID:
|
||||||
</text>
|
</text>
|
||||||
<line_editor bottom_delta="3" enabled="false"
|
<line_editor bottom_delta="3" enabled="false"
|
||||||
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
|
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"
|
<button bottom_delta="0" follows="bottom|right" height="20" label="Show Beacon"
|
||||||
name="show_beacon_btn" right="-10" width="100" />
|
name="show_beacon_btn" right="-10" width="100" />
|
||||||
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
</text>
|
</text>
|
||||||
<line_editor bottom_delta="3" enabled="true"
|
<line_editor bottom_delta="3" enabled="true"
|
||||||
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
|
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"
|
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
|
||||||
name="filter_object_btn" right="-10" width="100" />
|
name="filter_object_btn" right="-10" width="100" />
|
||||||
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
|
||||||
@@ -40,17 +41,26 @@
|
|||||||
</text>
|
</text>
|
||||||
<line_editor bottom_delta="3" enabled="true"
|
<line_editor bottom_delta="3" enabled="true"
|
||||||
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
|
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"
|
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
|
||||||
name="filter_owner_btn" right="-10" width="100" />
|
name="filter_owner_btn" right="-10" width="100" />
|
||||||
<button bottom="35" follows="bottom|left" height="20" label="Return Selected" left="10"
|
<button bottom="35" follows="bottom|left" height="20" label="Return Selected" left="10"
|
||||||
name="return_selected_btn" width="130" />
|
name="return_selected_btn" width="110" />
|
||||||
<button bottom="35" follows="bottom|left" height="20" label="Return All" left="150"
|
<button bottom="35" follows="bottom|left" height="20" label="Return All" left="125"
|
||||||
name="return_all_btn" width="130" />
|
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"
|
<button bottom="10" follows="bottom|left" height="20" label="Disable Selected"
|
||||||
left="10" name="disable_selected_btn" width="130" />
|
left="10" name="disable_selected_btn" width="110" />
|
||||||
<button bottom="10" follows="bottom|left" height="20" label="Disable All" left="150"
|
<button bottom="10" follows="bottom|left" height="20" label="Disable All" left="125"
|
||||||
name="disable_all_btn" width="130" />
|
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"
|
<button bottom="35" follows="bottom|right" height="20" label="Refresh"
|
||||||
name="refresh_btn" right="-10" width="100" />
|
name="refresh_btn" right="-10" width="100" />
|
||||||
<string name="top_scripts_title">
|
<string name="top_scripts_title">
|
||||||
|
|||||||
@@ -64,6 +64,10 @@
|
|||||||
left="0" mouse_opaque="true" name="Custom" width="128">
|
left="0" mouse_opaque="true" name="Custom" width="128">
|
||||||
<on_click function="MiniMap.setcustom" />
|
<on_click function="MiniMap.setcustom" />
|
||||||
</menu_item_call>
|
</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>
|
</menu>
|
||||||
|
|||||||
@@ -52,9 +52,9 @@
|
|||||||
</menu_item_call>
|
</menu_item_call>
|
||||||
<menu_item_separator bottom="-121" enabled="true" height="8" label="-----------" left="0"
|
<menu_item_separator bottom="-121" enabled="true" height="8" label="-----------" left="0"
|
||||||
mouse_opaque="true" name="separator2" width="243" />
|
mouse_opaque="true" name="separator2" width="243" />
|
||||||
<menu_item_call bottom="-140" enabled="true" height="19" label="Save Texture As..." left="0"
|
<menu_item_call bottom="-140" enabled="true" height="19" label="Save Preview As..." left="0"
|
||||||
mouse_opaque="true" name="Save Texture As..." width="243">
|
mouse_opaque="true" name="Save Preview As..." width="243">
|
||||||
<on_click function="File.SaveTexture" userdata="" />
|
<on_click function="File.SavePreview" userdata="" />
|
||||||
<on_enable function="File.EnableSaveAs" />
|
<on_enable function="File.EnableSaveAs" />
|
||||||
</menu_item_call>
|
</menu_item_call>
|
||||||
<menu_item_separator bottom="-148" enabled="true" height="8" label="-----------" left="0"
|
<menu_item_separator bottom="-148" enabled="true" height="8" label="-----------" left="0"
|
||||||
|
|||||||
@@ -1,18 +1,26 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<panel border="true" bottom="-371" height="300" left="280" mouse_opaque="true"
|
<panel border="true" bottom="-371" height="300" left="280" mouse_opaque="true"
|
||||||
name="groups" width="350">
|
name="groups" width="350">
|
||||||
<scroll_list background_visible="true" bottom="45" column_padding="5" draw_border="true"
|
<scroll_list background_visible="true" bottom="45" column_padding="0" draw_border="true"
|
||||||
draw_heading="false" draw_stripes="true" enabled="true"
|
draw_heading="true" draw_stripes="true" enabled="true"
|
||||||
follows="left|top|right|bottom" left="10" mouse_opaque="true"
|
follows="left|top|right|bottom" left="10" mouse_opaque="true"
|
||||||
multi_select="false" name="group list" tab_stop="true" top="-10"
|
multi_select="false" name="group list" tab_stop="true" top="-10"
|
||||||
width="240">
|
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>
|
</scroll_list>
|
||||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<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"
|
bottom="22" drop_shadow_visible="true" enabled="true" follows="left|bottom"
|
||||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12"
|
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="12"
|
||||||
mouse_opaque="false" name="groupdesc" v_pad="0" width="248">
|
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>
|
||||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<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"
|
bottom="5" drop_shadow_visible="true" enabled="true" follows="left|bottom"
|
||||||
|
|||||||
@@ -603,11 +603,12 @@ return Leave current function or event handler
|
|||||||
# Comment
|
# Comment
|
||||||
[one_sided_delimiter .86, .69, .50]
|
[one_sided_delimiter .86, .69, .50]
|
||||||
// Comment:Non-functional commentary or disabled code
|
// 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]
|
[two_sided_delimiter .86, .69, .50]
|
||||||
/* */ Comment:Non-functional commentary or disabled code
|
/* Comment:Non-functional commentary or disabled code
|
||||||
|
|
||||||
# String literals
|
# String literals
|
||||||
[two_sided_delimiter_esc .57, .83, .52]
|
[two_sided_delimiter_esc .57, .83, .52]
|
||||||
" " String literal
|
" String literal
|
||||||
|
|
||||||
#functions are supplied by the program now.
|
#functions are supplied by the program now.
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ AITHREADSAFESIMPLE(U64, AIStateMachine::sMaxCount, );
|
|||||||
void AIStateMachine::updateSettings(void)
|
void AIStateMachine::updateSettings(void)
|
||||||
{
|
{
|
||||||
Dout(dc::statemachine, "Initializing AIStateMachine::sMaxCount");
|
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)
|
if (total_clocks >= max_count)
|
||||||
{
|
{
|
||||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
#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
|
#endif
|
||||||
std::sort(active_statemachines.begin(), active_statemachines.end(), QueueElementComp());
|
std::sort(active_statemachines.begin(), active_statemachines.end(), QueueElementComp());
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -85,9 +85,6 @@ class ViewerManifest(LLManifest):
|
|||||||
self.path("*.png")
|
self.path("*.png")
|
||||||
self.path("textures.xml")
|
self.path("textures.xml")
|
||||||
self.end_prefix("default/textures")
|
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/xui/*/*.xml")
|
||||||
self.path("Default.xml")
|
self.path("Default.xml")
|
||||||
self.path("default/*.xml")
|
self.path("default/*.xml")
|
||||||
@@ -269,9 +266,6 @@ class WindowsManifest(ViewerManifest):
|
|||||||
self.path("qtwcodecs4.dll")
|
self.path("qtwcodecs4.dll")
|
||||||
self.end_prefix()
|
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.
|
# Get llcommon and deps. If missing assume static linkage and continue.
|
||||||
if self.prefix(src=self.args['configuration'], dst=""):
|
if self.prefix(src=self.args['configuration'], dst=""):
|
||||||
try:
|
try:
|
||||||
@@ -461,10 +455,10 @@ class DarwinManifest(ViewerManifest):
|
|||||||
# copy additional libs in <bundle>/Contents/MacOS/
|
# 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/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/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/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/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/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/libogg.0.dylib", dst="MacOS/libogg.0.dylib")
|
||||||
|
|
||||||
# most everything goes in the Resources directory
|
# most everything goes in the Resources directory
|
||||||
if self.prefix(src="", dst="Resources"):
|
if self.prefix(src="", dst="Resources"):
|
||||||
@@ -520,8 +514,11 @@ class DarwinManifest(ViewerManifest):
|
|||||||
self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
|
self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
|
||||||
|
|
||||||
# our apps
|
# our apps
|
||||||
self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
|
try:
|
||||||
#self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
|
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
|
# plugin launcher
|
||||||
self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin.app", "SLPlugin.app")
|
self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin.app", "SLPlugin.app")
|
||||||
@@ -534,14 +531,14 @@ class DarwinManifest(ViewerManifest):
|
|||||||
"libaprutil-1.0.3.8.dylib",
|
"libaprutil-1.0.3.8.dylib",
|
||||||
"libexpat.0.5.0.dylib"):
|
"libexpat.0.5.0.dylib"):
|
||||||
target_lib = os.path.join('../../..', libfile)
|
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" %
|
self.run_command("ln -sf %(target)r %(link)r" %
|
||||||
{'target': target_lib,
|
{'target': target_lib,
|
||||||
'link' : os.path.join(slplugin_res_path, libfile)}
|
'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
|
# plugins
|
||||||
if self.prefix(src="", dst="llplugin"):
|
if self.prefix(src="", dst="llplugin"):
|
||||||
@@ -552,9 +549,6 @@ class DarwinManifest(ViewerManifest):
|
|||||||
|
|
||||||
self.end_prefix("llplugin")
|
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
|
# command line arguments for connecting to the proper grid
|
||||||
self.put_in_file(self.flags_list(), 'arguments.txt')
|
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.path("../plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
|
||||||
self.end_prefix("bin/llplugin")
|
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")
|
self.path("featuretable_linux.txt")
|
||||||
|
|
||||||
def wrapper_name(self):
|
def wrapper_name(self):
|
||||||
|
|||||||
@@ -63,12 +63,21 @@ else (WINDOWS)
|
|||||||
set(WINDOWS_API_LIBRARIES "")
|
set(WINDOWS_API_LIBRARIES "")
|
||||||
endif (WINDOWS)
|
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
|
target_link_libraries(basic_plugin_filepicker
|
||||||
${LLPLUGIN_LIBRARIES}
|
${LLPLUGIN_LIBRARIES}
|
||||||
${LLCOMMON_LIBRARIES}
|
${LLCOMMON_LIBRARIES}
|
||||||
${BASIC_PLUGIN_BASE_LIBRARIES}
|
${BASIC_PLUGIN_BASE_LIBRARIES}
|
||||||
${UI_LIBRARIES}
|
${UI_LIBRARIES}
|
||||||
${WINDOWS_API_LIBRARIES}
|
${WINDOWS_API_LIBRARIES}
|
||||||
|
${OSX_FILE_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(basic_plugin_filepicker
|
add_dependencies(basic_plugin_filepicker
|
||||||
|
|||||||
@@ -189,16 +189,12 @@ OSStatus LLDirPicker::doNavChooseDialog()
|
|||||||
|
|
||||||
error = NavCreateChooseFolderDialog(&mNavOptions, &doNavCallbackEvent, NULL, NULL, &navRef);
|
error = NavCreateChooseFolderDialog(&mNavOptions, &doNavCallbackEvent, NULL, NULL, &navRef);
|
||||||
|
|
||||||
gViewerWindow->mWindow->beforeDialog();
|
|
||||||
|
|
||||||
if (error == noErr)
|
if (error == noErr)
|
||||||
{
|
{
|
||||||
PLS_FLUSH;
|
PLS_FLUSH;
|
||||||
error = NavDialogRun(navRef);
|
error = NavDialogRun(navRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
gViewerWindow->mWindow->afterDialog();
|
|
||||||
|
|
||||||
if (error == noErr)
|
if (error == noErr)
|
||||||
error = NavDialogGetReply(navRef, &navReply);
|
error = NavDialogGetReply(navRef, &navReply);
|
||||||
|
|
||||||
@@ -232,7 +228,7 @@ BOOL LLDirPicker::getDir(std::string const& folder)
|
|||||||
BOOL success = FALSE;
|
BOOL success = FALSE;
|
||||||
OSStatus error = noErr;
|
OSStatus error = noErr;
|
||||||
|
|
||||||
mFileName = folder;
|
mFileName = const_cast<std::string*>(&folder);
|
||||||
|
|
||||||
// mNavOptions.saveFileName
|
// mNavOptions.saveFileName
|
||||||
|
|
||||||
|
|||||||
@@ -761,7 +761,7 @@ Boolean LLFilePickerBase::navOpenFilterProc(AEDesc *theItem, void *info, void *c
|
|||||||
}
|
}
|
||||||
else if (filter == FFLOAD_XML)
|
else if (filter == FFLOAD_XML)
|
||||||
{
|
{
|
||||||
if (fileInfo.filetype != 'XML' &&
|
if (fileInfo.filetype != 'XML ' &&
|
||||||
(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("xml"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
|
(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)
|
else if (filter == FFLOAD_RAW)
|
||||||
{
|
{
|
||||||
if (fileInfo.filetype != L'\?\?\?\?' &&
|
if (fileInfo.filetype != '\?\?\?\?' &&
|
||||||
(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("raw"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
|
(fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("raw"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -952,14 +952,14 @@ OSStatus LLFilePickerBase::doNavSaveDialog(ESaveFilter filter, std::string const
|
|||||||
extension = CFSTR(".png");
|
extension = CFSTR(".png");
|
||||||
break;
|
break;
|
||||||
case FFSAVE_AVI:
|
case FFSAVE_AVI:
|
||||||
type = L'\?\?\?\?';
|
type = '\?\?\?\?';
|
||||||
creator = L'\?\?\?\?';
|
creator = '\?\?\?\?';
|
||||||
extension = CFSTR(".mov");
|
extension = CFSTR(".mov");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FFSAVE_ANIM:
|
case FFSAVE_ANIM:
|
||||||
type = L'\?\?\?\?';
|
type = '\?\?\?\?';
|
||||||
creator = L'\?\?\?\?';
|
creator = '\?\?\?\?';
|
||||||
extension = CFSTR(".xaf");
|
extension = CFSTR(".xaf");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -971,26 +971,26 @@ OSStatus LLFilePickerBase::doNavSaveDialog(ESaveFilter filter, std::string const
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case FFSAVE_RAW:
|
case FFSAVE_RAW:
|
||||||
type = L'\?\?\?\?';
|
type = '\?\?\?\?';
|
||||||
creator = L'\?\?\?\?';
|
creator = '\?\?\?\?';
|
||||||
extension = CFSTR(".raw");
|
extension = CFSTR(".raw");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FFSAVE_J2C:
|
case FFSAVE_J2C:
|
||||||
type = L'\?\?\?\?';
|
type = '\?\?\?\?';
|
||||||
creator = 'prvw';
|
creator = 'prvw';
|
||||||
extension = CFSTR(".j2c");
|
extension = CFSTR(".j2c");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FFSAVE_ALL:
|
case FFSAVE_ALL:
|
||||||
default:
|
default:
|
||||||
type = L'\?\?\?\?';
|
type = '\?\?\?\?';
|
||||||
creator = L'\?\?\?\?';
|
creator = '\?\?\?\?';
|
||||||
extension = CFSTR("");
|
extension = CFSTR("");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
NavEventUPP eventUPP = NewNavEventUPP(navSetDefaultFolderProc);
|
NavEventUPP eventUPP = NewNavEventUPP(NULL); //TODO: test filepicker
|
||||||
mFolder = folder;
|
mFolder = folder;
|
||||||
|
|
||||||
// Create the dialog
|
// Create the dialog
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#ifndef LL_LLFILEPICKER_H
|
#ifndef LL_LLFILEPICKER_H
|
||||||
#define LL_LLFILEPICKER_H
|
#define LL_LLFILEPICKER_H
|
||||||
|
|
||||||
|
#include "basic_plugin_base.h" // For PLS_INFOS etc.
|
||||||
#include "legacy.h"
|
#include "legacy.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -163,10 +164,10 @@ private:
|
|||||||
#if LL_DARWIN
|
#if LL_DARWIN
|
||||||
NavDialogCreationOptions mNavOptions;
|
NavDialogCreationOptions mNavOptions;
|
||||||
|
|
||||||
OSStatus doNavChooseDialog(ELoadFilter filter);
|
OSStatus doNavChooseDialog(ELoadFilter filter, const std::string& folder);
|
||||||
OSStatus doNavSaveDialog(ESaveFilter filter, const std::string& filename);
|
OSStatus doNavSaveDialog(ESaveFilter filter, const std::string& filename, const std::string& folder);
|
||||||
static Boolean navOpenFilterProc(AEDesc *theItem, void *info, void *callBackUD, NavFilterModes filterMode);
|
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; }
|
ELoadFilter getLoadFilter(void) const { return mLoadFilter; }
|
||||||
std::string const& getFolder(void) const { return mFolder; }
|
std::string const& getFolder(void) const { return mFolder; }
|
||||||
#endif // LL_DARWIN
|
#endif // LL_DARWIN
|
||||||
@@ -189,6 +190,7 @@ public:
|
|||||||
|
|
||||||
#endif // LL_GTK
|
#endif // LL_GTK
|
||||||
#if !LL_WINDOWS && !(LL_GTK && LL_X11)
|
#if !LL_WINDOWS && !(LL_GTK && LL_X11)
|
||||||
|
public:
|
||||||
void setWindowID(unsigned long window_id) { PLS_WARNS << "Calling unimplemented LLFilePickerBase::setWindowID" << PLS_ENDL; }
|
void setWindowID(unsigned long window_id) { PLS_WARNS << "Calling unimplemented LLFilePickerBase::setWindowID" << PLS_ENDL; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user